From 9513edb181f464ac553b1f192cc41a02879af49c Mon Sep 17 00:00:00 2001 From: Gregor Weiss Date: Wed, 9 Oct 2024 12:46:02 +0200 Subject: [PATCH] add SIG2XI in argument list to calc_xi macro --- src/library/tier1.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/library/tier1.c b/src/library/tier1.c index 4e0f0ae..33f3171 100755 --- a/src/library/tier1.c +++ b/src/library/tier1.c @@ -120,7 +120,7 @@ k_sig = ((15 * k_h + 5 * k_v + k_d) >> l); \ } -#define calc_xi(stripe, bit_mask, k, l, xi_h, xi_v) \ +#define calc_xi(stripe, bit_mask, k, l, xi_h, xi_v, SIG2XI) \ { \ xi_h = ((bit_mask & stripe[k].stripe_l->sigma) | ((bit_mask & stripe[k].stripe_l->xi) << 2) | \ ((bit_mask & stripe[k].stripe_r->sigma) << 1) | ((bit_mask & stripe[k].stripe_r->xi) << 3)) >> l; \ @@ -1082,7 +1082,7 @@ significance_propagation_enc_pass(bwc_coder *const coder, const int8 b) if(bit & bit_mask) { - calc_xi(stripe, bit_mask, k, l, xi_h, xi_v); + calc_xi(stripe, bit_mask, k, l, xi_h, xi_v, SIG2XI); mq_bit_encode(coder->bitcoder, (uchar)(((bit_mask & stripe[k].xi) >> l)^XI2CONT[(xi_h << 2) | xi_v][1]), XI2CONT[(xi_h << 2) | xi_v][0]); @@ -1124,7 +1124,7 @@ significance_propagation_enc_pass(bwc_coder *const coder, const int8 b) if(bit & bit_mask) { - calc_xi(stripe, bit_mask, k, l, xi_h, xi_v); + calc_xi(stripe, bit_mask, k, l, xi_h, xi_v, SIG2XI); mq_bit_encode(coder->bitcoder, (uchar)(((bit_mask & stripe[k].xi) >> l)^XI2CONT[(xi_h << 2) | xi_v][1]), XI2CONT[(xi_h << 2) | xi_v][0]); @@ -1367,7 +1367,7 @@ cleanup_enc_pass(bwc_coder *const coder, const int8 b) } if(bit & bit_mask) { - calc_xi(stripe, bit_mask, k, l, xi_h, xi_v); + calc_xi(stripe, bit_mask, k, l, xi_h, xi_v, SIG2XI); mq_bit_encode(coder->bitcoder, (uchar)(((bit_mask & stripe[k].xi) >> l)^XI2CONT[(xi_h << 2) | xi_v][1]), XI2CONT[(xi_h << 2) | xi_v][0]); @@ -1392,7 +1392,7 @@ cleanup_enc_pass(bwc_coder *const coder, const int8 b) if(bit & bit_mask) { - calc_xi(stripe, bit_mask, k, l, xi_h, xi_v); + calc_xi(stripe, bit_mask, k, l, xi_h, xi_v, SIG2XI); mq_bit_encode(coder->bitcoder, (uchar)(((bit_mask & stripe[k].xi) >> l)^XI2CONT[(xi_h << 2) | xi_v][1]), XI2CONT[(xi_h << 2) | xi_v][0]); @@ -1488,7 +1488,7 @@ significance_propagation_dec_pass(bwc_coder *const coder, const int8 b) { stripe[k].bit[b] |= (bit << l); - calc_xi(stripe, bit_mask, l, k, xi_h, xi_v); + calc_xi(stripe, bit_mask, l, k, xi_h, xi_v, SIG2XI); stripe[k].xi |= ((XI2CONT[(xi_h << 2) | xi_v][1] ^ mq_bit_decode(coder->bitcoder, XI2CONT[(xi_h << 2) | xi_v][0])) << l); @@ -1531,7 +1531,7 @@ significance_propagation_dec_pass(bwc_coder *const coder, const int8 b) { stripe[k].bit[b] |= (bit << l); - calc_xi(stripe, bit_mask, k, l, xi_h, xi_v); + calc_xi(stripe, bit_mask, k, l, xi_h, xi_v, SIG2XI); stripe[k].xi |= ((XI2CONT[(xi_h << 2) | xi_v][1] ^ mq_bit_decode(coder->bitcoder, XI2CONT[(xi_h << 2) | xi_v][0])) << l); @@ -1755,7 +1755,7 @@ cleanup_dec_pass(bwc_coder *const coder, const int8 b) } if(bit & bit_mask) { - calc_xi(stripe, bit_mask, k, l, xi_h, xi_v); + calc_xi(stripe, bit_mask, k, l, xi_h, xi_v, SIG2XI); stripe[k].xi |= ((XI2CONT[(xi_h << 2) | xi_v][1] ^ mq_bit_decode(coder->bitcoder, XI2CONT[(xi_h << 2) | xi_v][0])) << l); @@ -1782,7 +1782,7 @@ cleanup_dec_pass(bwc_coder *const coder, const int8 b) if(bit & bit_mask) { - calc_xi(stripe, bit_mask, k, l, xi_h, xi_v); + calc_xi(stripe, bit_mask, k, l, xi_h, xi_v, SIG2XI); stripe[k].xi |= ((XI2CONT[(xi_h << 2) | xi_v][1] ^ mq_bit_decode(coder->bitcoder, XI2CONT[(xi_h << 2) | xi_v][0])) << l);