c_integer_math_ops.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void c_intg_low_pass_5_x_dec_x_manybits (const int *src, const int w, const int h, int *dst, const int w2)
void c_intg_low_pass_5_y_dec_y_manybits (const int *src, const int w, const int h, int *dst, const int h2)
void c_intg_low_pass_5_x_dec_x_fewbits (const int *src, const int w, const int h, int *dst, const int w2)
void c_intg_low_pass_5_y_dec_y_fewbits (const int *src, const int w, const int h, int *dst, const int h2)
void c_intg_low_pass_5_x_dec_x_fewbits_optim (const int *src, const int w, const int h, int *dst, const int w2)
void c_intg_low_pass_5_y_dec_y_fewbits_optim (const int *src, const int w, const int h, int *dst, const int h2)
void c_intg_low_pass_9_x_manybits (const int *src, const int w, const int h, int *dst)
 Convolve in the x direction with a 9-point binomial kernel.
void c_intg_low_pass_9_y_manybits (const int *src, const int w, const int h, int *dst)
 Convolve in the y direction with a 9-point binomial kernel.
void c_intg_low_pass_9_x_fewbits (const int *src, const int w, const int h, int *dst)
 Convolve in the x direction with a 9-point binomial kernel.
void c_intg_low_pass_9_y_fewbits (const int *src, const int w, const int h, int *dst)
 Convolve in the y direction with a 9-point binomial kernel.
void c_intg_low_pass_9_x_fewbits_optim (const int *src, const int w, const int h, int *dst)
 Like c_intg_low_pass_9_x_fewbits() but uses optimized filter coefficients.
void c_intg_low_pass_9_y_fewbits_optim (const int *src, const int w, const int h, int *dst)
 Like c_intg_low_pass_9_y_fewbits() but uses optimized filter coefficients.
void c_intg_x_filter_clean_manybits (const int *src, const int w, const int h, const int *hf_flipped, const int hfs, const int shiftbits, int *dst)
 function for reasonably large images
void c_intg_x_filter_clean_fewbits (const int *src, const int w, const int h, const int *hf_flipped, const int hfs, const int shiftbits, int *dst)
 function for reasonably large images
void c_intg_x_filter_clean_small_manybits (const int *src, const int w, const int h, const int *hf_flipped, const int hfs, const int shiftbits, int *dst)
 special function for very small images
void c_intg_x_filter_clean_small_fewbits (const int *src, const int w, const int h, const int *hf_flipped, const int hfs, const int shiftbits, int *dst)
 special function for very small images
void c_intg_y_filter_clean_manybits (const int *src, const int w, const int h, const int *vf_flipped, const int vfs, const int shiftbits, int *dst)
 function for reasonably large images
void c_intg_y_filter_clean_fewbits (const int *src, const int w, const int h, const int *vf_flipped, const int vfs, const int shiftbits, int *dst)
 function for reasonably large images
void c_intg_y_filter_clean_small_manybits (const int *src, const int w, const int h, const int *vf_flipped, const int vfs, const int shiftbits, int *dst)
 special function for very small images
void c_intg_y_filter_clean_small_fewbits (const int *src, const int w, const int h, const int *vf_flipped, const int vfs, const int shiftbits, int *dst)
 special function for very small images

Detailed Description

Fixed-point integer math versions of some of our floating-point Image functions

Definition in file c_integer_math_ops.h.


Function Documentation

void c_intg_low_pass_9_x_fewbits ( const int *  src,
const int  w,
const int  h,
int *  dst 
)

Convolve in the x direction with a 9-point binomial kernel.

The kernel is {1, 8, 28, 56, 70, 56, 28, 8, 1}, summing to 256

Parameters:
src pointer to the source image, w*h row-major
w width of the source and destination images
h height of the source and destination images
dst pointer to the destination image, w*h row-major

Internally, this algorithm multiplies each input pixel by the corresponding filter coefficient, accumulates across the 9 filter points, and then divides by the sum of the filter coefficients. Thus it is appropriate when the input relatively few precision bits giving room for doing the multiply/accumulate prior to the divide, but not when the input has many precision bits and would require an early division to avoid overflow. For a 32-bit int, a reasonable cutoff point is 18 bits -- if the input has fewer than 18 bits, use this algorithm, otherwise use the manybits functions (see above).

Definition at line 777 of file c_integer_math_ops.c.

References ASSERT.

Referenced by IntegerMathEngine::paramChanged().

void c_intg_low_pass_9_x_fewbits_optim ( const int *  src,
const int  w,
const int  h,
int *  dst 
)

Like c_intg_low_pass_9_x_fewbits() but uses optimized filter coefficients.

Definition at line 1070 of file c_integer_math_ops.c.

References ASSERT.

Referenced by IntegerMathEngine::paramChanged().

void c_intg_low_pass_9_x_manybits ( const int *  src,
const int  w,
const int  h,
int *  dst 
)

Convolve in the x direction with a 9-point binomial kernel.

The kernel is {1, 8, 28, 56, 70, 56, 28, 8, 1}, summing to 256

Parameters:
src pointer to the source image, w*h row-major
w width of the source and destination images
h height of the source and destination images
dst pointer to the destination image, w*h row-major

Internally, this algorithm divides each of the source values by the sum of the filter coefficients, then multiplies by the coefficient and accumulates. Thus it is appropriate when the input has many precision bits and would overflow if multiplied by the fitler coefficient without dividing first, but is not appropriate when the input has few bits and would underflow as a result of the early division. For a 32-bit int, a reasonable cutoff point is 18 bits -- if the input has 18 bits or more, use this algorithm, otherwise use the fewbits functions (see below).

Definition at line 590 of file c_integer_math_ops.c.

References ASSERT.

Referenced by IntegerMathEngine::paramChanged().

void c_intg_low_pass_9_y_fewbits ( const int *  src,
const int  w,
const int  h,
int *  dst 
)

Convolve in the y direction with a 9-point binomial kernel.

Like c_intg_low_pass_9_y_fewbits(), but convolves in the y direction instead of the x direction.

Definition at line 866 of file c_integer_math_ops.c.

References ASSERT.

Referenced by IntegerMathEngine::paramChanged().

void c_intg_low_pass_9_y_fewbits_optim ( const int *  src,
const int  w,
const int  h,
int *  dst 
)

Like c_intg_low_pass_9_y_fewbits() but uses optimized filter coefficients.

Definition at line 1137 of file c_integer_math_ops.c.

References ASSERT.

Referenced by IntegerMathEngine::paramChanged().

void c_intg_low_pass_9_y_manybits ( const int *  src,
const int  w,
const int  h,
int *  dst 
)

Convolve in the y direction with a 9-point binomial kernel.

Like c_intg_low_pass_9_y_manybits(), but convolves in the y direction instead of the x direction.

Definition at line 670 of file c_integer_math_ops.c.

References ASSERT.

Referenced by IntegerMathEngine::paramChanged().

void c_intg_x_filter_clean_fewbits ( const int *  src,
const int  w,
const int  h,
const int *  hf_flipped,
const int  hfs,
const int  shiftbits,
int *  dst 
)

function for reasonably large images

Definition at line 1284 of file c_integer_math_ops.c.

References ASSERT, and sum().

void c_intg_x_filter_clean_manybits ( const int *  src,
const int  w,
const int  h,
const int *  hf_flipped,
const int  hfs,
const int  shiftbits,
int *  dst 
)

function for reasonably large images

Definition at line 1226 of file c_integer_math_ops.c.

References ASSERT, and sum().

void c_intg_x_filter_clean_small_fewbits ( const int *  src,
const int  w,
const int  h,
const int *  hf_flipped,
const int  hfs,
const int  shiftbits,
int *  dst 
)

special function for very small images

Definition at line 1373 of file c_integer_math_ops.c.

References ASSERT, and sum().

void c_intg_x_filter_clean_small_manybits ( const int *  src,
const int  w,
const int  h,
const int *  hf_flipped,
const int  hfs,
const int  shiftbits,
int *  dst 
)

special function for very small images

Definition at line 1342 of file c_integer_math_ops.c.

References ASSERT, and sum().

void c_intg_y_filter_clean_fewbits ( const int *  src,
const int  w,
const int  h,
const int *  vf_flipped,
const int  vfs,
const int  shiftbits,
int *  dst 
)

function for reasonably large images

Definition at line 1468 of file c_integer_math_ops.c.

References ASSERT, and sum().

void c_intg_y_filter_clean_manybits ( const int *  src,
const int  w,
const int  h,
const int *  vf_flipped,
const int  vfs,
const int  shiftbits,
int *  dst 
)

function for reasonably large images

Definition at line 1403 of file c_integer_math_ops.c.

References ASSERT, and sum().

void c_intg_y_filter_clean_small_fewbits ( const int *  src,
const int  w,
const int  h,
const int *  vf_flipped,
const int  vfs,
const int  shiftbits,
int *  dst 
)

special function for very small images

Definition at line 1564 of file c_integer_math_ops.c.

References ASSERT, and sum().

void c_intg_y_filter_clean_small_manybits ( const int *  src,
const int  w,
const int  h,
const int *  vf_flipped,
const int  vfs,
const int  shiftbits,
int *  dst 
)

special function for very small images

Definition at line 1533 of file c_integer_math_ops.c.

References ASSERT, and sum().

Generated on Sun May 8 08:42:40 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3