summaryrefslogtreecommitdiffstats
path: root/content/common
diff options
context:
space:
mode:
authorhshi@chromium.org <hshi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-26 00:31:28 +0000
committerhshi@chromium.org <hshi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-26 00:31:28 +0000
commit61baaa037214ffcf209659e7b6f1d7a37561a6fa (patch)
tree5ffbf0ed8be6cb078daab252cc339bcba1ddf458 /content/common
parentc2e4efdd9ed3452e27f8ef6632d36252638e086b (diff)
downloadchromium_src-61baaa037214ffcf209659e7b6f1d7a37561a6fa.zip
chromium_src-61baaa037214ffcf209659e7b6f1d7a37561a6fa.tar.gz
chromium_src-61baaa037214ffcf209659e7b6f1d7a37561a6fa.tar.bz2
EVEA H.264: Disable periodic key frames by default.
The V4L2 default GOP size is only 12. This inserts intra frames too frequently and wastes bitrate. In practice it is not necessary for encoder to send periodic key frames. BUG=284783 TEST=verify that EVEA only produces one I-frame initially and then all P-frames after. R=fischman@chromium.org, sheu@chromium.org Review URL: https://codereview.chromium.org/24667002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@225284 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/common')
-rw-r--r--content/common/gpu/media/exynos_video_encode_accelerator.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/content/common/gpu/media/exynos_video_encode_accelerator.cc b/content/common/gpu/media/exynos_video_encode_accelerator.cc
index 00f8303..ab86e6f 100644
--- a/content/common/gpu/media/exynos_video_encode_accelerator.cc
+++ b/content/common/gpu/media/exynos_video_encode_accelerator.cc
@@ -1364,7 +1364,7 @@ bool ExynosVideoEncodeAccelerator::SetMfcFormats() {
}
bool ExynosVideoEncodeAccelerator::InitMfcControls() {
- struct v4l2_ext_control ctrls[8];
+ struct v4l2_ext_control ctrls[9];
struct v4l2_ext_controls control;
memset(&ctrls, 0, sizeof(ctrls));
memset(&control, 0, sizeof(control));
@@ -1394,6 +1394,9 @@ bool ExynosVideoEncodeAccelerator::InitMfcControls() {
// Use H.264 level 4.0 to match the supported max resolution.
ctrls[7].id = V4L2_CID_MPEG_VIDEO_H264_LEVEL;
ctrls[7].value = V4L2_MPEG_VIDEO_H264_LEVEL_4_0;
+ // Disable periodic key frames.
+ ctrls[8].id = V4L2_CID_MPEG_VIDEO_GOP_SIZE;
+ ctrls[8].value = 0;
control.ctrl_class = V4L2_CTRL_CLASS_MPEG;
control.count = arraysize(ctrls);
control.controls = ctrls;