Go to the documentation of this file.
113 const uint32_t dest_col_stride,
114 const uint32_t dest_line_stride,
131 const uint32_t dest_col_stride,
132 const uint32_t dest_line_stride,
156 const uint32_t src_col_stride,
157 const uint32_t src_line_stride,
195 const uint32_t buf_col_stride,
196 const uint32_t buf_line_stride,
uint32_t block_count_hor
Definition: sparse_array.h:204
~sparse_array()
Frees a sparse array.
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)
Read the content of a rectangular region of the sparse array into a user buffer.
uint32_t block_count_ver
Definition: sparse_array.h:205
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)
Write the content of a rectangular region into the sparse array from a user buffer.
uint32_t block_height
Definition: sparse_array.h:203
bool read_or_write(uint32_t x0, uint32_t y0, uint32_t x1, uint32_t y1, int32_t *buf, const uint32_t buf_col_stride, const uint32_t buf_line_stride, bool forgiving, bool is_read_op)
uint32_t block_width
Definition: sparse_array.h:202
int32_t ** data_blocks
Definition: sparse_array.h:206
bool read(grk_rect_u32 region, int32_t *dest, const uint32_t dest_col_stride, const uint32_t dest_line_stride, bool forgiving)
Read the content of a rectangular region of the sparse array into a user buffer.
uint32_t height
Definition: sparse_array.h:201
Copyright (C) 2016-2020 Grok Image Compression Inc.
Definition: BitIO.h:27
bool is_region_valid(uint32_t x0, uint32_t y0, uint32_t x1, uint32_t y1)
Returns whether region bounds are valid (non empty and within array bounds)
bool alloc(uint32_t x0, uint32_t y0, uint32_t x1, uint32_t y1)
Allocate all blocks for a rectangular region into the sparse array from a user buffer.
sparse_array(uint32_t width, uint32_t height, uint32_t block_width, uint32_t block_height)
Creates a new sparse array.
uint32_t width
Definition: sparse_array.h:200
Definition: sparse_array.h:70