vlc | branch: master | Laurent Aimar <[email protected]> | Fri May 25 16:50:47 2012 +0200| [217a1d1a4581731ab07700d38b066f892e8363c9] | committer: 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). > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=217a1d1a4581731ab07700d38b066f892e8363c9 --- modules/video_filter/deinterlace/algo_basic.c | 60 +++++------------------- modules/video_filter/deinterlace/deinterlace.c | 1 + 2 files changed, 12 insertions(+), 49 deletions(-) diff --git a/modules/video_filter/deinterlace/algo_basic.c b/modules/video_filter/deinterlace/algo_basic.c index a66e043..003c2a7 100644 --- a/modules/video_filter/deinterlace/algo_basic.c +++ b/modules/video_filter/deinterlace/algo_basic.c @@ -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(); diff --git a/modules/video_filter/deinterlace/deinterlace.c b/modules/video_filter/deinterlace/deinterlace.c index 43983e5..1311996 100644 --- a/modules/video_filter/deinterlace/deinterlace.c +++ b/modules/video_filter/deinterlace/deinterlace.c @@ -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: _______________________________________________ vlc-commits mailing list [email protected] http://mailman.videolan.org/listinfo/vlc-commits
