~ubuntu-branches/ubuntu/lucid/ffmpeg/lucid-security

« back to all changes in this revision

Viewing changes to libavcodec/golomb.h

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2009-03-13 09:18:28 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20090313091828-n4ktby5eca487uhv
Tags: 3:0.svn20090303-1ubuntu1+unstripped1
merge from ubuntu.jaunty branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
75
75
}
76
76
 
77
77
 /**
78
 
 * read unsigned exp golomb code, constraint to a max of 31
 
78
 * read unsigned exp golomb code, constraint to a max of 31.
 
79
 * the return value is undefined if the stored value exceeds 31.
79
80
 */
80
81
static inline int get_ue_golomb_31(GetBitContext *gb){
81
82
    unsigned int buf;
272
273
 
273
274
    log= av_log2(buf);
274
275
 
275
 
    if(log - k >= 32-MIN_CACHE_BITS && 32-log < limit){
 
276
    if(log - k >= 32-MIN_CACHE_BITS+(MIN_CACHE_BITS==32) && 32-log < limit){
276
277
        buf >>= log - k;
277
278
        buf += (30-log)<<k;
278
279
        LAST_SKIP_BITS(re, gb, 32 + k - log);