sonic.c File Reference
Detailed Description
Simple free lossless/lossy audio
codec Based on Paul Francis Harrison's Bonk (
http://www.logarithmic.net/pfh/bonk) Written and designed by Alex Beregszaszi.
TODO:
- CABAC put/get_symbol
- independent quantizer for channels
- >2 channels support
- more decorrelation types
- more tap_quant tests
- selectable intlist writers/readers (bonk-style, golomb, cabac)
Definition in file sonic.c.
Go to the source code of this file.
|
Classes |
| struct | SonicContext |
Functions |
| static int | divide (int a, int b) |
| static int | shift (int a, int b) |
| static int | shift_down (int a, int b) |
| static int | intlist_write (PutBitContext *pb, int *buf, int entries, int base_2_part) |
| static int | intlist_read (GetBitContext *gb, int *buf, int entries, int base_2_part) |
| static int | bits_to_store (uint64_t x) |
| static void | write_uint_max (PutBitContext *pb, unsigned int value, unsigned int max) |
| static unsigned int | read_uint_max (GetBitContext *gb, int max) |
| static void | predictor_init_state (int *k, int *state, int order) |
| static int | predictor_calc_error (int *k, int *state, int order, int error) |
| static void | modified_levinson_durbin (int *window, int window_entries, int *out, int out_entries, int channels, int *tap_quant) |
| static int | code_samplerate (int samplerate) |
| static int | sonic_encode_init (AVCodecContext *avctx) |
| static int | sonic_encode_close (AVCodecContext *avctx) |
| static int | sonic_encode_frame (AVCodecContext *avctx, uint8_t *buf, int buf_size, void *data) |
| static int | sonic_decode_init (AVCodecContext *avctx) |
| static int | sonic_decode_close (AVCodecContext *avctx) |
| static int | sonic_decode_frame (AVCodecContext *avctx, void *data, int *data_size, uint8_t *buf, int buf_size) |
Variables |
| static int | samplerate_table [] |
| AVCodec | sonic_encoder |
| AVCodec | sonic_ls_encoder |
| AVCodec | sonic_decoder |
Function Documentation
| static int divide |
( |
int |
a, |
|
|
int |
b | |
|
) |
| | [inline, static] |
| static int shift |
( |
int |
a, |
|
|
int |
b | |
|
) |
| | [inline, static] |
Definition at line 85 of file sonic.c.
Referenced by $method(), adpcm_decode_frame(), bidir_refine(), soundtouch::TDStretchMMX::calcCrossCorrMulti(), soundtouch::TDStretchMMX::calcCrossCorrStereo(), check_input_motion(), copy_chunk(), DebugString(), decode_init(), direct_search(), dpcm_decode_frame(), dv_audio_12to16(), elsif(), encode_frame(), encode_q_branch(), encode_residual(), epzs_motion_search2(), epzs_motion_search4(), epzs_motion_search_internal(), exponents_from_scale_factors(), ff_convert_matrix(), ff_estimate_motion_b(), ff_estimate_p_frame_motion(), ff_jpegls_decode_picture(), ff_png_pass_row_size(), ff_pre_estimate_p_frame_motion(), ff_print_debug_info(), get_amv(), get_sample_bits(), h263_decode_motion(), if(), img_resample(), init_dequant4_coeff_table(), init_dequant8_coeff_table(), initFilter(), initMMX2HScaler(), l1_unscale(), l2_unscale_group(), mpeg_decode_motion(), msmpeg4v2_decode_motion(), soundtouch::TDStretchMMX::overlapStereo(), PackagedExecutable(), prefetch_motion(), renorm_cabac_decoder_once(), sab_diamond_search(), skip_chunk(), sonic_decode_frame(), sonic_encode_frame(), to_bitmap(), vc1_mspel_mc(), vc1_parse_frame_header(), vc1_parse_frame_header_adv(), while(), and xa_decode().
| static int shift_down |
( |
int |
a, |
|
|
int |
b | |
|
) |
| | [inline, static] |
| static int intlist_write |
( |
PutBitContext * |
pb, |
|
|
int * |
buf, |
|
|
int |
entries, |
|
|
int |
base_2_part | |
|
) |
| | [inline, static] |
| static int intlist_read |
( |
GetBitContext * |
gb, |
|
|
int * |
buf, |
|
|
int |
entries, |
|
|
int |
base_2_part | |
|
) |
| | [inline, static] |
| static int bits_to_store |
( |
uint64_t |
x |
) |
[static] |
| static void write_uint_max |
( |
PutBitContext * |
pb, |
|
|
unsigned int |
value, |
|
|
unsigned int |
max | |
|
) |
| | [static] |
| static unsigned int read_uint_max |
( |
GetBitContext * |
gb, |
|
|
int |
max | |
|
) |
| | [static] |
| static void predictor_init_state |
( |
int * |
k, |
|
|
int * |
state, |
|
|
int |
order | |
|
) |
| | [static] |
| static int predictor_calc_error |
( |
int * |
k, |
|
|
int * |
state, |
|
|
int |
order, |
|
|
int |
error | |
|
) |
| | [static] |
| static void modified_levinson_durbin |
( |
int * |
window, |
|
|
int |
window_entries, |
|
|
int * |
out, |
|
|
int |
out_entries, |
|
|
int |
channels, |
|
|
int * |
tap_quant | |
|
) |
| | [static] |
| static int code_samplerate |
( |
int |
samplerate |
) |
[inline, static] |
| static int sonic_encode_frame |
( |
AVCodecContext * |
avctx, |
|
|
uint8_t * |
buf, |
|
|
int |
buf_size, |
|
|
void * |
data | |
|
) |
| | [static] |
| static int sonic_decode_frame |
( |
AVCodecContext * |
avctx, |
|
|
void * |
data, |
|
|
int * |
data_size, |
|
|
uint8_t * |
buf, |
|
|
int |
buf_size | |
|
) |
| | [static] |
Variable Documentation
Initial value:
{ 44100, 22050, 11025, 96000, 48000, 32000, 24000, 16000, 8000 }
Definition at line 484 of file sonic.c.
Initial value:
Definition at line 940 of file sonic.c.
Initial value:
Definition at line 951 of file sonic.c.
Initial value:
Definition at line 964 of file sonic.c.