chromium/third_party/webrtc/modules/audio_processing/aec3/aec3_common.h

/*
 *  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_AEC3_COMMON_H_
#define MODULES_AUDIO_PROCESSING_AEC3_AEC3_COMMON_H_

#include <stddef.h>

namespace webrtc {

#ifdef _MSC_VER /* visual c++ */
#define ALIGN16_BEG
#define ALIGN16_END
#else /* gcc or icc */
#define ALIGN16_BEG
#define ALIGN16_END
#endif

enum class Aec3Optimization {};

constexpr int kNumBlocksPerSecond =;

constexpr int kMetricsReportingIntervalBlocks =;
constexpr int kMetricsComputationBlocks =;
constexpr int kMetricsCollectionBlocks =;

constexpr size_t kFftLengthBy2 =;
constexpr size_t kFftLengthBy2Plus1 =;
constexpr size_t kFftLengthBy2Minus1 =;
constexpr size_t kFftLength =;
constexpr size_t kFftLengthBy2Log2 =;

constexpr int kRenderTransferQueueSizeFrames =;

constexpr size_t kMaxNumBands =;
constexpr size_t kFrameSize =;
constexpr size_t kSubFrameLength =;

constexpr size_t kBlockSize =;
constexpr size_t kBlockSizeLog2 =;

constexpr size_t kExtendedBlockSize =;
constexpr size_t kMatchedFilterWindowSizeSubBlocks =;
constexpr size_t kMatchedFilterAlignmentShiftSizeSubBlocks =;

// TODO(peah): Integrate this with how it is done inside audio_processing_impl.
constexpr size_t NumBandsForRate(int sample_rate_hz) {}

constexpr bool ValidFullBandRate(int sample_rate_hz) {}

constexpr int GetTimeDomainLength(int filter_length_blocks) {}

constexpr size_t GetDownSampledBufferSize(size_t down_sampling_factor,
                                          size_t num_matched_filters) {}

constexpr size_t GetRenderDelayBufferSize(size_t down_sampling_factor,
                                          size_t num_matched_filters,
                                          size_t filter_length_blocks) {}

// Detects what kind of optimizations to use for the code.
Aec3Optimization DetectOptimization();

// Computes the log2 of the input in a fast an approximate manner.
float FastApproxLog2f(float in);

// Returns dB from a power quantity expressed in log2.
float Log2TodB(float in_log2);

static_assert;

static_assert;

static_assert;
static_assert;
static_assert;

static_assert;
static_assert;
static_assert;
static_assert;

}  // namespace webrtc

#endif  // MODULES_AUDIO_PROCESSING_AEC3_AEC3_COMMON_H_