mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 05:06:17 +00:00
vpx: Support GST_VIDEO_FORMAT_I422_10LE
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/705>
This commit is contained in:
parent
87d0464259
commit
cce71d5cd5
3 changed files with 16 additions and 4 deletions
|
@ -74,7 +74,7 @@ GST_STATIC_PAD_TEMPLATE ("src",
|
||||||
GST_PAD_SRC,
|
GST_PAD_SRC,
|
||||||
GST_PAD_ALWAYS,
|
GST_PAD_ALWAYS,
|
||||||
GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE
|
GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE
|
||||||
("{ I420, YV12, Y42B, Y444, GBR, I420_10LE }"))
|
("{ I420, YV12, Y42B, Y444, GBR, I420_10LE, I422_10LE }"))
|
||||||
);
|
);
|
||||||
|
|
||||||
#define parent_class gst_vp9_dec_parent_class
|
#define parent_class gst_vp9_dec_parent_class
|
||||||
|
@ -168,14 +168,16 @@ gst_vp9_dec_get_valid_format (GstVPXDec * dec, vpx_image_t * img,
|
||||||
GST_ELEMENT_WARNING (dec, STREAM, NOT_IMPLEMENTED,
|
GST_ELEMENT_WARNING (dec, STREAM, NOT_IMPLEMENTED,
|
||||||
(NULL), ("Unsupported frame format - 16-bit 4:2:0 planar"));
|
(NULL), ("Unsupported frame format - 16-bit 4:2:0 planar"));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
#ifdef VPX_IMG_FMT_I42216
|
|
||||||
case VPX_IMG_FMT_I42216:
|
case VPX_IMG_FMT_I42216:
|
||||||
/* VPX_IMG_FMT_I422 | VPX_IMG_FMT_HIGHBITDEPTH */
|
/* VPX_IMG_FMT_I422 | VPX_IMG_FMT_HIGHBITDEPTH */
|
||||||
|
if (img->bit_depth == 10) {
|
||||||
|
*fmt = GST_VIDEO_FORMAT_I422_10LE;
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
GST_FIXME_OBJECT (dec, "Please add 16-bit Y42B format");
|
GST_FIXME_OBJECT (dec, "Please add 16-bit Y42B format");
|
||||||
GST_ELEMENT_WARNING (dec, STREAM, NOT_IMPLEMENTED,
|
GST_ELEMENT_WARNING (dec, STREAM, NOT_IMPLEMENTED,
|
||||||
(NULL), ("Unsupported frame format - 16-bit 4:2:2 planar"));
|
(NULL), ("Unsupported frame format - 16-bit 4:2:2 planar"));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
#endif
|
|
||||||
#ifdef VPX_IMG_FMT_I44416
|
#ifdef VPX_IMG_FMT_I44416
|
||||||
case VPX_IMG_FMT_I44416:
|
case VPX_IMG_FMT_I44416:
|
||||||
/* VPX_IMG_FMT_I444 | VPX_IMG_FMT_HIGHBITDEPTH */
|
/* VPX_IMG_FMT_I444 | VPX_IMG_FMT_HIGHBITDEPTH */
|
||||||
|
|
|
@ -75,7 +75,8 @@ GST_STATIC_PAD_TEMPLATE ("sink",
|
||||||
GST_PAD_SINK,
|
GST_PAD_SINK,
|
||||||
GST_PAD_ALWAYS,
|
GST_PAD_ALWAYS,
|
||||||
/*GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("{ I420, YV12, Y42B, Y444 }")) */
|
/*GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("{ I420, YV12, Y42B, Y444 }")) */
|
||||||
GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("{ I420, YV12, Y444, I420_10LE }"))
|
GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE
|
||||||
|
("{ I420, YV12, Y444, I420_10LE, I422_10LE }"))
|
||||||
);
|
);
|
||||||
|
|
||||||
static GstStaticPadTemplate gst_vp9_enc_src_template =
|
static GstStaticPadTemplate gst_vp9_enc_src_template =
|
||||||
|
@ -199,6 +200,12 @@ gst_vp9_enc_set_image_format (GstVPXEnc * enc, vpx_image_t * image)
|
||||||
image->bps = 15;
|
image->bps = 15;
|
||||||
image->x_chroma_shift = image->y_chroma_shift = 1;
|
image->x_chroma_shift = image->y_chroma_shift = 1;
|
||||||
break;
|
break;
|
||||||
|
case GST_VIDEO_FORMAT_I422_10LE:
|
||||||
|
image->fmt = VPX_IMG_FMT_I42216;
|
||||||
|
image->bps = 20;
|
||||||
|
image->x_chroma_shift = 1;
|
||||||
|
image->y_chroma_shift = 0;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
g_assert_not_reached ();
|
g_assert_not_reached ();
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -1525,6 +1525,9 @@ gst_vpx_enc_get_downstream_profile (GstVPXEnc * encoder, GstVideoInfo * info)
|
||||||
case GST_VIDEO_FORMAT_I420_10LE:
|
case GST_VIDEO_FORMAT_I420_10LE:
|
||||||
min_profile = 2;
|
min_profile = 2;
|
||||||
break;
|
break;
|
||||||
|
case GST_VIDEO_FORMAT_I422_10LE:
|
||||||
|
min_profile = 3;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
min_profile = 0;
|
min_profile = 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue