mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-20 00:31:13 +00:00
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.
This commit is contained in:
parent
42ee5e22a2
commit
a9909c1abf
1 changed files with 2 additions and 2 deletions
|
@ -951,8 +951,8 @@ gst_video_box_ayuv_i420 (GstVideoBox * video_box, guint8 * src, guint8 * dest)
|
||||||
Vtemp[UVfloor (a + j)] =
|
Vtemp[UVfloor (a + j)] =
|
||||||
(Vtemp[UVfloor (a + j)] + ((guint8 *) & src_loc1[j])[3]) / 2;
|
(Vtemp[UVfloor (a + j)] + ((guint8 *) & src_loc1[j])[3]) / 2;
|
||||||
} else {
|
} else {
|
||||||
Utemp[UVfloor (a + j)] = ((guint8 *) & src_loc1[j])[2] / 2;
|
Utemp[UVfloor (a + j)] = ((guint8 *) & src_loc1[j])[2];
|
||||||
Vtemp[UVfloor (a + j)] = ((guint8 *) & src_loc1[j])[3] / 2;
|
Vtemp[UVfloor (a + j)] = ((guint8 *) & src_loc1[j])[3];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Ydest += crop_w;
|
Ydest += crop_w;
|
||||||
|
|
Loading…
Reference in a new issue