Definition in file ac3enc.c.
Go to the source code of this file.
Classes | |
| struct | AC3EncodeContext |
| struct | IComplex |
Functions | |
| static void | fft_init (int ln) |
| static int16_t | fix15 (float a) |
| static void | fft (IComplex *z, int ln) |
| static void | mdct512 (int32_t *out, int16_t *in) |
| static int | calc_exp_diff (uint8_t *exp1, uint8_t *exp2, int n) |
| static void | compute_exp_strategy (uint8_t exp_strategy[NB_BLOCKS][AC3_MAX_CHANNELS], uint8_t exp[NB_BLOCKS][AC3_MAX_CHANNELS][N/2], int ch, int is_lfe) |
| static void | exponent_min (uint8_t exp[N/2], uint8_t exp1[N/2], int n) |
| static int | encode_exp (uint8_t encoded_exp[N/2], uint8_t exp[N/2], int nb_exps, int exp_strategy) |
| static int | compute_mantissa_size (AC3EncodeContext *s, uint8_t *m, int nb_coefs) |
| static void | bit_alloc_masking (AC3EncodeContext *s, uint8_t encoded_exp[NB_BLOCKS][AC3_MAX_CHANNELS][N/2], uint8_t exp_strategy[NB_BLOCKS][AC3_MAX_CHANNELS], int16_t psd[NB_BLOCKS][AC3_MAX_CHANNELS][N/2], int16_t mask[NB_BLOCKS][AC3_MAX_CHANNELS][50]) |
| static int | bit_alloc (AC3EncodeContext *s, int16_t mask[NB_BLOCKS][AC3_MAX_CHANNELS][50], int16_t psd[NB_BLOCKS][AC3_MAX_CHANNELS][N/2], uint8_t bap[NB_BLOCKS][AC3_MAX_CHANNELS][N/2], int frame_bits, int csnroffst, int fsnroffst) |
| static int | compute_bit_allocation (AC3EncodeContext *s, uint8_t bap[NB_BLOCKS][AC3_MAX_CHANNELS][N/2], uint8_t encoded_exp[NB_BLOCKS][AC3_MAX_CHANNELS][N/2], uint8_t exp_strategy[NB_BLOCKS][AC3_MAX_CHANNELS], int frame_bits) |
| static int | AC3_encode_init (AVCodecContext *avctx) |
| static void | output_frame_header (AC3EncodeContext *s, unsigned char *frame) |
| static int | sym_quant (int c, int e, int levels) |
| static int | asym_quant (int c, int e, int qbits) |
| static void | output_audio_block (AC3EncodeContext *s, uint8_t exp_strategy[AC3_MAX_CHANNELS], uint8_t encoded_exp[AC3_MAX_CHANNELS][N/2], uint8_t bap[AC3_MAX_CHANNELS][N/2], int32_t mdct_coefs[AC3_MAX_CHANNELS][N/2], int8_t global_exp[AC3_MAX_CHANNELS], int block_num) |
| static unsigned int | mul_poly (unsigned int a, unsigned int b, unsigned int poly) |
| static unsigned int | pow_poly (unsigned int a, unsigned int n, unsigned int poly) |
| static int | log2_tab (int16_t *tab, int n) |
| static void | lshift_tab (int16_t *tab, int n, int lshift) |
| static int | output_frame_end (AC3EncodeContext *s) |
| static int | AC3_encode_frame (AVCodecContext *avctx, unsigned char *frame, int buf_size, void *data) |
| static int | AC3_encode_close (AVCodecContext *avctx) |
| void | fft_test (void) |
| void | mdct_test (void) |
| void | test_ac3 (void) |
Variables | |
| static int16_t | costab [64] |
| static int16_t | sintab [64] |
| static int16_t | fft_rev [512] |
| static int16_t | xcos1 [128] |
| static int16_t | xsin1 [128] |
| AVCodec | ac3_encoder |
| static void fft_init | ( | int | ln | ) | [static] |
| static int16_t fix15 | ( | float | a | ) | [inline, static] |
| static void fft | ( | IComplex * | z, | |
| int | ln | |||
| ) | [static] |
| static int calc_exp_diff | ( | uint8_t * | exp1, | |
| uint8_t * | exp2, | |||
| int | n | |||
| ) | [static] |
| static void compute_exp_strategy | ( | uint8_t | exp_strategy[NB_BLOCKS][AC3_MAX_CHANNELS], | |
| uint8_t | exp[NB_BLOCKS][AC3_MAX_CHANNELS][N/2], | |||
| int | ch, | |||
| int | is_lfe | |||
| ) | [static] |
| static void exponent_min | ( | uint8_t | exp[N/2], | |
| uint8_t | exp1[N/2], | |||
| int | n | |||
| ) | [static] |
| static int encode_exp | ( | uint8_t | encoded_exp[N/2], | |
| uint8_t | exp[N/2], | |||
| int | nb_exps, | |||
| int | exp_strategy | |||
| ) | [static] |
| static int compute_mantissa_size | ( | AC3EncodeContext * | s, | |
| uint8_t * | m, | |||
| int | nb_coefs | |||
| ) | [static] |
| static void bit_alloc_masking | ( | AC3EncodeContext * | s, | |
| uint8_t | encoded_exp[NB_BLOCKS][AC3_MAX_CHANNELS][N/2], | |||
| uint8_t | exp_strategy[NB_BLOCKS][AC3_MAX_CHANNELS], | |||
| int16_t | psd[NB_BLOCKS][AC3_MAX_CHANNELS][N/2], | |||
| int16_t | mask[NB_BLOCKS][AC3_MAX_CHANNELS][50] | |||
| ) | [static] |
| static int bit_alloc | ( | AC3EncodeContext * | s, | |
| int16_t | mask[NB_BLOCKS][AC3_MAX_CHANNELS][50], | |||
| int16_t | psd[NB_BLOCKS][AC3_MAX_CHANNELS][N/2], | |||
| uint8_t | bap[NB_BLOCKS][AC3_MAX_CHANNELS][N/2], | |||
| int | frame_bits, | |||
| int | csnroffst, | |||
| int | fsnroffst | |||
| ) | [static] |
Definition at line 463 of file ac3enc.c.
Referenced by compute_bit_allocation(), encode_frame(), mp_decode_layer2(), and MPA_encode_frame().
| static int compute_bit_allocation | ( | AC3EncodeContext * | s, | |
| uint8_t | bap[NB_BLOCKS][AC3_MAX_CHANNELS][N/2], | |||
| uint8_t | encoded_exp[NB_BLOCKS][AC3_MAX_CHANNELS][N/2], | |||
| uint8_t | exp_strategy[NB_BLOCKS][AC3_MAX_CHANNELS], | |||
| int | frame_bits | |||
| ) | [static] |
| static int AC3_encode_init | ( | AVCodecContext * | avctx | ) | [static] |
| static void output_frame_header | ( | AC3EncodeContext * | s, | |
| unsigned char * | frame | |||
| ) | [static] |
| static int sym_quant | ( | int | c, | |
| int | e, | |||
| int | levels | |||
| ) | [inline, static] |
| static int asym_quant | ( | int | c, | |
| int | e, | |||
| int | qbits | |||
| ) | [inline, static] |
| static void output_audio_block | ( | AC3EncodeContext * | s, | |
| uint8_t | exp_strategy[AC3_MAX_CHANNELS], | |||
| uint8_t | encoded_exp[AC3_MAX_CHANNELS][N/2], | |||
| uint8_t | bap[AC3_MAX_CHANNELS][N/2], | |||
| int32_t | mdct_coefs[AC3_MAX_CHANNELS][N/2], | |||
| int8_t | global_exp[AC3_MAX_CHANNELS], | |||
| int | block_num | |||
| ) | [static] |
| static unsigned int mul_poly | ( | unsigned int | a, | |
| unsigned int | b, | |||
| unsigned int | poly | |||
| ) | [static] |
| static unsigned int pow_poly | ( | unsigned int | a, | |
| unsigned int | n, | |||
| unsigned int | poly | |||
| ) | [static] |
| static int log2_tab | ( | int16_t * | tab, | |
| int | n | |||
| ) | [static] |
| static void lshift_tab | ( | int16_t * | tab, | |
| int | n, | |||
| int | lshift | |||
| ) | [static] |
| static int output_frame_end | ( | AC3EncodeContext * | s | ) | [static] |
| static int AC3_encode_frame | ( | AVCodecContext * | avctx, | |
| unsigned char * | frame, | |||
| int | buf_size, | |||
| void * | data | |||
| ) | [static] |
| static int AC3_encode_close | ( | AVCodecContext * | avctx | ) | [static] |
| void fft_test | ( | void | ) |
| void mdct_test | ( | void | ) |
Initial value:
{
"ac3",
CODEC_TYPE_AUDIO,
CODEC_ID_AC3,
sizeof(AC3EncodeContext),
AC3_encode_init,
AC3_encode_frame,
AC3_encode_close,
NULL,
}
1.5.5