p_picture->date = VLC_TS_INVALID;
p_picture->b_force = false;
p_picture->b_progressive = false;
- p_picture->i_nb_fields = 0;
+ p_picture->i_nb_fields = 2;
p_picture->b_top_field_first = false;
picture_CleanupQuant( p_picture );
}
p_picture->p_release_sys = NULL;
p_picture->i_refcount = 0;
+ p_picture->i_nb_fields = 2;
+
p_picture->i_qtype = QTYPE_NONE;
p_picture->i_qstride = 0;
p_picture->p_q = NULL;
*/
int i_modulo_w = 1;
int i_modulo_h = 1;
- int i_ratio_h = 1;
+ unsigned int i_ratio_h = 1;
for( unsigned i = 0; i < p_dsc->plane_count; i++ )
{
i_modulo_w = LCM( i_modulo_w, 16 * p_dsc->p[i].w.den );
const unsigned i_height = __MIN( p_dst->i_visible_lines,
p_src->i_visible_lines );
- if( p_src->i_pitch == p_dst->i_pitch )
+ /* The 2x visible pitch check does two things:
+ 1) Makes field plane_t's work correctly (see the deinterlacer module)
+ 2) Moves less data if the pitch and visible pitch differ much.
+ */
+ if( p_src->i_pitch == p_dst->i_pitch &&
+ p_src->i_pitch < 2*p_src->i_visible_pitch )
{
/* There are margins, but with the same width : perfect ! */
vlc_memcpy( p_dst->p_pixels, p_src->p_pixels,