]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/bitstream.c
VP3: Do not ignore error from read_huffman_tree().
[ffmpeg] / libavcodec / bitstream.c
index d39980f4df2f60c8d4a5d40780f7967493bdf648..57dd93e0ad48e54824607a1a4939d60ba207afcb 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Common bit i/o utils
- * Copyright (c) 2000, 2001 Fabrice Bellard.
+ * Copyright (c) 2000, 2001 Fabrice Bellard
  * Copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>
  *
  * alternative bitstream reader & writer by Michael Niedermayer <michaelni@gmx.at>
  */
 
 /**
- * @file bitstream.c
+ * @file libavcodec/bitstream.c
  * bitstream api.
  */
 
 #include "avcodec.h"
 #include "bitstream.h"
 
+const uint8_t ff_log2_run[32]={
+ 0, 0, 0, 0, 1, 1, 1, 1,
+ 2, 2, 2, 2, 3, 3, 3, 3,
+ 4, 4, 5, 5, 6, 6, 7, 7,
+ 8, 9,10,11,12,13,14,15
+};
+
 /**
  * Same as av_mallocz_static(), but does a realloc.
  *
 attribute_deprecated av_alloc_size(2)
 static void *ff_realloc_static(void *ptr, unsigned int size);
 
-static void *av_mallocz_static(unsigned int size)
-{
-    return av_mallocz(size);
-}
-
 static void *ff_realloc_static(void *ptr, unsigned int size)
 {
     return av_realloc(ptr, size);
@@ -80,7 +82,7 @@ void ff_copy_bits(PutBitContext *pb, const uint8_t *src, int length)
 
     if(length==0) return;
 
-    if(ENABLE_SMALL || words < 16 || put_bits_count(pb)&7){
+    if(CONFIG_SMALL || words < 16 || put_bits_count(pb)&7){
         for(i=0; i<words; i++) put_bits(pb, 16, be2me_16(srcw[i]));
     }else{
         for(i=0; put_bits_count(pb)&31; i++)