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

Side by Side Diff: webrtc/modules/audio_coding/neteq/merge.h

Issue 1901633002: Adding 120 ms frame length support in NetEq. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: fixing two errors Created 4 years, 7 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
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 10
(...skipping 19 matching lines...) Expand all
30 // end of the expanded data (thanks to how the Expand class operates). However, 30 // end of the expanded data (thanks to how the Expand class operates). However,
31 // if a later packet arrives instead, the loss is a fact, and the new data must 31 // if a later packet arrives instead, the loss is a fact, and the new data must
32 // be stitched together with the end of the expanded data. This stitching is 32 // be stitched together with the end of the expanded data. This stitching is
33 // what the Merge class does. 33 // what the Merge class does.
34 class Merge { 34 class Merge {
35 public: 35 public:
36 Merge(int fs_hz, 36 Merge(int fs_hz,
37 size_t num_channels, 37 size_t num_channels,
38 Expand* expand, 38 Expand* expand,
39 SyncBuffer* sync_buffer); 39 SyncBuffer* sync_buffer);
40 virtual ~Merge() {} 40 virtual ~Merge();
41 41
42 // The main method to produce the audio data. The decoded data is supplied in 42 // The main method to produce the audio data. The decoded data is supplied in
43 // |input|, having |input_length| samples in total for all channels 43 // |input|, having |input_length| samples in total for all channels
44 // (interleaved). The result is written to |output|. The number of channels 44 // (interleaved). The result is written to |output|. The number of channels
45 // allocated in |output| defines the number of channels that will be used when 45 // allocated in |output| defines the number of channels that will be used when
46 // de-interleaving |input|. The values in |external_mute_factor_array| (Q14) 46 // de-interleaving |input|. The values in |external_mute_factor_array| (Q14)
47 // will be used to scale the audio, and is updated in the process. The array 47 // will be used to scale the audio, and is updated in the process. The array
48 // must have |num_channels_| elements. 48 // must have |num_channels_| elements.
49 virtual size_t Process(int16_t* input, size_t input_length, 49 virtual size_t Process(int16_t* input, size_t input_length,
50 int16_t* external_mute_factor_array, 50 int16_t* external_mute_factor_array,
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 size_t CorrelateAndPeakSearch(size_t start_position, size_t input_length, 86 size_t CorrelateAndPeakSearch(size_t start_position, size_t input_length,
87 size_t expand_period) const; 87 size_t expand_period) const;
88 88
89 const int fs_mult_; // fs_hz_ / 8000. 89 const int fs_mult_; // fs_hz_ / 8000.
90 const size_t timestamps_per_call_; 90 const size_t timestamps_per_call_;
91 Expand* expand_; 91 Expand* expand_;
92 SyncBuffer* sync_buffer_; 92 SyncBuffer* sync_buffer_;
93 int16_t expanded_downsampled_[kExpandDownsampLength]; 93 int16_t expanded_downsampled_[kExpandDownsampLength];
94 int16_t input_downsampled_[kInputDownsampLength]; 94 int16_t input_downsampled_[kInputDownsampLength];
95 AudioMultiVector expanded_; 95 AudioMultiVector expanded_;
96 std::vector<int16_t> temp_data_;
96 97
97 RTC_DISALLOW_COPY_AND_ASSIGN(Merge); 98 RTC_DISALLOW_COPY_AND_ASSIGN(Merge);
98 }; 99 };
99 100
100 } // namespace webrtc 101 } // namespace webrtc
101 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_MERGE_H_ 102 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_MERGE_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/modules/audio_coding/neteq/merge.cc » ('j') | webrtc/modules/audio_coding/neteq/merge.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698