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

AAC decoder. More...

#include "libavutil/float_dsp.h"
#include "libavutil/opt.h"
#include "avcodec.h"
#include "internal.h"
#include "get_bits.h"
#include "fft.h"
#include "imdct15.h"
#include "lpc.h"
#include "kbdwin.h"
#include "sinewin.h"
#include "aac.h"
#include "aactab.h"
#include "aacdectab.h"
#include "cbrt_tablegen.h"
#include "sbr.h"
#include "aacsbr.h"
#include "mpeg4audio.h"
#include "aacadtsdec.h"
#include "libavutil/intfloat.h"
#include <errno.h>
#include <math.h>
#include <stdint.h>
#include <string.h>
#include "aacdec_template.c"

Go to the source code of this file.

Data Structures

struct  LATMContext
 

Macros

#define FFT_FLOAT   1
 
#define FFT_FIXED_32   0
 
#define USE_FIXED   0
 
#define LOAS_SYNC_WORD   0x2b7
 11 bits LOAS sync word More...
 

Functions

static av_always_inline void reset_predict_state (PredictorState *ps)
 
static float * VMUL2 (float *dst, const float *v, unsigned idx, const float *scale)
 
static float * VMUL4 (float *dst, const float *v, unsigned idx, const float *scale)
 
static float * VMUL2S (float *dst, const float *v, unsigned idx, unsigned sign, const float *scale)
 
static float * VMUL4S (float *dst, const float *v, unsigned idx, unsigned sign, const float *scale)
 
static av_always_inline float flt16_round (float pf)
 
static av_always_inline float flt16_even (float pf)
 
static av_always_inline float flt16_trunc (float pf)
 
static av_always_inline void predict (PredictorState *ps, float *coef, int output_enable)
 
static void apply_dependent_coupling (AACContext *ac, SingleChannelElement *target, ChannelElement *cce, int index)
 Apply dependent channel coupling (applied before IMDCT). More...
 
static void apply_independent_coupling (AACContext *ac, SingleChannelElement *target, ChannelElement *cce, int index)
 Apply independent channel coupling (applied after IMDCT). More...
 
static uint32_t latm_get_value (GetBitContext *b)
 
static int latm_decode_audio_specific_config (struct LATMContext *latmctx, GetBitContext *gb, int asclen)
 
static int read_stream_mux_config (struct LATMContext *latmctx, GetBitContext *gb)
 
static int read_payload_length_info (struct LATMContext *ctx, GetBitContext *gb)
 
static int read_audio_mux_element (struct LATMContext *latmctx, GetBitContext *gb)
 
static int latm_decode_frame (AVCodecContext *avctx, void *out, int *got_frame_ptr, AVPacket *avpkt)
 
static av_cold int latm_decode_init (AVCodecContext *avctx)
 

Variables

AVCodec ff_aac_decoder
 
AVCodec ff_aac_latm_decoder
 

Detailed Description

AAC decoder.

Author
Oded Shimon ( ods15 ods15 dyndns org )
Maxim Gavrilov ( maxim.gavrilov gmail com )

Definition in file aacdec.c.

Macro Definition Documentation

#define FFT_FLOAT   1

Definition at line 35 of file aacdec.c.

#define FFT_FIXED_32   0

Definition at line 36 of file aacdec.c.

#define USE_FIXED   0

Definition at line 37 of file aacdec.c.

#define LOAS_SYNC_WORD   0x2b7

11 bits LOAS sync word

Definition at line 261 of file aacdec.c.

Referenced by latm_decode_frame().

Function Documentation

static av_always_inline void reset_predict_state ( PredictorState ps)
static

Definition at line 71 of file aacdec.c.

Referenced by reset_all_predictors(), and reset_predictor_group().

static float* VMUL2 ( float *  dst,
const float *  v,
unsigned  idx,
const float *  scale 
)
inlinestatic

Definition at line 82 of file aacdec.c.

Referenced by decode_spectrum_and_dequant().

static float* VMUL4 ( float *  dst,
const float *  v,
unsigned  idx,
const float *  scale 
)
inlinestatic

Definition at line 93 of file aacdec.c.

Referenced by decode_spectrum_and_dequant().

static float* VMUL2S ( float *  dst,
const float *  v,
unsigned  idx,
unsigned  sign,
const float *  scale 
)
inlinestatic

Definition at line 106 of file aacdec.c.

Referenced by decode_spectrum_and_dequant().

static float* VMUL4S ( float *  dst,
const float *  v,
unsigned  idx,
unsigned  sign,
const float *  scale 
)
inlinestatic

Definition at line 123 of file aacdec.c.

Referenced by decode_spectrum_and_dequant().

static av_always_inline float flt16_round ( float  pf)
static

Definition at line 149 of file aacdec.c.

Referenced by predict().

static av_always_inline float flt16_even ( float  pf)
static

Definition at line 157 of file aacdec.c.

Referenced by predict().

static av_always_inline float flt16_trunc ( float  pf)
static

Definition at line 165 of file aacdec.c.

Referenced by predict().

static av_always_inline void predict ( PredictorState ps,
float *  coef,
int  output_enable 
)
static

Definition at line 173 of file aacdec.c.

Referenced by apply_prediction(), decode_line(), and encode_line().

static void apply_dependent_coupling ( AACContext ac,
SingleChannelElement target,
ChannelElement cce,
int  index 
)
static

Apply dependent channel coupling (applied before IMDCT).

Parameters
indexindex into coupling gain array

Definition at line 209 of file aacdec.c.

Referenced by spectral_to_sample().

static void apply_independent_coupling ( AACContext ac,
SingleChannelElement target,
ChannelElement cce,
int  index 
)
static

Apply independent channel coupling (applied after IMDCT).

Parameters
indexindex into coupling gain array

Definition at line 245 of file aacdec.c.

Referenced by spectral_to_sample().

static uint32_t latm_get_value ( GetBitContext b)
inlinestatic

Definition at line 273 of file aacdec.c.

Referenced by read_stream_mux_config().

static int latm_decode_audio_specific_config ( struct LATMContext latmctx,
GetBitContext gb,
int  asclen 
)
static

Definition at line 280 of file aacdec.c.

Referenced by read_stream_mux_config().

static int read_stream_mux_config ( struct LATMContext latmctx,
GetBitContext gb 
)
static

Definition at line 339 of file aacdec.c.

Referenced by read_audio_mux_element().

static int read_payload_length_info ( struct LATMContext ctx,
GetBitContext gb 
)
static

Definition at line 419 of file aacdec.c.

Referenced by read_audio_mux_element().

static int read_audio_mux_element ( struct LATMContext latmctx,
GetBitContext gb 
)
static

Definition at line 440 of file aacdec.c.

Referenced by latm_decode_frame().

static int latm_decode_frame ( AVCodecContext avctx,
void out,
int *  got_frame_ptr,
AVPacket avpkt 
)
static

Definition at line 469 of file aacdec.c.

static av_cold int latm_decode_init ( AVCodecContext avctx)
static

Definition at line 530 of file aacdec.c.

Variable Documentation

AVCodec ff_aac_decoder
Initial value:
= {
.name = "aac",
.long_name = NULL_IF_CONFIG_SMALL("AAC (Advanced Audio Coding)"),
.priv_data_size = sizeof(AACContext),
.close = aac_decode_close,
.sample_fmts = (const enum AVSampleFormat[]) {
},
.channel_layouts = aac_channel_layout,
.flush = flush,
.priv_class = &aac_decoder_class,
.profiles = profiles,
}
float, planar
Definition: samplefmt.h:70
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:916
static av_cold int aac_decode_init(AVCodecContext *avctx)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:175
static const uint64_t aac_channel_layout[16]
Definition: aacdectab.h:65
static int aac_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)
static const AVProfile profiles[]
AVSampleFormat
Audio sample formats.
Definition: samplefmt.h:59
static av_cold int aac_decode_close(AVCodecContext *avctx)
main AAC context
Definition: aac.h:288
static int decode(AVCodecContext *avctx, void *data, int *got_sub, AVPacket *avpkt)
Definition: ccaption_dec.c:523
static enum AVSampleFormat sample_fmts[]
Definition: adpcmenc.c:701
static const AVClass aac_decoder_class
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: avcodec.h:857

Definition at line 541 of file aacdec.c.

AVCodec ff_aac_latm_decoder
Initial value:
= {
.name = "aac_latm",
.long_name = NULL_IF_CONFIG_SMALL("AAC LATM (Advanced Audio Coding LATM syntax)"),
.priv_data_size = sizeof(struct LATMContext),
.close = aac_decode_close,
.decode = latm_decode_frame,
.sample_fmts = (const enum AVSampleFormat[]) {
},
.channel_layouts = aac_channel_layout,
.flush = flush,
.profiles = profiles,
}
float, planar
Definition: samplefmt.h:70
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:916
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:175
static int latm_decode_frame(AVCodecContext *avctx, void *out, int *got_frame_ptr, AVPacket *avpkt)
Definition: aacdec.c:469
static const uint64_t aac_channel_layout[16]
Definition: aacdectab.h:65
static const AVProfile profiles[]
AVSampleFormat
Audio sample formats.
Definition: samplefmt.h:59
static av_cold int aac_decode_close(AVCodecContext *avctx)
static av_cold int latm_decode_init(AVCodecContext *avctx)
Definition: aacdec.c:530
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: avcodec.h:857

Definition at line 565 of file aacdec.c.