libavcodec/sonic.c File Reference

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. More...

#include "avcodec.h"
#include "get_bits.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)


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.


Define Documentation

#define BASE_QUANT   0.6

Definition at line 75 of file sonic.c.

#define LATTICE_FACTOR   (1 << LATTICE_SHIFT)

Definition at line 72 of file sonic.c.

#define LATTICE_SHIFT   10

Definition at line 70 of file sonic.c.

Referenced by predictor_calc_error(), and predictor_init_state().

#define LEFT_SIDE   1

Definition at line 43 of file sonic.c.

#define MAX_CHANNELS   2

Definition at line 40 of file sonic.c.

#define MID_SIDE   0

Definition at line 42 of file sonic.c.

#define RATE_VARIATION   3.0

Definition at line 76 of file sonic.c.

#define RIGHT_SIDE   2

Definition at line 44 of file sonic.c.

#define SAMPLE_FACTOR   (1 << SAMPLE_SHIFT)

Definition at line 73 of file sonic.c.

Referenced by predictor_calc_error().

#define SAMPLE_SHIFT   4

Definition at line 71 of file sonic.c.


Function Documentation

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

Definition at line 78 of file sonic.c.

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

Definition at line 107 of file sonic.c.

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

Definition at line 97 of file sonic.c.

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

Definition at line 382 of file sonic.c.

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

Definition at line 365 of file sonic.c.

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

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

Definition at line 91 of file sonic.c.

Referenced by predictor_calc_error(), and predictor_init_state().


Generated on Fri Oct 26 02:46:10 2012 for FFmpeg by  doxygen 1.5.8