79 #include "jpc_t1cod.h"
80 #include "jpc_t2cod.h"
81 #include "jpc_mqenc.h"
82 #include "jpc_tagtree.h"
93 #define JPC_NUMEXTRABITS JPC_NMSEDEC_FRACBITS
96 #define JPC_BADRDSLOPE (-1)
107 uint_fast8_t sampgrdstepx;
110 uint_fast8_t sampgrdstepy;
113 uint_fast8_t sampgrdsubstepx;
116 uint_fast8_t sampgrdsubstepy;
125 uint_fast16_t numstepsizes;
128 uint_fast16_t stepsizes[JPC_MAXBANDS];
149 uint_fast16_t numlyrs;
153 jpc_fix_t *ilyrrates;
165 uint_fast8_t maxrlvls;
168 uint_fast16_t cblkwidthexpn;
171 uint_fast16_t cblkheightexpn;
175 uint_fast8_t cblksty;
181 uint_fast16_t prcwidthexpns[JPC_MAXRLVLS];
184 uint_fast16_t prcheightexpns[JPC_MAXRLVLS];
187 uint_fast8_t numgbits;
200 uint_fast32_t imgareatlx;
204 uint_fast32_t imgareatly;
208 uint_fast32_t refgrdwidth;
212 uint_fast32_t refgrdheight;
216 uint_fast32_t tilegrdoffx;
220 uint_fast32_t tilegrdoffy;
223 uint_fast32_t tilewidth;
226 uint_fast32_t tileheight;
230 uint_fast32_t numhtiles;
234 uint_fast32_t numvtiles;
237 uint_fast32_t numtiles;
240 uint_fast16_t numcmpts;
252 uint_fast32_t totalsize;
255 uint_fast32_t rawsize;
274 enum jpc_segtype type;
280 jpc_mqencstate_t mqencstate;
292 jpc_flt_t cumwmsedec;
307 jpc_enc_pass_t *passes;
319 jas_stream_t *stream;
334 jpc_enc_pass_t *curpass;
337 struct jpc_enc_prc_s *prc;
341 jpc_enc_pass_t *savedcurpass;
349 int savednumencpasses;
355 typedef struct jpc_enc_prc_s {
383 jpc_enc_cblk_t *cblks;
386 jpc_tagtree_t *incltree;
389 jpc_tagtree_t *nlibtree;
392 struct jpc_enc_band_s *band;
396 jpc_tagtree_t *savincltree;
400 jpc_tagtree_t *savnlibtree;
406 typedef struct jpc_enc_band_s {
415 enum jpc_tsfb_orient orient;
421 jpc_fix_t absstepsize;
434 struct jpc_enc_rlvl_s *rlvl;
440 typedef struct jpc_enc_rlvl_s {
480 unsigned cbgwidthexpn;
485 unsigned cbgheightexpn;
488 uint_fast16_t cblkwidthexpn;
491 uint_fast16_t cblkheightexpn;
497 jpc_enc_band_t *bands;
500 struct jpc_enc_tcmpt_s *tcmpt;
506 typedef struct jpc_enc_tcmpt_s {
512 jpc_enc_rlvl_t *rlvls;
530 int prcwidthexpns[JPC_MAXRLVLS];
533 int prcheightexpns[JPC_MAXRLVLS];
551 uint_fast16_t stepsizes[JPC_MAXBANDS];
554 struct jpc_enc_tile_s *tile;
560 typedef struct jpc_enc_tile_s {
563 uint_fast32_t tileno;
601 uint_fast32_t *lyrsizes;
607 jpc_enc_tcmpt_t *tcmpts;
610 uint_fast32_t rawsize;
616 typedef struct jpc_enc_s {
628 jpc_enc_tile_t *curtile;
631 jpc_cstate_t *cstate;
638 uint_fast32_t mainbodysize;
645 jas_stream_t *tmpstream;
#define jas_image_cmptprec(image, cmptno)
Get the precision of the sample data for a component.
Definition: jas_image.h:427
#define jas_image_brx(image)
Get the x-coordinate of the bottom-right corner of the image bounding box on the reference grid (plus...
Definition: jas_image.h:373
#define jas_image_numcmpts(image)
Get the number of image components.
Definition: jas_image.h:386
int jas_stream_close(jas_stream_t *stream)
Close a stream.
Definition: jas_stream.c:610
#define jas_image_cmptvstep(image, cmptno)
Get the vertical subsampling factor for a component.
Definition: jas_image.h:439
long jas_stream_tell(jas_stream_t *stream)
Get the current position within the stream.
Definition: jas_stream.c:926
int jas_image_readcmpt(jas_image_t *image, unsigned cmptno, jas_image_coord_t x, jas_image_coord_t y, jas_image_coord_t width, jas_image_coord_t height, jas_matrix_t *data)
Read a rectangular region of an image component.
Definition: jas_image.c:470
#define jas_image_cmpthstep(image, cmptno)
Get the horizontal subsampling factor for a component.
Definition: jas_image.h:433
#define jas_image_cmptheight(image, cmptno)
Get the height of a component.
Definition: jas_image.h:415
#define jas_image_width(image)
Get the width of the image in units of the image reference grid.
Definition: jas_image.h:346
#define jas_image_bry(image)
Get the y-coordinate of the bottom-right corner of the image bounding box on the reference grid (plus...
Definition: jas_image.h:380
jas_stream_t * jas_stream_memopen(char *buf, int bufsize)
Open a memory buffer as a stream.
Definition: jas_stream.c:276
JasPer Debugging-Related Functionality.
#define jas_image_cmptwidth(image, cmptno)
Get the width of a component.
Definition: jas_image.h:409
uint_fast32_t jas_image_rawsize(const jas_image_t *image)
Get the raw size of an image (i.e., the nominal size of the image without any compression.
Definition: jas_image.c:802
long jas_stream_seek(jas_stream_t *stream, long offset, int origin)
Set the current position within the stream.
Definition: jas_stream.c:891
#define jas_image_cmptsgnd(image, cmptno)
Get the signedness of the sample data for a component.
Definition: jas_image.h:421
#define jas_stream_getrwcount(stream)
Get the read/write count for a stream.
Definition: jas_stream.h:513
#define jas_image_clrspc(image)
Get the color model used by the image.
Definition: jas_image.h:392
int jas_stream_flush(jas_stream_t *stream)
Flush any pending output to a stream.
Definition: jas_stream.c:1001
Image class.
Definition: jas_image.h:202
#define jas_image_height(image)
Get the height of the image in units of the image reference grid.
Definition: jas_image.h:352
#define jas_image_cmptbrx(image, cmptno)
Get the x-coordinate of the bottom-right corner of a component (plus "one").
Definition: jas_image.h:458
#define jas_image_cmptbry(image, cmptno)
Get the y-coordinate of the bottom-right corner of a component (plus "one").
Definition: jas_image.h:466