SDL_gfx 2.0.25

- Main Page
- Data Structures
- Files

- File List
- Globals

Defines | Functions
I:/Sources/sdlgfx/SDL_imageFilter.h File Reference

Go to the source code of this file.

## Defines

#define | SDL_IMAGEFILTER_SCOPE extern

## Functions

SDL_IMAGEFILTER_SCOPE int | SDL_imageFilterMMXdetect (void)
| MMX detection routine (with override flag).
SDL_IMAGEFILTER_SCOPE void | SDL_imageFilterMMXoff (void)
| Disable MMX check for filter functions and and force to use non-MMX C based code.
SDL_IMAGEFILTER_SCOPE void | SDL_imageFilterMMXon (void)
| Enable MMX check for filter functions and use MMX code if available.
SDL_IMAGEFILTER_SCOPE int | SDL_imageFilterAdd (unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
| Filter using Add: D = saturation255(S1 + S2)
SDL_IMAGEFILTER_SCOPE int | SDL_imageFilterMean (unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
| Filter using Mean: D = S1/2 + S2/2.
SDL_IMAGEFILTER_SCOPE int | SDL_imageFilterSub (unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
| Filter using Sub: D = saturation0(S1 - S2)
SDL_IMAGEFILTER_SCOPE int | SDL_imageFilterAbsDiff (unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
| Filter using AbsDiff: D = | S1 - S2 |.
SDL_IMAGEFILTER_SCOPE int | SDL_imageFilterMult (unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
| Filter using Mult: D = saturation255(S1 * S2)
SDL_IMAGEFILTER_SCOPE int | SDL_imageFilterMultNor (unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
| Filter using MultNor: D = S1 * S2.
SDL_IMAGEFILTER_SCOPE int | SDL_imageFilterMultDivby2 (unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
| Filter using MultDivby2: D = saturation255(S1/2 * S2)
SDL_IMAGEFILTER_SCOPE int | SDL_imageFilterMultDivby4 (unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
| Filter using MultDivby4: D = saturation255(S1/2 * S2/2)
SDL_IMAGEFILTER_SCOPE int | SDL_imageFilterBitAnd (unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
| Filter using BitAnd: D = S1 & S2.
SDL_IMAGEFILTER_SCOPE int | SDL_imageFilterBitOr (unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
| Filter using BitOr: D = S1 | S2.
SDL_IMAGEFILTER_SCOPE int | SDL_imageFilterDiv (unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
| Filter using Div: D = S1 / S2.
SDL_IMAGEFILTER_SCOPE int | SDL_imageFilterBitNegation (unsigned char *Src1, unsigned char *Dest, unsigned int length)
| Filter using BitNegation: D = !S.
SDL_IMAGEFILTER_SCOPE int | SDL_imageFilterAddByte (unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char C)
| Filter using AddByte: D = saturation255(S + C)
SDL_IMAGEFILTER_SCOPE int | SDL_imageFilterAddUint (unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned int C)
| Filter using AddUint: D = saturation255((S[i] + Cs[i % 4]), Cs=Swap32((uint)C)
SDL_IMAGEFILTER_SCOPE int | SDL_imageFilterAddByteToHalf (unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char C)
| Filter using AddByteToHalf: D = saturation255(S/2 + C)
SDL_IMAGEFILTER_SCOPE int | SDL_imageFilterSubByte (unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char C)
| Filter using SubByte: D = saturation0(S - C)
SDL_IMAGEFILTER_SCOPE int | SDL_imageFilterSubUint (unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned int C)
| Filter using SubUint: D = saturation0(S[i] - Cs[i % 4]), Cs=Swap32((uint)C)
SDL_IMAGEFILTER_SCOPE int | SDL_imageFilterShiftRight (unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char N)
| Filter using ShiftRight: D = saturation0(S >> N)
SDL_IMAGEFILTER_SCOPE int | SDL_imageFilterShiftRightUint (unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char N)
| Filter using ShiftRightUint: D = saturation0((uint)S[i] >> N)
SDL_IMAGEFILTER_SCOPE int | SDL_imageFilterMultByByte (unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char C)
| Filter using MultByByte: D = saturation255(S * C)
SDL_IMAGEFILTER_SCOPE int | SDL_imageFilterShiftRightAndMultByByte (unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char N, unsigned char C)
| Filter using ShiftRightAndMultByByte: D = saturation255((S >> N) * C)
SDL_IMAGEFILTER_SCOPE int | SDL_imageFilterShiftLeftByte (unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char N)
| Filter using ShiftLeftByte: D = (S << N)
SDL_IMAGEFILTER_SCOPE int | SDL_imageFilterShiftLeftUint (unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char N)
| Filter using ShiftLeftUint: D = ((uint)S << N)
SDL_IMAGEFILTER_SCOPE int | SDL_imageFilterShiftLeft (unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char N)
| Filter ShiftLeft: D = saturation255(S << N)
SDL_IMAGEFILTER_SCOPE int | SDL_imageFilterBinarizeUsingThreshold (unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char T)
| Filter using BinarizeUsingThreshold: D = (S >= T) ? 255:0.
SDL_IMAGEFILTER_SCOPE int | SDL_imageFilterClipToRange (unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char Tmin, unsigned char Tmax)
| Filter using ClipToRange: D = (S >= Tmin) & (S <= Tmax) S:Tmin | Tmax.
SDL_IMAGEFILTER_SCOPE int | SDL_imageFilterNormalizeLinear (unsigned char *Src, unsigned char *Dest, unsigned int length, int Cmin, int Cmax, int Nmin, int Nmax)
| Filter using NormalizeLinear: D = saturation255((Nmax - Nmin)/(Cmax - Cmin)*(S - Cmin) + Nmin)
SDL_IMAGEFILTER_SCOPE int | SDL_imageFilterConvolveKernel3x3Divide (unsigned char *Src, unsigned char *Dest, int rows, int columns, signed short *Kernel, unsigned char Divisor)
| Filter using ConvolveKernel3x3Divide: Dij = saturation0and255( ... )
SDL_IMAGEFILTER_SCOPE int | SDL_imageFilterConvolveKernel5x5Divide (unsigned char *Src, unsigned char *Dest, int rows, int columns, signed short *Kernel, unsigned char Divisor)
| Filter using ConvolveKernel5x5Divide: Dij = saturation0and255( ... )
SDL_IMAGEFILTER_SCOPE int | SDL_imageFilterConvolveKernel7x7Divide (unsigned char *Src, unsigned char *Dest, int rows, int columns, signed short *Kernel, unsigned char Divisor)
| Filter using ConvolveKernel7x7Divide: Dij = saturation0and255( ... )
SDL_IMAGEFILTER_SCOPE int | SDL_imageFilterConvolveKernel9x9Divide (unsigned char *Src, unsigned char *Dest, int rows, int columns, signed short *Kernel, unsigned char Divisor)
| Filter using ConvolveKernel9x9Divide: Dij = saturation0and255( ... )
SDL_IMAGEFILTER_SCOPE int | SDL_imageFilterConvolveKernel3x3ShiftRight (unsigned char *Src, unsigned char *Dest, int rows, int columns, signed short *Kernel, unsigned char NRightShift)
| Filter using ConvolveKernel3x3ShiftRight: Dij = saturation0and255( ... )
SDL_IMAGEFILTER_SCOPE int | SDL_imageFilterConvolveKernel5x5ShiftRight (unsigned char *Src, unsigned char *Dest, int rows, int columns, signed short *Kernel, unsigned char NRightShift)
| Filter using ConvolveKernel5x5ShiftRight: Dij = saturation0and255( ... )
SDL_IMAGEFILTER_SCOPE int | SDL_imageFilterConvolveKernel7x7ShiftRight (unsigned char *Src, unsigned char *Dest, int rows, int columns, signed short *Kernel, unsigned char NRightShift)
| Filter using ConvolveKernel7x7ShiftRight: Dij = saturation0and255( ... )
SDL_IMAGEFILTER_SCOPE int | SDL_imageFilterConvolveKernel9x9ShiftRight (unsigned char *Src, unsigned char *Dest, int rows, int columns, signed short *Kernel, unsigned char NRightShift)
| Filter using ConvolveKernel9x9ShiftRight: Dij = saturation255( ... )
SDL_IMAGEFILTER_SCOPE int | SDL_imageFilterSobelX (unsigned char *Src, unsigned char *Dest, int rows, int columns)
| Filter using SobelX: Dij = saturation255( ... )
SDL_IMAGEFILTER_SCOPE int | SDL_imageFilterSobelXShiftRight (unsigned char *Src, unsigned char *Dest, int rows, int columns, unsigned char NRightShift)
| Filter using SobelXShiftRight: Dij = saturation255( ... )
SDL_IMAGEFILTER_SCOPE void | SDL_imageFilterAlignStack (void)
| Align stack to 32 byte boundary,.
SDL_IMAGEFILTER_SCOPE void | SDL_imageFilterRestoreStack (void)
| Restore previously aligned stack.

## Define Documentation

#define SDL_IMAGEFILTER_SCOPE extern

Definition at line 50 of file SDL_imageFilter.h.

## Function Documentation

SDL_IMAGEFILTER_SCOPE int SDL_imageFilterAbsDiff | ( | unsigned char * | Src1,
|  | unsigned char * | Src2,
|  | unsigned char * | Dest,
|  | unsigned int | length
| ) |  |

Filter using AbsDiff: D = | S1 - S2 |.

Parameters:

  Src1 | Pointer to the start of the first source byte array (S1).
  Src2 | Pointer to the start of the second source byte array (S2).
  Dest | Pointer to the start of the destination byte array (D).
  length | The number of bytes in the source arrays.

Returns:
  Returns 0 for success or -1 for error.

Definition at line 539 of file SDL_imageFilter.c.

SDL_IMAGEFILTER_SCOPE int SDL_imageFilterAdd | ( | unsigned char * | Src1,
|  | unsigned char * | Src2,
|  | unsigned char * | Dest,
|  | unsigned int | length
| ) |  |

Filter using Add: D = saturation255(S1 + S2)

Parameters:

  Src1 | Pointer to the start of the first source byte array (S1).
  Src2 | Pointer to the start of the second source byte array (S2).
  Dest | Pointer to the start of the destination byte array (D).
  length | The number of bytes in the source arrays.

Returns:
  Returns 0 for success or -1 for error.

Definition at line 170 of file SDL_imageFilter.c.

SDL_IMAGEFILTER_SCOPE int SDL_imageFilterAddByte | ( | unsigned char * | Src1,
|  | unsigned char * | Dest,
|  | unsigned int | length,
|  | unsigned char | C
| ) |  |

Filter using AddByte: D = saturation255(S + C)

Parameters:

  Src1 | Pointer to the start of the source byte array (S).
  Dest | Pointer to the start of the destination byte array (D).
  length | The number of bytes in the source array.
  C | Constant value to add (C).

Returns:
  Returns 0 for success or -1 for error.

Definition at line 1788 of file SDL_imageFilter.c.

SDL_IMAGEFILTER_SCOPE int SDL_imageFilterAddByteToHalf | ( | unsigned char * | Src1,
|  | unsigned char * | Dest,
|  | unsigned int | length,
|  | unsigned char | C
| ) |  |

Filter using AddByteToHalf: D = saturation255(S/2 + C)

Parameters:

  Src1 | Pointer to the start of the source byte array (S).
  Dest | Pointer to the start of the destination byte array (D).
  length | The number of bytes in the source array.
  C | Constant to add (C).

Returns:
  Returns 0 for success or -1 for error.

Definition at line 2065 of file SDL_imageFilter.c.

SDL_IMAGEFILTER_SCOPE int SDL_imageFilterAddUint | ( | unsigned char * | Src1,
|  | unsigned char * | Dest,
|  | unsigned int | length,
|  | unsigned int | C
| ) |  |

Filter using AddUint: D = saturation255((S[i] + Cs[i % 4]), Cs=Swap32((uint)C)

Parameters:

  Src1 | Pointer to the start of the source byte array (S).
  Dest | Pointer to the start of the destination byte array (D).
  length | The number of bytes in the source array.
  C | Constant to add (C).

Returns:
  Returns 0 for success or -1 for error.

Definition at line 1916 of file SDL_imageFilter.c.

SDL_IMAGEFILTER_SCOPE void SDL_imageFilterAlignStack | ( | void |  | ) |

Align stack to 32 byte boundary,.

Definition at line 7323 of file SDL_imageFilter.c.

SDL_IMAGEFILTER_SCOPE int SDL_imageFilterBinarizeUsingThreshold | ( | unsigned char * | Src1,
|  | unsigned char * | Dest,
|  | unsigned int | length,
|  | unsigned char | T
| ) |  |

Filter using BinarizeUsingThreshold: D = (S >= T) ? 255:0.

Parameters:

  Src1 | Pointer to the start of the source byte array (S).
  Dest | Pointer to the start of the destination byte array (D).
  length | The number of bytes in the source array.
  T | The threshold boundary (inclusive).

Returns:
  Returns 0 for success or -1 for error.

Definition at line 3531 of file SDL_imageFilter.c.

SDL_IMAGEFILTER_SCOPE int SDL_imageFilterBitAnd | ( | unsigned char * | Src1,
|  | unsigned char * | Src2,
|  | unsigned char * | Dest,
|  | unsigned int | length
| ) |  |

Filter using BitAnd: D = S1 & S2.

Parameters:

  Src1 | Pointer to the start of the first source byte array (S1).
  Src2 | Pointer to the start of the second source byte array (S2).
  Dest | Pointer to the start of the destination byte array (D).
  length | The number of bytes in the source arrays.

Returns:
  Returns 0 for success or -1 for error.

Definition at line 1275 of file SDL_imageFilter.c.

SDL_IMAGEFILTER_SCOPE int SDL_imageFilterBitNegation | ( | unsigned char * | Src1,
|  | unsigned char * | Dest,
|  | unsigned int | length
| ) |  |

Filter using BitNegation: D = !S.

Parameters:

  Src1 | Pointer to the start of the source byte array (S).
  Dest | Pointer to the start of the destination byte array (D).
  length | The number of bytes in the source array.

Returns:
  Returns 0 for success or -1 for error.

Definition at line 1668 of file SDL_imageFilter.c.

SDL_IMAGEFILTER_SCOPE int SDL_imageFilterBitOr | ( | unsigned char * | Src1,
|  | unsigned char * | Src2,
|  | unsigned char * | Dest,
|  | unsigned int | length
| ) |  |

Filter using BitOr: D = S1 | S2.

Parameters:

  Src1 | Pointer to the start of the first source byte array (S1).
  Src2 | Pointer to the start of the second source byte array (S2).
  Dest | Pointer to the start of the destination byte array (D).
  length | The number of bytes in the source arrays.

Returns:
  Returns 0 for success or -1 for error.

Definition at line 1389 of file SDL_imageFilter.c.

SDL_IMAGEFILTER_SCOPE int SDL_imageFilterClipToRange | ( | unsigned char * | Src1,
|  | unsigned char * | Dest,
|  | unsigned int | length,
|  | unsigned char | Tmin,
|  | unsigned char | Tmax
| ) |  |

Filter using ClipToRange: D = (S >= Tmin) & (S <= Tmax) S:Tmin | Tmax.

Parameters:

  Src1 | Pointer to the start of the source byte array (S).
  Dest | Pointer to the start of the destination byte array (D).
  length | The number of bytes in the source array.
  Tmin | Lower (inclusive) boundary of the clipping range.
  Tmax | Upper (inclusive) boundary of the clipping range.

Returns:
  Returns 0 for success or -1 for error.

Definition at line 3688 of file SDL_imageFilter.c.

SDL_IMAGEFILTER_SCOPE int SDL_imageFilterConvolveKernel3x3Divide | ( | unsigned char * | Src,
|  | unsigned char * | Dest,
|  | int | rows,
|  | int | columns,
|  | signed short * | Kernel,
|  | unsigned char | Divisor
| ) |  |

Filter using ConvolveKernel3x3Divide: Dij = saturation0and255( ... )

Parameters:

  Src | The source 2D byte array to convolve. Should be different from destination.
  Dest | The destination 2D byte array to store the result in. Should be different from source.
  rows | Number of rows in source/destination array. Must be >2.
  columns | Number of columns in source/destination array. Must be >2.
  Kernel | The 2D convolution kernel of size 3x3.
  Divisor | The divisor of the convolution sum. Must be >0.

Note: Non-MMX implementation not available for this function.

Returns:
  Returns 1 if filter was applied, 0 otherwise.

Definition at line 3977 of file SDL_imageFilter.c.

SDL_IMAGEFILTER_SCOPE int SDL_imageFilterConvolveKernel3x3ShiftRight | ( | unsigned char * | Src,
|  | unsigned char * | Dest,
|  | int | rows,
|  | int | columns,
|  | signed short * | Kernel,
|  | unsigned char | NRightShift
| ) |  |

Filter using ConvolveKernel3x3ShiftRight: Dij = saturation0and255( ... )

Parameters:

  Src | The source 2D byte array to convolve. Should be different from destination.
  Dest | The destination 2D byte array to store the result in. Should be different from source.
  rows | Number of rows in source/destination array. Must be >2.
  columns | Number of columns in source/destination array. Must be >2.
  Kernel | The 2D convolution kernel of size 3x3.
  NRightShift | The number of right bit shifts to apply to the convolution sum. Must be <7.

Note: Non-MMX implementation not available for this function.

Returns:
  Returns 1 if filter was applied, 0 otherwise.

Definition at line 5375 of file SDL_imageFilter.c.

SDL_IMAGEFILTER_SCOPE int SDL_imageFilterConvolveKernel5x5Divide | ( | unsigned char * | Src,
|  | unsigned char * | Dest,
|  | int | rows,
|  | int | columns,
|  | signed short * | Kernel,
|  | unsigned char | Divisor
| ) |  |

Filter using ConvolveKernel5x5Divide: Dij = saturation0and255( ... )

Parameters:

  Src | The source 2D byte array to convolve. Should be different from destination.
  Dest | The destination 2D byte array to store the result in. Should be different from source.
  rows | Number of rows in source/destination array. Must be >4.
  columns | Number of columns in source/destination array. Must be >4.
  Kernel | The 2D convolution kernel of size 5x5.
  Divisor | The divisor of the convolution sum. Must be >0.

Note: Non-MMX implementation not available for this function.

Returns:
  Returns 1 if filter was applied, 0 otherwise.

Definition at line 4167 of file SDL_imageFilter.c.

SDL_IMAGEFILTER_SCOPE int SDL_imageFilterConvolveKernel5x5ShiftRight | ( | unsigned char * | Src,
|  | unsigned char * | Dest,
|  | int | rows,
|  | int | columns,
|  | signed short * | Kernel,
|  | unsigned char | NRightShift
| ) |  |

Filter using ConvolveKernel5x5ShiftRight: Dij = saturation0and255( ... )

Parameters:

  Src | The source 2D byte array to convolve. Should be different from destination.
  Dest | The destination 2D byte array to store the result in. Should be different from source.
  rows | Number of rows in source/destination array. Must be >4.
  columns | Number of columns in source/destination array. Must be >4.
  Kernel | The 2D convolution kernel of size 5x5.
  NRightShift | The number of right bit shifts to apply to the convolution sum. Must be <7.

Note: Non-MMX implementation not available for this function.

Returns:
  Returns 1 if filter was applied, 0 otherwise.

Definition at line 5552 of file SDL_imageFilter.c.

SDL_IMAGEFILTER_SCOPE int SDL_imageFilterConvolveKernel7x7Divide | ( | unsigned char * | Src,
|  | unsigned char * | Dest,
|  | int | rows,
|  | int | columns,
|  | signed short * | Kernel,
|  | unsigned char | Divisor
| ) |  |

Filter using ConvolveKernel7x7Divide: Dij = saturation0and255( ... )

Parameters:

  Src | The source 2D byte array to convolve. Should be different from destination.
  Dest | The destination 2D byte array to store the result in. Should be different from source.
  rows | Number of rows in source/destination array. Must be >6.
  columns | Number of columns in source/destination array. Must be >6.
  Kernel | The 2D convolution kernel of size 7x7.
  Divisor | The divisor of the convolution sum. Must be >0.

Note: Non-MMX implementation not available for this function.

Returns:
  Returns 1 if filter was applied, 0 otherwise.

Definition at line 4470 of file SDL_imageFilter.c.

SDL_IMAGEFILTER_SCOPE int SDL_imageFilterConvolveKernel7x7ShiftRight | ( | unsigned char * | Src,
|  | unsigned char * | Dest,
|  | int | rows,
|  | int | columns,
|  | signed short * | Kernel,
|  | unsigned char | NRightShift
| ) |  |

Filter using ConvolveKernel7x7ShiftRight: Dij = saturation0and255( ... )

Parameters:

  Src | The source 2D byte array to convolve. Should be different from destination.
  Dest | The destination 2D byte array to store the result in. Should be different from source.
  rows | Number of rows in source/destination array. Must be >6.
  columns | Number of columns in source/destination array. Must be >6.
  Kernel | The 2D convolution kernel of size 7x7.
  NRightShift | The number of right bit shifts to apply to the convolution sum. Must be <7.

Note: Non-MMX implementation not available for this function.

Returns:
  Returns 1 if filter was applied, 0 otherwise.

Definition at line 5853 of file SDL_imageFilter.c.

SDL_IMAGEFILTER_SCOPE int SDL_imageFilterConvolveKernel9x9Divide | ( | unsigned char * | Src,
|  | unsigned char * | Dest,
|  | int | rows,
|  | int | columns,
|  | signed short * | Kernel,
|  | unsigned char | Divisor
| ) |  |

Filter using ConvolveKernel9x9Divide: Dij = saturation0and255( ... )

Parameters:

  Src | The source 2D byte array to convolve. Should be different from destination.
  Dest | The destination 2D byte array to store the result in. Should be different from source.
  rows | Number of rows in source/destination array. Must be >8.
  columns | Number of columns in source/destination array. Must be >8.
  Kernel | The 2D convolution kernel of size 9x9.
  Divisor | The divisor of the convolution sum. Must be >0.

Note: Non-MMX implementation not available for this function.

Returns:
  Returns 1 if filter was applied, 0 otherwise.

Definition at line 4827 of file SDL_imageFilter.c.

SDL_IMAGEFILTER_SCOPE int SDL_imageFilterConvolveKernel9x9ShiftRight | ( | unsigned char * | Src,
|  | unsigned char * | Dest,
|  | int | rows,
|  | int | columns,
|  | signed short * | Kernel,
|  | unsigned char | NRightShift
| ) |  |

Filter using ConvolveKernel9x9ShiftRight: Dij = saturation255( ... )

Parameters:

  Src | The source 2D byte array to convolve. Should be different from destination.
  Dest | The destination 2D byte array to store the result in. Should be different from source.
  rows | Number of rows in source/destination array. Must be >8.
  columns | Number of columns in source/destination array. Must be >8.
  Kernel | The 2D convolution kernel of size 9x9.
  NRightShift | The number of right bit shifts to apply to the convolution sum. Must be <7.

Note: Non-MMX implementation not available for this function.

Returns:
  Returns 1 if filter was applied, 0 otherwise.

Definition at line 6216 of file SDL_imageFilter.c.

SDL_IMAGEFILTER_SCOPE int SDL_imageFilterDiv | ( | unsigned char * | Src1,
|  | unsigned char * | Src2,
|  | unsigned char * | Dest,
|  | unsigned int | length
| ) |  |

Filter using Div: D = S1 / S2.

Parameters:

  Src1 | Pointer to the start of the first source byte array (S1).
  Src2 | Pointer to the start of the second source byte array (S2).
  Dest | Pointer to the start of the destination byte array (D).
  length | The number of bytes in the source arrays.

Returns:
  Returns 0 for success or -1 for error.

Definition at line 1546 of file SDL_imageFilter.c.

SDL_IMAGEFILTER_SCOPE int SDL_imageFilterMean | ( | unsigned char * | Src1,
|  | unsigned char * | Src2,
|  | unsigned char * | Dest,
|  | unsigned int | length
| ) |  |

Filter using Mean: D = S1/2 + S2/2.

Parameters:

  Src1 | Pointer to the start of the first source byte array (S1).
  Src2 | Pointer to the start of the second source byte array (S2).
  Dest | Pointer to the start of the destination byte array (D).
  length | The number of bytes in the source arrays.

Returns:
  Returns 0 for success or -1 for error.

Definition at line 305 of file SDL_imageFilter.c.

SDL_IMAGEFILTER_SCOPE int SDL_imageFilterMMXdetect | ( | void |  | ) |

MMX detection routine (with override flag).

Returns:
  1 of MMX was detected, 0 otherwise.

Definition at line 77 of file SDL_imageFilter.c.

SDL_IMAGEFILTER_SCOPE void SDL_imageFilterMMXoff | ( | void |  | ) |

Disable MMX check for filter functions and and force to use non-MMX C based code.

Definition at line 90 of file SDL_imageFilter.c.

SDL_IMAGEFILTER_SCOPE void SDL_imageFilterMMXon | ( | void |  | ) |

Enable MMX check for filter functions and use MMX code if available.

Definition at line 98 of file SDL_imageFilter.c.

SDL_IMAGEFILTER_SCOPE int SDL_imageFilterMult | ( | unsigned char * | Src1,
|  | unsigned char * | Src2,
|  | unsigned char * | Dest,
|  | unsigned int | length
| ) |  |

Filter using Mult: D = saturation255(S1 * S2)

Parameters:

  Src1 | Pointer to the start of the first source byte array (S1).
  Src2 | Pointer to the start of the second source byte array (S2).
  Dest | Pointer to the start of the destination byte array (D).
  length | The number of bytes in the source arrays.

Returns:
  Returns 0 for success or -1 for error.

Definition at line 726 of file SDL_imageFilter.c.

SDL_IMAGEFILTER_SCOPE int SDL_imageFilterMultByByte | ( | unsigned char * | Src1,
|  | unsigned char * | Dest,
|  | unsigned int | length,
|  | unsigned char | C
| ) |  |

Filter using MultByByte: D = saturation255(S * C)

Parameters:

  Src1 | Pointer to the start of the source byte array (S).
  Dest | Pointer to the start of the destination byte array (D).
  length | The number of bytes in the source arrays.
  C | Constant to multiply with (C).

Returns:
  Returns 0 for success or -1 for error.

Definition at line 2787 of file SDL_imageFilter.c.

SDL_IMAGEFILTER_SCOPE int SDL_imageFilterMultDivby2 | ( | unsigned char * | Src1,
|  | unsigned char * | Src2,
|  | unsigned char * | Dest,
|  | unsigned int | length
| ) |  |

Filter using MultDivby2: D = saturation255(S1/2 * S2)

Parameters:

  Src1 | Pointer to the start of the first source byte array (S1).
  Src2 | Pointer to the start of the second source byte array (S2).
  Dest | Pointer to the start of the destination byte array (D).
  length | The number of bytes in the source arrays.

Returns:
  Returns 0 for success or -1 for error.

Definition at line 997 of file SDL_imageFilter.c.

SDL_IMAGEFILTER_SCOPE int SDL_imageFilterMultDivby4 | ( | unsigned char * | Src1,
|  | unsigned char * | Src2,
|  | unsigned char * | Dest,
|  | unsigned int | length
| ) |  |

Filter using MultDivby4: D = saturation255(S1/2 * S2/2)

Parameters:

  Src1 | Pointer to the start of the first source byte array (S1).
  Src2 | Pointer to the start of the second source byte array (S2).
  Dest | Pointer to the start of the destination byte array (D).
  length | The number of bytes in the source arrays.

Returns:
  Returns 0 for success or -1 for error.

Definition at line 1138 of file SDL_imageFilter.c.

SDL_IMAGEFILTER_SCOPE int SDL_imageFilterMultNor | ( | unsigned char * | Src1,
|  | unsigned char * | Src2,
|  | unsigned char * | Dest,
|  | unsigned int | length
| ) |  |

Filter using MultNor: D = S1 * S2.

Parameters:

  Src1 | Pointer to the start of the first source byte array (S1).
  Src2 | Pointer to the start of the second source byte array (S2).
  Dest | Pointer to the start of the destination byte array (D).
  length | The number of bytes in the source arrays.

Returns:
  Returns 0 for success or -1 for error.

Definition at line 859 of file SDL_imageFilter.c.

SDL_IMAGEFILTER_SCOPE int SDL_imageFilterNormalizeLinear | ( | unsigned char * | Src,
|  | unsigned char * | Dest,
|  | unsigned int | length,
|  | int | Cmin,
|  | int | Cmax,
|  | int | Nmin,
|  | int | Nmax
| ) |  |

Filter using NormalizeLinear: D = saturation255((Nmax - Nmin)/(Cmax - Cmin)*(S - Cmin) + Nmin)

Parameters:

  Src | Pointer to the start of the source byte array (S).
  Dest | Pointer to the start of the destination byte array (D).
  length | The number of bytes in the source array.
  Cmin | Normalization constant.
  Cmax | Normalization constant.
  Nmin | Normalization constant.
  Nmax | Normalization constant.

Returns:
  Returns 0 for success or -1 for error.

Definition at line 3906 of file SDL_imageFilter.c.

SDL_IMAGEFILTER_SCOPE void SDL_imageFilterRestoreStack | ( | void |  | ) |

Restore previously aligned stack.

Definition at line 7351 of file SDL_imageFilter.c.

SDL_IMAGEFILTER_SCOPE int SDL_imageFilterShiftLeft | ( | unsigned char * | Src1,
|  | unsigned char * | Dest,
|  | unsigned int | length,
|  | unsigned char | N
| ) |  |

Filter ShiftLeft: D = saturation255(S << N)

Parameters:

  Src1 | Pointer to the start of the source byte array (S1).
  Dest | Pointer to the start of the destination byte array (D).
  length | The number of bytes in the source array.
  N | Number of bit-positions to shift (N). Valid range is 0 to 8.

Returns:
  Returns 0 for success or -1 for error.

Definition at line 3390 of file SDL_imageFilter.c.

SDL_IMAGEFILTER_SCOPE int SDL_imageFilterShiftLeftByte | ( | unsigned char * | Src1,
|  | unsigned char * | Dest,
|  | unsigned int | length,
|  | unsigned char | N
| ) |  |

Filter using ShiftLeftByte: D = (S << N)

Parameters:

  Src1 | Pointer to the start of the source byte array (S).
  Dest | Pointer to the start of the destination byte array (D).
  length | The number of bytes in the source arrays.
  N | Number of bit-positions to shift (N). Valid range is 0 to 8.

Returns:
  Returns 0 for success or -1 for error.

Definition at line 3090 of file SDL_imageFilter.c.

SDL_IMAGEFILTER_SCOPE int SDL_imageFilterShiftLeftUint | ( | unsigned char * | Src1,
|  | unsigned char * | Dest,
|  | unsigned int | length,
|  | unsigned char | N
| ) |  |

Filter using ShiftLeftUint: D = ((uint)S << N)

Parameters:

  Src1 | Pointer to the start of the source byte array (S).
  Dest | Pointer to the start of the destination byte array (D).
  length | The number of bytes in the source array.
  N | Number of bit-positions to shift (N). Valid range is 0 to 32.

Returns:
  Returns 0 for success or -1 for error.

Definition at line 3207 of file SDL_imageFilter.c.

SDL_IMAGEFILTER_SCOPE int SDL_imageFilterShiftRight | ( | unsigned char * | Src1,
|  | unsigned char * | Dest,
|  | unsigned int | length,
|  | unsigned char | N
| ) |  |

Filter using ShiftRight: D = saturation0(S >> N)

Parameters:

  Src1 | Pointer to the start of the source byte array (S).
  Dest | Pointer to the start of the destination byte array (D).
  length | The number of bytes in the source array.
  N | Number of bit-positions to shift (N). Valid range is 0 to 8.

Returns:
  Returns 0 for success or -1 for error.

Definition at line 2473 of file SDL_imageFilter.c.

SDL_IMAGEFILTER_SCOPE int SDL_imageFilterShiftRightAndMultByByte | ( | unsigned char * | Src1,
|  | unsigned char * | Dest,
|  | unsigned int | length,
|  | unsigned char | N,
|  | unsigned char | C
| ) |  |

Filter using ShiftRightAndMultByByte: D = saturation255((S >> N) * C)

Parameters:

  Src1 | Pointer to the start of the source byte array (S).
  Dest | Pointer to the start of the destination byte array (D).
  length | The number of bytes in the source array.
  N | Number of bit-positions to shift (N). Valid range is 0 to 8.
  C | Constant to multiply with (C).

Returns:
  Returns 0 for success or -1 for error.

Definition at line 2940 of file SDL_imageFilter.c.

SDL_IMAGEFILTER_SCOPE int SDL_imageFilterShiftRightUint | ( | unsigned char * | Src1,
|  | unsigned char * | Dest,
|  | unsigned int | length,
|  | unsigned char | N
| ) |  |

Filter using ShiftRightUint: D = saturation0((uint)S[i] >> N)

Parameters:

  Src1 | Pointer to the start of the source byte array (S1).
  Dest | Pointer to the start of the destination byte array (D).
  length | The number of bytes in the source array.
  N | Number of bit-positions to shift (N). Valid range is 0 to 32.

Returns:
  Returns 0 for success or -1 for error.

Definition at line 2591 of file SDL_imageFilter.c.

SDL_IMAGEFILTER_SCOPE int SDL_imageFilterSobelX | ( | unsigned char * | Src,
|  | unsigned char * | Dest,
|  | int | rows,
|  | int | columns
| ) |  |

Filter using SobelX: Dij = saturation255( ... )

Parameters:

  Src | The source 2D byte array to sobel-filter. Should be different from destination.
  Dest | The destination 2D byte array to store the result in. Should be different from source.
  rows | Number of rows in source/destination array. Must be >2.
  columns | Number of columns in source/destination array. Must be >7.

Note: Non-MMX implementation not available for this function.

Returns:
  Returns 1 if filter was applied, 0 otherwise.

Definition at line 6796 of file SDL_imageFilter.c.

SDL_IMAGEFILTER_SCOPE int SDL_imageFilterSobelXShiftRight | ( | unsigned char * | Src,
|  | unsigned char * | Dest,
|  | int | rows,
|  | int | columns,
|  | unsigned char | NRightShift
| ) |  |

Filter using SobelXShiftRight: Dij = saturation255( ... )

Parameters:

  Src | The source 2D byte array to sobel-filter. Should be different from destination.
  Dest | The destination 2D byte array to store the result in. Should be different from source.
  rows | Number of rows in source/destination array. Must be >2.
  columns | Number of columns in source/destination array. Must be >8.
  NRightShift | The number of right bit shifts to apply to the filter sum. Must be <7.

Note: Non-MMX implementation not available for this function.

Returns:
  Returns 1 if filter was applied, 0 otherwise.

Definition at line 7049 of file SDL_imageFilter.c.

SDL_IMAGEFILTER_SCOPE int SDL_imageFilterSub | ( | unsigned char * | Src1,
|  | unsigned char * | Src2,
|  | unsigned char * | Dest,
|  | unsigned int | length
| ) |  |

Filter using Sub: D = saturation0(S1 - S2)

Parameters:

  Src1 | Pointer to the start of the first source byte array (S1).
  Src2 | Pointer to the start of the second source byte array (S2).
  Dest | Pointer to the start of the destination byte array (D).
  length | The number of bytes in the source arrays.

Returns:
  Returns 0 for success or -1 for error.

Definition at line 419 of file SDL_imageFilter.c.

SDL_IMAGEFILTER_SCOPE int SDL_imageFilterSubByte | ( | unsigned char * | Src1,
|  | unsigned char * | Dest,
|  | unsigned int | length,
|  | unsigned char | C
| ) |  |

Filter using SubByte: D = saturation0(S - C)

Parameters:

  Src1 | Pointer to the start of the source byte array (S).
  Dest | Pointer to the start of the destination byte array (D).
  length | The number of bytes in the source arrays.
  C | Constant to subtract (C).

Returns:
  Returns 0 for success or -1 for error.

Definition at line 2193 of file SDL_imageFilter.c.

SDL_IMAGEFILTER_SCOPE int SDL_imageFilterSubUint | ( | unsigned char * | Src1,
|  | unsigned char * | Dest,
|  | unsigned int | length,
|  | unsigned int | C
| ) |  |

Filter using SubUint: D = saturation0(S[i] - Cs[i % 4]), Cs=Swap32((uint)C)

Parameters:

  Src1 | Pointer to the start of the source byte array (S1).
  Dest | Pointer to the start of the destination byte array (D).
  length | The number of bytes in the source array.
  C | Constant to subtract (C).

Returns:
  Returns 0 for success or -1 for error.

Definition at line 2322 of file SDL_imageFilter.c.