1 /*
2 * This file is part of FFmpeg.
3 *
4 * FFmpeg is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (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
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with FFmpeg; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 */
18
19 #include "config.h"
20
22 #include <stdint.h>
23
28
30
31 #define randomize_buffer(buf) \
32 do { \
33 int i; \
34 double bmg[2], stddev = 10.0, mean = 0.0; \
35 \
36 for (i = 0; i < LEN*2+8; i += 2) { \
37 av_bmg_get(&checkasm_lfg, bmg); \
38 buf[i] = bmg[0] * stddev + mean; \
39 buf[i + 1] = bmg[1] * stddev + mean; \
40 } \
41 } while(0);
42
44 {
48
49 declare_func(
void,
float *sum,
const float *t,
const float *
c,
51
52 memcpy(cdst,
src0, (
LEN*2+8) *
sizeof(
float));
53 memcpy(odst,
src0, (
LEN*2+8) *
sizeof(
float));
56 for (
i = 0;
i <=
LEN*2;
i++) {
58 float cre =
src2[idx];
59 float cim =
src2[idx + 1];
60 float tre =
src1[idx];
61 float tim =
src1[idx + 1];
66 fabs(tre * cre - tim * cim) +
67 fabs(tre * cim + tim * cre) +
70 fprintf(stderr, "%d: %- .12f - %- .12f = % .12g\n",
71 i, cdst[
i], odst[
i], cdst[
i] - odst[
i]);
73 break;
74 }
75 }
76 memcpy(odst,
src0, (
LEN*2+8) *
sizeof(
float));
78 }
79
81 {
86
88
92
96 }