grk::StripCache Class Reference

`#include <StripCache.h>`

## Public Member Functions

| StripCache (void)
virtual | ~StripCache ()
void | init (uint32_t concurrency, uint16_t numTiles_, uint32_t numStrips, uint32_t nominalStripHeight, uint8_t reduce, GrkImage *outputImg, grk_io_pixels_callback ioBufferCallback, void *ioUserData, grk_io_register_reclaim_callback grkRegisterReclaimCallback)
bool | ingestTile (uint32_t threadId, GrkImage *src)
bool | ingestTile (GrkImage *src)
bool | ingestStrip (uint32_t threadId, Tile *src, uint32_t yBegin, uint32_t yEnd)
void | returnBufferToPool (uint32_t threadId, GrkIOBuf b)
bool | isInitialized (void)
bool | isMultiTile (void)

## Private Member Functions

bool | serialize (uint32_t threadId, GrkIOBuf buf)

## Private Attributes

std::vector< BufPool * > | pools_
Strip ** | strips
uint16_t | numTiles_
uint32_t | numStrips_
uint32_t | nominalStripHeight_
uint32_t | imageY0_
uint64_t | packedRowBytes_
void * | ioUserData_
grk_io_pixels_callback | ioBufferCallback_
std::mutex | serializeMutex_
MinHeap< GrkIOBuf, uint32_t, MinHeapFakeLocker > | serializeHeap
std::mutex | heapMutex_
bool | initialized_
bool | multiTile_

## Constructor & Destructor Documentation

## StripCache()

grk::StripCache::StripCache | ( | void |  | ) |

## ~StripCache()

grk::StripCache::~StripCache | ( |  | ) |

virtual

References grk::grk_read(), numStrips_, pools_, and strips.

## Member Function Documentation

## ingestStrip()

bool grk::StripCache::ingestStrip | ( | uint32_t | threadId,
|  | Tile * | src,
|  | uint32_t | yBegin,
|  | uint32_t | yEnd
| ) |  |

References grk::grk_read(), initialized_, nominalStripHeight_, numStrips_, packedRowBytes_, pools_, serialize(), grk::Strip::stripImg, and strips.

## ingestTile() [1/2]

bool grk::StripCache::ingestTile | ( | GrkImage * | src | ) |

References grk::grk_read(), and ingestTile().

## ingestTile() [2/2]

bool grk::StripCache::ingestTile | ( | uint32_t | threadId,
|  | GrkImage * | src
| ) |  |

References _grk_image::comps, grk::grk_read(), grokNewIO, _grk_image_comp::h, imageY0_, initialized_, ioBufferCallback_, ioUserData_, nominalStripHeight_, numStrips_, numTiles_, packedRowBytes_, pools_, serialize(), grk::Strip::stripImg, and strips.

Referenced by grk::CodeStreamDecompress::decompressTiles(), and ingestTile().

## init()

void grk::StripCache::init | ( | uint32_t | concurrency,
|  | uint16_t | numTiles_,
|  | uint32_t | numStrips,
|  | uint32_t | nominalStripHeight,
|  | uint8_t | reduce,
|  | GrkImage * | outputImg,
|  | grk_io_pixels_callback | ioBufferCallback,
|  | void * | ioUserData,
|  | grk_io_register_reclaim_callback | grkRegisterReclaimCallback
| ) |  |

References grk::grk_read(), grk::grkReclaimCallback(), imageY0_, initialized_, ioBufferCallback_, ioUserData_, _grk_io_init::maxPooledRequests_, multiTile_, nominalStripHeight_, numStrips_, numTiles_, packedRowBytes_, pools_, and strips.

Referenced by grk::CodeStreamDecompress::decompressTile(), and grk::CodeStreamDecompress::decompressTiles().

## isInitialized()

bool grk::StripCache::isInitialized | ( | void |  | ) |

References initialized_.

## isMultiTile()

bool grk::StripCache::isMultiTile | ( | void |  | ) |

References multiTile_.

## returnBufferToPool()

void grk::StripCache::returnBufferToPool | ( | uint32_t | threadId,
|  | GrkIOBuf | b
| ) |  |

References grk::grk_read(), and pools_.

## serialize()

bool grk::StripCache::serialize | ( | uint32_t | threadId,
|  | GrkIOBuf | buf
| ) |  |

private

References _grk_io_buf::data_, grk::grk_read(), grokNewIO, heapMutex_, ioBufferCallback_, ioUserData_, serializeHeap, and serializeMutex_.

Referenced by ingestStrip(), and ingestTile().

## Member Data Documentation

## heapMutex_

std::mutex grk::StripCache::heapMutex_

mutable private

Referenced by serialize().

## imageY0_

uint32_t grk::StripCache::imageY0_

private

Referenced by ingestTile(), and init().

## initialized_

bool grk::StripCache::initialized_

private

Referenced by ingestStrip(), ingestTile(), init(), and isInitialized().

## ioBufferCallback_

grk_io_pixels_callback grk::StripCache::ioBufferCallback_

private

Referenced by ingestTile(), init(), and serialize().

## ioUserData_

void* grk::StripCache::ioUserData_

private

Referenced by ingestTile(), init(), and serialize().

## multiTile_

bool grk::StripCache::multiTile_

private

Referenced by init(), and isMultiTile().

## nominalStripHeight_

uint32_t grk::StripCache::nominalStripHeight_

private

Referenced by ingestStrip(), ingestTile(), and init().

## numStrips_

uint32_t grk::StripCache::numStrips_

private

Referenced by ingestStrip(), ingestTile(), init(), and ~StripCache().

## numTiles_

uint16_t grk::StripCache::numTiles_

private

Referenced by ingestTile(), and init().

## packedRowBytes_

uint64_t grk::StripCache::packedRowBytes_

private

Referenced by ingestStrip(), ingestTile(), and init().

## pools_

std::vector<BufPool*> grk::StripCache::pools_

private

Referenced by ingestStrip(), ingestTile(), init(), returnBufferToPool(), and ~StripCache().

## serializeHeap

MinHeap<GrkIOBuf, uint32_t, MinHeapFakeLocker> grk::StripCache::serializeHeap

private

Referenced by serialize().

## serializeMutex_

std::mutex grk::StripCache::serializeMutex_

mutable private

Referenced by serialize().

## strips

Strip** grk::StripCache::strips

private

Referenced by ingestStrip(), ingestTile(), init(), and ~StripCache().

The documentation for this class was generated from the following files:

- StripCache.h
- StripCache.cpp