Open cgutman opened 11 months ago
I bisected the bug on my RX 480 system and found: Last working driver: 23.5.2 First broken driver: 23.7.1
So the regression was introduced in the 23.7.1 driver. Based on user reports, this issue also affects RX Vega 64.
It can also be reproduced with the following FFmpeg command:
ffmpeg -i <input file>.mp4 -codec:v h264_amf -usage ultralowlatency out.mp4
Are there any plans to fix this regression in a future driver update?
We're still seeing a number of reports from AMD users impacted by this regression in https://github.com/LizardByte/Sunshine/issues/1559 and https://github.com/LizardByte/Sunshine/issues/1860
One way to work around this would be:
AMF_VIDEO_ENCODER_USAGE_ULTRA_LOW_LATENCY
AMF_VIDEO_ENCODER_PREENCODE_ENABLE
and check for errorsAMF_VIDEO_ENCODER_USAGE_TRANSCODING
Describe the bug Setting
AMF_VIDEO_ENCODER_USAGE
toAMF_VIDEO_ENCODER_USAGE_ULTRA_LOW_LATENCY
on theAMFVideoEncoderVCE_AVC
component causes the encoder to fail to initialize on at least Polaris GPUs (seems to be all pre-RDNA cards).This was originally reported as a Sunshine bug in https://github.com/LizardByte/Sunshine/issues/1559 but the root cause appears to be a bug in the GPU driver or AMF runtime. As a remote gaming app, Sunshine defaults to the ultra-low-latency preset which exposes this bug.
To Reproduce Steps to reproduce the behavior:
AMF_VIDEO_ENCODER_USAGE_TRANSCODING
toAMF_VIDEO_ENCODER_USAGE_ULTRA_LOW_LATENCY
in EncoderLatency.cpp. A patch to accomplish is attached below.Patch to EncoderLatency sample that exposes the bug:
Setup (please complete the following information):
Debug Log (please upload or paste):
Expected behavior The encoder should initialize correctly when configured with the
AMF_VIDEO_ENCODER_USAGE_ULTRA_LOW_LATENCY
usage value.Screenshots N/A
Additional context The HEVC encoder does print a warning about pre-analysis, but initializes correctly:
It looks like some missing/incorrect error handling in the
AMFVideoEncoderVCE_AVC
encoder. Hopefully it's a simple fix.