[vlc-commits] magnify: fix wrong colors if visible_pitch != pitch
Thomas Guillem
git at videolan.org
Fri Mar 9 16:43:33 CET 2018
vlc/vlc-3.0 | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Mar 9 15:41:19 2018 +0100| [a2212b7290ec0151df9ed7f52c02a09dea729056] | committer: Thomas Guillem
magnify: fix wrong colors if visible_pitch != pitch
Fixes #19951
(cherry picked from commit f51cb8312ae041e681b5a62aabe7dde034be6563)
Signed-off-by: Thomas Guillem <thomas at gllm.fr>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=a2212b7290ec0151df9ed7f52c02a09dea729056
---
modules/video_filter/magnify.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/video_filter/magnify.c b/modules/video_filter/magnify.c
index 9edd627983..4b667c6206 100644
--- a/modules/video_filter/magnify.c
+++ b/modules/video_filter/magnify.c
@@ -186,7 +186,7 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
const int o_yp = o_y * p_outpic->p[i_plane].i_visible_lines / p_outpic->p[Y_PLANE].i_visible_lines;
const int o_xp = o_x * p_outpic->p[i_plane].i_visible_pitch / p_outpic->p[Y_PLANE].i_visible_pitch;
- p_pic->p[i_plane].p_pixels += o_yp * p_pic->p[i_plane].i_visible_pitch + o_xp;
+ p_pic->p[i_plane].p_pixels += o_yp * p_pic->p[i_plane].i_pitch + o_xp;
}
/* */
@@ -230,7 +230,7 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
v_w = __MIN( fmt_out.i_visible_width * ZOOM_FACTOR / o_zoom, fmt_out.i_visible_width - 1 );
v_h = __MIN( fmt_out.i_visible_height * ZOOM_FACTOR / o_zoom, fmt_out.i_visible_height - 1 );
- DrawRectangle( p_oyp->p_pixels, p_oyp->i_visible_pitch,
+ DrawRectangle( p_oyp->p_pixels, p_oyp->i_pitch,
p_oyp->i_visible_pitch, p_oyp->i_visible_lines,
o_x/VIS_ZOOM, o_y/VIS_ZOOM,
v_w, v_h );
More information about the vlc-commits
mailing list