OpenJPEG  2.1.2
index_manager.h
Go to the documentation of this file.
1 /*
2  * $Id$
3  *
4  * Copyright (c) 2002-2014, Universite catholique de Louvain (UCL), Belgium
5  * Copyright (c) 2002-2014, Professor Benoit Macq
6  * Copyright (c) 2010-2011, Kaori Hagihara
7  * All rights reserved.
8  *
9  * Redistribution and use in source and binary forms, with or without
10  * modification, are permitted provided that the following conditions
11  * are met:
12  * 1. Redistributions of source code must retain the above copyright
13  * notice, this list of conditions and the following disclaimer.
14  * 2. Redistributions in binary form must reproduce the above copyright
15  * notice, this list of conditions and the following disclaimer in the
16  * documentation and/or other materials provided with the distribution.
17  *
18  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS'
19  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
22  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28  * POSSIBILITY OF SUCH DAMAGE.
29  */
30 
31 #ifndef INDEX_MANAGER_H_
32 # define INDEX_MANAGER_H_
33 
34 #include "opj_config.h"
35 #include "opj_includes.h"
36 
37 #include "byte_manager.h"
38 #include "faixbox_manager.h"
39 #include "metadata_manager.h"
40 #include "mhixbox_manager.h"
41 
43 #if 0
44 typedef enum porder {
45  PROG_UNKNOWN = -1,
46  LRCP = 0,
47  RLCP = 1,
48  RPCL = 2,
49  PCRL = 3,
50  CPRL = 4
51 } porder_t;
52 #endif
53 
55 typedef struct SIZmarker_param{
69  Byte_t Ssiz[3];
73 
75 typedef struct CODmarker_param{
84 
86 typedef struct index_param{
97 
98 
106 index_param_t * parse_jp2file( int fd);
107 
113 void print_index( index_param_t index);
114 
120 void print_SIZ( SIZmarker_param_t SIZ);
121 
127 void print_COD( CODmarker_param_t COD);
128 
134 void delete_index( index_param_t **index);
135 
141 void delete_COD( CODmarker_param_t COD);
142 
143 
145 typedef struct range_param{
148 } range_param_t;
149 
158 range_param_t get_tile_Xrange( SIZmarker_param_t SIZ, Byte4_t tile_id, int level);
159 
168 range_param_t get_tile_Yrange( SIZmarker_param_t SIZ, Byte4_t tile_id, int level);
169 
170 
179 Byte4_t get_tile_XSiz( SIZmarker_param_t SIZ, Byte4_t tile_id, int level);
180 Byte4_t get_tile_YSiz( SIZmarker_param_t SIZ, Byte4_t tile_id, int level);
181 
182 
190 
191 #endif /* !INDEX_MANAGER_H_ */
mhixbox_param_t ** tileheader
dynamic array of tile header information from thix box
Definition: index_manager.h:94
Byte_t Scod
Coding style for all components.
Definition: index_manager.h:77
Byte_t Ssiz[3]
precision (depth) in bits and sign of the component samples
Definition: index_manager.h:69
Byte4_t maxvalue
maximal value
Definition: index_manager.h:147
uint8_t Byte_t
Definition: byte_manager.h:37
int64_t OPJ_OFF_T
Definition: openjpeg.h:130
index_param_t * parse_jp2file(int fd)
parse JP2 file AnnexI: Indexing JPEG2000 files for JPIP
Definition: index_manager.c:73
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:672
Byte8_t length
codestream length
Definition: index_manager.h:89
progression order
Definition: index_manager.h:55
OPJ_OFF_T offset
codestream offset
Definition: index_manager.h:88
fragment array index box parameters
Definition: faixbox_manager.h:75
Byte4_t YTnum
number of tiles in vertical direction
Definition: index_manager.h:67
OPJ_PROG_ORDER prog_order
progression order
Definition: index_manager.h:78
Byte_t XRsiz[3]
horizontal separation of a sample of component with respect to the reference grid ...
Definition: index_manager.h:70
int OPJ_BOOL
Definition: openjpeg.h:110
Byte2_t Csiz
number of the components in the image
Definition: index_manager.h:68
struct SIZmarker_param SIZmarker_param_t
progression order
struct index_param index_param_t
index parameters
Byte4_t YTsiz
height of one reference tile with respect to the reference grid
Definition: index_manager.h:63
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 numOflayers
number of layers
Definition: index_manager.h:79
faixbox_param_t * tilepart
tile part information from tpix box
Definition: index_manager.h:93
faixbox_param_t ** precpacket
dynamic array of precint packet information from ppix box
Definition: index_manager.h:95
metadatalist_param_t * metadatalist
metadata-bin list
Definition: index_manager.h:87
Byte4_t * XPsiz
dynamic array of precinct width at successive resolution level in order
Definition: index_manager.h:81
Byte2_t Lsiz
length of marker segment excluding the marker
Definition: index_manager.h:56
OPJ_BOOL isJPTfeasible(index_param_t index)
answers if the target is feasible to JPT-stream
Definition: index_manager.c:725
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
SIZmarker_param_t SIZ
SIZ marker information.
Definition: index_manager.h:91
index parameters
Definition: index_manager.h:86
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:692
Byte4_t get_tile_YSiz(SIZmarker_param_t SIZ, Byte4_t tile_id, int level)
Definition: index_manager.c:700
void print_SIZ(SIZmarker_param_t SIZ)
print Image and Tile SIZ parameters
Definition: index_manager.c:149
void delete_index(index_param_t **index)
delete index
Definition: index_manager.c:180
Byte8_t mhead_length
main header length
Definition: index_manager.h:90
enum PROG_ORDER OPJ_PROG_ORDER
Progression order.
Byte4_t XTsiz
width of one reference tile with respect to the reference grid
Definition: index_manager.h:62
CODmarker_param_t COD
COD marker information.
Definition: index_manager.h:92
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:667
Byte4_t Ysiz
height of the reference grid
Definition: index_manager.h:59
Byte_t numOfdecomp
number of decompositions levels
Definition: index_manager.h:80
void print_COD(CODmarker_param_t COD)
print Coding style default COD parameters
Definition: index_manager.c:166
struct range_param range_param_t
1-dimensional range parameters
uint32_t Byte4_t
Definition: byte_manager.h:39
header index table box parameters
Definition: mhixbox_manager.h:52
void print_index(index_param_t index)
print index parameters
Definition: index_manager.c:121
Byte4_t * YPsiz
dynamic array of precinct height at successive resolution level in order
Definition: index_manager.h:82
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
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 minvalue
minimal value
Definition: index_manager.h:146
struct CODmarker_param CODmarker_param_t
A.6.1 Coding style default (COD)
A.6.1 Coding style default (COD)
Definition: index_manager.h:75
Byte4_t XTnum
number of tiles in horizontal direction
Definition: index_manager.h:66
1-dimensional range parameters
Definition: index_manager.h:145
Byte_t YRsiz[3]
vertical separation of a sample of component with respect to the reference grid
Definition: index_manager.h:71
Byte4_t Xsiz
width of the reference grid
Definition: index_manager.h:58
void delete_COD(CODmarker_param_t COD)
delete dynamic arrays in COD marker
Definition: index_manager.c:201
uint64_t Byte8_t
Definition: byte_manager.h:40
Byte2_t Lcod
length of marker segment excluding the marker
Definition: index_manager.h:76
metadata-bin list parameters
Definition: metadata_manager.h:52
uint16_t Byte2_t
Definition: byte_manager.h:38