[MPlayer-dev-eng] Re: Drop interlaced frames.
Andriy N. Gritsenko
andrej at lucky.net
Tue Sep 10 17:29:36 CEST 2002
Hi, D Richard Felker III!
Sometime (on Tuesday, September 10 at 18:08) I've received something...
>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.
You got it wrong. May be I have unusual style? :) It has nothing to do
with VFCTRL_DRAW_OSD at all. It's just equal to:
vf=sh_video->vfilter;
-vf->put_image(vf,mpi);
+if(!vf->put_image(vf,mpi))
+ return 0;
vf->control(vf,VFCTRL_DRAW_OSD,NULL);
With best wishes.
Andriy.
More information about the MPlayer-dev-eng
mailing list