Ardour  9.0-pre0-582-g084a23a80d
ARDOUR::LUFSMeter Class Reference

#include <lufs_meter.h>

Classes

struct  FilterState
 

Public Member Functions

 LUFSMeter (double samplerate, uint32_t n_channels)
 
 LUFSMeter (LUFSMeter const &other)=delete
 
 ~LUFSMeter ()
 
void run (float const **data, uint32_t n_samples)
 
void reset ()
 
float integrated_loudness () const
 
float momentary () const
 
float max_momentary () const
 
float dbtp () const
 

Private Types

typedef std::map< int, uint32_t, std::less< int >, PBD::StackAllocator< std::pair< const int, uint32_t >, 1000 > > History
 

Private Member Functions

void init ()
 
float process (float const **data, const uint32_t n_samples, uint32_t offset)
 
float sumfrag (uint32_t) const
 
void calc_true_peak (float const **data, const uint32_t n_samples)
 
float upsample_x4 (int chn, float const x)
 
float upsample_x2 (int chn, float const x)
 

Private Attributes

std::function< float(int, const float) > upsample
 
const float _g [5] = { 1.0, 1.0, 1.0, 1.41, 1.41 }
 
double _samplerate
 
uint32_t _n_channels
 
uint32_t _n_fragment
 
float _a0
 
float _a1
 
float _a2
 
float _b1
 
float _b2
 
float _c3
 
float _c4
 
uint32_t _frag_pos
 
float _frag_pwr
 
uint32_t _block_cnt
 
float _block_pwr
 
float _power [8]
 
uint32_t _pow_idx
 
float _thresh_rel
 
float _momentary_l
 
float _maxloudn_M
 
float _integrated
 
float _dbtp
 
History _hist
 
FilterState _fst [5]
 
float * _z [5]
 

Detailed Description

Definition at line 31 of file lufs_meter.h.

Member Typedef Documentation

◆ History

typedef std::map<int, uint32_t, std::less<int>, PBD::StackAllocator<std::pair<const int, uint32_t>, 1000> > ARDOUR::LUFSMeter::History
private

Definition at line 87 of file lufs_meter.h.

Constructor & Destructor Documentation

◆ LUFSMeter() [1/2]

ARDOUR::LUFSMeter::LUFSMeter ( double  samplerate,
uint32_t  n_channels 
)

◆ LUFSMeter() [2/2]

ARDOUR::LUFSMeter::LUFSMeter ( LUFSMeter const &  other)
delete

◆ ~LUFSMeter()

ARDOUR::LUFSMeter::~LUFSMeter ( )

Member Function Documentation

◆ calc_true_peak()

void ARDOUR::LUFSMeter::calc_true_peak ( float const **  data,
const uint32_t  n_samples 
)
private

◆ dbtp()

float ARDOUR::LUFSMeter::dbtp ( ) const

◆ init()

void ARDOUR::LUFSMeter::init ( )
private

◆ integrated_loudness()

float ARDOUR::LUFSMeter::integrated_loudness ( ) const

◆ max_momentary()

float ARDOUR::LUFSMeter::max_momentary ( ) const

◆ momentary()

float ARDOUR::LUFSMeter::momentary ( ) const

◆ process()

float ARDOUR::LUFSMeter::process ( float const **  data,
const uint32_t  n_samples,
uint32_t  offset 
)
private

◆ reset()

void ARDOUR::LUFSMeter::reset ( )

◆ run()

void ARDOUR::LUFSMeter::run ( float const **  data,
uint32_t  n_samples 
)

◆ sumfrag()

float ARDOUR::LUFSMeter::sumfrag ( uint32_t  ) const
private

◆ upsample_x2()

float ARDOUR::LUFSMeter::upsample_x2 ( int  chn,
float const  x 
)
private

◆ upsample_x4()

float ARDOUR::LUFSMeter::upsample_x4 ( int  chn,
float const  x 
)
private

Member Data Documentation

◆ _a0

float ARDOUR::LUFSMeter::_a0
private

Definition at line 65 of file lufs_meter.h.

◆ _a1

float ARDOUR::LUFSMeter::_a1
private

Definition at line 65 of file lufs_meter.h.

◆ _a2

float ARDOUR::LUFSMeter::_a2
private

Definition at line 65 of file lufs_meter.h.

◆ _b1

float ARDOUR::LUFSMeter::_b1
private

Definition at line 66 of file lufs_meter.h.

◆ _b2

float ARDOUR::LUFSMeter::_b2
private

Definition at line 66 of file lufs_meter.h.

◆ _block_cnt

uint32_t ARDOUR::LUFSMeter::_block_cnt
private

Definition at line 72 of file lufs_meter.h.

◆ _block_pwr

float ARDOUR::LUFSMeter::_block_pwr
private

Definition at line 73 of file lufs_meter.h.

◆ _c3

float ARDOUR::LUFSMeter::_c3
private

Definition at line 67 of file lufs_meter.h.

◆ _c4

float ARDOUR::LUFSMeter::_c4
private

Definition at line 67 of file lufs_meter.h.

◆ _dbtp

float ARDOUR::LUFSMeter::_dbtp
private

Definition at line 82 of file lufs_meter.h.

◆ _frag_pos

uint32_t ARDOUR::LUFSMeter::_frag_pos
private

Definition at line 70 of file lufs_meter.h.

◆ _frag_pwr

float ARDOUR::LUFSMeter::_frag_pwr
private

Definition at line 71 of file lufs_meter.h.

◆ _fst

FilterState ARDOUR::LUFSMeter::_fst[5]
private

Definition at line 99 of file lufs_meter.h.

◆ _g

const float ARDOUR::LUFSMeter::_g[5] = { 1.0, 1.0, 1.0, 1.41, 1.41 }
private

Definition at line 57 of file lufs_meter.h.

◆ _hist

History ARDOUR::LUFSMeter::_hist
private

Definition at line 90 of file lufs_meter.h.

◆ _integrated

float ARDOUR::LUFSMeter::_integrated
private

Definition at line 81 of file lufs_meter.h.

◆ _maxloudn_M

float ARDOUR::LUFSMeter::_maxloudn_M
private

Definition at line 80 of file lufs_meter.h.

◆ _momentary_l

float ARDOUR::LUFSMeter::_momentary_l
private

Definition at line 78 of file lufs_meter.h.

◆ _n_channels

uint32_t ARDOUR::LUFSMeter::_n_channels
private

Definition at line 61 of file lufs_meter.h.

◆ _n_fragment

uint32_t ARDOUR::LUFSMeter::_n_fragment
private

Definition at line 62 of file lufs_meter.h.

◆ _pow_idx

uint32_t ARDOUR::LUFSMeter::_pow_idx
private

Definition at line 75 of file lufs_meter.h.

◆ _power

float ARDOUR::LUFSMeter::_power[8]
private

Definition at line 74 of file lufs_meter.h.

◆ _samplerate

double ARDOUR::LUFSMeter::_samplerate
private

Definition at line 60 of file lufs_meter.h.

◆ _thresh_rel

float ARDOUR::LUFSMeter::_thresh_rel
private

Definition at line 76 of file lufs_meter.h.

◆ _z

float* ARDOUR::LUFSMeter::_z[5]
private

Definition at line 100 of file lufs_meter.h.

◆ upsample

std::function< float(int, const float) > ARDOUR::LUFSMeter::upsample
private

Definition at line 55 of file lufs_meter.h.


The documentation for this class was generated from the following file: