Grok  7.6.2
SIZMarker.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016-2020 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 namespace grk {
25 
26 class SIZMarker {
27 public:
28 
36  bool read(CodeStream *codeStream, uint8_t *p_header_data,
37  uint16_t header_size);
38 
46  bool write(CodeStream *codeStream, BufferedStream *stream);
47 
48 };
49 
50 
51 }
52 
grk::BufferedStream::write_byte
bool write_byte(uint8_t value)
Definition: BufferedStream.cpp:182
grk::BufferedStream::write_int
bool write_int(uint32_t value)
Definition: BufferedStream.cpp:191
grk::default_number_mct_records
const uint32_t default_number_mct_records
Definition: CodeStream.h:60
grk::SIZMarker
Definition: SIZMarker.h:26
grk::CodingParams::t_width
uint32_t t_width
XTsiz.
Definition: CodingParams.h:247
grk::CodeStream::m_decompressor
DecoderState m_decompressor
Definition: CodeStream.h:299
grk::TileCodingParams
Tile coding parameters : this structure is used to store coding/decoding parameters common to all til...
Definition: CodingParams.h:121
grk::grk_mct_data
MCT data.
Definition: CodingParams.h:96
grk::TileCodingParams::tccps
TileComponentCodingParams * tccps
tile-component coding parameters
Definition: CodingParams.h:163
grk::CodingParams::tx0
uint32_t tx0
XTOsiz.
Definition: CodingParams.h:243
grk::CodingParams::t_grid_width
uint32_t t_grid_width
number of tiles in width
Definition: CodingParams.h:256
grk::BufferedStream
Byte input-output stream.
Definition: BufferedStream.h:38
_grk_image::comps
grk_image_comp * comps
image components
Definition: grok.h:895
grk::TileComponentCodingParams
Tile-component coding parameters.
Definition: CodingParams.h:49
grk::BufferedStream::write_short
bool write_short(uint16_t value)
Definition: BufferedStream.cpp:185
grk::SIZMarker::read
bool read(CodeStream *codeStream, uint8_t *p_header_data, uint16_t header_size)
Decompress a SIZ marker (image and tile size)
Definition: SIZMarker.cpp:66
grk::GRK_WARN
void GRK_WARN(const char *fmt,...)
Definition: logger.cpp:49
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::CodingParams::m_coding_params
union grk::CodingParams::@0 m_coding_params
grk::CodingParams::t_grid_height
uint32_t t_grid_height
number of tiles in height
Definition: CodingParams.h:258
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:891
GRK_IS_BROADCAST
#define GRK_IS_BROADCAST(v)
Definition: grok.h:214
grk::CodingParams::t_height
uint32_t t_height
YTsiz.
Definition: CodingParams.h:249
grk::CodeStream::wholeTileDecompress
bool wholeTileDecompress
Definition: CodeStream.h:361
grk::default_number_mcc_records
const uint32_t default_number_mcc_records
Definition: CodeStream.h:59
GRK_IS_IMF
#define GRK_IS_IMF(v)
Definition: grok.h:245
grk::CodingParams
Coding parameters.
Definition: CodingParams.h:235
grk::DecodingParams::m_reduce
uint8_t m_reduce
if != 0, then original dimension divided by 2^(reduce); if == 0 or not used, image is decompressed to...
Definition: CodingParams.h:227
grk::max_num_components
const uint32_t max_num_components
Definition: CodeStream.h:47
grk::CodeStream
Definition: CodeStream.h:164
grk::CodeStream::m_cp
CodingParams m_cp
Coding parameters.
Definition: CodeStream.h:309
_grk_image_comp
Image component.
Definition: grok.h:848
_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:885
grk
Copyright (C) 2016-2020 Grok Image Compression Inc.
Definition: BitIO.cpp:23
grk_includes.h
grk::grk_simple_mcc_decorrelation_data
MCC decorrelation data.
Definition: CodingParams.h:107
J2K_MS_SIZ
#define J2K_MS_SIZ
SIZ marker value.
Definition: CodeStream.h:77
grk::max_supported_precision
const uint32_t max_supported_precision
Definition: CodeStream.h:56
grk::max_num_tiles
const uint32_t max_num_tiles
Definition: CodeStream.h:49
GRK_PROFILE_PART2
#define GRK_PROFILE_PART2
Definition: grok.h:142
GRK_PROFILE_MASK
#define GRK_PROFILE_MASK
Definition: grok.h:141
grk::SIZMarker::write
bool write(CodeStream *codeStream, BufferedStream *stream)
Write the SIZ marker (image and tile size)
Definition: SIZMarker.cpp:310
GRK_PROFILE_CINEMA_LTS
#define GRK_PROFILE_CINEMA_LTS
Definition: grok.h:130
_grk_image::x1
uint32_t x1
Xsiz: width of the reference grid.
Definition: grok.h:887
grk::J2K_DEC_STATE_MH
@ J2K_DEC_STATE_MH
the decoding process is in the main header
Definition: CodingParams.h:286
grk::CodingParams::m_dec
DecodingParams m_dec
Definition: CodingParams.h:266
_grk_image
Image.
Definition: grok.h:879
_grk_image::y1
uint32_t y1
Ysiz: height of the reference grid.
Definition: grok.h:889
grk::GRK_ERROR
void GRK_ERROR(const char *fmt,...)
Definition: logger.cpp:57
grk::grk_update_image_comp_header_from_coding_params
static void grk_update_image_comp_header_from_coding_params(grk_image *image_header, const CodingParams *p_cp)
Updates the components characteristics of the image from the coding parameters.
Definition: SIZMarker.cpp:32
grk::CodingParams::ty0
uint32_t ty0
YTOsiz.
Definition: CodingParams.h:245
_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:882