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

Side by Side Diff: webrtc/modules/audio_processing/beamformer/nonlinear_beamformer.h

Issue 1211613005: Adding method IsInBeam to beamformer class. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: changed azimuth to point in comment Created 5 years, 6 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 30 matching lines...) Expand all
41 // Needs to be called before the NonlinearBeamformer can be used. 41 // Needs to be called before the NonlinearBeamformer can be used.
42 void Initialize(int chunk_size_ms, int sample_rate_hz) override; 42 void Initialize(int chunk_size_ms, int sample_rate_hz) override;
43 43
44 // Process one time-domain chunk of audio. The audio is expected to be split 44 // Process one time-domain chunk of audio. The audio is expected to be split
45 // into frequency bands inside the ChannelBuffer. The number of frames and 45 // into frequency bands inside the ChannelBuffer. The number of frames and
46 // channels must correspond to the constructor parameters. The same 46 // channels must correspond to the constructor parameters. The same
47 // ChannelBuffer can be passed in as |input| and |output|. 47 // ChannelBuffer can be passed in as |input| and |output|.
48 void ProcessChunk(const ChannelBuffer<float>& input, 48 void ProcessChunk(const ChannelBuffer<float>& input,
49 ChannelBuffer<float>* output) override; 49 ChannelBuffer<float>* output) override;
50 50
51 bool IsInBeam(const SphericalPointf& spherical_point) override;
52
51 // After processing each block |is_target_present_| is set to true if the 53 // After processing each block |is_target_present_| is set to true if the
52 // target signal es present and to false otherwise. This methods can be called 54 // target signal es present and to false otherwise. This methods can be called
53 // to know if the data is target signal or interference and process it 55 // to know if the data is target signal or interference and process it
54 // accordingly. 56 // accordingly.
55 bool is_target_present() override { return is_target_present_; } 57 bool is_target_present() override { return is_target_present_; }
56 58
57 protected: 59 protected:
58 // Process one frequency-domain block of audio. This is where the fun 60 // Process one frequency-domain block of audio. This is where the fun
59 // happens. Implements LappedTransform::Callback. 61 // happens. Implements LappedTransform::Callback.
60 void ProcessAudioBlock(const complex<float>* const* input, 62 void ProcessAudioBlock(const complex<float>* const* input,
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 // Number of blocks after which the data is considered interference if the 169 // Number of blocks after which the data is considered interference if the
168 // mask does not pass |kMaskSignalThreshold|. 170 // mask does not pass |kMaskSignalThreshold|.
169 int hold_target_blocks_; 171 int hold_target_blocks_;
170 // Number of blocks since the last mask that passed |kMaskSignalThreshold|. 172 // Number of blocks since the last mask that passed |kMaskSignalThreshold|.
171 int interference_blocks_count_; 173 int interference_blocks_count_;
172 }; 174 };
173 175
174 } // namespace webrtc 176 } // namespace webrtc
175 177
176 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_BEAMFORMER_NONLINEAR_BEAMFORMER_H_ 178 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_BEAMFORMER_NONLINEAR_BEAMFORMER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698