FFmpeg
Functions | Variables
aacdec_usac_mps212.c File Reference
#include "aacdec_tab.h"
#include "libavcodec/get_bits.h"
#include "libavutil/macros.h"
#include "libavutil/avassert.h"
#include "aacdec_usac_mps212.h"

Go to the source code of this file.

Functions

static int huff_dec_1D (GetBitContext *gb, const int16_t(*tab)[2])
 
static int huff_dec_2D (GetBitContext *gb, const int16_t(*tab)[2], int16_t ret[2])
 
static int huff_data_1d (GetBitContext *gb, int16_t *data, int data_bands, enum AACMPSDataType data_type, int diff_freq, int p0_flag)
 
static void symmetry_data (GetBitContext *gb, int16_t data[2], uint8_t lav, enum AACMPSDataType data_type)
 
static int mps_log2 (int s)
 
static void pcm_decode (GetBitContext *gb, int16_t *data0, int16_t *data1, int16_t offset, int nb_pcm_data_bands, int nb_quant_steps, int nb_levels)
 
static void huff_data_2d (GetBitContext *gb, int16_t *part0_data[2], int16_t(*data)[2], int data_bands, int stride, enum AACMPSDataType data_type, int diff_freq, int freq_pair)
 
static int huff_decode (GetBitContext *gb, int16_t *data[2], enum AACMPSDataType data_type, int diff_freq[2], int num_val, int *time_pair)
 
static void diff_freq_decode (const int16_t *diff, int16_t *out, int nb_val)
 
static void diff_time_decode_backwards (const int16_t *prev, const int16_t *diff, int16_t *out, const int mixed_diff_type, const int nb_val)
 
static void diff_time_decode_forwards (const int16_t *prev, const int16_t *diff, int16_t *out, const int mixed_diff_type, const int nb_val)
 
static void attach_lsb (GetBitContext *gb, int16_t *data_msb, int offset, int nb_lsb, int nb_val, int16_t *data)
 
static int ec_pair_dec (GetBitContext *gb, int16_t set1[MPS_MAX_PARAM_BANDS], int16_t set2[MPS_MAX_PARAM_BANDS], int16_t *last, enum AACMPSDataType data_type, int start_band, int nb_bands, int pair, int coarse, int diff_time_back)
 
static void coarse_to_fine (int16_t *data, enum AACMPSDataType data_type, int start_band, int end_band)
 
static void fine_to_coarse (int16_t *data, enum AACMPSDataType data_type, int start_band, int end_band)
 
static int get_freq_strides (int16_t *freq_strides, int band_stride, int start_band, int end_band)
 
int ff_aac_ec_data_dec (GetBitContext *gb, AACMPSLosslessData *ld, enum AACMPSDataType data_type, int default_val, int start_band, int end_band, int frame_indep_flag, int indep_flag, int nb_param_sets)
 
int ff_aac_huff_dec_reshape (GetBitContext *gb, int16_t *out_data, int nb_val)
 
static void create_mapping (int map[MPS_MAX_PARAM_BANDS+1], int start_band, int stop_band, int stride)
 
static void map_freq (int16_t *dst, const int16_t *src, int *map, int nb_bands)
 
static int deq_idx (int value, enum AACMPSDataType data_type)
 
int ff_aac_map_index_data (AACMPSLosslessData *ld, enum AACMPSDataType data_type, int dst_idx[MPS_MAX_PARAM_SETS][MPS_MAX_PARAM_BANDS], int default_value, int start_band, int stop_band, int nb_param_sets, const int *param_set_idx, int extend_frame)
 

Variables

static const int stride_table [4] = { 1, 2, 5, 28 }
 

Function Documentation

◆ huff_dec_1D()

static int huff_dec_1D ( GetBitContext gb,
const int16_t(*)  tab[2] 
)
static

Definition at line 28 of file aacdec_usac_mps212.c.

Referenced by huff_data_1d(), huff_data_2d(), and huff_dec_2D().

◆ huff_dec_2D()

static int huff_dec_2D ( GetBitContext gb,
const int16_t(*)  tab[2],
int16_t  ret[2] 
)
static

Definition at line 38 of file aacdec_usac_mps212.c.

Referenced by ff_aac_huff_dec_reshape(), and huff_data_2d().

◆ huff_data_1d()

static int huff_data_1d ( GetBitContext gb,
int16_t *  data,
int  data_bands,
enum AACMPSDataType  data_type,
int  diff_freq,
int  p0_flag 
)
static

Definition at line 53 of file aacdec_usac_mps212.c.

Referenced by huff_decode().

◆ symmetry_data()

static void symmetry_data ( GetBitContext gb,
int16_t  data[2],
uint8_t  lav,
enum AACMPSDataType  data_type 
)
static

Definition at line 91 of file aacdec_usac_mps212.c.

Referenced by huff_data_2d().

◆ mps_log2()

static int mps_log2 ( int  s)
static

Definition at line 118 of file aacdec_usac_mps212.c.

Referenced by pcm_decode().

◆ pcm_decode()

static void pcm_decode ( GetBitContext gb,
int16_t *  data0,
int16_t *  data1,
int16_t  offset,
int  nb_pcm_data_bands,
int  nb_quant_steps,
int  nb_levels 
)
static

Definition at line 129 of file aacdec_usac_mps212.c.

Referenced by ec_pair_dec(), and huff_data_2d().

◆ huff_data_2d()

static void huff_data_2d ( GetBitContext gb,
int16_t *  part0_data[2],
int16_t(*)  data[2],
int  data_bands,
int  stride,
enum AACMPSDataType  data_type,
int  diff_freq,
int  freq_pair 
)
static

Definition at line 181 of file aacdec_usac_mps212.c.

Referenced by huff_decode().

◆ huff_decode()

static int huff_decode ( GetBitContext gb,
int16_t *  data[2],
enum AACMPSDataType  data_type,
int  diff_freq[2],
int  num_val,
int *  time_pair 
)
static

Definition at line 248 of file aacdec_usac_mps212.c.

Referenced by ec_pair_dec().

◆ diff_freq_decode()

static void diff_freq_decode ( const int16_t *  diff,
int16_t *  out,
int  nb_val 
)
static

Definition at line 342 of file aacdec_usac_mps212.c.

Referenced by ec_pair_dec().

◆ diff_time_decode_backwards()

static void diff_time_decode_backwards ( const int16_t *  prev,
const int16_t *  diff,
int16_t *  out,
const int  mixed_diff_type,
const int  nb_val 
)
static

Definition at line 350 of file aacdec_usac_mps212.c.

Referenced by ec_pair_dec().

◆ diff_time_decode_forwards()

static void diff_time_decode_forwards ( const int16_t *  prev,
const int16_t *  diff,
int16_t *  out,
const int  mixed_diff_type,
const int  nb_val 
)
static

Definition at line 360 of file aacdec_usac_mps212.c.

Referenced by ec_pair_dec().

◆ attach_lsb()

static void attach_lsb ( GetBitContext gb,
int16_t *  data_msb,
int  offset,
int  nb_lsb,
int  nb_val,
int16_t *  data 
)
static

Definition at line 370 of file aacdec_usac_mps212.c.

Referenced by ec_pair_dec().

◆ ec_pair_dec()

static int ec_pair_dec ( GetBitContext gb,
int16_t  set1[MPS_MAX_PARAM_BANDS],
int16_t  set2[MPS_MAX_PARAM_BANDS],
int16_t *  last,
enum AACMPSDataType  data_type,
int  start_band,
int  nb_bands,
int  pair,
int  coarse,
int  diff_time_back 
)
static

Definition at line 385 of file aacdec_usac_mps212.c.

Referenced by ff_aac_ec_data_dec().

◆ coarse_to_fine()

static void coarse_to_fine ( int16_t *  data,
enum AACMPSDataType  data_type,
int  start_band,
int  end_band 
)
static

Definition at line 550 of file aacdec_usac_mps212.c.

Referenced by ff_aac_ec_data_dec(), and ff_aac_map_index_data().

◆ fine_to_coarse()

static void fine_to_coarse ( int16_t *  data,
enum AACMPSDataType  data_type,
int  start_band,
int  end_band 
)
static

Definition at line 565 of file aacdec_usac_mps212.c.

Referenced by ff_aac_ec_data_dec().

◆ get_freq_strides()

static int get_freq_strides ( int16_t *  freq_strides,
int  band_stride,
int  start_band,
int  end_band 
)
static

Definition at line 576 of file aacdec_usac_mps212.c.

Referenced by ff_aac_ec_data_dec().

◆ ff_aac_ec_data_dec()

int ff_aac_ec_data_dec ( GetBitContext gb,
AACMPSLosslessData ld,
enum AACMPSDataType  data_type,
int  default_val,
int  start_band,
int  end_band,
int  frame_indep_flag,
int  indep_flag,
int  nb_param_sets 
)

Definition at line 599 of file aacdec_usac_mps212.c.

Referenced by parse_mps212().

◆ ff_aac_huff_dec_reshape()

int ff_aac_huff_dec_reshape ( GetBitContext gb,
int16_t *  out_data,
int  nb_val 
)

Definition at line 686 of file aacdec_usac_mps212.c.

Referenced by parse_mps212().

◆ create_mapping()

static void create_mapping ( int  map[MPS_MAX_PARAM_BANDS+1],
int  start_band,
int  stop_band,
int  stride 
)
static

Definition at line 707 of file aacdec_usac_mps212.c.

Referenced by ff_aac_map_index_data().

◆ map_freq()

static void map_freq ( int16_t *  dst,
const int16_t *  src,
int *  map,
int  nb_bands 
)
static

Definition at line 749 of file aacdec_usac_mps212.c.

Referenced by ff_aac_map_index_data().

◆ deq_idx()

static int deq_idx ( int  value,
enum AACMPSDataType  data_type 
)
static

Definition at line 762 of file aacdec_usac_mps212.c.

Referenced by ff_aac_map_index_data().

◆ ff_aac_map_index_data()

int ff_aac_map_index_data ( AACMPSLosslessData ld,
enum AACMPSDataType  data_type,
int  dst_idx[MPS_MAX_PARAM_SETS][MPS_MAX_PARAM_BANDS],
int  default_value,
int  start_band,
int  stop_band,
int  nb_param_sets,
const int *  param_set_idx,
int  extend_frame 
)

Definition at line 786 of file aacdec_usac_mps212.c.

Referenced by parse_mps212().

Variable Documentation

◆ stride_table

const int stride_table[4] = { 1, 2, 5, 28 }
static

Definition at line 597 of file aacdec_usac_mps212.c.

Referenced by ff_aac_ec_data_dec(), and ff_aac_map_index_data().