]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/golomb.h
Doxygenate put_bits_count() documentation.
[ffmpeg] / libavcodec / golomb.h
index 695609f6c7076d60d2e0d5763050b3bdc4825de4..59b4f9eca072b65f95cf463738d69ec76b49d9f8 100644 (file)
@@ -75,7 +75,8 @@ static inline int get_ue_golomb(GetBitContext *gb){
 }
 
  /**
- * read unsigned exp golomb code, constraint to a max of 31
+ * read unsigned exp golomb code, constraint to a max of 31.
+ * the return value is undefined if the stored value exceeds 31.
  */
 static inline int get_ue_golomb_31(GetBitContext *gb){
     unsigned int buf;
@@ -272,7 +273,7 @@ static inline int get_ur_golomb_jpegls(GetBitContext *gb, int k, int limit, int
 
     log= av_log2(buf);
 
-    if(log - k >= 32-MIN_CACHE_BITS && 32-log < limit){
+    if(log - k >= 32-MIN_CACHE_BITS+(MIN_CACHE_BITS==32) && 32-log < limit){
         buf >>= log - k;
         buf += (30-log)<<k;
         LAST_SKIP_BITS(re, gb, 32 + k - log);