#include "avcodec.h"#include "bitstream.h"#include "golomb.h"

Go to the source code of this file.
Data Structures | |
| struct | SonicContext |
Defines | |
| #define | MAX_CHANNELS 2 |
| #define | MID_SIDE 0 |
| #define | LEFT_SIDE 1 |
| #define | RIGHT_SIDE 2 |
| #define | LATTICE_SHIFT 10 |
| #define | SAMPLE_SHIFT 4 |
| #define | LATTICE_FACTOR (1 << LATTICE_SHIFT) |
| #define | SAMPLE_FACTOR (1 << SAMPLE_SHIFT) |
| #define | BASE_QUANT 0.6 |
| #define | RATE_VARIATION 3.0 |
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 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 | 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 [] |
TODO:
Definition in file sonic.c.
| #define LATTICE_FACTOR (1 << LATTICE_SHIFT) |
| #define LATTICE_SHIFT 10 |
Definition at line 67 of file sonic.c.
Referenced by modified_levinson_durbin(), predictor_calc_error(), and predictor_init_state().
| #define LEFT_SIDE 1 |
Definition at line 41 of file sonic.c.
Referenced by decode_frame(), decode_subframe(), flac_decode_frame(), and sonic_decode_frame().
| #define MID_SIDE 0 |
Definition at line 40 of file sonic.c.
Referenced by decode_subframe(), flac_decode_frame(), and sonic_decode_frame().
| #define RIGHT_SIDE 2 |
Definition at line 42 of file sonic.c.
Referenced by decode_subframe(), flac_decode_frame(), and sonic_decode_frame().
| #define SAMPLE_FACTOR (1 << SAMPLE_SHIFT) |
Definition at line 70 of file sonic.c.
Referenced by predictor_calc_error(), and sonic_decode_frame().
| #define SAMPLE_SHIFT 4 |
| static int intlist_read | ( | GetBitContext * | gb, | |
| int * | buf, | |||
| int | entries, | |||
| int | base_2_part | |||
| ) | [inline, static] |
Definition at line 104 of file sonic.c.
References get_se_golomb().
Referenced by sonic_decode_frame().

| static int intlist_write | ( | PutBitContext * | pb, | |
| int * | buf, | |||
| int | entries, | |||
| int | base_2_part | |||
| ) | [inline, static] |
Definition at line 94 of file sonic.c.
References set_se_golomb().

| static void modified_levinson_durbin | ( | int * | window, | |
| int | window_entries, | |||
| int * | out, | |||
| int | out_entries, | |||
| int | channels, | |||
| int * | tap_quant | |||
| ) | [static] |
Definition at line 413 of file sonic.c.
References av_free(), av_mallocz(), LATTICE_FACTOR, LATTICE_SHIFT, memcpy, and shift_down().

| static int predictor_calc_error | ( | int * | k, | |
| int * | state, | |||
| int | order, | |||
| int | error | |||
| ) | [static] |
Definition at line 379 of file sonic.c.
References LATTICE_SHIFT, SAMPLE_FACTOR, and shift_down().
Referenced by sonic_decode_frame().

| static void predictor_init_state | ( | int * | k, | |
| int * | state, | |||
| int | order | |||
| ) | [static] |
Definition at line 362 of file sonic.c.
References LATTICE_SHIFT, and shift_down().
Referenced by sonic_decode_frame().

| static int shift | ( | int | a, | |
| int | b | |||
| ) | [inline, static] |
Definition at line 83 of file sonic.c.
Referenced by alloc_tables(), check_input_motion(), decode_init(), dequantize_sample(), direct_search(), do_video_out(), dpcm_decode_frame(), encode_frame(), encode_q_branch(), epzs_motion_search2(), epzs_motion_search4(), epzs_motion_search_internal(), exponents_from_scale_factors(), ff_estimate_motion_b(), ff_estimate_p_frame_motion(), ff_pre_estimate_p_frame_motion(), fill_pad_region(), get_amv(), h263_decode_motion(), img_resample(), kodak_dc120_load_raw(), l1_unscale(), l2_unscale_group(), lin_interpolate(), mpeg_decode_motion(), msmpeg4v2_decode_motion(), sab_diamond_search(), scale_colors(), sonic_decode_frame(), and xa_decode().
| static int shift_down | ( | int | a, | |
| int | b | |||
| ) | [inline, static] |
Definition at line 88 of file sonic.c.
Referenced by modified_levinson_durbin(), EditPanel::next_label(), predictor_calc_error(), predictor_init_state(), and EditPanel::prev_label().
| static int sonic_decode_close | ( | AVCodecContext * | avctx | ) | [static] |
Definition at line 829 of file sonic.c.
References av_free(), SonicContext::channels, SonicContext::coded_samples, SonicContext::int_samples, SonicContext::predictor_k, SonicContext::predictor_state, AVCodecContext::priv_data, and SonicContext::tap_quant.

| static int sonic_decode_frame | ( | AVCodecContext * | avctx, | |
| void * | data, | |||
| int * | data_size, | |||
| uint8_t * | buf, | |||
| int | buf_size | |||
| ) | [static] |
Definition at line 847 of file sonic.c.
References align_get_bits(), SonicContext::block_align, SonicContext::channels, SonicContext::coded_samples, SonicContext::decorrelation, SonicContext::downsampling, SonicContext::frame_size, get_bits_count(), get_ue_golomb(), init_get_bits(), SonicContext::int_samples, intlist_read(), LEFT_SIDE, SonicContext::lossless, MID_SIDE, SonicContext::num_taps, predictor_calc_error(), predictor_init_state(), SonicContext::predictor_k, SonicContext::predictor_state, AVCodecContext::priv_data, RIGHT_SIDE, SAMPLE_FACTOR, SAMPLE_SHIFT, shift(), and SonicContext::tap_quant.

| static int sonic_decode_init | ( | AVCodecContext * | avctx | ) | [static] |
Definition at line 749 of file sonic.c.
References av_log(), AV_LOG_ERROR, AV_LOG_INFO, av_mallocz(), SonicContext::block_align, AVCodecContext::channels, SonicContext::channels, SonicContext::coded_samples, SonicContext::decorrelation, SonicContext::downsampling, AVCodecContext::extradata, AVCodecContext::extradata_size, SonicContext::frame_size, get_bits(), get_bits1(), init_get_bits(), SonicContext::int_samples, SonicContext::lossless, MAX_CHANNELS, SonicContext::num_taps, SonicContext::predictor_k, SonicContext::predictor_state, AVCodecContext::priv_data, AVCodecContext::sample_rate, SonicContext::samplerate, skip_bits(), and SonicContext::tap_quant.

int samplerate_table[] [static] |
Initial value:
{ 44100, 22050, 11025, 96000, 48000, 32000, 24000, 16000, 8000 }
Definition at line 480 of file sonic.c.
Referenced by quicktime_esds_samplerate().
1.5.5