[mythtv] Interlaced vs. Progressive

David Asher david.asher at caviumnetworks.com
Fri Mar 3 04:59:16 UTC 2006


Ok, I pretty much got this to work...  Buuuutttt... (there's always a 
but, isn't there?)

One broadcaster here in the Boston area (WGBH) broadcasts a show on 2-1 
(a SD subchannel, 2-2 is HD).  The shows I've recorded on 2-1 oscillate 
between interlaced and progressive according to ffmpeg -- not good.  
Creates stutters as my code tries to enable and disable interlacing (I'm 
using bob).  I've already put a small (2 frame) hysteresis in to handle 
DVD playback (the DVD I tested with often has 1 interlaced frame is a 
sea progressive frames when wandering through the menus at the beginning).

Any clever ideas how to deal with this type of issue?  By using the 
interlaced_frame info from ffmpeg I made NVP a slave to its knowledge.  
One thing that MIGHT work is I'm currently allocating and freeing the 
deint filters each time the flag changes -- I could keep the 
deinterlacer structures around after disabling -- maybe that could 
reduce the hiccups to where they weren't noticeable.

Anybody know how ffmpeg figures out whether a frame is interlaced?

Sigh.  Bedtime.

David

Isaac Richards wrote:
> On Monday 27 February 2006 10:21, David Asher wrote:
>   
>> Ok, I spent some time looking into this yesterday.
>>
>> One call to SetVideoParams is in InitVideoCodec.  It looks like this
>> would be a great place to use something other than kScan_Detect, but
>> that would require decoding some video frames during init.  I started
>> thinking about that and realized that there is no reason why the
>> interlaced status of a video stream need be the same all the way
>> through.  For instance can't an ATSC transmission switch to 480i for a
>> little while and then back to 720p?  I don't think practically it
>> happens with any of my stations, but I think it could.  Also certain
>> DVDs are known do this, aren't they?
>>
>> So, it occurred to me that it would be better for the interlacer to be
>> turned on and off in GetFrame based on the current avcodec_decode_video
>> results.  Do this seem reasonable?  It looks like it would require some
>> changes to how NuppelVideoPlayer handles the deinterlacer.  I wanted to
>> check before trying to implement it to make sure I'm not running down
>> the wrong path.
>>     
>
> Yup, this would be better.  The only tricky bit is deciding to double the 
> framerate or not if bob is being used.
>
> Isaac
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
>   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mythtv.org/pipermail/mythtv-dev/attachments/20060302/9791ff14/attachment.htm 


More information about the mythtv-dev mailing list