diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2007-08-09 00:57:36 +0000 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2007-08-09 00:57:36 +0000 |
commit | 7ae7300ee3bc830d9ece8c4c1fa27330b76c8218 (patch) | |
tree | 026875fae10a86165c66c87b3dcd490bcf35f204 | |
parent | 7f95d9f620c680b254dfc0ca3add1cba0f8532c0 (diff) | |
download | ffmpeg-7ae7300ee3bc830d9ece8c4c1fa27330b76c8218.tar.gz |
use skip_bits where appropriate
Originally committed as revision 10004 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/alac.c | 12 | ||||
-rw-r--r-- | libavcodec/mpegaudiodec.c | 2 | ||||
-rw-r--r-- | libavcodec/rv10.c | 4 | ||||
-rw-r--r-- | libavcodec/shorten.c | 2 | ||||
-rw-r--r-- | libavcodec/smacker.c | 10 | ||||
-rw-r--r-- | libavcodec/vorbis_dec.c | 2 | ||||
-rw-r--r-- | libavcodec/wmadec.c | 2 |
7 files changed, 17 insertions, 17 deletions
diff --git a/libavcodec/alac.c b/libavcodec/alac.c index 2f08f2d3b5..b9edf596a9 100644 --- a/libavcodec/alac.c +++ b/libavcodec/alac.c @@ -201,9 +201,9 @@ static void bastardized_rice_decompress(ALACContext *alac, 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 @@ static void bastardized_rice_decompress(ALACContext *alac, 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 @@ static int alac_decode_frame(AVCodecContext *avctx, /* 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); diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c index 7e080998d0..3c4b757d6a 100644 --- a/libavcodec/mpegaudiodec.c +++ b/libavcodec/mpegaudiodec.c @@ -2288,7 +2288,7 @@ static int mp_decode_frame(MPADecodeContext *s, /* 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) { diff --git a/libavcodec/rv10.c b/libavcodec/rv10.c index a5cb9531ca..33939bd849 100644 --- a/libavcodec/rv10.c +++ b/libavcodec/rv10.c @@ -200,7 +200,7 @@ int rv_decode_dc(MpegEncContext *s, int n) 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 @@ int rv_decode_dc(MpegEncContext *s, int n) } 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"); diff --git a/libavcodec/shorten.c b/libavcodec/shorten.c index cfea5bc386..b03985a48c 100644 --- a/libavcodec/shorten.c +++ b/libavcodec/shorten.c @@ -299,7 +299,7 @@ static int shorten_decode_frame(AVCodecContext *avctx, } } 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; diff --git a/libavcodec/smacker.c b/libavcodec/smacker.c index ca8e70000b..5d9f5f2c53 100644 --- a/libavcodec/smacker.c +++ b/libavcodec/smacker.c @@ -201,7 +201,7 @@ static int smacker_decode_header_tree(SmackVContext *smk, GetBitContext *gb, int 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 @@ static int smacker_decode_header_tree(SmackVContext *smk, GetBitContext *gb, int } 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 @@ static int smacker_decode_header_tree(SmackVContext *smk, GetBitContext *gb, int 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 @@ static int smka_decode_frame(AVCodecContext *avctx, void *data, int *data_size, 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), diff --git a/libavcodec/vorbis_dec.c b/libavcodec/vorbis_dec.c index 6bc69b1718..6ac15ccc20 100644 --- a/libavcodec/vorbis_dec.c +++ b/libavcodec/vorbis_dec.c @@ -729,7 +729,7 @@ static int vorbis_parse_setup_hdr_mappings(vorbis_context *vc) { } 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); diff --git a/libavcodec/wmadec.c b/libavcodec/wmadec.c index 7df4eec25e..f828c789c7 100644 --- a/libavcodec/wmadec.c +++ b/libavcodec/wmadec.c @@ -780,7 +780,7 @@ static int wma_decode_superframe(AVCodecContext *avctx, 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); |