Commit 217a1d1a authored by Laurent Aimar's avatar Laurent Aimar

Use the same algo for I420 and I422 way when deinterlacing using 'blend' mode.

The code used for I422 was a mix of blend (luma) and discard (chroma).
parent c6a9a4c5
......@@ -228,56 +228,18 @@ void RenderBlend( filter_t *p_filter,
p_out_end = p_out + p_outpic->p[i_plane].i_pitch
* p_outpic->p[i_plane].i_visible_lines;
switch( p_filter->fmt_in.video.i_chroma )
/* First line: simple copy */
vlc_memcpy( p_out, p_in, p_pic->p[i_plane].i_pitch );
p_out += p_outpic->p[i_plane].i_pitch;
/* Remaining lines: mean value */
for( ; p_out < p_out_end ; )
{
case VLC_CODEC_I420:
case VLC_CODEC_J420:
case VLC_CODEC_YV12:
/* First line: simple copy */
vlc_memcpy( p_out, p_in, p_pic->p[i_plane].i_pitch );
p_out += p_outpic->p[i_plane].i_pitch;
/* Remaining lines: mean value */
for( ; p_out < p_out_end ; )
{
Merge( p_out, p_in, p_in + p_pic->p[i_plane].i_pitch,
p_pic->p[i_plane].i_pitch );
p_out += p_outpic->p[i_plane].i_pitch;
p_in += p_pic->p[i_plane].i_pitch;
}
break;
case VLC_CODEC_I422:
case VLC_CODEC_J422:
/* First line: simple copy */
vlc_memcpy( p_out, p_in, p_pic->p[i_plane].i_pitch );
p_out += p_outpic->p[i_plane].i_pitch;
/* Remaining lines: mean value */
if( i_plane == Y_PLANE )
{
for( ; p_out < p_out_end ; )
{
Merge( p_out, p_in, p_in + p_pic->p[i_plane].i_pitch,
p_pic->p[i_plane].i_pitch );
p_out += p_outpic->p[i_plane].i_pitch;
p_in += p_pic->p[i_plane].i_pitch;
}
}
else
{
for( ; p_out < p_out_end ; )
{
Merge( p_out, p_in, p_in + p_pic->p[i_plane].i_pitch,
p_pic->p[i_plane].i_pitch );
p_out += p_outpic->p[i_plane].i_pitch;
p_in += 2*p_pic->p[i_plane].i_pitch;
}
}
break;
Merge( p_out, p_in, p_in + p_pic->p[i_plane].i_pitch,
p_pic->p[i_plane].i_pitch );
p_out += p_outpic->p[i_plane].i_pitch;
p_in += p_pic->p[i_plane].i_pitch;
}
}
EndMerge();
......
......@@ -255,6 +255,7 @@ void GetOutputFormat( filter_t *p_filter,
case DEINTERLACE_IVTC:
case DEINTERLACE_DISCARD:
case DEINTERLACE_BOB:
case DEINTERLACE_BLEND:
p_dst->i_chroma = p_src->i_chroma;
break;
default:
......
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