SDL_gfx  2.0.24
Defines | Functions
C:/Users/Andreas Schiffler/Desktop/Sources/sdlgfx/SDL_imageFilter.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "SDL_imageFilter.h"

Go to the source code of this file.

Defines

#define SWAP_32(x)   (((x) >> 24) | (((x) & 0x00ff0000) >> 8) | (((x) & 0x0000ff00) << 8) | ((x) << 24))
 Swaps the byte order in a 32bit integer (LSB becomes MSB, etc.).

Functions

unsigned int _cpuFlags ()
 Internal function returning the CPU flags.
int SDL_imageFilterMMXdetect (void)
 MMX detection routine (with override flag).
void SDL_imageFilterMMXoff ()
 Disable MMX check for filter functions and and force to use non-MMX C based code.
void SDL_imageFilterMMXon ()
 Enable MMX check for filter functions and use MMX code if available.
int SDL_imageFilterAddMMX (unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int SrcLength)
 Internal MMX Filter using Add: D = saturation255(S1 + S2)
int SDL_imageFilterAdd (unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
 Filter using Add: D = saturation255(S1 + S2)
int SDL_imageFilterMeanMMX (unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int SrcLength, unsigned char *Mask)
 Internal MMX Filter using Mean: D = S1/2 + S2/2.
int SDL_imageFilterMean (unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
 Filter using Mean: D = S1/2 + S2/2.
int SDL_imageFilterSubMMX (unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int SrcLength)
 Internal MMX Filter using Sub: D = saturation0(S1 - S2)
int SDL_imageFilterSub (unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
 Filter using Sub: D = saturation0(S1 - S2)
int SDL_imageFilterAbsDiffMMX (unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int SrcLength)
 Internal MMX Filter using AbsDiff: D = | S1 - S2 |.
int SDL_imageFilterAbsDiff (unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
 Filter using AbsDiff: D = | S1 - S2 |.
int SDL_imageFilterMultMMX (unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int SrcLength)
 Internal MMX Filter using Mult: D = saturation255(S1 * S2)
int SDL_imageFilterMult (unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
 Filter using Mult: D = saturation255(S1 * S2)
int SDL_imageFilterMultNorASM (unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int SrcLength)
 Internal ASM Filter using MultNor: D = S1 * S2.
int SDL_imageFilterMultNor (unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
 Filter using MultNor: D = S1 * S2.
int SDL_imageFilterMultDivby2MMX (unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int SrcLength)
 Internal MMX Filter using MultDivby2: D = saturation255(S1/2 * S2)
int SDL_imageFilterMultDivby2 (unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
 Filter using MultDivby2: D = saturation255(S1/2 * S2)
int SDL_imageFilterMultDivby4MMX (unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int SrcLength)
 Internal MMX Filter using MultDivby4: D = saturation255(S1/2 * S2/2)
int SDL_imageFilterMultDivby4 (unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
 Filter using MultDivby4: D = saturation255(S1/2 * S2/2)
int SDL_imageFilterBitAndMMX (unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int SrcLength)
 Internal MMX Filter using BitAnd: D = S1 & S2.
int SDL_imageFilterBitAnd (unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
 Filter using BitAnd: D = S1 & S2.
int SDL_imageFilterBitOrMMX (unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int SrcLength)
 Internal MMX Filter using BitOr: D = S1 | S2.
int SDL_imageFilterBitOr (unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
 Filter using BitOr: D = S1 | S2.
int SDL_imageFilterDivASM (unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int SrcLength)
 Internal ASM Filter using Div: D = S1 / S2.
int SDL_imageFilterDiv (unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length)
 Filter using Div: D = S1 / S2.
int SDL_imageFilterBitNegationMMX (unsigned char *Src1, unsigned char *Dest, unsigned int SrcLength)
 Internal MMX Filter using BitNegation: D = !S.
int SDL_imageFilterBitNegation (unsigned char *Src1, unsigned char *Dest, unsigned int length)
 Filter using BitNegation: D = !S.
int SDL_imageFilterAddByteMMX (unsigned char *Src1, unsigned char *Dest, unsigned int SrcLength, unsigned char C)
 Internal MMX Filter using AddByte: D = saturation255(S + C)
int SDL_imageFilterAddByte (unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char C)
 Filter using AddByte: D = saturation255(S + C)
int SDL_imageFilterAddUintMMX (unsigned char *Src1, unsigned char *Dest, unsigned int SrcLength, unsigned int C, unsigned int D)
 Internal MMX Filter using AddUint: D = saturation255((S[i] + Cs[i % 4]), Cs=Swap32((uint)C)
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)
int SDL_imageFilterAddByteToHalfMMX (unsigned char *Src1, unsigned char *Dest, unsigned int SrcLength, unsigned char C, unsigned char *Mask)
 Internal MMX Filter using AddByteToHalf: D = saturation255(S/2 + C)
int SDL_imageFilterAddByteToHalf (unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char C)
 Filter using AddByteToHalf: D = saturation255(S/2 + C)
int SDL_imageFilterSubByteMMX (unsigned char *Src1, unsigned char *Dest, unsigned int SrcLength, unsigned char C)
 Internal MMX Filter using SubByte: D = saturation0(S - C)
int SDL_imageFilterSubByte (unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char C)
 Filter using SubByte: D = saturation0(S - C)
int SDL_imageFilterSubUintMMX (unsigned char *Src1, unsigned char *Dest, unsigned int SrcLength, unsigned int C, unsigned int D)
 Internal MMX Filter using SubUint: D = saturation0(S[i] - Cs[i % 4]), Cs=Swap32((uint)C)
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)
int SDL_imageFilterShiftRightMMX (unsigned char *Src1, unsigned char *Dest, unsigned int SrcLength, unsigned char N, unsigned char *Mask)
 Internal MMX Filter using ShiftRight: D = saturation0(S >> N)
int SDL_imageFilterShiftRight (unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char N)
 Filter using ShiftRight: D = saturation0(S >> N)
int SDL_imageFilterShiftRightUintMMX (unsigned char *Src1, unsigned char *Dest, unsigned int SrcLength, unsigned char N)
 Internal MMX Filter using ShiftRightUint: D = saturation0((uint)S[i] >> N)
int SDL_imageFilterShiftRightUint (unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char N)
 Filter using ShiftRightUint: D = saturation0((uint)S[i] >> N)
int SDL_imageFilterMultByByteMMX (unsigned char *Src1, unsigned char *Dest, unsigned int SrcLength, unsigned char C)
 Internal MMX Filter using MultByByte: D = saturation255(S * C)
int SDL_imageFilterMultByByte (unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char C)
 Filter using MultByByte: D = saturation255(S * C)
int SDL_imageFilterShiftRightAndMultByByteMMX (unsigned char *Src1, unsigned char *Dest, unsigned int SrcLength, unsigned char N, unsigned char C)
 Internal MMX Filter using ShiftRightAndMultByByteMMX: D = saturation255((S >> N) * C)
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)
int SDL_imageFilterShiftLeftByteMMX (unsigned char *Src1, unsigned char *Dest, unsigned int SrcLength, unsigned char N, unsigned char *Mask)
 Internal MMX Filter using ShiftLeftByte: D = (S << N)
int SDL_imageFilterShiftLeftByte (unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char N)
 Filter using ShiftLeftByte: D = (S << N)
int SDL_imageFilterShiftLeftUintMMX (unsigned char *Src1, unsigned char *Dest, unsigned int SrcLength, unsigned char N)
 Internal MMX Filter using ShiftLeftUint: D = ((uint)S << N)
int SDL_imageFilterShiftLeftUint (unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char N)
 Filter using ShiftLeftUint: D = ((uint)S << N)
int SDL_imageFilterShiftLeftMMX (unsigned char *Src1, unsigned char *Dest, unsigned int SrcLength, unsigned char N)
 Internal MMX Filter ShiftLeft: D = saturation255(S << N)
int SDL_imageFilterShiftLeft (unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char N)
 Filter ShiftLeft: D = saturation255(S << N)
int SDL_imageFilterBinarizeUsingThresholdMMX (unsigned char *Src1, unsigned char *Dest, unsigned int SrcLength, unsigned char T)
 MMX BinarizeUsingThreshold: D = (S >= T) ? 255:0.
int SDL_imageFilterBinarizeUsingThreshold (unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char T)
 Filter using BinarizeUsingThreshold: D = (S >= T) ? 255:0.
int SDL_imageFilterClipToRangeMMX (unsigned char *Src1, unsigned char *Dest, unsigned int SrcLength, unsigned char Tmin, unsigned char Tmax)
 Internal MMX Filter using ClipToRange: D = (S >= Tmin) & (S <= Tmax) S:Tmin | Tmax.
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.
int SDL_imageFilterNormalizeLinearMMX (unsigned char *Src1, unsigned char *Dest, unsigned int SrcLength, int Cmin, int Cmax, int Nmin, int Nmax)
 Internal MMX Filter using NormalizeLinear: D = saturation255((Nmax - Nmin)/(Cmax - Cmin)*(S - Cmin) + Nmin)
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)
int SDL_imageFilterConvolveKernel3x3Divide (unsigned char *Src, unsigned char *Dest, int rows, int columns, signed short *Kernel, unsigned char Divisor)
 Filter using ConvolveKernel3x3Divide: Dij = saturation0and255( ... )
int SDL_imageFilterConvolveKernel5x5Divide (unsigned char *Src, unsigned char *Dest, int rows, int columns, signed short *Kernel, unsigned char Divisor)
 Filter using ConvolveKernel5x5Divide: Dij = saturation0and255( ... )
int SDL_imageFilterConvolveKernel7x7Divide (unsigned char *Src, unsigned char *Dest, int rows, int columns, signed short *Kernel, unsigned char Divisor)
 Filter using ConvolveKernel7x7Divide: Dij = saturation0and255( ... )
int SDL_imageFilterConvolveKernel9x9Divide (unsigned char *Src, unsigned char *Dest, int rows, int columns, signed short *Kernel, unsigned char Divisor)
 Filter using ConvolveKernel9x9Divide: Dij = saturation0and255( ... )
int SDL_imageFilterConvolveKernel3x3ShiftRight (unsigned char *Src, unsigned char *Dest, int rows, int columns, signed short *Kernel, unsigned char NRightShift)
 Filter using ConvolveKernel3x3ShiftRight: Dij = saturation0and255( ... )
int SDL_imageFilterConvolveKernel5x5ShiftRight (unsigned char *Src, unsigned char *Dest, int rows, int columns, signed short *Kernel, unsigned char NRightShift)
 Filter using ConvolveKernel5x5ShiftRight: Dij = saturation0and255( ... )
int SDL_imageFilterConvolveKernel7x7ShiftRight (unsigned char *Src, unsigned char *Dest, int rows, int columns, signed short *Kernel, unsigned char NRightShift)
 Filter using ConvolveKernel7x7ShiftRight: Dij = saturation0and255( ... )
int SDL_imageFilterConvolveKernel9x9ShiftRight (unsigned char *Src, unsigned char *Dest, int rows, int columns, signed short *Kernel, unsigned char NRightShift)
 Filter using ConvolveKernel9x9ShiftRight: Dij = saturation255( ... )
int SDL_imageFilterSobelX (unsigned char *Src, unsigned char *Dest, int rows, int columns)
 Filter using SobelX: Dij = saturation255( ... )
int SDL_imageFilterSobelXShiftRight (unsigned char *Src, unsigned char *Dest, int rows, int columns, unsigned char NRightShift)
 Filter using SobelXShiftRight: Dij = saturation255( ... )
void SDL_imageFilterAlignStack (void)
 Align stack to 32 byte boundary,.
void SDL_imageFilterRestoreStack (void)
 Restore previously aligned stack.

Define Documentation

#define SWAP_32 (   x)    (((x) >> 24) | (((x) & 0x00ff0000) >> 8) | (((x) & 0x0000ff00) << 8) | ((x) << 24))

Swaps the byte order in a 32bit integer (LSB becomes MSB, etc.).

Definition at line 49 of file SDL_imageFilter.c.


Function Documentation

unsigned int _cpuFlags ( )

Internal function returning the CPU flags.

Returns:
Flags of system CPU.

Definition at line 68 of file SDL_imageFilter.c.

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

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

Parameters:
Src1Pointer to the start of the first source byte array (S1).
Src2Pointer to the start of the second source byte array (S2).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source arrays.
Returns:
Returns 0 for success or -1 for error.

Definition at line 607 of file SDL_imageFilter.c.

int SDL_imageFilterAbsDiffMMX ( unsigned char *  Src1,
unsigned char *  Src2,
unsigned char *  Dest,
unsigned int  SrcLength 
)

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

Parameters:
Src1Pointer to the start of the first source byte array (S1).
Src2Pointer to the start of the second source byte array (S2).
DestPointer to the start of the destination byte array (D).
SrcLengthThe number of bytes in the source arrays.
Returns:
Returns 0 for success or -1 for error.

Definition at line 538 of file SDL_imageFilter.c.

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

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

Parameters:
Src1Pointer to the start of the first source byte array (S1).
Src2Pointer to the start of the second source byte array (S2).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source arrays.
Returns:
Returns 0 for success or -1 for error.

Definition at line 207 of file SDL_imageFilter.c.

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

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

Parameters:
Src1Pointer to the start of the source byte array (S).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source array.
CConstant value to add (C).
Returns:
Returns 0 for success or -1 for error.

Definition at line 1808 of file SDL_imageFilter.c.

int SDL_imageFilterAddByteMMX ( unsigned char *  Src1,
unsigned char *  Dest,
unsigned int  SrcLength,
unsigned char  C 
)

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

Parameters:
Src1Pointer to the start of the source byte array (S).
DestPointer to the start of the destination byte array (D).
SrcLengthThe number of bytes in the source array.
CConstant value to add (C).
Returns:
Returns 0 for success or -1 for error.

Definition at line 1727 of file SDL_imageFilter.c.

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

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

Parameters:
Src1Pointer to the start of the source byte array (S).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source array.
CConstant to add (C).
Returns:
Returns 0 for success or -1 for error.

Definition at line 2115 of file SDL_imageFilter.c.

int SDL_imageFilterAddByteToHalfMMX ( unsigned char *  Src1,
unsigned char *  Dest,
unsigned int  SrcLength,
unsigned char  C,
unsigned char *  Mask 
)

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

Parameters:
Src1Pointer to the start of the source byte array (S).
DestPointer to the start of the destination byte array (D).
SrcLengthThe number of bytes in the source array.
CConstant to add (C).
MaskPointer to 8 mask bytes of value 0x7F.
Returns:
Returns 0 for success or -1 for error.

Definition at line 2023 of file SDL_imageFilter.c.

int SDL_imageFilterAddMMX ( unsigned char *  Src1,
unsigned char *  Src2,
unsigned char *  Dest,
unsigned int  SrcLength 
)

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

Parameters:
Src1Pointer to the start of the first source byte array (S1).
Src2Pointer to the start of the second source byte array (S2).
DestPointer to the start of the destination byte array (D).
SrcLengthThe number of bytes in the source arrays.
Returns:
Returns 0 for success or -1 for error.

Definition at line 144 of file SDL_imageFilter.c.

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:
Src1Pointer to the start of the source byte array (S).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source array.
CConstant to add (C).
Returns:
Returns 0 for success or -1 for error.

Definition at line 1949 of file SDL_imageFilter.c.

int SDL_imageFilterAddUintMMX ( unsigned char *  Src1,
unsigned char *  Dest,
unsigned int  SrcLength,
unsigned int  C,
unsigned int  D 
)

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

Parameters:
Src1Pointer to the start of the source byte array (S).
DestPointer to the start of the destination byte array (D).
SrcLengthThe number of bytes in the source array.
CConstant to add (C).
DByteorder-swapped constant to add (Cs).
Returns:
Returns 0 for success or -1 for error.

Definition at line 1874 of file SDL_imageFilter.c.

void SDL_imageFilterAlignStack ( void  )

Align stack to 32 byte boundary,.

Definition at line 7537 of file SDL_imageFilter.c.

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

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

Parameters:
Src1Pointer to the start of the source byte array (S).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source array.
TThe threshold boundary (inclusive).
Returns:
Returns 0 for success or -1 for error.

Definition at line 3717 of file SDL_imageFilter.c.

int SDL_imageFilterBinarizeUsingThresholdMMX ( unsigned char *  Src1,
unsigned char *  Dest,
unsigned int  SrcLength,
unsigned char  T 
)

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

Parameters:
Src1Pointer to the start of the source byte array (S).
DestPointer to the start of the destination byte array (D).
SrcLengthThe number of bytes in the source array.
TThe threshold boundary (inclusive).
Returns:
Returns 0 for success or -1 for error.

Definition at line 3629 of file SDL_imageFilter.c.

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

Filter using BitAnd: D = S1 & S2.

Parameters:
Src1Pointer to the start of the first source byte array (S1).
Src2Pointer to the start of the second source byte array (S2).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source arrays.
Returns:
Returns 0 for success or -1 for error.

Definition at line 1312 of file SDL_imageFilter.c.

int SDL_imageFilterBitAndMMX ( unsigned char *  Src1,
unsigned char *  Src2,
unsigned char *  Dest,
unsigned int  SrcLength 
)

Internal MMX Filter using BitAnd: D = S1 & S2.

Parameters:
Src1Pointer to the start of the first source byte array (S1).
Src2Pointer to the start of the second source byte array (S2).
DestPointer to the start of the destination byte array (D).
SrcLengthThe number of bytes in the source arrays.
Returns:
Returns 0 for success or -1 for error.

Definition at line 1249 of file SDL_imageFilter.c.

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

Filter using BitNegation: D = !S.

Parameters:
Src1Pointer to the start of the source byte array (S).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source array.
Returns:
Returns 0 for success or -1 for error.

Definition at line 1674 of file SDL_imageFilter.c.

int SDL_imageFilterBitNegationMMX ( unsigned char *  Src1,
unsigned char *  Dest,
unsigned int  SrcLength 
)

Internal MMX Filter using BitNegation: D = !S.

Parameters:
Src1Pointer to the start of the source byte array (S1).
DestPointer to the start of the destination byte array (D).
SrcLengthThe number of bytes in the source array.
Returns:
Returns 0 for success or -1 for error.

Definition at line 1615 of file SDL_imageFilter.c.

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

Filter using BitOr: D = S1 | S2.

Parameters:
Src1Pointer to the start of the first source byte array (S1).
Src2Pointer to the start of the second source byte array (S2).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source arrays.
Returns:
Returns 0 for success or -1 for error.

Definition at line 1434 of file SDL_imageFilter.c.

int SDL_imageFilterBitOrMMX ( unsigned char *  Src1,
unsigned char *  Src2,
unsigned char *  Dest,
unsigned int  SrcLength 
)

Internal MMX Filter using BitOr: D = S1 | S2.

Parameters:
Src1Pointer to the start of the first source byte array (S1).
Src2Pointer to the start of the second source byte array (S2).
DestPointer to the start of the destination byte array (D).
SrcLengthThe number of bytes in the source arrays.
Returns:
Returns 0 for success or -1 for error.

Definition at line 1371 of file SDL_imageFilter.c.

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:
Src1Pointer to the start of the source byte array (S).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source array.
TminLower (inclusive) boundary of the clipping range.
TmaxUpper (inclusive) boundary of the clipping range.
Returns:
Returns 0 for success or -1 for error.

Definition at line 3890 of file SDL_imageFilter.c.

int SDL_imageFilterClipToRangeMMX ( unsigned char *  Src1,
unsigned char *  Dest,
unsigned int  SrcLength,
unsigned char  Tmin,
unsigned char  Tmax 
)

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

Parameters:
Src1Pointer to the start of the source byte array (S).
DestPointer to the start of the destination byte array (D).
SrcLengthThe number of bytes in the source array.
TminLower (inclusive) boundary of the clipping range.
TmaxUpper (inclusive) boundary of the clipping range.
Returns:
Returns 0 for success or -1 for error.

Definition at line 3778 of file SDL_imageFilter.c.

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:
SrcThe source 2D byte array to convolve. Should be different from destination.
DestThe destination 2D byte array to store the result in. Should be different from source.
rowsNumber of rows in source/destination array. Must be >2.
columnsNumber of columns in source/destination array. Must be >2.
KernelThe 2D convolution kernel of size 3x3.
DivisorThe 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 4201 of file SDL_imageFilter.c.

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:
SrcThe source 2D byte array to convolve. Should be different from destination.
DestThe destination 2D byte array to store the result in. Should be different from source.
rowsNumber of rows in source/destination array. Must be >2.
columnsNumber of columns in source/destination array. Must be >2.
KernelThe 2D convolution kernel of size 3x3.
NRightShiftThe 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 5595 of file SDL_imageFilter.c.

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:
SrcThe source 2D byte array to convolve. Should be different from destination.
DestThe destination 2D byte array to store the result in. Should be different from source.
rowsNumber of rows in source/destination array. Must be >4.
columnsNumber of columns in source/destination array. Must be >4.
KernelThe 2D convolution kernel of size 5x5.
DivisorThe 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 4390 of file SDL_imageFilter.c.

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:
SrcThe source 2D byte array to convolve. Should be different from destination.
DestThe destination 2D byte array to store the result in. Should be different from source.
rowsNumber of rows in source/destination array. Must be >4.
columnsNumber of columns in source/destination array. Must be >4.
KernelThe 2D convolution kernel of size 5x5.
NRightShiftThe 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 5771 of file SDL_imageFilter.c.

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:
SrcThe source 2D byte array to convolve. Should be different from destination.
DestThe destination 2D byte array to store the result in. Should be different from source.
rowsNumber of rows in source/destination array. Must be >6.
columnsNumber of columns in source/destination array. Must be >6.
KernelThe 2D convolution kernel of size 7x7.
DivisorThe 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 4692 of file SDL_imageFilter.c.

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:
SrcThe source 2D byte array to convolve. Should be different from destination.
DestThe destination 2D byte array to store the result in. Should be different from source.
rowsNumber of rows in source/destination array. Must be >6.
columnsNumber of columns in source/destination array. Must be >6.
KernelThe 2D convolution kernel of size 7x7.
NRightShiftThe 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 6071 of file SDL_imageFilter.c.

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:
SrcThe source 2D byte array to convolve. Should be different from destination.
DestThe destination 2D byte array to store the result in. Should be different from source.
rowsNumber of rows in source/destination array. Must be >8.
columnsNumber of columns in source/destination array. Must be >8.
KernelThe 2D convolution kernel of size 9x9.
DivisorThe 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 5048 of file SDL_imageFilter.c.

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:
SrcThe source 2D byte array to convolve. Should be different from destination.
DestThe destination 2D byte array to store the result in. Should be different from source.
rowsNumber of rows in source/destination array. Must be >8.
columnsNumber of columns in source/destination array. Must be >8.
KernelThe 2D convolution kernel of size 9x9.
NRightShiftThe 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 6433 of file SDL_imageFilter.c.

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

Filter using Div: D = S1 / S2.

Parameters:
Src1Pointer to the start of the first source byte array (S1).
Src2Pointer to the start of the second source byte array (S2).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source arrays.
Returns:
Returns 0 for success or -1 for error.

Definition at line 1561 of file SDL_imageFilter.c.

int SDL_imageFilterDivASM ( unsigned char *  Src1,
unsigned char *  Src2,
unsigned char *  Dest,
unsigned int  SrcLength 
)

Internal ASM Filter using Div: D = S1 / S2.

Parameters:
Src1Pointer to the start of the first source byte array (S1).
Src2Pointer to the start of the second source byte array (S2).
DestPointer to the start of the destination byte array (D).
SrcLengthThe number of bytes in the source arrays.
Returns:
Returns 0 for success or -1 for error.

Definition at line 1490 of file SDL_imageFilter.c.

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

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

Parameters:
Src1Pointer to the start of the first source byte array (S1).
Src2Pointer to the start of the second source byte array (S2).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source arrays.
Returns:
Returns 0 for success or -1 for error.

Definition at line 356 of file SDL_imageFilter.c.

int SDL_imageFilterMeanMMX ( unsigned char *  Src1,
unsigned char *  Src2,
unsigned char *  Dest,
unsigned int  SrcLength,
unsigned char *  Mask 
)

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

Parameters:
Src1Pointer to the start of the first source byte array (S1).
Src2Pointer to the start of the second source byte array (S2).
DestPointer to the start of the destination byte array (D).
SrcLengthThe number of bytes in the source arrays.
MaskMask array containing 8 bytes with 0x7F value. ]
Returns:
Returns 0 for success or -1 for error.

Definition at line 269 of file SDL_imageFilter.c.

int SDL_imageFilterMMXdetect ( void  )

MMX detection routine (with override flag).

Returns:
1 of MMX was detected, 0 otherwise.

Definition at line 100 of file SDL_imageFilter.c.

void SDL_imageFilterMMXoff ( void  )

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

Definition at line 119 of file SDL_imageFilter.c.

void SDL_imageFilterMMXon ( void  )

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

Definition at line 127 of file SDL_imageFilter.c.

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

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

Parameters:
Src1Pointer to the start of the first source byte array (S1).
Src2Pointer to the start of the second source byte array (S2).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source arrays.
Returns:
Returns 0 for success or -1 for error.

Definition at line 766 of file SDL_imageFilter.c.

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

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

Parameters:
Src1Pointer to the start of the source byte array (S).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source arrays.
CConstant to multiply with (C).
Returns:
Returns 0 for success or -1 for error.

Definition at line 2903 of file SDL_imageFilter.c.

int SDL_imageFilterMultByByteMMX ( unsigned char *  Src1,
unsigned char *  Dest,
unsigned int  SrcLength,
unsigned char  C 
)

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

Parameters:
Src1Pointer to the start of the source byte array (S).
DestPointer to the start of the destination byte array (D).
SrcLengthThe number of bytes in the source array.
CConstant to multiply with (C).
Returns:
Returns 0 for success or -1 for error.

Definition at line 2762 of file SDL_imageFilter.c.

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

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

Parameters:
Src1Pointer to the start of the first source byte array (S1).
Src2Pointer to the start of the second source byte array (S2).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source arrays.
Returns:
Returns 0 for success or -1 for error.

Definition at line 1038 of file SDL_imageFilter.c.

int SDL_imageFilterMultDivby2MMX ( unsigned char *  Src1,
unsigned char *  Src2,
unsigned char *  Dest,
unsigned int  SrcLength 
)

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

Parameters:
Src1Pointer to the start of the first source byte array (S1).
Src2Pointer to the start of the second source byte array (S2).
DestPointer to the start of the destination byte array (D).
SrcLengthThe number of bytes in the source arrays.
Returns:
Returns 0 for success or -1 for error.

Definition at line 951 of file SDL_imageFilter.c.

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:
Src1Pointer to the start of the first source byte array (S1).
Src2Pointer to the start of the second source byte array (S2).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source arrays.
Returns:
Returns 0 for success or -1 for error.

Definition at line 1189 of file SDL_imageFilter.c.

int SDL_imageFilterMultDivby4MMX ( unsigned char *  Src1,
unsigned char *  Src2,
unsigned char *  Dest,
unsigned int  SrcLength 
)

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

Parameters:
Src1Pointer to the start of the first source byte array (S1).
Src2Pointer to the start of the second source byte array (S2).
DestPointer to the start of the destination byte array (D).
SrcLengthThe number of bytes in the source arrays.
Returns:
Returns 0 for success or -1 for error.

Definition at line 1098 of file SDL_imageFilter.c.

int SDL_imageFilterMultMMX ( unsigned char *  Src1,
unsigned char *  Src2,
unsigned char *  Dest,
unsigned int  SrcLength 
)

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

Parameters:
Src1Pointer to the start of the first source byte array (S1).
Src2Pointer to the start of the second source byte array (S2).
DestPointer to the start of the destination byte array (D).
SrcLengthThe number of bytes in the source arrays.
Returns:
Returns 0 for success or -1 for error.

Definition at line 665 of file SDL_imageFilter.c.

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

Filter using MultNor: D = S1 * S2.

Parameters:
Src1Pointer to the start of the first source byte array (S1).
Src2Pointer to the start of the second source byte array (S2).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source arrays.
Returns:
Returns 0 for success or -1 for error.

Definition at line 888 of file SDL_imageFilter.c.

int SDL_imageFilterMultNorASM ( unsigned char *  Src1,
unsigned char *  Src2,
unsigned char *  Dest,
unsigned int  SrcLength 
)

Internal ASM Filter using MultNor: D = S1 * S2.

Parameters:
Src1Pointer to the start of the first source byte array (S1).
Src2Pointer to the start of the second source byte array (S2).
DestPointer to the start of the destination byte array (D).
SrcLengthThe number of bytes in the source arrays.
Returns:
Returns 0 for success or -1 for error.

Definition at line 829 of file SDL_imageFilter.c.

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:
SrcPointer to the start of the source byte array (S).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source array.
CminNormalization constant.
CmaxNormalization constant.
NminNormalization constant.
NmaxNormalization constant.
Returns:
Returns 0 for success or -1 for error.

Definition at line 4130 of file SDL_imageFilter.c.

int SDL_imageFilterNormalizeLinearMMX ( unsigned char *  Src1,
unsigned char *  Dest,
unsigned int  SrcLength,
int  Cmin,
int  Cmax,
int  Nmin,
int  Nmax 
)

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

Parameters:
Src1Pointer to the start of the source byte array (S).
DestPointer to the start of the destination byte array (D).
SrcLengthThe number of bytes in the source array.
CminNormalization constant (Cmin).
CmaxNormalization constant (Cmax).
NminNormalization constant (Nmin).
NmaxNormalization constant (Nmax).
Returns:
Returns 0 for success or -1 for error.

Definition at line 3960 of file SDL_imageFilter.c.

void SDL_imageFilterRestoreStack ( void  )

Restore previously aligned stack.

Definition at line 7565 of file SDL_imageFilter.c.

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

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

Parameters:
Src1Pointer to the start of the source byte array (S1).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source array.
NNumber of bit-positions to shift (N). Valid range is 0 to 8.
Returns:
Returns 0 for success or -1 for error.

Definition at line 3562 of file SDL_imageFilter.c.

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

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

Parameters:
Src1Pointer to the start of the source byte array (S).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source arrays.
NNumber of bit-positions to shift (N). Valid range is 0 to 8.
Returns:
Returns 0 for success or -1 for error.

Definition at line 3237 of file SDL_imageFilter.c.

int SDL_imageFilterShiftLeftByteMMX ( unsigned char *  Src1,
unsigned char *  Dest,
unsigned int  SrcLength,
unsigned char  N,
unsigned char *  Mask 
)

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

Parameters:
Src1Pointer to the start of the source byte array (S).
DestPointer to the start of the destination byte array (D).
SrcLengthThe number of bytes in the source arrays.
NNumber of bit-positions to shift (N). Valid range is 0 to 8.
MaskByte array containing 8 bytes of 0xFE value.
Returns:
Returns 0 for success or -1 for error.

Definition at line 3147 of file SDL_imageFilter.c.

int SDL_imageFilterShiftLeftMMX ( unsigned char *  Src1,
unsigned char *  Dest,
unsigned int  SrcLength,
unsigned char  N 
)

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

Parameters:
Src1Pointer to the start of the source byte array (S1).
DestPointer to the start of the destination byte array (D).
SrcLengthThe number of bytes in the source array.
NNumber of bit-positions to shift (N). Valid range is 0 to 8.
Returns:
Returns 0 for success or -1 for error.

Definition at line 3434 of file SDL_imageFilter.c.

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

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

Parameters:
Src1Pointer to the start of the source byte array (S).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source array.
NNumber of bit-positions to shift (N). Valid range is 0 to 32.
Returns:
Returns 0 for success or -1 for error.

Definition at line 3364 of file SDL_imageFilter.c.

int SDL_imageFilterShiftLeftUintMMX ( unsigned char *  Src1,
unsigned char *  Dest,
unsigned int  SrcLength,
unsigned char  N 
)

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

Parameters:
Src1Pointer to the start of the source byte array (S).
DestPointer to the start of the destination byte array (D).
SrcLengthThe number of bytes in the source array.
NNumber of bit-positions to shift (N). Valid range is 0 to 32.
Returns:
Returns 0 for success or -1 for error.

Definition at line 3303 of file SDL_imageFilter.c.

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

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

Parameters:
Src1Pointer to the start of the source byte array (S).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source array.
NNumber of bit-positions to shift (N). Valid range is 0 to 8.
Returns:
Returns 0 for success or -1 for error.

Definition at line 2564 of file SDL_imageFilter.c.

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:
Src1Pointer to the start of the source byte array (S).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source array.
NNumber of bit-positions to shift (N). Valid range is 0 to 8.
CConstant to multiply with (C).
Returns:
Returns 0 for success or -1 for error.

Definition at line 3074 of file SDL_imageFilter.c.

int SDL_imageFilterShiftRightAndMultByByteMMX ( unsigned char *  Src1,
unsigned char *  Dest,
unsigned int  SrcLength,
unsigned char  N,
unsigned char  C 
)

Internal MMX Filter using ShiftRightAndMultByByteMMX: D = saturation255((S >> N) * C)

Parameters:
Src1Pointer to the start of the source byte array (S).
DestPointer to the start of the destination byte array (D).
SrcLengthThe number of bytes in the source array.
NNumber of bit-positions to shift (N). Valid range is 0 to 8.
CConstant to multiply with (C).
Returns:
Returns 0 for success or -1 for error.

Definition at line 2970 of file SDL_imageFilter.c.

int SDL_imageFilterShiftRightMMX ( unsigned char *  Src1,
unsigned char *  Dest,
unsigned int  SrcLength,
unsigned char  N,
unsigned char *  Mask 
)

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

Parameters:
Src1Pointer to the start of the source byte array (S).
DestPointer to the start of the destination byte array (D).
SrcLengthThe number of bytes in the source array.
NNumber of bit-positions to shift (N). Valid range is 0 to 8.
MaskByte array containing 8 bytes with 0x7F value.
Returns:
Returns 0 for success or -1 for error.

Definition at line 2471 of file SDL_imageFilter.c.

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:
Src1Pointer to the start of the source byte array (S1).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source array.
NNumber of bit-positions to shift (N). Valid range is 0 to 32.
Returns:
Returns 0 for success or -1 for error.

Definition at line 2692 of file SDL_imageFilter.c.

int SDL_imageFilterShiftRightUintMMX ( unsigned char *  Src1,
unsigned char *  Dest,
unsigned int  SrcLength,
unsigned char  N 
)

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

Parameters:
Src1Pointer to the start of the source byte array (S1).
DestPointer to the start of the destination byte array (D).
SrcLengthThe number of bytes in the source array.
NNumber of bit-positions to shift (N).
Returns:
Returns 0 for success or -1 for error.

Definition at line 2631 of file SDL_imageFilter.c.

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

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

Parameters:
SrcThe source 2D byte array to sobel-filter. Should be different from destination.
DestThe destination 2D byte array to store the result in. Should be different from source.
rowsNumber of rows in source/destination array. Must be >2.
columnsNumber 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 7012 of file SDL_imageFilter.c.

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

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

Parameters:
SrcThe source 2D byte array to sobel-filter. Should be different from destination.
DestThe destination 2D byte array to store the result in. Should be different from source.
rowsNumber of rows in source/destination array. Must be >2.
columnsNumber of columns in source/destination array. Must be >8.
NRightShiftThe 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 7264 of file SDL_imageFilter.c.

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

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

Parameters:
Src1Pointer to the start of the first source byte array (S1).
Src2Pointer to the start of the second source byte array (S2).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source arrays.
Returns:
Returns 0 for success or -1 for error.

Definition at line 478 of file SDL_imageFilter.c.

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

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

Parameters:
Src1Pointer to the start of the source byte array (S).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source arrays.
CConstant to subtract (C).
Returns:
Returns 0 for success or -1 for error.

Definition at line 2256 of file SDL_imageFilter.c.

int SDL_imageFilterSubByteMMX ( unsigned char *  Src1,
unsigned char *  Dest,
unsigned int  SrcLength,
unsigned char  C 
)

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

Parameters:
Src1Pointer to the start of the source byte array (S).
DestPointer to the start of the destination byte array (D).
SrcLengthThe number of bytes in the source array.
CConstant to subtract (C).
Returns:
Returns 0 for success or -1 for error.

Definition at line 2177 of file SDL_imageFilter.c.

int SDL_imageFilterSubMMX ( unsigned char *  Src1,
unsigned char *  Src2,
unsigned char *  Dest,
unsigned int  SrcLength 
)

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

Parameters:
Src1Pointer to the start of the first source byte array (S1).
Src2Pointer to the start of the second source byte array (S2).
DestPointer to the start of the destination byte array (D).
SrcLengthThe number of bytes in the source arrays.
Returns:
Returns 0 for success or -1 for error.

Definition at line 415 of file SDL_imageFilter.c.

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:
Src1Pointer to the start of the source byte array (S1).
DestPointer to the start of the destination byte array (D).
lengthThe number of bytes in the source array.
CConstant to subtract (C).
Returns:
Returns 0 for success or -1 for error.

Definition at line 2397 of file SDL_imageFilter.c.

int SDL_imageFilterSubUintMMX ( unsigned char *  Src1,
unsigned char *  Dest,
unsigned int  SrcLength,
unsigned int  C,
unsigned int  D 
)

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

Parameters:
Src1Pointer to the start of the source byte array (S).
DestPointer to the start of the destination byte array (D).
SrcLengthThe number of bytes in the source array.
CConstant to subtract (C).
DByteorder-swapped constant to subtract (Cs).
Returns:
Returns 0 for success or -1 for error.

Definition at line 2323 of file SDL_imageFilter.c.