AddWeighted

Add weighted

Supported Technologies

MT, SSE2

Synopsis

FwStatus   fwiAddWeighted_8u32f_C1IR ( const Fw8u * pSrc, int srcStep, Fw32f * pSrcDst, int srcDstStep, FwiSize roiSize, Fw32f alpha );
FwStatus   fwiAddWeighted_8s32f_C1IR ( const Fw8s * pSrc, int srcStep, Fw32f * pSrcDst, int srcDstStep, FwiSize roiSize, Fw32f alpha );
FwStatus   fwiAddWeighted_16u32f_C1IR ( const Fw16u * pSrc, int srcStep, Fw32f * pSrcDst, int srcDstStep, FwiSize roiSize, Fw32f alpha );
FwStatus   fwiAddWeighted_32f_C1IR ( const Fw32f * pSrc, int srcStep, Fw32f * pSrcDst, int srcDstStep, FwiSize roiSize, Fw32f alpha );
FwStatus   fwiAddWeighted_8u32f_C1IMR ( const Fw8u * pSrc, int srcStep, const Fw8u * pMask, int maskStep, Fw32f * pSrcDst, int srcDstStep, FwiSize roiSize, Fw32f alpha );
FwStatus   fwiAddWeighted_8s32f_C1IMR ( const Fw8s * pSrc, int srcStep, const Fw8u * pMask, int maskStep, Fw32f * pSrcDst, int srcDstStep, FwiSize roiSize, Fw32f alpha );
FwStatus   fwiAddWeighted_16u32f_C1IMR ( const Fw16u * pSrc, int srcStep, const Fw8u * pMask, int maskStep, Fw32f * pSrcDst, int srcDstStep, FwiSize roiSize, Fw32f alpha );
FwStatus   fwiAddWeighted_32f_C1IMR ( const Fw32f * pSrc, int srcStep, const Fw8u * pMask, int maskStep, Fw32f * pSrcDst, int srcDstStep, FwiSize roiSize, Fw32f alpha );

Parameters

alpha   Alpha (RGBA transparency) constant value.
maskStep   Mask buffer step size in bytes (width of the buffer in bytes).
pMask   Pointer to a location in a buffer that contains a mask to be used in the operation.
pSrc   Pointer to a location in a source buffer.
pSrcDst   Pointer to a location in a buffer that contains both the source and destination.
roiSize   Specifies the height and width of an ROI.
srcDstStep   Source and destination buffer step size in bytes (width of both buffers in bytes).
srcStep   Source buffer step size (width of the buffer in bytes).

Description

These functions step through ROIs in two source buffers, multiply the data in buffer 1 by an alpha scaling factor, multiply the data in buffer 2 by a scaling factor of 1 minus alpha, add the two products, and write the sum back to the source location.

There are versions of the functions that perform a masking operation before writing the results.