[MPlayer-dev-eng] [PATCH][FILTER] Drop interlaced frames.

D Richard Felker III dalias at aerifal.cx
Tue Sep 10 17:12:06 CEST 2002


On Tue, Sep 10, 2002 at 01:49:05PM +0300, Andriy N. Gritsenko wrote:
>     Hi all!
> 
>     I've already done it myself. :)  It works good, it's just another
> deinterlace method. I'm using it as 'mencoder -vop pp,dint ...' (since
> filters work in reverse order (from -vop) then I place this filter at
> end of list and it have to be first). Please, test it thoroughly, any
> comments/improvements are welcome.
> 
>     With best wishes.
>     Andriy.
> diff -udprP MPlayer-20020910.orig/libmpcodecs/dec_video.c MPlayer-20020910/libmpcodecs/dec_video.c
> --- MPlayer-20020910.orig/libmpcodecs/dec_video.c	Sun Sep  1 00:03:03 2002
> +++ MPlayer-20020910/libmpcodecs/dec_video.c	Tue Sep 10 13:17:52 2002
> @@ -237,8 +237,10 @@ if(!mpi || drop_frame) return 0; // erro
>  
>  //vo_draw_image(video_out,mpi);
>  vf=sh_video->vfilter;
> -vf->put_image(vf,mpi);
> -vf->control(vf,VFCTRL_DRAW_OSD,NULL);
> +if(vf->put_image(vf,mpi))
> +  vf->control(vf,VFCTRL_DRAW_OSD,NULL);
> +else
> +  return 0;

This requires a lot of unnecessary changes. A better approach would be
to intercept VFCTRL_DRAW_OSD in your filter, and throw it away if the
current frame was dropped. Otherwise pass it on to the next filter.

Rich




More information about the MPlayer-dev-eng mailing list