mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
h264dec: Fix POC calculation for type 0
This is mostly for future use as it only fixes the caclulation for interlaced cases, the case of frame seemed correct already. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1812>
This commit is contained in:
parent
11509fded1
commit
4ee6167616
1 changed files with 14 additions and 8 deletions
|
@ -1229,15 +1229,21 @@ gst_h264_decoder_calculate_poc (GstH264Decoder * self, GstH264Picture * picture)
|
||||||
picture->pic_order_cnt_msb + picture->pic_order_cnt_lsb;
|
picture->pic_order_cnt_msb + picture->pic_order_cnt_lsb;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (picture->field != GST_H264_PICTURE_FIELD_TOP_FIELD) {
|
switch (picture->field) {
|
||||||
if (GST_H264_PICTURE_IS_FRAME (picture)) {
|
case GST_H264_PICTURE_FIELD_FRAME:
|
||||||
picture->bottom_field_order_cnt =
|
picture->top_field_order_cnt = picture->pic_order_cnt_msb +
|
||||||
picture->top_field_order_cnt +
|
picture->pic_order_cnt_lsb;
|
||||||
|
picture->bottom_field_order_cnt = picture->top_field_order_cnt +
|
||||||
picture->delta_pic_order_cnt_bottom;
|
picture->delta_pic_order_cnt_bottom;
|
||||||
} else {
|
break;
|
||||||
picture->bottom_field_order_cnt =
|
case GST_H264_PICTURE_FIELD_TOP_FIELD:
|
||||||
picture->pic_order_cnt_msb + picture->pic_order_cnt_lsb;
|
picture->top_field_order_cnt = picture->pic_order_cnt_msb +
|
||||||
}
|
picture->pic_order_cnt_lsb;
|
||||||
|
break;
|
||||||
|
case GST_H264_PICTURE_FIELD_BOTTOM_FIELD:
|
||||||
|
picture->bottom_field_order_cnt = picture->pic_order_cnt_msb +
|
||||||
|
picture->pic_order_cnt_lsb;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue