mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
encoder: vp8: Increase the allocation size for coded buffer
We are not getting enough compression for some streams and encoded frame end up with more size than allocated. Assuming a compression ratio of 4, which should be good enough for holding the frames. https://bugzilla.gnome.org/show_bug.cgi?id=771528
This commit is contained in:
parent
44a90c196d
commit
0fae277d34
1 changed files with 2 additions and 1 deletions
|
@ -163,8 +163,9 @@ set_context_info (GstVaapiEncoder * base_encoder)
|
|||
base_encoder->num_ref_frames = 3;
|
||||
|
||||
/* Only YUV 4:2:0 formats are supported for now. */
|
||||
/* Assumig 4 times compression ratio */
|
||||
base_encoder->codedbuf_size = GST_ROUND_UP_16 (vip->width) *
|
||||
GST_ROUND_UP_16 (vip->height) * 3 / 2;
|
||||
GST_ROUND_UP_16 (vip->height) * 12 / 4;
|
||||
|
||||
base_encoder->codedbuf_size +=
|
||||
MAX_FRAME_TAG_SIZE + MAX_UPDATE_SEGMENTATION_SIZE +
|
||||
|
|
Loading…
Reference in a new issue