Norm of difference L2
SSE2
FwStatus | fwsNormDiff_L2_32f | ( | const Fw32f * pSrc1, const Fw32f * pSrc2, int len, Fw32f * pNorm ); | |
FwStatus | fwsNormDiff_L2_64f | ( | const Fw64f * pSrc1, const Fw64f * pSrc2, int len, Fw64f * pNorm ); | |
FwStatus | fwsNormDiff_L2_16s32f | ( | const Fw16s * pSrc1, const Fw16s * pSrc2, int len, Fw32f * pNorm ); | |
FwStatus | fwsNormDiff_L2_32fc64f | ( | const Fw32fc * pSrc1, const Fw32fc * pSrc2, int len, Fw64f * pNorm ); | |
FwStatus | fwsNormDiff_L2_64fc64f | ( | const Fw64fc * pSrc1, const Fw64fc * pSrc2, int len, Fw64f * pNorm ); | |
FwStatus | fwsNormDiff_L2_16s32s_Sfs | ( | const Fw16s * pSrc1, const Fw16s * pSrc2, int len, Fw32s * pNorm, int scaleFactor ); |
len | Specifies the number of elements in a buffer. | |
pNorm | Pointer to the destination buffer that contains the NormC, NormL1, or NormL2 of the values in the source buffer, depending on the function call. | |
pSrc1 | Pointer to source buffer one. | |
pSrc2 | Pointer to source buffer two. | |
scaleFactor | Specifies an integer scaling factor for the Sfs operation. The returned result is multiplied by 2^(-scaleFactor). |
These functions step through vector elements in two source buffers, calculate the L2 Norm of the difference between the elements in buffer 1 and the elements in buffer 2, and write the value to a location specified by a pointer.
The following formula is used.
NormDiff = Sqrt(((n = 0) - (len-1)) Sum(Square(|pSrc1[n] - pSrc2[n]|))
The 16-bit signed to 32-bit signed version of the function performs an integer scaling operation on the result.