Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / third_party / ffmpeg / libavcodec / lagarithrac.c
index 895acb0..37ac2cf 100644 (file)
@@ -45,15 +45,12 @@ void ff_lag_rac_init(lag_rac *l, GetBitContext *gb, int length)
 
     l->range        = 0x80;
     l->low          = *l->bytestream >> 1;
-    l->hash_shift   = FFMAX((int)l->scale - 8, 0);
+    l->hash_shift   = FFMAX((int)l->scale - 10, 0);
 
-    for (i = j = 0; i < 256; i++) {
+    for (i = j = 0; i < 1024; i++) {
         unsigned r = i << l->hash_shift;
         while (l->prob[j + 1] <= r)
             j++;
         l->range_hash[i] = j;
     }
-
-    /* Add conversion factor to hash_shift so we don't have to in lag_get_rac. */
-    l->hash_shift += 23;
 }