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

Public Member Functions

 decoder_impl (unsigned blocksize=8192)
 
 ~decoder_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 (float *input1[2], float *input2[2], float center_width, float dimension, float adaption_rate, bool=false)
 
void block_decode (float *input1[2], float *input2[2], float *output[6], float center_width, float dimension, float adaption_rate)
 
void apply_filter (cfloat *signal, const float *flt, float *target)
 
void ff_fft_permuteRC (FFTContext *s, FFTSample *r, FFTComplex *z)
 
void ff_fft_permuteCR (FFTContext *s, FFTComplex *z, FFTSample *r)
 

Static Private Member Functions

static float amplitude (const float cf[2])
 
static float phase (const float cf[2])
 
static cfloat polar (float a, float p)
 
static float sqr (float x)
 
static float min (float a, float b)
 
static float max (float a, float b)
 
static float clamp (float x)
 
static double get_yfs (double ampDiff, double phaseDiff)
 
static double get_xfs (double ampDiff, double yfs)
 

Private Attributes

unsigned int m_n
 
unsigned int m_halfN
 
FFTContext * m_fftContextForward
 
FFTContext * m_fftContextReverse
 
FFTSample * m_lt
 
FFTSample * m_rt
 
FFTComplexArraym_dftL
 
FFTComplexArraym_dftR
 
FFTComplexArraym_src
 
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::vector< float > m_filter [6]
 
std::vector< float > m_inbuf [2]
 
std::vector< float > m_outbuf [6]
 
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
 
float * m_inbufs [2] {}
 
float * m_outbufs [6] {}
 

Friends

class fsurround_decoder
 

Detailed Description

Definition at line 47 of file el_processor.cpp.

Constructor & Destructor Documentation

◆ decoder_impl()

decoder_impl::decoder_impl ( unsigned  blocksize = 8192)
inlineexplicit

Definition at line 51 of file el_processor.cpp.

◆ ~decoder_impl()

decoder_impl::~decoder_impl ( )
inline

Definition at line 108 of file el_processor.cpp.

Member Function Documentation

◆ getInputBuffers()

float** decoder_impl::getInputBuffers ( )
inline

Definition at line 133 of file el_processor.cpp.

Referenced by fsurround_decoder::getInputBuffers().

◆ getOutputBuffers()

float** decoder_impl::getOutputBuffers ( )
inline

Definition at line 140 of file el_processor.cpp.

Referenced by fsurround_decoder::getOutputBuffers().

◆ decode()

void decoder_impl::decode ( float  center_width,
float  dimension,
float  adaption_rate 
)
inline

Definition at line 155 of file el_processor.cpp.

Referenced by fsurround_decoder::decode().

◆ flush()

void decoder_impl::flush ( )
inline

Definition at line 167 of file el_processor.cpp.

Referenced by fsurround_decoder::flush().

◆ sample_rate()

void decoder_impl::sample_rate ( unsigned int  srate)
inline

Definition at line 177 of file el_processor.cpp.

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

◆ surround_coefficients()

void decoder_impl::surround_coefficients ( float  a,
float  b 
)
inline

Definition at line 189 of file el_processor.cpp.

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

◆ phase_mode()

void decoder_impl::phase_mode ( unsigned  mode)
inline

Definition at line 206 of file el_processor.cpp.

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

◆ steering_mode()

void decoder_impl::steering_mode ( bool  mode)
inline

Definition at line 213 of file el_processor.cpp.

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

◆ separation()

void decoder_impl::separation ( float  front,
float  rear 
)
inline

Definition at line 216 of file el_processor.cpp.

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

◆ amplitude()

static float decoder_impl::amplitude ( const float  cf[2])
inlinestaticprivate

Definition at line 223 of file el_processor.cpp.

Referenced by block_decode().

◆ phase()

static float decoder_impl::phase ( const float  cf[2])
inlinestaticprivate

Definition at line 224 of file el_processor.cpp.

Referenced by block_decode().

◆ polar()

static cfloat decoder_impl::polar ( float  a,
float  p 
)
inlinestaticprivate

Definition at line 225 of file el_processor.cpp.

Referenced by block_decode().

◆ sqr()

static float decoder_impl::sqr ( float  x)
inlinestaticprivate

Definition at line 226 of file el_processor.cpp.

Referenced by get_yfs().

◆ min()

static float decoder_impl::min ( float  a,
float  b 
)
inlinestaticprivate

Definition at line 228 of file el_processor.cpp.

Referenced by block_decode(), and clamp().

◆ max()

static float decoder_impl::max ( float  a,
float  b 
)
inlinestaticprivate

Definition at line 229 of file el_processor.cpp.

Referenced by block_decode(), and clamp().

◆ clamp()

static float decoder_impl::clamp ( float  x)
inlinestaticprivate

Definition at line 230 of file el_processor.cpp.

Referenced by block_decode().

◆ add_output()

void decoder_impl::add_output ( float *  input1[2],
float *  input2[2],
float  center_width,
float  dimension,
float  adaption_rate,
bool  = false 
)
inlineprivate

Definition at line 233 of file el_processor.cpp.

Referenced by decode().

◆ block_decode()

void decoder_impl::block_decode ( float *  input1[2],
float *  input2[2],
float *  output[6],
float  center_width,
float  dimension,
float  adaption_rate 
)
inlineprivate

Definition at line 240 of file el_processor.cpp.

Referenced by add_output().

◆ get_yfs()

static double decoder_impl::get_yfs ( double  ampDiff,
double  phaseDiff 
)
inlinestaticprivate

Definition at line 390 of file el_processor.cpp.

Referenced by block_decode().

◆ get_xfs()

static double decoder_impl::get_xfs ( double  ampDiff,
double  yfs 
)
inlinestaticprivate

Definition at line 403 of file el_processor.cpp.

Referenced by block_decode().

◆ apply_filter()

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

Definition at line 438 of file el_processor.cpp.

Referenced by block_decode().

◆ ff_fft_permuteRC()

void decoder_impl::ff_fft_permuteRC ( FFTContext *  s,
FFTSample *  r,
FFTComplex *  z 
)
inlineprivate
  • Do the permutation needed BEFORE calling ff_fft_calc() special for freesurround that also copies

Definition at line 493 of file el_processor.cpp.

Referenced by block_decode().

◆ ff_fft_permuteCR()

void decoder_impl::ff_fft_permuteCR ( FFTContext *  s,
FFTComplex *  z,
FFTSample *  r 
)
inlineprivate
  • Do the permutation needed BEFORE calling ff_fft_calc() special for freesurround that also copies and discards im component as it should be 0

Definition at line 512 of file el_processor.cpp.

Friends And Related Function Documentation

◆ fsurround_decoder

friend class fsurround_decoder
friend

Definition at line 564 of file el_processor.cpp.

Member Data Documentation

◆ m_n

unsigned int decoder_impl::m_n
private

Definition at line 529 of file el_processor.cpp.

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

◆ m_halfN

unsigned int decoder_impl::m_halfN
private

◆ m_fftContextForward

FFTContext* decoder_impl::m_fftContextForward
private

Definition at line 537 of file el_processor.cpp.

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

◆ m_fftContextReverse

FFTContext * decoder_impl::m_fftContextReverse
private

Definition at line 537 of file el_processor.cpp.

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

◆ m_lt

FFTSample* decoder_impl::m_lt
private

Definition at line 538 of file el_processor.cpp.

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

◆ m_rt

FFTSample * decoder_impl::m_rt
private

Definition at line 538 of file el_processor.cpp.

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

◆ m_dftL

FFTComplexArray* decoder_impl::m_dftL
private

Definition at line 539 of file el_processor.cpp.

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

◆ m_dftR

FFTComplexArray * decoder_impl::m_dftR
private

Definition at line 539 of file el_processor.cpp.

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

◆ m_src

FFTComplexArray * decoder_impl::m_src
private

Definition at line 539 of file el_processor.cpp.

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

◆ m_frontL

std::vector<cfloat> decoder_impl::m_frontL
private

Definition at line 542 of file el_processor.cpp.

Referenced by block_decode(), and decoder_impl().

◆ m_frontR

std::vector<cfloat> decoder_impl::m_frontR
private

Definition at line 542 of file el_processor.cpp.

Referenced by block_decode(), and decoder_impl().

◆ m_avg

std::vector<cfloat> decoder_impl::m_avg
private

Definition at line 542 of file el_processor.cpp.

Referenced by block_decode(), and decoder_impl().

◆ m_surL

std::vector<cfloat> decoder_impl::m_surL
private

Definition at line 542 of file el_processor.cpp.

Referenced by block_decode(), and decoder_impl().

◆ m_surR

std::vector<cfloat> decoder_impl::m_surR
private

Definition at line 542 of file el_processor.cpp.

Referenced by block_decode(), and decoder_impl().

◆ m_trueavg

std::vector<cfloat> decoder_impl::m_trueavg
private

Definition at line 543 of file el_processor.cpp.

Referenced by block_decode(), and decoder_impl().

◆ m_xFs

std::vector<float> decoder_impl::m_xFs
private

Definition at line 544 of file el_processor.cpp.

Referenced by block_decode(), and decoder_impl().

◆ m_yFs

std::vector<float> decoder_impl::m_yFs
private

Definition at line 544 of file el_processor.cpp.

Referenced by block_decode(), and decoder_impl().

◆ m_wnd

std::vector<float> decoder_impl::m_wnd
private

Definition at line 545 of file el_processor.cpp.

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

◆ m_filter

std::vector<float> decoder_impl::m_filter[6]
private

Definition at line 546 of file el_processor.cpp.

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

◆ m_inbuf

std::vector<float> decoder_impl::m_inbuf[2]
private

Definition at line 547 of file el_processor.cpp.

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

◆ m_outbuf

std::vector<float> decoder_impl::m_outbuf[6]
private

Definition at line 548 of file el_processor.cpp.

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

◆ m_surroundHigh

float decoder_impl::m_surroundHigh {0.0F}
private

Definition at line 550 of file el_processor.cpp.

Referenced by surround_coefficients().

◆ m_surroundLow

float decoder_impl::m_surroundLow {0.0F}
private

Definition at line 551 of file el_processor.cpp.

Referenced by surround_coefficients().

◆ m_surroundBalance

float decoder_impl::m_surroundBalance {0.0F}
private

Definition at line 552 of file el_processor.cpp.

Referenced by block_decode(), and surround_coefficients().

◆ m_surroundLevel

float decoder_impl::m_surroundLevel {0.0F}
private

Definition at line 553 of file el_processor.cpp.

Referenced by block_decode(), and surround_coefficients().

◆ m_phaseOffsetL

float decoder_impl::m_phaseOffsetL {0.0F}
private

Definition at line 554 of file el_processor.cpp.

Referenced by block_decode(), and phase_mode().

◆ m_phaseOffsetR

float decoder_impl::m_phaseOffsetR {0.0F}
private

Definition at line 555 of file el_processor.cpp.

Referenced by block_decode(), and phase_mode().

◆ m_frontSeparation

float decoder_impl::m_frontSeparation {0.0F}
private

Definition at line 556 of file el_processor.cpp.

Referenced by block_decode(), and separation().

◆ m_rearSeparation

float decoder_impl::m_rearSeparation {0.0F}
private

Definition at line 557 of file el_processor.cpp.

Referenced by block_decode(), and separation().

◆ m_linearSteering

bool decoder_impl::m_linearSteering {false}
private

Definition at line 558 of file el_processor.cpp.

Referenced by block_decode(), and steering_mode().

◆ m_a

cfloat decoder_impl::m_a
private

Definition at line 559 of file el_processor.cpp.

Referenced by surround_coefficients().

◆ m_b

cfloat decoder_impl::m_b
private

Definition at line 559 of file el_processor.cpp.

Referenced by surround_coefficients().

◆ m_c

cfloat decoder_impl::m_c
private

Definition at line 559 of file el_processor.cpp.

Referenced by surround_coefficients().

◆ m_d

cfloat decoder_impl::m_d
private

Definition at line 559 of file el_processor.cpp.

Referenced by surround_coefficients().

◆ m_e

cfloat decoder_impl::m_e
private

Definition at line 559 of file el_processor.cpp.

Referenced by surround_coefficients().

◆ m_f

cfloat decoder_impl::m_f
private

Definition at line 559 of file el_processor.cpp.

Referenced by surround_coefficients().

◆ m_g

cfloat decoder_impl::m_g
private

Definition at line 559 of file el_processor.cpp.

Referenced by surround_coefficients().

◆ m_h

cfloat decoder_impl::m_h
private

Definition at line 559 of file el_processor.cpp.

Referenced by surround_coefficients().

◆ m_currentBuf

int decoder_impl::m_currentBuf
private

◆ m_inbufs

float* decoder_impl::m_inbufs[2] {}
private

Definition at line 561 of file el_processor.cpp.

Referenced by decoder_impl(), and getInputBuffers().

◆ m_outbufs

float* decoder_impl::m_outbufs[6] {}
private

Definition at line 562 of file el_processor.cpp.

Referenced by decoder_impl(), and getOutputBuffers().


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