Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(177)

Side by Side Diff: webrtc/modules/video_coding/codecs/vp9/vp9_impl.cc

Issue 2532053002: Turn off error resilience for VP9 if no spatial or temporal layers are configured and NACK is enabl… (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 * 9 *
10 */ 10 */
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 // (actual memory is not allocated). 291 // (actual memory is not allocated).
292 raw_ = vpx_img_wrap(NULL, VPX_IMG_FMT_I420, codec_.width, codec_.height, 1, 292 raw_ = vpx_img_wrap(NULL, VPX_IMG_FMT_I420, codec_.width, codec_.height, 1,
293 NULL); 293 NULL);
294 // Populate encoder configuration with default values. 294 // Populate encoder configuration with default values.
295 if (vpx_codec_enc_config_default(vpx_codec_vp9_cx(), config_, 0)) { 295 if (vpx_codec_enc_config_default(vpx_codec_vp9_cx(), config_, 0)) {
296 return WEBRTC_VIDEO_CODEC_ERROR; 296 return WEBRTC_VIDEO_CODEC_ERROR;
297 } 297 }
298 config_->g_w = codec_.width; 298 config_->g_w = codec_.width;
299 config_->g_h = codec_.height; 299 config_->g_h = codec_.height;
300 config_->rc_target_bitrate = inst->startBitrate; // in kbit/s 300 config_->rc_target_bitrate = inst->startBitrate; // in kbit/s
301 config_->g_error_resilient = 1; 301 config_->g_error_resilient = inst->VP9().resilienceOn ? 1 : 0;
302 // Setting the time base of the codec. 302 // Setting the time base of the codec.
303 config_->g_timebase.num = 1; 303 config_->g_timebase.num = 1;
304 config_->g_timebase.den = 90000; 304 config_->g_timebase.den = 90000;
305 config_->g_lag_in_frames = 0; // 0- no frame lagging 305 config_->g_lag_in_frames = 0; // 0- no frame lagging
306 config_->g_threads = 1; 306 config_->g_threads = 1;
307 // Rate control settings. 307 // Rate control settings.
308 config_->rc_dropframe_thresh = inst->VP9().frameDroppingOn ? 30 : 0; 308 config_->rc_dropframe_thresh = inst->VP9().frameDroppingOn ? 30 : 0;
309 config_->rc_end_usage = VPX_CBR; 309 config_->rc_end_usage = VPX_CBR;
310 config_->g_pass = VPX_RC_ONE_PASS; 310 config_->g_pass = VPX_RC_ONE_PASS;
311 config_->rc_min_quantizer = 2; 311 config_->rc_min_quantizer = 2;
(...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after
999 frame_buffer_pool_.ClearPool(); 999 frame_buffer_pool_.ClearPool();
1000 inited_ = false; 1000 inited_ = false;
1001 return WEBRTC_VIDEO_CODEC_OK; 1001 return WEBRTC_VIDEO_CODEC_OK;
1002 } 1002 }
1003 1003
1004 const char* VP9DecoderImpl::ImplementationName() const { 1004 const char* VP9DecoderImpl::ImplementationName() const {
1005 return "libvpx"; 1005 return "libvpx";
1006 } 1006 }
1007 1007
1008 } // namespace webrtc 1008 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/video_coding/codec_database.cc ('k') | webrtc/modules/video_coding/video_codec_initializer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698