15 : mChannelCount{ channels }
17 , mBlockSize( ceil(0.4 * mRate) )
18 , mBlockOverlap( ceil(0.1 * mRate) )
49 double db = 3.999843853973347;
50 double f0 = 1681.974450955533;
51 double Q = 0.7071752369554196;
52 double K = tan(
M_PI * f0 / fs);
54 double Vh = pow(10.0, db / 20.0);
55 double Vb = pow(Vh, 0.4996667741545416);
57 double a0 = 1.0 +
K / Q +
K *
K;
59 pBiquad[0].fNumerCoeffs[
Biquad::B0] = (Vh + Vb *
K / Q +
K *
K) / a0;
60 pBiquad[0].fNumerCoeffs[
Biquad::B1] = 2.0 * (
K *
K - Vh) / a0;
61 pBiquad[0].fNumerCoeffs[
Biquad::B2] = (Vh - Vb *
K / Q +
K *
K) / a0;
63 pBiquad[0].fDenomCoeffs[
Biquad::A1] = 2.0 * (
K *
K - 1.0) / a0;
64 pBiquad[0].fDenomCoeffs[
Biquad::A2] = (1.0 -
K / Q +
K *
K) / a0;
69 f0 = 38.13547087602444;
70 Q = 0.5003270373238773;
71 K = tan(
M_PI * f0 / fs);
77 pBiquad[1].fDenomCoeffs[
Biquad::A1] = 2.0 * (
K *
K - 1.0) / (1.0 +
K / Q +
K *
K);
78 pBiquad[1].fDenomCoeffs[
Biquad::A2] = (1.0 -
K / Q +
K *
K) / (1.0 +
K / Q +
K *
K);
136 double Gamma_R = log10(sum_v/sum_c) - 1;
145 return 0.8529037031 * sum_v / sum_c;
176 for(
size_t i = 0; i < validLen; ++i)
183 blockVal = log10(blockVal/
double(validLen));
void reinit(Integral count, bool initialize=false)
ArrayOf< long int > mLoudnessHist
const size_t mChannelCount
static constexpr double GAMMA_A
EBU R128 absolute threshold.
void ProcessSampleFromChannel(float x_in, size_t channel) const
void AddBlockToHistogram(size_t validLen)
void HistogramSums(size_t start_idx, double &sum_v, long int &sum_c) const
static constexpr size_t HIST_BIN_COUNT
static ArrayOf< Biquad > CalcWeightingFilter(double fs)
double IntegrativeLoudness()
EBUR128(double rate, size_t channels)
ArrayOf< ArrayOf< Biquad > > mWeightingFilter
const size_t mBlockOverlap
fastfloat_really_inline void round(adjusted_mantissa &am, callback cb) noexcept
@ A1
Denominator coefficient indices.
@ B0
Numerator coefficient indices.