Commit f51cb831 authored by Thomas Guillem's avatar Thomas Guillem

magnify: fix wrong colors if visible_pitch != pitch

Fixes #19951
parent 58982a04
......@@ -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 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment