Support 56kHz to 19.2kHz gain analysis (Patch v4)

This implementation uses decimation to generate an estimate of the
required ReplayGain adjustment for tracks sampled at high rates.

This approach avoids having to generate filters with commensurately more taps,
and also the subsequent effect on performance as these additional
taps are evaluated for high sample rate tracks.

Filter table entries with coefficients that are unchanged are
marked /* ORIGINAL */.

The remaining entries are new and have coefficient values obtained
from src/utils/loudness/loudness.sci. See:

        http://lists.xiph.org/pipermail/flac-dev/2012-February/003220.html

Because these filter coefficients can be generated from a known source,
they are preferred to the FooBar2000 coefficients whose provenance is
unknown.

Signed-off-by: Earl Chew <earl_chew@yahoo.com>
This commit is contained in:
Earl Chew
2012-02-22 16:57:54 -08:00
committed by Erik de Castro Lopo
parent 774e0776a5
commit 0554a4aee6
3 changed files with 252 additions and 123 deletions

View File

@@ -47,8 +47,8 @@ typedef float Float_t; /* Type used for filtering */
extern Float_t ReplayGainReferenceLoudness; /* in dB SPL, currently == 89.0 */
int InitGainAnalysis ( long samplefreq );
int ValidGainFrequency ( long samplefreq );
int AnalyzeSamples ( const Float_t* left_samples, const Float_t* right_samples, size_t num_samples, int num_channels );
int ResetSampleFrequency ( long samplefreq );
Float_t GetTitleGain ( void );
Float_t GetAlbumGain ( void );