FFmpeg
Loading...
Searching...
No Matches
tests
checkasm
vf_idet.c
Go to the documentation of this file.
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 "
checkasm.h
"
20
21
#include "
libavfilter/vf_idetdsp.h
"
22
#include "
libavutil/mem_internal.h
"
23
24
#define WIDTH 512
25
26
static
void
check_idet
(
int
depth)
27
{
28
IDETDSPContext
dsp;
29
30
LOCAL_ALIGNED_32
(uint8_t, in0, [
WIDTH
]);
31
LOCAL_ALIGNED_32
(uint8_t, in1, [
WIDTH
]);
32
LOCAL_ALIGNED_32
(uint8_t, in2, [
WIDTH
]);
33
34
declare_func
(
int
,
const
uint8_t *
a
,
const
uint8_t *
b
,
35
const
uint8_t *
c
,
int
w
);
36
37
ff_idet_dsp_init
(&dsp, depth > 8);
38
39
for
(
int
x = 0; x <
WIDTH
; x++) {
40
in0[x] =
rnd
() & 0xFF;
41
in1[x] =
rnd
() & 0xFF;
42
in2[x] =
rnd
() & 0xFF;
43
}
44
45
if
(
check_func
(dsp.
filter_line
,
"idet%d"
, depth)) {
46
/* Ensure odd tail is handled correctly */
47
int
res_ref =
call_ref
(in0, in1, in2,
WIDTH
- 8);
48
int
res_new =
call_new
(in0, in1, in2,
WIDTH
- 8);
49
if
(res_ref != res_new) {
50
fprintf(stderr,
"idet%d: result mismatch: %u != %u\n"
,
51
depth, res_ref, res_new);
52
fail
();
53
}
54
bench_new
(in0, in1, in2,
WIDTH
);
55
}
56
}
57
58
void
checkasm_check_idet
(
void
)
59
{
60
check_idet
(8);
61
report
(
"idet8"
);
62
63
check_idet
(16);
64
report
(
"idet16"
);
65
}
checkasm.h
rnd
#define rnd
Definition
checkasm.h:136
declare_func
#define declare_func
Definition
test.h:489
fail
#define fail
Definition
test.h:479
bench_new
#define bench_new
Definition
test.h:487
check_func
#define check_func
Definition
test.h:481
call_new
#define call_new
Definition
test.h:486
call_ref
#define call_ref
Definition
test.h:485
report
#define report
Definition
test.h:480
a
int a
Definition
h264pred_template.c:416
b
#define b
Definition
input.c:43
WIDTH
#define WIDTH
Definition
c93.c:45
w
uint8_t w
Definition
llvidencdsp.c:39
mem_internal.h
LOCAL_ALIGNED_32
#define LOCAL_ALIGNED_32(t, v,...)
Definition
mem_internal.h:132
IDETDSPContext
Definition
vf_idetdsp.h:26
IDETDSPContext::filter_line
ff_idet_filter_func filter_line
Definition
vf_idetdsp.h:27
check_idet
static void check_idet(int depth)
Definition
vf_idet.c:26
checkasm_check_idet
void checkasm_check_idet(void)
Definition
vf_idet.c:58
ff_idet_dsp_init
void av_cold ff_idet_dsp_init(IDETDSPContext *dsp, int depth)
Definition
vf_idetdsp.c:56
vf_idetdsp.h
c
static double c[64]
Definition
vsrc_mptestsrc.c:89
Generated on Sun Aug 16 2026 20:20:57 for FFmpeg by
1.13.2