Threshold_LTValGTVal

Compare to upper and lower threshold values, replace with a specified value

Supported Technologies

MT, SSE2, Family10h

Synopsis

FwStatus   fwsThreshold_LTValGTVal_16s ( const Fw16s * pSrcFw16s * pDstint lenFw16s levelLTFw16s valueLTFw16s levelGTFw16s valueGT );
FwStatus   fwsThreshold_LTValGTVal_32s ( const Fw32s * pSrcFw32s * pDstint lenFw32s levelLTFw32s valueLTFw32s levelGTFw32s valueGT );
FwStatus   fwsThreshold_LTValGTVal_32f ( const Fw32f * pSrcFw32f * pDstint lenFw32f levelLTFw32f valueLTFw32f levelGTFw32f valueGT );
FwStatus   fwsThreshold_LTValGTVal_64f ( const Fw64f * pSrcFw64f * pDstint lenFw64f levelLTFw64f valueLTFw64f levelGTFw64f valueGT );
FwStatus   fwsThreshold_LTValGTVal_16s_I ( Fw16s * pSrcDstint lenFw16s levelLTFw16s valueLTFw16s levelGTFw16s valueGT );
FwStatus   fwsThreshold_LTValGTVal_32s_I ( Fw32s * pSrcDstint lenFw32s levelLTFw32s valueLTFw32s levelGTFw32s valueGT );
FwStatus   fwsThreshold_LTValGTVal_32f_I ( Fw32f * pSrcDstint lenFw32f levelLTFw32f valueLTFw32f levelGTFw32f valueGT );
FwStatus   fwsThreshold_LTValGTVal_64f_I ( Fw64f * pSrcDstint lenFw64f levelLTFw64f valueLTFw64f levelGTFw64f valueGT );

Parameters

len   Specifies the number of elements in a buffer.
levelGT   Specifies a threshold level for greater-than comparison.
levelLT   Specifies a threshold level for less-than comparison.
pDst   Pointer to a destination buffer.
pSrc   Pointer to a source buffer.
pSrcDst   Pointer to a buffer that is both the source and destination.
valueGT   Specifies a value to set when a greater-than comparison evaluates as true.
valueLT   Specifies a value to set when a less-than comparison evaluates as true.

Description

These functions step through vector elements in a source buffer and compare source data to two specified threshold values.

The levelLT parameter must be less than the levelGT parameter.

When the source data is less than levelLT, the function writes the value specified by valueLT.

When the source data is greater than the value specified by levelGT, the function writes the value specified by valueGT.

When the source data is within the range defined by levelLT and levelGT, the function writes the value of the source data.

Output data can be written to a destination buffer or back to the source buffer for in-place operation.

The following evaluation formulas are used.

           |valueLT, pSrc[n] < levelLT|
For fwThreshold_LTValGTVal:  pDst[n] = |pSrc[n], levelLT <= pSrc[n] <= levelGT  |      |
           |valueGT, pSrc[n] > levelGT|