diff options
author | Mathis Rosenhauer <rosenhauer@dkrz.de> | 2014-02-10 16:43:05 +0100 |
---|---|---|
committer | Mathis Rosenhauer <rosenhauer@dkrz.de> | 2014-02-10 16:43:05 +0100 |
commit | e613841641a0955c04b248a0a5c665e383f93759 (patch) | |
tree | a1908b02808f9f7ddd2b0b1b731d30529cc84792 /tests | |
parent | 211fb21cb85536bde262ba40cee28f98ef157ed4 (diff) | |
download | libaec-e613841641a0955c04b248a0a5c665e383f93759.tar.gz libaec-e613841641a0955c04b248a0a5c665e383f93759.tar.bz2 libaec-e613841641a0955c04b248a0a5c665e383f93759.zip |
Fix encoding long fs + check. Only relevant for j=64
Diffstat (limited to 'tests')
-rw-r--r-- | tests/check_long_fs.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/tests/check_long_fs.c b/tests/check_long_fs.c index 3a945e3..246c41c 100644 --- a/tests/check_long_fs.c +++ b/tests/check_long_fs.c @@ -5,24 +5,20 @@ #include "libaec.h" #include "check_aec.h" -#define BUF_SIZE (4 * 64 * 4) +#define BUF_SIZE (64 * 4) int check_long_fs(struct test_state *state) { - int status, size; - unsigned char *tmp; + int status, size, i, bs; size = state->bytes_per_sample; + bs = state->strm->block_size; - for (tmp = state->ubuf; - tmp < state->ubuf + state->buf_len; - tmp += 2 * size) { - state->out(tmp, state->xmin, size); - state->out(tmp + size, state->xmin + 2, size); + for (i = 0; i < bs / 2; i++) { + state->out(state->ubuf + size * i, state->xmin, size); + state->out(state->ubuf + bs * size / 2 + size * i, 65000, size); } - state->out(state->ubuf + (64 + 1) * size, state->xmax-1, size); - printf("Checking long fs ... "); status = state->codec(state); @@ -53,9 +49,9 @@ int main (void) strm.flags = AEC_DATA_PREPROCESS; state.strm = &strm; - strm.bits_per_sample = 32; + strm.bits_per_sample = 16; strm.block_size = 64; - strm.rsi = 64; + strm.rsi = 1; state.codec = encode_decode_large; update_state(&state); |