chromium/third_party/webrtc/modules/audio_processing/agc2/rnn_vad/common.h

/*
 *  Copyright (c) 2018 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_AGC2_RNN_VAD_COMMON_H_
#define MODULES_AUDIO_PROCESSING_AGC2_RNN_VAD_COMMON_H_

#include <stddef.h>

namespace webrtc {
namespace rnn_vad {

constexpr double kPi =;

constexpr int kSampleRate24kHz =;
constexpr int kFrameSize10ms24kHz =;
constexpr int kFrameSize20ms24kHz =;

// Pitch buffer.
constexpr int kMinPitch24kHz =;   // 0.00125 s.
constexpr int kMaxPitch24kHz =;  // 0.016 s.
constexpr int kBufSize24kHz =;
static_assert;

// 24 kHz analysis.
// Define a higher minimum pitch period for the initial search. This is used to
// avoid searching for very short periods, for which a refinement step is
// responsible.
constexpr int kInitialMinPitch24kHz =;
static_assert;
static_assert;
static_assert;
// Number of (inverted) lags during the initial pitch search phase at 24 kHz.
constexpr int kInitialNumLags24kHz =;
// Number of (inverted) lags during the pitch search refinement phase at 24 kHz.
constexpr int kRefineNumLags24kHz =;
static_assert;

// 12 kHz analysis.
constexpr int kSampleRate12kHz =;
constexpr int kFrameSize10ms12kHz =;
constexpr int kFrameSize20ms12kHz =;
constexpr int kBufSize12kHz =;
constexpr int kInitialMinPitch12kHz =;
constexpr int kMaxPitch12kHz =;
static_assert;
// The inverted lags for the pitch interval [`kInitialMinPitch12kHz`,
// `kMaxPitch12kHz`] are in the range [0, `kNumLags12kHz`].
constexpr int kNumLags12kHz =;

// 48 kHz constants.
constexpr int kMinPitch48kHz =;
constexpr int kMaxPitch48kHz =;

// Spectral features.
constexpr int kNumBands =;
constexpr int kNumLowerBands =;
static_assert;
constexpr int kCepstralCoeffsHistorySize =;
static_assert;

constexpr int kFeatureVectorSize =;

}  // namespace rnn_vad
}  // namespace webrtc

#endif  // MODULES_AUDIO_PROCESSING_AGC2_RNN_VAD_COMMON_H_