]> git.nihav.org Git - nihav.git/commitdiff
bink2: transpose quant matrix for KB2f
authorKostya Shishkov <kostya.shishkov@gmail.com>
Mon, 25 Mar 2019 14:34:58 +0000 (15:34 +0100)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Mon, 25 Mar 2019 14:34:58 +0000 (15:34 +0100)
nihav-rad/src/codecs/bink2.rs

index 399ceae16f6a3a74a11d733feeb70760c59b9b72..e331d4f17481ddce3772bb34cebadf6f929b041f 100644 (file)
@@ -1832,7 +1832,7 @@ fn decode_acs_4blocks_old(br: &mut BitReader, codes: &Bink2Codes, dst: &mut [[f3
                     level = -level;
                 }
                 let pos = scan[idx];
-                dst[blk_no][pos] = (level as f32) * quant_mat[idx] * quant;
+                dst[blk_no][pos] = (level as f32) * quant_mat[(pos & 7) * 8 + (pos >> 3)] * quant;
             }
             idx += 1;
             if idx >= 64 { break; }