Re: Deinterlacing?

Mikhail Ramendik <[email protected]> Wed, 28 Sep 2005 01:39:58 +0400
Newsgroups gmane.comp.video.ogle.devel
Message-ID <[email protected]>
> What information/parameters are needed for using code from mplayer or
> transcode for better deinterlacing?

Reading the transcode source now.

transcode filters seem to take a frame (officially a list but seems that 
nobosy uses the pointer to the previous frame). The frame structure (in the 
YUV case) contains a pointer to the video buffer, *and* to all three YUV 
planes separately. OTOH, the inverse telecine routine (I'm reading that one) 
seems to only use the pointer to the video buffer itself. 

I think that I could adapt that code if you could call some routine after 
rendering every full frame, giving a pointer to the YUV image and to a backup 
buffer of the same size. But note that the routine needs to be able to 
indicate in its return that the frame should be immediately dropped. Inverse 
telecine results in a lowered frame rate. 

The transcode code takes pains to make sure it drops exactly the right number 
of frames. This is unneeded for playback, but easy to remove. In fact it also 
has an interlace detector; so I might be able to adapt it into a universal 
deinterlacer, but I can't think fo an algorhitm that would not cause a lag of 
3 frames. 

Now turning to MPlayer. This one already has a "filmdint" universal 
deinterlacer... which actually does not work (I see interlacing with it on a 
non-telecined sample). 

The MPlayer code and the data structures are WAY more complicated than in 
transcode. I'm afraid I can not meaningfully decode them. For example, an 
MPlayer filter has two calls, get_image and put_image, and I can't understand 
which is which.

So, even though MPlayer's performance is known to be higher, a realistic goal 
seems to be usage of code from transcode.

-- 
Yours, Mikhail Ramendik