FFmpeg
Data Structures | Macros | Functions
sonic.c File Reference
#include "config_components.h"
#include "libavutil/mem.h"
#include "avcodec.h"
#include "codec_internal.h"
#include "decode.h"
#include "encode.h"
#include "get_bits.h"
#include "golomb.h"
#include "put_golomb.h"
#include "rangecoder.h"

Go to the source code of this file.

Data Structures

struct  SonicContext
 

Macros

#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 shift (int a, int b)
 
static int shift_down (int a, int b)
 

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.

Macro Definition Documentation

◆ MAX_CHANNELS

#define MAX_CHANNELS   2

Definition at line 50 of file sonic.c.

◆ MID_SIDE

#define MID_SIDE   0

Definition at line 52 of file sonic.c.

◆ LEFT_SIDE

#define LEFT_SIDE   1

Definition at line 53 of file sonic.c.

◆ RIGHT_SIDE

#define RIGHT_SIDE   2

Definition at line 54 of file sonic.c.

◆ LATTICE_SHIFT

#define LATTICE_SHIFT   10

Definition at line 81 of file sonic.c.

◆ SAMPLE_SHIFT

#define SAMPLE_SHIFT   4

Definition at line 82 of file sonic.c.

◆ LATTICE_FACTOR

#define LATTICE_FACTOR   (1 << LATTICE_SHIFT)

Definition at line 83 of file sonic.c.

◆ SAMPLE_FACTOR

#define SAMPLE_FACTOR   (1 << SAMPLE_SHIFT)

Definition at line 84 of file sonic.c.

◆ BASE_QUANT

#define BASE_QUANT   0.6

Definition at line 86 of file sonic.c.

◆ RATE_VARIATION

#define RATE_VARIATION   3.0

Definition at line 87 of file sonic.c.

Function Documentation

◆ shift()

static int shift ( int  a,
int  b 
)
inlinestatic

Definition at line 89 of file sonic.c.

◆ shift_down()

static int shift_down ( int  a,
int  b 
)
inlinestatic

Definition at line 94 of file sonic.c.