mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-20 00:31:13 +00:00
msdk: Don't use VA_RT_FORMAT_YUV420_10 if it's undefined
../sys/msdk/gstmsdkallocator_libva.c:99:16: error: ‘VA_RT_FORMAT_YUV420_10’ The minimum required version seems to VA_API_VERSION >= 1.2.0
This commit is contained in:
parent
42adb02a10
commit
e0042a99bf
1 changed files with 8 additions and 0 deletions
|
@ -106,7 +106,11 @@ gst_msdk_frame_alloc (mfxHDL pthis, mfxFrameAllocRequest * req,
|
||||||
gst_msdk_get_va_rt_format_from_mfx_rt_format (req->Info.ChromaFormat);
|
gst_msdk_get_va_rt_format_from_mfx_rt_format (req->Info.ChromaFormat);
|
||||||
|
|
||||||
if (format == VA_RT_FORMAT_YUV420 && va_fourcc == VA_FOURCC_P010)
|
if (format == VA_RT_FORMAT_YUV420 && va_fourcc == VA_FOURCC_P010)
|
||||||
|
#if VA_CHECK_VERSION(1, 2, 0)
|
||||||
format = VA_RT_FORMAT_YUV420_10;
|
format = VA_RT_FORMAT_YUV420_10;
|
||||||
|
#else
|
||||||
|
format = VA_RT_FORMAT_YUV420_10BPP;
|
||||||
|
#endif
|
||||||
|
|
||||||
#if VA_CHECK_VERSION(1, 4, 1)
|
#if VA_CHECK_VERSION(1, 4, 1)
|
||||||
if (format == VA_RT_FORMAT_YUV444 && va_fourcc == VA_FOURCC_A2R10G10B10)
|
if (format == VA_RT_FORMAT_YUV444 && va_fourcc == VA_FOURCC_A2R10G10B10)
|
||||||
|
@ -501,7 +505,11 @@ gst_msdk_export_dmabuf_to_vasurface (GstMsdkContext * context,
|
||||||
va_fourcc = VA_FOURCC_YUY2;
|
va_fourcc = VA_FOURCC_YUY2;
|
||||||
break;
|
break;
|
||||||
case GST_VIDEO_FORMAT_P010_10LE:
|
case GST_VIDEO_FORMAT_P010_10LE:
|
||||||
|
#if VA_CHECK_VERSION(1, 2, 0)
|
||||||
va_chroma = VA_RT_FORMAT_YUV420_10;
|
va_chroma = VA_RT_FORMAT_YUV420_10;
|
||||||
|
#else
|
||||||
|
va_chroma = VA_RT_FORMAT_YUV420_10BPP;
|
||||||
|
#endif
|
||||||
va_fourcc = VA_FOURCC_P010;
|
va_fourcc = VA_FOURCC_P010;
|
||||||
break;
|
break;
|
||||||
case GST_VIDEO_FORMAT_UYVY:
|
case GST_VIDEO_FORMAT_UYVY:
|
||||||
|
|
Loading…
Reference in a new issue