~medibuntu-maintainers/mplayer/medibuntu.precise

« back to all changes in this revision

Viewing changes to ffmpeg/libavcodec/golomb.h

  • Committer: Package Import Robot
  • Author(s): Reinhard Tartler
  • Date: 2012-01-12 22:23:28 UTC
  • mfrom: (0.4.7 sid)
  • mto: This revision was merged to the branch mainline in revision 76.
  • Revision ID: package-import@ubuntu.com-20120112222328-8jqdyodym3p84ygu
Tags: 2:1.0~rc4.dfsg1+svn34540-1
* New upstream snapshot
* upload to unstable

Show diffs side-by-side

added added

removed removed

Lines of Context:
75
75
    }
76
76
}
77
77
 
 
78
/**
 
79
 * Read an unsigned Exp-Golomb code in the range 0 to UINT32_MAX-1.
 
80
 */
 
81
static inline unsigned get_ue_golomb_long(GetBitContext *gb)
 
82
{
 
83
    unsigned buf, log;
 
84
 
 
85
    buf = show_bits_long(gb, 32);
 
86
    log = 31 - av_log2(buf);
 
87
    skip_bits_long(gb, log);
 
88
 
 
89
    return get_bits_long(gb, log + 1) - 1;
 
90
}
 
91
 
78
92
 /**
79
93
 * read unsigned exp golomb code, constraint to a max of 31.
80
94
 * the return value is undefined if the stored value exceeds 31.