PLCache.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 <vector>
#include <map>
//#define ENABLE_PACKET_CACHE
namespace grk
{
class PLCache
{
public:
PLCache(CodingParams* cp);
virtual ~PLCache();
PLMarkerMgr* createMarkers(BufferedStream* strm);
PLMarkerMgr* getMarkers(void);
void deleteMarkers(void);
bool next(PacketInfo** p);
void rewind(void);
private:
PLMarkerMgr* pltMarkers;
#ifdef ENABLE_PACKET_CACHE
SequentialPtrCache<PacketInfo> packetInfoCache;
#endif
CodingParams* cp_;
};
} // namespace grk
grk::PLCache
Definition PLCache.h:26
grk::PLCache::deleteMarkers
void deleteMarkers(void)
Definition PLCache.cpp:40
grk::PLCache::~PLCache
virtual ~PLCache()
Definition PLCache.cpp:22
grk::PLCache::next
bool next(PacketInfo **p)
Definition PLCache.cpp:46
grk::PLCache::createMarkers
PLMarkerMgr * createMarkers(BufferedStream *strm)
Definition PLCache.cpp:27
grk::PLCache::rewind
void rewind(void)
Definition PLCache.cpp:76
grk::PLCache::pltMarkers
PLMarkerMgr * pltMarkers
Definition PLCache.h:37
grk::PLCache::cp_
CodingParams * cp_
Definition PLCache.h:41
grk::PLCache::getMarkers
PLMarkerMgr * getMarkers(void)
Definition PLCache.cpp:35
grk::SequentialPtrCache
Definition SequentialCache.h:27
grk
Copyright (C) 2016-2023 Grok Image Compression Inc.
Definition ICacheable.h:20
grk::grk_read
void grk_read(const uint8_t *buffer, TYPE *value, uint32_t numBytes)
Definition BufferedStream.h:239
grk::BufferedStream
Definition BufferedStream.h:35
grk::CodingParams
Coding parameters.
Definition CodingParams.h:245
grk::PLMarkerMgr
Definition PLMarkerMgr.h:30
grk::PacketInfo
Definition LengthCache.h:150