On 15/apr/2013, at 16:43, Yusuke Nakamura <[email protected]> wrote:

> 2013/4/15 Vittorio Giovara <[email protected]>
>
>> Unless I'm missing something and if my understanding of the spec is
>> correct, the SEI message used here to update field_order is originally
>> intended only as a hint for the display. The "correct" way to understand if
>> frame has been coded interlaced or progressive is by looking at
>> frame_mbs_only_flag and field_pic_flag.
>>
>> Then again somewhere in the spec it should be written that the SEI must be
>> initialized to the same value of frame_mbs_only_flag but I wouldn't rely on
>> an optional SEI message to get the field order information.
>>
>> Best,
>> Vittorio
>>
> I don't care about progressive or interlaced.
> I want to use field order information for pulldown to get frames correctly
> and automatically by frame number on AVI-based editors.
That's fine but the information you store in the avfieldorder struct
must be correct for any application level.

> As far as I understand, frame_mbs_only_flag == 1 guarantees that frames are
> progressive, while frame_mbs_only_flag == 0 doesn't guarantee that a frame
> is coded as progressive or interlaced.
That's correct, that's why I mentioned field_pic_flag too. When such
flag is set you should also check if tff or bff is set too.

> And, if CpbDpbDelaysPresentFlag is equal to 1 or pic_struct_present_flag is
> equal to 1, Picture timing SEI is not optional and it shall be present in
> every access unit.
You are right, when pic_struct_present_flag is 1 it is mandatory to
include the SEI message, however it is not mandatory to set
pic_struct_present_flag at all.
So it is possible to run into interlaced/pulled down streams without
such SEI. In such cases only frame_mbs_only_flag and field_pic_flag
will be able to correctly initialize avfieldorder (again, if my
understanding of the spec is correct).

Best,
Vittorio
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to