mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
msdkh265enc: add support for Y210 in sink pad
Sample pipeline: gst-launch-1.0 videotestsrc ! video/x-raw,format=Y210 ! msdkh265enc ! filesink location=output.h265
This commit is contained in:
parent
fbd1d0cecb
commit
7c91c8c980
2 changed files with 15 additions and 2 deletions
|
@ -552,6 +552,13 @@ gst_msdkenc_init_encoder (GstMsdkEnc * thiz)
|
||||||
thiz->param.mfx.FrameInfo.BitDepthLuma = 10;
|
thiz->param.mfx.FrameInfo.BitDepthLuma = 10;
|
||||||
thiz->param.mfx.FrameInfo.BitDepthChroma = 10;
|
thiz->param.mfx.FrameInfo.BitDepthChroma = 10;
|
||||||
break;
|
break;
|
||||||
|
case GST_VIDEO_FORMAT_Y210:
|
||||||
|
thiz->param.mfx.FrameInfo.FourCC = MFX_FOURCC_Y210;
|
||||||
|
thiz->param.mfx.FrameInfo.ChromaFormat = MFX_CHROMAFORMAT_YUV422;
|
||||||
|
thiz->param.mfx.FrameInfo.BitDepthLuma = 10;
|
||||||
|
thiz->param.mfx.FrameInfo.BitDepthChroma = 10;
|
||||||
|
thiz->param.mfx.FrameInfo.Shift = 1;
|
||||||
|
break;
|
||||||
#endif
|
#endif
|
||||||
case GST_VIDEO_FORMAT_BGRA:
|
case GST_VIDEO_FORMAT_BGRA:
|
||||||
thiz->param.mfx.FrameInfo.FourCC = MFX_FOURCC_RGB4;
|
thiz->param.mfx.FrameInfo.FourCC = MFX_FOURCC_RGB4;
|
||||||
|
@ -1864,6 +1871,7 @@ gst_msdkenc_need_conversion (GstMsdkEnc * encoder, GstVideoInfo * info,
|
||||||
case GST_VIDEO_FORMAT_VUYA:
|
case GST_VIDEO_FORMAT_VUYA:
|
||||||
#if (MFX_VERSION >= 1027)
|
#if (MFX_VERSION >= 1027)
|
||||||
case GST_VIDEO_FORMAT_Y410:
|
case GST_VIDEO_FORMAT_Y410:
|
||||||
|
case GST_VIDEO_FORMAT_Y210:
|
||||||
#endif
|
#endif
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,7 @@ enum
|
||||||
#define RAW_FORMATS "NV12, I420, YV12, YUY2, UYVY, BGRA, P010_10LE, VUYA"
|
#define RAW_FORMATS "NV12, I420, YV12, YUY2, UYVY, BGRA, P010_10LE, VUYA"
|
||||||
|
|
||||||
#if (MFX_VERSION >= 1027)
|
#if (MFX_VERSION >= 1027)
|
||||||
#define COMMON_FORMAT "{ " RAW_FORMATS ", Y410 }"
|
#define COMMON_FORMAT "{ " RAW_FORMATS ", Y410, Y210 }"
|
||||||
#else
|
#else
|
||||||
#define COMMON_FORMAT "{ " RAW_FORMATS " }"
|
#define COMMON_FORMAT "{ " RAW_FORMATS " }"
|
||||||
#endif
|
#endif
|
||||||
|
@ -74,7 +74,7 @@ static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",
|
||||||
"framerate = (fraction) [0/1, MAX], "
|
"framerate = (fraction) [0/1, MAX], "
|
||||||
"width = (int) [ 1, MAX ], height = (int) [ 1, MAX ], "
|
"width = (int) [ 1, MAX ], height = (int) [ 1, MAX ], "
|
||||||
"stream-format = (string) byte-stream , alignment = (string) au , "
|
"stream-format = (string) byte-stream , alignment = (string) au , "
|
||||||
"profile = (string) { main, main-10, main-444, main-444-10 } ")
|
"profile = (string) { main, main-10, main-444, main-444-10, main-422-10 } ")
|
||||||
);
|
);
|
||||||
|
|
||||||
#define gst_msdkh265enc_parent_class parent_class
|
#define gst_msdkh265enc_parent_class parent_class
|
||||||
|
@ -112,6 +112,7 @@ gst_msdkh265enc_configure (GstMsdkEnc * encoder)
|
||||||
case MFX_FOURCC_AYUV:
|
case MFX_FOURCC_AYUV:
|
||||||
#if (MFX_VERSION >= 1027)
|
#if (MFX_VERSION >= 1027)
|
||||||
case MFX_FOURCC_Y410:
|
case MFX_FOURCC_Y410:
|
||||||
|
case MFX_FOURCC_Y210:
|
||||||
#endif
|
#endif
|
||||||
encoder->param.mfx.CodecProfile = MFX_PROFILE_HEVC_REXT;
|
encoder->param.mfx.CodecProfile = MFX_PROFILE_HEVC_REXT;
|
||||||
break;
|
break;
|
||||||
|
@ -215,6 +216,10 @@ gst_msdkh265enc_set_src_caps (GstMsdkEnc * encoder)
|
||||||
gst_structure_set (structure, "profile", G_TYPE_STRING, "main-444-10",
|
gst_structure_set (structure, "profile", G_TYPE_STRING, "main-444-10",
|
||||||
NULL);
|
NULL);
|
||||||
break;
|
break;
|
||||||
|
case MFX_FOURCC_Y210:
|
||||||
|
gst_structure_set (structure, "profile", G_TYPE_STRING, "main-422-10",
|
||||||
|
NULL);
|
||||||
|
break;
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
gst_structure_set (structure, "profile", G_TYPE_STRING, "main", NULL);
|
gst_structure_set (structure, "profile", G_TYPE_STRING, "main", NULL);
|
||||||
|
|
Loading…
Reference in a new issue