Grok  7.6.3
Dump.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016-2021 Grok Image Compression Inc.
3  *
4  * This source code is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU Affero General Public License, version 3,
6  * as published by the Free Software Foundation.
7  *
8  * This source code is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU Affero General Public License for more details.
12  *
13  * You should have received a copy of the GNU Affero General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  *
17  * This source code incorporates work covered by the BSD 2-clause license.
18  * Please see the LICENSE file in the root directory for details.
19  *
20  */
21 
22 #pragma once
23 
24 #include <vector>
25 #include <map>
26 
27 namespace grk {
28 
29 struct FileFormat;
30 
31 
40 void j2k_dump(CodeStream *codeStream, uint32_t flag, FILE *out_stream);
41 
49 void j2k_dump_image_header(grk_image *image, bool dev_dump_flag,
50  FILE *out_stream);
51 
59 void j2k_dump_image_comp_header( grk_image_comp *comp, bool dev_dump_flag,
60  FILE *out_stream);
61 
69  grk_codestream_info_v2 * j2k_get_cstr_info(CodeStream *codeStream);
70 
78  grk_codestream_index * j2k_get_cstr_index(CodeStream *codeStream);
79 
81 
82  bool j2k_allocate_tile_element_cstr_index(CodeStream *codeStream);
83 
90 
99  void jp2_dump(FileFormat *fileFormat, uint32_t flag, FILE *out_stream);
100 
108  grk_codestream_info_v2 * jp2_get_cstr_info(FileFormat *fileFormat);
109 
117  grk_codestream_index * jp2_get_cstr_index(FileFormat *fileFormat);
118 
119 
120 }
_grk_tile_index::nb_tps
uint32_t nb_tps
number of tile parts
Definition: grok.h:1140
_grk_codestream_index
Code stream index info.
Definition: grok.h:1158
grk::j2k_dump_MH_info
static void j2k_dump_MH_info(CodeStream *codeStream, FILE *out_stream)
Definition: Dump.cpp:214
grk::j2k_get_cstr_info
grk_codestream_info_v2 * j2k_get_cstr_info(CodeStream *codeStream)
Get the code stream info from a JPEG2000 codec.
Definition: Dump.cpp:282
grk::CodingParams::t_width
uint32_t t_width
XTsiz.
Definition: CodingParams.h:252
_grk_tile_index::marker
grk_marker_info * marker
list of markers
Definition: grok.h:1150
GRK_J2K_MH_INFO
#define GRK_J2K_MH_INFO
Codestream information based only on the main header.
Definition: grok.h:87
grk::CodeStream::m_decompressor
DecoderState m_decompressor
Definition: CodeStream.h:299
grk::TileCodingParams::prg
GRK_PROG_ORDER prg
progression order
Definition: CodingParams.h:130
grk::TileCodingParams
Tile coding parameters : this structure is used to store coding/decoding parameters common to all til...
Definition: CodingParams.h:121
grk::TileCodingParams::tccps
TileComponentCodingParams * tccps
tile-component coding parameters
Definition: CodingParams.h:163
_grk_codestream_index::main_head_end
uint64_t main_head_end
main header end position (first SOT position)
Definition: grok.h:1162
grk::CodingParams::tx0
uint32_t tx0
XTOsiz.
Definition: CodingParams.h:248
grk::CodingParams::t_grid_width
uint32_t t_grid_width
number of tiles in width
Definition: CodingParams.h:261
_grk_image::comps
grk_image_comp * comps
image components
Definition: grok.h:906
grk::j2k_destroy_cstr_index
void j2k_destroy_cstr_index(grk_codestream_index *p_cstr_ind)
Destroys a code stream index structure.
Definition: Dump.cpp:502
grk::grk_calloc
void * grk_calloc(size_t num, size_t size)
Allocate a memory block with elements initialized to 0.
Definition: MemManager.cpp:111
_grk_codestream_index::main_head_start
uint64_t main_head_start
main header start position (SOC position)
Definition: grok.h:1160
_grk_tp_index
Tile part index info.
Definition: grok.h:1124
grk::CodingParams::t_grid_height
uint32_t t_grid_height
number of tiles in height
Definition: CodingParams.h:263
grk::FileFormat
JPEG 2000 file format reader/writer.
Definition: FileFormat.h:158
grk::TileCodingParams::csty
uint8_t csty
coding style
Definition: CodingParams.h:128
grk::grk_free
void grk_free(void *ptr)
Deallocates or frees a memory block.
Definition: MemManager.cpp:141
_grk_codestream_index::marker
grk_marker_info * marker
list of markers
Definition: grok.h:1168
grk::CodeStream::m_input_image
grk_image * m_input_image
internal/private encoded / decompressed image
Definition: CodeStream.h:303
_grk_image::numcomps
uint16_t numcomps
number of components in the image
Definition: grok.h:902
grk::CodeStream::cstr_index
grk_codestream_index * cstr_index
helper used to write the index file
Definition: CodeStream.h:318
grk::CodingParams::t_height
uint32_t t_height
YTsiz.
Definition: CodingParams.h:254
grk::FileFormat::codeStream
CodeStream * codeStream
handle to the J2K codec
Definition: FileFormat.h:217
_grk_codestream_index::codestream_size
uint64_t codestream_size
code stream's size
Definition: grok.h:1164
_grk_codestream_index::marknum
uint32_t marknum
number of markers
Definition: grok.h:1166
grk::j2k_dump_tile_info
static void j2k_dump_tile_info(TileCodingParams *default_tile, uint32_t numcomps, FILE *out_stream)
Definition: Dump.cpp:30
GRK_J2K_MAXBANDS
#define GRK_J2K_MAXBANDS
Maximum number of sub-bands.
Definition: grok.h:83
_grk_tile_index
Tile index info.
Definition: grok.h:1136
grk::jp2_get_cstr_info
grk_codestream_info_v2 * jp2_get_cstr_info(FileFormat *fileFormat)
Get the code stream info from a JPEG2000 codec.
Definition: Dump.cpp:525
grk::CodeStream
Definition: CodeStream.h:164
GRK_J2K_TCH_INFO
#define GRK_J2K_TCH_INFO
Tile/Component information of all tiles.
Definition: grok.h:89
grk::CodeStream::m_cp
CodingParams m_cp
Coding parameters.
Definition: CodeStream.h:309
_grk_image_comp
Image component.
Definition: grok.h:859
GRK_JP2_IND
#define GRK_JP2_IND
JP2 file index.
Definition: grok.h:93
grk::j2k_create_cstr_index
grk_codestream_index * j2k_create_cstr_index(void)
Definition: Dump.cpp:483
_grk_image_comp::dy
uint32_t dy
YRsiz: vertical separation of a sample of with component with respect to the reference grid.
Definition: grok.h:863
_grk_tile_index::marknum
uint32_t marknum
number of markers
Definition: grok.h:1148
_grk_codestream_info_v2
Code stream info v2.
Definition: grok.h:1101
_grk_tile_index::maxmarknum
uint32_t maxmarknum
actual size of markers array
Definition: grok.h:1152
_grk_image_comp::sgnd
bool sgnd
Definition: grok.h:878
grk::jp2_dump
void jp2_dump(FileFormat *fileFormat, uint32_t flag, FILE *out_stream)
Dump some elements from the JP2 decompression structure .
Definition: Dump.cpp:516
_grk_codestream_index::nb_of_tiles
uint32_t nb_of_tiles
Definition: grok.h:1171
GRK_J2K_TH_INFO
#define GRK_J2K_TH_INFO
Tile information based on the current tile header.
Definition: grok.h:88
_grk_image::y0
uint32_t y0
YOsiz: vertical offset from the origin of the reference grid to the top side of the image area.
Definition: grok.h:896
_grk_tccp_info
Component coding parameters info.
Definition: grok.h:1048
grk
Copyright (C) 2016-2021 Grok Image Compression Inc.
Definition: BitIO.cpp:23
J2K_CCP_QNTSTY_SIQNT
#define J2K_CCP_QNTSTY_SIQNT
Definition: CodeStream.h:67
grk::grk_malloc
void * grk_malloc(size_t size)
Allocate an uninitialized memory block.
Definition: MemManager.cpp:105
grk_includes.h
grk::CodingParams::tcps
TileCodingParams * tcps
tile coding parameters
Definition: CodingParams.h:268
grk::j2k_allocate_tile_element_cstr_index
bool j2k_allocate_tile_element_cstr_index(CodeStream *codeStream)
Definition: Dump.cpp:461
GRK_J2K_TH_IND
#define GRK_J2K_TH_IND
Tile index based on the current tile.
Definition: grok.h:91
grk::j2k_get_cstr_index
grk_codestream_index * j2k_get_cstr_index(CodeStream *codeStream)
Get the code stream index from a JPEG2000 codec.
Definition: Dump.cpp:352
grk::j2k_dump
void j2k_dump(CodeStream *codeStream, uint32_t flag, FILE *out_stream)
Dump some elements from the J2K decompression structure .
Definition: Dump.cpp:87
grk::TileCodingParams::mct
uint8_t mct
multi-component transform identifier
Definition: CodingParams.h:135
_grk_marker_info
Marker info.
Definition: grok.h:967
grk_destroy_cstr_info
void GRK_CALLCONV grk_destroy_cstr_info(grk_codestream_info_v2 **cstr_info)
Destroy Codestream information after compression or decompression.
Definition: grok.cpp:476
grk::j2k_dump_MH_index
static void j2k_dump_MH_index(CodeStream *codeStream, FILE *out_stream)
Definition: Dump.cpp:134
grk::TileCodingParams::numlayers
uint16_t numlayers
number of layers
Definition: CodingParams.h:132
grk::j2k_dump_image_comp_header
void j2k_dump_image_comp_header(grk_image_comp *comp_header, bool dev_dump_flag, FILE *out_stream)
Dump a component image header structure.
Definition: Dump.cpp:260
_grk_image_comp::dx
uint32_t dx
XRsiz: horizontal separation of a sample of with component with respect to the reference grid.
Definition: grok.h:861
grk::jp2_get_cstr_index
grk_codestream_index * jp2_get_cstr_index(FileFormat *fileFormat)
Get the code stream index from a JPEG2000 codec.
Definition: Dump.cpp:521
_grk_image::x1
uint32_t x1
Xsiz: width of the reference grid.
Definition: grok.h:898
GRK_J2K_MH_IND
#define GRK_J2K_MH_IND
Codestream index based only on the main header.
Definition: grok.h:90
grk::j2k_dump_image_header
void j2k_dump_image_header(grk_image *img_header, bool dev_dump_flag, FILE *out_stream)
Dump an image header structure.
Definition: Dump.cpp:228
GRK_JP2_INFO
#define GRK_JP2_INFO
JP2 file information.
Definition: grok.h:92
grk::DecoderState::m_default_tcp
TileCodingParams * m_default_tcp
Definition: CodingParams.h:326
GRK_J2K_MAXRLVLS
#define GRK_J2K_MAXRLVLS
Maximum number of resolution levels authorized.
Definition: grok.h:82
_grk_image
Image.
Definition: grok.h:890
_grk_tile_index::tp_index
grk_tp_index * tp_index
information concerning tile parts
Definition: grok.h:1146
_grk_image::y1
uint32_t y1
Ysiz: height of the reference grid.
Definition: grok.h:900
GRK_IMG_INFO
#define GRK_IMG_INFO
Basic image information provided to the user.
Definition: grok.h:86
_grk_image_comp::prec
uint8_t prec
precision
Definition: grok.h:877
grk::CodingParams::ty0
uint32_t ty0
YTOsiz.
Definition: CodingParams.h:250
_grk_codestream_index::tile_index
grk_tile_index * tile_index
Definition: grok.h:1172
_grk_image::x0
uint32_t x0
XOsiz: horizontal offset from the origin of the reference grid to the left side of the image area.
Definition: grok.h:893