libavcodec/aacps.c File Reference

#include <stdint.h>
#include "libavutil/common.h"
#include "libavutil/mathematics.h"
#include "avcodec.h"
#include "get_bits.h"
#include "aacps.h"
#include "aacps_tablegen.h"
#include "aacpsdata.c"

Go to the source code of this file.

Defines

#define PS_BASELINE   0
 Operate in Baseline PS mode.
#define numQMFSlots   32
#define READ_PAR_DATA(PAR, OFFSET, MASK, ERR_CONDITION)
#define DECAY_SLOPE   0.05f
 All-pass filter decay slope.
#define PS_INIT_VLC_STATIC(num, size)
#define PS_VLC_ROW(name)   { name ## _codes, name ## _bits, sizeof(name ## _codes), sizeof(name ## _codes[0]) }

Enumerations

enum  {
  huff_iid_df1, huff_iid_dt1, huff_iid_df0, huff_iid_dt0,
  huff_icc_df, huff_icc_dt, huff_ipd_df, huff_ipd_dt,
  huff_opd_df, huff_opd_dt
}

Functions

static int read_iid_data (AVCodecContext *avctx, GetBitContext *gb, PSContext *ps, int8_t(*iid)[34], int table_idx, int e, int dt)
 \ * Read Inter-channel Intensity Difference/Inter-Channel Coherence/ \ * Inter-channel Phase Difference/Overall Phase Difference parameters from the \ * bitstream.
static int read_icc_data (AVCodecContext *avctx, GetBitContext *gb, PSContext *ps, int8_t(*icc)[34], int table_idx, int e, int dt)
 \ * Read Inter-channel Intensity Difference/Inter-Channel Coherence/ \ * Inter-channel Phase Difference/Overall Phase Difference parameters from the \ * bitstream.
static int read_ipdopd_data (AVCodecContext *avctx, GetBitContext *gb, PSContext *ps, int8_t(*ipdopd)[34], int table_idx, int e, int dt)
 \ * Read Inter-channel Intensity Difference/Inter-Channel Coherence/ \ * Inter-channel Phase Difference/Overall Phase Difference parameters from the \ * bitstream.
static int ps_read_extension_data (GetBitContext *gb, PSContext *ps, int ps_extension_id)
static void ipdopd_reset (int8_t *opd_hist, int8_t *ipd_hist)
int ff_ps_read_data (AVCodecContext *avctx, GetBitContext *gb_host, PSContext *ps, int bits_left)
static void hybrid2_re (float(*in)[2], float(*out)[32][2], const float filter[7], int len, int reverse)
 Split one subband into 2 subsubbands with a symmetric real filter.
static void hybrid6_cx (float(*in)[2], float(*out)[32][2], const float(*filter)[7][2], int len)
 Split one subband into 6 subsubbands with a complex filter.
static void hybrid4_8_12_cx (float(*in)[2], float(*out)[32][2], const float(*filter)[7][2], int N, int len)
static void hybrid_analysis (float out[91][32][2], float in[5][44][2], float L[2][38][64], int is34, int len)
static void hybrid_synthesis (float out[2][38][64], float in[91][32][2], int is34, int len)
static void map_idx_10_to_20 (int8_t *par_mapped, const int8_t *par, int full)
 Table 8.46.
static void map_idx_34_to_20 (int8_t *par_mapped, const int8_t *par, int full)
static void map_val_34_to_20 (float par[PS_MAX_NR_IIDICC])
static void map_idx_10_to_34 (int8_t *par_mapped, const int8_t *par, int full)
static void map_idx_20_to_34 (int8_t *par_mapped, const int8_t *par, int full)
static void map_val_20_to_34 (float par[PS_MAX_NR_IIDICC])
static void decorrelation (PSContext *ps, float(*out)[32][2], const float(*s)[32][2], int is34)
static void remap34 (int8_t(**p_par_mapped)[PS_MAX_NR_IIDICC], int8_t(*par)[PS_MAX_NR_IIDICC], int num_par, int num_env, int full)
static void remap20 (int8_t(**p_par_mapped)[PS_MAX_NR_IIDICC], int8_t(*par)[PS_MAX_NR_IIDICC], int num_par, int num_env, int full)
static void stereo_processing (PSContext *ps, float(*l)[32][2], float(*r)[32][2], int is34)
int ff_ps_apply (AVCodecContext *avctx, PSContext *ps, float L[2][38][64], float R[2][38][64], int top)
av_cold void ff_ps_init (void)
av_cold void ff_ps_ctx_init (PSContext *ps)

Variables

static const int8_t num_env_tab [2][4]
static const int8_t nr_iidicc_par_tab []
static const int8_t nr_iidopd_par_tab []
static const int huff_iid []
static VLC vlc_ps [10]
static const int NR_PAR_BANDS [] = { 20, 34 }
 Number of frequency bands that can be addressed by the parameter index, b(k).
static const int NR_BANDS [] = { 71, 91 }
 Number of frequency bands that can be addressed by the sub subband index, k.
static const int DECAY_CUTOFF [] = { 10, 32 }
 Start frequency band for the all-pass filter decay slope.
static const int NR_ALLPASS_BANDS [] = { 30, 50 }
 Number of all-pass filer bands.
static const int SHORT_DELAY_BAND [] = { 42, 62 }
 First stereo band using the short one sample delay.


Define Documentation

#define DECAY_SLOPE   0.05f

All-pass filter decay slope.

Definition at line 441 of file aacps.c.

#define numQMFSlots   32

Definition at line 35 of file aacps.c.

Referenced by remap34().

#define PS_BASELINE   0

Operate in Baseline PS mode.

Baseline implies 10 or 20 stereo bands, mixing mode A, and no ipd/opd

Definition at line 31 of file aacps.c.

#define PS_INIT_VLC_STATIC ( num,
size   ) 

Value:

INIT_VLC_STATIC(&vlc_ps[num], 9, ps_tmp[num].table_size / ps_tmp[num].elem_size,    \
                    ps_tmp[num].ps_bits, 1, 1,                                          \
                    ps_tmp[num].ps_codes, ps_tmp[num].elem_size, ps_tmp[num].elem_size, \
                    size);

Definition at line 990 of file aacps.c.

#define PS_VLC_ROW ( name   )     { name ## _codes, name ## _bits, sizeof(name ## _codes), sizeof(name ## _codes[0]) }

Definition at line 996 of file aacps.c.

#define READ_PAR_DATA ( PAR,
OFFSET,
MASK,
ERR_CONDITION   ) 

Definition at line 72 of file aacps.c.


Enumeration Type Documentation

anonymous enum

Enumerator:
huff_iid_df1 
huff_iid_dt1 
huff_iid_df0 
huff_iid_dt0 
huff_icc_df 
huff_icc_dt 
huff_ipd_df 
huff_ipd_dt 
huff_opd_df 
huff_opd_dt 

Definition at line 50 of file aacps.c.


Function Documentation

static void decorrelation ( PSContext ps,
float(*)  out[32][2],
const float(*)  s[32][2],
int  is34 
) [static]

< Smoothing coefficient

Definition at line 638 of file aacps.c.

int ff_ps_apply ( AVCodecContext avctx,
PSContext ps,
float  L[2][38][64],
float  R[2][38][64],
int  top 
)

Definition at line 969 of file aacps.c.

Referenced by ff_sbr_apply().

av_cold void ff_ps_ctx_init ( PSContext ps  ) 

Definition at line 1031 of file aacps.c.

Referenced by ff_aac_sbr_ctx_init().

av_cold void ff_ps_init ( void   ) 

Definition at line 999 of file aacps.c.

Referenced by ff_aac_sbr_init().

int ff_ps_read_data ( AVCodecContext avctx,
GetBitContext gb_host,
PSContext ps,
int  bits_left 
)

Definition at line 139 of file aacps.c.

Referenced by read_sbr_extension().

static void hybrid2_re ( float(*)  in[2],
float(*)  out[32][2],
const float  filter[7],
int  len,
int  reverse 
) [static]

Split one subband into 2 subsubbands with a symmetric real filter.

The filter must have its non-center even coefficients equal to zero.

Definition at line 276 of file aacps.c.

static void hybrid4_8_12_cx ( float(*)  in[2],
float(*)  out[32][2],
const float(*)  filter[7][2],
int  N,
int  len 
) [static]

Definition at line 331 of file aacps.c.

static void hybrid6_cx ( float(*)  in[2],
float(*)  out[32][2],
const float(*)  filter[7][2],
int  len 
) [static]

Split one subband into 6 subsubbands with a complex filter.

Definition at line 296 of file aacps.c.

static void hybrid_analysis ( float  out[91][32][2],
float  in[5][44][2],
float  L[2][38][64],
int  is34,
int  len 
) [static]

Definition at line 352 of file aacps.c.

static void hybrid_synthesis ( float  out[2][38][64],
float  in[91][32][2],
int  is34,
int  len 
) [static]

Definition at line 390 of file aacps.c.

static void ipdopd_reset ( int8_t *  opd_hist,
int8_t *  ipd_hist 
) [static]

Definition at line 130 of file aacps.c.

static void map_idx_10_to_20 ( int8_t *  par_mapped,
const int8_t *  par,
int  full 
) [static]

Table 8.46.

Definition at line 454 of file aacps.c.

static void map_idx_10_to_34 ( int8_t *  par_mapped,
const int8_t *  par,
int  full 
) [static]

Definition at line 518 of file aacps.c.

static void map_idx_20_to_34 ( int8_t *  par_mapped,
const int8_t *  par,
int  full 
) [static]

Definition at line 560 of file aacps.c.

static void map_idx_34_to_20 ( int8_t *  par_mapped,
const int8_t *  par,
int  full 
) [static]

Definition at line 468 of file aacps.c.

static void map_val_20_to_34 ( float  par[PS_MAX_NR_IIDICC]  )  [static]

Definition at line 600 of file aacps.c.

static void map_val_34_to_20 ( float  par[PS_MAX_NR_IIDICC]  )  [static]

Definition at line 494 of file aacps.c.

static int ps_read_extension_data ( GetBitContext gb,
PSContext ps,
int  ps_extension_id 
) [static]

Definition at line 109 of file aacps.c.

static int read_icc_data ( AVCodecContext avctx,
GetBitContext gb,
PSContext ps,
int8_t(*)  icc[34],
int  table_idx,
int  e,
int  dt 
) [static]

\ * Read Inter-channel Intensity Difference/Inter-Channel Coherence/ \ * Inter-channel Phase Difference/Overall Phase Difference parameters from the \ * bitstream.

\ * \ *

Parameters:
avctx contains the current codec context \ *
gb pointer to the input bitstream \ *
ps pointer to the Parametric Stereo context \ *
icc pointer to the parameter to be read \ *
e envelope to decode \ *
dt 1: time delta-coded, 0: frequency delta-coded \

Definition at line 106 of file aacps.c.

static int read_iid_data ( AVCodecContext avctx,
GetBitContext gb,
PSContext ps,
int8_t(*)  iid[34],
int  table_idx,
int  e,
int  dt 
) [static]

\ * Read Inter-channel Intensity Difference/Inter-Channel Coherence/ \ * Inter-channel Phase Difference/Overall Phase Difference parameters from the \ * bitstream.

\ * \ *

Parameters:
avctx contains the current codec context \ *
gb pointer to the input bitstream \ *
ps pointer to the Parametric Stereo context \ *
iid pointer to the parameter to be read \ *
e envelope to decode \ *
dt 1: time delta-coded, 0: frequency delta-coded \

Definition at line 105 of file aacps.c.

static int read_ipdopd_data ( AVCodecContext avctx,
GetBitContext gb,
PSContext ps,
int8_t(*)  ipdopd[34],
int  table_idx,
int  e,
int  dt 
) [static]

\ * Read Inter-channel Intensity Difference/Inter-Channel Coherence/ \ * Inter-channel Phase Difference/Overall Phase Difference parameters from the \ * bitstream.

\ * \ *

Parameters:
avctx contains the current codec context \ *
gb pointer to the input bitstream \ *
ps pointer to the Parametric Stereo context \ *
ipdopd pointer to the parameter to be read \ *
e envelope to decode \ *
dt 1: time delta-coded, 0: frequency delta-coded \

Definition at line 107 of file aacps.c.

Referenced by ipdopd_reset().

static void remap20 ( int8_t(**)  p_par_mapped[PS_MAX_NR_IIDICC],
int8_t(*)  par[PS_MAX_NR_IIDICC],
int  num_par,
int  num_env,
int  full 
) [static]

Definition at line 768 of file aacps.c.

static void remap34 ( int8_t(**)  p_par_mapped[PS_MAX_NR_IIDICC],
int8_t(*)  par[PS_MAX_NR_IIDICC],
int  num_par,
int  num_env,
int  full 
) [static]

Definition at line 749 of file aacps.c.

static void stereo_processing ( PSContext ps,
float(*)  l[32][2],
float(*)  r[32][2],
int  is34 
) [static]

Definition at line 787 of file aacps.c.


Variable Documentation

const int DECAY_CUTOFF[] = { 10, 32 } [static]

Start frequency band for the all-pass filter decay slope.

Definition at line 447 of file aacps.c.

const int huff_iid[] [static]

Initial value:

Definition at line 63 of file aacps.c.

const int NR_ALLPASS_BANDS[] = { 30, 50 } [static]

Number of all-pass filer bands.

Definition at line 449 of file aacps.c.

const int NR_BANDS[] = { 71, 91 } [static]

Number of frequency bands that can be addressed by the sub subband index, k.

Definition at line 445 of file aacps.c.

const int8_t nr_iidicc_par_tab[] [static]

Initial value:

 {
    10, 20, 34, 10, 20, 34,
}

Definition at line 42 of file aacps.c.

const int8_t nr_iidopd_par_tab[] [static]

Initial value:

 {
     5, 11, 17,  5, 11, 17,
}

Definition at line 46 of file aacps.c.

const int NR_PAR_BANDS[] = { 20, 34 } [static]

Number of frequency bands that can be addressed by the parameter index, b(k).

Definition at line 443 of file aacps.c.

const int8_t num_env_tab[2][4] [static]

Initial value:

 {
    { 0, 1, 2, 4, },
    { 1, 2, 3, 4, },
}

Definition at line 37 of file aacps.c.

const int SHORT_DELAY_BAND[] = { 42, 62 } [static]

First stereo band using the short one sample delay.

Definition at line 451 of file aacps.c.

VLC vlc_ps[10] [static]

Definition at line 70 of file aacps.c.


Generated on Fri Oct 26 02:46:06 2012 for FFmpeg by  doxygen 1.5.8