FFmpeg: tests/checkasm/fixed_dsp.c Source File
Go to the documentation of this file. 1 /*
2 * Copyright (c) 2015 James Almer
3 *
4 * This file is part of FFmpeg.
5 *
6 * FFmpeg is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * FFmpeg is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with FFmpeg; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 */
20
27
29
30 #define randomize_buffers() \
31 do { \
32 int i; \
33 for (i = 0; i < BUF_SIZE; i++) { \
34 src0[i] = sign_extend(rnd(), 24); \
35 src1[i] = sign_extend(rnd(), 24); \
36 src2[i] = sign_extend(rnd(), 24); \
37 } \
38 } while (0)
39
41 {
44
46
52 }
53
55 {
58
60
66 }
67
69 {
72
74
80 }
81
83 {
86
88
94 }
95
97 {
102
104
109
112 if (memcmp(ref0, new0,
BUF_SIZE *
sizeof(*ref0)) ||
113 memcmp(ref1, new1,
BUF_SIZE *
sizeof(*ref1)))
118 }
119
121 {
123
125
131 }
132
134 {
139
154 report(
"butterflies_fixed");
157 report(
"scalarproduct_fixed");
158
160 }
static void check_butterflies(const int *src0, const int *src1)
#define check_func(func,...)
static float win(SuperEqualizerContext *s, float n, int N)
void(* vector_fmul_add)(int *dst, const int *src0, const int *src1, const int *src2, int len)
Calculate the entry wise product of two vectors of integers, add a third vector of integers and store...
AVFixedDSPContext * avpriv_alloc_fixed_dsp(int bit_exact)
Allocate and initialize a fixed DSP context.
#define randomize_buffers()
#define LOCAL_ALIGNED_16(t, v,...)
int(* scalarproduct_fixed)(const int *v1, const int *v2, int len)
Calculate the scalar product of two vectors of integers.
#define LOCAL_ALIGNED_32(t, v,...)
static void check_vector_fmul_add(const int *src0, const int *src1, const int *src2)
void(* vector_fmul_reverse)(int *dst, const int *src0, const int *src1, int len)
static void check_vector_fmul_window(const int32_t *src0, const int32_t *src1, const int32_t *win)
static void check_scalarproduct_fixed(const int *src0, const int *src1)
void(* vector_fmul)(int *dst, const int *src0, const int *src1, int len)
Fixed-point multiplication that calculates the entry wise product of two vectors of integers and stor...
void checkasm_check_fixed_dsp(void)
void(* butterflies_fixed)(int *av_restrict v1, int *av_restrict v2, int len)
Calculate the sum and difference of two vectors of integers.
static int ref[MAX_W *MAX_W]
#define declare_func(ret,...)
void(* vector_fmul_window_scaled)(int16_t *dst, const int32_t *src0, const int32_t *src1, const int32_t *win, int len, uint8_t bits)
Overlap/add with window function.
static void check_vector_fmul(const int *src0, const int *src1)
void(* vector_fmul_window)(int32_t *dst, const int32_t *src0, const int32_t *src1, const int32_t *win, int len)
Overlap/add with window function.
static void check_vector_fmul_window_scaled(const int32_t *src0, const int32_t *src1, const int32_t *win)
Generated on Tue Feb 28 2023 21:34:12 for FFmpeg by
doxygen
1.8.17