66 #define MQC_NUMCTXS 19
81 unsigned char *buffer;
129 #define opj_mqc_setcurctx(mqc, ctxno) (mqc)->curctx = &(mqc)->ctxs[(OPJ_UINT32)(ctxno)]
OPJ_UINT32 qeval
the probability of the Least Probable Symbol (0.75->0x8000, 1.5->0xffff)
Definition: mqc.h:57
OPJ_BYTE * start
Definition: mqc.h:76
opj_mqc_state_t ** curctx
Definition: mqc.h:79
opj_mqc_t * opj_mqc_create(void)
Create a new MQC handle.
Definition: mqc.c:362
void opj_mqc_restart_init_enc(opj_mqc_t *mqc)
RESTART mode switch (TERMALL) reinitialisation.
Definition: mqc.c:489
int OPJ_BOOL
Definition: openjpeg.h:110
void opj_mqc_resetstates(opj_mqc_t *mqc)
Reset the states of all the context of the coder/decoder (each context is set to a state where 0 and ...
Definition: mqc.c:603
#define MQC_NUMCTXS
Definition: mqc.h:66
OPJ_UINT32 ct
Definition: mqc.h:74
OPJ_INT32 opj_mqc_decode(opj_mqc_t *const mqc)
Decode a symbol.
Definition: mqc.c:584
void opj_mqc_bypass_enc(opj_mqc_t *mqc, OPJ_UINT32 d)
BYPASS mode switch, coding operation.
Definition: mqc.c:432
unsigned char OPJ_BYTE
Definition: openjpeg.h:117
OPJ_BOOL opj_mqc_init_dec(opj_mqc_t *mqc, OPJ_BYTE *bp, OPJ_UINT32 len)
Initialize the decoder.
Definition: mqc.c:525
int32_t OPJ_INT32
Definition: openjpeg.h:125
OPJ_UINT32 c
Definition: mqc.h:72
opj_mqc_state_t * ctxs[MQC_NUMCTXS]
Definition: mqc.h:78
This struct defines the state of a context.
Definition: mqc.h:55
void opj_mqc_destroy(opj_mqc_t *mqc)
Destroy a previously created MQC handle.
Definition: mqc.c:372
OPJ_BYTE * bp
Definition: mqc.h:75
void opj_mqc_flush(opj_mqc_t *mqc)
Flush the encoder, so that all remaining data is written.
Definition: mqc.c:412
struct opj_mqc_state * nmps
next state if the next encoded symbol is the MPS
Definition: mqc.h:61
struct opj_mqc opj_mqc_t
MQ coder.
OPJ_UINT32 opj_mqc_bypass_flush_enc(opj_mqc_t *mqc)
BYPASS mode switch, flush operation.
Definition: mqc.c:446
OPJ_UINT32 mps
the Most Probable Symbol (0 or 1)
Definition: mqc.h:59
void opj_mqc_bypass_init_enc(opj_mqc_t *mqc)
BYPASS mode switch, initialization operation.
Definition: mqc.c:424
struct opj_mqc_state opj_mqc_state_t
This struct defines the state of a context.
OPJ_UINT32 a
Definition: mqc.h:73
void opj_mqc_segmark_enc(opj_mqc_t *mqc)
SEGMARK mode switch (SEGSYM)
Definition: mqc.c:516
struct opj_mqc_state * nlps
next state if the next encoded symbol is the LPS
Definition: mqc.h:63
uint32_t OPJ_UINT32
Definition: openjpeg.h:126
void opj_mqc_encode(opj_mqc_t *mqc, OPJ_UINT32 d)
Encode a symbol using the MQ-coder.
Definition: mqc.c:404
void opj_mqc_init_enc(opj_mqc_t *mqc, OPJ_BYTE *bp)
Initialize the encoder.
Definition: mqc.c:391
OPJ_BYTE * end
Definition: mqc.h:77
void opj_mqc_reset_enc(opj_mqc_t *mqc)
RESET mode switch.
Definition: mqc.c:466
void opj_mqc_erterm_enc(opj_mqc_t *mqc)
ERTERM mode switch (PTERM)
Definition: mqc.c:501
OPJ_UINT32 opj_mqc_numbytes(opj_mqc_t *mqc)
Return the number of bytes written/read since initialisation.
Definition: mqc.c:383
MQ coder.
Definition: mqc.h:71
void opj_mqc_setstate(opj_mqc_t *mqc, OPJ_UINT32 ctxno, OPJ_UINT32 msb, OPJ_INT32 prob)
Set the state of a particular context.
Definition: mqc.c:610
OPJ_UINT32 opj_mqc_restart_enc(opj_mqc_t *mqc)
RESTART mode switch (TERMALL)
Definition: mqc.c:473