Originally committed as revision 9999 to svn://svn.ffmpeg.org/ffmpeg/trunk
Alex Beregszaszi authored on 2007/08/09 09:13:31... | ... |
@@ -489,12 +489,12 @@ static int alac_decode_frame(AVCodecContext *avctx, |
489 | 489 |
get_bits(&alac->gb, 12); /* unknown, skip 12 bits */ |
490 | 490 |
|
491 | 491 |
/* the output sample size is stored soon */ |
492 |
- hassize = get_bits(&alac->gb, 1); |
|
492 |
+ hassize = get_bits1(&alac->gb); |
|
493 | 493 |
|
494 | 494 |
wasted_bytes = get_bits(&alac->gb, 2); /* unknown ? */ |
495 | 495 |
|
496 | 496 |
/* whether the frame is compressed */ |
497 |
- isnotcompressed = get_bits(&alac->gb, 1); |
|
497 |
+ isnotcompressed = get_bits1(&alac->gb); |
|
498 | 498 |
|
499 | 499 |
if (hassize) { |
500 | 500 |
/* now read the number of samples as a 32bit integer */ |
... | ... |
@@ -363,7 +363,7 @@ static int decodeSpectrum (GetBitContext *gb, float *pOut) |
363 | 363 |
float SF; |
364 | 364 |
|
365 | 365 |
numSubbands = get_bits(gb, 5); // number of coded subbands |
366 |
- codingMode = get_bits(gb, 1); // coding Mode: 0 - VLC/ 1-CLC |
|
366 |
+ codingMode = get_bits1(gb); // coding Mode: 0 - VLC/ 1-CLC |
|
367 | 367 |
|
368 | 368 |
/* Get the VLC selector table for the subbands, 0 means not coded. */ |
369 | 369 |
for (cnt = 0; cnt <= numSubbands; cnt++) |
... | ... |
@@ -811,7 +811,7 @@ static int decodeFrame(ATRAC3Context *q, uint8_t* databuf) |
811 | 811 |
|
812 | 812 |
/* Fill the Weighting coeffs delay buffer */ |
813 | 813 |
memmove(q->weighting_delay,&(q->weighting_delay[2]),4*sizeof(int)); |
814 |
- q->weighting_delay[4] = get_bits(&q->gb,1); |
|
814 |
+ q->weighting_delay[4] = get_bits1(&q->gb); |
|
815 | 815 |
q->weighting_delay[5] = get_bits(&q->gb,3); |
816 | 816 |
|
817 | 817 |
for (i = 0; i < 4; i++) { |
... | ... |
@@ -455,7 +455,7 @@ static int dvbsub_read_2bit_string(uint8_t *destbuf, int dbuf_len, |
455 | 455 |
} |
456 | 456 |
pixels_read++; |
457 | 457 |
} else { |
458 |
- bits = get_bits(&gb, 1); |
|
458 |
+ bits = get_bits1(&gb); |
|
459 | 459 |
if (bits == 1) { |
460 | 460 |
run_length = get_bits(&gb, 3) + 3; |
461 | 461 |
bits = get_bits(&gb, 2); |
... | ... |
@@ -471,7 +471,7 @@ static int dvbsub_read_2bit_string(uint8_t *destbuf, int dbuf_len, |
471 | 471 |
} |
472 | 472 |
} |
473 | 473 |
} else { |
474 |
- bits = get_bits(&gb, 1); |
|
474 |
+ bits = get_bits1(&gb); |
|
475 | 475 |
if (bits == 0) { |
476 | 476 |
bits = get_bits(&gb, 2); |
477 | 477 |
if (bits == 2) { |
... | ... |
@@ -560,7 +560,7 @@ static int dvbsub_read_4bit_string(uint8_t *destbuf, int dbuf_len, |
560 | 560 |
} |
561 | 561 |
pixels_read++; |
562 | 562 |
} else { |
563 |
- bits = get_bits(&gb, 1); |
|
563 |
+ bits = get_bits1(&gb); |
|
564 | 564 |
if (bits == 0) { |
565 | 565 |
run_length = get_bits(&gb, 3); |
566 | 566 |
|
... | ... |
@@ -581,7 +581,7 @@ static int dvbsub_read_4bit_string(uint8_t *destbuf, int dbuf_len, |
581 | 581 |
pixels_read++; |
582 | 582 |
} |
583 | 583 |
} else { |
584 |
- bits = get_bits(&gb, 1); |
|
584 |
+ bits = get_bits1(&gb); |
|
585 | 585 |
if (bits == 0) { |
586 | 586 |
run_length = get_bits(&gb, 2) + 4; |
587 | 587 |
bits = get_bits(&gb, 4); |
... | ... |
@@ -183,7 +183,7 @@ static int metadata_parse(FLACContext *s) |
183 | 183 |
|
184 | 184 |
av_log(s->avctx, AV_LOG_DEBUG, "STREAM HEADER\n"); |
185 | 185 |
do { |
186 |
- metadata_last = get_bits(&s->gb, 1); |
|
186 |
+ metadata_last = get_bits1(&s->gb); |
|
187 | 187 |
metadata_type = get_bits(&s->gb, 7); |
188 | 188 |
metadata_size = get_bits_long(&s->gb, 24); |
189 | 189 |
|
... | ... |
@@ -5077,7 +5077,7 @@ int h263_decode_picture_header(MpegEncContext *s) |
5077 | 5077 |
format = get_bits(&s->gb, 3); |
5078 | 5078 |
dprintf(s->avctx, "ufep=1, format: %d\n", format); |
5079 | 5079 |
s->custom_pcf= get_bits1(&s->gb); |
5080 |
- s->umvplus = get_bits(&s->gb, 1); /* Unrestricted Motion Vector */ |
|
5080 |
+ s->umvplus = get_bits1(&s->gb); /* Unrestricted Motion Vector */ |
|
5081 | 5081 |
if (get_bits1(&s->gb) != 0) { |
5082 | 5082 |
av_log(s->avctx, AV_LOG_ERROR, "Syntax-based Arithmetic Coding (SAC) not supported\n"); |
5083 | 5083 |
} |
... | ... |
@@ -454,7 +454,7 @@ static void imc_get_skip_coeff(IMCContext* q) { |
454 | 454 |
q->skipFlagBits[i] = band_tab[i+1] - band_tab[i]; |
455 | 455 |
|
456 | 456 |
for(j = band_tab[i]; j < band_tab[i+1]; j++) { |
457 |
- if ((q->skipFlags[j] = get_bits(&q->gb,1))) |
|
457 |
+ if ((q->skipFlags[j] = get_bits1(&q->gb))) |
|
458 | 458 |
q->skipFlagCount[i]++; |
459 | 459 |
} |
460 | 460 |
} else { |
... | ... |
@@ -485,7 +485,7 @@ static void imc_get_skip_coeff(IMCContext* q) { |
485 | 485 |
|
486 | 486 |
if (j < band_tab[i+1]) { |
487 | 487 |
q->skipFlagBits[i]++; |
488 |
- if ((q->skipFlags[j] = get_bits(&q->gb,1))) |
|
488 |
+ if ((q->skipFlags[j] = get_bits1(&q->gb))) |
|
489 | 489 |
q->skipFlagCount[i]++; |
490 | 490 |
} |
491 | 491 |
} |
... | ... |
@@ -2002,14 +2002,14 @@ static int mp_decode_layer3(MPADecodeContext *s) |
2002 | 2002 |
g->scalefac_compress = get_bits(&s->gb, 9); |
2003 | 2003 |
else |
2004 | 2004 |
g->scalefac_compress = get_bits(&s->gb, 4); |
2005 |
- blocksplit_flag = get_bits(&s->gb, 1); |
|
2005 |
+ blocksplit_flag = get_bits1(&s->gb); |
|
2006 | 2006 |
if (blocksplit_flag) { |
2007 | 2007 |
g->block_type = get_bits(&s->gb, 2); |
2008 | 2008 |
if (g->block_type == 0){ |
2009 | 2009 |
av_log(NULL, AV_LOG_ERROR, "invalid block type\n"); |
2010 | 2010 |
return -1; |
2011 | 2011 |
} |
2012 |
- g->switch_point = get_bits(&s->gb, 1); |
|
2012 |
+ g->switch_point = get_bits1(&s->gb); |
|
2013 | 2013 |
for(i=0;i<2;i++) |
2014 | 2014 |
g->table_select[i] = get_bits(&s->gb, 5); |
2015 | 2015 |
for(i=0;i<3;i++) |
... | ... |
@@ -2081,9 +2081,9 @@ static int mp_decode_layer3(MPADecodeContext *s) |
2081 | 2081 |
|
2082 | 2082 |
g->preflag = 0; |
2083 | 2083 |
if (!s->lsf) |
2084 |
- g->preflag = get_bits(&s->gb, 1); |
|
2085 |
- g->scalefac_scale = get_bits(&s->gb, 1); |
|
2086 |
- g->count1table_select = get_bits(&s->gb, 1); |
|
2084 |
+ g->preflag = get_bits1(&s->gb); |
|
2085 |
+ g->scalefac_scale = get_bits1(&s->gb); |
|
2086 |
+ g->count1table_select = get_bits1(&s->gb); |
|
2087 | 2087 |
dprintf(s->avctx, "block_type=%d switch_point=%d\n", |
2088 | 2088 |
g->block_type, g->switch_point); |
2089 | 2089 |
} |
... | ... |
@@ -195,7 +195,7 @@ int rv_decode_dc(MpegEncContext *s, int n) |
195 | 195 |
} else if (code == 0x7d) { |
196 | 196 |
code = -128 + get_bits(&s->gb, 7); |
197 | 197 |
} else if (code == 0x7e) { |
198 |
- if (get_bits(&s->gb, 1) == 0) |
|
198 |
+ if (get_bits1(&s->gb) == 0) |
|
199 | 199 |
code = (int8_t)(get_bits(&s->gb, 8) + 1); |
200 | 200 |
else |
201 | 201 |
code = (int8_t)(get_bits(&s->gb, 8)); |
... | ... |
@@ -312,15 +312,15 @@ static int rv10_decode_picture_header(MpegEncContext *s) |
312 | 312 |
int mb_count, pb_frame, marker, unk, mb_xy; |
313 | 313 |
|
314 | 314 |
//printf("ff:%d\n", full_frame); |
315 |
- marker = get_bits(&s->gb, 1); |
|
315 |
+ marker = get_bits1(&s->gb); |
|
316 | 316 |
|
317 |
- if (get_bits(&s->gb, 1)) |
|
317 |
+ if (get_bits1(&s->gb)) |
|
318 | 318 |
s->pict_type = P_TYPE; |
319 | 319 |
else |
320 | 320 |
s->pict_type = I_TYPE; |
321 | 321 |
//printf("h:%X ver:%d\n",h,s->rv10_version); |
322 | 322 |
if(!marker) av_log(s->avctx, AV_LOG_ERROR, "marker missing\n"); |
323 |
- pb_frame = get_bits(&s->gb, 1); |
|
323 |
+ pb_frame = get_bits1(&s->gb); |
|
324 | 324 |
|
325 | 325 |
#ifdef DEBUG |
326 | 326 |
av_log(s->avctx, AV_LOG_DEBUG, "pict_type=%d pb_frame=%d\n", s->pict_type, pb_frame); |
... | ... |
@@ -416,7 +416,7 @@ static int rv20_decode_picture_header(MpegEncContext *s) |
416 | 416 |
return -1; |
417 | 417 |
} |
418 | 418 |
|
419 |
- if (get_bits(&s->gb, 1)){ |
|
419 |
+ if (get_bits1(&s->gb)){ |
|
420 | 420 |
av_log(s->avctx, AV_LOG_ERROR, "unknown bit set\n"); |
421 | 421 |
return -1; |
422 | 422 |
} |
... | ... |
@@ -427,7 +427,7 @@ static int rv20_decode_picture_header(MpegEncContext *s) |
427 | 427 |
return -1; |
428 | 428 |
} |
429 | 429 |
if(s->avctx->sub_id == 0x30203002){ |
430 |
- if (get_bits(&s->gb, 1)){ |
|
430 |
+ if (get_bits1(&s->gb)){ |
|
431 | 431 |
av_log(s->avctx, AV_LOG_ERROR, "unknown bit2 set\n"); |
432 | 432 |
return -1; |
433 | 433 |
} |
... | ... |
@@ -437,7 +437,7 @@ static int rv20_decode_picture_header(MpegEncContext *s) |
437 | 437 |
int f, new_w, new_h; |
438 | 438 |
int v= s->avctx->extradata_size >= 4 ? 7&((uint8_t*)s->avctx->extradata)[1] : 0; |
439 | 439 |
|
440 |
- if (get_bits(&s->gb, 1)){ |
|
440 |
+ if (get_bits1(&s->gb)){ |
|
441 | 441 |
av_log(s->avctx, AV_LOG_ERROR, "unknown bit3 set\n"); |
442 | 442 |
// return -1; |
443 | 443 |
} |
... | ... |
@@ -290,7 +290,7 @@ static int decode_header_trees(SmackVContext *smk) { |
290 | 290 |
} else { |
291 | 291 |
smacker_decode_header_tree(smk, &gb, &smk->mmap_tbl, smk->mmap_last, mmap_size); |
292 | 292 |
} |
293 |
- if(!get_bits(&gb, 1)) { |
|
293 |
+ if(!get_bits1(&gb)) { |
|
294 | 294 |
av_log(smk->avctx, AV_LOG_INFO, "Skipping MCLR tree\n"); |
295 | 295 |
smk->mclr_tbl = av_malloc(sizeof(int) * 2); |
296 | 296 |
smk->mclr_tbl[0] = 0; |
... | ... |
@@ -298,7 +298,7 @@ static int decode_header_trees(SmackVContext *smk) { |
298 | 298 |
} else { |
299 | 299 |
smacker_decode_header_tree(smk, &gb, &smk->mclr_tbl, smk->mclr_last, mclr_size); |
300 | 300 |
} |
301 |
- if(!get_bits(&gb, 1)) { |
|
301 |
+ if(!get_bits1(&gb)) { |
|
302 | 302 |
av_log(smk->avctx, AV_LOG_INFO, "Skipping FULL tree\n"); |
303 | 303 |
smk->full_tbl = av_malloc(sizeof(int) * 2); |
304 | 304 |
smk->full_tbl[0] = 0; |
... | ... |
@@ -306,7 +306,7 @@ static int decode_header_trees(SmackVContext *smk) { |
306 | 306 |
} else { |
307 | 307 |
smacker_decode_header_tree(smk, &gb, &smk->full_tbl, smk->full_last, full_size); |
308 | 308 |
} |
309 |
- if(!get_bits(&gb, 1)) { |
|
309 |
+ if(!get_bits1(&gb)) { |
|
310 | 310 |
av_log(smk->avctx, AV_LOG_INFO, "Skipping TYPE tree\n"); |
311 | 311 |
smk->type_tbl = av_malloc(sizeof(int) * 2); |
312 | 312 |
smk->type_tbl[0] = 0; |
... | ... |
@@ -137,7 +137,7 @@ static const uint8_t string_table[256] = { |
137 | 137 |
break;\ |
138 | 138 |
}\ |
139 | 139 |
/* divide block if next bit set */\ |
140 |
- if (get_bits (bitbuf, 1) == 0)\ |
|
140 |
+ if (get_bits1 (bitbuf) == 0)\ |
|
141 | 141 |
break;\ |
142 | 142 |
/* add child nodes */\ |
143 | 143 |
list[n++] = list[i];\ |
... | ... |
@@ -617,7 +617,7 @@ static int svq1_decode_frame_header (GetBitContext *bitbuf,MpegEncContext *s) { |
617 | 617 |
} |
618 | 618 |
|
619 | 619 |
/* unknown fields */ |
620 |
- if (get_bits (bitbuf, 1) == 1) { |
|
620 |
+ if (get_bits1 (bitbuf) == 1) { |
|
621 | 621 |
skip_bits1 (bitbuf); /* use packet checksum if (1) */ |
622 | 622 |
skip_bits1 (bitbuf); /* component checksums after image data if (1) */ |
623 | 623 |
|
... | ... |
@@ -625,13 +625,13 @@ static int svq1_decode_frame_header (GetBitContext *bitbuf,MpegEncContext *s) { |
625 | 625 |
return -1; |
626 | 626 |
} |
627 | 627 |
|
628 |
- if (get_bits (bitbuf, 1) == 1) { |
|
628 |
+ if (get_bits1 (bitbuf) == 1) { |
|
629 | 629 |
skip_bits1 (bitbuf); |
630 | 630 |
skip_bits (bitbuf, 4); |
631 | 631 |
skip_bits1 (bitbuf); |
632 | 632 |
skip_bits (bitbuf, 2); |
633 | 633 |
|
634 |
- while (get_bits (bitbuf, 1) == 1) { |
|
634 |
+ while (get_bits1 (bitbuf) == 1) { |
|
635 | 635 |
skip_bits (bitbuf, 8); |
636 | 636 |
} |
637 | 637 |
} |
... | ... |
@@ -465,9 +465,9 @@ static int svq3_decode_mb (H264Context *h, unsigned int mb_type) { |
465 | 465 |
mb_type = MB_TYPE_16x16; |
466 | 466 |
} |
467 | 467 |
} else if (mb_type < 8) { /* INTER */ |
468 |
- if (h->thirdpel_flag && h->halfpel_flag == !get_bits (&s->gb, 1)) { |
|
468 |
+ if (h->thirdpel_flag && h->halfpel_flag == !get_bits1 (&s->gb)) { |
|
469 | 469 |
mode = THIRDPEL_MODE; |
470 |
- } else if (h->halfpel_flag && h->thirdpel_flag == !get_bits (&s->gb, 1)) { |
|
470 |
+ } else if (h->halfpel_flag && h->thirdpel_flag == !get_bits1 (&s->gb)) { |
|
471 | 471 |
mode = HALFPEL_MODE; |
472 | 472 |
} else { |
473 | 473 |
mode = FULLPEL_MODE; |
... | ... |
@@ -149,11 +149,11 @@ static void decode_rowskip(uint8_t* plane, int width, int height, int stride, Ge |
149 | 149 |
int x, y; |
150 | 150 |
|
151 | 151 |
for (y=0; y<height; y++){ |
152 |
- if (!get_bits(gb, 1)) //rowskip |
|
152 |
+ if (!get_bits1(gb)) //rowskip |
|
153 | 153 |
memset(plane, 0, width); |
154 | 154 |
else |
155 | 155 |
for (x=0; x<width; x++) |
156 |
- plane[x] = get_bits(gb, 1); |
|
156 |
+ plane[x] = get_bits1(gb); |
|
157 | 157 |
plane += stride; |
158 | 158 |
} |
159 | 159 |
} |
... | ... |
@@ -169,12 +169,12 @@ static void decode_colskip(uint8_t* plane, int width, int height, int stride, Ge |
169 | 169 |
int x, y; |
170 | 170 |
|
171 | 171 |
for (x=0; x<width; x++){ |
172 |
- if (!get_bits(gb, 1)) //colskip |
|
172 |
+ if (!get_bits1(gb)) //colskip |
|
173 | 173 |
for (y=0; y<height; y++) |
174 | 174 |
plane[y*stride] = 0; |
175 | 175 |
else |
176 | 176 |
for (y=0; y<height; y++) |
177 |
- plane[y*stride] = get_bits(gb, 1); |
|
177 |
+ plane[y*stride] = get_bits1(gb); |
|
178 | 178 |
plane ++; |
179 | 179 |
} |
180 | 180 |
} |
... | ... |
@@ -196,7 +196,7 @@ static int bitplane_decoding(uint8_t* data, int *raw_flag, VC1Context *v) |
196 | 196 |
width = v->s.mb_width; |
197 | 197 |
height = v->s.mb_height; |
198 | 198 |
stride = v->s.mb_stride; |
199 |
- invert = get_bits(gb, 1); |
|
199 |
+ invert = get_bits1(gb); |
|
200 | 200 |
imode = get_vlc2(gb, ff_vc1_imode_vlc.table, VC1_IMODE_VLC_BITS, 1); |
201 | 201 |
|
202 | 202 |
*raw_flag = 0; |
... | ... |
@@ -210,7 +210,7 @@ static int bitplane_decoding(uint8_t* data, int *raw_flag, VC1Context *v) |
210 | 210 |
case IMODE_NORM2: |
211 | 211 |
if ((height * width) & 1) |
212 | 212 |
{ |
213 |
- *planep++ = get_bits(gb, 1); |
|
213 |
+ *planep++ = get_bits1(gb); |
|
214 | 214 |
offset = 1; |
215 | 215 |
} |
216 | 216 |
else offset = 0; |
... | ... |
@@ -329,7 +329,7 @@ static int vop_dquant_decoding(VC1Context *v) |
329 | 329 |
} |
330 | 330 |
else |
331 | 331 |
{ |
332 |
- v->dquantfrm = get_bits(gb, 1); |
|
332 |
+ v->dquantfrm = get_bits1(gb); |
|
333 | 333 |
if ( v->dquantfrm ) |
334 | 334 |
{ |
335 | 335 |
v->dqprofile = get_bits(gb, 2); |
... | ... |
@@ -340,7 +340,7 @@ static int vop_dquant_decoding(VC1Context *v) |
340 | 340 |
v->dqsbedge = get_bits(gb, 2); |
341 | 341 |
break; |
342 | 342 |
case DQPROFILE_ALL_MBS: |
343 |
- v->dqbilevel = get_bits(gb, 1); |
|
343 |
+ v->dqbilevel = get_bits1(gb); |
|
344 | 344 |
default: break; //Forbidden ? |
345 | 345 |
} |
346 | 346 |
if (v->dqbilevel || v->dqprofile != DQPROFILE_ALL_MBS) |
... | ... |
@@ -797,22 +797,22 @@ static int decode_sequence_header(AVCodecContext *avctx, GetBitContext *gb) |
797 | 797 |
v->frmrtq_postproc = get_bits(gb, 3); //common |
798 | 798 |
// (bitrate-32kbps)/64kbps |
799 | 799 |
v->bitrtq_postproc = get_bits(gb, 5); //common |
800 |
- v->s.loop_filter = get_bits(gb, 1); //common |
|
800 |
+ v->s.loop_filter = get_bits1(gb); //common |
|
801 | 801 |
if(v->s.loop_filter == 1 && v->profile == PROFILE_SIMPLE) |
802 | 802 |
{ |
803 | 803 |
av_log(avctx, AV_LOG_ERROR, |
804 | 804 |
"LOOPFILTER shell not be enabled in simple profile\n"); |
805 | 805 |
} |
806 | 806 |
|
807 |
- v->res_x8 = get_bits(gb, 1); //reserved |
|
807 |
+ v->res_x8 = get_bits1(gb); //reserved |
|
808 | 808 |
if (v->res_x8) |
809 | 809 |
{ |
810 | 810 |
av_log(avctx, AV_LOG_ERROR, |
811 | 811 |
"1 for reserved RES_X8 is forbidden\n"); |
812 | 812 |
//return -1; |
813 | 813 |
} |
814 |
- v->multires = get_bits(gb, 1); |
|
815 |
- v->res_fasttx = get_bits(gb, 1); |
|
814 |
+ v->multires = get_bits1(gb); |
|
815 |
+ v->res_fasttx = get_bits1(gb); |
|
816 | 816 |
if (!v->res_fasttx) |
817 | 817 |
{ |
818 | 818 |
av_log(avctx, AV_LOG_ERROR, |
... | ... |
@@ -820,14 +820,14 @@ static int decode_sequence_header(AVCodecContext *avctx, GetBitContext *gb) |
820 | 820 |
//return -1; |
821 | 821 |
} |
822 | 822 |
|
823 |
- v->fastuvmc = get_bits(gb, 1); //common |
|
823 |
+ v->fastuvmc = get_bits1(gb); //common |
|
824 | 824 |
if (!v->profile && !v->fastuvmc) |
825 | 825 |
{ |
826 | 826 |
av_log(avctx, AV_LOG_ERROR, |
827 | 827 |
"FASTUVMC unavailable in Simple Profile\n"); |
828 | 828 |
return -1; |
829 | 829 |
} |
830 |
- v->extended_mv = get_bits(gb, 1); //common |
|
830 |
+ v->extended_mv = get_bits1(gb); //common |
|
831 | 831 |
if (!v->profile && v->extended_mv) |
832 | 832 |
{ |
833 | 833 |
av_log(avctx, AV_LOG_ERROR, |
... | ... |
@@ -835,9 +835,9 @@ static int decode_sequence_header(AVCodecContext *avctx, GetBitContext *gb) |
835 | 835 |
return -1; |
836 | 836 |
} |
837 | 837 |
v->dquant = get_bits(gb, 2); //common |
838 |
- v->vstransform = get_bits(gb, 1); //common |
|
838 |
+ v->vstransform = get_bits1(gb); //common |
|
839 | 839 |
|
840 |
- v->res_transtab = get_bits(gb, 1); |
|
840 |
+ v->res_transtab = get_bits1(gb); |
|
841 | 841 |
if (v->res_transtab) |
842 | 842 |
{ |
843 | 843 |
av_log(avctx, AV_LOG_ERROR, |
... | ... |
@@ -845,10 +845,10 @@ static int decode_sequence_header(AVCodecContext *avctx, GetBitContext *gb) |
845 | 845 |
return -1; |
846 | 846 |
} |
847 | 847 |
|
848 |
- v->overlap = get_bits(gb, 1); //common |
|
848 |
+ v->overlap = get_bits1(gb); //common |
|
849 | 849 |
|
850 |
- v->s.resync_marker = get_bits(gb, 1); |
|
851 |
- v->rangered = get_bits(gb, 1); |
|
850 |
+ v->s.resync_marker = get_bits1(gb); |
|
851 |
+ v->rangered = get_bits1(gb); |
|
852 | 852 |
if (v->rangered && v->profile == PROFILE_SIMPLE) |
853 | 853 |
{ |
854 | 854 |
av_log(avctx, AV_LOG_INFO, |
... | ... |
@@ -858,8 +858,8 @@ static int decode_sequence_header(AVCodecContext *avctx, GetBitContext *gb) |
858 | 858 |
v->s.max_b_frames = avctx->max_b_frames = get_bits(gb, 3); //common |
859 | 859 |
v->quantizer_mode = get_bits(gb, 2); //common |
860 | 860 |
|
861 |
- v->finterpflag = get_bits(gb, 1); //common |
|
862 |
- v->res_rtm_flag = get_bits(gb, 1); //reserved |
|
861 |
+ v->finterpflag = get_bits1(gb); //common |
|
862 |
+ v->res_rtm_flag = get_bits1(gb); //reserved |
|
863 | 863 |
if (!v->res_rtm_flag) |
864 | 864 |
{ |
865 | 865 |
// av_log(avctx, AV_LOG_ERROR, |
... | ... |
@@ -903,7 +903,7 @@ static int decode_sequence_header_adv(VC1Context *v, GetBitContext *gb) |
903 | 903 |
v->frmrtq_postproc = get_bits(gb, 3); //common |
904 | 904 |
// (bitrate-32kbps)/64kbps |
905 | 905 |
v->bitrtq_postproc = get_bits(gb, 5); //common |
906 |
- v->postprocflag = get_bits(gb, 1); //common |
|
906 |
+ v->postprocflag = get_bits1(gb); //common |
|
907 | 907 |
|
908 | 908 |
v->s.avctx->coded_width = (get_bits(gb, 12) + 1) << 1; |
909 | 909 |
v->s.avctx->coded_height = (get_bits(gb, 12) + 1) << 1; |
... | ... |
@@ -1038,14 +1038,14 @@ static int vc1_parse_frame_header(VC1Context *v, GetBitContext* gb) |
1038 | 1038 |
{ |
1039 | 1039 |
int pqindex, lowquant, status; |
1040 | 1040 |
|
1041 |
- if(v->finterpflag) v->interpfrm = get_bits(gb, 1); |
|
1041 |
+ if(v->finterpflag) v->interpfrm = get_bits1(gb); |
|
1042 | 1042 |
skip_bits(gb, 2); //framecnt unused |
1043 | 1043 |
v->rangeredfrm = 0; |
1044 |
- if (v->rangered) v->rangeredfrm = get_bits(gb, 1); |
|
1045 |
- v->s.pict_type = get_bits(gb, 1); |
|
1044 |
+ if (v->rangered) v->rangeredfrm = get_bits1(gb); |
|
1045 |
+ v->s.pict_type = get_bits1(gb); |
|
1046 | 1046 |
if (v->s.avctx->max_b_frames) { |
1047 | 1047 |
if (!v->s.pict_type) { |
1048 |
- if (get_bits(gb, 1)) v->s.pict_type = I_TYPE; |
|
1048 |
+ if (get_bits1(gb)) v->s.pict_type = I_TYPE; |
|
1049 | 1049 |
else v->s.pict_type = B_TYPE; |
1050 | 1050 |
} else v->s.pict_type = P_TYPE; |
1051 | 1051 |
} else v->s.pict_type = v->s.pict_type ? P_TYPE : I_TYPE; |
... | ... |
@@ -1080,10 +1080,10 @@ static int vc1_parse_frame_header(VC1Context *v, GetBitContext* gb) |
1080 | 1080 |
if (v->quantizer_mode == QUANT_NON_UNIFORM) |
1081 | 1081 |
v->pquantizer = 0; |
1082 | 1082 |
v->pqindex = pqindex; |
1083 |
- if (pqindex < 9) v->halfpq = get_bits(gb, 1); |
|
1083 |
+ if (pqindex < 9) v->halfpq = get_bits1(gb); |
|
1084 | 1084 |
else v->halfpq = 0; |
1085 | 1085 |
if (v->quantizer_mode == QUANT_FRAME_EXPLICIT) |
1086 |
- v->pquantizer = get_bits(gb, 1); |
|
1086 |
+ v->pquantizer = get_bits1(gb); |
|
1087 | 1087 |
v->dquantfrm = 0; |
1088 | 1088 |
if (v->extended_mv == 1) v->mvrange = get_unary(gb, 0, 3); |
1089 | 1089 |
v->k_x = v->mvrange + 9 + (v->mvrange >> 1); //k_x can be 9 10 12 13 |
... | ... |
@@ -1092,7 +1092,7 @@ static int vc1_parse_frame_header(VC1Context *v, GetBitContext* gb) |
1092 | 1092 |
v->range_y = 1 << (v->k_y - 1); |
1093 | 1093 |
if (v->profile == PROFILE_ADVANCED) |
1094 | 1094 |
{ |
1095 |
- if (v->postprocflag) v->postproc = get_bits(gb, 1); |
|
1095 |
+ if (v->postprocflag) v->postproc = get_bits1(gb); |
|
1096 | 1096 |
} |
1097 | 1097 |
else |
1098 | 1098 |
if (v->multires && v->s.pict_type != B_TYPE) v->respic = get_bits(gb, 2); |
... | ... |
@@ -1179,7 +1179,7 @@ static int vc1_parse_frame_header(VC1Context *v, GetBitContext* gb) |
1179 | 1179 |
v->ttfrm = 0; //FIXME Is that so ? |
1180 | 1180 |
if (v->vstransform) |
1181 | 1181 |
{ |
1182 |
- v->ttmbf = get_bits(gb, 1); |
|
1182 |
+ v->ttmbf = get_bits1(gb); |
|
1183 | 1183 |
if (v->ttmbf) |
1184 | 1184 |
{ |
1185 | 1185 |
v->ttfrm = ff_vc1_ttfrm_to_tt[get_bits(gb, 2)]; |
... | ... |
@@ -1220,7 +1220,7 @@ static int vc1_parse_frame_header(VC1Context *v, GetBitContext* gb) |
1220 | 1220 |
v->ttfrm = 0; |
1221 | 1221 |
if (v->vstransform) |
1222 | 1222 |
{ |
1223 |
- v->ttmbf = get_bits(gb, 1); |
|
1223 |
+ v->ttmbf = get_bits1(gb); |
|
1224 | 1224 |
if (v->ttmbf) |
1225 | 1225 |
{ |
1226 | 1226 |
v->ttfrm = ff_vc1_ttfrm_to_tt[get_bits(gb, 2)]; |
... | ... |
@@ -1239,7 +1239,7 @@ static int vc1_parse_frame_header(VC1Context *v, GetBitContext* gb) |
1239 | 1239 |
v->y_ac_table_index = decode012(gb); |
1240 | 1240 |
} |
1241 | 1241 |
/* DC Syntax */ |
1242 |
- v->s.dc_table_index = get_bits(gb, 1); |
|
1242 |
+ v->s.dc_table_index = get_bits1(gb); |
|
1243 | 1243 |
|
1244 | 1244 |
if(v->s.pict_type == BI_TYPE) { |
1245 | 1245 |
v->s.pict_type = B_TYPE; |
... | ... |
@@ -1293,7 +1293,7 @@ static int vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb) |
1293 | 1293 |
v->rnd = get_bits1(gb); |
1294 | 1294 |
if(v->interlace) |
1295 | 1295 |
v->uvsamp = get_bits1(gb); |
1296 |
- if(v->finterpflag) v->interpfrm = get_bits(gb, 1); |
|
1296 |
+ if(v->finterpflag) v->interpfrm = get_bits1(gb); |
|
1297 | 1297 |
if(v->s.pict_type == B_TYPE) { |
1298 | 1298 |
v->bfraction = get_vlc2(gb, ff_vc1_bfraction_vlc.table, VC1_BFRACTION_VLC_BITS, 1); |
1299 | 1299 |
v->bfraction = ff_vc1_bfraction_lut[v->bfraction]; |
... | ... |
@@ -1314,10 +1314,10 @@ static int vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb) |
1314 | 1314 |
if (v->quantizer_mode == QUANT_NON_UNIFORM) |
1315 | 1315 |
v->pquantizer = 0; |
1316 | 1316 |
v->pqindex = pqindex; |
1317 |
- if (pqindex < 9) v->halfpq = get_bits(gb, 1); |
|
1317 |
+ if (pqindex < 9) v->halfpq = get_bits1(gb); |
|
1318 | 1318 |
else v->halfpq = 0; |
1319 | 1319 |
if (v->quantizer_mode == QUANT_FRAME_EXPLICIT) |
1320 |
- v->pquantizer = get_bits(gb, 1); |
|
1320 |
+ v->pquantizer = get_bits1(gb); |
|
1321 | 1321 |
|
1322 | 1322 |
if(v->s.pict_type == I_TYPE || v->s.pict_type == P_TYPE) v->use_ic = 0; |
1323 | 1323 |
|
... | ... |
@@ -1420,7 +1420,7 @@ static int vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb) |
1420 | 1420 |
v->ttfrm = 0; //FIXME Is that so ? |
1421 | 1421 |
if (v->vstransform) |
1422 | 1422 |
{ |
1423 |
- v->ttmbf = get_bits(gb, 1); |
|
1423 |
+ v->ttmbf = get_bits1(gb); |
|
1424 | 1424 |
if (v->ttmbf) |
1425 | 1425 |
{ |
1426 | 1426 |
v->ttfrm = ff_vc1_ttfrm_to_tt[get_bits(gb, 2)]; |
... | ... |
@@ -1470,7 +1470,7 @@ static int vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb) |
1470 | 1470 |
v->ttfrm = 0; |
1471 | 1471 |
if (v->vstransform) |
1472 | 1472 |
{ |
1473 |
- v->ttmbf = get_bits(gb, 1); |
|
1473 |
+ v->ttmbf = get_bits1(gb); |
|
1474 | 1474 |
if (v->ttmbf) |
1475 | 1475 |
{ |
1476 | 1476 |
v->ttfrm = ff_vc1_ttfrm_to_tt[get_bits(gb, 2)]; |
... | ... |
@@ -1489,7 +1489,7 @@ static int vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb) |
1489 | 1489 |
v->y_ac_table_index = decode012(gb); |
1490 | 1490 |
} |
1491 | 1491 |
/* DC Syntax */ |
1492 |
- v->s.dc_table_index = get_bits(gb, 1); |
|
1492 |
+ v->s.dc_table_index = get_bits1(gb); |
|
1493 | 1493 |
if ((v->s.pict_type == I_TYPE || v->s.pict_type == BI_TYPE) && v->dquant) { |
1494 | 1494 |
av_log(v->s.avctx, AV_LOG_DEBUG, "VOP DQuant info\n"); |
1495 | 1495 |
vop_dquant_decoding(v); |
... | ... |
@@ -1522,7 +1522,7 @@ static int vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb) |
1522 | 1522 |
{ \ |
1523 | 1523 |
if (v->dqbilevel) \ |
1524 | 1524 |
{ \ |
1525 |
- mquant = (get_bits(gb, 1)) ? v->altpq : v->pq; \ |
|
1525 |
+ mquant = (get_bits1(gb)) ? v->altpq : v->pq; \ |
|
1526 | 1526 |
} \ |
1527 | 1527 |
else \ |
1528 | 1528 |
{ \ |
... | ... |
@@ -2273,7 +2273,7 @@ static void vc1_decode_ac_coeff(VC1Context *v, int *last, int *skip, int *value, |
2273 | 2273 |
run = vc1_index_decode_table[codingset][index][0]; |
2274 | 2274 |
level = vc1_index_decode_table[codingset][index][1]; |
2275 | 2275 |
lst = index >= vc1_last_decode_table[codingset]; |
2276 |
- if(get_bits(gb, 1)) |
|
2276 |
+ if(get_bits1(gb)) |
|
2277 | 2277 |
level = -level; |
2278 | 2278 |
} else { |
2279 | 2279 |
escape = decode210(gb); |
... | ... |
@@ -2293,11 +2293,11 @@ static void vc1_decode_ac_coeff(VC1Context *v, int *last, int *skip, int *value, |
2293 | 2293 |
else |
2294 | 2294 |
run += vc1_delta_run_table[codingset][level] + 1; |
2295 | 2295 |
} |
2296 |
- if(get_bits(gb, 1)) |
|
2296 |
+ if(get_bits1(gb)) |
|
2297 | 2297 |
level = -level; |
2298 | 2298 |
} else { |
2299 | 2299 |
int sign; |
2300 |
- lst = get_bits(gb, 1); |
|
2300 |
+ lst = get_bits1(gb); |
|
2301 | 2301 |
if(v->s.esc3_level_length == 0) { |
2302 | 2302 |
if(v->pq < 8 || v->dquantfrm) { // table 59 |
2303 | 2303 |
v->s.esc3_level_length = get_bits(gb, 3); |
... | ... |
@@ -2309,7 +2309,7 @@ static void vc1_decode_ac_coeff(VC1Context *v, int *last, int *skip, int *value, |
2309 | 2309 |
v->s.esc3_run_length = 3 + get_bits(gb, 2); |
2310 | 2310 |
} |
2311 | 2311 |
run = get_bits(gb, v->s.esc3_run_length); |
2312 |
- sign = get_bits(gb, 1); |
|
2312 |
+ sign = get_bits1(gb); |
|
2313 | 2313 |
level = get_bits(gb, v->s.esc3_level_length); |
2314 | 2314 |
if(sign) |
2315 | 2315 |
level = -level; |
... | ... |
@@ -2361,9 +2361,9 @@ static int vc1_decode_i_block(VC1Context *v, DCTELEM block[64], int n, int coded |
2361 | 2361 |
if (v->pq == 1) |
2362 | 2362 |
dcdiff = (dcdiff<<2) + get_bits(gb, 2) - 3; |
2363 | 2363 |
else if (v->pq == 2) |
2364 |
- dcdiff = (dcdiff<<1) + get_bits(gb, 1) - 1; |
|
2364 |
+ dcdiff = (dcdiff<<1) + get_bits1(gb) - 1; |
|
2365 | 2365 |
} |
2366 |
- if (get_bits(gb, 1)) |
|
2366 |
+ if (get_bits1(gb)) |
|
2367 | 2367 |
dcdiff = -dcdiff; |
2368 | 2368 |
} |
2369 | 2369 |
|
... | ... |
@@ -2531,9 +2531,9 @@ static int vc1_decode_i_block_adv(VC1Context *v, DCTELEM block[64], int n, int c |
2531 | 2531 |
if (mquant == 1) |
2532 | 2532 |
dcdiff = (dcdiff<<2) + get_bits(gb, 2) - 3; |
2533 | 2533 |
else if (mquant == 2) |
2534 |
- dcdiff = (dcdiff<<1) + get_bits(gb, 1) - 1; |
|
2534 |
+ dcdiff = (dcdiff<<1) + get_bits1(gb) - 1; |
|
2535 | 2535 |
} |
2536 |
- if (get_bits(gb, 1)) |
|
2536 |
+ if (get_bits1(gb)) |
|
2537 | 2537 |
dcdiff = -dcdiff; |
2538 | 2538 |
} |
2539 | 2539 |
|
... | ... |
@@ -2735,9 +2735,9 @@ static int vc1_decode_intra_block(VC1Context *v, DCTELEM block[64], int n, int c |
2735 | 2735 |
if (mquant == 1) |
2736 | 2736 |
dcdiff = (dcdiff<<2) + get_bits(gb, 2) - 3; |
2737 | 2737 |
else if (mquant == 2) |
2738 |
- dcdiff = (dcdiff<<1) + get_bits(gb, 1) - 1; |
|
2738 |
+ dcdiff = (dcdiff<<1) + get_bits1(gb) - 1; |
|
2739 | 2739 |
} |
2740 |
- if (get_bits(gb, 1)) |
|
2740 |
+ if (get_bits1(gb)) |
|
2741 | 2741 |
dcdiff = -dcdiff; |
2742 | 2742 |
} |
2743 | 2743 |
|
... | ... |
@@ -3054,12 +3054,12 @@ static int vc1_decode_p_mb(VC1Context *v) |
3054 | 3054 |
if (s->mb_intra && !mb_has_coeffs) |
3055 | 3055 |
{ |
3056 | 3056 |
GET_MQUANT(); |
3057 |
- s->ac_pred = get_bits(gb, 1); |
|
3057 |
+ s->ac_pred = get_bits1(gb); |
|
3058 | 3058 |
cbp = 0; |
3059 | 3059 |
} |
3060 | 3060 |
else if (mb_has_coeffs) |
3061 | 3061 |
{ |
3062 |
- if (s->mb_intra) s->ac_pred = get_bits(gb, 1); |
|
3062 |
+ if (s->mb_intra) s->ac_pred = get_bits1(gb); |
|
3063 | 3063 |
cbp = get_vlc2(&v->s.gb, v->cbpcy_vlc->table, VC1_CBPCY_P_VLC_BITS, 2); |
3064 | 3064 |
GET_MQUANT(); |
3065 | 3065 |
} |
... | ... |
@@ -3176,7 +3176,7 @@ static int vc1_decode_p_mb(VC1Context *v) |
3176 | 3176 |
break; |
3177 | 3177 |
} |
3178 | 3178 |
} |
3179 |
- if(intrapred)s->ac_pred = get_bits(gb, 1); |
|
3179 |
+ if(intrapred)s->ac_pred = get_bits1(gb); |
|
3180 | 3180 |
else s->ac_pred = 0; |
3181 | 3181 |
} |
3182 | 3182 |
if (!v->ttmbf && coded_inter) |
... | ... |
@@ -3449,7 +3449,7 @@ static void vc1_decode_i_blocks(VC1Context *v) |
3449 | 3449 |
|
3450 | 3450 |
// do actual MB decoding and displaying |
3451 | 3451 |
cbp = get_vlc2(&v->s.gb, ff_msmp4_mb_i_vlc.table, MB_INTRA_VLC_BITS, 2); |
3452 |
- v->s.ac_pred = get_bits(&v->s.gb, 1); |
|
3452 |
+ v->s.ac_pred = get_bits1(&v->s.gb); |
|
3453 | 3453 |
|
3454 | 3454 |
for(k = 0; k < 6; k++) { |
3455 | 3455 |
val = ((cbp >> (5 - k)) & 1); |
... | ... |
@@ -3561,13 +3561,13 @@ static void vc1_decode_i_blocks_adv(VC1Context *v) |
3561 | 3561 |
// do actual MB decoding and displaying |
3562 | 3562 |
cbp = get_vlc2(&v->s.gb, ff_msmp4_mb_i_vlc.table, MB_INTRA_VLC_BITS, 2); |
3563 | 3563 |
if(v->acpred_is_raw) |
3564 |
- v->s.ac_pred = get_bits(&v->s.gb, 1); |
|
3564 |
+ v->s.ac_pred = get_bits1(&v->s.gb); |
|
3565 | 3565 |
else |
3566 | 3566 |
v->s.ac_pred = v->acpred_plane[mb_pos]; |
3567 | 3567 |
|
3568 | 3568 |
if(v->condover == CONDOVER_SELECT) { |
3569 | 3569 |
if(v->overflg_is_raw) |
3570 |
- overlap = get_bits(&v->s.gb, 1); |
|
3570 |
+ overlap = get_bits1(&v->s.gb); |
|
3571 | 3571 |
else |
3572 | 3572 |
overlap = v->over_flags_plane[mb_pos]; |
3573 | 3573 |
} else |
... | ... |
@@ -791,7 +791,7 @@ static int vorbis_parse_setup_hdr_modes(vorbis_context *vc) { |
791 | 791 |
for(i=0;i<vc->mode_count;++i) { |
792 | 792 |
vorbis_mode *mode_setup=&vc->modes[i]; |
793 | 793 |
|
794 |
- mode_setup->blockflag=get_bits(gb, 1); |
|
794 |
+ mode_setup->blockflag=get_bits1(gb); |
|
795 | 795 |
mode_setup->windowtype=get_bits(gb, 16); //FIXME check |
796 | 796 |
mode_setup->transformtype=get_bits(gb, 16); //FIXME check |
797 | 797 |
mode_setup->mapping=get_bits(gb, 8); //FIXME check |
... | ... |
@@ -686,7 +686,7 @@ static int unpack_superblocks(Vp3DecodeContext *s, GetBitContext *gb) |
686 | 686 |
} else { |
687 | 687 |
|
688 | 688 |
/* unpack the list of partially-coded superblocks */ |
689 |
- bit = get_bits(gb, 1); |
|
689 |
+ bit = get_bits1(gb); |
|
690 | 690 |
/* toggle the bit because as soon as the first run length is |
691 | 691 |
* fetched the bit will be toggled again */ |
692 | 692 |
bit ^= 1; |
... | ... |
@@ -722,7 +722,7 @@ static int unpack_superblocks(Vp3DecodeContext *s, GetBitContext *gb) |
722 | 722 |
|
723 | 723 |
current_superblock = 0; |
724 | 724 |
current_run = 0; |
725 |
- bit = get_bits(gb, 1); |
|
725 |
+ bit = get_bits1(gb); |
|
726 | 726 |
/* toggle the bit because as soon as the first run length is |
727 | 727 |
* fetched the bit will be toggled again */ |
728 | 728 |
bit ^= 1; |
... | ... |
@@ -753,7 +753,7 @@ static int unpack_superblocks(Vp3DecodeContext *s, GetBitContext *gb) |
753 | 753 |
if (decode_partial_blocks) { |
754 | 754 |
|
755 | 755 |
current_run = 0; |
756 |
- bit = get_bits(gb, 1); |
|
756 |
+ bit = get_bits1(gb); |
|
757 | 757 |
/* toggle the bit because as soon as the first run length is |
758 | 758 |
* fetched the bit will be toggled again */ |
759 | 759 |
bit ^= 1; |
... | ... |
@@ -979,7 +979,7 @@ static int unpack_vectors(Vp3DecodeContext *s, GetBitContext *gb) |
979 | 979 |
memset(motion_y, 0, 6 * sizeof(int)); |
980 | 980 |
|
981 | 981 |
/* coding mode 0 is the VLC scheme; 1 is the fixed code scheme */ |
982 |
- coding_mode = get_bits(gb, 1); |
|
982 |
+ coding_mode = get_bits1(gb); |
|
983 | 983 |
debug_vectors(" using %s scheme for unpacking motion vectors\n", |
984 | 984 |
(coding_mode == 0) ? "VLC" : "fixed-length"); |
985 | 985 |
|
... | ... |
@@ -2337,7 +2337,7 @@ static int read_huffman_tree(AVCodecContext *avctx, GetBitContext *gb) |
2337 | 2337 |
{ |
2338 | 2338 |
Vp3DecodeContext *s = avctx->priv_data; |
2339 | 2339 |
|
2340 |
- if (get_bits(gb, 1)) { |
|
2340 |
+ if (get_bits1(gb)) { |
|
2341 | 2341 |
int token; |
2342 | 2342 |
if (s->entries >= 32) { /* overflow */ |
2343 | 2343 |
av_log(avctx, AV_LOG_ERROR, "huffman tree overflow\n"); |
... | ... |
@@ -2488,10 +2488,10 @@ static int theora_decode_tables(AVCodecContext *avctx, GetBitContext *gb) |
2488 | 2488 |
for (plane = 0; plane <= 2; plane++) { |
2489 | 2489 |
int newqr= 1; |
2490 | 2490 |
if (inter || plane > 0) |
2491 |
- newqr = get_bits(gb, 1); |
|
2491 |
+ newqr = get_bits1(gb); |
|
2492 | 2492 |
if (!newqr) { |
2493 | 2493 |
int qtj, plj; |
2494 |
- if(inter && get_bits(gb, 1)){ |
|
2494 |
+ if(inter && get_bits1(gb)){ |
|
2495 | 2495 |
qtj = 0; |
2496 | 2496 |
plj = plane; |
2497 | 2497 |
}else{ |
... | ... |
@@ -2532,7 +2532,7 @@ static int theora_decode_tables(AVCodecContext *avctx, GetBitContext *gb) |
2532 | 2532 |
for (s->hti = 0; s->hti < 80; s->hti++) { |
2533 | 2533 |
s->entries = 0; |
2534 | 2534 |
s->huff_code_size = 1; |
2535 |
- if (!get_bits(gb, 1)) { |
|
2535 |
+ if (!get_bits1(gb)) { |
|
2536 | 2536 |
s->hbits = 0; |
2537 | 2537 |
read_huffman_tree(avctx, gb); |
2538 | 2538 |
s->hbits = 1; |
... | ... |
@@ -393,11 +393,11 @@ static int wma_decode_block(WMACodecContext *s) |
393 | 393 |
return -1; |
394 | 394 |
|
395 | 395 |
if (s->nb_channels == 2) { |
396 |
- s->ms_stereo = get_bits(&s->gb, 1); |
|
396 |
+ s->ms_stereo = get_bits1(&s->gb); |
|
397 | 397 |
} |
398 | 398 |
v = 0; |
399 | 399 |
for(ch = 0; ch < s->nb_channels; ch++) { |
400 |
- a = get_bits(&s->gb, 1); |
|
400 |
+ a = get_bits1(&s->gb); |
|
401 | 401 |
s->channel_coded[ch] = a; |
402 | 402 |
v |= a; |
403 | 403 |
} |
... | ... |
@@ -433,7 +433,7 @@ static int wma_decode_block(WMACodecContext *s) |
433 | 433 |
int i, n, a; |
434 | 434 |
n = s->exponent_high_sizes[bsize]; |
435 | 435 |
for(i=0;i<n;i++) { |
436 |
- a = get_bits(&s->gb, 1); |
|
436 |
+ a = get_bits1(&s->gb); |
|
437 | 437 |
s->high_band_coded[ch][i] = a; |
438 | 438 |
/* if noise coding, the coefficients are not transmitted */ |
439 | 439 |
if (a) |
... | ... |
@@ -466,7 +466,7 @@ static int wma_decode_block(WMACodecContext *s) |
466 | 466 |
|
467 | 467 |
/* exponents can be reused in short blocks. */ |
468 | 468 |
if ((s->block_len_bits == s->frame_len_bits) || |
469 |
- get_bits(&s->gb, 1)) { |
|
469 |
+ get_bits1(&s->gb)) { |
|
470 | 470 |
for(ch = 0; ch < s->nb_channels; ch++) { |
471 | 471 |
if (s->channel_coded[ch]) { |
472 | 472 |
if (s->use_exp_vlc) { |
... | ... |
@@ -516,7 +516,7 @@ static int wma_decode_block(WMACodecContext *s) |
516 | 516 |
run = run_table[code]; |
517 | 517 |
level = level_table[code]; |
518 | 518 |
} |
519 |
- sign = get_bits(&s->gb, 1); |
|
519 |
+ sign = get_bits1(&s->gb); |
|
520 | 520 |
if (!sign) |
521 | 521 |
level = -level; |
522 | 522 |
ptr += run; |
... | ... |
@@ -363,7 +363,7 @@ return -1; |
363 | 363 |
if(s->picture_number==0) |
364 | 364 |
decode_ext_header(w); |
365 | 365 |
|
366 |
- s->pict_type = get_bits(&s->gb, 1) + 1; |
|
366 |
+ s->pict_type = get_bits1(&s->gb) + 1; |
|
367 | 367 |
if(s->pict_type == I_TYPE){ |
368 | 368 |
code = get_bits(&s->gb, 7); |
369 | 369 |
av_log(s->avctx, AV_LOG_DEBUG, "I7:%X/\n", code); |