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

Unified Diff: webrtc/modules/audio_processing/aec3/block_framer.h

Issue 2584493002: Added first layer of the echo canceller 3 functionality (Closed)
Patch Set: Restricted the AnalyzeRender access, added ability to add external reporting of echo failure, and o… 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_processing/aec3/block_framer.h
diff --git a/webrtc/modules/audio_processing/aec3/block_framer.h b/webrtc/modules/audio_processing/aec3/block_framer.h
new file mode 100644
index 0000000000000000000000000000000000000000..7cef8c9b6646bc014b2db2ffa6b3b399e61a4b6e
--- /dev/null
+++ b/webrtc/modules/audio_processing/aec3/block_framer.h
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_BLOCK_FRAMER_H_
+#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_BLOCK_FRAMER_H_
+
+#include <vector>
+
+#include "webrtc/base/array_view.h"
+#include "webrtc/base/constructormagic.h"
+#include "webrtc/modules/audio_processing/aec3/aec3_constants.h"
+
+namespace webrtc {
+
+/* Class for producing 10 ms second frames from 64 sample blocks */
hlundin-webrtc 2016/12/16 10:04:46 Use // style comments.
hlundin-webrtc 2016/12/16 10:04:46 I'd like to see a little bit more of an explanatio
aleloi 2016/12/16 15:04:31 Remove 'second'
peah-webrtc 2016/12/20 10:10:24 I improved it a bit. PTAL
peah-webrtc 2016/12/20 10:10:24 Done.
peah-webrtc 2016/12/20 10:10:24 Done.
+class BlockFramer {
+ public:
+ BlockFramer(size_t num_bands, size_t frame_length);
+ ~BlockFramer();
+ void InsertBlock(rtc::ArrayView<const float> block);
+ void ExtractFrame(size_t sub_frame_index, float* const* frame);
hlundin-webrtc 2016/12/16 10:04:46 Comment, please.
aleloi 2016/12/16 15:04:31 Maybe document the threading model and use base/th
peah-webrtc 2016/12/20 10:10:24 I don't think we should add thread annotations as
peah-webrtc 2016/12/20 10:10:24 Done.
+
+ private:
+ const size_t kMaxSize = 2 * kBlockSize;
hlundin-webrtc 2016/12/16 10:04:46 constexpr
peah-webrtc 2016/12/20 10:10:24 Done.
+ const size_t num_bands_;
+ const size_t frame_length_;
+ std::vector<float> buffer_;
+ size_t buffer_size_;
+
+ RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(BlockFramer);
+};
+} // namespace webrtc
+
+#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_BLOCK_FRAMER_H_

Powered by Google App Engine
This is Rietveld 408576698