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

Side by Side Diff: webrtc/common_audio/lapped_transform.h

Issue 2320833002: Compensate for the IntelligibilityEnhancer processing delay in high bands (Closed)
Patch Set: Implement DelayBuffer helper class Created 4 years, 3 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) 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 79
80 // Get the number of output channels. 80 // Get the number of output channels.
81 // 81 //
82 // This is the number of arrays that must be passed to ProcessChunk via 82 // This is the number of arrays that must be passed to ProcessChunk via
83 // out_chunk. 83 // out_chunk.
84 // 84 //
85 // Returns the same num_out_channels passed to the LappedTransform 85 // Returns the same num_out_channels passed to the LappedTransform
86 // constructor. 86 // constructor.
87 size_t num_out_channels() const { return num_out_channels_; } 87 size_t num_out_channels() const { return num_out_channels_; }
88 88
89 // Get the initial delay.
90 //
91 // This is the delay introduced by the |blocker_| to be able to get and return
92 // chunks of |chunk_length|, but process blocks of |block_length|.
93 size_t initial_delay() const { return blocker_.initial_delay(); }
94
89 private: 95 private:
90 // Internal middleware callback, given to the blocker. Transforms each block 96 // Internal middleware callback, given to the blocker. Transforms each block
91 // and hands it over to the processing method given at construction time. 97 // and hands it over to the processing method given at construction time.
92 class BlockThunk : public BlockerCallback { 98 class BlockThunk : public BlockerCallback {
93 public: 99 public:
94 explicit BlockThunk(LappedTransform* parent) : parent_(parent) {} 100 explicit BlockThunk(LappedTransform* parent) : parent_(parent) {}
95 101
96 void ProcessBlock(const float* const* input, 102 void ProcessBlock(const float* const* input,
97 size_t num_frames, 103 size_t num_frames,
98 size_t num_input_channels, 104 size_t num_input_channels,
(...skipping 17 matching lines...) Expand all
116 const size_t cplx_length_; 122 const size_t cplx_length_;
117 AlignedArray<float> real_buf_; 123 AlignedArray<float> real_buf_;
118 AlignedArray<std::complex<float> > cplx_pre_; 124 AlignedArray<std::complex<float> > cplx_pre_;
119 AlignedArray<std::complex<float> > cplx_post_; 125 AlignedArray<std::complex<float> > cplx_post_;
120 }; 126 };
121 127
122 } // namespace webrtc 128 } // namespace webrtc
123 129
124 #endif // WEBRTC_COMMON_AUDIO_LAPPED_TRANSFORM_H_ 130 #endif // WEBRTC_COMMON_AUDIO_LAPPED_TRANSFORM_H_
125 131
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698