|
XenevaOS
|

Classes | |
| struct | _bitstream |
| struct | _vlc |
| struct | _mp3_context |
| struct | _granule |
| struct | _huff_table |
Macros | |
| #define | MP3_FRAME_SIZE 1152 |
| #define | MP3_MAX_CODED_FRAME_SIZE 1792 |
| #define | MP3_MAX_CHANNELS 2 |
| #define | SBLIMIT 32 |
| #define | MP3_STEREO 0 |
| #define | MP3_JSTEREO 1 |
| #define | MP3_DUAL 2 |
| #define | MP3_MONO 3 |
| #define | SAME_HEADER_MASK (0xffe00000 | (3 << 17) | (0xf << 12) | (3 << 10) | (3 << 19)) |
| #define | FRAC_BITS 15 |
| #define | WFRAC_BITS 14 |
| #define | OUT_MAX (32767) |
| #define | OUT_MIN (-32768) |
| #define | OUT_SHIFT (WFRAC_BITS + FRAC_BITS - 15) |
| #define | MODE_EXT_MS_STEREO 2 |
| #define | MODE_EXT_I_STEREO 1 |
| #define | FRAC_ONE (1 << FRAC_BITS) |
| #define | FIX(a) ((int)((a) * FRAC_ONE)) |
| #define | FIXR(a) ((int)((a) * FRAC_ONE + 0.5)) |
| #define | FRAC_RND(a) (((a) + (FRAC_ONE/2)) >> FRAC_BITS) |
| #define | FIXHR(a) ((int)((a) * (1LL<<32) + 0.5)) |
| #define | MULL(a, b) (((int64_t)(a) * (int64_t)(b)) >> FRAC_BITS) |
| #define | MULH(a, b) (((int64_t)(a) * (int64_t)(b)) >> 32) |
| #define | MULS(ra, rb) ((ra) * (rb)) |
| #define | ISQRT2 FIXR(0.70710678118654752440) |
| #define | HEADER_SIZE 4 |
| #define | BACKSTEP_SIZE 512 |
| #define | EXTRABYTES 24 |
| #define | VLC_TYPE int16_t |
| #define | TABLE_4_3_SIZE (8191 + 16)*4 |
| #define | C1 FIXHR(0.98480775301220805936/2) |
| #define | C2 FIXHR(0.93969262078590838405/2) |
| #define | C3 FIXHR(0.86602540378443864676/2) |
| #define | C4 FIXHR(0.76604444311897803520/2) |
| #define | C5 FIXHR(0.64278760968653932632/2) |
| #define | C6 FIXHR(0.5/2) |
| #define | C7 FIXHR(0.34202014332566873304/2) |
| #define | C8 FIXHR(0.17364817766693034885/2) |
| #define | MIN_CACHE_BITS 25 |
| #define | NEG_SSR32(a, s) ((( int32_t)(a))>>(32-(s))) |
| #define | NEG_USR32(a, s) (((uint32_t)(a))>>(32-(s))) |
| #define | OPEN_READER(name, gb) |
| #define | CLOSE_READER(name, gb) (gb)->index = name##_index; \ |
| #define | UPDATE_CACHE(name, gb) name##_cache = unaligned32_be(&((gb)->buffer[name##_index >> 3])) << (name##_index & 0x07); \ |
| #define | SKIP_CACHE(name, gb, num) name##_cache <<= (num); |
| #define | SKIP_COUNTER(name, gb, num) name##_index += (num); \ |
| #define | SKIP_BITS(name, gb, num) |
| #define | LAST_SKIP_BITS(name, gb, num) SKIP_COUNTER(name, gb, num) |
| #define | LAST_SKIP_CACHE(name, gb, num) ; |
| #define | SHOW_UBITS(name, gb, num) NEG_USR32(name##_cache, num) |
| #define | SHOW_SBITS(name, gb, num) NEG_SSR32(name##_cache, num) |
| #define | GET_CACHE(name, gb) ((uint32_t)name##_cache) |
| #define | skip_bits skip_bits_long |
| #define | GET_DATA(v, table, i, wrap, size) |
| #define | GET_VLC(code, name, gb, table, bits, max_depth) |
| #define | INT_AA(j) |
| #define | SUM8(sum, op, w, p) |
| #define | SUM8P2(sum1, op1, sum2, op2, w1, w2, p) |
| #define | COS0_0 FIXHR(0.50060299823519630134/2) |
| #define | COS0_1 FIXHR(0.50547095989754365998/2) |
| #define | COS0_2 FIXHR(0.51544730992262454697/2) |
| #define | COS0_3 FIXHR(0.53104259108978417447/2) |
| #define | COS0_4 FIXHR(0.55310389603444452782/2) |
| #define | COS0_5 FIXHR(0.58293496820613387367/2) |
| #define | COS0_6 FIXHR(0.62250412303566481615/2) |
| #define | COS0_7 FIXHR(0.67480834145500574602/2) |
| #define | COS0_8 FIXHR(0.74453627100229844977/2) |
| #define | COS0_9 FIXHR(0.83934964541552703873/2) |
| #define | COS0_10 FIXHR(0.97256823786196069369/2) |
| #define | COS0_11 FIXHR(1.16943993343288495515/4) |
| #define | COS0_12 FIXHR(1.48416461631416627724/4) |
| #define | COS0_13 FIXHR(2.05778100995341155085/8) |
| #define | COS0_14 FIXHR(3.40760841846871878570/8) |
| #define | COS0_15 FIXHR(10.19000812354805681150/32) |
| #define | COS1_0 FIXHR(0.50241928618815570551/2) |
| #define | COS1_1 FIXHR(0.52249861493968888062/2) |
| #define | COS1_2 FIXHR(0.56694403481635770368/2) |
| #define | COS1_3 FIXHR(0.64682178335999012954/2) |
| #define | COS1_4 FIXHR(0.78815462345125022473/2) |
| #define | COS1_5 FIXHR(1.06067768599034747134/4) |
| #define | COS1_6 FIXHR(1.72244709823833392782/4) |
| #define | COS1_7 FIXHR(5.10114861868916385802/16) |
| #define | COS2_0 FIXHR(0.50979557910415916894/2) |
| #define | COS2_1 FIXHR(0.60134488693504528054/2) |
| #define | COS2_2 FIXHR(0.89997622313641570463/2) |
| #define | COS2_3 FIXHR(2.56291544774150617881/8) |
| #define | COS3_0 FIXHR(0.54119610014619698439/2) |
| #define | COS3_1 FIXHR(1.30656296487637652785/4) |
| #define | COS4_0 FIXHR(0.70710678118654752439/2) |
| #define | BF(a, b, c, s) |
| #define | BF1(a, b, c, d) |
| #define | BF2(a, b, c, d) |
| #define | ADD(a, b) tab[a] += tab[b] |
Typedefs | |
| typedef struct _bitstream | bitstream_t |
| typedef struct _vlc | vlc_t |
| typedef struct _mp3_context | mp3_context_t |
| typedef struct _granule | granule_t |
| typedef struct _huff_table | huff_table_t |
Functions | |
| mp3_decoder_t | mp3_create (void) |
| void | mp3_done (mp3_decoder_t *dec) |
| int | mp3_decode (mp3_decoder_t dec, void *buf, int bytes, signed short *out, mp3_info_t *info) |
| #define ADD | ( | a, | |
| b | |||
| ) | tab[a] += tab[b] |
| #define BACKSTEP_SIZE 512 |
| #define BF | ( | a, | |
| b, | |||
| c, | |||
| s | |||
| ) |
| #define BF1 | ( | a, | |
| b, | |||
| c, | |||
| d | |||
| ) |
| #define BF2 | ( | a, | |
| b, | |||
| c, | |||
| d | |||
| ) |
| #define C1 FIXHR(0.98480775301220805936/2) |
| #define C2 FIXHR(0.93969262078590838405/2) |
| #define C3 FIXHR(0.86602540378443864676/2) |
| #define C4 FIXHR(0.76604444311897803520/2) |
| #define C5 FIXHR(0.64278760968653932632/2) |
| #define C6 FIXHR(0.5/2) |
| #define C7 FIXHR(0.34202014332566873304/2) |
| #define C8 FIXHR(0.17364817766693034885/2) |
| #define CLOSE_READER | ( | name, | |
| gb | |||
| ) | (gb)->index = name##_index; \ |
| #define COS0_0 FIXHR(0.50060299823519630134/2) |
| #define COS0_1 FIXHR(0.50547095989754365998/2) |
| #define COS0_10 FIXHR(0.97256823786196069369/2) |
| #define COS0_11 FIXHR(1.16943993343288495515/4) |
| #define COS0_12 FIXHR(1.48416461631416627724/4) |
| #define COS0_13 FIXHR(2.05778100995341155085/8) |
| #define COS0_14 FIXHR(3.40760841846871878570/8) |
| #define COS0_15 FIXHR(10.19000812354805681150/32) |
| #define COS0_2 FIXHR(0.51544730992262454697/2) |
| #define COS0_3 FIXHR(0.53104259108978417447/2) |
| #define COS0_4 FIXHR(0.55310389603444452782/2) |
| #define COS0_5 FIXHR(0.58293496820613387367/2) |
| #define COS0_6 FIXHR(0.62250412303566481615/2) |
| #define COS0_7 FIXHR(0.67480834145500574602/2) |
| #define COS0_8 FIXHR(0.74453627100229844977/2) |
| #define COS0_9 FIXHR(0.83934964541552703873/2) |
| #define COS1_0 FIXHR(0.50241928618815570551/2) |
| #define COS1_1 FIXHR(0.52249861493968888062/2) |
| #define COS1_2 FIXHR(0.56694403481635770368/2) |
| #define COS1_3 FIXHR(0.64682178335999012954/2) |
| #define COS1_4 FIXHR(0.78815462345125022473/2) |
| #define COS1_5 FIXHR(1.06067768599034747134/4) |
| #define COS1_6 FIXHR(1.72244709823833392782/4) |
| #define COS1_7 FIXHR(5.10114861868916385802/16) |
| #define COS2_0 FIXHR(0.50979557910415916894/2) |
| #define COS2_1 FIXHR(0.60134488693504528054/2) |
| #define COS2_2 FIXHR(0.89997622313641570463/2) |
| #define COS2_3 FIXHR(2.56291544774150617881/8) |
| #define COS3_0 FIXHR(0.54119610014619698439/2) |
| #define COS3_1 FIXHR(1.30656296487637652785/4) |
| #define COS4_0 FIXHR(0.70710678118654752439/2) |
| #define EXTRABYTES 24 |
| #define FIX | ( | a | ) | ((int)((a) * FRAC_ONE)) |
| #define FIXHR | ( | a | ) | ((int)((a) * (1LL<<32) + 0.5)) |
| #define FIXR | ( | a | ) | ((int)((a) * FRAC_ONE + 0.5)) |
| #define FRAC_BITS 15 |
| #define FRAC_ONE (1 << FRAC_BITS) |
| #define GET_CACHE | ( | name, | |
| gb | |||
| ) | ((uint32_t)name##_cache) |
| #define GET_DATA | ( | v, | |
| table, | |||
| i, | |||
| wrap, | |||
| size | |||
| ) |
| #define GET_VLC | ( | code, | |
| name, | |||
| gb, | |||
| table, | |||
| bits, | |||
| max_depth | |||
| ) |
| #define HEADER_SIZE 4 |
| #define INT_AA | ( | j | ) |
| #define ISQRT2 FIXR(0.70710678118654752440) |
| #define LAST_SKIP_BITS | ( | name, | |
| gb, | |||
| num | |||
| ) | SKIP_COUNTER(name, gb, num) |
| #define LAST_SKIP_CACHE | ( | name, | |
| gb, | |||
| num | |||
| ) | ; |
| #define MIN_CACHE_BITS 25 |
| #define MODE_EXT_I_STEREO 1 |
| #define MODE_EXT_MS_STEREO 2 |
| #define MP3_DUAL 2 |
| #define MP3_FRAME_SIZE 1152 |
| #define MP3_JSTEREO 1 |
| #define MP3_MAX_CHANNELS 2 |
| #define MP3_MAX_CODED_FRAME_SIZE 1792 |
| #define MP3_MONO 3 |
| #define MP3_STEREO 0 |
| #define MULS | ( | ra, | |
| rb | |||
| ) | ((ra) * (rb)) |
| #define NEG_SSR32 | ( | a, | |
| s | |||
| ) | ((( int32_t)(a))>>(32-(s))) |
| #define NEG_USR32 | ( | a, | |
| s | |||
| ) | (((uint32_t)(a))>>(32-(s))) |
| #define OPEN_READER | ( | name, | |
| gb | |||
| ) |
| #define OUT_MAX (32767) |
| #define OUT_MIN (-32768) |
| #define OUT_SHIFT (WFRAC_BITS + FRAC_BITS - 15) |
| #define SAME_HEADER_MASK (0xffe00000 | (3 << 17) | (0xf << 12) | (3 << 10) | (3 << 19)) |
| #define SBLIMIT 32 |
| #define SHOW_SBITS | ( | name, | |
| gb, | |||
| num | |||
| ) | NEG_SSR32(name##_cache, num) |
| #define SHOW_UBITS | ( | name, | |
| gb, | |||
| num | |||
| ) | NEG_USR32(name##_cache, num) |
| #define SKIP_BITS | ( | name, | |
| gb, | |||
| num | |||
| ) |
| #define skip_bits skip_bits_long |
| #define SKIP_CACHE | ( | name, | |
| gb, | |||
| num | |||
| ) | name##_cache <<= (num); |
| #define SKIP_COUNTER | ( | name, | |
| gb, | |||
| num | |||
| ) | name##_index += (num); \ |
| #define SUM8 | ( | sum, | |
| op, | |||
| w, | |||
| p | |||
| ) |
| #define SUM8P2 | ( | sum1, | |
| op1, | |||
| sum2, | |||
| op2, | |||
| w1, | |||
| w2, | |||
| p | |||
| ) |
| #define TABLE_4_3_SIZE (8191 + 16)*4 |
| #define UPDATE_CACHE | ( | name, | |
| gb | |||
| ) | name##_cache = unaligned32_be(&((gb)->buffer[name##_index >> 3])) << (name##_index & 0x07); \ |
| #define VLC_TYPE int16_t |
| #define WFRAC_BITS 14 |
| typedef struct _bitstream bitstream_t |
| typedef struct _huff_table huff_table_t |
| typedef struct _mp3_context mp3_context_t |
| mp3_decoder_t mp3_create | ( | void | ) |
| int mp3_decode | ( | mp3_decoder_t | dec, |
| void * | buf, | ||
| int | bytes, | ||
| signed short * | out, | ||
| mp3_info_t * | info | ||
| ) |
| void mp3_done | ( | mp3_decoder_t * | dec | ) |