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

AAC decoder. More...

#include "libavutil/fixed_dsp.h"
#include "libavutil/opt.h"
#include "avcodec.h"
#include "internal.h"
#include "get_bits.h"
#include "fft.h"
#include "lpc.h"
#include "kbdwin.h"
#include "sinewin.h"
#include "aac.h"
#include "aactab.h"
#include "aacdectab.h"
#include "cbrt_data.h"
#include "sbr.h"
#include "aacsbr.h"
#include "mpeg4audio.h"
#include "aacadtsdec.h"
#include "profiles.h"
#include "libavutil/intfloat.h"
#include <math.h>
#include <string.h>
#include "aacdec_template.c"

Go to the source code of this file.

Macros

#define FFT_FLOAT   0
 
#define FFT_FIXED_32   1
 
#define USE_FIXED   1
 

Functions

static av_always_inline void reset_predict_state (PredictorState *ps)
 
static intDEC_SPAIR (int *dst, unsigned idx)
 
static intDEC_SQUAD (int *dst, unsigned idx)
 
static intDEC_UPAIR (int *dst, unsigned idx, unsigned sign)
 
static intDEC_UQUAD (int *dst, unsigned idx, unsigned sign)
 
static void vector_pow43 (int *coefs, int len)
 
static void subband_scale (int *dst, int *src, int scale, int offset, int len)
 
static void noise_scale (int *coefs, int scale, int band_energy, int len)
 
static av_always_inline SoftFloat flt16_round (SoftFloat pf)
 
static av_always_inline SoftFloat flt16_even (SoftFloat pf)
 
static av_always_inline SoftFloat flt16_trunc (SoftFloat pf)
 
static av_always_inline void predict (PredictorState *ps, int *coef, int output_enable)
 
static void apply_dependent_coupling_fixed (AACContext *ac, SingleChannelElement *target, ChannelElement *cce, int index)
 Apply dependent channel coupling (applied before IMDCT). More...
 
static void apply_independent_coupling_fixed (AACContext *ac, SingleChannelElement *target, ChannelElement *cce, int index)
 Apply independent channel coupling (applied after IMDCT). More...
 

Variables

static const int exp2tab [4] = { Q31(1.0000000000/2), Q31(1.1892071150/2), Q31(1.4142135624/2), Q31(1.6817928305/2) }
 
static const int cce_scale_fixed [8]
 
AVCodec ff_aac_fixed_decoder
 

Detailed Description

AAC decoder.

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

Fixed point implementation

Author
Stanislav Ocovaj ( stanislav.ocovaj imgtec com )

Definition in file aacdec_fixed.c.

Macro Definition Documentation

#define FFT_FLOAT   0

Definition at line 61 of file aacdec_fixed.c.

#define FFT_FIXED_32   1

Definition at line 62 of file aacdec_fixed.c.

#define USE_FIXED   1

Definition at line 63 of file aacdec_fixed.c.

Function Documentation

static av_always_inline void reset_predict_state ( PredictorState ps)
static

Definition at line 89 of file aacdec_fixed.c.

static int* DEC_SPAIR ( int dst,
unsigned  idx 
)
inlinestatic

Definition at line 107 of file aacdec_fixed.c.

Referenced by decode_spectrum_and_dequant().

static int* DEC_SQUAD ( int dst,
unsigned  idx 
)
inlinestatic

Definition at line 115 of file aacdec_fixed.c.

Referenced by decode_spectrum_and_dequant().

static int* DEC_UPAIR ( int dst,
unsigned  idx,
unsigned  sign 
)
inlinestatic

Definition at line 125 of file aacdec_fixed.c.

Referenced by decode_spectrum_and_dequant().

static int* DEC_UQUAD ( int dst,
unsigned  idx,
unsigned  sign 
)
inlinestatic

Definition at line 133 of file aacdec_fixed.c.

Referenced by decode_spectrum_and_dequant().

static void vector_pow43 ( int coefs,
int  len 
)
static

Definition at line 151 of file aacdec_fixed.c.

Referenced by aacdec_init().

static void subband_scale ( int dst,
int src,
int  scale,
int  offset,
int  len 
)
static

Definition at line 165 of file aacdec_fixed.c.

Referenced by aacdec_init().

static void noise_scale ( int coefs,
int  scale,
int  band_energy,
int  len 
)
static

Definition at line 196 of file aacdec_fixed.c.

Referenced by decode_spectrum_and_dequant().

static av_always_inline SoftFloat flt16_round ( SoftFloat  pf)
static

Definition at line 232 of file aacdec_fixed.c.

Referenced by predict().

static av_always_inline SoftFloat flt16_even ( SoftFloat  pf)
static

Definition at line 246 of file aacdec_fixed.c.

Referenced by predict().

static av_always_inline SoftFloat flt16_trunc ( SoftFloat  pf)
static

Definition at line 260 of file aacdec_fixed.c.

Referenced by predict().

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

Definition at line 274 of file aacdec_fixed.c.

static void apply_dependent_coupling_fixed ( 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 349 of file aacdec_fixed.c.

static void apply_independent_coupling_fixed ( 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 413 of file aacdec_fixed.c.

Variable Documentation

const int exp2tab[4] = { Q31(1.0000000000/2), Q31(1.1892071150/2), Q31(1.4142135624/2), Q31(1.6817928305/2) }
static

Definition at line 105 of file aacdec_fixed.c.

Referenced by noise_scale(), and subband_scale().

const int cce_scale_fixed[8]
static
Initial value:
= {
Q30(1.0),
Q30(1.0905077327),
Q30(1.1892071150),
Q30(1.2968395547),
Q30(1.4142135624),
Q30(1.5422108254),
Q30(1.6817928305),
Q30(1.8340080864),
}
#define Q30(x)
Definition: aac_defines.h:95

Definition at line 333 of file aacdec_fixed.c.

Referenced by apply_dependent_coupling_fixed(), and apply_independent_coupling_fixed().

AVCodec ff_aac_fixed_decoder
Initial value:
= {
.name = "aac_fixed",
.long_name = NULL_IF_CONFIG_SMALL("AAC (Advanced Audio Coding)"),
.priv_data_size = sizeof(AACContext),
.close = aac_decode_close,
.sample_fmts = (const enum AVSampleFormat[]) {
},
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
.channel_layouts = aac_channel_layout,
.flush = flush,
}
static void flush(AVCodecContext *avctx)
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
const AVProfile ff_aac_profiles[]
Definition: profiles.c:26
#define AV_CODEC_CAP_CHANNEL_CONF
Codec should fill in channel configuration and samplerate instead of container.
Definition: avcodec.h:1061
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 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:179
static const uint64_t aac_channel_layout[16]
Definition: aacdectab.h:57
static int aac_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)
signed 32 bits, planar
Definition: samplefmt.h:68
AVSampleFormat
Audio sample formats.
Definition: samplefmt.h:58
static av_cold int aac_decode_close(AVCodecContext *avctx)
main AAC context
Definition: aac.h:293
static enum AVSampleFormat sample_fmts[]
Definition: adpcmenc.c:701
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: avcodec.h:1002

Definition at line 446 of file aacdec_fixed.c.