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:

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]

Definition at line 77 of file sonic.c.

Referenced by sonic_encode_frame().

static int shift ( int  a,
int  b 
) [inline, static]

static int shift_down ( int  a,
int  b 
) [inline, static]

Definition at line 90 of file sonic.c.

Referenced by modified_levinson_durbin(), predictor_calc_error(), and predictor_init_state().

static int intlist_write ( PutBitContext pb,
int *  buf,
int  entries,
int  base_2_part 
) [inline, static]

Definition at line 96 of file sonic.c.

Referenced by sonic_encode_frame().

static int intlist_read ( GetBitContext gb,
int *  buf,
int  entries,
int  base_2_part 
) [inline, static]

Definition at line 106 of file sonic.c.

Referenced by sonic_decode_frame().

static int bits_to_store ( uint64_t  x  )  [static]

Definition at line 120 of file sonic.c.

Referenced by read_uint_max(), and write_uint_max().

static void write_uint_max ( PutBitContext pb,
unsigned int  value,
unsigned int  max 
) [static]

Definition at line 132 of file sonic.c.

static unsigned int read_uint_max ( GetBitContext gb,
int  max 
) [static]

Definition at line 148 of file sonic.c.

static void predictor_init_state ( int *  k,
int *  state,
int  order 
) [static]

Definition at line 364 of file sonic.c.

Referenced by sonic_decode_frame().

static int predictor_calc_error ( int *  k,
int *  state,
int  order,
int  error 
) [static]

Definition at line 381 of file sonic.c.

Referenced by sonic_decode_frame().

static void modified_levinson_durbin ( int *  window,
int  window_entries,
int *  out,
int  out_entries,
int  channels,
int *  tap_quant 
) [static]

Definition at line 416 of file sonic.c.

Referenced by sonic_encode_frame().

static int code_samplerate ( int  samplerate  )  [inline, static]

Definition at line 489 of file sonic.c.

Referenced by sonic_encode_init().

static int sonic_encode_init ( AVCodecContext avctx  )  [static]

Definition at line 506 of file sonic.c.

static int sonic_encode_close ( AVCodecContext avctx  )  [static]

Definition at line 611 of file sonic.c.

static int sonic_encode_frame ( AVCodecContext avctx,
uint8_t *  buf,
int  buf_size,
void *  data 
) [static]

Definition at line 630 of file sonic.c.

static int sonic_decode_init ( AVCodecContext avctx  )  [static]

Definition at line 754 of file sonic.c.

static int sonic_decode_close ( AVCodecContext avctx  )  [static]

Definition at line 834 of file sonic.c.

static int sonic_decode_frame ( AVCodecContext avctx,
void *  data,
int *  data_size,
uint8_t *  buf,
int  buf_size 
) [static]

Definition at line 852 of file sonic.c.


Variable Documentation

int samplerate_table[] [static]

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.


Generated on Sat Dec 18 05:15:56 2010 for MythTV by  doxygen 1.5.5