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

Side by Side Diff: webrtc/modules/audio_processing/aec3/block_framer.h

Issue 2584493002: Added first layer of the echo canceller 3 functionality (Closed)
Patch Set: Changes in response to reviewer comments Created 4 years 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
(Empty)
1 /*
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
3 *
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
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11 #ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_BLOCK_FRAMER_H_
12 #define WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_BLOCK_FRAMER_H_
13
14 #include <vector>
15
16 #include "webrtc/base/array_view.h"
17 #include "webrtc/base/constructormagic.h"
18 #include "webrtc/modules/audio_processing/aec3/aec3_constants.h"
19
20 namespace webrtc {
21
22 // Class for producing frames consisting of 1 or 2 subframes of 80 samples each
23 // from from 64 sample blocks.
hlundin-webrtc 2016/12/20 15:10:35 from from
peah-webrtc 2016/12/21 23:13:50 Done.
24 // The class is designed to work together with the FrameBlocker class which
25 // performs the reverse conversion. Used together with that, this class produces
26 // output frames are the same rate as frames are received by the FrameBlocker
27 // class. Note that the internal buffers will overrun if any other rate of
28 // packets insertion is used.
29 class BlockFramer {
30 public:
31 explicit BlockFramer(size_t num_bands);
32 ~BlockFramer();
33 // Adds a 64 sample block into the data forming the upcoming frame.
34 void InsertBlock(const std::vector<std::vector<float>>& block);
35 // Adds a 64 sample block and extracts an 80 sample subframe into frame.
36 void InsertBlockAndExtractSubFrame(
37 const std::vector<std::vector<float>>& block,
38 rtc::ArrayView<rtc::ArrayView<float>> sub_frame);
39
40 private:
41 const size_t num_bands_;
42 std::vector<std::vector<float>> buffer_;
43
44 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(BlockFramer);
45 };
46 } // namespace webrtc
47
48 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_BLOCK_FRAMER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698