Layout of an HVD element raster buffer. More...
#include "hvdblit.h"
Data Fields | |
size_t | size |
void * | addr |
unsigned int | x |
unsigned int | w |
ptrdiff_t | linestride |
unsigned int | pixelstride_bits |
HVD_data_format | format |
unsigned int | values_per_channel |
unsigned int | channel_depth_bits |
unsigned int | channel_offset_bits |
unsigned int | nchannels |
unsigned int | packing_unit_bits |
HqBool | inverted |
Layout of an HVD element raster buffer.
This type is used to represent the source, destination, and mask for blitting HVD elements. The raster layouts are used to discover optimised blitters to perform the blitting, and to inform the blitter of the layout and addresses of the raster buffers.
void* HVD_raster_layout::addr |
The base address of the raster. This address is used to determine alignment constraints when selecting a blitter function. This address must not be NULL.
unsigned int HVD_raster_layout::channel_depth_bits |
The number of bits each channel is stored in. This may be 1, 2, 4, 8, or 16 for raster data, 8, 10, or 12 for RLE data. This depth must be sufficient to store the number of values per channel.
unsigned int HVD_raster_layout::channel_offset_bits |
Channel offset in this blit operation, in bits. This offset selects the first channel of each pixel interleaved chunk that will be processed in this blit operation.
HVD_data_format HVD_raster_layout::format |
The format of the data in this raster. Source and destination rasters may be any type, but they should be compatible between source and destination raster layouts. Source rasters may be HVD_DATA_MASK0 with either a NULL mask, an identical source and mask pointer, or identical layout contents for source and mask in order to use ContoneMask data. Masks may be HVD_DATA_MASK0 or HVD_DATA_ALPHA.
HqBool HVD_raster_layout::inverted |
Data in the raster is inverted with respect to values_per_channel. For masks, this controls whether data samples with value 0 or maximum value are treated as transparency. Source and destination rasters must share the same inversion setting.
ptrdiff_t HVD_raster_layout::linestride |
The line stride of the raster, in bytes. The line stride may include padding, so it does not need to be equal to the width of the raster. The line stride may be zero in source and mask rasters, in which case the same line of data will be used for all operations. The line stride may not be zero for destination rasters.
unsigned int HVD_raster_layout::nchannels |
Number of channels in this blit operation. This may not match the pixel stride, if a subset of the channels are being processed. The number of channels in the source and destination rasters must match. The mask raster must either have the same number of channels as the source raster, or one channel which will be applied to all of the channels in the blit operation.
unsigned int HVD_raster_layout::packing_unit_bits |
Packing unit of the raster, in bits. For values_per_channel of 2, 4, or 16 (for 1, 2, or 4-bit data), rasters are generated high bit first by the RIP, packed into words of this number of bits. 8-bit contone data will have a packing unit of 8. 16-bit contone data may have a packing unit of 8 (high-byte first), or 16 (native machine order). The packing unit of the source and destination rasters must match.
unsigned int HVD_raster_layout::pixelstride_bits |
The pixel interleaved chunk stride of the raster, in bits. The pixel stride may include padding, if there are channels that will be processed from the source raster in different ways. For example, CMYK may be processed using ContoneMask masking, but an object type channel may be copied or use a hard mask. If these are stored within the same pixel interleaved chunk, the CMYK data and object type channel can be processed in two separate blits, by using a pixel stride that covers them all, but a different number of channels and channel offset for each blit operation. The pixel stride may be zero in source and mask rasters, in which case the same line of data will be used for all operations. The pixel stride may not be zero for destination rasters.
size_t HVD_raster_layout::size |
The size of this structure.
unsigned int HVD_raster_layout::values_per_channel |
The number of values for each channel in a pixel. This may be 2, 4, 16, 256, 65281 (for 0xff00 16-bit packed data), or 65536 for raster, mask, or alpha data, it may be 256, 1024 or 4096 for RLE data. The number of values per component in the source and destination rasters must match.
unsigned int HVD_raster_layout::w |
The width and height of the raster rectangle to operate on, in device pixels. The width and height in the source and mask raster rectangles must match.
unsigned int HVD_raster_layout::x |
The x and y offset of the raster rectangle to operate on. The raster base address is modified by the y offset multiplied by linestride and the x offset multiplied by pixelstride_bits to get the bit address of the raster rectangle to operate on.