FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
tta.c File Reference

TTA (The Lossless True Audio) decoder. More...

#include <limits.h>
#include "ttadata.h"
#include "avcodec.h"
#include "get_bits.h"
#include "thread.h"
#include "unary.h"
#include "internal.h"
#include "libavutil/crc.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/opt.h"

Go to the source code of this file.

Data Structures

struct  TTAContext
 

Macros

#define BITSTREAM_READER_LE
 
#define FORMAT_SIMPLE   1
 
#define FORMAT_ENCRYPTED   2
 
#define PRED(x, k)   (int32_t)((((uint64_t)x << k) - x) >> k)
 
#define OFFSET(x)   offsetof(TTAContext, x)
 
#define DEC   (AV_OPT_FLAG_DECODING_PARAM | AV_OPT_FLAG_AUDIO_PARAM)
 

Functions

static void ttafilter_process (TTAFilter *c, int32_t *in)
 
static int tta_check_crc (TTAContext *s, const uint8_t *buf, int buf_size)
 
static uint64_t tta_check_crc64 (uint8_t *pass)
 
static int allocate_buffers (AVCodecContext *avctx)
 
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 int init_thread_copy (AVCodecContext *avctx)
 
static av_cold int tta_decode_close (AVCodecContext *avctx)
 

Variables

static const int64_t tta_channel_layouts [7]
 
static const AVOption options []
 
static const AVClass tta_decoder_class
 
AVCodec ff_tta_decoder
 

Detailed Description

TTA (The Lossless True Audio) decoder.

See Also
http://www.true-audio.com/
http://tta.corecodec.org/
Author
Alex Beregszaszi

Definition in file tta.c.

Macro Definition Documentation

#define BITSTREAM_READER_LE

Definition at line 30 of file tta.c.

#define FORMAT_SIMPLE   1

Definition at line 42 of file tta.c.

#define FORMAT_ENCRYPTED   2

Definition at line 43 of file tta.c.

Referenced by tta_decode_frame(), and tta_decode_init().

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

Definition at line 429 of file tta.c.

Definition at line 430 of file tta.c.

Function Documentation

static void ttafilter_process ( TTAFilter c,
int32_t in 
)
inlinestatic

Definition at line 61 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 102 of file tta.c.

Referenced by tta_decode_frame().

static uint64_t tta_check_crc64 ( uint8_t pass)
static

Definition at line 116 of file tta.c.

Referenced by tta_decode_init().

static int allocate_buffers ( AVCodecContext avctx)
static

Definition at line 131 of file tta.c.

Referenced by init_thread_copy(), and tta_decode_init().

static av_cold int tta_decode_init ( AVCodecContext avctx)
static

Definition at line 150 of file tta.c.

static int tta_decode_frame ( AVCodecContext avctx,
void data,
int *  got_frame_ptr,
AVPacket avpkt 
)
static

Definition at line 240 of file tta.c.

static int init_thread_copy ( AVCodecContext avctx)
static

Definition at line 411 of file tta.c.

static av_cold int tta_decode_close ( AVCodecContext avctx)
static

Definition at line 418 of file tta.c.

Variable Documentation

const int64_t tta_channel_layouts[7]
static
const AVOption options[]
static
Initial value:
= {
{ "password", "Set decoding password", OFFSET(pass), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, DEC },
{ NULL },
}

Definition at line 431 of file tta.c.

const AVClass tta_decoder_class
static
Initial value:
= {
.class_name = "TTA Decoder",
.item_name = av_default_item_name,
.option = options,
}

Definition at line 436 of file tta.c.

AVCodec ff_tta_decoder
Initial value:
= {
.name = "tta",
.priv_data_size = sizeof(TTAContext),
.long_name = NULL_IF_CONFIG_SMALL("TTA (True Audio)"),
.priv_class = &tta_decoder_class,
}

Definition at line 443 of file tta.c.