[FFmpeg-cvslog] golomb-test: K&R formatting cosmetics
Diego Biurrun
git at videolan.org
Wed Feb 1 03:06:34 CET 2012
ffmpeg | branch: master | Diego Biurrun <diego at biurrun.de> | Mon Jan 30 11:30:13 2012 +0100| [9e3a2736bd3aa3d00cdfec0d0cf96f72a213cf11] | committer: Diego Biurrun
golomb-test: K&R formatting cosmetics
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9e3a2736bd3aa3d00cdfec0d0cf96f72a213cf11
---
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 e3c89b1..3dbf9d1 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;
More information about the ffmpeg-cvslog
mailing list