| 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 * WEBRTC VP8 wrapper interface | 10 * WEBRTC VP8 wrapper interface |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 #include "vpx/vpx_decoder.h" | 21 #include "vpx/vpx_decoder.h" |
| 22 #include "vpx/vp8cx.h" | 22 #include "vpx/vp8cx.h" |
| 23 #include "vpx/vp8dx.h" | 23 #include "vpx/vp8dx.h" |
| 24 | 24 |
| 25 #include "webrtc/common_video/include/i420_buffer_pool.h" | 25 #include "webrtc/common_video/include/i420_buffer_pool.h" |
| 26 #include "webrtc/modules/video_coding/include/video_codec_interface.h" | 26 #include "webrtc/modules/video_coding/include/video_codec_interface.h" |
| 27 #include "webrtc/modules/video_coding/codecs/vp8/include/vp8.h" | 27 #include "webrtc/modules/video_coding/codecs/vp8/include/vp8.h" |
| 28 #include "webrtc/modules/video_coding/codecs/vp8/reference_picture_selection.h" | 28 #include "webrtc/modules/video_coding/codecs/vp8/reference_picture_selection.h" |
| 29 #include "webrtc/modules/video_coding/utility/frame_dropper.h" | 29 #include "webrtc/modules/video_coding/utility/frame_dropper.h" |
| 30 #include "webrtc/modules/video_coding/utility/quality_scaler.h" | 30 #include "webrtc/modules/video_coding/utility/quality_scaler.h" |
| 31 #include "webrtc/modules/video_coding/utility/simulcast_state.h" |
| 32 |
| 31 #include "webrtc/video_frame.h" | 33 #include "webrtc/video_frame.h" |
| 32 | 34 |
| 33 namespace webrtc { | 35 namespace webrtc { |
| 34 | 36 |
| 35 class TemporalLayers; | 37 class TemporalLayers; |
| 36 | 38 |
| 37 class VP8EncoderImpl : public VP8Encoder { | 39 class VP8EncoderImpl : public VP8Encoder { |
| 38 public: | 40 public: |
| 39 VP8EncoderImpl(); | 41 VP8EncoderImpl(); |
| 40 | 42 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 | 81 |
| 80 void PopulateCodecSpecific(CodecSpecificInfo* codec_specific, | 82 void PopulateCodecSpecific(CodecSpecificInfo* codec_specific, |
| 81 const vpx_codec_cx_pkt& pkt, | 83 const vpx_codec_cx_pkt& pkt, |
| 82 int stream_idx, | 84 int stream_idx, |
| 83 uint32_t timestamp, | 85 uint32_t timestamp, |
| 84 bool only_predicting_from_key_frame); | 86 bool only_predicting_from_key_frame); |
| 85 | 87 |
| 86 int GetEncodedPartitions(const VideoFrame& input_image, | 88 int GetEncodedPartitions(const VideoFrame& input_image, |
| 87 bool only_predicting_from_key_frame); | 89 bool only_predicting_from_key_frame); |
| 88 | 90 |
| 89 // Set the stream state for stream |stream_idx|. | |
| 90 void SetStreamState(bool send_stream, int stream_idx); | |
| 91 | |
| 92 uint32_t MaxIntraTarget(uint32_t optimal_buffer_size); | 91 uint32_t MaxIntraTarget(uint32_t optimal_buffer_size); |
| 93 | 92 |
| 94 EncodedImageCallback* encoded_complete_callback_; | 93 EncodedImageCallback* encoded_complete_callback_; |
| 95 VideoCodec codec_; | 94 VideoCodec codec_; |
| 96 bool inited_; | 95 bool inited_; |
| 97 int64_t timestamp_; | 96 int64_t timestamp_; |
| 98 bool feedback_mode_; | 97 bool feedback_mode_; |
| 99 int qp_max_; | 98 int qp_max_; |
| 100 int cpu_speed_default_; | 99 int cpu_speed_default_; |
| 101 uint32_t rc_max_intra_target_; | 100 uint32_t rc_max_intra_target_; |
| 102 int token_partitions_; | 101 int token_partitions_; |
| 103 ReferencePictureSelection rps_; | 102 ReferencePictureSelection rps_; |
| 104 std::vector<TemporalLayers*> temporal_layers_; | 103 std::vector<TemporalLayers*> temporal_layers_; |
| 104 SimulcastState simulcast_state_; |
| 105 bool down_scale_requested_; | 105 bool down_scale_requested_; |
| 106 uint32_t down_scale_bitrate_; | 106 uint32_t down_scale_bitrate_; |
| 107 FrameDropper tl0_frame_dropper_; | |
| 108 FrameDropper tl1_frame_dropper_; | |
| 109 std::vector<uint16_t> picture_id_; | 107 std::vector<uint16_t> picture_id_; |
| 110 std::vector<int> last_key_frame_picture_id_; | 108 std::vector<int> last_key_frame_picture_id_; |
| 111 std::vector<bool> key_frame_request_; | |
| 112 std::vector<bool> send_stream_; | |
| 113 std::vector<int> cpu_speed_; | 109 std::vector<int> cpu_speed_; |
| 114 std::vector<vpx_image_t> raw_images_; | 110 std::vector<vpx_image_t> raw_images_; |
| 115 std::vector<EncodedImage> encoded_images_; | 111 std::vector<EncodedImage> encoded_images_; |
| 116 std::vector<vpx_codec_ctx_t> encoders_; | 112 std::vector<vpx_codec_ctx_t> encoders_; |
| 117 std::vector<vpx_codec_enc_cfg_t> configurations_; | 113 std::vector<vpx_codec_enc_cfg_t> configurations_; |
| 118 std::vector<vpx_rational_t> downsampling_factors_; | 114 std::vector<vpx_rational_t> downsampling_factors_; |
| 119 QualityScaler quality_scaler_; | 115 QualityScaler quality_scaler_; |
| 120 bool quality_scaler_enabled_; | 116 bool quality_scaler_enabled_; |
| 121 }; // end of VP8EncoderImpl class | 117 }; // end of VP8EncoderImpl class |
| 122 | 118 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 int image_format_; | 158 int image_format_; |
| 163 vpx_ref_frame_t* ref_frame_; | 159 vpx_ref_frame_t* ref_frame_; |
| 164 int propagation_cnt_; | 160 int propagation_cnt_; |
| 165 int last_frame_width_; | 161 int last_frame_width_; |
| 166 int last_frame_height_; | 162 int last_frame_height_; |
| 167 bool key_frame_required_; | 163 bool key_frame_required_; |
| 168 }; // end of VP8DecoderImpl class | 164 }; // end of VP8DecoderImpl class |
| 169 } // namespace webrtc | 165 } // namespace webrtc |
| 170 | 166 |
| 171 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_VP8_IMPL_H_ | 167 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_VP8_IMPL_H_ |
| OLD | NEW |