|
#define | STB_VORBIS_MAX_CHANNELS 16 /* enough for anyone? */ |
|
#define | STB_VORBIS_FAST_HUFFMAN_LENGTH 10 |
|
#define | STB_VORBIS_FAST_HUFFMAN_SHORT |
|
#define | STB_VORBIS_CODEBOOK_FLOATS |
|
#define | MAX_BLOCKSIZE_LOG 13 /* from specification */ |
|
#define | MAX_BLOCKSIZE (1 << MAX_BLOCKSIZE_LOG) |
|
#define | TRUE 1 |
|
#define | FALSE 0 |
|
#define | FAST_HUFFMAN_TABLE_SIZE (1 << STB_VORBIS_FAST_HUFFMAN_LENGTH) |
|
#define | FAST_HUFFMAN_TABLE_MASK (FAST_HUFFMAN_TABLE_SIZE - 1) |
|
#define | IS_PUSH_MODE(f) FALSE |
|
#define | array_size_required(count, size) (count*(sizeof(void *)+(size))) |
|
#define | temp_alloc(f, size) (f->alloc.alloc_buffer ? setup_temp_malloc(f,size) : alloca(size)) |
|
#define | temp_alloc_save(f) ((f)->temp_offset) |
|
#define | temp_alloc_restore(f, p) ((f)->temp_offset = (p)) |
|
#define | temp_block_array(f, count, size) make_block_array(temp_alloc(f,array_size_required(count,size)), count, size) |
|
#define | CRC32_POLY 0x04c11db7 /* from spec */ |
|
#define | M_PI 3.14159265358979323846264f /* from CRC */ |
|
#define | NO_CODE 255 |
|
#define | STBV_CDECL |
|
#define | PAGEFLAG_continued_packet 1 |
|
#define | PAGEFLAG_first_page 2 |
|
#define | PAGEFLAG_last_page 4 |
|
#define | EOP (-1) |
|
#define | INVALID_BITS (-1) |
|
#define | DECODE_RAW(var, f, c) var = codebook_decode_scalar(f,c); |
|
#define | DECODE(var, f, c) |
|
#define | DECODE_VQ(var, f, c) DECODE_RAW(var,f,c) |
|
#define | CODEBOOK_ELEMENT(c, off) (c->multiplicands[off]) |
|
#define | CODEBOOK_ELEMENT_FAST(c, off) (c->multiplicands[off]) |
|
#define | CODEBOOK_ELEMENT_BASE(c) (0) |
|
#define | LINE_OP(a, b) a *= b |
|
#define | LIBVORBIS_MDCT 0 |
|
#define | SAMPLE_unknown 0xffffffff |
|
|
stb_vorbis_info | stb_vorbis_get_info (stb_vorbis *f) |
|
int | stb_vorbis_get_error (stb_vorbis *f) |
|
void | stb_vorbis_close (stb_vorbis *f) |
|
int | stb_vorbis_get_sample_offset (stb_vorbis *f) |
|
unsigned int | stb_vorbis_get_file_offset (stb_vorbis *f) |
|
stb_vorbis * | stb_vorbis_open_memory (const unsigned char *data, int len, int *error, stb_vorbis_alloc *alloc_buffer) |
|
int | stb_vorbis_seek_frame (stb_vorbis *f, unsigned int sample_number) |
|
int | stb_vorbis_seek (stb_vorbis *f, unsigned int sample_number) |
|
void | stb_vorbis_seek_start (stb_vorbis *f) |
|
unsigned int | stb_vorbis_stream_length_in_samples (stb_vorbis *f) |
|
float | stb_vorbis_stream_length_in_seconds (stb_vorbis *f) |
|
int | stb_vorbis_get_frame_float (stb_vorbis *f, int *channels, float ***output) |
|
int | stb_vorbis_get_samples_float_interleaved (stb_vorbis *f, int channels, float *buffer, int num_floats) |
|
int | stb_vorbis_get_samples_float (stb_vorbis *f, int channels, float **buffer, int num_samples) |
|
static int | error (vorb *f, enum STBVorbisError e) |
|
static void * | make_block_array (void *mem, int count, int size) |
|
static void * | setup_malloc (vorb *f, int sz) |
|
static void | setup_free (vorb *f, void *p) |
|
static void * | setup_temp_malloc (vorb *f, int sz) |
|
static void | setup_temp_free (vorb *f, void *p, int sz) |
|
static void | crc32_init (void) |
|
static INLINE uint32_t | crc32_update (uint32_t crc, uint8_t byte) |
|
static unsigned int | bit_reverse (unsigned int n) |
|
static float | square (float x) |
|
static int | ilog (int32_t n) |
|
static float | float32_unpack (uint32_t x) |
|
static void | add_entry (Codebook *c, uint32_t huff_code, int symbol, int count, int len, uint32_t *values) |
|
static int | compute_codewords (Codebook *c, uint8_t *len, int n, uint32_t *values) |
|
static void | compute_accelerated_huffman (Codebook *c) |
|
static int STBV_CDECL | uint32_t_compare (const void *p, const void *q) |
|
static int | include_in_sort (Codebook *c, uint8_t len) |
|
static void | compute_sorted_huffman (Codebook *c, uint8_t *lengths, uint32_t *values) |
|
static int | vorbis_validate (uint8_t *data) |
|
static int | lookup1_values (int entries, int dim) |
|
static void | compute_twiddle_factors (int n, float *A, float *B, float *C) |
|
static void | compute_window (int n, float *window) |
|
static void | compute_bitreverse (int n, uint16_t *rev) |
|
static int | init_blocksize (vorb *f, int b, int n) |
|
static void | neighbors (uint16_t *x, int n, int *plow, int *phigh) |
|
static int STBV_CDECL | point_compare (const void *p, const void *q) |
|
static uint8_t | get8 (vorb *z) |
|
static uint32_t | get32 (vorb *f) |
|
static int | getn (vorb *z, uint8_t *data, int n) |
|
static void | skip (vorb *z, int n) |
|
static int | set_file_offset (stb_vorbis *f, unsigned int loc) |
|
static int | capture_pattern (vorb *f) |
|
static int | start_page_no_capturepattern (vorb *f) |
|
static int | start_page (vorb *f) |
|
static int | start_packet (vorb *f) |
|
static int | maybe_start_packet (vorb *f) |
|
static int | next_segment (vorb *f) |
|
static int | get8_packet_raw (vorb *f) |
|
static int | get8_packet (vorb *f) |
|
static void | flush_packet (vorb *f) |
|
static uint32_t | get_bits (vorb *f, int n) |
|
static INLINE void | prep_huffman (vorb *f) |
|
static int | codebook_decode_scalar_raw (vorb *f, Codebook *c) |
|
static int | codebook_decode_scalar (vorb *f, Codebook *c) |
|
static int | codebook_decode_start (vorb *f, Codebook *c) |
|
static int | codebook_decode (vorb *f, Codebook *c, float *output, int len) |
|
static int | codebook_decode_step (vorb *f, Codebook *c, float *output, int len, int step) |
|
static int | codebook_decode_deinterleave_repeat (vorb *f, Codebook *c, float **outputs, int ch, int *c_inter_p, int *p_inter_p, int len, int total_decode) |
|
static int | codebook_decode_deinterleave_repeat_2 (vorb *f, Codebook *c, float **outputs, int *c_inter_p, int *p_inter_p, int len, int total_decode) |
|
static int | predict_point (int x, int x0, int x1, int y0, int y1) |
|
static INLINE void | draw_line (float *output, int x0, int y0, int x1, int y1, int n) |
|
static int | residue_decode (vorb *f, Codebook *book, float *target, int offset, int n, int rtype) |
|
static void | decode_residue (vorb *f, float *residue_buffers[], int ch, int n, int rn, uint8_t *do_not_decode) |
|
static void | imdct_step3_iter0_loop (int n, float *e, int i_off, int k_off, float *A) |
|
static void | imdct_step3_inner_r_loop (int lim, float *e, int d0, int k_off, float *A, int k1) |
|
static void | imdct_step3_inner_s_loop (int n, float *e, int i_off, int k_off, float *A, int a_off, int k0) |
|
static INLINE void | iter_54 (float *z) |
|
static void | imdct_step3_inner_s_loop_ld654 (int n, float *e, int i_off, float *A, int base_n) |
|
static void | inverse_mdct (float *buffer, int n, vorb *f, int blocktype) |
|
static float * | get_window (vorb *f, int len) |
|
static int | do_floor (vorb *f, Mapping *map, int i, int n, float *target, YTYPE *finalY, uint8_t *step2_flag) |
|
static int | vorbis_decode_initial (vorb *f, int *p_left_start, int *p_left_end, int *p_right_start, int *p_right_end, int *mode) |
|
static int | vorbis_decode_packet_rest (vorb *f, int *len, Mode *m, int left_start, int left_end, int right_start, int right_end, int *p_left) |
|
static int | vorbis_decode_packet (vorb *f, int *len, int *p_left, int *p_right) |
|
static int | vorbis_finish_frame (stb_vorbis *f, int len, int left, int right) |
|
static void | vorbis_pump_first_frame (stb_vorbis *f) |
|
static int | start_decoder (vorb *f) |
|
static void | vorbis_deinit (stb_vorbis *p) |
|
static void | vorbis_init (stb_vorbis *p, stb_vorbis_alloc *z) |
|
static stb_vorbis * | vorbis_alloc (stb_vorbis *f) |
|
static uint32_t | vorbis_find_page (stb_vorbis *f, uint32_t *end, uint32_t *last) |
|
static int | vorbis_analyze_page (stb_vorbis *f, ProbedPage *z) |
|
static int | vorbis_seek_frame_from_page (stb_vorbis *f, uint32_t page_start, uint32_t first_sample, uint32_t target_sample, int fine) |
|
static int | vorbis_seek_base (stb_vorbis *f, unsigned int sample_number, int fine) |
|