Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
7323c896
Commit
7323c896
authored
Sep 17, 2017
by
James Almer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
checkasm: add an exrdsp test
Signed-off-by:
James Almer
<
jamrial@gmail.com
>
parent
98d7ad08
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
74 additions
and
0 deletions
+74
-0
Makefile
tests/checkasm/Makefile
+1
-0
checkasm.c
tests/checkasm/checkasm.c
+3
-0
checkasm.h
tests/checkasm/checkasm.h
+1
-0
exrdsp.c
tests/checkasm/exrdsp.c
+68
-0
checkasm.mak
tests/fate/checkasm.mak
+1
-0
No files found.
tests/checkasm/Makefile
View file @
7323c896
...
@@ -18,6 +18,7 @@ AVCODECOBJS-$(CONFIG_AAC_DECODER) += aacpsdsp.o \
...
@@ -18,6 +18,7 @@ AVCODECOBJS-$(CONFIG_AAC_DECODER) += aacpsdsp.o \
sbrdsp.o
sbrdsp.o
AVCODECOBJS-$(CONFIG_ALAC_DECODER)
+=
alacdsp.o
AVCODECOBJS-$(CONFIG_ALAC_DECODER)
+=
alacdsp.o
AVCODECOBJS-$(CONFIG_DCA_DECODER)
+=
synth_filter.o
AVCODECOBJS-$(CONFIG_DCA_DECODER)
+=
synth_filter.o
AVCODECOBJS-$(CONFIG_EXR_DECODER)
+=
exrdsp.o
AVCODECOBJS-$(CONFIG_JPEG2000_DECODER)
+=
jpeg2000dsp.o
AVCODECOBJS-$(CONFIG_JPEG2000_DECODER)
+=
jpeg2000dsp.o
AVCODECOBJS-$(CONFIG_PIXBLOCKDSP)
+=
pixblockdsp.o
AVCODECOBJS-$(CONFIG_PIXBLOCKDSP)
+=
pixblockdsp.o
AVCODECOBJS-$(CONFIG_HEVC_DECODER)
+=
hevc_add_res.o
hevc_idct.o
AVCODECOBJS-$(CONFIG_HEVC_DECODER)
+=
hevc_add_res.o
hevc_idct.o
...
...
tests/checkasm/checkasm.c
View file @
7323c896
...
@@ -92,6 +92,9 @@ static const struct {
...
@@ -92,6 +92,9 @@ static const struct {
#if CONFIG_DCA_DECODER
#if CONFIG_DCA_DECODER
{
"synth_filter"
,
checkasm_check_synth_filter
},
{
"synth_filter"
,
checkasm_check_synth_filter
},
#endif
#endif
#if CONFIG_EXR_DECODER
{
"exrdsp"
,
checkasm_check_exrdsp
},
#endif
#if CONFIG_FLACDSP
#if CONFIG_FLACDSP
{
"flacdsp"
,
checkasm_check_flacdsp
},
{
"flacdsp"
,
checkasm_check_flacdsp
},
#endif
#endif
...
...
tests/checkasm/checkasm.h
View file @
7323c896
...
@@ -46,6 +46,7 @@ void checkasm_check_blend(void);
...
@@ -46,6 +46,7 @@ void checkasm_check_blend(void);
void
checkasm_check_blockdsp
(
void
);
void
checkasm_check_blockdsp
(
void
);
void
checkasm_check_bswapdsp
(
void
);
void
checkasm_check_bswapdsp
(
void
);
void
checkasm_check_colorspace
(
void
);
void
checkasm_check_colorspace
(
void
);
void
checkasm_check_exrdsp
(
void
);
void
checkasm_check_fixed_dsp
(
void
);
void
checkasm_check_fixed_dsp
(
void
);
void
checkasm_check_flacdsp
(
void
);
void
checkasm_check_flacdsp
(
void
);
void
checkasm_check_float_dsp
(
void
);
void
checkasm_check_float_dsp
(
void
);
...
...
tests/checkasm/exrdsp.c
0 → 100644
View file @
7323c896
/*
* Copyright (c) 2017 James Almer
*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* FFmpeg is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with FFmpeg; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include <string.h>
#include "checkasm.h"
#include "libavcodec/avcodec.h"
#include "libavcodec/exrdsp.h"
#include "libavutil/intreadwrite.h"
#define BUF_SIZE 5120
#define PADDED_BUF_SIZE BUF_SIZE+AV_INPUT_BUFFER_PADDING_SIZE*2
#define randomize_buffers() \
do { \
int i; \
for (i = 0; i < BUF_SIZE; i += 4) { \
uint32_t r = rnd(); \
AV_WN32A(src + i, r); \
} \
} while (0)
static
void
check_reorder_pixels
(
void
)
{
LOCAL_ALIGNED_32
(
uint8_t
,
src
,
[
PADDED_BUF_SIZE
]);
LOCAL_ALIGNED_32
(
uint8_t
,
dst_ref
,
[
PADDED_BUF_SIZE
]);
LOCAL_ALIGNED_32
(
uint8_t
,
dst_new
,
[
PADDED_BUF_SIZE
]);
declare_func
(
void
,
uint8_t
*
dst
,
const
uint8_t
*
src
,
ptrdiff_t
size
);
memset
(
src
,
0
,
PADDED_BUF_SIZE
);
memset
(
dst_ref
,
0
,
PADDED_BUF_SIZE
);
memset
(
dst_new
,
0
,
PADDED_BUF_SIZE
);
randomize_buffers
();
call_ref
(
dst_ref
,
src
,
BUF_SIZE
);
call_new
(
dst_new
,
src
,
BUF_SIZE
);
if
(
memcmp
(
dst_ref
,
dst_new
,
BUF_SIZE
))
fail
();
bench_new
(
dst_new
,
src
,
BUF_SIZE
);
}
void
checkasm_check_exrdsp
(
void
)
{
ExrDSPContext
h
;
ff_exrdsp_init
(
&
h
);
if
(
check_func
(
h
.
reorder_pixels
,
"reorder_pixels"
))
check_reorder_pixels
();
report
(
"reorder_pixels"
);
}
tests/fate/checkasm.mak
View file @
7323c896
...
@@ -3,6 +3,7 @@ FATE_CHECKASM = fate-checkasm-aacpsdsp \
...
@@ -3,6 +3,7 @@ FATE_CHECKASM = fate-checkasm-aacpsdsp \
fate-checkasm-audiodsp \
fate-checkasm-audiodsp \
fate-checkasm-blockdsp \
fate-checkasm-blockdsp \
fate-checkasm-bswapdsp \
fate-checkasm-bswapdsp \
fate-checkasm-exrdsp \
fate-checkasm-fixed_dsp \
fate-checkasm-fixed_dsp \
fate-checkasm-flacdsp \
fate-checkasm-flacdsp \
fate-checkasm-float_dsp \
fate-checkasm-float_dsp \
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment