- if( p_src->p[i].i_pitch == p_dst->p[i].i_pitch )
- {
- /* There are margins, but with the same width : perfect ! */
- vlc_memcpy( p_dst->p[i].p_pixels, p_src->p[i].p_pixels,
- p_src->p[i].i_pitch * i_height );
- }
- else
- {
- /* We need to proceed line by line */
- uint8_t *p_in = p_src->p[i].p_pixels;
- uint8_t *p_out = p_dst->p[i].p_pixels;
- int i_line;
+void plane_CopyPixels( plane_t *p_dst, const plane_t *p_src )
+{
+ const unsigned i_width = __MIN( p_dst->i_visible_pitch,
+ p_src->i_visible_pitch );
+ const unsigned i_height = __MIN( p_dst->i_visible_lines,
+ p_src->i_visible_lines );