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

gitlab.com/quite/celt.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJean-Marc Valin <jean-marc.valin@usherbrooke.ca>2009-10-24 05:44:54 +0400
committerJean-Marc Valin <jean-marc.valin@usherbrooke.ca>2009-10-24 05:44:54 +0400
commit789fc14163d662af0ec6b6f4841451fa8147da14 (patch)
treec3d08fe56918f5f845e3e151c09b473d882e4fa9 /tests
parent954fb110b913ef95430ec1c53816702a6be7e497 (diff)
Removing unused code in the entropy coder
Diffstat (limited to 'tests')
-rw-r--r--tests/ectest.c2
-rw-r--r--tests/laplace-test.c7
2 files changed, 5 insertions, 4 deletions
diff --git a/tests/ectest.c b/tests/ectest.c
index ec466b3..4552c1b 100644
--- a/tests/ectest.c
+++ b/tests/ectest.c
@@ -105,7 +105,6 @@ int main(int _argc,char **_argv){
ldexp(nbits2,-4),ldexp(nbits,-4));
ret=-1;
}
- ec_byte_writeclear(&buf);
srand(seed);
fprintf(stderr,"Testing random streams... Random seed: %u (%.4X)\n", seed, rand() % 65536);
for(i=0;i<409600;i++){
@@ -149,7 +148,6 @@ int main(int _argc,char **_argv){
ret=-1;
}
}
- ec_byte_writeclear(&buf);
free(data);
}
free(ptr);
diff --git a/tests/laplace-test.c b/tests/laplace-test.c
index 6e5a083..417f4e1 100644
--- a/tests/laplace-test.c
+++ b/tests/laplace-test.c
@@ -15,6 +15,7 @@
#include "../libcelt/entcode.c"
#include "../libcelt/laplace.c"
+#define DATA_SIZE 40000
int main(void)
{
@@ -23,9 +24,12 @@ int main(void)
ec_enc enc;
ec_dec dec;
ec_byte_buffer buf;
+ unsigned char *ptr;
int val[10000], decay[10000];
ALLOC_STACK;
- ec_byte_writeinit(&buf);
+ ptr = malloc(DATA_SIZE);
+ ec_byte_writeinit_buffer(&buf, ptr, DATA_SIZE);
+ //ec_byte_writeinit(&buf);
ec_enc_init(&enc,&buf);
val[0] = 3; decay[0] = 6000;
@@ -54,6 +58,5 @@ int main(void)
}
}
- ec_byte_writeclear(&buf);
return ret;
}