Go to the documentation of this file.
31 #ifndef INDEX_MANAGER_H_
32 # define INDEX_MANAGER_H_
34 #include "opj_config.h"
OPJ_OFF_T get_filesize(int fd)
Get file size.
Definition: byte_manager.c:167
void print_COD(CODmarker_param_t COD)
print Coding style default COD parameters
Definition: index_manager.c:175
range_param_t get_tile_range(Byte4_t Osiz, Byte4_t siz, Byte4_t TOsiz, Byte4_t Tsiz, Byte4_t tile_XYid, int level)
Definition: index_manager.c:741
range_param_t get_tile_Yrange(SIZmarker_param_t SIZ, Byte4_t tile_id, int level)
get vertical range of the tile in reference grid
Definition: index_manager.c:735
enum PROG_ORDER OPJ_PROG_ORDER
Progression order.
void print_index(index_param_t index)
print index parameters
Definition: index_manager.c:122
Byte_t fetch_marker1byte(marker_param_t marker, OPJ_OFF_T offset)
fetch marker content 1-bytes of data in file stream
Definition: marker_manager.c:56
box_param_t * gene_boxbyType(int fd, OPJ_OFF_T offset, OPJ_SIZE_T length, const char TBox[])
generate(search) box from JP2 file
Definition: box_manager.c:173
OPJ_BOOL set_tpixdata(box_param_t *cidx_box, index_param_t *jp2idx)
set code index parameters from tpix box I.3.2.4.4 Tile-part Index Table box
Definition: index_manager.c:491
Byte2_t Lsiz
length of marker segment excluding the marker
Definition: index_manager.h:56
Byte2_t numOflayers
number of layers
Definition: index_manager.h:79
Byte4_t minvalue
minimal value
Definition: index_manager.h:148
Byte2_t Lcod
length of marker segment excluding the marker
Definition: index_manager.h:76
Byte4_t get_tile_YSiz(SIZmarker_param_t SIZ, Byte4_t tile_id, int level)
Definition: index_manager.c:765
Byte4_t XTsiz
width of one reference tile with respect to the reference grid
Definition: index_manager.h:62
Byte_t Scod
Coding style for all components.
Definition: index_manager.h:77
OPJ_OFF_T offset
byte position of the whole Box (LBox) in the file
Definition: box_manager.h:39
Byte4_t XTnum
number of tiles in horizontal direction
Definition: index_manager.h:66
void delete_COD(CODmarker_param_t COD)
delete dynamic arrays in COD marker
Definition: index_manager.c:215
OPJ_BOOL set_thixdata(box_param_t *cidx_box, index_param_t *jp2idx)
set code index parameters from thix box I.3.2.4.5 Tile Header Index Table box
Definition: index_manager.c:517
Byte4_t * XPsiz
dynamic array of precinct width at successive resolution level in order
Definition: index_manager.h:81
range_param_t get_tile_Xrange(SIZmarker_param_t SIZ, Byte4_t tile_id, int level)
get horizontal range of the tile in reference grid
Definition: index_manager.c:729
void print_mhixbox(mhixbox_param_t *mhix)
print mhix box parameters
Definition: mhixbox_manager.c:98
mhixbox_param_t * gene_mhixbox(box_param_t *box)
generate mhix box
Definition: mhixbox_manager.c:47
uint8_t Byte_t
Definition: byte_manager.h:37
OPJ_BOOL set_mainmhixdata(box_param_t *cidx_box, codestream_param_t codestream, index_param_t *jp2idx)
set code index parameters from mhix box for main header I.3.2.4.3 Header Index Table box
Definition: index_manager.c:462
boxheader_param_t * search_boxheader(const char type[], manfbox_param_t *manf)
search a boxheader by box type from manifest box
Definition: manfbox_manager.c:100
Byte4_t fetch_marker4bytebigendian(marker_param_t marker, OPJ_OFF_T offset)
fetch marker content 4-byte big endian Byte codes in file stream
Definition: marker_manager.c:66
OPJ_OFF_T offset
codestream offset
Definition: index_manager.h:88
Byte2_t fetch_DBox2bytebigendian(box_param_t *box, OPJ_OFF_T offset)
fetch DBox (Box Contents) 2-byte big endian Byte codes in file stream
Definition: box_manager.c:331
int64_t OPJ_OFF_T
Definition: openjpeg.h:136
Byte4_t Xsiz
width of the reference grid
Definition: index_manager.h:58
box parameters
Definition: box_manager.h:37
OPJ_PROG_ORDER prog_order
progression order
Definition: index_manager.h:78
index parameters
Definition: index_manager.h:86
fragment array index box parameters
Definition: faixbox_manager.h:77
Byte8_t get_nmax(faixbox_param_t *faix)
get nmax parameter value from faix box
Definition: faixbox_manager.c:163
range_param_t get_tile_Yrange(SIZmarker_param_t SIZ, Byte4_t tile_id, int level)
get vertical range of the tile in reference grid
Definition: index_manager.c:735
Byte4_t Ysiz
height of the reference grid
Definition: index_manager.h:59
OPJ_BOOL set_cptrdata(box_param_t *cidx_box, index_param_t *jp2idx)
set code index parameters from cptr box I.3.2.2 Codestream Finder box
Definition: index_manager.c:400
faixbox_param_t * tilepart
tile part information from tpix box
Definition: index_manager.h:93
Byte4_t XOsiz
horizontal offset from the origin of the reference grid to the left side of the image area
Definition: index_manager.h:60
void delete_boxlist(boxlist_param_t **boxlist)
delete box list
Definition: box_manager.c:423
void delete_index(index_param_t **index)
delete index
Definition: index_manager.c:192
boxlist_param_t * get_boxstructure(int fd, OPJ_OFF_T offset, OPJ_SIZE_T length)
get box structure of JP2 file
Definition: box_manager.c:60
Byte_t YRsiz[3]
vertical separation of a sample of component with respect to the reference grid
Definition: index_manager.h:71
Byte_t Ssiz[3]
precision (depth) in bits and sign of the component samples
Definition: index_manager.h:69
Byte2_t length
codestream ( including the length
Definition: mhixbox_manager.h:44
manifest box parameters
Definition: manfbox_manager.h:41
Byte_t fetch_DBox1byte(box_param_t *box, OPJ_OFF_T offset)
fetch DBox (Box Contents) 1-byte Byte codes in file stream
Definition: box_manager.c:326
struct range_param range_param_t
1-dimensional range parameters
codestream_param_t set_codestream(int fd, OPJ_OFF_T offset, OPJ_SIZE_T length)
set codestream parameters from inputs
Definition: codestream_manager.c:44
OPJ_BOOL isJPTfeasible(index_param_t index)
answers if the target is feasible to JPT-stream
Definition: index_manager.c:792
index_param_t * parse_jp2file(int fd)
parse JP2 file AnnexI: Indexing JPEG2000 files for JPIP
Definition: index_manager.c:73
Byte4_t YTnum
number of tiles in vertical direction
Definition: index_manager.h:67
int OPJ_BOOL
Definition: openjpeg.h:116
size_t OPJ_SIZE_T
Definition: openjpeg.h:139
Byte4_t YOsiz
vertical offset from the origin of the reference grid to the top side of the image area
Definition: index_manager.h:61
Byte4_t get_tile_XSiz(SIZmarker_param_t SIZ, Byte4_t tile_id, int level)
get tile wdith at the decomposition level
Definition: index_manager.c:757
Byte_t XRsiz[3]
horizontal separation of a sample of component with respect to the reference grid
Definition: index_manager.h:70
CODmarker_param_t COD
COD marker information.
Definition: index_manager.h:92
codestream parameters
Definition: codestream_manager.h:37
A.6.1 Coding style default (COD)
Definition: index_manager.h:75
void print_index(index_param_t index)
print index parameters
Definition: index_manager.c:122
struct SIZmarker_param SIZmarker_param_t
progression order
void print_SIZ(SIZmarker_param_t SIZ)
print Image and Tile SIZ parameters
Definition: index_manager.c:151
Byte_t numOfdecomp
number of decompositions levels
Definition: index_manager.h:80
Byte4_t YTsiz
height of one reference tile with respect to the reference grid
Definition: index_manager.h:63
OPJ_BOOL set_ppixdata(box_param_t *cidx_box, index_param_t *jp2idx)
set code index parameters from ppix box I.3.2.4.6 Precinct Packet Index Table box
Definition: index_manager.c:573
#define logstream
Definition: index_manager.c:52
Byte4_t max(Byte4_t n1, Byte4_t n2)
Definition: index_manager.c:774
Byte4_t * YPsiz
dynamic array of precinct height at successive resolution level in order
Definition: index_manager.h:82
void delete_index(index_param_t **index)
delete index
Definition: index_manager.c:192
#define FCGI_stderr
Definition: index_manager.c:51
void delete_COD(CODmarker_param_t COD)
delete dynamic arrays in COD marker
Definition: index_manager.c:215
OPJ_BOOL set_cidxdata(box_param_t *cidx_box, index_param_t *codeidx)
set code index parameters (parse cidx box) Annex I
Definition: index_manager.c:348
void delete_faixbox(faixbox_param_t **faix)
delete faix box
Definition: faixbox_manager.c:145
range_param_t get_tile_Xrange(SIZmarker_param_t SIZ, Byte4_t tile_id, int level)
get horizontal range of the tile in reference grid
Definition: index_manager.c:729
#define OPJ_TRUE
Definition: openjpeg.h:117
OPJ_BOOL set_SIZmkrdata(markeridx_param_t *sizmkidx, codestream_param_t codestream, SIZmarker_param_t *SIZ)
set SIZ marker information A.5 Fixed information marker segment A.5.1 Image and tile size (SIZ)
Definition: index_manager.c:633
void * opj_malloc(size_t size)
Allocate an uninitialized memory block.
Definition: opj_malloc.c:191
Marker parameters.
Definition: marker_manager.h:38
marker_param_t set_marker(codestream_param_t cs, Byte2_t code, OPJ_OFF_T offset, Byte2_t length)
set marker parameters from inputs
Definition: marker_manager.c:42
OPJ_SIZE_T get_DBoxlen(box_param_t *box)
get DBox length
Definition: box_manager.c:311
mhixbox_param_t ** tileheader
dynamic array of tile header information from thix box
Definition: index_manager.h:95
uint32_t Byte4_t
Definition: byte_manager.h:39
void print_COD(CODmarker_param_t COD)
print Coding style default COD parameters
Definition: index_manager.c:175
void opj_free(void *ptr)
Deallocates or frees a memory block.
Definition: opj_malloc.c:246
struct CODmarker_param CODmarker_param_t
A.6.1 Coding style default (COD)
Byte4_t get_tile_XSiz(SIZmarker_param_t SIZ, Byte4_t tile_id, int level)
get tile wdith at the decomposition level
Definition: index_manager.c:757
Byte8_t length
length of the whole Box
Definition: box_manager.h:41
void delete_manfbox(manfbox_param_t **manf)
delete manifest box
Definition: manfbox_manager.c:73
faixbox_param_t * gene_faixbox(box_param_t *box)
generate faix box
Definition: faixbox_manager.c:45
Byte4_t min(Byte4_t n1, Byte4_t n2)
Definition: index_manager.c:783
OPJ_BOOL set_CODmkrdata(markeridx_param_t *codmkidx, codestream_param_t codestream, CODmarker_param_t *COD)
set code index parameters from COD marker in codestream A.6 Functional marker segments A....
Definition: index_manager.c:672
Byte4_t maxvalue
maximal value
Definition: index_manager.h:149
void print_SIZ(SIZmarker_param_t SIZ)
print Image and Tile SIZ parameters
Definition: index_manager.c:151
OPJ_OFF_T offset
offset relative to the start of the
Definition: mhixbox_manager.h:41
SIZmarker_param_t SIZ
SIZ marker information.
Definition: index_manager.h:91
progression order
Definition: index_manager.h:55
Byte2_t Csiz
number of the components in the image
Definition: index_manager.h:68
metadatalist_param_t * metadatalist
metadata-bin list
Definition: index_manager.h:87
Byte4_t XTOsiz
horizontal offset from the origin of the reference grid to the left side of the first tile
Definition: index_manager.h:64
Byte2_t fetch_marker2bytebigendian(marker_param_t marker, OPJ_OFF_T offset)
fetch marker content 2-byte big endian Byte codes in file stream
Definition: marker_manager.c:61
1-dimensional range parameters
Definition: index_manager.h:147
OPJ_BOOL isJPTfeasible(index_param_t index)
answers if the target is feasible to JPT-stream
Definition: index_manager.c:792
index_param_t * parse_jp2file(int fd)
parse JP2 file AnnexI: Indexing JPEG2000 files for JPIP
Definition: index_manager.c:73
void delete_mhixbox(mhixbox_param_t **mhix)
delete mhix box
Definition: mhixbox_manager.c:128
Byte2_t code
marker code
Definition: mhixbox_manager.h:39
OPJ_BOOL check_JP2boxidx(boxlist_param_t *toplev_boxlist)
check JP2 box indexing
Definition: index_manager.c:225
uint16_t Byte2_t
Definition: byte_manager.h:38
Box list parameters.
Definition: box_manager.h:48
Byte8_t fetch_DBox8bytebigendian(box_param_t *box, OPJ_OFF_T offset)
fetch DBox (Box Contents) 8-byte big endian Byte codes in file stream
Definition: box_manager.c:341
header index table box parameters
Definition: mhixbox_manager.h:52
faixbox_param_t ** precpacket
dynamic array of precint packet information from ppix box
Definition: index_manager.h:97
boxheader_param_t * first
top of the box header list
Definition: manfbox_manager.h:42
#define OPJ_FALSE
Definition: openjpeg.h:118
box_param_t * search_box(const char type[], boxlist_param_t *boxlist)
search a box by box type
Definition: box_manager.c:346
Byte4_t get_tile_YSiz(SIZmarker_param_t SIZ, Byte4_t tile_id, int level)
Definition: index_manager.c:765
struct index_param index_param_t
index parameters
Byte8_t length
codestream length
Definition: index_manager.h:89
manfbox_param_t * gene_manfbox(box_param_t *box)
generate manifest box
Definition: manfbox_manager.c:45
int fd
file descriptor
Definition: box_manager.h:38
OPJ_OFF_T get_DBoxoff(box_param_t *box)
get DBox offset
Definition: box_manager.c:306
Byte8_t mhead_length
main header length
Definition: index_manager.h:90
uint64_t Byte8_t
Definition: byte_manager.h:40
Marker index parameters.
Definition: mhixbox_manager.h:38
box_param_t * gene_childboxbyType(box_param_t *superbox, OPJ_OFF_T offset, const char TBox[])
generate(search) box from JP2 file
Definition: box_manager.c:293
Byte2_t Rsiz
capabilities that a decoder needs
Definition: index_manager.h:57
Byte4_t YTOsiz
vertical offset from the origin of the reference grid to the top side of the first tile
Definition: index_manager.h:65
markeridx_param_t * search_markeridx(Byte2_t code, mhixbox_param_t *mhix)
search a marker index by marker code from mhix box
Definition: mhixbox_manager.c:78
void print_faixbox(faixbox_param_t *faix)
print faix box parameters
Definition: faixbox_manager.c:120
box_param_t * gene_boxbyOffset(int fd, OPJ_OFF_T offset)
generate box from JP2 file at the given offset
Definition: box_manager.c:86