48 #ifndef AVUTIL_FIXED_DSP_H 49 #define AVUTIL_FIXED_DSP_H 54 #include "libavcodec/mathops.h" 80 void (*
vector_fmul_window_scaled)(int16_t *dst,
const int32_t *src0,
const int32_t *src1,
const int32_t *win,
int len, uint8_t bits);
98 void (*
vector_fmul_window)(int32_t *dst,
const int32_t *src0,
const int32_t *src1,
const int32_t *win,
int len);
116 void (*vector_fmul_reverse)(
int *dst,
const int *src0,
const int *src1,
int len);
133 const int *src2,
int len);
176 static av_always_inline
int fixed_sqrt(
int x,
int bits)
178 int retval, bit_mask, guess, square, i;
180 int shift1 = 30 - bits;
181 int shift2 = bits - 15;
183 if (shift1 > 0) retval = ff_sqrt(x << shift1);
184 else retval = ff_sqrt(x >> -shift1);
187 retval = retval << shift2;
188 bit_mask = (1 << (shift2 - 1));
190 for (i=0; i<shift2; i++){
191 guess = retval + bit_mask;
192 accu = (int64_t)guess * guess;
193 square = (int)((accu + bit_mask) >> bits);
200 else retval >>= (-shift2);
Definition: fixed_dsp.h:56
Macro definitions for various function/variable attributes.
void(* vector_fmul_add)(int *dst, const int *src0, const int *src1, const int *src2, int len)
Calculate the entry wise product of two vectors of integers, add a third vector of integers and store...
Definition: fixed_dsp.h:132
int(* scalarproduct_fixed)(const int *v1, const int *v2, int len)
Calculate the scalar product of two vectors of integers.
Definition: fixed_dsp.h:144
void(* butterflies_fixed)(int *av_restrict v1, int *av_restrict v2, int len)
Calculate the sum and difference of two vectors of integers.
Definition: fixed_dsp.h:153
void(* vector_fmul_window)(int32_t *dst, const int32_t *src0, const int32_t *src1, const int32_t *win, int len)
Overlap/add with window function.
Definition: fixed_dsp.h:98
void(* vector_fmul)(int *dst, const int *src0, const int *src1, int len)
Fixed-point multiplication that calculates the entry wise product of two vectors of integers and stor...
Definition: fixed_dsp.h:113
common internal and external API header
void(* vector_fmul_window_scaled)(int16_t *dst, const int32_t *src0, const int32_t *src1, const int32_t *win, int len, uint8_t bits)
Overlap/add with window function.
Definition: fixed_dsp.h:80