Libav
float_dsp.h
Go to the documentation of this file.
1 /*
2  * This file is part of Libav.
3  *
4  * Libav 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  * Libav 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 Libav; 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 
69  void (*vector_fmul_scalar)(float *dst, const float *src, float mul,
70  int len);
71 
84  void (*vector_dmul_scalar)(double *dst, const double *src, double mul,
85  int len);
86 
103  void (*vector_fmul_window)(float *dst, const float *src0,
104  const float *src1, const float *win, int len);
105 
121  void (*vector_fmul_add)(float *dst, const float *src0, const float *src1,
122  const float *src2, int len);
123 
138  void (*vector_fmul_reverse)(float *dst, const float *src0,
139  const float *src1, int len);
140 
148  void (*butterflies_float)(float *restrict v1, float *restrict v2, int len);
149 
159  float (*scalarproduct_float)(const float *v1, const float *v2, int len);
161 
171 float avpriv_scalarproduct_float_c(const float *v1, const float *v2, int len);
172 
179 void avpriv_float_dsp_init(AVFloatDSPContext *fdsp, int strict);
180 
181 
184 void ff_float_dsp_init_ppc(AVFloatDSPContext *fdsp, int strict);
186 
187 #endif /* AVUTIL_FLOAT_DSP_H */
void ff_float_dsp_init_x86(AVFloatDSPContext *fdsp)
float(* scalarproduct_float)(const float *v1, const float *v2, int len)
Calculate the scalar product of two vectors of floats.
Definition: float_dsp.h:159
void(* vector_fmul_reverse)(float *dst, const float *src0, const float *src1, int len)
Calculate the product of two vectors of floats, and store the result in a vector of floats...
Definition: float_dsp.h:138
void ff_float_dsp_init_aarch64(AVFloatDSPContext *fdsp)
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_window)(float *dst, const float *src0, const float *src1, const float *win, int len)
Overlap/add with window function.
Definition: float_dsp.h:103
void(* vector_fmul)(float *dst, const float *src0, const float *src1, int len)
Calculate the product of two vectors of floats and store the result in a vector of floats...
Definition: float_dsp.h:38
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:84
void avpriv_float_dsp_init(AVFloatDSPContext *fdsp, int strict)
Initialize a float DSP context.
Definition: float_dsp.c:115
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:69
void(* butterflies_float)(float *restrict v1, float *restrict v2, int len)
Calculate the sum and difference of two vectors of floats.
Definition: float_dsp.h:148
float avpriv_scalarproduct_float_c(const float *v1, const float *v2, int len)
Return the scalar product of two vectors.
Definition: float_dsp.c:104
void ff_float_dsp_init_ppc(AVFloatDSPContext *fdsp, int strict)
static void(WINAPI *cond_broadcast)(pthread_cond_t *cond)
void(* vector_fmul_add)(float *dst, const float *src0, const float *src1, const float *src2, int len)
Calculate the product of two vectors of floats, add a third vector of floats and store the result in ...
Definition: float_dsp.h:121
void ff_float_dsp_init_arm(AVFloatDSPContext *fdsp)
#define restrict
Definition: config.h:8
int len