FFmpeg
Functions | Variables
ac3dsp.c File Reference
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include "config.h"
#include "libavutil/attributes.h"
#include "libavutil/common.h"
#include "libavutil/intmath.h"
#include "libavutil/mem_internal.h"
#include "ac3defs.h"
#include "ac3dsp.h"
#include "ac3tab.h"
#include "mathops.h"

Go to the source code of this file.

Functions

static void ac3_exponent_min_c (uint8_t *exp, int num_reuse_blocks, int nb_coefs)
 
static void float_to_fixed24_c (int32_t *dst, const float *src, size_t len)
 
static void ac3_bit_alloc_calc_bap_c (int16_t *mask, int16_t *psd, int start, int end, int snr_offset, int floor, const uint8_t *bap_tab, uint8_t *bap)
 
static void ac3_update_bap_counts_c (uint16_t mant_cnt[16], uint8_t *bap, int len)
 
static int ac3_compute_mantissa_size_c (uint16_t mant_cnt[6][16])
 
static void ac3_extract_exponents_c (uint8_t *exp, int32_t *coef, int nb_coefs)
 
static void ac3_sum_square_butterfly_int32_c (int64_t sum[4], const int32_t *coef0, const int32_t *coef1, int len)
 
static void ac3_sum_square_butterfly_float_c (float sum[4], const float *coef0, const float *coef1, int len)
 
static void ac3_downmix_5_to_2_symmetric_c (float **samples, float **matrix, int len)
 
static void ac3_downmix_5_to_1_symmetric_c (float **samples, float **matrix, int len)
 
static void ac3_downmix_c (float **samples, float **matrix, int out_ch, int in_ch, int len)
 
static void ac3_downmix_5_to_2_symmetric_c_fixed (int32_t **samples, int16_t **matrix, int len)
 
static void ac3_downmix_5_to_1_symmetric_c_fixed (int32_t **samples, int16_t **matrix, int len)
 
static void ac3_downmix_c_fixed (int32_t **samples, int16_t **matrix, int out_ch, int in_ch, int len)
 
void ff_ac3dsp_downmix_fixed (AC3DSPContext *c, int32_t **samples, int16_t **matrix, int out_ch, int in_ch, int len)
 
void ff_ac3dsp_downmix (AC3DSPContext *c, float **samples, float **matrix, int out_ch, int in_ch, int len)
 
av_cold void ff_ac3dsp_init (AC3DSPContext *c)
 

Variables

const uint16_t ff_ac3_bap_bits [16]
 Number of mantissa bits written for each bap value. More...
 

Function Documentation

◆ ac3_exponent_min_c()

static void ac3_exponent_min_c ( uint8_t *  exp,
int  num_reuse_blocks,
int  nb_coefs 
)
static

Definition at line 37 of file ac3dsp.c.

Referenced by ff_ac3dsp_init().

◆ float_to_fixed24_c()

static void float_to_fixed24_c ( int32_t dst,
const float src,
size_t  len 
)
static

Definition at line 57 of file ac3dsp.c.

Referenced by ff_ac3dsp_init().

◆ ac3_bit_alloc_calc_bap_c()

static void ac3_bit_alloc_calc_bap_c ( int16_t *  mask,
int16_t *  psd,
int  start,
int  end,
int  snr_offset,
int  floor,
const uint8_t *  bap_tab,
uint8_t *  bap 
)
static

Definition at line 73 of file ac3dsp.c.

Referenced by ff_ac3dsp_init().

◆ ac3_update_bap_counts_c()

static void ac3_update_bap_counts_c ( uint16_t  mant_cnt[16],
uint8_t *  bap,
int  len 
)
static

Definition at line 100 of file ac3dsp.c.

Referenced by ff_ac3dsp_init().

◆ ac3_compute_mantissa_size_c()

static int ac3_compute_mantissa_size_c ( uint16_t  mant_cnt[6][16])
static

Definition at line 111 of file ac3dsp.c.

Referenced by ff_ac3dsp_init().

◆ ac3_extract_exponents_c()

static void ac3_extract_exponents_c ( uint8_t *  exp,
int32_t coef,
int  nb_coefs 
)
static

Definition at line 131 of file ac3dsp.c.

Referenced by ff_ac3dsp_init().

◆ ac3_sum_square_butterfly_int32_c()

static void ac3_sum_square_butterfly_int32_c ( int64_t  sum[4],
const int32_t coef0,
const int32_t coef1,
int  len 
)
static

Definition at line 141 of file ac3dsp.c.

Referenced by ff_ac3dsp_init().

◆ ac3_sum_square_butterfly_float_c()

static void ac3_sum_square_butterfly_float_c ( float  sum[4],
const float coef0,
const float coef1,
int  len 
)
static

Definition at line 162 of file ac3dsp.c.

Referenced by ff_ac3dsp_init().

◆ ac3_downmix_5_to_2_symmetric_c()

static void ac3_downmix_5_to_2_symmetric_c ( float **  samples,
float **  matrix,
int  len 
)
static

Definition at line 183 of file ac3dsp.c.

Referenced by ff_ac3dsp_downmix().

◆ ac3_downmix_5_to_1_symmetric_c()

static void ac3_downmix_5_to_1_symmetric_c ( float **  samples,
float **  matrix,
int  len 
)
static

Definition at line 206 of file ac3dsp.c.

Referenced by ff_ac3dsp_downmix().

◆ ac3_downmix_c()

static void ac3_downmix_c ( float **  samples,
float **  matrix,
int  out_ch,
int  in_ch,
int  len 
)
static

Definition at line 223 of file ac3dsp.c.

Referenced by ff_ac3dsp_downmix().

◆ ac3_downmix_5_to_2_symmetric_c_fixed()

static void ac3_downmix_5_to_2_symmetric_c_fixed ( int32_t **  samples,
int16_t **  matrix,
int  len 
)
static

Definition at line 249 of file ac3dsp.c.

Referenced by ff_ac3dsp_downmix_fixed().

◆ ac3_downmix_5_to_1_symmetric_c_fixed()

static void ac3_downmix_5_to_1_symmetric_c_fixed ( int32_t **  samples,
int16_t **  matrix,
int  len 
)
static

Definition at line 272 of file ac3dsp.c.

Referenced by ff_ac3dsp_downmix_fixed().

◆ ac3_downmix_c_fixed()

static void ac3_downmix_c_fixed ( int32_t **  samples,
int16_t **  matrix,
int  out_ch,
int  in_ch,
int  len 
)
static

Definition at line 292 of file ac3dsp.c.

Referenced by ff_ac3dsp_downmix_fixed().

◆ ff_ac3dsp_downmix_fixed()

void ff_ac3dsp_downmix_fixed ( AC3DSPContext c,
int32_t **  samples,
int16_t **  matrix,
int  out_ch,
int  in_ch,
int  len 
)

Definition at line 317 of file ac3dsp.c.

◆ ff_ac3dsp_downmix()

void ff_ac3dsp_downmix ( AC3DSPContext c,
float **  samples,
float **  matrix,
int  out_ch,
int  in_ch,
int  len 
)

Definition at line 344 of file ac3dsp.c.

Referenced by decode_audio_block().

◆ ff_ac3dsp_init()

av_cold void ff_ac3dsp_init ( AC3DSPContext c)

Definition at line 377 of file ac3dsp.c.

Referenced by ac3_decode_init(), checkasm_check_ac3dsp(), and ff_ac3_encode_init().

Variable Documentation

◆ ff_ac3_bap_bits

const uint16_t ff_ac3_bap_bits[16]
Initial value:
= {
0, 0, 0, 3, 0, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 16
}

Number of mantissa bits written for each bap value.

bap values with fractional bits are set to 0 and are calculated separately.

Definition at line 107 of file ac3dsp.c.

Referenced by ac3_compute_mantissa_size_c().