FFmpeg
Data Structures | Macros | Functions | Variables
8svx.c File Reference
#include "libavutil/avassert.h"
#include "avcodec.h"
#include "internal.h"
#include "libavutil/common.h"

Go to the source code of this file.

Data Structures

struct  EightSvxContext
 decoder context More...
 

Macros

#define MAX_FRAME_SIZE   2048
 

Functions

static void delta_decode (uint8_t *dst, const uint8_t *src, int src_size, uint8_t *state, const int8_t *table)
 Delta decode the compressed values in src, and put the resulting decoded samples in dst. More...
 
static int eightsvx_decode_frame (AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)
 decode a frame More...
 
static av_cold int eightsvx_decode_init (AVCodecContext *avctx)
 
static av_cold int eightsvx_decode_close (AVCodecContext *avctx)
 

Variables

static const int8_t fibonacci [16] = { -34, -21, -13, -8, -5, -3, -2, -1, 0, 1, 2, 3, 5, 8, 13, 21 }
 
static const int8_t exponential [16] = { -128, -64, -32, -16, -8, -4, -2, -1, 0, 1, 2, 4, 8, 16, 32, 64 }
 

Detailed Description

8svx audio decoder

Author
Jaikrishnan Menon

supports: fibonacci delta encoding : exponential encoding

For more information about the 8SVX format: http://netghost.narod.ru/gff/vendspec/iff/iff.txt http://sox.sourceforge.net/AudioFormats-11.html http://aminet.net/package/mus/misc/wavepak http://amigan.1emu.net/reg/8SVX.txt

Samples can be found here: http://aminet.net/mods/smpl/

Definition in file 8svx.c.

Macro Definition Documentation

◆ MAX_FRAME_SIZE

#define MAX_FRAME_SIZE   2048

Definition at line 60 of file 8svx.c.

Function Documentation

◆ delta_decode()

static void delta_decode ( uint8_t dst,
const uint8_t src,
int  src_size,
uint8_t state,
const int8_t *  table 
)
static

Delta decode the compressed values in src, and put the resulting decoded samples in dst.

Parameters
[in,out]statestarting value. it is saved for use in the next call.
tabledelta sequence table

Definition at line 69 of file 8svx.c.

Referenced by eightsvx_decode_frame().

◆ eightsvx_decode_frame()

static int eightsvx_decode_frame ( AVCodecContext avctx,
void *  data,
int got_frame_ptr,
AVPacket avpkt 
)
static

decode a frame

Definition at line 86 of file 8svx.c.

◆ eightsvx_decode_init()

static av_cold int eightsvx_decode_init ( AVCodecContext avctx)
static

Definition at line 154 of file 8svx.c.

◆ eightsvx_decode_close()

static av_cold int eightsvx_decode_close ( AVCodecContext avctx)
static

Definition at line 175 of file 8svx.c.

Variable Documentation

◆ fibonacci

const int8_t fibonacci[16] = { -34, -21, -13, -8, -5, -3, -2, -1, 0, 1, 2, 3, 5, 8, 13, 21 }
static

Definition at line 57 of file 8svx.c.

Referenced by eightsvx_decode_init().

◆ exponential

const int8_t exponential[16] = { -128, -64, -32, -16, -8, -4, -2, -1, 0, 1, 2, 4, 8, 16, 32, 64 }
static

Definition at line 58 of file 8svx.c.

Referenced by eightsvx_decode_init().