[Bug]: Encoder crashes when `MOTION_HALF_PIXEL` is set to false
Describe the bug
When encoding a video while MOTION_HALF_PIXEL is set to false, if MOTION_QUARTERPIXEL is default a crash occurs. This effect has been replicated on both Linux/Vulkan and Windows/DX11. On Linux, this configuration caused X to crash and logs the user out. On Windows, the executable crashes, causes visual artefacts in the GUI, and AMD Bug Report Tool popup appears.
Note that if MOTION_QUARTERPIXEL is also set to false, then the crash does not occur.
To Reproduce Steps to reproduce the behavior:
- Build the AMF
TranscodeHWsample. - Run with
-WIDTH 1920 -HEIGHT 1080 -INPUT input_1920x1080_8bit_420p.yuv -OUTPUT output.h264 -HalfPixel false -TRACE_LEVEL 4 - Observe the crash
Setup
- OS: Windows 11 Pro (22H2 / 22621.2283)
- Driver Version: 21.9.3
- GPU: RX 7900 XTX
- AMF: 1.4.30 (2f326350)
- Which component has the issue: Encoder
Debug Log Attached here: amf_half_pixel_trace.log
Expected behavior No crash occurs. Encode completes successfully
If MOTION_HALF_PIXEL is disabled, then MOTION_QUARTERPIXEL must also be disabled. A guard will be added against this condition in a future driver release.
For now, please disable MOTION_QUARTERPIXEL by adding “-QuarterPixel false” to your command line arguments.
TranscodeHW.exe -WIDTH 1920 -HEIGHT 1080 -INPUT input_1920x1080_8bit_420p.yuv -OUTPUT output.h264 -HalfPixel false –QuarterPixel false -TRACE_LEVEL 4
The new check for the invalid setting combination has been added and will catch the invalid combination starting in a future driver release.
We will notify you once the driver containing the fix has been publicly released.
Verified fixed with public driver version 24.12.1. There is no more crash and the expected error is caught.