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

Side by Side Diff: webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.h

Issue 2772773002: Adding cbr support for Opus (Closed)
Patch Set: Reverted everything but audio_encoder_opus and opus_interface Created 3 years, 8 months 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
« no previous file with comments | « AUTHORS ('k') | webrtc/modules/audio_coding/codecs/opus/opus_interface.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 // Otherwise, returns the current complexity depending on whether the 49 // Otherwise, returns the current complexity depending on whether the
50 // current bitrate is above or below complexity_threshold_bps. 50 // current bitrate is above or below complexity_threshold_bps.
51 rtc::Optional<int> GetNewComplexity() const; 51 rtc::Optional<int> GetNewComplexity() const;
52 52
53 int frame_size_ms = 20; 53 int frame_size_ms = 20;
54 size_t num_channels = 1; 54 size_t num_channels = 1;
55 int payload_type = 120; 55 int payload_type = 120;
56 ApplicationMode application = kVoip; 56 ApplicationMode application = kVoip;
57 rtc::Optional<int> bitrate_bps; // Unset means to use default value. 57 rtc::Optional<int> bitrate_bps; // Unset means to use default value.
58 bool fec_enabled = false; 58 bool fec_enabled = false;
59 bool cbr_enabled = false;
59 int max_playback_rate_hz = 48000; 60 int max_playback_rate_hz = 48000;
60 int complexity = kDefaultComplexity; 61 int complexity = kDefaultComplexity;
61 // This value may change in the struct's constructor. 62 // This value may change in the struct's constructor.
62 int low_rate_complexity = kDefaultComplexity; 63 int low_rate_complexity = kDefaultComplexity;
63 // low_rate_complexity is used when the bitrate is below this threshold. 64 // low_rate_complexity is used when the bitrate is below this threshold.
64 int complexity_threshold_bps = 12500; 65 int complexity_threshold_bps = 12500;
65 int complexity_threshold_window_bps = 1500; 66 int complexity_threshold_window_bps = 1500;
66 bool dtx_enabled = false; 67 bool dtx_enabled = false;
67 std::vector<int> supported_frame_lengths_ms; 68 std::vector<int> supported_frame_lengths_ms;
68 const Clock* clock = Clock::GetRealTimeClock(); 69 const Clock* clock = Clock::GetRealTimeClock();
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 rtc::Optional<size_t> overhead_bytes_per_packet_; 176 rtc::Optional<size_t> overhead_bytes_per_packet_;
176 const std::unique_ptr<SmoothingFilter> bitrate_smoother_; 177 const std::unique_ptr<SmoothingFilter> bitrate_smoother_;
177 rtc::Optional<int64_t> bitrate_smoother_last_update_time_; 178 rtc::Optional<int64_t> bitrate_smoother_last_update_time_;
178 179
179 RTC_DISALLOW_COPY_AND_ASSIGN(AudioEncoderOpus); 180 RTC_DISALLOW_COPY_AND_ASSIGN(AudioEncoderOpus);
180 }; 181 };
181 182
182 } // namespace webrtc 183 } // namespace webrtc
183 184
184 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_OPUS_AUDIO_ENCODER_OPUS_H_ 185 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_OPUS_AUDIO_ENCODER_OPUS_H_
OLDNEW
« no previous file with comments | « AUTHORS ('k') | webrtc/modules/audio_coding/codecs/opus/opus_interface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698