diff options
author | Aurélien Zanelli <aurelien.zanelli@parrot.com> | 2014-04-09 18:52:16 +0200 |
---|---|---|
committer | Julien Isorce <julien.isorce@collabora.co.uk> | 2014-04-15 15:09:24 +0100 |
commit | 1b6879921cdddf261c47391a47150c13158ac0cb (patch) | |
tree | 5978ddc859388f1d2142777dbd252b1185fa9208 /omx/gstomxvideodec.c | |
parent | f5f876f6817b4dc98cc88fc5e6ee1e62a78c119b (diff) | |
download | gst-omx-1b6879921cdddf261c47391a47150c13158ac0cb.tar.gz |
omxvideodec: add support of more color format
Add support for ABGR, ARGB, RGB16, BGR16, YUY2, UYVY, YVYU, GRAY8 and
NV16 color format.
Diffstat (limited to 'omx/gstomxvideodec.c')
-rw-r--r-- | omx/gstomxvideodec.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c index 20109c1..d9ed7ff 100644 --- a/omx/gstomxvideodec.c +++ b/omx/gstomxvideodec.c @@ -448,6 +448,20 @@ gst_omx_video_dec_fill_buffer (GstOMXVideoDec * self, guint p; switch (GST_VIDEO_INFO_FORMAT (vinfo)) { + case GST_VIDEO_FORMAT_ABGR: + case GST_VIDEO_FORMAT_ARGB: + dst_width[0] = GST_VIDEO_INFO_WIDTH (vinfo) * 4; + break; + case GST_VIDEO_FORMAT_RGB16: + case GST_VIDEO_FORMAT_BGR16: + case GST_VIDEO_FORMAT_YUY2: + case GST_VIDEO_FORMAT_UYVY: + case GST_VIDEO_FORMAT_YVYU: + dst_width[0] = GST_VIDEO_INFO_WIDTH (vinfo) * 2; + break; + case GST_VIDEO_FORMAT_GRAY8: + dst_width[0] = GST_VIDEO_INFO_WIDTH (vinfo); + break; case GST_VIDEO_FORMAT_I420: dst_width[0] = GST_VIDEO_INFO_WIDTH (vinfo); src_stride[1] = nstride / 2; @@ -466,6 +480,13 @@ gst_omx_video_dec_fill_buffer (GstOMXVideoDec * self, dst_width[1] = GST_VIDEO_INFO_WIDTH (vinfo); dst_height[1] = GST_VIDEO_INFO_HEIGHT (vinfo) / 2; break; + case GST_VIDEO_FORMAT_NV16: + dst_width[0] = GST_VIDEO_INFO_WIDTH (vinfo); + src_stride[1] = nstride; + src_size[1] = src_stride[1] * nslice; + dst_width[1] = GST_VIDEO_INFO_WIDTH (vinfo); + dst_height[1] = GST_VIDEO_INFO_HEIGHT (vinfo); + break; default: g_assert_not_reached (); break; |