summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatej Knopp <matej.knopp@gmail.com>2013-07-28 20:14:55 +0200
committerTim-Philipp Müller <tim@centricular.net>2013-07-30 12:42:37 +0100
commit139ddbea8edb7903eccd5558d1c5bab761602616 (patch)
tree6c5aa9fb6d3f9a0ce506719a05189380bacfb371
parent977410bb8952bf62e20362aff41b861e745492e4 (diff)
downloadgstreamer-plugins-bad-139ddbea8edb7903eccd5558d1c5bab761602616.tar.gz
dvdspu: artifacts when rendering clipped spu
https://bugzilla.gnome.org/show_bug.cgi?id=705039
-rw-r--r--gst/dvdspu/gstspu-vobsub-render.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/gst/dvdspu/gstspu-vobsub-render.c b/gst/dvdspu/gstspu-vobsub-render.c
index c8f716537..d234cb756 100644
--- a/gst/dvdspu/gstspu-vobsub-render.c
+++ b/gst/dvdspu/gstspu-vobsub-render.c
@@ -248,7 +248,9 @@ gstspu_vobsub_render_line (SpuState * state, guint8 * planes[3],
if (next_draw_x > state->vobsub.clip_rect.right)
next_draw_x = state->vobsub.clip_rect.right; /* ensure no overflow */
/* Now draw the run between [x,next_x) */
- gstspu_vobsub_draw_rle_run (state, x, next_draw_x, colour);
+ if (state->vobsub.cur_Y >= state->vobsub.clip_rect.top &&
+ state->vobsub.cur_Y <= state->vobsub.clip_rect.bottom)
+ gstspu_vobsub_draw_rle_run (state, x, next_draw_x, colour);
x = next_x;
}
}
@@ -552,10 +554,10 @@ gstspu_vobsub_render (GstDVDSpu * dvdspu, GstVideoFrame * frame)
/* Render even line */
state->vobsub.comp_last_x_ptr = state->vobsub.comp_last_x;
gstspu_vobsub_render_line (state, planes, &state->vobsub.cur_offsets[0]);
- if (!clip) {
- /* Advance the luminance output pointer */
- planes[0] += strides[0];
- }
+
+ /* Advance the luminance output pointer */
+ planes[0] += strides[0];
+
state->vobsub.cur_Y++;
/* Render odd line */
@@ -565,13 +567,14 @@ gstspu_vobsub_render (GstDVDSpu * dvdspu, GstVideoFrame * frame)
if (!clip) {
/* Blend the accumulated UV compositing buffers onto the output */
gstspu_vobsub_blend_comp_buffers (state, planes);
-
- /* Update all the output pointers */
- planes[0] += strides[0];
- planes[1] += strides[1];
- planes[2] += strides[2];
}
+
+ /* Update all the output pointers */
+ planes[0] += strides[0];
+ planes[1] += strides[1];
+ planes[2] += strides[2];
}
+
if (state->vobsub.cur_Y == state->vobsub.disp_rect.bottom) {
gboolean clip;