diff options
author | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2009-09-09 16:02:03 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2009-09-09 16:28:53 +0200 |
commit | a9909c1abfd11787954baaf87676505d57da6fae (patch) | |
tree | 1b56a3b4cf990f935c9f432a666388d9ab1154db /gst | |
parent | 42ee5e22a2e696e2d8390e89f90d78b149417944 (diff) |
videobox: Fix AYUV->I420 conversion
For this fix the averaging of the chroma values. It should't be (a/2 + b)/2
but just (a + b)/2.
Fixes bug #594599.
Diffstat (limited to 'gst')
-rw-r--r-- | gst/videobox/gstvideobox.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gst/videobox/gstvideobox.c b/gst/videobox/gstvideobox.c index a50594f9..2f9027cb 100644 --- a/gst/videobox/gstvideobox.c +++ b/gst/videobox/gstvideobox.c @@ -951,8 +951,8 @@ gst_video_box_ayuv_i420 (GstVideoBox * video_box, guint8 * src, guint8 * dest) Vtemp[UVfloor (a + j)] = (Vtemp[UVfloor (a + j)] + ((guint8 *) & src_loc1[j])[3]) / 2; } else { - Utemp[UVfloor (a + j)] = ((guint8 *) & src_loc1[j])[2] / 2; - Vtemp[UVfloor (a + j)] = ((guint8 *) & src_loc1[j])[3] / 2; + Utemp[UVfloor (a + j)] = ((guint8 *) & src_loc1[j])[2]; + Vtemp[UVfloor (a + j)] = ((guint8 *) & src_loc1[j])[3]; } } Ydest += crop_w; |