mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-19 00:01:23 +00:00
codecs: h264picture: Count only complete complementary field pair for dpb fullness decision
Our DPB implementation was designed as such that allowing temporary DPB overflow in the middle of field picture decoding and incomplete field pair should not trigger DPB bumping. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1947>
This commit is contained in:
parent
e14bbd7f5c
commit
ae7c20a6ed
1 changed files with 3 additions and 2 deletions
|
@ -596,7 +596,7 @@ gst_h264_dpb_has_empty_frame_buffer (GstH264Dpb * dpb)
|
|||
} else {
|
||||
gint i;
|
||||
gint count = 0;
|
||||
/* Count pictures without second fields */
|
||||
/* Count the number of complementary field pairs */
|
||||
for (i = 0; i < dpb->pic_list->len; i++) {
|
||||
GstH264Picture *picture =
|
||||
g_array_index (dpb->pic_list, GstH264Picture *, i);
|
||||
|
@ -604,7 +604,8 @@ gst_h264_dpb_has_empty_frame_buffer (GstH264Dpb * dpb)
|
|||
if (picture->second_field)
|
||||
continue;
|
||||
|
||||
count++;
|
||||
if (GST_H264_PICTURE_IS_FRAME (picture) || picture->other_field)
|
||||
count++;
|
||||
}
|
||||
|
||||
if (count <= dpb->max_num_frames)
|
||||
|
|
Loading…
Reference in a new issue