Grok 20.3.2
WaveletFwd.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 <memory>
22#include <vector>
23#include <utility>
24#include "TileComponent.h"
25#include "WaveletReverse.h"
26
27class FlowComponent;
28
29namespace grk
30{
31
32// Opaque handle owning scratch buffers for scheduled DWT.
33// Must be kept alive until after DAG execution completes.
35{
36 virtual ~WaveletFwdScheduleData() = default;
37};
38
40{
41public:
42 virtual ~WaveletFwdImpl() = default;
43 bool compress(TileComponent* tile_comp, uint8_t qmfbid, DcShiftParam dcShift = {},
44 bool intInput = false);
45 // Schedule forward DWT into FlowComponent pairs (vert, horiz) per level.
46 // Returns an opaque handle owning scratch buffers; caller must keep it alive
47 // until DAG execution completes.
48 // intInput: when true, first-level 9/7 reads int32_t from tile buffer and converts to float.
49 // Set to true for non-MCT irreversible components (MCT already converts to float).
50 std::unique_ptr<WaveletFwdScheduleData>
51 scheduleCompress(TileComponent* tile_comp, uint8_t qmfbid, DcShiftParam dcShift,
52 std::vector<std::pair<FlowComponent*, FlowComponent*>>& levelFlows,
53 bool intInput = false);
54};
55
56} // namespace grk
A collection of tasks which can be scheduled as a single task.
Definition FlowComponent.h:28
Definition WaveletFwd.h:40
bool compress(TileComponent *tile_comp, uint8_t qmfbid, DcShiftParam dcShift={}, bool intInput=false)
virtual ~WaveletFwdImpl()=default
std::unique_ptr< WaveletFwdScheduleData > scheduleCompress(TileComponent *tile_comp, uint8_t qmfbid, DcShiftParam dcShift, std::vector< std::pair< FlowComponent *, FlowComponent * > > &levelFlows, bool intInput=false)
ResWindow.
Definition CompressedChunkCache.h:36
Definition WaveletReverse.h:106
Stores sub-sampled, unreduced tile component dimensions, along with reduction information.
Definition TileComponent.h:37
Definition WaveletFwd.h:35
virtual ~WaveletFwdScheduleData()=default