h264: flag interlaced-coded frames as such when sei_pic_struct indicates otherwise
According to the H.264 standard, Annex D, Table D-1, field_pic_flag shall be 0 when sei_pic_struct signals progressive. In the case when this restriction is not fullfilled, its safer to assume the field is actually interlaced. Not doing so can cause a renderer to assume the frame is progressive and not deinterlace it, even if required.
This commit is contained in:
parent
d20b9ecf4e
commit
fbe8dc6a4b
|
@ -1190,6 +1190,7 @@ static int h264_export_frame_props(H264Context *h)
|
|||
const H264SEIPictureTiming *pt = &h->sei.picture_timing;
|
||||
switch (pt->pic_struct) {
|
||||
case H264_SEI_PIC_STRUCT_FRAME:
|
||||
interlaced_frame = FIELD_OR_MBAFF_PICTURE(h);
|
||||
break;
|
||||
case H264_SEI_PIC_STRUCT_TOP_FIELD:
|
||||
case H264_SEI_PIC_STRUCT_BOTTOM_FIELD:
|
||||
|
|
Loading…
Reference in New Issue