Mercurial > libavcodec.hg
changeset 5519:b790f8c0ee24 libavcodec
use skip_bits where appropriate
author | alex |
---|---|
date | Thu, 09 Aug 2007 01:08:28 +0000 |
parents | d2ef80f5fd7e |
children | c16a59ef6a86 |
files | cavsdec.c svq3.c vc1.c |
diffstat | 3 files changed, 26 insertions(+), 26 deletions(-) [+] |
line wrap: on
line diff
--- a/cavsdec.c Thu Aug 09 00:57:36 2007 +0000 +++ b/cavsdec.c Thu Aug 09 01:08:28 2007 +0000 @@ -432,7 +432,7 @@ int align; align = (-get_bits_count(gb)) & 7; if((show_bits_long(gb,24+align) & 0xFFFFFF) == 0x000001) { - get_bits_long(gb,24+align); + skip_bits_long(gb,24+align); h->stc = get_bits(gb,8); decode_slice_header(h,gb); } @@ -455,7 +455,7 @@ return -1; ff_init_scantable(s->dsp.idct_permutation,&h->scantable,ff_zigzag_direct); } - get_bits(&s->gb,16);//bbv_dwlay + skip_bits(&s->gb,16);//bbv_dwlay if(h->stc == PIC_PB_START_CODE) { h->pic_type = get_bits(&s->gb,2) + FF_I_TYPE; if(h->pic_type > FF_B_TYPE) { @@ -469,7 +469,7 @@ } else { h->pic_type = FF_I_TYPE; if(get_bits1(&s->gb)) - get_bits(&s->gb,16);//time_code + skip_bits(&s->gb,16);//time_code } /* release last B frame */ if(h->picture.data[0]) @@ -501,7 +501,7 @@ if(h->progressive) h->pic_structure = 1; else if(!(h->pic_structure = get_bits1(&s->gb) && (h->stc == PIC_PB_START_CODE)) ) - get_bits1(&s->gb); //advanced_pred_mode_disable + skip_bits1(&s->gb); //advanced_pred_mode_disable skip_bits1(&s->gb); //top_field_first skip_bits1(&s->gb); //repeat_first_field h->qp_fixed = get_bits1(&s->gb);
--- a/svq3.c Thu Aug 09 00:57:36 2007 +0000 +++ b/svq3.c Thu Aug 09 01:08:28 2007 +0000 @@ -748,7 +748,7 @@ i = (s->mb_num < 64) ? 6 : (1 + av_log2 (s->mb_num - 1)); s->mb_skip_run = get_bits (&s->gb, i) - (s->mb_x + (s->mb_y * s->mb_width)); } else { - get_bits1 (&s->gb); + skip_bits1 (&s->gb); s->mb_skip_run = 0; } @@ -757,17 +757,17 @@ s->adaptive_quant = get_bits1 (&s->gb); /* unknown fields */ - get_bits1 (&s->gb); + skip_bits1 (&s->gb); if (h->unknown_svq3_flag) { - get_bits1 (&s->gb); + skip_bits1 (&s->gb); } - get_bits1 (&s->gb); - get_bits (&s->gb, 2); + skip_bits1 (&s->gb); + skip_bits (&s->gb, 2); while (get_bits1 (&s->gb)) { - get_bits (&s->gb, 8); + skip_bits (&s->gb, 8); } /* reset intra predictors and invalidate motion vector references */ @@ -834,26 +834,26 @@ /* 'frame size code' and optional 'width, height' */ if (get_bits (&gb, 3) == 7) { - get_bits (&gb, 12); - get_bits (&gb, 12); + skip_bits (&gb, 12); + skip_bits (&gb, 12); } h->halfpel_flag = get_bits1 (&gb); h->thirdpel_flag = get_bits1 (&gb); /* unknown fields */ - get_bits1 (&gb); - get_bits1 (&gb); - get_bits1 (&gb); - get_bits1 (&gb); + skip_bits1 (&gb); + skip_bits1 (&gb); + skip_bits1 (&gb); + skip_bits1 (&gb); s->low_delay = get_bits1 (&gb); /* unknown field */ - get_bits1 (&gb); + skip_bits1 (&gb); while (get_bits1 (&gb)) { - get_bits (&gb, 8); + skip_bits (&gb, 8); } h->unknown_svq3_flag = get_bits1 (&gb);
--- a/vc1.c Thu Aug 09 00:57:36 2007 +0000 +++ b/vc1.c Thu Aug 09 01:08:28 2007 +0000 @@ -913,7 +913,7 @@ v->interlace = get_bits1(gb); v->tfcntrflag = get_bits1(gb); v->finterpflag = get_bits1(gb); - get_bits1(gb); // reserved + skip_bits1(gb); // reserved v->s.h_edge_pos = v->s.avctx->coded_width; v->s.v_edge_pos = v->s.avctx->coded_height; @@ -975,11 +975,11 @@ if(v->hrd_param_flag) { int i; v->hrd_num_leaky_buckets = get_bits(gb, 5); - get_bits(gb, 4); //bitrate exponent - get_bits(gb, 4); //buffer size exponent + skip_bits(gb, 4); //bitrate exponent + skip_bits(gb, 4); //buffer size exponent for(i = 0; i < v->hrd_num_leaky_buckets; i++) { - get_bits(gb, 16); //hrd_rate[n] - get_bits(gb, 16); //hrd_buffer[n] + skip_bits(gb, 16); //hrd_rate[n] + skip_bits(gb, 16); //hrd_buffer[n] } } return 0; @@ -1005,7 +1005,7 @@ if(v->hrd_param_flag){ for(i = 0; i < v->hrd_num_leaky_buckets; i++) { - get_bits(gb, 8); //hrd_full[n] + skip_bits(gb, 8); //hrd_full[n] } } @@ -1059,7 +1059,7 @@ } } if(v->s.pict_type == I_TYPE || v->s.pict_type == BI_TYPE) - get_bits(gb, 7); // skip buffer fullness + skip_bits(gb, 7); // skip buffer fullness /* calculate RND */ if(v->s.pict_type == I_TYPE || v->s.pict_type == BI_TYPE) @@ -1278,7 +1278,7 @@ return 0; } if(v->tfcntrflag) - get_bits(gb, 8); + skip_bits(gb, 8); if(v->broadcast) { if(!v->interlace || v->psf) { v->rptfrm = get_bits(gb, 2);