From: Wim Taymans Date: Thu, 6 Nov 2014 08:32:21 +0000 (+0100) Subject: video-format: fix range extension of UYVP X-Git-Tag: 1.6.0~858 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1f14077b41687aaf62928a9e6da0ff43ae873bba;p=platform%2Fupstream%2Fgst-plugins-base.git video-format: fix range extension of UYVP We need to shift the top 6 bits to the lower 6 bits --- diff --git a/gst-libs/gst/video/video-format.c b/gst-libs/gst/video/video-format.c index c23c08f..9afb85a 100644 --- a/gst-libs/gst/video/video-format.c +++ b/gst-libs/gst/video/video-format.c @@ -1235,10 +1235,10 @@ unpack_UYVP (const GstVideoFormatInfo * info, GstVideoPackFlags flags, y1 = (((s[(i / 2) * 5 + 3] & 0x03) << 8) | s[(i / 2) * 5 + 4]) << 6; if (!(flags & GST_VIDEO_PACK_FLAG_TRUNCATE_RANGE)) { - y0 |= (y0 >> 4); - y1 |= (y1 >> 4); - u0 |= (u0 >> 4); - v0 |= (v0 >> 4); + y0 |= (y0 >> 10); + y1 |= (y1 >> 10); + u0 |= (u0 >> 10); + v0 |= (v0 >> 10); } d[i * 4 + 0] = 0xffff;