Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

49 lines
1.6 KiB
C
Raw Normal View History

Reland of Added first layer of the echo canceller 3 functionality. Reason for reland: Added disabling of the BlockProcessor DEATH tests due to false alarms on the trybots. These errors cannot be reproduced locally and they occur only in the DEATH test code, which means that the memory leaks do not occur under normal conditions. Original issue's description: > Reason for revert: > Memcheck buildbot detected memory leaks in the death tests. The code looks fine > to me, but please investigate what causes the error and reland. > > Original issue's description: > > Added first layer of the echo canceller 3 functionality. > > > > This CL adds the first layer of the echo canceller 3. > > All of the code is as it should, apart from > > block_processor.* which only contains placeholder > > functionality. (Upcoming CLs will add proper > > functionality into those files.) > > > > > > > > BUG=webrtc:6018 > > > > Review-Url: https://codereview.webrtc.org/2584493002 > > Cr-Commit-Position: refs/heads/master@{#15861} > > Committed: > https://chromium.googlesource.com/external/webrtc/+/38fd1758e90bcdc7690a552e7ef0ec0d143d2f30 > > TBR=ivoc@webrtc.org,aleloi@webrtc.org,henrik.lundin@webrtc.org,peah@webrtc.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=webrtc:6018 BUG=webrtc:6018 TBR=ivoc@webrtc.org,aleloi@webrtc.org,henrik.lundin@webrtc.org Review-Url: https://codereview.webrtc.org/2608233002 Cr-Commit-Position: refs/heads/master@{#15884}
2017-01-03 04:20:34 -08:00
/*
* 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 MODULES_AUDIO_PROCESSING_AEC3_FRAME_BLOCKER_H_
#define MODULES_AUDIO_PROCESSING_AEC3_FRAME_BLOCKER_H_
Reland of Added first layer of the echo canceller 3 functionality. Reason for reland: Added disabling of the BlockProcessor DEATH tests due to false alarms on the trybots. These errors cannot be reproduced locally and they occur only in the DEATH test code, which means that the memory leaks do not occur under normal conditions. Original issue's description: > Reason for revert: > Memcheck buildbot detected memory leaks in the death tests. The code looks fine > to me, but please investigate what causes the error and reland. > > Original issue's description: > > Added first layer of the echo canceller 3 functionality. > > > > This CL adds the first layer of the echo canceller 3. > > All of the code is as it should, apart from > > block_processor.* which only contains placeholder > > functionality. (Upcoming CLs will add proper > > functionality into those files.) > > > > > > > > BUG=webrtc:6018 > > > > Review-Url: https://codereview.webrtc.org/2584493002 > > Cr-Commit-Position: refs/heads/master@{#15861} > > Committed: > https://chromium.googlesource.com/external/webrtc/+/38fd1758e90bcdc7690a552e7ef0ec0d143d2f30 > > TBR=ivoc@webrtc.org,aleloi@webrtc.org,henrik.lundin@webrtc.org,peah@webrtc.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=webrtc:6018 BUG=webrtc:6018 TBR=ivoc@webrtc.org,aleloi@webrtc.org,henrik.lundin@webrtc.org Review-Url: https://codereview.webrtc.org/2608233002 Cr-Commit-Position: refs/heads/master@{#15884}
2017-01-03 04:20:34 -08:00
#include <stddef.h>
#include <vector>
#include "api/array_view.h"
#include "modules/audio_processing/aec3/aec3_common.h"
#include "rtc_base/constructor_magic.h"
Reland of Added first layer of the echo canceller 3 functionality. Reason for reland: Added disabling of the BlockProcessor DEATH tests due to false alarms on the trybots. These errors cannot be reproduced locally and they occur only in the DEATH test code, which means that the memory leaks do not occur under normal conditions. Original issue's description: > Reason for revert: > Memcheck buildbot detected memory leaks in the death tests. The code looks fine > to me, but please investigate what causes the error and reland. > > Original issue's description: > > Added first layer of the echo canceller 3 functionality. > > > > This CL adds the first layer of the echo canceller 3. > > All of the code is as it should, apart from > > block_processor.* which only contains placeholder > > functionality. (Upcoming CLs will add proper > > functionality into those files.) > > > > > > > > BUG=webrtc:6018 > > > > Review-Url: https://codereview.webrtc.org/2584493002 > > Cr-Commit-Position: refs/heads/master@{#15861} > > Committed: > https://chromium.googlesource.com/external/webrtc/+/38fd1758e90bcdc7690a552e7ef0ec0d143d2f30 > > TBR=ivoc@webrtc.org,aleloi@webrtc.org,henrik.lundin@webrtc.org,peah@webrtc.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=webrtc:6018 BUG=webrtc:6018 TBR=ivoc@webrtc.org,aleloi@webrtc.org,henrik.lundin@webrtc.org Review-Url: https://codereview.webrtc.org/2608233002 Cr-Commit-Position: refs/heads/master@{#15884}
2017-01-03 04:20:34 -08:00
namespace webrtc {
// Class for producing 64 sample multiband blocks from frames consisting of 1 or
// 2 subframes of 80 samples.
class FrameBlocker {
public:
explicit FrameBlocker(size_t num_bands);
~FrameBlocker();
// Inserts one 80 sample multiband subframe from the multiband frame and
// extracts one 64 sample multiband block.
void InsertSubFrameAndExtractBlock(
const std::vector<rtc::ArrayView<float>>& sub_frame,
std::vector<std::vector<float>>* block);
// Reports whether a multiband block of 64 samples is available for
// extraction.
bool IsBlockAvailable() const;
// Extracts a multiband block of 64 samples.
void ExtractBlock(std::vector<std::vector<float>>* block);
private:
const size_t num_bands_;
std::vector<std::vector<float>> buffer_;
RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(FrameBlocker);
};
} // namespace webrtc
#endif // MODULES_AUDIO_PROCESSING_AEC3_FRAME_BLOCKER_H_