mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
gst/videotestsrc/videotestsrc.c: Fix generation of NV12/NV21 frames. Fixes bug #532454.
Original commit message from CVS: Patch by: Thijs Vermeir <thijsvermeir@gmail.com> * gst/videotestsrc/videotestsrc.c: (paint_hline_NV12_NV21): Fix generation of NV12/NV21 frames. Fixes bug #532454.
This commit is contained in:
parent
1c424d9d93
commit
88b1e8efcf
2 changed files with 15 additions and 5 deletions
|
@ -1,3 +1,10 @@
|
|||
2008-05-22 Sebastian Dröge <slomo@circular-chaos.org>
|
||||
|
||||
Patch by: Thijs Vermeir <thijsvermeir@gmail.com>
|
||||
|
||||
* gst/videotestsrc/videotestsrc.c: (paint_hline_NV12_NV21):
|
||||
Fix generation of NV12/NV21 frames. Fixes bug #532454.
|
||||
|
||||
2008-05-22 Wim Taymans <wim.taymans@collabora.co.uk>
|
||||
|
||||
Patch by: Sjoerd Simons <sjoerd at luon dot net>
|
||||
|
|
|
@ -1070,14 +1070,17 @@ paint_hline_I420 (paintinfo * p, int x, int y, int w)
|
|||
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);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in a new issue