Browse Source

Add get_ue_golomb_31()

Originally committed as revision 16298 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Michael Niedermayer 16 years ago
parent
commit
0e921e97c1
1 changed files with 17 additions and 0 deletions
  1. +17
    -0
      libavcodec/golomb.h

+ 17
- 0
libavcodec/golomb.h View File

@@ -74,6 +74,23 @@ static inline int get_ue_golomb(GetBitContext *gb){
}
}

/**
* read unsigned exp golomb code, constraint to a max of 31
*/
static inline int get_ue_golomb_31(GetBitContext *gb){
unsigned int buf;

OPEN_READER(re, gb);
UPDATE_CACHE(re, gb);
buf=GET_CACHE(re, gb);

buf >>= 32 - 9;
LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]);
CLOSE_READER(re, gb);

return ff_ue_golomb_vlc_code[buf];
}

static inline int svq3_get_ue_golomb(GetBitContext *gb){
uint32_t buf;



Loading…
Cancel
Save