From: <sl...@ke...> - 2008-05-22 18:30:25
|
CVS Root: /cvs/gstreamer Module: gst-plugins-base Changes by: slomo Date: Thu May 22 2008 18:30:29 UTC Log message: Patch by: Thijs Vermeir <thi...@gm...> * gst/videotestsrc/videotestsrc.c: (paint_hline_NV12_NV21): Fix generation of NV12/NV21 frames. Fixes bug #532454. Modified files: . : ChangeLog gst/videotestsrc: videotestsrc.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-base/ChangeLog.diff?r1=1.3959&r2=1.3960 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-base/gst/videotestsrc/videotestsrc.c.diff?r1=1.42&r2=1.43 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gst-plugins-base/ChangeLog,v retrieving revision 1.3959 retrieving revision 1.3960 diff -u -d -r1.3959 -r1.3960 --- ChangeLog 22 May 2008 11:59:32 -0000 1.3959 +++ ChangeLog 22 May 2008 18:30:13 -0000 1.3960 @@ -1,3 +1,10 @@ +2008-05-22 Sebastian Dröge <sl...@ci...> + + Patch by: Thijs Vermeir <thi...@gm...> + * gst/videotestsrc/videotestsrc.c: (paint_hline_NV12_NV21): + Fix generation of NV12/NV21 frames. Fixes bug #532454. 2008-05-22 Wim Taymans <wim...@co...> Patch by: Sjoerd Simons <sjoerd at luon dot net> Index: videotestsrc.c RCS file: /cvs/gstreamer/gst-plugins-base/gst/videotestsrc/videotestsrc.c,v retrieving revision 1.42 retrieving revision 1.43 diff -u -d -r1.42 -r1.43 --- videotestsrc.c 2 May 2008 10:54:51 -0000 1.42 +++ videotestsrc.c 22 May 2008 18:30:15 -0000 1.43 @@ -1070,14 +1070,17 @@ static void paint_hline_NV12_NV21 (paintinfo * p, int x, int y, int w) { - int x1 = x / 2; - int x2 = (x + w) / 2; + int x1 = GST_ROUND_UP_2 (x) / 2; + int x2 = GST_ROUND_UP_2 (x + w) / 2; int offset = y * p->ystride; - int offsetuv = (y / 2) * p->ustride + x; + int offsetuv = GST_ROUND_UP_2 ((y / 2) * p->ustride + x); + int uvlength = x2 - x1; oil_splat_u8_ns (p->yp + offset + x, &p->color->Y, w); - oil_splat_u8 (p->up + offsetuv, 2, &p->color->U, x2 - x1); - oil_splat_u8 (p->vp + offsetuv, 2, &p->color->V, x2 - x1); + if (uvlength) { + oil_splat_u8 (p->up + offsetuv, 2, &p->color->U, x2 - x1); + oil_splat_u8 (p->vp + offsetuv, 2, &p->color->V, x2 - x1); + } } |