changeset 5518:d2ef80f5fd7e libavcodec

use skip_bits where appropriate
author alex
date Thu, 09 Aug 2007 00:57:36 +0000
parents 998ed46cfa66
children b790f8c0ee24
files alac.c mpegaudiodec.c rv10.c shorten.c smacker.c vorbis_dec.c wmadec.c
diffstat 7 files changed, 17 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/alac.c	Thu Aug 09 00:54:41 2007 +0000
+++ b/alac.c	Thu Aug 09 00:57:36 2007 +0000
@@ -201,9 +201,9 @@
 
                 if (extrabits > 1) {
                     x += extrabits - 1;
-                    get_bits(&alac->gb, k);
+                    skip_bits(&alac->gb, k);
                 } else
-                    get_bits(&alac->gb, k - 1);
+                    skip_bits(&alac->gb, k - 1);
             }
         }
 
@@ -250,9 +250,9 @@
                 if (extrabits < 2) {
                     x = 1 - extrabits;
                     block_size += x;
-                    get_bits(&alac->gb, k - 1);
+                    skip_bits(&alac->gb, k - 1);
                 } else {
-                    get_bits(&alac->gb, k);
+                    skip_bits(&alac->gb, k);
                 }
             }
 
@@ -484,9 +484,9 @@
     /* 2^result = something to do with output waiting.
      * perhaps matters if we read > 1 frame in a pass?
      */
-    get_bits(&alac->gb, 4);
+    skip_bits(&alac->gb, 4);
 
-    get_bits(&alac->gb, 12); /* unknown, skip 12 bits */
+    skip_bits(&alac->gb, 12); /* unknown, skip 12 bits */
 
     /* the output sample size is stored soon */
     hassize = get_bits1(&alac->gb);
--- a/mpegaudiodec.c	Thu Aug 09 00:54:41 2007 +0000
+++ b/mpegaudiodec.c	Thu Aug 09 00:57:36 2007 +0000
@@ -2288,7 +2288,7 @@
 
     /* skip error protection field */
     if (s->error_protection)
-        get_bits(&s->gb, 16);
+        skip_bits(&s->gb, 16);
 
     dprintf(s->avctx, "frame %d:\n", s->frame_count);
     switch(s->layer) {
--- a/rv10.c	Thu Aug 09 00:54:41 2007 +0000
+++ b/rv10.c	Thu Aug 09 00:57:36 2007 +0000
@@ -200,7 +200,7 @@
                 else
                     code = (int8_t)(get_bits(&s->gb, 8));
             } else if (code == 0x7f) {
-                get_bits(&s->gb, 11);
+                skip_bits(&s->gb, 11);
                 code = 1;
             }
         } else {
@@ -216,7 +216,7 @@
             } else if (code == 0x1fd) {
                 code = -128 + get_bits(&s->gb, 7);
             } else if (code == 0x1fe) {
-                get_bits(&s->gb, 9);
+                skip_bits(&s->gb, 9);
                 code = 1;
             } else {
                 av_log(s->avctx, AV_LOG_ERROR, "chroma dc error\n");
--- a/shorten.c	Thu Aug 09 00:54:41 2007 +0000
+++ b/shorten.c	Thu Aug 09 00:57:36 2007 +0000
@@ -299,7 +299,7 @@
         }
     }
     init_get_bits(&s->gb, buf, buf_size*8);
-    get_bits(&s->gb, s->bitindex);
+    skip_bits(&s->gb, s->bitindex);
     if (!s->blocksize)
     {
         int maxnlpc = 0;
--- a/smacker.c	Thu Aug 09 00:54:41 2007 +0000
+++ b/smacker.c	Thu Aug 09 00:57:36 2007 +0000
@@ -201,7 +201,7 @@
 
     if(get_bits1(gb)) {
         smacker_decode_tree(gb, &tmp1, 0, 0);
-        get_bits1(gb);
+        skip_bits1(gb);
         res = init_vlc(&vlc[0], SMKTREE_BITS, tmp1.length,
                     tmp1.lengths, sizeof(int), sizeof(int),
                     tmp1.bits, sizeof(uint32_t), sizeof(uint32_t), INIT_VLC_LE);
@@ -214,7 +214,7 @@
     }
     if(get_bits1(gb)){
         smacker_decode_tree(gb, &tmp2, 0, 0);
-        get_bits1(gb);
+        skip_bits1(gb);
         res = init_vlc(&vlc[1], SMKTREE_BITS, tmp2.length,
                     tmp2.lengths, sizeof(int), sizeof(int),
                     tmp2.bits, sizeof(uint32_t), sizeof(uint32_t), INIT_VLC_LE);
@@ -250,7 +250,7 @@
     huff.values = av_mallocz(huff.length * sizeof(int));
 
     smacker_decode_bigtree(gb, &huff, &ctx);
-    get_bits1(gb);
+    skip_bits1(gb);
     if(ctx.last[0] == -1) ctx.last[0] = huff.current++;
     if(ctx.last[1] == -1) ctx.last[1] = huff.current++;
     if(ctx.last[2] == -1) ctx.last[2] = huff.current++;
@@ -601,9 +601,9 @@
         h[i].bits = av_mallocz(256 * 4);
         h[i].lengths = av_mallocz(256 * sizeof(int));
         h[i].values = av_mallocz(256 * sizeof(int));
-        get_bits1(&gb);
+        skip_bits1(&gb);
         smacker_decode_tree(&gb, &h[i], 0, 0);
-        get_bits1(&gb);
+        skip_bits1(&gb);
         if(h[i].current > 1) {
             res = init_vlc(&vlc[i], SMKTREE_BITS, h[i].length,
                     h[i].lengths, sizeof(int), sizeof(int),
--- a/vorbis_dec.c	Thu Aug 09 00:54:41 2007 +0000
+++ b/vorbis_dec.c	Thu Aug 09 00:57:36 2007 +0000
@@ -729,7 +729,7 @@
         }
 
         for(j=0;j<mapping_setup->submaps;++j) {
-            get_bits(gb, 8); // FIXME check?
+            skip_bits(gb, 8); // FIXME check?
             mapping_setup->submap_floor[j]=get_bits(gb, 8);
             mapping_setup->submap_residue[j]=get_bits(gb, 8);
 
--- a/wmadec.c	Thu Aug 09 00:54:41 2007 +0000
+++ b/wmadec.c	Thu Aug 09 00:57:36 2007 +0000
@@ -780,7 +780,7 @@
 
     if (s->use_bit_reservoir) {
         /* read super frame header */
-        get_bits(&s->gb, 4); /* super frame index */
+        skip_bits(&s->gb, 4); /* super frame index */
         nb_frames = get_bits(&s->gb, 4) - 1;
 
         bit_offset = get_bits(&s->gb, s->byte_offset_bits + 3);