RAPP Compute layer pixelwise operations. More...
Go to the source code of this file.
Functions | |
RC_EXPORT void | rc_pixop_set_u8 (uint8_t *buf, int dim, int width, int height, unsigned value) |
Set all pixels to a constant value. | |
RC_EXPORT void | rc_pixop_not_u8 (uint8_t *buf, int dim, int width, int height) |
Negate all pixels. | |
RC_EXPORT void | rc_pixop_flip_u8 (uint8_t *buf, int dim, int width, int height) |
Flip the sign bit. | |
RC_EXPORT void | rc_pixop_lut_u8 (uint8_t *restrict buf, int dim, int width, int height, const uint8_t *restrict lut) |
Lookup-table transformation. | |
RC_EXPORT void | rc_pixop_abs_u8 (uint8_t *buf, int dim, int width, int height) |
Absolute value. | |
RC_EXPORT void | rc_pixop_addc_u8 (uint8_t *buf, int dim, int width, int height, int value) |
Add signed constant. | |
RC_EXPORT void | rc_pixop_lerpc_u8 (uint8_t *buf, int dim, int width, int height, unsigned value, unsigned alpha8) |
Linear interpolation with a constant. | |
RC_EXPORT void | rc_pixop_lerpnc_u8 (uint8_t *buf, int dim, int width, int height, unsigned value, unsigned alpha8) |
Linear interpolation with a constant, rounded towards the constant value. | |
RC_EXPORT void | rc_pixop_add_u8 (uint8_t *restrict dst, int dst_dim, const uint8_t *restrict src, int src_dim, int width, int height) |
Saturated addition. | |
RC_EXPORT void | rc_pixop_avg_u8 (uint8_t *restrict dst, int dst_dim, const uint8_t *restrict src, int src_dim, int width, int height) |
Average value. | |
RC_EXPORT void | rc_pixop_sub_u8 (uint8_t *restrict dst, int dst_dim, const uint8_t *restrict src, int src_dim, int width, int height) |
Saturated subtraction. | |
RC_EXPORT void | rc_pixop_subh_u8 (uint8_t *restrict dst, int dst_dim, const uint8_t *restrict src, int src_dim, int width, int height) |
Halved subtraction. | |
RC_EXPORT void | rc_pixop_suba_u8 (uint8_t *restrict dst, int dst_dim, const uint8_t *restrict src, int src_dim, int width, int height) |
Absolute-value subtraction. | |
RC_EXPORT void | rc_pixop_lerp_u8 (uint8_t *restrict dst, int dst_dim, const uint8_t *restrict src, int src_dim, int width, int height, unsigned alpha8) |
Linear interpolation. | |
RC_EXPORT void | rc_pixop_lerpn_u8 (uint8_t *restrict dst, int dst_dim, const uint8_t *restrict src, int src_dim, int width, int height, unsigned alpha8) |
Linear interpolation with non-zero update, i.e. | |
RC_EXPORT void | rc_pixop_lerpi_u8 (uint8_t *restrict dst, int dst_dim, const uint8_t *restrict src, int src_dim, int width, int height, unsigned alpha8) |
Linear interpolation with inverted second operand. | |
RC_EXPORT void | rc_pixop_norm_u8 (uint8_t *restrict dst, int dst_dim, const uint8_t *restrict src, int src_dim, int width, int height) |
L1 norm. |
RAPP Compute layer pixelwise operations.
RC_EXPORT void rc_pixop_abs_u8 | ( | uint8_t * | buf, | |
int | dim, | |||
int | width, | |||
int | height | |||
) |
Absolute value.
[in,out] | buf | Pixel buffer process. |
dim | Row dimension of the pixel buffer. | |
width | Image width in pixels. | |
height | Image height in pixels. |
RC_EXPORT void rc_pixop_add_u8 | ( | uint8_t *restrict | dst, | |
int | dst_dim, | |||
const uint8_t *restrict | src, | |||
int | src_dim, | |||
int | width, | |||
int | height | |||
) |
Saturated addition.
[in,out] | dst | Destination pixel buffer. |
dst_dim | Row dimension of the destination buffer. | |
[in] | src | Source pixel buffer. |
src_dim | Row dimension of the source buffer. | |
width | Image width in pixels. | |
height | Image height in pixels. |
RC_EXPORT void rc_pixop_addc_u8 | ( | uint8_t * | buf, | |
int | dim, | |||
int | width, | |||
int | height, | |||
int | value | |||
) |
Add signed constant.
[in,out] | buf | Pixel buffer process. |
dim | Row dimension of the pixel buffer. | |
width | Image width in pixels. | |
height | Image height in pixels. | |
value | The signed value to add. |
RC_EXPORT void rc_pixop_avg_u8 | ( | uint8_t *restrict | dst, | |
int | dst_dim, | |||
const uint8_t *restrict | src, | |||
int | src_dim, | |||
int | width, | |||
int | height | |||
) |
Average value.
[in,out] | dst | Destination pixel buffer. |
dst_dim | Row dimension of the destination buffer. | |
[in] | src | Source pixel buffer. |
src_dim | Row dimension of the source buffer. | |
width | Image width in pixels. | |
height | Image height in pixels. |
RC_EXPORT void rc_pixop_flip_u8 | ( | uint8_t * | buf, | |
int | dim, | |||
int | width, | |||
int | height | |||
) |
Flip the sign bit.
[in,out] | buf | Pixel buffer process. |
dim | Row dimension of the pixel buffer. | |
width | Image width in pixels. | |
height | Image height in pixels. |
RC_EXPORT void rc_pixop_lerp_u8 | ( | uint8_t *restrict | dst, | |
int | dst_dim, | |||
const uint8_t *restrict | src, | |||
int | src_dim, | |||
int | width, | |||
int | height, | |||
unsigned | alpha8 | |||
) |
Linear interpolation.
[in,out] | dst | Destination pixel buffer. |
dst_dim | Row dimension of the destination buffer. | |
[in] | src | Source pixel buffer. |
src_dim | Row dimension of the source buffer. | |
width | Image width in pixels. | |
height | Image height in pixels. | |
alpha8 | Q.8 blend factor, 0-0x100. |
RC_EXPORT void rc_pixop_lerpc_u8 | ( | uint8_t * | buf, | |
int | dim, | |||
int | width, | |||
int | height, | |||
unsigned | value, | |||
unsigned | alpha8 | |||
) |
Linear interpolation with a constant.
[in,out] | buf | Pixel buffer process. |
dim | Row dimension of the pixel buffer. | |
width | Image width in pixels. | |
height | Image height in pixels. | |
value | Value to interpolate with, 0-255. | |
alpha8 | Q.8 blend factor, 0-0x100. |
RC_EXPORT void rc_pixop_lerpi_u8 | ( | uint8_t *restrict | dst, | |
int | dst_dim, | |||
const uint8_t *restrict | src, | |||
int | src_dim, | |||
int | width, | |||
int | height, | |||
unsigned | alpha8 | |||
) |
Linear interpolation with inverted second operand.
[in,out] | dst | Destination pixel buffer. |
dst_dim | Row dimension of the destination buffer. | |
[in] | src | Source pixel buffer. |
src_dim | Row dimension of the source buffer. | |
width | Image width in pixels. | |
height | Image height in pixels. | |
alpha8 | Q.8 blend factor, 0-0x100. |
RC_EXPORT void rc_pixop_lerpn_u8 | ( | uint8_t *restrict | dst, | |
int | dst_dim, | |||
const uint8_t *restrict | src, | |||
int | src_dim, | |||
int | width, | |||
int | height, | |||
unsigned | alpha8 | |||
) |
Linear interpolation with non-zero update, i.e.
rounded towards src.
[in,out] | dst | Destination pixel buffer. |
dst_dim | Row dimension of the destination buffer. | |
[in] | src | Source pixel buffer. |
src_dim | Row dimension of the source buffer. | |
width | Image width in pixels. | |
height | Image height in pixels. | |
alpha8 | Q.8 blend factor, 0-0x100. |
RC_EXPORT void rc_pixop_lerpnc_u8 | ( | uint8_t * | buf, | |
int | dim, | |||
int | width, | |||
int | height, | |||
unsigned | value, | |||
unsigned | alpha8 | |||
) |
Linear interpolation with a constant, rounded towards the constant value.
[in,out] | buf | Pixel buffer process. |
dim | Row dimension of the pixel buffer. | |
width | Image width in pixels. | |
height | Image height in pixels. | |
value | Value to interpolate with, 0-255. | |
alpha8 | Q.8 blend factor, 0-0x100. |
RC_EXPORT void rc_pixop_lut_u8 | ( | uint8_t *restrict | buf, | |
int | dim, | |||
int | width, | |||
int | height, | |||
const uint8_t *restrict | lut | |||
) |
Lookup-table transformation.
[in,out] | buf | Pixel buffer process. |
dim | Row dimension of the pixel buffer. | |
width | Image width in pixels. | |
height | Image height in pixels. | |
[in] | lut | 8-bit lookup table to use. |
RC_EXPORT void rc_pixop_norm_u8 | ( | uint8_t *restrict | dst, | |
int | dst_dim, | |||
const uint8_t *restrict | src, | |||
int | src_dim, | |||
int | width, | |||
int | height | |||
) |
L1 norm.
[in,out] | dst | Destination pixel buffer. |
dst_dim | Row dimension of the destination buffer. | |
[in] | src | Source pixel buffer. |
src_dim | Row dimension of the source buffer. | |
width | Image width in pixels. | |
height | Image height in pixels. |
RC_EXPORT void rc_pixop_not_u8 | ( | uint8_t * | buf, | |
int | dim, | |||
int | width, | |||
int | height | |||
) |
Negate all pixels.
[in,out] | buf | Pixel buffer process. |
dim | Row dimension of the pixel buffer. | |
width | Image width in pixels. | |
height | Image height in pixels. |
RC_EXPORT void rc_pixop_set_u8 | ( | uint8_t * | buf, | |
int | dim, | |||
int | width, | |||
int | height, | |||
unsigned | value | |||
) |
Set all pixels to a constant value.
[out] | buf | Pixel buffer process. |
dim | Row dimension of the pixel buffer. | |
width | Image width in pixels. | |
height | Image height in pixels. | |
value | The value to set, 0-255. |
RC_EXPORT void rc_pixop_sub_u8 | ( | uint8_t *restrict | dst, | |
int | dst_dim, | |||
const uint8_t *restrict | src, | |||
int | src_dim, | |||
int | width, | |||
int | height | |||
) |
Saturated subtraction.
[in,out] | dst | Destination pixel buffer. |
dst_dim | Row dimension of the destination buffer. | |
[in] | src | Source pixel buffer. |
src_dim | Row dimension of the source buffer. | |
width | Image width in pixels. | |
height | Image height in pixels. |
RC_EXPORT void rc_pixop_suba_u8 | ( | uint8_t *restrict | dst, | |
int | dst_dim, | |||
const uint8_t *restrict | src, | |||
int | src_dim, | |||
int | width, | |||
int | height | |||
) |
Absolute-value subtraction.
[in,out] | dst | Destination pixel buffer. |
dst_dim | Row dimension of the destination buffer. | |
[in] | src | Source pixel buffer. |
src_dim | Row dimension of the source buffer. | |
width | Image width in pixels. | |
height | Image height in pixels. |
RC_EXPORT void rc_pixop_subh_u8 | ( | uint8_t *restrict | dst, | |
int | dst_dim, | |||
const uint8_t *restrict | src, | |||
int | src_dim, | |||
int | width, | |||
int | height | |||
) |
Halved subtraction.
[in,out] | dst | Destination pixel buffer. |
dst_dim | Row dimension of the destination buffer. | |
[in] | src | Source pixel buffer. |
src_dim | Row dimension of the source buffer. | |
width | Image width in pixels. | |
height | Image height in pixels. |