mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-12 10:25:33 +00:00
encoder: h264: refine size of coded buffer.
Refine the heuristic to determine the maximum size of a coded buffer to account for the exact number of slices. set_context_info() is the last step during codec reconfiguration, no additional change is done afterwards, so re-using the num_slices field here is fine. https://bugzilla.gnome.org/show_bug.cgi?id=719953
This commit is contained in:
parent
8df97cf9ec
commit
00e0af9a7c
1 changed files with 2 additions and 2 deletions
|
@ -1589,8 +1589,8 @@ set_context_info (GstVaapiEncoder * base_encoder)
|
|||
/* XXX: exclude slice groups, scaling lists, MVC/SVC extensions */
|
||||
base_encoder->codedbuf_size += 4 + GST_ROUND_UP_8 (MAX_PPS_HDR_SIZE) / 8;
|
||||
|
||||
/* Account for slice header. At most 200 slices are supported */
|
||||
base_encoder->codedbuf_size += 200 * (4 +
|
||||
/* Account for slice header */
|
||||
base_encoder->codedbuf_size += encoder->num_slices * (4 +
|
||||
GST_ROUND_UP_8 (MAX_SLICE_HDR_SIZE) / 8);
|
||||
|
||||
return GST_VAAPI_ENCODER_STATUS_SUCCESS;
|
||||
|
|
Loading…
Reference in a new issue