FFmpeg
Macros | Functions | Variables
dcadec.c File Reference
#include "libavutil/opt.h"
#include "libavutil/channel_layout.h"
#include "libavutil/thread.h"
#include "dcadec.h"
#include "dcahuff.h"
#include "dca_syncwords.h"
#include "profiles.h"

Go to the source code of this file.

Macros

#define MIN_PACKET_SIZE   16
 
#define MAX_PACKET_SIZE   0x104000
 
#define OFFSET(x)   offsetof(DCAContext, x)
 
#define PARAM   AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_DECODING_PARAM
 

Functions

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 void dcadec_init_static (void)
 
static av_cold int dcadec_init (AVCodecContext *avctx)
 

Variables

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

Macro Definition Documentation

◆ MIN_PACKET_SIZE

#define MIN_PACKET_SIZE   16

Definition at line 30 of file dcadec.c.

◆ MAX_PACKET_SIZE

#define MAX_PACKET_SIZE   0x104000

Definition at line 31 of file dcadec.c.

◆ OFFSET

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

Definition at line 376 of file dcadec.c.

◆ PARAM

Definition at line 377 of file dcadec.c.

Function Documentation

◆ ff_dca_set_channel_layout()

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

Definition at line 33 of file dcadec.c.

Referenced by ff_dca_core_filter_frame(), and ff_dca_xll_filter_frame().

◆ ff_dca_downmix_to_stereo_fixed()

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

Definition at line 80 of file dcadec.c.

Referenced by ff_dca_xll_filter_frame(), and filter_frame_fixed().

◆ ff_dca_downmix_to_stereo_float()

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

Definition at line 111 of file dcadec.c.

Referenced by filter_frame_float().

◆ dcadec_decode_frame()

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

Definition at line 145 of file dcadec.c.

◆ dcadec_flush()

static av_cold void dcadec_flush ( AVCodecContext avctx)
static

Definition at line 297 of file dcadec.c.

◆ dcadec_close()

static av_cold int dcadec_close ( AVCodecContext avctx)
static

Definition at line 308 of file dcadec.c.

◆ dcadec_init_static()

static av_cold void dcadec_init_static ( void  )
static

Definition at line 322 of file dcadec.c.

Referenced by dcadec_init().

◆ dcadec_init()

static av_cold int dcadec_init ( AVCodecContext avctx)
static

Definition at line 328 of file dcadec.c.

Variable Documentation

◆ dcadec_options

const AVOption dcadec_options[]
static
Initial value:
= {
{ "core_only", "Decode core only without extensions", OFFSET(core_only), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, PARAM },
{ NULL }
}

Definition at line 379 of file dcadec.c.

◆ dcadec_class

const AVClass dcadec_class
static
Initial value:
= {
.class_name = "DCA decoder",
.item_name = av_default_item_name,
.option = dcadec_options,
}

Definition at line 384 of file dcadec.c.

◆ ff_dca_decoder

const 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,
}

Definition at line 392 of file dcadec.c.

AV_SAMPLE_FMT_FLTP
@ AV_SAMPLE_FMT_FLTP
float, planar
Definition: samplefmt.h:69
dcadec_decode_frame
static int dcadec_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)
Definition: dcadec.c:145
FF_CODEC_CAP_INIT_THREADSAFE
#define FF_CODEC_CAP_INIT_THREADSAFE
The codec does not modify any global variables in the init function, allowing to call the init functi...
Definition: internal.h:42
dcadec_close
static av_cold int dcadec_close(AVCodecContext *avctx)
Definition: dcadec.c:308
AV_CLASS_CATEGORY_DECODER
@ AV_CLASS_CATEGORY_DECODER
Definition: log.h:35
sample_fmts
static enum AVSampleFormat sample_fmts[]
Definition: adpcmenc.c:948
AV_SAMPLE_FMT_S32P
@ AV_SAMPLE_FMT_S32P
signed 32 bits, planar
Definition: samplefmt.h:68
dcadec_init
static av_cold int dcadec_init(AVCodecContext *avctx)
Definition: dcadec.c:328
init
static int init
Definition: av_tx.c:47
ff_dca_profiles
const AVProfile ff_dca_profiles[]
Definition: profiles.c:38
dcadec_flush
static av_cold void dcadec_flush(AVCodecContext *avctx)
Definition: dcadec.c:297
decode
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
Definition: decode_audio.c:71
dcadec_options
static const AVOption dcadec_options[]
Definition: dcadec.c:379
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
LIBAVUTIL_VERSION_INT
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
flush
static void flush(AVCodecContext *avctx)
Definition: aacdec_template.c:593
NULL
#define NULL
Definition: coverity.c:32
av_default_item_name
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:235
OFFSET
#define OFFSET(x)
Definition: dcadec.c:376
AV_CODEC_CAP_CHANNEL_CONF
#define AV_CODEC_CAP_CHANNEL_CONF
Codec should fill in channel configuration and samplerate instead of container.
Definition: codec.h:109
AV_CODEC_CAP_DR1
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
Definition: codec.h:52
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:117
PARAM
#define PARAM
Definition: dcadec.c:377
AV_CODEC_ID_DTS
@ AV_CODEC_ID_DTS
Definition: codec_id.h:427
AV_SAMPLE_FMT_NONE
@ AV_SAMPLE_FMT_NONE
Definition: samplefmt.h:59
AV_SAMPLE_FMT_S16P
@ AV_SAMPLE_FMT_S16P
signed 16 bits, planar
Definition: samplefmt.h:67
DCAContext
Definition: dcadec.h:46
FF_CODEC_CAP_INIT_CLEANUP
#define 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:50
AVSampleFormat
AVSampleFormat
Audio sample formats.
Definition: samplefmt.h:58
dcadec_class
static const AVClass dcadec_class
Definition: dcadec.c:384
AV_OPT_TYPE_BOOL
@ AV_OPT_TYPE_BOOL
Definition: opt.h:241