grk::CompressScheduler Class Reference

`#include <CompressScheduler.h>`

Inheritance diagram for grk::CompressScheduler:

## Public Member Functions

| CompressScheduler (Tile *tile, bool needsRateControl, TileCodingParams *tcp, const double *mct_norms, uint16_t mct_numcomps)
| ~CompressScheduler ()=default
bool | schedule (uint16_t compno) override
Public Member Functions inherited from grk::Scheduler
| Scheduler (Tile *tile)
virtual | ~Scheduler ()
void | graph (uint16_t compno)
bool | run (void)
ImageComponentFlow * | getImageComponentFlow (uint16_t compno)
tf::Taskflow & | getCodecFlow (void)
FlowComponent * | getPrePostProc (void)

## Private Member Functions

bool | scheduleBlocks (uint16_t compno)
void | compress (std::vector< CompressBlockExec * > *blocks)
bool | compress (size_t threadId, uint64_t maxBlocks)
void | compress (T1Interface *impl, CompressBlockExec *block)

## Private Attributes

Tile * | tile
std::mutex | distortion_mutex
bool | needsRateControl
CompressBlockExec ** | encodeBlocks
std::atomic< int64_t > | blockCount
TileCodingParams * | tcp_
const double * | mct_norms_
uint16_t | mct_numcomps_

## Additional Inherited Members

Protected Attributes inherited from grk::Scheduler
std::atomic_bool | success
std::vector< T1Interface * > | t1Implementations
ImageComponentFlow ** | imageComponentFlows_
tf::Taskflow | codecFlow_
Tile * | tile_
uint16_t | numcomps_
FlowComponent * | prePostProc_

## Constructor & Destructor Documentation

## CompressScheduler()

grk::CompressScheduler::CompressScheduler | ( | Tile * | tile,
|  | bool | needsRateControl,
|  | TileCodingParams * | tcp,
|  | const double * | mct_norms,
|  | uint16_t | mct_numcomps
| ) |  |

References grk::Tile::comps, grk::grk_read(), grk::Scheduler::imageComponentFlows_, grk::Scheduler::numcomps_, and tile.

## ~CompressScheduler()

grk::CompressScheduler::~CompressScheduler | ( |  | ) |

default

## Member Function Documentation

## compress() [1/3]

bool grk::CompressScheduler::compress | ( | size_t | threadId,
|  | uint64_t | maxBlocks
| ) |  |

private

References blockCount, compress(), encodeBlocks, grk::grk_read(), and grk::Scheduler::t1Implementations.

## compress() [2/3]

void grk::CompressScheduler::compress | ( | std::vector< CompressBlockExec * > * | blocks | ) |

private

References compress(), encodeBlocks, ExecSingleton::get(), grk::grk_read(), and grk::Scheduler::t1Implementations.

Referenced by compress(), compress(), and scheduleBlocks().

## compress() [3/3]

void grk::CompressScheduler::compress | ( | T1Interface * | impl,
|  | CompressBlockExec * | block
| ) |  |

private

References grk::Tile::distortion, distortion_mutex, grk::grk_read(), needsRateControl, and tile.

## schedule()

bool grk::CompressScheduler::schedule | ( | uint16_t | compno | ) |

override virtual

Implements grk::Scheduler.

References scheduleBlocks().

## scheduleBlocks()

bool grk::CompressScheduler::scheduleBlocks | ( | uint16_t | compno | ) |

private

References compress(), grk::Tile::comps, grk::Tile::distortion, ExecSingleton::get(), grk::grk_read(), grk::T1Factory::makeT1(), mct_norms_, mct_numcomps_, needsRateControl, grk::Tile::numcomps_, grk::Scheduler::t1Implementations, grk::TileCodingParams::tccps, tcp_, tile, and grk::grk_rect< T >::x0.

Referenced by schedule().

## Member Data Documentation

## blockCount

std::atomic<int64_t> grk::CompressScheduler::blockCount

private

Referenced by compress().

## distortion_mutex

std::mutex grk::CompressScheduler::distortion_mutex

mutable private

Referenced by compress().

## encodeBlocks

CompressBlockExec** grk::CompressScheduler::encodeBlocks

private

Referenced by compress(), and compress().

## mct_norms_

const double* grk::CompressScheduler::mct_norms_

private

Referenced by scheduleBlocks().

## mct_numcomps_

uint16_t grk::CompressScheduler::mct_numcomps_

private

Referenced by scheduleBlocks().

## needsRateControl

bool grk::CompressScheduler::needsRateControl

private

Referenced by compress(), and scheduleBlocks().

## tcp_

TileCodingParams* grk::CompressScheduler::tcp_

private

Referenced by scheduleBlocks().

## tile

Tile* grk::CompressScheduler::tile

private

Referenced by compress(), CompressScheduler(), and scheduleBlocks().

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

- CompressScheduler.h
- CompressScheduler.cpp