[mythtv] YV12 problem

Devin Heitmueller devin.heitmueller at gmail.com
Thu Dec 13 20:37:37 UTC 2018


> We get back an interlaced frame, but the ffmpeg indicator that tells if
> it is interlaced or not is "false" meaning it is not interlaced. That is
> what normally turns on the deinterlacer in MythTV. I am not sure about
> the bit format of the frame, from what I understand, interlaced frames
> have two fields, arranged one after the other, like two half pictures. I
> would have expected the output to be completely corrupted if the render
> assumed it was one progressive frame when it was actually two interlaced
> fields. There is something going on that I don't understand. Further
> investigation is needed. Perhaps we can tell if it is interlaced.

Interlaced AVFrames from ffmpeg are actually interleaved.  They are
not represented as one entire field on top of the other (i.e. two half
pictures).  Hence if you eyeball an interlaced frame it will basically
look right structurally speaking, although every other line of the
file is from a different point in time (i.e. lines 0,2,4 are from time
X and lines 1,3,5 are from time X+1).  You need to use the AVFrame
top_field_first indicator to know which set of lines is to be played
out first, temporally speaking.  Not taking into account the
top_field_first flag can result in playing out the fields in the order
"2,1,4,3" instead of "1,2,3,4", which causes rather obvious visual
stuttering.

Devin

-- 
Devin J. Heitmueller
http://www.devinheitmueller.com


More information about the mythtv-dev mailing list