From d01955179a7014f72a381f605ae4d8b0e542c1de Mon Sep 17 00:00:00 2001 From: "glaznev@webrtc.org" Date: Tue, 2 Dec 2014 23:41:18 +0000 Subject: [PATCH] Change minimum video encoder initialization resolution to 176x144 to ensure HW encoder can be initialized. R=pthatcher@webrtc.org Review URL: https://webrtc-codereview.appspot.com/32269004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@7787 4adac7df-926f-26a2-2b94-8c16560cd09d --- talk/media/webrtc/webrtcvideoengine.cc | 12 ++++++------ talk/media/webrtc/webrtcvideoengine_unittest.cc | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/talk/media/webrtc/webrtcvideoengine.cc b/talk/media/webrtc/webrtcvideoengine.cc index d73b43b09c..a081bad447 100644 --- a/talk/media/webrtc/webrtcvideoengine.cc +++ b/talk/media/webrtc/webrtcvideoengine.cc @@ -3881,13 +3881,13 @@ bool WebRtcVideoMediaChannel::SetSendParams( CapturedFrameInfo frame; if (!send_channel->last_captured_frame_info().Get(&frame)) { // When we don't have a frame yet, configure the encoder with a - // 2x2 frame (the smallest possible I420 frame). This gives us - // low memory usage but also makes it so configuration errors are - // discovered at the time we apply the settings rather than when - // we get the first frame (waiting for the first frame to know + // QCIF (176x144) frame (to ensure HW encoder can be initialized). + // This gives us low memory usage but also makes it so configuration + // errors are discovered at the time we apply the settings rather than + // when we get the first frame (waiting for the first frame to know // that you gave a bad codec parameter could make debugging hard). - frame.width = 2; - frame.height = 2; + frame.width = 176; + frame.height = 144; // TODO(pthatcher): Evaluate the risk of not setting up an encoder // at all until we have a frame. Once we feel it's worth the diff --git a/talk/media/webrtc/webrtcvideoengine_unittest.cc b/talk/media/webrtc/webrtcvideoengine_unittest.cc index 5dcba8e3aa..102d718112 100644 --- a/talk/media/webrtc/webrtcvideoengine_unittest.cc +++ b/talk/media/webrtc/webrtcvideoengine_unittest.cc @@ -385,7 +385,7 @@ TEST_F(WebRtcVideoEngineTestFake, SetSendCodecsBeforeFrameRegistersTinyFormat) { int channel_num = vie_.GetLastChannel(); std::vector codecs(engine_.codecs()); EXPECT_TRUE(channel_->SetSendCodecs(codecs)); - VerifyVP8SendCodec(channel_num, 2, 2); + VerifyVP8SendCodec(channel_num, 176, 144); } // Test that ViE Channel doesn't call SetSendCodec again if same codec is tried