Skip to content
This repository was archived by the owner on May 17, 2023. It is now read-only.

Commit d057770

Browse files
authored
vaapi: recognize VA_FOURCC_XYUV VAImage (#2768)
In FFmpeg, VA_FOURCC_XYUV is used for 4:4:4 8bit content when vaapi is used for hardware acceleration, hence we have to use VA_FOURCC_XYUV too for 4:4:4 8bit content when qsv is used on Linux because qsv is based on vaapi, and map VA_FOURCC_XYUV to MFX_FOURCC_AYUV in FFmpeg. So mapping VA_FOURCC_XYUV is needed in the SDK. $ ffmpeg -y -hwaccel qsv -i in444.mp4 -vf "hwdownload,format=vuyx" -f null -
1 parent edea33d commit d057770

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

_studio/shared/src/libmfx_allocator_vaapi.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,11 @@ mfxStatus mfxDefaultAllocatorVAAPI::SetFrameData(const VAImage &va_image, mfxU32
579579
break;
580580

581581
case VA_FOURCC_AYUV:
582-
if (mfx_fourcc != va_image.format.fourcc) return MFX_ERR_LOCK_MEMORY;
582+
/* Set AYUV mfxFrameData by XYUV VAImage */
583+
#ifdef VA_FOURCC_XYUV
584+
case VA_FOURCC_XYUV:
585+
#endif
586+
if (mfx_fourcc != MFX_FOURCC_AYUV) return MFX_ERR_LOCK_MEMORY;
583587

584588
{
585589
ptr->V = p_buffer + va_image.offsets[0];

0 commit comments

Comments
 (0)