gain_analysis.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  replaygain_data

Defines

#define PINK_REF   64.82 /* 298640883795 */
#define YULE_ORDER   10
#define BUTTER_ORDER   2
#define YULE_FILTER   filterYule
#define BUTTER_FILTER   filterButter
#define RMS_PERCENTILE   0.95
#define MAX_SAMP_FREQ   48000L
#define RMS_WINDOW_TIME_NUMERATOR   1L
#define RMS_WINDOW_TIME_DENOMINATOR   20L
#define STEPS_per_dB   100.
#define MAX_dB   120.

Typedefs

typedef sample_t Float_t
typedef replaygain_data replaygain_t

Enumerations

enum  {
  GAIN_NOT_ENOUGH_SAMPLES = -24601, GAIN_ANALYSIS_ERROR = 0, GAIN_ANALYSIS_OK, INIT_GAIN_ANALYSIS_ERROR = 0,
  INIT_GAIN_ANALYSIS_OK = 1
}
enum  { MAX_ORDER = (BUTTER_ORDER > YULE_ORDER ? BUTTER_ORDER : YULE_ORDER), MAX_SAMPLES_PER_WINDOW = ((MAX_SAMP_FREQ * RMS_WINDOW_TIME_NUMERATOR) / RMS_WINDOW_TIME_DENOMINATOR + 1) }

Functions

int InitGainAnalysis (replaygain_t *rgData, long samplefreq)
int AnalyzeSamples (replaygain_t *rgData, const Float_t *left_samples, const Float_t *right_samples, size_t num_samples, int num_channels)
int ResetSampleFrequency (replaygain_t *rgData, long samplefreq)
Float_t GetTitleGain (replaygain_t *rgData)
Float_t GetAlbumGain (replaygain_t *rgData)


Define Documentation

#define BUTTER_FILTER   filterButter

Definition at line 53 of file gain_analysis.h.

Referenced by AnalyzeSamples().

#define BUTTER_ORDER   2

Definition at line 51 of file gain_analysis.h.

#define MAX_dB   120.

Definition at line 59 of file gain_analysis.h.

#define MAX_SAMP_FREQ   48000L

Definition at line 55 of file gain_analysis.h.

#define PINK_REF   64.82 /* 298640883795 */

Definition at line 47 of file gain_analysis.h.

Referenced by analyzeResult().

#define RMS_PERCENTILE   0.95

Definition at line 54 of file gain_analysis.h.

Referenced by analyzeResult().

#define RMS_WINDOW_TIME_DENOMINATOR   20L

Definition at line 57 of file gain_analysis.h.

Referenced by ResetSampleFrequency().

#define RMS_WINDOW_TIME_NUMERATOR   1L

Definition at line 56 of file gain_analysis.h.

Referenced by ResetSampleFrequency().

#define STEPS_per_dB   100.

Definition at line 58 of file gain_analysis.h.

Referenced by analyzeResult(), and AnalyzeSamples().

#define YULE_FILTER   filterYule

Definition at line 52 of file gain_analysis.h.

Referenced by AnalyzeSamples().

#define YULE_ORDER   10

Definition at line 50 of file gain_analysis.h.


Typedef Documentation

typedef sample_t Float_t

Definition at line 44 of file gain_analysis.h.

typedef struct replaygain_data replaygain_t

Definition at line 94 of file gain_analysis.h.


Enumeration Type Documentation

anonymous enum

Enumerator:
GAIN_NOT_ENOUGH_SAMPLES 
GAIN_ANALYSIS_ERROR 
GAIN_ANALYSIS_OK 
INIT_GAIN_ANALYSIS_ERROR 
INIT_GAIN_ANALYSIS_OK 

Definition at line 61 of file gain_analysis.h.

anonymous enum

Enumerator:
MAX_ORDER 
MAX_SAMPLES_PER_WINDOW 

Definition at line 65 of file gain_analysis.h.


Function Documentation

int AnalyzeSamples ( replaygain_t rgData,
const Float_t left_samples,
const Float_t right_samples,
size_t  num_samples,
int  num_channels 
)

Definition at line 318 of file gain_analysis.c.

References replaygain_data::A, ABButter, ABYule, BUTTER_FILTER, replaygain_data::freqindex, fsqr(), GAIN_ANALYSIS_ERROR, GAIN_ANALYSIS_OK, i, replaygain_data::linpre, replaygain_data::linprebuf, replaygain_data::lout, replaygain_data::loutbuf, replaygain_data::lstep, replaygain_data::lstepbuf, replaygain_data::lsum, MAX_ORDER, memcpy, memmove, replaygain_data::rinpre, replaygain_data::rinprebuf, replaygain_data::rout, replaygain_data::routbuf, replaygain_data::rstep, replaygain_data::rstepbuf, replaygain_data::rsum, replaygain_data::sampleWindow, STEPS_per_dB, replaygain_data::totsamp, and YULE_FILTER.

Referenced by copy_buffer().

Here is the call graph for this function:

Float_t GetAlbumGain ( replaygain_t rgData  ) 

Definition at line 504 of file gain_analysis.c.

References analyzeResult(), and replaygain_data::B.

Here is the call graph for this function:

Float_t GetTitleGain ( replaygain_t rgData  ) 

Definition at line 478 of file gain_analysis.c.

References replaygain_data::A, analyzeResult(), replaygain_data::B, i, replaygain_data::linprebuf, replaygain_data::loutbuf, replaygain_data::lstepbuf, replaygain_data::lsum, MAX_ORDER, replaygain_data::rinprebuf, replaygain_data::routbuf, replaygain_data::rstepbuf, replaygain_data::rsum, and replaygain_data::totsamp.

Referenced by flush_bitstream().

Here is the call graph for this function:

int InitGainAnalysis ( replaygain_t rgData,
long  samplefreq 
)

Definition at line 291 of file gain_analysis.c.

References replaygain_data::B, INIT_GAIN_ANALYSIS_ERROR, INIT_GAIN_ANALYSIS_OK, replaygain_data::linpre, replaygain_data::linprebuf, replaygain_data::lout, replaygain_data::loutbuf, replaygain_data::lstep, replaygain_data::lstepbuf, MAX_ORDER, ResetSampleFrequency(), replaygain_data::rinpre, replaygain_data::rinprebuf, replaygain_data::rout, replaygain_data::routbuf, replaygain_data::rstep, and replaygain_data::rstepbuf.

Referenced by lame_init_params().

Here is the call graph for this function:

int ResetSampleFrequency ( replaygain_t rgData,
long  samplefreq 
)

Definition at line 233 of file gain_analysis.c.

References replaygain_data::A, replaygain_data::freqindex, i, INIT_GAIN_ANALYSIS_ERROR, INIT_GAIN_ANALYSIS_OK, replaygain_data::linprebuf, replaygain_data::loutbuf, replaygain_data::lstepbuf, replaygain_data::lsum, MAX_ORDER, replaygain_data::rinprebuf, RMS_WINDOW_TIME_DENOMINATOR, RMS_WINDOW_TIME_NUMERATOR, replaygain_data::routbuf, replaygain_data::rstepbuf, replaygain_data::rsum, replaygain_data::sampleWindow, and replaygain_data::totsamp.

Referenced by InitGainAnalysis().


Generated on Sun Dec 2 11:36:04 2007 for LAME by  doxygen 1.5.2