From: Laurent Aimar Date: Thu, 22 Jul 2010 21:38:14 +0000 (+0200) Subject: Prepare doubling frame rate in deinterlace filter. X-Git-Tag: 1.2.0-pre1~5461 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=121a30e2dcb0f5444d53e5664f8e3e044f52b080;p=vlc Prepare doubling frame rate in deinterlace filter. --- diff --git a/modules/video_filter/deinterlace.c b/modules/video_filter/deinterlace.c index 13b4e0614a..d525551b4f 100644 --- a/modules/video_filter/deinterlace.c +++ b/modules/video_filter/deinterlace.c @@ -1536,22 +1536,21 @@ static int RenderYadif( filter_t *p_filter, picture_t *p_dst, picture_t *p_src, static picture_t *Deinterlace( filter_t *p_filter, picture_t *p_pic ) { filter_sys_t *p_sys = p_filter->p_sys; - picture_t *p_pic_dst; + picture_t *p_dst[2]; /* Request output picture */ - p_pic_dst = filter_NewPicture( p_filter ); - if( p_pic_dst == NULL ) + p_dst[0] = filter_NewPicture( p_filter ); + if( p_dst[0] == NULL ) { picture_Release( p_pic ); return NULL; } - - picture_CopyProperties( p_pic_dst, p_pic ); + picture_CopyProperties( p_dst[0], p_pic ); switch( p_sys->i_mode ) { case DEINTERLACE_DISCARD: - RenderDiscard( p_filter, p_pic_dst, p_pic, 0 ); + RenderDiscard( p_filter, p_dst[0], p_pic, 0 ); break; case DEINTERLACE_BOB: @@ -1570,19 +1569,19 @@ static picture_t *Deinterlace( filter_t *p_filter, picture_t *p_pic ) goto drop; case DEINTERLACE_MEAN: - RenderMean( p_filter, p_pic_dst, p_pic ); + RenderMean( p_filter, p_dst[0], p_pic ); break; case DEINTERLACE_BLEND: - RenderBlend( p_filter, p_pic_dst, p_pic ); + RenderBlend( p_filter, p_dst[0], p_pic ); break; case DEINTERLACE_X: - RenderX( p_pic_dst, p_pic ); + RenderX( p_dst[0], p_pic ); break; case DEINTERLACE_YADIF: - if( RenderYadif( p_filter, p_pic_dst, p_pic, 0, 0 ) ) + if( RenderYadif( p_filter, p_dst[0], p_pic, 0, 0 ) ) goto drop; break; @@ -1593,13 +1592,13 @@ static picture_t *Deinterlace( filter_t *p_filter, picture_t *p_pic ) goto drop; } - p_pic_dst->b_progressive = true; + p_dst[0]->b_progressive = true; picture_Release( p_pic ); - return p_pic_dst; + return p_dst[0]; drop: - picture_Release( p_pic_dst ); + picture_Release( p_dst[0] ); picture_Release( p_pic ); return NULL; }