Spatial Reduction

Perform 2x spatial reductions. More...



int rapp_reduce_1x2_u8 (uint8_t *restrict dst, int dst_dim, const uint8_t *restrict src, int src_dim, int width, int height)
 8-bit 1x2 (horizontal) resolution reduction.
int rapp_reduce_2x1_u8 (uint8_t *restrict dst, int dst_dim, const uint8_t *restrict src, int src_dim, int width, int height)
 8-bit 2x1 (vertical) reduction.
int rapp_reduce_2x2_u8 (uint8_t *restrict dst, int dst_dim, const uint8_t *restrict src, int src_dim, int width, int height)
 8-bit 2x2 reduction.



int rapp_reduce_1x2_rk1_bin (uint8_t *restrict dst, int dst_dim, const uint8_t *restrict src, int src_dim, int width, int height)
 Binary 1x2 reduction, rank 1.
int rapp_reduce_1x2_rk2_bin (uint8_t *restrict dst, int dst_dim, const uint8_t *restrict src, int src_dim, int width, int height)
 Binary 1x2 reduction, rank 2.
int rapp_reduce_2x1_rk1_bin (uint8_t *restrict dst, int dst_dim, const uint8_t *restrict src, int src_dim, int width, int height)
 Binary 2x1 reduction, rank 1.
int rapp_reduce_2x1_rk2_bin (uint8_t *restrict dst, int dst_dim, const uint8_t *restrict src, int src_dim, int width, int height)
 Binary 2x1 reduction, rank 2.
int rapp_reduce_2x2_rk1_bin (uint8_t *restrict dst, int dst_dim, const uint8_t *restrict src, int src_dim, int width, int height)
 Binary 2x2 reduction, rank 1.
int rapp_reduce_2x2_rk2_bin (uint8_t *restrict dst, int dst_dim, const uint8_t *restrict src, int src_dim, int width, int height)
 Binary 2x2 reduction, rank 2.
int rapp_reduce_2x2_rk3_bin (uint8_t *restrict dst, int dst_dim, const uint8_t *restrict src, int src_dim, int width, int height)
 Binary 2x2 reduction, rank 3.
int rapp_reduce_2x2_rk4_bin (uint8_t *restrict dst, int dst_dim, const uint8_t *restrict src, int src_dim, int width, int height)
 Binary 2x2 reduction, rank 4.

Detailed Description

Perform 2x spatial reductions.

All images must be aligned.

Next section: Spatial Expansion


Function Documentation

int rapp_reduce_1x2_u8 ( uint8_t *restrict  dst,
int  dst_dim,
const uint8_t *restrict  src,
int  src_dim,
int  width,
int  height 
)

8-bit 1x2 (horizontal) resolution reduction.

Downscaling to half size in horizontal direction by averaging. The size of the reduced image is width/2, height, rounded down.

Parameters:
[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 Source image width in pixels.
height Image height in pixels.
Returns:
A negative error code on error, zero otherwise.
int rapp_reduce_1x2_rk1_bin ( uint8_t *restrict  dst,
int  dst_dim,
const uint8_t *restrict  src,
int  src_dim,
int  width,
int  height 
)

Binary 1x2 reduction, rank 1.

Downscaling to half size in horizontal direction. A destination pixel is set iff the sum of the source pixels in the 1x2 cell is at least 1. The size of the reduced image is width/2, height, rounded down.

Parameters:
[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 Source image width in pixels.
height Image height in pixels.
Returns:
A negative error code on error, zero otherwise.
int rapp_reduce_2x1_u8 ( uint8_t *restrict  dst,
int  dst_dim,
const uint8_t *restrict  src,
int  src_dim,
int  width,
int  height 
)

8-bit 2x1 (vertical) reduction.

Downscaling to half size in vertical direction by averaging. The size of the reduced image is width, height/2, rounded down.

Parameters:
[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 Source image height in pixels.
Returns:
A negative error code on error, zero otherwise.
int rapp_reduce_2x2_u8 ( uint8_t *restrict  dst,
int  dst_dim,
const uint8_t *restrict  src,
int  src_dim,
int  width,
int  height 
)

8-bit 2x2 reduction.

Downscaling to half size by averaging. The size of the reduced image is width/2, height/2, rounded down.

Parameters:
[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 Source image width in pixels.
height Source image height in pixels.
Returns:
A negative error code on error, zero otherwise.
int rapp_reduce_1x2_rk2_bin ( uint8_t *restrict  dst,
int  dst_dim,
const uint8_t *restrict  src,
int  src_dim,
int  width,
int  height 
)

Binary 1x2 reduction, rank 2.

Downscaling to half size in horizontal direction. A destination pixel is set iff the sum of the source pixels in the 1x2 cell is 2. The size of the reduced image is width/2, height, rounded down.

Parameters:
[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 Source image width in pixels.
height Image height in pixels.
Returns:
A negative error code on error, zero otherwise.
int rapp_reduce_2x1_rk1_bin ( uint8_t *restrict  dst,
int  dst_dim,
const uint8_t *restrict  src,
int  src_dim,
int  width,
int  height 
)

Binary 2x1 reduction, rank 1.

Downscaling to half size in vertical direction. A destination pixel is set iff the sum of the source pixels in the 2x1 cell is at least 1. The size of the reduced image is width, height/2, rounded down.

Parameters:
[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 Source image width in pixels.
height Image height in pixels.
Returns:
A negative error code on error, zero otherwise.
int rapp_reduce_2x1_rk2_bin ( uint8_t *restrict  dst,
int  dst_dim,
const uint8_t *restrict  src,
int  src_dim,
int  width,
int  height 
)

Binary 2x1 reduction, rank 2.

Downscaling to half size in vertical direction. A destination pixel is set iff the sum of the source pixels in the 2x1 cell is 2. The size of the reduced image is width, height/2, rounded down.

Parameters:
[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 Source image width in pixels.
height Image height in pixels.
Returns:
A negative error code on error, zero otherwise.
int rapp_reduce_2x2_rk1_bin ( uint8_t *restrict  dst,
int  dst_dim,
const uint8_t *restrict  src,
int  src_dim,
int  width,
int  height 
)

Binary 2x2 reduction, rank 1.

Downscaling to half size in vertical direction. A destination pixel is set iff the sum of the source pixels in the 2x2 cell is at least 1. The size of the reduced image is width/2, height/2, rounded down.

Parameters:
[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 Source image width in pixels.
height Image height in pixels.
Returns:
A negative error code on error, zero otherwise.
int rapp_reduce_2x2_rk2_bin ( uint8_t *restrict  dst,
int  dst_dim,
const uint8_t *restrict  src,
int  src_dim,
int  width,
int  height 
)

Binary 2x2 reduction, rank 2.

Downscaling to half size in vertical direction. A destination pixel is set iff the sum of the source pixels in the 2x2 cell is at least 2. The size of the reduced image is width/2, height/2, rounded down.

Parameters:
[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 Source image width in pixels.
height Image height in pixels.
Returns:
A negative error code on error, zero otherwise.
int rapp_reduce_2x2_rk3_bin ( uint8_t *restrict  dst,
int  dst_dim,
const uint8_t *restrict  src,
int  src_dim,
int  width,
int  height 
)

Binary 2x2 reduction, rank 3.

Downscaling to half size in vertical direction. A destination pixel is set iff the sum of the source pixels in the 2x2 cell is at least 3. The size of the reduced image is width/2, height/2, rounded down.

Parameters:
[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 Source image width in pixels.
height Image height in pixels.
Returns:
A negative error code on error, zero otherwise.
int rapp_reduce_2x2_rk4_bin ( uint8_t *restrict  dst,
int  dst_dim,
const uint8_t *restrict  src,
int  src_dim,
int  width,
int  height 
)

Binary 2x2 reduction, rank 4.

Downscaling to half size in vertical direction. A destination pixel is set iff the sum of the source pixels in the 2x2 cell is 4. The size of the reduced image is width/2, height/2, rounded down.

Parameters:
[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 Source 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