25#define mpsexchange_dec_macro(d, curctx, a) \
27 if(a < (*curctx)->qeval) \
29 d = (*curctx)->mps ^ 1; \
30 *curctx = (*curctx)->nlps; \
35 *curctx = (*curctx)->nmps; \
40#define lpsexchange_dec_macro(d, curctx, a) \
42 if(a < (*curctx)->qeval) \
44 a = (*curctx)->qeval; \
46 *curctx = (*curctx)->nmps; \
50 a = (*curctx)->qeval; \
51 d = (*curctx)->mps ^ 1; \
52 *curctx = (*curctx)->nlps; \
90 return ((uint32_t)mqc->c >> mqc->ct) & 0x01U;
93#define bytein_dec_macro(mqc, c, ct) \
97 uint32_t l_c = *(mqc->bp + 1); \
98 if(*mqc->bp == 0xff) \
104 mqc->end_of_byte_stream_counter++; \
122#define renorm_dec_macro(mqc, a, c, ct) \
127 bytein_dec_macro(mqc, c, ct); \
131 } while(a < A_MIN); \
134#define decompress_macro(d, mqc, curctx, a, c, ct) \
137 a -= (*curctx)->qeval; \
138 uint32_t qeval_shift = (*curctx)->qeval << 16; \
139 if(c < qeval_shift) \
141 lpsexchange_dec_macro(d, curctx, a); \
142 renorm_dec_macro(mqc, a, c, ct); \
149 mpsexchange_dec_macro(d, curctx, a); \
150 renorm_dec_macro(mqc, a, c, ct); \
154 d = (*curctx)->mps; \
172#define mqc_renormd(mqc) renorm_dec_macro(mqc, mqc->a, mqc->c, mqc->ct)
180#define mqc_decode(d, mqc) decompress_macro(d, mqc, mqc->curctx, mqc->a, mqc->c, mqc->ct)
static INLINE uint32_t mqc_raw_decode(mqcoder *mqc)
Decompress a symbol using raw-decoder.
Definition mqc_dec_inl.h:61
static INLINE void mqc_bytein(mqcoder *const mqc)
Input a byte.
Definition mqc_dec_inl.h:163
#define bytein_dec_macro(mqc, c, ct)
Definition mqc_dec_inl.h:93
#define INLINE
Definition t1_common.h:28