# HG changeset patch # User diego # Date 1254174382 0 # Node ID d3644248015aaaecc590561c1a3de0fc5b7cd0b1 # Parent d157ccc267e7b0a2c67a004e3eb17a0e4fc95031 some more linebreak and brace placement cosmetics diff -r d157ccc267e7 -r d3644248015a vorbis.c --- a/vorbis.c Mon Sep 28 21:13:47 2009 +0000 +++ b/vorbis.c Mon Sep 28 21:46:22 2009 +0000 @@ -39,7 +39,8 @@ do { ++ret; - for(i=0,j=ret;iavccontext, AV_LOG_INFO, "An empty codebook. Heh?! \n"); return 0; } codes[p]=0; - if (bits[p] > 32) return 1; + if (bits[p] > 32) + return 1; for(i=0;i 32) return 1; - if (bits[p]==0) continue; + if (bits[p] > 32) + return 1; + if (bits[p]==0) + continue; // find corresponding exit(node which the tree can grow further from) for(i=bits[p];i>0;--i) - if (exit_at_level[i]) break; - if (!i) return 1; // overspecified tree + if (exit_at_level[i]) + break; + if (!i) // overspecified tree + return 1; code=exit_at_level[i]; exit_at_level[i]=0; // construct code (append 0s to end) and introduce new exits @@ -109,7 +116,8 @@ //no exits should be left (underspecified tree - ie. unused valid vlcs - not allowed by SPEC) for (p=1; p<33; p++) - if (exit_at_level[p]) return 1; + if (exit_at_level[p]) + return 1; return 0; } @@ -127,9 +135,11 @@ for (j = 2; j < i; j++) { int tmp = list[j].x; if (tmp < list[i].x) { - if (tmp > list[list[i].low].x) list[i].low = j; + if (tmp > list[list[i].low].x) + list[i].low = j; } else { - if (tmp < list[list[i].high].x) list[i].high = j; + if (tmp < list[list[i].high].x) + list[i].high = j; } } } @@ -212,7 +222,9 @@ lx = x1; ly = y1; } - if (lx >= samples) break; + if (lx >= samples) + break; } - if (lx < samples) render_line(lx, ly, samples, ly, out); + if (lx < samples) + render_line(lx, ly, samples, ly, out); } diff -r d157ccc267e7 -r d3644248015a vorbis_dec.c --- a/vorbis_dec.c Mon Sep 28 21:13:47 2009 +0000 +++ b/vorbis_dec.c Mon Sep 28 21:46:22 2009 +0000 @@ -747,9 +747,8 @@ if (mapping_setup->submaps>1) { mapping_setup->mux=av_mallocz(vc->audio_channels * sizeof(uint_fast8_t)); - for(j=0;jaudio_channels;++j) { + for(j=0;jaudio_channels;++j) mapping_setup->mux[j]=get_bits(gb, 4); - } } for(j=0;jsubmaps;++j) { @@ -1162,7 +1161,8 @@ int_fast16_t dy, err; - if (!get_bits1(gb)) return 1; // silence + if (!get_bits1(gb)) // silence + return 1; // Read values (or differences) for the floor's points diff -r d157ccc267e7 -r d3644248015a vorbis_enc.c --- a/vorbis_enc.c Mon Sep 28 21:13:47 2009 +0000 +++ b/vorbis_enc.c Mon Sep 28 21:46:22 2009 +0000 @@ -894,7 +894,8 @@ float n = (float)(1 << venc->log2_blocksize[0]) / 4.; // FIXME use dsp - if (!venc->have_saved && !samples) return 0; + if (!venc->have_saved && !samples) + return 0; if (venc->have_saved) for (channel = 0; channel < venc->channels; channel++)