mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 11:48:06 +02:00
frontends/va: WA for ffmpeg 10bit encoding crash
When doing 10bit encoding in ffmpeg it uses VaDeriveImage, and that could result in missing mapping the chroma buffer of the input frame. This WA to disallow ffmpeg using VaDeriveImage function, so that VaCreateImage and VaPutImage can be used and WA the chroma buffer mapping issue. Reviewed-by: Leo Liu <leo.liu@amd.com> Signed-off-by: Ruijing Dong <ruijing.dong@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17472>
This commit is contained in:
parent
cd653e5cc7
commit
a585d95803
1 changed files with 8 additions and 0 deletions
|
|
@ -223,6 +223,10 @@ vlVaDeriveImage(VADriverContextP ctx, VASurfaceID surface, VAImage *image)
|
|||
"hevcencode"
|
||||
};
|
||||
|
||||
const char *derive_progressive_disallowlist[] = {
|
||||
"ffmpeg"
|
||||
};
|
||||
|
||||
if (!ctx)
|
||||
return VA_STATUS_ERROR_INVALID_CONTEXT;
|
||||
|
||||
|
|
@ -251,6 +255,10 @@ vlVaDeriveImage(VADriverContextP ctx, VASurfaceID surface, VAImage *image)
|
|||
PIPE_VIDEO_ENTRYPOINT_BITSTREAM,
|
||||
PIPE_VIDEO_CAP_SUPPORTS_PROGRESSIVE))
|
||||
return VA_STATUS_ERROR_OPERATION_FAILED;
|
||||
} else {
|
||||
for (i = 0; i < ARRAY_SIZE(derive_progressive_disallowlist); i++)
|
||||
if ((strcmp(derive_progressive_disallowlist[i], proc) == 0))
|
||||
return VA_STATUS_ERROR_OPERATION_FAILED;
|
||||
}
|
||||
|
||||
surfaces = surf->buffer->get_surfaces(surf->buffer);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue