From 03dc5d4a1b29c7c5d2f2ee9e522653ce8a1e4583 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 28 May 2012 17:11:46 +0200 Subject: [PATCH] video: fix UYVP packing function --- gst/videoconvert/videoconvert.c | 2 +- gst/videotestsrc/videotestsrc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gst/videoconvert/videoconvert.c b/gst/videoconvert/videoconvert.c index f46e892..8799985 100644 --- a/gst/videoconvert/videoconvert.c +++ b/gst/videoconvert/videoconvert.c @@ -1020,7 +1020,7 @@ putline_UYVP (VideoConvert * convert, GstVideoFrame * dest, const guint8 * src, destline[(i / 2) * 5 + 0] = u0; destline[(i / 2) * 5 + 1] = y0 >> 2; destline[(i / 2) * 5 + 2] = (y0 << 6) | (v0 >> 4); - destline[(i / 2) * 5 + 3] = (v0 << 4) | (y1 >> 2); + destline[(i / 2) * 5 + 3] = (v0 << 4) | (y1 >> 6); destline[(i / 2) * 5 + 4] = (y1 << 2); } } diff --git a/gst/videotestsrc/videotestsrc.c b/gst/videotestsrc/videotestsrc.c index b62ab57..ae38ebe 100644 --- a/gst/videotestsrc/videotestsrc.c +++ b/gst/videotestsrc/videotestsrc.c @@ -1733,7 +1733,7 @@ convert_hline_UYVP (paintinfo * p, int y) Y[(i / 2) * 5 + 0] = u0; Y[(i / 2) * 5 + 1] = y0 >> 2; Y[(i / 2) * 5 + 2] = (y0 << 6) | (v0 >> 4); - Y[(i / 2) * 5 + 3] = (v0 << 4) | (y1 >> 2); + Y[(i / 2) * 5 + 3] = (v0 << 4) | (y1 >> 6); Y[(i / 2) * 5 + 4] = (y1 << 2); } } -- 2.7.4