FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
libfdk-aacdec.c File Reference
#include <fdk-aac/aacdecoder_lib.h>
#include "libavutil/channel_layout.h"
#include "libavutil/common.h"
#include "libavutil/opt.h"
#include "avcodec.h"
#include "internal.h"

Go to the source code of this file.

Data Structures

struct  FDKAACDecContext
 

Macros

#define FDKDEC_VER_AT_LEAST(vl0, vl1)   0
 
#define AAC_PCM_MAX_OUTPUT_CHANNELS   AAC_PCM_OUTPUT_CHANNELS
 
#define DMX_ANC_BUFFSIZE   128
 
#define DECODER_MAX_CHANNELS   8
 
#define DECODER_BUFFSIZE   2048 * sizeof(INT_PCM)
 
#define OFFSET(x)   offsetof(FDKAACDecContext, x)
 
#define AD   AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_DECODING_PARAM
 

Enumerations

enum  ConcealMethod { CONCEAL_METHOD_SPECTRAL_MUTING = 0, CONCEAL_METHOD_NOISE_SUBSTITUTION = 1, CONCEAL_METHOD_ENERGY_INTERPOLATION = 2, CONCEAL_METHOD_NB }
 

Functions

static int get_stream_info (AVCodecContext *avctx)
 
static av_cold int fdk_aac_decode_close (AVCodecContext *avctx)
 
static av_cold int fdk_aac_decode_init (AVCodecContext *avctx)
 
static int fdk_aac_decode_frame (AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)
 
static av_cold void fdk_aac_decode_flush (AVCodecContext *avctx)
 

Variables

static const AVOption fdk_aac_dec_options []
 
static const AVClass fdk_aac_dec_class
 
AVCodec ff_libfdk_aac_decoder
 

Macro Definition Documentation

#define FDKDEC_VER_AT_LEAST (   vl0,
  vl1 
)    0

Definition at line 33 of file libfdk-aacdec.c.

#define AAC_PCM_MAX_OUTPUT_CHANNELS   AAC_PCM_OUTPUT_CHANNELS

Definition at line 37 of file libfdk-aacdec.c.

Referenced by fdk_aac_decode_init().

#define DMX_ANC_BUFFSIZE   128

Definition at line 63 of file libfdk-aacdec.c.

Referenced by fdk_aac_decode_init().

#define DECODER_MAX_CHANNELS   8

Definition at line 64 of file libfdk-aacdec.c.

Referenced by fdk_aac_decode_init().

#define DECODER_BUFFSIZE   2048 * sizeof(INT_PCM)

Definition at line 65 of file libfdk-aacdec.c.

Referenced by fdk_aac_decode_init().

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

Definition at line 67 of file libfdk-aacdec.c.

Definition at line 68 of file libfdk-aacdec.c.

Enumeration Type Documentation

Enumerator
CONCEAL_METHOD_SPECTRAL_MUTING 
CONCEAL_METHOD_NOISE_SUBSTITUTION 
CONCEAL_METHOD_ENERGY_INTERPOLATION 
CONCEAL_METHOD_NB 

Definition at line 40 of file libfdk-aacdec.c.

Function Documentation

static int get_stream_info ( AVCodecContext avctx)
static

Definition at line 99 of file libfdk-aacdec.c.

Referenced by fdk_aac_decode_frame().

static av_cold int fdk_aac_decode_close ( AVCodecContext avctx)
static

Definition at line 210 of file libfdk-aacdec.c.

static av_cold int fdk_aac_decode_init ( AVCodecContext avctx)
static

Definition at line 222 of file libfdk-aacdec.c.

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

Definition at line 336 of file libfdk-aacdec.c.

static av_cold void fdk_aac_decode_flush ( AVCodecContext avctx)
static

Definition at line 381 of file libfdk-aacdec.c.

Variable Documentation

const AVOption fdk_aac_dec_options[]
static
Initial value:
= {
{ "conceal", "Error concealment method", OFFSET(conceal_method), AV_OPT_TYPE_INT, { .i64 = CONCEAL_METHOD_NOISE_SUBSTITUTION }, CONCEAL_METHOD_SPECTRAL_MUTING, CONCEAL_METHOD_NB - 1, AD, "conceal" },
{ "spectral", "Spectral muting", 0, AV_OPT_TYPE_CONST, { .i64 = CONCEAL_METHOD_SPECTRAL_MUTING }, INT_MIN, INT_MAX, AD, "conceal" },
{ "noise", "Noise Substitution", 0, AV_OPT_TYPE_CONST, { .i64 = CONCEAL_METHOD_NOISE_SUBSTITUTION }, INT_MIN, INT_MAX, AD, "conceal" },
{ "energy", "Energy Interpolation", 0, AV_OPT_TYPE_CONST, { .i64 = CONCEAL_METHOD_ENERGY_INTERPOLATION }, INT_MIN, INT_MAX, AD, "conceal" },
{ "drc_boost", "Dynamic Range Control: boost, where [0] is none and [127] is max boost",
OFFSET(drc_boost), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 127, AD, NULL },
{ "drc_cut", "Dynamic Range Control: attenuation factor, where [0] is none and [127] is max compression",
OFFSET(drc_cut), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 127, AD, NULL },
{ "drc_level", "Dynamic Range Control: reference level, quantized to 0.25dB steps where [0] is 0dB and [127] is -31.75dB",
OFFSET(drc_level), AV_OPT_TYPE_INT, { .i64 = -1}, -1, 127, AD, NULL },
{ "drc_heavy", "Dynamic Range Control: heavy compression, where [1] is on (RF mode) and [0] is off",
OFFSET(drc_heavy), AV_OPT_TYPE_INT, { .i64 = -1}, -1, 1, AD, NULL },
{ NULL }
}
#define NULL
Definition: coverity.c:32
#define OFFSET(x)
Definition: libfdk-aacdec.c:67
#define AD
Definition: libfdk-aacdec.c:68

Definition at line 69 of file libfdk-aacdec.c.

const AVClass fdk_aac_dec_class
static
Initial value:
= {
.class_name = "libfdk-aac decoder",
.item_name = av_default_item_name,
}
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:191
static const AVOption fdk_aac_dec_options[]
Definition: libfdk-aacdec.c:69

Definition at line 92 of file libfdk-aacdec.c.

AVCodec ff_libfdk_aac_decoder
Initial value:
= {
.name = "libfdk_aac",
.long_name = NULL_IF_CONFIG_SMALL("Fraunhofer FDK AAC"),
.priv_data_size = sizeof(FDKAACDecContext),
.priv_class = &fdk_aac_dec_class,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
.wrapper_name = "libfdk",
}
#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:48
static void flush(AVCodecContext *avctx)
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
#define AV_CODEC_CAP_CHANNEL_CONF
Codec should fill in channel configuration and samplerate instead of container.
Definition: avcodec.h:1020
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
Definition: decode_audio.c:42
#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:40
static av_cold void fdk_aac_decode_flush(AVCodecContext *avctx)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
static int fdk_aac_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)
static const AVClass fdk_aac_dec_class
Definition: libfdk-aacdec.c:92
static av_cold int fdk_aac_decode_close(AVCodecContext *avctx)
static av_cold int fdk_aac_decode_init(AVCodecContext *avctx)
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: avcodec.h:968

Definition at line 394 of file libfdk-aacdec.c.