summaryrefslogtreecommitdiff
path: root/omx/gstomxvideoenc.c
diff options
context:
space:
mode:
Diffstat (limited to 'omx/gstomxvideoenc.c')
-rw-r--r--omx/gstomxvideoenc.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/omx/gstomxvideoenc.c b/omx/gstomxvideoenc.c
index b78ea5d..20e5108 100644
--- a/omx/gstomxvideoenc.c
+++ b/omx/gstomxvideoenc.c
@@ -1841,6 +1841,7 @@ gst_omx_video_enc_configure_input_buffer (GstOMXVideoEnc * self,
((port_def.format.video.nFrameHeight + 1) / 2));
break;
+ case OMX_COLOR_FormatYUV422SemiPlanar:
#ifdef USE_OMX_TARGET_ZYNQ_USCALE_PLUS
/* Formats defined in extensions have their own enum so disable to -Wswitch warning */
#pragma GCC diagnostic push
@@ -2135,6 +2136,9 @@ gst_omx_video_enc_set_format (GstVideoEncoder * encoder,
case GST_VIDEO_FORMAT_NV12:
port_def.format.video.eColorFormat = OMX_COLOR_FormatYUV420SemiPlanar;
break;
+ case GST_VIDEO_FORMAT_NV16:
+ port_def.format.video.eColorFormat = OMX_COLOR_FormatYUV422SemiPlanar;
+ break;
case GST_VIDEO_FORMAT_ABGR:
port_def.format.video.eColorFormat = OMX_COLOR_Format32bitARGB8888;
break;
@@ -2278,8 +2282,8 @@ gst_omx_video_enc_flush (GstVideoEncoder * encoder)
}
static gboolean
-gst_omx_video_enc_nv12_manual_copy (GstOMXVideoEnc * self, GstBuffer * inbuf,
- GstOMXBuffer * outbuf, gboolean variant_10)
+gst_omx_video_enc_semi_planar_manual_copy (GstOMXVideoEnc * self,
+ GstBuffer * inbuf, GstOMXBuffer * outbuf, gboolean variant_10)
{
GstVideoInfo *info = &self->input_state->info;
OMX_PARAM_PORTDEFINITIONTYPE *port_def = &self->enc_in_port->port_def;
@@ -2470,11 +2474,15 @@ gst_omx_video_enc_fill_buffer (GstOMXVideoEnc * self, GstBuffer * inbuf,
break;
}
case GST_VIDEO_FORMAT_NV12:
- ret = gst_omx_video_enc_nv12_manual_copy (self, inbuf, outbuf, FALSE);
+ case GST_VIDEO_FORMAT_NV16:
+ ret =
+ gst_omx_video_enc_semi_planar_manual_copy (self, inbuf, outbuf,
+ FALSE);
break;
case GST_VIDEO_FORMAT_NV12_10LE32:
case GST_VIDEO_FORMAT_NV16_10LE32:
- ret = gst_omx_video_enc_nv12_manual_copy (self, inbuf, outbuf, TRUE);
+ ret =
+ gst_omx_video_enc_semi_planar_manual_copy (self, inbuf, outbuf, TRUE);
break;
default:
GST_ERROR_OBJECT (self, "Unsupported format");
@@ -2942,6 +2950,7 @@ filter_supported_formats (GList * negotiation_map)
case GST_VIDEO_FORMAT_I420:
case GST_VIDEO_FORMAT_NV12:
case GST_VIDEO_FORMAT_NV12_10LE32:
+ case GST_VIDEO_FORMAT_NV16:
case GST_VIDEO_FORMAT_NV16_10LE32:
//case GST_VIDEO_FORMAT_ABGR:
//case GST_VIDEO_FORMAT_ARGB: