Grok 20.3.2
grk::StripPartitioner Class Reference

Computes strip geometry for cascade DWT at a given resolution. More...

#include <StripPartitioner.h>

Static Public Member Functions

static std::vector< StripGeometrypartition (uint32_t resHeight, uint32_t sn, uint32_t dn, uint32_t parity, uint32_t stripeInterleaved=64, uint32_t halo=4)
 Compute strip geometries for a resolution level.
static void findOverlappingBlocks (uint32_t bandY0, const SubbandRange &range, const std::vector< uint32_t > &blockY0s, const std::vector< uint32_t > &blockHeights, std::vector< uint32_t > &blockIndices)
 Find code blocks (by sub-band-relative y range) that overlap a sub-band range.

Detailed Description

Computes strip geometry for cascade DWT at a given resolution.

Given the resolution height, number of L/H sub-band rows, parity, and strip height, produces StripGeometry for each strip. This drives which code blocks need to be decoded for each strip.

Member Function Documentation

◆ findOverlappingBlocks()

void grk::StripPartitioner::findOverlappingBlocks ( uint32_t bandY0,
const SubbandRange & range,
const std::vector< uint32_t > & blockY0s,
const std::vector< uint32_t > & blockHeights,
std::vector< uint32_t > & blockIndices )
inlinestatic

Find code blocks (by sub-band-relative y range) that overlap a sub-band range.

Parameters
bandY0Band origin in canvas coordinates
rangeSub-band row range needed by the strip
blockY0sSorted list of code block y-starts (canvas coords)
blockHeightsCorresponding heights of each code block
[out]blockIndicesIndices of overlapping blocks

References grk::SubbandRange::hi, and grk::SubbandRange::lo.

◆ partition()

std::vector< StripGeometry > grk::StripPartitioner::partition ( uint32_t resHeight,
uint32_t sn,
uint32_t dn,
uint32_t parity,
uint32_t stripeInterleaved = 64,
uint32_t halo = 4 )
inlinestatic

Compute strip geometries for a resolution level.

Parameters
resHeightTotal interleaved height of the resolution
snNumber of L (low-pass) sub-band rows
dnNumber of H (high-pass) sub-band rows
parityV-DWT parity (0 = even rows are L, 1 = even rows are H)
stripeInterleavedStrip height in interleaved rows (default 64)
haloSub-band halo rows on each side (default 4 for 9/7)
Returns
Vector of StripGeometry, one per strip

References grk::StripGeometry::extFirst, grk::StripGeometry::extLast, grk::SubbandRange::hi, grk::SubbandRange::lo, grk::StripGeometry::localParity, grk::StripGeometry::outCount, grk::StripGeometry::outputStartInStripe, grk::StripGeometry::outStart, grk::StripGeometry::rangeH, and grk::StripGeometry::rangeL.


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