Developer Reference

  • 2020
  • 10/21/2020
  • Public Content
Contents

MulC64f

Multiplies pixel values of an image by a constant array.

Syntax

Not-in-place operations
IppStatus ippiMulC64f_8u_C1R(const Ipp8u*
pSrc
, int
srcStep
, const Ipp64f
value[1]
, Ipp8u*
pDst
, int
dstStep
, IppiSize
roiSize
, IppHintAlgorithm
hint
, IppRoundMode
rndMode
);
IppStatus ippiMulC64f_8u_C3R(const Ipp8u*
pSrc
, int
srcStep
, const Ipp64f
value[3]
, Ipp8u*
pDst
, int
dstStep
, IppiSize
roiSize
, IppHintAlgorithm
hint
, IppRoundMode
rndMode
);
IppStatus ippiMulC64f_8u_C4R(const Ipp8u*
pSrc
, int
srcStep
, const Ipp64f
value[4]
, Ipp8u*
pDst
, int
dstStep
, IppiSize
roiSize
, IppHintAlgorithm
hint
, IppRoundMode
rndMode
);
IppStatus ippiMulC64f_16u_C1R(const Ipp16u*
pSrc
, int
srcStep
, const Ipp64f
value[1]
, Ipp16u*
pDst
, int
dstStep
, IppiSize
roiSize
, IppHintAlgorithm
hint
, IppRoundMode
rndMode
);
IppStatus ippiMulC64f_16u_C3R(const Ipp16u*
pSrc
, int
srcStep
, const Ipp64f
value[3]
, Ipp16u*
pDst
, int
dstStep
, IppiSize
roiSize
, IppHintAlgorithm
hint
, IppRoundMode
rndMode
);
IppStatus ippiMulC64f_16u_C4R(const Ipp16u*
pSrc
, int
srcStep
, const Ipp64f
value[4]
, Ipp16u*
pDst
, int
dstStep
, IppiSize
roiSize
, IppHintAlgorithm
hint
, IppRoundMode
rndMode
);
IppStatus ippiMulC64f_16s_C1R(const Ipp16s*
pSrc
, int
srcStep
, const Ipp64f
value[1]
, Ipp16s*
pDst
, int
dstStep
, IppiSize
roiSize
, IppHintAlgorithm
hint
, IppRoundMode
rndMode
);
IppStatus ippiMulC64f_16s_C3R(const Ipp16s*
pSrc
, int
srcStep
, const Ipp64f
value[3]
, Ipp16s*
pDst
, int
dstStep
, IppiSize
roiSize
, IppHintAlgorithm
hint
, IppRoundMode
rndMode
);
IppStatus ippiMulC64f_16s_C4R(const Ipp16s*
pSrc
, int
srcStep
, const Ipp64f
value[4]
, Ipp16s*
pDst
, int
dstStep
, IppiSize
roiSize
, IppHintAlgorithm
hint
, IppRoundMode
rndMode
);
IppStatus ippiMulC64f_32f_C1R(const Ipp32f*
pSrc
, int
srcStep
, const Ipp64f
value[1]
, Ipp32f*
pDst
, int
dstStep
, IppiSize
roiSize
, IppHintAlgorithm
hint
, IppRoundMode
rndMode
);
IppStatus ippiMulC64f_32f_C3R(const Ipp32f*
pSrc
, int
srcStep
, const Ipp64f
value[3]
, Ipp32f*
pDst
, int
dstStep
, IppiSize
roiSize
, IppHintAlgorithm
hint
, IppRoundMode
rndMode
);
IppStatus ippiMulC64f_32f_C4R(const Ipp32f*
pSrc
, int
srcStep
, const Ipp64f
value[4]
, Ipp32f*
pDst
, int
dstStep
, IppiSize
roiSize
, IppHintAlgorithm
hint
, IppRoundMode
rndMode
);
In-place operations
IppStatus ippiMulC64f_8u_C1IR(Ipp8u*
pSrcDst
, int
srcDstStep
, const Ipp64f
value[1]
, IppiSize
roiSize
, IppHintAlgorithm
hint
, IppRoundMode
rndMode
);
IppStatus ippiMulC64f_8u_C3IR(Ipp8u*
pSrcDst
, int
srcDstStep
, const Ipp64f
value[3]
, IppiSize
roiSize
, IppHintAlgorithm
hint
, IppRoundMode
rndMode
);
IppStatus ippiMulC64f_8u_C4IR(Ipp8u*
pSrcDst
, int
srcDstStep
, const Ipp64f
value[4]
, IppiSize
roiSize
, IppHintAlgorithm
hint
, IppRoundMode
rndMode
);
IppStatus ippiMulC64f_16u_C1IR(Ipp16u*
pSrcDst
, int
srcDstStep
, const Ipp64f
value[1]
, IppiSize
roiSize
, IppHintAlgorithm
hint
, IppRoundMode
rndMode
);
IppStatus ippiMulC64f_16u_C3IR(Ipp16u*
pSrcDst
, int
srcDstStep
, const Ipp64f
value[3]
, IppiSize
roiSize
, IppHintAlgorithm
hint
, IppRoundMode
rndMode
);
IppStatus ippiMulC64f_16u_C4IR(Ipp16u*
pSrcDst
, int
srcDstStep
, const Ipp64f
value[4]
, IppiSize
roiSize
, IppHintAlgorithm
hint
, IppRoundMode
rndMode
);
IppStatus ippiMulC64f_16s_C1IR(Ipp16s*
pSrcDst
, int
srcDstStep
, const Ipp64f
value[1]
, IppiSize
roiSize
, IppHintAlgorithm
hint
, IppRoundMode
rndMode
);
IppStatus ippiMulC64f_16s_C3IR(Ipp16s*
pSrcDst
, int
srcDstStep
, const Ipp64f
value[3]
, IppiSize
roiSize
, IppHintAlgorithm
hint
, IppRoundMode
rndMode
);
IppStatus ippiMulC64f_16s_C4IR(Ipp16s*
pSrcDst
, int
srcDstStep
, const Ipp64f
value[4]
, IppiSize
roiSize
, IppHintAlgorithm
hint
, IppRoundMode
rndMode
);
IppStatus ippiMulC64f_32f_C1IR(Ipp32f*
pSrcDst
, int
srcDstStep
, const Ipp64f
value[1]
, IppiSize
roiSize
, IppHintAlgorithm
hint
, IppRoundMode
rndMode
);
IppStatus ippiMulC64f_32f_C3IR(Ipp32f*
pSrcDst
, int
srcDstStep
, const Ipp64f
value[3]
, IppiSize
roiSize
, IppHintAlgorithm
hint
, IppRoundMode
rndMode
);
IppStatus ippiMulC64f_32f_C4IR(Ipp32f*
pSrcDst
, int
srcDstStep
, const Ipp64f
value[4]
, IppiSize
roiSize
, IppHintAlgorithm
hint
, IppRoundMode
rndMode
);
Include Files
ippi.h
Domain Dependencies
Headers:
ippcore.h
,
ippvm.h
,
ipps.h
Libraries:
ippcore.lib
,
ippvm.lib
,
ipps.lib
Parameters
pSrc
Pointer to the source image.
pSrcDst
Pointer to the source and destination image ROI for in-place operations.
srcStep
Distance, in bytes, between the starting points of consecutive lines in the source image.
srcDstStep
Distance, in bytes, between the starting points of consecutive lines in the source and destination image for in-place operations.
value
Constant vector to add to image pixel values.
pDst
Pointer to the destination image.
dstStep
Distance, in bytes, between the starting points of consecutive lines in the destination image.
roiSize
Size of the image ROI, in pixels.
hint
Option to select the algorithmic implementation of the function, the following values are supported:
ippAlgHintAccurate
All output pixels are exact; accuracy takes precedence over performance.
ippAlgHintFast
,
ippAlgHintNone
Function performance takes precedence over accuracy and some output pixels can differ by +-1 from the exact result.
rndMode
Rounding mode, the following values are supported:
ippRndZero
Floating-point values are truncated to zero.
ippRndNear
Floating-point values are rounded to the nearest even integer when the fractional part equals 0.5; otherwise they are rounded to the nearest integer.
ippRndFinancial
Floating-point values are rounded down to the nearest integer when the fractional part is less than 0.5, or rounded up to the nearest integer if the fractional part is equal to or greater than 0.5.
Description
This function multiplies pixel values of the source image by the specified constant array and places the scaled results to the same image.
Return Values
ippStsNoErr
Indicates no error.
ippStsNullPtrErr
Indicates an error when at least one of the specified pointers is
NULL
.
ippStsSizeErr
Indicates an error when width or height of the image is less than, or equal to zero.

Example



    
/******************************************************************************* * Copyright 2015-2020 Intel Corporation. * * This software and the related documents are Intel copyrighted materials, and * your use of them is governed by the express license under which they were * provided to you (License). Unless the License provides otherwise, you may not * use, modify, copy, publish, distribute, disclose or transmit this software or * the related documents without Intel's prior written permission. * * This software and the related documents are provided as is, with no express * or implied warranties, other than those that are expressly stated in the * License. *******************************************************************************/ // A simple example of gradient flood filling of connected area // using Intel(R) Integrated Primitives (Intel(R) IPP) functions: // ippiMulC64f_8u_C1R // #include <stdio.h> #include "ipp.h" #define WIDTH 8 /* source image width */ #define HEIGHT 8 /* source image height */ /* Next two defines are created to simplify code reading and understanding */ #define EXIT_MAIN exitLine: /* Label for Exit */ #define check_sts(st) if((st) != ippStsNoErr) goto exitLine; /* Go to Exit if Intel(R) IPP function returned status different from ippStsNoErr */ /* Results of ippMalloc() are not validated because Intel(R) IPP functions perform bad arguments check and will return an appropriate status */ static Ipp8u pImage[WIDTH*HEIGHT] = /* Pointer to ROI of initial image */ { 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7 }; int main(void) { IppStatus status = ippStsNoErr; int imageStep = WIDTH; /* Steps, in bytes, through the source and destination images */ Ipp8u pDstImage[WIDTH*HEIGHT]; IppiSize roiSize = { WIDTH, HEIGHT};/* Size of source ROI in pixels */ Ipp64f value[1] = {0.5}; /* Calculate size of temporary buffer for flood filling operation */ /* Perform gradient flood filling of 4-connected area */ check_sts( status = ippiMulC64f_8u_C1R(pImage, imageStep, value, pDstImage, imageStep, roiSize, ippAlgHintFast, ippRndNear) ) EXIT_MAIN printf("Exit status %d (%s)\n", (int)status, ippGetStatusString(status)); return (int)status; }

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804