[NUT-devel] Frame/Field problem

Rich Felker dalias at aerifal.cx
Wed Feb 20 05:51:40 CET 2008


On Wed, Feb 20, 2008 at 05:23:14AM +0100, Michael Niedermayer wrote:
> Hi
> 
> When we designed the pts->dts reorder algorithm we considered arbitrary
> frame reorderings, but there was something we missed, that are mixes of
> frame and field pictures, like:
> 
>     i1 p2 P3 p4 P5 p7 P8   (lower case is a field, upper is a frame)
> PTS 2  3  4  6  7  9  10
> DTS 0  1  2  4  5  7  8
> 
> As you can see no reordering of PTS can result in the DTS values.

I'm confused by this example. As there are no B frames, dts==pts is
just fine.

> The reason why this fails is (if my brain still works at 5:30am) that frame
> pictures contain 2 fields and thus would have to be counted like 2
> besides that they would really need 2 pts.

Presumably interlaced video is always fixed-fieldrate, and the device
presenting it knows the time interval between fields. This is why I
never saw storing an explicit timestamp for the second field as
important..

> I suspect some solution based on dummy 0byte packets with the missing pts
> after each frame might solve this, but i must think more about this ...

Sounds ugly. I'd like to see a lot more motivation of a need before
anything like this is considered..

Rich



More information about the NUT-devel mailing list