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 1013 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Loading... |
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 |
OLD | NEW |