OLD | NEW |
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 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1033 encoded_images_[encoder_idx]._encodedHeight = | 1033 encoded_images_[encoder_idx]._encodedHeight = |
1034 codec_.simulcastStream[stream_idx].height; | 1034 codec_.simulcastStream[stream_idx].height; |
1035 encoded_images_[encoder_idx]._encodedWidth = | 1035 encoded_images_[encoder_idx]._encodedWidth = |
1036 codec_.simulcastStream[stream_idx].width; | 1036 codec_.simulcastStream[stream_idx].width; |
1037 encoded_images_[encoder_idx] | 1037 encoded_images_[encoder_idx] |
1038 .adapt_reason_.quality_resolution_downscales = | 1038 .adapt_reason_.quality_resolution_downscales = |
1039 quality_scaler_enabled_ ? quality_scaler_.downscale_shift() : -1; | 1039 quality_scaler_enabled_ ? quality_scaler_.downscale_shift() : -1; |
1040 // Report once per frame (lowest stream always sent). | 1040 // Report once per frame (lowest stream always sent). |
1041 encoded_images_[encoder_idx].adapt_reason_.bw_resolutions_disabled = | 1041 encoded_images_[encoder_idx].adapt_reason_.bw_resolutions_disabled = |
1042 (stream_idx == 0) ? bw_resolutions_disabled : -1; | 1042 (stream_idx == 0) ? bw_resolutions_disabled : -1; |
| 1043 int qp_128 = -1; |
| 1044 vpx_codec_control(&encoders_[encoder_idx], VP8E_GET_LAST_QUANTIZER, |
| 1045 &qp_128); |
| 1046 encoded_images_[encoder_idx].qp_ = qp_128; |
1043 encoded_complete_callback_->Encoded(encoded_images_[encoder_idx], | 1047 encoded_complete_callback_->Encoded(encoded_images_[encoder_idx], |
1044 &codec_specific, &frag_info); | 1048 &codec_specific, &frag_info); |
1045 } else if (codec_.mode == kScreensharing) { | 1049 } else if (codec_.mode == kScreensharing) { |
1046 result = WEBRTC_VIDEO_CODEC_TARGET_BITRATE_OVERSHOOT; | 1050 result = WEBRTC_VIDEO_CODEC_TARGET_BITRATE_OVERSHOOT; |
1047 } | 1051 } |
1048 } | 1052 } |
1049 } | 1053 } |
1050 if (encoders_.size() == 1 && send_stream_[0]) { | 1054 if (encoders_.size() == 1 && send_stream_[0]) { |
1051 if (encoded_images_[0]._length > 0) { | 1055 if (encoded_images_[0]._length > 0) { |
1052 int qp; | 1056 int qp; |
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1403 return -1; | 1407 return -1; |
1404 } | 1408 } |
1405 if (vpx_codec_control(copy->decoder_, VP8_SET_REFERENCE, ref_frame_) != | 1409 if (vpx_codec_control(copy->decoder_, VP8_SET_REFERENCE, ref_frame_) != |
1406 VPX_CODEC_OK) { | 1410 VPX_CODEC_OK) { |
1407 return -1; | 1411 return -1; |
1408 } | 1412 } |
1409 return 0; | 1413 return 0; |
1410 } | 1414 } |
1411 | 1415 |
1412 } // namespace webrtc | 1416 } // namespace webrtc |
OLD | NEW |