Grok
7.6.3
|
#include <SparseBuffer.h>
Public Member Functions | |
virtual | ~ISparseBuffer () |
virtual bool | read (uint32_t x0, uint32_t y0, uint32_t x1, uint32_t y1, int32_t *dest, const uint32_t dest_col_stride, const uint32_t dest_line_stride, bool forgiving)=0 |
Read the content of a rectangular window of the sparse array into a user buffer. More... | |
virtual bool | read (grk_rect_u32 window, int32_t *dest, const uint32_t dest_col_stride, const uint32_t dest_line_stride, bool forgiving)=0 |
Read the content of a rectangular window of the sparse array into a user buffer. More... | |
virtual bool | write (uint32_t x0, uint32_t y0, uint32_t x1, uint32_t y1, const int32_t *src, const uint32_t src_col_stride, const uint32_t src_line_stride, bool forgiving)=0 |
Write the content of a rectangular window into the sparse array from a user buffer. More... | |
virtual bool | alloc (grk_rect_u32 window)=0 |
Allocate all blocks for a rectangular window into the sparse array from a user buffer. More... | |
|
inlinevirtual |
|
pure virtual |
Allocate all blocks for a rectangular window into the sparse array from a user buffer.
Blocks intersecting the window are allocated
window | window to write into the sparse array. |
Implemented in grk::SparseBuffer< LBW, LBH >.
Referenced by grk::decompress_partial_tile().
|
pure virtual |
Read the content of a rectangular window of the sparse array into a user buffer.
Windows not written with write() are read as 0.
window | window to read in the sparse array. |
dest | user buffer to fill. Must be at least sizeof(int32) * ( (y1 - y0 - 1) * dest_line_stride + (x1 - x0 - 1) * dest_col_stride + 1) bytes large. |
dest_col_stride | spacing (in elements, not in bytes) in x dimension between consecutive elements of the user buffer. |
dest_line_stride | spacing (in elements, not in bytes) in y dimension between consecutive elements of the user buffer. |
forgiving | if set to TRUE and the window is invalid, true will still be returned. |
Implemented in grk::SparseBuffer< LBW, LBH >.
|
pure virtual |
Read the content of a rectangular window of the sparse array into a user buffer.
Windows not written with write() are read as 0.
x0 | left x coordinate of the window to read in the sparse array. |
y0 | top x coordinate of the window to read in the sparse array. |
x1 | right x coordinate (not included) of the window to read in the sparse array. Must be greater than x0. |
y1 | bottom y coordinate (not included) of the window to read in the sparse array. Must be greater than y0. |
dest | user buffer to fill. Must be at least sizeof(int32) * ( (y1 - y0 - 1) * dest_line_stride + (x1 - x0 - 1) * dest_col_stride + 1) bytes large. |
dest_col_stride | spacing (in elements, not in bytes) in x dimension between consecutive elements of the user buffer. |
dest_line_stride | spacing (in elements, not in bytes) in y dimension between consecutive elements of the user buffer. |
forgiving | if set to TRUE and the window is invalid, true will still be returned. |
Implemented in grk::SparseBuffer< LBW, LBH >.
Referenced by grk::decompress_partial_tile(), grk::PartialInterleaver< T >::interleave_h(), and grk::PartialInterleaver< T >::interleave_v().
|
pure virtual |
Write the content of a rectangular window into the sparse array from a user buffer.
Blocks intersecting the window are allocated, if not already done.
x0 | left x coordinate of the window to write into the sparse array. |
y0 | top x coordinate of the window to write into the sparse array. |
x1 | right x coordinate (not included) of the window to write into the sparse array. Must be greater than x0. |
y1 | bottom y coordinate (not included) of the window to write into the sparse array. Must be greater than y0. |
src | user buffer to fill. Must be at least sizeof(int32) * ( (y1 - y0 - 1) * src_line_stride + (x1 - x0 - 1) * src_col_stride + 1) bytes large. |
src_col_stride | spacing (in elements, not in bytes) in x dimension between consecutive elements of the user buffer. |
src_line_stride | spacing (in elements, not in bytes) in y dimension between consecutive elements of the user buffer. |
forgiving | if set to TRUE and the window is invalid, true will still be returned. |
Implemented in grk::SparseBuffer< LBW, LBH >.
Referenced by grk::decompress_partial_tile(), and grk::TileComponent::postDecompressImpl().