MythTV  master
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Friends | List of all members
decoder_impl Class Reference

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)
 
double get_yfs (double ampDiff, double phaseDiff)
 
double get_xfs (double ampDiff, double yfs)
 
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)
 

Private Attributes

unsigned int N
 
unsigned int halfN
 
FFTContext * fftContextForward
 
FFTContext * fftContextReverse
 
FFTSample * lt
 
FFTSample * rt
 
FFTComplexArraydftL
 
FFTComplexArraydftR
 
FFTComplexArraysrc
 
std::vector< cfloatfrontL
 
std::vector< cfloatfrontR
 
std::vector< cfloatavg
 
std::vector< cfloatsurL
 
std::vector< cfloatsurR
 
std::vector< cfloattrueavg
 
std::vector< float > xfs
 
std::vector< float > yfs
 
std::vector< float > wnd
 
std::vector< float > filter [6]
 
std::vector< float > inbuf [2]
 
std::vector< float > outbuf [6]
 
float surround_high
 
float surround_low
 
float surround_balance
 
float surround_level
 
float phase_offsetL
 
float phase_offsetR
 
float front_separation
 
float rear_separation
 
bool linear_steering
 
cfloat A
 
cfloat B
 
cfloat C
 
cfloat D
 
cfloat E
 
cfloat F
 
cfloat G
 
cfloat H
 
int current_buf
 
float * inbufs [2]
 
float * 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)
inline

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 168 of file el_processor.cpp.

Referenced by fsurround_decoder::flush().

◆ sample_rate()

void decoder_impl::sample_rate ( unsigned int  srate)
inline

Definition at line 178 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 190 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 203 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 210 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 213 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 220 of file el_processor.cpp.

Referenced by block_decode().

◆ phase()

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

Definition at line 221 of file el_processor.cpp.

Referenced by block_decode().

◆ polar()

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

Definition at line 222 of file el_processor.cpp.

Referenced by block_decode().

◆ sqr()

static float decoder_impl::sqr ( float  x)
inlinestaticprivate

Definition at line 223 of file el_processor.cpp.

Referenced by get_yfs().

◆ min()

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

Definition at line 225 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 226 of file el_processor.cpp.

Referenced by block_decode(), and clamp().

◆ clamp()

static float decoder_impl::clamp ( float  x)
inlinestaticprivate

Definition at line 227 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 230 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 237 of file el_processor.cpp.

Referenced by add_output().

◆ get_yfs()

double decoder_impl::get_yfs ( double  ampDiff,
double  phaseDiff 
)
inlineprivate

Definition at line 381 of file el_processor.cpp.

Referenced by block_decode().

◆ get_xfs()

double decoder_impl::get_xfs ( double  ampDiff,
double  yfs 
)
inlineprivate

Definition at line 394 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 428 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 484 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 503 of file el_processor.cpp.

Friends And Related Function Documentation

◆ fsurround_decoder

friend class fsurround_decoder
friend

Definition at line 553 of file el_processor.cpp.

Member Data Documentation

◆ N

unsigned int decoder_impl::N
private

Definition at line 520 of file el_processor.cpp.

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

◆ halfN

unsigned int decoder_impl::halfN
private

◆ fftContextForward

FFTContext* decoder_impl::fftContextForward
private

Definition at line 528 of file el_processor.cpp.

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

◆ fftContextReverse

FFTContext * decoder_impl::fftContextReverse
private

Definition at line 528 of file el_processor.cpp.

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

◆ lt

FFTSample* decoder_impl::lt
private

Definition at line 529 of file el_processor.cpp.

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

◆ rt

FFTSample * decoder_impl::rt
private

Definition at line 529 of file el_processor.cpp.

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

◆ dftL

FFTComplexArray* decoder_impl::dftL
private

Definition at line 530 of file el_processor.cpp.

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

◆ dftR

FFTComplexArray * decoder_impl::dftR
private

Definition at line 530 of file el_processor.cpp.

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

◆ src

FFTComplexArray * decoder_impl::src
private

Definition at line 530 of file el_processor.cpp.

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

◆ frontL

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

Definition at line 533 of file el_processor.cpp.

Referenced by block_decode(), and decoder_impl().

◆ frontR

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

Definition at line 533 of file el_processor.cpp.

Referenced by block_decode(), and decoder_impl().

◆ avg

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

Definition at line 533 of file el_processor.cpp.

Referenced by block_decode(), and decoder_impl().

◆ surL

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

Definition at line 533 of file el_processor.cpp.

Referenced by block_decode(), and decoder_impl().

◆ surR

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

Definition at line 533 of file el_processor.cpp.

Referenced by block_decode(), and decoder_impl().

◆ trueavg

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

Definition at line 534 of file el_processor.cpp.

Referenced by block_decode(), and decoder_impl().

◆ xfs

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

Definition at line 535 of file el_processor.cpp.

Referenced by block_decode(), and decoder_impl().

◆ yfs

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

Definition at line 535 of file el_processor.cpp.

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

◆ wnd

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

Definition at line 536 of file el_processor.cpp.

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

◆ filter

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

Definition at line 537 of file el_processor.cpp.

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

◆ inbuf

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

Definition at line 538 of file el_processor.cpp.

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

◆ outbuf

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

Definition at line 539 of file el_processor.cpp.

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

◆ surround_high

float decoder_impl::surround_high
private

Definition at line 541 of file el_processor.cpp.

Referenced by surround_coefficients().

◆ surround_low

float decoder_impl::surround_low
private

Definition at line 541 of file el_processor.cpp.

Referenced by surround_coefficients().

◆ surround_balance

float decoder_impl::surround_balance
private

Definition at line 542 of file el_processor.cpp.

Referenced by block_decode(), and surround_coefficients().

◆ surround_level

float decoder_impl::surround_level
private

Definition at line 543 of file el_processor.cpp.

Referenced by block_decode(), and surround_coefficients().

◆ phase_offsetL

float decoder_impl::phase_offsetL
private

Definition at line 544 of file el_processor.cpp.

Referenced by block_decode(), and phase_mode().

◆ phase_offsetR

float decoder_impl::phase_offsetR
private

Definition at line 544 of file el_processor.cpp.

Referenced by block_decode(), and phase_mode().

◆ front_separation

float decoder_impl::front_separation
private

Definition at line 545 of file el_processor.cpp.

Referenced by block_decode(), and separation().

◆ rear_separation

float decoder_impl::rear_separation
private

Definition at line 546 of file el_processor.cpp.

Referenced by block_decode(), and separation().

◆ linear_steering

bool decoder_impl::linear_steering
private

Definition at line 547 of file el_processor.cpp.

Referenced by block_decode(), and steering_mode().

◆ A

cfloat decoder_impl::A
private

Definition at line 548 of file el_processor.cpp.

Referenced by surround_coefficients().

◆ B

cfloat decoder_impl::B
private

Definition at line 548 of file el_processor.cpp.

Referenced by surround_coefficients().

◆ C

cfloat decoder_impl::C
private

Definition at line 548 of file el_processor.cpp.

Referenced by surround_coefficients().

◆ D

cfloat decoder_impl::D
private

Definition at line 548 of file el_processor.cpp.

Referenced by surround_coefficients().

◆ E

cfloat decoder_impl::E
private

Definition at line 548 of file el_processor.cpp.

Referenced by surround_coefficients().

◆ F

cfloat decoder_impl::F
private

Definition at line 548 of file el_processor.cpp.

Referenced by surround_coefficients().

◆ G

cfloat decoder_impl::G
private

Definition at line 548 of file el_processor.cpp.

Referenced by surround_coefficients().

◆ H

cfloat decoder_impl::H
private

Definition at line 548 of file el_processor.cpp.

Referenced by surround_coefficients().

◆ current_buf

int decoder_impl::current_buf
private

◆ inbufs

float* decoder_impl::inbufs[2]
private

Definition at line 550 of file el_processor.cpp.

Referenced by decoder_impl(), and getInputBuffers().

◆ outbufs

float* decoder_impl::outbufs[6]
private

Definition at line 551 of file el_processor.cpp.

Referenced by decoder_impl(), and getOutputBuffers().


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