FFmpeg
float_dsp.h
1 /*
2  * This file is part of FFmpeg.
3  *
4  * FFmpeg is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * FFmpeg is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with FFmpeg; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17  */
18 
19 #ifndef AVUTIL_FLOAT_DSP_H
20 #define AVUTIL_FLOAT_DSP_H
21 
22 #include "config.h"
23 
24 typedef struct AVFloatDSPContext {
38  void (*vector_fmul)(float *dst, const float *src0, const float *src1,
39  int len);
40 
54  void (*vector_fmac_scalar)(float *dst, const float *src, float mul,
55  int len);
56 
70  void (*vector_dmac_scalar)(double *dst, const double *src, double mul,
71  int len);
72 
85  void (*vector_fmul_scalar)(float *dst, const float *src, float mul,
86  int len);
87 
100  void (*vector_dmul_scalar)(double *dst, const double *src, double mul,
101  int len);
102 
119  void (*vector_fmul_window)(float *dst, const float *src0,
120  const float *src1, const float *win, int len);
121 
137  void (*vector_fmul_add)(float *dst, const float *src0, const float *src1,
138  const float *src2, int len);
139 
154  void (*vector_fmul_reverse)(float *dst, const float *src0,
155  const float *src1, int len);
156 
164  void (*butterflies_float)(float *av_restrict v1, float *av_restrict v2, int len);
165 
175  float (*scalarproduct_float)(const float *v1, const float *v2, int len);
177 
187 float avpriv_scalarproduct_float_c(const float *v1, const float *v2, int len);
188 
189 void ff_float_dsp_init_aarch64(AVFloatDSPContext *fdsp);
190 void ff_float_dsp_init_arm(AVFloatDSPContext *fdsp);
191 void ff_float_dsp_init_ppc(AVFloatDSPContext *fdsp, int strict);
192 void ff_float_dsp_init_x86(AVFloatDSPContext *fdsp);
193 void ff_float_dsp_init_mips(AVFloatDSPContext *fdsp);
194 
200 AVFloatDSPContext *avpriv_float_dsp_alloc(int strict);
201 
202 #endif /* AVUTIL_FLOAT_DSP_H */
float(* scalarproduct_float)(const float *v1, const float *v2, int len)
Calculate the scalar product of two vectors of floats.
Definition: float_dsp.h:175
void(* vector_fmac_scalar)(float *dst, const float *src, float mul, int len)
Multiply a vector of floats by a scalar float and add to destination vector.
Definition: float_dsp.h:54
void(* vector_fmul)(float *dst, const float *src0, const float *src1, int len)
Calculate the entry wise product of two vectors of floats and store the result in a vector of floats...
Definition: float_dsp.h:38
void(* vector_dmac_scalar)(double *dst, const double *src, double mul, int len)
Multiply a vector of doubles by a scalar double and add to destination vector.
Definition: float_dsp.h:70
void(* vector_fmul_window)(float *dst, const float *src0, const float *src1, const float *win, int len)
Overlap/add with window function.
Definition: float_dsp.h:119
void(* vector_dmul_scalar)(double *dst, const double *src, double mul, int len)
Multiply a vector of double by a scalar double.
Definition: float_dsp.h:100
Definition: float_dsp.h:24
void(* butterflies_float)(float *av_restrict v1, float *av_restrict v2, int len)
Calculate the sum and difference of two vectors of floats.
Definition: float_dsp.h:164
void(* vector_fmul_scalar)(float *dst, const float *src, float mul, int len)
Multiply a vector of floats by a scalar float.
Definition: float_dsp.h:85
void(* vector_fmul_add)(float *dst, const float *src0, const float *src1, const float *src2, int len)
Calculate the entry wise product of two vectors of floats, add a third vector of floats and store the...
Definition: float_dsp.h:137
void(* vector_fmul_reverse)(float *dst, const float *src0, const float *src1, int len)
Calculate the entry wise product of two vectors of floats, and store the result in a vector of floats...
Definition: float_dsp.h:154