From b6149371bc9960c92fac76caaa9548da409312b9 Mon Sep 17 00:00:00 2001 From: "hshi@chromium.org" Date: Thu, 29 Aug 2013 22:59:39 +0000 Subject: Exynos VEA: minor bugfix with frame size. For key frames the buffer size should include the stream header size. BUG=221441 TEST=manually on Snow. R=piman@chromium.org, sheu@chromium.org Review URL: https://codereview.chromium.org/23480017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@220414 0039d316-1c4b-4281-b951-d872f2087c98 --- content/common/gpu/media/exynos_video_encode_accelerator.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/content/common/gpu/media/exynos_video_encode_accelerator.cc b/content/common/gpu/media/exynos_video_encode_accelerator.cc index 4b9d38f..065e629 100644 --- a/content/common/gpu/media/exynos_video_encode_accelerator.cc +++ b/content/common/gpu/media/exynos_video_encode_accelerator.cc @@ -707,7 +707,7 @@ void ExynosVideoEncodeAccelerator::DequeueMfc() { return; } const bool key_frame = ((dqbuf.flags & V4L2_BUF_FLAG_KEYFRAME) != 0); - const size_t output_size = dqbuf.m.planes[0].bytesused; + size_t output_size = dqbuf.m.planes[0].bytesused; MfcOutputRecord& output_record = mfc_output_buffer_map_[dqbuf.index]; DCHECK(output_record.at_device); DCHECK(output_record.buffer_ref.get()); @@ -724,6 +724,7 @@ void ExynosVideoEncodeAccelerator::DequeueMfc() { // Insert stream header before every keyframe. memmove(data + stream_header_size_, data, output_size); memcpy(data, stream_header_.get(), stream_header_size_); + output_size += stream_header_size_; } DVLOG(3) << "DequeueMfc(): returning " "bitstream_buffer_id=" << output_record.buffer_ref->id @@ -733,7 +734,7 @@ void ExynosVideoEncodeAccelerator::DequeueMfc() { base::Bind(&Client::BitstreamBufferReady, client_, output_record.buffer_ref->id, - dqbuf.m.planes[0].bytesused, + output_size, key_frame)); output_record.at_device = false; output_record.buffer_ref.reset(); -- cgit v1.1