FFmpeg: libavutil/float_dsp.c Source File
Go to the documentation of this file. 1 /*
2 * Copyright 2005 Balatoni Denes
3 * Copyright 2006 Loren Merritt
4 *
5 * This file is part of FFmpeg.
6 *
7 * FFmpeg is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * FFmpeg is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with FFmpeg; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 */
21
22 #include "config.h"
26
29 {
33 }
34
37 {
41 }
42
45 {
49 }
50
53 {
57 }
58
61 {
65 }
66
69 {
73 }
74
77 {
79
83
84 for (
i = -
len, j =
len - 1;
i < 0;
i++, j--) {
89 dst[
i] = s0 * wj - s1 * wi;
90 dst[j] = s0 * wi + s1 * wj;
91 }
92 }
93
97
100 }
101
104 {
106
110 }
111
114 {
116
117 for (
i = 0;
i <
len;
i++) {
118 float t = v1[
i] - v2[
i];
121 }
122 }
123
126 {
128
129 for (
size_t i = 0;
i <
len;
i++)
131
133 }
134
136 {
138 if (!fdsp)
140
153
154 #if ARCH_AARCH64
156 #elif ARCH_ARM
158 #elif ARCH_PPC
160 #elif ARCH_RISCV
162 #elif ARCH_X86
164 #elif ARCH_MIPS
166 #endif
167 return fdsp;
168 }
static void vector_fmul_add_c(float *dst, const float *src0, const float *src1, const float *src2, int len)
void(* butterflies_float)(float *restrict v1, float *restrict v2, int len)
Calculate the sum and difference of two vectors of floats.
static void vector_dmul_c(double *dst, const double *src0, const double *src1, int len)
static void vector_dmul_scalar_c(double *dst, const double *src, double mul, int len)
double ff_scalarproduct_double_c(const double *v1, const double *v2, size_t len)
Return the scalar product of two vectors of doubles.
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...
void(* vector_dmul)(double *dst, const double *src0, const double *src1, int len)
Calculate the entry wise product of two vectors of doubles and store the result in a vector of double...
static float win(SuperEqualizerContext *s, float n, int N)
void ff_float_dsp_init_ppc(AVFloatDSPContext *fdsp, int strict)
av_cold void ff_float_dsp_init_arm(AVFloatDSPContext *fdsp)
static void vector_dmac_scalar_c(double *dst, const double *src, double mul, int len)
float(* scalarproduct_float)(const float *v1, const float *v2, int len)
Calculate the scalar product of two vectors of floats.
static void vector_fmul_reverse_c(float *dst, const float *src0, const float *src1, int len)
static void vector_fmul_c(float *dst, const float *src0, const float *src1, int len)
void(* vector_fmul_scalar)(float *dst, const float *src, float mul, int len)
Multiply a vector of floats by a scalar float.
void ff_float_dsp_init_riscv(AVFloatDSPContext *fdsp)
double(* scalarproduct_double)(const double *v1, const double *v2, size_t len)
Calculate the scalar product of two vectors of doubles.
static void butterflies_float_c(float *restrict v1, float *restrict v2, int len)
float ff_scalarproduct_float_c(const float *v1, const float *v2, int len)
Return the scalar product of two vectors of floats.
static void vector_fmac_scalar_c(float *dst, const float *src, float mul, int len)
static void vector_fmul_scalar_c(float *dst, const float *src, float mul, int len)
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.
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
void ff_float_dsp_init_mips(AVFloatDSPContext *fdsp)
static void vector_fmul_window_c(float *dst, const float *src0, const float *src1, const float *win, int len)
#define i(width, name, range_min, range_max)
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.
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...
void * av_mallocz(size_t size)
Allocate a memory block with alignment suitable for all memory accesses (including vectors if availab...
void(* vector_dmul_scalar)(double *dst, const double *src, double mul, int len)
Multiply a vector of double by a scalar double.
void ff_float_dsp_init_x86(AVFloatDSPContext *fdsp)
av_cold void ff_float_dsp_init_aarch64(AVFloatDSPContext *fdsp)
IDirect3DDxgiInterfaceAccess _COM_Outptr_ void ** p
void(* vector_fmul_window)(float *dst, const float *src0, const float *src1, const float *win, int len)
Overlap/add with window function.
av_cold AVFloatDSPContext * avpriv_float_dsp_alloc(int bit_exact)
Allocate a float DSP context.
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.
Generated on Sat Oct 18 2025 19:23:33 for FFmpeg by
doxygen
1.8.17