#include "mpeg3audio.h"#include <string.h>

Go to the source code of this file.
Functions | |
| static int | logadd (int a, int b) |
| int | mpeg3audio_ac3_calc_lowcomp (int a, int b0, int b1, int bin) |
| void | mpeg3audio_ac3_ba_compute_psd (int start, int end, short exps[], short psd[], short bndpsd[]) |
| void | mpeg3audio_ac3_ba_compute_excitation (mpeg3audio_t *audio, int start, int end, int fgain, int fastleak, int slowleak, int is_lfe, short bndpsd[], short excite[]) |
| void | mpeg3audio_ac3_ba_compute_mask (mpeg3audio_t *audio, int start, int end, int fscod, int deltbae, int deltnseg, short deltoffst[], short deltba[], short deltlen[], short excite[], short mask[]) |
| void | mpeg3audio_ac3_ba_compute_bap (mpeg3audio_t *audio, int start, int end, int snroffset, short psd[], short mask[], short bap[]) |
| int | mpeg3audio_ac3_bit_allocate (mpeg3audio_t *audio, unsigned int fscod, mpeg3_ac3bsi_t *bsi, mpeg3_ac3audblk_t *audblk) |
Variables | |
| static short | mpeg3_slowdec [] = { 0x0f, 0x11, 0x13, 0x15 } |
| static short | mpeg3_fastdec [] = { 0x3f, 0x53, 0x67, 0x7b } |
| static short | mpeg3_slowgain [] = { 0x540, 0x4d8, 0x478, 0x410 } |
| static short | mpeg3_dbpbtab [] = { 0x000, 0x700, 0x900, 0xb00 } |
| static unsigned short | mpeg3_floortab [] = { 0x2f0, 0x2b0, 0x270, 0x230, 0x1f0, 0x170, 0x0f0, 0xf800 } |
| static short | mpeg3_fastgain [] = { 0x080, 0x100, 0x180, 0x200, 0x280, 0x300, 0x380, 0x400 } |
| static short | mpeg3_bndtab [] |
| static short | mpeg3_bndsz [] |
| static short | mpeg3_masktab [] |
| static short | mpeg3_latab [] |
| static short | mpeg3_hth [][50] |
| static short | mpeg3_baptab [] |
| static int logadd | ( | int | a, | |
| int | b | |||
| ) | [static] |
Definition at line 157 of file bit_allocation.c.
References c, and mpeg3_latab.
Referenced by mpeg3audio_ac3_ba_compute_psd().
| void mpeg3audio_ac3_ba_compute_bap | ( | mpeg3audio_t * | audio, | |
| int | start, | |||
| int | end, | |||
| int | snroffset, | |||
| short | psd[], | |||
| short | mask[], | |||
| short | bap[] | |||
| ) |
Definition at line 362 of file bit_allocation.c.
References mpeg3_baptab, mpeg3_bndsz, mpeg3_bndtab, and mpeg3_masktab.
Referenced by mpeg3audio_ac3_bit_allocate().
| void mpeg3audio_ac3_ba_compute_excitation | ( | mpeg3audio_t * | audio, | |
| int | start, | |||
| int | end, | |||
| int | fgain, | |||
| int | fastleak, | |||
| int | slowleak, | |||
| int | is_lfe, | |||
| short | bndpsd[], | |||
| short | excite[] | |||
| ) |
Definition at line 230 of file bit_allocation.c.
References mpeg3_masktab, and mpeg3audio_ac3_calc_lowcomp().
Referenced by mpeg3audio_ac3_bit_allocate().

| void mpeg3audio_ac3_ba_compute_mask | ( | mpeg3audio_t * | audio, | |
| int | start, | |||
| int | end, | |||
| int | fscod, | |||
| int | deltbae, | |||
| int | deltnseg, | |||
| short | deltoffst[], | |||
| short | deltba[], | |||
| short | deltlen[], | |||
| short | excite[], | |||
| short | mask[] | |||
| ) |
Definition at line 304 of file bit_allocation.c.
References DELTA_BIT_NEW, DELTA_BIT_REUSE, mpeg3_hth, and mpeg3_masktab.
Referenced by mpeg3audio_ac3_bit_allocate().
| void mpeg3audio_ac3_ba_compute_psd | ( | int | start, | |
| int | end, | |||
| short | exps[], | |||
| short | psd[], | |||
| short | bndpsd[] | |||
| ) |
Definition at line 195 of file bit_allocation.c.
References logadd(), mpeg3_bndsz, mpeg3_bndtab, and mpeg3_masktab.
Referenced by mpeg3audio_ac3_bit_allocate().

| int mpeg3audio_ac3_bit_allocate | ( | mpeg3audio_t * | audio, | |
| unsigned int | fscod, | |||
| mpeg3_ac3bsi_t * | bsi, | |||
| mpeg3_ac3audblk_t * | audblk | |||
| ) |
Definition at line 400 of file bit_allocation.c.
References mpeg3_dbpbtab, mpeg3_fastdec, mpeg3_fastgain, mpeg3_floortab, mpeg3_slowdec, mpeg3_slowgain, mpeg3audio_ac3_ba_compute_bap(), mpeg3audio_ac3_ba_compute_excitation(), mpeg3audio_ac3_ba_compute_mask(), and mpeg3audio_ac3_ba_compute_psd().

| int mpeg3audio_ac3_calc_lowcomp | ( | int | a, | |
| int | b0, | |||
| int | b1, | |||
| int | bin | |||
| ) |
Definition at line 172 of file bit_allocation.c.
Referenced by mpeg3audio_ac3_ba_compute_excitation().
short mpeg3_baptab[] [static] |
Initial value:
{
0, 1, 1, 1, 1, 1, 2, 2, 3, 3, 3, 4, 4, 5, 5, 6,
6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 10,
10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 13, 13, 14,
14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15
}
Definition at line 148 of file bit_allocation.c.
Referenced by mpeg3audio_ac3_ba_compute_bap().
short mpeg3_bndsz[] [static] |
Initial value:
{
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 3, 3,
3, 3, 3, 3, 3, 6, 6, 6, 6, 6,
6, 12, 12, 12, 12, 24, 24, 24, 24, 24
}
Definition at line 47 of file bit_allocation.c.
Referenced by mpeg3audio_ac3_ba_compute_bap(), and mpeg3audio_ac3_ba_compute_psd().
short mpeg3_bndtab[] [static] |
Initial value:
{
0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
20, 21, 22, 23, 24, 25, 26, 27, 28, 31,
34, 37, 40, 43, 46, 49, 55, 61, 67, 73,
79, 85, 97, 109, 121, 133, 157, 181, 205, 229
}
Definition at line 38 of file bit_allocation.c.
Referenced by mpeg3audio_ac3_ba_compute_bap(), and mpeg3audio_ac3_ba_compute_psd().
short mpeg3_dbpbtab[] = { 0x000, 0x700, 0x900, 0xb00 } [static] |
short mpeg3_fastdec[] = { 0x3f, 0x53, 0x67, 0x7b } [static] |
short mpeg3_fastgain[] = { 0x080, 0x100, 0x180, 0x200, 0x280, 0x300, 0x380, 0x400 } [static] |
unsigned short mpeg3_floortab[] = { 0x2f0, 0x2b0, 0x270, 0x230, 0x1f0, 0x170, 0x0f0, 0xf800 } [static] |
short mpeg3_hth[][50] [static] |
short mpeg3_latab[] [static] |
short mpeg3_masktab[] [static] |
Initial value:
{
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 28, 28, 29,
29, 29, 30, 30, 30, 31, 31, 31, 32, 32, 32, 33, 33, 33, 34, 34,
34, 35, 35, 35, 35, 35, 35, 36, 36, 36, 36, 36, 36, 37, 37, 37,
37, 37, 37, 38, 38, 38, 38, 38, 38, 39, 39, 39, 39, 39, 39, 40,
40, 40, 40, 40, 40, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
41, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 43, 43, 43,
43, 43, 43, 43, 43, 43, 43, 43, 43, 44, 44, 44, 44, 44, 44, 44,
44, 44, 44, 44, 44, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 46, 46, 46,
46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46,
46, 46, 46, 46, 46, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 0, 0, 0
}
Definition at line 56 of file bit_allocation.c.
Referenced by mpeg3audio_ac3_ba_compute_bap(), mpeg3audio_ac3_ba_compute_excitation(), mpeg3audio_ac3_ba_compute_mask(), and mpeg3audio_ac3_ba_compute_psd().
short mpeg3_slowdec[] = { 0x0f, 0x11, 0x13, 0x15 } [static] |
short mpeg3_slowgain[] = { 0x540, 0x4d8, 0x478, 0x410 } [static] |
1.5.5