~ubuntu-branches/ubuntu/trusty/libav/trusty-proposed

« back to all changes in this revision

Viewing changes to libavutil/float_dsp.h

  • Committer: Package Import Robot
  • Author(s): Reinhard Tartler
  • Date: 2013-10-22 23:24:08 UTC
  • mfrom: (1.3.36 sid)
  • Revision ID: package-import@ubuntu.com-20131022232408-b8tvvn4pyzri9mi3
Tags: 6:9.10-1ubuntu1
* Build all -extra flavors from this source package, as libav got demoted
  from main to universe, cf LP: #1243235
* Simplify debian/rules to follow exactly the code that debian executes
* New upstream (LP: #1180288) fixes lots of security issues (LP: #1242802)
* Merge from unstable, remaining changes:
  - build-depend on libtiff5-dev rather than libtiff4-dev,
    avoids FTBFS caused by imlib
  - follow the regular debian codepaths

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
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
 
 
39
    /**
 
40
     * Multiply a vector of floats by a scalar float and add to
 
41
     * destination vector.  Source and destination vectors must
 
42
     * overlap exactly or not at all.
 
43
     *
 
44
     * @param dst result vector
 
45
     *            constraints: 32-byte aligned
 
46
     * @param src input vector
 
47
     *            constraints: 32-byte aligned
 
48
     * @param mul scalar value
 
49
     * @param len length of vector
 
50
     *            constraints: multiple of 16
 
51
     */
 
52
    void (*vector_fmac_scalar)(float *dst, const float *src, float mul,
 
53
                               int len);
 
54
 
 
55
    /**
 
56
     * Multiply a vector of floats by a scalar float.  Source and
 
57
     * destination vectors must overlap exactly or not at all.
 
58
     *
 
59
     * @param dst result vector
 
60
     *            constraints: 16-byte aligned
 
61
     * @param src input vector
 
62
     *            constraints: 16-byte aligned
 
63
     * @param mul scalar value
 
64
     * @param len length of vector
 
65
     *            constraints: multiple of 4
 
66
     */
 
67
    void (*vector_fmul_scalar)(float *dst, const float *src, float mul,
 
68
                               int len);
 
69
 
 
70
    /**
 
71
     * Multiply a vector of double by a scalar double.  Source and
 
72
     * destination vectors must overlap exactly or not at all.
 
73
     *
 
74
     * @param dst result vector
 
75
     *            constraints: 32-byte aligned
 
76
     * @param src input vector
 
77
     *            constraints: 32-byte aligned
 
78
     * @param mul scalar value
 
79
     * @param len length of vector
 
80
     *            constraints: multiple of 8
 
81
     */
 
82
    void (*vector_dmul_scalar)(double *dst, const double *src, double mul,
 
83
                               int len);
 
84
} AVFloatDSPContext;
 
85
 
 
86
/**
 
87
 * Initialize a float DSP context.
 
88
 *
 
89
 * @param fdsp    float DSP context
 
90
 * @param strict  setting to non-zero avoids using functions which may not be IEEE-754 compliant
 
91
 */
 
92
void avpriv_float_dsp_init(AVFloatDSPContext *fdsp, int strict);
 
93
 
 
94
 
 
95
void ff_float_dsp_init_arm(AVFloatDSPContext *fdsp);
 
96
void ff_float_dsp_init_ppc(AVFloatDSPContext *fdsp, int strict);
 
97
void ff_float_dsp_init_x86(AVFloatDSPContext *fdsp);
 
98
 
 
99
#endif /* AVUTIL_FLOAT_DSP_H */