summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhshi@chromium.org <hshi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-29 22:59:39 +0000
committerhshi@chromium.org <hshi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-29 22:59:39 +0000
commitb6149371bc9960c92fac76caaa9548da409312b9 (patch)
tree27a66d285d0959a99700bc61e4b88b2c34d5e6ad
parentfded4f76bfe4ec6b4dbbea138624b44f3e67f61e (diff)
downloadchromium_src-b6149371bc9960c92fac76caaa9548da409312b9.zip
chromium_src-b6149371bc9960c92fac76caaa9548da409312b9.tar.gz
chromium_src-b6149371bc9960c92fac76caaa9548da409312b9.tar.bz2
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
-rw-r--r--content/common/gpu/media/exynos_video_encode_accelerator.cc5
1 files 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();