[MPlayer-dev-eng] Re: Need help with drop-deinterlace plugin
Andriy N. Gritsenko
andrej at lucky.net
Wed Sep 4 22:59:54 CEST 2002
Hi, Arpi!
Sometime (on Wednesday, September 4 at 23:17) I've received something...
>> decode_video() will return 1 in that case anyway then mencoder will lose
>> the frame, so vf->put_image() must be called to the very end (ve_lavc.c:
>> put_image() for example). Since somefilter:put_image() doesn't know if it
>> is encoder call, it have to call vf_next_put_image() in any case. So my
>> question is how to let next put_image() know about duplicated frame? I
>> didn't find any other way except replace current frame with previous. :)
>mencoder will notice if you skipped teh fraem and will automatcialy
>duplicate the previous frame to keep a-v in sync.
Hmm... I looked to mencoder code - it keeps number of written frames
and do a-v sync with variable skip_flag. How it can do it if function
decode_video() says the frame is succesfully written but actually zero
bytes was done? See next line in mencoder.c:
blit_frame=decode_video(sh_video,start,in_size,(skip_flag>0)?1:0);
If frame wasn't written then decode_video() returns 0 and mencoder or
just skip the frame (if skip_flag>0, so it decreases skip_flag by 1), or
corrects time to sync a-v or writes duplicated frame to keep a-v in sync.
In our case blit_frame will be 1 but really it's not so! So frame will be
lost (see the code, if mencoder can skip the frame (skip_flag>0) then
vf->put_image() will be never called!). :(
With best wishes.
Andriy.
More information about the MPlayer-dev-eng
mailing list