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

Side by Side Diff: webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc

Issue 1264693003: Add QP stats for sent video streams to StatsReport. Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: add unit tests Created 5 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
« no previous file with comments | « talk/media/webrtc/webrtcvideoengine2_unittest.cc ('k') | webrtc/video/send_statistics_proxy.h » ('j') | 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) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 1013 matching lines...) Expand 10 before | Expand all | Expand 10 after
1024 encoded_images_[encoder_idx]._encodedHeight = 1024 encoded_images_[encoder_idx]._encodedHeight =
1025 codec_.simulcastStream[stream_idx].height; 1025 codec_.simulcastStream[stream_idx].height;
1026 encoded_images_[encoder_idx]._encodedWidth = 1026 encoded_images_[encoder_idx]._encodedWidth =
1027 codec_.simulcastStream[stream_idx].width; 1027 codec_.simulcastStream[stream_idx].width;
1028 encoded_images_[encoder_idx] 1028 encoded_images_[encoder_idx]
1029 .adapt_reason_.quality_resolution_downscales = 1029 .adapt_reason_.quality_resolution_downscales =
1030 quality_scaler_enabled_ ? quality_scaler_.downscale_shift() : -1; 1030 quality_scaler_enabled_ ? quality_scaler_.downscale_shift() : -1;
1031 // Report once per frame (lowest stream always sent). 1031 // Report once per frame (lowest stream always sent).
1032 encoded_images_[encoder_idx].adapt_reason_.bw_resolutions_disabled = 1032 encoded_images_[encoder_idx].adapt_reason_.bw_resolutions_disabled =
1033 (stream_idx == 0) ? bw_resolutions_disabled : -1; 1033 (stream_idx == 0) ? bw_resolutions_disabled : -1;
1034 int qp_128 = -1;
1035 vpx_codec_control(
1036 &encoders_[encoder_idx], VP8E_GET_LAST_QUANTIZER, &qp_128);
1037 encoded_images_[encoder_idx].qp_ = qp_128;
1034 encoded_complete_callback_->Encoded(encoded_images_[encoder_idx], 1038 encoded_complete_callback_->Encoded(encoded_images_[encoder_idx],
1035 &codec_specific, &frag_info); 1039 &codec_specific, &frag_info);
1036 } else if (codec_.mode == kScreensharing) { 1040 } else if (codec_.mode == kScreensharing) {
1037 result = WEBRTC_VIDEO_CODEC_TARGET_BITRATE_OVERSHOOT; 1041 result = WEBRTC_VIDEO_CODEC_TARGET_BITRATE_OVERSHOOT;
1038 } 1042 }
1039 } 1043 }
1040 } 1044 }
1041 if (encoders_.size() == 1 && send_stream_[0]) { 1045 if (encoders_.size() == 1 && send_stream_[0]) {
1042 if (encoded_images_[0]._length > 0) { 1046 if (encoded_images_[0]._length > 0) {
1043 int qp; 1047 int qp;
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
1406 return -1; 1410 return -1;
1407 } 1411 }
1408 if (vpx_codec_control(copy->decoder_, VP8_SET_REFERENCE, ref_frame_) 1412 if (vpx_codec_control(copy->decoder_, VP8_SET_REFERENCE, ref_frame_)
1409 != VPX_CODEC_OK) { 1413 != VPX_CODEC_OK) {
1410 return -1; 1414 return -1;
1411 } 1415 }
1412 return 0; 1416 return 0;
1413 } 1417 }
1414 1418
1415 } // namespace webrtc 1419 } // namespace webrtc
OLDNEW
« no previous file with comments | « talk/media/webrtc/webrtcvideoengine2_unittest.cc ('k') | webrtc/video/send_statistics_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698