Mercurial > libavcodec.hg
comparison dvbsubdec.c @ 5513:9f8219a3b86f libavcodec
use get_bits1(..) instead get_bits(.., 1)
author | alex |
---|---|
date | Thu, 09 Aug 2007 00:13:31 +0000 |
parents | dfa6e7fa2bac |
children | de81a7e065fc |
comparison
equal
deleted
inserted
replaced
5512:28dcc5cd79d2 | 5513:9f8219a3b86f |
---|---|
453 else | 453 else |
454 *destbuf++ = bits; | 454 *destbuf++ = bits; |
455 } | 455 } |
456 pixels_read++; | 456 pixels_read++; |
457 } else { | 457 } else { |
458 bits = get_bits(&gb, 1); | 458 bits = get_bits1(&gb); |
459 if (bits == 1) { | 459 if (bits == 1) { |
460 run_length = get_bits(&gb, 3) + 3; | 460 run_length = get_bits(&gb, 3) + 3; |
461 bits = get_bits(&gb, 2); | 461 bits = get_bits(&gb, 2); |
462 | 462 |
463 if (non_mod == 1 && bits == 1) | 463 if (non_mod == 1 && bits == 1) |
469 *destbuf++ = bits; | 469 *destbuf++ = bits; |
470 pixels_read++; | 470 pixels_read++; |
471 } | 471 } |
472 } | 472 } |
473 } else { | 473 } else { |
474 bits = get_bits(&gb, 1); | 474 bits = get_bits1(&gb); |
475 if (bits == 0) { | 475 if (bits == 0) { |
476 bits = get_bits(&gb, 2); | 476 bits = get_bits(&gb, 2); |
477 if (bits == 2) { | 477 if (bits == 2) { |
478 run_length = get_bits(&gb, 4) + 12; | 478 run_length = get_bits(&gb, 4) + 12; |
479 bits = get_bits(&gb, 2); | 479 bits = get_bits(&gb, 2); |
558 else | 558 else |
559 *destbuf++ = bits; | 559 *destbuf++ = bits; |
560 } | 560 } |
561 pixels_read++; | 561 pixels_read++; |
562 } else { | 562 } else { |
563 bits = get_bits(&gb, 1); | 563 bits = get_bits1(&gb); |
564 if (bits == 0) { | 564 if (bits == 0) { |
565 run_length = get_bits(&gb, 3); | 565 run_length = get_bits(&gb, 3); |
566 | 566 |
567 if (run_length == 0) { | 567 if (run_length == 0) { |
568 (*srcbuf) += (get_bits_count(&gb) + 7) >> 3; | 568 (*srcbuf) += (get_bits_count(&gb) + 7) >> 3; |
579 while (run_length-- > 0 && pixels_read < dbuf_len) { | 579 while (run_length-- > 0 && pixels_read < dbuf_len) { |
580 *destbuf++ = bits; | 580 *destbuf++ = bits; |
581 pixels_read++; | 581 pixels_read++; |
582 } | 582 } |
583 } else { | 583 } else { |
584 bits = get_bits(&gb, 1); | 584 bits = get_bits1(&gb); |
585 if (bits == 0) { | 585 if (bits == 0) { |
586 run_length = get_bits(&gb, 2) + 4; | 586 run_length = get_bits(&gb, 2) + 4; |
587 bits = get_bits(&gb, 4); | 587 bits = get_bits(&gb, 4); |
588 | 588 |
589 if (non_mod == 1 && bits == 1) | 589 if (non_mod == 1 && bits == 1) |