diff options
author | Wim Taymans <wim.taymans@gmail.com> | 2007-01-23 17:27:39 +0000 |
---|---|---|
committer | Wim Taymans <wim.taymans@gmail.com> | 2007-01-23 17:27:39 +0000 |
commit | 168db53bf471394ca9381b903d3e32d79664d8e5 (patch) | |
tree | 2206543d07359badefc9dc7ad8be972c6167088c /gst/smpte/paint.c | |
parent | a10f2478bbd1d04db5ceec6b0dc9eba6a6597bf8 (diff) |
gst/smpte/: constify some static structs.
Original commit message from CVS:
* gst/smpte/barboxwipes.c: (gst_wipe_boxes_draw),
(gst_wipe_triangles_clock_draw), (gst_wipe_triangles_draw):
* gst/smpte/gstmask.c: (_gst_mask_register):
* gst/smpte/gstmask.h:
* gst/smpte/gstsmpte.c: (gst_smpte_update_mask):
* gst/smpte/paint.c: (gst_smpte_paint_hbox), (draw_bresenham_line),
(gst_smpte_paint_triangle_clock):
constify some static structs.
Don't update the mask if nothing changed to the params.
Make sure we never draw outside of the picture. Fixes #398325.
Diffstat (limited to 'gst/smpte/paint.c')
-rw-r--r-- | gst/smpte/paint.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/gst/smpte/paint.c b/gst/smpte/paint.c index 9b60de37..25f82ea4 100644 --- a/gst/smpte/paint.c +++ b/gst/smpte/paint.c @@ -65,8 +65,6 @@ gst_smpte_paint_hbox (guint32 * dest, gint stride, g_assert (width > 0); g_assert (height > 0); - g_print ("vbox: %d %d %d %d %d %d\n", x0, y0, c0, x1, y1, c1); - dest = dest + y0 * stride + x0; for (i = 0; i < height; i++) { @@ -219,11 +217,13 @@ static void draw_bresenham_line (guint32 * dest, gint stride, gint x0, gint y0, gint x1, gint y1, guint32 col) { - gint dx = abs (x1 - x0); - gint dy = abs (y1 - y0); + gint dx, dy; gint x_incr, y_incr; gint i, dpr, dpru, P, indep; + dx = abs (x1 - x0); + dy = abs (y1 - y0); + dest = dest + y0 * stride + x0; x_incr = SIGN (x1 - x0); @@ -301,6 +301,9 @@ gst_smpte_paint_triangle_clock (guint32 * dest, gint stride, draw_bresenham_line (dest, stride, x0, y0, i, y1, (c2 * angle + c1 * (1.0 - angle))); } + } else { + g_warning ("paint triangle clock: not supported"); + return; } } |