T1OJPH.h
Go to the documentation of this file.
/*
* Copyright (C) 2016-2023 Grok Image Compression Inc.
*
* This source code is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License, version 3,
* as published by the Free Software Foundation.
*
* This source code is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once
#include "T1Interface.h"
#include "TileProcessor.h"
namespace ojph
{
class mem_fixed_allocator;
class mem_elastic_allocator;
struct TileCodingParams;
class T1OJPH : public grk::T1Interface
{
public:
T1OJPH(bool isCompressor, grk::TileCodingParams* tcp, uint32_t maxCblkW, uint32_t maxCblkH);
virtual ~T1OJPH();
bool compress(grk::CompressBlockExec* block);
bool decompress(grk::DecompressBlockExec* block);
private:
void preCompress(grk::CompressBlockExec* block, grk::Tile* tile);
bool postProcess(grk::DecompressBlockExec* block);
uint32_t coded_data_size;
uint8_t* coded_data;
uint32_t unencoded_data_size;
int32_t* unencoded_data;
mem_fixed_allocator* allocator;
mem_elastic_allocator* elastic_alloc;
};
} // namespace ojph
T1Interface.h
TileProcessor.h
grk::T1Interface
Definition T1Interface.h:26
ojph::T1OJPH
Definition T1OJPH.h:30
ojph::T1OJPH::elastic_alloc
mem_elastic_allocator * elastic_alloc
Definition T1OJPH.h:48
ojph::T1OJPH::allocator
mem_fixed_allocator * allocator
Definition T1OJPH.h:47
ojph::T1OJPH::compress
bool compress(grk::CompressBlockExec *block)
Definition T1OJPH.cpp:95
ojph::T1OJPH::unencoded_data
int32_t * unencoded_data
Definition T1OJPH.h:45
ojph::T1OJPH::preCompress
void preCompress(grk::CompressBlockExec *block, grk::Tile *tile)
Definition T1OJPH.cpp:47
ojph::T1OJPH::decompress
bool decompress(grk::DecompressBlockExec *block)
Definition T1OJPH.cpp:120
ojph::T1OJPH::coded_data_size
uint32_t coded_data_size
Definition T1OJPH.h:42
ojph::T1OJPH::unencoded_data_size
uint32_t unencoded_data_size
Definition T1OJPH.h:44
ojph::T1OJPH::postProcess
bool postProcess(grk::DecompressBlockExec *block)
ojph::T1OJPH::coded_data
uint8_t * coded_data
Definition T1OJPH.h:43
ojph::T1OJPH::~T1OJPH
virtual ~T1OJPH()
Definition T1OJPH.cpp:40
ojph::mem_elastic_allocator
Definition ojph_mem.h:178
ojph::mem_fixed_allocator
Definition ojph_mem.h:53
ojph
Definition ojph_block_common.cpp:48
grk::CompressBlockExec
Definition BlockExec.h:57
grk::DecompressBlockExec
Definition BlockExec.h:45
grk::TileCodingParams
Tile coding parameters : this structure is used to store coding/decoding parameters common to all til...
Definition CodingParams.h:122
grk::Tile
Definition TileProcessor.h:39