mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 03:35:21 +00:00
va: h264dec: allocate output buffers according DPB size
Instead of allocating the maximal number of references for output buffers, this patch reduces the memory foot print in many cases by just allocating the output buffers required for the DPB. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1595>
This commit is contained in:
parent
755d769045
commit
00b73cfddd
1 changed files with 2 additions and 2 deletions
|
@ -1233,7 +1233,7 @@ gst_va_h264_dec_decide_allocation (GstVideoDecoder * decoder, GstQuery * query)
|
|||
}
|
||||
}
|
||||
|
||||
min = MAX (16 + 4, min); /* max num pic references + scratch surfaces */
|
||||
min += self->dpb_size + 4; /* min + dbp size + scratch surfaces */
|
||||
size = MAX (size, GST_VIDEO_INFO_SIZE (&info));
|
||||
|
||||
update_pool = TRUE;
|
||||
|
@ -1255,7 +1255,7 @@ gst_va_h264_dec_decide_allocation (GstVideoDecoder * decoder, GstQuery * query)
|
|||
gst_clear_object (&other_allocator);
|
||||
}
|
||||
|
||||
min = 16 + 4; /* max num pic references + scratch surfaces */
|
||||
min = self->dpb_size + 4; /* dpb size + scratch surfaces */
|
||||
max = 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue