OLD | NEW |
---|---|
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 676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
687 | 687 |
688 CodecSpecificInfo codec_specific; | 688 CodecSpecificInfo codec_specific; |
689 PopulateCodecSpecific(&codec_specific, *pkt, input_image_->timestamp()); | 689 PopulateCodecSpecific(&codec_specific, *pkt, input_image_->timestamp()); |
690 | 690 |
691 if (encoded_image_._length > 0) { | 691 if (encoded_image_._length > 0) { |
692 TRACE_COUNTER1("webrtc", "EncodedFrameSize", encoded_image_._length); | 692 TRACE_COUNTER1("webrtc", "EncodedFrameSize", encoded_image_._length); |
693 encoded_image_._timeStamp = input_image_->timestamp(); | 693 encoded_image_._timeStamp = input_image_->timestamp(); |
694 encoded_image_.capture_time_ms_ = input_image_->render_time_ms(); | 694 encoded_image_.capture_time_ms_ = input_image_->render_time_ms(); |
695 encoded_image_._encodedHeight = raw_->d_h; | 695 encoded_image_._encodedHeight = raw_->d_h; |
696 encoded_image_._encodedWidth = raw_->d_w; | 696 encoded_image_._encodedWidth = raw_->d_w; |
697 int qp = -1; | |
698 vpx_codec_control(encoder_, VP8E_GET_LAST_QUANTIZER, &qp); | |
mflodman
2016/04/11 07:00:23
I assume VP8 is the correct parameter here, but ju
åsapersson
2016/04/11 07:28:15
Think so, it says that it is supported for VP9.
| |
699 encoded_image_.qp_ = qp; | |
697 encoded_complete_callback_->Encoded(encoded_image_, &codec_specific, | 700 encoded_complete_callback_->Encoded(encoded_image_, &codec_specific, |
698 &frag_info); | 701 &frag_info); |
699 } | 702 } |
700 return WEBRTC_VIDEO_CODEC_OK; | 703 return WEBRTC_VIDEO_CODEC_OK; |
701 } | 704 } |
702 | 705 |
703 vpx_svc_ref_frame_config VP9EncoderImpl::GenerateRefsAndFlags( | 706 vpx_svc_ref_frame_config VP9EncoderImpl::GenerateRefsAndFlags( |
704 const SuperFrameRefSettings& settings) { | 707 const SuperFrameRefSettings& settings) { |
705 static const vpx_enc_frame_flags_t kAllFlags = | 708 static const vpx_enc_frame_flags_t kAllFlags = |
706 VP8_EFLAG_NO_REF_ARF | VP8_EFLAG_NO_REF_GF | VP8_EFLAG_NO_REF_LAST | | 709 VP8_EFLAG_NO_REF_ARF | VP8_EFLAG_NO_REF_GF | VP8_EFLAG_NO_REF_LAST | |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
979 frame_buffer_pool_.ClearPool(); | 982 frame_buffer_pool_.ClearPool(); |
980 inited_ = false; | 983 inited_ = false; |
981 return WEBRTC_VIDEO_CODEC_OK; | 984 return WEBRTC_VIDEO_CODEC_OK; |
982 } | 985 } |
983 | 986 |
984 const char* VP9DecoderImpl::ImplementationName() const { | 987 const char* VP9DecoderImpl::ImplementationName() const { |
985 return "libvpx"; | 988 return "libvpx"; |
986 } | 989 } |
987 | 990 |
988 } // namespace webrtc | 991 } // namespace webrtc |
OLD | NEW |