All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Functions
fixed_dsp.h File Reference
#include <stdint.h>
#include "attributes.h"
#include "common.h"
#include "libavcodec/mathops.h"

Go to the source code of this file.

Data Structures

struct  AVFixedDSPContext


AVFixedDSPContextavpriv_alloc_fixed_dsp (int strict)
 Allocate and initialize a fixed DSP context. More...
static av_always_inline int fixed_sqrt (int x, int bits)
 Calculate the square root. More...

Function Documentation

AVFixedDSPContext* avpriv_alloc_fixed_dsp ( int  strict)

Allocate and initialize a fixed DSP context.

note: should be freed with a av_free call when no longer needed.

strictsetting to non-zero avoids using functions which may not be IEEE-754 compliant

Definition at line 148 of file fixed_dsp.c.

Referenced by aac_decode_init(), and ac3_decode_init().

static av_always_inline int fixed_sqrt ( int  x,
int  bits 

Calculate the square root.

xinput fixed point number
bitsformat of fixed point number (32 - bits).bits

note: input is normalized to (0, 1) fixed point value

Definition at line 174 of file fixed_dsp.h.

Referenced by decode_audio_block(), and decode_spectrum_and_dequant().