Grok  9.7.5
TileComponentWindowBuffer.h
Go to the documentation of this file.
1 
17 #pragma once
18 
19 #include "grk_includes.h"
20 #include <stdexcept>
21 #include <algorithm>
22 
23 /*
24  Various coordinate systems are used to describe regions in the tile component buffer.
25 
26  1) Canvas coordinates: JPEG 2000 global image coordinates.
27 
28  2) Tile component coordinates: canvas coordinates with sub-sampling applied
29 
30  3) Band coordinates: coordinates relative to a specified sub-band's origin
31 
32  4) Buffer coordinates: coordinate system where all resolutions are translated
33  to common origin (0,0). If each code block is translated relative to the origin of the
34  resolution that **it belongs to**, the blocks are then all in buffer coordinate system
35 
36  Note: the name of any method or variable returning non canvas coordinates is appended
37  with "REL", to signify relative coordinates.
38 
39  */
40 
41 namespace grk
42 {
44 {
48 };
49 
50 template<class T>
51 constexpr T getFilterPad(bool lossless)
52 {
53  return lossless ? 1 : 2;
54 }
55 
65 template<typename T>
67 {
68  ResWindowBuffer(uint8_t numresolutions, uint8_t resno,
69  grk_buf2d<T, AllocatorAligned>* resWindowTopLevelREL, Resolution* tileCompAtRes,
70  Resolution* tileCompAtLowerRes, grk_rect32 resWindow,
71  grk_rect32 tileCompWindowUnreduced, grk_rect32 tileCompUnreduced,
72  uint32_t FILTER_WIDTH)
73  : allocated_(false), tileCompRes_(tileCompAtRes), tileCompResLower_(tileCompAtLowerRes),
75  new grk_buf2d<T, AllocatorAligned>(resWindow.width(), resWindow.height())),
76  resWindowBufferTopLevelREL_(resWindowTopLevelREL), filterWidth_(FILTER_WIDTH)
77  {
78  for(uint32_t i = 0; i < SPLIT_NUM_ORIENTATIONS; ++i)
79  resWindowBufferSplitREL_[i] = nullptr;
80 
81  resWindowPadded_ = resWindow.growIPL(2 * FILTER_WIDTH).intersection(tileCompAtRes);
82  // windowed decompression
83  if(FILTER_WIDTH)
84  {
85  uint32_t numDecomps =
86  (resno == 0) ? (uint32_t)(numresolutions - 1U) : (uint32_t)(numresolutions - resno);
87 
88  /*
89  bandWindowPadded_ is used for determining which precincts and code blocks overlap
90  the window of interest, in each respective resolution
91  */
92  for(uint8_t orient = 0; orient < ((resno) > 0 ? BAND_NUM_ORIENTATIONS : 1); orient++)
93  {
94  auto padded = getBandWindow(numDecomps, orient, tileCompWindowUnreduced,
95  tileCompUnreduced, 2 * FILTER_WIDTH);
96  bandWindowPadded_.push_back(padded);
97  }
99  {
100  assert(resno > 0);
101  for(uint8_t orient = 0; orient < BAND_NUM_ORIENTATIONS; orient++)
102  {
103  // todo: should only need padding equal to FILTER_WIDTH, not 2*FILTER_WIDTH
104  auto bandWindow = getBandWindow(numDecomps, orient, tileCompWindowUnreduced,
105  tileCompUnreduced, 2 * FILTER_WIDTH);
106  auto bandFull = orient == BAND_ORIENT_LL ? *((grk_rect32*)tileCompResLower_)
107  : tileCompRes_->tileBand[orient - 1];
108  auto bandWindowREL =
109  bandWindow.pan(-(int64_t)bandFull.x0, -(int64_t)bandFull.y0);
110  bandWindowBufferPaddedREL_.push_back(
111  new grk_buf2d<T, AllocatorAligned>(&bandWindowREL));
112  }
115  resWindowBufferREL_->x0 = (std::min<uint32_t>)(2 * winLow->x0, 2 * winHigh->x0 + 1);
116  resWindowBufferREL_->x1 = (std::max<uint32_t>)(2 * winLow->x1, 2 * winHigh->x1 + 1);
119  resWindowBufferREL_->y0 = (std::min<uint32_t>)(2 * winLow->y0, 2 * winHigh->y0 + 1);
120  resWindowBufferREL_->y1 = (std::max<uint32_t>)(2 * winLow->y1, 2 * winHigh->y1 + 1);
121 
122  // todo: shouldn't need to clip
123  auto resBounds = grk_rect32(0, 0, tileCompRes_->width(), tileCompRes_->height());
124  resWindowBufferREL_->clipIPL(&resBounds);
125 
126  // two windows formed by horizontal pass and used as input for vertical pass
127  grk_rect32 splitResWindowREL[SPLIT_NUM_ORIENTATIONS];
128 
129  splitResWindowREL[SPLIT_L] = grk_rect32(
132 
134  new grk_buf2d<T, AllocatorAligned>(&splitResWindowREL[SPLIT_L]);
135 
136  splitResWindowREL[SPLIT_H] = grk_rect32(
141 
143  new grk_buf2d<T, AllocatorAligned>(&splitResWindowREL[SPLIT_H]);
144  }
145  // compression or full tile decompression
146  }
147  else
148  {
149  // dummy LL band window
151  assert(tileCompAtRes->numTileBandWindows == 3 || !tileCompAtLowerRes);
153  {
154  for(uint32_t i = 0; i < tileCompAtRes->numTileBandWindows; ++i)
155  {
156  auto b = tileCompAtRes->tileBand + i;
157  bandWindowBufferPaddedREL_.push_back(
158  new grk_buf2d<T, AllocatorAligned>(b->width(), b->height()));
159  }
160  // note: only dimensions of split resolution window buffer matter, not actual
161  // coordinates
162  for(uint32_t i = 0; i < SPLIT_NUM_ORIENTATIONS; ++i)
164  resWindow.width(), resWindow.height() / 2);
165  }
166  }
167  }
169  {
170  delete resWindowBufferREL_;
171  for(auto& b : bandWindowBufferPaddedREL_)
172  delete b;
173  for(uint32_t i = 0; i < SPLIT_NUM_ORIENTATIONS; ++i)
174  delete resWindowBufferSplitREL_[i];
175  }
176  bool alloc(bool clear)
177  {
178  if(allocated_)
179  return true;
180 
181  // if top level window is present, then all buffers attach to this window
183  {
184  // ensure that top level window is allocated
185  if(!resWindowBufferTopLevelREL_->alloc2d(clear))
186  return false;
187 
188  // don't allocate bandWindows for windowed decompression
189  if(filterWidth_)
190  return true;
191 
192  // attach to top level window
196 
197  // tileCompResLower_ is null for lowest resolution
199  {
200  for(uint8_t orientation = 0; orientation < bandWindowBufferPaddedREL_.size();
201  ++orientation)
202  {
203  switch(orientation)
204  {
205  case BAND_ORIENT_HL:
206  bandWindowBufferPaddedREL_[orientation]->attach(
207  resWindowBufferTopLevelREL_->getBuffer() +
210  break;
211  case BAND_ORIENT_LH:
212  bandWindowBufferPaddedREL_[orientation]->attach(
213  resWindowBufferTopLevelREL_->getBuffer() +
217  break;
218  case BAND_ORIENT_HH:
219  bandWindowBufferPaddedREL_[orientation]->attach(
220  resWindowBufferTopLevelREL_->getBuffer() +
225  break;
226  default:
227  break;
228  }
229  }
233  resWindowBufferTopLevelREL_->getBuffer() +
236  }
237  }
238  else
239  {
240  // resolution window is always allocated
241  if(!resWindowBufferREL_->alloc2d(clear))
242  return false;
243 
244  // band windows are allocated if present
245  for(auto& b : bandWindowBufferPaddedREL_)
246  {
247  if(!b->alloc2d(clear))
248  return false;
249  }
251  {
253  resWindowBufferREL_->stride);
256  resWindowBufferREL_->stride,
257  resWindowBufferREL_->stride);
258  }
259  }
260  allocated_ = true;
261 
262  return true;
263  }
264 
275  static grk_rect32 getBandWindow(uint32_t numDecomps, uint8_t orientation,
276  grk_rect32 tileCompWindowUnreduced)
277  {
278  assert(orientation < BAND_NUM_ORIENTATIONS);
279  if(numDecomps == 0)
280  return tileCompWindowUnreduced;
281 
282  uint32_t tcx0 = tileCompWindowUnreduced.x0;
283  uint32_t tcy0 = tileCompWindowUnreduced.y0;
284  uint32_t tcx1 = tileCompWindowUnreduced.x1;
285  uint32_t tcy1 = tileCompWindowUnreduced.y1;
286 
287  /* project window onto sub-band generated by `numDecomps` decompositions */
288  /* See equation B-15 of the standard. */
289  uint32_t bx0 = orientation & 1;
290  uint32_t by0 = (uint32_t)(orientation >> 1U);
291 
292  uint32_t bx0Shift = (1U << (numDecomps - 1)) * bx0;
293  uint32_t by0Shift = (1U << (numDecomps - 1)) * by0;
294 
295  return grk_rect32(
296  (tcx0 <= bx0Shift) ? 0 : ceildivpow2<uint32_t>(tcx0 - bx0Shift, numDecomps),
297  (tcy0 <= by0Shift) ? 0 : ceildivpow2<uint32_t>(tcy0 - by0Shift, numDecomps),
298  (tcx1 <= bx0Shift) ? 0 : ceildivpow2<uint32_t>(tcx1 - bx0Shift, numDecomps),
299  (tcy1 <= by0Shift) ? 0 : ceildivpow2<uint32_t>(tcy1 - by0Shift, numDecomps));
300  }
308  static grk_rect32 getBandWindow(uint32_t numDecomps, uint8_t orientation,
309  grk_rect32 unreducedTileCompWindow,
310  grk_rect32 unreducedTileComp, uint32_t padding)
311  {
312  assert(orientation < BAND_NUM_ORIENTATIONS);
313  if(numDecomps == 0)
314  {
315  assert(orientation == 0);
316  return unreducedTileCompWindow.growIPL(padding).intersection(&unreducedTileComp);
317  }
318  auto oneLessDecompWindow = unreducedTileCompWindow;
319  auto oneLessDecompTile = unreducedTileComp;
320  if(numDecomps > 1)
321  {
322  oneLessDecompWindow = getBandWindow(numDecomps - 1, 0, unreducedTileCompWindow);
323  oneLessDecompTile = getBandWindow(numDecomps - 1, 0, unreducedTileComp);
324  }
325 
326  return getBandWindow(
327  1, orientation,
328  oneLessDecompWindow.growIPL(2 * padding).intersection(&oneLessDecompTile));
329  }
330 
332 
333  Resolution* tileCompRes_; // non-null will trigger creation of band window buffers
334  Resolution* tileCompResLower_; // null for lowest resolution
335 
337  std::vector<grk_buf2d<T, AllocatorAligned>*> bandWindowBufferPaddedREL_;
338  std::vector<grk_rect32> bandWindowPadded_;
339 
343 
344  uint32_t filterWidth_;
345 };
346 
347 template<typename T>
349 {
350  TileComponentWindowBuffer(bool isCompressor, bool lossless, bool wholeTileDecompress,
351  grk_rect32 tileCompUnreduced, grk_rect32 tileCompReduced,
352  grk_rect32 unreducedTileCompOrImageCompWindow,
353  Resolution* tileCompResolution, uint8_t numresolutions,
354  uint8_t reducedNumResolutions)
355  : unreducedBounds_(tileCompUnreduced), bounds_(tileCompReduced),
356  numResolutions_(numresolutions), compress_(isCompressor),
357  wholeTileDecompress_(wholeTileDecompress)
358  {
359  if(!compress_)
360  {
361  // for decompress, we are passed the unreduced image component window
362  auto unreducedImageCompWindow = unreducedTileCompOrImageCompWindow;
363  bounds_ = unreducedImageCompWindow.scaleDownCeilPow2(
364  (uint32_t)(numResolutions_ - reducedNumResolutions));
365  bounds_ = bounds_.intersection(tileCompReduced);
366  assert(bounds_.valid());
367  unreducedBounds_ = unreducedImageCompWindow.intersection(tileCompUnreduced);
368  assert(unreducedBounds_.valid());
369  }
370  // fill resolutions vector
371  assert(reducedNumResolutions > 0);
372  for(uint32_t resno = 0; resno < reducedNumResolutions; ++resno)
373  resolution_.push_back(tileCompResolution + resno);
374 
375  auto tileCompAtRes = tileCompResolution + reducedNumResolutions - 1;
376  auto tileCompAtLowerRes =
377  reducedNumResolutions > 1 ? tileCompResolution + reducedNumResolutions - 2 : nullptr;
378  // create resolution buffers
379  auto topLevel = new ResWindowBuffer<T>(
380  numresolutions, (uint8_t)(reducedNumResolutions - 1U), nullptr, tileCompAtRes,
381  tileCompAtLowerRes, bounds_, unreducedBounds_, tileCompUnreduced,
382  wholeTileDecompress ? 0 : getFilterPad<uint32_t>(lossless));
383  // setting top level prevents allocation of tileCompBandWindows buffers
384  if(!useBandWindows())
385  topLevel->resWindowBufferTopLevelREL_ = topLevel->resWindowBufferREL_;
386 
387  for(uint8_t resno = 0; resno < reducedNumResolutions - 1; ++resno)
388  {
389  // resolution window == next resolution band window at orientation 0
390  auto resWindow = ResWindowBuffer<T>::getBandWindow(
391  (uint32_t)(numresolutions - 1 - resno), 0, unreducedBounds_);
392  resWindowBuffers.push_back(new ResWindowBuffer<T>(
393  numresolutions, resno, useBandWindows() ? nullptr : topLevel->resWindowBufferREL_,
394  tileCompResolution + resno, resno > 0 ? tileCompResolution + resno - 1 : nullptr,
395  resWindow, unreducedBounds_, tileCompUnreduced,
396  wholeTileDecompress ? 0 : getFilterPad<uint32_t>(lossless)));
397  }
398  resWindowBuffers.push_back(topLevel);
399  }
401  {
402  for(auto& b : resWindowBuffers)
403  delete b;
404  }
405 
417  void toRelativeCoordinates(uint8_t resno, eBandOrientation orientation, uint32_t& offsetx,
418  uint32_t& offsety) const
419  {
420  assert(resno < resolution_.size());
421 
422  auto res = resolution_[resno];
423  auto band = res->tileBand + getBandIndex(resno, orientation);
424 
425  uint32_t x = offsetx;
426  uint32_t y = offsety;
427 
428  // get offset relative to band
429  x -= band->x0;
430  y -= band->y0;
431 
432  if(useBufferCoordinatesForCodeblock() && resno > 0)
433  {
434  auto resLower = resolution_[resno - 1U];
435 
436  if(orientation & 1)
437  x += resLower->width();
438  if(orientation & 2)
439  y += resLower->height();
440  }
441  offsetx = x;
442  offsety = y;
443  }
452  getCodeBlockDestWindowREL(uint8_t resno, eBandOrientation orientation) const
453  {
456  : getBandWindowBufferPaddedREL(resno, orientation);
457  }
468  getBandWindowBufferPaddedREL(uint8_t resno, eBandOrientation orientation) const
469  {
470  assert(resno < resolution_.size());
471  assert(resno > 0 || orientation == BAND_ORIENT_LL);
472 
473  if(resno == 0 && (compress_ || wholeTileDecompress_))
474  return resWindowBuffers[0]->resWindowBufferREL_;
475 
476  return resWindowBuffers[resno]->bandWindowBufferPaddedREL_[orientation];
477  }
478 
486  const grk_rect32* getBandWindowPadded(uint8_t resno, eBandOrientation orientation) const
487  {
488  if(resWindowBuffers[resno]->bandWindowPadded_.empty())
489  return nullptr;
490  return &resWindowBuffers[resno]->bandWindowPadded_[orientation];
491  }
492 
493  const grk_rect32* getResWindowPadded(uint8_t resno) const
494  {
495  return &resWindowBuffers[resno]->resWindowPadded_;
496  }
497  /*
498  * Get intermediate split window
499  *
500  * @param orientation 0 for upper split window, and 1 for lower split window
501  */
503  getResWindowBufferSplitREL(uint8_t resno, eSplitOrientation orientation) const
504  {
505  assert(resno > 0 && resno < resolution_.size());
506 
507  return resWindowBuffers[resno]->resWindowBufferSplitREL_[orientation];
508  }
516  {
517  return resWindowBuffers[resno]->resWindowBufferREL_;
518  }
525  {
526  return resWindowBuffers.back()->resWindowBufferREL_;
527  }
528  bool alloc()
529  {
530  for(auto& b : resWindowBuffers)
531  {
532  if(!b->alloc(!compress_))
533  return false;
534  }
535 
536  return true;
537  }
544  {
545  return bounds_;
546  }
548  {
549  return unreducedBounds_;
550  }
551  uint64_t stridedArea(void) const
552  {
553  return getResWindowBufferHighestREL()->stride * bounds_.height();
554  }
555 
556  // set data to buf without owning it
557  void attach(T* buffer, uint32_t stride)
558  {
559  getResWindowBufferHighestREL()->attach(buffer, stride);
560  }
561  // transfer data to buf, and cease owning it
562  void transfer(T** buffer, uint32_t* stride)
563  {
564  getResWindowBufferHighestREL()->transfer(buffer, stride);
565  }
566 
567  private:
568  bool useBandWindows() const
569  {
570  return !wholeTileDecompress_;
571  }
573  {
574  return compress_ || !wholeTileDecompress_;
575  }
576  uint8_t getBandIndex(uint8_t resno, eBandOrientation orientation) const
577  {
578  uint8_t index = 0;
579  if(resno > 0)
580  {
581  index = (uint8_t)orientation;
582  index--;
583  }
584  return index;
585  }
586  /******************************************************/
587  // decompress: unreduced/reduced image component window
588  // compress: unreduced/reduced tile component
591  /******************************************************/
592 
593  std::vector<Resolution*> resolution_;
594  // windowed bounds for windowed decompress, otherwise full bounds
595  std::vector<ResWindowBuffer<T>*> resWindowBuffers;
596 
597  // unreduced number of resolutions
599 
600  bool compress_;
602 };
603 
604 } // namespace grk
Copyright (C) 2016-2022 Grok Image Compression Inc.
Definition: ICacheable.h:20
eSplitOrientation
Definition: TileComponentWindowBuffer.h:44
@ SPLIT_H
Definition: TileComponentWindowBuffer.h:46
@ SPLIT_L
Definition: TileComponentWindowBuffer.h:45
@ SPLIT_NUM_ORIENTATIONS
Definition: TileComponentWindowBuffer.h:47
constexpr T getFilterPad(bool lossless)
Definition: TileComponentWindowBuffer.h:51
grk_rect< uint32_t > grk_rect32
Definition: util.h:57
eBandOrientation
Definition: Subband.h:25
@ BAND_ORIENT_HH
Definition: Subband.h:29
@ BAND_ORIENT_HL
Definition: Subband.h:27
@ BAND_NUM_ORIENTATIONS
Definition: Subband.h:30
@ BAND_ORIENT_LH
Definition: Subband.h:28
@ BAND_ORIENT_LL
Definition: Subband.h:26
Definition: MemManager.h:79
Class: ResWindowBuffer.
Definition: TileComponentWindowBuffer.h:67
bool allocated_
Definition: TileComponentWindowBuffer.h:331
~ResWindowBuffer()
Definition: TileComponentWindowBuffer.h:168
grk_buf2d< T, AllocatorAligned > * resWindowBufferREL_
Definition: TileComponentWindowBuffer.h:341
std::vector< grk_rect32 > bandWindowPadded_
Definition: TileComponentWindowBuffer.h:338
uint32_t filterWidth_
Definition: TileComponentWindowBuffer.h:344
Resolution * tileCompResLower_
Definition: TileComponentWindowBuffer.h:334
grk_buf2d< T, AllocatorAligned > * resWindowBufferSplitREL_[SPLIT_NUM_ORIENTATIONS]
Definition: TileComponentWindowBuffer.h:340
static grk_rect32 getBandWindow(uint32_t numDecomps, uint8_t orientation, grk_rect32 tileCompWindowUnreduced)
Get band window (in tile component coordinates) for specified number of decompositions.
Definition: TileComponentWindowBuffer.h:275
bool alloc(bool clear)
Definition: TileComponentWindowBuffer.h:176
grk_rect32 resWindowPadded_
Definition: TileComponentWindowBuffer.h:336
ResWindowBuffer(uint8_t numresolutions, uint8_t resno, grk_buf2d< T, AllocatorAligned > *resWindowTopLevelREL, Resolution *tileCompAtRes, Resolution *tileCompAtLowerRes, grk_rect32 resWindow, grk_rect32 tileCompWindowUnreduced, grk_rect32 tileCompUnreduced, uint32_t FILTER_WIDTH)
Definition: TileComponentWindowBuffer.h:68
std::vector< grk_buf2d< T, AllocatorAligned > * > bandWindowBufferPaddedREL_
Definition: TileComponentWindowBuffer.h:337
grk_buf2d< T, AllocatorAligned > * resWindowBufferTopLevelREL_
Definition: TileComponentWindowBuffer.h:342
static grk_rect32 getBandWindow(uint32_t numDecomps, uint8_t orientation, grk_rect32 unreducedTileCompWindow, grk_rect32 unreducedTileComp, uint32_t padding)
Get band window (in tile component coordinates) for specified number of decompositions (with padding)
Definition: TileComponentWindowBuffer.h:308
Resolution * tileCompRes_
Definition: TileComponentWindowBuffer.h:333
Definition: Resolution.h:24
uint32_t numTileBandWindows
Definition: Resolution.h:85
Subband tileBand[BAND_NUM_INDICES]
Definition: Resolution.h:84
Definition: TileComponentWindowBuffer.h:349
bool compress_
Definition: TileComponentWindowBuffer.h:600
const grk_buf2d< T, AllocatorAligned > * getResWindowBufferREL(uint32_t resno) const
Get resolution window.
Definition: TileComponentWindowBuffer.h:515
bool useBandWindows() const
Definition: TileComponentWindowBuffer.h:568
std::vector< ResWindowBuffer< T > * > resWindowBuffers
Definition: TileComponentWindowBuffer.h:595
const grk_rect32 * getBandWindowPadded(uint8_t resno, eBandOrientation orientation) const
Get padded band window.
Definition: TileComponentWindowBuffer.h:486
~TileComponentWindowBuffer()
Definition: TileComponentWindowBuffer.h:400
grk_rect32 unreducedBounds() const
Definition: TileComponentWindowBuffer.h:547
bool useBufferCoordinatesForCodeblock() const
Definition: TileComponentWindowBuffer.h:572
grk_rect32 bounds() const
Get bounds of tile component (canvas coordinates) decompress: reduced canvas coordinates of window co...
Definition: TileComponentWindowBuffer.h:543
void toRelativeCoordinates(uint8_t resno, eBandOrientation orientation, uint32_t &offsetx, uint32_t &offsety) const
Transform code block offsets from canvas coordinates to either band coordinates (relative to sub band...
Definition: TileComponentWindowBuffer.h:417
TileComponentWindowBuffer(bool isCompressor, bool lossless, bool wholeTileDecompress, grk_rect32 tileCompUnreduced, grk_rect32 tileCompReduced, grk_rect32 unreducedTileCompOrImageCompWindow, Resolution *tileCompResolution, uint8_t numresolutions, uint8_t reducedNumResolutions)
Definition: TileComponentWindowBuffer.h:350
uint8_t getBandIndex(uint8_t resno, eBandOrientation orientation) const
Definition: TileComponentWindowBuffer.h:576
grk_rect32 bounds_
Definition: TileComponentWindowBuffer.h:590
const grk_buf2d< T, AllocatorAligned > * getCodeBlockDestWindowREL(uint8_t resno, eBandOrientation orientation) const
Get code block destination window.
Definition: TileComponentWindowBuffer.h:452
grk_buf2d< T, AllocatorAligned > * getResWindowBufferHighestREL(void) const
Get highest resolution window.
Definition: TileComponentWindowBuffer.h:524
uint8_t numResolutions_
Definition: TileComponentWindowBuffer.h:598
const grk_rect32 * getResWindowPadded(uint8_t resno) const
Definition: TileComponentWindowBuffer.h:493
bool wholeTileDecompress_
Definition: TileComponentWindowBuffer.h:601
std::vector< Resolution * > resolution_
Definition: TileComponentWindowBuffer.h:593
void transfer(T **buffer, uint32_t *stride)
Definition: TileComponentWindowBuffer.h:562
grk_rect32 unreducedBounds_
Definition: TileComponentWindowBuffer.h:589
const grk_buf2d< T, AllocatorAligned > * getBandWindowBufferPaddedREL(uint8_t resno, eBandOrientation orientation) const
Get padded band window buffer.
Definition: TileComponentWindowBuffer.h:468
bool alloc()
Definition: TileComponentWindowBuffer.h:528
void attach(T *buffer, uint32_t stride)
Definition: TileComponentWindowBuffer.h:557
const grk_buf2d< T, AllocatorAligned > * getResWindowBufferSplitREL(uint8_t resno, eSplitOrientation orientation) const
Definition: TileComponentWindowBuffer.h:503
uint64_t stridedArea(void) const
Definition: TileComponentWindowBuffer.h:551
Definition: MemManager.h:278
T width() const
Definition: util.h:246
T y1
Definition: util.h:109
T x0
Definition: util.h:109
T x1
Definition: util.h:109
T height() const
Definition: util.h:250
bool valid(void) const
Definition: util.h:121
grk_rect< T > scaleDownCeilPow2(uint32_t power) const
Definition: util.h:190
grk_rect< T > pan(int64_t x, int64_t y) const
Definition: util.h:262
grk_rect< T > intersection(const grk_rect< T > rhs) const
Definition: util.h:200
grk_rect< T > & growIPL(T boundary)
Definition: util.h:268
T y0
Definition: util.h:109