FFmpeg  4.0
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
 

Functions

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

Function Documentation

◆ avpriv_alloc_fixed_dsp()

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.

Parameters
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(), ac3_decode_init(), checkasm_check_fixed_dsp(), and ff_dca_core_init().

◆ ff_fixed_dsp_init_x86()

void ff_fixed_dsp_init_x86 ( AVFixedDSPContext fdsp)

Definition at line 28 of file fixed_dsp_init.c.

Referenced by avpriv_alloc_fixed_dsp().

◆ fixed_sqrt()

static av_always_inline int fixed_sqrt ( int  x,
int  bits 
)
static

Calculate the square root.

Parameters
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 176 of file fixed_dsp.h.

Referenced by decode_spectrum_and_dequant(), and spx_coordinates().