25 #define mpsexchange_dec_macro(d, curctx, a) \
27 if (a < (*curctx)->qeval) { \
28 d = (*curctx)->mps ^ 1; \
29 *curctx = (*curctx)->nlps; \
32 *curctx = (*curctx)->nmps; \
37 #define lpsexchange_dec_macro(d, curctx, a) \
39 if (a < (*curctx)->qeval) { \
40 a = (*curctx)->qeval; \
42 *curctx = (*curctx)->nmps; \
44 a = (*curctx)->qeval; \
45 d = (*curctx)->mps ^ 1; \
46 *curctx = (*curctx)->nlps; \
60 if (*mqc->bp > 0x8f) {
76 return ((uint32_t)mqc->c >> mqc->ct) & 0x01U;
79 #define bytein_dec_macro(mqc, c, ct) \
83 uint32_t l_c = *(mqc->bp + 1); \
84 if (*mqc->bp == 0xff) { \
88 mqc->end_of_byte_stream_counter ++; \
102 #define renorm_dec_macro(mqc, a, c, ct) \
106 bytein_dec_macro(mqc, c, ct); \
110 } while (a < A_MIN); \
113 #define decompress_macro(d, mqc, curctx, a, c, ct) \
116 a -= (*curctx)->qeval; \
117 uint32_t qeval_shift = (*curctx)->qeval << 16; \
118 if (c < qeval_shift) { \
119 lpsexchange_dec_macro(d, curctx, a); \
120 renorm_dec_macro(mqc, a, c, ct); \
124 mpsexchange_dec_macro(d, curctx, a); \
125 renorm_dec_macro(mqc, a, c, ct); \
127 d = (*curctx)->mps; \
144 #define mqc_renormd(mqc) \
145 renorm_dec_macro(mqc, mqc->a, mqc->c, mqc->ct)
153 #define mqc_decode(d, mqc) \
154 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:55
static INLINE void mqc_bytein(mqcoder *const mqc)
Input a byte.
Definition: mqc_dec_inl.h:136
#define bytein_dec_macro(mqc, c, ct)
Definition: mqc_dec_inl.h:79
#define INLINE
Definition: t1_common.h:28