diff options
author | Diego Biurrun <diego@biurrun.de> | 2012-01-30 11:30:13 +0100 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2012-01-31 19:56:13 +0100 |
commit | 9e3a2736bd3aa3d00cdfec0d0cf96f72a213cf11 (patch) | |
tree | affa623b74b900106c2f56470241d11cba352c39 | |
parent | 631f96f9592825e6611ea625d2476ff0c10adef3 (diff) | |
download | ffmpeg-9e3a2736bd3aa3d00cdfec0d0cf96f72a213cf11.tar.gz |
golomb-test: K&R formatting cosmetics
-rw-r--r-- | libavcodec/golomb-test.c | 35 |
1 files changed, 16 insertions, 19 deletions
diff --git a/libavcodec/golomb-test.c b/libavcodec/golomb-test.c index e3c89b1587..3dbf9d14cb 100644 --- a/libavcodec/golomb-test.c +++ b/libavcodec/golomb-test.c @@ -27,9 +27,10 @@ #undef printf #define COUNT 8000 -#define SIZE (COUNT*40) +#define SIZE (COUNT * 40) -int main(void){ +int main(void) +{ int i; uint8_t temp[SIZE]; PutBitContext pb; @@ -37,36 +38,32 @@ int main(void){ init_put_bits(&pb, temp, SIZE); printf("testing unsigned exp golomb\n"); - for(i=0; i<COUNT; i++){ + for (i = 0; i < COUNT; i++) set_ue_golomb(&pb, i); - } flush_put_bits(&pb); - init_get_bits(&gb, temp, 8*SIZE); - for(i=0; i<COUNT; i++){ + init_get_bits(&gb, temp, 8 * SIZE); + for (i = 0; i < COUNT; i++) { int j, s = show_bits(&gb, 24); - j= get_ue_golomb(&gb); - if(j != i){ - printf("mismatch! at %d (%d should be %d) bits:%6X\n", i, j, i, s); - } + j = get_ue_golomb(&gb); + if (j != i) + printf("mismatch at %d (%d should be %d) bits: %6X\n", i, j, i, s); } init_put_bits(&pb, temp, SIZE); printf("testing signed exp golomb\n"); - for(i=0; i<COUNT; i++){ - set_se_golomb(&pb, i - COUNT/2); - } + for (i = 0; i < COUNT; i++) + set_se_golomb(&pb, i - COUNT / 2); flush_put_bits(&pb); - init_get_bits(&gb, temp, 8*SIZE); - for(i=0; i<COUNT; i++){ + init_get_bits(&gb, temp, 8 * SIZE); + for (i = 0; i < COUNT; i++) { int j, s = show_bits(&gb, 24); - j= get_se_golomb(&gb); - if(j != i - COUNT/2){ - printf("mismatch! at %d (%d should be %d) bits:%6X\n", i, j, i, s); - } + j = get_se_golomb(&gb); + if (j != i - COUNT / 2) + printf("mismatch at %d (%d should be %d) bits: %6X\n", i, j, i, s); } return 0; |