diff options
author | Kostya Shishkov <kostya.shishkov@gmail.com> | 2022-07-13 18:13:35 +0200 |
---|---|---|
committer | Kostya Shishkov <kostya.shishkov@gmail.com> | 2022-07-27 09:55:23 +0200 |
commit | 2b6a8fdcfd39656130fbbc1ff48fd863b13f7daa (patch) | |
tree | 924b4188fd62effb8252fd6ed410f2f0b40317b4 | |
parent | 3ad9bf2b25f68bbe5e6e43b0480e49c3784983cc (diff) | |
download | nihav-2b6a8fdcfd39656130fbbc1ff48fd863b13f7daa.tar.gz |
h264: fix some tables and indices in dsp
-rw-r--r-- | nihav-itu/src/codecs/h264/dsp/mod.rs | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/nihav-itu/src/codecs/h264/dsp/mod.rs b/nihav-itu/src/codecs/h264/dsp/mod.rs index fa091c6..df5b287 100644 --- a/nihav-itu/src/codecs/h264/dsp/mod.rs +++ b/nihav-itu/src/codecs/h264/dsp/mod.rs @@ -175,35 +175,35 @@ pub fn idct_dc(blk: &mut [i16; 16], qp: u8, quant_dc: bool) { const QMAT_8X8: [[u8; 16]; 6] = [ [ - 20, 19, 25, 24, + 20, 19, 25, 19, 19, 18, 24, 18, 25, 24, 32, 24, - 24, 18, 24, 18 + 19, 18, 24, 18 ], [ - 22, 21, 28, 26, + 22, 21, 28, 21, 21, 19, 26, 19, 28, 26, 35, 26, - 26, 19, 26, 19 + 21, 19, 26, 19 ], [ - 26, 24, 33, 31, + 26, 24, 33, 24, 24, 23, 31, 23, 33, 31, 42, 31, - 31, 23, 31, 23 + 24, 23, 31, 23 ], [ - 28, 26, 35, 33, + 28, 26, 35, 26, 26, 25, 33, 25, 35, 33, 45, 33, - 33, 25, 33, 25 + 26, 25, 33, 25 ], [ - 32, 30, 40, 38, + 32, 30, 40, 30, 30, 28, 38, 28, 40, 38, 51, 38, - 38, 28, 38, 28 + 30, 28, 38, 28 ], [ - 36, 34, 46, 43, + 36, 34, 46, 34, 34, 32, 43, 32, 46, 43, 58, 43, - 43, 32, 43, 32 + 34, 32, 43, 32 ] ]; @@ -644,7 +644,7 @@ fn ipred_y_8x8_ver_right(buf: &mut [u8], stride: usize, ctx: &IPred8Context) { (t[ix - 1] + 2 * t[ix] + t[ix + 1] + 2) >> 2 } } else if zvr == -1 { - (l[1] + 2 * l[0] + t[0] + 2) >> 2 + (l[1] + 2 * l[0] + t[1] + 2) >> 2 } else { let ix = y - 2 * x; (l[ix] + 2 * l[ix - 1] + l[ix - 2] + 2) >> 2 @@ -693,7 +693,7 @@ fn ipred_y_8x8_hor_down(buf: &mut [u8], stride: usize, ctx: &IPred8Context) { (l[ix - 1] + 2 * l[ix] + l[ix + 1] + 2) >> 2 } } else if zhd == -1 { - (l[1] + 2 * l[0] + t[0] + 2) >> 2 + (l[1] + 2 * l[0] + t[1] + 2) >> 2 } else { let ix = x - 2 * y; (t[ix] + 2 * t[ix - 1] + t[ix - 2] + 2) >> 2 |