33 if (*mqc->
bp == 0xff){
35 *mqc->
bp = mqc->
c >> 20;
38 }
else if ((mqc->
c & 0x8000000)){
44 *mqc->
bp = mqc->
c >> 19;
57 }
while (!(mqc->
a & 0x8000));
62 int tmp = mqc->
c + mqc->
a;
75 mqc->
ct = 12 + (*mqc->
bp == 0xff);
84 if ((*cxstate & 1) == d){
85 if (!(mqc->
a & 0x8000)){
112 mqc->
c = mqc->
c << mqc->
ct;
114 mqc->
c = mqc->
c << mqc->
ct;
116 if (*mqc->
bp != 0xff)
int ff_mqc_length(MqcState *mqc)
number of encoded bytes
void ff_mqc_init_contexts(MqcState *mqc)
MQ-coder context initialisations.
void ff_mqc_encode(MqcState *mqc, uint8_t *cxstate, int d)
code bit d with context cx
int ff_mqc_flush(MqcState *mqc)
flush the encoder [returns number of bytes encoded]
uint16_t ff_mqc_qe[2 *47]
void ff_mqc_initenc(MqcState *mqc, uint8_t *bp)
initialize the encoder
uint8_t ff_mqc_nlps[2 *47]
static void setbits(MqcState *mqc)
uint8_t ff_mqc_nmps[2 *47]
static void byteout(MqcState *mqc)
static void renorme(MqcState *mqc)