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:
Sreerenj Balachandran 2016-09-21 09:55:53 +03:00
parent 44a90c196d
commit 0fae277d34

View file

@ -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 +