libavcodec/takdec.c File Reference

TAK (Tom's lossless Audio Kompressor) decoder. More...

#include "libavutil/internal.h"
#include "libavutil/samplefmt.h"
#include "tak.h"
#include "avcodec.h"
#include "dsputil.h"
#include "internal.h"
#include "unary.h"
Include dependency graph for libavcodec/takdec.c:

Go to the source code of this file.

Data Structures

struct  MCDParam
 
struct  TAKDecContext
 
struct  CParam
 

Macros

#define MAX_SUBFRAMES   8
 max number of subframes per channel More...
 
#define MAX_PREDICTORS   256
 

Typedefs

typedef struct MCDParam MCDParam
 
typedef struct TAKDecContext TAKDecContext
 

Functions

static int set_bps_params (AVCodecContext *avctx)
 
static void set_sample_rate_params (AVCodecContext *avctx)
 
static av_cold int tak_decode_init (AVCodecContext *avctx)
 
static void decode_lpc (int32_t *coeffs, int mode, int length)
 
static int decode_segment (TAKDecContext *s, int8_t mode, int32_t *decoded, int len)
 
static int decode_residues (TAKDecContext *s, int32_t *decoded, int length)
 
static int get_bits_esc4 (GetBitContext *gb)
 
static int decode_subframe (TAKDecContext *s, int32_t *decoded, int subframe_size, int prev_subframe_size)
 
static int decode_channel (TAKDecContext *s, int chan)
 
static int decorrelate (TAKDecContext *s, int c1, int c2, int length)
 
static int tak_decode_frame (AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *pkt)
 
static av_cold int tak_decode_close (AVCodecContext *avctx)
 

Variables

static const int8_t mc_dmodes [] = { 1, 3, 4, 6, }
 
static const uint16_t predictor_sizes []
 
static const struct CParam xcodes [50]
 
AVCodec ff_tak_decoder
 

Detailed Description

TAK (Tom's lossless Audio Kompressor) decoder.

Author
Paul B Mahol

Definition in file libavcodec/takdec.c.

Macro Definition Documentation

#define MAX_PREDICTORS   256

Definition at line 37 of file libavcodec/takdec.c.

Referenced by decode_subframe().

#define MAX_SUBFRAMES   8

max number of subframes per channel

Definition at line 36 of file libavcodec/takdec.c.

Typedef Documentation

typedef struct MCDParam MCDParam
typedef struct TAKDecContext TAKDecContext

Function Documentation

static int decode_channel ( TAKDecContext s,
int  chan 
)
static

Definition at line 508 of file libavcodec/takdec.c.

Referenced by tak_decode_frame().

static void decode_lpc ( int32_t coeffs,
int  mode,
int  length 
)
static

Definition at line 184 of file libavcodec/takdec.c.

Referenced by decode_subframe(), and tak_decode_frame().

static int decode_residues ( TAKDecContext s,
int32_t decoded,
int  length 
)
static

Definition at line 283 of file libavcodec/takdec.c.

Referenced by decode_subframe().

static int decode_segment ( TAKDecContext s,
int8_t  mode,
int32_t decoded,
int  len 
)
static

Definition at line 239 of file libavcodec/takdec.c.

Referenced by decode_residues().

static int decode_subframe ( TAKDecContext s,
int32_t decoded,
int  subframe_size,
int  prev_subframe_size 
)
static

Definition at line 370 of file libavcodec/takdec.c.

Referenced by decode_channel().

static int decorrelate ( TAKDecContext s,
int  c1,
int  c2,
int  length 
)
static

Definition at line 555 of file libavcodec/takdec.c.

Referenced by tak_decode_frame().

static int get_bits_esc4 ( GetBitContext gb)
static

Definition at line 362 of file libavcodec/takdec.c.

Referenced by decode_channel(), decode_subframe(), and decorrelate().

static int set_bps_params ( AVCodecContext avctx)
static

Definition at line 139 of file libavcodec/takdec.c.

Referenced by tak_decode_frame(), and tak_decode_init().

static void set_sample_rate_params ( AVCodecContext avctx)
static

Definition at line 160 of file libavcodec/takdec.c.

Referenced by tak_decode_frame(), and tak_decode_init().

static av_cold int tak_decode_close ( AVCodecContext avctx)
static

Definition at line 915 of file libavcodec/takdec.c.

static int tak_decode_frame ( AVCodecContext avctx,
void data,
int *  got_frame_ptr,
AVPacket pkt 
)
static

Definition at line 684 of file libavcodec/takdec.c.

static av_cold int tak_decode_init ( AVCodecContext avctx)
static

Definition at line 169 of file libavcodec/takdec.c.

Variable Documentation

AVCodec ff_tak_decoder
Initial value:
= {
.name = "tak",
.priv_data_size = sizeof(TAKDecContext),
.capabilities = CODEC_CAP_DR1,
.long_name = NULL_IF_CONFIG_SMALL("TAK (Tom's lossless Audio Kompressor)"),
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_U8P,
}
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
static av_cold int tak_decode_close(AVCodecContext *avctx)
#define CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
signed 32 bits, planar
Definition: samplefmt.h:59
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
static av_cold int tak_decode_init(AVCodecContext *avctx)
static void close(AVCodecParserContext *s)
Definition: h264_parser.c:375
struct TAKDecContext TAKDecContext
AVSampleFormat
Audio Sample Formats.
Definition: samplefmt.h:49
static int tak_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *pkt)
unsigned 8 bits, planar
Definition: samplefmt.h:57
signed 16 bits, planar
Definition: samplefmt.h:58
static int decode(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
Definition: crystalhd.c:868

Definition at line 924 of file libavcodec/takdec.c.

const int8_t mc_dmodes[] = { 1, 3, 4, 6, }
static

Definition at line 74 of file libavcodec/takdec.c.

Referenced by tak_decode_frame().

const uint16_t predictor_sizes[]
static
Initial value:
= {
4, 8, 12, 16, 24, 32, 48, 64, 80, 96, 128, 160, 192, 224, 256, 0,
}

Definition at line 76 of file libavcodec/takdec.c.

Referenced by decode_subframe().

const struct CParam xcodes[50]
static

Referenced by decode_segment().