Describe the bug
When using the AMF AVC encoder via direct API (not FFmpeg), the HOST RAM fallback
pipeline crashes with an Access Violation inside amfrtdrv64.dll.
The crash occurs consistently after CreateSurfaceFromDX11Native fails (HR=0x00000011)
and the encoder falls back to HOST RAM mode. After ResetContextForHost creates a clean
context (without InitDX11) and SetEncoderParams succeeds, the first call to
CreateSurfaceFromHostNative(AMF_SURFACE_BGRA) triggers:
EAccessViolation: Write of address 0x0000000000000440
in module amfrtdrv64.dll at address 0x00007FFC7025BCAC
The crash address 0x440 is consistent across all sessions, suggesting a fixed struct
offset being written to an invalid pointer inside the driver.
To Reproduce
- Initialize AMF AVC encoder with DX11 context (InitDX11 on a Cezanne APU iGPU)
- Call CreateSurfaceFromDX11Native — it returns HR=0x00000011 (fails on Cezanne)
- Release the DX11 context, create a new clean context without InitDX11
- Call Component.Init with AMF_SURFACE_BGRA
- Call CreateSurfaceFromHostNative(AMF_SURFACE_BGRA, width, height, width*4, height,
pBGRA, &surf, nullptr)
- Call Component.SubmitInput(surf) → EAccessViolation Write 0x440 in amfrtdrv64.dll
Workaround confirmed
FFmpeg h264_amf with hwdownload (CPU→AMF path) works correctly on the same hardware
with the same driver. This confirms the VCE hardware is functional — the bug is
specific to the direct AMF API path for HOST RAM surface submission.
Setup
- OS: Windows 10 Build 26200 (25H2)
- Driver Version: 31.0.21924.61 (Adrenalin, December 2025)
- amfrt64.dll version: 1.4.31.0
- GPU: AMD Ryzen 7 5700G — Cezanne APU, Radeon Vega 8 iGPU (VEN_1002 / DEV_1638)
- No discrete GPU present
- Which component has the issue: Encoder (AMFVideoEncoderVCE_AVC), HOST RAM pipeline
Additional context
The AMF runtime stub (amfrt64.dll) is only 4KB — actual encoding is delegated to
amfrtdrv64.dll which is where the crash occurs. The issue appears to be in how
amfrtdrv64.dll handles HOST memory surfaces on the Cezanne iGPU when the AMF context
has no DX11 state initialized. FFmpeg works around this by using a different internal
path (hwdownload filter before h264_amf), which never triggers the crash.
Describe the bug
When using the AMF AVC encoder via direct API (not FFmpeg), the HOST RAM fallback
pipeline crashes with an Access Violation inside amfrtdrv64.dll.
The crash occurs consistently after CreateSurfaceFromDX11Native fails (HR=0x00000011)
and the encoder falls back to HOST RAM mode. After ResetContextForHost creates a clean
context (without InitDX11) and SetEncoderParams succeeds, the first call to
CreateSurfaceFromHostNative(AMF_SURFACE_BGRA) triggers:
EAccessViolation: Write of address 0x0000000000000440
in module amfrtdrv64.dll at address 0x00007FFC7025BCAC
The crash address 0x440 is consistent across all sessions, suggesting a fixed struct
offset being written to an invalid pointer inside the driver.
To Reproduce
pBGRA, &surf, nullptr)
Workaround confirmed
FFmpeg h264_amf with hwdownload (CPU→AMF path) works correctly on the same hardware
with the same driver. This confirms the VCE hardware is functional — the bug is
specific to the direct AMF API path for HOST RAM surface submission.
Setup
Additional context
The AMF runtime stub (amfrt64.dll) is only 4KB — actual encoding is delegated to
amfrtdrv64.dll which is where the crash occurs. The issue appears to be in how
amfrtdrv64.dll handles HOST memory surfaces on the Cezanne iGPU when the AMF context
has no DX11 state initialized. FFmpeg works around this by using a different internal
path (hwdownload filter before h264_amf), which never triggers the crash.