From 9e9e49d110c5fb5ec71be9b25a4a00d88af70c84 Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Mon, 25 Mar 2019 15:34:58 +0100 Subject: [PATCH] bink2: transpose quant matrix for KB2f --- nihav-rad/src/codecs/bink2.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nihav-rad/src/codecs/bink2.rs b/nihav-rad/src/codecs/bink2.rs index 399ceae..e331d4f 100644 --- a/nihav-rad/src/codecs/bink2.rs +++ b/nihav-rad/src/codecs/bink2.rs @@ -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; } -- 2.39.5