Commit 5140bf1a authored by Víctor Manuel Jáquez Leal's avatar Víctor Manuel Jáquez Leal Committed by Edward Hervey

msdkenc: guard MFX_FOURCC_Y410 with MFX version 1027

parent d763aeee
Pipeline #68149 passed with stages
in 58 minutes and 4 seconds
......@@ -271,7 +271,9 @@ gst_msdkenc_init_encoder (GstMsdkEnc * thiz)
case GST_VIDEO_FORMAT_NV12:
case GST_VIDEO_FORMAT_P010_10LE:
case GST_VIDEO_FORMAT_VUYA:
#if (MFX_VERSION >= 1027)
case GST_VIDEO_FORMAT_Y410:
#endif
need_vpp = FALSE;
break;
case GST_VIDEO_FORMAT_YV12:
......@@ -425,12 +427,14 @@ gst_msdkenc_init_encoder (GstMsdkEnc * thiz)
thiz->param.mfx.FrameInfo.BitDepthLuma = 8;
thiz->param.mfx.FrameInfo.BitDepthChroma = 8;
break;
#if (MFX_VERSION >= 1027)
case GST_VIDEO_FORMAT_Y410:
thiz->param.mfx.FrameInfo.FourCC = MFX_FOURCC_Y410;
thiz->param.mfx.FrameInfo.ChromaFormat = MFX_CHROMAFORMAT_YUV444;
thiz->param.mfx.FrameInfo.BitDepthLuma = 10;
thiz->param.mfx.FrameInfo.BitDepthChroma = 10;
break;
#endif
default:
thiz->param.mfx.FrameInfo.FourCC = MFX_FOURCC_NV12;
thiz->param.mfx.FrameInfo.BitDepthLuma = 8;
......
......@@ -49,7 +49,13 @@ enum
#define PROP_LOWPOWER_DEFAULT FALSE
#define COMMON_FORMAT "{ NV12, I420, YV12, YUY2, UYVY, BGRA, P010_10LE, VUYA, Y410 }"
#define RAW_FORMATS "NV12, I420, YV12, YUY2, UYVY, BGRA, P010_10LE, VUYA"
#if (MFX_VERSION >= 1027)
#define COMMON_FORMAT "{ " RAW_FORMATS ", Y410 }"
#else
#define COMMON_FORMAT "{ " RAW_FORMATS " }"
#endif
static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
......@@ -107,7 +113,9 @@ gst_msdkh265enc_configure (GstMsdkEnc * encoder)
encoder->param.mfx.CodecProfile = MFX_PROFILE_HEVC_MAIN10;
break;
case MFX_FOURCC_AYUV:
#if (MFX_VERSION >= 1027)
case MFX_FOURCC_Y410:
#endif
encoder->param.mfx.CodecProfile = MFX_PROFILE_HEVC_REXT;
break;
default:
......@@ -189,10 +197,12 @@ gst_msdkh265enc_set_src_caps (GstMsdkEnc * encoder)
case MFX_FOURCC_AYUV:
gst_structure_set (structure, "profile", G_TYPE_STRING, "main-444", NULL);
break;
#if (MFX_VERSION >= 1027)
case MFX_FOURCC_Y410:
gst_structure_set (structure, "profile", G_TYPE_STRING, "main-444-10",
NULL);
break;
#endif
default:
gst_structure_set (structure, "profile", G_TYPE_STRING, "main", NULL);
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment