mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-27 18:50:48 +00:00
msdkenc: guard MFX_FOURCC_Y410 with MFX version 1027
This commit is contained in:
parent
d763aeee4b
commit
5140bf1a1f
2 changed files with 15 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue