summaryrefslogtreecommitdiff
path: root/libswresample
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-05-05 18:22:48 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-05-05 18:32:34 +0200
commit3db6093244f46f580b2c1857179580e312b52954 (patch)
tree4732b6a95d0e58415699d2b2804d68f0b8975958 /libswresample
parent23fba3ed5c75aded6768259a711bdc74d9ddbe02 (diff)
swr-test: allow testing a specific subset of cases
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswresample')
-rw-r--r--libswresample/swresample_test.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/libswresample/swresample_test.c b/libswresample/swresample_test.c
index 7c6e466871..7af55b8389 100644
--- a/libswresample/swresample_test.c
+++ b/libswresample/swresample_test.c
@@ -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);