msdkh265enc: add support for Y410 in sink pad
Sample pipeline: gst-launch-1.0 videotestsrc ! video/x-raw,format=Y410 ! msdkh265enc low-power=1 ! filesink location=output.h265
This commit is contained in:
parent
0507547646
commit
83100b3504
@ -271,6 +271,7 @@ gst_msdkenc_init_encoder (GstMsdkEnc * thiz)
|
|||||||
case GST_VIDEO_FORMAT_NV12:
|
case GST_VIDEO_FORMAT_NV12:
|
||||||
case GST_VIDEO_FORMAT_P010_10LE:
|
case GST_VIDEO_FORMAT_P010_10LE:
|
||||||
case GST_VIDEO_FORMAT_VUYA:
|
case GST_VIDEO_FORMAT_VUYA:
|
||||||
|
case GST_VIDEO_FORMAT_Y410:
|
||||||
need_vpp = FALSE;
|
need_vpp = FALSE;
|
||||||
break;
|
break;
|
||||||
case GST_VIDEO_FORMAT_YV12:
|
case GST_VIDEO_FORMAT_YV12:
|
||||||
@ -424,6 +425,12 @@ gst_msdkenc_init_encoder (GstMsdkEnc * thiz)
|
|||||||
thiz->param.mfx.FrameInfo.BitDepthLuma = 8;
|
thiz->param.mfx.FrameInfo.BitDepthLuma = 8;
|
||||||
thiz->param.mfx.FrameInfo.BitDepthChroma = 8;
|
thiz->param.mfx.FrameInfo.BitDepthChroma = 8;
|
||||||
break;
|
break;
|
||||||
|
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;
|
||||||
default:
|
default:
|
||||||
thiz->param.mfx.FrameInfo.FourCC = MFX_FOURCC_NV12;
|
thiz->param.mfx.FrameInfo.FourCC = MFX_FOURCC_NV12;
|
||||||
thiz->param.mfx.FrameInfo.BitDepthLuma = 8;
|
thiz->param.mfx.FrameInfo.BitDepthLuma = 8;
|
||||||
|
@ -49,7 +49,7 @@ enum
|
|||||||
|
|
||||||
#define PROP_LOWPOWER_DEFAULT FALSE
|
#define PROP_LOWPOWER_DEFAULT FALSE
|
||||||
|
|
||||||
#define COMMON_FORMAT "{ NV12, I420, YV12, YUY2, UYVY, BGRA, P010_10LE, VUYA }"
|
#define COMMON_FORMAT "{ NV12, I420, YV12, YUY2, UYVY, BGRA, P010_10LE, VUYA, Y410 }"
|
||||||
|
|
||||||
static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
|
static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
|
||||||
GST_PAD_SINK,
|
GST_PAD_SINK,
|
||||||
@ -107,6 +107,7 @@ gst_msdkh265enc_configure (GstMsdkEnc * encoder)
|
|||||||
encoder->param.mfx.CodecProfile = MFX_PROFILE_HEVC_MAIN10;
|
encoder->param.mfx.CodecProfile = MFX_PROFILE_HEVC_MAIN10;
|
||||||
break;
|
break;
|
||||||
case MFX_FOURCC_AYUV:
|
case MFX_FOURCC_AYUV:
|
||||||
|
case MFX_FOURCC_Y410:
|
||||||
encoder->param.mfx.CodecProfile = MFX_PROFILE_HEVC_REXT;
|
encoder->param.mfx.CodecProfile = MFX_PROFILE_HEVC_REXT;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -188,6 +189,10 @@ gst_msdkh265enc_set_src_caps (GstMsdkEnc * encoder)
|
|||||||
case MFX_FOURCC_AYUV:
|
case MFX_FOURCC_AYUV:
|
||||||
gst_structure_set (structure, "profile", G_TYPE_STRING, "main-444", NULL);
|
gst_structure_set (structure, "profile", G_TYPE_STRING, "main-444", NULL);
|
||||||
break;
|
break;
|
||||||
|
case MFX_FOURCC_Y410:
|
||||||
|
gst_structure_set (structure, "profile", G_TYPE_STRING, "main-444-10",
|
||||||
|
NULL);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
gst_structure_set (structure, "profile", G_TYPE_STRING, "main", NULL);
|
gst_structure_set (structure, "profile", G_TYPE_STRING, "main", NULL);
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user