libavcodec/tta.c File Reference

TTA (The Lossless True Audio) decoder (www.true-audio.com or tta.corecodec.org). More...

#include <limits.h>
#include "avcodec.h"
#include "get_bits.h"

Go to the source code of this file.

Data Structures

struct  TTAContext
struct  TTAFilter
struct  TTARice

Defines

#define ALT_BITSTREAM_READER_LE
#define FORMAT_INT   1
#define FORMAT_FLOAT   3
#define MAX_ORDER   16
#define FRAME_TIME   1.04489795918367346939
#define UNFOLD(x)   (((x)&1) ? (++(x)>>1) : (-(x)>>1))
#define PRED(x, k)   (int32_t)((((uint64_t)x << k) - x) >> k)

Functions

static void ttafilter_init (TTAFilter *c, int32_t shift, int32_t mode)
static void memshl (register int32_t *a, register int32_t *b)
static void ttafilter_process (TTAFilter *c, int32_t *in, int32_t mode)
static void rice_init (TTARice *c, uint32_t k0, uint32_t k1)
static int tta_get_unary (GetBitContext *gb)
static av_cold int tta_decode_init (AVCodecContext *avctx)
static int tta_decode_frame (AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt)
static av_cold int tta_decode_close (AVCodecContext *avctx)

Variables

static const uint32_t shift_1 []
static const uint32_t *const shift_16 = shift_1 + 4
static const int32_t ttafilter_configs [4][2]
AVCodec tta_decoder


Detailed Description

TTA (The Lossless True Audio) decoder (www.true-audio.com or tta.corecodec.org).

Author:
Alex Beregszaszi

Definition in file tta.c.


Define Documentation

#define ALT_BITSTREAM_READER_LE

Definition at line 30 of file tta.c.

#define FORMAT_FLOAT   3

Definition at line 37 of file tta.c.

Referenced by tta_decode_init().

#define FORMAT_INT   1

Definition at line 36 of file tta.c.

#define FRAME_TIME   1.04489795918367346939

Referenced by tta_decode_init().

#define MAX_ORDER   16

Definition at line 82 of file tta.c.

#define PRED ( x,
 )     (int32_t)((((uint64_t)x << k) - x) >> k)

Referenced by tta_decode_frame().

#define UNFOLD (  )     (((x)&1) ? (++(x)>>1) : (-(x)>>1))

Referenced by tta_decode_frame().


Function Documentation

static void memshl ( register int32_t *  a,
register int32_t *  b 
) [inline, static]

Definition at line 106 of file tta.c.

Referenced by ttafilter_process().

static void rice_init ( TTARice c,
uint32_t  k0,
uint32_t  k1 
) [static]

Definition at line 182 of file tta.c.

Referenced by tta_decode_frame().

static av_cold int tta_decode_close ( AVCodecContext avctx  )  [static]

Definition at line 441 of file tta.c.

static int tta_decode_frame ( AVCodecContext avctx,
void *  data,
int *  data_size,
AVPacket avpkt 
) [static]

Definition at line 288 of file tta.c.

static av_cold int tta_decode_init ( AVCodecContext avctx  )  [static]

Definition at line 200 of file tta.c.

static int tta_get_unary ( GetBitContext gb  )  [static]

Definition at line 190 of file tta.c.

Referenced by tta_decode_frame().

static void ttafilter_init ( TTAFilter c,
int32_t  shift,
int32_t  mode 
) [static]

Definition at line 97 of file tta.c.

Referenced by tta_decode_frame().

static void ttafilter_process ( TTAFilter c,
int32_t *  in,
int32_t  mode 
) [inline, static]

Definition at line 119 of file tta.c.

Referenced by tta_decode_frame().


Variable Documentation

const uint32_t shift_1[] [static]

Initial value:

 {
    0x00000001, 0x00000002, 0x00000004, 0x00000008,
    0x00000010, 0x00000020, 0x00000040, 0x00000080,
    0x00000100, 0x00000200, 0x00000400, 0x00000800,
    0x00001000, 0x00002000, 0x00004000, 0x00008000,
    0x00010000, 0x00020000, 0x00040000, 0x00080000,
    0x00100000, 0x00200000, 0x00400000, 0x00800000,
    0x01000000, 0x02000000, 0x04000000, 0x08000000,
    0x10000000, 0x20000000, 0x40000000, 0x80000000,
    0x80000000, 0x80000000, 0x80000000, 0x80000000,
    0x80000000, 0x80000000, 0x80000000, 0x80000000
}

Definition at line 66 of file tta.c.

const uint32_t* const shift_16 = shift_1 + 4 [static]

Definition at line 79 of file tta.c.

Initial value:

 {
    "tta",
    AVMEDIA_TYPE_AUDIO,
    CODEC_ID_TTA,
    sizeof(TTAContext),
    tta_decode_init,
    NULL,
    tta_decode_close,
    tta_decode_frame,
    .long_name = NULL_IF_CONFIG_SMALL("True Audio (TTA)"),
}

Definition at line 450 of file tta.c.

const int32_t ttafilter_configs[4][2] [static]

Initial value:

 {
    {10, 1},
    {9, 1},
    {10, 1},
    {12, 0}
}

Definition at line 90 of file tta.c.


Generated on Fri Oct 26 02:36:53 2012 for FFmpeg by  doxygen 1.5.8