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
3db60932
Commit
3db60932
authored
May 05, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
swr-test: allow testing a specific subset of cases
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
23fba3ed
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
swresample_test.c
libswresample/swresample_test.c
+11
-2
No files found.
libswresample/swresample_test.c
View file @
3db60932
...
...
@@ -237,14 +237,15 @@ int main(int argc, char **argv){
uint32_t
rand_seed
=
0
;
int
remaining_tests
[
max_tests
];
int
test
;
int
specific_test
=
-
1
;
struct
SwrContext
*
forw_ctx
=
NULL
;
struct
SwrContext
*
backw_ctx
=
NULL
;
if
(
argc
>
1
)
{
if
(
!
strcmp
(
argv
[
1
],
"-h"
))
{
av_log
(
NULL
,
AV_LOG_INFO
,
"Usage: swresample-test [<num_tests>
]
\n
"
"Default is %d
\n
"
,
num_tests
);
av_log
(
NULL
,
AV_LOG_INFO
,
"Usage: swresample-test [<num_tests>
[ <test>]]
\n
"
"
num_tests
Default is %d
\n
"
,
num_tests
);
return
0
;
}
num_tests
=
strtol
(
argv
[
1
],
NULL
,
0
);
...
...
@@ -254,6 +255,9 @@ int main(int argc, char **argv){
}
if
(
num_tests
<=
0
||
num_tests
>
max_tests
)
num_tests
=
max_tests
;
if
(
argc
>
2
)
{
specific_test
=
strtol
(
argv
[
1
],
NULL
,
0
);
}
}
for
(
i
=
0
;
i
<
max_tests
;
i
++
)
...
...
@@ -281,6 +285,11 @@ int main(int argc, char **argv){
out_sample_rate
=
rates
[
vector
%
FF_ARRAY_ELEMS
(
rates
)];
vector
/=
FF_ARRAY_ELEMS
(
rates
);
av_assert0
(
!
vector
);
if
(
specific_test
==
0
){
if
(
out_sample_rate
!=
in_sample_rate
||
in_ch_layout
!=
out_ch_layout
)
continue
;
}
in_ch_count
=
av_get_channel_layout_nb_channels
(
in_ch_layout
);
out_ch_count
=
av_get_channel_layout_nb_channels
(
out_ch_layout
);
av_get_channel_layout_string
(
in_layout_string
,
sizeof
(
in_layout_string
),
in_ch_count
,
in_ch_layout
);
...
...
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