TTA (The Lossless True Audio) decoder. More...
Go to the source code of this file.
Data Structures | |
struct | TTAFilter |
struct | TTARice |
struct | TTAChannel |
struct | TTAContext |
Defines | |
#define | BITSTREAM_READER_LE |
#define | FORMAT_SIMPLE 1 |
#define | FORMAT_ENCRYPTED 2 |
#define | MAX_ORDER 16 |
#define | UNFOLD(x) (((x)&1) ? (++(x)>>1) : (-(x)>>1)) |
#define | PRED(x, k) (int32_t)((((uint64_t)x << k) - x) >> k) |
Typedefs | |
typedef struct TTAFilter | TTAFilter |
typedef struct TTARice | TTARice |
typedef struct TTAChannel | TTAChannel |
typedef struct TTAContext | TTAContext |
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 int | tta_check_crc (TTAContext *s, const uint8_t *buf, int buf_size) |
static av_cold int | tta_decode_init (AVCodecContext *avctx) |
static int | tta_decode_frame (AVCodecContext *avctx, void *data, int *got_frame_ptr, 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] |
static const int64_t | tta_channel_layouts [7] |
AVCodec | ff_tta_decoder |
TTA (The Lossless True Audio) decoder.
Definition in file tta.c.
#define BITSTREAM_READER_LE |
#define FORMAT_ENCRYPTED 2 |
Definition at line 38 of file tta.c.
Referenced by tta_decode_init().
#define FORMAT_SIMPLE 1 |
Referenced by tta_decode_frame().
#define UNFOLD | ( | x | ) | (((x)&1) ? (++(x)>>1) : (-(x)>>1)) |
Referenced by tta_decode_frame().
typedef struct TTAChannel TTAChannel |
typedef struct TTAContext TTAContext |
Definition at line 104 of file tta.c.
Referenced by ttafilter_process().
Definition at line 176 of file tta.c.
Referenced by tta_decode_frame().
static int tta_check_crc | ( | TTAContext * | s, |
const uint8_t * | buf, | ||
int | buf_size | ||
) | [static] |
Definition at line 204 of file tta.c.
Referenced by tta_decode_frame(), and tta_decode_init().
static av_cold int tta_decode_close | ( | AVCodecContext * | avctx | ) | [static] |
static int tta_decode_frame | ( | AVCodecContext * | avctx, |
void * | data, | ||
int * | got_frame_ptr, | ||
AVPacket * | avpkt | ||
) | [static] |
static av_cold int tta_decode_init | ( | AVCodecContext * | avctx | ) | [static] |
static int tta_get_unary | ( | GetBitContext * | gb | ) | [static] |
Definition at line 184 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 95 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 117 of file tta.c.
Referenced by tta_decode_frame().
{ .name = "tta", .type = AVMEDIA_TYPE_AUDIO, .id = CODEC_ID_TTA, .priv_data_size = sizeof(TTAContext), .init = tta_decode_init, .close = tta_decode_close, .decode = tta_decode_frame, .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("True Audio (TTA)"), }
const uint32_t shift_1[] [static] |
{ 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 73 of file tta.c.
Referenced by tta_decode_frame(), and ttafilter_init().
Definition at line 86 of file tta.c.
Referenced by rice_init(), and tta_decode_frame().
const int64_t tta_channel_layouts[7] [static] |
{ AV_CH_LAYOUT_STEREO, AV_CH_LAYOUT_STEREO|AV_CH_LOW_FREQUENCY, AV_CH_LAYOUT_QUAD, 0, AV_CH_LAYOUT_5POINT1_BACK, AV_CH_LAYOUT_5POINT1_BACK|AV_CH_BACK_CENTER, AV_CH_LAYOUT_7POINT1_WIDE }
Definition at line 194 of file tta.c.
Referenced by tta_decode_init().
const int32_t ttafilter_configs[4][2] [static] |
{ {10, 1}, {9, 1}, {10, 1}, {12, 0} }
Definition at line 88 of file tta.c.
Referenced by tta_decode_frame().