From: Kostya Shishkov Date: Wed, 27 Jul 2022 07:53:18 +0000 (+0200) Subject: h264: fix transform order X-Git-Url: https://git.nihav.org/?a=commitdiff_plain;h=3ad9bf2b25f68bbe5e6e43b0480e49c3784983cc;p=nihav.git h264: fix transform order --- 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); } }