[Pkg-gstreamer-commits] [gstreamer-vaapi] 117/176: encoder: h264: refine size of coded buffer.
Vincent Cheng
vcheng at moszumanska.debian.org
Tue Jun 3 08:09:33 UTC 2014
This is an automated email from the git hooks/post-receive script.
vcheng pushed a commit to branch upstream
in repository gstreamer-vaapi.
commit 00e0af9a7c471fc59c6cb33589b5462c98cd79f8
Author: Gwenole Beauchesne <gwenole.beauchesne at intel.com>
Date: Sun Jan 12 22:14:11 2014 +0100
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
---
gst-libs/gst/vaapi/gstvaapiencoder_h264.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gst-libs/gst/vaapi/gstvaapiencoder_h264.c b/gst-libs/gst/vaapi/gstvaapiencoder_h264.c
index af548d6..ace259a 100644
--- a/gst-libs/gst/vaapi/gstvaapiencoder_h264.c
+++ b/gst-libs/gst/vaapi/gstvaapiencoder_h264.c
@@ -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;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gstreamer/gstreamer-vaapi.git
More information about the Pkg-gstreamer-commits
mailing list