Grok  9.5.0
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 
58 template<typename T>
60 {
61  ResWindowBuffer(uint8_t numresolutions, uint8_t resno,
62  grkBuffer2d<T, AllocatorAligned>* resWindowTopLevelREL,
63  Resolution* tileCompAtRes, Resolution* tileCompAtLowerRes,
64  grkRectU32 tileCompWindow, grkRectU32 tileCompWindowUnreduced,
65  grkRectU32 tileCompUnreduced, uint32_t FILTER_WIDTH)
66  : m_allocated(false), m_tileCompRes(tileCompAtRes), m_tileCompResLower(tileCompAtLowerRes),
67  m_resWindowBufferREL(new grkBuffer2d<T, AllocatorAligned>(tileCompWindow.width(),
68  tileCompWindow.height())),
69  m_resWindowBufferTopLevelREL(resWindowTopLevelREL), m_filterWidth(FILTER_WIDTH)
70  {
71  for(uint32_t i = 0; i < SPLIT_NUM_ORIENTATIONS; ++i)
72  m_resWindowBufferSplitREL[i] = nullptr;
73  // windowed decompression
74  if(FILTER_WIDTH)
75  {
76  uint32_t numDecomps =
77  (resno == 0) ? (uint32_t)(numresolutions - 1U) : (uint32_t)(numresolutions - resno);
78 
79  /*
80  m_bandWindowPadded is used for determining which precincts and code blocks overlap
81  the window of interest, in each respective resolution
82  */
83  for(uint8_t orient = 0; orient < ((resno) > 0 ? BAND_NUM_ORIENTATIONS : 1); orient++)
84  {
85  m_bandWindowPadded.push_back(getBandWindow(numDecomps, orient,
86  tileCompWindowUnreduced,
87  tileCompUnreduced, 2 * FILTER_WIDTH));
88  }
89 
91  {
92  assert(resno > 0);
93  for(uint8_t orient = 0; orient < BAND_NUM_ORIENTATIONS; orient++)
94  {
95  // todo: should only need padding equal to FILTER_WIDTH, not 2*FILTER_WIDTH
96  auto bandWindow = getBandWindow(numDecomps, orient, tileCompWindowUnreduced,
97  tileCompUnreduced, 2 * FILTER_WIDTH);
98  auto bandFull = orient == BAND_ORIENT_LL ? *((grkRectU32*)m_tileCompResLower)
99  : m_tileCompRes->tileBand[orient - 1];
100  auto bandWindowREL =
101  bandWindow.pan(-(int64_t)bandFull.x0, -(int64_t)bandFull.y0);
102  m_bandWindowBufferPaddedREL.push_back(
103  new grkBuffer2d<T, AllocatorAligned>(&bandWindowREL));
104  }
108  (std::min<uint32_t>)(2 * winLow->x0, 2 * winHigh->x0 + 1);
110  (std::max<uint32_t>)(2 * winLow->x1, 2 * winHigh->x1 + 1);
114  (std::min<uint32_t>)(2 * winLow->y0, 2 * winHigh->y0 + 1);
116  (std::max<uint32_t>)(2 * winLow->y1, 2 * winHigh->y1 + 1);
117 
118  // todo: shouldn't need to clip
119  auto resBounds = grkRectU32(0, 0, m_tileCompRes->width(), m_tileCompRes->height());
120  m_resWindowBufferREL->clip(&resBounds);
121 
122  // two windows formed by horizontal pass and used as input for vertical pass
123  grkRectU32 splitResWindowREL[SPLIT_NUM_ORIENTATIONS];
124 
125  splitResWindowREL[SPLIT_L] = grkRectU32(
128 
130  new grkBuffer2d<T, AllocatorAligned>(&splitResWindowREL[SPLIT_L]);
131 
132  splitResWindowREL[SPLIT_H] = grkRectU32(
137 
139  new grkBuffer2d<T, AllocatorAligned>(&splitResWindowREL[SPLIT_H]);
140  }
141  // compression or full tile decompression
142  }
143  else
144  {
145  // dummy LL band window
147  assert(tileCompAtRes->numTileBandWindows == 3 || !tileCompAtLowerRes);
149  {
150  for(uint32_t i = 0; i < tileCompAtRes->numTileBandWindows; ++i)
151  {
152  auto b = tileCompAtRes->tileBand + i;
153  m_bandWindowBufferPaddedREL.push_back(
154  new grkBuffer2d<T, AllocatorAligned>(b->width(), b->height()));
155  }
156  // note: only dimensions of split resolution window buffer matter, not actual
157  // coordinates
158  for(uint32_t i = 0; i < SPLIT_NUM_ORIENTATIONS; ++i)
160  tileCompWindow.width(), tileCompWindow.height() / 2);
161  }
162  }
163  }
165  {
166  delete m_resWindowBufferREL;
167  for(auto& b : m_bandWindowBufferPaddedREL)
168  delete b;
169  for(uint32_t i = 0; i < SPLIT_NUM_ORIENTATIONS; ++i)
170  delete m_resWindowBufferSplitREL[i];
171  }
172  bool alloc(bool clear)
173  {
174  if(m_allocated)
175  return true;
176 
177  // if top level window is present, then all buffers attach to this window
179  {
180  // ensure that top level window is allocated
181  if(!m_resWindowBufferTopLevelREL->alloc2d(clear))
182  return false;
183 
184  // don't allocate bandWindows for windowed decompression
185  if(m_filterWidth)
186  return true;
187 
188  // attach to top level window
192 
193  // m_tileCompResLower is null for lowest resolution
195  {
196  for(uint8_t orientation = 0; orientation < m_bandWindowBufferPaddedREL.size();
197  ++orientation)
198  {
199  switch(orientation)
200  {
201  case BAND_ORIENT_HL:
202  m_bandWindowBufferPaddedREL[orientation]->attach(
203  m_resWindowBufferTopLevelREL->getBuffer() +
206  break;
207  case BAND_ORIENT_LH:
208  m_bandWindowBufferPaddedREL[orientation]->attach(
209  m_resWindowBufferTopLevelREL->getBuffer() +
213  break;
214  case BAND_ORIENT_HH:
215  m_bandWindowBufferPaddedREL[orientation]->attach(
216  m_resWindowBufferTopLevelREL->getBuffer() +
221  break;
222  default:
223  break;
224  }
225  }
227  m_resWindowBufferTopLevelREL->getBuffer(),
230  m_resWindowBufferTopLevelREL->getBuffer() +
233  }
234  }
235  else
236  {
237  // resolution window is always allocated
238  if(!m_resWindowBufferREL->alloc2d(clear))
239  return false;
240 
241  // band windows are allocated if present
242  for(auto& b : m_bandWindowBufferPaddedREL)
243  {
244  if(!b->alloc2d(clear))
245  return false;
246  }
248  {
250  m_resWindowBufferREL->stride);
253  m_resWindowBufferREL->stride,
254  m_resWindowBufferREL->stride);
255  }
256  }
257  m_allocated = true;
258 
259  return true;
260  }
261 
272  static grkRectU32 getBandWindow(uint32_t numDecomps, uint8_t orientation,
273  grkRectU32 tileCompWindowUnreduced)
274  {
275  assert(orientation < BAND_NUM_ORIENTATIONS);
276  if(numDecomps == 0)
277  return tileCompWindowUnreduced;
278 
279  uint32_t tcx0 = tileCompWindowUnreduced.x0;
280  uint32_t tcy0 = tileCompWindowUnreduced.y0;
281  uint32_t tcx1 = tileCompWindowUnreduced.x1;
282  uint32_t tcy1 = tileCompWindowUnreduced.y1;
283 
284  /* Map above tile-based coordinates to
285  * sub-band-based coordinates, i.e. origin is at tile origin */
286  /* See equation B-15 of the standard. */
287  uint32_t bx0 = orientation & 1;
288  uint32_t by0 = (uint32_t)(orientation >> 1U);
289 
290  uint32_t bx0Shift = (1U << (numDecomps - 1)) * bx0;
291  uint32_t by0Shift = (1U << (numDecomps - 1)) * by0;
292 
293  return grkRectU32(
294  (tcx0 <= bx0Shift) ? 0 : ceildivpow2<uint32_t>(tcx0 - bx0Shift, numDecomps),
295  (tcy0 <= by0Shift) ? 0 : ceildivpow2<uint32_t>(tcy0 - by0Shift, numDecomps),
296  (tcx1 <= bx0Shift) ? 0 : ceildivpow2<uint32_t>(tcx1 - bx0Shift, numDecomps),
297  (tcy1 <= by0Shift) ? 0 : ceildivpow2<uint32_t>(tcy1 - by0Shift, numDecomps));
298  }
306  static grkRectU32 getBandWindow(uint32_t numDecomps, uint8_t orientation,
307  grkRectU32 unreducedTileCompWindow,
308  grkRectU32 unreducedTileComp, uint32_t padding)
309  {
310  assert(orientation < BAND_NUM_ORIENTATIONS);
311  if(numDecomps == 0)
312  {
313  assert(orientation == 0);
314  return unreducedTileCompWindow.grow(padding).intersection(&unreducedTileComp);
315  }
316  auto oneLessDecompWindow = unreducedTileCompWindow;
317  auto oneLessDecompTile = unreducedTileComp;
318  if(numDecomps > 1)
319  {
320  oneLessDecompWindow = getBandWindow(numDecomps - 1, 0, unreducedTileCompWindow);
321  oneLessDecompTile = getBandWindow(numDecomps - 1, 0, unreducedTileComp);
322  }
323 
324  return getBandWindow(
325  1, orientation, oneLessDecompWindow.grow(2 * padding).intersection(&oneLessDecompTile));
326  }
327 
329 
330  Resolution* m_tileCompRes; // non-null will trigger creation of band window buffers
331  Resolution* m_tileCompResLower; // null for lowest resolution
332 
333  std::vector<grkBuffer2d<T, AllocatorAligned>*> m_bandWindowBufferPaddedREL;
334  std::vector<grkRectU32> m_bandWindowPadded;
335 
339 
340  uint32_t m_filterWidth;
341 };
342 
343 template<typename T>
345 {
346  TileComponentWindowBuffer(bool isCompressor, bool lossless, bool wholeTileDecompress,
347  grkRectU32 tileCompUnreduced, grkRectU32 tileCompReduced,
348  grkRectU32 unreducedTileCompOrImageCompWindow,
349  Resolution* tileCompResolution, uint8_t numresolutions,
350  uint8_t reducedNumResolutions)
351  : m_unreducedBounds(tileCompUnreduced), m_bounds(tileCompReduced),
352  m_numResolutions(numresolutions), m_compress(isCompressor),
353  m_wholeTileDecompress(wholeTileDecompress)
354  {
355  if(!m_compress)
356  {
357  // for decompress, we are passed the unreduced image component window
358  auto unreducedImageCompWindow = unreducedTileCompOrImageCompWindow;
359  m_bounds = unreducedImageCompWindow.rectceildivpow2(
360  (uint32_t)(m_numResolutions - reducedNumResolutions));
361  m_bounds = m_bounds.intersection(tileCompReduced);
362  assert(m_bounds.is_valid());
363  m_unreducedBounds = unreducedImageCompWindow.intersection(tileCompUnreduced);
364  assert(m_unreducedBounds.is_valid());
365  }
366  // fill resolutions vector
367  assert(reducedNumResolutions > 0);
368  for(uint32_t resno = 0; resno < reducedNumResolutions; ++resno)
369  m_resolution.push_back(tileCompResolution + resno);
370 
371  auto tileCompAtRes = tileCompResolution + reducedNumResolutions - 1;
372  auto tileCompAtLowerRes =
373  reducedNumResolutions > 1 ? tileCompResolution + reducedNumResolutions - 2 : nullptr;
374  // create resolution buffers
375  auto topLevel = new ResWindowBuffer<T>(
376  numresolutions, (uint8_t)(reducedNumResolutions - 1U), nullptr, tileCompAtRes,
377  tileCompAtLowerRes, m_bounds, m_unreducedBounds, tileCompUnreduced,
378  wholeTileDecompress ? 0 : getFilterPad<uint32_t>(lossless));
379  // setting top level prevents allocation of tileCompBandWindows buffers
380  if(!useBandWindows())
381  topLevel->m_resWindowBufferTopLevelREL = topLevel->m_resWindowBufferREL;
382 
383  for(uint8_t resno = 0; resno < reducedNumResolutions - 1; ++resno)
384  {
385  // resolution window == next resolution band window at orientation 0
386  auto resDims = ResWindowBuffer<T>::getBandWindow((uint32_t)(numresolutions - 1 - resno),
387  0, m_unreducedBounds);
389  numresolutions, resno, useBandWindows() ? nullptr : topLevel->m_resWindowBufferREL,
390  tileCompResolution + resno, resno > 0 ? tileCompResolution + resno - 1 : nullptr,
391  resDims, m_unreducedBounds, tileCompUnreduced,
392  wholeTileDecompress ? 0 : getFilterPad<uint32_t>(lossless)));
393  }
394  m_resWindowBufferREL.push_back(topLevel);
395  }
397  {
398  for(auto& b : m_resWindowBufferREL)
399  delete b;
400  }
401 
413  void toRelativeCoordinates(uint8_t resno, eBandOrientation orientation, uint32_t& offsetx,
414  uint32_t& offsety) const
415  {
416  assert(resno < m_resolution.size());
417 
418  auto res = m_resolution[resno];
419  auto band = res->tileBand + getBandIndex(resno, orientation);
420 
421  uint32_t x = offsetx;
422  uint32_t y = offsety;
423 
424  // get offset relative to band
425  x -= band->x0;
426  y -= band->y0;
427 
428  if(useBufferCoordinatesForCodeblock() && resno > 0)
429  {
430  auto resLower = m_resolution[resno - 1U];
431 
432  if(orientation & 1)
433  x += resLower->width();
434  if(orientation & 2)
435  y += resLower->height();
436  }
437  offsetx = x;
438  offsety = y;
439  }
448  getCodeBlockDestWindowREL(uint8_t resno, eBandOrientation orientation) const
449  {
452  : getBandWindowBufferPaddedREL(resno, orientation);
453  }
464  getBandWindowBufferPaddedREL(uint8_t resno, eBandOrientation orientation) const
465  {
466  assert(resno < m_resolution.size());
467  assert(resno > 0 || orientation == BAND_ORIENT_LL);
468 
469  if(resno == 0 && (m_compress || m_wholeTileDecompress))
470  return m_resWindowBufferREL[0]->m_resWindowBufferREL;
471 
472  return m_resWindowBufferREL[resno]->m_bandWindowBufferPaddedREL[orientation];
473  }
474 
482  const grkRectU32* getBandWindowPadded(uint8_t resno, eBandOrientation orientation) const
483  {
484  if(m_resWindowBufferREL[resno]->m_bandWindowPadded.empty())
485  return nullptr;
486  return &m_resWindowBufferREL[resno]->m_bandWindowPadded[orientation];
487  }
488  /*
489  * Get intermediate split window
490  *
491  * @param orientation 0 for upper split window, and 1 for lower split window
492  */
494  getResWindowBufferSplitREL(uint8_t resno, eSplitOrientation orientation) const
495  {
496  assert(resno > 0 && resno < m_resolution.size());
497 
498  return m_resWindowBufferREL[resno]->m_resWindowBufferSplitREL[orientation];
499  }
507  {
508  return m_resWindowBufferREL[resno]->m_resWindowBufferREL;
509  }
516  {
517  return m_resWindowBufferREL.back()->m_resWindowBufferREL;
518  }
519  bool alloc()
520  {
521  for(auto& b : m_resWindowBufferREL)
522  {
523  if(!b->alloc(!m_compress))
524  return false;
525  }
526 
527  return true;
528  }
535  {
536  return m_bounds;
537  }
539  {
540  return m_unreducedBounds;
541  }
542  uint64_t stridedArea(void) const
543  {
544  return getResWindowBufferHighestREL()->stride * m_bounds.height();
545  }
546 
547  // set data to buf without owning it
548  void attach(T* buffer, uint32_t stride)
549  {
550  getResWindowBufferHighestREL()->attach(buffer, stride);
551  }
552  // transfer data to buf, and cease owning it
553  void transfer(T** buffer, uint32_t* stride)
554  {
555  getResWindowBufferHighestREL()->transfer(buffer, stride);
556  }
557 
558  private:
559  bool useBandWindows() const
560  {
561  return !m_wholeTileDecompress;
562  }
564  {
566  }
567  uint8_t getBandIndex(uint8_t resno, eBandOrientation orientation) const
568  {
569  uint8_t index = 0;
570  if(resno > 0)
571  {
572  index = (uint8_t)orientation;
573  index--;
574  }
575  return index;
576  }
577  /******************************************************/
578  // decompress: unreduced/reduced image component window
579  // compress: unreduced/reduced tile component
582  /******************************************************/
583 
584  std::vector<Resolution*> m_resolution;
585  // windowed bounds for windowed decompress, otherwise full bounds
586  std::vector<ResWindowBuffer<T>*> m_resWindowBufferREL;
587 
588  // unreduced number of resolutions
590 
593 };
594 
595 } // namespace grk
Copyright (C) 2016-2021 Grok Image Compression Inc.
Definition: ICacheable.h:20
grkRect< uint32_t > grkRectU32
Definition: util.h:56
eSplitOrientation
Definition: TileComponentWindowBuffer.h:44
@ SPLIT_H
Definition: TileComponentWindowBuffer.h:46
@ SPLIT_L
Definition: TileComponentWindowBuffer.h:45
@ SPLIT_NUM_ORIENTATIONS
Definition: TileComponentWindowBuffer.h:47
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:60
grkBuffer2d< T, AllocatorAligned > * m_resWindowBufferREL
Definition: TileComponentWindowBuffer.h:337
bool m_allocated
Definition: TileComponentWindowBuffer.h:328
~ResWindowBuffer()
Definition: TileComponentWindowBuffer.h:164
Resolution * m_tileCompResLower
Definition: TileComponentWindowBuffer.h:331
ResWindowBuffer(uint8_t numresolutions, uint8_t resno, grkBuffer2d< T, AllocatorAligned > *resWindowTopLevelREL, Resolution *tileCompAtRes, Resolution *tileCompAtLowerRes, grkRectU32 tileCompWindow, grkRectU32 tileCompWindowUnreduced, grkRectU32 tileCompUnreduced, uint32_t FILTER_WIDTH)
Definition: TileComponentWindowBuffer.h:61
static grkRectU32 getBandWindow(uint32_t numDecomps, uint8_t orientation, grkRectU32 tileCompWindowUnreduced)
Get band window (in tile component coordinates) for specified number of decompositions.
Definition: TileComponentWindowBuffer.h:272
static grkRectU32 getBandWindow(uint32_t numDecomps, uint8_t orientation, grkRectU32 unreducedTileCompWindow, grkRectU32 unreducedTileComp, uint32_t padding)
Get band window (in tile component coordinates) for specified number of decompositions (with padding)
Definition: TileComponentWindowBuffer.h:306
grkBuffer2d< T, AllocatorAligned > * m_resWindowBufferSplitREL[SPLIT_NUM_ORIENTATIONS]
Definition: TileComponentWindowBuffer.h:336
std::vector< grkRectU32 > m_bandWindowPadded
Definition: TileComponentWindowBuffer.h:334
bool alloc(bool clear)
Definition: TileComponentWindowBuffer.h:172
grkBuffer2d< T, AllocatorAligned > * m_resWindowBufferTopLevelREL
Definition: TileComponentWindowBuffer.h:338
Resolution * m_tileCompRes
Definition: TileComponentWindowBuffer.h:330
uint32_t m_filterWidth
Definition: TileComponentWindowBuffer.h:340
std::vector< grkBuffer2d< T, AllocatorAligned > * > m_bandWindowBufferPaddedREL
Definition: TileComponentWindowBuffer.h:333
Definition: Resolution.h:24
uint32_t numTileBandWindows
Definition: Resolution.h:84
Subband tileBand[BAND_NUM_INDICES]
Definition: Resolution.h:83
Definition: TileComponentWindowBuffer.h:345
bool useBandWindows() const
Definition: TileComponentWindowBuffer.h:559
grkRectU32 m_unreducedBounds
Definition: TileComponentWindowBuffer.h:580
grkRectU32 bounds() const
Get bounds of tile component (canvas coordinates) decompress: reduced canvas coordinates of window co...
Definition: TileComponentWindowBuffer.h:534
grkRectU32 unreducedBounds() const
Definition: TileComponentWindowBuffer.h:538
const grkBuffer2d< T, AllocatorAligned > * getResWindowBufferREL(uint32_t resno) const
Get resolution window.
Definition: TileComponentWindowBuffer.h:506
uint8_t m_numResolutions
Definition: TileComponentWindowBuffer.h:589
~TileComponentWindowBuffer()
Definition: TileComponentWindowBuffer.h:396
std::vector< ResWindowBuffer< T > * > m_resWindowBufferREL
Definition: TileComponentWindowBuffer.h:586
bool useBufferCoordinatesForCodeblock() const
Definition: TileComponentWindowBuffer.h:563
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:413
bool m_wholeTileDecompress
Definition: TileComponentWindowBuffer.h:592
uint8_t getBandIndex(uint8_t resno, eBandOrientation orientation) const
Definition: TileComponentWindowBuffer.h:567
const grkBuffer2d< T, AllocatorAligned > * getResWindowBufferSplitREL(uint8_t resno, eSplitOrientation orientation) const
Definition: TileComponentWindowBuffer.h:494
const grkRectU32 * getBandWindowPadded(uint8_t resno, eBandOrientation orientation) const
Get padded band window.
Definition: TileComponentWindowBuffer.h:482
bool m_compress
Definition: TileComponentWindowBuffer.h:591
grkRectU32 m_bounds
Definition: TileComponentWindowBuffer.h:581
std::vector< Resolution * > m_resolution
Definition: TileComponentWindowBuffer.h:584
const grkBuffer2d< T, AllocatorAligned > * getBandWindowBufferPaddedREL(uint8_t resno, eBandOrientation orientation) const
Get padded band window buffer.
Definition: TileComponentWindowBuffer.h:464
TileComponentWindowBuffer(bool isCompressor, bool lossless, bool wholeTileDecompress, grkRectU32 tileCompUnreduced, grkRectU32 tileCompReduced, grkRectU32 unreducedTileCompOrImageCompWindow, Resolution *tileCompResolution, uint8_t numresolutions, uint8_t reducedNumResolutions)
Definition: TileComponentWindowBuffer.h:346
void transfer(T **buffer, uint32_t *stride)
Definition: TileComponentWindowBuffer.h:553
grkBuffer2d< T, AllocatorAligned > * getResWindowBufferHighestREL(void) const
Get highest resolution window.
Definition: TileComponentWindowBuffer.h:515
bool alloc()
Definition: TileComponentWindowBuffer.h:519
void attach(T *buffer, uint32_t stride)
Definition: TileComponentWindowBuffer.h:548
uint64_t stridedArea(void) const
Definition: TileComponentWindowBuffer.h:542
const grkBuffer2d< T, AllocatorAligned > * getCodeBlockDestWindowREL(uint8_t resno, eBandOrientation orientation) const
Get code block destination window.
Definition: TileComponentWindowBuffer.h:448
Definition: MemManager.h:223
T x1
Definition: util.h:96
T y0
Definition: util.h:96
grkRect< T > pan(int64_t x, int64_t y) const
Definition: util.h:225
bool is_valid(void) const
Definition: util.h:117
T width() const
Definition: util.h:209
grkRect< T > & grow(T boundary)
Definition: util.h:238
grkRect< T > intersection(const grkRect< T > rhs) const
Definition: util.h:173
grkRect< T > rectceildivpow2(uint32_t power) const
Definition: util.h:159
T height() const
Definition: util.h:213
T y1
Definition: util.h:96
T x0
Definition: util.h:96