Grok 20.3.2
CodeStreamLimits.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2016-2026 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
18#pragma once
19
20#include <cstdint>
21#include <climits>
22
23namespace grk
24{
25// Limits defined in JPEG 2000 standard
26const uint16_t maxNumComponentsJ2K = 16384;
27const uint8_t maxPrecisionJ2K = 38;
28const uint8_t maxPassesPerSegmentJ2K = (maxPrecisionJ2K - 1) * 3 + 1;
29const uint16_t maxNumTilesJ2K = 65535;
30const uint8_t maxTilePartsPerTileJ2K = 255;
31const uint16_t maxTotalTilePartsJ2K = 65535;
32// note: includes tile part header
33const uint32_t maxTilePartSizeJ2K = UINT_MAX;
34const uint16_t maxNumLayersJ2K = 65535;
35const uint32_t maxBitPlanesJ2K = 30;
36
37// Limits in Grok library
38#define T1_NMSEDEC_BITS 7
39#define T1_NMSEDEC_FRACBITS (T1_NMSEDEC_BITS - 1)
40const uint16_t maxCompressLayersGRK = 100;
41
42} // namespace grk
ResWindow.
Definition CompressedChunkCache.h:36
const uint16_t maxCompressLayersGRK
Definition CodeStreamLimits.h:40
const uint16_t maxNumComponentsJ2K
Definition CodeStreamLimits.h:26
const uint8_t maxTilePartsPerTileJ2K
Definition CodeStreamLimits.h:30
const uint32_t maxTilePartSizeJ2K
Definition CodeStreamLimits.h:33
const uint8_t maxPassesPerSegmentJ2K
Definition CodeStreamLimits.h:28
const uint8_t maxPrecisionJ2K
Definition CodeStreamLimits.h:27
const uint32_t maxBitPlanesJ2K
Definition CodeStreamLimits.h:35
const uint16_t maxTotalTilePartsJ2K
Definition CodeStreamLimits.h:31
const uint16_t maxNumLayersJ2K
Definition CodeStreamLimits.h:34
const uint16_t maxNumTilesJ2K
Definition CodeStreamLimits.h:29