summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMathis Rosenhauer <rosenhauer@dkrz.de>2012-11-20 14:34:45 +0100
committerThomas Jahns <jahns@dkrz.de>2013-02-19 11:33:00 +0100
commit3d5b023dedf57b4c447a0a8c89c4057bb67a3ac0 (patch)
tree1108c35332167fc9a6c9823a5beaa9149badd7ac /tests
parent2a2e588b28df54c3ef91b32b65d4f1aeca6c779c (diff)
downloadlibaec-3d5b023dedf57b4c447a0a8c89c4057bb67a3ac0.tar.gz
libaec-3d5b023dedf57b4c447a0a8c89c4057bb67a3ac0.tar.bz2
libaec-3d5b023dedf57b4c447a0a8c89c4057bb67a3ac0.zip
pluralization
Diffstat (limited to 'tests')
-rw-r--r--tests/check_aec.c32
-rw-r--r--tests/check_aec.h2
-rw-r--r--tests/check_buffer_sizes.c10
-rw-r--r--tests/check_code_options.c18
4 files changed, 31 insertions, 31 deletions
diff --git a/tests/check_aec.c b/tests/check_aec.c
index d54c6e8..ac1d915 100644
--- a/tests/check_aec.c
+++ b/tests/check_aec.c
@@ -25,21 +25,21 @@ int update_state(struct test_state *state)
{
struct aec_stream *strm = state->strm;
- if (strm->bit_per_sample > 16) {
+ if (strm->bits_per_sample > 16) {
state->id_len = 5;
- if (strm->bit_per_sample <= 24 && strm->flags & AEC_DATA_3BYTE) {
- state->byte_per_sample = 3;
+ if (strm->bits_per_sample <= 24 && strm->flags & AEC_DATA_3BYTE) {
+ state->bytes_per_sample = 3;
} else {
- state->byte_per_sample = 4;
+ state->bytes_per_sample = 4;
}
}
- else if (strm->bit_per_sample > 8) {
+ else if (strm->bits_per_sample > 8) {
state->id_len = 4;
- state->byte_per_sample = 2;
+ state->bytes_per_sample = 2;
} else {
state->id_len = 3;
- state->byte_per_sample = 1;
+ state->bytes_per_sample = 1;
}
if (strm->flags & AEC_DATA_MSB)
@@ -48,11 +48,11 @@ int update_state(struct test_state *state)
state->out = out_lsb;
if (strm->flags & AEC_DATA_SIGNED) {
- state->xmin = -(1ULL << (strm->bit_per_sample - 1));
- state->xmax = (1ULL << (strm->bit_per_sample - 1)) - 1;
+ state->xmin = -(1ULL << (strm->bits_per_sample - 1));
+ state->xmax = (1ULL << (strm->bits_per_sample - 1)) - 1;
} else {
state->xmin = 0;
- state->xmax = (1ULL << strm->bit_per_sample) - 1;
+ state->xmax = (1ULL << strm->bits_per_sample) - 1;
}
return 0;
@@ -75,15 +75,15 @@ int encode_decode_small(struct test_state *state)
avail_out = 1;
total_out = 0;
strm->next_in = state->ubuf;
- strm->avail_in = state->byte_per_sample;
+ strm->avail_in = state->bytes_per_sample;
strm->avail_out = 1;
strm->next_out = state->cbuf;
while ((avail_in || avail_out) && total_out < state->cbuf_len) {
if (strm->avail_in == 0 && avail_in) {
- n_in += state->byte_per_sample;
+ n_in += state->bytes_per_sample;
if (n_in < state->buf_len) {
- strm->avail_in = state->byte_per_sample;
+ strm->avail_in = state->bytes_per_sample;
strm->next_in = state->ubuf + n_in;
} else {
avail_in = 0;
@@ -120,7 +120,7 @@ int encode_decode_small(struct test_state *state)
strm->avail_in = 1;
strm->next_in = state->cbuf;
- strm->avail_out = state->byte_per_sample;
+ strm->avail_out = state->bytes_per_sample;
strm->next_out = state->obuf;
status = aec_decode_init(strm);
@@ -135,7 +135,7 @@ int encode_decode_small(struct test_state *state)
total_out = 0;
strm->next_in = state->cbuf;
strm->avail_in = 1;
- strm->avail_out = state->byte_per_sample;
+ strm->avail_out = state->bytes_per_sample;
strm->next_out = state->obuf;
while ((avail_in || avail_out) && total_out < state->buf_len) {
@@ -158,7 +158,7 @@ int encode_decode_small(struct test_state *state)
if (strm->total_out - total_out > 0
&& total_out < state->buf_len) {
total_out = strm->total_out;
- strm->avail_out = state->byte_per_sample;
+ strm->avail_out = state->bytes_per_sample;
strm->next_out = state->obuf + total_out;
avail_out = 1;
} else {
diff --git a/tests/check_aec.h b/tests/check_aec.h
index 2ee231f..e94a48f 100644
--- a/tests/check_aec.h
+++ b/tests/check_aec.h
@@ -5,7 +5,7 @@
struct test_state {
int (* codec)(struct test_state *state);
int id_len;
- int byte_per_sample;
+ int bytes_per_sample;
unsigned char *ubuf;
unsigned char *cbuf;
unsigned char *obuf;
diff --git a/tests/check_buffer_sizes.c b/tests/check_buffer_sizes.c
index 4da4816..abcf5db 100644
--- a/tests/check_buffer_sizes.c
+++ b/tests/check_buffer_sizes.c
@@ -13,7 +13,7 @@ int check_block_sizes(struct test_state *state)
for (bs = 8; bs <= 64; bs *= 2) {
state->strm->block_size = bs;
- state->strm->rsi = state->buf_len / (bs * state->byte_per_sample);
+ state->strm->rsi = state->buf_len / (bs * state->bytes_per_sample);
status = encode_decode_large(state);
if (status)
@@ -30,7 +30,7 @@ int check_block_sizes_short(struct test_state *state)
tmp = state->ibuf_len;
for (bs = 8; bs <= 64; bs *= 2) {
state->strm->block_size = bs;
- state->strm->rsi = state->buf_len / (bs * state->byte_per_sample);
+ state->strm->rsi = state->buf_len / (bs * state->bytes_per_sample);
state->ibuf_len = state->buf_len - 2 * bs + 4;
status = encode_decode_large(state);
if (status)
@@ -51,11 +51,11 @@ int check_rsi(struct test_state *state)
int status, size;
unsigned char *tmp;
- size = state->byte_per_sample;
+ size = state->bytes_per_sample;
for (tmp = state->ubuf;
tmp < state->ubuf + state->buf_len;
- tmp += 2 * state->byte_per_sample) {
+ tmp += 2 * state->bytes_per_sample) {
state->out(tmp, state->xmax, size);
state->out(tmp + size, state->xmin, size);
}
@@ -96,7 +96,7 @@ int main (void)
strm.flags = AEC_DATA_PREPROCESS;
state.strm = &strm;
- strm.bit_per_sample = 32;
+ strm.bits_per_sample = 32;
update_state(&state);
status = check_rsi(&state);
diff --git a/tests/check_code_options.c b/tests/check_code_options.c
index fbbff24..5ec62d7 100644
--- a/tests/check_code_options.c
+++ b/tests/check_code_options.c
@@ -14,7 +14,7 @@ int check_block_sizes(struct test_state *state, int id, int id_len)
for (bs = 8; bs <= 64; bs *= 2) {
state->strm->block_size = bs;
- max_rsi = state->buf_len / (bs * state->byte_per_sample);
+ max_rsi = state->buf_len / (bs * state->bytes_per_sample);
if (max_rsi > 4096)
max_rsi = 4096;
@@ -54,11 +54,11 @@ int check_splitting(struct test_state *state, int k)
int status, size;
unsigned char *tmp;
- size = state->byte_per_sample;
+ size = state->bytes_per_sample;
for (tmp = state->ubuf;
tmp < state->ubuf + state->buf_len;
- tmp += 4 * state->byte_per_sample) {
+ tmp += 4 * state->bytes_per_sample) {
state->out(tmp, state->xmin + (1ULL << (k - 1)) - 1, size);
state->out(tmp + size, state->xmin, size);
state->out(tmp + 2 * size, state->xmin + (1ULL << (k + 1)) - 1, size);
@@ -79,11 +79,11 @@ int check_uncompressed(struct test_state *state)
int status, size;
unsigned char *tmp;
- size = state->byte_per_sample;
+ size = state->bytes_per_sample;
for (tmp = state->ubuf;
tmp < state->ubuf + state->buf_len;
- tmp += 2 * state->byte_per_sample) {
+ tmp += 2 * state->bytes_per_sample) {
state->out(tmp, state->xmax, size);
state->out(tmp + size, state->xmin, size);
}
@@ -104,11 +104,11 @@ int check_fs(struct test_state *state)
int status, size;
unsigned char *tmp;
- size = state->byte_per_sample;
+ size = state->bytes_per_sample;
for (tmp = state->ubuf;
tmp < state->ubuf + state->buf_len;
- tmp += 4 * state->byte_per_sample) {
+ tmp += 4 * state->bytes_per_sample) {
state->out(tmp, state->xmin + 2, size);
state->out(tmp + size, state->xmin, size);
state->out(tmp + 2 * size, state->xmin, size);
@@ -129,7 +129,7 @@ int check_se(struct test_state *state)
int status, size;
unsigned char *tmp;
- size = state->byte_per_sample;
+ size = state->bytes_per_sample;
for (tmp = state->ubuf;
tmp < state->ubuf + state->buf_len;
@@ -158,7 +158,7 @@ int check_bps(struct test_state *state)
int k, status, bps;
for (bps = 8; bps <= 32; bps += 8) {
- state->strm->bit_per_sample = bps;
+ state->strm->bits_per_sample = bps;
if (bps == 24)
state->strm->flags |= AEC_DATA_3BYTE;
else