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

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

Issue 2398963003: Move usage of QualityScaler to ViEEncoder. (Closed)
Patch Set: prevent data race Created 4 years, 1 month 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
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 * WEBRTC VP8 wrapper interface 10 * WEBRTC VP8 wrapper interface
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 const CodecSpecificInfo* codec_specific_info, 50 const CodecSpecificInfo* codec_specific_info,
51 const std::vector<FrameType>* frame_types) override; 51 const std::vector<FrameType>* frame_types) override;
52 52
53 int RegisterEncodeCompleteCallback(EncodedImageCallback* callback) override; 53 int RegisterEncodeCompleteCallback(EncodedImageCallback* callback) override;
54 54
55 int SetChannelParameters(uint32_t packet_loss, int64_t rtt) override; 55 int SetChannelParameters(uint32_t packet_loss, int64_t rtt) override;
56 56
57 int SetRateAllocation(const BitrateAllocation& bitrate, 57 int SetRateAllocation(const BitrateAllocation& bitrate,
58 uint32_t new_framerate) override; 58 uint32_t new_framerate) override;
59 59
60 void OnDroppedFrame() override; 60 void OnDroppedFrame() override;
stefan-webrtc 2016/11/17 16:12:57 Add a TODO to remove this?
kthelgason 2016/11/21 13:06:52 I just removed it outright.
61 61
62 ScalingSettings GetScalingSettings() const override;
63
62 const char* ImplementationName() const override; 64 const char* ImplementationName() const override;
63 65
64 private: 66 private:
65 void SetupTemporalLayers(int num_streams, 67 void SetupTemporalLayers(int num_streams,
66 int num_temporal_layers, 68 int num_temporal_layers,
67 const VideoCodec& codec); 69 const VideoCodec& codec);
68 70
69 // Set the cpu_speed setting for encoder based on resolution and/or platform. 71 // Set the cpu_speed setting for encoder based on resolution and/or platform.
70 int SetCpuSpeed(int width, int height); 72 int SetCpuSpeed(int width, int height);
71 73
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 std::vector<uint16_t> picture_id_; 111 std::vector<uint16_t> picture_id_;
110 std::vector<int> last_key_frame_picture_id_; 112 std::vector<int> last_key_frame_picture_id_;
111 std::vector<bool> key_frame_request_; 113 std::vector<bool> key_frame_request_;
112 std::vector<bool> send_stream_; 114 std::vector<bool> send_stream_;
113 std::vector<int> cpu_speed_; 115 std::vector<int> cpu_speed_;
114 std::vector<vpx_image_t> raw_images_; 116 std::vector<vpx_image_t> raw_images_;
115 std::vector<EncodedImage> encoded_images_; 117 std::vector<EncodedImage> encoded_images_;
116 std::vector<vpx_codec_ctx_t> encoders_; 118 std::vector<vpx_codec_ctx_t> encoders_;
117 std::vector<vpx_codec_enc_cfg_t> configurations_; 119 std::vector<vpx_codec_enc_cfg_t> configurations_;
118 std::vector<vpx_rational_t> downsampling_factors_; 120 std::vector<vpx_rational_t> downsampling_factors_;
119 QualityScaler quality_scaler_;
120 bool quality_scaler_enabled_;
121 }; // end of VP8EncoderImpl class 121 }; // end of VP8EncoderImpl class
122 122
123 class VP8DecoderImpl : public VP8Decoder { 123 class VP8DecoderImpl : public VP8Decoder {
124 public: 124 public:
125 VP8DecoderImpl(); 125 VP8DecoderImpl();
126 126
127 virtual ~VP8DecoderImpl(); 127 virtual ~VP8DecoderImpl();
128 128
129 int InitDecode(const VideoCodec* inst, int number_of_cores) override; 129 int InitDecode(const VideoCodec* inst, int number_of_cores) override;
130 130
(...skipping 30 matching lines...) Expand all
161 int image_format_; 161 int image_format_;
162 vpx_ref_frame_t* ref_frame_; 162 vpx_ref_frame_t* ref_frame_;
163 int propagation_cnt_; 163 int propagation_cnt_;
164 int last_frame_width_; 164 int last_frame_width_;
165 int last_frame_height_; 165 int last_frame_height_;
166 bool key_frame_required_; 166 bool key_frame_required_;
167 }; // end of VP8DecoderImpl class 167 }; // end of VP8DecoderImpl class
168 } // namespace webrtc 168 } // namespace webrtc
169 169
170 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_VP8_IMPL_H_ 170 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_VP8_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698