Skip to content

st/va: fix an Invalid VASurfaceID error when downscaling video in h264_vaapi

nyanmisaka requested to merge nyanmisaka/mesa:transcodefix into master

This PR fixed an Invalid VASurfaceID error in FFmpeg when transcoding video from hevc p010 to h264 nv12 with downscaling.

FFmpeg 4.2.2/master (hevc,p010,1080p ---h264_vaapi--->h264,nv12,720p)

Error message: [Parsed_scale_vaapi_2 @ 0x561f65cd0bc0] Failed to render parameter buffer: 6 (invalid VASurfaceID).

I tested and found that this problem can be reproduced on RX550, RX Vega and Raven APU. This problem greatly affects the use of AMD GPU to assemble HTPC for home media center, such as the open-source Jellyfin media system.

Fix:

#1418 (closed) and https://bugs.freedesktop.org/show_bug.cgi?id=111111

Related issues:

https://github.com/jellyfin/jellyfin/issues/2473 and https://trac.ffmpeg.org/ticket/8006

Edited by nyanmisaka

Merge request reports