libavcodec/8svx.c File Reference

8svx audio decoder More...

#include "avcodec.h"

Go to the source code of this file.

Data Structures

struct  EightSvxContext
 decoder context More...

Defines

#define MAX_FRAME_SIZE   2048

Functions

static void interleave_stereo (uint8_t *dst, const uint8_t *src, int size)
 Interleave samples in buffer containing all left channel samples at the beginning, and right channel samples at the end.
static int delta_decode (int8_t *dst, const uint8_t *src, int src_size, int8_t val, const int8_t *table)
 Delta decode the compressed values in src, and put the resulting decoded n samples in dst.
static int eightsvx_decode_frame (AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)
 decode a frame
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 }
AVCodec ff_eightsvx_fib_decoder
AVCodec ff_eightsvx_exp_decoder
AVCodec ff_pcm_s8_planar_decoder


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.


Define Documentation

#define MAX_FRAME_SIZE   2048

Definition at line 57 of file 8svx.c.

Referenced by eightsvx_decode_frame(), g722_encode_init(), and read_packet().


Function Documentation

static int delta_decode ( int8_t *  dst,
const uint8_t src,
int  src_size,
int8_t  val,
const int8_t *  table 
) [static]

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

Parameters:
val starting value assumed by the delta sequence
table delta sequence table
Returns:
size in bytes of the decoded data, must be src_size*2

Definition at line 86 of file 8svx.c.

Referenced by eightsvx_decode_frame().

static av_cold int eightsvx_decode_close ( AVCodecContext avctx  )  [static]

Definition at line 200 of file 8svx.c.

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

decode a frame

Definition at line 104 of file 8svx.c.

static av_cold int eightsvx_decode_init ( AVCodecContext avctx  )  [static]

Definition at line 174 of file 8svx.c.

static void interleave_stereo ( uint8_t dst,
const uint8_t src,
int  size 
) [static]

Interleave samples in buffer containing all left channel samples at the beginning, and right channel samples at the end.

Each sample is assumed to be in signed 8-bit format.

Parameters:
size the size in bytes of the dst and src buffer

Definition at line 66 of file 8svx.c.

Referenced by eightsvx_decode_frame().


Variable Documentation

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 55 of file 8svx.c.

Referenced by eightsvx_decode_init().

Initial value:

 {
  .name           = "8svx_exp",
  .type           = AVMEDIA_TYPE_AUDIO,
  .id             = CODEC_ID_8SVX_EXP,
  .priv_data_size = sizeof (EightSvxContext),
  .init           = eightsvx_decode_init,
  .decode         = eightsvx_decode_frame,
  .close          = eightsvx_decode_close,
  .capabilities   = CODEC_CAP_DR1,
  .long_name      = NULL_IF_CONFIG_SMALL("8SVX exponential"),
}

Definition at line 223 of file 8svx.c.

Initial value:

 {
  .name           = "8svx_fib",
  .type           = AVMEDIA_TYPE_AUDIO,
  .id             = CODEC_ID_8SVX_FIB,
  .priv_data_size = sizeof (EightSvxContext),
  .init           = eightsvx_decode_init,
  .decode         = eightsvx_decode_frame,
  .close          = eightsvx_decode_close,
  .capabilities   = CODEC_CAP_DR1,
  .long_name      = NULL_IF_CONFIG_SMALL("8SVX fibonacci"),
}

Definition at line 211 of file 8svx.c.

Initial value:

 {
    .name           = "pcm_s8_planar",
    .type           = AVMEDIA_TYPE_AUDIO,
    .id             = CODEC_ID_PCM_S8_PLANAR,
    .priv_data_size = sizeof(EightSvxContext),
    .init           = eightsvx_decode_init,
    .close          = eightsvx_decode_close,
    .decode         = eightsvx_decode_frame,
    .capabilities   = CODEC_CAP_DR1,
    .long_name      = NULL_IF_CONFIG_SMALL("PCM signed 8-bit planar"),
}

Definition at line 235 of file 8svx.c.

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 54 of file 8svx.c.

Referenced by eightsvx_decode_init().


Generated on Fri Oct 26 02:47:54 2012 for FFmpeg by  doxygen 1.5.8