libavcodec/mace.c File Reference

MACE decoder. More...

#include "avcodec.h"
#include "libavutil/common.h"

Go to the source code of this file.

Data Structures

struct  ChannelData
struct  MACEContext

Defines

#define QT_8S_2_16S(x)   (((x) & 0xFF00) | (((x) >> 8) & 0xFF))

Functions

static int16_t mace_broken_clip_int16 (int n)
 MACE version of av_clip_int16().
static int16_t read_table (ChannelData *chd, uint8_t val, int tab_idx)
static void chomp3 (ChannelData *chd, int16_t *output, uint8_t val, int tab_idx, uint32_t numChannels)
static void chomp6 (ChannelData *chd, int16_t *output, uint8_t val, int tab_idx, uint32_t numChannels)
static av_cold int mace_decode_init (AVCodecContext *avctx)
static int mace_decode_frame (AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)

Variables

static const int16_t MACEtab1 [] = {-13, 8, 76, 222, 222, 76, 8, -13}
static const int16_t MACEtab3 [] = {-18, 140, 140, -18}
static const int16_t MACEtab2 [][4]
static const int16_t MACEtab4 [][2]
struct {
   const int16_t *   tab1
   const int16_t *   tab2
   int   stride
tabs []
AVCodec ff_mace3_decoder
AVCodec ff_mace6_decoder


Detailed Description

MACE decoder.

Definition in file mace.c.


Define Documentation

#define QT_8S_2_16S (  )     (((x) & 0xFF00) | (((x) >> 8) & 0xFF))

Definition at line 150 of file mace.c.

Referenced by chomp3(), and chomp6().


Function Documentation

static void chomp3 ( ChannelData chd,
int16_t output,
uint8_t  val,
int  tab_idx,
uint32_t  numChannels 
) [static]

Definition at line 190 of file mace.c.

Referenced by mace_decode_frame().

static void chomp6 ( ChannelData chd,
int16_t output,
uint8_t  val,
int  tab_idx,
uint32_t  numChannels 
) [static]

Definition at line 203 of file mace.c.

Referenced by mace_decode_frame().

static int16_t mace_broken_clip_int16 ( int  n  )  [inline, static]

MACE version of av_clip_int16().

We have to do this to keep binary identical output to the binary decoder.

Definition at line 165 of file mace.c.

Referenced by chomp3(), and chomp6().

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

Definition at line 245 of file mace.c.

static av_cold int mace_decode_init ( AVCodecContext avctx  )  [static]

Definition at line 231 of file mace.c.

static int16_t read_table ( ChannelData chd,
uint8_t  val,
int  tab_idx 
) [static]

Definition at line 175 of file mace.c.

Referenced by chomp3(), chomp6(), and read_header().


Variable Documentation

Initial value:

 {
    .name           = "mace3",
    .type           = AVMEDIA_TYPE_AUDIO,
    .id             = AV_CODEC_ID_MACE3,
    .priv_data_size = sizeof(MACEContext),
    .init           = mace_decode_init,
    .decode         = mace_decode_frame,
    .capabilities   = CODEC_CAP_DR1,
    .long_name      = NULL_IF_CONFIG_SMALL("MACE (Macintosh Audio Compression/Expansion) 3:1"),
}

Definition at line 293 of file mace.c.

Initial value:

 {
    .name           = "mace6",
    .type           = AVMEDIA_TYPE_AUDIO,
    .id             = AV_CODEC_ID_MACE6,
    .priv_data_size = sizeof(MACEContext),
    .init           = mace_decode_init,
    .decode         = mace_decode_frame,
    .capabilities   = CODEC_CAP_DR1,
    .long_name      = NULL_IF_CONFIG_SMALL("MACE (Macintosh Audio Compression/Expansion) 6:1"),
}

Definition at line 304 of file mace.c.

const int16_t MACEtab1[] = {-13, 8, 76, 222, 222, 76, 8, -13} [static]

Definition at line 36 of file mace.c.

const int16_t MACEtab2[][4] [static]

Definition at line 40 of file mace.c.

const int16_t MACEtab3[] = {-18, 140, 140, -18} [static]

Definition at line 38 of file mace.c.

const int16_t MACEtab4[][2] [static]

Definition at line 107 of file mace.c.

Definition at line 143 of file mace.c.

const int16_t* tab1

Definition at line 143 of file mace.c.

Referenced by compute_stereo(), dequant(), and main().

const int16_t* tab2

Definition at line 143 of file mace.c.

Referenced by main().

struct { ... } tabs[] [static]

Referenced by read_table(), and very_broken_op().


Generated on Fri Oct 26 02:50:06 2012 for FFmpeg by  doxygen 1.5.8