1
0
Fork 0

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:
Hendrik Leppkes 2012-08-17 20:45:25 +02:00
parent d20b9ecf4e
commit fbe8dc6a4b
Signed by: hendrik
GPG Key ID: 846079A4B0A7C1B5
1 changed files with 1 additions and 0 deletions

View File

@ -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: