io: fix codebook LUT generation corner case
authorKostya Shishkov <kostya.shishkov@gmail.com>
Sat, 3 Feb 2018 11:52:48 +0000 (12:52 +0100)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Sat, 3 Feb 2018 13:19:32 +0000 (14:19 +0100)
src/io/codebook.rs

index 89641f24e7a62bbddac2c5bccef50d26246bc4e8..c867c27efa11a29c9cc76b58d15140df53830641 100644 (file)
@@ -158,7 +158,7 @@ fn build_esc_lut(table: &mut Vec<u32>,
 
     for code in &bucket.codes {
         let bits = code.bits;
-        if code.bits < MAX_LUT_BITS {
+        if code.bits <= MAX_LUT_BITS {
             fill_lut(table, mode, bucket.offset, code.code, bits,
                      maxlen, code.idx as u32, false);
         } else {