75 #include "jasper/jas_seq.h"
77 #include "jpc_t2cod.h"
78 #include "jpc_mqenc.h"
80 #include "jpc_tagtree.h"
90 #define JPC_NUMEXTRABITS JPC_NMSEDEC_FRACBITS
93 #define JPC_BADRDSLOPE (-1)
104 uint_fast8_t sampgrdstepx;
107 uint_fast8_t sampgrdstepy;
110 uint_fast8_t sampgrdsubstepx;
113 uint_fast8_t sampgrdsubstepy;
122 uint_fast16_t numstepsizes;
125 uint_fast16_t stepsizes[JPC_MAXBANDS];
146 uint_fast16_t numlyrs;
150 jpc_fix_t *ilyrrates;
162 uint_fast8_t maxrlvls;
165 uint_fast16_t cblkwidthexpn;
168 uint_fast16_t cblkheightexpn;
172 uint_fast8_t cblksty;
178 uint_fast16_t prcwidthexpns[JPC_MAXRLVLS];
181 uint_fast16_t prcheightexpns[JPC_MAXRLVLS];
184 uint_fast8_t numgbits;
197 uint_fast32_t imgareatlx;
201 uint_fast32_t imgareatly;
205 uint_fast32_t refgrdwidth;
209 uint_fast32_t refgrdheight;
213 uint_fast32_t tilegrdoffx;
217 uint_fast32_t tilegrdoffy;
220 uint_fast32_t tilewidth;
223 uint_fast32_t tileheight;
227 uint_fast32_t numhtiles;
231 uint_fast32_t numvtiles;
234 uint_fast32_t numtiles;
237 uint_fast16_t numcmpts;
249 uint_fast32_t totalsize;
252 uint_fast32_t rawsize;
277 jpc_mqencstate_t mqencstate;
289 jpc_flt_t cumwmsedec;
304 jpc_enc_pass_t *passes;
316 jas_stream_t *stream;
331 jpc_enc_pass_t *curpass;
334 struct jpc_enc_prc_s *prc;
338 jpc_enc_pass_t *savedcurpass;
346 int savednumencpasses;
352 typedef struct jpc_enc_prc_s {
380 jpc_enc_cblk_t *cblks;
383 jpc_tagtree_t *incltree;
386 jpc_tagtree_t *nlibtree;
389 struct jpc_enc_band_s *band;
393 jpc_tagtree_t *savincltree;
397 jpc_tagtree_t *savnlibtree;
403 typedef struct jpc_enc_band_s {
418 jpc_fix_t absstepsize;
431 struct jpc_enc_rlvl_s *rlvl;
437 typedef struct jpc_enc_rlvl_s {
485 uint_fast16_t cblkwidthexpn;
488 uint_fast16_t cblkheightexpn;
494 jpc_enc_band_t *bands;
497 struct jpc_enc_tcmpt_s *tcmpt;
503 typedef struct jpc_enc_tcmpt_s {
509 jpc_enc_rlvl_t *rlvls;
527 int prcwidthexpns[JPC_MAXRLVLS];
530 int prcheightexpns[JPC_MAXRLVLS];
548 uint_fast16_t stepsizes[JPC_MAXBANDS];
551 struct jpc_enc_tile_s *tile;
557 typedef struct jpc_enc_tile_s {
560 uint_fast32_t tileno;
598 uint_fast32_t *lyrsizes;
604 jpc_enc_tcmpt_t *tcmpts;
607 uint_fast32_t rawsize;
613 typedef struct jpc_enc_s {
625 jpc_enc_tile_t *curtile;
628 jpc_cstate_t *cstate;
635 uint_fast32_t mainbodysize;
642 jas_stream_t *tmpstream;