Chromium Code Reviews

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

Issue 2919803002: Make error resilience configurable through VideoCodecVP9 resilience setting. (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
« no previous file with comments | « webrtc/modules/video_coding/codecs/test/videoprocessor_integrationtest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 279 matching lines...)
290 // (actual memory is not allocated). 290 // (actual memory is not allocated).
291 raw_ = vpx_img_wrap(NULL, VPX_IMG_FMT_I420, codec_.width, codec_.height, 1, 291 raw_ = vpx_img_wrap(NULL, VPX_IMG_FMT_I420, codec_.width, codec_.height, 1,
292 NULL); 292 NULL);
293 // Populate encoder configuration with default values. 293 // Populate encoder configuration with default values.
294 if (vpx_codec_enc_config_default(vpx_codec_vp9_cx(), config_, 0)) { 294 if (vpx_codec_enc_config_default(vpx_codec_vp9_cx(), config_, 0)) {
295 return WEBRTC_VIDEO_CODEC_ERROR; 295 return WEBRTC_VIDEO_CODEC_ERROR;
296 } 296 }
297 config_->g_w = codec_.width; 297 config_->g_w = codec_.width;
298 config_->g_h = codec_.height; 298 config_->g_h = codec_.height;
299 config_->rc_target_bitrate = inst->startBitrate; // in kbit/s 299 config_->rc_target_bitrate = inst->startBitrate; // in kbit/s
300 config_->g_error_resilient = 1; 300 config_->g_error_resilient = inst->VP9().resilienceOn ? 1 : 0;
301 // Setting the time base of the codec. 301 // Setting the time base of the codec.
302 config_->g_timebase.num = 1; 302 config_->g_timebase.num = 1;
303 config_->g_timebase.den = 90000; 303 config_->g_timebase.den = 90000;
304 config_->g_lag_in_frames = 0; // 0- no frame lagging 304 config_->g_lag_in_frames = 0; // 0- no frame lagging
305 config_->g_threads = 1; 305 config_->g_threads = 1;
306 // Rate control settings. 306 // Rate control settings.
307 config_->rc_dropframe_thresh = inst->VP9().frameDroppingOn ? 30 : 0; 307 config_->rc_dropframe_thresh = inst->VP9().frameDroppingOn ? 30 : 0;
308 config_->rc_end_usage = VPX_CBR; 308 config_->rc_end_usage = VPX_CBR;
309 config_->g_pass = VPX_RC_ONE_PASS; 309 config_->g_pass = VPX_RC_ONE_PASS;
310 config_->rc_min_quantizer = 2; 310 config_->rc_min_quantizer = 2;
(...skipping 695 matching lines...)
1006 frame_buffer_pool_.ClearPool(); 1006 frame_buffer_pool_.ClearPool();
1007 inited_ = false; 1007 inited_ = false;
1008 return WEBRTC_VIDEO_CODEC_OK; 1008 return WEBRTC_VIDEO_CODEC_OK;
1009 } 1009 }
1010 1010
1011 const char* VP9DecoderImpl::ImplementationName() const { 1011 const char* VP9DecoderImpl::ImplementationName() const {
1012 return "libvpx"; 1012 return "libvpx";
1013 } 1013 }
1014 1014
1015 } // namespace webrtc 1015 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/video_coding/codecs/test/videoprocessor_integrationtest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine