]> git.sesse.net Git - ffmpeg/blob - libavutil/float_dsp.h
Merge remote-tracking branch 'qatar/master'
[ffmpeg] / libavutil / 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 typedef struct AVFloatDSPContext {
23     /**
24      * Calculate the product of two vectors of floats and store the result in
25      * a vector of floats.
26      *
27      * @param dst  output vector
28      *             constraints: 32-byte aligned
29      * @param src0 first input vector
30      *             constraints: 32-byte aligned
31      * @param src1 second input vector
32      *             constraints: 32-byte aligned
33      * @param len  number of elements in the input
34      *             constraints: multiple of 16
35      */
36     void (*vector_fmul)(float *dst, const float *src0, const float *src1,
37                         int len);
38 } AVFloatDSPContext;
39
40 /**
41  * Initialize a float DSP context.
42  *
43  * @param fdsp    float DSP context
44  * @param strict  setting to non-zero avoids using functions which may not be IEEE-754 compliant
45  */
46 void avpriv_float_dsp_init(AVFloatDSPContext *fdsp, int strict);
47
48
49 void ff_float_dsp_init_arm(AVFloatDSPContext *fdsp);
50 void ff_float_dsp_init_ppc(AVFloatDSPContext *fdsp, int strict);
51 void ff_float_dsp_init_x86(AVFloatDSPContext *fdsp);
52
53 #endif /* AVUTIL_FLOAT_DSP_H */