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
823cc7e2
Commit
823cc7e2
authored
Jul 05, 2017
by
James Almer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
checkasm: add a g722dsp test
Signed-off-by:
James Almer
<
jamrial@gmail.com
>
parent
035c755b
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
69 additions
and
0 deletions
+69
-0
Makefile
tests/checkasm/Makefile
+1
-0
checkasm.c
tests/checkasm/checkasm.c
+3
-0
checkasm.h
tests/checkasm/checkasm.h
+1
-0
g722dsp.c
tests/checkasm/g722dsp.c
+63
-0
checkasm.mak
tests/fate/checkasm.mak
+1
-0
No files found.
tests/checkasm/Makefile
View file @
823cc7e2
...
...
@@ -5,6 +5,7 @@ AVCODECOBJS-$(CONFIG_BLOCKDSP) += blockdsp.o
AVCODECOBJS-$(CONFIG_BSWAPDSP)
+=
bswapdsp.o
AVCODECOBJS-$(CONFIG_FLACDSP)
+=
flacdsp.o
AVCODECOBJS-$(CONFIG_FMTCONVERT)
+=
fmtconvert.o
AVCODECOBJS-$(CONFIG_G722DSP)
+=
g722dsp.o
AVCODECOBJS-$(CONFIG_H264DSP)
+=
h264dsp.o
AVCODECOBJS-$(CONFIG_H264PRED)
+=
h264pred.o
AVCODECOBJS-$(CONFIG_H264QPEL)
+=
h264qpel.o
...
...
tests/checkasm/checkasm.c
View file @
823cc7e2
...
...
@@ -90,6 +90,9 @@ static const struct {
#if CONFIG_FMTCONVERT
{
"fmtconvert"
,
checkasm_check_fmtconvert
},
#endif
#if CONFIG_G722DSP
{
"g722dsp"
,
checkasm_check_g722dsp
},
#endif
#if CONFIG_H264DSP
{
"h264dsp"
,
checkasm_check_h264dsp
},
#endif
...
...
tests/checkasm/checkasm.h
View file @
823cc7e2
...
...
@@ -42,6 +42,7 @@ void checkasm_check_fixed_dsp(void);
void
checkasm_check_flacdsp
(
void
);
void
checkasm_check_float_dsp
(
void
);
void
checkasm_check_fmtconvert
(
void
);
void
checkasm_check_g722dsp
(
void
);
void
checkasm_check_h264dsp
(
void
);
void
checkasm_check_h264pred
(
void
);
void
checkasm_check_h264qpel
(
void
);
...
...
tests/checkasm/g722dsp.c
0 → 100644
View file @
823cc7e2
/*
* 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/g722.h"
#include "libavcodec/g722dsp.h"
#include "libavcodec/mathops.h"
#define randomize_buffers() \
do { \
int i; \
for (i = 0; i < PREV_SAMPLES_BUF_SIZE; i++) { \
src0[i] = src1[i] = sign_extend(rnd(), 16); \
} \
} while (0)
static
void
check_qmf
(
void
)
{
int16_t
src0
[
PREV_SAMPLES_BUF_SIZE
];
int16_t
src1
[
PREV_SAMPLES_BUF_SIZE
];
const
int16_t
*
tmp0
=
src0
;
const
int16_t
*
tmp1
=
src1
;
int
dst0
[
2
],
dst1
[
2
];
int
i
;
declare_func
(
void
,
const
int16_t
*
prev_samples
,
int
xout
[
2
]);
randomize_buffers
();
for
(
i
=
0
;
i
<
PREV_SAMPLES_BUF_SIZE
-
24
;
i
++
)
{
call_ref
(
tmp0
++
,
dst0
);
call_new
(
tmp1
++
,
dst1
);
if
(
memcmp
(
dst0
,
dst1
,
sizeof
(
dst0
)))
fail
();
}
bench_new
(
src1
,
dst1
);
}
void
checkasm_check_g722dsp
(
void
)
{
G722DSPContext
h
;
ff_g722dsp_init
(
&
h
);
if
(
check_func
(
h
.
apply_qmf
,
"g722_apply_qmf"
))
check_qmf
();
report
(
"apply_qmf"
);
}
tests/fate/checkasm.mak
View file @
823cc7e2
...
...
@@ -7,6 +7,7 @@ FATE_CHECKASM = fate-checkasm-aacpsdsp \
fate-checkasm-flacdsp \
fate-checkasm-float_dsp \
fate-checkasm-fmtconvert \
fate-checkasm-g722dsp \
fate-checkasm-h264dsp \
fate-checkasm-h264pred \
fate-checkasm-h264qpel \
...
...
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