Bitblit Operations

Bitblit operations on images of arbitrary pixel depth. More...

Functions

int rapp_bitblt_copy_bin (uint8_t *restrict dst, int dst_dim, int dst_off, const uint8_t *restrict src, int src_dim, int src_off, int width, int height)
 Bitblt COPY operation.
int rapp_bitblt_not_bin (uint8_t *restrict dst, int dst_dim, int dst_off, const uint8_t *restrict src, int src_dim, int src_off, int width, int height)
 Bitblt NOT operation.
int rapp_bitblt_and_bin (uint8_t *restrict dst, int dst_dim, int dst_off, const uint8_t *restrict src, int src_dim, int src_off, int width, int height)
 Bitblt AND operation.
int rapp_bitblt_or_bin (uint8_t *restrict dst, int dst_dim, int dst_off, const uint8_t *restrict src, int src_dim, int src_off, int width, int height)
 Bitblt OR operation.
int rapp_bitblt_xor_bin (uint8_t *restrict dst, int dst_dim, int dst_off, const uint8_t *restrict src, int src_dim, int src_off, int width, int height)
 Bitblt XOR operation.
int rapp_bitblt_nand_bin (uint8_t *restrict dst, int dst_dim, int dst_off, const uint8_t *restrict src, int src_dim, int src_off, int width, int height)
 Bitblt NAND operation.
int rapp_bitblt_nor_bin (uint8_t *restrict dst, int dst_dim, int dst_off, const uint8_t *restrict src, int src_dim, int src_off, int width, int height)
 Bitblt NOR operation.
int rapp_bitblt_xnor_bin (uint8_t *restrict dst, int dst_dim, int dst_off, const uint8_t *restrict src, int src_dim, int src_off, int width, int height)
 Bitblt XNOR operation.
int rapp_bitblt_andn_bin (uint8_t *restrict dst, int dst_dim, int dst_off, const uint8_t *restrict src, int src_dim, int src_off, int width, int height)
 Bitblt ANDN operation.
int rapp_bitblt_orn_bin (uint8_t *restrict dst, int dst_dim, int dst_off, const uint8_t *restrict src, int src_dim, int src_off, int width, int height)
 Bitblt ORN operation.
int rapp_bitblt_nandn_bin (uint8_t *restrict dst, int dst_dim, int dst_off, const uint8_t *restrict src, int src_dim, int src_off, int width, int height)
 Bitblt NANDN operation.
int rapp_bitblt_norn_bin (uint8_t *restrict dst, int dst_dim, int dst_off, const uint8_t *restrict src, int src_dim, int src_off, int width, int height)
 Bitblt NORN operation.

Detailed Description

Bitblit operations on images of arbitrary pixel depth.

These functions implement bitblit operations using different raster operations. The image buffers can be misaligned, but there may be severe performance penalties if this is the case.

Even though the functions are designated as binary, the bitblit operations are independent of the pixel bit depth. Simply adjust the width, src_off and dst_off parameters accordingly. (Remember, the dimension parameters are always specified in bytes.) When blitting 8-bit images, the width passed should be 8 times the width of the image. The src_off and dst_off parameters should be 0.

The bitblit functions may affect data up to the nearest alignment boundary of the destination image. For the affected data, the corresponding location in the source image may also be read, so these functions may actually read data beyond the nearest alignment boundaries of the source image. This can cause problems when blitting into a sub image of a larger image. In these cases the caller must set the extra source pixels to the proper value using the padding functions. Data will never be read outside the actual source image memory area. For the pixels outside this area the value 0 will be used instead.

Next section: Pixelwise Arithmetic Operations


Function Documentation

int rapp_bitblt_copy_bin ( uint8_t *restrict  dst,
int  dst_dim,
int  dst_off,
const uint8_t *restrict  src,
int  src_dim,
int  src_off,
int  width,
int  height 
)

Bitblt COPY operation.

Computes dst = src for all binary pixels.

Parameters:
[in,out] dst Destination pixel buffer.
dst_dim Row dimension of the destination buffer.
dst_off Binary pixel offset of the destination buffer.
[in] src Source pixel buffer.
src_dim Row dimension of the source buffer.
src_off Binary pixel offset of the source buffer.
width Image width in pixels.
height Image height in pixels.
Returns:
A negative error code on error, zero otherwise.
int rapp_bitblt_not_bin ( uint8_t *restrict  dst,
int  dst_dim,
int  dst_off,
const uint8_t *restrict  src,
int  src_dim,
int  src_off,
int  width,
int  height 
)

Bitblt NOT operation.

Computes dst = ~src for all binary pixels.

Parameters:
[in,out] dst Destination pixel buffer.
dst_dim Row dimension of the destination buffer.
dst_off Binary pixel offset of the destination buffer.
[in] src Source pixel buffer.
src_dim Row dimension of the source buffer.
src_off Binary pixel offset of the source buffer.
width Image width in pixels.
height Image height in pixels.
Returns:
A negative error code on error, zero otherwise.
int rapp_bitblt_and_bin ( uint8_t *restrict  dst,
int  dst_dim,
int  dst_off,
const uint8_t *restrict  src,
int  src_dim,
int  src_off,
int  width,
int  height 
)

Bitblt AND operation.

Computes dst = dst & src for all binary pixels.

Parameters:
[in,out] dst Destination pixel buffer.
dst_dim Row dimension of the destination buffer.
dst_off Binary pixel offset of the destination buffer.
[in] src Source pixel buffer.
src_dim Row dimension of the source buffer.
src_off Binary pixel offset of the source buffer.
width Image width in pixels.
height Image height in pixels.
Returns:
A negative error code on error, zero otherwise.
int rapp_bitblt_or_bin ( uint8_t *restrict  dst,
int  dst_dim,
int  dst_off,
const uint8_t *restrict  src,
int  src_dim,
int  src_off,
int  width,
int  height 
)

Bitblt OR operation.

Computes dst = dst | src for all binary pixels.

Parameters:
[in,out] dst Destination pixel buffer.
dst_dim Row dimension of the destination buffer.
dst_off Binary pixel offset of the destination buffer.
[in] src Source pixel buffer.
src_dim Row dimension of the source buffer.
src_off Binary pixel offset of the source buffer.
width Image width in pixels.
height Image height in pixels.
Returns:
A negative error code on error, zero otherwise.
int rapp_bitblt_xor_bin ( uint8_t *restrict  dst,
int  dst_dim,
int  dst_off,
const uint8_t *restrict  src,
int  src_dim,
int  src_off,
int  width,
int  height 
)

Bitblt XOR operation.

Computes dst = dst ^ src for all binary pixels.

Parameters:
[in,out] dst Destination pixel buffer.
dst_dim Row dimension of the destination buffer.
dst_off Binary pixel offset of the destination buffer.
[in] src Source pixel buffer.
src_dim Row dimension of the source buffer.
src_off Binary pixel offset of the source buffer.
width Image width in pixels.
height Image height in pixels.
Returns:
A negative error code on error, zero otherwise.
int rapp_bitblt_nand_bin ( uint8_t *restrict  dst,
int  dst_dim,
int  dst_off,
const uint8_t *restrict  src,
int  src_dim,
int  src_off,
int  width,
int  height 
)

Bitblt NAND operation.

Computes dst = ~(dst & src) for all binary pixels.

Parameters:
[in,out] dst Destination pixel buffer.
dst_dim Row dimension of the destination buffer.
dst_off Binary pixel offset of the destination buffer.
[in] src Source pixel buffer.
src_dim Row dimension of the source buffer.
src_off Binary pixel offset of the source buffer.
width Image width in pixels.
height Image height in pixels.
Returns:
A negative error code on error, zero otherwise.
int rapp_bitblt_nor_bin ( uint8_t *restrict  dst,
int  dst_dim,
int  dst_off,
const uint8_t *restrict  src,
int  src_dim,
int  src_off,
int  width,
int  height 
)

Bitblt NOR operation.

Computes dst = ~(dst | src) for all binary pixels.

Parameters:
[in,out] dst Destination pixel buffer.
dst_dim Row dimension of the destination buffer.
dst_off Binary pixel offset of the destination buffer.
[in] src Source pixel buffer.
src_dim Row dimension of the source buffer.
src_off Binary pixel offset of the source buffer.
width Image width in pixels.
height Image height in pixels.
Returns:
A negative error code on error, zero otherwise.
int rapp_bitblt_xnor_bin ( uint8_t *restrict  dst,
int  dst_dim,
int  dst_off,
const uint8_t *restrict  src,
int  src_dim,
int  src_off,
int  width,
int  height 
)

Bitblt XNOR operation.

Computes dst = ~(dst ^ src) for all binary pixels.

Parameters:
[in,out] dst Destination pixel buffer.
dst_dim Row dimension of the destination buffer.
dst_off Binary pixel offset of the destination buffer.
[in] src Source pixel buffer.
src_dim Row dimension of the source buffer.
src_off Binary pixel offset of the source buffer.
width Image width in pixels.
height Image height in pixels.
Returns:
A negative error code on error, zero otherwise.
int rapp_bitblt_andn_bin ( uint8_t *restrict  dst,
int  dst_dim,
int  dst_off,
const uint8_t *restrict  src,
int  src_dim,
int  src_off,
int  width,
int  height 
)

Bitblt ANDN operation.

Computes dst = dst & ~src for all binary pixels.

Parameters:
[in,out] dst Destination pixel buffer.
dst_dim Row dimension of the destination buffer.
dst_off Binary pixel offset of the destination buffer.
[in] src Source pixel buffer.
src_dim Row dimension of the source buffer.
src_off Binary pixel offset of the source buffer.
width Image width in pixels.
height Image height in pixels.
Returns:
A negative error code on error, zero otherwise.
int rapp_bitblt_orn_bin ( uint8_t *restrict  dst,
int  dst_dim,
int  dst_off,
const uint8_t *restrict  src,
int  src_dim,
int  src_off,
int  width,
int  height 
)

Bitblt ORN operation.

Computes dst = dst | ~src for all binary pixels.

Parameters:
[in,out] dst Destination pixel buffer.
dst_dim Row dimension of the destination buffer.
dst_off Binary pixel offset of the destination buffer.
[in] src Source pixel buffer.
src_dim Row dimension of the source buffer.
src_off Binary pixel offset of the source buffer.
width Image width in pixels.
height Image height in pixels.
Returns:
A negative error code on error, zero otherwise.
int rapp_bitblt_nandn_bin ( uint8_t *restrict  dst,
int  dst_dim,
int  dst_off,
const uint8_t *restrict  src,
int  src_dim,
int  src_off,
int  width,
int  height 
)

Bitblt NANDN operation.

Computes dst = ~(dst & ~src) for all binary pixels.

Parameters:
[in,out] dst Destination pixel buffer.
dst_dim Row dimension of the destination buffer.
dst_off Binary pixel offset of the destination buffer.
[in] src Source pixel buffer.
src_dim Row dimension of the source buffer.
src_off Binary pixel offset of the source buffer.
width Image width in pixels.
height Image height in pixels.
Returns:
A negative error code on error, zero otherwise.
int rapp_bitblt_norn_bin ( uint8_t *restrict  dst,
int  dst_dim,
int  dst_off,
const uint8_t *restrict  src,
int  src_dim,
int  src_off,
int  width,
int  height 
)

Bitblt NORN operation.

Computes dst = ~(dst | ~src) for all binary pixels.

Parameters:
[in,out] dst Destination pixel buffer.
dst_dim Row dimension of the destination buffer.
dst_off Binary pixel offset of the destination buffer.
[in] src Source pixel buffer.
src_dim Row dimension of the source buffer.
src_off Binary pixel offset of the source buffer.
width Image width in pixels.
height Image height in pixels.
Returns:
A negative error code on error, zero otherwise.

Generated on 1 Jun 2016 for RAPP by  doxygen 1.6.1