Grok 20.3.2
Codeblock.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 <vector>
21#include <numeric>
22
23#include "buffer.h"
24#include "t1_common.h"
25#include "CodeblockImpl.h"
26
27namespace grk::t1
28{
29
30class CorruptPacketException : public std::exception
31{
32};
39
46struct Codeblock : public Rect32_16
47{
48protected:
53 explicit Codeblock(uint16_t numLayers) : numLayers_(numLayers) {}
57 ~Codeblock() = default;
58
62 uint16_t numLayers_;
63
64private:
65 explicit Codeblock(const Codeblock& rhs) = default;
66 Codeblock& operator=(const Codeblock& rhs) = default;
67};
68
69} // namespace grk::t1
Definition Codeblock.h:37
Definition Codeblock.h:31
Definition Codeblock.h:34
Definition SchedulerFreebyrd.h:36
Rect32_16(uint32_t x0, uint32_t y0, uint16_t w, uint16_t h)
Definition geometry.h:106
uint16_t numLayers_
Number of layers in code block.
Definition Codeblock.h:62
Codeblock(uint16_t numLayers)
Creates a Codeblock.
Definition Codeblock.h:53
Codeblock & operator=(const Codeblock &rhs)=default
Codeblock(const Codeblock &rhs)=default
~Codeblock()=default
Destroys a Codeblock.