From 3ad9bf2b25f68bbe5e6e43b0480e49c3784983cc Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Wed, 27 Jul 2022 09:53:18 +0200 Subject: [PATCH] h264: fix transform order --- nihav-itu/src/codecs/h264/dsp/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nihav-itu/src/codecs/h264/dsp/mod.rs b/nihav-itu/src/codecs/h264/dsp/mod.rs index 69df7d6..fa091c6 100644 --- a/nihav-itu/src/codecs/h264/dsp/mod.rs +++ b/nihav-itu/src/codecs/h264/dsp/mod.rs @@ -156,11 +156,11 @@ pub fn idct(blk: &mut [i16; 16], qp: u8, quant_dc: bool) { for (el, &idx) in blk.iter_mut().zip(BLK_INDEX.iter()).skip(start) { *el = (*el * LEVEL_SCALE[idx][qidx]) << shift; } - for i in 0..4 { - transform!(blk[i], blk[i + 4], blk[i + 8], blk[i + 12], 0); - } for row in blk.chunks_mut(4) { - transform!(row[0], row[1], row[2], row[3], 6); + transform!(row[0], row[1], row[2], row[3], 0); + } + for i in 0..4 { + transform!(blk[i], blk[i + 4], blk[i + 8], blk[i + 12], 6); } } -- 2.39.5