summaryrefslogtreecommitdiffstats
path: root/gst/debug
diff options
context:
space:
mode:
authorJulien Moutte <julien@moutte.net>2005-11-24 12:50:28 +0000
committerJulien Moutte <julien@moutte.net>2005-11-24 12:50:28 +0000
commit20c7083ccdb9f873c5635b0f5444d8f7c88085d2 (patch)
treeffffb09633401ee41b3cc42a950f6ac26410305e /gst/debug
parent557da6614b0c595112964c800b0ed714d5b89303 (diff)
gst/: Handle strides correctly, fix identity flipping, convert navigation event correctly again.
Original commit message from CVS: 2005-11-24 Julien MOUTTE <julien@moutte.net> * gst/debug/gstnavigationtest.c: (draw_box_planar411): * gst/videofilter/gstvideoflip.c: (gst_videoflip_method_get_type), (gst_videoflip_set_caps), (gst_videoflip_transform_caps), (gst_videoflip_get_unit_size), (gst_videoflip_flip), (gst_videoflip_transform), (gst_videoflip_handle_src_event), (gst_videoflip_set_property), (gst_videoflip_base_init), (gst_videoflip_class_init), (gst_videoflip_init): Handle strides correctly, fix identity flipping, convert navigation event correctly again.
Diffstat (limited to 'gst/debug')
-rw-r--r--gst/debug/gstnavigationtest.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/gst/debug/gstnavigationtest.c b/gst/debug/gstnavigationtest.c
index a88583b5..c0339727 100644
--- a/gst/debug/gstnavigationtest.c
+++ b/gst/debug/gstnavigationtest.c
@@ -169,6 +169,7 @@ draw_box_planar411 (guint8 * dest, int width, int height, int x, int y,
guint8 colory, guint8 coloru, guint8 colorv)
{
int x1, x2, y1, y2;
+ guint8 *d = dest;
if (x < 0 || y < 0 || x >= width || y >= height)
return;
@@ -180,27 +181,25 @@ draw_box_planar411 (guint8 * dest, int width, int height, int x, int y,
for (y = y1; y < y2; y++) {
for (x = x1; x < x2; x++) {
- ((guint8 *) dest)[y * width + x] = colory;
+ ((guint8 *) d)[y * GST_VIDEO_I420_Y_ROWSTRIDE (width) + x] = colory;
}
}
- dest += height * width;
- width /= 2;
- height /= 2;
+ d = dest + GST_VIDEO_I420_U_OFFSET (width, height);
x1 /= 2;
x2 /= 2;
y1 /= 2;
y2 /= 2;
for (y = y1; y < y2; y++) {
for (x = x1; x < x2; x++) {
- ((guint8 *) dest)[y * width + x] = coloru;
+ ((guint8 *) d)[y * GST_VIDEO_I420_U_ROWSTRIDE (width) + x] = coloru;
}
}
- dest += height * width;
+ d = dest + GST_VIDEO_I420_V_OFFSET (width, height);
for (y = y1; y < y2; y++) {
for (x = x1; x < x2; x++) {
- ((guint8 *) dest)[y * width + x] = colorv;
+ ((guint8 *) d)[y * GST_VIDEO_I420_V_ROWSTRIDE (width) + x] = colorv;
}
}
}