hvirtual/quicktime/ffmpeg/libavcodec/adx.c File Reference

#include "avcodec.h"

Include dependency graph for adx.c:

Go to the source code of this file.

Data Structures

struct  PREV
struct  ADXContext

Defines

#define BASEVOL   0x4000
#define SCALE1   0x7298
#define SCALE2   0x3350
#define CLIP(s)   if (s>32767) s=32767; else if (s<-32768) s=-32768

Functions

static void adx_decode (short *out, const unsigned char *in, PREV *prev)
static void adx_decode_stereo (short *out, const unsigned char *in, PREV *prev)
static uint32_t read_long (const unsigned char *p)
int is_adx (const unsigned char *buf, size_t bufsize)
static int adx_decode_header (AVCodecContext *avctx, const unsigned char *buf, size_t bufsize)
static int adx_decode_init (AVCodecContext *avctx)
static int adx_decode_frame (AVCodecContext *avctx, void *data, int *data_size, uint8_t *buf0, int buf_size)

Variables

AVCodec adx_adpcm_decoder


Detailed Description

SEGA CRI adx codecs.

Reference documents: http://ku-www.ss.titech.ac.jp/~yatsushi/adx.html adx2wav & wav2adx http://www.geocities.co.jp/Playtown/2004/

Definition in file adx.c.


Define Documentation

#define BASEVOL   0x4000

Definition at line 43 of file adx.c.

Referenced by adx_decode().

#define CLIP ( s   )     if (s>32767) s=32767; else if (s<-32768) s=-32768

Definition at line 47 of file adx.c.

#define SCALE1   0x7298

Definition at line 44 of file adx.c.

Referenced by adx_decode().

#define SCALE2   0x3350

Definition at line 45 of file adx.c.

Referenced by adx_decode().


Function Documentation

static void adx_decode ( short *  out,
const unsigned char *  in,
PREV prev 
) [static]

Definition at line 96 of file adx.c.

References BASEVOL, CLIP, s0, PREV::s1, s1, PREV::s2, s2, SCALE1, and SCALE2.

Referenced by adx_decode_frame(), and adx_decode_stereo().

static int adx_decode_frame ( AVCodecContext avctx,
void *  data,
int *  data_size,
uint8_t *  buf0,
int  buf_size 
) [static]

static int adx_decode_header ( AVCodecContext avctx,
const unsigned char *  buf,
size_t  bufsize 
) [static]

Definition at line 281 of file adx.c.

References AVCodecContext::bit_rate, AVCodecContext::channels, is_adx(), offset, read_long(), and AVCodecContext::sample_rate.

Referenced by adx_decode_frame().

Here is the call graph for this function:

static int adx_decode_init ( AVCodecContext avctx  )  [static]

static void adx_decode_stereo ( short *  out,
const unsigned char *  in,
PREV prev 
) [static]

Definition at line 131 of file adx.c.

References adx_decode().

Referenced by adx_decode_frame().

Here is the call graph for this function:

int is_adx ( const unsigned char *  buf,
size_t  bufsize 
)

Definition at line 270 of file adx.c.

References memcmp, offset, and read_long().

Referenced by adx_decode_header().

Here is the call graph for this function:

static uint32_t read_long ( const unsigned char *  p  )  [static]

Definition at line 265 of file adx.c.

Referenced by adx_decode_header(), and is_adx().


Variable Documentation

Initial value:

Definition at line 400 of file adx.c.


Generated on Mon Apr 28 14:03:15 2008 for Cinelerra by  doxygen 1.5.5