All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
dcadec.c File Reference
#include "libavutil/opt.h"
#include "libavutil/channel_layout.h"
#include "dcadec.h"
#include "dcahuff.h"
#include "dca_syncwords.h"
#include "profiles.h"

Go to the source code of this file.


#define MIN_PACKET_SIZE   16
#define MAX_PACKET_SIZE   0x104000
#define OFFSET(x)   offsetof(DCAContext, x)


int ff_dca_set_channel_layout (AVCodecContext *avctx, int *ch_remap, int dca_mask)
void ff_dca_downmix_to_stereo_fixed (DCADSPContext *dcadsp, int32_t **samples, int *coeff_l, int nsamples, int ch_mask)
void ff_dca_downmix_to_stereo_float (AVFloatDSPContext *fdsp, float **samples, int *coeff_l, int nsamples, int ch_mask)
static int dcadec_decode_frame (AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)
static av_cold void dcadec_flush (AVCodecContext *avctx)
static av_cold int dcadec_close (AVCodecContext *avctx)
static av_cold int dcadec_init (AVCodecContext *avctx)


static const AVOption dcadec_options []
static const AVClass dcadec_class
AVCodec ff_dca_decoder

Macro Definition Documentation

#define MIN_PACKET_SIZE   16

Definition at line 29 of file dcadec.c.

Referenced by dcadec_decode_frame().

#define MAX_PACKET_SIZE   0x104000

Definition at line 30 of file dcadec.c.

Referenced by dcadec_decode_frame().

#define OFFSET (   x)    offsetof(DCAContext, x)

Definition at line 368 of file dcadec.c.

Definition at line 369 of file dcadec.c.

Function Documentation

int ff_dca_set_channel_layout ( AVCodecContext avctx,
int *  ch_remap,
int  dca_mask 

Definition at line 32 of file dcadec.c.

Referenced by ff_dca_core_filter_frame(), and ff_dca_xll_filter_frame().

void ff_dca_downmix_to_stereo_fixed ( DCADSPContext dcadsp,
int32_t **  samples,
int *  coeff_l,
int  nsamples,
int  ch_mask 

Definition at line 79 of file dcadec.c.

Referenced by ff_dca_xll_filter_frame(), and filter_frame_fixed().

void ff_dca_downmix_to_stereo_float ( AVFloatDSPContext fdsp,
float **  samples,
int *  coeff_l,
int  nsamples,
int  ch_mask 

Definition at line 110 of file dcadec.c.

Referenced by filter_frame_float().

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

Definition at line 144 of file dcadec.c.

static av_cold void dcadec_flush ( AVCodecContext avctx)

Definition at line 296 of file dcadec.c.

static av_cold int dcadec_close ( AVCodecContext avctx)

Definition at line 307 of file dcadec.c.

static av_cold int dcadec_init ( AVCodecContext avctx)

Definition at line 321 of file dcadec.c.

Variable Documentation

const AVOption dcadec_options[]
Initial value:
= {
{ "core_only", "Decode core only without extensions", OFFSET(core_only), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, PARAM },
{ NULL }
#define NULL
Definition: coverity.c:32
#define OFFSET(x)
Definition: dcadec.c:368
#define PARAM
Definition: dcadec.c:369

Definition at line 371 of file dcadec.c.

const AVClass dcadec_class
Initial value:
= {
.class_name = "DCA decoder",
.item_name = av_default_item_name,
.option = dcadec_options,
Definition: version.h:70
static const AVOption dcadec_options[]
Definition: dcadec.c:371

Definition at line 376 of file dcadec.c.

AVCodec ff_dca_decoder
Initial value:
= {
.name = "dca",
.long_name = NULL_IF_CONFIG_SMALL("DCA (DTS Coherent Acoustics)"),
.priv_data_size = sizeof(DCAContext),
.close = dcadec_close,
.priv_class = &dcadec_class,
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
The codec allows calling the close function for deallocation even if the init function returned a fai...
Definition: internal.h:48
float, planar
Definition: samplefmt.h:69
static const AVClass dcadec_class
Definition: dcadec.c:376
static void flush(AVCodecContext *avctx)
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
static av_cold int dcadec_init(AVCodecContext *avctx)
Definition: dcadec.c:321
static av_cold int dcadec_close(AVCodecContext *avctx)
Definition: dcadec.c:307
Codec should fill in channel configuration and samplerate instead of container.
Definition: avcodec.h:1015
static av_cold void dcadec_flush(AVCodecContext *avctx)
Definition: dcadec.c:296
static int dcadec_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)
Definition: dcadec.c:144
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:176
signed 32 bits, planar
Definition: samplefmt.h:68
Audio sample formats.
Definition: samplefmt.h:58
const AVProfile ff_dca_profiles[]
Definition: profiles.c:39
static int decode(AVCodecContext *avctx, void *data, int *got_sub, AVPacket *avpkt)
Definition: ccaption_dec.c:722
static enum AVSampleFormat sample_fmts[]
Definition: adpcmenc.c:701
signed 16 bits, planar
Definition: samplefmt.h:67
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: avcodec.h:956

Definition at line 384 of file dcadec.c.