Go to the source code of this file.
|
#define | mqc_renorme_macro(mqc, a_, c_, ct_) |
| Renormalize mqc->a and mqc->c while compressing, so that mqc->a stays between 0x8000 and 0x10000.
|
|
#define | mqc_codemps_macro(mqc, curctx, a, c, ct) |
|
#define | mqc_codelps_macro(mqc, curctx, a, c, ct) |
|
#define | mqc_encode_macro(mqc, curctx, a, c, ct, d) |
|
#define | mqc_bypass_enc_macro(mqc, c, ct, d) |
|
|
void | mqc_byteout (mqcoder *mqc) |
| Output a byte, doing bit-stuffing if necessary.
|
|
◆ mqc_bypass_enc_macro
#define mqc_bypass_enc_macro |
( |
| mqc, |
|
|
| c, |
|
|
| ct, |
|
|
| d ) |
Value: { \
{ \
\
if(*mqc->bp == 0xff) \
mqc->bp++; \
} \
}
uint32_t c
temporary buffer where bits are coded or decoded
Definition mqc.h:46
uint32_t ct
number of bits already read or free to write
Definition mqc.h:50
◆ mqc_codelps_macro
#define mqc_codelps_macro |
( |
| mqc, |
|
|
| curctx, |
|
|
| a, |
|
|
| c, |
|
|
| ct ) |
Value: { \
if(
a < (*curctx)->qeval) \
else \
a = (*curctx)->qeval; \
mqc_renorme_macro(mqc,
a,
c,
ct); \
}
uint32_t a
only used by MQ decoder
Definition mqc.h:48
const mqc_state ** curctx
Active context.
Definition mqc.h:62
◆ mqc_codemps_macro
#define mqc_codemps_macro |
( |
| mqc, |
|
|
| curctx, |
|
|
| a, |
|
|
| c, |
|
|
| ct ) |
Value: { \
{ \
if(
a < (*curctx)->qeval) \
else \
c += (*curctx)->qeval; \
mqc_renorme_macro(mqc,
a,
c,
ct); \
} \
else \
{ \
} \
}
◆ mqc_encode_macro
#define mqc_encode_macro |
( |
| mqc, |
|
|
| curctx, |
|
|
| a, |
|
|
| c, |
|
|
| ct, |
|
|
| d ) |
Value: { \
if((*curctx)->mps == (d)) \
}
#define mqc_codelps_macro(mqc, curctx, a, c, ct)
Definition TileCache.h:74
◆ mqc_renorme_macro
#define mqc_renorme_macro |
( |
| mqc, |
|
|
| a_, |
|
|
| c_, |
|
|
| ct_ ) |
Value: { \
do \
{ \
a_ <<= 1; \
c_ <<= 1; \
ct_--; \
if(ct_ == 0) \
{ \
mqc->c = c_; \
mqc_byteout(mqc); \
c_ = mqc->c; \
ct_ = mqc->ct; \
} \
} while((a_ & 0x8000) == 0); \
}
Renormalize mqc->a and mqc->c while compressing, so that mqc->a stays between 0x8000 and 0x10000.
- Parameters
-
mqc | MQC handle |
a_ | value of mqc->a |
c_ | value of mqc->c_ |
ct_ | value of mqc->ct_ |
◆ mqc_byteout()
void mqc_byteout |
( |
mqcoder * | mqc | ) |
|
Output a byte, doing bit-stuffing if necessary.
After a 0xff byte, the next byte must be smaller than 0x90.
- Parameters
-