MythTV  master
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
fsurround_decoder::Impl Class Reference
Collaboration diagram for fsurround_decoder::Impl:
Collaboration graph
[legend]

Public Member Functions

 Impl (unsigned blocksize=8192)
 
 ~Impl ()
 
float ** getInputBuffers ()
 
float ** getOutputBuffers ()
 
void decode (float center_width, float dimension, float adaption_rate)
 
void flush ()
 
void sample_rate (unsigned int srate)
 
void surround_coefficients (float a, float b)
 
void phase_mode (unsigned mode)
 
void steering_mode (bool mode)
 
void separation (float front, float rear)
 

Private Member Functions

void add_output (InputBufs input1, InputBufs input2, float center_width, float dimension, float adaption_rate, bool=false)
 
void block_decode (InputBufs input1, InputBufs input2, OutputBufs output, float center_width, float dimension, float adaption_rate)
 
void apply_filter (cfloat *signal, const float *flt, float *target)
 Filter the complex source signal in the frequency domain and add it to the time domain target signal. More...
 

Static Private Member Functions

static cfloat polar (float a, float p)
 
static float amplitude (FFTComplex z)
 
static float phase (FFTComplex z)
 
static float clamp_unit_mag (float x)
 Clamp the input to the interval [-1, 1], i.e. clamp the magnitude to the unit interval [0, 1]. More...
 
static double get_yfs (double ampDiff, double phaseDiff)
 
static double get_xfs (double ampDiff, double yfs)
 

Private Attributes

size_t m_n
 
size_t m_halfN
 
FFTContext * m_fftContextForward {nullptr}
 
FFTContext * m_fftContextReverse {nullptr}
 
FFTComplex * m_dftL {nullptr}
 
FFTComplex * m_dftR {nullptr}
 
FFTComplex * m_src {nullptr}
 Used only in apply_filter. More...
 
std::vector< cfloatm_frontL
 
std::vector< cfloatm_frontR
 
std::vector< cfloatm_avg
 
std::vector< cfloatm_surL
 
std::vector< cfloatm_surR
 
std::vector< cfloatm_trueavg
 
std::vector< float > m_xFs
 
std::vector< float > m_yFs
 
std::vector< float > m_wnd
 
std::array< std::vector< float >, 6 > m_filter
 
std::array< std::vector< float >, 2 > m_inbuf
 
std::array< std::vector< float >, 6 > m_outbuf
 
float m_surroundHigh {0.0F}
 
float m_surroundLow {0.0F}
 
float m_surroundBalance {0.0F}
 
float m_surroundLevel {0.0F}
 
float m_phaseOffsetL {0.0F}
 
float m_phaseOffsetR {0.0F}
 
float m_frontSeparation {0.0F}
 
float m_rearSeparation {0.0F}
 
bool m_linearSteering {false}
 
cfloat m_a
 
cfloat m_b
 
cfloat m_c
 
cfloat m_d
 
cfloat m_e
 
cfloat m_f
 
cfloat m_g
 
cfloat m_h
 
int m_currentBuf
 
InputBufs m_inbufs {}
 
OutputBufs m_outbufs {}
 

Detailed Description

Definition at line 44 of file el_processor.cpp.

Constructor & Destructor Documentation

◆ Impl()

fsurround_decoder::Impl::Impl ( unsigned  blocksize = 8192)
inlineexplicit

Definition at line 48 of file el_processor.cpp.

◆ ~Impl()

fsurround_decoder::Impl::~Impl ( )
inline

Definition at line 88 of file el_processor.cpp.

Member Function Documentation

◆ getInputBuffers()

float** fsurround_decoder::Impl::getInputBuffers ( )
inline

Definition at line 96 of file el_processor.cpp.

Referenced by fsurround_decoder::getInputBuffers().

◆ getOutputBuffers()

float** fsurround_decoder::Impl::getOutputBuffers ( )
inline

Definition at line 103 of file el_processor.cpp.

Referenced by fsurround_decoder::getOutputBuffers().

◆ decode()

void fsurround_decoder::Impl::decode ( float  center_width,
float  dimension,
float  adaption_rate 
)
inline

Definition at line 118 of file el_processor.cpp.

Referenced by fsurround_decoder::decode().

◆ flush()

void fsurround_decoder::Impl::flush ( )
inline

Definition at line 130 of file el_processor.cpp.

Referenced by fsurround_decoder::flush().

◆ sample_rate()

void fsurround_decoder::Impl::sample_rate ( unsigned int  srate)
inline

Definition at line 140 of file el_processor.cpp.

Referenced by Impl(), and fsurround_decoder::sample_rate().

◆ surround_coefficients()

void fsurround_decoder::Impl::surround_coefficients ( float  a,
float  b 
)
inline

Definition at line 152 of file el_processor.cpp.

Referenced by Impl(), and fsurround_decoder::surround_coefficients().

◆ phase_mode()

void fsurround_decoder::Impl::phase_mode ( unsigned  mode)
inline

Definition at line 169 of file el_processor.cpp.

Referenced by Impl(), and fsurround_decoder::phase_mode().

◆ steering_mode()

void fsurround_decoder::Impl::steering_mode ( bool  mode)
inline

Definition at line 176 of file el_processor.cpp.

Referenced by Impl(), and fsurround_decoder::steering_mode().

◆ separation()

void fsurround_decoder::Impl::separation ( float  front,
float  rear 
)
inline

Definition at line 179 of file el_processor.cpp.

Referenced by Impl(), and fsurround_decoder::separation().

◆ polar()

static cfloat fsurround_decoder::Impl::polar ( float  a,
float  p 
)
inlinestaticprivate

Definition at line 186 of file el_processor.cpp.

Referenced by block_decode().

◆ amplitude()

static float fsurround_decoder::Impl::amplitude ( FFTComplex  z)
inlinestaticprivate

Definition at line 187 of file el_processor.cpp.

Referenced by block_decode().

◆ phase()

static float fsurround_decoder::Impl::phase ( FFTComplex  z)
inlinestaticprivate

Definition at line 188 of file el_processor.cpp.

Referenced by block_decode().

◆ clamp_unit_mag()

static float fsurround_decoder::Impl::clamp_unit_mag ( float  x)
inlinestaticprivate

Clamp the input to the interval [-1, 1], i.e. clamp the magnitude to the unit interval [0, 1].

Definition at line 191 of file el_processor.cpp.

Referenced by block_decode().

◆ add_output()

void fsurround_decoder::Impl::add_output ( InputBufs  input1,
InputBufs  input2,
float  center_width,
float  dimension,
float  adaption_rate,
bool  = false 
)
inlineprivate

Definition at line 194 of file el_processor.cpp.

Referenced by decode().

◆ block_decode()

void fsurround_decoder::Impl::block_decode ( InputBufs  input1,
InputBufs  input2,
OutputBufs  output,
float  center_width,
float  dimension,
float  adaption_rate 
)
inlineprivate

Definition at line 201 of file el_processor.cpp.

Referenced by add_output().

◆ get_yfs()

static double fsurround_decoder::Impl::get_yfs ( double  ampDiff,
double  phaseDiff 
)
inlinestaticprivate

Definition at line 344 of file el_processor.cpp.

Referenced by block_decode().

◆ get_xfs()

static double fsurround_decoder::Impl::get_xfs ( double  ampDiff,
double  yfs 
)
inlinestaticprivate

Definition at line 357 of file el_processor.cpp.

Referenced by block_decode().

◆ apply_filter()

void fsurround_decoder::Impl::apply_filter ( cfloat signal,
const float *  flt,
float *  target 
)
inlineprivate

Filter the complex source signal in the frequency domain and add it to the time domain target signal.

Parameters
[in]signalThe signal, in the frequency domain, to be filtered.
[in]fltThe filter, in the frequency domain, to be applied.
[out]targetThe signal, in the time domain, to which the filtered signal is added

Definition at line 400 of file el_processor.cpp.

Referenced by block_decode().

Member Data Documentation

◆ m_n

size_t fsurround_decoder::Impl::m_n
private

Definition at line 426 of file el_processor.cpp.

Referenced by apply_filter(), flush(), Impl(), and sample_rate().

◆ m_halfN

size_t fsurround_decoder::Impl::m_halfN
private

◆ m_fftContextForward

FFTContext* fsurround_decoder::Impl::m_fftContextForward {nullptr}
private

Definition at line 428 of file el_processor.cpp.

Referenced by block_decode(), Impl(), and ~Impl().

◆ m_fftContextReverse

FFTContext* fsurround_decoder::Impl::m_fftContextReverse {nullptr}
private

Definition at line 429 of file el_processor.cpp.

Referenced by apply_filter(), Impl(), and ~Impl().

◆ m_dftL

FFTComplex* fsurround_decoder::Impl::m_dftL {nullptr}
private

Definition at line 431 of file el_processor.cpp.

Referenced by block_decode(), Impl(), and ~Impl().

◆ m_dftR

FFTComplex* fsurround_decoder::Impl::m_dftR {nullptr}
private

Definition at line 432 of file el_processor.cpp.

Referenced by block_decode(), Impl(), and ~Impl().

◆ m_src

FFTComplex* fsurround_decoder::Impl::m_src {nullptr}
private

Used only in apply_filter.

Definition at line 433 of file el_processor.cpp.

Referenced by apply_filter(), Impl(), and ~Impl().

◆ m_frontL

std::vector<cfloat> fsurround_decoder::Impl::m_frontL
private

Definition at line 435 of file el_processor.cpp.

Referenced by block_decode(), and Impl().

◆ m_frontR

std::vector<cfloat> fsurround_decoder::Impl::m_frontR
private

Definition at line 435 of file el_processor.cpp.

Referenced by block_decode(), and Impl().

◆ m_avg

std::vector<cfloat> fsurround_decoder::Impl::m_avg
private

Definition at line 435 of file el_processor.cpp.

Referenced by block_decode(), and Impl().

◆ m_surL

std::vector<cfloat> fsurround_decoder::Impl::m_surL
private

Definition at line 435 of file el_processor.cpp.

Referenced by block_decode(), and Impl().

◆ m_surR

std::vector<cfloat> fsurround_decoder::Impl::m_surR
private

Definition at line 435 of file el_processor.cpp.

Referenced by block_decode(), and Impl().

◆ m_trueavg

std::vector<cfloat> fsurround_decoder::Impl::m_trueavg
private

Definition at line 436 of file el_processor.cpp.

Referenced by block_decode(), and Impl().

◆ m_xFs

std::vector<float> fsurround_decoder::Impl::m_xFs
private

Definition at line 437 of file el_processor.cpp.

Referenced by block_decode(), and Impl().

◆ m_yFs

std::vector<float> fsurround_decoder::Impl::m_yFs
private

Definition at line 437 of file el_processor.cpp.

Referenced by block_decode(), and Impl().

◆ m_wnd

std::vector<float> fsurround_decoder::Impl::m_wnd
private

Definition at line 438 of file el_processor.cpp.

Referenced by apply_filter(), block_decode(), and Impl().

◆ m_filter

std::array<std::vector<float>,6> fsurround_decoder::Impl::m_filter
private

Definition at line 439 of file el_processor.cpp.

Referenced by block_decode(), Impl(), and sample_rate().

◆ m_inbuf

std::array<std::vector<float>,2> fsurround_decoder::Impl::m_inbuf
private

Definition at line 440 of file el_processor.cpp.

Referenced by decode(), flush(), getInputBuffers(), and Impl().

◆ m_outbuf

std::array<std::vector<float>,6> fsurround_decoder::Impl::m_outbuf
private

Definition at line 441 of file el_processor.cpp.

Referenced by add_output(), flush(), getOutputBuffers(), and Impl().

◆ m_surroundHigh

float fsurround_decoder::Impl::m_surroundHigh {0.0F}
private

Definition at line 443 of file el_processor.cpp.

Referenced by surround_coefficients().

◆ m_surroundLow

float fsurround_decoder::Impl::m_surroundLow {0.0F}
private

Definition at line 444 of file el_processor.cpp.

Referenced by surround_coefficients().

◆ m_surroundBalance

float fsurround_decoder::Impl::m_surroundBalance {0.0F}
private

Definition at line 445 of file el_processor.cpp.

Referenced by block_decode(), and surround_coefficients().

◆ m_surroundLevel

float fsurround_decoder::Impl::m_surroundLevel {0.0F}
private

Definition at line 446 of file el_processor.cpp.

Referenced by block_decode(), and surround_coefficients().

◆ m_phaseOffsetL

float fsurround_decoder::Impl::m_phaseOffsetL {0.0F}
private

Definition at line 447 of file el_processor.cpp.

Referenced by block_decode(), and phase_mode().

◆ m_phaseOffsetR

float fsurround_decoder::Impl::m_phaseOffsetR {0.0F}
private

Definition at line 448 of file el_processor.cpp.

Referenced by block_decode(), and phase_mode().

◆ m_frontSeparation

float fsurround_decoder::Impl::m_frontSeparation {0.0F}
private

Definition at line 449 of file el_processor.cpp.

Referenced by block_decode(), and separation().

◆ m_rearSeparation

float fsurround_decoder::Impl::m_rearSeparation {0.0F}
private

Definition at line 450 of file el_processor.cpp.

Referenced by block_decode(), and separation().

◆ m_linearSteering

bool fsurround_decoder::Impl::m_linearSteering {false}
private

Definition at line 451 of file el_processor.cpp.

Referenced by block_decode(), and steering_mode().

◆ m_a

cfloat fsurround_decoder::Impl::m_a
private

Definition at line 452 of file el_processor.cpp.

Referenced by surround_coefficients().

◆ m_b

cfloat fsurround_decoder::Impl::m_b
private

Definition at line 452 of file el_processor.cpp.

Referenced by surround_coefficients().

◆ m_c

cfloat fsurround_decoder::Impl::m_c
private

Definition at line 452 of file el_processor.cpp.

Referenced by surround_coefficients().

◆ m_d

cfloat fsurround_decoder::Impl::m_d
private

Definition at line 452 of file el_processor.cpp.

Referenced by surround_coefficients().

◆ m_e

cfloat fsurround_decoder::Impl::m_e
private

Definition at line 452 of file el_processor.cpp.

Referenced by surround_coefficients().

◆ m_f

cfloat fsurround_decoder::Impl::m_f
private

Definition at line 452 of file el_processor.cpp.

Referenced by surround_coefficients().

◆ m_g

cfloat fsurround_decoder::Impl::m_g
private

Definition at line 452 of file el_processor.cpp.

Referenced by surround_coefficients().

◆ m_h

cfloat fsurround_decoder::Impl::m_h
private

Definition at line 452 of file el_processor.cpp.

Referenced by surround_coefficients().

◆ m_currentBuf

int fsurround_decoder::Impl::m_currentBuf
private

Definition at line 453 of file el_processor.cpp.

Referenced by apply_filter(), decode(), getInputBuffers(), getOutputBuffers(), and Impl().

◆ m_inbufs

InputBufs fsurround_decoder::Impl::m_inbufs {}
private

Definition at line 454 of file el_processor.cpp.

Referenced by getInputBuffers(), and Impl().

◆ m_outbufs

OutputBufs fsurround_decoder::Impl::m_outbufs {}
private

Definition at line 455 of file el_processor.cpp.

Referenced by getOutputBuffers(), and Impl().


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