Revision a4bff12c libavcodec/get_bits.h

View differences:

libavcodec/get_bits.h
525 525
    return code;
526 526
}
527 527

  
528
static inline int decode012(GetBitContext *gb){
529
    int n;
530
    n = get_bits1(gb);
531
    if (n == 0)
532
        return 0;
533
    else
534
        return get_bits1(gb) + 1;
535
}
536

  
537
static inline int decode210(GetBitContext *gb){
538
    if (get_bits1(gb))
539
        return 0;
540
    else
541
        return 2 - get_bits1(gb);
542
}
543

  
544
static inline int get_bits_left(GetBitContext *gb)
545
{
546
    return gb->size_in_bits - get_bits_count(gb);
547
}
548

  
528 549
//#define TRACE
529 550

  
530 551
#ifdef TRACE
......
585 606
#define tprintf(p, ...) {}
586 607
#endif
587 608

  
588
static inline int decode012(GetBitContext *gb){
589
    int n;
590
    n = get_bits1(gb);
591
    if (n == 0)
592
        return 0;
593
    else
594
        return get_bits1(gb) + 1;
595
}
596

  
597
static inline int decode210(GetBitContext *gb){
598
    if (get_bits1(gb))
599
        return 0;
600
    else
601
        return 2 - get_bits1(gb);
602
}
603

  
604
static inline int get_bits_left(GetBitContext *gb)
605
{
606
    return gb->size_in_bits - get_bits_count(gb);
607
}
608

  
609 609
#endif /* AVCODEC_GET_BITS_H */

Also available in: Unified diff