Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.xiph.org/xiph/opus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Maxwell <greg@xiph.org>2013-04-06 06:16:58 +0400
committerGregory Maxwell <greg@xiph.org>2013-04-06 06:16:58 +0400
commit2fb4f5c43940d2b29b73d847ce8f8cf1b992896a (patch)
treec1d7f6e695837153c21b07d67c79c17cf8f89097
parenta8f04b23f97e42975c033e2f4d11e25498e9e6b8 (diff)
Random complexity in the encoder tests.
-rw-r--r--tests/test_opus_encode.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/test_opus_encode.c b/tests/test_opus_encode.c
index b80def3f..29c47d99 100644
--- a/tests/test_opus_encode.c
+++ b/tests/test_opus_encode.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011 Xiph.Org Foundation
+/* Copyright (c) 2011-2013 Xiph.Org Foundation
Written by Gregory Maxwell */
/*
Redistribution and use in source and binary forms, with or without
@@ -247,7 +247,11 @@ int run_test1(int no_fuzz)
do {
int bw,len,out_samples,frame_size;
frame_size=frame[j];
- if(fast_rand()%50==0)opus_encoder_ctl(enc, OPUS_RESET_STATE);
+ if(fast_rand()%100==0)opus_encoder_ctl(enc, OPUS_RESET_STATE);
+ if(fast_rand()%10==0){
+ int complex=fast_rand()%11;
+ if(opus_encoder_ctl(enc, OPUS_SET_COMPLEXITY(complex))!=OPUS_OK)test_failed();
+ }
if(fast_rand()%50==0)opus_decoder_ctl(dec, OPUS_RESET_STATE);
if(opus_encoder_ctl(enc, OPUS_SET_INBAND_FEC(rc==0))!=OPUS_OK)test_failed();
if(opus_encoder_ctl(enc, OPUS_SET_FORCE_MODE(MODE_SILK_ONLY+modes[j]))!=OPUS_OK)test_failed();