Intel® Integrated Performance
Primitives Developer Guide andReferenceIntel® Integrated Performance Primitives Developer Guide and ReferenceContents
Chapter 1: Intel® Integrated Performance Primitives Developer
Guide and Reference

Getting Help and Support ...........................................................................5
Introducing the Intel® Integrated Performance Primitives for Intel®
Architecture..........................................................................................5
Notational Conventions .............................................................................5
Related Products .......................................................................................6
Getting Started with Intel® Integrated Performance Primitives ......................... 7
Finding Intel® IPP on Your System ....................................................... 7
Setting Environment Variables .......................................................... 10
Compiler Integration........................................................................ 10
Building Intel® IPP Applications ......................................................... 11
Using Intel® IPP Examples ................................................................ 14Intel® IPP Examples Directory Structure ..................................... 14
Building Intel® IPP Examples..................................................... 14
Finding the Intel® IPP Documentation................................................. 14Intel® Integrated Performance Primitives Theory of Operation........................ 15
Dispatching .................................................................................... 15
Function Naming Conventions ........................................................... 16
Data-domain .......................................................................... 16
Primitive vs. Variant Name ....................................................... 16
Data Types............................................................................. 16
Descriptor.............................................................................. 17
Parameters ............................................................................ 18
Intel® Integrated Performance Primitives Domain Details ...................... 18
Library Dependencies by Domain .............................................. 18
Linking Your Application with Intel® Integrated Performance Primitives............ 19
Linking Options ............................................................................... 19
Automatically Linking Your Microsoft* Visual Studio* Project with Intel
IPP............................................................................................ 20
Using Intel® Integrated Performance Primitives Platform-Aware Functions ....... 21
Using Intel® Integrated Performance Primitives Threading Layer (TL)
Functions ........................................................................................... 21
Finding Intel® IPP TL Source Code Files .............................................. 22
Building Intel® IPP TL Libraries from Source Code ................................ 22
Automatically Getting Performance Benefits with Intel(R) IPP
Threading Layer .......................................................................... 23
Using Custom Library Tool for Intel® Integrated Performance Primitives .......... 23
System Requirements for Custom Library Tool..................................... 24
Operation Modes ............................................................................. 24
Building a Custom DLL with Custom Library Tool.................................. 26
Using Console Version of Custom Library Tool...................................... 28
Using Integration Wrappers for Intel® Integrated Performance Primitives......... 29
Programming Considerations..................................................................... 29
Core and Support Functions.............................................................. 30
Channel and Planar Image Data Layouts ............................................ 31
Regions of Interest .......................................................................... 32
Managing Memory Allocations ........................................................... 33

2

Contents

Cache Optimizations ........................................................................ 34
Programming with Intel® Integrated Performance Primitives in the Microsoft*
Visual Studio* IDE............................................................................... 35
Configuring the Microsoft* Visual Studio* IDE to Link with Intel® IPP...... 35
Using the IntelliSense* Features ....................................................... 35
Appendix: Performance Test Tool Command-Line Options.............................. 37
Appendix: Intel(R) IPP Threading and OpenMP* Support .............................. 39
Using Shared L2 Cache .................................................................... 40
Avoiding Nested Parallelization .......................................................... 40
Intel® IPP API Reference ........................................................................... 40
Volume 1: Signal and Data Processing ............................................... 41
Intel(R) Integrated Performance Primitives Concepts ................... 41
Support Functions ................................................................... 54
Vector Initialization Functions ................................................... 73
Essential Functions.................................................................. 92
Filtering Functions................................................................. 213
Transform Functions .............................................................. 291
Fixed-Accuracy Arithmetic Functions ........................................ 354
Long Term Evolution (LTE) Wireless Support Functions ............... 439
Data Compression Functions................................................... 448
String Functions ................................................................... 518
Appendix A: Handling of Special Cases..................................... 547
Appendix B: Removed Functions ............................................. 554
Bibliography for Signal Processing ........................................... 649
Glossary .............................................................................. 653
Volume 2: Image Processing........................................................... 655
Intel(R) Integrated Performance Primitives Concepts ................. 656
Support Functions ................................................................. 677
Image Data Exchange and Initialization Functions ..................... 686
Image Arithmetic and Logical Operations ................................. 739
Image Color Conversion......................................................... 838
Threshold and Compare Operations ........................................1008
Morphological Operations ......................................................1031
Filtering Functions................................................................1091
Image Linear Transforms ......................................................1244
Image Statistics Functions ....................................................1290
Image Geometry Transforms .................................................1377
Miscellaneous Image Transforms ............................................1525
Wavelet Transforms..............................................................1534
Computer Vision ..................................................................1550
3D Data Processing Functions ................................................1693
Appendix A: Handling of Special Cases....................................1720
Appendix B: Interpolation in Image Geometric Transform
Functions ........................................................................1722
Appendix C: Removed Functions for Image and Video Processing1734
Bibliography for Image Processing..........................................1856
Glossary .............................................................................1860
Notices and Disclaimers.........................................................................18613

1Intel® Integrated Performance Primitives Developer Guide and Reference

Developer Guide and Reference
for Intel® Integrated
Performance Primitives

1

NOTE The Intel® Integrated Performance Primitives Developer Guide for Intel® oneAPI Base Toolkit andIntel® Integrated Performance Primitives Developer Reference have been combined in to this single
Developer Guide and Reference. To find prior versions of the individual Developer Guide and Developer
Reference, go to the Downloadable Documentation page.

macOS* Deprecation
Starting with the 2021.10 release (oneAPI Toolkit release 2024.0), macOS* is no longer supported in Intel®
oneAPI Toolkits and components.
Several Intel-led open source developer tool projects will continue supporting macOS on Apple* Silicon
including oneAPI Threading Building Blocks (oneTBB) and Intel® Implicit SPMD Program Compiler and wewelcome the opportunity to work with contributors to expand support to additional tools in the future.
All macOS content will be removed from technical documentation in the next release. If you need a copy ofthe documentation, click the Download button in the upper right or download it from the Downloadable
Documentation site.

Introducing Intel® Integrated Performance Primitives
The Intel® Integrated Performance Primitives (Intel® IPP) is a software library that provides a comprehensive
set of application domain-specific highly optimized functions for data, signal, and image processing, andcryptography. This guide provides information about Intel IPP. This document is valid for version of 2021.10
of Intel IPP.
Due to significant shift in industry trend towards 64-bit architecture in recent years, Intel IPP 32-bit binaries
will be deprecated in the upcoming Intel IPP 2021.10 release and targeted to be removed after one year
deprecation notice period. Please share your feedback or concerns on the Intel IPP Community Forum.
The Intel® Integrated Performance Primitives (Intel® IPP) is a software library that provides a comprehensive
set of application domain-specific highly optimized functions for signal, data, and image processing:

Signal and Data Processing
The Intel IPP signal and data processing software is a collection of low-overhead, high-performance
operations performed on one-dimensional (1D) data arrays. Examples of such operations are linear
transforms, filtering, string processing, and vector math.
See Intel IPP Developer Reference. Volume 1: Signal and Data Processing.

Image Processing
The Intel IPP image processing software is a collection of low-overhead, high-performance operations
performed on two-dimensional (2D) arrays of pixels. Examples of such operations are linear transforms,
filtering, and arithmetic on image data.
See Intel IPP Developer Reference. Volume 2: Image Processing.

4

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Product and Performance Information
Performance varies by use, configuration and other factors. Learn more at www.Intel.com/
PerformanceIndex.
Notice revision #20201201

Getting Help and Support
Getting Technical Support
If you did not register your Intel software product during installation, please do so now at the Intel® Software
Development Products Registration Center. Registration entitles you to free technical support, productupdates and upgrades for the duration of the support term.
For general information about Intel technical support, product updates, user forums, FAQs, tips and tricks
and other support questions, please visit the official Support page .
NOTE If your distributor provides technical support for this product, please contact them rather thanIntel.

For technical information about the Intel IPP library, including FAQ's, tips and tricks, and other support
information, please visit the Intel® IPP Forum.

Introducing the Intel® Integrated Performance Primitives
for Intel® Architecture
The Intel IPP software enables taking advantage of the parallelism of single-instruction, multiple data (SIMD)
instructions, which make the core of the MMX technology and Streaming SIMD Extensions. These
technologies improve the performance of computation-intensive signal, image, and video processing
applications. Plenty of the Intel IPP functions are tuned and threaded for multi-core systems.
Intel IPP supports application development for various Intel® architectures. By providing a single crossarchitecture application programmer interface, Intel IPP permits software application repurposing andenables developers to port to unique features across Intel® processor-based desktop, server, mobile, andhandheld platforms. Use of the Intel IPP primitive functions can help drastically reduce development costs
and accelerate time-to-market by eliminating the need of writing processor-specific code for computation
intensive routines.
You can find more details of the product usage in the Intel IPP Developer Guide for your operating system.
Product and Performance Information
Performance varies by use, configuration and other factors. Learn more at www.Intel.com/
PerformanceIndex.
Notice revision #20201201

Notational Conventions
The code and syntax used in this document for function and variable declarations are written in the ANSI C
style. However, versions of Intel IPP for different processors or operating systems may, of necessity, varyslightly.

51Intel® Integrated Performance Primitives Developer Guide and Reference

Product and Performance Information
Performance varies by use, configuration and other factors. Learn more at www.Intel.com/
PerformanceIndex.
Notice revision #20201201
This document uses the following notational conventions:
Convention

Explanation

ExampleTHIS TYPE STYLE

Used in the text for the Intel IPP
constant identifiers.

IPPI_MAX_64SThis type style

Mixed with the uppercase instructure names; also used infunction names, code examples
and call statements.

IppLibraryVersion,
void ippsFree()This type style

Parameters in function prototypes
and parameters description.

value, srcStepx(n) and x[n]Used to represent a discrete 1D
signal. The notation x(n) refers
to a conceptual signal, while thenotation x[n] refers to an actual
vector. Both of these areannotated to indicate a specificfinite range of values.

x[n], 0 ≤ n< len
Typically, the number of elements
in vectors is denoted by len.
Vector names contain square
brackets as distinct from vector
elements with current index n.
The expression pDst[n] =pSrc[n] + val implies that eachelement pDst[n] of the vector
pDst is computed for each n in
the range from 0 to len-1.
Special cases are regarded anddescribed separately.

Ipp<data-domain> and Ipp
prefixes

All structures and enumerators,
specific for a particular datadomain have the Ipp<datadomain> prefix, while thosecommon for entire Intel IPP
software have the Ipp prefix.

IppsROI, IppLibraryVersion

See Also
Data-Domain

Related Products
Cryptography for Intel® Integrated Performance Primitives (Intel® IPP)
An add-on library, which is distributed separately from the main Intel IPP, offers users a cross-platform andcross operating system application programming interface (API) for routines commonly used for
cryptographic operations. To obtain Cryptography for Intel IPP, see this knowledge base article: Intel® IPP
Cryptography Add-on.

6

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Getting Started with Intel® Integrated Performance
Primitives
This section helps you start using Intel® Integrated Performance Primitives (Intel® IPP) by giving a quick
overview of some fundamental concepts and showing how to build an Intel® IPP program.

Finding Intel® IPP on Your System
The Unified Directory Layout was implemented in 2021.10 (Intel® oneAPI Toolkit release 2024.0). If you havemultiple toolkit versions installed, the Unified layout adds the ability to ensure your development
environment contains the component versions that were released as part of that specific toolkit version. The
Unified Directory Layout is available only when installing the oneAPI Base Toolkit. It is not available if you
installed Intel® IPP as a standalone component.
Environment variables are set up with a script called setvars or oneapi-vars, depending on which layout you
are using.
To understand more about the Unified Directory Layout, including how the environment is initialized and theadvantages of using the layout, see Use the setvars and oneapi-vars Scripts with Linux * or Use the setvars
and oneapi-vars Scripts with Windows* .
Intel® Integrated Performance Primitives (Intel® IPP) installs in the directory referred to as <ippdirectory> . By default, the <ipp directory> is :•On Windows* OS Component Directory Layout: C:\Program Files (x86)\Intel\oneAPI\ipp\<version>•

On Windows* OS Unified Directory Layout: C:\Program Files (x86)\Intel\oneAPI\<toolkit-

version>••On Linux* OS Component Directory Layout : /opt/intel/oneapi/ipp/<version>
On Linux* OS Unified Directory Layout: /opt/intel/oneapi/<toolkit-version>
NOTE If you installed Intel® IPP as a standalone component, you will only find Intel® IPP in the
Component Directory Layout.

The tables below describe the structure of the high-level directories on:•••

Windows* OS
Linux* OS
macOS*

Windows* OS:
Directory

Contents

env

Batch files to set environmental
variables in the user shellincludeHeader files for the library functions

lib32

Single-threaded static libraries for the
IA-32 architecture
A static library of Integration Wrappers
for the IA-32 architecture
Threading Layer static libraries for the
IA-32 architecture71Intel® Integrated Performance Primitives Developer Guide and Reference

Directory

Contents

lib

Single-threaded static libraries for theIntel® 64 architecture
A static library of Integration Wrappers
for the Intel® 64 architecture
Threading Layer static libraries for theIntel® 64 architecture

bin32

Single-threaded DLLs for applications
running on processors with the IA-32
architecture
Threading layer dynamic libraries for the
IA-32 architecturebinSingle-threaded DLLs for applications
running on processors with the Intel® 64
architecture
Threading layer dynamic libraries for theIntel® 64 architecture

share\doc\ippIntel IPP interfaces and example files

opt\ipp\tools\custom_library_tool_python

Command-line and GUI tool for building
custom dynamic libraries

opt\ipp\tools\<arch>\staticlib

Header files for disabling the Intel IPP
static dispatcher (linking with one CPUoptimized variant)
For Intel® 64, <arch> = intel64
For IA-32, <arch> = ia32

share\doc\ipp\licensing

License files and a third party programs
fileLinux* OS:
Directory

Contents

env

Bash files to set environmental variablesin the user shellincludeHeader files for the library functions

lib32

Single-threaded static and dynamic
libraries for the IA-32 architecture
A static library of Integration Wrappers
for the IA-32 architecture
Threading Layer static and dynamic
libraries for the IA-32 architecturelib

8Single-threaded static and dynamic
libraries for the Intel® 64 architecture

Developer Guide and Reference for Intel® Integrated Performance Primitives

Directory

1

Contents

A static library of Integration Wrappers
for the Intel® 64 architecture
Threading Layer static and dynamic
libraries for the Intel® 64 architectureIntel® 64: /opt/intel/oneapi/redist/lib

Redistributable dynamically linked
shared object libraries

IA-32: /opt/intel/oneapi/redist/lib32
Intel® 64: lib/nonpic

Non-PIC single-threaded static libraries

IA-32: lib32/nonpic

share/doc/ipp

Intel IPP interfaces and example files

opt/ipp/tools/custom_library_tool_python

Command-line and GUI tool for building
custom dynamic libraries

opt/ipp/tools/<arch>/staticlib

Header files for disabling the Intel IPP
static dispatcher (linking with one CPUoptimized variant)
For Intel® 64, <arch> = intel64
For IA-32, <arch> = ia32
Tcl modulefiles

etc/modulefiles/intel_ipp_<arch>

For Intel® 64, <arch> = intel64
For IA-32, <arch> = ia32

share/doc/ipp/licensing

License files and a third party programs
fileStarting with the 2024.0 release, macOS* is no longer supported in Intel® oneAPI Toolkits and components.
Several Intel-led open source developer tool projects will continue supporting macOS on Apple Silicon
including oneAPI Threading Building Blocks (oneTBB) and Intel® Implicit SPMD Program Compiler and wewelcome the opportunity to work with contributors to expand support to additional tools in the future. All
macOS content will be removed from technical documentation in the 2024.1 release. If you need a copy ofthe documentation, click the Download button in the upper right or download it from the Downloadable
Documentation site.
macOS*:
Directory

Contents

env

Batch files to set environmental variables in theuser shellincludeHeader files for the library functions

lib/intel64

Single-threaded static libraries for the Intel® 64
architecturelib/<arch>_andIntel IPP libraries for Android*
For Intel® 64, <arch> = intel64
For IA-32, <arch> = ia32

9

1Intel® Integrated Performance Primitives Developer Guide and Reference

Directory

Contents

components

Intel IPP interfaces and example files

tools/custom_library_tool_python

Header files for disabling the Intel IPP static
dispatcher (linking with one CPU-optimized
variant)

See Also
Notational Conventions

Setting Environment Variables
When the installation of Intel IPP is complete, set the environment variables in the command shell using oneof the script files in the env subdirectory of the Intel IPP installation directory:
On Windows* OS:vars.bat for the IA-32 and Intel® 64 architectures.
On Linux* OS:vars.sh for the IA-32 and Intel® 64 architectures.
When using the vars script, you need to specify the architecture as a parameter. For example:•

vars.bat ia32
sets the environment for Intel IPP to use the IA-32 architecture on Windows* OS.

•. vars.sh intel64
sets the environment for Intel IPP to use the Intel® 64 architecture on Linux* OS.

Alternatively, you can use the oneapi-vars script in the Unified Directory Layout. To learn more, see FindingIntel® IPP on Your System .
The scripts set the following environment variables:
Windows* OS

Linux* OS

PurposeIPPROOTIPPROOT

Point to the Intel IPP installation
directory

LIB

n/a

Add the search path for the IntelIPP single-threaded libraries

PATH

LD_LIBRARY_PATH

Add the search path for the IntelIPP single-threaded DLLs

INCLUDEn/a

Add the search path for the IntelIPP header files

Compiler Integration
Intel® C++ Compiler and Microsoft Visual Studio* compilers simplify developing with Intel® IPP.
On Windows* OS, a default installation of Intel® IPP installs integration plug-ins. These enable the option toconfigure your Microsoft Visual Studio* project for automatic linking with Intel IPP.
Intel® C++ Compiler also provides command-line parameters to set the link/include directories:•

On Windows* OS:•

On Linux* OS:/Qipp-link:{dynamic|static} and /Qipp-ipp-link={dynamic|static}
10

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

See Also
Automatically Linking Your Microsoft* Visual Studio* Project with Intel IPP
Linking Your Application with Intel(R) IPP

Building Intel® IPP Applications
The code example below represents a short application to help you get started with Intel® IPP:

#include "ipp.h"#include <stdio.h>
int main(int argc, char* argv[]){
const IppLibraryVersion *lib;
IppStatus status;
Ipp64u mask, emask;/* Init IPP library */ippInit();/* Get IPP library version info */lib = ippGetLibVersion();printf("%s %s\n", lib->Name, lib->Version);/* Get CPU features and features enabled with selected library level */status = ippGetCpuFeatures( &mask, 0 );if( ippStsNoErr == status ) {emask = ippGetEnabledCpuFeatures();
printf("Features supported by CPU\tby IPP\n");printf("-----------------------------------------\n");printf(" ippCPUID_MMX= ");printf("%c\t%c\t",( mask & ippCPUID_MMX ) ? 'Y':'N',( emask & ippCPUID_MMX ) ? 'Y':'N');printf("Intel(R) Architecture MMX technology supported\n");printf(" ippCPUID_SSE= ");printf("%c\t%c\t",( mask & ippCPUID_SSE ) ? 'Y':'N',( emask & ippCPUID_SSE ) ? 'Y':'N');printf("Intel(R) Streaming SIMD Extensions\n");printf(" ippCPUID_SSE2= ");printf("%c\t%c\t",( mask & ippCPUID_SSE2 ) ? 'Y':'N',( emask & ippCPUID_SSE2 ) ? 'Y':'N');printf("Intel(R) Streaming SIMD Extensions 2\n");printf(" ippCPUID_SSE3= ");printf("%c\t%c\t",( mask & ippCPUID_SSE3 ) ? 'Y':'N',( emask & ippCPUID_SSE3 ) ? 'Y':'N');printf("Intel(R) Streaming SIMD Extensions 3\n");printf(" ippCPUID_SSSE3= ");printf("%c\t%c\t",( mask & ippCPUID_SSSE3 ) ? 'Y':'N',( emask & ippCPUID_SSSE3 ) ?
'Y':'N');
printf("Intel(R) Supplemental Streaming SIMD Extensions 3\n");printf(" ippCPUID_MOVBE= ");printf("%c\t%c\t",( mask & ippCPUID_MOVBE ) ? 'Y':'N',( emask & ippCPUID_MOVBE ) ?
'Y':'N');
printf("The processor supports MOVBE instruction\n");printf(" ippCPUID_SSE41= ");printf("%c\t%c\t",( mask & ippCPUID_SSE41 ) ? 'Y':'N',( emask & ippCPUID_SSE41 ) ?
'Y':'N');
printf("Intel(R) Streaming SIMD Extensions 4.1\n");printf(" ippCPUID_SSE42= ");printf("%c\t%c\t",( mask & ippCPUID_SSE42 ) ? 'Y':'N',( emask & ippCPUID_SSE42 ) ?
'Y':'N');
printf("Intel(R) Streaming SIMD Extensions 4.2\n");printf(" ippCPUID_AVX= ");printf("%c\t%c\t",( mask & ippCPUID_AVX ) ? 'Y':'N',( emask & ippCPUID_AVX ) ? 'Y':'N');

11

1Intel® Integrated Performance Primitives Developer Guide and Reference

printf("Intel(R) Advanced Vector Extensions instruction set\n");printf(" ippAVX_ENABLEDBYOS = ");printf("%c\t%c\t",( mask & ippAVX_ENABLEDBYOS ) ? 'Y':'N',( emask & ippAVX_ENABLEDBYOS ) ?
'Y':'N');
printf("The operating system supports Intel(R) AVX\n");printf(" ippCPUID_AES= ");printf("%c\t%c\t",( mask & ippCPUID_AES ) ? 'Y':'N',( emask & ippCPUID_AES ) ? 'Y':'N');printf("Intel(R) AES instruction\n");printf(" ippCPUID_SHA= ");printf("%c\t%c\t",( mask & ippCPUID_SHA ) ? 'Y':'N',( emask & ippCPUID_SHA ) ? 'Y':'N');printf("Intel(R) SHA new instructions\n");printf(" ippCPUID_CLMUL= ");printf("%c\t%c\t",( mask & ippCPUID_CLMUL ) ? 'Y':'N',( emask & ippCPUID_CLMUL ) ?
'Y':'N');
printf("PCLMULQDQ instruction\n");printf(" ippCPUID_RDRAND= ");printf("%c\t%c\t",( mask & ippCPUID_RDRAND ) ? 'Y':'N',( emask & ippCPUID_RDRAND ) ?
'Y':'N');
printf("Read Random Number instructions\n");printf(" ippCPUID_F16C= ");printf("%c\t%c\t",( mask & ippCPUID_F16C ) ? 'Y':'N',( emask & ippCPUID_F16C ) ? 'Y':'N');printf("Float16 instructions\n");printf(" ippCPUID_AVX2= ");printf("%c\t%c\t",( mask & ippCPUID_AVX2 ) ? 'Y':'N',( emask & ippCPUID_AVX2 ) ? 'Y':'N');printf("Intel(R) Advanced Vector Extensions 2 instruction set\n");printf(" ippCPUID_AVX512F= ");printf("%c\t%c\t",( mask & ippCPUID_AVX512F ) ? 'Y':'N',( emask & ippCPUID_AVX512F ) ?
'Y':'N');
printf("Intel(R) Advanced Vector Extensions 3.1 instruction set\n");printf(" ippCPUID_AVX512CD= ");printf("%c\t%c\t",( mask & ippCPUID_AVX512CD ) ? 'Y':'N',( emask & ippCPUID_AVX512CD ) ?
'Y':'N');
printf("Intel(R) Advanced Vector Extensions CD (Conflict Detection) instruction set\n");printf(" ippCPUID_AVX512ER= ");printf("%c\t%c\t",( mask & ippCPUID_AVX512ER ) ? 'Y':'N',( emask & ippCPUID_AVX512ER ) ?
'Y':'N');
printf("Intel(R) Advanced Vector Extensions ER instruction set\n");printf(" ippCPUID_ADCOX= ");printf("%c\t%c\t",( mask & ippCPUID_ADCOX ) ? 'Y':'N',( emask & ippCPUID_ADCOX ) ?
'Y':'N');
printf("ADCX and ADOX instructions\n");printf(" ippCPUID_RDSEED= ");printf("%c\t%c\t",( mask & ippCPUID_RDSEED ) ? 'Y':'N',( emask & ippCPUID_RDSEED ) ?
'Y':'N');
printf("The RDSEED instruction\n");printf(" ippCPUID_PREFETCHW = ");printf("%c\t%c\t",( mask & ippCPUID_PREFETCHW ) ? 'Y':'N',( emask & ippCPUID_PREFETCHW ) ?
'Y':'N');
printf("The PREFETCHW instruction\n");printf(" ippCPUID_KNC= ");printf("%c\t%c\t",( mask & ippCPUID_KNC ) ? 'Y':'N',( emask & ippCPUID_KNC ) ? 'Y':'N');printf("Intel(R) Xeon Phi(TM) Coprocessor instruction set\n");}return 0;}
This application consists of three sections:12Developer Guide and Reference for Intel® Integrated Performance Primitives

1.

1

Initialize the Intel IPP library. This stage is required to take advantage of full Intel IPP optimization. The

ippInit() function detects the processor type and sets the dispatcher to use the processor-specificcode of the Intel® IPP library corresponding to the instruction set capabilities available. If yourapplication runs without ippInit(), the Intel IPP library is auto-initialized with the first call of the IntelIPP function from any domain that is different from ippCore.

2.
3.

In certain debugging scenarios, it is helpful to force a specific implementation layer using
ippSetCpuFeatures(), instead of the best as chosen by the dispatcher.
Get the library layer name and version. You can also get the version information using theippversion.h file located in the /include directory.
Show the hardware optimizations used by the selected library layer and supported by CPU.

Building the First Example with Microsoft Visual Studio* Integration on Windows* OS
On Windows* OS, Intel IPP applications are significantly easier to build with Microsoft* Visual Studio*. Tobuild the code example above, follow the steps:
1.
2.
3.
4.

Start Microsoft Visual Studio* and create an empty C++ project.
Add a new c file and paste the code into it.
Set the include directories and the linking model as described in Automatically Linking Your Microsoft*
Visual Studio* Project with Intel IPP.
Compile and run the application.

If you did not install the integration plug-in, configure your Microsoft* Visual Studio* IDE to build Intel IPP
applications following the instructions provided in Configuring the Microsoft Visual Studio* IDE to Link withIntel® IPP.

Building the First Example on Linux* OS
To build the code example above on Linux* OS, follow the steps:
1.
2.
3.

Paste the code into the editor of your choice.
Make sure the compiler and Intel IPP variables are set in your shell. For information on how to set
environment variables see Setting Environment Variables.
Compile with the following command:
Intel® 64:

icc ipptest.cpp -o ipptest -I $IPPROOT/include -L $IPPROOT/lib -lippi -lipps -lippcoreIntel® 32:

icc ipptest.cpp -o ipptest -I $IPPROOT/include -L $IPPROOT/lib32 -lippi -lipps -lippcore
For more information about which Intel IPP libraries you need to link to, see Library Dependencies by
Domain and Linking Options.

4.

For more information about the Component Directory Layout and the Unified Directory Layout, seeFinding Intel IPP on Your System.
Run the application.

See Also
Automatically Linking Your Microsoft* Visual Studio* Project with Intel IPP
Configuring the Microsoft Visual Studio* IDE to Link with Intel® IPP
Setting Environment Variables
Library Dependencies by Domain
Linking Options
DispatchingIntel® IPP Examples Directory Structure131Intel® Integrated Performance Primitives Developer Guide and Reference

Using Intel® IPP Examples
This section provides information on Intel IPP examples directory structure and examples build system.

Intel® IPP Examples Directory Structure
The Intel IPP package includes code examples, located in the components_and_examples_<os>.zip
archive at the <ipp directory>/components/ subdirectory. The examples_core subdirectory inside thearchive contains the following files and directories:
Directory

Contents

commondocumentation
ipp_custom_dispatcher
ipp_fftipp_morphology
ipp_resize_mt
ipp_thread

Common code files for all examples
Documentation for the Intel IPP examples (ipp-examples.html)
Custom dispatcher usage example
Fast Fourier transformation example
Morphological reconstruction example
Image resizing example
Example of external threading of Intel IPP functions

See Also
Finding Intel® IPP on Your System

Building Intel® IPP Examples
For building instructions refer to examples_core/documentation/ipp-examples.html provided with the /<ipp directory>/components/components_and_examples_<os>.zip | .tgz archive.

See Also
Intel® IPP Examples Directory Structure

Finding the Intel® IPP Documentation
You can find getting started instructions and a listing of all the available online documents with links in the
get_started.htm file available in the following directory:••

On Windows* OS Component Directory Layout: C:\Program Files (x86)\Intel\oneAPI\ipp\<version>\share\doc\ipp

On Windows* OS Unified Directory Layout: C:\Program Files (x86)\Intel\oneAPI\<toolkit-

version>\share\doc\ipp••

On Linux* OS Component Directory Layout : /opt/intel/oneapi/ipp/<version>/share/doc/ipp
On Linux* OS Unified Directory Layout: /opt/intel/oneapi/<toolkit-version>/share/doc/ipp

For more information on the differences between Component Directory Layout and Unified Directory layout,
see Finding Intel® IPP on Your System .
Additional documentation on the Intel IPP examples (examples_core/documentation/ippexamples.html) is available here:••

Windows: <ipp directory>/share/doc/ipp/components_and_examples_win.zip
Linux: <ipp directory>/share/doc/ipp/components_and_examples_lin.tgz

The Intel® IPP Forum and knowledge base can be useful locations to search for questions not answered by
the documents above.

See Also
Finding Intel® IPP on Your System

14

Developer Guide and Reference for Intel® Integrated Performance Primitives

1Intel® Integrated Performance Primitives Theory ofOperation
This section discusses dispatching of the Intel® Integrated Performance Primitives (Intel® IPP) libraries tospecific processors, provides functions and parameters naming conventions, and explains the data types on
which Intel IPP performs operations. This section also provides Intel IPP domain details, including existing
library dependencies by domain.

DispatchingIntel® IPP uses multiple function implementations optimized for various CPUs. Dispatching refers to detectionof your CPU and selecting the corresponding Intel IPP binary path. For example, the ippie9 library in
the /bin directory contains the image processing libraries optimized for 64-bit applications on processors
with Intel® Advanced Vector Extensions (Intel® AVX) enabled such as the 2nd Generation Intel® Core™
processor family.
A single Intel IPP function, for example ippsCopy_8u(), may have many versions, each one optimized to
run on a specific Intel® processor with specific architecture, for example, the 64-bit version of this function
optimized for the 2nd Generation Intel® Core™ processor is e9_ippsCopy_8u(), and version optimized for 64bit applications on processors with Intel® Streaming SIMD Extensions 4.2 (Intel® SSE 4.2) is
y8_ippsCopy_8u(). This means that a prefix before the function name determines CPU model. However,during normal operation the dispatcher determines the best version and you can call a generic function(ippsCopy_8u in this example).
Intel® IPP is designed to support application development on various Intel® architectures. This means that the
API definition is common for all processors, while the underlying function implementation takes into accountthe strengths of each hardware generation.
By providing a single cross-architecture API, Intel IPP enables you to port features across Intel® processorbased desktop, server, and mobile platforms. You can use your code developed for one processor architecture
for many processor generations.
The following table shows processor-specific codes that Intel IPP uses:
Description of Codes Associated with Processor-Specific Libraries
IA-3
2Intel®
architectureIntel® 64
architecture

w7
m7
s8

n8

p8

y8

g9

e9

h9

l9
n0

Windo
ws*

Linux*
OS

+

+

+

+

+

+

+

+

+

+

+

+

+

+

Description

Optimized for processors with Intel SSE2
Optimized for processors with Intel SSE3
Optimized for processors with Supplemental Streaming SIMD
Extensions 3 (SSSE3)
Optimized for processors with Intel SSE4.2
Optimized for processors with Intel® Advanced Vector
Extensions (Intel® AVX) and Intel® Advanced Encryption
Standard New Instructions (Intel® AES-NI)
Optimized for processors with Intel® Advanced Vector
Extensions 2 (Intel® AVX2)
Optimized for 2nd Generation Intel® Xeon Phi™ Processor

151Intel® Integrated Performance Primitives Developer Guide and Reference

IA-3
2Intel®
architectureIntel® 64
architecture

Windo
ws*

Linux*
OS

+

+

k0

Description

Optimized for processors with Intel® Advanced Vector
Extensions 512 (Intel® AVX-512)

Product and Performance Information
Performance varies by use, configuration and other factors. Learn more at www.Intel.com/
PerformanceIndex.
Notice revision #20201201

Function Naming Conventions
Intel IPP functions have the same naming conventions for all domains.
Function names in Intel IPP have the following general format:

ipp<data-domain><name>_<datatype>[_<descriptor>](<parameters>)
NOTE
The core functions in Intel IPP do not need an input data type. These functions have ipp as a prefix
without the data-domain field. For example, ippGetStatusString.

See Also
Core and Support Functions

Data-domain
The data-domain element is a single character indicating type of input data. Intel IPP supports the following
data-domains:s

one-dimensional operations on signals, vectors, buffersitwo-dimensional operations on images, video frames

Primitive vs. Variant Name
The name element identifies the algorithm or operation of the function. The low-level algorithm that function
implements is a primitive. This algorithm often has several variants for different data types andimplementation variations.
For example, the CToC modifier in the ippsFFTInv_CToC_32fc function signifies that the inverse fast Fouriertransform operates on complex floating point data, performing the complex-to-complex (CToC) transform.

Data Types
The datatype element indicates data types used by the function, in the following format:<bit depth><bit interpretation>,where

bit depth = <1|8|16|32|64>16

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

and

bit interpretation<u|s|f>[c]Here u indicates “unsigned integer”, s indicates “signed integer”, f indicates “floating point”, and c indicates“complex”.
For functions that operate on a single data type, the datatype element contains only one value.
If a function operates on source and destination signals that have different data types, the respective data
type identifiers are listed in the function name in order of source and destination as follows:<datatype> = <src1Datatype>[src2Datatype][dstDatatype]For more information about supported data types see the Intel® IPP Reference Manual available in the Intel®
Software Documentation Library.

See Also
Intel® Software Documentation Library

Descriptor
The optional descriptor element describes the data associated with the operation. Descriptors areindividual characters that indicate additional details of the operation.
The Intel IPP functions use the following descriptors:
Description

ExampleA

Image data contains an alpha channel as the lastchannel, requires C4, alpha-channel is notprocessed.

ippiFilterMax_8u_AC4R

Axx

Advanced arithmetic operations with xx bits ofaccuracy.

ippsPowx_32f_A11

C

The function operates on a specified channel ofinterest (COI) for each source image.

ippiSet_8u_C3CR

Cn

Image data consists of n channels. Possible values
for n: 1, 2, 3, 4.

ippiFilterBorder_32f_C1R

Dx

Signal is x-dimensional (default is D1).

ippsConcat_8u_D2

I

Operation is in-place (default is not-in-place).

ippsAdd_16s_I

L

Platform-aware functions (see Using Intel IPP
Platform-Aware Functions for details).

ippiAdd_8u_C1RSfs_L

TL

Threading layer functions (see Using Intel IPP
Threading Layer Functions for details).

ippiAdd_8u_C1RSfs_LT

M

Operation uses a mask to determine pixels to beprocessed.

ippiCopy_8u_C1MR

Pn

Image data consists of n discrete planar (notinterleaved) channels with a separate pointer toeach plane. Possible values for n: 1, 2, 3, 4.

ippiAlphaPremul_8u_AP4R

R

Function operates on a defined region of interest(ROI) for each source image.

ippiMean_8u_C4RsSaturation and no scaling (default).

ippiConvert_16s16u_C1Rs

Descriptor

D

17

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Descriptor

Description

ExampleSfs

Saturation and fixed scaling mode (default issaturation and no scaling).

ippsConvert_16s8s_Sfs

The descriptors in function names are presented in the function name in alphabetical order.
Some data descriptors are default for certain operations and not added to the function names. For example,
the image processing functions always operate on a two-dimensional image and saturate the results without
scaling them. In these cases, the implied descriptors D2 (two-dimensional signal) and s (saturation and no
scaling) are not included in the function name.

Parameters
The parameters element specifies the function parameters (arguments).
The order of parameters is as follows:•••

All source operands. Constants follow vectors.
All destination operands. Constants follow vectors.
Other, operation-specific parameters.

A parameter name has the following conventions:•••

All parameters defined as pointers start with p, for example, pPhase, pSrc; parameters defined as double
pointers start with pp, for example, ppState. All parameters defined as values start with a lowercase
letter, for example, val, src, srcLen.
Each new part of a parameter name starts with an uppercase character, without underscore; for example,
pSrc, lenSrc, pDlyLine.
Each parameter name specifies its functionality. Source parameters are named pSrc or src, in somecases followed by names or numbers, for example, pSrc2, srcLen. Output parameters are named pDst
or dst followed by names or numbers, for example, pDst2, dstLen. For in-place operations, the input/
output parameter contains the name pSrcDst or srcDst.

Intel® Integrated Performance Primitives Domain Details
Intel IPP is divided into groups of related functions. Each subdivision is called domain, and has its own
header file, static libraries, dynamic libraries, and tests. The table below lists each domain's code, header andfunctional area.
The file ipp.h includes Intel IPP header files with the exception of cryptography and generated functions. If
you do not use cryptography and generated functions, include ipp.h in your application for forward
compatibility. If you want to use cryptography functions, you must directly include ippcp.h in yourapplication.
* available only within the Intel® System Studio suite

Library Dependencies by Domain
When you link to a certain Intel® IPP domain library, you must also link to the libraries on which it depends.
The following table lists library dependencies by domain.
Library Dependencies by Domain
Domain

Domain Code

Depends on

Color Conversion

CCCore, VM, S, I

String Operations

CH

Core, VM, S

Computer VisionCV

Core, VM, S, I

18

Developer Guide and Reference for Intel® Integrated Performance Primitives

Domain

Domain Code

Depends on

Data Compression

DCCore, VM, S

Image Processing

I

Core, VM, S

Signal Processing

S

Core, VM

Vector Math

VM

Core

1

To find which domain your function belongs to, refer to the Intel® IPP Developer Reference available in theIntel® Software Documentation Library.

See Also
Intel® Software Documentation Library

Linking Your Application with Intel® Integrated
Performance Primitives
This section discusses linking options available in Intel® Integrated Performance Primitives (Intel® IPP).
The Intel IPP library supports the following linking options:••••Single-threaded dynamic
Single-threaded staticThreading Layer staticThreading Layer dynamic
Product and Performance Information
Performance varies by use, configuration and other factors. Learn more at www.Intel.com/
PerformanceIndex.
Notice revision #20201201

Linking Options
Intel® Integrated Performance Primitives (Intel® IPP) is distributed as:••

Static library: static linking results in a standalone executable
Dynamic/shared library: dynamic linking defers function resolution until runtime and requires that you
bundle the redistributable libraries with your application

The following table provides description of libraries available for linking.

Description

Found inSingle-threaded

Threading Layer(non-threaded)(externally threaded)

Suitable for application-level threading

Implementation of application-level
threading depends on single-threaded
libraries

Main package
After installation:<ipp directory>/lib and <ipp directory>/lib32 (static)<ipp directory>/bin/ and <ipp directory>/bin32(dynamic)

19

1Intel® Integrated Performance Primitives Developer Guide and Reference

Static linking

Windows* OS: mt suffix in a library name(ipp<domain>mt.lib)
Linux* OS: no suffix in a library name(libipp<domain>.a)

Windows* OS:_mt_tl_<threading_sfx> suffix in alibrary name(ipp<domain>mt_tl_<threading_sf
x>.lib)Linux* OS: _tl_<threading_sfx> suffix
in a library name(libipp<domain>_tl_<threading_sfx>.a)+ single-threaded libraries
dependency, where <threading_sfx> is
one of {tbb, omp}

Dynamic Linking

Default (no suffix)_tl_<threading_sfx> suffix

Windows* OS: ipp<domain>.dll

Windows* OS:

Linux* OS: libipp<domain>.so

ipp<domain>_tl_<threading_sfx>.
dllLinux* OS:libipp<domain>_tl_<threading_sf
x>.so+ single-threaded library dependency,
where <threading_sfx> is one of {tbb,omp}
To switch between Intel IPP libraries, set the path to the preferred library in system variables or in yourproject, for example:•

Windows* OS:Intel® 64: SET LIB=<ipp directory>\lib•

IA-32: SET LIB=<ipp directory>\lib32
Linux* OS:Single-threaded Intel® 64: gcc <options> -L <ipp directory>/lib
Single-threaded IA-32: gcc <options> -L <ipp directory>/lib32
NOTE
On Linux* OS, Intel IPP library depends on the following Intel® C++ Compiler runtime libraries:
libirc.a, libsvml.a, and libimf.a. You should add a link to these libraries into your project. You
can find these libraries in <intel compiler directory>/lib folders.
Threading Layer depends on the OpenMP* or Intel® Threading Building Blocks (Intel® TBB) libraryaccording to the selected threading type. You can find these libraries in <intel compiler
directory>/lib or <tbb directory>/lib folders.

See Also
Automatically Linking Your Microsoft* Visual Studio* Project with Intel IPP
Configuring the Microsoft Visual Studio* IDE to Link with Intel® IPP
Library Dependencies by Domain

Automatically Linking Your Microsoft* Visual Studio* Project with Intel IPP
After a default installation of the Intel® IPP, you can easily configure your project to automatically link withIntel IPP. Configure your Microsoft* Visual Studio* project for automatic linking with Intel IPP as follows:20

Developer Guide and Reference for Intel® Integrated Performance Primitives

1.

1

Go to Project><project_name> Properties>Configuration Properties>Intel Libraries foroneAPI.
Change the Use Intel® IPP property setting by selecting one of the options to set the include
directories and the linking model, as shown on the screenshot below. See linking options for more
information.

2.

Using Intel® Integrated Performance Primitives PlatformAware Functions
Intel® Integrated Performance Primitives (Intel® IPP) library provides so-called platform-aware functions for
signal and image processing. While the rest of Intel IPP functions support only signals or images of 32-bit
integer size, Intel IPP platform-aware functions work with 64-bit object sizes if it is supported by the target
platform.
The API of platform-aware functions is similar to the API of other Intel IPP functions and has only slightdifferences. You can distinguish Intel IPP platform-aware functions by the L suffix in the function name, forexample, ippiAdd_8u_C1RSfs_L. With Intel IPP platform-aware functions you can overcome 32-bit size
limitations.
Intel IPP platform-aware functions are declared in separate header files with the _l suffix, for example,
ippi_l.h. However, you do not have to additionally include these headers in your application because they
are already included in standard Intel IPP headers (without the _l suffix). Platform-aware functions cover

only the functionality that is implemented in standard Intel IPP functions, and can be considered as additionalflavors to the existing functions declared in standard Intel IPP headers.

Using Intel® Integrated Performance Primitives Threading
Layer (TL) Functions
Intel® Integrated Performance Primitives (Intel® IPP) library provides threading layer (TL) functions for image
processing. Intel IPP TL functions are visual examples of external threading for Intel IPP functions. Taking
advantage of multithreaded execution and tile processing, Intel IPP TL functions enable you to overcome 32bit size limitations.
TL functions are provided as:•

Pre-built binaries:
•
•
•

•

Header files have the _tl suffix and can be found in: <ipp directory>/include
Library files for use with Intel® OpenMP have the _tl_omp suffix and can be found in: <ippdirectory>/lib/<arch>/tl/openmp

Library files for use with Intel® oneTBB have the _tl_tbb suffix and can be found in: <ippdirectory>/lib/<arch>/tl/tbb

Source code samples: the source code and corresponding header files are available in thecomponents_and_examples_<os>.zip archive inside the <ipp directory>/components subdirectory.
For more information about the archive contents and source code building instructions, refer to FindingIntel® IPP TL Source Code Files and Building Intel® IPP TL Libraries from Source Code, respectively.

21

1Intel® Integrated Performance Primitives Developer Guide and Reference

The API of TL functions is similar to the API of other Intel IPP functions and has only slight differences. You
can distinguish Intel IPP TL functions by the _LT or _T suffix in the function name, for example,
ippiAdd_8u_C1RSfs_LT. Intel IPP TL functions are implemented as wrappers over Intel IPP functions byusing tiling and multithreading with OpenMP* or the Intel® Threading Building Blocks. For implementation
details, please see the corresponding source code files.
Product and Performance Information
Performance varies by use, configuration and other factors. Learn more at www.Intel.com/
PerformanceIndex.
Notice revision #20201201

See Also
Finding Intel® IPP TL Source Code Files
Building Intel® IPP TL Libraries from Source CodeUsing Intel® Integrated Performance Primitives Platform-Aware Functions

Finding Intel® IPP TL Source Code Files
You can find the Intel IPP TL source code files in the components_and_examples_<os>.zip archive
available in the <ipp directory>/components subdirectory. The library source code and header files arelocated in the interfaces/tl subdirectory.

Building Intel® IPP TL Libraries from Source CodeYou can find the TL libraries source code and the tl_resize example in the /components/interfaces/tl
directory inside the components_and_examples_<os> archive available in <ipp directory>/
components/. Before building an application that uses TL, make sure that the IPPROOT environment variable
is set correctly and points to the Intel IPP library location, for more information see Setting Environment
Variables.
To build Intel IPP TL libraries and the tl_resize example, do the following:

Windows* OS
Prerequisites: The tl_resize example uses OpenGL rendering to display results. This requires Windows*
SDK to be installed on your system. Usually Windows* SDK is provided with the Microsoft* Visual Studio*
distribution. Alternatively, you can download Windows* SDK for your version of Windows* OS from https://www.microsoft.com. To disable the rendering part of tl_resize, remove the ENABLE_RENDERING macrofrom the preprocessors definitions.
1.
2.

Open the tl.sln file in Microsoft* Visual Studio*.
Choose the required configuration in the solution and build the solution using the Build command. The
example will be linked with the newly built TL libraries from the same solution.

To build TL libraries on the Intel® Threading Building Blocks (Intel® TBB) library, you need to install the IntelTBB library (for the Intel IPP standalone package).

Linux* OS
Prerequisites: The tl_resize example uses OpenGL rendering to display results. This requires thefollowing packages to be installed:••

libx11-dev
libgl1-mesa-dev

Execute the following commands using gcc4 or higher:

22

Developer Guide and Reference for Intel® Integrated Performance Primitives••

1

To build TL libraries:

make libs [ARCH=ia32|intel64] [CONF=release|debug] [TBBROOT=]
To build the tl_resize example and TL libraries:
make all [ARCH=ia32|intel64] [CONF=release|debug] [RENDERER=0|1] [TBBROOT=]If TBBROOT is set to the Intel® TBB installation root, TL libraries will be built with the TBB support. In thiscase, you need to install Intel TBB library (for the Intel IPP standalone package).
If TBBROOT is set to nothing, the OpenMP* support will be used.

See Also
Setting Environment Variables

Automatically Getting Performance Benefits with Intel(R) IPP Threading Layer
If you already have an application that uses Intel® IPP Single-Threaded libraries, you can easily get
performance benefits using the IPP Threading Layer (OpenMP* or TBB* version) without modifying yoursource code.
To enable IPP Threading Layer support in your application:
1.
2.
3.

Enable the preprocessor option IPP_ENABLED_THREADING_LAYER_REDEFINITIONS.
Add Threading Layer libraries and dependencies (TBB* or OpenMP* library) into the link line. For details
about Threading Layer libraries linking and location, refer to Linking Options
Rebuild the application.

As a result, IPP APIs used in your application are redefined with IPP Threading Layer APIs when implemented
and you receive performance benefits from external threading used in the IPP Threading Layer.

See Also
Linking Options

Using Custom Library Tool for Intel® Integrated
Performance Primitives
With the Intel® Integrated Performance Primitives (Intel® IPP) Custom Library Tool, you can build your own
dynamic library containing only the Intel IPP/Intel IPP Cryptography functionality that is necessary for yourapplication.
The use of custom libraries built with the Custom Library Tool provides the following advantages:•

Package size. Your package may have much smaller size if linked with a custom library because standard
dynamic libraries additionally contain all optimized versions of Intel IPP/Intel IPP Cryptography functions
and a dispatcher. The following table compares the contents and size of packages for an end-user
application linked with a custom dynamic library and an application linked with the standard Intel IPP
dynamic libraries:
Application linked with custom DLLApplication linked with Intel IPP dynamic
libraries

ipp_test_app.exe (for Windows*) or
ipp_test_app (for Linux* OS and macOS*)

ipp_test_app.exe (for Windows*) or
ipp_test_app (for Linux* OS and macOS*)

ipp_custom_{dll|so}.{dll|so|dylib}

ippi.{dll|so|dylib}
ippig9.{dll|so|dylib}
ippih9.{dll|so|dylib}
ippip8.{dll|so|dylib}231Intel® Integrated Performance Primitives Developer Guide and Reference

Application linked with custom DLLApplication linked with Intel IPP dynamic
libraries

ippipx.{dll|so|dylib}
ippis8.{dll|so|dylib}
ippiw7.{dll|so|dylib}
ipps.{dll|so|dylib}
ippsg9.{dll|so|dylib}
ippsh9.{dll|so|dylib}
ippsp8.{dll|so|dylib}
ippspx.{dll|so|dylib}
ippss8.{dll|so|dylib}
ippsw7.{dll|so|dylib}
ippcore.{dll|so|dylib}
Package size: 0.1 Mb•

Package size: 121.5 Mb

Smooth transition to a higher version of Intel IPP/Intel IPP Cryptography. You can easily build
the same custom dynamic library from a higher version of Intel IPP/Intel IPP Cryptography and substitutethe libraries in your application without relinking.
NOTE The current Python* version of the Intel IPP Custom Library Tool supports the host-hostconfiguration only, the host-target configuration is currently not supported.

System Requirements for Custom Library Tool
Recommended hardware:•

System based on the 2nd Generation Intel® Core processor or newer

Software requirements:•••

Visual Studio* 2015 (or higher) Redistributable Packages
Python* 3.7
PyQt5 (required only for the GUI version of the Intel IPP Custom Library Tool)

Operation Modes
You can choose one of two tool operation modes, as shown at the screen shot below:

24Developer Guide and Reference for Intel® Integrated Performance Primitives••

1

Auto build. The tool automatically sets the environment and builds a dynamic library.
Save script. The tool generates and saves a custom build script.

25

1Intel® Integrated Performance Primitives Developer Guide and Reference

Building a Custom DLL with Custom Library Tool
Follow the steps below to build a custom dynamic library using the Intel IPP Custom Library Tool:

26

Developer Guide and Reference for Intel® Integrated Performance Primitives

1.

1

Run python main.py to launch the GUI version of the tool.

27

1
2.
3.
4.
5.
6.

Intel® Integrated Performance Primitives Developer Guide and Reference

Select the Intel IPP or Intel IPP Cryptography package (optional). If you run the tool inside the Intel IPPor Intel IPP Cryptography package, the current one will be used as default. Otherwise, you need toprovide the path to the package.
Configure your custom library.
Set the library name.
Select functions from the list. You can build a dynamic library containing Intel IPP or Intel IPP
Cryptography functionality, but not both. If you need to add threaded functions to the custom list,
select Threading layer checkbox to show the list of threaded functions.
Build the library automatically (if available) or save a build script.
NOTE
You can save the configuration and the list of custom functions as a project by clicking Save projector Save project as.... The project is saved as a file with the .cltproj extension. Then you can open
this project by clicking Open project button.

Using Console Version of Custom Library Tool
Follow the steps below to build a custom dynamic library using console version of the Custom Library Tool:
1.

Define a list of Intel IPP functions that the Intel IPP Custom Library Tools should export to your custom
dynamic library. See the example text file below:

2.

Run python main.py with the following parameters:-c, --console-g, --generate-n <name>, --name <name>-p <path>, --path <path>-root <root_path>-f <function>, --function<function>

28

Launches the console version of the tool (the GUI version isused by default).
Enables the script generation mode (the build mode is usedby default).
Output library name.
Path to the output directory.
Path to Intel IPP or Intel IPP Cryptography package root
directory
Name of a function to be included into your custom dynamic
library.

Developer Guide and Reference for Intel® Integrated Performance Primitives-ff <functions_file>, -functions_file <functions_file>-arch={ia32|intel64}-mt, --multi-threaded-tl={tbb|openmp}-d , --custom_dispatcher<cpu_set>--prefix <prefix>-h, --help

1

Path to a file with a list of functions to be included into yourfinal dynamic library (the -f or --function flag can be used
to add functions on the command line).
Enables all actions for the IA-32 or the Intel ® 64 architecture(Intel ® 64 architecture is used by default).
Enables multi-threaded libraries (single-threaded libraries areused by default).
Sets Intel TBB or OpenMP* as the threading layer.
Sets the exact list of CPUs that must be supported by custom
dynamic library and generates a C-file with the custom
dispatcher.
Renames selected functions with specified prefix in thecustom dispatcher files.
Prints command help.

For example:# Generate build scripts in console mode
# with the output dynamic library name "my_custom_dll.dll"# with functions defined in the "functions.txt" file# optimized only for processors with
# Intel® Advanced Vector Extensions 512 (Intel® AVX-512)# using multi-threaded IA-32 Intel IPP libraries
python main.py -c -g–n my_custom_dll-p "C:\my_project"-ff "C:\my_project\functions.txt"-d avx512bw-arch=ia32 -mt

Using Integration Wrappers for Intel® Integrated
Performance Primitives
Intel® Integrated Performance Primitives (Intel® IPP) Integration Wrappers aggregate Intel IPP functionality ineasy-to-use functions and help to reduce effort required to integrate Intel IPP into your code.
Integration Wrappers consist of C and C++ interfaces:••

C interface aggregates Intel IPP functions of similar functionality with various data types and channels
into one function. Initialization steps required by several Intel IPP functions are implemented in one
initialization function for each functionality. To reduce the size of your code and save time required for
integration, the wrappers handle all memory management and Intel IPP function selection routines.
C++ interface wraps around the C interface to provide default parameters, easily initialized objects asparameters, exception handling, and objects for complex Intel IPP functions with automatic memory
management for specification structures.

In general, Integration Wrappers are designed to improve user experience with threading of Intel IPP
functions and tiling.
Integration Wrappers are provided as a separate download. For more information about the main concepts,
usage, and implementation details, refer to the Developer Guide and Reference for Intel IPP Integration
Wrappers document available with the Integration Wrappers package.

Programming Considerations
29

1Intel® Integrated Performance Primitives Developer Guide and ReferenceCore and Support Functions
There are several general purpose functions that simplify using the library and report information on how it isworking:••••

Init/GetCpuFeatures/ SetCpuFeatures/GetEnabledCpuFeatures
GetStatusString
GetLibVersion
Malloc/Free

Init/GetCpuFeatures/ SetCpuFeatures/GetEnabledCpuFeatures
The ippInit function detects the processor type and sets the dispatcher to use the processor-specific codeof the Intel® IPP library corresponding to the instruction set capabilities available. If your application does notcall the ippInit function, initialization of the library to the available instruction set capabilities is performed
automatically with the first call of any Intel IPP function from the domain different from ippCore.
In some cases like debugging and performance analysis, you may want to get the data on the difference
between various processor-specific codes on the same machine. Use the ippSetCpuFeatures function for
this. This function sets the dispatcher to use the processor-specific code according to the specified set of CPU
features. You can obtain features supported by CPU using ippGetCpuFeatures and obtain features
supported by the currently dispatched Intel IPP code using ippGetEnabledCpuFeatures. If you need toenable support of some CPU features without querying the system (without CPUID instruction call), you must
set the ippCPUID_NOCHECK bit for ippSetCpuFeatures, otherwise, only supported by the current CPU
features are set.
The ippInit, ippGetCpuFeatures, ippGetEnabledCpuFeatures, and ippSetCpuFeatures functions area part of the ippCore library.

GetStatusString
The ippGetStatusString function decodes the numeric status return value of Intel® IPP functions andconverts them to a human readable text:

status= ippInit();if( status != ippStsNoErr ) {printf("IppInit() Error:\n");printf("%s\n", ippGetStatusString(status) );return -1;}
The ippGetStatusString function is a part of the ippCore library.

GetLibVersion
Each domain has its own GetLibVersion function that returns information about the library layer in use
from the dispatcher. The code snippet below demonstrates the usage of the ippiGetLibVersion from theimage processing domain:

const IppLibraryVersion* lib = ippiGetLibVersion();printf("%s %s %d.%d.%d.%d\n", lib->Name, lib->Version,
lib->major, lib->minor, lib->majorBuild, lib->build);
Use this function in combination with ippInitCpu to compare the output of different implementations on thesame machine.

30

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Malloc/FreeIntel IPP functions provide better performance if they process data with aligned pointers. Intel IPP provides
the following functions to ensure that data is aligned appropriately - 16-byte for CPU that does not support
Intel® Advanced Vector Extensions (Intel® AVX) instruction set, 32-byte for Intel AVX and Intel® Advanced
Vector Extensions 2 (Intel® AVX2), and 64-byte for Intel® Many Integrated Core instructions.

void* ippMalloc(int length)
void ippFree(void* ptr)
The ippMalloc function provides appropriately aligned buffer, and the ippFree function frees it.
The signal and image processing libraries provide ippsMalloc and ippiMalloc functions, respectively, toallocate appropriately aligned buffer that can be freed by the ippsFree and ippiFree functions.
NOTE•

When using buffers allocated with routines different from Intel IPP, you may get better performance
if the starting address is aligned. If the buffer is created without alignment, use the ippAlignPtr
function.

For more information about the Intel IPP functions see the Intel® Integrated Performance Primitives for Intel®
Architecture Developer Reference available in Intel® Software Documentation Library.

See Also
Cache Optimizations
Intel® Software Documentation Library

Channel and Planar Image Data Layouts
Intel® IPP functions operate on two fundamental data layouts: channel and planar.
In channel format, all values share the same buffer and all values for the same pixel position are interleaved
together. Functions working with channel data have a _Cn descriptor, where n can take one of the following
values: 1, 2, 3, or 4. The figure below shows 24 bit per pixel RGB data, which is represented as _C3.
RGB data in _C3 layout

311Intel® Integrated Performance Primitives Developer Guide and Reference

For planar format, there is one value per pixel but potentially several related planes. Functions working withplanar data have a _Pn descriptor, where n can take one of the following values: 1, 2, 3, or 4. The figure
below shows 24 bit per pixel RGB data represented as _P3.
RGB data in _P3 layout

NOTE
For many video and image processing formats planes may have different sizes.

Regions of Interest
Many Intel® IPP image processing functions operate with a region of interest (ROI). These functions include
an R descriptor in their names.
A ROI can be the full image or a subset. This can simplify thread or cache blocking.
Many functions sample a neighborhood and cannot provide values for an entire image. In this case a ROI
must be defined for the subset of the destination image that can be computed.

32

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Managing Memory Allocations
In Intel® Integrated Performance Primitives (Intel® IPP) functions, the areas in memory allocated for thesource and destination data must not overlap, except for functions that have the descriptor I in their name.
Only the functions that have the descriptor I (see Descriptors) in their name can have the same area inmemory allocated for both the source and destination data. Intel IPP does not guarantee correct behavior
and results for not-in-place functions that are used in in-place mode.
Depending on the implementation layer and the specific operation parameters, some Intel IPP functions needvarying amounts of memory for internal structures and working buffers. To address this, follow the steps
below:
1.
2.
3.

4.
5.
6.
7.

Compute the size of the required buffer using the <function base name>GetSize function (somefunctions have GetBufSize or GetBufferSize in their name instead of GetSize).
Set up any buffers needed for initialization. For more information, see the section Setting up Buffers
below.
Initialize the specification or state structure for the operation using <function base name>Init
function. For more information about the specification and state structures, see the section
Specification and State Structures below.
Free the buffers need for initialization only (the ones you set up in step 2).
Set up working buffers for the main operation. For more information, see the section Setting up Buffers
below.
Do the main operation.
Free the specification or state buffers that you set up in step 3 and the working buffers that you set up
in step 5.

If you use several Intel IPP functions with the pBuffer parameter (external memory buffer), for better
efficiency and performance it is recommended to call all <function base name>GetSize functions in one
single location within your application and allocate only one buffer that has the largest size. This approachensures optimal use of system memory and all cache levels.

33

1Intel® Integrated Performance Primitives Developer Guide and Reference

Setting up Buffers
In this document, "setting up a buffer" refers to allocating the required amount of memory and providing apointer to this memory to the Intel IPP function you are calling. For better performance, you should allocatealigned memory buffers, where the alignment factor depends on the architecture and should be at least 16
bytes for Intel® Streaming SIMD Extensions, 32 bytes for Intel® Advanced Vector Extensions, and 64 bytes
for Intel® Advanced Vector Extensions 512 Foundation instruction sets.
To set up aligned memory buffers, it is recommended to use the ipp<domain letter>Malloc_<IPP datatype> functions; these functions always provide memory buffers with the required alignment.
NOTE Intel IPP functions do not allocate any memory internally. You must manually allocate and freepreviously allocated memory, that is required for your Intel IPP functions at the application level.
ipp<domain letter>Malloc_<IPP data type> and ipp<domain letter>Free functions allocateand free a memory block aligned to 64-byte boundary for elements of different data types. Not aligned
memory allocation could cause not reproducible performance and precision results.

Specification and State Structures
Specification, or spec, structures are const; an instance of a specification structure does not change
between Intel IPP function calls. Therefore, you can use one instance of a specification structure
simultaneously in different application threads for the same operation.
State structures are not const; they always contain the state of an intermediate computation stage of anIntel IPP function. Therefore, you can use a single instance of a state structure only for consecutive
operations. In the case of a threaded application, each thread must have its own instance of the state
structure.
Product and Performance Information
Performance varies by use, configuration and other factors. Learn more at www.Intel.com/
PerformanceIndex.
Notice revision #20201201

Cache Optimizations
To get better performance, work should be grouped to take advantage of locality in the lowest/fastest level ofcache possible. This is the same for threading or cache blocking optimizations.
For example, when operations on each pixels in an image processing pipeline are independent, the entire
image is processed before moving to the next step. This may cause many inefficiencies, as shown in a figure
below.

In this case cache may contain wrong data, requiring re-reading from memory. If threading is used, thenumber of synchronization point/barriers is more than the algorithm requires.
You can get better performance after combining steps on local data, as shown in a figure below. In this caseeach thread or cache-blocking iteration operates with ROIs, not full image.

34

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

NOTE
It is recommended to subdivide work into smaller regions considering cache sizes, especially for verylarge images/buffers.

Programming with Intel® Integrated Performance
Primitives in the Microsoft* Visual Studio* IDEThis section provides instructions on how to configure your Microsoft* Visual Studio* IDE to link with theIntel® IPP, explains how to access Intel IPP documentation and use IntelliSense* Sense features.

Configuring the Microsoft* Visual Studio* IDE to Link with Intel® IPP
Steps for configuring Microsoft Visual C/C++* development system for linking with Intel® Integrated
Performance Primitives (Intel® IPP) depend on whether you installed the C++ Integration(s) in Microsoft
Visual Studio* component:••

If you installed the integration component, see Automatically Linking Your Microsoft* Visual Studio*
Project with Intel IPP
If you did not install the integration component or need more control over Intel IPP libraries to link, you
can configure the Microsoft Visual Studio* by performing the following steps. Though some versions of the
Visual Studio* development system may vary slightly in the menu items mentioned below, thefundamental configuring steps are applicable to all these versions.
1. In Solution Explorer, right-click your project and click Properties.
2. Select Configuration Properties>VC++ Directories and set the following from the Selectdirectories for drop down menu:•••

Include Files menu item, and then type in the directory for the Intel IPP include files (default is<ipp directory>\include)

Library Files menu item, and then type in the directory for the Intel IPP library files (default is<ipp directory>\lib)Executable Files menu item, and then type in the directory for the Intel IPP executable files(default is <install_dir>\redist\<arch>\ )Using the IntelliSense* Features
Intel IPP supports two Microsoft* Visual Studio IntelliSense* features that support language references:
Complete Word and Parameter Info.
NOTE
Both features require header files. Therefore, to benefit from IntelliSense, make sure the path to theinclude files is specified in the Visual Studio solution settings. On how to do this, see Configuring theMicrosoft Visual Studio* IDE to Link with Intel® IPP.

35

1Intel® Integrated Performance Primitives Developer Guide and Reference

Complete Word
For a software library, the Complete Word feature types or prompts for the rest of the name defined in theheader file once you type the first few characters of the name in your code.
Provided your C/C++ code contains the include statement with the appropriate Intel IPP header file, tocomplete the name of the function or named constant specified in the header file, follow these steps:
1.
2.

Type the first few characters of the name (for example, ippsFFT).
Press Alt + RIGHT ARROW or Ctrl + SPACEBAR If you have typed enough characters to eliminate
ambiguity in the name, the rest of the name is typed automatically. Otherwise, the pop-up list of thenames specified in the header file opens - see the figure below.

3.

Select the name from the list, if needed.

Parameter Info
The Parameter Info feature displays the parameter list for a function to give information on the number andtypes of parameters.
To get the list of parameters of a function specified in the header file, follow these steps:
1.
2.

Type the function name
Type the opening parenthesis

A tooltip appears with the function API prototype, and the current parameter in the API prototype ishighlighted - see the figure below.

36

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

See Also
Configuring the Microsoft Visual Studio* IDE to Link with Intel® IPP

Appendix: Performance Test Tool (perfsys) Command Line
Options
Intel® Integrated Performance Primitives (Intel® IPP) installation includes command-line tools for
performance testing in the <install_dir>/tools/perfsys directory. There is one perfsys tool for eachdomain. For example, ps_ipps executable measures performance for all Intel IPP signal processing domainfunctions.
Many factors may affect Intel IPP performance. One of the best way to understand them is to run multiple
tests in the specific environment you are targeting for optimization. The purpose of the perfsys tools is tosimplify performance experiments and empower developers with useful information to get the best
performance from Intel IPP functions.
With the command-line options you can:•••Create a list of functions to test
Set parameters for each function
Set image/buffer sizes

To simplify re-running specific tests, you can define the functions and parameters in the initialization file, orenter them directly from the console.
The command-line format is:

ps_ipp*.exe [option_1] [option_2] ... [option_n]37

1Intel® Integrated Performance Primitives Developer Guide and Reference

To invoke the short reference for the command-line options, use -? or -h commands:

ps_ipp*.exe -h
The command-line options are divided into several groups by functionality. You can enter options in arbitraryorder with at least one space between each option name. Some options (like -r, -R, -o, -O) may be entered
several times with different file names, and option -f may be entered several times with different function
patterns. For detailed descriptions of the perfsys command-line options see the following table:
Performance Test Tool Command Line Options
Group

OptionDescription

Set optimization layer totest
Report Configuration-T[cpu-features]

Call ippSetCpuFeatures-A<Timing|Params|Misalign|
All>

Prompt for the parameters before every test fromconsole-o[<file-name>]

Create <file-name>.txt file and write
console output to it-O[<file-name>]

Add console output to the file <file-name>.txt-L <ERR|WARN|PARM|INFO|TRACE>

Set detail level of the console output-r[<file-name>]

Create <file-name>.csv file and write
perfsys results to it-R[<file-name>]

Add test results to the file <file-name>.csv-q[<file-name>]
-q+
-Q

38

Create <file-name>.csv and write function
parameter name lines to it
Add function parameter name lines to perfsys
results table file
Exit after creation of the function parametername table-u[<file-name>]

Create <file-name>.csv file and write
summary table ('_sum' is added to default
file name)-U[<file-name>]

Add summary table to the file <filename>.csv ('_sum' is added to default filename)-g[<file-name>]

Create signal file at the end of the whole
testing-l<dir-name>Set default directory for output files-k<and|or>Compose different keys (-f, -t, -m) bylogical operation-F<func-name>Start testing from function with func-namefull name-Y<HIGH/NORMAL>

Set high or normal process priority (normal
is default)-H[ONLY]

Add 'Interest' column to .csv file [and run
only hot tests]-N<num-threads>

Call ippSetNumThreads(<num-treads>)

Developer Guide and Reference for Intel® Integrated Performance Primitives

Group

Set function parameters
Initialization files

1

OptionDescription-s[-]Sort or do not sort functions (sort mode isdefault)-e

Enumerate tests and exit-v

Display the version number of the perfsys
and exit-@<file-name>Read command-line options for the specified file-d<name>=<value>

Set perfsys parameter value-i[<file-name>]

Read perfsys parameters from the file

<file-name>.ini

Select functions

Help-I[<file-name>]

Write perfsys parameters to the file <filename>.ini and exit

-P

Read tested function names from the .ini
file-n<title-name>Set default title name for .ini file andoutput files-p<dir-name>Set default directory for .ini file and input
test data files-f <or-pattern>

Run tests for functions with pattern intheir names, case sensitive-f-<not-pattern>

Do not test functions with pattern in theirnames, case sensitive-f+<and-pattern>

Run tests only for functions with pattern intheir names, case sensitive-f=<eq-pattern>

Run tests for functions with pattern fullname-t[-|+|=]<pattern>

Run (do not run) tests with pattern in test
name-m[-|+|=]<pattern>

Run (do not run) tests registered in file withpattern in file name-hDisplay short help and exit-hh

Display extended help and exit-h<key>

Display extended help for the key and exit

Appendix: Intel® IPP Threading and OpenMP* Support
All Intel® Integrated Performance Primitives functions are thread-safe. They support multithreading in bothdynamic and static libraries and can be used in multi-threaded applications. However, if an application has its
own threading model or if other threaded applications are expected to run at the same time on the system, it
is strongly recommended to use non-threaded/single-threaded libraries.

391Intel® Integrated Performance Primitives Developer Guide and Reference

Product and Performance Information
Performance varies by use, configuration and other factors. Learn more at www.Intel.com/
PerformanceIndex.
Notice revision #20201201

Using a Shared L2 Cache
Several functions in the signal processing domain are threaded on two threads intended for the Intel(R)Core™ 2 processor family, and make use of the merged L2 cache. These functions (single and double
precision FFT, Div, and Sqrt ) achieve the maximum performance if both two threads are executed on thesame die. In this case, the threads work on the same shared L2 cache. For processors with two cores on thedie, this condition is satisfied automatically. For processors with more than two cores, set the following
OpenMP* environmental variable to avoid performance degradation:

KMP_AFFINITY=compact
Product and Performance Information
Performance varies by use, configuration and other factors. Learn more at www.Intel.com/
PerformanceIndex.
Notice revision #20201201

Avoiding Nested Parallelization
Nested parallelization may occur if you use a threaded Intel IPP function in a multithreaded application.
Nested parallelization may cause performance degradation because of thread oversubscription.
For applications that use OpenMP threading, nested threading is disabled by default, so this is not an issue.
However, if your application uses threading created by a tool other than OpenMP*, you must disable multithreading in the threaded Intel IPP function to avoid this issue.

Disabling Multi-threading (Recommended)
The best option to disable multi-threading is to link your application with the Intel® IPP single-threaded (nonthreaded) libraries included in the default package and discontinue use of the separately downloaded multithreaded versions.
You may also call the ippSetNumThreads function with parameter 1, but this method may still incur some
OpenMP* overhead.
Product and Performance Information
Performance varies by use, configuration and other factors. Learn more at www.Intel.com/
PerformanceIndex.
Notice revision #20201201

Intel® IPP API Reference
API Reference for Intel Integrated Performance
Primitives

40

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

The Intel® Integrated Performance Primitives (Intel® IPP) is a software library that provides a comprehensive
set of application domain-specific highly optimized functions for signal, data, and image processing. The
sections below describe the API reference:Intel® Integrated Performance Primitives for Intel® Architecture Developer Reference.
Volume 1: Signal and Data Processing
The following are some important features of the signal and data processing part of the Intel® Integrated
Performance Primitives (Intel® IPP) library:

Essential Functions
Essential Functions provide arithmetic, statistical, logical and shift operations, windowing, Viterbi decoding,sampling, and conversion.

Filtering Functions
Filtering Functions perform convolution and correlation operations, as well as various types of filtering.

Transform Functions
Transform Functions implement Fourier, Hartley, Walsh-Hadamard, discrete cosine, Hilbert, and Wavelet
transforms.

Vector Initialization Functions
Vector Initialization Functions initialize vectors containing either constants, the contents of other vectors, or
the generated signals. This group also includes functions for generating samples of various types: tone,
triangle, pseudo-random with uniform distribution, and pseudo-random with Gaussian distribution, as well as
special test samples.

Fixed-Accuracy Arithmetic Functions
Fixed-Accuracy Arithmetic Functions provide power and root, exponential and logarithmic, trigonometric,
hyperbolic, and rounding operations.

Data Compression Functions
Data Compression Functions perform VLC and Huffman coding, dictionary- and BWT-based compression.

String Functions
String Functions perform text operations.
Product and Performance Information
Performance varies by use, configuration and other factors. Learn more at www.Intel.com/
PerformanceIndex.
Notice revision #20201201

Intel® Integrated Performance Primitives Concepts
This chapter explains the structure of the Intel® Integrated Performance Primitives (Intel® IPP) software andsome of the basic concepts used in the signal and data processing part of Intel IPP. It also defines function
naming conventions in the document, describes the supported data formats and operation modes.

411Intel® Integrated Performance Primitives Developer Guide and Reference

Function Naming
Naming conventions for the Intel IPP functions are similar for all covered domains.
Function names in Intel IPP have the following general format:

ipp<data-domain><name>_<datatype>[_<descriptor>][<_extension>](<parameters>)
The elements of this format are explained in the sections that follow.
NOTE
In this document, each function is introduced by its short name (without the ipps prefix andmodifiers) and a brief description of its purpose.
The ipps prefix in function names is always used in the code examples. In the text, this prefix is
usually omitted when referring to the function group.

Data-Domain
The data-domain element is a single character that denotes the group of functionality to which a givenfunction belongs. The main distinction among these groups is the type of input data. Intel IPP supports thefollowing data-domains:ssignal processing (input data is a 1D signal)i

images and video processing (input data is a 2D image)m

small matrix operations (input data is a matrix)rrealistic rendering functionality and 3D data processing (type of input data type depends
on supported rendering techniques)g

operations on signals of the fixed length

For example, function names that begin with ipps signify that respective functions are used for signal
processing.

Name
The name element identifies what function does and has the following format:<name> = <operation>[_modifier]The operation component is one or more words, acronyms, and abbreviations that describe the core
operation.
The modifier component, if present, is a word or abbreviation that denotes a slight modification or variationof the given function.
For example, names without modifiers: Add, Threshold, FirGenLowPass; with modifiers:
ippsFFTInv_CToC, Threshold_LT.

Data Types
The datatype field indicates data types used by the function, in the following format:<bit depth><bit interpretation>,where

bit depth = <1|8|16|32|64>and

bit interpretation<u|s|f>[c]42Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Here u indicates “unsigned integer”, s indicates “signed integer”, f indicates “floating point”, and c indicates“complex”.
Intel IPP supports the data types of the source and destination for signal processing functions listed in thetable below.
NOTE
In the lists of function parameters, the Ipp prefix is added to the data type. For example, 8-bit signed
data is denoted as Ipp8s type. These Intel IPP-specific data types are defined in the respective libraryheader files.

Data Types Supported by Intel IPP for Signal Processing
Type

Usual C TypeIntel IPP Type

8u
8s
16u
16s
16sc
32u
32s
32f
32fc
64s
64f
64fc

unsigned charsigned char
unsigned short
signed shortcomplex shortunsigned int
signed int
float
complex float__int64 (Windows*) or long long (Linux*)
doublecomplex double

Ipp8u
Ipp8s
Ipp16uIpp16sIpp16scIpp32uIpp32sIpp32fIpp32fc
Ipp64sIpp64fIpp64fc

For functions that operate on a single data type, the datatype field contains only one of the values listed
above.
If a function operates on source and destination signals that have different data types, the respective data
type identifiers are listed in the function name in order of source and destination as follows:<datatype> = <src1Datatype>[src2Datatype][dstDatatype]For example, the function ippsDotProd_16s16sc_Sfs computes the dot product of 16-bit short and 16-bit
complex short source vectors and stores the result in a 16-bit complex short destination vector. The
dstDatatype modifier is not present in the name because the second operand and the result are of thesame type. The result is scaled and saturated.
There are several data types, namely 24u, 24s and 16f that are not supported by Intel IPP, but can bereadily converted to the supported data types for further processing by the library functions.
For the unsigned 24u data, each vector element consists of three consecutive bytes represented as Ipp8u
data types. It has a little-endian byte order when a lower order byte is at the lower address. These data may
be converted to and from 32u or 32f data types by using the appropriate flavors of the Intel IPP function
ippsConvert.
For the signed 24s data, each vector element consists of three consecutive bytes represented as Ipp8s datatypes. It has a little-endian byte order when a lower order byte is at the lower address. The sign isrepresented by the most significant bit of the highest order byte. These data may be converted to and from32s or 32f data types by using the appropriate flavors of the Intel IPP function ippsConvert.
For the 16f format, 16-bit floating point data (half type) can represent positive and negative numbers,
whose magnitude is between roughly 6.1e-5 and 6.5e4, with a relative error of 9.8e-4 ; numbers smaller
than 6.1e-5 can be represented with an absolute error of 6.0e-8 . All integers from -2048 to +2048 can be
represented exactly.
The figure below illustrates the bit-layout for a half number:43

1Intel® Integrated Performance Primitives Developer Guide and References is the sign-bit, e is the exponent, and m is the significand.
These data may be converted to and from 16s and 32f data types by using the appropriate flavors of theIntel IPP function ippsConvert.

Descriptors
The descriptors element further describes the operation. Descriptors are individual characters that indicate
additional details of the operation.
The following descriptors are used in signal processing functions:
Descriptor

Description

I

Operation is in-place (default is not-in-place).
An in-place operation is guaranteed to be correct if and only if the Intel IPP function
performing the operation has the descriptor I in its name. In addition to thedescriptor I, all function declarations for in-place Intel IPP functions contain apointer to an in-place buffer (for example, pSrcDst) in the parameter list. Before
the function call, the in-place buffer contains the source data. After the function call,the in-place buffer contains the result of the operation.

Sfs

Saturation and fixed scaling mode (default is saturation and no scaling).

P

Operation is performed for the specified number of vectors.

If the function has more than one descriptor, they are presented in the function name in alphabetical order.
Many functions have no descriptors listed above. Such functions operate with the default behavior.

Parameters
The parameters element specifies the function parameters (arguments).
The order of parameters is as follows:•••

All source operands. Constants follow vectors.
All destination operands. Constants follow vectors.
Other, operation-specific parameters.

A parameter name has the following conventions:44Developer Guide and Reference for Intel® Integrated Performance Primitives•

1

All parameters defined as pointers start with p, defined as double pointers start with pp, for example,
pPhase, pSrc, ppState. All parameters defined as values start with a lowercase letter, for example, val,src, srcLen.

•

Each new part of a parameter name starts with an uppercase character, without underscore; for example,
pSrc, lenSrc, pDlyLine.
Each parameter name specifies its functionality. Source parameters are named pSrc or src, in somecases followed by names or numbers, for example, pSrc2, srcLen. Output parameters are named pDst
or dst followed by names or numbers, for example, pDst2, dstLen. For in-place operations, the input/
output parameter contains the name pSrcDst or srcDst.

•

Extensions
The extension field denotes an Intel IPP extension to which the function belongs. The following extensions
are supported in Intel IPP Signal Processing functions:
Extension

Description

ExampleLIntel IPP platform-aware functions

ippsMalloc_16u_L

See Also
Platform-Aware Functions for Signal Processing
Structures and Enumerators
This section describes the structures and enumerators used by Intel IPP for signal and data processing.

Library Version Structure
The IppLibraryVersion structure describes the current Intel IPP software version. The main fields of thisstructure are:
•
•
•
•
•
•

integer fields major and minor, containing version numbers;
integer field majorBuild, containing update number;
integer field build, containing build revision number;string field Name, containing the Intel IPP version name, for example, “ippSB SSE4.1”;
string field Version, containing the version description, for example, “7.1.0 (r93873)”.
string field BuildDate, containing the build date.

Complex Data Structures
Complex numbers in Intel IPP are described by the structures that contain two numbers of the respective
data type. They are real and imaginary parts of the complex number. For example, a single precision complex
number is described by the Ipp32fc structure as follows:

typedef struct {Ipp32fre;
Ipp32f im;} Ipp32fc;
The following complex data types are defined: Ipp16sc, Ipp32fc, Ipp64fc.

Function Context Structures
Some Intel IPP functions use special structures to store function-specific (context) information. For example,
the IppsFFTSpec structure stores twiddle factors and bit reverse indexes needed in the fast Fouriertransform.
Two different kinds of structures are used:•

specification structures that are not modified during function operation; they have the suffix Spec in their
names

45

1
•

Intel® Integrated Performance Primitives Developer Guide and Reference

state structures that are modified during operation; they have the suffix State in their names.

The function context interpretation is processor dependent. Therefore, these context-related structures are
not defined in the public headers, and their fields are not accessible. Intel IPP provides no option ofmodifying these structures or creating a function context as an automatic variable.

Enumerators
The IppStatus constant enumerates the status values returned by the Intel IPP functions, indicating
whether the operation is error-free. See section Error Reporting in this chapter for more information on theset of valid status values and corresponding error messages for signal processing functions.
The IppCmpOp enumeration defines the type of relational operator to be used by threshold functions:typedef enum {ippCmpLess,
ippCmpLessEq,
ippCmpEq,
ippCmpGreaterEq,
ippCmpGreater} IppCmpOp;
The IppRoundMode enumeration defines the rounding mode to be used by conversion functions:typedef enum {ippRndZero,ippRndNear,
ippRndFinancial} IppRoundMode;
The IppHintAlgorithm enumeration defines the type of code to be used in some operations: faster but lessaccurate, or vice-versa, more accurate but slower. For more information on using this enumeration, see Hint
Arguments.

typedef enum {ippAlgHintNone,
ippAlgHintFast,
ippAlgHintAccurate} IppHintAlgorithm;
The IppCpuType enumerates processor types returned by the ippGetCpuType function:

typedef enum {/* Enumeration:
Processor:*/
ippCpuUnknown = 0x0,
ippCpuPP,/* Intel(R) Pentium(R) processor*/
ippCpuPMX,/* Pentium(R) processor
with MMX(TM) technology*/
ippCpuPPR,/* Pentium(R) Pro processor*/
ippCpuPII,/* Pentium(R) II processor*/
ippCpuPIII,/* Pentium(R) III processor
and Pentium(R)III Xeon(R) processor*/
ippCpuP4,/* Pentium(R) 4 processor
and Intel(R) Xeon(R) processor*/
ippCpuP4HT,/* Pentium(R) 4 processor with HT Technology */ippCpuP4HT2,/* Pentium(R) 4 processor with Intel(R)Streaming SIMD Extensions 3*/
ippCpuCentrino,/* Intel(R) Centrino(R) processor technology*/
ippCpuCoreSolo,/* Intel(R) Core(TM) Solo processor*/
ippCpuCoreDuo,/* Intel(R) Core(TM) Duo processor*/
ippCpuITP= 0x10, /* Intel(R) Itanium(R) processor*/
ippCpuITP2/* Intel(R) Itanium(R) 2 processor*/
ippCpuEM64T = 0x20, /* Intel(R) 64 Instruction Set
46

Developer Guide and Reference for Intel® Integrated Performance Primitives

ippCpuC2D,
ippCpuC2Q,
ippCpuPenryn,

1Architecture(ISA)*//* Intel(R) Core(TM) 2 Duo processor*//* Intel(R) Core(TM) 2 Quad processor*//* Intel(R) Core(TM) 2 processor withIntel(R) SSE4.1*//* Intel(R) Atom (TM) processor *//* Intel (R) Core(TM) i7 processor

ippCpuBonnell,
ippCpuNehalem,
ippCpuNext,
ippCpuSSE= 0x40, /* Processor supports Pentium(R) III
processor instruction set*/
ippCpuSSE2,/* Processor supports Intel(R) Streaming SIMD
Extensions 2 instruction set*/
ippCpuSSE3,/* Processor supports Intel(R) Streaming SIMD
Extensions 3 instruction set*/
ippCpuSSSE3,/* Processor supports Supplemental Streaming
SIMD Extensions 3 instruction set*/
ippCpuSSE41,/* Processor supports Intel(R) Streaming SIMD
Extensions 4.1 instruction set*/
ippCpuSSE42,/* Processor supports Intel(R) Streaming SIMD
Extensions 4.2 instruction set*/
ippCpuAVX,/* Processor supports Intel(R) Advanced Vector
Extensions instruction set*/
ippCpuAES,/* Processor supports Intel(R) AES
new instructions*/
ippCpuX8664 = 0x60,/* Processor supports 64 bit extension*/} IppCpuType;
Product and Performance Information
Performance varies by use, configuration and other factors. Learn more at www.Intel.com/
PerformanceIndex.
Notice revision #20201201
The IppWinType enumeration defines the type of window to be used by the FIR filter coefficient generating
functions:typedef enum {ippWinBartlett,ippWinBlackman,
ippWinHamming,
ippWinHann,
ippWinRect} IppWinType;The IppLZ77ComprLevel enumeration defines the compression level to be used by the ZLIB datacompression functions:typedef enum {IppLZ77FastCompr,
IppLZ77AverageCompr,
IppLZ77BestCompr} IppLZ77ComprLevel;471Intel® Integrated Performance Primitives Developer Guide and Reference

The IppLZ77Chcksm enumeration defines what algorithm is used to compute the checksum by the ZLIB datacompression functions:typedef enum {IppLZ77NoChcksm,
IppLZ77Adler32,
IppLZ77CRC32} IppLZ77Chcksm;
The IppLZ77Flush enumeration defines what encoding mode is used by the ZLIB data compressionfunctions:typedef enum {IppLZ77NoFlush,
IppLZ77SyncFlush,
IppLZ77FullFlush,
IppLZ77FinishFlush} IppLZ77Flush;
The IppLZ77DeflateStatus enumeration defines the encoding status that is used by the ZLIB datacompression functions:typedef enum {IppLZ77StatusInit,
IppLZ77StatusLZ77Process,
IppLZ77StatusHuffProcess,
IppLZ77StatusFinal} IppLZ77DeflateStatus;
The IppLZ77InflateStatus enumeration defines the decoding status that is used by the ZLIB datacompression functions:typedef enum {IppLZ77InflateStatusInit,
IppLZ77InflateStatusHuffProcess
IppLZ77InflateStatusLZ77Process,
IppLZ77InflateStatusFinal} IppLZ77InflateStatus;
The IppLZ77HuffMode enumeration defines the encoding mode that is used by the ZLIB data compressionfunctions:typedef enum {IppLZ77UseFixed,
IppLZ77UseDynamic,
IppLZ77UsedStored} IppLZ77HuffMode;
The IppInflateState enumeration defines the decoding parameters that are used by the ZLIB datacompression functions:typedef struct IppInflateState {const Ipp8u* pWindow;
unsigned int winSize;
unsigned int tableType;// pointer to the sliding window// (the dictionary for the LZ77 algorithm)// size of the sliding window// type of Huffman code tables// (for example, 0 - tables for

Fixed
unsigned int tableBufferSize;} IppInflateState;48// Huffman codes)//(ENOUGH = 2048) * (sizeof(code) = 4)// - sizeof(IppInflateState)Developer Guide and Reference for Intel® Integrated Performance Primitives

1

The IppInflateMode enumeration defines the decode mode that is used by the ZLIB data compressionfunctions:typedef enum {ippTYPE,
ippLEN,ippLENEXT} IppInflateMode;
The IppGITStrategyHint enumeration defines which strategy of encoding is used in some operations by
the GIT data compression functions:typedef enum {ippGITNoStrategy,
ippGITLeftReorder,
ippGITRightReorder,
ippGITFixedOrder} IppGITStrategyHint;
The IppEnum enumeration defines the configuration of the algorithm for some functions:typedef int IppEnum;
The IppAlgType enumeration defines the type of the algorithm implementation:

typedef enum {ippAlgAuto
ippAlgDirect
ippAlgFFT
ippAlgMask} IppAlgType;= 0x00000000, // default= 0x00000001,= 0x00000002,= 0x000000FF,

The IppsNormOp enumeration defines the type of normalization that should be applied to the output data:

typedef enum {ippsNormNone
ippsNormA
ippsNormB
ippsNormMask} IppsNormOp;= 0x00000000,// default= 0x00000100,// biased normalization= 0x00000200,// unbiased normalization= 0x0000FF00,

The IppFourSymb structure used in Long Term Evolution (LTE) Wireless Support Functions stores thedestination data grouped by four symbols:

typedef struct {Ipp16sc symb[4];} IppFourSymb;

Data Ranges
The range of values that can be represented by each data type lies between the lower and upper bounds.
The following table lists data ranges and constant identifiers used in Intel IPP to denote the respective range
bounds:Data Types and Ranges
Data
Type

Lower Bound

8s
8u
16s
16u

IPP_MIN_8S

Identifier

Upper Bound
Value

Identifier

Value

-128

IPP_MAX_8S
IPP_MAX_8U
IPP_MAX_16S
IPP_MAX_16U

127

0

IPP_MIN_16S-32768
0

255
32767
65535

49

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Data
Type

Lower Bound

Upper Bound

Identifier

Value

Identifier

Value

32s
32u
32f †
64s
64f †

IPP_MIN_32S-231

IPP_MAX_32S
IPP_MAX_32U
IPP_MAXABS_32F
IPP_MAX_64S
IPP_MAXABS_64F

231 -1

0

IPP_MINABS_32F
IPP_MIN_64S
IPP_MINABS_64F

1.175494351e-38-263
2.2250738585072014e-308

232 -1
3.402823466e38
263 -1
1.7976931348623158e308† The range for absolute values.

Data AlignmentIntel IPP is built using the compiler option /Zp16, which aligns the structure fields on the field size or 16
bytes if the size is greater than 16.
You can also use the ippsMalloc function to align the allocated memory pointer on 64 bytes.

Rounding Mode
General signal processing functions use rounding. The default rounding mode is nearest even, that is the
fixed point number x=N + α, 0 ≤ α < 1, where N is an integer number, is rounded as given by:

For example, 1.5 will be rounded to 2 and 2.5 to 2.
Some functions have additional rounding modes, which are set by the parameter roundMode.
Important•

Functions for data compression, data integrity, string processing and fixed-accuracy arithmetic do
not perform rounding.

Integer Scaling
Some signal processing functions operating on integer data use scaling of the internally computed output
results by the integer scaleFactor, which is specified as one of the function parameters. These functions
have the Sfs descriptor in their names.
The scale factor can be negative, positive, or zero. Scaling is applied because internal computations are
generally performed with a higher precision than the data types used for input and output signals.
NOTE
The result of integer operations is always saturated to the destination data type range.

50Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Scaling of an integer result is done by multiplying the output vector values by 2-scaleFactor before thefunction returns. This helps retain either the output data range or its precision. Usually the scaling with apositive factor is performed by the shift operation. The result is rounded off to the nearest even integer
number (see "Rounding Mode").
For example, the integer Ipp16s result of the square operation ippsSqr for the input value 200 is equal to32767 instead of 40000, that is, the result is saturated and the exact value can not be restored.
The scaling of the output value with the factor scaleFactor = 1 yields the result 20000, which is not
saturated, and the exact value can be restored as 20000*2. Thus, the output data range is retained.
The following example shows how the precision can be partially retained by means of scaling.
The integer square root operation ippsSqrt (without scaling) for the input value 2 gives the result equal to 1
instead of 1.414. Scaling of the internally computed output value with the factor scaleFactor = -3 gives
the result 11, and permits to restore the more precise value as 11*2 -3 = 1.375.

See Also
Rounding Mode
Error Reporting
The Intel IPP functions return the status of the performed operation to report errors and warnings to thecalling program. The last value of the error status is not stored, and you need to decide whether to check itor not as the function returns. The status values are of the IppStatus type and are global constant integers.
The following table lists status codes and corresponding messages reported by Intel IPP for signal processing.
Error Status Values and Messages
StatusippStsCpuNotSupportedErr
ippStsUnknownStatusCodeErr
ippStsLzoBrokenStreamErr
ippStsRoundModeNotSupportedErr
ippStsRegExpOptionsErr
ippStsRegExpErr
ippStsRegExpMatchLimitErr
ippStsRegExpQuantifierErr
ippStsRegExpGroupingErr
ippStsRegExpBackRefErr
ippStsRegExpChClassErr
ippStsRegExpMetaChErr
ippStsLengthErr
ippStsToneMagnErr
ippStsToneFreqErr
ippStsTonePhaseErr
ippStsTrnglMagnErr
ippStsTrnglFreqErr
ippStsTrnglPhaseErr
ippStsTrnglAsymErr
ippStsHugeWinErr
ippStsJaehneErr
ippStsStepErr
ippStsStrideErr
ippStsEpsValErr
ippStsScaleRangeErr
ippStsThresholdErr

Message
The target cpu is not supported.
Unknown status code.
LZO safe decompression function cannot decode LZO stream.
Rounding mode is not supported.
RegExp: Options for the pattern are incorrect.
RegExp: The structure pRegExpState contains wrong data.
RegExp: The match limit has been exhausted.
RegExp: Incorrect quantifier.
RegExp: Incorrect grouping.
RegExp: Incorrect back reference.
RegExp: Incorrect character class.
RegExp: Icnorrect metacharacter.
Incorrect value for string length.
Tone magnitude is less than or equal to zero.
Tone frequency is negative, or greater than or equal to 0.5.
Tone phase is negative, or greater than or equal to 2*PI.
Triangle magnitude is less than or equal to zero.
Triangle frequency is negative, or greater than or equal to 0.5.
Triangle phase is negative, or greater than or equal to 2*PI.
Triangle asymmetry is less than -PI, or greater than or equal toPI.
The Kaiser window is too big.
Magnitude value is negative.
Step value is not valid.
Stride value is less than length of the row.
Negative epsilon value.
Scale bounds are out of range.
Invalid threshold bounds.

51

1Intel® Integrated Performance Primitives Developer Guide and ReferenceippStsWtOffsetErr
ippStsAnchorErr
ippStsMaskSizeErr
ippStsShiftErr
ippStsSampleFactorErr
ippStsSamplePhaseErr
ippStsFIRMRFactorErr
ippStsFIRMRPhaseErr
ippStsRelFreqErr
ippStsFIRLenErr
ippStsIIROrderErr
ippStsResizeFactorErr
ippStsDivByZeroErr
ippStsInterpolationErr
ippStsMirrorFlipErr
ippStsMoment00ZeroErr
ippStsThreshNegLevelErr
ippStsContextMatchErr
ippStsFftFlagErr
ippStsFftOrderErr
ippStsMemAllocErr
ippStsNullPtrErr
ippStsSizeErr
ippStsBadArgErr
ippStsErr
ippStsNoErr
ippStsNoOperation
ippStsSqrtNegArg
ippStsEvenMedianMaskSize
ippStsDivByZero
ippStsLnZeroArg
ippStsLnNegArg
ippStsNanArg
ippStsOverflow
ippStsUnderflow
ippStsSingularity
ippStsDomain
ippStsCpuMismatch
ippStsOvermuchStrings
ippStsOverlongString
ippStsSrcSizeLessExpected
ippStsDstSizeLessExpected
ippStsNotSupportedCpu
ippStsAlgTypeErr*)

52

Invalid offset value for wavelet filter.
Anchor point is outside the mask.
Invalid mask size.
Shift value is less than zero.
Sampling factor is less than or equal to zero.
Phase value is out of range, 0 ≤ phase < factor.
MR FIR sampling factor is less than or equal to zero.
MR FIR sampling phase parameter is negative, or greater thanor equal to the sampling factor.
Relative frequency value is out of range.
Length of the FIR filter is less than or equal to zero.
Order of the IIR filter is not valid.
Resize factor(s) is less than or equal to zero.
An attempt to divide by zero.
Invalid interpolation mode.
Invalid flip mode.
Moment value M(0,0) is too small to continue calculations.
Negative value of the level in the threshold operation.
Context parameter does not match the operation.
Invalid value for the FFT flag parameter.
Invalid value for the FFT order parameter.
Not enough memory for the operation.
Null pointer error.
Incorrect value for data size.
Incorrect argument/parameter of the function.
Unknown/unspecified error.
No errors.
No operation has been executed.
Negative value(s) of the argument in the function Sqrt.
Even size of the Median Filter mask was replaced by the oddone.
Zero value(s) of the divisor in the function Div.
Zero value(s) of the argument in the function Ln.
Negative value(s) of the argument in the function Ln.
Argument value is not a number.
Overflow in the operation.
Underflow in the operation.
Singularity in the operation.
Argument is out of the function domain.
Cannot set the library for the given cpu.
Number of destination strings is more than expected.
Length of one of the destination strings is more than expected.
DC: The size of source buffer is less than the expected one.
DC: The size of destination buffer is less than the expected one.
The CPU is not supported.
The algorithm type is not supported.

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Product and Performance Information
Performance varies by use, configuration and other factors. Learn more at www.Intel.com/
PerformanceIndex.
Notice revision #20201201
The status codes ending with Err (except for the ippStsNoErr status) indicate an error; the integer valuesof these codes are negative. When an error occurs, the function execution is interrupted. All other status
codes indicate warnings. When a specific case is encountered, the function execution is completed and thecorresponding warning status is returned.
For example, if the integer function ippsDiv_8u meets an attempt to divide a positive value by zero, thefunction execution is not interrupted. The result of the operation is set to the maximum value that can be
represented by the source data type, and the function returns the warning status ippStsDivByZero. This is
the case for the vector-vector operation ippsDiv. For the vector-scalar division operation ippsDivC, thefunction behavior is different: if the constant divisor is zero, then the function stops execution and returns
immediately with the error status ippStsDivByZeroErr.

Platform-Aware Functions in Signal and Data Processing
Intel® Integrated Performance Primitives (Intel® IPP) library provides so-called platform-aware functions.
These functions use the special data type IppSizeL for object sizes. The IppSizeL data type represents
memory-related quantities: it can be 32- or 64-bit wide depending on the target architecture.
While the rest of Intel IPP functions support only objects of 32-bit integer size, platform-aware functions canwork with 64-bit object sizes if it is supported by the platform. The API of platform-aware functions is similar
to the API of other Intel IPP functions and has only slight differences. You can distinguish platform-aware
functions by the L suffix in the function name, for example, ippsMalloc_16u_L.
Currently, the following signal processing functions have platform-aware APIs:
Function Group

HeaderFunction Name

Support Functions

ipps_l.h

MallocIntel IPP platform-aware functions are documented as additional flavors to the existing functions declared instandard Intel IPP headers (without the l suffix). The ipps_l.h header is included into ipps.h.

Code Examples
The document contains a number of code examples that use the Intel IPP functions. These examples show
both some particular features of the primitives and how the primitives can be called. Many of these code
examples output result data together with the status code and associated messages in case of an error or awarning condition.
To keep the example code simpler, special definitions of print statements are used that get output strings
look exactly the way it is needed for better representation of results of different format, as well as print
status codes and messages.
The code definitions given below make it possible to build the examples contained in the document bystraightforward copying and pasting the example code fragments.

#define genPRINT(TYPE,FMT) \void printf_##TYPE(const char* msg, Ipp##TYPE* buf, int len, IppStatus st ) { \int n; \if( st > ippStsNoErr ) \printf( "\n-- warning %d, %s", st, ippGetStatusString( st )); \else if( st < ippStsNoErr ) \printf( "\n-- error %d, %s", st, ippGetStatusString( st )); \printf("\n %s \n", msg ); \for( n=0; n<len; ++n ) printf( FMT, buf[n] ); \printf("\n" ); \}genPRINT( 64f, " %f" )53

1Intel® Integrated Performance Primitives Developer Guide and Reference

genPRINT( 32f, " %f" )genPRINT( 32u, " %u" )genPRINT( 16s, " %d" )genPRINT( 8u, " %u" )#define genPRINTcplx(TYPE,FMT) \void printf_##TYPE(const char* msg, Ipp##TYPE* buf, int len, IppStatus st ) { \int n; \if( st > ippStsNoErr ) \printf( "\n-- warning %d, %s", st, ippGetStatusString( st )); \else if( st < ippStsNoErr ) \printf( "\n-- error %d, %s", st, ippGetStatusString( st )); \printf(" %s ", msg ); \for( n=0; n<len; ++n ) printf( FMT, buf[n].re, buf[n].im ); \printf("\n" ); \}genPRINTcplx( 64fc, " {%f,%f}" )genPRINTcplx( 32fc, " {%f,%f}" )genPRINTcplx( 16sc, " {%d,%d}" )#define genPRINT_2D(TYPE,FMT) \void printf_##TYPE##_2D(const char* msg, Ipp##TYPE* buf, IppiSize roi, int step, IppStatus st ){ \int i, j; \if ( st > ippStsNoErr ) { \printf( "\n-- warning %d, %s", st, ippGetStatusString( st )); \} else if ( st < ippStsNoErr ) { \printf( "\n-- error %d, %s", st, ippGetStatusString( st )); \} \printf("\n %s \n", msg ); \for ( i=0; i<roi.height; i++ ) { \for ( j=0; j<roi.width; j++ ) { \printf( FMT, ((Ipp##TYPE*)(((Ipp8u*)buf) + i*step))[j] ); \} \printf("\n"); \} \printf("\n" ); \}genPRINT_2D( 8u, " %u" )genPRINT_2D( 32f, " %.1f" )Support Functions®

This chapter describes Intel IPP support functions. Use these functions to:••••

Retrieve information about the current Intel IPP software version
Allocate and free memory that is needed for the operation of other Intel IPP functions
Retrieve information about the processor and perform specific auxiliary operations
Perform internationalization

Version Information Functions
These functions return the version number and other information about the active Intel IPP software.

GetLibVersion
Returns information about the active version of theIntel IPP signal processing software.

54

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Syntaxconst IppLibraryVersion* ippsGetLibVersion(void);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Description
This function returns a pointer to a static data structure IppLibraryVersion that contains information
about the current version of the Intel IPP software for signal processing. There is no need for you to releasememory referenced by the returned pointer, as it points to a static variable. The following fields of the
IppLibraryVersion structure are available:major

Major number of the current library version.

minor

Minor number of the current library version.

majorBuild

Update number.

build

Build revision number.

targetCpu[4]Intel® processor.

Name

Name of the current library version.

VersionLibrary version string.

BuildDate

Library version actual build date.

For example, if the library version is “9.0 ”, build revision number is “49671”, library name is “ippSP AVX2”,
target CPU is processor with Intel® Advanced Vector Extensions 2 (Intel® AVX2) and build date is “Dec 72015”, then the fields in this structure are set as:

major = 9, minor = 0, Name = “ippSP AVX2”, Version = “9.0.1 (r49671)”, targetCpu[4]=“h9”, BuildDate= “Dec 7 2015”

NOTE
Each sub-library in the signal processing domain has its own similar function to retrieve
information about the active library version. Version information functions for sub-libraries
have the same interface as ippsGetLibVersion.
The following table provides the list of version information functions and respective header files where thesefunctions are declared:
Function Name

Header File

ippGetLibVersion

ippcore.hippccGetLibVersion

ippcc.hippcvGetLibVersion

ippcv.h55

1Intel® Integrated Performance Primitives Developer Guide and Reference

Function Name

Header FileippchGetLibVersion

ippch.hippdcGetLibVersion

ippdc.hippvmGetLibVersion

ippvm.hippeGetLibVersion

ippe.hExampleExampleThe following example shows how to use the ippsGetLibVersion function :const IppLibraryVersion* lib;
lib = ippsGetLibVersion();printf("major = %d\n",lib->major);
printf("minor = %d\n",lib->minor);printf("majorBuild = %d\n",lib->majorBuild);
printf("build = %d\n",lib->build);
printf("targetCpu = %c%c%c%c\n",lib->targetCpu[0],lib->targetCpu[1],lib->targetCpu[2],lib>targetCpu[3]);printf("Name = %s\n", lib->Name);printf("Version = %s\n", lib->Version);
printf("BuildDate = %s\n", lib->BuildDate);

Memory Allocation Functions
This section describes the Intel IPP signal processing functions that allocate aligned memory blocks for dataof required type or free the previously allocated memory. The size of allocated memory is specified by the
number of allocated elements len.
NOTE
Use the ippsFree() to free memory allocated by ippsMalloc(). Use free to free memory allocatedby malloc or calloc.

Malloc
Allocates memory aligned to 64-byte boundary.

SyntaxCase 1: Memory allocation for blocks of 32-bit length
Ipp8u* ippsMalloc_8u(int len);
Ipp16u* ippsMalloc_16u(int len);
Ipp32u* ippsMalloc_32u(int len);
Ipp8s* ippsMalloc_8s(int len);
Ipp16s* ippsMalloc_16s(int len);
Ipp32s* ippsMalloc_32s(int len);
Ipp64s* ippsMalloc_64s(int len);56

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Ipp32f* ippsMalloc_32f(int len);
Ipp64f* ippsMalloc_64f(int len);
Ipp8sc* ippsMalloc_8sc(int len);
Ipp16sc* ippsMalloc_16sc(int len);
Ipp32sc* ippsMalloc_32sc(int len);
Ipp64sc* ippsMalloc_64sc(int len);
Ipp32fc* ippsMalloc_32fc(int len);
Ipp64fc* ippsMalloc_64fc(int len);Case 2: Memory allocation for platform-aware functions
Ipp8u* ippsMalloc_8u_L(IppSizeL len);
Ipp16u* ippsMalloc_16u_L(IppSizeL len);
Ipp32u* ippsMalloc_32u_L(IppSizeL len);
Ipp8s* ippsMalloc_8s_L(IppSizeL len);
Ipp16s* ippsMalloc_16s_L(IppSizeL len);
Ipp32s* ippsMalloc_32s_L(IppSizeL len);
Ipp64s* ippsMalloc_64s_L(IppSizeL len);
Ipp32f* ippsMalloc_32f_L(IppSizeL len);
Ipp64f* ippsMalloc_64f_L(IppSizeL len);
Ipp8sc* ippsMalloc_8sc_L(IppSizeL len);
Ipp16sc* ippsMalloc_16sc_L(IppSizeL len);
Ipp32sc* ippsMalloc_32sc_L(IppSizeL len);
Ipp64sc* ippsMalloc_64sc_L(IppSizeL len);
Ipp32fc* ippsMalloc_32fc_L(IppSizeL len);
Ipp64fc* ippsMalloc_64fc_L(IppSizeL len);

Include Files
ipps.h
Flavors with the _L suffix: ipps_l.h

Domain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameterslen

Number of elements to allocate.

Description
This function allocates memory block aligned to 64-byte boundary for elements of different data types.

57

1Intel® Integrated Performance Primitives Developer Guide and Reference

NOTE Not aligned memory allocation could cause not reproducible performance andprecision results.

ExampleThe following example shows how to use theippsMalloc_8u function:

void func_malloc(void){
Ipp8u* pBuf = ippsMalloc_8u(8*sizeof(Ipp8u));if(NULL == pBuf)// not enough memory
ippsFree(pBuf);}

Return Values
The return value of ippsMalloc is a pointer to an aligned memory block. If no memory is available in thesystem, then the NULL value is returned. To free this block, use the ippsFree function.

See Also
Free Frees memory allocated by the function ippsMalloc.
Free
Frees memory allocated by the function ippsMalloc.

Syntaxvoid ippsFree(void* ptr);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
Pointer to a memory block to be freed. The memory block
pointed to with ptr is allocated by the function ippsMalloc.

ptr

Description
This function frees the aligned memory block allocated by the function ippsMalloc.

NOTE
Use the ippsFree() to free memory allocated by ippsMalloc(). Use free to free memory
allocated by malloc or calloc.

58

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Common Functions
This section describes the Intel IPP functions that perform special operations common for all domains. All
these functions are grouped in the separate sub-library called ippcore.

GetStatusString
Translates a status code into a message.

Syntaxconst char* ippGetStatusString(IppStatus stsCode);

Include Files
ippcore.hParameters
stsCodeCode that indicates the status type (see Error Status Values
and Messages).

Description
This function returns a pointer to the text string associated with a status code of IppStatus type . Use thisfunction to produce error and warning messages for users. The returned pointer is a pointer to an internal
static buffer and does not need to be released.

ExampleThe following code example shows how to use the function ippGetStatusString. If you call an Intel IPP
function ippsAddC_16s_I with a NULL pointer, it returns an error code -8. The status information function
translates this code into the corresponding message "Null Pointer Error".

void statusinfo(void) {IppStatus st = ippsAddC_16s_I (3, 0, 0);
printf("%d : %s\n", st, ippGetStatusString(st));}
Output:-8, Null Pointer Error

GetL2CacheSize
Retrieves L2 cache size, in bytes.

SyntaxIppStatus ippGetL2CacheSize(int* pSize);

Include Files
ippcore.hParameters
pSize

Pointer to an integer number to store the cache size.

591Intel® Integrated Performance Primitives Developer Guide and Reference

Description
The ippGetL2CacheSize function retrieves L2 cache size for the CPU on which it is executed. This function
is based on function #4 of the CPUID instruction, and therefore works only for the CPUs that support thisfunction. For old and non-Intel CPUs that do not support this CPUID extension, the function returns theippStsCpuNotSupportedErr status. It means that L2 cache size cannot be obtained with theippGetL2CacheSize function and you should use other methods based on a particular CPU specification.
Product and Performance Information
Performance varies by use, configuration and other factors. Learn more at www.Intel.com/
PerformanceIndex.
Notice revision #20201201

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error condition when the pSize pointer is NULL.

ippStsNotSupportedCpu

Indicates that the processor is not supported.

ExampleGetCacheParams
Retrieves cache type, level, and size.

SyntaxIppStatus ippGetCacheParams(IppCache** ppCacheInfo);

Include Files
ippcore.hParameters
ppCacheInfo

Pointer to an array of structures describing CPU cache, which
are defined in ipptypes.h:
typedef struct {int type;
int level;
int size} IppCache;where• type can have the following values:
0

NULL - no more caches

1

Data cache

2Instruction cache

3

Unified cache• level starts with 1

60

Developer Guide and Reference for Intel® Integrated Performance Primitives

1• size is in bytes

Description
The ippGetCacheParams function retrieves the following cache parameters for the CPU on which it isexecuted: type of cache (instruction, data, unified), cache level in cache hierarchy, and cache size, in bytes.
The function is based on function #4 of the CPUID instruction, and therefore works only for the CPUs that
support this function. For old and non-Intel CPUs that do not support this CPUID extension, the function
returns the ippStsCpuNotSupportedErr status. It means that cache parameters cannot be obtained with
the ippGetCacheParams function and you should use other methods based on a particular CPU specification.
Product and Performance Information
Performance varies by use, configuration and other factors. Learn more at www.Intel.com/
PerformanceIndex.
Notice revision #20201201

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsNotSupportedCpu

Indicates no error.
Indicates an error condition when the ppCacheInfo pointer is

NULL.

Indicates that the processor is not supported.

ExampleGetCpuClocks
Returns a current value of the time stamp counter(TSC) register.

SyntaxIpp64u ippGetCpuClocks (void);

Include Files
ippcore.h

Description
This function reads the current state of the TSC register and returns its value.

GetCpuFreqMhz
Estimates the processor operating frequency.

SyntaxIppStatus ippGetCpuFreqMhz(int* pMhz);

Include Files
ippcore.h611Intel® Integrated Performance Primitives Developer Guide and Reference

Parameters
Pointer to the result.

pMhz

Description
This function estimates the processor operating frequency and returns its value, in MHz as an integer stored
in pMhz. The estimated value can vary depending on the processor workload.
NOTE
To improve precision of the return value, this function accumulates CPU clocks. This operation takes
several seconds and may result in long execution time.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error condition when the pMhz pointer is NULL.

GetCpuFeatures
Retrieves the processor features.

SyntaxIppStatus ippGetCpuFeatures(Ipp64u* pFeaturesMask, Ipp32u pCpuidInfoRegs[4]);Include Files
ippcore.hParameters
pFeaturesMask

Pointer to the features mask. Possible value is
ippCPUID_GETINFO_A.

pCpuidInfoRegs

Pointer to the vector with four elements to store the data fromthe registers eax, ebx, ecx, edx of the function CPUID.1.

Description
This function retrieves some of the CPU features returned by the function CPUID.1 and stores themconsecutively in the mask pFeaturesMask. The following table lists the features stored in the mask.
If pFeaturesMask does not have any input value, then the function retrieves the features in accordance with
eax=1 and ecx=0. If pFeaturesMask is set to ippCPUID_GETINFO_A, then the function retrieves thefeatures in accordance with the input values of the registers eax and ecx that are specified in this case by
the pCpuidInfoRegs[0] and pCpuidInfoRegs[2] respectively.
Mask Value
0x00000001
0x00000002

0x00000004

62

Bit Name

FeatureMask Bit Number

ippCPUID_MMX

MMX™ technology

0

ippCPUID_SSE

Intel® Streaming
SIMD Extensions

1

ippCPUID_SSE2

Intel® Streaming
SIMD Extensions 2

2

Developer Guide and Reference for Intel® Integrated Performance Primitives

Mask Value
0x00000008

0x00000010

0x00000020

0x00000040

0x00000080

0x00000100

1

Bit Name

FeatureMask Bit Number

ippCPUID_SSE3

Intel® Streaming
SIMD Extensions 3

3

ippCPUID_SSSE3

Supplemental
Streaming SIMD
Extensions

4

ippCPUID_MOVBE

MOVBE instruction is
supported

5

ippCPUID_SSE41

Intel® Streaming
SIMD Extensions 4.1

6ippCPUID_SSE42

Intel® Streaming
SIMD Extensions 4.2

7

The processor supports
Intel® Advanced Vector

8

ippCPUID_AVX

Extensions (Intel® AVX)
instruction set
0x00000200
0x00000400

0x00000800

0x00002000

0x00004000

0x00008000

0x00010000

0x00020000

The operating system
supports Intel® AVX

9

ippCPUID_AES

Advanced Encryption
Standard (AES)
instructions aresupported

10

ippCPUID_CLMUL

PCLMULQDQ
instruction is
supported

11

ippCPUID_RDRAND

Read Random
Number instructions
are supported

13

ippCPUID_F16C

16-bit floating point
conversion
instructions aresupported

14

ippCPUID_AVX2

Intel® Advanced
Vector Extensions 2(Intel® AVX2)
instruction set is
supported

15

ippCPUID_ADCOXADCX and ADOX
instructions aresupported

16

ippCPUID_RDSEED

Read Random SEED
instruction is
supported.

17

ippAVX_ENABLEDBYOS

63

1Intel® Integrated Performance Primitives Developer Guide and Reference

Mask Value
0x00040000

0x00080000

0x00100000

0x00200000

0x00400000

0x80000000

Bit Name

FeatureMask Bit Number

ippCPUID_PREFETCHWPREFETCHW
instruction is
supported

18

ippCPUID_SHAIntel® Secure Hash
Algorithm Extensions(Intel® SHA
Extensions) aresupported

19

ippCPUID_AVX512FIntel® Advanced
Vector Extensions
512 (Intel® AVX-512)
foundation
instructions aresupported

20

ippCPUID_AVX512CDIntel® AVX-512
conflict detection
instructions aresupported

21

ippCPUID_AVX512ER

Intel® AVX-512
exponential andreciprocal
instructions aresupported

22

ippCPUID_KNCIntel® Xeon Phi™ is
supported23

All features returned by the CPUID.1 function can be stored in the vector with four elements
pCpuidInfoRegs where each element contains data from one of the registers eax, ebx, ecx, edx
respectively. If these data are not required, the pointer pCpuidInfoRegs must be set to NULL.

NOTE
®
®
Intel Itanium processors are not supported.

Product and Performance Information
Performance varies by use, configuration and other factors. Learn more at www.Intel.com/
PerformanceIndex.
Notice revision #20201201

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsNotSupportedCpu

64

Indicates no error.
Indicates an error condition when the pFeaturesMask pointer is

NULL.

Indicates that the processor is not supported.

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

GetEnabledCpuFeatures
Returns a features mask for enabled processor
features.

SyntaxIpp64u ippGetEnabledCpuFeatures (void);

Include Files
ippcore.h

Description
This function detects the enabled CPU features for the currently loaded libraries and returns thecorresponding features mask.
Product and Performance Information
Performance varies by use, configuration and other factors. Learn more at www.Intel.com/
PerformanceIndex.
Notice revision #20201201

See Also
GetCpuFeatures

Retrieves the processor features.

GetMaxCacheSizeB
Returns maximum size of the L2 and L3 caches of theprocessor.

SyntaxIppStatus ippGetMaxCacheSizeB(int* pSizeByte);

Include Files
ippcore.hParameters
pSizeByte

Pointer to the output result.

Description
This function finds the maximum size (in bytes) of the L2 and L3 caches of the processor used on yourcomputer system. The result is stored in the pSizeByte.

NOTEIntel® Itanium® processors are not supported.
If the processor is not supported, or size of cache is unknown, the result is 0, and the function returns
corresponding warning message.

Return Values
ippStsNoErr

Indicates no error.

65

1Intel® Integrated Performance Primitives Developer Guide and ReferenceippStsNullPtrErr

Indicates an error condition when the pSizeByte pointer is

NULL.

ippStsNotSupportedCpu

Indicates that the processor is not supported.

ippStsUnknownCacheSize

Indicates that the size of the cache is unknown.

SetCpuFeatures
Sets the processor-specific library code for the
specified processor features.

SyntaxIppStatus ippSetCpuFeatures(Ipp64u cpuFeatures);

Include Files
ippcore.hParameters
cpuFeatures

Features to be supported by the library. Refer to ippdefs.h for
ippCPUID_xx definition.

Description
This function sets the processor-specific code of the Intel IPP library according to the processor features
specified in cpuFeatures. You can use the following predefined sets of features (the FM suffix below meansfeature mask):
32-bit code:#define PX_FM ( ippCPUID_MMX | ippCPUID_SSE )#define W7_FM ( PX_FM | ippCPUID_SSE2 )#define V8_FM ( W7_FM | ippCPUID_SSE3 | ippCPUID_SSSE3 )#define S8_FM ( V8_FM | ippCPUID_MOVBE )#define P8_FM ( V8_FM | ippCPUID_SSE41 | ippCPUID_SSE42 )#define G9_FM ( P8_FM | ippCPUID_AVX | ippAVX_ENABLEDBYOS | ippCPUID_F16C )#define H9_FM ( G9_FM | ippCPUID_AVX2 | ippCPUID_MOVBE | ippCPUID_PREFETCHW )64-bit code:#define PX_FM ( ippCPUID_MMX | ippCPUID_SSE | ippCPUID_SSE2 )#define M7_FM ( PX_FM | ippCPUID_SSE3 )#define U8_FM ( M7_FM | ippCPUID_SSSE3 )#define N8_FM ( U8_FM | ippCPUID_MOVBE )#define Y8_FM ( U8_FM | ippCPUID_SSE41 | ippCPUID_SSE42 )#define E9_FM ( Y8_FM | ippCPUID_AVX | ippAVX_ENABLEDBYOS | ippCPUID_F16C )#define L9_FM ( E9_FM | ippCPUID_MOVBE | ippCPUID_AVX2 | ippCPUID_PREFETCHW )#define N0_FM ( L9_FM | ippCPUID_AVX512F | ippCPUID_AVX512CD | ippCPUID_AVX512PF |ippCPUID_AVX512ER | ippAVX512_ENABLEDBYOS )#define K0_FM ( L9_FM | ippCPUID_AVX512F | ippCPUID_AVX512CD | ippCPUID_AVX512VL |ippCPUID_AVX512BW | ippCPUID_AVX512DQ | ippAVX512_ENABLEDBYOS )NOTE
Do not use any other Intel IPP function while ippSetCpuFeatures is executing. Otherwise,
your application behavior is undefined.

66

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

NOTE
To avoid initialization of internal structures for one Intel® architecture and then call of theprocessing function that is optimized for another architecture, do not use theippSetCpuFeatures function in chains of Intel IPP connected calls like <processing
functionGetSize + <processing functionInit + <processing function>. Otherwise, Intel IPP
functionality behavior is undefined.
Intel IPP library supports two internal sets of CPU features:••

Real CPU features: the features that are supported by the CPU at which the library is executed. Thesefeatures are read-only and can be obtained with the ippGetCpuFeatures function.
Enabled features: the features that are enabled externally to Intel IPP by the application. These features
are read-write and can be obtained with ippGetEnabledCpuFeaturesand set with ippSetCpuFeatures.

The ippSetCpuFeatures function provides additional flexibility in measuring performance improvements
reached by using specific CPU features. For example, the call of the ippInit() (or the first call of any IntelIPP function for the library version starting with 9.0) function in an application running on the 4th Generation
Intel® Core™ i7 processor with 64-bit OS installed dispatches the L9 code version optimized for Intel®
Advanced Vector Extensions 2 (Intel® AVX2) with several other features like fast 16-bit floating point support.
To check performance improvement for all Intel IPP functionality reached by using Intel® AVX2, you can run abenchmark for the currently dispatched version of code and then compare performance with the Intel®
Advanced Vector Extensions (Intel® AVX) version of code with Intel® AVX2 disabled. To disable Intel AVX2,
call ippSetCpuFeatures(E9_FM). To enable Intel AVX2 back, call ippSetCpuFeatures( L9_FM ). Thus,
you can use the ippSetCpuFeatures function to dispatch any version of Intel IPP code and enable/disable
specific CPU features. If you are not well familiar with the features of your CPU, use the ippInit() function(or auto-initialization mechanism available starting with Intel IPP 9.0) for the default library behavior.
Product and Performance Information
Performance varies by use, configuration and other factors. Learn more at www.Intel.com/
PerformanceIndex.
Notice revision #20201201

Return Values
ippStsNoErr

Indicates that the required processor-specific code is successfully set.

ippStsCpuMismatch

Indicates that the specified processor features are not valid.
Previously set code is used. If the requested feature is below theminimal supported by the m7 library - that is Intel® Streaming SIMD
Extensions 2 (Intel® SSE2) for IA-32 - or w7 - that is Intel® SSE3 forIntel® 64 architecture, m7/w7 code is dispatched respectively.

ippStsFeatureNotSupported

Indicates that the current CPU does not support at least one of therequested features. If the ippCPUID_NOCHECK bit of the cpuFeatures
parameter is set to 1, these not supported features are enabled,
otherwise - disabled.

ippStsUnknownFeature

Indicates that at least one of the requested features is unknown. Itmeans that the feature is not defined in the ippdefs.h file. Further
behavior of the library depends on known features passed to
cpuFeatures. Unknown features are ignored.

67

1Intel® Integrated Performance Primitives Developer Guide and ReferenceippStsFeaturesCombination

Indicates that the combination of features is not correct. For example,

ippSetCpuFeatures(ippCPUID_AVX2); will generate this warningthat means that ippCPUID_AVX2 bit is set to 1 in cpuFeatures, but
at least one of the ippCPUID_MMX, ippCPUID_SSE, …, ippCPUID_AVX
bits or all of these bits are not set. Use

ippSetCpuFeatures(H9_FM); or ippSetCpuFeatures(L9_FM);
instead to avoid this warning. All the missing bits, if supported byCPU, are set to 1. This means that if the library supports the Intel®
AVX2 code, it also internally uses all known MMX™, Intel® SSE, andIntel® AVX extensions, which are below Intel® AVX2.

See Also
Init Automatically initializes the library code that is most appropriate for the current processor
type.
GetCpuFeatures Retrieves the processor features.
GetEnabledCpuFeatures Returns a features mask for enabled processor features.
SetFlushToZero
Enables or disables flush-to-zero (FTZ) mode.

SyntaxIppStatus ippSetFlushToZero(int value, unsigned int* pUMask);

Include Files
ippcore.hParameters
value

Switch to set or clear the corresponding bit of the MXCSR
register.
• When value is not equal to zero, flush-to-zero (FTZ) mode isenabled• When value is set to zero, FTZ mode is disabled
pUMaskPointer to the current underflow exception mask; may be set to
NULL.

Description
This function enables FTZ mode for processors that support Intel® Streaming SIMD Extensions [xx]
instructions. The FTZ mode controls the masked response to a SIMD floating-point underflow condition. Use
this function to improve performance of applications where underflows are common and rounding theunderflow result to zero is acceptable.
FTZ mode is possible only when the mask register is in a certain state. The ippSetFlushToZero function
checks and changes this state if necessary. After disabling the FTZ mode, you can restore the initial mask
register state. To do this, declare a variable of unsigned integer type in your application and point to it theparameter pUMask of the ippSetFlushToZero function. The initial state of mask register is saved in thislocation and can be restored later. If you do not need to restore the initial mask state, then the pointerpUMask may be set to NULL.

Return Values
ippStsNoErr

68

Indicates no error.

Developer Guide and Reference for Intel® Integrated Performance Primitives

ippStsCpuNotSupportedErr

1

Indicates an error condition when the FTZ mode is notsupported by the processor.

SetDenormAreZeros
Enables or disables denormals-are-zero (DAZ) mode.

SyntaxIppStatus ippSetDenormAreZeros(int value);

Include Files
ippcore.hParameters
value

Switch to set or clear the corresponding bit of the MXCSR register.
••

When value is not equal to zero, denormals-are-zero (DAZ) modeis enabled
When value is set to zero, DAZ mode is disabled

Description
This function enables the DAZ mode for processors that support Intel® Streaming SIMD Extensions
instructions. The DAZ mode controls the processor response to a SIMD floating-point denormal operandcondition. When the DAZ flag is set, the processor converts all denormal source operands to zero with thesign of the original operand before performing any computations on source data. Use this function to improve
processor performance of applications such as streaming media processing, where rounding a denormal
operand to zero does not noticeably affect the quality of the processed data.

Return Values
ippStsNoErr

Indicates no error.

ippStsCpuNotSupportedErr

Indicates an error condition when the DAZ mode is notsupported by the processor.

AlignPtr
Aligns a pointer to the specified number of bytes.

Syntaxvoid* ippAlignPtr(void* ptr, int alignBytes);

Include Files
ippcore.hParameters
ptr

Aligned pointer.

alignBytes

Number of bytes to align. Possible values are the powers of 2,
that is, 2, 4, 8, 16 and so on.

Description
This function returns a pointer ptr aligned to the specified number of bytes alignBytes. Possible values ofalignBytes are powers of two. The function does not check the validity of this parameter.

691Intel® Integrated Performance Primitives Developer Guide and Reference

NOTE
Do not free the pointer returned by the function, but free the original pointer.

SetNumThreads
Sets the number of threads in the multithreading
environment.

SyntaxCase 1: Setting number of threads for operations on objects of 32-bit size
IppStatus ippSetNumThreads(int numThr);

Case 2: Setting number of threads for operations with TL functions based on the Platform Aware API
IppStatus ippSetNumThreads_LT(int numThr);

Case 3: Setting number of threads for operations with TL functions based on the Classic API
IppStatus ippSetNumThreads_T(int numThr);

Include Files
ippcore.hParameters
numThrNumber of threads, should be more than zero.

Description
This function sets the number of OpenMP* threads. A number of established threads may be less thanspecified numThr. Functions are not thread-safe and shall be called outside of the parallel region of the
program.

Return Values
ippStsNoErr

Indicates no error.

ippStsSizeErr

Indicates an error when numThr is less than, or equal to zero.

ippStsNoOperation

ippStsOperationNotSupported

Indicates that the function is called from the application linked
to the single-threaded version of the library. No operation is
performed.
Indicates that function trying to set the number of TBB
threads.

GetNumThreads
Returns the number of existing threads in themultithreading environment.

SyntaxCase 1: Getting number of threads for operations on objects of 32-bit size
IppStatus ippGetNumThreads(int* pNumThr);

Case 2: Getting number of threads for operations with TL functions based on the Platform Aware API
IppStatus ippGetNumThreads_LT(int* pNumThr);70

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Case 3: Getting number of threads for operations with TL functions based on the Classic API
IppStatus ippGetNumThreads_T(int* pNumThr);

Include Files
ippcore.h
ippcore_tl.h

Parameters
pNumThrPointer to the number of threads.

Description
This function returns the number of OpenMP* threads specified by the user previously. If it is not specified,
the function returns the initial number of threads that depends on the number of logical processors.
Functions are not thread-safe, first call shall be outside of the parallel region of the program.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error condition when the pNumThr pointer is NULL.

ippStsNoOperation

Indicates that the function is called from the application linked
to the single-threaded version of the library. No operation is
performed and return value is always == 1.

Malloc
Allocates memory aligned to 64-byte boundary.

Syntaxvoid* ippMalloc(int length);

Memory allocation for platform-aware functions
void* ippMalloc_L(IppSizeL length);

Include Files
ippcore.h
Flavors with the _L suffix: ippcore_l.hParameters
lengthSize (in bytes) of the allocated block.

Description
This function allocates a memory block aligned to a 64-byte boundary.

Return Values
The return value of ippMalloc is a pointer to an aligned memory block. To free this block, use the ippFree
function.

See Also
Free Frees memory allocated by the function ippMalloc.

711Intel® Integrated Performance Primitives Developer Guide and Reference

Free
Frees memory allocated by the function ippMalloc.

Syntaxvoid ippFree(void* ptr);

Include Files
ippcore.hParameters
Pointer to a memory block to be freed.

ptr

Description
This function frees an aligned memory block previously allocated by the function ippMalloc.

NOTE
Use the ippFree() to free memory allocated by ippMalloc(). Use free to free memory
allocated by malloc or calloc.

Dispatcher Control Functions
This section describes Intel IPP functions that control the dispatchers of the merged static libraries.

Init
Automatically initializes the library code that is mostappropriate for the current processor type.

SyntaxIppStatus ippInit(void));

Include Files
ippcore.h

Description
This function detects the processor type used in the user computer system and sets the processor-specificcode of the Intel IPP library most appropriate for the current processor type.

NOTE
You can not use any other Intel IPP function while the function ippInit continues execution.

Return Values

ippStsNotSupportedCpu

Indicates that the required processor-specific code issuccessfully set.
Indicates that the CPU is not supported.

ippStsNonIntelCpu

Indicates that the target CPU is not Genuine Intel.

ippStsNoErr

72

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Vector Initialization Functions
This chapter describes the Intel® IPP functions that initialize vectors with either constants, the contents ofother vectors, or the generated signals.

Vector Initialization Functions
This section describes functions that initialize the values of vector elements. All vector elements can beinitialized to a common zero or another specified value. They can also be initialized to respective values of asecond vector elements.

Copy
Copies the contents of one vector into another.

SyntaxIppStatus ippsCopy_8u(const Ipp8u* pSrc, Ipp8u* pDst, int len);
IppStatus ippsCopy_16s(const Ipp16s* pSrc, Ipp16s* pDst, int len);
IppStatus ippsCopy_32s(const Ipp32s* pSrc, Ipp32s* pDst, int len);
IppStatus ippsCopy_32f(const Ipp32f* pSrc, Ipp32f* pDst, int len);
IppStatus ippsCopy_64s(const Ipp64s* pSrc, Ipp64s* pDst, int len);
IppStatus ippsCopy_64f(const Ipp64f* pSrc, Ipp64f* pDst, int len);
IppStatus ippsCopy_16sc(const Ipp16sc* pSrc, Ipp16sc* pDst, int len);
IppStatus ippsCopy_32sc(const Ipp32sc* pSrc, Ipp32sc* pDst, int len);
IppStatus ippsCopy_32fc(const Ipp32fc* pSrc, Ipp32fc* pDst, int len);
IppStatus ippsCopy_64sc(const Ipp64sc* pSrc, Ipp64sc* pDst, int len);
IppStatus ippsCopy_64fc(const Ipp64fc* pSrc, Ipp64fc* pDst, int len);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

len

Number of elements to copy.

Description
This function copies the first len elements from a source vector pSrc into a destination vector pDst.

73

1Intel® Integrated Performance Primitives Developer Guide and ReferenceippsCopy_1u. This function flavor copies elements of a vector that has a 8u data type. It means that eachbyte consists of eight consecutive elements of the vector (1 bit per element). You need to specify the start
position of the source and destination vectors in the srcBitOffset and dstBitOffset parameters,
respectively. The bit order of each byte is inverse to the element order. It means that the first element in avector represents the last (seventh) bit of the first byte in a vector, as shown in the figure below.
Bit Layout for the Function ippsCopy_1u.

NOTE
These functions perform only copying operations described above and are not intended tomove data. Their behavior is unpredictable if source and destination buffers are overlapping.
To move data, use ippsMove.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pSrc or pDst pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to zero.

ExampleThe example below shows how to use the ippsCopy function.

IppStatus copy(void) {char src[] = "to be copied\0";char dst[256];
return ippsCopy_8u(src, dst, strlen(src)+1);}

See Also
Move Moves the contents of one vector to another vector.

74

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

CopyLE, CopyBE
Copies the contents of one bit vector into another.

SyntaxIppStatus ippsCopyLE_1u(const Ipp8u* pSrc, int srcBitOffset, Ipp8u* pDst, int
dstBitOffset, int len);
IppStatus ippsCopyBE_1u(const Ipp8u* pSrc, int srcBitOffset, Ipp8u* pDst, int
dstBitOffset, int len);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

len

Number of elements to copy.

srcBitOffset

Offset, in bits, from the first byte of the source vector.

dstBitOffset

Offset, in bits, from the first byte of the destination vector.

Description
This function copies the first len elements from a source vector pSrc into a destination vector pDst.
These functions copy elements of a vector that has a 8u data type. It means that each byte consists of eight
consecutive elements of the vector (1 bit per element). You need to specify the start position of the sourceand destination vectors in the srcBitOffset and dstBitOffset parameters, respectively.

75

1Intel® Integrated Performance Primitives Developer Guide and Reference

For the ippsCopyLE_1u function, the bit order of each byte is inverse to the element order. It means thatthe first element in a vector represents the last (seventh) bit of the first byte in a vector, as shown in the
figure below.
Bit Layout for the ippsCopyLE_1u Function

For the ippsCopyBE_1u function, the bit order of each byte is ordinary. It means that the first element in avector represents the last (zero) bit of the first byte in a vector, as shown in the figure below.
Bit Layout for the ippsCopyBE_1u Function

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pSrc or pDst pointer is NULL.

ippStsSizeErr

Indicates an error when:• len is less than, or equal to zero76

Developer Guide and Reference for Intel® Integrated Performance Primitives

1• srcBitOffset or dstBitOffset is less than zero

Move
Moves the contents of one vector to another vector.

SyntaxIppStatus ippsMove_8u(const Ipp8u* pSrc, Ipp8u* pDst, int len);
IppStatus ippsMove_16s(const Ipp16s* pSrc, Ipp16s* pDst, int len);
IppStatus ippsMove_32s(const Ipp32s* pSrc, Ipp32s* pDst, int len);
IppStatus ippsMove_32f(const Ipp32f* pSrc, Ipp32f* pDst, int len);
IppStatus ippsMove_64f(const Ipp64f* pSrc, Ipp64f* pDst, int len);
IppStatus ippsMove_64s(const Ipp64s* pSrc, Ipp64s* pDst, int len);
IppStatus ippsMove_16sc(const Ipp16sc* pSrc, Ipp16sc* pDst, int len);
IppStatus ippsMove_32sc(const Ipp32sc* pSrc, Ipp32sc* pDst, int len);
IppStatus ippsMove_32fc(const Ipp32fc* pSrc, Ipp32fc* pDst, int len);
IppStatus ippsMove_64sc(const Ipp64sc* pSrc, Ipp64sc* pDst, int len);
IppStatus ippsMove_64fc(const Ipp64fc* pSrc, Ipp64fc* pDst, int len);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc

Pointer to the source vector used to initialize pDst.

pDst

Pointer to the destination vector to be initialized.

len

Number of elements to move.

Description
This function moves the first len elements from a source vector pSrc into the destination vector pDst. If
some parts of the source and destination vectors are overlapping, then the function ensures that the original
source bytes in the overlapping parts are moved (it means that they are copied before being overwritten) to
the appropriate parts of the destination vector.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pSrc or pDst pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to zero.

771Intel® Integrated Performance Primitives Developer Guide and Reference

ExampleIpp8u pSrc[10] = { "123456789" };Ipp8u pDst[6];int len = 6;
IppStatus status;
status = ippsMove_8u ( pSrc, pDst, len );if(ippStsNoErr != status)
printf("Intel(R) IPP Error: %s",ippGetStatusString(status));Result:pSrc = 123456789
pDst = 123456

Set
Initializes vector elements to a specified common
value.

SyntaxIppStatus ippsSet_8u(Ipp8u val, Ipp8u* pDst, int len);
IppStatus ippsSet_16s(Ipp16s val, Ipp16s* pDst, int len);
IppStatus ippsSet_16sc(Ipp16sc val, Ipp16sc* pDst, int len);
IppStatus ippsSet_32s(Ipp32s val, Ipp32s* pDst, int len);
IppStatus ippsSet_32f(Ipp32f val, Ipp32f* pDst, int len);
IppStatus ippsSet_32sc(Ipp32sc val, Ipp32sc* pDst, int len);
IppStatus ippsSet_32fc(Ipp32fc val, Ipp32fc* pDst, int len);
IppStatus ippsSet_64s(Ipp64s val, Ipp64s* pDst, int len);
IppStatus ippsSet_64f(Ipp64f val, Ipp64f* pDst, int len);
IppStatus ippsSet_64sc(Ipp64sc val, Ipp64sc* pDst, int len);
IppStatus ippsSet_64fc(Ipp64fc val, Ipp64fc* pDst, int len);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pDst

Pointer to the vector to be initialized.

len

Number of elements to initialize.

valValue used to initialize the vector pDst.

Description
This function initializes the first len elements of the real or complex vector pDst to contain the same value
val.

78

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pDst pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to zero.

ExampleThe code example below shows how to use the function ippsSet.

IppStatus set(void) {char src[] = “set”;
return ippsSet_8u(‘0', src, strlen(src));}

Zero
Initializes a vector to zero.

SyntaxIppStatus ippsZero_8u(Ipp8u* pDst, int len);
IppStatus ippsZero_16s(Ipp16s* pDst, int len);
IppStatus ippsZero_32s(Ipp32s* pDst, int len);
IppStatus ippsZero_32f(Ipp32f* pDst, int len);
IppStatus ippsZero_64s(Ipp64s* pDst, int len);
IppStatus ippsZero_64f(Ipp64f* pDst, int len);
IppStatus ippsZero_16sc(Ipp16sc* pDst, int len);
IppStatus ippsZero_32sc(Ipp32sc* pDst, int len);
IppStatus ippsZero_32fc(Ipp32fc* pDst, int len);
IppStatus ippsZero_64sc(Ipp64sc* pDst, int len);
IppStatus ippsZero_64fc(Ipp64fc* pDst, int len);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pDst

Pointer to the vector to be initialized to zero.

len

Number of elements to initialize.

Description
This function initializes the first len elements of the vector pDst to zero. If pDst is a complex vector, both
real and imaginary parts are zeroed.

791Intel® Integrated Performance Primitives Developer Guide and Reference

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pDst pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to zero.

ExampleThe code example below shows how to use the ippsZero function.

IppStatus zero(void) {char src[] = "zero";
return ippsZero_8u(src, strlen(src));}

Sample-Generating Functions
This section describes Intel IPP functions which generate tone samples, triangle samples, pseudo-random
samples with uniform distribution, and pseudo-random samples with Gaussian distribution, as well as special
test samples.
Some sample-generating functions operate with data in the fixed point format. These functions have Q15
suffix in their name. This means that integer data are used in calculations inside the function as real numbers
equal to the integer value multiplied by 2-15 (where “15” is called a scale factor).

Tone-Generating Functions
The functions described below generate a tone (or “sinusoid”) of a given frequency, phase, and magnitude.
Tones are fundamental building blocks for analog signals. Thus, sampled tones are extremely useful in signal
processing systems as test signals and as building blocks for more complex signals.
The use of tone functions is preferable against the analogous C math library's sin() function for many
applications, because Intel IPP functions can use information retained from the computation of the previous
sample to compute the next sample much faster than standard sin() or cos().
Tone
Generates a tone with a given frequency, phase, andmagnitude.

SyntaxIppStatus ippsTone_16s(Ipp16s* pDst, int len, Ipp16s magn, Ipp32f rFreq, Ipp32f*
pPhase, IppHintAlgorithm hint);
IppStatus ippsTone_16sc(Ipp16sc* pDst, int len, Ipp16s magn, Ipp32f rFreq, Ipp32f*
pPhase, IppHintAlgorithm hint);
IppStatus ippsTone_32f(Ipp32f* pDst, int len, Ipp32f magn, Ipp32f rFreq, Ipp32f*
pPhase, IppHintAlgorithm hint);
IppStatus ippsTone_32fc(Ipp32fc* pDst, int len, Ipp32f magn, float rFreq, Ipp32f*
pPhase, IppHintAlgorithm hint);
IppStatus ippsTone_64f(Ipp64f* pDst, int len, Ipp64f magn, Ipp64f rFreq, Ipp64f*
pPhase, IppHintAlgorithm hint);
IppStatus ippsTone_64fc(Ipp64fc* pDst, int len, Ipp64f magn, Ipp64f rFreq, Ipp64f*
pPhase, IppHintAlgorithm hint);

80

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters

pDst

Magnitude of the tone, that is, the maximum value attained by
the wave.
Pointer to the phase of the tone relative to a cosine wave. It
must be in range [0.0, 2π). You can use the returned value tocompute the next continuous data block.
Frequency of the tone relative to the sampling frequency. It
must be in the interval [0.0, 0.5) for real tone and in [0.0, 1.0)
for complex tone.
Pointer to the array that stores the samples.

len

Number of samples to be computed.

hint

Suggests using specific code. The possible values for the hintargument are described in Hint Arguments.

magn
pPhaserFreq

Description
This function generates the tone with the specified frequency rFreq, phase pPhase, and magnitude magn.
The function computes len samples of the tone, and stores them in the array pDst. For real tones, eachgenerated value x[n] is defined as:x[n] = magn * cos(2πn*rFreq + phase)
For complex tones, x[n] is defined as:x[n] = magn * (cos(2πn*rFreq + phase)+j* sin(2πn*rFreq + phase))
The parameter hint suggests using specific code, which provides for either fast but less accurate calculation,or more accurate but slower execution.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pDst or pPhase pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than, or equal to zero.

ippStsToneMagnErr

Indicates an error when magn is less than, or equal to zero.

ippStsToneFreqErr
ippStsTonePhaseErr

Indicates an error when rFreq is negative, or greater than, or
equal to 0.5 for real tone and to 1.0 for complex tone.
Indicates an error when the pPhase value is negative, orgreater than or equal to IPP_2PI.

Triangle-Generating Functions
This section describes the functions that generate a periodic signal with a triangular wave form (referred toas “triangle”) of a given frequency, phase, magnitude, and asymmetry.

811Intel® Integrated Performance Primitives Developer Guide and Reference

A real periodic signal with triangular wave form x[n] (referred to as a real triangle) of a given frequency
rFreq, phase value phase, magnitude magn, and asymmetry h is defined as follows:x[n] = magn * cth(2π* rFreq*n + phase), n = 0, 1, 2,...
A complexl periodic signal with triangular wave form x[n] (referred to as a complex triangle) of a given
frequency rFreq, phase value phase, magnitude magn, and asymmetry h is defined as follows:x[n] = magn * [cth(2π* rFreq*n + phase) + j * sth(2π* rFreq*n + phase)], n = 0, 1, 2,...
The cth () function is determined as follows:
H=π+hcth (α + k* 2π) = cth (α), k = 0, ±1, ±2, ...
When H = π , asymmetry h = 0, and function cth() is symmetric and a triangular analog of the cos()function. Note the following equations:cth (H/2 + k*π) = 0, k = 0, ±1, ±2, ...
cth (k* 2π) = 1, k = 0, ±1, ±2, ...
cth (H + k* 2π) = -1, k = 0, ±1, ±2, ...
The sth () function is determined as follows:sth (α + k* 2π) = sth (α), k = 0, ±1, ±2, ...
When H = π , asymmetry h = 0, and function sth() is symmetric and a triangular analog of the sine function.
Note the following equations:sth (α) = cth (α + (3π + h)/2) , k = 0, ±1, ±2, ...
sth (k* π) = 0, k = 0, ±1, ±2, ...
sth ((π -h)/2 + k* 2π) = 1, k = 0, ±1, ±2, ...
sth ((3π +h)/2 + k* 2π) = -1, k = 0, ±1, ±2, ...
Triangle
Generates a triangle with a given frequency, phase,and magnitude.

SyntaxIppStatus ippsTriangle_16s(Ipp16s* pDst, int len, Ipp16s magn, Ipp32f rFreq, Ipp32f
asym, Ipp32f* pPhase);
IppStatus ippsTriangle_16sc(Ipp16sc* pDst, int len, Ipp16s magn, Ipp32f rFreq, Ipp32f
asym, Ipp32f* pPhase);82

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

IppStatus ippsTriangle_32f(Ipp32f* pDst, int len, Ipp32f magn, Ipp32f rFreq, Ipp32f
asym, Ipp32f* pPhase);
IppStatus ippsTriangle_32fc(Ipp32fc* pDst, int len, Ipp32f magn, Ipp32f rFreq, Ipp32f
asym, Ipp32f* pPhase);
IppStatus ippsTriangle_64f(Ipp64f* pDst, int len, Ipp64f magn, Ipp64f rFreq, Ipp64f
asym, Ipp64f* pPhase);
IppStatus ippsTriangle_64fc(Ipp64fc* pDst, int len, Ipp64f magn, Ipp64f rFreq, Ipp64f
asym, Ipp64f* pPhase);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters

pDst

Frequency of the triangle relative to the sampling frequency. It
must be in range [0.0, 0.5).
Pointer to the phase of the triangle relative to a cosine
triangular analog wave. It must be in range [0.0, 2π). You can
use the returned value to compute the next continuous data
block.
Magnitude of the triangle, that is, the maximum value attainedby the wave.
Asymmetry h of a triangle. It must be in range [-π , π ). If h=0,
then the triangle is symmetric and a direct analog of a tone.
Pointer to the array that stores the samples.

len

Number of samples to be computed.

rFreq
pPhasemagn
asym

Description
This function generates the triangle with the specified frequency rFreq, phase pointed by pPhase, andmagnitude magn. The function computes len samples of the triangle, and stores them in the array pDst. For
real triangle, x[n] is defined as:x[n] = magn * cth(2π* rFreq*n + phase), n = 0, 1, 2,...
For complex triangles, x[n] is defined as:x[n] = magn * [cth(2π* rFreq*n + phase) + j * sth(2π* rFreq*n + phase)], n = 0, 1, 2,...
See Triangle-Generating Functions for the definition of functions cth and sth.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pDst or pPhase pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to zero.

ippStsTrnglMagnErr

Indicates an error when magn is less than or equal to zero.

831Intel® Integrated Performance Primitives Developer Guide and ReferenceippStsTrnglFreqErr
ippStsTrnglPhaseErr
ippStsTrnglAsymErr

Indicates an error when rFreq is negative, or greater than orequal to 0.5.
Indicates an error when the pPhase value is negative, orgreater than or equal to IPP_2PI.
Indicates an error when asym is less than -IPP_PI, or greaterthan or equal to IPP_PI.

ExampleThe code example below demonstrates how to use the ippsTriangle function.

void func_triangle_direct(){
Ipp16s* pDst;
int len = 512;
Ipp16s magn = 4095;
Ipp32f rFreq = 0.02;
Ipp32f asym = 0.0;
Ipp32f Phase = 0.0;
IppStatus status;
status = ippsTriangle_16s(pDst, len, magn, rFreq, asym, &Phase);if(ippStsNoErr != status)
printf("Intel(R) IPP Error: %s",ippGetStatusString(status));}Result:Uniform Distribution Functions
This section describes the functions that generate pseudo-random samples with uniform distribution.
RandUniformInit
Initializes a noise generator with uniform distribution.

84

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

SyntaxIppStatus ippsRandUniformInit_8u(IppsRandUniState_8u* pRandUniState, Ipp8u low, Ipp8u
high, unsigned int seed);
IppStatus ippsRandUniformInit_16s(IppsRandUniState_16s* pRandUniState, Ipp16s low,
Ipp16s high, unsigned int seed);
IppStatus ippsRandUniformInit_32f(IppsRandUniState_32f* pRandUniState, Ipp32f low,
Ipp32f high, unsigned int seed);
IppStatus ippsRandUniformInit_64f(IppsRandUniState_64f* pRandUniState, Ipp64f low,
Ipp64f high, unsigned int seed);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters

low

Pointer to the structure containing parameters for thegenerator of noise.
Lower bound of the uniform distribution range.

highUpper bound of the uniform distribution range.

seed

Seed value used by the pseudo-random number generation
algorithm.

pRandUniState

Description
This function initializes the pseudo-random generator state structure pRandUniState in the external buffer.
The uniform distribution range is specified by the lower and upper bounds low and high, respectively. Before
using this function, you need to compute the size of the external buffer by using theippsRandUniformGetSize function.
The example of using this function is similar to the example provided with the Histogram function
description.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pRandUniState pointer is NULL.

ippStsMemAllocErr

Indicates an error when there is not enough memory for theoperation.

See Also
RandUniformGetSize Computes the length of the uniform distribution generator structure.
RandUniformGetSize
Computes the length of the uniform distribution
generator structure.

85

1Intel® Integrated Performance Primitives Developer Guide and Reference

SyntaxIppStatus ippsRandUniformGetSize_8u(int* pRandUniformStateSize);
IppStatus ippsRandUniformGetSize_16s(int* pRandUniformStateSize);
IppStatus ippsRandUniformGetSize_32f(int* pRandUniformStateSize);
IppStatus ippsRandUniformGetSize_64f(int* pRandUniformStateSize);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pRandUniformStateSize

Pointer to the computed value of size in bytes of the generator
specification structure.

Description
This function computes the length (in bytes) pRandUniformStateSize of the uniform distribution generator
structure that is used by the ippsRandUniformInit function.
The example of using this function is similar to the example provided with the Histogram function
description.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pointer pRandUniformStateSize is
NULL .

See Also
RandUniformInit Initializes a noise generator with uniform distribution.
RandUniform
Generates the pseudo-random samples with a uniform
distribution.

SyntaxIppStatus ippsRandUniform_8u(Ipp8u* pDst, int len, IppsRandUniState_8u* pRandUniState);
IppStatus ippsRandUniform_16s(Ipp16s* pDst, int len, IppsRandUniState_16s*
pRandUniState);
IppStatus ippsRandUniform_32f(Ipp32f* pDst, int len, IppsRandUniState_32f*
pRandUniState);
IppStatus ippsRandUniform_64f(Ipp64f* pDst, int len, IppsRandUniState_64f*
pRandUniState);

Include Files
ipps.h86

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Domain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pDst

Pointer to the array which stores the samples.

len

Number of samples to be computed.

pRandUniState

Pointer to the structure containing parameters for thegenerator of noise.

Description
This function generates len pseudo-random samples with a uniform distribution and stores them in the arraypDst. Initial parameters of the generator are set in the generator state structure pRandUniState. Before
calling ippsRandUniform, you must initialize the generator state by calling the function RandUniformInit.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pDst or pRandUniState pointer is
NULL.

ippStsContextMatchErr

Indicates an error when the state identifier is incorrect.

Gaussian Distribution Functions
This section describes the function that generates pseudo-random samples with Gaussian distribution.
RandGaussInit
Initializes a noise generator with Gaussian
distribution.

SyntaxIppStatus ippsRandGaussInit_8u(IppsRandGaussState_8u* pRandGaussState, Ipp8u mean,
Ipp8u stdDev, unsigned int seed);
IppStatus ippsRandGaussInit_16s(IppsRandGaussState_16s* pRandGaussState, Ipp16s mean,
Ipp16s stdDev, unsigned int seed);
IppStatus ippsRandGaussInit_32f(IppsRandGaussState_32f* pRandGaussState, Ipp32f mean,
Ipp32f stdDev, unsigned int seed);
IppStatus ippsRandGaussInit_64f(IppsRandGaussState_64f* pRandGaussState, Ipp64f mean,
Ipp64f stdDev, unsigned int seed);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

871Intel® Integrated Performance Primitives Developer Guide and Reference

Parameters

mean

Pointer to the structure containing parameters for thegenerator of noise.
Mean of the Gaussian distribution.

stdDevStandard deviation of the Gaussian distribution.

seed

Seed value used by the pseudo-random number generator
algorithm.

pRandGaussState

Description
This function initializes the pseudo-random generator state structure pRandGaussState in the externalbuffer. This structure contains parameters of the required noise generator that are specified by the mean,
stdDev, and seed values. Before using this function, you need to compute the size of the buffer by callingthe ippsRandGaussGetSize function.

Return Values
ppStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pRandGaussState pointer is NULL.

ippStsMemAllocErr

Indicates an error when there is not enough memory for theoperation.

See Also
RandGaussGetSize Computes the length of the Gaussian distribution generator structure.
RandGaussGetSize
Computes the length of the Gaussian distribution
generator structure.

SyntaxIppStatus ippsRandGaussGetSize_8u(int* pRandGaussStateSize);
IppStatus ippsRandGaussGetSize_32f(int* pRandGaussStateSize);
IppStatus ippsRandGaussGetSize_16s(int* pRandGaussStateSize);
IppStatus ippsRandGaussGetSize_64f(int* pRandGaussStateSize);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pRandGaussStateSize

Pointer to the size, in bytes, of the generator specification
structure.

Description
This function computes the length (in bytes) pRandGaussStateSize of the uniform distribution generator
structure that is used by the ippsRandGaussInit function.

88

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pointer pRandGaussStateSize is
NULL.

See Also
RandGaussInit Initializes a noise generator with Gaussian distribution.
RandGauss
Generates the pseudo-random samples with aGaussian distribution.

SyntaxIppStatus ippsRandGauss_8u(Ipp8u* pDst, int len, IppsRandGaussState_8u*
pRandGaussState);
IppStatus ippsRandGauss_16s(Ipp16s* pDst, int len, IppsRandGaussState_16s*
pRandGaussState);
IppStatus ippsRandGauss_32f(Ipp32f* pDst, int len, IppsRandGaussState_32f*
pRandGaussState);
IppStatus ippsRandGauss_64f(Ipp64f* pDst, int len, IppsRandGaussState_64f*
pRandGaussState);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pDst

Pointer to the array which stores the samples.

len

Number of samples to be computed.

pRandGaussState

Pointer to the structure containing parameters of the noise
generator.

Description
This function generates len pseudo-random samples with a Gaussian distribution and stores them in thearray pDst. The initial parameters of the generator are set in the generator state structure
pRandGaussState. Before calling ippsRandGauss, you must initialize the generator state by calling the
RandGaussInit function.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pRandGaussState pointer is NULL.

ippStsContextMatchErr

Indicates an error when the state identifier is incorrect.

89

1Intel® Integrated Performance Primitives Developer Guide and Reference

Special Vector Functions
The functions described in this section create special vectors that can be used as a test signals to examine
the effect of applying different signal processing functions.
VectorJaehne
Creates a Jaehne vector.

SyntaxIppStatus ippsVectorJaehne_8u(Ipp8u* pDst, int len, Ipp8u magn);
IppStatus ippsVectorJaehne_16u(Ipp16u* pDst, int len, Ipp16u magn);
IppStatus ippsVectorJaehne_16s(Ipp16s* pDst, int len, Ipp16s magn);
IppStatus ippsVectorJaehne_32s(Ipp32s* pDst, int len, Ipp32s magn);
IppStatus ippsVectorJaehne_32f(Ipp32f* pDst, int len, Ipp32f magn);
IppStatus ippsVectorJaehne_64f(Ipp64f* pDst, int len, Ipp64f magn);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pDst

Pointer to the destination vector.

len

Number of elements in the vector.

magn

Magnitude of the signal to be generated.

Description
This function creates a Jaehne vector and stores the result in pDst. The magnitude magn must be positive.
The function generates the sinusoid with a variable frequency. The computation is performed as follows:

pDst[n] = magn * sin ((0.5πn2)/len), 0 ≤ n < len

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pSrcDst pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

ippStsJaehneErr

Indicates an error when magn is negative.

90

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

ExampleThe code example below shows how to use the function ippsVectorJaehne.

IppStatus Jaehne (void){
Ipp16s buf[100] ;return ippsVectorJaehne_16s ( buf, 100, 255 );}VectorSlopeCreates a slope vector.

SyntaxIppStatus ippsVectorSlope_8u(Ipp8u* pDst, int len, Ipp32f offset, Ipp32f slope);
IppStatus ippsVectorSlope_16u(Ipp16u* pDst, int len, Ipp32f offset, Ipp32f slope);
IppStatus ippsVectorSlope_16s(Ipp16s* pDst, int len, Ipp32f offset, Ipp32f slope);
IppStatus ippsVectorSlope_32u(Ipp32u* pDst, int len, Ipp64f offset, Ipp64f slope);
IppStatus ippsVectorSlope_32s(Ipp32s* pDst, int len, Ipp64f offset, Ipp64f slope);
IppStatus ippsVectorSlope_32f(Ipp32f* pDst, int len, Ipp32f offset, Ipp32f slope);
IppStatus ippsVectorSlope_64f(Ipp64f* pDst, int len, Ipp64f offset, Ipp64f slope);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pDst

Pointer to the destination vector.

len

Number of elements in the vector.

offsetOffset value.

slope

Slope coefficient.

Description
This function creates a slope vector and stores the result in pDst. The destination vector elements arecomputed according to the following formula:pDst[n] = offset + slope*n, 0 ≤ n < len.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pDst pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

91

1Intel® Integrated Performance Primitives Developer Guide and Reference

Essential Functions®

This chapter describes the Intel IPP functions that perform logical and shift, arithmetic, conversion,
windowing, and statistical operations.

Logical and Shift Functions
This section describes the Intel IPP signal processing functions that perform logical and shift operations on
vectors. Logical and shift functions are only defined for integer arguments.
For binary logical operations AND, OR and XOR, the following functions are provided:

AndC, OrC, XorC for vector-scalar operations;And, Or, Xor for vector-vector operations.

AndC
Computes the bitwise AND of a scalar value and eachelement of a vector.

SyntaxIppStatus ippsAndC_8u(const Ipp8u* pSrc, Ipp8u val, Ipp8u* pDst, int len);
IppStatus ippsAndC_16u(const Ipp16u* pSrc, Ipp16u val, Ipp16u* pDst, int len);
IppStatus ippsAndC_32u(const Ipp32u* pSrc, Ipp32u val, Ipp32u* pDst, int len);
IppStatus ippsAndC_8u_I(Ipp8u val, Ipp8u* pSrcDst, int len);
IppStatus ippsAndC_16u_I(Ipp16u val, Ipp16u* pSrcDst, int len);
IppStatus ippsAndC_32u_I(Ipp32u val, Ipp32u* pSrcDst, int len);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
val

Input scalar value.

pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

pSrcDstlen

Pointer to the source and destination vector for the in-place
operation.
Number of elements in the vector.

Description
This function computes the bitwise AND of a scalar value val and each element of the vector pSrc, andstores the result in pDst.
The in-place flavors of ippsAndC compute the bitwise AND of a scalar value val and each element of thevector pSrcDst and store the result in pSrcDst.

92

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pSrc, pDst, or pSrcDst pointer is
NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

And
Computes the bitwise AND of two vectors.

SyntaxIppStatus ippsAnd_8u(const Ipp8u* pSrc1, const Ipp8u* pSrc2, Ipp8u* pDst, int len);
IppStatus ippsAnd_16u(const Ipp16u* pSrc1, const Ipp16u* pSrc2, Ipp16u* pDst, int len);
IppStatus ippsAnd_32u(const Ipp32u* pSrc1, const Ipp32u* pSrc2, Ipp32u* pDst, int len);
IppStatus ippsAnd_8u_I(const Ipp8u* pSrc, Ipp8u* pSrcDst, int len);
IppStatus ippsAnd_16u_I(const Ipp16u* pSrc, Ipp16u* pSrcDst, int len);
IppStatus ippsAnd_32u_I(const Ipp32u* pSrc, Ipp32u* pSrcDst, int len);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc1, pSrc2

Pointers to the two source vectors.

pDst

Pointer to the destination vector.

pSrc

Pointer to the source vector for the in-place operation.

pSrcDstlen

Pointer to the source and destination vector for the in-place
operation.
Number of elements in the vector.

Description
This function computes the bitwise AND of the corresponding elements of the vectors pSrc1 and pSrc2, andstores the result in the vector pDst.
The in-place flavors of ippsAnd compute the bitwise AND of the corresponding elements of the vectors pSrc
and pSrcDst and store the result in the vector pSrcDst.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when any of the specified pointers is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

931Intel® Integrated Performance Primitives Developer Guide and Reference

OrC
Computes the bitwise OR of a scalar value and eachelement of a vector.

SyntaxIppStatus ippsOrC_8u(const Ipp8u* pSrc, Ipp8u val, Ipp8u* pDst, int len);
IppStatus ippsOrC_16u(const Ipp16u* pSrc, Ipp16u val, Ipp16u* pDst, int len);
IppStatus ippsOrC_32u(const Ipp32u* pSrc, Ipp32u val, Ipp32u* pDst, int len);
IppStatus ippsOrC_8u_I(Ipp8u val, Ipp8u* pSrcDst, int len);
IppStatus ippsOrC_16u_I(Ipp16u val, Ipp16u* pSrcDst, int len);
IppStatus ippsOrC_32u_I(Ipp32u val, Ipp32u* pSrcDst, int len);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
val

Input scalar value.

pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

pSrcDstlen

Pointer to the source and destination vector for the in-place
operation.
Number of elements in the vector.

Description
This function computes the bitwise OR of a scalar value val and each element of the vector pSrc, and storesthe result in pDst.
The in-place flavors of ippsOrC compute the bitwise OR of a scalar value val and each element of the vector
pSrcDst and store the result in pSrcDst.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

Indicates no error.
Indicates an error when the pSrc, pDst, or pSrcDst pointer is

NULL.

Indicates an error when len is less than or equal to 0.

Or
Computes the bitwise OR of two vectors.

SyntaxIppStatus ippsOr_8u(const Ipp8u* pSrc1, const Ipp8u* pSrc2, Ipp8u* pDst, int len);94Developer Guide and Reference for Intel® Integrated Performance Primitives

1

IppStatus ippsOr_16u(const Ipp16u* pSrc1, const Ipp16u* pSrc2, Ipp16u* pDst, int len);
IppStatus ippsOr_32u(const Ipp32u* pSrc1, const Ipp32u* pSrc2, Ipp32u* pDst, int len);
IppStatus ippsOr_8u_I(const Ipp8u* pSrc, Ipp8u* pSrcDst, int len);
IppStatus ippsOr_16u_I(const Ipp16u* pSrc, Ipp16u* pSrcDst, int len);
IppStatus ippsOr_32u_I(const Ipp32u* pSrc, Ipp32u* pSrcDst, int len);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc1, pSrc2

Pointers to the two source vectors.

pDst

Pointer to the destination vector.

pSrc

Pointer to the source vector for the in-place operation.

pSrcDstlen

Pointer to the source and destination vector for the in-place
operation.
Number of elements in the vector.

Description
This function computes the bitwise OR of the corresponding elements of the vectors pSrc1 and pSrc2, andstores the result in the vector pDst.
The in-place flavors of ippsOr compute the bitwise OR of the corresponding elements of the vectors pSrc
and pSrcDst and store the result in the vector pSrcDst.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when any of the specified pointers is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

XorC
Computes the bitwise XOR of a scalar value and eachelement of a vector.

SyntaxIppStatus ippsXorC_8u(const Ipp8u* pSrc, Ipp8u val, Ipp8u* pDst, int len);
IppStatus ippsXorC_16u(const Ipp16u* pSrc, Ipp16u val, Ipp16u* pDst, int len);
IppStatus ippsXorC_32u(const Ipp32u* pSrc, Ipp32u val, Ipp32u* pDst, int len);
IppStatus ippsXorC_8u_I(Ipp8u val, Ipp8u* pSrcDst, int len);
IppStatus ippsXorC_16u_I(Ipp16u val, Ipp16u* pSrcDst, int len);
IppStatus ippsXorC_32u_I(Ipp32u val, Ipp32u* pSrcDst, int len);95

1Intel® Integrated Performance Primitives Developer Guide and Reference

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
val

Input scalar value.

pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

pSrcDstPointer to the source and destination vector for the in-place
operation.

len

Number of elements in the vector.

Description
This function computes the bitwise XOR of a scalar value val and each element of the vector pSrc, andstores the result in pDst.
The in-place flavors of ippsXorC compute the bitwise XOR of a scalar value val and each element of thevector pSrcDst and store the result in pSrcDst.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

Indicates no error.
Indicates an error when the pSrc, pDst, or pSrcDst pointer is

NULL.

Indicates an error when len is less than or equal to 0.

Xor
Computes the bitwise XOR of two vectors.

SyntaxIppStatus ippsXor_8u(const Ipp8u* pSrc1, const Ipp8u* pSrc2, Ipp8u* pDst, int len);
IppStatus ippsXor_16u(const Ipp16u* pSrc1, const Ipp16u* pSrc2, Ipp16u* pDst, int len);
IppStatus ippsXor_32u(const Ipp32u* pSrc1, const Ipp32u* pSrc2, Ipp32u* pDst, int len);
IppStatus ippsXor_8u_I(const Ipp8u* pSrc, Ipp8u* pSrcDst, int len);
IppStatus ippsXor_16u_I(const Ipp16u* pSrc, Ipp16u* pSrcDst, int len);
IppStatus ippsXor_32u_I(const Ipp32u* pSrc, Ipp32u* pSrcDst, int len);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.h96

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Libraries: ippcore.lib, ippvm.lib

Parameters
pSrc1, pSrc2

Pointers to the two source vectors.

pDst

Pointer to the destination vector.

pSrc

Pointer to the source vector for the in-place operation.

pSrcDstlen

Pointer to the source and destination vector for the in-place
operation.
Number of elements in the vector.

Description
This function computes the bitwise XOR of the corresponding elements of the vectors pSrc1 and pSrc2, andstores the result in the vector pDst.
The in-place flavors of ippsXor compute the bitwise XOR of the corresponding elements of the vectors pSrc
and pSrcDst and store the result in the vector pSrcDst.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when any of the specified pointers is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

Not
Computes the bitwise NOT of the vector elements.

SyntaxIppStatus ippsNot_8u(const Ipp8u* pSrc, Ipp8u* pDst, int len);
IppStatus ippsNot_16u(const Ipp16u* pSrc, Ipp16u* pDst, int len);
IppStatus ippsNot_32u(const Ipp32u* pSrc, Ipp32u* pDst, int len);
IppStatus ippsNot_8u_I(Ipp8u* pSrcDst, int len);
IppStatus ippsNot_16u_I(Ipp16u* pSrcDst, int len);
IppStatus ippsNot_32u_I(Ipp32u* pSrcDst, int len);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

97

1Intel® Integrated Performance Primitives Developer Guide and ReferencepSrcDstlen

Pointer to the source and destination vector for the in-place
operation.
Number of elements in the vector.

Description
This function computes the bitwise NOT of the corresponding elements of the vectors pSrc, and stores theresult in the vector pDst.
The in-place flavors of ippsNot compute the bitwise NOT of the corresponding elements of the vector
pSrcDst and store the result in the vector pSrcDst.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pSrc, pDst, or pSrcDst pointer is
NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

LShiftC
Shifts bits in vector elements to the left.

SyntaxIppStatus ippsLShiftC_8u(const Ipp8u* pSrc, int val, Ipp8u* pDst, int len);
IppStatus ippsLShiftC_16s(const Ipp16s* pSrc, int val, Ipp16s* pDst, int len);
IppStatus ippsLShiftC_16u(const Ipp16u* pSrc, int val, Ipp16u* pDst, int len);
IppStatus ippsLShiftC_32s(const Ipp32s* pSrc, int val, Ipp32s* pDst, int len);
IppStatus ippsLShiftC_8u_I(int val, Ipp8u* pSrcDst, int len);
IppStatus ippsLShiftC_16u_I(int val, Ipp16u* pSrcDst, int len);
IppStatus ippsLShiftC_16s_I(int val, Ipp16s* pSrcDst, int len);
IppStatus ippsLShiftC_32s_I(int val, Ipp32s* pSrcDst, int len);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parametersval

Number of bits by which the function shifts each element of thevector pSrc or pSrcDst.

pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

pSrcDstPointer to the source and destination vector for the in-place
operation.

98

Developer Guide and Reference for Intel® Integrated Performance Primitiveslen1

Number of elements in the vector.

Description
This function shifts each element of the vector pSrc by val bits to the left, and stores the result in pDst.
The in-place flavors of ippsLShiftC shift each element of the vector pSrcDst by val bits to the left andstore the result in pSrcDst.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

Indicates no error.
Indicates an error when the pSrc, pDst, or pSrcDst pointer is

NULL .

Indicates an error when len is less than or equal to 0.

RShiftC
Shifts bits in vector elements to the right.

SyntaxIppStatus ippsRShiftC_8u(const Ipp8u* pSrc, int val, Ipp8u* pDst, int len);
IppStatus ippsRShiftC_16s(const Ipp16s* pSrc, int val, Ipp16s* pDst, int len);
IppStatus ippsRShiftC_16u(const Ipp16u* pSrc, int val, Ipp16u* pDst, int len);
IppStatus ippsRShiftC_32s(const Ipp32s* pSrc, int val, Ipp32s* pDst, int len);
IppStatus ippsRShiftC_8u_I(int val, Ipp8u* pSrcDst, int len);
IppStatus ippsRShiftC_16u_I(int val, Ipp16u* pSrcDst, int len);
IppStatus ippsRShiftC_16s_I(int val, Ipp16s* pSrcDst, int len);
IppStatus ippsRShiftC_32s_I(int val, Ipp32s* pSrcDst, int len);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parametersval

Number of bits by which the function shifts each element of thevector pSrc or pSrcDst.

pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

pSrcDstlen

Pointer to the source and destination vector for the in-place
operation.
Number of elements in the vector.

99

1Intel® Integrated Performance Primitives Developer Guide and Reference

Description
This function shifts each element of the vector pSrc by val bits to the right, and stores the result in pDst.
The in-place flavors of ippsRShiftC shift each element of the vector pSrcDst by val bits to the right andstore the result in pSrcDst.
Note that the arithmetic shift is realized for signed data, and the logical shift for unsigned data.

Return Values
Indicates no error.

ippStsNoErr
ippStsNullPtrErr

Indicates an error when the pSrc, pDst, or pSrcDst pointer is

NULL.

Indicates an error when len is less than or equal to zero.

ippStsSizeErr

ExampleThe code example below shows how the logical and shift functions can be used in the saturate operation. The
data are converted to the unsigned char range [0...255].

void saturate(void) {Ipp16s x[8] = {1000, -257, 127, 4, 5, 0, 7, 8}, lo[8], hi[8];IppStatus status = ippsNot_16u((Ipp16u*)x, (Ipp16u*)lo, 8);ippsRShiftC_16s_I(15, lo, 8);
ippsCopy_16s(x, hi, 8);
ippsSubCRev_16s_ISfs(255, hi, 8, 0);ippsRShiftC_16s_I(15, hi, 8);ippsAnd_16u_I((Ipp16u*)lo, (Ipp16u*)x, 8);ippsOr_16u_I((Ipp16u*)hi, (Ipp16u*)x, 8);ippsAndC_16u_I(255, (Ipp16u*)x, 8);
printf_16s("saturate =", x, 8, status);}
Output:saturate =255 0 127 4 5 0 7 8Arithmetic Functions
This section describes the Intel IPP signal processing functions that perform vector arithmetic operations on
vectors. The arithmetic functions include basic element-wise arithmetic operations between vectors, as well
as more complex calculations such as computing absolute values, square and square root, natural logarithm
and exponential of vector elements.
Intel IPP software provides two versions of each function. One version performs the operation in-place, while
the other stores the results of the operation in a different destination vector, that is, executes an out-of-place
operation.

AddC
Adds a constant value to each element of a vector.

SyntaxCase 1: Not-in-place operations on floating point data.
IppStatus ippsAddC_32f(const Ipp32f* pSrc, Ipp32f val, Ipp32f* pDst, int len);
IppStatus ippsAddC_64f(const Ipp64f* pSrc, Ipp64f val, Ipp64f* pDst, int len);
IppStatus ippsAddC_32fc(const Ipp32fc* pSrc, Ipp32fc val,Ipp32fc* pDst, int len);100Developer Guide and Reference for Intel® Integrated Performance Primitives

1

IppStatus ippsAddC_64fc(const Ipp64fc* pSrc, Ipp64fc val, Ipp64fc* pDst, int len);Case 2: Not-in-place operations on integer data.
IppStatus ippsAddC_8u_Sfs(const Ipp8u* pSrc, Ipp8u val, Ipp8u* pDst, int len, int
scaleFactor);
IppStatus ippsAddC_16s_Sfs(const Ipp16s* pSrc, Ipp16s val, Ipp16s* pDst, int len, int
scaleFactor);
IppStatus ippsAddC_16u_Sfs(const Ipp16u* pSrc, Ipp16u val, Ipp16u* pDst, int len, int
scaleFactor);
IppStatus ippsAddC_32s_Sfs(const Ipp32s* pSrc, Ipp32s val, Ipp32s* pDst, int len, int
scaleFactor);
IppStatus ippsAddC_16sc_Sfs(const Ipp16sc* pSrc, Ipp16sc val, Ipp16sc* pDst, int len,int scaleFactor);
IppStatus ippsAddC_32sc_Sfs(const Ipp32sc* pSrc, Ipp32sc val, Ipp32sc* pDst, int len,int scaleFactor);
IppStatus ippsAddC_64u_Sfs(const Ipp64u* pSrc, Ipp64u val, Ipp64u* pDst, Ipp32u len,int scaleFactor, IppRoundMode rndMode);
IppStatus ippsAddC_64s_Sfs(const Ipp64s* pSrc, Ipp64s val, Ipp64s* pDst, Ipp32u len,int scaleFactor, IppRoundMode rndMode);

Case 3: In-place operations on floating point data.
IppStatus ippsAddC_16s_I(Ipp16s val, Ipp16s* pSrcDst, int len);
IppStatus ippsAddC_32f_I(Ipp32f val, Ipp32f* pSrcDst, int len);
IppStatus ippsAddC_64f_I(Ipp64f val, Ipp64f* pSrcDst, int len);
IppStatus ippsAddC_32fc_I(Ipp32fc val, Ipp32fc* pSrcDst, int len);
IppStatus ippsAddC_64fc_I(Ipp64fc val, Ipp64fc* pSrcDst, int len);Case 4: In-place operations on integer data.
IppStatus ippsAddC_8u_ISfs(Ipp8u val, Ipp8u* pSrcDst, int len, int scaleFactor);
IppStatus ippsAddC_16u_ISfs(Ipp16u val, Ipp16u* pSrcDst, int len, int scaleFactor);
IppStatus ippsAddC_16s_ISfs(Ipp16s val, Ipp16s* pSrcDst, int len, int scaleFactor);
IppStatus ippsAddC_32s_ISfs(Ipp32s val, Ipp32s* pSrcDst, int len, int scaleFactor);
IppStatus ippsAddC_16sc_ISfs(Ipp16sc val, Ipp16sc* pSrcDst, int len, int scaleFactor);
IppStatus ippsAddC_32sc_ISfs(Ipp32sc val, Ipp32sc* pSrcDst, int len, int scaleFactor);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc

Pointer to the source vector.

101

1

Intel® Integrated Performance Primitives Developer Guide and Reference

val

Scalar value used to increment each element of the source vector.

pDst

Pointer to the destination vector.

pSrcDstPointer to the source and destination vector for the in-place operation.

len

Number of elements in the vector.

scaleFactor

Scale factor, refer to Integer Scaling.

rndModeRounding mode, the following values are possible:

ippRndZero floating-point values are truncated to zero
ippRndNear floating-point values are rounded to the nearest eveninteger when the fractional part equals 0.5; otherwise they arerounded to the nearest integer
ippRndFinancial floating-point values are rounded down to thenearest integer when the fractional part is less than 0.5, or rounded
up to the nearest integer if the fractional part is equal or greater than
0.5.

Description
This function adds a value val to each element of the source vector pSrc, and stores the result in thedestination vector pDst.
The in-place flavors of ippsAddC add a value val to each element of the vector pSrcDst, and store theresult in pSrcDst.
Functions with Sfs suffixe perform scaling of the result value in accordance with the scaleFactor value. If
the output value exceeds the data range, the result is saturated.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pSrc, pDst, or pSrcDst pointer is
NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to zero.

See Also
Integer Scaling
Add
Adds the elements of two vectors.

SyntaxCase 1. Not-in-place operations on floating point data, and integer data without scaling.
IppStatus ippsAdd_16s(const Ipp16s* pSrc1, const Ipp16s* pSrc2, Ipp16s* pDst, int len);
IppStatus ippsAdd_32f(const Ipp32f* pSrc1, const Ipp32f* pSrc2, Ipp32f* pDst, int len);
IppStatus ippsAdd_64f(const Ipp64f* pSrc1, const Ipp64f* pSrc2, Ipp64f* pDst, int len);
IppStatus ippsAdd_32fc(const Ipp32fc* pSrc1, const Ipp32fc* pSrc2, Ipp32fc* pDst, int
len);

102

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

IppStatus ippsAdd_64fc(const Ipp64fc* pSrc1, const Ipp64fc* pSrc2, Ipp64fc* pDst, int
len);
IppStatus ippsAdd_8u16u(const Ipp8u* pSrc1, const Ipp8u* pSrc2, Ipp16u* pDst, int len);
IppStatus ippsAdd_16u(const Ipp16u* pSrc1, const Ipp16u* pSrc2, Ipp16u* pDst, int len);
IppStatus ippsAdd_32u(const Ipp32u* pSrc1, const Ipp32u* pSrc2, Ipp32u* pDst, int len);
IppStatus ippsAdd_16s32f(const Ipp16s* pSrc1, const Ipp16s* pSrc2, Ipp32f* pDst, int
len);Case 2. Not-in-place operations on integer data with scaling.
IppStatus ippsAdd_8u_Sfs(const Ipp8u* pSrc1, const Ipp8u* pSrc2, Ipp8u* pDst, int len,int scaleFactor);
IppStatus ippsAdd_16u_Sfs(const Ipp16u* pSrc1, const Ipp16u* pSrc2, Ipp16u* pDst, intlen, int scaleFactor);
IppStatus ippsAdd_16s_Sfs(const Ipp16s* pSrc1, const Ipp16s* pSrc2, Ipp16s* pDst, intlen, int scaleFactor);
IppStatus ippsAdd_32s_Sfs(const Ipp32s* pSrc1, const Ipp32s* pSrc2, Ipp32s* pDst, intlen, int scaleFactor);
IppStatus ippsAdd_16sc_Sfs(const Ipp16sc* pSrc1, const Ipp16sc* pSrc2, Ipp16sc* pDst,
int len, int scaleFactor);
IppStatus ippsAdd_32sc_Sfs(const Ipp32sc* pSrc1, const Ipp32sc* pSrc2, Ipp32sc* pDst,
int len, int scaleFactor);
IppStatus ippsAdd_64s_Sfs(const Ipp64s* pSrc1, const Ipp64s* pSrc2, Ipp64s* pDst, intlen, int scaleFactor);

Case 3. In-place operations on floating point data, and integer data without scaling.
IppStatus ippsAdd_16s_I(const Ipp16s* pSrc, Ipp16s* pSrcDst, int len);
IppStatus ippsAdd_32f_I(const Ipp32f* pSrc, Ipp32f* pSrcDst, int len);
IppStatus ippsAdd_64f_I(const Ipp64f* pSrc, Ipp64f* pSrcDst, int len);
IppStatus ippsAdd_32fc_I(const Ipp32fc* pSrc, Ipp32fc* pSrcDst, int len);
IppStatus ippsAdd_64fc_I(const Ipp64fc* pSrc, Ipp64fc* pSrcDst, int len);
IppStatus ippsAdd_16s32s_I(const Ipp16s* pSrc, Ipp32s* pSrcDst, int len);
IppStatus ippsAdd_32u_I(const Ipp32u* pSrc, Ipp32u* pSrcDst, int len);Case 4. In-place operations on integer data with scaling.
IppStatus ippsAdd_8u_ISfs(const Ipp8u* pSrc, Ipp8u* pSrcDst, int len, int scaleFactor);
IppStatus ippsAdd_16u_ISfs(const Ipp16u* pSrc, Ipp16u* pSrcDst, int len, int
scaleFactor);
IppStatus ippsAdd_16s_ISfs(const Ipp16s* pSrc, Ipp16s* pSrcDst, int len, int
scaleFactor);
IppStatus ippsAdd_32s_ISfs(const Ipp32s* pSrc, Ipp32s* pSrcDst, int len, int
scaleFactor);
IppStatus ippsAdd_16sc_ISfs(const Ipp16sc* pSrc, Ipp16sc* pSrcDst, int len, int
scaleFactor);

103

1

Intel® Integrated Performance Primitives Developer Guide and Reference

IppStatus ippsAdd_32sc_ISfs(const Ipp32sc* pSrc, Ipp32sc* pSrcDst, int len, int
scaleFactor);

Include Files
ipps.hDomain Dependencies
Flavors declared in ipps.h:
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib
Flavors declared in ipps64x.h:
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippcore_tl.lib, ipps_tl.lib

Parameters
pSrc1, pSrc2

Pointers to the source vectors.

pDst

Pointer to the destination vector.

pSrc

Pointer to the source vector for in-place operations.

len

Pointer to the source and destination vector for in-place
operation.
Number of elements in the vector

scaleFactor

Scale factor, refer to Integer Scaling.

pSrcDstDescription
This function adds the elements of the vector pSrc1 to the elements of the vector pSrc2, and stores theresult in pDst.
The in-place flavors of ippsAdd add the elements of the vector pSrc to the elements of the vector pSrcDst
and store the result in pSrcDst.
Functions with Sfs suffix perform scaling of the result value in accordance with the scaleFactor value. If
the output value exceeds the data range, the result is saturated.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when any of the specified pointers is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

ExampleAdd:
Add_I:

See Also
Integer Scaling104

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

AddProductC
Adds product of a vector and a constant to theaccumulator vector.

SyntaxIppStatus ippsAddProductC_32f(const Ipp32f* pSrc, const Ipp32f val, Ipp32f* pSrcDst,
int len);IppStatus ippsAddProductC_64f(const Ipp64f* pSrc, const Ipp64f val, Ipp64f* pSrcDst,
int len);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc

Pointer to the source vector.

val

The value by which the source vector is multiplied.

pSrcDstlen

Pointer to the source and destination vector for the in-place
operation.
Number of elements in the vector.

Description
This function multiplies each element of the source vector pSrc by a value val and adds the result to thecorresponding element of the accumulator vector pSrcDst as given by:

pSrcDst[n] = pSrcDst[n] + pSrc[n]*val, 0 ≤ n < len

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if any of the specified pointers is NULL.

ippStsSizeErr

Indicates an error if len is less than or equal to 0.

AddProductAdds product of two vectors to the accumulator
vector.

SyntaxCase 1. Operations on floating point data.
IppStatus ippsAddProduct_32f(const Ipp32f* pSrc1, const Ipp32f* pSrc2, Ipp32f* pSrcDst,
int len);IppStatus ippsAddProduct_64f(const Ipp64f* pSrc1, const Ipp64f* pSrc2, Ipp64f* pSrcDst,
int len);IppStatus ippsAddProduct_32fc(const Ipp32fc* pSrc1, const Ipp32fc* pSrc2, Ipp32fc*
pSrcDst, int len);105

1Intel® Integrated Performance Primitives Developer Guide and Reference

IppStatus ippsAddProduct_64fc(const Ipp64fc* pSrc1, const Ipp64fc* pSrc2, Ipp64fc*
pSrcDst, int len);Case 2. Operations on integer data with scaling.
IppStatus ippsAddProduct_16s_Sfs(const Ipp16s* pSrc1, const Ipp16s* pSrc2, Ipp16s*
pSrcDst, int len, int scaleFactor);
IppStatus ippsAddProduct_32s_Sfs(const Ipp32s* pSrc1, const Ipp32s* pSrc2, Ipp32s*
pSrcDst, int len, int scaleFactor);
IppStatus ippsAddProduct_16s32s_Sfs(const Ipp16s* pSrc1, const Ipp16s* pSrc2, Ipp32s*
pSrcDst, int len, int scaleFactor);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc1, pSrc2

Pointers to the source vectors.

pSrcDstPointer to the destination accumulator vector.

len

The number of elements in the vectors.

scaleFactor

Scale factor, refer to Integer Scaling.

Description
This function multiplies each element of the source vector pSrc1 by the corresponding element of the vector
pSrc2, and adds the result to the corresponding element of the accumulator vector pSrcDst as given by:

pSrcDst[n ] = pSrcDst[n ] + pSrc1[n ] * pSrc2[n ], 0 ≤ n < len.
Functions with Sfs suffixes perform scaling of the result value in accordance with the scaleFactor value. If
the output value exceeds the data range, the result becomes saturated.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when any of the specified pointers is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

MulC
Multiplies each element of a vector by a constantvalue.

SyntaxCase 1. Not-in-place operations without scaling.
IppStatus ippsMulC_32f(const Ipp32f* pSrc, Ipp32f val, Ipp32f* pDst, int len);
IppStatus ippsMulC_64f(const Ipp64f* pSrc, Ipp64f val, Ipp64f* pDst, int len);
IppStatus ippsMulC_32fc(const Ipp32fc* pSrc, Ipp32fc val, Ipp32fc* pDst, int len);106Developer Guide and Reference for Intel® Integrated Performance Primitives

1

IppStatus ippsMulC_64fc(const Ipp64fc* pSrc, Ipp64fc val, Ipp64fc* pDst, int len);
IppStatus ippsMulC_Low_32f16s(const Ipp32f* pSrc, Ipp32f val, Ipp16s* pDst, int len);Case 2. Not-in-place operations with scaling.
IppStatus ippsMulC_8u_Sfs(const Ipp8u* pSrc, Ipp8u val, Ipp8u* pDst, int len, int
scaleFactor);
IppStatus ippsMulC_16s_Sfs(const Ipp16s* pSrc, Ipp16s val, Ipp16s* pDst, int len, int
scaleFactor);
IppStatus ippsMulC_16u_Sfs(const Ipp16u* pSrc, Ipp16u val, Ipp16u* pDst, int len, int
scaleFactor);
IppStatus ippsMulC_32s_Sfs(const Ipp32s* pSrc, Ipp32s val, Ipp32s* pDst, int len, int
scaleFactor);
IppStatus ippsMulC_16sc_Sfs(const Ipp16sc* pSrc, Ipp16sc val, Ipp16sc* pDst, int len,int scaleFactor);
IppStatus ippsMulC_32sc_Sfs(const Ipp32sc* pSrc, Ipp32sc val, Ipp32sc* pDst, int len,int scaleFactor);
IppStatus ippsMulC_32f16s_Sfs(const Ipp32f* pSrc, Ipp32f val, Ipp16s* pDst, int len,int scaleFactor);

Case 3. In-place operations without scaling.
IppStatus ippsMulC_16s_I(Ipp16s val, Ipp16s* pSrcDst, int len);
IppStatus ippsMulC_32f_I(Ipp32f val, Ipp32f* pSrcDst, int len);
IppStatus ippsMulC_64f_I(Ipp64f val, Ipp64f* pSrcDst, int len);
IppStatus ippsMulC_32fc_I(Ipp32fc val, Ipp32fc* pSrcDst, int len);
IppStatus ippsMulC_64fc_I(Ipp64fc val, Ipp64fc* pSrcDst, int len);Case 4. In-place operations with scaling.
IppStatus ippsMulC_8u_ISfs(Ipp8u val, Ipp8u* pSrcDst, int len, int scaleFactor);
IppStatus ippsMulC_16u_ISfs(Ipp16u val, Ipp16u* pSrcDst, int len, int scaleFactor);
IppStatus ippsMulC_16s_ISfs(Ipp16s val, Ipp16s* pSrcDst, int len, int scaleFactor);
IppStatus ippsMulC_32s_ISfs(Ipp32s val, Ipp32s* pSrcDst, int len, int scaleFactor);
IppStatus ippsMulC_64f64s_ISfs(Ipp64f val, Ipp64s* pSrcDst, Ipp32u len, int
scaleFactor);
IppStatus ippsMulC_16sc_ISfs(Ipp16sc val, Ipp16sc* pSrcDst, int len, int scaleFactor);
IppStatus ippsMulC_32sc_ISfs(Ipp32sc val, Ipp32sc* pSrcDst, int len, int scaleFactor);
IppStatus ippsMulC_64s_ISfs(Ipp64s val, Ipp64s* pSrcDst, Ipp32u len, int scaleFactor);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

107

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Parameters
pSrc
val
pDst

Pointer to the source vector.
The scalar value used to multiply each element of the source
vector.
Pointer to the destination vector.

len

Pointer to the source and destination vector for in-place
operation.
The number of elements in the vector

scaleFactor

Scale factor, refer to Integer Scaling.

pSrcDstDescription
This function multiplies each element of the vector pSrc by a value val and stores the result in pDst.
The in-place flavors of ippsMulC multiply each element of the vector pSrcDst by a value val and store theresult in pSrcDst.
The function flavor with Low suffix in its name requires that each value of the product pSrc*val does notexceed the Ipp32s data type range.
The function flavors with Sfs suffix perform scaling of the result value in accordance with the scaleFactor
value. If the output value exceeds the data range, the result is saturated.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pSrc, pDst, or pSrcDst pointer is
NULL.

ippStsSizeErr

Indicates an error when len is less than, or equal to 0.

See Also
Integer Scaling
Mul
Multiplies the elements of two vectors.

SyntaxCase 1. Not-in-place operations on floating point and integer data without scaling.
IppStatus ippsMul_16s(const Ipp16s* pSrc1, const Ipp16s* pSrc2, Ipp16s* pDst, int len);
IppStatus ippsMul_32f(const Ipp32f* pSrc1, const Ipp32f* pSrc2, Ipp32f* pDst, int len);
IppStatus ippsMul_64f(const Ipp64f* pSrc1, const Ipp64f* pSrc2, Ipp64f* pDst, int len);
IppStatus ippsMul_32fc(const Ipp32fc* pSrc1, const Ipp32fc* pSrc2, Ipp32fc* pDst, int
len);
IppStatus ippsMul_64fc(const Ipp64fc* pSrc1, const Ipp64fc* pSrc2, Ipp64fc* pDst, int
len);
IppStatus ippsMul_8u16u(const Ipp8u* pSrc1, const Ipp8u* pSrc2, Ipp16u* pDst, int len);
IppStatus ippsMul_32f32fc(const Ipp32f* pSrc1, const Ipp32fc* pSrc2, Ipp32fc* pDst, int
len);

108

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

IppStatus ippsMul_16s32f(const Ipp16s* pSrc1, const Ipp16s* pSrc2, Ipp32f* pDst, int
len);Case 2. Not-in-place operations on integer data with scaling.
IppStatus ippsMul_8u_Sfs(const Ipp8u* pSrc1, const Ipp8u* pSrc2, Ipp8u* pDst, int len,int scaleFactor);
IppStatus ippsMul_16u_Sfs(const Ipp16u* pSrc1, const Ipp16u* pSrc2, Ipp16u* pDst, intlen, int scaleFactor);
IppStatus ippsMul_16s_Sfs(const Ipp16s* pSrc1, const Ipp16s* pSrc2, Ipp16s* pDst, intlen, int scaleFactor);
IppStatus ippsMul_32s_Sfs(const Ipp32s* pSrc1, const Ipp32s* pSrc2, Ipp32s* pDst, intlen, int scaleFactor);
IppStatus ippsMul_16sc_Sfs(const Ipp16sc* pSrc1, const Ipp16sc* pSrc2, Ipp16sc* pDst,
int len, int scaleFactor);
IppStatus ippsMul_32sc_Sfs(const Ipp32sc* pSrc1, const Ipp32sc* pSrc2, Ipp32sc* pDst,
int len, int scaleFactor);
IppStatus ippsMul_16s32s_Sfs(const Ipp16s* pSrc1, const Ipp16s* pSrc2, Ipp32s* pDst,
int len, int scaleFactor);
IppStatus ippsMul_16u16s_Sfs(const Ipp16u* pSrc1, const Ipp16s* pSrc2, Ipp16s* pDst,
int len, int scaleFactor);

Case 3. In-place operations on floating point and integer data without scaling
IppStatus ippsMul_16s_I(const Ipp16s* pSrc, Ipp16s* pSrcDst, int len);
IppStatus ippsMul_32f_I(const Ipp32f* pSrc, Ipp32f* pSrcDst, int len);
IppStatus ippsMul_64f_I(const Ipp64f* pSrc, Ipp64f* pSrcDst, int len);
IppStatus ippsMul_32fc_I(const Ipp32fc* pSrc, Ipp32fc* pSrcDst, int len);
IppStatus ippsMul_64fc_I(const Ipp64fc* pSrc, Ipp64fc* pSrcDst, int len);
IppStatus ippsMul_32f32fc_I(const Ipp32f* pSrc, Ipp32fc* pSrcDst, int len);Case 4. In-place operations on integer data with scaling
IppStatus ippsMul_8u_ISfs(const Ipp8u* pSrc, Ipp8u* pSrcDst, int len, int scaleFactor);
IppStatus ippsMul_16u_ISfs(const Ipp16u* pSrc, Ipp16u* pSrcDst, int len, int
scaleFactor);
IppStatus ippsMul_16s_ISfs(const Ipp16s* pSrc, Ipp16s* pSrcDst, int len, int
scaleFactor);
IppStatus ippsMul_32s_ISfs(const Ipp32s* pSrc, Ipp32s* pSrcDst, int len, int
scaleFactor);
IppStatus ippsMul_16sc_ISfs(const Ipp16sc* pSrc, Ipp16sc* pSrcDst, int len, int
scaleFactor);
IppStatus ippsMul_32sc_ISfs(const Ipp32sc* pSrc, Ipp32sc* pSrcDst, int len, int
scaleFactor);

Include Files
ipps.h109

1Intel® Integrated Performance Primitives Developer Guide and Reference

Domain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc1, pSrc2

Pointers to the source vectors.

pDst

Pointer to the destination vector.

pSrc

Pointer to the source vector for in-place operation.

pSrcDstPointer to the source and destination vector for in-place
operation.

len

Number of elements in the vector

scaleFactor

Scale factor, refer to Integer Scaling.

Description
This function multiplies the elements of the vector pSrc1 by the elements of the vector pSrc2 and stores theresult in pDst.
The in-place flavors of ippsMul multiply the elements of the vector pSrc by the elements of the vector
pSrcDst and store the result in pSrcDst.
Function flavors with Sfs suffix perform scaling of the result value in accordance with the scaleFactor
value. If the output value exceeds the data range, the result is saturated.
Function flavor with Low suffix requires that each value of the product does not exceed the Ipp32s data type
range.

Return Values
ippStsNoErr

Indicates no error

ippStsNullPtrErr

Indicates an error when any of the specified pointers is NULL.

ippStsSizeErr

Indicates an error when len is less than, or equal to 0,

See Also
Integer Scaling
SubC
Subtracts a constant value from each element of avector.

SyntaxCase 1. Not-in-place operations on floating point data.
IppStatus ippsSubC_32f(const Ipp32f* pSrc, Ipp32f val, Ipp32f* pDst, int len);
IppStatus ippsSubC_32fc(const Ipp32fc* pSrc, Ipp32fc val, Ipp32fc* pDst, int len);
IppStatus ippsSubC_64f(const Ipp64f* pSrc, Ipp64f val, Ipp64f* pDst, int len);
IppStatus ippsSubC_64fc(const Ipp64fc* pSrc, Ipp64fc val, Ipp64fc* pDst, int len);110Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Case 2. Not-in-place operations on integer data.
IppStatus ippsSubC_8u_Sfs(const Ipp8u* pSrc, Ipp8u val, Ipp8u* pDst, int len, int
scaleFactor);
IppStatus ippsSubC_16u_Sfs(const Ipp16u* pSrc, Ipp16u val, Ipp16u* pDst, int len, int
scaleFactor);
IppStatus ippsSubC_16s_Sfs(const Ipp16s* pSrc, Ipp16s val, Ipp16s* pDst, int len, int
scaleFactor);
IppStatus ippsSubC_32s_Sfs(const Ipp32s* pSrc, Ipp32s val, Ipp32s* pDst, int len, int
scaleFactor);
IppStatus ippsSubC_16sc_Sfs(const Ipp16sc* pSrc, Ipp16sc val, Ipp16sc* pDst, int len,int scaleFactor);
IppStatus ippsSubC_32sc_Sfs(const Ipp32sc* pSrc, Ipp32sc val, Ipp32sc* pDst, int len,int scaleFactor);

Case 3. In-place operations on floating point data.
IppStatus ippsSubC_16s_I(Ipp16s val, Ipp16s* pSrcDst, int len);
IppStatus ippsSubC_32f_I(Ipp32f val, Ipp32f* pSrcDst, int len);
IppStatus ippsSubC_64f_I(Ipp64f val, Ipp64f* pSrcDst, int len);
IppStatus ippsSubC_32fc_I(Ipp32fc val, Ipp32fc* pSrcDst, int len);
IppStatus ippsSubC_64fc_I(Ipp64fc val, Ipp64fc* pSrcDst, int len);Case 4. In-place operations on integer data.
IppStatus ippsSubC_8u_ISfs(Ipp8u val, Ipp8u* pSrcDst, int len, int scaleFactor);
IppStatus ippsSubC_16u_ISfs(Ipp16u val, Ipp16u* pSrcDst, int len, int scaleFactor);
IppStatus ippsSubC_16s_ISfs(Ipp16s val, Ipp16s* pSrcDst, int len, int scaleFactor);
IppStatus ippsSubC_32s_ISfs(Ipp32s val, Ipp32s* pSrcDst, int len, int scaleFactor);
IppStatus ippsSubC_16sc_ISfs(Ipp16sc val, Ipp16sc* pSrcDst, int len, int scaleFactor);
IppStatus ippsSubC_32sc_ISfs(Ipp32sc val, Ipp32sc* pSrcDst, int len, int scaleFactor);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc
val
pDst
pSrcDstlen

Pointer to the source vector.
Scalar value used to decrement each element of the source
vector.
Pointer to the destination vector.
Pointer to the source and destination vector for in-place
operation.
Number of elements in the vector

111

1

Intel® Integrated Performance Primitives Developer Guide and Reference

scaleFactor

Scale factor, refer to Integer Scaling.

Description
This function subtracts a value val from each element of the vector pSrc, and stores the result in pDst.
The in-place flavors of ippsSubC subtract a value val from each element of the vector pSrcDst and store
the result in pSrcDst.
Functions with Sfs suffixes perform scaling of the result value in accordance with the scaleFactor value. If
the output value exceeds the data range, the result becomes saturated.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pSrc, pDst, or pSrcDst pointer is
NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

SubCRev
Subtracts each element of a vector from a constantvalue.

SyntaxCase 1. Not-in-place operations on floating point data.
IppStatus ippsSubCRev_32f(const Ipp32f* pSrc, Ipp32f val, Ipp32f* pDst, int len);
IppStatus ippsSubCRev_64f(const Ipp64f* pSrc, Ipp64f val, Ipp64f* pDst, int len);
IppStatus ippsSubCRev_32fc(const Ipp32fc* pSrc, Ipp32fc val, Ipp32fc* pDst, int len);
IppStatus ippsSubCRev_64fc(const Ipp64fc* pSrc, Ipp64fc val, Ipp64fc* pDst, int len);Case 2. Not-in-place operations on integer data.
IppStatus ippsSubCRev_8u_Sfs(const Ipp8u* pSrc, Ipp8u val, Ipp8u* pDst, int len, int
scaleFactor);
IppStatus ippsSubCRev_16u_Sfs(const Ipp16u* pSrc, Ipp16u val, Ipp16u* pDst, int len,int scaleFactor);
IppStatus ippsSubCRev_16s_Sfs(const Ipp16s* pSrc, Ipp16s val, Ipp16s* pDst, int len,int scaleFactor);
IppStatus ippsSubCRev_32s_Sfs(const Ipp32s* pSrc, Ipp32s val, Ipp32s* pDst, int len,int scaleFactor);
IppStatus ippsSubCRev_16sc_Sfs(const Ipp16sc* pSrc, Ipp16sc val, Ipp16sc* pDst, intlen, int scaleFactor);
IppStatus ippsSubCRev_32sc_Sfs(const Ipp32sc* pSrc, Ipp32sc val, Ipp32sc* pDst, intlen, int scaleFactor);

Case 3. In-place operations on floating point data.
IppStatus ippsSubCRev_32f_I(Ipp32f val, Ipp32f* pSrcDst, int len);
IppStatus ippsSubCRev_64f_I(Ipp64f val, Ipp64f* pSrcDst, int len);
IppStatus ippsSubCRev_32fc_I(Ipp32fc val, Ipp32fc* pSrcDst, int len);
IppStatus ippsSubCRev_64fc_I(Ipp64fc val, Ipp64fc* pSrcDst, int len);112

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Case 4. In-place operations on integer data.
IppStatus ippsSubCRev_8u_ISfs(Ipp8u val, Ipp8u* pSrcDst, int len, int scaleFactor);
IppStatus ippsSubCRev_16u_ISfs(Ipp16u val, Ipp16u* pSrcDst, int len, int scaleFactor);
IppStatus ippsSubCRev_16s_ISfs(Ipp16s val, Ipp16s* pSrcDst, int len, int scaleFactor);
IppStatus ippsSubCRev_32s_ISfs(Ipp32s val, Ipp32s* pSrcDst, int len, int scaleFactor);
IppStatus ippsSubCRev_16sc_ISfs(Ipp16sc val, Ipp16sc* pSrcDst, int len, int
scaleFactor);
IppStatus ippsSubCRev_32sc_ISfs(Ipp32sc val, Ipp32sc* pSrcDst, int len, int
scaleFactor);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parametersval

Scalar value from which vector elements are subtracted.

pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

pSrcDstPointer to the vector whose elements are to be subtracted fromthe value val in case of the in-place operation. The destination
vector which stores the result of the subtraction val pSrcDst[n].

lenNumber of elements in the vector

scaleFactor

Scale factor, refer to Integer Scaling.

Description
This function subtracts each element of the vector pSrc from a value val and stores the result in pDst.
The in-place flavors of ippsSubCRev subtract each element of the vector pSrcDst from a value val andstore the result in pSrcDst.
Functions with Sfs suffixes perform scaling of the result value in accordance with the scaleFactor value. If
the output value exceeds the data range, the result becomes saturated.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pSrc, pDst, or pSrcDst pointer is
NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

Sub
Subtracts the elements of two vectors.

113

1

Intel® Integrated Performance Primitives Developer Guide and Reference

SyntaxCase 1. Not-in-place operations on floating point data, and integer data without scaling.
IppStatus ippsSub_16s(const Ipp16s* pSrc1, const Ipp16s* pSrc2, Ipp16s* pDst, int len);
IppStatus ippsSub_32f(const Ipp32f* pSrc1, const Ipp32f* pSrc2, Ipp32f* pDst, int len);
IppStatus ippsSub_64f(const Ipp64f* pSrc1, const Ipp64f* pSrc2, Ipp64f* pDst, int len);
IppStatus ippsSub_32fc(const Ipp32fc* pSrc1, const Ipp32fc* pSrc2, Ipp32fc* pDst, int
len);
IppStatus ippsSub_64fc(const Ipp64fc* pSrc1, const Ipp64fc* pSrc2, Ipp64fc* pDst, int
len);
IppStatus ippsSub_16s32f(const Ipp16s* pSrc1, const Ipp16s* pSrc2, Ipp32f* pDst, int
len);Case 2. Not-in-place operations on integer data with scaling.
IppStatus ippsSub_8u_Sfs(const Ipp8u* pSrc1, const Ipp8u* pSrc2, Ipp8u* pDst, int len,int scaleFactor);
IppStatus ippsSub_16u_Sfs(const Ipp16u* pSrc1, const Ipp16u* pSrc2, Ipp16u* pDst, intlen, int scaleFactor);
IppStatus ippsSub_16s_Sfs(const Ipp16s* pSrc1, const Ipp16s* pSrc2, Ipp16s* pDst, intlen, int scaleFactor);
IppStatus ippsSub_32s_Sfs(const Ipp32s* pSrc1, const Ipp32s* pSrc2, Ipp32s* pDst, intlen, int scaleFactor);
IppStatus ippsSub_16sc_Sfs(const Ipp16sc* pSrc1, const Ipp16sc* pSrc2, Ipp16sc* pDst,
int len, int scaleFactor);
IppStatus ippsSub_32sc_Sfs(const Ipp32sc* pSrc1, const Ipp32sc* pSrc2, Ipp32sc* pDst,
int len, int scaleFactor);

Case 3. In-place operations on floating point data and integer data without scaling.
IppStatus ippsSub_16s_I(const Ipp16s* pSrc, Ipp16s* pSrcDst, int len);
IppStatus ippsSub_32f_I(const Ipp32f* pSrc, Ipp32f* pSrcDst, int len);
IppStatus ippsSub_64f_I(const Ipp64f* pSrc, Ipp64f* pSrcDst, int len);
IppStatus ippsSub_32fc_I(const Ipp32fc* pSrc, Ipp32fc* pSrcDst, int len);
IppStatus ippsSub_64fc_I(const Ipp64fc* pSrc, Ipp64fc* pSrcDst, int len);Case 4. In-place operations on integer data with scaling.
IppStatus ippsSub_8u_ISfs(const Ipp8u* pSrc, Ipp8u* pSrcDst, int len, int scaleFactor);
IppStatus ippsSub_16u_ISfs(const Ipp16u* pSrc, Ipp16u* pSrcDst, int len, int
scaleFactor);
IppStatus ippsSub_16s_ISfs(const Ipp16s* pSrc, Ipp16s* pSrcDst, int len, int
scaleFactor);
IppStatus ippsSub_32s_ISfs(const Ipp32s* pSrc, Ipp32s* pSrcDst, int len, int
scaleFactor);
IppStatus ippsSub_16sc_ISfs(const Ipp16sc* pSrc, Ipp16sc* pSrcDst, int len, int
scaleFactor);

114

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

IppStatus ippsSub_32sc_ISfs(const Ipp32sc* pSrc, Ipp32sc* pSrcDst, int len, int
scaleFactor);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc1
pSrc2

Pointer to the source vector-subtrahend, whose elements areto be subtracted.
Pointer to the source vector-minuend from whose elements theelements of pSrc1are to be subtracted.

pDst

Pointer to the destination vector.

pSrc

Pointer to the source vector-subtrahend for in-place operation.

len

Pointer to the source vector-minuend and destination vector forin-place operation.
Number of elements in the vector.

scaleFactor

Scale factor, refer to Integer Scaling.

pSrcDstDescription
This function subtracts the elements of the vector pSrc1 from the elements of the vector pSrc2, and storesthe result in pDst.
The in-place flavors of ippsSub subtract the elements of the vector pSrc from the elements of a vector
pSrcDst and store the result in pSrcDst.
Functions with Sfs suffixes perform scaling of the result value in accordance with the scaleFactor value. If
the output value exceeds the data range, the result becomes saturated.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when any of the specified pointers is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

DivC
Divides each element of a vector by a constant value.

SyntaxCase 1. Not-in-place operations on floating point data.
IppStatus ippsDivC_32f(const Ipp32f* pSrc, Ipp32f val, Ipp32f* pDst, int len);
IppStatus ippsDivC_64f(const Ipp64f* pSrc, Ipp64f val, Ipp64f* pDst, int len);
IppStatus ippsDivC_32fc(const Ipp32fc* pSrc, Ipp32fc val, Ipp32fc* pDst, int len);
IppStatus ippsDivC_64fc(const Ipp64fc* pSrc, Ipp64fc val, Ipp64fc* pDst, int len);115

1Intel® Integrated Performance Primitives Developer Guide and Reference

Case 2. Not-in-place operations on integer data with scaling.
IppStatus ippsDivC_8u_Sfs(const Ipp8u* pSrc, Ipp8u val, Ipp8u* pDst, int len, int
scaleFactor);
IppStatus ippsDivC_16u_Sfs(const Ipp16u* pSrc, Ipp16u val, Ipp16u* pDst, int len, int
scaleFactor);
IppStatus ippsDivC_16s_Sfs(const Ipp16s* pSrc, Ipp16s val, Ipp16s* pDst, int len, int
scaleFactor);
IppStatus ippsDivC_16sc_Sfs(const Ipp16sc* pSrc, Ipp16sc val, Ipp16sc* pDst, int len,int scaleFactor);

Case 3. In-place operations on floating point data.
IppStatus ippsDivC_32f_I(Ipp32f val, Ipp32f* pSrcDst, int len);
IppStatus ippsDivC_64f_I(Ipp64f val, Ipp64f* pSrcDst, int len);
IppStatus ippsDivC_32fc_I(Ipp32fc val, Ipp32fc* pSrcDst, int len);
IppStatus ippsDivC_64fc_I(Ipp64fc val, Ipp64fc* pSrcDst, int len);Case 4. In-place operations on integer data with scaling.
IppStatus ippsDivC_8u_ISfs(Ipp8u val, Ipp8u* pSrcDst, int len, int scaleFactor);
IppStatus ippsDivC_16u_ISfs(Ipp16u val, Ipp16u* pSrcDst, int len, int scaleFactor);
IppStatus ippsDivC_16s_ISfs(Ipp16s val, Ipp16s* pSrcDst, int len, int scaleFactor);
IppStatus ippsDivC_64s_ISfs(Ipp64s val, Ipp64s* pSrcDst, Ipp32u len, int scaleFactor);
IppStatus ippsDivC_16sc_ISfs(Ipp16sc val, Ipp16sc* pSrcDst, int len, int scaleFactor);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parametersval

Scalar value used as a divisor.

pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

len

Pointer to the source and destination vector for in-place
operation.
Number of elements in the vector

scaleFactor

Scale factor, refer to Integer Scaling.

pSrcDstDescription
This function divides each element of the vector pSrc by a value val and stores the result in pDst.
The in-place flavors of ippsDivC divide each element of the vector pSrcDst by a value val and store theresult in pSrcDst.

116Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Functions with Sfs suffixes perform scaling of the result value in accordance with the scaleFactor value. If
the output value exceeds the data range, the result becomes saturated.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pSrc, pDst, or pSrcDst pointer is
NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

ippStsDivByZeroErr

Indicates an error when val is equal to 0.

DivCRev
Divides a constant value by each element of a vector.

SyntaxIppStatus ippsDivCRev_16u(const Ipp16u* pSrc, Ipp16u val, Ipp16u* pDst, int len);
IppStatus ippsDivCRev_32f(const Ipp32f* pSrc, Ipp32f val, Ipp32f* pDst, int len);
IppStatus ippsDivCRev_16u_I(Ipp16u val, Ipp16u* pSrcDst, int len);
IppStatus ippsDivCRev_32f_I(Ipp32f val, Ipp32f* pSrcDst, int len);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
val
pSrc
pDst
pSrcDstlen

Constant value used as a dividend in the operation.
Pointer to the source vector whose elements are used as
divisors.
Pointer to the destination vector.
Pointer to the source and destination vector for in-place
operation.
Number of elements in the vector

Description
This function divides the constant value val by each element of the vector pSrc and stores the results in
pDst.
The in-place flavors of ippsDivC divide the constant value val by each element of the vector pSrcDst andstore the results in pSrcDst.

Return Values
ippStsNoErr

Indicates no error.

117

1

Intel® Integrated Performance Primitives Developer Guide and ReferenceippStsNullPtrErr

Indicates an error when the pSrc, pDst, orpSrcDst pointer is

NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

ippStsDivByZeroErr

Indicates an error when any element of the vector pSource isequal to 0.

Div
Divides the elements of two vectors.

SyntaxCase 1. Not-in-place operations on integer data.
IppStatus ippsDiv_8u_Sfs(const Ipp8u* pSrc1, const Ipp8u* pSrc2, Ipp8u* pDst, int len,int scaleFactor);
IppStatus ippsDiv_16u_Sfs(const Ipp16u* pSrc1, const Ipp16u* pSrc2, Ipp16u* pDst, intlen, int scaleFactor);
IppStatus ippsDiv_16s_Sfs(const Ipp16s* pSrc1, const Ipp16s* pSrc2, Ipp16s* pDst, intlen, int scaleFactor);
IppStatus ippsDiv_32s_Sfs(const Ipp32s* pSrc1, const Ipp32s* pSrc2, Ipp32s* pDst, intlen, int scaleFactor);
IppStatus ippsDiv_16sc_Sfs(const Ipp16sc* pSrc1, const Ipp16sc* pSrc2, Ipp16sc* pDst,
int len, int scaleFactor);
IppStatus ippsDiv_32s16s_Sfs(const Ipp16s* pSrc1, const Ipp32s* pSrc2, Ipp16s* pDst,
int len, int scaleFactor);

Case 2. Not-in-place operations on floating point data.
IppStatus ippsDiv_32f(const Ipp32f* pSrc1, const Ipp32f* pSrc2, Ipp32f* pDst, int len);
IppStatus ippsDiv_64f(const Ipp64f* pSrc1, const Ipp64f* pSrc2, Ipp64f* pDst, int len);
IppStatus ippsDiv_32fc(const Ipp32fc* pSrc1, const Ipp32fc* pSrc2, Ipp32fc* pDst, int
len);
IppStatus ippsDiv_64fc(const Ipp64fc* pSrc1, const Ipp64fc* pSrc2, Ipp64fc* pDst, int
len);Case 3. In-place operations on integer data.
IppStatus ippsDiv_8u_ISfs(const Ipp8u* pSrc, Ipp8u* pSrcDst, int len, int scaleFactor);
IppStatus ippsDiv_16u_ISfs(const Ipp16u* pSrc, Ipp16u* pSrcDst, int len, int
scaleFactor);
IppStatus ippsDiv_16s_ISfs(const Ipp16s* pSrc, Ipp16s* pSrcDst, int len, int
scaleFactor);
IppStatus ippsDiv_16sc_ISfs(const Ipp16sc* pSrc, Ipp16sc* pSrcDst, int len, int
scaleFactor);
IppStatus ippsDiv_32s_ISfs(const Ipp32s* pSrc, Ipp32s* pSrcDst, int len, int
scaleFactor);

Case 4. In-place operations on floating point data.
IppStatus ippsDiv_32f_I(const Ipp32f* pSrc, Ipp32f* pSrcDst, int len);
IppStatus ippsDiv_64f_I(const Ipp64f* pSrc, Ipp64f* pSrcDst, int len);118

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

IppStatus ippsDiv_32fc_I(const Ipp32fc* pSrc, Ipp32fc* pSrcDst, int len);
IppStatus ippsDiv_64fc_I(const Ipp64fc* pSrc, Ipp64fc* pSrcDst, int len);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc1

Pointer to the divisor vector.

pSrc2

Pointer to the dividend vector.

pDst

Pointer to the destination vector.

pSrc

Pointer to the divisor vector for in-place operations.

len

Pointer to the source and destination vector for in-place
operations.
Number of elements in the vector.

scaleFactor

Scale factor, refer to Integer Scaling.

pSrcDstDescription
This function divides the elements of the pSrc2 vector by the elements of the pSrc1 vector , and stores theresult in pDst.
The in-place flavors of ippsDiv divide the elements of the vector pSrcDst by the elements of the vector
pSrc and store the result in pSrcDst.
Functions with Sfs suffixe perform scaling of the result in accordance with the scaleFactor value. If theoutput value exceeds the data range, the result is saturated.
If any of the divisor vector elements is equal to zero, the function returns a warning and continues execution
with the corresponding result value. For more information see "Handling of Special Cases".

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when any of the specified pointers is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to zero.

ippStsDivByZero

Indicates a warning when any of the divisor vector elements isequal to zero.

ExampleDiv:
Div_I:

See Also
Integer Scaling1191Intel® Integrated Performance Primitives Developer Guide and Reference

Appendix A Handling of Special Cases
Div_Round
Divides the elements of two vectors with rounding.

SyntaxCase 1. Not-in-place operations on integer data.
IppStatus ippsDiv_Round_8u_Sfs(const Ipp8u* pSrc1, const Ipp8u* pSrc2, Ipp8u* pDst, intlen, IppRoundMode rndMode, int scaleFactor);
IppStatus ippsDiv_Round_16u_Sfs(const Ipp16u* pSrc1, const Ipp16u* pSrc2, Ipp16u* pDst,
int len, IppRoundMode rndMode, int scaleFactor);
IppStatus ippsDiv_Round_16s_Sfs(const Ipp16s* pSrc1, const Ipp16s* pSrc2, Ipp16s* pDst,
int len, IppRoundMode rndMode, int scaleFactor);

Case 2. In-place operations on integer data.
IppStatus ippsDiv_Round_8u_ISfs(const Ipp8u* pSrc, Ipp8u* pSrcDst, int len,
IppRoundMode rndMode, int scaleFactor);
IppStatus ippsDiv_Round_16u_ISfs(const Ipp16u* pSrc, Ipp16u* pSrcDst, int len,
IppRoundMode rndMode, int scaleFactor);
IppStatus ippsDiv_Round_16s_ISfs(const Ipp16s* pSrc, Ipp16s* pSrcDst, int len,
IppRoundMode rndMode, int scaleFactor);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc1

Pointer to the vector whose elements are used as divisors.

pSrc2

Pointer to the vector whose elements are used as dividends.

pDst

Pointer to the destination vector.

pSrc

Pointer to the source vector whose elements are used as divisors forin-place operations.

pSrcDstPointer to the source and destination vector for in-place operations.

len

Number of elements in the vector.

rndModeRounding mode, the following values are possible:

ippRndZero - specifies that floating-point values are truncated towardzero,

ippRndNear - specifies that floating-point values are rounded to thenearest even integer when the fractional part equals 0.5; otherwise
they are rounded to the nearest integer,120

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

ippRndFinancial - specifies that 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 or
greater than 0.5.

scaleFactor

Scale factor, refer to Integer Scaling.

Description
This function divides the elements of the vector pSrc2 by the elements of the vector pSrc1, the result isrounded using the rounding method specified by the parameter roundMode and stored in the vector pDst.
The in-place flavors of ippsDiv_Round divide the elements of the vector pSrcDst by the elements of thevector pSrc, the result is rounded using the rounding method specified by the parameter roundMode andstored in the vector pSrcDst.
Functions perform scaling of the result value in accordance with the scaleFactor value. If the output value
exceeds the data range, the result becomes saturated.
If the function ippsDiv_Round encounters a zero-valued divisor vector element, it returns a warning status
and continues execution with the corresponding result value (see appendix A "Handling of Special Cases" formore information).

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when any of the specified pointers is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

Indicates a warning for zero-valued divisor vector element. The
function execution is continued.
ippStsRoundModeNotSupportedErr Indicates an error condition if the roundMode has an illegal
value.
ippStsDivByZero

Abs
Computes absolute values of vector elements.

SyntaxIppStatus ippsAbs_16s(const Ipp16s* pSrc, Ipp16s* pDst, int len);
IppStatus ippsAbs_32s(const Ipp32s* pSrc, Ipp32s* pDst, int len);
IppStatus ippsAbs_32f(const Ipp32f* pSrc, Ipp32f* pDst, int len);
IppStatus ippsAbs_64f(const Ipp64f* pSrc, Ipp64f* pDst, int len);
IppStatus ippsAbs_16s_I(Ipp16s* pSrcDst, int len);
IppStatus ippsAbs_32s_I(Ipp32s* pSrcDst, int len);
IppStatus ippsAbs_32f_I(Ipp32f* pSrcDst, int len);
IppStatus ippsAbs_64f_I(Ipp64f* pSrcDst, int len);

Include Files
ipps.h121

1Intel® Integrated Performance Primitives Developer Guide and Reference

Domain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

pSrcDstlen

Pointer to the source and destination vector for in-place
operations.
Number of elements in the vector.

Description
This function computes the absolute values of each element of the vector pSrc and stores the result in pDst.
The in-place flavors of ippsAbs compute the absolute values of each element of the vector pSrcDst andstore the result in pSrcDst.
To compute the absolute values of complex data, use the function ippsMagnitudeippsMagnitude.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pSrc, pDst, or pSrcDst pointer is
NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

ExampleAbs:
Abs_I:

Sqr
Computes a square of each element of a vector.

SyntaxIppStatus ippsSqr_32f(const Ipp32f* pSrc, Ipp32f* pDst, int len);
IppStatus ippsSqr_64f(const Ipp64f* pSrc, Ipp64f* pDst, int len);
IppStatus ippsSqr_32fc(const Ipp32fc* pSrc, Ipp32fc* pDst, int len);
IppStatus ippsSqr_64fc(const Ipp64fc* pSrc, Ipp64fc* pDst, int len);
IppStatus ippsSqr_8u_Sfs(const Ipp8u* pSrc, Ipp8u* pDst, int len, int scaleFactor);
IppStatus ippsSqr_16s_Sfs(const Ipp16s* pSrc, Ipp16s* pDst, int len, int scaleFactor);
IppStatus ippsSqr_16u_Sfs(const Ipp16u* pSrc, Ipp16u* pDst, int len, int scaleFactor);
IppStatus ippsSqr_16sc_Sfs(const Ipp16sc* pSrc, Ipp16sc* pDst, int len, int
scaleFactor);
IppStatus ippsSqr_32f_I(Ipp32f* pSrcDst, int len);122

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

IppStatus ippsSqr_64f_I(Ipp64f* pSrcDst, int len);
IppStatus ippsSqr_32fc_I(Ipp32fc* pSrcDst, int len);
IppStatus ippsSqr_64fc_I(Ipp64fc* pSrcDst, int len);
IppStatus ippsSqr_8u_ISfs(Ipp8u* pSrcDst, int len, int scaleFactor);
IppStatus ippsSqr_16s_ISfs(Ipp16s* pSrcDst, int len, int scaleFactor);
IppStatus ippsSqr_16u_ISfs(Ipp16u* pSrcDst, int len, int scaleFactor);
IppStatus ippsSqr_16sc_ISfs(Ipp16sc* pSrcDst, int len, int scaleFactor);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

len

Pointer to the source and destination vector for in-place
operations.
Number of elements in the vector

scaleFactor

Scale factor, refer to Integer Scaling.

pSrcDstDescription
This function computes the square of each element of the vector pSrc, and stores the result in pDst. The
computation is performed as follows:

pDst[n] = pSrc[ n]2
The in-place flavors of ippsSqrcompute the square of each element of the vector pSrcDst and store theresult in pSrcDst. The computation is performed as follows:

pSrcDst[n] = pSrcDst[ n]2When computing the square of an integer number, the output result can exceed the data range and become
saturated. To get a precise result, use the scale factor.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

Indicates no error.
Indicates an error when the pSrc, pDst, or pSrcDst pointer is

NULL.

Indicates an error when len is less than or equal to zero.

Example
Sqr:

123

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Sqr_I:

Sqrt
Computes a square root of each element of a vector.

SyntaxIppStatus ippsSqrt_32f(const Ipp32f* pSrc, Ipp32f* pDst, int len);
IppStatus ippsSqrt_64f(const Ipp64f* pSrc, Ipp64f* pDst, int len);
IppStatus ippsSqrt_32fc(const Ipp32fc* pSrc, Ipp32fc* pDst, int len);
IppStatus ippsSqrt_64fc(const Ipp64fc* pSrc, Ipp64fc* pDst, int len);
IppStatus ippsSqrt_8u_Sfs(const Ipp8u* pSrc, Ipp8u* pDst, int len, int scaleFactor);
IppStatus ippsSqrt_16s_Sfs(const Ipp16s* pSrc, Ipp16s* pDst, int len, int scaleFactor);
IppStatus ippsSqrt_16u_Sfs(const Ipp16u* pSrc, Ipp16u* pDst, int len, int scaleFactor);
IppStatus ippsSqrt_16sc_Sfs(const Ipp16sc* pSrc, Ipp16sc* pDst, int len, int
scaleFactor);
IppStatus ippsSqrt_32s16s_Sfs(const Ipp32s* pSrc, Ipp16s* pDst, int len, int
scaleFactor);
IppStatus ippsSqrt_32f_I(Ipp32f* pSrcDst, int len);
IppStatus ippsSqrt_64f_I(Ipp64f* pSrcDst, int len);
IppStatus ippsSqrt_32fc_I(Ipp32fc* pSrcDst, int len);
IppStatus ippsSqrt_64fc_I(Ipp64fc* pSrcDst, int len);
IppStatus ippsSqrt_8u_ISfs(Ipp8u* pSrcDst, int len, int scaleFactor);
IppStatus ippsSqrt_16s_ISfs(Ipp16s* pSrcDst, int len, int scaleFactor);
IppStatus ippsSqrt_16u_ISfs(Ipp16u* pSrcDst, int len, int scaleFactor);
IppStatus ippsSqrt_16sc_ISfs(Ipp16sc* pSrcDst, int len, int scaleFactor);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

len

Pointer to the source and destination vector for in-place
operations.
Number of elements in the vector

scaleFactor

Scale factor, refer to Integer Scaling.

pSrcDst124

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Description
This function computes the square root of each element of the vector pSrc, and stores the result in pDst.
The computation is performed as follows:

pDst[n] = (pSrc[n] )1/2
The in-place flavors of ippsSqrt compute the square root of each element of the vector pSrcDst and store
the result in pSrcDst. The computation is performed as follows:

pSrcDst[n] = (pSrcDst[n] )1/2.
The square root of complex vector elements is computed as follows:

If the function ippsSqrt encounters a negative value in the input, it returns a warning status and continues
execution with the corresponding result value (see appendix A "Handling of Special Cases" for more
information).
To increase precision of an integer output, use the scale factor.

Return Values
ippStsNoErr
ippStsNullPtrErr

Indicates no error.
Indicates an error when the pSrc, pDst, or pSrcDst pointer is

NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

ippStsSqrtNegArg

Indicates a warning that a source element has a negativevalue.

Example
Sqrt:
Sqrt_I:

Cubrt
Computes cube root of each element of a vector.

SyntaxIppStatus ippsCubrt_32f(const Ipp32f* pSrc, Ipp32f* pDst, int len);
IppStatus ippsCubrt_32s16s_Sfs(const Ipp32s* pSrc, Ipp16s* pDst, int len, int
scaleFactor);

Include Files
ipps.h125

1Intel® Integrated Performance Primitives Developer Guide and Reference

Domain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

len

Number of elements in the vector

scaleFactor

Scale factor, refer to Integer Scaling.

Description
This function computes cube root of each element of pSrc and stores the result in the corresponding elementof pDst.
The computation is performed as follows:

pDst[n] = (pSrc[n] )1/3 , 0 ≤ n < len.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pDst or pSrc pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

Exp
Computes e to the power of each element of a vector.

SyntaxIppStatus ippsExp_32f(const Ipp32f* pSrc, Ipp32f* pDst, int len);
IppStatus ippsExp_64f(const Ipp64f* pSrc, Ipp64f* pDst, int len);
IppStatus ippsExp_32f_I(Ipp32f* pSrcDst, int len);
IppStatus ippsExp_64f_I(Ipp64f* pSrcDst, int len);
IppStatus ippsExp_16s_Sfs(const Ipp16s* pSrc, Ipp16s* pDst, int len, int scaleFactor);
IppStatus ippsExp_32s_Sfs(const Ipp32s* pSrc, Ipp32s* pDst, int len, int scaleFactor);
IppStatus ippsExp_16s_ISfs(Ipp16s* pSrcDst, int len, int scaleFactor);
IppStatus ippsExp_32s_ISfs(Ipp32s* pSrcDst, int len, int scaleFactor);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

126Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

len

Pointer to the source and destination vector pSrcDst for the inplace operation.
Number of elements in the vector

scaleFactor

Scale factor, refer to Integer Scaling.

pSrcDstDescription
This function computes the exponential function of each element of the vector pSrc, and stores the result in
pDst.
The computation is performed as follows:

pDst[n] = epSrc[n]The in-place flavors of ippsExp compute the exponential function of each element of the vector pSrcDst andstore the result in pSrcDst.
The computation is performed as follows:

pSrcDst[n] = epSrcDst[n]When an overflow occurs, the function continues operation with the corresponding result value (see appendix
A "Handling of Special Cases" for more information).
When computing the exponent of an integer number, the output result can exceed the data range andbecome saturated. The scaling retains the output data range but results in precision loss in low-order bits.
The function ippsExp_32f64f computes the output result in a higher precision data range.

Application Notes
For the functions ippsExp and ippsLn the result is rounded to the nearest integer after scaling.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pSrc, pDst, or pSrcDst pointer is
NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to zero.

ExampleExp:
Exp_I:

Ln
Computes the natural logarithm of each element of avector.

SyntaxIppStatus ippsLn_32f(const Ipp32f* pSrc, Ipp32f* pDst, int len);

127

1

Intel® Integrated Performance Primitives Developer Guide and Reference

IppStatus ippsLn_64f(const Ipp64f* pSrc, Ipp64f* pDst, int len);
IppStatus ippsLn_16s_Sfs(const Ipp16s* pSrc, Ipp16s* pDst, int len, int scaleFactor);
IppStatus ippsLn_32s_Sfs(const Ipp32s* pSrc, Ipp32s* pDst, int len, int scaleFactor);
IppStatus ippsLn_16s_ISfs(Ipp16s* pSrcDst, int len, int scaleFactor);
IppStatus ippsLn_32s_ISfs(Ipp32s* pSrcDst, int len, int scaleFactor);
IppStatus ippsLn_32f_I(Ipp32f* pSrcDst, int len);
IppStatus ippsLn_64f_I(Ipp64f* pSrcDst, int len);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

len

Pointer to the source and destination vector for the in-place
operation.
Number of elements in the vector

scaleFactor

Scale factor, refer to Integer Scaling.

pSrcDstDescription
This function computes the natural logarithm of each element of the vector pSrc and stores the result in
pDst as given by

pDst[n] = loge (pSrc[n])The in-place flavors of ippsLn compute the natural logarithm of each element of the vector pSrcDst andstore the result in pSrcDst as given by

pSrcDst[n] = loge (pSrcDst[n])If the function ippsLn encounters a zero or negative value in the input, it returns a warning status andcontinues execution with the corresponding result value (see appendix A "Handling of Special Cases" formore information).

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pSrc, pDst, or pSrcDst pointer is
NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to zero.

ippStsLnZeroArg

Indicates a warning for zero-valued input vector elements.

ippStsLnNegArg

Indicates a warning for negative input vector elements.

128

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Example
Ln:
Ln_I:

SumLn
Sums natural logarithms of each element of a vector.

SyntaxIppStatus ippsSumLn_32f(const Ipp32f* pSrc, int len, Ipp32f* pSum);
IppStatus ippsSumLn_64f(const Ipp64f* pSrc, int len, Ipp64f* pSum);
IppStatus ippsSumLn_32f64f(const Ipp32f* pSrc, int len, Ipp64f* pSum);
IppStatus ippsSumLn_16s32f(const Ipp16s* pSrc, int len, Ipp32f* pSum);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc

Pointer to the source vector.

pSum

Pointer to the output result.

len

Number of elements in the vector.

Description
This function computes the sum of natural logarithms of each element of the vector pSrc and stores theresult value in pSum. The summation is given by:

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pSrc or pSum pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

ippStsLnZeroArg

Indicates a warning for zero-valued input vector elements.
Operation execution is not aborted. The value of thedestination vector element for floating-point operations is set
to -Inf.

129

1Intel® Integrated Performance Primitives Developer Guide and ReferenceippStsLnNegArg

Indicates a warning for negative input vector elements.
Operation execution is not aborted. The value of thedestination vector element for floating-point operations is set
to NaN.

ArctanComputes the inverse tangent of each element of avector.

SyntaxIppStatus ippsArctan_32f(const Ipp32f* pSrc, Ipp32f* pDst, int len);
IppStatus ippsArctan_64f(const Ipp64f* pSrc, Ipp64f* pDst, int len);
IppStatus ippsArctan_32f_I(Ipp32f* pSrcDst, int len);
IppStatus ippsArctan_64f_I(Ipp64f* pSrcDst, int len);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

pSrcDstlen

Pointer to the source and destination vector pSrcDst for the inplace operation.
Number of elements in the vector.

Description
This function computes the inverse tangent of each element of pSrc and stores the result in thecorresponding element of pDst.
The computation is performed as follows:

pDst [n] = arctan(pSrc [n]), 0 ≤ n < len.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pSrc, pDst, or pSrcDst pointer is
NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

Normalize
Normalizes elements of a real or complex vector using
offset and division operations.

130

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

SyntaxCase 1: Not-in-place operations on floating point and integer data
IppStatus ippsNormalize_32f(const Ipp32f* pSrc, Ipp32f* pDst, int len, Ipp32f vSub,
Ipp32f vDiv);
IppStatus ippsNormalize_64f(const Ipp64f* pSrc, Ipp64f* pDst, int len, Ipp64f vSub,
Ipp64f vDiv);
IppStatus ippsNormalize_32fc(const Ipp32fc* pSrc, Ipp32fc* pDst, int len, Ipp32fc vSub,
Ipp32f vDiv);
IppStatus ippsNormalize_64fc(const Ipp64fc* pSrc, Ipp64fc* pDst, int len, Ipp64fc vSub,
Ipp64f vDiv);
IppStatus ippsNormalize_16s_Sfs(const Ipp16s* pSrc, Ipp16s* pDst, int len, Ipp16s vSub,
int vDiv, int scaleFactor);
IppStatus ippsNormalize_16sc_Sfs(const Ipp16sc* pSrc, Ipp16sc* pDst, int len, Ipp16sc
vSub, int vDiv, int scaleFactor);

Case 2: In-place operations on floating point and integer data
IppStatus ippsNormalize_32f_I(Ipp32f* pSrcDst, int len, Ipp32f vSub, Ipp32f vDiv);
IppStatus ippsNormalize_64f_I(Ipp64f* pSrcDst, int len, Ipp64f vSub, Ipp64f vDiv);
IppStatus ippsNormalize_32fc_I(Ipp32fc* pSrcDst, int len, Ipp32fc vSub, Ipp32f vDiv);
IppStatus ippsNormalize_64fc_I(Ipp64fc* pSrcDst, int len, Ipp64fc vSub, Ipp64f vDiv);
IppStatus ippsNormalize_16s_ISfs(Ipp16s* pSrcDst, int len, Ipp16s vSub, int vDiv, int
scaleFactor);
IppStatus ippsNormalize_16sc_ISfs(Ipp16sc* pSrcDst, int len, Ipp16sc vSub, int vDiv,
int scaleFactor);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc

Pointer to the source vector.

vSub

Pointer to the source and destination vector for in-place
operations.
Subtrahend value.

vDiv

Denominator value.

pDst

Pointer to the vector which stores the normalized elements.

len

Number of elements in the vector

scaleFactor

Scale factor, refer to Integer Scaling.

pSrcDst131

1Intel® Integrated Performance Primitives Developer Guide and Reference

Description
This function subtracts vSub from elements of the input vector pSrc (pSrcDst for in-place operations),
divides the differences by vDiv, and stores the result in pDst (pSrcDst for in-place operations). The
computation is performed as follows:

pDst[n] = (pSrc[n] - vSub)/vDiv.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pSrc or pDst pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

ippStsDivByZeroErr

Indicates an error when vDiv is equal to 0 or less than theminimum floating-point positive number.

Conversion Functions
The functions described in this section perform the following conversion operations for vectors:
•
•
•
•
•
•

Sorting all elements of a vector
Data type conversion (including floating-point to integer and integer to floating-point)
Joining several vectors
Extracting components from a complex vector and constructing a complex vector
Computing the complex conjugates of vectors
Cartesian to polar and polar to Cartesian coordinate conversion.

This section also describes the Intel IPP functions that extract real and imaginary components from acomplex vector or construct a complex vector using its real and imaginary components. The functions
ippsReal and ippsImag return the real and imaginary parts of a complex vector in a separate vector,
respectively. The function ippsRealToCplx constructs a complex vector from real and imaginary
components stored in two respective vectors. The function ippsCplxToReal returns the real and imaginaryparts of a complex vector in two respective vectors. The function ippsMagnitude computes the magnitudeof a complex vector elements.

SortAscend, SortDescend
Sorts all elements of a vector.

SyntaxIppStatus ippsSortAscend_8u_I(Ipp8u* pSrcDst, int len);
IppStatus ippsSortAscend_16u_I(Ipp16u* pSrcDst, int len);
IppStatus ippsSortAscend_16s_I(Ipp16s* pSrcDst, int len);
IppStatus ippsSortAscend_32s_I(Ipp32s* pSrcDst, int len);
IppStatus ippsSortAscend_32f_I(Ipp32f* pSrcDst, int len);
IppStatus ippsSortAscend_64f_I(Ipp64f* pSrcDst, int len);
IppStatus ippsSortDescend_8u_I(Ipp8u* pSrcDst, int len);
IppStatus ippsSortDescend_16u_I(Ipp16u* pSrcDst, int len);
IppStatus ippsSortDescend_16s_I(Ipp16s* pSrcDst, int len);
IppStatus ippsSortDescend_32s_I(Ipp32s* pSrcDst, int len);
IppStatus ippsSortDescend_32f_I(Ipp32f* pSrcDst, int len);132

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

IppStatus ippsSortDescend_64f_I(Ipp64f* pSrcDst, int len);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrcDstPointer to the source and destination vector.

len

Number of elements in the vector

Description
These functions rearrange all elements of the source vector pSrcDst in the ascending or descending order,
respectively, and store the result in the destination vector pSrcDst.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pSrcDst is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to zero.

ExampleSortAscend:
SortDescend:

SortIndexAscend, SortIndexDescend
Rearranges elements of the vector and their indexes.

SyntaxIppStatus ippsSortIndexAscend_8u_I(Ipp8u* pSrcDst, int* pDstIdx, int len);
IppStatus ippsSortIndexAscend_16u_I(Ipp16u* pSrcDst, int* pDstIdx, int len);
IppStatus ippsSortIndexAscend_16s_I(Ipp16s* pSrcDst, int* pDstIdx, int len);
IppStatus ippsSortIndexAscend_32s_I(Ipp32s* pSrcDst, int* pDstIdx, int len);
IppStatus ippsSortIndexAscend_32f_I(Ipp32f* pSrcDst, int* pDstIdx, int len);
IppStatus ippsSortIndexAscend_64f_I(Ipp64f* pSrcDst, int* pDstIdx, int len);
IppStatus ippsSortIndexDescend_8u_I(Ipp8u* pSrcDst, int* pDstIdx, int len);
IppStatus ippsSortIndexDescend_16u_I(Ipp16u* pSrcDst, int* pDstIdx, int len);
IppStatus ippsSortIndexDescend_16s_I(Ipp16s* pSrcDst, int* pDstIdx, int len);
IppStatus ippsSortIndexDescend_32s_I(Ipp32s* pSrcDst, int* pDstIdx, int len);
IppStatus ippsSortIndexDescend_32f_I(Ipp32f* pSrcDst, int* pDstIdx, int len);

133

1

Intel® Integrated Performance Primitives Developer Guide and Reference

IppStatus ippsSortIndexDescend_64f_I(Ipp64f* pSrcDst, int* pDstIdx, int len);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrcDstPointer to the source and destination vector.

pDstIdx

Pointer to the destination vector containing indexes.

len

Number of elements in the vector

Description
These functions rearrange all elements of the source vector pSrcDst in the ascending or descending order,
respectively, and store the elements in the destination vector pSrcDst, and their indexes in the desalination
vector pDstIdx. If some elements are identical, their indexes are not ordered.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

SortRadixGetBufferSize
Computes the size of the buffer for the
SortRadixAscend and SortRadixDescend functions.

SyntaxIppStatus ippsSortRadixGetBufferSize(int len, IppDataType dataType, int* pBuffferSize);
IppStatus ippsSortRadixGetBufferSize_L(IppSizeL len, IppDataType dataType, IppSizeL*
pBufferSize);

Include Files
ipps.h
Flavors with the _L suffix: ipps_l.h

Domain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameterslen

Number of elements in the vector

dataType

Data type of the vector.

134

Developer Guide and Reference for Intel® Integrated Performance Primitives

pBufferSize

1

Pointer to the buffer size.

Description
This function calculates the size of the buffer for the ippsSortRadixAscend/ippsSortRadixDescendfunctions.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pBufSize is NULL.

ippStsSizeErr

Indicates an error when len is less than, or equal to 0.

ippStsDataTypeErr

Indicates an error when the dataType value is not supported.

See Also
SortRadixAscend SortRadixDescend Sorts all elements of a vector using radix sorting algorithm.
SortRadixAscend, SortRadixDescend
Sorts all elements of a vector using radix sorting
algorithm.

SyntaxIppStatus ippsSortRadixAscend_<mod>(Ipp<datatype>* pSrcDst, int len, Ipp8u* pBuffer);
Supported values for mod:

8u_I

32u_I

64u_I

16u_I

32s_I

64s_I

16s_I

32f_I

64f_I

IppStatus ippsSortRadixDescend_<mod>(Ipp<datatype>* pSrcDst, int len, Ipp8u* pBuffer);
Supported values for mod:

8u_I

32u_I

64u_I

16u_I

32s_I

64s_I

16s_I

32f_I

64f_I

Radix Sorting Algorithm for platform-aware functions
IppStatus ippsSortRadixAscend_<mod>(Ipp<datatype>* pSrcDst, IppSizeL len, Ipp8u*
pBuffer);
Supported values for mod:64u_I_L
32s_I_L

64s_I_L

32f_I_L

64f_I_L135

1Intel® Integrated Performance Primitives Developer Guide and Reference

IppStatus ippsSortRadixDescend_<mod>(Ipp<datatype>* pSrcDst, IppSizeL len, Ipp8u*
pBuffer);
Supported values for mod:64u_I_L
32s_I_L

64s_I_L

32f_I_L

64f_I_L

Include Files
ipps.h
Flavors with the _L suffix: ipps_l.h

Domain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrcDstPointer to the source and destination vector.

len

Number of elements in the vector

pBuffer

Pointer to the buffer for internal calculations. To compute therequired buffer size, use the SortRadixGetBufferSize function.

Description
These functions rearrange all elements of the source vector pSrcDst in the ascending or descending order,
respectively, using “radix sort” algorithm, and store the result in the destination vector pSrcDst.
Flavors with the _L suffix operate on larger data size.
These functions require the work buffer for internal calculations, to compute the size of the buffer, use the
SortRadixGetBufferSize or SortRadixGetBufferSize_L (for the flavors with the _L suffix) function.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrcDst or pBuffer is NULL.

ippStsSizeErr

Indicates an error when len is less than, or equal to 0.

See Also
SortRadixGetBufferSize Computes the size of the buffer for the SortRadixAscend and

SortRadixDescend functions.

SortRadixIndexGetBufferSize
Computes the size of the buffer for the
SortRadixIndexAscend and
SortRadixIndexDescend functions.

SyntaxIppStatus ippsSortRadixIndexGetBufferSize(int len, IppDataType dataType, int*
pBufSize);136

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

IppStatus ippsSortRadixIndexGetBufferSize_L(IppSizeL len, IppDataType dataType,
IppSizeL* pBufSize);

Include Files
ipps.h
Flavors with the _Lsuffix: ipps_l.h

Domain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameterslen

Number of elements in the vector

dataType

Data type pf the vector.

pBufSize

Pointer to the buffer size.

Description
This function calculates the size of the buffer for the ippsSortRadixIndexAscend/
ippsSortRadixIndexDescend functions.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pBufSize is NULL.

ippStsSizeErr

Indicates an error when len is less than, or equal to 0.

ippStsDataTypeErr

Indicates an error when the dataType value is not supported.

See Also
SortRadixIndexAscend SortRadixIndexDescend Indirectly sorts all elements of a vector using
radix sorting algorithm.
SortRadixIndexAscend, SortRadixIndexDescend
Indirectly sorts all elements of a vector using radix
sorting algorithm.

SyntaxIppStatus ippsSortRadixIndexAscend_8u(const Ipp8u* pSrc, Ipp32s srcStrideBytes, Ipp32s*
pDstIndx, int len, Ipp8u* pBuffer);
IppStatus ippsSortRadixIndexAscend_16u(const Ipp16u* pSrc, Ipp32s srcStrideBytes,
Ipp32s* pDstIndx, int len, Ipp8u* pBuffer);
IppStatus ippsSortRadixIndexAscend_16s(const Ipp16s* pSrc, Ipp32s srcStrideBytes,
Ipp32s* pDstIndx, int len, Ipp8u* pBuffer);
IppStatus ippsSortRadixIndexAscend_32s(const Ipp32s* pSrc, Ipp32s srcStrideBytes,
Ipp32s* pDstIndx, int len, Ipp8u* pBuffer);
IppStatus ippsSortRadixIndexAscend_32u(const Ipp32u* pSrc, Ipp32s srcStrideBytes,
Ipp32s* pDstIndx, int len, Ipp8u* pBuffer);

137

1

Intel® Integrated Performance Primitives Developer Guide and Reference

IppStatus ippsSortRadixIndexAscend_32f(const Ipp32f* pSrc, Ipp32s srcStrideBytes,
Ipp32s* pDstIndx, int len, Ipp8u* pBuffer);
IppStatus ippsSortRadixIndexAscend_64f(const Ipp64f* pSrc, Ipp32s srcStrideBytes,
Ipp32s* pDstIndx, int len, Ipp8u* pBuffer);
IppStatus ippsSortRadixIndexAscend_64s(const Ipp64s* pSrc, Ipp32s srcStrideBytes,
Ipp32s* pDstIndx, int len, Ipp8u* pBuffer);
IppStatus ippsSortRadixIndexAscend_64u(const Ipp64u* pSrc, Ipp32s srcStrideBytes,
Ipp32s* pDstIndx, int len, Ipp8u* pBuffer);
IppStatus ippsSortRadixIndexDescend_8u(const Ipp8u* pSrc, Ipp32s srcStrideBytes,
Ipp32s* pDstIndx, int len, Ipp8u* pBuffer);
IppStatus ippsSortRadixIndexDescend_16u(const Ipp16u* pSrc, Ipp32s srcStrideBytes,
Ipp32s* pDstIndx, int len, Ipp8u* pBuffer);
IppStatus ippsSortRadixIndexDescend_16s(const Ipp16s* pSrc, Ipp32s srcStrideBytes,
Ipp32s* pDstIndx, int len, Ipp8u* pBuffer);
IppStatus ippsSortRadixIndexDescend_32s(const Ipp32s* pSrc, Ipp32s srcStrideBytes,
Ipp32s* pDstIndx, int len, Ipp8u* pBuffer);
IppStatus ippsSortRadixIndexDescend_32u(const Ipp32u* pSrc, Ipp32s srcStrideBytes,
Ipp32s* pDstIndx, int len, Ipp8u* pBuffer);
IppStatus ippsSortRadixIndexDescend_32f(const Ipp32f* pSrc, Ipp32s srcStrideBytes,
Ipp32s* pDstIndx, int len, Ipp8u* pBuffer);
IppStatus ippsSortRadixIndexDescend_64f(const Ipp64f* pSrc, Ipp32s srcStrideBytes,
Ipp32s* pDstIndx, int len, Ipp8u* pBuffer);
IppStatus ippsSortRadixIndexDescend_64s(const Ipp64s* pSrc, Ipp32s srcStrideBytes,
Ipp32s* pDstIndx, int len, Ipp8u* pBuffer);
IppStatus ippsSortRadixIndexDescend_64u(const Ipp64u* pSrc, Ipp32s srcStrideBytes,
Ipp32s* pDstIndx, int len, Ipp8u* pBuffer);

Radix Sorting Algorithm for platform-aware functions
IppStatus ippsSortRadixIndexAscend_64s_L(const Ipp64s* pSrc, IppSizeL srcStrideBytes,
IppSizeL* pDstIndx, IppSizeL len, Ipp8u* pBuffer);
IppStatus ippsSortRadixIndexAscend_64u_L(const Ipp64u* pSrc, IppSizeL srcStrideBytes,
IppSizeL* pDstIndx, IppSizeL len, Ipp8u* pBuffer);
IppStatus ippsSortRadixIndexDescend_64s_L(const Ipp64s* pSrc, IppSizeL srcStrideBytes,
IppSizeL* pDstIndx, IppSizeL len, Ipp8u* pBuffer);
IppStatus ippsSortRadixIndexDescend_64u_L(const Ipp64u* pSrc, IppSizeL srcStrideBytes,
IppSizeL* pDstIndx, IppSizeL len, Ipp8u* pBuffer);

Include Files
ipps.h
Flavors with the _L suffix: ipps_l.h

Domain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

138Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Parameters
pSrc

Pointer the source sparse keys vector.

pDstIndx

Distance in bytes between two consecutive elements of thesource vector.
Pointer to the destination vector of indexes.

len

Number of elements in the vectors.

srcStrideBytes

pBuffer

Pointer to the work buffer for internal calculations. To computethe size of the buffer, use the SortRadixIndexGetBufferSize
function.

Description
These functions indirectly sort all elements of the source sparse keys vector pSrc in the ascending ordescending order, respectively, using "radix sort" algorithm and store the indexes of resulting arrangement
order in the destination vector pDstIndx. Elements of the source vector are not rearranged.
These functions require the work buffer for internal calculations, to compute the size of the required buffer,
use the SortRadixIndexGetBufferSize function. Intervals between the elements of the source sparse vector
pSrc in memory must be equal to the value of srcStrideBytes, minimum value of which is equal to thesize of the data type of the key value. The sorting algorithm does not change the relative order of theelements with equal keys.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pSrc or pBuffer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to zero, or
srcStrideBytes is less than sizeof(key type).

See Also
SortRadixIndexGetBufferSize Computes the size of the buffer for the SortRadixIndexAscend and

SortRadixIndexDescend functions.

TopKGetBufferSize
Computes the size of the buffer for the TopK function.

SyntaxIppStatus ippsTopKGetBufferSize(Ipp64s srcLen, Ipp64s dstLen, IppDataType dataType,
IppTopKMode hint, Ipp64s* bufSize);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
srcLenNumber of elements in the source vector.

139

1

Intel® Integrated Performance Primitives Developer Guide and Reference

dstLenNumber of K values to be returned, the function returns min(K,dstLen) elements.

dataType

Data type of the vector.

hint

bufSize

Parameter to choose the optimization that is most suitable forthe srcLen+dstlen(K) combination, supported values:
ippTopKAuto/ ippTopKDirect/ ippTopKRadix.
Size of the required work buffer.

Description
This function computes the size of the work buffer required for the ippsTopK function.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when bufSize is NULL.

ippStsSizeErr
ippStsBadArgErr

Indicates an error when at least one of the srcLen or dstLenvalues is less than, or equal to zero.
Indicates an error when the hint value is not supported.

See Also
TopK Returns maximum K values of an array.

TopKInit
Initializes pDstValue and pDstIndex arrays for theippsTopK function.

SyntaxIppStatus ippsTopKInit_32s(Ipp32s* pDstValue, Ipp64s* pDstIndex, Ipp64s dstLen);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pDstValue
pDstIndex
dstLenPointer to an array with maximum values found by the TopK
function.
Pointer to an array with indexes of maximum values found by
the TopK function.
Number of K values to be returned, the function returns min(K,dstLen) elements.

Description
This function initializes the pDstValue array with minimal values and pDstIndex with -1 value.

140

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when at least one of the pointers is NULL.

ippStsSizeErr

Indicates an error when at least one of the dstLen values isless than, or equal to zero.

See Also
TopK Returns maximum K values of an array.

TopK
Returns maximum K values of an array.

SyntaxIppStatus ippsTopK_32f(const Ipp32f* pSrc, Ipp64s srcIndex, Ipp64s srcStride, Ipp64s
srcLen, Ipp32f* pDstValue, Ipp64s* pDstIndex, Ipp64s dstLen, IppTopKMode hint, Ipp8u*
pBuffer);
IppStatus ippsTopK_32s(const Ipp32s* pSrc, Ipp64s srcIndex, Ipp64s srcStride, Ipp64s
srcLen, Ipp32s* pDstValue, Ipp64s* pDstIndex, Ipp64s dstLen, IppTopKMode hint, Ipp8u*
pBuffer);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc

Pointer to the source vector.

srcIndex

Index of the pSrc[0] element, index of pSrc[n] is equal tosrcIndex+n.

srcStride

The stride between elements in a source array. The unit ofsrcStride is Byte.

srcLenNumber of elements in the source vector.

pDstValue

Maximum values found by the function.

dstIndex

Indexes of maximum values.

dstLenNumber of K values to be returned, the function returns min(K,dstLen) elements.

hint

pBufferParameter to choose the optimization that is most suitable forthe srcLen+dstlen(K) combination, supported values:
ippTopKAuto/ ippTopKDirect/ ippTopKRadix.
Pointer to the work buffer.

141

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Description
This function searches for dstLen maximum values and their indexes in an input vector. The function isdesigned to process large input vectors by small blocks, it takes into account results of previous blocks
processing getting maximum values of pSrc and pDstValue and then combining the final results into
pDstValue.
The srcIndex parameter stores the index of the first element pSrc[0] of each new block, thus supportingthe continuous numbering of elements. Before calling the ippsTopK function, compute the required buffer
size and initialize pDstValue and pDstIndex using the ippsTopKGetBufferSize and ippsTopKInit_32sfunctions, respectively.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when at least one of the pointers is NULL.

ippStsSizeErr
ippStsBadArgErr

Indicates an error when at least one of the srcLen or dstLenvalues is less than, or equal to zero.
Indicates an error when the hint value is not supported.

Example/******************************************************************************** Copyright (C) 2023 Intel Corporation.
** This software and the related documents are Intel copyrighted materials, and your use of themis governed by* the express license under which they were provided to you ('License'). Unless the Licenseprovides 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.
********************************************************************************/#include <stdio.h>#include "ipp.h"/* 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)Integrated Primitives (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 */int main(){
Ipp32f src[10] = { 2.5, 1.0, 3.2, 4.7, 0.8, 5.6, 6.1, 3.9, 2.3, 4.0 };Ipp32f dst[5];Ipp64s idx[5];IppStatus status;
int i;

142

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

printf("\nSource vector\n");for (i = 0; i < 10; i++) printf("%f ", src[i]);Ipp64s buf_size;
ippsTopKGetBufferSize(10, 5, ipp32f, ippTopKAuto, &buf_size);
Ipp8u buf[buf_size];
ippsTopKInit_32f(dst, idx, 5);check_sts(status = ippsTopK_32f(src, 0, 4, 10, dst, idx, 5, ippTopKAuto, buf));printf("\nTop k values:\n");for (i = 0; i < 5; i++) printf("%f ", dst[i]);EXIT_MAIN
printf("\nExit status %d (%s)\n", (int)status, ippGetStatusString(status));
return (int)status;}

See Also
TopKGetBufferSize Computes the size of the buffer for the TopK function.
TopKInit Initializes pDstValue and pDstIndex arrays for the ippsTopK function.

SwapBytes
Reverses the byte order of a vector.

SyntaxIppStatus ippsSwapBytes_16u(const Ipp16u* pSrc, Ipp16u* pDst, int len);
IppStatus ippsSwapBytes_24u(const Ipp8u* pSrc, Ipp8u* pDst, int len);
IppStatus ippsSwapBytes_32u(const Ipp32u* pSrc, Ipp32u* pDst, int len);
IppStatus ippsSwapBytes_64u(const Ipp64u* pSrc, Ipp64u* pDst, int len);
IppStatus ippsSwapBytes_16u_I(Ipp16u* pSrcDst, int len);
IppStatus ippsSwapBytes_24u_I(Ipp8u* pSrcDst, int len);
IppStatus ippsSwapBytes_32u_I(Ipp32u* pSrcDst, int len);
IppStatus ippsSwapBytes_64u_I(Ipp64u* pSrcDst, int len);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

143

1

Intel® Integrated Performance Primitives Developer Guide and ReferencepSrcDstlen

Pointer to the source and destination vector for the in-place
operation.
Number of elements in the vector.

Description
This function reverses the endian order (byte order) of the source vector pSrc (pSrcDst for the in-place
operation) and stores the result in pDst (pSrcDst). When the low-order byte is stored in memory at thelowest address, and the high-order byte at the highest address, the little-endian order is implemented.When
the high-order byte is stored in memory at the lowest address, and the low-order byte at the highest
address, the big-endian order is implemented. The function ippsSwapBytes allows to switch from one orderto the other in either direction.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when any of the specified pointers is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to zero.

ExampleConvertConverts the data type of a vector and stores theresults in a second vector.

SyntaxIppStatus ippsConvert_8s16s(const Ipp8s* pSrc,Ipp16s* pDst, int len);
IppStatus ippsConvert_8s32f(const Ipp8s* pSrc, Ipp32f* pDst, int len);
IppStatus ippsConvert_8u32f(const Ipp8u* pSrc, Ipp32f* pDst, int len);
IppStatus ippsConvert_8u8s_Sfs(const Ipp8u* pSrc, Ipp8s* pDst, int len, IppRoundMode
rndMode, int scaleFactor);
IppStatus ippsConvert_8s8u(const Ipp8s* pSrc, Ipp8u* pDst, int len);
IppStatus ippsConvert_16s8s_Sfs(const Ipp16s* pSrc, Ipp8s* pDst, Ipp32u len,
IppRoundMode rndMode, int scaleFactor);
IppStatus ippsConvert_16s32s(const Ipp16s* pSrc, Ipp32s* pDst, int len);
IppStatus ippsConvert_16s32f(const Ipp16s* pSrc, Ipp32f* pDst, int len);
IppStatus ippsConvert_16u32f(const Ipp16u* pSrc, Ipp32f* pDst, int len);
IppStatus ippsConvert_32s16s(const Ipp32s* pSrc, Ipp16s* pDst, int len);
IppStatus ippsConvert_32s32f(const Ipp32s* pSrc, Ipp32f* pDst, int len);
IppStatus ippsConvert_32s64f(const Ipp32s* pSrc, Ipp64f* pDst, int len);
IppStatus ippsConvert_32f64f(const Ipp32f* pSrc, Ipp64f* pDst, int len);
IppStatus ippsConvert_64s64f(const Ipp64s* pSrc, Ipp64f* pDst, Ipp32u len);
IppStatus ippsConvert_64f32f(const Ipp64f* pSrc, Ipp32f* pDst, int len);
IppStatus ippsConvert_16s32f_Sfs(const Ipp16s* pSrc, Ipp32f* pDst, int len, int
scaleFactor);144

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

IppStatus ippsConvert_16s64f_Sfs(const Ipp16s* pSrc, Ipp64f* pDst, int len, int
scaleFactor);
IppStatus ippsConvert_32s16s_Sfs(const Ipp32s* pSrc, Ipp16s* pDst, int len, int
scaleFactor);
IppStatus ippsConvert_32s32f_Sfs(const Ipp32s* pSrc, Ipp32f* pDst, int len, int
scaleFactor);
IppStatus ippsConvert_32s64f_Sfs(const Ipp32s* pSrc, Ipp64f* pDst, int len, int
scaleFactor);
IppStatus ippsConvert_32f8s_Sfs(const Ipp32f* pSrc, Ipp8s* pDst, int len, IppRoundMode
rndMode, int scaleFactor);
IppStatus ippsConvert_32f8u_Sfs(const Ipp32f* pSrc, Ipp8u* pDst, int len, IppRoundMode
rndMode, int scaleFactor);
IppStatus ippsConvert_32f16s_Sfs(const Ipp32f* pSrc, Ipp16s* pDst, int len,
IppRoundMode rndMode, int scaleFactor);
IppStatus ippsConvert_32f16u_Sfs(const Ipp32f* pSrc, Ipp16u* pDst, int len,
IppRoundMode rndMode, int scaleFactor);
IppStatus ippsConvert_32f32s_Sfs(const Ipp32f* pSrc, Ipp32s* pDst, int len,
IppRoundMode rndMode, int scaleFactor);
IppStatus ippsConvert_64f8s_Sfs(const Ipp64f* pSrc, Ipp8s* pDst, int len, IppRoundMode
rndMode, int scaleFactor);
IppStatus ippsConvert_64f8u_Sfs(const Ipp64f* pSrc, Ipp8u* pDst, int len, IppRoundMode
rndMode, int scaleFactor);
IppStatus ippsConvert_64f16u_Sfs(const Ipp64f* pSrc, Ipp16u* pDst, int len,
IppRoundMode rndMode, int scaleFactor);
IppStatus ippsConvert_64s32s_Sfs(const Ipp64s* pSrc, Ipp32s* pDst, int len,
IppRoundMode rndMode, int scaleFactor);
IppStatus ippsConvert_64f16s_Sfs(const Ipp64f* pSrc, Ipp16s* pDst, int len,
IppRoundMode rndMode, int scaleFactor);
IppStatus ippsConvert_64f32s_Sfs(const Ipp64f* pSrc, Ipp32s* pDst, int len,
IppRoundMode rndMode, int scaleFactor);
IppStatus ippsConvert_64f64s_Sfs(const Ipp64f* pSrc, Ipp64s* pDst, Ipp32u len,
IppRoundMode rndMode, int scaleFactor);
IppStatus ippsConvert_24u32u(const Ipp8u* pSrc, Ipp32u* pDst, int len);
IppStatus ippsConvert_24u32f(const Ipp8u* pSrc, Ipp32f* pDst, int len);
IppStatus ippsConvert_32u24u_Sfs(const Ipp32u* pSrc, Ipp8u* pDst, int len, int
scaleFactor);
IppStatus ippsConvert_32f24u_Sfs(const Ipp32f* pSrc, Ipp8u* pDst, int len, int
scaleFactor);
IppStatus ippsConvert_24s32s(const Ipp8u* pSrc, Ipp32s* pDst, int len);
IppStatus ippsConvert_24s32f(const Ipp8u* pSrc, Ipp32f* pDst, int len);
IppStatus ippsConvert_32s24s_Sfs(const Ipp32s* pSrc, Ipp8u* pDst, int len, int
scaleFactor);

145

1

Intel® Integrated Performance Primitives Developer Guide and Reference

IppStatus ippsConvert_32f24s_Sfs(const Ipp32f* pSrc, Ipp8u* pDst, int len, int
scaleFactor);
IppStatus ippsConvert_16s16f(const Ipp16s* pSrc, Ipp16f* pDst, int len, IppRoundMode
rndMode);IppStatus ippsConvert_32f16f(const Ipp32f* pSrc, Ipp16f* pDst, int len, IppRoundMode
rndMode);IppStatus ippsConvert_16f16s_Sfs(const Ipp16f* pSrc, Ipp16s* pDst, int len,
IppRoundMode rndMode, int scaleFactor);
IppStatus ippsConvert_16f32f(const Ipp16f* pSrc, Ipp32f* pDst, int len);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

rndModeRounding mode, the following values are possible:

ippRndZero floating-point values are truncated to zero
ippRndNear floating-point values are rounded to the nearest eveninteger when the fractional part equals 0.5; otherwise they arerounded to the nearest integer

ippRndFinancial floating-point values are rounded down to thenearest integer when the fractional part is less than 0.5, or rounded
up to the nearest integer if the fractional part is equal or greater than
0.5.

len

Number of elements in the vector.

scaleFactor

Scale factor, refer to Integer Scaling.

Description
This function converts the type of data contained in the vector pSrc and stores the results in pDst.
Functions with the Sfs suffix perform scaling of the result value in accordance with the scaleFactor value.
The converted result is saturated if it exceeds the output data range.
Functions that operate with 16f data do not support the ippRndFinancial rounding mode.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pDst or pSrc pointer is NULL.

146

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

ippStsRoundModeNotSupportedErr Indicates an error when the specified rounding mode is notsupported.

ExampleSee Also
Integer Scaling
Conj
Stores the complex conjugate values of a vector in asecond vector or in-place.

SyntaxIppStatus ippsConj_16sc(const Ipp16sc* pSrc, Ipp16sc* pDst, int len);
IppStatus ippsConj_32fc(const Ipp32fc* pSrc, Ipp32fc* pDst, int len);
IppStatus ippsConj_64fc(const Ipp64fc* pSrc, Ipp64fc* pDst, int len);
IppStatus ippsConj_16sc_I(Ipp16sc* pSrcDst, int len);
IppStatus ippsConj_32fc_I(Ipp32fc* pSrcDst, int len);
IppStatus ippsConj_64fc_I(Ipp64fc* pSrcDst, int len);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

pSrcDstlen

Pointer to the source and destination vector for the in-place
operation.
Number of elements in the vector.

Description
This function stores in pDst the element-wise conjugation of the complex vector pSrc. The element-wise
conjugation of the vector is defined as follows:

pDst[n].re = pSrc[n].re
pDst[n].im = - pSrc[n].im
The in-place flavors of ippsConj store in pSrcDst the element-wise conjugation of the complex vector

pSrcDst.
The element-wise conjugation of the vector is defined as follows:

pSrcDst[n].re = pSrcDst[n].re

147

1

Intel® Integrated Performance Primitives Developer Guide and ReferencepSrcDst[n].im = - pSrcDst[n].im

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

Indicates no error.
Indicates an error when the pSrc, pDst, or pSrcDst pointer is

NULL.

Indicates an error when len is less than or equal to 0.

ConjFlip
Computes the complex conjugate of a vector andstores the result in reverse order.

SyntaxIppStatus ippsConjFlip_16sc(const Ipp16sc* pSrc, Ipp16sc* pDst, int len);
IppStatus ippsConjFlip_32fc(const Ipp32fc* pSrc, Ipp32fc* pDst, int len);
IppStatus ippsConjFlip_64fc(const Ipp64fc* pSrc, Ipp64fc* pDst, int len);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

len

Number of elements in the vector.

Description
This function computes the conjugate of the vector pSrc and stores the result, in reverse order, in pDst. The
complex conjugate, stored in reverse order, is defined as follows:

pDst[n] = conj(pSrc[len - n - 1]).
Note that if pSrc and pDst overlap in memory, the function returns unpredictable results.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pSrc or pDst pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

Magnitude
Computes the magnitudes of the elements of acomplex vector.

148

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

SyntaxIppStatus ippsMagnitude_32f(const Ipp32f* pSrcRe, const Ipp32f* pSrcIm, Ipp32f* pDst,
int len);IppStatus ippsMagnitude_64f(const Ipp64f* pSrcRe, const Ipp64f* pSrcIm, Ipp64f* pDst,
int len);IppStatus ippsMagnitude_32fc(const Ipp32fc* pSrc, Ipp32f* pDst, int len);
IppStatus ippsMagnitude_64fc(const Ipp64fc* pSrc, Ipp64f* pDst, int len);
IppStatus ippsMagnitude_16s32f(const Ipp16s* pSrcRe, const Ipp16s* pSrcIm, Ipp32f*
pDst, int len);
IppStatus ippsMagnitude_16sc32f(const Ipp16sc* pSrc, Ipp32f* pDst, int len);
IppStatus ippsMagnitude_16s_Sfs(const Ipp16s* pSrcRe, const Ipp16s* pSrcIm, Ipp16s*
pDst, int len, int scaleFactor);
IppStatus ippsMagnitude_16sc_Sfs(const Ipp16sc* pSrc, Ipp16s* pDst, int len, int
scaleFactor);
IppStatus ippsMagnitude_32sc_Sfs(const Ipp32sc* pSrc, Ipp32s* pDst, int len, int
scaleFactor);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc

Pointer to the source vector.

pSrcRePointer to the vector with the real parts of complex elements.

pDst

Pointer to the vector with the imaginary parts of complex
elements.
Pointer to the destination vector.

len

Number of elements in the vector

scaleFactor

Scale factor, refer to Integer Scaling.

pSrcImDescription
The complex flavor of this function computes the element-wise magnitude of the complex vector pSrc andstores the result in pDst. The element-wise magnitude is defined by the formula:magn[n] = (pSrc[n].re2 + pSrc[n].im2)1/2
The real flavor of the function ippsMagnitude computes the element-wise magnitude of the complex vector
whose real and imaginary components are specified in the vectors pSrcRe and pSrcIm, respectively, andstores the result in pDst. The element-wise magnitude is defined by the formula:magn[n] = (pSrcRe[n]2 + pSrcIm[n]2)1/2

149

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when any of the specified pointers is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

ExamplePhase
Computes the phase angles of elements of a complex
vector.

SyntaxIppStatus ippsPhase_64fc(const Ipp64fc* pSrc, Ipp64f* pDst, int len);
IppStatus ippsPhase_32fc(const Ipp32fc* pSrc, Ipp32f* pDst, int len);
IppStatus ippsPhase_16sc32f(const Ipp16sc* pSrc, Ipp32f* pDst, int len);
IppStatus ippsPhase_64f(const Ipp64f* pSrcRe, const Ipp64f* pSrcIm, Ipp64f* pDst, int
len);
IppStatus ippsPhase_32f(const Ipp32f* pSrcRe, const Ipp32f* pSrcIm, Ipp32f* pDst, int
len);
IppStatus ippsPhase_16s32f(const Ipp16s* pSrcRe, const Ipp16s* pSrcIm, Ipp32f* pDst,
int len);IppStatus ippsPhase_16sc_Sfs(const Ipp16sc* pSrc, Ipp16s* pDst, int len, int
scaleFactor);
IppStatus ippsPhase_16s_Sfs(const Ipp16s* pSrcRe, const Ipp16s* pSrcIm, Ipp16s* pDst,
int len, int scaleFactor);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc

Pointer to the source vector.

pSrcRePointer to the source vector which stores the real components.

len

Pointer to the source vector which stores the imaginary
components.
Pointer to the vector which stores the phase (angle)
components of the elements in radians. Phase values are in therange (-π, π].
Number of elements in the vector

scaleFactor

Scale factor, refer to Integer Scaling .

pSrcImpDst

150

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Description
This function returns the phase angles of elements of the complex input vector pSrc, or the complex input
vector whose real and imaginary components are specified in the vectors pSrcRe and pSrcIm, respectively,
and stores the result in the vector pDst. Phase values are returned in radians and are in the range (-π, π] .

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 len is less than or equal to zero.

ExamplePowerSpectr
Computes the power spectrum of a complex vector.

SyntaxIppStatus ippsPowerSpectr_64fc(const Ipp64fc* pSrc, Ipp64f* pDst, int len);
IppStatus ippsPowerSpectr_32fc(const Ipp32fc* pSrc, Ipp32f* pDst, int len);
IppStatus ippsPowerSpectr_16sc_Sfs(const Ipp16sc* pSrc, Ipp16s* pDst, int len, int
scaleFactor);
IppStatus ippsPowerSpectr_64f(const Ipp64f* pSrcRe, const Ipp64f* pSrcIm, Ipp64f* pDst,
int len);IppStatus ippsPowerSpectr_32f(const Ipp32f* pSrcRe, const Ipp32f* pSrcIm, Ipp32f* pDst,
int len);IppStatus ippsPowerSpectr_16s_Sfs(const Ipp16s* pSrcRe, const Ipp16s* pSrcIm, Ipp16s*
pDst, int len, int scaleFactor);
IppStatus ippsPowerSpectr_16s32f(const Ipp16s* pSrcRe, const Ipp16s* pSrcIm, Ipp32f*
pDst, int len);
IppStatus ippsPowerSpectr_16sc32f(const Ipp16sc* pSrc, Ipp32f* pDst, int len);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc

Pointer to the source vector.

pSrcRePointer to the source vector which stores the real components.

pSrcImPointer to the source vector which stores the imaginary
components.

151

1

Intel® Integrated Performance Primitives Developer Guide and Reference

lenPointer to the vector which stores the spectrum components ofthe elements.
Number of elements in the vector

scaleFactor

Scale factor, refer to Integer Scaling.

pDst

Description
This function returns the power spectrum of the complex input vector pSrc, or the complex input vector
whose real and imaginary components are specified in the vectors pSrcRe and pSrcIm, respectively, andstores the results in the vector pDst. The power spectrum elements are squares of the magnitudes of thecomplex input vector elements:

pDst[n] = ( pSrc[n].re)2 + (pSrc[n].im)2 , or pDst[n] = ( pSrcRe[n])2 + (pSrcIm[n])2 .
To compute magnitudes, use the function ippsMagnitude.

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 len is less than or equal to 0.

Real
Returns the real part of a complex vector in a second
vector.

SyntaxIppStatus ippsReal_16sc(const Ipp16sc* pSrc, Ipp16s* pDstRe, int len);
IppStatus ippsReal_32fc(const Ipp32fc* pSrc, Ipp32f* pDstRe, int len);
IppStatus ippsReal_64fc(const Ipp64fc* pSrc, Ipp64f* pDstRe, int len);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc

Pointer to the complex source vector.

pDstRePointer to the destination vector with real parts.

len

Number of elements in the vector.

Description
This function returns the real part of the complex vector pSrc in the vector pDstRe.

152

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pDstRe or pSrc pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to zero.

ExampleImag
Returns the imaginary part of a complex vector in asecond vector.

SyntaxIppStatus ippsImag_16sc(const Ipp16sc* pSrc, Ipp16s* pDstIm, int len);
IppStatus ippsImag_32fc(const Ipp32fc* pSrc, Ipp32f* pDstIm, int len);
IppStatus ippsImag_64fc(const Ipp64fc* pSrc, Ipp64f* pDstIm, int len);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc

Pointer to the complex source vector.

pDstImPointer to the destination vector with imaginary parts.

len

Number of elements in the vector.

Description
This function returns the imaginary part of a complex vector pSrc in the vector pDstIm.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pDstIm or pSrc pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to zero.

ExampleRealToCplx
Returns a complex vector constructed from the realand imaginary parts of two real vectors.

153

1

Intel® Integrated Performance Primitives Developer Guide and Reference

SyntaxIppStatus ippsRealToCplx_16s(const Ipp16s* pSrcRe, const Ipp16s* pSrcIm, Ipp16sc* pDst,
int len);IppStatus ippsRealToCplx_32f(const Ipp32f* pSrcRe, const Ipp32f* pSrcIm, Ipp32fc* pDst,
int len);IppStatus ippsRealToCplx_64f(const Ipp64f* pSrcRe, const Ipp64f* pSrcIm, Ipp64fc* pDst,
int len);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrcRePointer to the vector with real parts of complex elements.

pSrcImPointer to the vector with imaginary parts of complex elements.

pDst

Pointer to the destination vector.

len

Number of elements in the vector.

Description
This function returns a complex vector pDst constructed from the real and imaginary parts of the input
vectors pSrcRe and pSrcIm.
If pSrcRe is NULL, the real component of the vector is set to zero.
If pSrcIm is NULL, the imaginary component of the vector is set to zero.
Note that the pointers cannot be both NULL.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pDst pointer is NULLNULL. The
pointer pSrcRe or pSrcIm can be NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to zero.

ExampleCplxToReal
Returns the real and imaginary parts of a complex
vector in two respective vectors.

SyntaxIppStatus ippsCplxToReal_16sc(const Ipp16sc* pSrc, Ipp16s* pDstRe, Ipp16s* pDstIm, int
len);

154

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

IppStatus ippsCplxToReal_32fc(const Ipp32fc* pSrc, Ipp32f* pDstRe, Ipp32f* pDstIm, int
len);
IppStatus ippsCplxToReal_64fc(const Ipp64fc* pSrc, Ipp64f* pDstRe, Ipp64f* pDstIm, int
len);Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc

Pointer to the complex vector pSrc.

pDstRePointer to the output vector with real parts.

pDstImPointer to the output vector with imaginary parts.

len

Number of elements in the vector.

Description
This function returns the real and imaginary parts of a complex vector pSrc in two vectors pDstRe andpDstIm.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the data vector pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

Threshold
Performs the threshold operation on the elements of avector by limiting the element values by specified
value.

SyntaxIppStatus ippsThreshold_16s(const Ipp16s* pSrc, Ipp16s* pDst, int len, Ipp16s level,
IppCmpOp relOp);
IppStatus ippsThreshold_32f(const Ipp32f* pSrc, Ipp32f* pDst, int len, Ipp32f level,
IppCmpOp relOp);
IppStatus ippsThreshold_64f(const Ipp64f* pSrc, Ipp64f* pDst, int len, Ipp64f level,
IppCmpOp relOp);
IppStatus ippsThreshold_32fc(const Ipp32fc* pSrc, Ipp32fc* pDst, int len, Ipp32f level,
IppCmpOp relOp);
IppStatus ippsThreshold_64fc(const Ipp64fc* pSrc, Ipp64fc* pDst, int len, Ipp64f level,
IppCmpOp relOp);
IppStatus ippsThreshold_16sc(const Ipp16sc* pSrc, Ipp16sc* pDst, int len, Ipp16s level,
IppCmpOp relOp);
155

1Intel® Integrated Performance Primitives Developer Guide and Reference

IppStatus ippsThreshold_16s_I(Ipp16s* pSrcDst, int len, Ipp16s level,IppCmpOp relOp);
IppStatus ippsThreshold_32f_I(Ipp32f* pSrcDst, int len, Ipp32f level, IppCmpOp relOp);
IppStatus ippsThreshold_64f_I(Ipp64f* pSrcDst, int len, Ipp64f level, IppCmpOp relOp);
IppStatus ippsThreshold_32fc_I(Ipp32fc* pSrcDst, int len, Ipp32f level, IppCmpOp
relOp);
IppStatus ippsThreshold_64fc_I(Ipp64fc* pSrcDst, int len, Ipp64f level, IppCmpOp
relOp);
IppStatus ippsThreshold_16sc_I(Ipp16sc* pSrcDst, int len, Ipp16s level, IppCmpOp
relOp);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

pSrcDst
len
level

relOp

Pointer to the source and destination vector for the in-place
operation.
Number of elements in the vector.
Value used to limit each element of pSrc or pSrcDst.This
parameter must always be real. For complex versions, it must
be positive and represent magnitude.
Values of this argument specify which relational operator to use
and whether level is an upper or lower bound for the input.
The relOp must have one of the following values:
ippCmpLess Specifies the “less than” operator and level is alower bound.
ippCmpGreater Specifies the “greater than” operator and levelis an upper bound.

Description
This function performs the threshold operation on the vector pSrc by limiting each element by the thresholdvalue level. Function operation is similar to that of the functions ippsThreshold_LT, ippsThreshold_GT
but its interface contains the relOp parameter that specifies the type of the comparison operation to
perform.
The in-place flavors of ippsThreshold perform the threshold operation on the vector pSrcDst by limiting
each element by the threshold value level.
The relOp argument specifies which relational operator to use: when its value is ippCmpGreater - “greaterthan”, when ippCmpLess - “less than”, and determines whether level is an upper or lower bound for the
input, respectively.
The formula for ippsThreshold called with the relOp = ippCmpLess is:156

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

The formula for ippsThreshold called with the relOp = ippCmpGreater is:

For complex versions of the function ippsThreshold, the level argument is always real. The formula forcomplex ippsThreshold called with the relOp = ippCmpLess is:

The formula for complex ippsThreshold called with the relOp = ippCmpGreater is:

Application Notes
For all complex versions, level must be positive and represents a magnitude. The magnitude of the input islimited, but the phase remains unchanged. Zero-valued input is assumed to have zero phase.
A special rule is applied to the integer complex versions of the function ippsThreshold. In general, theresulting point coordinates at the complex plane are not integer. The function rounds them off to integer insuch a way that the threshold operation is not performed. Thus, for the “less than” operation (with theippCmpLess flag) the coordinates are rounded to the infinity (+Inf for positive coordinates, and -Inf fornegative), and for the “greater than” operation (with the ippCmpGreater flag) the coordinates are rounded
to zero.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pSrc, pDst, or pSrcDst pointer is
NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

ippStsBadArgErr

Indicates an error when relOp has an invalid value.

157

1

Intel® Integrated Performance Primitives Developer Guide and ReferenceippStsThreshNegLevelErr

Indicates an error when level for the complex version isnegative (see appendix A "Handling of Special Cases" for more
information).

ExampleThreshold_LT, Threshold_GT
Performs the threshold operation on the elements of avector by limiting the element values by the specified
value.

SyntaxIppStatus ippsThreshold_LT_16s(const Ipp16s* pSrc, Ipp16s* pDst, int len, Ipp16s
level);
IppStatus ippsThreshold_LT_32s(const Ipp32s* pSrc, Ipp32s* pDst, int len, Ipp32s
level);
IppStatus ippsThreshold_LT_32f(const Ipp32f* pSrc, Ipp32f* pDst, int len, Ipp32f
level);
IppStatus ippsThreshold_LT_64f(const Ipp64f* pSrc, Ipp64f* pDst, int len, Ipp64f
level);
IppStatus ippsThreshold_LT_32fc(const Ipp32fc* pSrc, Ipp32fc* pDst, int len, Ipp32f
level);
IppStatus ippsThreshold_LT_64fc(const Ipp64fc* pSrc, Ipp64fc* pDst, int len, Ipp64f
level);
IppStatus ippsThreshold_LT_16sc(const Ipp16sc* pSrc, Ipp16sc* pDst, int len, Ipp16s
level);
IppStatus ippsThreshold_GT_16s(const Ipp16s* pSrc, Ipp16s* pDst, int len, Ipp16s
level);
IppStatus ippsThreshold_GT_32s(const Ipp32s* pSrc, Ipp32s* pDst, int len, Ipp32s
level);
IppStatus ippsThreshold_GT_32f(const Ipp32f* pSrc, Ipp32f* pDst, int len, Ipp32f
level);
IppStatus ippsThreshold_GT_64f(const Ipp64f* pSrc, Ipp64f* pDst, int len, Ipp64f
level);
IppStatus ippsThreshold_GT_32fc(const Ipp32fc* pSrc, Ipp32fc* pDst, int len, Ipp32f
level);
IppStatus ippsThreshold_GT_64fc(const Ipp64fc* pSrc, Ipp64fc* pDst, int len, Ipp64f
level);
IppStatus ippsThreshold_GT_16sc(const Ipp16sc* pSrc, Ipp16sc* pDst, int len, Ipp16s
level);
IppStatus ippsThreshold_GT_16s_I(Ipp16s* pSrcDst, int len, Ipp16s level);
IppStatus ippsThreshold_GT_32s_I(Ipp32s* pSrcDst, int len, Ipp32s level);
IppStatus ippsThreshold_GT_32f_I(Ipp32f* pSrcDst, int len, Ipp32f level);
IppStatus ippsThreshold_GT_64f_I(Ipp64f* pSrcDst, int len, Ipp64f level);158

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

IppStatus ippsThreshold_GT_32fc_I(Ipp32fc* pSrcDst, int len, Ipp32f level);
IppStatus ippsThreshold_GT_64fc_I(Ipp64fc* pSrcDst, int len, Ipp64f level);
IppStatus ippsThreshold_GT_16sc_I(Ipp16sc* pSrcDst, int len, Ipp16s level);
IppStatus ippsThreshold_LT_16s_I(Ipp16s* pSrcDst, int len, Ipp16s level);
IppStatus ippsThreshold_LT_32s_I(Ipp32s* pSrcDst, int len, Ipp32s level);
IppStatus ippsThreshold_LT_32f_I(Ipp32f* pSrcDst, int len, Ipp32f level);
IppStatus ippsThreshold_LT_64f_I(Ipp64f* pSrcDst, int len, Ipp64f level);
IppStatus ippsThreshold_LT_32fc_I(Ipp32fc* pSrcDst, int len, Ipp32f level);
IppStatus ippsThreshold_LT_64fc_I(Ipp64fc* pSrcDst, int len, Ipp64f level);
IppStatus ippsThreshold_LT_16sc_I(Ipp16sc* pSrcDst, int len, Ipp16s level);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

pSrcDstlen
level

Pointer to the source and destination vector for the in-place
operation.
Number of elements in the vector.
Value used to limit each element of pSrc or pSrcDst.This
argument must always be real. For complex versions, it must
be positive and represent magnitude.

Description
They implement thresholding of the vector pSrc by limiting each element by the threshold value level.
These functions perform the similar operation to the ippsThreshold function but are designed for the fixed
type of the compare operation to use: ippsThreshold_LT is for the "less than" comparison, while
ippsThreshold_GT is for the "greater than" comparison.
The in-place flavors perform the threshold operation on the vector pSrcDst by limiting each element by thethreshold value level.

ippsThreshold_LT. The ippsThreshold_LT function performs the operation “less than”, and level is alower bound for the input. The formula for ippsThreshold_LT is the following:

For complex versions of the function ippsThreshold_LT, the parameter level is always real.

159

1

Intel® Integrated Performance Primitives Developer Guide and Reference

The formula for complex ippsThreshold_LT is:

ippsThreshold_GT. The function ippsThreshold_GT performs the operation “greater than” and level isan upper bound for the input.
The formula for ippsThreshold_GT is the following:

For complex versions of the function ippsThreshold_GT, the parameter level is always real.
The formula for complex ippsThreshold_GT is:Application Notes
For all complex versions, level must be positive and represents a magnitude. The magnitude of the input islimited, but the phase remains unchanged. Zero-valued input is assumed to have zero phase.
A special rule is applied to the integer complex versions of the threshold functions. In general, the resulting
point coordinates at the complex plane are not integer. The function rounds them off to integer in such a waythat the threshold operation is not performed. Thus, for the “less than” operation (the ippsThreshold_LT
function) the coordinates are rounded to the infinity (+Inf for positive coordinates, and -Inf for negative),and for the “greater than” operation (the ippsThreshold_GT function) the coordinates are rounded to 0.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pSrc, pDst, or pSrcDst pointer is
NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0

ippStsThreshNegLevelErr

160

Indicates an error when level for the complex version isnegative (see appendix A "Handling of Special Cases" for more
information).

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Threshold_LTAbs, Threshold_GTAbs
Performs the threshold operation on the absolutevalues of elements of a vector.

SyntaxIppStatus ippsThreshold_LTAbs_16s(const Ipp16s* pSrc, Ipp16s* pDst, int len, Ipp16s
level);
IppStatus ippsThreshold_LTAbs_32s(const Ipp32s* pSrc, Ipp32s* pDst, int len, Ipp32s
level);
IppStatus ippsThreshold_LTAbs_32f(const Ipp32f* pSrc, Ipp32f* pDst, int len, Ipp32f
level);
IppStatus ippsThreshold_LTAbs_64f(const Ipp64f* pSrc, Ipp64f* pDst, int len, Ipp64f
level);
IppStatus ippsThreshold_GTAbs_16s(const Ipp16s* pSrc, Ipp16s* pDst, int len, Ipp16s
level);
IppStatus ippsThreshold_GTAbs_32s(const Ipp32s* pSrc, Ipp32s* pDst, int len, Ipp32s
level);
IppStatus ippsThreshold_GTAbs_32f(const Ipp32f* pSrc, Ipp32f* pDst, int len, Ipp32f
level);
IppStatus ippsThreshold_GTAbs_64f(const Ipp64f* pSrc, Ipp64f* pDst, int len, Ipp64f
level);
IppStatus ippsThreshold_GTAbs_16s_I(Ipp16s* pSrcDst, int len, Ipp16s level);
IppStatus ippsThreshold_GTAbs_32s_I(Ipp32s* pSrcDst, int len, Ipp32s level);
IppStatus ippsThreshold_GTAbs_32f_I(Ipp32f* pSrcDst, int len, Ipp32f level);
IppStatus ippsThreshold_GTAbs_64f_I(Ipp64f* pSrcDst, int len, Ipp64f level);
IppStatus ippsThreshold_LTAbs_16s_I(Ipp16s* pSrcDst, int len, Ipp16s level);
IppStatus ippsThreshold_LTAbs_32s_I(Ipp32s* pSrcDst, int len, Ipp32s level);
IppStatus ippsThreshold_LTAbs_32f_I(Ipp32f* pSrcDst, int len, Ipp32f level);
IppStatus ippsThreshold_LTAbs_64f_I(Ipp64f* pSrcDst, int len, Ipp64f level);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

pSrcDstlen

Pointer to the source and destination vector for the in-place
operation.
Number of elements in the vector.

161

1

Intel® Integrated Performance Primitives Developer Guide and Reference

level

Value used to limit each element of source vector. This
argument can not be negative.

Description
These functions implement thresholding of the vector pSrc by limiting absolute value of each element by thethreshold value level. These functions perform the compare operation of the fixed type:ippsThreshold_LTAbs is for the "less than" comparison, while ippsThreshold_GTAbs is for the "greaterthan" comparison. Elements of the result vector pDst have the same sign that the source elements.
The in-place flavors perform the threshold operation on the vector pSrcDst.

ippsThreshold_LTAbs. The ippsThreshold_LTAbsfunction performs the operation “less than”, and levelis a lower bound for the input. The formula for ippsThreshold_LTAbs is the following:ippsThreshold_GTAbs. The function ippsThreshold_GTAbs performs the operation “greater than” andlevel is an upper bound for the input. The formula for ippsThreshold_GTAbs is the following:

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if pSrc, pDst, or pSrcDst pointer is NULL.

ippStsSizeErr

Indicates an error if len is less than or equal to zero.

ippStsThreshNegLevelErr

Indicates an error if level is negative.

ExampleThreshold_LtAbs:
Threshold_LtAbs_I:

Threshold_LTVal, Threshold_LTAbsVal, Threshold_GTVal, Threshold_LTValGTVal
Performs the threshold operation on the elements of avector by limiting the element values by the specified
level and replacing them with the specified value.

162

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

SyntaxIppStatus ippsThreshold_LTAbsVal_32f(const Ipp32f* pSrc, Ipp32f* pDst, int len, Ipp32f
level, Ipp32f value);
IppStatus ippsThreshold_LTAbsVal_64f(const Ipp64f* pSrc, Ipp64f* pDst, int len, Ipp64f
level, Ipp64f value);
IppStatus ippsThreshold_LTAbsVal_16s(const Ipp16s* pSrc, Ipp16s* pDst, int len, Ipp16s
level, Ipp16s value);
IppStatus ippsThreshold_LTAbsVal_32s(const Ipp32s* pSrc, Ipp32s* pDst, int len, Ipp32s
level, Ipp32s value);
IppStatus ippsThreshold_LTAbsVal_32f_I(Ipp32f* pSrcDst, int len, Ipp32f level, Ipp32f
value);
IppStatus ippsThreshold_LTAbsVal_64f_I(Ipp64f* pSrcDst, int len, Ipp64f level, Ipp64f
value);
IppStatus ippsThreshold_LTAbsVal_16s_I(Ipp16s* pSrcDst, int len, Ipp16s level, Ipp16s
value);
IppStatus ippsThreshold_LTAbsVal_32s_I(Ipp32s* pSrcDst, int len, Ipp32s level, Ipp32s
value);
IppStatus ippsThreshold_LTVal_16s(const Ipp16s* pSrc, Ipp16s* pDst, int len, Ipp16s
level, Ipp16s value);
IppStatus ippsThreshold_LTVal_32f(const Ipp32f* pSrc, Ipp32f* pDst, int len, Ipp32f
level, Ipp32f value);
IppStatus ippsThreshold_LTVal_64f(const Ipp64f* pSrc, Ipp64f* pDst, int len, Ipp64f
level, Ipp64f value);
IppStatus ippsThreshold_LTVal_16sc(const Ipp16sc* pSrc, Ipp16sc* pDst, int len, Ipp16s
level, Ipp16sc value);
IppStatus ippsThreshold_LTVal_32fc(const Ipp32fc* pSrc, Ipp32fc* pDst, int len, Ipp32f
level, Ipp32fc value);
IppStatus ippsThreshold_LTVal_64fc(const Ipp64fc* pSrc, Ipp64fc* pDst, int len, Ipp64f
level, Ipp64fc value);
IppStatus ippsThreshold_GTVal_16s(const Ipp16s* pSrc, Ipp16s* pDst, int len, Ipp16s
level, Ipp16s value);
IppStatus ippsThreshold_GTVal_32f(const Ipp32f* pSrc, Ipp32f* pDst, int len, Ipp32f
level, Ipp32f value);
IppStatus ippsThreshold_GTVal_64f(const Ipp64f* pSrc, Ipp64f* pDst, int len, Ipp64f
level, Ipp64f value);
IppStatus ippsThreshold_GTVal_16sc(const Ipp16sc* pSrc, Ipp16sc* pDst, int len, Ipp16s
level, Ipp16sc value);
IppStatus ippsThreshold_GTVal_32fc(const Ipp32fc* pSrc, Ipp32fc* pDst, int len, Ipp32f
level, Ipp32fc value);
IppStatus ippsThreshold_GTVal_64fc(const Ipp64fc* pSrc, Ipp64fc* pDst, int len, Ipp64f
level, Ipp64fc value);
IppStatus ippsThreshold_LTValGTVal_16s(const Ipp16s* pSrc, Ipp16s* pDst, int len,
Ipp16s levelLT, Ipp16s valueLT, Ipp16s levelGT, Ipp16s valueGT);

163

1

Intel® Integrated Performance Primitives Developer Guide and Reference

IppStatus ippsThreshold_LTValGTVal_32s(const Ipp32s* pSrc, Ipp32s* pDst, int len,
Ipp32s levelLT, Ipp32s valueLT, Ipp32s levelGT, Ipp32s valueGT);
IppStatus ippsThreshold_LTValGTVal_32f(const Ipp32f* pSrc, Ipp32f* pDst, int len,
Ipp32f levelLT, Ipp32f valueLT, Ipp32f levelGT, Ipp32f valueGT);
IppStatus ippsThreshold_LTValGTVal_64f(const Ipp64f* pSrc, Ipp64f* pDst, int len,
Ipp64f levelLT, Ipp64f valueLT, Ipp64f levelGT, Ipp64f valueGT);
IppStatus ippsThreshold_LTVal_16s_I(Ipp16s* pSrcDst, int len, Ipp16s level, Ipp16s
value);
IppStatus ippsThreshold_LTVal_32f_I(Ipp32f* pSrcDst, int len, Ipp32f level, Ipp32f
value);
IppStatus ippsThreshold_LTVal_64f_I(Ipp64f* pSrcDst, int len, Ipp64f level, Ipp64f
value);
IppStatus ippsThreshold_LTVal_16sc_I(Ipp16sc* pSrcDst, int len, Ipp16s level, Ipp16sc
value);
IppStatus ippsThreshold_LTVal_32fc_I(Ipp32fc* pSrcDst, int len, Ipp32f level, Ipp32fc
value);
IppStatus ippsThreshold_LTVal_64fc_I(Ipp64fc* pSrcDst, int len, Ipp64f level, Ipp64fc
value);
IppStatus ippsThreshold_GTVal_16s_I(Ipp16s* pSrcDst, int len, Ipp16s level, Ipp16s
value);
IppStatus ippsThreshold_GTVal_32f_I(Ipp32f* pSrcDst, int len, Ipp32f level, Ipp32f
value);
IppStatus ippsThreshold_GTVal_64f_I(Ipp64f* pSrcDst, int len, Ipp64f level, Ipp64f
value);
IppStatus ippsThreshold_GTVal_16sc_I(Ipp16sc* pSrcDst, int len, Ipp16s level, Ipp16sc
value);
IppStatus ippsThreshold_GTVal_32fc_I(Ipp32fc* pSrcDst, int len, Ipp32f level, Ipp32fc
value);
IppStatus ippsThreshold_GTVal_64fc_I(Ipp64fc* pSrcDst, int len, Ipp64f level, Ipp64fc
value);
IppStatus ippsThreshold_LTValGTVal_16s_I(Ipp16s* pSrcDst, int len, Ipp16s levelLT,
Ipp16s valueLT, Ipp16s levelGT, Ipp16s valueGT);
IppStatus ippsThreshold_LTValGTVal_32s_I(Ipp32s* pSrcDst, int len, Ipp32s levelLT,
Ipp32s valueLT, Ipp32s levelGT, Ipp32s valueGT);
IppStatus ippsThreshold_LTValGTVal_32f_I(Ipp32f* pSrcDst, int len, Ipp32f levelLT,
Ipp32f valueLT, Ipp32f levelGT, Ipp32f valueGT);
IppStatus ippsThreshold_LTValGTVal_64f_I(Ipp64f* pSrcDst, int len, Ipp64f levelLT,
Ipp64f valueLT, Ipp64f levelGT, Ipp64f valueGT);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.h164

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Libraries: ippcore.lib, ippvm.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

pSrcDstlen
level

levelLT

Pointer to the source and destination vector for the in-place
operation.
Number of elements in the vector.
Value used to limit each element of pSrc or pSrcDst.This
argument must always be real. For complex versions, it must
be positive and represent magnitude.
Low bound used to limit each element of pSrc or pSrcDst for
the ippsThreshold_LTValGTVal function.

levelGT

Upper bound used to limit each element of pSrc or pSrcDst for
the ippsThreshold_LTValGTVal function.

value

Value to be assigned to vector elements which are “less than”
or “greater than” level.

valueLTvalueGT

Value to be assigned to vector elements which are less thanlevelLT for the ippsThreshold_LTValGTVal function.

Value to be assigned to vector elements which are greater thanlevelGT for the ippsThreshold_LTValGTVal function.

Description
These functions perform the threshold operation on the vector pSrc by limiting each element by thethreshold level and replacing it with the specified value.
The in-place flavors of the function perform the threshold operation on the vector pSrcDst by limiting eachelement by the threshold value.

ippsThreshold_LTAbsVal. The ippsThreshold_LTAbsVal function substitutes each element of the source
vector that is less by absolute value than specified level with the specified constant value.
The formula for ippsThreshold_LTAbsVal is:

if( ABS(x[i]) < level ) y[i] = value;else y[i] = x[i];ippsThreshold_LTVal. The function ippsThreshold_LTVal performs the operation “less than” and levelis a lower bound for the input. The vector elements less than level are set to value.
The formula for ippsThreshold_LTVal is:

For complex versions of the function ippsThreshold_LTVal, the parameter level is always real.
The formula for complex ippsThreshold_LTVal is:

165

1

Intel® Integrated Performance Primitives Developer Guide and Reference

ippsThreshold_GTVal. The function ippsThreshold_GTVal performs the operation “greater than” andlevel is an upper bound for the input. The vector elements greater than level are set to value.
The formula for ippsThreshold_GtVal is:

For complex versions of the function ippsThreshold_GTVal, the parameter level is always real.
The formula for complex ippsThreshold_GTVal is:

ippsThreshold_LTValGTVal. The function ippsThreshold_LTValGTVal checks both the “less than” and“greater than” conditions. The parameter levelLT is a lower bound and the parameter levelGT is an upperbound for the input. The source vector elements less than levelLT are set to valueLT, and the source
vector elements greater than levelGT are set to valueGT. The value of levelLT must be less than or equal
to levelGT.
The formula for ippsThreshold_LTValGTVal is:

For all complex versions, level must be positive and represent a magnitude.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pSrc, pDst, or pSrcDst pointer is
NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

ippStsThresholdErr

Indicates an error when levelLT is greater than levelGT.

ippStsThreshNegLevelErr

Indicates an error when level for the complex version isnegative (see appendix A “Handling of Special Cases” for more
information).

Threshold_LTInv
Computes the inverse of vector elements after limiting
their magnitudes by the given lower bound.

SyntaxIppStatus ippsThreshold_LTInv_32f(const Ipp32f* pSrc, Ipp32f* pDst, int len, Ipp32f
level);
IppStatus ippsThreshold_LTInv_64f(const Ipp64f* pSrc, Ipp64f* pDst, int len, Ipp64f
level);
IppStatus ippsThreshold_LTInv_32fc(const Ipp32fc* pSrc, Ipp32fc* pDst, int len, Ipp32f
level);

166

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

IppStatus ippsThreshold_LTInv_64fc(const Ipp64fc* pSrc, Ipp64fc* pDst, int len, Ipp64f
level);
IppStatus ippsThreshold_LTInv_32f_I(Ipp32f* pSrcDst, int len, Ipp32f level);
IppStatus ippsThreshold_LTInv_64f_I(Ipp64f* pSrcDst, int len, Ipp64f level);
IppStatus ippsThreshold_LTInv_32fc_I(Ipp32fc* pSrcDst, int len, Ipp32f level);
IppStatus ippsThreshold_LTInv_64fc_I(Ipp64fc* pSrcDst, int len, Ipp64f level);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

pSrcDstlen
level

Pointer to the source and destination vector for the in-place
operation.
Number of elements in the vector.
Value used to limit each element of pSrc or pSrcDst.This
argument must always be real and positive.

Description
This function computes the inverse of elements of the vector pSrc and stores the result in pDst. The
computation occurs after first limiting the magnitude of each element by the threshold value level.
The in-place flavors of ippsThreshold_LTInv compute the inverse of elements of the vector pSrcDst andstore the result in pSrcDst. The computation occurs after first limiting the magnitude of each element by thethreshold value level.
The threshold operation is performed to avoid division by zero. Since level represents a magnitude, it isalways real and must be positive. The formula for ippsThreshold_LTInv is the following:

167

1

Intel® Integrated Performance Primitives Developer Guide and Reference

If the function encounters zero-valued vector elements and level is also 0 (see appendix A "Handling ofSpecial Cases"), the output value is set to Inf (infinity), but operation execution is not aborted:

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pSrc, pDst, or pSrcDst pointer is
NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to zero.

ippStsThreshNegLevelErr

Indicates an error when level is negative.

ippStsInvZero

Indicates a warning when level and a vector element are
equal to zero. Operation execution is not aborted. The value ofthe destination vector element is Inf.

ExampleThreshold_LtInv:
Threshold_LtInv_I:

CartToPolar
Converts the elements of a complex vector to polar
coordinate form.

SyntaxIppStatus ippsCartToPolar_32f(const Ipp32f* pSrcRe, const Ipp32f* pSrcIm, Ipp32f*
pDstMagn, Ipp32f* pDstPhase, int len);
IppStatus ippsCartToPolar_64f(const Ipp64f* pSrcRe, const Ipp64f* pSrcIm, Ipp64f*
pDstMagn, Ipp64f* pDstPhase, int len);
IppStatus ippsCartToPolar_32fc(const Ipp32fc* pSrc, Ipp32f* pDstMagn, Ipp32f*
pDstPhase, int len);
IppStatus ippsCartToPolar_64fc(const Ipp64fc* pSrc, Ipp64f* pDstMagn, Ipp64f*
pDstPhase, int len);
IppStatus ippsCartToPolar_16sc_Sfs(const Ipp16sc* pSrc, Ipp16s* pDstMagn, Ipp16s*
pDstPhase, int len, int magnScaleFactor, int phaseScaleFactor);

Include Files
ipps.h168

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Domain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc
pSrcRepSrcImpDstMagn
pDstPhaselenmagnScaleFactor
phaseScaleFactor

Pointer to the source vector.
Pointer to the source vector which stores the real components
of Cartesian X,Y pairs.
Pointer to the source vector which stores the imaginary
components of Cartesian X,Y pairs.
Pointer to the vector which stores the magnitude (radius)
component of the elements of the vector pSrc.
Pointer to the vector which stores the phase (angle) componentof the elements of the vector pSrc in radians. Phase values arein the range (-π, π].
Number of elements in the vector.
Integer scale factor for the magnitude component, refer toInteger Scaling.
Integer scale factor for the phase component, refer to Integer
Scaling.

Description
This function converts the elements of a complex input vector pSrcor the complex input vector whose realand imaginary components are specified in the vectors pSrcRe and pSrcIm, respectively, to polar coordinate
form, and stores the magnitude (radius) component of each element in the vector pDstMagn and the phase(angle) component of each element in the vector pDstPhase.

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 len is less than or equal to zero.

ExamplePolarToCart
Converts the polar form magnitude/phase pairs stored
in input vectors to Cartesian coordinate form.

SyntaxIppStatus ippsPolarToCart_32f(const Ipp32f* pSrcMagn, const Ipp32f* pSrcPhase, Ipp32f*
pDstRe, Ipp32f* pDstIm, int len);
IppStatus ippsPolarToCart_64f(const Ipp64f* pSrcMagn, const Ipp64f* pSrcPhase, Ipp64f*
pDstRe, Ipp64f* pDstIm, int len);
IppStatus ippsPolarToCart_32fc(const Ipp32f* pSrcMagn, const Ipp32f* pSrcPhase,
Ipp32fc* pDst, int len);169

1Intel® Integrated Performance Primitives Developer Guide and Reference

IppStatus ippsPolarToCart_64fc(const Ipp64f* pSrcMagn, const Ipp64f* pSrcPhase,
Ipp64fc* pDst, int len);
IppStatus ippsPolarToCart_16sc_Sfs(const Ipp16s* pSrcMagn, const Ipp16s* pSrcPhase,
Ipp16sc* pDst, int len, int magnScaleFactor, int phaseScaleFactor);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrcMagn
pSrcPhase

pDst
pDstRepDstImlen
magnScaleFactor
phaseScaleFactor

Pointer to the source vector which stores the magnitude(radius) components of the elements in polar coordinate form.
Pointer to the vector which stores the phase (angle)
components of the elements in polar coordinate form inradians.
Pointer to the resulting vector which stores the complex pairsin Cartesian coordinates (X + iY).
Pointer to the resulting vector which stores the realcomponents of Cartesian X,Y pairs.
Pointer to the resulting vector which stores the imaginary
components of Cartesian X,Y pairs.
Number of elements in the vectors.
Integer scale factor for the magnitude component, refer toInteger Scaling.
Integer scale factor for the phase component, refer to Integer
Scaling.

Description
This function converts the polar form magnitude/phase pairs stored in the input vectors pSrcMagn andpSrcPhase into a complex vector and stores the results in the vector pDst, or stores the real components of
the result in the vector pDstRe and the imaginary components in the vector pDstIm.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

MaxOrderComputes the maximum order of a vector.

SyntaxIppStatus ippsMaxOrder_16s(const Ipp16s* pSrc, int len, int* pOrder);IppStatus ippsMaxOrder_32s(const Ipp32s* pSrc, int len, int* pOrder);170

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

IppStatus ippsMaxOrder_32f(const Ipp32f* pSrc, int len, int* pOrder);IppStatus ippsMaxOrder_64f(const Ipp64f* pSrc, int len, int* pOrder);Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc

Pointer to the source vector.

len

Number of elements in the vector.

pOrderPointer to the result value.

Description
This function finds the maximum binary number in elements of the exponent vector pSrc, and stores theresult in pOrder.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pSrc or pOrder pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

ippStsNanArg

Indicates a warning when NaN is encountered in the input data
vector.

Flip
Reverses the order of elements in a vector.

SyntaxIppStatus ippsFlip_8u(const Ipp8u* pSrc, Ipp8u* pDst, int len);
IppStatus ippsFlip_16u(const Ipp16u* pSrc, Ipp16u* pDst, int len);
IppStatus ippsFlip_32f(const Ipp32f* pSrc, Ipp32f* pDst, int len);
IppStatus ippsFlip_64f(const Ipp64f* pSrc, Ipp64f* pDst, int len);
IppStatus ippsFlip_32fc(const Ipp32fc* pSrc, Ipp32fc* pDst, int len);
IppStatus ippsFlip_64fc(const Ipp64fc* pSrc, Ipp64fc* pDst, int len);
IppStatus ippsFlip_16u_I(Ipp16u* pSrcDst, int len);
IppStatus ippsFlip_8u_I(Ipp8u* pSrcDst, int len);
IppStatus ippsFlip_32f_I(Ipp32f* pSrcDst, int len);
IppStatus ippsFlip_64f_I(Ipp64f* pSrcDst, int len);
IppStatus ippsFlip_32fc_I(Ipp32fc* pSrcDst, int len);
IppStatus ippsFlip_64fc_I(Ipp64fc* pSrcDst, int len);

171

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

pSrcDstlen

Pointer to the source and destination vector for the in-place
operation.
Number of elements in the vector.

Description
This function stores the elements of a source vector pSrc to a destination vector pDst in reverse orderaccording to the following formula:pDst[n] = pSrc[len- n-1], n = 0 .. len-1

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 len is less than or equal to 0.

FindNearestOne
Finds an element of the table which is closest to thespecified value.

SyntaxIppStatus ippsFindNearestOne_16u(Ipp16u inpVal, Ipp16u* pOutVal, int* pOutIndex, const
Ipp16u *pTable, int tblLen);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
inpValReference value.

pOutValPointer to the output value.

pOutIndex

Pointer to the output index.

172

Developer Guide and Reference for Intel® Integrated Performance Primitives

pTablePointer to the table for searching.

tblLenNumber of elements in the table.

1

Description
This function searches through the table pTable for an element which is closest to the specified reference
value inpVal. The resulting element and its index are stored in pOutVal and pOutIndex, respectively. The
table elements must satisfy the condition pTable[n] ≤pTable[n+1]. The function uses the following
distance criterion for determining the table closest element closest: min(|inpVal -pTable[n]|).

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 tblLen is less than or equal to 0.

FindNearest
Finds table elements that are closest to the elementsof the specified vector.

SyntaxIppStatus ippsFindNearest_16u(const Ipp16u* pVals, Ipp16u* pOutVals, int* pOutIndexes,
int len, const Ipp16u *pTable, int tblLen);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pVals

Pointer to the vector containing reference values.

pOutVals

Pointer to the output vector.

pOutIndexes

Pointer to the array that stores output indexes.

len

Number of elements in the input vector.

pTablePointer to the table for searching.

tblLenNumber of elements in the table.

Description
This function searches through the table pTable for elements which are closest to the reference elements of
the input vector pVals. The resulting elements and their indexes are stored in pOutVals and pOutIndexes,
respectively. The table elements must satisfy the condition pTable[n] ≤pTable[n+1]. The function uses thefollowing distance criterion for determining the table element closest to pVals[k] : min(|pVals[k] pTable[n]|).

173

1

Intel® Integrated Performance Primitives Developer Guide and Reference

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 tblLen or len is less than or equal to
zero.

ExampleWindowing Functions
This chapter describes several of the windowing functions commonly used in signal processing. A window is amathematical function by which a signal is multiplied to improve the characteristics of some subsequent
analysis. Windows are commonly used in FFT-based spectral analysis.

Understanding Window Functions
The Intel IPP provides the following functions to generate window samples:
•
•
•
•
•

Bartlett windowing function
Blackman family of windowing functions
Hamming windowing function
WinHann windowing function
WinKaiser windowing function

These functions generate the window samples and multiply them into an existing signal. To obtain thewindow samples themselves, initialize the vector argument to the unity vector before calling the windowfunction.
If you want to multiply different frames of a signal by the same window multiple times, it is better to first
calculate the window by calling one of the windowing functions (ippsWinHann, for example) on a vector withall elements set to 1.0. Then use one of the vector multiplication functions (ippsMul, for example) tomultiply the window into the signal each time a new set of input samples is available. This avoids repeatedly
calculating the window samples. This is illustrated in the following code example.

Examplevoid multiFrameWin( void ) {Ipp32f win[LEN], x[LEN], X[LEN];
IppsFFTSpec_R_32f* ctx;
ippsSet_32f( 1, win, LEN );ippsWinHann_32f_I( win, LEN );/// ... initialize FFT context
while(1 ){/// ... get x signal///
ippsMul_32f_I( win, x, LEN );ippsFFTFwd_RToPack_32f( x, X, ctx, 0 );}}For more information on windowing, see: [Jack89], section 7.3, Windows in Spectrum Analysis; [Jack89],
section 9.1, Window-Function Technique; and [Mit93], section 16-2, Fourier Analysis of Finite-Time Signals.
For more information on these references, see also the Bibliography at the end of this document.

WinBartlett
Multiplies a vector by a Bartlett windowing function.

174

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

SyntaxIppStatus ippsWinBartlett_16s(const Ipp16s* pSrc, Ipp16s* pDst, int len);
IppStatus ippsWinBartlett_32f(const Ipp32f* pSrc, Ipp32f* pDst, int len);
IppStatus ippsWinBartlett_64f(const Ipp64f* pSrc, Ipp64f* pDst, int len);
IppStatus ippsWinBartlett_16sc(const Ipp16sc* pSrc, Ipp16sc* pDst, int len);
IppStatus ippsWinBartlett_32fc(const Ipp32fc* pSrc, Ipp32fc* pDst, int len);
IppStatus ippsWinBartlett_64fc(const Ipp64fc* pSrc, Ipp64fc* pDst, int len);
IppStatus ippsWinBartlett_16s_I(Ipp16s* pSrcDst, int len);
IppStatus ippsWinBartlett_32f_I(Ipp32f* pSrcDst, int len);
IppStatus ippsWinBartlett_64f_I(Ipp64f* pSrcDst, int len);
IppStatus ippsWinBartlett_16sc_I(Ipp16sc* pSrcDst, int len);
IppStatus ippsWinBartlett_32fc_I(Ipp32fc* pSrcDst, int len);
IppStatus ippsWinBartlett_64fc_I(Ipp64fc* pSrcDst, int len);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

pSrcDstlen

Pointer to the source and destination vector for the in-place
operation.
Number of elements in the vector.

Description
This function multiplies the vector pSrc by the Bartlett (triangle) window, and stores the result in pDst.
The in-place flavors of ippsWinBartlett multiply the pSrcDst by the Bartlett (triangle) window and store
the result in pSrcDst.
The complex types multiply both the real and imaginary parts of the vector by the same window.
The Bartlett window is defined as follows:

175

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pSrc, pDst, orpSrcDst pointer is
NULL.

ippStsSizeErr

Indicates an error when len is less than 3.

ExampleThe example below shows how to use the function ippsWinBartlett_32f_I.

void bartlett(void) {Ipp32f x[8];ippsSet_32f(1, x, 8);
ippsWinBartlett_32f_I(x, 8);
printf_32f("bartlett (half) =", x, 4, ippStsNoErr);}
Output:bartlett (half) = 0.000000 0.285714 0.571429 0.857143
Matlab* Analog:>> b = bartlett(8); b(1:4)'

WinBlackman
Multiplies a vector by a Blackman windowing function.

SyntaxIppStatus ippsWinBlackman_16s(const Ipp16s* pSrc, Ipp16s* pDst, int len, Ipp32f alpha);
IppStatus ippsWinBlackman_16sc(const Ipp16sc* pSrc, Ipp16sc* pDst, int len, Ipp32f
alpha);
IppStatus ippsWinBlackman_32f(const Ipp32f* pSrc, Ipp32f* pDst, int len, Ipp32f alpha);
IppStatus ippsWinBlackman_32fc(const Ipp32fc* pSrc, Ipp32fc* pDst, int len, Ipp32f
alpha);
IppStatus ippsWinBlackman_64f(const Ipp64f* pSrc, Ipp64f* pDst, int len, Ipp64f alpha);
IppStatus ippsWinBlackman_64fc(const Ipp64fc* pSrc, Ipp64fc* pDst, int len, Ipp64f
alpha);
IppStatus ippsWinBlackmanStd_16s(const Ipp16s* pSrc, Ipp16s* pDst, int len);
IppStatus ippsWinBlackmanStd_16sc(const Ipp16sc* pSrc, Ipp16sc* pDst, int len);
IppStatus ippsWinBlackmanStd_32f(const Ipp32f* pSrc, Ipp32f* pDst, int len);
IppStatus ippsWinBlackmanStd_32fc(const Ipp32fc* pSrc, Ipp32fc* pDst, int len);176

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

IppStatus ippsWinBlackmanStd_64f(const Ipp64f* pSrc, Ipp64f* pDst, int len);
IppStatus ippsWinBlackmanStd_64fc(const Ipp64fc* pSrc, Ipp64fc* pDst, int len);
IppStatus ippsWinBlackmanOpt_16s(const Ipp16s* pSrc, Ipp16s* pDst, int len);
IppStatus ippsWinBlackmanOpt_16sc(const Ipp16sc* pSrc, Ipp16sc* pDst, int len);
IppStatus ippsWinBlackmanOpt_32f(const Ipp32f* pSrc, Ipp32f* pDst, int len);
IppStatus ippsWinBlackmanOpt_32fc(const Ipp32fc* pSrc, Ipp32fc* pDst, int len);
IppStatus ippsWinBlackmanOpt_64f(const Ipp64f* pSrc, Ipp64f* pDst, int len);
IppStatus ippsWinBlackmanOpt_64fc(const Ipp64fc* pSrc, Ipp64fc* pDst, int len);
IppStatus ippsWinBlackman_16s_I(Ipp16s* pSrcDst, int len, Ipp32f alpha);
IppStatus ippsWinBlackman_16sc_I(Ipp16sc* pSrcDst, int len, Ipp32f alpha);
IppStatus ippsWinBlackman_32f_I(Ipp32f* pSrcDst, int len, Ipp32f alpha);
IppStatus ippsWinBlackman_32fc_I(Ipp32fc* pSrcDst, int len, Ipp32f alpha);
IppStatus ippsWinBlackman_64f_I(Ipp64f* pSrcDst, int len, Ipp64f alpha);
IppStatus ippsWinBlackman_64fc_I(Ipp64fc* pSrcDst, int len, Ipp64f alpha);
IppStatus ippsWinBlackmanOpt_16s_I(Ipp16s* pSrcDst, int len);
IppStatus ippsWinBlackmanOpt_16sc_I(Ipp16sc* pSrcDst, int len);
IppStatus ippsWinBlackmanOpt_32f_I(Ipp32f* pSrcDst, int len);
IppStatus ippsWinBlackmanOpt_32fc_I(Ipp32fc* pSrcDst, int len);
IppStatus ippsWinBlackmanOpt_64f_I(Ipp64f* pSrcDst, int len);
IppStatus ippsWinBlackmanOpt_64fc_I(Ipp64fc* pSrcDst, int len);
IppStatus ippsWinBlackmanStd_16s_I(Ipp16s* pSrcDst, int len);
IppStatus ippsWinBlackmanStd_16sc_I(Ipp16sc* pSrcDst, int len);
IppStatus ippsWinBlackmanStd_32f_I(Ipp32f* pSrcDst, int len);
IppStatus ippsWinBlackmanStd_32fc_I(Ipp32fc* pSrcDst, int len);
IppStatus ippsWinBlackmanStd_64f_I(Ipp64f* pSrcDst, int len);
IppStatus ippsWinBlackmanStd_64fc_I(Ipp64fc* pSrcDst, int len);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

pSrcDstPointer to the source and destination vector for the in-place
operation.

177

1

Intel® Integrated Performance Primitives Developer Guide and Reference

alpha
len

Adjustable parameter associated with the Blackman windowing
equation.
Number of elements in the vector

Description
These functions multiply the vector pSrc by the Blackman window, and store the result in pDst.
The in-place flavors of ippsWinBlackman multiply the vector pSrcDst by the Blackman window, and store
the result in pSrcDst.
The complex types multiply both the real and imaginary parts of the vector by the same window. The
functions for the Blackman family of windows are defined below.

ippsWinBlackman. The function ippsWinBlackman allows the application to specify alpha. The Blackman
window is defined as follows:

ippsWinBlackmanStd. The standard Blackman window is provided by the function ippsWinBlackmanStd,
which simply multiplies a vector by a Blackman window with the standard value of alpha shown below:
alpha = -0.16
ippsWinBlackmanOpt. The function ippsWinBlackmanOpt provides a modified window that has a 30 dB/
octave roll-off by multiplying a vector by a Blackman window with the optimal value of alpha shown below:

The minimum len is equal to 4. For large len, the optimal alpha converges asymptotically to the asymptoticalpha; the application can use the asymptotic value of alpha shown below:

alpha = -0.25

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pSrc, pDst, or pSrcDst pointer is
NULL.

ippStsSizeErr

178

Indicates an error when len is less than 4 for the function
ippsWinBlackmanOpt and less than 3 for all other functions of
the family.

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

ExampleThe example below shows how to use the function ippsWinBlackmanStd_32f_I

void blackman(void) {Ipp32f x[8];ippsSet_32f(1, x, 8);
ippsWinBlackmanStd_32f_I(x, 8);
printf_32f("blackman (half) =", x, 4, ippStsNoErr);}
Output:blackman(half) = 0.000000 0.090453 0.459183 0.920364
Matlab* Analog:>> b = blackman(8)'; b(1:4)

WinHamming
Multiplies a vector by a Hamming windowing function.

SyntaxIppStatus ippsWinHamming_16s(const Ipp16s* pSrc, Ipp16s* pDst, int len);
IppStatus ippsWinHamming_32f(const Ipp32f* pSrc, Ipp32f* pDst, int len);
IppStatus ippsWinHamming_64f(const Ipp64f* pSrc, Ipp64f* pDst, int len);
IppStatus ippsWinHamming_16sc(const Ipp16sc* pSrc, Ipp16sc* pDst, int len);
IppStatus ippsWinHamming_32fc(const Ipp32fc* pSrc, Ipp32fc* pDst, int len);
IppStatus ippsWinHamming_64fc(const Ipp64fc* pSrc, Ipp64fc* pDst, int len);
IppStatus ippsWinHamming_16s_I(Ipp16s* pSrcDst, int len);
IppStatus ippsWinHamming_32f_I(Ipp32f* pSrcDst, int len);
IppStatus ippsWinHamming_64f_I(Ipp64f* pSrcDst, int len);
IppStatus ippsWinHamming_16sc_I(Ipp16sc* pSrcDst, int len);
IppStatus ippsWinHamming_32fc_I(Ipp32fc* pSrcDst, int len);
IppStatus ippsWinHamming_64fc_I(Ipp64fc* pSrcDst, int len);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

pSrcDstlen

Pointer to the source and destination vector for the in-place
operation.
Number of elements in the vector.

179

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Description
This function multiplies the vector pSrc by the Hamming window and stores the result in pDst.
The in-place flavors of ippsWinHamming multiply the vector pSrcDst by the Hamming window and store theresult in pSrcDst.
The complex types multiply both the real and imaginary parts of the vector by the same window. The
Hamming window is defined as follows:

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pSrc, pDst, or pSrcDst pointer is
NULL.

ippStsSizeErr

Indicates an error when len is less than 3.

ExampleThe example below shows how to use the function ippsWinHamming_32f_I.

void hamming(void) {Ipp32f x[8];ippsSet_32f(1, x, 8);
ippsWinHamming_32f_I(x, 8);
printf_32f("hamming(half) =", x, 4, ippStsNoErr);}
Output:hamming(half) = 0.080000 0.253195 0.642360 0.954446
Matlab* Analog:>> b = hamming(8); b(1:4)'

WinHann
Multiplies a vector by a Hann windowing function.

SyntaxIppStatus ippsWinHann_16s(const Ipp16s* pSrc, Ipp16s* pDst, int len);
IppStatus ippsWinHann_16sc(const Ipp16sc* pSrc, Ipp16sc* pDst, int len);
IppStatus ippsWinHann_32f(const Ipp32f* pSrc, Ipp32f* pDst, int len);
IppStatus ippsWinHann_32fc(const Ipp32fc* pSrc, Ipp32fc* pDst, int len);
IppStatus ippsWinHann_64f(const Ipp64f* pSrc, Ipp64f* pDst, int len);
IppStatus ippsWinHann_64fc(const Ipp64fc* pSrc, Ipp64fc* pDst, int len);
IppStatus ippsWinHann_16s_I(Ipp16s* pSrcDst, int len);
IppStatus ippsWinHann_16sc_I(Ipp16sc* pSrcDst, int len);180

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

IppStatus ippsWinHann_32f_I(Ipp32f* pSrcDst, int len);
IppStatus ippsWinHann_32fc_I(Ipp32fc* pSrcDst, int len);
IppStatus ippsWinHann_64f_I(Ipp64f* pSrcDst, int len);
IppStatus ippsWinHann_64fc_I(Ipp64fc* pSrcDst, int len);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

pSrcDstlen

Pointer to the source and destination vector for the in-place
operation.
Number of elements in the vector.

Description
This function multiplies the vector pSrc by the Hann window and stores the result in pDst.
The in-place flavors of ippsWinHann multiply the vector pSrcDst by the Hann window and store the result in
pSrcDst.
The complex types multiply both the real and imaginary parts of the vector by the same window. The Hann
window is defined as follows:

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pSrc, pDst, or pSrcDst pointer is
NULL.

ippStsSizeErr

Indicates an error when len is less than 3.

ExampleThe example below shows how to use the function ippsWinHann_32f_I

void hann(void) {Ipp32f x[8];ippsSet_32f(1, x, 8);

181

1

Intel® Integrated Performance Primitives Developer Guide and Reference

ippsWinHann_32f_I(x, 8);
printf_32f("hann(half) =", x, 4, ippStsNoErr);}
Output:hann(half) = 0.000000 0.188255 0.611260 0.950484
Matlab* Analog:>> N = 8; n = 0:N-1; 0.5*(1-cos(2*pi*n/(N-1)))

WinKaiser
Multiplies a vector by a Kaiser windowing function.

SyntaxIppStatus ippsWinKaiser_16s(const Ipp16s* pSrc, Ipp16s* pDst, int len, Ipp32f alpha);
IppStatus ippsWinKaiser_32f(const Ipp32f* pSrc, Ipp32f* pDst, int len, Ipp32f alpha);
IppStatus ippsWinKaiser_64f(const Ipp64f* pSrc, Ipp64f* pDst, int len, Ipp64f alpha);
IppStatus ippsWinKaiser_16sc(const Ipp16sc* pSrc, Ipp16sc* pDst, int len, Ipp32f
alpha);
IppStatus ippsWinKaiser_32fc(const Ipp32fc* pSrc, Ipp32fc* pDst, int len, Ipp32f
alpha);
IppStatus ippsWinKaiser_64fc(const Ipp64fc* pSrc, Ipp64fc* pDst, int len, Ipp64f
alpha);
IppStatus ippsWinKaiser_16s_I(Ipp16s* pSrcDst, int len, Ipp32f alpha);
IppStatus ippsWinKaiser_32f_I(Ipp32f* pSrcDst, int len, Ipp32f alpha);
IppStatus ippsWinKaiser_64f_I(Ipp64f* pSrcDst, int len, Ipp64f alpha);
IppStatus ippsWinKaiser_16sc_I(Ipp16sc* pSrcDst, int len, Ipp32f alpha);
IppStatus ippsWinKaiser_32fc_I(Ipp32fc* pSrcDst, int len, Ipp32f alpha);
IppStatus ippsWinKaiser_64fc_I(Ipp64fc* pSrcDst, int len, Ipp64f alpha);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

pSrcDst
alpha
len

182

Pointer to the source and destination vector for the in-place
operation.
Adjustable parameter associated with the Kaiser windowing
equation.
Number of elements in the vector.

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Description
This function multiplies the vector pSrc by the Kaiser window, and stores the result in pDst.
The in-place flavors of ippsWinKaiser multiply the vector pSrcDst by the Kaiser window and store theresult in pSrcDst.

ippsWinKaiser. The function ippsWinKaiser allows the application to specify alpha. The function
multiplies both real and imaginary parts of the complex vector by the same window. The Kaiser family of
windows are defined as follows:

Here I0() is the modified zero-order Bessel function of the first kind.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pDst, pSrc, or pSrcDst pointer is
NULL.

ippStsSizeErr

Indicates an error when len is less than 1.

ippStsHugeWinErr

Indicates an error when the Kaiser window is too big.

ExampleThe example below shows how to use the function ippsWinKaiser_32f_I.

void kaiser(void) {Ipp32f x[8];IppStatus st;
ippsSet_32f(1, x, 8);
st = ippsWinKaiser_32f_I( x, 8, 1.0f );printf_32f("kaiser(half) =", x, 4, ippStsNoErr);}
Output:kaiser(half) = 0.135534 0.429046 0.755146 0.970290
Matlab* Analog:>> kaiser(8,7/2)'

Statistical Functions
This section describes the Intel IPP functions that compute the vector measure values: maximum, minimum,
mean, and standard deviation.

Sum
Computes the sum of the elements of a vector.

183

1

Intel® Integrated Performance Primitives Developer Guide and Reference

SyntaxIppStatus ippsSum_32f(const Ipp32f* pSrc, int len, Ipp32f* pSum, IppHintAlgorithmhint);
IppStatus ippsSum_32fc(const Ipp32fc* pSrc, int len, Ipp32fc* pSum, IppHintAlgorithmhint);
IppStatus ippsSum_64f(const Ipp64f* pSrc, int len, Ipp64f* pSum);
IppStatus ippsSum_64fc(const Ipp64fc* pSrc, int len, Ipp64fc* pSum);
IppStatus ippsSum_16s_Sfs(const Ipp16s* pSrc, int len, Ipp16s* pSum, int scaleFactor);
IppStatus ippsSum_32s_Sfs(const Ipp32s* pSrc, int len, Ipp32s* pSum, int scaleFactor);
IppStatus ippsSum_16s32s_Sfs(const Ipp16s* pSrc, int len, Ipp32s* pSum, int
scaleFactor);
IppStatus ippsSum_16sc_Sfs(const Ipp16sc* pSrc, int len, Ipp16sc* pSum, int
scaleFactor);
IppStatus ippsSum_16sc32sc_Sfs(const Ipp16sc* pSrc, int len, Ipp32sc* pSum, int
scaleFactor);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc

Pointer to the source vector.

pSum

Pointer to the output result.

len

Number of elements in the vector.

hintscaleFactor

Suggests using specific code. The possible values for the hintargument are described in Hint Arguments.
Scale factor, refer to Integer Scaling.

Description
This function computes the sum of the elements of the vector pSrc and stores the result in pSum.
The sum of the elements of pSrc is defined by the formula:

184

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

The hint argument suggests using specific code, either faster but less accurate calculation, or more accurate
but slower calculation.
When computing the sum of integer numbers, the output result can exceed the data range and become
saturated. To get a precise result, use the scale factor. The scaling is performed in accordance with thescaleFactor value.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pSum or pSrc pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

ExampleThe example below shows how to use the function ippsSum.

void sum(void) {Ipp16s x[4] = {-32768, 32767, 32767, 32767}, sm;
ippsSum_16s_Sfs(x, 4, &sm, 1);
printf_16s("sum =", &sm, 1, ippStsNoErr);}
Output:sum = 32766
Matlab* Analog:>> x = [-32768, 32767, 32767, 32767]; sum(x)/2Max
Returns the maximum value of a vector.

SyntaxIppStatus ippsMax_16s(const Ipp16s* pSrc, int len, Ipp16s* pMax);
IppStatus ippsMax_32s(const Ipp32s* pSrc, int len, Ipp32s* pMax);
IppStatus ippsMax_32f(const Ipp32f* pSrc, int len, Ipp32f* pMax);
IppStatus ippsMax_64f(const Ipp64f* pSrc, int len, Ipp64f* pMax);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc

Pointer to the source vector.

pMax

Pointer to the output result.

len

Number of elements in the vector

185

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Description
This function returns the maximum value of the input vector pSrc, and stores the result in pMax.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pMax or pSrc pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

MaxIndx
Returns the maximum value of a vector and the index
of the maximum element.

SyntaxIppStatus ippsMaxIndx_16s(const Ipp16s* pSrc, int len, Ipp16s* pMax, int* pIndx);
IppStatus ippsMaxIndx_32s(const Ipp32s* pSrc, int len, Ipp32s* pMax, int* pIndx);
IppStatus ippsMaxIndx_32f(const Ipp32f* pSrc, int len, Ipp32f* pMax, int* pIndx);
IppStatus ippsMaxIndx_64f(const Ipp64f* pSrc, int len, Ipp64f* pMax, int* pIndx);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc

Pointer to the source vector.

pMax

Pointer to the output result.

len

Number of elements in the vector.

pIndx

Pointer to the index value of the maximum element.

Description
This function returns the maximum value of the input vector pSrc, and stores the result in pMax. If pIndx is
not a NULL pointer, the function returns the index of the maximum element and stores it in pIndx. If there
are several equal maximum elements, the first index from the beginning is returned.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

186

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

ExampleThe code example below demonstrates how to use the function ippsMaxIndx.

Ipp16s src[] = { 1, -2, 3, 8, -6 };Ipp16s max;
int len = 5;
int indx;
ippsMaxIndx_16s ( src, len, &max, &indx );Result:max = 8indx = 3

MaxAbsReturns the maximum absolute value of a vector.

SyntaxIppStatus ippsMaxAbs_16s(const Ipp16s* pSrc, int len, Ipp16s* pMaxAbs);
IppStatus ippsMaxAbs_32s(const Ipp32s* pSrc, int len, Ipp32s* pMaxAbs);
IppStatus ippsMaxAbs_32f(const Ipp32f* pSrc, int len, Ipp32f* pMaxAbs);
IppStatus ippsMaxAbs_64f(const Ipp64f* pSrc, int len, Ipp64f* pMaxAbs);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc

Pointer to the source vector.

pMaxAbs

Pointer to the output result.

len

Number of elements in the vector.

Description
This function returns the maximum absolute value of the input vector pSrc, and stores the result in
pMaxAbs.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pMaxAbs or pSrc pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

187

1

Intel® Integrated Performance Primitives Developer Guide and Reference

ExampleThe example below shows how to use the function ippsMaxAbs_16s.

Ipp16s src[5] = { 2, -8, -3, -1, 7 };Ipp16s maxAbs;
ippsMaxAbs_16s ( src, 5, &maxAbs );Result:maxAbs = 8

MaxAbsIndx
Returns the maximum absolute value of a vector andthe index of the corresponding element.

SyntaxIppStatus ippsMaxAbsIndx_16s(const Ipp16s* pSrc, int len, Ipp16s* pMaxAbs, int* pIndx);
IppStatus ippsMaxAbsIndx_32s(const Ipp32s* pSrc, int len, Ipp32s* pMaxAbs, int* pIndx);
IppStatus ippsMaxAbsIndx_32f(const Ipp32f* pSrc, int len, Ipp32f* pMaxAbs, int*
pIndx);IppStatus ippsMaxAbsIndx_64f(const Ipp64f* pSrc, int len, Ipp64f* pMaxAbs, int*
pIndx);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc

Pointer to the source vector.

pMaxAbs

Pointer to the output result.

len

Number of elements in the vector.

pIndx

Pointer to the index value of the maximum element.

Description
This function returns the maximum absolute value pMaxAbs of the input vector pSrc, and the index of thecorresponding element pIndx. If there are several elements with the equal maximum absolute value, thefirst index from the beginning is returned.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

188

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Min
Returns the minimum value of a vector.

SyntaxIppStatus ippsMin_16s(const Ipp16s* pSrc, int len, Ipp16s* pMin);
IppStatus ippsMin_32s(const Ipp32s* pSrc, int len, Ipp32s* pMin);
IppStatus ippsMin_32f(const Ipp32f* pSrc, int len, Ipp32f* pMin);
IppStatus ippsMin_64f(const Ipp64f* pSrc, int len, Ipp64f* pMin);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc

Pointer to the source vector.

pMin

Pointer to the output result.

len

Number of elements in the vector.

Description
This function returns the minimum value of the input vector pSrc, and stores the result in pMin.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pMin or pSrc pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

ExampleThe example below shows how to use the function ippsMin.

Ipp16s src = { 1, -2, 3, 8, -6};
Ipp16s min;int len = 5;
ippsMin_16s (src, len, &min );Result:min = -6

MinIndx
Returns the minimum value of a vector and the index
of the minimum element.

SyntaxIppStatus ippsMinIndx_16s(const Ipp16s* pSrc, int len, Ipp16s* pMin, int* pIndx);
IppStatus ippsMinIndx_32s(const Ipp32s* pSrc, int len, Ipp32s* pMin, int* pIndx);189

1Intel® Integrated Performance Primitives Developer Guide and Reference

IppStatus ippsMinIndx_32f(const Ipp32f* pSrc, int len, Ipp32f* pMin, int* pIndx);
IppStatus ippsMinIndx_64f(const Ipp64f* pSrc, int len, Ipp64f* pMin, int* pIndx);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc

Pointer to the source vector.

pMin

Pointer to the output result.

len

Number of elements in the vector.

pIndx

Pointer to the index value of the minimum element.

Description
This function returns the minimum value of the input vector pSrc and stores the result in pMin. If pIndx is
not a NULL pointer, the function returns the index of the minimum element and stores it in pIndx. If there
are several equal minimum elements, the first index from the beginning is returned.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pMin or pSrc pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

MinAbsReturns the minimum absolute value of a vector.

SyntaxIppStatus ippsMinAbs_16s(const Ipp16s* pSrc, int len, Ipp16s* pMinAbs);
IppStatus ippsMinAbs_32s(const Ipp32s* pSrc, int len, Ipp32s* pMinAbs);
IppStatus ippsMinAbs_16f(const Ipp16f* pSrc, int len, Ipp16f* pMinAbs);
IppStatus ippsMinAbs_32f(const Ipp32f* pSrc, int len, Ipp32f* pMinAbs);
IppStatus ippsMinAbs_64f(const Ipp64f* pSrc, int len, Ipp64f* pMinAbs);

Include Files
ipps.hParameters
pSrc

Pointer to the source vector.

pMinAbs

Pointer to the output result.

190

Developer Guide and Reference for Intel® Integrated Performance Primitiveslen1

Number of elements in the vector.

Description
This function returns the minimum absolute value of the input vector pSrc, and stores the result in pMinAbs.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pMinAbs or pSrc pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

MinAbsIndx
Returns the minimum absolute value of a vector andthe index of the corresponding element.

SyntaxIppStatus ippsMinAbsIndx_16s(const Ipp16s* pSrc, int len, Ipp16s* pMinAbs, int* pIndx);
IppStatus ippsMinAbsIndx_32s(const Ipp32s* pSrc, int len, Ipp32s* pMinAbs, int* pIndx);
IppStatus ippsMinAbsIndx_32f(const Ipp32f* pSrc, int len, Ipp32f* pMinAbs, int* pIndx);
IppStatus ippsMinAbsIndx_64f(const Ipp64f* pSrc, int len, Ipp64f* pMinAbs, int* pIndx);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc

Pointer to the source vector.

pMinAbs

Pointer to the output result.

len

Number of elements in the vector.

pIndx

Pointer to the index value of the corresponding element.

Description
This function returns the minimum absolute value pMinAbs of the input vector pSrc, and the index of thecorresponding element pIndx. If there are several elements with equal maximum absolute value, the firstindex from the beginning is returned.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

191

1

Intel® Integrated Performance Primitives Developer Guide and Reference

MinMaxReturns the maximum and minimum values of avector.

SyntaxIppStatus ippsMinMax_8u(const Ipp8u* pSrc, int len, Ipp8u* pMin, Ipp8u* pMax);
IppStatus ippsMinMax_16u(const Ipp16u* pSrc, int len, Ipp16u* pMin, Ipp16u* pMax);
IppStatus ippsMinMax_16s(const Ipp16s* pSrc, int len, Ipp16s* pMin, Ipp16s* pMax);
IppStatus ippsMinMax_32u(const Ipp32u* pSrc, int len, Ipp32u* pMin, Ipp32u* pMax);
IppStatus ippsMinMax_32s(const Ipp32s* pSrc, int len, Ipp32s* pMin, Ipp32s* pMax);
IppStatus ippsMinMax_32f(const Ipp32f* pSrc, int len, Ipp32f* pMin, Ipp32f* pMax);
IppStatus ippsMinMax_64f(const Ipp64f* pSrc, int len, Ipp64f* pMin, Ipp64f* pMax);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc

Pointer to the source vector.

pMin

Pointer to the minimum value.

pMax

Pointer to the maximum value.

len

Number of elements in the vector.

Description
This function returns the minimum and maximum values of the input vector pSrc, and stores the results in

pMin and pMax, respectively.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pMin or pSrc pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

MinMaxIndx
Returns the maximum and minimum values of avector and the indexes of the corresponding elements.

SyntaxIppStatus ippsMinMaxIndx_8u(const Ipp8u* pSrc, int len, Ipp8u* pMin, int* pMinIndx,
Ipp8u* pMax, int* pMaxIndx);
IppStatus ippsMinMaxIndx_16u(const Ipp16u* pSrc, int len, Ipp16u* pMin, int* pMinIndx,
Ipp16u* pMax, int* pMaxIndx);192

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

IppStatus ippsMinMaxIndx_16s(const Ipp16s* pSrc, int len, Ipp16s* pMin, int* pMinIndx,
Ipp16s* pMax, int* pMaxIndx);
IppStatus ippsMinMaxIndx_32u(const Ipp32u* pSrc, int len, Ipp32u* pMin, int* pMinIndx,
Ipp32u* pMax, int* pMaxIndx);
IppStatus ippsMinMaxIndx_32s(const Ipp32s* pSrc, int len, Ipp32s* pMin, int* pMinIndx,
Ipp32s* pMax, int* pMaxIndx);
IppStatus ippsMinMaxIndx_32f(const Ipp32f* pSrc, int len, Ipp32f* pMin, int* pMinIndx,
Ipp32f* pMax, int* pMaxIndx);
IppStatus ippsMinMaxIndx_64f(const Ipp64f* pSrc, int len, Ipp64f* pMin, int* pMinIndx,
Ipp64f* pMax, int* pMaxIndx);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc

Pointer to the source vector.

pMin

Pointer to the minimum value.

pMax

Pointer to the maximum value.

len

Number of elements in the vector.

pMinIndx

Pointer to the index value of the minimum element.

pMaxIndx

Pointer to the index value of the maximum element.

Description
This function returns the minimum and maximum values of the input vector pSrc and stores the result inpMin and pMax, respectively. The function also returns the indexes of the minimum and maximum elements
and stores them in pMinIndx and pMaxIndx, respectively. If there are several equal minimum or maximum
elements, the first index from the beginning is returned.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when any of the specified pointers is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

ReplaceNAN
Replaces not-a-number (NaN) values of vector
elements with a constant value.

SyntaxIppStatus ippsReplaceNAN_32f_I(Ipp32f* pSrcDst, int len, Ipp32f value);
IppStatus ippsReplaceNAN_64f_I(Ipp64f* pSrcDst, int len, Ipp64f value);193

1Intel® Integrated Performance Primitives Developer Guide and Reference

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrcDstPointer to the source and destination vector.

len

Number of elements in the vector.

valueConstant value to be assigned to NaN elements of the vector.

Description
This function replaces not-a-number (NaN) elements of the source vector with value, other vector elements
remain unchanged:

pSrcDst[i] = (pSrcDst[i] == NAN) ? value : pSrcDst[i]Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrcDst is NULL.

ippStsSizeErr

Indicates an error when len is less than, or equal to zero.

Mean
Computes the mean value of a vector.

SyntaxIppStatus ippsMean_32f(const Ipp32f* pSrc, int len, Ipp32f* pMean, IppHintAlgorithmhint);
IppStatus ippsMean_32fc(const Ipp32fc* pSrc, int len, Ipp32fc* pMean, IppHintAlgorithmhint);
IppStatus ippsMean_64f(const Ipp64f* pSrc, int len, Ipp64f* pMean);
IppStatus ippsMean_64fc(const Ipp64fc* pSrc, int len, Ipp64fc* pMean);
IppStatus ippsMean_16s_Sfs(const Ipp16s* pSrc, int len, Ipp16s* pMean, int
scaleFactor);
IppStatus ippsMean_32s_Sfs(const Ipp32s* pSrc,int len,Ipp32s* pMean,int scaleFactor);
IppStatus ippsMean_16sc_Sfs(const Ipp16sc* pSrc, int len, Ipp16sc* pMean, int
scaleFactor);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.h

194

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Libraries: ippcore.lib, ippvm.lib

Parameters
pSrc

Pointer to the source vector.

pMean

Pointer to the output result.

len

Number of elements in the vector

hintscaleFactor

Suggests using specific code. The possible values for the hintargument are described in Hint Arguments.
Scale factor, refer to Integer Scaling.

Description
This function computes the mean (average) of the vector pSrc, and stores the result in pMean. The mean ofpSrc is defined by the formula:1mean = len

len − 1

∑ pSrc nn=0

The hint argument suggests using specific code, either faster but less accurate calculation, or more accurate
but slower calculation.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pMean or pSrc pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

ExampleThe example below shows how to use the function ippsMean_32f

void mean(void) {Ipp32f *x = ippsMalloc_32f(1000), mean;
int i;
for(i = 0; i<1000; ++i) x[i] = (float)rand() / RAND_MAX;
ippsMean_32f(x, 1000, &mean, ippAlgHintFast);
printf_32f("mean =", &mean, 1, ippStsNoErr);
ippsFree(x);}Output:mean = 0.492591
Matlab* Analog:>> x = rand(1,1000); mean(x)StdDevComputes the standard deviation value of a vector.

SyntaxIppStatus ippsStdDev_32f(const Ipp32f* pSrc, int len, Ipp32f* pStdDev, IppHintAlgorithmhint);
IppStatus ippsStdDev_64f(const Ipp64f* pSrc, int len, Ipp64f* pStdDev);

195

1

Intel® Integrated Performance Primitives Developer Guide and Reference

IppStatus ippsStdDev_16s_Sfs(const Ipp16s* pSrc, int len, Ipp16s* pStdDev, int
scaleFactor);
IppStatus ippsStdDev_16s32s_Sfs(const Ipp16s* pSrc, int len, Ipp32s* pStdDev, int
scaleFactor);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc

Pointer to the source vector.

pStdDev

Pointer to the output result.

len

Number of elements in the vector.
Suggests using specific code. The possible values for the hintargument are described in Hint Arguments.
Scale factor, refer to Integer Scaling.

hint
scaleFactor

Description
This function computes the standard deviation of the input vector pSrc, and stores the result in pStdDev.
The vector length can not be less than 2. The standard deviation of pSrc is defined by the unbiased estimate
formula:len − 1

stdDev =∑n=0

pSrc n − mean pSrc

2

len − 1

The hint argument suggests using specific code, either faster but less accurate calculation, or more accurate
but slower calculation.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pStdDev or pSrc pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 1.

ExampleThe example below shows how to use the function ippsStdDev_32f.

void stdev(void) {Ipp32f *x = ippsMalloc_32f(1000), stdev;
int i;for (i = 0; i<1000; ++i) x[i] = (float)rand() / RAND_MAX;
ippsStdDev_32f(x, 1000, &stdev, ippAlgHintFast);

196

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

printf_32f("stdev =", &stdev, 1, ippStsNoErr);
ippsFree(x);}Output:stdev = 0.286813
Matlab* Analog:>> x = rand(1,1000); std(x)MeanStdDev
Computes the mean value and the standard deviation
value of a vector.

SyntaxIppStatus ippsMeanStdDev_32f(const Ipp32f* pSrc, int len, Ipp32f* pMean, Ipp32f*
pStdDev, IppHintAlgorithm hint);
IppStatus ippsMeanStdDev_64f(const Ipp64f* pSrc, int len, Ipp64f* pMean, Ipp64f*
pStdDev);
IppStatus ippsMeanStdDev_16s_Sfs(const Ipp16s* pSrc, int len, Ipp16s* pMean, Ipp16s*
pStdDev, int scaleFactor);
IppStatus ippsMeanStdDev_16s32s_Sfs(const Ipp16s* pSrc, int len, Ipp32s* pMean, Ipp32s*
pStdDev, int scaleFactor);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc

Pointer to the source vector.

pMean

Pointer to the output result - mean value.

pStdDev

Pointer to the output result - standard deviation.

len

Number of elements in the vector

hintscaleFactor

Suggests using specific code. The possible values for the hintargument are described in Hint Arguments.
Scale factor, refer to Integer Scaling.

Description
This function computes both the mean value and the standard deviation of the input vector pSrc, and storesthe results in pMean and pStdDev respectively. The vector length can not be less than 2. The mean of pSrc
is defined by the formula:

197

1

Intel® Integrated Performance Primitives Developer Guide and Reference

The standard deviation of pSrc is defined by the unbiased estimate formula:

The hint argument suggests using specific code, either faster but less accurate calculation, or more accurate
but slower calculation.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 1.

Norm
Computes the C, L1, L2, or L2Sqr norm of a vector.

SyntaxIppStatus ippsNorm_Inf_32f(const Ipp32f* pSrc, int len, Ipp32f* pNorm);
IppStatus ippsNorm_Inf_64f(const Ipp64f* pSrc, int len, Ipp64f* pNorm);
IppStatus ippsNorm_Inf_16s32f(const Ipp16s* pSrc, int len, Ipp32f* pNorm);
IppStatus ippsNorm_Inf_32fc32f(const Ipp32fc* pSrc, int len, Ipp32f* pNorm);
IppStatus ippsNorm_Inf_64fc64f(const Ipp64fc* pSrc, int len, Ipp64f* pNorm);
IppStatus ippsNorm_L1_32f(const Ipp32f* pSrc, int len, Ipp32f* pNorm);
IppStatus ippsNorm_L1_64f(const Ipp64f* pSrc, int len, Ipp64f* pNorm);
IppStatus ippsNorm_L1_16s32f(const Ipp16s* pSrc, int len, Ipp32f* pNorm);
IppStatus ippsNorm_L1_32fc64f(const Ipp32fc* pSrc, int len, Ipp64f* pNorm);
IppStatus ippsNorm_L1_64fc64f(const Ipp64fc* pSrc, int len, Ipp64f* pNorm);
IppStatus ippsNorm_L2_32f(const Ipp32f* pSrc, int len, Ipp32f* pNorm);
IppStatus ippsNorm_L2_64f(const Ipp64f* pSrc, int len, Ipp64f* pNorm);
IppStatus ippsNorm_L2_16s32f(const Ipp16s* pSrc, int len, Ipp32f* pNorm);
IppStatus ippsNorm_L2_32fc64f(const Ipp32fc* pSrc, int len, Ipp64f* pNorm);
IppStatus ippsNorm_L2_64fc64f(const Ipp64fc* pSrc, int len, Ipp64f* pNorm);
IppStatus ippsNorm_L2Sqr_16s64s_Sfs(const Ipp16s* pSrc, int len, Ipp64s* pNorm, int
scaleFactor);
IppStatus ippsNorm_L2Sqr_16s64s_Sfs(const Ipp16s* pSrc, int len, Ipp64s* pNorm, int
scaleFactor);
IppStatus ippsNorm_Inf_16s32s_Sfs(const Ipp16s* pSrc, int len, Ipp32s* pNorm, int
scaleFactor);

198

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

IppStatus ippsNorm_L1_16s32s_Sfs(const Ipp16s* pSrc, int len, Ipp32s* pNorm, int
scaleFactor);
IppStatus ippsNorm_L1_16s64s_Sfs(const Ipp16s* pSrc, int len, Ipp64s* pNorm, int
scaleFactor);
IppStatus ippsNorm_L2_16s32s_Sfs(const Ipp16s* pSrc, int len, Ipp32s* pNorm, int
scaleFactor);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc

Pointer to the source vector.

pNorm

Pointer to the output result.

len

Number of elements in the vector.

scaleFactor

Scale factor, refer to Integer Scaling.

Description
This function computes the C, L1, L2, or L2Sqr norm of the source vector pSrc and stores the result inpNorm.

ippsNorm_Inf.The function ippsNorm_Inf computes the C norm defined by the formula:ippsNorm_L1. The function ippsNorm_L1 computes the L1 norm defined by the formula:ippsNorm_L2. The function ippsNorm_L2 computes the L2 norm defined by the formula:ippsNorm_L2Sqr. The function ippsNorm_L2Sqr computes the L2Sqr norm defined as square of the L2
norm.
Functions with Sfs suffixes perform scaling of the result value in accordance with the scaleFactor value.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pSrc or pNorm pointer is NULL.

199

1

Intel® Integrated Performance Primitives Developer Guide and ReferenceippStsSizeErr

Indicates an error when len is less than or equal to 0.

NormDiff
Computes the C, L1, L2, or L2Sqr norm of two vectors'
difference.

SyntaxIppStatus ippsNormDiff_Inf_32f(const Ipp32f* pSrc1, const Ipp32f* pSrc2, int len,
Ipp32f* pNorm);
IppStatus ippsNormDiff_Inf_64f(const Ipp64f* pSrc1, const Ipp64f* pSrc2, int len,
Ipp64f* pNorm);
IppStatus ippsNormDiff_Inf_16s32f(const Ipp16s* pSrc1, const Ipp16s* pSrc2, int len,
Ipp32f* pNorm);
IppStatus ippsNormDiff_Inf_32fc32f(const Ipp32fc* pSrc1, const Ipp32fc* pSrc2, int len,
Ipp32f* pNorm);
IppStatus ippsNormDiff_Inf_64fc64f(const Ipp64fc* pSrc1, const Ipp64fc* pSrc2, int len,
Ipp64f* pNorm);
IppStatus ippsNormDiff_L1_32f(const Ipp32f* pSrc1, const Ipp32f* pSrc2, int len,
Ipp32f* pNorm);
IppStatus ippsNormDiff_L1_64f(const Ipp64f* pSrc1, const Ipp64f* pSrc2, int len,
Ipp64f* pNorm);
IppStatus ippsNormDiff_L1_16s32f(const Ipp16s* pSrc1, const Ipp16s* pSrc2, int len,
Ipp32f* pNorm);
IppStatus ippsNormDiff_L1_32fc64f(const Ipp32fc* pSrc1, const Ipp32fc* pSrc2, int len,
Ipp64f* pNorm);
IppStatus ippsNormDiff_L1_64fc64f(const Ipp64fc* pSrc1, const Ipp64fc* pSrc2, int len,
Ipp64f* pNorm);
IppStatus ippsNormDiff_L2_32f(const Ipp32f* pSrc1, const Ipp32f* pSrc2, int len,
Ipp32f* pNorm);
IppStatus ippsNormDiff_L2_64f(const Ipp64f* pSrc1, const Ipp64f* pSrc2, int len,
Ipp64f* pNorm);
IppStatus ippsNormDiff_L2_16s32f(const Ipp16s* pSrc1, const Ipp16s* pSrc2, int len,
Ipp32f* pNorm);
IppStatus ippsNormDiff_L2_32fc64f(const Ipp32fc* pSrc1, const Ipp32fc* pSrc2, int len,
Ipp64f* pNorm);
IppStatus ippsNormDiff_L2_64fc64f(const Ipp64fc* pSrc1, const Ipp64fc* pSrc2, int len,
Ipp64f* pNorm);
IppStatus ippsNormDiff_L2Sqr_16s64s_Sfs(const Ipp16s* pSrc1, const Ipp16s* pSrc2, intlen, Ipp64s* pNorm, int scaleFactor);
IppStatus ippsNormDiff_Inf_16s32s_Sfs(const Ipp16s* pSrc1, const Ipp16s* pSrc2, intlen, Ipp32s* pNorm, int scaleFactor);
IppStatus ippsNormDiff_L1_16s32s_Sfs(const Ipp16s* pSrc1, const Ipp16s* pSrc2, int len,
Ipp32s* pNorm, int scaleFactor);200

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

IppStatus ippsNormDiff_L1_16s64s_Sfs(const Ipp16s* pSrc1, const Ipp16s* pSrc2, int len,
Ipp64s* pNorm, int scaleFactor);
IppStatus ippsNormDiff_L2_16s32s_Sfs(const Ipp16s* pSrc1, const Ipp16s* pSrc2, int len,
Ipp32s* pNorm, int scaleFactor);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc1, pSrc2

Pointers to the two source vectors; pSrc2 can be NULL.

pNorm

Pointer to the output result.

len

Number of elements in the vector.

scaleFactor

Scale factor, refer to Integer Scaling.

Description
This function computes the C, L1, L2, or L2Sqr norm of the source vectors' difference, and stores the resultin pNorm.

ippsNormDiff_Inf. The function ippsNormDiff_Inf computes the C norm defined by the formula:ippsNormDiff_L1. The function ippsNormDiff_L1 computes the L1 norm defined by the formula:ippsNormDiff_L2. The function ippsNormDiff_L2 computes the L2 norm defined by the formula:ippsNormDiff_L2Sqr. The function ippsNormDiff_L2Sqr computes the L2Sqr norm defined as square of
the L2 norm.
Functions with Sfs suffixes perform scaling of the result value in accordance with the scaleFactor value.

201

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pSrc1, pSrc2, or pNorm pointer is
NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

ExampleThe example below shows how to use the function ippsNormDiff.

int norm( void ) {Ipp16s x[LEN];
Ipp32f Norm[3];IppStatus st;
int i;
for( i=0; i<LEN; ++i ) x[i] = (Ipp16s)rand();ippsNormDiff_Inf_16s32f( x, 0, LEN, Norm );ippsNormDiff_L1_16s32f( x, 0, LEN, Norm+1 );st = ippsNormDiff_L2_16s32f( x, 0, LEN, Norm+2 );printf_32f("Norm (oo,L1,L2) =", Norm, 3, st );return Norm[2] <= Norm[1] && Norm[1] <= LEN*Norm[0];}Output:Norm (oo,L1,L2) = 31993.000000 1526460.000000 180270.781250
Matlab* analog:>> x = 32767*rand(1,100);norm(x,inf),norm(x,1),norm(x,2)

DotProd
Computes the dot product of two vectors.

SyntaxIppStatus ippsDotProd_32f(const Ipp32f* pSrc1, const Ipp32f* pSrc2, int len, Ipp32f*
pDp);
IppStatus ippsDotProd_32fc(const Ipp32fc* pSrc1, const Ipp32fc* pSrc2, int len,
Ipp32fc* pDp);
IppStatus ippsDotProd_32f32fc(const Ipp32f* pSrc1, const Ipp32fc* pSrc2, int len,
Ipp32fc* pDp);
IppStatus ippsDotProd_32f64f(const Ipp32f* pSrc1, const Ipp32f* pSrc2, int len, Ipp64f*
pDp);
IppStatus ippsDotProd_32fc64fc(const Ipp32fc* pSrc1, const Ipp32fc* pSrc2, int len,
Ipp64fc* pDp);
IppStatus ippsDotProd_32f32fc64fc(const Ipp32f* pSrc1, const Ipp32fc* pSrc2, int len,
Ipp64fc* pDp);
IppStatus ippsDotProd_64f(const Ipp64f* pSrc1, const Ipp64f* pSrc2, int len, Ipp64f*
pDp);
IppStatus ippsDotProd_64fc(const Ipp64fc* pSrc1, const Ipp64fc* pSrc2, int len,
Ipp64fc* pDp);
IppStatus ippsDotProd_64f64fc(const Ipp64f* pSrc1, const Ipp64fc* pSrc2, int len,
Ipp64fc* pDp);202

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

IppStatus ippsDotProd_16s64s(const Ipp16s* pSrc1, const Ipp16s* pSrc2, int len, Ipp64s*
pDp);
IppStatus ippsDotProd_16sc64sc(const Ipp16sc* pSrc1, const Ipp16sc* pSrc2, int len,
Ipp64sc* pDp);
IppStatus ippsDotProd_16s16sc64sc(const Ipp16s* pSrc1, const Ipp16sc* pSrc2, int len,
Ipp64sc* pDp);
IppStatus ippsDotProd_16s32f(const Ipp16s* pSrc1, const Ipp16s* pSrc2, int len, Ipp32f*
pDp);
IppStatus ippsDotProd_32s_Sfs(const Ipp32s* pSrc1, const Ipp32s* pSrc2, int len,
Ipp32s* pDp, int scaleFactor);
IppStatus ippsDotProd_16s32s_Sfs(const Ipp16s* pSrc1, const Ipp16s* pSrc2, int len,
Ipp32s* pDp, int scaleFactor);
IppStatus ippsDotProd_16s32s32s_Sfs(const Ipp16s* pSrc1, const Ipp32s* pSrc2, int len,
Ipp32s* pDp, int scaleFactor);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc1

Pointer to the first vector to compute the dot product value.

pSrc2

Pointer to the second vector to compute the dot product value.

pDp

Pointer to the output result.

len

Number of elements in the vector.

scaleFactor

Scale factor, refer to Integer Scaling.

Description
This function computes the dot product (scalar value) of two vectors, pSrc1 and pSrc2, and stores the resultin pDp.
The computation is performed as follows:dp =len − 1

∑ pSrc1 n * pSrc2 nn=0

To compute the dot product of complex data, use the function ippsConj to conjugate one of the operands.
The vectors pSrc1 and pSrc2 must be of equal length.

Return Values
ippStsNoErr
ippStsNullPtrErr

Indicates no error.
Indicates an error when the pDp, pSrc1, or pSrc2 pointer is

NULL.

203

1

Intel® Integrated Performance Primitives Developer Guide and ReferenceippStsSizeErr

Indicates an error when len is less than or equal to 0.

ExampleThe example below shows how to use the function ippsDotProd_64f to verify orthogonality of the sine andcosine functions. Two vectors are orthogonal to each other when the dot product of the two vectors is zero.

void dotprod(void) {Ipp64f x[10], dp;
int n;for (n = 0; n<10; ++n) x[n] = sin(IPP_2PI * n / 8);
ippsDotProd_64f(x, x+2, 8, &dp);
printf_64f("dp =", &dp, 1, ippStsNoErr);}
Output:dp = 0.000000
Matlab* Analog:>> n = 0:9; x = sin(2*pi*n/8); a = x(1:8); b = x(3:10); a*b'

MaxEvery, MinEvery
Computes maximum or minimum value for each pairof elements of two vectors.

SyntaxIppStatus ippsMaxEvery_8u(const Ipp8u* pSrc1, const Ipp8u* pSrc2, Ipp8u* pDst, Ipp32u
len);
IppStatus ippsMaxEvery_16u(const Ipp16u* pSrc1, const Ipp16u* pSrc2, Ipp16u* pDst,
Ipp32u len);
IppStatus ippsMaxEvery_32f(const Ipp32f* pSrc1, const Ipp32f* pSrc2, Ipp32f* pDst,
Ipp32u len);
IppStatus ippsMaxEvery_64f(const Ipp64f* pSrc1, const Ipp64f* pSrc2, Ipp64f* pDst,
Ipp32u len);
IppStatus ippsMinEvery_8u(const Ipp8u* pSrc1, const Ipp8u* pSrc2, Ipp8u* pDst, Ipp32u
len);
IppStatus ippsMinEvery_16u(const Ipp16u* pSrc1, const Ipp16u* pSrc2, Ipp16u* pDst,
Ipp32u len);
IppStatus ippsMinEvery_32f(const Ipp32f* pSrc1, const Ipp32f* pSrc2, Ipp32f* pDst,
Ipp32u len);
IppStatus ippsMinEvery_64f(const Ipp64f* pSrc1, const Ipp64f* pSrc2, Ipp64f* pDst,
Ipp32u len);
IppStatus ippsMaxEvery_8u_I(const Ipp8u* pSrc, Ipp8u* pSrcDst, int len);
IppStatus ippsMaxEvery_16u_I(const Ipp16u* pSrc, Ipp16u* pSrcDst, int len);
IppStatus ippsMaxEvery_16s_I(const Ipp16s* pSrc, Ipp16s* pSrcDst, int len);
IppStatus ippsMaxEvery_32s_I(const Ipp32s* pSrc, Ipp32s* pSrcDst, int len);
IppStatus ippsMaxEvery_32f_I(const Ipp32f* pSrc, Ipp32f* pSrcDst, int len);
IppStatus ippsMaxEvery_64f_I(const Ipp64f* pSrc, Ipp64f* pSrcDst, Ipp32u len);204

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

IppStatus ippsMinEvery_8u_I(const Ipp8u* pSrc, Ipp8u* pSrcDst, int len);
IppStatus ippsMinEvery_16u_I(const Ipp16u* pSrc, Ipp16u* pSrcDst, int len);
IppStatus ippsMinEvery_16s_I(const Ipp16s* pSrc, Ipp16s* pSrcDst, int len);
IppStatus ippsMinEvery_32s_I(const Ipp32s* pSrc, Ipp32s* pSrcDst, int len);
IppStatus ippsMinEvery_32f_I(const Ipp32f* pSrc, Ipp32f* pSrcDst, int len);
IppStatus ippsMinEvery_64f_I(const Ipp64f* pSrc, Ipp64f* pSrcDst, Ipp32u len);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc, pSrc1, pSrc2

Pointer to the input vector.

pSrcDst, pDst

Pointer to the vector which stores the result.

len

Number of elements in the vector.

Description
This function computes the maximum between each pair of corresponding elements of two input vectors andstores the result in pSrcDst.
This function computes minimum values likewise.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pSrc or pSrcDst pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

ZeroCrossing
Computes specific zero crossing measure.

SyntaxIppStatus ippsZeroCrossing_16s32f(const Ipp16s* pSrc, Ipp32u len, Ipp32f* pValZCR,
IppsZCType zcType);
IppStatus ippsZeroCrossing_32f(const Ipp32f* pSrc, Ipp32u len, Ipp32f* pValZCR,
IppsZCType zcType);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

205

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Parameters
pSrc

Pointer to the source vector.

len

Number of elements in the vector.

pValZCR

Pointer to the output value of the zero crossing measure.

zcTypeType of the zero crossing measure, possible values are
ippsZCR, ippsZCXor or ippsZCC.

Description
This function computes specific zero crossing measure according to the parameter zcType. The result of zerocrossing measurement is stored in pValZCR. The calculations are performed in accordance with the formulas
below.
If zcType = ippZCR, the function uses the following formula:

If zcType = ippZCXor, the function uses the following formula:

If zcType = ippZCC, the function uses the following formula:

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pSrc or pValZCR pointer is NULL.

206

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

ippStsRangeErr

Indicates an error when zcType has an invalid value.

CountInRange
Computes the number of elements of the vector
whose values are in the specified range.

SyntaxIppStatus ippsCountInRange_32s(const Ipp32s* pSrc, int len, int* pCounts, Ipp32s
lowerBound, Ipp32s upperBound);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc

Pointer to the first input vector.

pCounts

Pointer to the second input vector which stores the result.

len

Number of elements in the vector.

lowerBound

Lower boundary of the range.

upperBound

Upper boundary of the range.

Description
This function computes the number of elements of the vector pSrc whose values are in the range
lowerBound < pSrc[n] < upperBound. The total number of such elements are stored in the pCounts.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pSrc or pSCounts pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

Sampling Functions
The functions described in this section manipulate signal samples. Sampling functions are used to change thesampling rate of the input signal and thus to obtain the signal vector of a required length. The functions
perform the following operations:••

Insert zero-valued samples between neighboring samples of a signal (up-sample).
Remove samples from between neighboring samples of a signal (down-sample).

The upsampling and downsampling functions are used by some filtering functions described in Chapter 6.

SampleUp
Up-samples a signal, conceptually increasing its
sampling rate by an integer factor.

207

1

Intel® Integrated Performance Primitives Developer Guide and Reference

SyntaxIppStatus ippsSampleUp_16s (const Ipp16s* pSrc, int srcLen, Ipp16s* pDst, int* pDstLen,
int factor, int* pPhase);
IppStatus ippsSampleUp_32f (const Ipp32f* pSrc, int srcLen, Ipp32f* pDst, int* pDstLen,
int factor, int* pPhase);
IppStatus ippsSampleUp_64f (const Ipp64f* pSrc, int srcLen, Ipp64f* pDst, int* pDstLen,
int factor, int* pPhase);
IppStatus ippsSampleUp_16sc (const Ipp16sc* pSrc, int srcLen, Ipp16sc* pDst, int*
pDstLen, int factor, int* pPhase);
IppStatus ippsSampleUp_32fc (const Ipp32fc* pSrc, int srcLen, Ipp32fc* pDst, int*
pDstLen, int factor, int* pPhase);
IppStatus ippsSampleUp_64fc (const Ipp64fc* pSrc, int srcLen, Ipp64fc* pDst, int*
pDstLen, int factor, int* pPhase);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc

Pointer to the source array (the signal to be up-sampled).

srcLenNumber of samples in the source array pSrc.

pDst

Pointer to the destination array.

pDstLen

Pointer to the length of the destination array pDst.

factor

Factor by which the signal is up-sampled. That is, factor -1
zeros are inserted after each sample of the source array pSrc.

pPhasePointer to the input phase value which determines where eachsample from pSrc lies within each output block of factor
samples in pDst. The value of pPhase is required to be in therange [0; factor-1].

Description
This function up-samples the srcLen-length source array pSrc by factor factor with phase pPhase, andstores the result in the array pDst, ignoring its length value by the pDstLen address.
Up-sampling inserts factor-1 zeros between each sample of pSrc. The pPhase argument determines where
each sample from the input array lies within each output block of factor samples. The value of pPhase isrequired to be in the range [0; factor-1].
For example, if the input phase is 0, then every factor samples of the destination array begin with thecorresponding source array sample, the other factor-1 samples are equal to 0. The length of thedestination array is stored by the pDstLen address.

208

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

The pPhase value is the phase of an source array sample. It is also a returned output phase which can beused as an input phase for the first sample in the next block to process. Use pPhase for block mode
processing to get a continuous output signal.
The ippsSampleUp functionality can be described as follows:

pDst[factor* n + phase] = pSrc[n], 0 ≤ n < srcLen
pDst[factor* n + m] = 0, 0 ≤ n < srcLen, 0 ≤ m< factor, m ≠ phase
pDstLen = factor * srcLen.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if the pDst, pSrc, pDstLen, or pPhase pointeris NULL.

ippStsSizeErr

Indicates an error if srcLen is less than or equal to 0.

ippStsSampleFactorErr

Indicates an error if factor is less than or equal to 0.

ippStsSamplePhaseErr

Indicates an error when pPhase is negative, or bigger than orequal to factor.

SampleDown
Down-samples a signal, conceptually decreasing its
sampling rate by an integer factor.

SyntaxIppStatus ippsSampleDown_16s(const Ipp16s* pSrc, int srcLen, Ipp16s* pDst, int*
pDstLen, int factor, int* pPhase);
IppStatus ippsSampleDown_32f(const Ipp32f* pSrc, int srcLen, Ipp32f* pDst, int*
pDstLen, int factor, int* pPhase);
IppStatus ippsSampleDown_64f(const Ipp64f* pSrc, int srcLen, Ipp64f* pDst, int*
pDstLen, int factor, int* pPhase);
IppStatus ippsSampleDown_16sc(const Ipp16sc* pSrc, int srcLen, Ipp16sc* pDst, int*
pDstLen, int factor, int* pPhase);
IppStatus ippsSampleDown_32fc(const Ipp32fc* pSrc, int srcLen, Ipp32fc* pDst, int*
pDstLen, int factor, int* pPhase);
IppStatus ippsSampleDown_64fc(const Ipp64fc* pSrc, int srcLen, Ipp64fc* pDst, int*
pDstLen, int factor, int* pPhase);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

209

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Parameters

srcLenPointer to the source array holding the samples to be downsampled.
Number of samples in the input array pSrc.

pDst

Pointer to the destination array.

pDstLen

Pointer to the length of the destination array pDst.

pSrc

factorpPhaseFactor by which the signal is down-sampled. That is, factor - 1
samples are discarded from every block of factor samples in
pSrc.
Pointer to the input phase value that determines which of thesamples within each block of factor samples from pSrc is notdiscarded and copied to pDst. The value of pPhase is required
to be in the range [0; factor-1].

Description
This function down-samples the srcLen-length source array pSrc by factor factor with phase pPhase, andstores the result in the array pDst, ignoring its length value by the pDstLen address.
Down-sampling discards factor - 1 samples from pSrc, copying one sample from each block of factor
samples from pSrc to pDst. The pPhase argument determines which of the samples in each block is notdiscarded and where it lies within each input block of factor samples. The value of pPhase is required to bein the range [0; factor-1]. The length of the destination array is stored by the pDstLen address.
The pPhase value is the phase of an source array sample. It is also a returned output phase which can beused as an input phase for the first sample in the next block to process. Use pPhase for block mode
processing to get a continuous output signal.
You can use the FIR multi-rate filter to combine filtering and resampling, for example, for antialiasing filtering
before the sub-sampling procedure.
The ippsSampleDown functionality can be described as follows:

pDstLen= (srcLen+ factor - 1 - phase)/factor
pDst[n]= pSrc[factor * n + phase], 0 ≤ n < pDstLen
phase = (factor+ phase - srcLen %factor)%factor.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pDst, pSrc, pDstLen, or pPhase
pointer is NULL.

ippStsSizeErr

Indicates an error when srcLen is less than or equal to 0.

ippStsSampleFactorErr

Indicates an error when factor is less than or equal to 0.

ippStsSamplePhaseErr

Indicates an error when pPhase is negative, or bigger than orequal to factor.

210

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

ExampleThe example below shows how to use the function ippsSampleDown.

void sampling( void ) {Ipp16s x[8] = { 1,2,3,4,5,6,7,8 };Ipp16s y[8] = {9,10,11,12,13,14,15,16}, z[8];int dstLen1, dstLen2, phase = 2;
IppStatus st = ippsSampleDown_16s(x, 8, z, &dstLen1, 3, &phase);st = ippsSampleDown_16s(y, 8, z+dstLen1, &dstLen2, 3, &phase);printf_16s("down-sampling =", z, dstLen1+dstLen2, st);}
Output:down-sampling = 3 6 9 12 15

AI Inference Functions
This section describes the Intel IPP signal processing functions that are used in inference engines in the AI
field.

PatternMatchGetBufferSize
Computes the size of the work buffer for theippsPatternMatch function.

SyntaxIppStatus ippsPatternMatchGetBufferSize (int srcLen, int patternLen, int patternSize,
IppPatternMatchMode hint, int* bufSize);

Include Files
ipps.hParameters
srcLenNumber of patterns in the source array.

patternLen

Number of elements in the templates array.

patternSize

The size of a pattern, in bytes.

hint

Option to run specially optimized code branch, supported values:

ippPatternMatchAuto The function selects optimization
automatically.

ippPatternMatchDire The function uses direct method, no
additional memory is required.
ct
ippPatternMatchTabl The function uses conversion data forinternal representation and requires theememory buffer. Helps to achieve better
performance for a big set of input data.

bufSize

Size of the required buffer.

211

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Description
This function computes the size, in bytes, of the external work buffer needed for the ippsPatternMatchfunction. The result is stored in the bufSize parameter.

Return Values
ippStsNoErr
ippStsSizeErr

ippStsBadArg

Indicates no error.
Indicates an error when at least one of the srcLen, dstLen, or
patternSize values is less than, or equal to zero; orpatternSize is too big.
Indicates an error when the value of hint is not supported.

See Also
PatternMatch Compares given array of binary patterns with an array of templates.

PatternMatchCompares given array of binary patterns with an arrayof templates.

SyntaxIppStatus ippsPatternMatch_8u16u(const Ipp8u* pSrc, int srcStep, int srcLen, const
Ipp8u* pPattern, int patternStep, int patternLen, int patternSize, Ipp16u* pDst,
IppPatternMatchMode hint, int* pBufSize);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc

Pointer to the source array of patterns.

srcStep

Stride between patterns in the source array.

srcLenNumber of patterns in the source array.

pPattern

Pointer to the array of templates.

patternStep

Stride between templates.

patternLen

Number of elements in the array of templates.

patternSize

Size of a pattern, in bytes.

pDst

Pointer to the result of comparison.

hint

Option to run specially optimized code branch, supported values:

ippPatternMatchAuto The function selects optimization
automatically.

212

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

ippPatternMatchDire The function uses direct method, no
additional memory is required.
ct
ippPatternMatchTabl The function uses conversion data forinternal representation and requires theememory buffer. Helps to achieve better
performance for a big set of input data.

Pointer to the work buffer size. The length of the buffer is
srcLen*patternLen*sizeof(Ipp16u).

pBufSize

Description
This function compares a provided array of binary patterns with the array of templates. The pattern is anarray containing bits of fixed size (8/16/../128/256/512 bits). The pattern size provided to the function is
calculated in bytes. The template is some fixed pattern. The function compares the provided source patterns
with the existing templates grouped into an array. To compare patterns, the function performs bitwise XOR
operation between two patterns and calculates the number of resulting nonzero bits (population counter).
This operation is applied to all source and template patterns.
Returned sequence is:(patternLen = B, srcLen=A)
pat<0>^src<0>,…,
pat<1>^src<0>,…,
pat<B-1>^src<B-1>,…,

pat<0>^src<A-1>,
pat<1>^src<A-1>,…
pat<B-1>^src<A-1>,

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when at least one of the pointers is NULL.

ippStsSizeErr

ippStsBadArg

Indicates an error when at least one of the srcLen, dstLen, or
size values is less than, or equal to zero; or one of the sizevalues is too big.
Indicates an error when the value of hint is not supported.

Filtering Functions
This chapter describes the Intel® IPP functions that perform convolution and correlation operations, as well as
linear and non-linear filtering.

Convolution and Correlation Functions
Convolution is an operation used to define an output signal from any linear time-invariant (LTI) processor in
response to any input signal.
The correlation functions described in this section estimate either the auto-correlation of a source vector or
the cross-correlation of two vectors.

Special Arguments
Some Convolution and Correlation functions described in this section have two implementations of thealgorithm:•

For small data size, function processes data as described by the formula

213

1
•

Intel® Integrated Performance Primitives Developer Guide and Reference

For big data size, function uses FFT-inherited algorithms

The optimal algorithm is selected automatically according to the input data size. You can manually choose
which algorithm to use by passing one of the following predefined values to the algType parameter of thefunction:

ippAlgAuto

Select the optimal algorithm automatically.

ippAlgDirect

Use direct algorithm as described by the formula.

ippAlgFFTUse FFT-based algorithm implementation.

These values are declared in the IppAlgType enumerator.
Several functions support normalization of the output data. You can choose which normalization to apply bypassing one of the following values to the function:

ippsNormNone

No normalization (default).

ippsNormA

Biased normalization.

ippsNormB

Unbiased normalization.

These values are declared in the IppsNormOp enumerator.

See Also
Structures and Enumerators
AutoCorrNormGetBufferSize
Computes the size of the work buffer for theippsAutoCorrNorm function.

SyntaxIppStatus ippsAutoCorrNormGetBufferSize (int srcLen, int dstLen, IppDataType dataType,IppEnum algType, int* pBufferSize);

Include Files
ipps.hParameters
srcLenNumber of elements in the source vector.

dstLenNumber of elements in the destination vector (length of autocorrelation).

dataType

Data type for auto-correlation. Possible values are ipp32f, ipp32fc,
ipp64f, or ipp64fc.

algType

Bit-field mask for the algorithm type definition. Possible values are theresults of composition of the IppAlgType and IppsNormOp values.

pBufferSize

Pointer to the size of the work buffer.

Description
The ippsAutoCorrNormGetBufferSize function computes the size in bytes of the external work buffer
needed for the function that performs auto-correlation. The result is stored in the pBufferSize parameter.

214

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pBufferSize is NULL.

ippStsSizeErr
ippStsAlgTypeErr

Indicates an error when srcLen or dstLen is less than, or equal
to zero.
Indicates an error when:•

the result of the bitwise AND operation between the algType andippAlgMask differs from the ippAlgAuto, ippAlgDirect, or
ippAlgFFT values;• the result of the bitwise AND operation between the algType andippsNormMask differs from the ippsNormNone, ippsNormA, or
ippsNormB values.

ippStsDataTypeErr

Indicates an error when the dataType value differs from the ipp32f,
ipp32fc, ipp64f, or ipp64fc.

See Also
Enumerators
Special Arguments
AutoCorrNorm Calculates normal, biased, and unbiased auto-correlation of a vector.
AutoCorrNorm
Calculates normal, biased, and unbiased autocorrelation of a vector.

SyntaxIppStatus ippsAutoCorrNorm_32f (const Ipp32f* pSrc, int srcLen, Ipp32f* pDst, int
dstLen, IppEnum algType, Ipp8u* pBuffer);
IppStatus ippsAutoCorrNorm_64f (const Ipp64f* pSrc, int srcLen, Ipp64f* pDst, int
dstLen, IppEnum algType, Ipp8u* pBuffer);
IppStatus ippsAutoCorrNorm_32fc (const Ipp32fc* pSrc, int srcLen, Ipp32fc* pDst, int
dstLen, IppEnum algType, Ipp8u* pBuffer);
IppStatus ippsAutoCorrNorm_64fc (const Ipp64fc* pSrc, int srcLen, Ipp64fc* pDst, int
dstLen, IppEnum algType, Ipp8u* pBuffer);

Include Files
ipps.hParameters
pSrc

Pointer to the source vector.

srcLenNumber of elements in the source vector.

pDst

Pointer to the destination vector. This vector stores the calculated
auto-correlation of the source vector.

dstLenNumber of elements in the destination vector (length of autocorrelation).

215

1

Intel® Integrated Performance Primitives Developer Guide and Reference

algType

Bit-field mask for the algorithm type definition. Possible values are theresults of composition of the IppAlgType and IppsNormOp values.

pBuffer

Pointer to the buffer for internal calculations.

Description
Before using these functions, you need to compute the size of the work buffer using theippsAutoCorrNormGetBufferSize function.
These functions calculate the normalized auto-correlation of the pSrc vector of srcLen length and store theresults in the pDst vector of dstLen length. The result vector pDst is calculated by the following equations:

where

NOTE
The auto-correlation is computed for positive lags only. Auto-correlation for a negative lag is a complex
conjugate of the auto-correlation for the equivalent positive lag.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when any of the specified pointers is NULL.

ippStsSizeErr
ippStsAlgTypeErr

Indicates an error when srcLen or dstLen is less than, or equal
to zero.
Indicates an error when:•216

the result of the bitwise AND operation between the algType andippAlgMask differs from the ippAlgAuto, ippAlgDirect, or
ippAlgFFT values;Developer Guide and Reference for Intel® Integrated Performance Primitives•

1

the result of the bitwise AND operation between the algType andippsNormMask differs from the ippsNormNone, ippsNormA, or
ippsNormB values.

ExampleThe code example below demonstrates how to use the ippsAutoCorrNormGetBufferSize andippsAutoCorrNorm functions.

IppStatus AutoCorrNormExample (void) {IppStatus status;
const int srcLen = 5, dstLen = 10;
Ipp32f pSrc[srcLen] = {0.2f, 3.1f, 2.0f, 1.2f, -1.1f}, pDst[dstLen];
IppEnum funCfg = (IppEnum)(ippAlgAuto|ippsNormB);
int bufSize = 0;
Ipp8u *pBuffer;status = ippsAutoCorrNormGetBufferSize(srcLen, dstLen, ipp32f, funCfg, &bufSize);if ( status != ippStsNoErr )return status;
pBuffer = ippsMalloc_8u( bufSize );status = ippsAutoCorrNorm_32f(pSrc, srcLen, pDst, dstLen, funCfg, pBuffer);
printf_32f("pDst", pDst, dstLen);
ippsFree( pBuffer );return status;}
The result is as follows:

pDst -> 3.3 2.0 0.6 -1.6 -0.2 0.0 0.0 0.0 0.0 0.0

See Also
Enumerators
Special Arguments
AutoCorrNormGetBufferSize Computes the size of the work buffer for the ippsAutoCorrNorm
function.
CrossCorrNormGetBufferSize
Computes the size of the work buffer for theippsCrossCorrNorm function.

SyntaxIppStatus ippsCrossCorrNormGetBufferSize (int src1Len, int src2Len, int dstLen, int
lowLag, IppDataType dataType, IppEnum algType, int* pBufferSize);

Include Files
ipps.hParameters
src1Len

Number of elements in the first source vector.

217

1

Intel® Integrated Performance Primitives Developer Guide and Reference

src2Len

Number of elements in the second source vector.

dstLenNumber of elements in the destination vector (length of crosscorrelation).

lowLagLower value of the range of lags at which the correlation is computed.

dataType

Data type for cross-correlation. Possible values are ipp32f, ipp32fc,
ipp64f, or ipp64fc.

algType

Bit-field mask for the algorithm type definition. Possible values are theresults of composition of the IppAlgType and IppsNormOp values.

pBufferSize

Pointer to the size of the work buffer.

Description
The ippsCrossCorrNormGetBufferSize function computes the size in bytes of the external work buffer
needed for the function that performs cross-correlation. The result is stored in the pBufferSize parameter.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pBufferSize is NULL.

ippStsSizeErr
ippStsAlgTypeErr

Indicates an error when the length of the vector is negative, or
equal to zero.
Indicates an error when:•

the result of the bitwise AND operation between the algType andippAlgMask values differs from the ippAlgAuto, ippAlgDirect,
or ippAlgFFT values.
• the result of the bitwise AND operation between the algType andippsNormMask values differs from the ippsNormNone, ippsNormA,
or ippsNormB values.

ippStsDataTypeErr

Indicates an error when the dataType value differs from the Ipp32f,
Ipp32fc, Ipp64f, or Ipp64fc.

See Also
Enumerators
CrossCorrNorm Calculates the cross-correlation of two vectors.
Special Arguments
CrossCorrNorm
Calculates the cross-correlation of two vectors.

SyntaxIppStatus ippsCrossCorrNorm_32f (const Ipp32f* pSrc1, int src1Len, const Ipp32f* pSrc2,
int src2Len, Ipp32f* pDst, int dstLen, int lowLag, IppEnum algType, Ipp8u* pBuffer);
IppStatus ippsCrossCorrNorm_64f (const Ipp64f* pSrc1, int src1Len, const Ipp64f* pSrc2,
int src2Len, Ipp64f* pDst, int dstLen, int lowLag, IppEnum algType, Ipp8u* pBuffer);
IppStatus ippsCrossCorrNorm_32fc (const Ipp32fc* pSrc1, int src1Len, const Ipp32fc*
pSrc2, int src2Len, Ipp32fc* pDst, int dstLen, int lowLag, IppEnum algType, Ipp8u*
pBuffer);218

1Developer Guide and Reference for Intel® Integrated Performance Primitives

IppStatus ippsCrossCorrNorm_64fc (const Ipp64fc* pSrc1, int src1Len, const Ipp64fc*
pSrc2, int src2Len, Ipp64fc* pDst, int dstLen, int lowLag, IppEnum algType, Ipp8u*
pBuffer);

Include Files
ipps.hParameters
pSrc1

Pointer to the first source vector.

src1Len

Number of elements in the first source vector.

pSrc2

Pointer to the second source vector.

src2Len

Number of elements in the second source vector.

pDst

Pointer to the destination vector. This vector stores the calculated
cross-correlation of the pSrc1 and pSrc2 vectors.

dstLenNumber of elements in the destination vector. This value determines
the range of lags at which the cross-correlation is calculated.

lowLag

Cross-correlation lowest lag.

algType

Bit-field mask for the algorithm type definition. Possible values are theresults of composition of the IppAlgType and IppsNormOp values.

pBuffer

Pointer to the buffer for internal calculations.

Description
These functions calculate the cross-correlation of the pSrc1 vector and the pSrc2 vector, and store theresults in the pDst vector. The result vector pDst is calculated by the following equations:

where

219

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Before using this function, you need to compute the size of the work buffer using theippsCrossCorrNormGetBufferSize function.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when any of the specified pointers is NULL.

ippStsSizeErr
ippStsAlgTypeErr

Indicates an error when the length of a vector is less than, or
equal to zero.
Indicates an error when:••

the result of the bitwise AND operation between the algType andippAlgMask differs from the ippAlgAuto, ippAlgDirect, or
ippAlgFFT values.
the result of the bitwise AND operation between the algType andippsNormMask differs from the ippsNormNone, ippsNormA, or
ippsNormB values.

ExampleThe code example below demonstrates how to use the ippsCrossCorrNormGetBufferSize andippsCrossCorrNorm functions.
IppStatus CrossCorrNormExample (void) {IppStatus status;
const int src1Len=5, src2Len=7, dstLen=16;
int lowLag = -5;
Ipp32f pSrc1[src1Len] = {1.f,1.f,1.f,1.f,1.f}, pSrc2[src2Len] ={1.f,1.f,1.f,1.f,1.f,1.f,1.f}, pDst[dstLen];
IppEnum funCfgNormNo = (IppEnum)(ippAlgAuto|ippsNormNone);
IppEnum funCfgNormA = (IppEnum)(ippAlgAuto|ippsNormA);
IppEnum funCfgNormB = (IppEnum)(ippAlgAuto|ippsNormB);
int bufSizeNo=0, bufSizeA=0, bufSizeB=0, bufSizeMax=0;
Ipp8u *pBuffer;status = ippsCrossCorrNormGetBufferSize(src1Len, src2Len, dstLen, -5, ipp32f, funCfgNormNo,&bufSizeNo);if ( status != ippStsNoErr ) return status;
status = ippsCrossCorrNormGetBufferSize(src1Len, src2Len, dstLen, -5, ipp32f, funCfgNormA,&bufSizeA);
if ( status != ippStsNoErr ) return status;
status = ippsCrossCorrNormGetBufferSize(src1Len, src2Len, dstLen, -5, ipp32f, funCfgNormB,&bufSizeB);
if ( status != ippStsNoErr ) return status;
bufSizeMax = IPP_MAX(bufSizeNo, IPP_MAX(bufSizeA, bufSizeB));// get max buffer size

220

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

pBuffer = ippsMalloc_8u( bufSizeMax );status = ippsCrossCorrNorm_32f(pSrc1, src1Len, pSrc2, src2Len, pDst, dstLen, lowLag,
funCfgNormNo, pBuffer);
printf_32f("pDst_NormNone", pDst, dstLen);status = ippsCrossCorrNorm_32f(pSrc1, src1Len, pSrc2, src2Len, pDst, dstLen, lowLag,
funCfgNormA, pBuffer);
printf_32f("pDst_NormA", pDst, dstLen);status = ippsCrossCorrNorm_32f(pSrc1, src1Len, pSrc2, src2Len, pDst, dstLen, lowLag,
funCfgNormB, pBuffer);
printf_32f("pDst_NormB", pDst, dstLen);
ippsFree( pBuffer );return status;}
The result is as follows:

pDst_NormNone -> 0.0 1.0 2.0 3.0 4.0 5.0 5.0 5.0 4.0 3.0 2.0 1.0 0.0 0.0 0.0 0.0
pDst_NormA-> 0.0 0.2 0.4 0.6 0.8 1.0 1.0 1.0 0.8 0.6 0.4 0.2 0.0 0.0 0.0 0.0
pDst_NormB-> 0.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 0.0 0.0 0.0 0.0

See Also
Enumerators
Special Arguments
CrossCorrNormGetBufferSize Computes the size of the work buffer for the ippsCrossCorrNorm
function.
ConvolveGetBufferSize
Computes the size of the work buffer for theippsConvolve function.

SyntaxIppStatus ippsConvolveGetBufferSize (int src1Len, int src2Len, IppDataType dataType,IppEnum algType, int* pBufferSize);

Include Files
ipps.hParameters
src1Len

Number of elements in the first source vector.

src2Len

Number of elements in the second source vector.

dataType

Data type for convolution. Possible values are ipp32f and ipp64f.

algType

Bit-field mask for the algorithm type definition. Possible values arelisted in the IppAlgType enumerator.

pBufferSize

Pointer to the size of the work buffer.

Description
The ippsConvolveGetBufferSize function computes the size, in bytes, of the external work buffer needed
for the functions that perform convolution operations. The result is stored in the pBufferSize parameter.

221

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pBufferSize is NULL.

ippStsSizeErr
ippStsAlgTypeErr

ippStsDataTypeErr

Indicates an error when the length of the vector is negative, or
equal to zero.
Indicates an error when the result of the bitwise AND operation
between the algType and ippAlgMask differs from theippAlgAuto, ippAlgDirect, or ippAlgFFT values.
Indicates an error when the dataType value differs from the ipp32f
or ipp64f.

See Also
Enumerators
Special Arguments
Convolve Performs a finite linear convolution of two vectors.
Convolve
Performs a finite linear convolution of two vectors.

SyntaxIppStatus ippsConvolve_32f (const Ipp32f* pSrc1, int src1Len, const Ipp32f* pSrc2, int
src2Len, Ipp32f* pDst, IppEnum algType, Ipp8u* pBuffer);
IppStatus ippsConvolve_64f (const Ipp64f* pSrc1, int src1Len, const Ipp64f* pSrc2, int
src2Len, Ipp64f* pDst, IppEnum algType, Ipp8u* pBuffer);

Include Files
ipps.hParameters
pSrc1

Pointer to the first source vector.

src1Len

Number of elements in the first source vector.

pSrc2

Pointer to the second source vector.

src2Len

Number of elements in the second source vector.

pDst

Pointer to the destination vector. This vector stores the result of the
convolution of the pSrc1 and pSrc2 vectors.

algType

Bit-field mask for the algorithm type definition. Possible values arelisted in the IppAlgType enumerator.

pBuffer

Pointer to the buffer for internal calculations.

Description
These functions perform the finite linear convolution of the pSrc1 and pSrc2 vectors. The src1Len elementsof the pSrc1 vector are convolved with the src2Len elements of the pSrc2 vector. The result of the
convolution is stored in the pDst vector with the length equal to src1Len+src2Len-1. The result vector
pDst is calculated by the following equations:222

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

where
•
•

pSrc1[i]=0, if i ≥ src1Len
pSrc2[j]=0, if j ≥ src2Len

Before using this function, you need to compute the size of the work buffer using theippsConvolveGetBufferSize function.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when any of the specified pointers is NULL.

ippStsSizeErr
ippStsAlgTypeErr

Indicates an error when the length of a vector is less than, or
equal to zero.
Indicates an error when the result of the bitwise AND operation
between algType and ippAlgMask differs from the ippAlgAuto,
ippAlgDirect, or ippAlgFFT values.

ExampleThe code example below demonstrates how to use the ippsConvolveGetBufferSize andippsConvolve_32f functions.
IppStatus ConvolveExample (void) {IppStatus status;
const int src1Len = 5, src2Len = 2, dstLen = src1Len+src2Len-1;
Ipp32f pSrc1[src1Len] = {-2.f,0.f,1.f,-1.f,3.f}, pSrc2[src2Len]={0.f,1.f}, pDst[dstLen];
IppEnum funCfg = (IppEnum)(ippAlgAuto);
int bufSize = 0;
Ipp8u *pBuffer;status = ippsConvolveGetBufferSize(src1Len, src2Len, ipp32f, funCfg, &bufSize);if ( status != ippStsNoErr )return status;
pBuffer = ippsMalloc_8u( bufSize );status = ippsConvolve_32f(pSrc1, src1Len, pSrc2, src2Len, pDst, funCfg, pBuffer);
printf_32f("pDst", pDst, dstLen);
ippsFree( pBuffer );return status;}
The result is as follows:

pDst -> 0.0 -2.0 0.0 1.0 -1.0 3.0

See Also
Enumerators
223

1Intel® Integrated Performance Primitives Developer Guide and Reference

Special Arguments
ConvolveGetBufferSize Computes the size of the work buffer for the ippsConvolve function.
ConvBiased
Computes the specified number of elements of the full
finite linear convolution of two vectors.

SyntaxIppStatus ippsConvBiased_32f(const Ipp32f* pSrc1, int src1Len, const Ipp32f* pSrc2, int
src2Len, Ipp32f* pDst, int dstLen, int bias);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc1, pSrc2

Pointers to the two vectors to be convolved.

src1Len

Number of elements in the vector pSrc1.

src2Len

Number of elements in the vector pSrc2.

pDst
dstLenbias

Pointer to the vector pDst. This vector stores the result of the
convolution.
Number of elements in the vector pDst.
Parameter that specifes the starting element of the
convolution.

Description
This function computes dstLen elements of finite linear convolution of two specified vectors pSrc1 andpSrc2 starting with an element that is specified by the bias. The result is stored in the vector pDst.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pDst or pSrc pointer is NULL.

ippStsSizeErr

Indicates an error when src1Len or src2Len is less than orequal to 0.

ExampleThe example below shows how to call the function ippsConvBiased.

void func_convbiased(){
Ipp32f pSrc1[5] = {1.1, -2.0, 3.5, 2.2, 0.0};
Ipp32f pSrc2[4] = {0.0, 0.2, 2.5, -1.0};
const int len = 10;
Ipp32f pDst[len];int bias = 1;

224

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

ippsZero_32f(pDst, len);ippsConvBiased_32f(pSrc1, 5, &pSrc2[1], 3, pDst, len, bias);}
Result:pDst -> 0.2

2.3

-4.3

9.2

5.5

0.0

0.0

0.0

0.0

0.0

Filtering Functions
The Intel IPP functions described in this section implement the following types of filters:••••

Finite impulse response (FIR) filter
Adaptive finite impulse response using least mean squares (LMS) filter
Infinite impulse response (IIR) filter
Median filter

A special set of functions is designed to generate filter coefficients for different types of FIR filters.

SumWindow
Sums elements in the mask applied to each elementof a vector.

SyntaxIppStatus ippsSumWindow_8u32f(const Ipp8u* pSrc, Ipp32f* pDst, int len, int maskSize);
IppStatus ippsSumWindow_16s32f(const Ipp16s* pSrc, Ipp32f* pDst, int len, int
maskSize);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

len

Number of elements of the vector.

maskSize

Size of the mask.

Description
This function sets each element in the destination vector pDst as the sum of maskSize elements of thesource vector pSrc. The computation is performed as follows:

225

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsMaskSizeErr

Indicates an error when maskSize is less than or equal to 0.

FIR Filter Functions
The functions described in this section perform a finite impulse response (FIR) filtering of input data. The
functions initialize different FIR filter structures, get and set the delay lines and filter coefficients (taps), andperform filtering. Intel IPP contains the functions that implement the FIR filters without the delay line stream FIR filters.
Special set of functions allows to compute the filter coefficients for different filters.
To perform single-rate FIR filtering with the ippsFIRSR function, follow this scheme:
1.
2.
3.

Call ippsFIRSRGetSize function to get the size of the filter specification structure and the work buffer.
Call ippsFIRSRInit function to initialize the filter specification structure.
Call ippsFIRSR function to apply the single-rate FIR filter to a source vector.

FIRMRGetSize
Computes the size of the context structure and work
buffer for multi-rate FIR filtering.

SyntaxCase 1: Operation on a signal that has the same data type as the coefficients
IppStatus ippsFIRMRGetSize(int tapsLen, int upFactor, int downFactor, IppDataTypetapsType, int* pSpecSize, int* pBufSize);

Case 2: Operation on a signal that has a data type different from the data type of the coefficients
IppStatus ippsFIRMRGetSize32f_32fc(int tapsLen, int upFactor, int downFactor, int*
pSpecSize, int* pBufSize);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
tapsLenLength of the FIR filter.

upFactor

Multi-rate up factor.

downFactor

Multi-rate down factor.

tapsTypepSpecSize

226

Data type of the coefficients. Supported values are Ipp32f, Ipp32fc,

Ipp64f, and Ipp64fc.
Pointer to the size of the FIR specification structure.

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Pointer to the size of the work buffer required for FIR filtering.

pBufSize

Description
This function computes the following:••

Size of the internal specification structure for multi-rate FIR filtering. The structure can be shared between
all threads of the application.
Size of the work buffer for each thread.

For an example on how to use this function, refer to the example provided with the FIRMR function
description.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsSizeErr
ippStsDataTypeErr
ippStsFIRMRFactorErr
ippStsExceededSizeErr

Indicates an error when the tapsLen value is less than or equal
to zero.
Indicates an error when the specified taps type is notsupported.
Indicates an error when the upFactor value or the downFactor
value is less than zero.
Indicates an error when the size of the work buffer exceeds the
maximum of the data type positive value pointed by *int
pBufSize.

See Also
FIRMR Performs multi-rate FIR filtering of a source vector.
FIRMRInit
Initializes the context structure for multi-rate FIR
filtering.

SyntaxCase 1: Operation on a signal that has the same data type as the coefficients
IppStatus ippsFIRMRInit_<mod>(const Ipp<dataType>* pTaps, int tapsLen, int upFactor,
int upPhase, int downFactor, int downPhase, IppsFIRSpec_<dataType>* pSpec);
Supported values for mod:

32f

64f

32fc

64fc

Case 2: Operation on a signal that has a data type different from the data type of the coefficients
IppStatus ippsFIRMRInit32f_32fc(const Ipp32f* pTaps, int tapsLen, int upFactor, int
upPhase, int downFactor, int downPhase, IppsFIRSpec32f_32fc* pSpec);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

227

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Parameters
pTaps

Pointer to the array containing filter coefficients. The number of
elements in the array is tapsLen.

tapsLen

Number of filter coefficients.

upFactor

Multi-rate upsampling factor.

upPhasePhase for upsampled signal.

downFactor

Multi-rate downsampling factor.

downPhase

Phase for downsampled signal.

pSpec

Pointer to the internal FIR specification structure.

Description
This function initializes the multi-rate FIR filter specification structure in the external buffer. Before using thisfunction, compute the size of the specification structure and the size of the work buffer using the
FIRMRGetSize function.
The parameter upFactor is the factor by which the filtered signal is internally upsampled (see description of
the function SampleUp for more details). That is, upFactor-1 zeros are inserted between each sample of the
input signal.
The parameter upPhase is the parameter, which determines where a non-zero sample lies within theupFactor-length block of the upsampled input signal.
The parameter downFactor is the factor by which the FIR response obtained by filtering an upsampled input
signal, is internally downsampled (see description of the function SampleDown for more details). That is,
downFactor-1 output samples are discarded from each downFactor-length output block of the upsampledfilter response.
ThedownPhase parameter determines where non-discarded sample lies within a block of upsampled filter
response.
For an example on how to use this function, refer to the example provided with the FIRMR function
description.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsFIRLenErr

Indicates an error when tapsLen is less than, or equal to zero.

ippStsFIRMRFactorErr
ippStsFIRMRPhaseErr

Indicates an error when upFactor ordownFactor is less than, or
equal to zero.
Indicates an error when upPhase/downPhase is negative, orgreater than or equal to upFactor/downFactor.

See Also
FIRMRGetSize Computes the size of the context structure and work buffer for multi-rate FIR
filtering.
FIRMR Performs multi-rate FIR filtering of a source vector.
SampleUp Up-samples a signal, conceptually increasing its sampling rate by an integer factor.

228

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

SampleDown Down-samples a signal, conceptually decreasing its sampling rate by an integer
factor.
FIRMR
Performs multi-rate FIR filtering of a source vector.

SyntaxIppStatus ippsFIRMR_32f(const Ipp32f* pSrc, Ipp32f* pDst, int numIters,
IppsFIRSpec_32f* pSpec, const Ipp32f* pDlySrc, Ipp32f* pDlyDst, Ipp8u* pBuf);
IppStatus ippsFIRMR_64f(const Ipp64f* pSrc, Ipp64f* pDst, int numIters,
IppsFIRSpec_64f* pSpec, const Ipp64f* pDlySrc, Ipp64f* pDlyDst, Ipp8u* pBuf);
IppStatus ippsFIRMR_32fc(const Ipp32fc* pSrc, Ipp32fc* pDst, int numIters,
IppsFIRSpec_32fc* pSpec, const Ipp32fc* pDlySrc, Ipp32fc* pDlyDst, Ipp8u* pBuf);
IppStatus ippsFIRMR_64fc(const Ipp64fc* pSrc, Ipp64fc* pDst, int numIters,
IppsFIRSpec_64fc* pSpec, const Ipp64fc* pDlySrc, Ipp64fc* pDlyDst, Ipp8u* pBuf);
IppStatus ippsFIRMR_16s(const Ipp16s* pSrc, Ipp16s* pDst, int numIters,
IppsFIRSpec_32f* pSpec, const Ipp16s* pDlySrc, Ipp16s* pDlyDst, Ipp8u* pBuf);
IppStatus ippsFIRMR_16sc(const Ipp16sc* pSrc, Ipp16sc* pDst, int numIters,
IppsFIRSpec_32fc* pSpec, const Ipp16sc* pDlySrc, Ipp16sc* pDlyDst, Ipp8u* pBuf);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

numIters

Number of iterations associated with the number of samples to be
filtered by the function. The (numIters*downFactor) elements of thesource vector are filtered and the resulting (numIters*upFactor)
samples are stored in the destination array.

pSpec

Pointer to the internal specification structure.

pDlySrc

Pointer to the array containing values for the source delay lines. The
value can be NULL. If not NULL, the array length is defined as(tapsLen+upFactor-1)/upFactor.

pDlyDstPointer to the array containing values for the destination delay line.
The value can be NULL. If not NULL, the array length is defined as(tapsLen+upFactor-1)/upFactor.

pBuf

Pointer to the work buffer.

229

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Description
Before using this function, you need to initialize the internal constant specification structure using theippsFIRMR_Init function.
This function filters the source vector pSrc using the multi-rate FIR filter and stores the result in pDst.
Filtering is performed by the following formula:

where
•
•

x(0)...x(numIters) is the source vectorh(0)...h(tapsLen-1) are the FIR filter coefficients

The values of filter coefficients (taps) are specified in the tapsLen-length array pTaps, which is passed
during initialization of the FIR filter specification structure. The pDlySrc and pDlyDst arrays specify thedelay line values. The input array contains (numIters*downFactor) samples, and the output array storesthe resulting (numIters*upFactor) samples. The multi-rate filtering is considered as a sequence of threeoperations: upsampling, filtering with a single-rate FIR filter, and downsampling. The algorithm isimplemented as a single operation including the mentioned above three steps.
The parameter upFactor is the factor by which the filtered signal is internally upsampled (see theippsSampleUp function description for more details). That is, upFactor-1 zeros are inserted between eachsample of the input signal.
The parameter upPhase is the parameter that determines where a non-zero sample lies within theupFactor-length block of upsampled input signal.
The parameter downFactor is the factor by which the FIR response, which is obtained by filtering an
upsampled input signal, is internally downsampled (see the ippsSampleDown function description for moredetails). That is, downFactor-1 output samples are discarded from each downFactor-length output block of
the upsampled filter response.
The parameter downPhase is the parameter which determines where non-discarded sample lies within a
block of upsampled filter response.
To compute the y(0)...y(tapsLen-1) destination vector, the function uses the pDlySrc array of the delayline.
The first tapsLen-1 elements of the function are:y(0)=h(tapsLen-1)*d(0)+h(tapsLen-2)*d(1)+...+h(1)*d(tapsLen-2)+h(0)*x(0)y(0)=h(tapsLen-1)*d(1)+h(tapsLen-2)*d(2)+...+h(1)*x(0)+h(0)*x(1)y(tapsLen-1)=h(tapsLen-1)*x(0)+...+h(1)*x(tapsLen-2)+h(0)*x(tapsLen-1)
whered(0), d(1), d(2), and d(tapsLen-2) are the elements of the pDlySrc array
The last tapsLen-1 elements of the source vector are copied to the non-zero pDlyDst buffer for the next callof the FIR filter.
The arrays pDlySrc and pDlyDst support NULL values:••

if pDlySrc is NULL, the function uses the delay line with zero values
if pDlyDst is NULL, the function does not copy any data to the destination delay line

230

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when any of the specified pointers is NULL.

ExampleThe code example below demonstrates how to use the FIRMRGetSize, FIRMRInit, and FIRMR functions.

int firmr(){
IppsFIRSpec_32f *pSpec;
Ipp32f pTaps[8] = { 0.125,0.125,0.125,0.125,0.125,0.125,0.125,0.125};
int i;
int numIters = 33;
int tapsLen = 8;
int upFactor = 2;
int upPhase = 0;
int downFactor = 3;
int downPhase = 0;
int specSize, bufSize;
Ipp32f pSrc[downFactor*numIters];
Ipp32f pDst[upFactor *numIters];
Ipp32f pDlySrc[(tapsLen + upFactor - 1 ) / upFactor];
Ipp32f pDlyDst[(tapsLen + upFactor - 1 ) / upFactor];
Ipp8u* pBuf;
IppStatus status;
status = ippsFIRMRGetSize(tapsLen, upFactor, downFactor, ipp32f, &specSize, &bufSize );printf("ippsFIRMRGetSize / status = %s\n", ippGetStatusString(status));pSpec = (IppsFIRSpec_32f*)ippsMalloc_8u(specSize);pBuf = ippsMalloc_8u(bufSize);status = ippsFIRMRInit_32f ( pTaps, tapsLen, upFactor, upPhase, downFactor, downPhase,pSpec);
printf("ippsFIRMRInit_32f / status = %s\n", ippGetStatusString(status));if( ippStsNoErr != status){
return -1;}
for(i=0;i<downFactor*numIters;i++){pSrc[i] = 1;}
status = ippsFIRMR_32f( pSrc, pDst, numIters, pSpec, NULL, pDlyDst, pBuf);
printf("ippsFIRMR_32f / status = %s\n", ippGetStatusString(status));if( ippStsNoErr != status){
return -1;}
printf("src\n");for(i=0;i<numIters*downFactor;i++){printf("%6f ", pSrc[+i]);}
printf("\ndst\n");for(i=0;i<numIters*upFactor;i++){printf("%6f ", pDst[i]);}printf("\n");return 0;
}

231

1

Intel® Integrated Performance Primitives Developer Guide and Reference

See Also
FIRMRGetSize Computes the size of the context structure and work buffer for multi-rate FIR
filtering.
FIRMR_Init Initializes the context structure for multi-rate FIR filtering.
FIRSRGetSize
Computes the size of the constant structure and work
buffer for single-rate FIR filtering.

SyntaxCase 1: Operation on a signal that has the same data type as the coefficients
IppStatus ippsFIRSRGetSize(int tapsLen, IppDataType tapsType, int* pSpecSize, int*
pBufSize);

Case 2: Operation on a signal that has a data type different from the data type of the coefficients
IppStatus ippsFIRSRGetSize32f_32fc(int tapsLen, int* pSpecSize, int* pBufSize);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
tapsLentapsType

Length of the FIR filter.
Data type of the coefficients. The supported values are ipp32f,

ipp32fc, ipp64f, and ipp64fc.

pSpecSize

Pointer to the size of the internal constant specification structure.

pBufSize

Pointer to the size of the work buffer required for FIR filtering.

Description
This function computes the following:••

Size of the internal constant specification structure for single-rate FIR filtering. The structure can beshared between all threads of the application.
Size of the work buffer for each thread.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsSizeErr
ippStsDataTypeErr

See Also
Examples of Using FIR Functions
232

Indicates an error when the tapsLen value is less than, or
equal to zero.
Indicates an error when the specified taps type is notsupported.

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

FIRSRInit
Initializes the FIR constant structure for single-rate
FIR filtering.

SyntaxIppStatus ippsFIRSRInit_32f(const Ipp32f* pTaps, int tapsLen, IppAlgType algType,IppsFIRSpec_32f* pSpec);
IppStatus ippsFIRSRInit_64f(const Ipp64f* pTaps, int tapsLen, IppAlgType algType,IppsFIRSpec_64f* pSpec);
IppStatus ippsFIRSRInit_32fc(const Ipp32fc* pTaps, int tapsLen, IppAlgType algType,IppsFIRSpec_32fc* pSpec);
IppStatus ippsFIRSRInit_64fc(const Ipp64fc* pTaps, int tapsLen, IppAlgType algType,IppsFIRSpec_64fc* pSpec);
IppStatus ippsFIRSRInit32f_32fc(const Ipp32f* pTaps, int tapsLen, IppAlgType algType,IppsFIRSpec32f_32fc* pSpec);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pTaps

Pointer to the filter coefficients.

tapsLenLength of the FIR filter.

algType

Bit-field mask for the algorithm type definition. Possible values are:ippAlgAuto, ippAlgDirect, or ippAlgFFT.

pSpec

Pointer to the internal constant FIR specification structure.

Description
Before using this function, you need to compute the size of the specification structure using theippsFIRSRGetSize function. This function initializes the constant specification structure for single-rate FIR
filtering.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsSizeErr
ippStsAlgTypeErr

Indicates an error when the tapsLen value is less than, or
equal to zero.
Indicates an error when the specified algorithm type is notsupported.

See Also
FIRSRGetSize Computes the size of the constant structure and work buffer for single-rate FIR
filtering.
233

1Intel® Integrated Performance Primitives Developer Guide and Reference

Examples of Using FIR Functions
FIRSR
Performs single-rate FIR filtering of a source vector.

SyntaxIppStatus ippsFIRSR_32f(const Ipp32f* pSrc, Ipp32f* pDst, int numIters,
IppsFIRSpec_32f* pSpec, const Ipp32f* pDlySrc, Ipp32f* pDlyDst, Ipp8u* pBuf);
IppStatus ippsFIRSR_64f(const Ipp64f* pSrc, Ipp64f* pDst, int numIters,
IppsFIRSpec_64f* pSpec, const Ipp64f* pDlySrc, Ipp64f* pDlyDst, Ipp8u* pBuf);
IppStatus ippsFIRSR_32fc(const Ipp32fc* pSrc, Ipp32fc* pDst, int numIters,
IppsFIRSpec_32fc* pSpec, const Ipp32fc* pDlySrc, Ipp32fc* pDlyDst, Ipp8u* pBuf);
IppStatus ippsFIRSR32f_32fc(const Ipp32fc* pSrc, Ipp32fc* pDst, int numIters,
IppsFIRSpec32f_32fc* pSpec, const Ipp32fc* pDlySrc, Ipp32fc* pDlyDst, Ipp8u* pBuf);
IppStatus ippsFIRSR_64fc(const Ipp64fc* pSrc, Ipp64fc* pDst, int numIters,
IppsFIRSpec_64fc* pSpec, const Ipp64fc* pDlySrc, Ipp64fc* pDlyDst, Ipp8u* pBuf);
IppStatus ippsFIRSR_16s(const Ipp16s* pSrc, Ipp16s* pDst, int numIters,
IppsFIRSpec_32f* pSpec, const Ipp16s* pDlySrc, Ipp16s* pDlyDst, Ipp8u* pBuf);
IppStatus ippsFIRSR_16sc(const Ipp16sc* pSrc, Ipp16sc* pDst, int numIters,
IppsFIRSpec_32fc* pSpec, const Ipp16sc* pDlySrc, Ipp16sc* pDlyDst, Ipp8u* pBuf);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

numIters

Number of elements in the destination vector.

pSpec

Pointer to the internal constant specification structure.

pDlySrc

Pointer to the array containing values for the source delay lines.

pDlyDstPointer to the array containing values for the destination delay line.

pBuf

Pointer to the work buffer.

Description
Before using this function, you need to initialize the internal constant specification structure using theippsFIRSRInit function.
This function filters the source vector using the single-rate FIR filter. Filtering is performed by the following
formula:234

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

where
•
•

x(0)...x(numIters) is the source vectorh(0)...h(tapsLen-1) are the FIR filter coefficients

To compute the y(0)...y(tapsLen-1) destination vector, the function uses the pDlySrc array of the delayline. The length of the pDlySrc array is tapsLen-1 elements.
The first tapsLen-1 elements of the function are:y(0)=h(tapsLen-1)*d(0)+h(tapsLen-2)*d(1)+...+h(1)*d(tapsLen-2)+h(0)*x(0)y(1)=h(tapsLen-1)*d(1)+h(tapsLen-2)*d(2)+...+h(1)*x(0)+h(0)*x(1)y(tapsLen-1)=h(tapsLen-1)*x(0)+...+h(1)*x(tapsLen-2)+h(0)*x(tapsLen-1)
whered(0), d(1), d(2), and d(tapsLen-2) are the elements of the pDlySrc array
The last tapsLen-1 elements of the source vector are copied to the non-zero pDlyDst buffer for the next callof the FIR filter.
The arrays pDlySrc and pDlyDst support NULL values:••

if pDlySrc is NULL, the function uses the delay line with zero values
if pDlyDst is NULL, the function does not copy any data to the destination delay line

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when any of the specified pointers is NULL.

See Also
FIRSRInit Initializes the FIR constant structure for single-rate FIR filtering.
Examples of Using FIR Functions
FIRSparseInit
Initializes a sparse FIR filter structure.

SyntaxIppStatus ippsFIRSparseInit_32f(IppsFIRSparseState_32f** ppState, const Ipp32f*
pNZTaps, const Ipp32s* pNZTapPos, int nzTapsLen, const Ipp32f* pDlyLine, Ipp8u*
pBuffer);
IppStatus ippsFIRSparseInit_32fc(IppsFIRSparseState_32fc** ppState, const Ipp32fc*
pNZTaps, const Ipp32s* pNZTapPos, int nzTapsLen, const Ipp32fc* pDlyLine, Ipp8u*
pBuffer);

Include Files
ipps.h235

1Intel® Integrated Performance Primitives Developer Guide and Reference

Domain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pNZTaps

Pointer to the array containing the non-zero tap values. The
number of elements in the array is nzTapsLen.

pNZTapPos

Pointer to the array containing positions of the non-zero tap
values. The number of elements in the array is nzTapsLen.

nzTapsLen

Number of elements in the array with non-zero tap values.

pDlyLine

Pointer to the array containing the delay line values.

ppStateDouble pointer to the sparse FIR state structure.

pBuffer

Pointer to the external buffer for the sparse FIR state structure.

Description
This function initializes a sparse FIR filter state structure ppState in the external buffer pBuffer. The size of
this buffer must be computed previously by calling the function FIRSparseGetStateSize. The initialization
function copies the values of filter coefficients from the array pNZTaps containing nzTapsLen non-zero taps
and their positions from the array pNZTapPos into the state structure ppState. The array pDlyLine specifies
the delay line values. The number of elements in this array is pNZTapPos[nzTapsLen -1]. If the pointer tothe array pDlyLine is not NULL, the array contents are copied into the state structure ppState, otherwise
the delay line values in the state structure are initialized to 0.

NOTE
The values of nzTapsLen and pNZTapPos[nzTapsLen -1] must be equal to those specified in
the function FIRSparseGetStateSize.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the pointers ppState, pNZTaps,pNZTapPos, or pBuffer is NULL.

ippStsFIRLenErr

Indicates an error if nxTapsLen is less than or equal to 0.

ippStsSparseErr

Indicates an error if positions of the non-zero taps are not in
ascending order, or are negative or repetitive.

FIRSparseGetStateSize
Computes the size of the external buffer for thesparse FIR filter structure.

SyntaxIppStatus ippsFIRSparseGetStateSize_32f(int nzTapsLen, int order, int* pStateSize);
IppStatus ippsFIRSparseGetStateSize_32fc(int nzTapsLen, int order, int* pStateSize);

Include Files
ipps.h236

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Domain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters

order

Number of elements in the array containing the non-zero tap
values.
Order of the sparse FIR filter.

pStateSize

Pointer to the computed value of the external buffer.

nzTapsLen

Description
This function computes the size of the external buffer for a sparse FIR filter structure that is required for thefunction ippsFIRSparseInit . Computation is based on the specified number of non-zero filter coefficients
nzTapsLen and filter order order that is equal to the number of elements in the delay line pNZTapPos[nzTapsLen -1] (see description of the function ippsFIRSparseInit). The result value is stored in the
pStateSize.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if pStateSize pointer is NULL.

ippStsFIRLenErr

Indicates an error if nzTapsLen or order is less than or equal to0; or nzTapsLen is more than order.

FIRSparseGetDlyLine
Retrieves the delay line contents from the sparse FIR
filter state structure.

SyntaxIppStatus ippsFIRSparseGetDlyLine_32f(const IppsFIRSparseState_32f* pState, Ipp32f*
pDlyLine);
IppStatus ippsFIRSparseGetDlyLine_32fc(const IppsFIRSparseState_32fc* pState, Ipp32fc*
pDlyLine);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pStatePointer to the sparse FIR filter state structure.

pDlyLine

Pointer to the array holding the delay line values.

237

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Description
This function copies the delay line values from the state structure pState and stores them into pDlyLine.
The destination array pDlyLine contains samples in the reverse order as compared to the order of samples
in the source vector.
Before calling ippsFIRSparseGetDlyLine, the corresponding filter state structure must be initialized with
the FIRSparseInit function.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pState pointer is NULL.

ippStsContextMatchErr

Indicates an error when the state identifier is incorrect.

See Also
FIRSparseInit Initializes a sparse FIR filter structure.
FIRSparseSetDlyLine
Sets the delay line contents in the sparse FIR filter
state structure.

SyntaxIppStatus ippsFIRSparseSetDlyLine_32f(IppsFIRSparseState_32f* pState, const Ipp32f*
pDlyLine);
IppStatus ippsFIRSparseSetDlyLine_32fc(IppsFIRSparseState_32fc* pState, const Ipp32fc*
pDlyLine);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pStatePointer to the FIR filter state structure.

pDlyLine

Pointer to the array holding the delay line values.

Description
This function copies the delay line values from pDlyLine and stores them into the state structure pState.
The source array pDlyLine must contain samples in the reverse order as compared to the order of samples
in the source vector.
Before calling ippsFIRSparseSetDlyLine, the corresponding filter state structure must be initialized with
the FIRSparseInit function.

Return Values
ippStsNoErr

238

Indicates no error.

Developer Guide and Reference for Intel® Integrated Performance Primitives

ippStsNullPtrErr

Indicates an error when the pState pointer is NULL.

ippStsContextMatchErr

Indicates an error when the state identifier is incorrect.

1

See Also
FIRSparseInit Initializes a sparse FIR filter structure.
FIRSparse
Filters a source vector through a sparse FIR filter.

SyntaxIppStatus ippsFIRSparse_32f(const Ipp32f* pSrc, Ipp32f* pDst, int len,
IppsFIRSparseState_32f* pState);
IppStatus ippsFIRSparse_32fc(const Ipp32fc* pSrc, Ipp32fc* pDst, int len,
IppsFIRSparseState_32fc* pState);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pStatePointer to the sparse FIR filter state structure.

pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

len

Number of elements that are filtered.

Description
This function applies the sparse FIR filter to the len elements of the source vector pSrc, and stores theresults in pDst. The filter parameters - the number of non-zero taps nzTapsLen, their values pNZTaps andtheir positions pNZTapPos, and the delay line values pDlyLine - are specified in the sparse FIR filter
structure pState that should be previously initialized by calling the function ippsFIRSparseInit.
In the following definition of the sparse FIR filter, the sample to be filtered is denoted x(n), the non-zero
taps are denoted pNZTaps(i), their positions are denoted pNZTapPos(i) and the return value is y(n).
The return value y(n) is defined by the formula for a sparse FIR filter:

After the function has performed calculations, it updates the delay line values stored in the state.

239

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error if len is less or equal to 0.

ExampleThe example below shows how to use the sparse FIR filter functions.

int buflen;
Ipp8u *buf;
int nzTapsLen = 5; //number of non-zero taps
Ipp32f nzTaps [] = {0.5, 0.4, 0.3, 0.2, 0.1}; //non-zero taps values
Ipp32s nzTapsPos[] = {0, 10, 20, 30, 40}; //non-zero tap positions
IppsFIRSparseState_32f* firState;
Ipp32f *src, *dst;/* ........................... */ippsFIRSparseGetStateSize_32f(nzTapsLen, nzTapsPos [nzTapsLen - 1], &buflen);buf = ippsMalloc_8u(buflen);ippsFIRSparseInit_32f(&firState, nzTaps, nzTapsPos, nzTapsLen, NULL, buf);/* .... initializing src somehow .... */ippsFIRSparse_32f(src, dst, len, firState);/*dst[i]=src[i]*0.5 + src[i-10]*0.4 + src[i-20]*0.3 + src[i-30]*0.2 + src[i-40]*0.1 *//* ...........................*/
ippsFree(buf);
Examples of Using FIR Functions
The code examples below demonstrate how to use the ippsFIRSR function:
•
•
•
•
•
•

Standard FIR Filtering with a Not-in-place Destination
Standard FIR Filtering with an In-place Destination
Stream FIR Filtering with a Not-in-place Destination
Stream FIR Filtering with an In-place Destination
Standard FIR Filtering with a Not-in-place Destination and ThreadingStandard FIR Filtering with an In-place Destination and ThreadingStandard FIR Filtering with a Not-in-place Destination
Type of FIR Filter

Destination

Source Delay LineThreadingstandard

not-in-place

zero

none

#define LEN 1024
#define TAPS_LEN 8
IppsFIRSpec_32f *pSpec;
float*src, *dst, *dly, *taps;
Ipp8u
*buf;
int
specSize, bufSize;
IppStatus status;//get sizes of the spec structure and the work buffer
status = ippsFIRSRGetSize (TAPS_LEN, ipp32f , &specSize,
240&bufSize );Developer Guide and Reference for Intel® Integrated Performance Primitives

1src= ippsMalloc_32f(LEN);
dst= ippsMalloc_32f(LEN);
dly= ippsMalloc_32f(TAPS_LEN-1);
taps = ippsMalloc_32f(TAPS_LEN);
pSpec = (IppsFIRSpec_32f*)ippsMalloc_8u(specSize);buf= ippsMalloc_8u(bufSize);//initialize the spec structureippsFIRSRInit_32f( taps, TAPS_LEN, ippAlgDirect, pSpec );//apply the FIR filter
ippsFIRSR_32f(src, dst, LEN, pSpec, NULL, dly, buf);

Standard FIR Filtering with an In-place Destination
Type of FIR Filter

Destination

Source Delay LineThreadingstandard

in-place

zero

none

#define LEN 1024
#define TAPS_LEN 8
IppsFIRSpec_32f *pSpec;
float*src, *dst, *dly, *taps;
Ipp8u
*buf;
int
specSize, bufSize;//get sizes of the spec structure and the work buffer
ippsFIRSRGetSize(TAPS_LEN, ipp32f, &specSize, &bufSize );src= ippsMalloc_32f(LEN);
dst= src;
dly= ippsMalloc_32f(TAPS_LEN-1);
taps = ippsMalloc_32f(TAPS_LEN);
pSpec = (IppsFIRSpec_32f*)ippsMalloc_8u(specSize);buf= ippsMalloc_8u(bufSize);//initialize the spec structureippsFIRSRInit_32f( taps, TAPS_LEN, ippAlgDirect, pSpec );//apply the FIR filter
ippsFIRSR_32f(src, dst, LEN, pSpec, NULL, dly, buf);

Stream FIR Filtering with a Not-in-place Destination
Type of FIR Filter

Destination

Source Delay LineThreadingstreamnot-in-place

src

none

#define LEN 1024
#define TAPS_LEN 8
IppsFIRSpec_32f *pSpec;
float*src, *dst, *taps;
Ipp8u
*buf;
int
specSize, bufSize;//get sizes of the spec structure and the work buffer

241

1

Intel® Integrated Performance Primitives Developer Guide and Reference

ippsFIRSRGetSize(TAPS_LEN, ipp32f, &specSize, &bufSize );src= ippsMalloc_32f(LEN+TAPS_LEN-1);
dst= ippsMalloc_32f(LEN);
taps = ippsMalloc_32f(TAPS_LEN);
pSpec = (IppsFIRSpec_32f*)ippsMalloc_8u(specSize);buf= ippsMalloc_8u(bufSize);//initialize the spec structureippsFIRSRInit_32f( taps, TAPS_LEN, ippAlgDirect, pSpec );//apply the FIR filter
ippsFIRSR_32f(src+TAPS_LEN-1, dst, LEN, pSpec, src, NULL,

buf);

Stream FIR Filtering with an In-place Destination
Type of FIR Filter

Destination

Source Delay LineThreadingstreamin-place

src

none

#define LEN 1024
#define TAPS_LEN 8
IppsFIRSpec_32f *pSpec;
float*src, *dst, *taps;
Ipp8u
*buf;
int
specSize, bufSize;//get sizes of the spec structure and the work buffer
ippsFIRSRGetSize(TAPS_LEN, ipp32f, &specSize, &bufSize );src= ippsMalloc_32f(LEN+TAPS_LEN-1);
dst= src;
taps = ippsMalloc_32f(TAPS_LEN);
pSpec = (IppsFIRSpec_32f*)ippsMalloc_8u(specSize);buf= ippsMalloc_8u(bufSize);//initialize the spec structureippsFIRSRInit_32f( taps, TAPS_LEN, ippAlgDirect, pSpec );//apply the FIR filter
ippsFIRSR_32f(src+TAPS_LEN-1, dst, LEN, pSpec, src, NULL,

buf);

Standard FIR Filtering with a Not-in-place Destination and Threading
Type of FIR Filter

Destination

Source Delay LineThreadingstandard

not-in-placezero

NTHREADS#define LEN 1024
#define TAPS_LEN 8#define DLY_LEN TAPS_LEN-1#define NTH 4
float *src,*dst;
float *dlyOut, *taps;
unsigned char *buf;
IppsFIRSpec_32f* pSpec;
int specSize, bufSize;

242

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

int i,tlen, ttail;//get sizes of the spec structure and the work buffer
ippsFIRSRGetSize(TAPS_LEN, ipp32f, &specSize, &bufSize );src= ippsMalloc_32f(LEN);
dst= ippsMalloc_32f(LEN);
dlyOut = ippsMalloc_32f(TAPS_LEN-1);
taps= ippsMalloc_32f(TAPS_LEN);
pSpec = (IppsFIRSpec_32f*)ippsMalloc_8u(specSize);buf= ippsMalloc_8u(bufSize*NTH);
for(i=0;i<LEN;i++){src[i] = i;}for(i=0;i<TAPS_LEN;i++){taps[i] = 1;}//initialize the spec structureippsFIRSRInit_32f( taps, TAPS_LEN, ippAlgDirect, pSpec );tlen = LEN / NTH;
ttail = LEN % NTH;
for(i=0;i< NTH;i++) {//this cycle means parallel region
Ipp32f* s= src+i*tlen;
Ipp32f* d= dst+i*tlen;
int
len = tlen+((i==(NTH - 1))?ttail:0);
Ipp8u* b= buf+i*bufSize;if( i == 0)ippsFIRSR_32f(s, d, len, pSpec, NULL,
NULL , b);else if (i == NTH - 1)
ippsFIRSR_32f(s, d, len, pSpec, s-(TAPS_LEN-1), dlyOut, b);else
ippsFIRSR_32f(s, d, len, pSpec, s-(TAPS_LEN-1), NULL , b);}Standard FIR Filtering with an In-place Destination and Threading
Type of FIR Filter

Destination

Source Delay LineThreadingstandard

in-place

zero

NTHREADS#define LEN 1024
#define TAPS_LEN 8#define DLY_LEN TAPS_LEN-1#define NTHREADS 4
float *src, *dst, *dlyOut, *taps;
float* tdly[NTHREADS];
unsigned char *buf;
IppsFIRSpec_32f* pSpec;
int specSize, bufSize;
int i,tlen, ttail;//get sizes of the spec structure and the work buffer
ippsFIRSRGetSize(TAPS_LEN, ipp32f, &specSize, &bufSize );src
dst= ippsMalloc_32f(LEN);= ippsMalloc_32f(LEN);

243

1

Intel® Integrated Performance Primitives Developer Guide and Reference

dlyOut = ippsMalloc_32f(TAPS_LEN-1);
taps= ippsMalloc_32f(TAPS_LEN);
pSpec = (IppsFIRSpec_32f*)ippsMalloc_8u(specSize);buf= ippsMalloc_8u(bufSize*NTHREADS);//initialize the spec structureippsFIRSRInit_32f( taps, TAPS_LEN, ippAlgDirect, pSpec );tlen = LEN / NTHREADS;
ttail = LEN % NTHREADS;//tdly= ippsMalloc_32f((TAPS_LEN-1)*(NTHREADS-1));for(i=1;i<NTHREADS;i++){//cycle in main thread
tdly[i] = ippsMalloc_32f(TAPS_LEN-1);
ippsCopy_32f(src+i*tlen-(TAPS_LEN-1), tdly[i], TAPS_LEN-1);}
for(i=0;i< NTHREADS;i++) {//this cycle means parallel region
Ipp32f* s= src+i*tlen;
Ipp32f* d= dst+i*tlen;
int
len = tlen+((i==NTHREADS - 1)?ttail:0);
Ipp8u* b= buf+i*bufSize;if( i == 0)ippsFIRSR_32f(s, d, len, pSpec, NULL,
NULL , b);else if (i == NTHREADS - 1)
ippsFIRSR_32f(s, d, len, pSpec, tdly[i], dlyOut, b);else
ippsFIRSR_32f(s, d, len, pSpec, tdly[i], NULL , b);}

FIR Filter Coefficient Generating Functions
The functions described in this section compute coefficients (tap values) for different FIR filters by windowing
the ideal infinite filter coefficients.
FIRGenGetBufferSize
Computes the size of the internal buffer required forcomputation of FIR coefficients.

SyntaxIppStatus ippsFIRGenGetBufferSize(int tapsLen, int* pBufferSize);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
tapsLen

Number of taps.

pBufferSize

Pointer to the calculated buffer size (in bytes).

244

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Description
This function computes the size of the buffer that is required for ippsFIRGenBandpass,
ippsFIRGenBandstop, ippsFIRGenHighpass, and ippsFIRGenLowpass internal calculations.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when any of the specified pointers is NULL.

ippStsIIRGenOrderErr

Indicates an error when the length of the coefficients array isless than 5.

See Also
FIRGenBandpass Computes bandpass FIR filter coefficients.
FIRGenBandstop Computes bandstop FIR filter coefficients.
FIRGenHighpass Computes highpass FIR filter coefficients.
FIRGenLowpass Computes lowpass FIR filter coefficients.
FIRGenLowpass
Computes lowpass FIR filter coefficients.

SyntaxIppStatus ippsFIRGenLowpass_64f(Ipp64f rFreq, Ipp64f* pTaps, int tapsLen, IppWinType
winType, IppBool doNormal, Ipp8u* pBuffer);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
rFreq

Normalized cutoff frequency, must be in the range (0, 0.5).

pTaps

Pointer to the array where computed tap values are stored. The
number of elements in the array is tapsLen.

tapsLenwinTypeNumber of elements in the array containing the tap values;
must be equal or greater than 5.
Specifies what type of window is used in computations. The
winType must have one of the following values:••••

doNormalippWinBartlett - Bartlett window
ippWinBlackman - Blackman window
ippWinHamming - Hamming window
ippWinHann - Hann window

Specifies normalized or non-normalized sequence of the filter
coefficients is computed. The doNormal must have one of thefollowing values:

245

1

Intel® Integrated Performance Primitives Developer Guide and Reference• ippTrue for normalized sequence of coefficients• ippFalse for non-normalized sequence of coefficients
pBuffer

Pointer to the buffer for internal calculations. To get the size of thebuffer, use the ippsFIRGenGetBufferSize function.

Description
This function computes tapsLen coefficients for lowpass FIR filter with the cutoff frequency rFreq bywindowing the ideal infinite filter coefficients. The quality of filtering is defined by the number of coefficients.
The parameter winType specifies the type of the window. For more information on window types used by thefunction, see Windowing Functions. The computed coefficients are stored in the array pTaps.
For more information about the used algorithm, see [MIT 93].

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pTaps pointer is NULL.

ippStsSizeErr

Indicates an error when the tapsLen is less than 5, or rFreq isout of range.

ExampleResult:246

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

FIRGenHighpass
Computes highpass FIR filter coefficients.

247

1

Intel® Integrated Performance Primitives Developer Guide and Reference

SyntaxIppStatus ippsFIRGenHighpass_64f(Ipp64f rFreq, Ipp64f* pTaps, int tapsLen, IppWinType
winType, IppBool doNormal, Ipp8u* pBuffer);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
rFreq

Normalized cutoff frequency, must be in the range (0, 0.5).

pTaps

Pointer to the array where computed tap values are stored. The
number of elements in the array is tapsLen.

tapsLenwinTypeNumber of elements in the array containing the tap values;
must be equal or greater than 5.
Specifies what type of window is used in computations. The
winType must have one of the following values:
ippWinBartlett Bartlett window;
ippWinBlackman Blackman window;
ippWinHamming Hamming window;
ippWinHann Hann window.

doNormalSpecifies normalized or non-normalized sequence of the filter
coefficients is computed. The doNormal must have one of thefollowing values:
ippTrue The function computes normalized sequence ofcoefficients.
ippFalse The function computes non-normalized sequence ofcoefficients.

pBuffer

Pointer to the buffer for internal calculations. To get the size of thebuffer, use the ippsFIRGenGetBufferSize function.

Description
This function computes tapsLen coefficients for highpass FIR filter the cutoff frequency rFreq by windowing
the ideal infinite filter coefficients. The parameter winType specifies the type of the window. For more
information on window types used by the function, see Windowing Functions.he computed coefficients are
stored in the array pTaps.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pTaps pointer is NULL.

ippStsSizeErr

Indicates an error when the tapsLen is less than 5, or rFreq isout of the range.

FIRGenBandpass248

Developer Guide and Reference for Intel® Integrated Performance Primitives

1Computes bandpass FIR filter coefficients.

SyntaxIppStatus ippsFIRGenBandpass_64f(Ipp64f rLowFreq, Ipp64f rHighFreq, Ipp64f* pTaps, int
tapsLen, IppWinType winType, IppBool doNormal, Ipp8u* pBuffer);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
rLowFreq

Normalized low cutoff frequency, must be in the range (0, 0.5)
and less than rHighFreq.

rHighFreq

Normalized high cutoff frequency, must be in the range (0, 0.5)
and greater than rLowFreq.

pTaps

Pointer to the array where computed tap values are stored. The
number of elements in the array is tapsLen.

tapsLenwinTypeNumber of elements in the array containing the tap values;
should be equal or greater than 5.
Specifies what type of window is used in computations. The
winType must have one of the following values:
ippWinBartlett Bartlett window;
ippWinBlackman Blackman window;
ippWinHamming Hamming window;
ippWinHann Hann window.

doNormalSpecifies normalized or non-normalized sequence of the filter
coefficients is computed. The doNormal must have one of thefollowing values:
ippTrue The function computes normalized sequence ofcoefficients.
ippFalse The function computes non-normalized sequence ofcoefficients.

pBuffer

Pointer to the buffer for internal calculations. To get the size of thebuffer, use the ippsFIRGenGetBufferSize function.

Description
This function computes tapsLen coefficients for bandpass FIR filter with the cutoff frequencies rLowFreq andrHighFreq by windowing the ideal infinite filter coefficients. The parameter winType specifies the type of
the window. For more information on window types used by the function, see Windowing Functions. The
computed coefficients are stored in the array pTaps.

Return Values
ippStsNoErr

Indicates no error.

249

1

Intel® Integrated Performance Primitives Developer Guide and ReferenceippStsNullPtrErr
ippStsSizeErr

ExampleResult:250

Indicates an error when the pTaps pointer is NULL.
Indicates an error when the tapsLen is less than 5, or rLowFreq
is greater than or equal to rHighFreq, or one of the frequency
parameters rLowFreq and rHighFreq is out of the range.

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

FIRGenBandstop
Computes bandstop FIR filter coefficients.

SyntaxIppStatus ippsFIRGenBandstop_64f(Ipp64f rLowFreq, Ipp64f rHighFreq, Ipp64f* pTaps, int
tapsLen, IppWinType winType, IppBool doNormal, Ipp8u* pBuffer);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
rLowFreq

Normalized low cutoff frequency, must be in the range (0, 0.5)
and less than rHighFreq.

rHighFreq

Normalized high cutoff frequency, must be in the range (0, 0.5)
and greater than rLowFreq.

pTaps

Pointer to the array where computed tap values are stored. The
number of elements in the array is tapsLen.

tapsLenwinTypeNumber of elements in the array containing the tap values,
must be equal or greater than 5.
Specifies what type of window is used in computations. The
winType must have one of the following values:
ippWinBartlett Bartlett window;
ippWinBlackman Blackman window;
ippWinHamming Hamming window;
ippWinHann Hann window.

doNormalSpecifies normalized or non-normalized sequence of the filter
coefficients is computed. The doNormal must have one of thefollowing values:
ippTrue The function computes normalized sequence ofcoefficients.
ippFalse The function computes non-normalized sequence ofcoefficients.

pBuffer

Pointer to the buffer for internal calculations. To get the size of thebuffer, use the ippsFIRGenGetBufferSize function.

Description
This function computes tapsLen coefficients for bandstop FIR filter with the cutoff frequencies rLowFreq andrHighFreq by windowing the ideal infinite filter coefficients. The parameter winType specifies the type of
the window. For more information on window types used by the function, see Windowing Functions. The
computed coefficients are stored in the array pTaps.

Return Values
ippStsNoErr

Indicates no error.

251

1

Intel® Integrated Performance Primitives Developer Guide and ReferenceippStsNullPtrErr
ippStsSizeErr

Indicates an error when the pTaps pointer is NULL.
Indicates an error when the tapsLen is less than 5, or rLowFreq
is greater than or equal to rHighFreq, or one of the frequency
parameters rLowFreq and rHighFreq is out of the range.

Single-Rate FIR LMS Filter Functions
The functions described in this section perform the following tasks:••••

initialize a single-rate FIR least mean squares (LMS) filter
get and set the delay line values
get the filter coefficients (taps) values
perform filtering

FIRLMSGetTaps
Retrieves the tap values from the FIR LMS filter.

SyntaxIppStatus ippsFIRLMSGetTaps_32f(const IppsFIRLMSState_32f* pState, Ipp32f* pOutTaps);
IppStatus ippsFIRLMSGetTaps32f_16s(const IppsFIRLMSState32f_16s* pState, Ipp32f*
pOutTaps);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pStatePointer to the FIR LMS filter state structure.

pOutTaps

Pointer to the array holding copies of the taps.

Description
This function copies the taps from the state structure pState to the tapsLen-length array pOutTaps.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsContextMatchErr

Indicates an error when the state identifier is incorrect.

FIRLMSGetDlyLine
Retrieves the delay line contents from the FIR LMS
filter.

SyntaxIppStatus ippsFIRLMSGetDlyLine_32f(const IppsFIRLMSState_32f* pState, Ipp32f* pDlyLine,
int* pDlyLineIndex);252

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

IppStatus ippsFIRLMSGetDlyLine32f_16s(const IppsFIRLMSState32f_16s* pState, Ipp16s*
pDlyLine, int* pDlyLineIndex);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pStatepDlyLine
pDlyLineIndex

Pointer to the FIR LMS filter state structure.
Pointer to the tapsLen -length array holding the delay line
values.
Pointer to the array to store the current delay line index copiedfrom the filter state structure.

Description
This function copies the delay line values and the current delay line index from the state structure pState,and stores them into pDlyLine and pDlyLineIndex, respectively.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsContextMatchErr

Indicates an error when the state identifier is incorrect.

FIRLMSSetDlyLine
Sets the delay line contents in the FIR LMS filter.

SyntaxIppStatus ippsFIRLMSGetDlyLine_32f(const IppsFIRLMSState_32f* pState, Ipp32f* pDlyLine,
int* pDlyLineIndex);
IppStatus ippsFIRLMSGetDlyLine32f_16s(const IppsFIRLMSState32f_16s* pState, Ipp16s*
pDlyLine, int* pDlyLineIndex);
IppStatus ippsFIRLMSSetDlyLine_32f(IppsFIRLMSState_32f* pState, const Ipp32f* pDlyLine,int dlyLineIndex);
IppStatus ippsFIRLMSSetDlyLine32f_16s(IppsFIRLMSState32f_16s* pState, const Ipp16s*
pDlyLine, int dlyLineIndex);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

253

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Parameters
pStatepDlyLine
pDlyLineIndex
dlyLineIndex

Pointer to the FIR LMS filter state structure.
Pointer to the tapsLen-length array holding the delay line
values.
Pointer to the index of the delay line.
Initial index of the delay line to be stored in the filter state
structure pState.

Description
This function copies the delay line values from pDlyLine, and the current delay line index fromdlyLineIndex, and stores them into the state structure pState.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsContextMatchErr

Indicates an error when the state identifier is incorrect.

FIRLMSGetStateSize
Computes the size of the external buffer for the FIR
least mean squares (LMS) filter structure.

SyntaxIppStatus ippsFIRLMSGetStateSize32f_16s(int tapsLen, int dlyIndex, int* pBufferSize);
IppStatus ippsFIRLMSGetStateSize_32f(int tapsLen, int dlyIndex, int* pBufferSize);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
tapsLen

Number of elements in the array containing tap values.

dlyIndex

Current index of the delay line.

pBufferSize

Pointer to the computed buffer size value.

Description
This function computes the size of the external buffer for the FIR LMS filter state structure and stores theresult in pBufferSize.

Return Values
ippStsNoErr

254

Indicates no error.

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

ippStsNullPtrErr

Indicates an error when pBufferSize is NULL.

ippStsFIRLenErr

Indicates an error when tapsLen is less than, or equal to zero.

See Also
FIRLMS Filters a vector through the FIR least mean squares (LMS) filter.
FIRLMSInit
Initializes the adaptive FIR least mean squares (LMS)
filter state structure.

SyntaxIppStatus ippsFIRLMSInit32f_16s(IppsFIRLMSState32f_16s** ppState, const Ipp32f* pTaps,
int tapsLen, const Ipp16s* pDlyLine, int dlyIndex, Ipp8u* pBuffer);
IppStatus ippsFIRLMSInit_32f(IppsFIRLMSState_32f** ppState, const Ipp32f* pTaps, int
tapsLen, const Ipp32f* pDlyLine, int dlyIndex, Ipp8u* pBuffer);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
ppStateDouble pointer to the state structure.

pTaps

Pointer to the array of tap values.

tapsLen

Number of elements in the array containing tap values.

pDlyLine

Pointer to the array containing delay line values. The number of
elements in the array is 2*tapsLen.

dlyIndex

Current index of the delay line.

pBuffer

Pointer to the external buffer for the FIR LMS state structure.

Description
This function initializes the single-rate FIR LMS filter state structure. The ippsFIRLMSInit function copies
the taps from the pTaps array of tapsLen length into the state structure ppTaps. The pDlyLine array ofsize 2*tapsLen specifies the delay line values. The current index of the delay line is defined by dlyIndex. If
the pointer to pDlyLine or pTaps is NULL, the corresponding value of the state structure is initialized tozero.
To compute the size of the buffer required for the FIR LMS state structure, use theippsFIRLMSGetStateSize function.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when either ppState or pBuffer is NULL.

ippStsFIRLenErr

Indicates an error when tapsLen is less than, or equal to zero.

255

1

Intel® Integrated Performance Primitives Developer Guide and Reference

See Also
FIRLMS Filters a vector through the FIR least mean squares (LMS) filter.
FIRLMSGetStateSize Computes the size of the external buffer for the FIR least mean squares(LMS) filter structure.
FIRLMS
Filters a vector through the FIR least mean squares(LMS) filter.

SyntaxIppStatus ippsFIRLMS_32f(const Ipp32f* pSrc, const Ipp32f* pRef, Ipp32f* pDst, int len,float mu, IppsFIRLMSState_32f* pState);
IppStatus ippsFIRLMS32f_16s(const Ipp16s* pSrc, const Ipp16s* pRef, Ipp16s* pDst, intlen, float mu, IppsFIRLMSState32f_16s* pState);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pStatePointer to the FIR LMS filter state structure.

pSrc

Pointer to the source vector .

pRef

Pointer to the reference signal

pDst

Pointer to the output signal

len

Number of elements in the vector.

mu

Adaptation step.

Description
Before calling this function, compute the size of the buffer required for the pState structure using
FIRLMSGetStateSize and initialize the structure using FIRLMSInit.
This function filters a source vector pSrc using an adaptive FIR LMS filter.
Each of len iterations performed by the function consists of two main procedures. First, ippsLMS filters thecurrent element of the source vector pSrc and stores the result in pDst. Next, the function updates thecurrent taps using the reference signal pRef, the computed result signal pDst, and the adaptation step mu.
The filtering procedure can be described as a FIR filter operation:

256

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Here the input sample to be filtered is denoted by x(n), the taps are denoted by h(i), and y(n) is thereturn value.
The function updates the filter coefficients that are stored in the filter state structure pState. Updated filter
coefficients are defined as hn+1(i) = hn(i) + 2* mu* errVal * x(n-i),
where hn+1(i) denotes new taps, hn(i) denotes initial taps, mu and errVal are the adaptation step andadaptation error value, respectively. An adaptation error value errVal is computed inside the function as thedifference between the output and reference signals.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error when len is less than, or equal to 0.

ippStsContextMatchErr

Indicates an error when the state identifier is incorrect.

IIR Filter Functions
The functions described in this section initialize an infinite impulse response (IIR) filter and perform filtering.
Intel IPP supports two types of filters: arbitrary order filter and biquad filter.
The figure below shows the structure of an arbitrary order IIR filter.
Structure of an Arbitrary Order Filter

257

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Here x[n] is a sample of the input signal, y[n] is a sample of the output signal, order is the filter order, andb0, b1, . . ., b order, a1, . . ., a order are the reduced filter coefficients.
The output signal is computed by the following formula:.
Reduced coefficients are calculated as ak = Ak/A0 and bk = Bk/A0
where A0, A 1,...Aorder, B0, B1,...Border are initial filter coefficients (taps).
A biquad IIR filter is a cascade of second-order filters. The figure below illustrates the structure of the biquadfilter with k cascades of second-order filters.
Structure of a BiQuad IIR Filter

By default, all Intel IPP IIR filter functions that do not have the _DF1_ suffix in a name, use the direct form 2(DF2) delay line. The difference between the direct form 1 (DF1) and DF2 representations of the delay line isthat DF1 contains delayed values of the source and destination vectors, while DF2 is two times shorter andcontains pre-calculated values based on the following code [Opp75]:

for( i = 0; i < order; i++ ){pDly[i] = 0;
for( n = order - i; n > 0; n-- ){pDly[i] += pTaps[n+i] * pSrc[len-n]; /* b- coefficients */}}for( i = 0; i < order; i++ ){for( n = order - i; n > 0; n-- ){pDly[i] -= pTaps[order+n+i] * pDst[len-n]; /* a- coefficients */}}There is no way to transform DF2 back to DF1. Therefore, if you need DF1 output, copy the corresponding
last order values of the source vector and last order values of the destination vector to DF1 buffer. Please
note that the IIRSetDlyLine and IIRGetDlyLine functions get/return the delay line values also in DF2 form.
To initialize and use an IIR filter, follow this general scheme:258

Developer Guide and Reference for Intel® Integrated Performance Primitives

1.

2.
3.

1

Call ippsIIRInit to initialize the filter as an arbitrary order IIR filter in the external buffer, orippsIIRInit_BiQuad to initialize the filter as a cascade of biquads in the external buffer. Size of thebuffer can be computed by calling the functions ippsIIRGetStateSize orippsIIRGetStateSize_BiQuad, respectively.
Call ippsIIR to filter consecutive samples at once.
Call ippsIIRGetDlyLine and ippsIIRSetDlyLine to get and set the delay line values in the IIR state
structure.

IIRInit
Initializes an arbitrary IIR filter state.

SyntaxCase 1: Operation on integer samples
IppStatus ippsIIRInit32f_16s(IppsIIRState32f_16s** ppState, const Ipp32f* pTaps, int
order, const Ipp32f* pDlyLine, Ipp8u* pBuf);
IppStatus ippsIIRInit64f_16s(IppsIIRState64f_16s** ppState, const Ipp64f* pTaps, int
order, const Ipp64f* pDlyLine, Ipp8u* pBuf);
IppStatus ippsIIRInit64f_32s(IppsIIRState64f_32s** ppState, const Ipp64f* pTaps, int
order, const Ipp64f* pDlyLine, Ipp8u* pBuf);
IppStatus ippsIIRInit32fc_16sc(IppsIIRState32fc_16sc** ppState, const Ipp32fc* pTaps,
int order, const Ipp32fc* pDlyLine, Ipp8u* pBuf);
IppStatus ippsIIRInit64fc_16sc(IppsIIRState64fc_16sc** ppState, const Ipp64fc* pTaps,
int order, const Ipp64fc* pDlyLine, Ipp8u* pBuf);
IppStatus ippsIIRInit64fc_32sc(IppsIIRState64fc_32sc** ppState, const Ipp64fc* pTaps,
int order, const Ipp64fc* pDlyLine, Ipp8u* pBuf);

Case 2: Operation on floating point samples
IppStatus ippsIIRInit_32f(IppsIIRState_32f** ppState, const Ipp32f* pTaps, int order,
const Ipp32f* pDlyLine, Ipp8u* pBuf);
IppStatus ippsIIRInit64f_32f(IppsIIRState64f_32f** ppState, const Ipp64f* pTaps, int
order, const Ipp64f* pDlyLine, Ipp8u* pBuf);
IppStatus ippsIIRInit_64f(IppsIIRState_64f** ppState, const Ipp64f* pTaps, int order,
const Ipp64f* pDlyLine, Ipp8u* pBuf);
IppStatus ippsIIRInit_32fc(IppsIIRState_32fc** ppState, const Ipp32fc* pTaps, int
order, const Ipp32fc* pDlyLine, Ipp8u* pBuf);
IppStatus ippsIIRInit64fc_32fc(IppsIIRState64fc_32fc** ppState, const Ipp64fc* pTaps,
int order, const Ipp64fc* pDlyLine, Ipp8u* pBuf);
IppStatus ippsIIRInit_64fc(IppsIIRState_64fc** ppState, const Ipp64fc* pTaps, int
order, const Ipp64fc* pDlyLine, Ipp8u* pBuf);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

259

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Parameters
pTaps

Pointer to the array containing the taps. The number of
elements in the array is 2*(order+1).

order

Order of the IIR filter.

pDlyLine

Pointer to the array containing the delay line values. The
number of elements in the array is order.

ppStatepBuf

Pointer to the pointer to the arbitrary IIR state structure to becreated.
Pointer to the external buffer.

Description
This function initializes an arbitrary IIR filter state in the external buffer. The size of this buffer must be
computed previously by calling the function IIRGetStateSize. The initialization functions copy the taps
from the array pTaps into the state structure pState. The order-length array pDlyLine specifies the delayline values. If the pointer to the array pDlyLine is not NULL, the array content is copied into the context
structure, otherwise the delay values of the state structure are set to 0.
The filter order is defined by the order value which is equal to 0 for zero-order filters. The 2*( order +1)-length array pTaps specifies the taps arranged in the array as follows:
B0, B1, . . ., Border, A0, A1, . . ., AorderA0 ≠ 0If the state is not created, the initialization function returns an error status.
The initialization functions with the 32s_32f suffixes called with floating-point taps automatically convert thetaps into integer data type.
In all cases the data is converted into integer type with scaling for better precision.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsDivByZeroErr

Indicates an error when A0 is equal to 0.

ippStsIIROrderErr

Indicates an error when order is less than or equal to 0.

IIRInit_BiQuad
Initializes an IIR filter state.

SyntaxCase 1: Operation on integer samples
IppStatus ippsIIRInit32f_BiQuad_16s(IppsIIRState32f_16s** ppState, const Ipp32f* pTaps,
int numBq, const Ipp32f* pDlyLine, Ipp8u* pBuf);
IppStatus ippsIIRInit64f_BiQuad_16s(IppsIIRState64f_16s** ppState, const Ipp64f* pTaps,
int numBq, const Ipp64f* pDlyLine, Ipp8u* pBuf);
IppStatus ippsIIRInit64f_BiQuad_32s(IppsIIRState64f_32s** ppState, const Ipp64f* pTaps,
int numBq, const Ipp64f* pDlyLine, Ipp8u* pBuf);260

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

IppStatus ippsIIRInit32fc_BiQuad_16sc(IppsIIRState32fc_16sc** ppState, const Ipp32fc*
pTaps, int numBq, const Ipp32fc* pDlyLine, Ipp8u* pBuf);
IppStatus ippsIIRInit64fc_BiQuad_16sc(IppsIIRState64fc_16sc** ppState, const Ipp64fc*
pTaps, int numBq, const Ipp64fc* pDlyLine, Ipp8u* pBuf);
IppStatus ippsIIRInit64fc_BiQuad_32sc(IppsIIRState64fc_32sc** ppState, const Ipp64fc*
pTaps, int numBq, const Ipp64fc* pDlyLine, Ipp8u* pBuf);
IppStatus ippsIIRInit64f_BiQuad_DF1_32s(IppsIIRState64f_32s** ppState, const Ipp64f*
pTaps, int numBq, const Ipp32s* pDlyLine, Ipp8u* pBuf);

Case 2: Operation on floating point samples
IppStatus ippsIIRInit_BiQuad_32f(IppsIIRState_32f** ppState, const Ipp32f* pTaps, int
numBq, const Ipp32f* pDlyLine, Ipp8u* pBuf);
IppStatus ippsIIRInit64f_BiQuad_32f(IppsIIRState64f_32f** ppState, const Ipp64f* pTaps,
int numBq, const Ipp64f* pDlyLine, Ipp8u* pBuf);
IppStatus ippsIIRInit_BiQuad_64f(IppsIIRState_64f** ppState, const Ipp64f* pTaps, int
numBq, const Ipp64f* pDlyLine, Ipp8u* pBuf);
IppStatus ippsIIRInit_BiQuad_32fc(IppsIIRState_32fc** ppState, const Ipp32fc* pTaps,
int numBq, const Ipp32fc* pDlyLine, Ipp8u* pBuf);
IppStatus ippsIIRInit64fc_BiQuad_32fc(IppsIIRState64fc_32fc** ppState, const Ipp64fc*
pTaps, int numBq, const Ipp64fc* pDlyLine, Ipp8u* pBuf);
IppStatus ippsIIRInit_BiQuad_64fc(IppsIIRState_64fc** ppState, const Ipp64fc* pTaps,
int numBq, const Ipp64fc* pDlyLine, Ipp8u* pBuf);
IppStatus ippsIIRInit_BiQuad_DF1_32f(IppsIIRState_32f** ppState, const Ipp32f* pTaps,
int numBq, const Ipp32f* pDlyLine, Ipp8u* pBuf);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pTaps

Pointer to the array containing the taps. The number of
elements in the array is 6*numBq.

numBq

Number of cascades of biquads.

pDlyLine

Pointer to the array containing the delay line values. The
number of elements in the array is 2*numBq.

ppStatePointer to the pointer to the biquad IIR state structure.

pBuf

Pointer to the external buffer.

ppStatePointer to the pointer to the arbitrary IIR state structure to becreated.

261

1Intel® Integrated Performance Primitives Developer Guide and Reference

Description
This function initializes a biquad (BQ) IIR filter state in the external buffer. The size of this buffer must be
computed previously by calling the corresponding function ippsIIRGetStateSize_BiQuad. The initialization
function copies the taps from the array pTaps into the state structure ppState. The array pDlyLine
specifies the delay line values. The number of elements in the array pDlyLine is 4*numBq for the function
flavor ippsIIRInit_BiQuad_DF1, and 2* numBq for all other flavors.
If the pointer to the array pDlyLine is not NULL, the array content is copied into the context structure,otherwise the delay values of the state structure are set to 0.
The function flavor ippsIIRInit_BiQuad_DF1 operates with the delay line values that are arranged in thearray as follows:
x0,-2, x0,-1, y0,-2, y0,-1, x1,-2, x1,-1, y1,-2, y1,-1, ... xnumBq-1,-2, xnumBq-1,-1, y numBq-1,-2, y numBq-1,-1.
A biquad IIR filter is defined by a cascade of biquads. The number of cascades of biquads is specified by thenumBq value. The 6*numBq -length array pTaps specifies the taps arranged in the array as follows:
B0,0, B0,1, B0,2, A0,0, A0,1, A0,2; B1,0, B1,1, B1,2, A1,0, A1,1, A1,2; . . . AnumBq-1,2
An,0 ≠ 0, Bn,0 ≠ 0
If the state is not created, the initialization function returns an error status.
The initialization functions with the 32s_32f suffixes called with floating-point taps automatically convert thetaps into integer data type.
In all cases the data is converted into integer type with scaling for better precision.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsDivByZeroErr

Indicates an error when A0, An,0 or Bn,0 is equal to 0.

ippStsIIROrderErr

Indicates an error when numBq is less than or equal to 0.

IIRGetStateSize
Computes the length of the external buffer for thearbitrary IIR filter state structure.

SyntaxIppStatus ippsIIRGetStateSize32f_16s(int order, int* pBufferSize);
IppStatus ippsIIRGetStateSize64f_16s(int order, int* pBufferSize);
IppStatus ippsIIRGetStateSize64f_32s(int order, int* pBufferSize);
IppStatus ippsIIRGetStateSize32fc_16sc(int order, int* pBufferSize);
IppStatus ippsIIRGetStateSize64fc_16sc(int order, int* pBufferSize);
IppStatus ippsIIRGetStateSize64fc_32sc(int order, int* pBufferSize);
IppStatus ippsIIRGetStateSize_32f(int order, int* pBufferSize);
IppStatus ippsIIRGetStateSize64f_32f(int order, int* pBufferSize);
IppStatus ippsIIRGetStateSize_64f(int order, int* pBufferSize);262

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

IppStatus ippsIIRGetStateSize_32fc(int order, int* pBufferSize);
IppStatus ippsIIRGetStateSize64fc_32fc(int order, int* pBufferSize);
IppStatus ippsIIRGetStateSize_64fc(int order, int* pBufferSize);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
order

Order of the IIR filter.

pBufferSize

Pointer to the computed buffer size value.

Description
This function computes the size of the external buffer for an arbitrary IIR filter state, and stores the result in
pBufferSize.
To compute a size of the buffer, the filter order parameter order must be specified.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pBufferSize pointer is NULL.

ippStsIIROrderErr

Indicates an error when order is less than or equal to 0.

IIRGetStateSize_BiQuad
Computes the length of the external buffer for thebiquad IIR filter state structure.

SyntaxIppStatus ippsIIRGetStateSize32f_BiQuad_16s(int numBq, int* pBufferSize);
IppStatus ippsIIRGetStateSize64f_BiQuad_16s(int numBq, int* pBufferSize);
IppStatus ippsIIRGetStateSize64f_BiQuad_32s(int numBq, int* pBufferSize);
IppStatus ippsIIRGetStateSize32fc_BiQuad_16sc(int numBq, int* pBufferSize);
IppStatus ippsIIRGetStateSize64fc_BiQuad_16sc(int numBq, int* pBufferSize);
IppStatus ippsIIRGetStateSize64fc_BiQuad_32sc(int numBq, int* pBufferSize);
IppStatus ippsIIRGetStateSize_BiQuad_32f(int numBq, int* pBufferSize);
IppStatus ippsIIRGetStateSize64f_BiQuad_32f(int numBq, int* pBufferSize);
IppStatus ippsIIRGetStateSize_BiQuad_64f(int numBq, int* pBufferSize);
IppStatus ippsIIRGetStateSize_BiQuad_32fc(int numBq, int* pBufferSize);
IppStatus ippsIIRGetStateSize64fc_BiQuad_32fc(int numBq, int* pBufferSize);

263

1

Intel® Integrated Performance Primitives Developer Guide and Reference

IppStatus ippsIIRGetStateSize_BiQuad_64fc(int numBq, int* pBufferSize);
IppStatus ippsIIRGetStateSize64f_BiQuad_DF1_32s(int numBq, int* pBufferSize);
IppStatus ippsIIRGetStateSize_BiQuad_DF1_32f(int numBq, int* pBufferSize);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
numBq

Number of cascades of biquads.

pBufferSize

Pointer to the computed buffer size value.

Description
This function computes the size of the external buffer for a corresponding biquad IIR filter state, and storesthe result in pBufferSize.
To compute a size of the buffer, the number of cascades of biquads numBq must be specified.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pBufferSize pointer is NULL.

ippStsIIROrderErr

Indicates an error when numBq is less than or equal to 0.

IIRGetDlyLine
Retrieves the delay line contents from the IIR filter
state.

SyntaxIppStatus ippsIIRGetDlyLine32f_16s(const IppsIIRState32f_16s* pState, Ipp32f*
pDlyLine);
IppStatus ippsIIRGetDlyLine64f_16s(const IppsIIRState64f_16s* pState, Ipp64f*
pDlyLine);
IppStatus ippsIIRGetDlyLine64f_32s(const IppsIIRState64f_32s* pState, Ipp64f*
pDlyLine);
IppStatus ippsIIRGetDlyLine32fc_16sc(const IppsIIRState32fc_16sc* pState, Ipp32fc*
pDlyLine);
IppStatus ippsIIRGetDlyLine64fc_16sc(const IppsIIRState64fc_16sc* pState, Ipp64fc*
pDlyLine);
IppStatus ippsIIRGetDlyLine64fc_32sc(const IppsIIRState64fc_32sc* pState, Ipp64fc*
pDlyLine);
IppStatus ippsIIRGetDlyLine_32f(const IppsIIRState_32f* pState, Ipp32f* pDlyLine);264

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

IppStatus ippsIIRGetDlyLine64f_32f(const IppsIIRState64f_32f* pState, Ipp64f*
pDlyLine);
IppStatus ippsIIRGetDlyLine_64f(const IppsIIRState_64f* pState, Ipp64f* pDlyLine);
IppStatus ippsIIRGetDlyLine_32fc(const IppsIIRState_32fc* pState, Ipp32fc* pDlyLine);
IppStatus ippsIIRGetDlyLine64fc_32fc(const IppsIIRState64fc_32fc* pState, Ipp64fc*
pDlyLine);
IppStatus ippsIIRGetDlyLine_64fc(const IppsIIRState_64fc* pState, Ipp64fc* pDlyLine);
IppStatus ippsIIRGetDlyLine64f_DF1_32s(const IppsIIRState64f_32s* pState, Ipp32s*
pDlyLine);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pStatepDlyLine

Pointer to the IIR filter state structure.
Pointer to the array containing the delay line values. The
number of elements in the array is order for arbitrary filtersand 2*numBq for BQ filters.

Description
This function copies the delay line values from the corresponding state structure pState and stores theminto the pDlyLine array. If the pointer is NULL, then the delay line values in the state structure are initialized
to zero.
The corresponding filter state must be initialized beforehand by one of the initialization functions.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pState pointer is NULL.

ippStsContextMatchErr

Indicates an error when the state identifier is incorrect.

IIRSetDlyLine
Sets the delay line contents in an IIR filter state.

SyntaxIppStatus ippsIIRSetDlyLine32f_16s(IppsIIRState32f_16s* pState, const Ipp32f*
pDlyLine);
IppStatus ippsIIRSetDlyLine64f_16s(IppsIIRState64f_16s* pState, const Ipp64f*
pDlyLine);
IppStatus ippsIIRSetDlyLine64f_32s(IppsIIRState64f_32s* pState, const Ipp64f*
pDlyLine);

265

1

Intel® Integrated Performance Primitives Developer Guide and Reference

IppStatus ippsIIRSetDlyLine32fc_16sc(IppsIIRState32fc_16sc* pState, const Ipp32fc*
pDlyLine);
IppStatus ippsIIRSetDlyLine64fc_16sc(IppsIIRState64fc_16sc* pState, const Ipp64fc*
pDlyLine);
IppStatus ippsIIRSetDlyLine64fc_32sc(IppsIIRState64fc_32sc* pState, const Ipp64fc*
pDlyLine);
IppStatus ippsIIRSetDlyLine_32f(IppsIIRState_32f* pState, const Ipp32f* pDlyLine);
IppStatus ippsIIRSetDlyLine64f_32f(IppsIIRState64f_32f* pState, const Ipp64f*
pDlyLine);
IppStatus ippsIIRSetDlyLine_64f(IppsIIRState_64f* pState, const Ipp64f* pDlyLine);
IppStatus ippsIIRSetDlyLine_32fc(IppsIIRState_32fc* pState, const Ipp32fc* pDlyLine);
IppStatus ippsIIRSetDlyLine64fc_32fc(IppsIIRState64fc_32fc* pState, const Ipp64fc*
pDlyLine);
IppStatus ippsIIRSetDlyLine_64fc(IppsIIRState_64fc* pState, const Ipp64fc* pDlyLine);
IppStatus ippsIIRSetDlyLine64f_DF1_32s(IppsIIRState64f_32s* pState, const Ipp32s*
pDlyLine);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pStatepDlyLine

Pointer to the IIR filter state structure.
Pointer to the array holding the delay line values. The numberof elements in the array is order for arbitrary filters and2*numBq for BQ filters. If the pointer is NULL, then the delay line
values in the state structure are initialized to zero.

Description
This function copies the delay line values from pDlyLine and stores them into the state structure pState. If
the pointer is NULL, then the delay line values in the state structure are initialized to zero.
The filter state must be initialized beforehand by one of the initialization functions.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pState pointer is NULL.

ippStsContextMatchErr

Indicates an error when the state identifier is incorrect.

IIR
Filters a source vector through an IIR filter.

266

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

SyntaxCase 1: Not-in-place operation on integer samples
IppStatus ippsIIR32f_16s_Sfs(const Ipp16s* pSrc, Ipp16s* pDst, int len,
IppsIIRState32f_16s* pState, int scaleFactor);
IppStatus ippsIIR64f_16s_Sfs(const Ipp16s* pSrc, Ipp16s* pDst, int len,
IppsIIRState64f_16s* pState, int scaleFactor);
IppStatus ippsIIR64f_32s_Sfs(const Ipp32s* pSrc, Ipp32s* pDst, int len,
IppsIIRState64f_32s* pState, int scaleFactor);
IppStatus ippsIIR32fc_16sc_Sfs(const Ipp16sc* pSrc, Ipp16sc* pDst, int len,
IppsIIRState32fc_16sc* pState, int scaleFactor);
IppStatus ippsIIR64fc_16sc_Sfs(const Ipp16sc* pSrc, Ipp16sc* pDst, int len,
IppsIIRState64fc_16sc* pState, int scaleFactor);
IppStatus ippsIIR64fc_32sc_Sfs(const Ipp32sc* pSrc, Ipp32sc* pDst, int len,
IppsIIRState64fc_32sc* pState, int scaleFactor);

Case 2: Not-in-place operation on floating point samples
IppStatus ippsIIR_32f(const Ipp32f* pSrc, Ipp32f* pDst, int len, IppsIIRState_32f*
pState);IppStatus ippsIIR_64f(const Ipp64f* pSrc, Ipp64f* pDst, int len, IppsIIRState_64f*
pState);IppStatus ippsIIR64f_32f(const Ipp32f* pSrc, Ipp32f* pDst, int len,
IppsIIRState64f_32f* pState);
IppStatus ippsIIR_32fc(const Ipp32fc* pSrc, Ipp32fc* pDst, int len, IppsIIRState_32fc*
pState);IppStatus ippsIIR_64fc(const Ipp64fc* pSrc, Ipp64fc* pDst, int len, IppsIIRState_64fc*
pState);IppStatus ippsIIR64fc_32fc(const Ipp32fc* pSrc, Ipp32fc* pDst, int len,
IppsIIRState64fc_32fc* pState);

Case 3: In-place operation on integer samples
IppStatus ippsIIR32f_16s_ISfs(Ipp16s* pSrcDst, int len, IppsIIRState32f_16s* pState,
int scaleFactor);
IppStatus ippsIIR32fc_16sc_ISfs(Ipp16sc* pSrcDst, int len, IppsIIRState32fc_16sc*
pState, int scaleFactor);
IppStatus ippsIIR64f_16s_ISfs(Ipp16s* pSrcDst, int len, IppsIIRState64f_16s* pState,
int scaleFactor);
IppStatus ippsIIR64f_32s_ISfs(Ipp32s* pSrcDst, int len, IppsIIRState64f_32s* pState,
int scaleFactor);
IppStatus ippsIIR64fc_16sc_ISfs(Ipp16sc* pSrcDst, int len, IppsIIRState64fc_16sc*
pState, int scaleFactor);
IppStatus ippsIIR64fc_32sc_ISfs(Ipp32sc* pSrcDst, int len, IppsIIRState64fc_32sc*
pState, int scaleFactor);

Case 4: In-place operation on floating point samples
IppStatus ippsIIR_32f_I(Ipp32f* pSrcDst, int len, IppsIIRState_32f* pState);

267

1

Intel® Integrated Performance Primitives Developer Guide and Reference

IppStatus ippsIIR_64f_I(Ipp64f* pSrcDst, int len, IppsIIRState_64f* pState);
IppStatus ippsIIR64f_32f_I(Ipp32f* pSrcDst, int len, IppsIIRState64f_32f* pState);
IppStatus ippsIIR_32fc_I(Ipp32fc* pSrcDst, int len, IppsIIRState_32fc* pState);
IppStatus ippsIIR_64fc_I(Ipp64fc* pSrcDst, int len, IppsIIRState_64fc* pState);
IppStatus ippsIIR64fc_32fc_I(Ipp32fc* pSrcDst, int len, IppsIIRState64fc_32fc* pState);

Case 4: Operation with specified number of vector
IppStatus ippsIIR_32f_P(const Ipp32f** ppSrc, Ipp32f** ppDst, int len, int nChannels,
IppsIIRState_32f** ppState);
IppStatus ippsIIR64f_32s_PSfs(const Ipp32s** ppSrc, Ipp32s** ppDst, int len, int
nChannels, IppsIIRState64f_32s** ppState, int* pScaleFactor);
IppStatus ippsIIR_32f_IP(Ipp32f** ppSrcDst, int len, int nChannels, IppsIIRState_32f**
ppState);IppStatus ippsIIR64f_32s_IPSfs(Ipp32s** ppSrcDst, int len, int nChannels,
IppsIIRState64f_32s** ppState, int* pScaleFactor);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pStatePointer to the IIR filter state structure.

pSrc

Pointer to the array of the pointers to the IIR filter state
structures.
Pointer to the source vector.

ppSrc

Pointer to the array of pointers to the source vectors.

pDst

Pointer to the destination vector.

ppDst

Pointer to the array of pointers to the destination vector.

ppStatelen

Pointer to the source and destination vector for the in-place
operations.
Pointer to the array of pointers to the source and destination
vectors for the in-place operations.
Number of elements of the vector to be filtered.

nChannels

Number of vectors to be filtered.

scaleFactor

Scale factor, refer to Integer Scaling.

pScaleFactor

Pointer to the scale factor.

pSrcDstppSrcDst

268

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Description
This function filters len elements of the source vector pSrc or pSrcDst through an IIR filter, and stores theresults in pDst or pSrcDst, respectively. The filter parameters are specified in pState.The output of theinteger sample is scaled according to scaleFactor and can be saturated.
Do not modify the scaleFactor value unless the state structure is changed.
The filter state must be initialized before calling the function ippsIIR. Specify the number of taps tapsLen,
the tap values in pTaps, the delay line values in pDlyLine, and the order or numBq value beforehand.
Function flavors described in the Case 4 filter simultaneously the nChannels source vectors. Each vector
must have the len elements and is filtered with its own state structure. These state structures must be
initialized beforehand.
Example demonstrates how to use the function ippsIIR to filter a sample. The function
ippsConvert_64f32s_Sfs converts floating-point taps into integer data type before callingippsIIRInitAlloc_32s.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error when len is less or equal to 0.

ippStsChannelErr

Indicates an error when nChannels is less or equal to 0.

ippStsContextMatchErr

Indicates an error when the state identifier is incorrect.

ExampleIIRSparseInit
Initializes a sparse IIR filter structure.

SyntaxIppStatus ippsIIRSparseInit_32f(IppsIIRSparseState_32f** ppState, const Ipp32f*
pNZTaps, const Ipp32s* pNZTapPos, int nzTapsLen1, int nzTapsLen2, const Ipp32f*
pDlyLine, Ipp8u* pBuf);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pNZTaps

Pointer to the array containing the non-zero tap values.

pNZTapPos

Pointer to the array containing positions of the non-zero tap
values. The number of elements in the array is nzTapsLen.

nzTapsLen1, nzTapsLen2

Pointer to the destination vector.

269

1

Intel® Integrated Performance Primitives Developer Guide and Reference

pDlyLine

Pointer to the array containing the delay line values.

ppStateDouble pointer to the sparse IIR state structure.

pBuf

Pointer to the external buffer for the sparse IIR state structure.

Description
This function initializes a sparse IIR filter state structure ppState in the external buffer pBuf. The size of thisbuffer must be computed previously by calling the function ippsIIRSparseGetStateSize.
The (nzTapsLen1 + nzTapsLen2)-length array pNZTaps specifies the non-zero taps arranged in the arrayas follows:
B0, B1, . . ., BnzTapsLen1-1, A0, A1, . . ., AnzTapsLen2-1.
The (nzTapsLen1 + nzTapsLen2)-length array pNZTapPos specifies the non-zero tap positions arranged in
the array as follows:
BP0, BP1, . . ., BPnzTapsLen1-1, AP0, AP1, . . ., APnzTapsLen2-1, AP0 ≠ 0
The initialization function copies the values of filter coefficients from the array pNZTaps containing non-zero
taps and their positions from the array pNZTapPos into the state structure ppState. The array pDlyLine
contains the delay line values.The number of elements in this array is pNZTapPos[nzTapsLen1-1] +pNZTapPos[nzTapsLen1 + nzTapsLen2- 1]. If the pointer to the array pDlyLine is not NULL, the array
contents is copied into the state structure ppState, otherwise the delay line values in the state structure are
initialized to 0.

NOTE
The values of nzTapsLen1, nzTapsLen2, pNZTapPos[nzTapsLen -1], andpNZTapPos[nzTapsLen1 + nzTapsLen2- 1] must be equal to those specified in the function
ippsIIRSparseGetStateSize.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsIIROrderErr

Indicates an error if nzTapsLen1 is less than or equal to 0, or
nzTapsLen2 is less than 0.

ippStsSparseErr

Indicates an error if positions of the non-zero taps are not in
ascending order, or are negative or repetitive; or
pNZTapPos[nzTapsLen1] is equal to 0.

IIRSparseGetStateSize
Computes the size of the external buffer for thesparse IIR filter structure.

SyntaxIppStatus ippsIIRSparseGetStateSize_32f(int nzTapsLen1, int nzTapsLen2, int order1, int
order2, int* pStateSize);

Include Files
ipps.h270

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Domain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parametersorder1, order2

Number of elements in the array containing the non-zero tap
values.
Order of the sparse IIR filter.

pStateSize

Pointer to the computed value of the external buffer.

nzTapsLen1, nzTapsLen2

Description
This function computes the size in bytes of the external buffer for a sparse IIR filter state that is required forthe function ippsIIRSparseInit. The computations are based on the specified number of non-zero filter
coefficients nzTapsLen1, nzTapsLen2 and filter orders order1, order2. order1 =pNZTapPos[nzTapsLen1 -1], order2 = pNZTapPos[nzTapsLen1 + nzTapsLen2- 1] (see description of
the function ippsIIRSparseInit for more details). The result value is stored in the pStateSize.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if pStateSize pointer is NULL.

ippStsIIROrderErr

Indicates an error if nzTapsLen1 is less than or equal to 0, or
nzTapsLen2 is less than 0.

ippStsSparseErr

Indicates an error if order1 or order2 is less than 0.

IIRSparse
Filters a source vector through a sparse IIR filter.

SyntaxIppStatus ippsIIRSparse_32f(const Ipp32f* pSrc, Ipp32f* pDst, int len,
IppsIIRSparseState_32f* pState);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pStatePointer to the sparse IIR filter state structure.

pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

len

Number of elements that will be filtered.

271

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Description
This function applies the sparse IIR filter to the len elements of the source vector pSrc, and stores theresults in pDst. The filter parameters - the number of non-zero taps nzTapsLen1, nzTapsLen2, their valuespNZTaps and their positions pNZTapPos, and the delay line values pDlyLine - are specified in the sparse IIR
filter structure pState that should be previously initialized the function ippsIIRSparseInit.
In the following definition of the sparse IIR filter, the sample to be filtered is denoted x(n), the non-zero taps
are denoted Bi and A i, their positions are denoted BPi and APi.
The non-zero taps are arranged in the array as follows:
B0, B1, . . ., BnzTapsLen1-1, A0, A1, . . ., AnzTapsLen2-1.
The non-zero tap positions are arranged in the array as follows:
BP0, BP1, . . ., BPnzTapsLen1-1, AP0, AP1, . . ., APnzTapsLen2-1, AP0 ≠ 0
The return value is y(n) is defined by the formula for a sparse IIR filter:

After the function has performed calculations, it updates the delay line values stored in the filter state
structure.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error if len is less than or equal to 0.

ExampleThe example below shows how to use the sparse IIR filter functions.

int buflen; Ipp8u *buf; int nzTapsLen1 = 5;//number of non-zero taps in the FIR part of
the formula int nzTapsLen2 = 3;//number of non-zero taps in the IIR part of the formula
Ipp32f nzTaps [] = {0.5, 0.4, 0.3, 0.2, 0.1, 0.8, 0.7,
0.6};//non-zero taps values (FIR+IIR) Ipp32s
nzTapsPos[] = {0, 10, 20, 30, 40, 1, 5, 15};//nonzero tap positions (FIR+IIR) IppsIIRSparseState_32f* iirState; Ipp32f *src,*dst; /* ............................................. */ippsIIRSparseGetStateSize_32f(nzTapsLen1, nzTapsLen2, nzTapsPos [nzTapsLen1 1],
nzTapsPos [nzTapsLen1 + nzTapsLen2 - 1], &buflen); buf =ippsMalloc_8u(buflen); ippsIIRSparseInit_32f(&iirState, nzTaps, nzTapsPos, nzTapsLen1,
nzTapsLen2,
NULL, buf); /* . . . . initializing src somehow . . . . */ippsIIRSparse_32f(src, dst, len, iirState); /* dst[i] = src[i] * 0.5 + src[i-10] * 0.4 +src[i-20] * 0.3 + src[i-30] * 0.2+ src[i-40] * 0.1 + dst[i-1] * 0.8 + dst[i-5] *0.7 + dst[i-15] * 0.6 */ /* ................................................... */ippsFree(buf);
IIRGenGetBufferSize

272

Developer Guide and Reference for Intel® Integrated Performance Primitives

1Computes the size of the buffer required forippsIIRGenLowpass and ippsIIRGenHighpass
internal calculations.

SyntaxIppStatus ippsIIRGenGetBufferSize(int order, int* pBufferSize);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
order

Order of the filter [1, 12].

pBufferSize

Pointer to the calculated buffer size (in bytes).

Description
This function computes the size of the buffer that is required for ippsIIRGenLowpass/ippsIIRGenHighpass
internal calculations.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when any of the specified pointers is NULL.

ippStsIIRGenOrderErr

Indicates an error when the order value is less than 1, or
greater than 12.

See Also
IIRGenLowpass IIRGenHighpass Computes lowpass and highpass IIR filter coefficients.
IIRGenLowpass, IIRGenHighpass
Computes lowpass and highpass IIR filter coefficients.

SyntaxIppStatus ippsIIRGenLowpass_64f(Ipp64f rFreq, Ipp64f ripple, int order, Ipp64f* pTaps,
IppsIIRFilterType filterType, Ipp8u* pBuffer);
IppStatus ippsIIRGenHighpass_64f(Ipp64f rFreq, Ipp64f ripple, int order, Ipp64f* pTaps,
IppsIIRFilterType filterType, Ipp8u* pBuffer);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

273

1

Intel® Integrated Performance Primitives Developer Guide and Reference

ParametersrFreq

Cutoff frequency, should be in the range (0, 0.5).

ripplePosible ripple in pass band for ippChebyshev1 type of filter.

order

Order of the filter [1, 12]

pTaps

Pointer to the array where computed tap values are stored.

filterType

Type of the IIR filter, possible values: ippButterworth,ippChebyshev1.

pBuffer

Pointer to the buffer for internal calculations. To get the size of thebuffer, use the ippsIIRGenGetBufferSize function.

Description
These functions computes coefficients for lowpass or highpass IIR filters, respectively, with the cutoff
frequency rFreq. The parameter filterType specifies the type of the filter. The computed coefficients are
stored in the array pTaps. Its length must be at least 2*(order + 1) and the taps arranged in the array as
follows:
B0, B1, . . ., Border, A0, A1, . . ., Aorder

Application Notes
Butterworth filters are characterized by a magnitude response that is at most flat in the passband andmonotonic overall. Butterworth filters sacrifice rolloff steepness for monotonicity in the passband. Unless thesmoothness of the Butterworth filter is needed, Chebyshev1 filter can generally provide steeper rolloff
characteristics with a lower filter order. Chebyshev1 type filters are equiripple in the passband and monotonic
in the stopband. For ippButterworth filter cutoff frequency is the frequency where the magnitude responseof the filter is 2-1/2. For ippChebyshev1 filter cutoff frequency is the frequency at which the magnitude
response of the filter is (-ripple) dB. For the functions ippsIIRGenLowpass and ippsIIRGenHighpass, thenormalized cutoff frequency rFreq must be a number between 0 and 0.5, where 0.5 corresponds to the
Nyquist frequency, π radians per sample. The correspondence between MATLAB's Wn and Intel IPP rFreq isvery simple: Wn = 2*rFreq.
Examples:1) For data sampled at 1000 Hz, create a 9th-order highpass Butterworth filter with cutoff frequency at 300
Hz.
Intel IPP:

Ipp64f pTaps[2*(9+1)];
status = ippsIIRGenHighpass( 300.0/1000.0, 0, 9, pTaps, ippButterworth );MATLAB:[b,a] = butter(9,300/500,'high');2) For data sampled at 1000 Hz, create a 9th-order lowpass Chebyshev1 filter with ripple in the passband of
0.5 dB and a cutoff frequency at 300 Hz.
Intel IPP:

Ipp64f pTaps[2*(9+1)];
status = ippsIIRGenLowpass( 300.0/1000.0, 0.5, 9, pTaps, ippChebyshev1 );

274

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

MATLAB:[b,a] = cheby1(9, 0.5, 300/500);

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pTaps pointer is NULL.

ippStsIIRGenOrderErr
ippStsFilterFrequencyErr

Indicates an error when the order is less than 1 or greaterthan 12.
Indicates an error when the rFreq is out of the range.

See Also
IIRGenGetBufferSize Computes the size of the buffer required for ippsIIRGenLowpass andippsIIRGenHighpass internal calculations.

IIRIIR Filter Functions
The functions described in this section initialize an infinite impulse response (IIR) filter and perform a zerophase digital filtering of input data in both forward and backward directions. The formulas below explain why
the filtered signal has zero-phase distortion. Consider the following case in the frequency domain: if x(n) is
the input sequence and h(n) is the IIR filter's impulse response, then the result of the forward filter pass is:
Y 1 eiφ = X eiφ * H eiφ
where
•
•
•

X(eiφ) is the Fourier transform of x(n)H(eiφ) is the Fourier transform of h(n)Y1(eiφ) is the Fourier transform of the forward filter pass

Backward filtering corresponds to filtering of time-reversed signal. Time reversal corresponds to replacing φwith -φ in the frequency domain, so the result of time reversal is:
Y 1 e−iφ = X e−iφ * H e−iφWhen the filter is applied for the second time, the above formula is multiplied by the Fourier transform of thefilter's impulse response function H(eiφ):Y 1 e−iφ = X e−iφ * H e−iφ * H eiφ
The final time reversal in the frequency domain results in:Y 1 e−iφ = X eiφ * H eiφ * H e−iφ = X eiφ * H eiφ2

You can see from the resulting equation that:•••

The filtered signal has zero-phase distortion (as the filtering was done with |H(eiφ)|2, which is purely
real-valued)
The filter transfer function has the squared magnitude of the original filter transfer function
The filter order is double the order of the initialized IIR filter

To initialize and use an IIRIIR filter, follow this general scheme:
1.
2.
3.

Call ippsIIRIIRInit to initialize the IIRIIR filter in the external buffer. To compute the size of thebuffer, use the ippsIIRIIRGetStateSize function.
Call ippsIIRIIR to filter a vector.
Call ippsIIRIIRGetDlyLine and ippsIIRIIRSetDlyLine to get and set the delay line values in the
IIRIIR state structure.

IIRIIRGetStateSize

275

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Computes the length of the external buffer for the
IIRIIR filter state structure.

SyntaxIppStatus ippsIIRIIRGetStateSize_32f(int order, int* pBufferSize);
IppStatus ippsIIRIIRGetStateSize64f_32f(int order, int* pBufferSize);
IppStatus ippsIIRIIRGetStateSize_64f(int order, int* pBufferSize);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
order

Order of the IIRIIR filter.

pBufferSize

Pointer to the computed buffer size value.

Description
This function computes the size of the external buffer for the IIRIIR filter state structure, and stores theresult in pBufferSize.
Use this function before using IIRIIRInit.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pBufferSize pointer is NULL.

ippStsIIROrderErr

Indicates an error when order is less than or equal to zero.

See Also
IIRIIRInit Initializes the IIRIIR filter state structure.
IIRIIRInit
Initializes the IIRIIR filter state structure.

SyntaxIppStatus ippsIIRIIRInit_32f(IppsIIRState_32f** ppState, const Ipp32f* pTaps, int
order, const Ipp32f* pDlyLine, Ipp8u* pBuf);
IppStatus ippsIIRIIRInit64f_32f(IppsIIRState64f_32f** ppState, const Ipp64f* pTaps, int
order, const Ipp64f* pDlyLine, Ipp8u* pBuf);
IppStatus ippsIIRIIRInit_64f(IppsIIRState_64f** ppState, const Ipp64f* pTaps, int
order, const Ipp64f* pDlyLine, Ipp8u* pBuf);

Include Files
ipps.h276

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Domain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pTaps

Pointer to the array containing the taps. The number of
elements in the array is 2*(order+1).

order

Order of the IIRIIR filter.

pDlyLine

ppStatepBuf

Pointer to the array containing the delay line values. The
number of elements in the array is order. If IIRIIRInit iscalled with pDlyLine==NULL, then it automatically forms thedelay line that minimizes the start-up and ending transients.
The line is formed by matching the initial conditions to remove
the DC offset at the beginning and the end of the input vector.
Pointer to the pointer to the arbitrary IIRIIR state structure tobe created.
Pointer to the external buffer.

Description
This function initializes the arbitrary IIRIIR filter state structure in the external buffer. Before using the
IIRIIRInit function, compute the size of the external buffer by calling the IIRIIRGetStateSize function.
The initialization functions copy the taps from the pTaps array into the pState structure . The order-length
array pDlyLine specifies the delay line values. If the pDlyLine pointer to the array is not NULL, the array
content is copied into the context structure, otherwise the delay values of the state structure are set tovalues that minimize the start-up and ending transients. These values are obtained by matching the initialconditions to remove the DC offset at the beginning and the end of the input vector.
The filter order is defined by the order value which is equal to 0 for zero-order filters. The 2*( order +1)-length array pTaps specifies the taps arranged in the array as follows:
B0, B1, . . ., Border, A0, A1, . . ., AorderA0 ≠ 0If the state structure is not created, the initialization function returns an error status.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsDivByZeroErr

Indicates an error when A0 is equal to zero.

ippStsIIROrderErr

Indicates an error when order is less than or equal to zero.

See Also
IIRIIRGetStateSize Computes the length of the external buffer for the IIRIIR filter state structure.
IIRIIRGetDlyLine
Retrieves the delay line contents from the IIIRIR filter
state structure.

277

1

Intel® Integrated Performance Primitives Developer Guide and Reference

SyntaxIppStatus ippsIIRIIRGetDlyLine_32f(const IppsIIRState_32f* pState, Ipp32f* pDlyLine);
IppStatus ippsIIRIIRGetDlyLine64f_32f(const IppsIIRState64f_32f* pState, Ipp64f*
pDlyLine);
IppStatus ippsIIRIIRGetDlyLine_64f(const IppsIIRState_64f* pState, Ipp64f* pDlyLine);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pStatePointer to the IIRIIR filter state structure.

pDlyLine

Pointer to the array containing the delay line values. The
number of elements in the array is order.

Description
This function copies the delay line values from the corresponding pState structure and stores them into thepDlyLine array.
The corresponding filter state structure must be initialized beforehand by the initialization function.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pState pointer is NULL.

ippStsContextMatchErr

Indicates an error when the state identifier is incorrect.

IIRIIRSetDlyLine
Sets the delay line contents in the IIRIIR filter state
structure.

SyntaxIppStatus ippsIIRIIRSetDlyLine_32f(IppsIIRState_32f* pState, const Ipp32f* pDlyLine);
IppStatus ippsIIRIIRSetDlyLine64f_32f(IppsIIRState64f_32f* pState, const Ipp64f*
pDlyLine);
IppStatus ippsIIRIIRSetDlyLine_64f(IppsIIRState_64f* pState, const Ipp64f* pDlyLine);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

278Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Parameters
pStatepDlyLine

Pointer to the IIRIIR filter state structure.
Pointer to the array holding the delay line values. The numberof elements in the array is order. If the pointer is NULL, thenthe delay line values in the state structure are formedinternally to minimize the start-up and ending transients.
These values are obtained by matching the initial conditions toremove the DC offset at the beginning and the end of the input
vector.

Description
This function copies the delay line values from pDlyLine and stores them into the pState structure . If thepointer is NULL, then the delay line values in the state structure are initialized to values that minimize thestart-up and ending transients. These values are obtained by matching the initial conditions to remove theDC offset at the beginning and the end of the input vector.
The filter state must be initialized beforehand by the initialization function.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pState pointer is NULL.

ippStsContextMatchErr

Indicates an error when the state identifier is incorrect.

IIRIIR
Filters a source vector through an IIRIIR filter.

SyntaxCase 1: Not-in-place operation
IppStatus ippsIIRIIR_32f(const Ipp32f* pSrc, Ipp32f* pDst, int len, IppsIIRState_32f*
pState);IppStatus ippsIIRIIR_64f(const Ipp64f* pSrc, Ipp64f* pDst, int len, IppsIIRState_64f*
pState);IppStatus ippsIIRIIR64f_32f(const Ipp32f* pSrc, Ipp32f* pDst, int len,
IppsIIRState64f_32f* pState);

Case 2: In-place operation
IppStatus ippsIIRIIR_32f_I(Ipp32f* pSrcDst, int len, IppsIIRState_32f* pState);
IppStatus ippsIIRIIR_64f_I(Ipp64f* pSrcDst, int len, IppsIIRState_64f* pState);
IppStatus ippsIIRIIR64f_32f_I(Ipp32f* pSrcDst, int len, IppsIIRState64f_32f* pState);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

279

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Parameters
pStatePointer to the IIRIIR filter state structure.

pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

pSrcDstlen

Pointer to the source and destination vector for the in-place
operations.
Number of elements of the vector to be filtered.

Description
This function filters len elements of the source vector pSrc or pSrcDst through an IIRIIR filter, and storesthe results in pDst or pSrcDst, respectively. The filter parameters are specified in pState.
Before calling the ippsIIRIIR function, initialize the filter state structure by using the IIRIIRInit function
and specify the number of taps tapsLen, the tap values in pTaps, the delay line values in pDlyLine, and theorder value.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsLengthErr

Indicates an error when length of the vectors < 3*(IIR

ippStsContextMatchErr

Indicates an error when the state identifier is incorrect.

order).

ExampleThe figure below shows the result of the example, where the X-axis is index of the input/output vector/signal
to see that there is no phase distortion, Y-axis - amplitude of input/output signals.

280

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Median Filter Functions
Median filters are nonlinear rank-order filters based on replacing each element of the source vector with themedian value, taken over the fixed neighborhood (mask) of the processed element. These filters areextensively used in image and signal processing applications. Median filtering removes impulsive noise, while
keeping the signal blurring to the minimum. Typically mask size (or window width) is set to odd value which
ensures simple function implementation and low output signal bias. You can use an even mask size infunction calls as well, but internally it will be changed to odd by subtracting 1.
Another specific feature of the median filter implementation in Intel IPP is that elements outside the source
vector, which are needed to determine the median value for “border” elements, are located in a delay line. If
the delay line is absent, then they are set to be equal to the corresponding edge element of the source
vector.
FilterMedianGetBufferSize
Computes the size of the work buffer for theippsFilterMedian function.

SyntaxIppStatus ippsFilterMedianGetBufferSize (int maskSize, IppDataType dataType, int*
pBufferSize);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
maskSize

Size of the median mask.

dataType

Data type of the source and destination vectors. Possible values are
ipp8u, ipp16s, ipp32s, ipp32f, or ipp64f.

pBufferSize

Pointer to the computed size of the external work buffer, in bytes.

Description
The ippsFilterMedianGetBufferSize function computes the size, in bytes, of the external work buffer
needed for the ippsFilterMedian function. The result is stored in the pBufferSize parameter.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pBufferSize is NULL.

ippStsMaskSizeErr

Indicates an error when maskSize is less than, or equal to zero.

ippStsDataTypeErr

Indicates an error when dataType has an illegal value.

ippStsEvenMedianMaskSize

Indicates a warning when maskSize has an even value.

See Also
FilterMedian MODIFIED API. Computes median values for each source vector element.

281

1

Intel® Integrated Performance Primitives Developer Guide and Reference

FilterMedian
MODIFIED API. Computes median values for eachsource vector element.

SyntaxIppStatus ippsFilterMedian_8u(const Ipp8u* pSrc, Ipp8u* pDst, int len, int maskSize,const Ipp8u* pDlySrc, Ipp8u* pDlyDst, Ipp8u* pBuffer);
IppStatus ippsFilterMedian_16s(const Ipp16s* pSrc, Ipp16s* pDst, int len, int maskSize,const Ipp16s* pDlySrc, Ipp16s* pDlyDst, Ipp8u* pBuffer);
IppStatus ippsFilterMedian_32s(const Ipp32s* pSrc, Ipp32s* pDst, int len, int maskSize,const Ipp32s* pDlySrc, Ipp32s* pDlyDst, Ipp8u* pBuffer);
IppStatus ippsFilterMedian_32f(const Ipp32f* pSrc, Ipp32f* pDst, int len, int maskSize,const Ipp32f* pDlySrc, Ipp32f* pDlyDst, Ipp8u* pBuffer);
IppStatus ippsFilterMedian_64f(const Ipp64f* pSrc, Ipp64f* pDst, int len, int maskSize,const Ipp64f* pDlySrc, Ipp64f* pDlyDst, Ipp8u* pBuffer);
IppStatus ippsFilterMedian_8u_I(Ipp8u* pSrcDst, int len, int maskSize, const Ipp8u*
pDlySrc, Ipp8u* pDlyDst, Ipp8u* pBuffer);
IppStatus ippsFilterMedian_16s_I(Ipp16s* pSrcDst, int len, int maskSize, const Ipp16s*
pDlySrc, Ipp16s* pDlyDst, Ipp8u* pBuffer);
IppStatus ippsFilterMedian_32s_I(Ipp32s* pSrcDst, int len, int maskSize, const Ipp32s*
pDlySrc, Ipp32s* pDlyDst, Ipp8u* pBuffer);
IppStatus ippsFilterMedian_32f_I(Ipp32f* pSrcDst, int len, int maskSize, const Ipp32f*
pDlySrc, Ipp32f* pDlyDst, Ipp8u* pBuffer);
IppStatus ippsFilterMedian_64f_I(Ipp64f* pSrcDst, int len, int maskSize, const Ipp64f*
pDlySrc, Ipp64f* pDlyDst, Ipp8u* pBuffer);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters

pSrc

Pointer to the source and destination vector (for the in-place
operation).
Pointer to the source vector.

pDst

Pointer to the destination vector.

len

Number of elements in the vector.

pSrcDstmaskSize

pDlySrc

282

Median mask size, must be a positive integer. If an even valueis specified, the function subtracts 1 and uses the odd value ofthe filter mask for median filtering.
Pointer to the array containing values for the source delaylines.

Developer Guide and Reference for Intel® Integrated Performance Primitives

pDlyDstpBuffer

1

Pointer to the array containing values for the destination delaylines.
Pointer to the work buffer. To compute the size of the buffer,
use the FilterMedianGetBufferSize function.

Description
Important The API of this function has been modified in Intel IPP 9.0 release.

This function computes median values for each element of the source vector pSrc or pSrcDst, and storesthe result in pDst or pSrcDst, respectively.

NOTE
The values for non-existent elements are stored in pDlySrc (if it is not NULL). The last(maskSize-1) elements of vectors are stored in pDlyDst (if it is not NULL). For example, if
maskSize is equal to 3, then:pDst[0] = median(pDlySrc[0], pDlySrc[1], pSrc[0]);pDst[1] = median(pDlySrc[1], pSrc[0], pSrc[1]);pDst[2] = median(pSrc[0], pSrc[1], pSrc[2]);...
pDlyDst[0] = pSrc[len-2];
pDlyDst[1] = pSrc[len-1]
If pDlySrc is NULL, the value of a non-existent element is equal to the value of the first vector
element:

pDst[0] = median(pSrc[0], pSrc[0], pSrc[0]);pDst[1] = median(pSrc[0], pSrc[0], pSrc[1]);pDst[2] = median(pSrc[0], pSrc[1], pSrc[2]);...
If pDlyDst is NULL, the operation of storing the last (maskSize-1) elements of vectors is not
performed.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of thepSrcDst, pSrc, pDst,
pBuffer pointers is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

ippStsEvenMedianMaskSize

Indicates a warning when the median mask length is even.

ExampleThe example below illustrates using ippsFilterMedian_16s_I for single-rate filtering.

void median(void) {Ipp16s x[8] = {1,2,127,4,5,0,7,8};
IppStatus status = ippsFilterMedian_16s_I(x, 8, 3);
printf_16s("median =", x,8, status);
}

283

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Output:median = 1 1 2 4 5 4 5 7Matlab* Analog:>> x = [1 2 127 4 5 0 7 8]; medfilt1(x)Polyphase Resampling Functions
The Intel® IPP functions described in this section build, apply, and free Kaizer-windowed polyphase filters fordata resampling. Functions with the Fixed suffix are intended for fixed rational resampling factor and canprovide faster speed. Functions without the suffix build universal resampling filter with linear interpolation offilter coefficients and enable a variable factor.
For general description of the polyphase resampling algorithm, see "Multirate Digital Signal Processing" by R.
Crochire and L. Rabiner, [Cro83].
ResamplePolyphaseGetSize, ResamplePolyphaseFixedGetSize
Get the size of the polyphase resampling structure.

SyntaxIppStatus ippsResamplePolyphaseGetSize_16s(Ipp32f window, int nStep, int* pSize,
IppHintAlgorithm hint);
IppStatus ippsResamplePolyphaseGetSize_32f(Ipp32f window, int nStep, int* pSize,
IppHintAlgorithm hint);
IppStatus ippsResamplePolyphaseFixedGetSize_16s(int inRate, int outRate, int len, int*
pSize, int* pLen, int* pHeight, IppHintAlgorithm hint);
IppStatus ippsResamplePolyphaseFixedGetSize_32f(int inRate, int outRate, int len, int*
pSize, int* pLen, int* pHeight, IppHintAlgorithm hint);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
window

The size of the ideal lowpass filter window.

nStep

The discretization step for filter coefficients.

inRate

The input rate for fixed factor resampling.

outRateThe output rate for fixed factor resampling.

len

The filter length for fixed factor resampling.

pSize

The pointer to the variable that contains the size of the polyphaseresampling structure.

pLen

The pointer to the variable that contains the real filter length.

pHeight

The pointer to the variable that contains the number of filters.

284

Developer Guide and Reference for Intel® Integrated Performance Primitives

hint

1

Suggests using specific code (must be equal to ippAlgHintFast).
Possible values for the hint parameter are given in Hint Arguments.

Description
These functions determine the size required for the fixed rate polyphase resampling structure and associatedstorage, the filter length, and the number of filters in the filter bank. The returned length of the filter is equal
to min{l ≥ len, l%4}, the subfilter length for zero phase is greater by 1. These values can be used forexport and import of fixed polyphase resampling filter.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsSizeErr

ippStsBadArgErr

For ippsResamplePolyphaseGetSize function, indicates an error
when inRate, outRate , nStep or len is less than or equal to 0.
For ippsResamplePolyphaseFixedGetSize function, indicates anerror when inRate, outRate, nStep or len is less than or equal
to 0.
Indicates an error when window is less than 2/nStep.

ResamplePolyphaseInit, ResamplePolyphaseFixedInit
Initialize the structure for polyphase resampling withcalculating the filter coefficients.

SyntaxIppStatus ippsResamplePolyphaseInit_16s( Ipp32f window, int nStep, Ipp32f rollf, Ipp32f
alpha, IppsResamplingPolyphase_16s* pSpec, IppHintAlgorithm hint);
IppStatus ippsResamplePolyphaseInit_32f( Ipp32f window, int nStep, Ipp32f rollf, Ipp32f
alpha, IppsResamplingPolyphase_32f* pSpec, IppHintAlgorithm hint);
IppStatus ippsResamplePolyphaseFixedInit_16s( int inRate, int outRate, int len, Ipp32f
rollf, Ipp32f alpha, IppsResamplingPolyphaseFixed_16s* pSpec, IppHintAlgorithm hint);
IppStatus ippsResamplePolyphaseFixedInit_32f( int inRate, int outRate, int len, Ipp32f
rollf, Ipp32f alpha, IppsResamplingPolyphaseFixed_32f* pSpec, IppHintAlgorithm hint);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
window

The size of the ideal lowpass filter window.

nStep

The discretization step for filter coefficients.

rollf

The roll-off frequency of the filter.

285

1

Intel® Integrated Performance Primitives Developer Guide and Referencealpha

The parameter of the Kaiser window.

inRate

The input rate for fixed factor resampling.

outRateThe output rate for fixed factor resampling.

len

The filter length for fixed factor resampling.

pSpec

The pointer to the resampling state structure.

hint

Suggests using specific code (must be equal toippAlgHintFast). The possible values for the parameter hint
are listed in Hint Arguments.

Description
The function ippsResamplePolyphaseInit initializes structures for data resampling using the ideal lowpass
filter. The function ippsResamplePolyphaseInit applies the Kaiser window with alpha parameter andwindow width to the lowpass filter. This means that the values of the ideal lowpass filtering function arecalculated for all i values such that |i/nStep|≤window.
Use the pSpec structure to resample input samples with the ippsResample function with arbitrary
resampling factor. In this case, filter coefficients for each output sample are calculated using linear
interpolation between two nearest values. The size of the filter depends on the resampling factor.
The function ippsResamplePolyphaseFixedInit initializes structures for data resampling with the factor
equal to inRate/outRate. If you denote the number of filters created in the
IppsResamplingPolyphaseStructure structure for input and output frequencies by fnum, thenfnum = outRate/GCD (inRate, outRate)
where
GCD (a, b) is the greatest common divisor of a and b. For example, if inRate = 8000 and outRate =11025, then the number of filters will be fnum = 11025/GCD (8000, 11025) = 441.
Functions with the Fixed suffix pre-calculate filter coefficients for each phase and store them in the data
structure for better performance. Use these functions when the ratio inRate/outRate is rational only. These
functions can be considerably faster but may require large data structures for some input and output rates.
Before calling these functions, you need to allocate memory for the resampling state structure. To calculate
the memory size, filter length, and the number of filters, use the ippsResamplePolyphaseGetSize orippsResamplePolyphaseFixedGetSize functions.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsSizeErr

ippStsBadArgErr

ResamplePolyphaseSetFixedFilter

286

For ippsResamplePolyphaseInit function, indicates an error
when inRate, outRate , nStep or len is less than or equal to 0.
For ippsResamplePolyphaseFixedInit function, indicates anerror when inRate, outRate, nStep or len is less than or equal
to 0.
Indicates an error when rollf is less than or equal to 0 or isgreater than 1, or if alpha is less than 1, or if window is lessthan 2/nStep.

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Sets polyphase resampling filter coefficients.

SyntaxIppStatus ippsResamplePolyphaseSetFixedFilter_16s(const Ipp16s* pSrc, int step, int
height, IppsResamplingPolyphaseFixed_16s* pSpec);
IppStatus ippsResamplePolyphaseSetFixedFilter_32f(const Ipp32f* pSrc, int step, int
height, IppsResamplingPolyphaseFixed_32f* pSpec);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

ParameterspSrc

The pointer to the input vector of filter coefficients.

step

The row step in pSrc vector.

height

The number of filters (the number of rows in pSrc vector).

pSpec

The pointer to the resampling state structure.

Description
This function imports pre-calculated filter coefficients into the polyphase resampling structure. If the step
value is less than the filter length, trailing filter coefficients are zeroed.
When allocating memory keep in mind that actual structure size of the filter is height * step + 1, because
zero-phase subfilter has step + 1 coefficients. This function only works with structures obtained by using
ResamplePolyphaseFixedInit function. The behavior for custom-created structures is undefined.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsSizeErr
ippStsBadArgErr

Indicates an error when step or height is less than or equal to0.
Indicates that height is greater than the number of filters in
pSpec structure.

ResamplePolyphaseGetFixedFilter
Gets polyphase resampling filter coefficients.

SyntaxIppStatus ippsResamplePolyphaseGetFixedFilter_16s(Ipp16s* pDst, int step, int height,
const IppsResamplingPolyphaseFixed_16s* pSpec);
IppStatus ippsResamplePolyphaseGetFixedFilter_32f(Ipp32f* pDst, int step, int height,
const IppsResamplingPolyphaseFixed_32f* pSpec);

287

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pDst

The pointer to the output vector of filter coefficients.

step

The row step in pDst vector.

height

The number of filters (the number of rows in pDst vector).

pSpec

The pointer to the resampling state structure.

Description
This function exports filter coefficients from the polyphase resampling structure. If the step value is lessthan the filter length, only first step coefficients are exported.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsSizeErr
ippStsBadArgErr

Indicates an error when step or height is less than or equal to0.
Indicates an error when height is greater than the number offilters in pSpec structure.

ExampleThe code example below demonstrates export and import of the Polyphase Resampling Filter Bank.

int inRate=16000; // input frequency
int outRate=8000; // output frequency
int history; // half of filter lengthchar fname[]="filter.flt\0";// coefficient file name{int size,len,height;
FILE *file; short *pFilter;
IppsresamplingPolyphaseFixed_16s *state;history=(int)(64.0f*0.5*IPP_MAX(1.0,1.0/(double)outRate/(double)inRate))+1;
ippsResamplePolyphaseFixedGetSize_16s(inRate, outRate, 2*(history-1), &size, &len, &height,
ippAlgHintFast);state = (IppsResamlingPolyphaseFixed_16s*)ippsMalloc_8u(size);
ippsResamplePolyphaseFixedInit_16s(inRate,outRate,2*(history-1), 0.95f, 9.0f, state,ippAlgHintFast);
pFilter=ippsMalloc_16s(len*height);
ippsResamplePolyphaseGetFixedFilter_16s(pFilter,len,height,state);
file=fopen(fname,"wb"); fwrite(&size,sizeof(int),1,file);
fwrite(&len,sizeof(int),1,file);
fwrite(&height,sizeof(int),1,file);
fwrite(pFilter,sizeof(short),len*height,file);288

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

fclose(file); ippsFree(pFilter);ippsFree (state);}{
int size,len,height; FILE *file;short *pFilter;
IppsresamplingPolyphaseFixed_16s *state;history=(int)(64.0f*0.5*IPP_MAX(1.0,1.0/(double)outRate/(double)inRate))+1;
file=fopen(fname,"rb");
fread(&size,sizeof(int),1,file);
fread(&len,sizeof(int),1,file);
fread(&height,sizeof(int),1,file);
pFilter=ippsMalloc_16s(len*height);
fread(pFilter,sizeof(short),len*height,file);
fclose(file);state=(IppsresamplingPolyphaseFixed_16s*)ippsMalloc_8u(size);
ippsResamplePolyphaseFixedInit_16s(inRate,outRate,2*(history-1), 0.95f, 9.0f, state,ippAlgHintFast);
ippsResamplePolyphaseSetFixedFilter_16s((const Ipp16s*)pFilter,len,height,(IppsresamplingPolyphaseFixed_16s*)state);
ippsFree(pFilter);// use of polyphase filter…
ippsFree(state);}
ResamplePolyphase, ResamplePolyphaseFixedResample input data using polyphase filters.

SyntaxIppStatus ippsResamplePolyphase_16s(const Ipp16s* pSrc, int len, Ipp16s* pDst, Ipp64f
factor, Ipp32f norm, Ipp64f* pTime, int* pOutlen, const IppsResamplingPolyphase_16s*
pSpec);
IppStatus ippsResamplePolyphase_32f(const Ipp32f* pSrc, int len, Ipp32f* pDst, Ipp64f
factor, Ipp32f norm, Ipp64f* pTime, int* pOutlen, const IppsResamplingPolyphase_32f*
pSpec);
IppStatus ippsResamplePolyphaseFixed_16s(const Ipp16s* pSrc, int len, Ipp16s* pDst,
Ipp32f norm, Ipp64f* pTime, int* pOutlen, const IppsResamplingPolyphaseFixed_16s*
pSpec);
IppStatus ippsResamplePolyphaseFixed_32f(const Ipp32f* pSrc, int len, Ipp32f* pDst,
Ipp32f norm, Ipp64f* pTime, int* pOutlen, const IppsResamplingPolyphaseFixed_32f*
pSpec);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

289

1

Intel® Integrated Performance Primitives Developer Guide and Reference

ParameterspSrc

The pointer to the input vector.

pDst

The pointer to the output vector.

len

The number of input vector elements to resample.

norm

The norm factor for output samples.

factor

The resampling factor.

pOutlen

The pointer to the start time of resampling (in input vector
elements). Keeps the input sample number and the phase forthe first output sample from the next input data portion.
The number of calculated output vector elements.

pSpec

The pointer to the resampling state structure.

pTime

Description
These functions convert data from the input vector changing their frequency and compute all output samples
that can be correctly calculated for the given input and the filter length. For the ippsResamplePolyphasefunction, the ratio of output and input frequencies is defined by the factor argument. For theippsResamplePolyphaseFixed function, this ratio is defined during creation of the resampling structure.
The value for pTime[0] defines the time value for which the first output sample is calculated.
Input vector with indices less than pTime[0] contains the history data of filters. The history length is equal
to flen/2 for ippsResamplePolyphaseFixed function , and [1/2window*max(1, 1/factor)]+1 forippsResamplePolyphase function. Here flen is the filter length and window is the size of the ideal lowpass
filter window. The input vector must contain the same number of elements with indices greater thanpTime[0] + len for the right filter wing for the last element.
After function execution, the time value is updated and pOutlen[0] contains the number of calculated output
samples.
The output samples are multiplied by norm * min (1, factor) before saturation.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSpec, pSrc, pDst, pTime or pOutlen
pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

ippStsBadArgErr

Indicates an error when factor is less than or equal to 0.

ExampleThe code example below demonstrates resampling of the input mono pcm file.

void resampleIPP(
int
inRate,// input frequency
int
outRate,// output frequency
FILE*infd,// input pcm fileFILE
*outfd)// output pcm file
{ short *inBuf,*outBuf;
int bufsize=4096;
int history=128;
double time=history;290

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

int lastread=history;
int inCount=0,outCount=0,inLen,outLen;
int size,len,height;
IppsResamplingPolyphaseFixed_16s *state;ippsResamplePolyphaseFixedGetSize_16s(inRate,outRate,2*(history-1),&size,&len,&height,ippAlgHintAccurate);state=(IppsResamlingPolyphaseFixed_16s*)ippsMalloc_8u(size);
ippsResamplePolyphaseFixedInit_16s(inRate,outRate,2*(history-1),0.95f,9.0f,state,ippAlgHintAccurate);
inBuf=ippsMalloc_16s(bufsize+history+2);
outBuf=ippsMalloc_16s((int)((bufsize-history)*outRate/(float)inRate+2));
ippsZero_16s(inBuf,history);
while ((inLen=fread(inBuf+lastread,sizeof(short),bufsize-lastread,infd))>0) {inCount+=inLen;
lastread+=inLen;
ippsResamplePolyphaseFixed_16s(inBuf,lastread-history-(int)time,
outBuf,0.98f,&time,&outLen,state);
fwrite(outBuf,outLen,sizeof(short),outfd);
outCount+=outLen;
ippsMove_16s(inBuf+(int)time-history,inBuf,lastread+history-(int)time);
lastread-=(int)time-history;
time-=(int)time-history;}
ippsZero_16s(inBuf+lastread,history);
ippsResamplePolyphaseFixed_16s(inBuf,lastread-(int)time,
outBuf,0.98f,&time,&outLen,state);
fwrite(outBuf,outLen,sizeof(short),outfd);
outCount+=outLen;
printf("%d inputs resampled to %d outputs\n",inCount,outCount);
ippsFree(outBuf);
ippsFree(inBuf);
ippsFree (state);}

Transform Functions®

This chapter describes the Intel IPP functions that perform Fourier and discrete cosine transforms (DCT), as
well as Hartley, Hilbert, Walsh-Hadamard and wavelet transforms of signals.

Fourier Transform Functions
The functions described in this section perform the fast Fourier transform (FFT), the discrete Fouriertransform (DFT) of signal samples. It also includes variations of the basic functions to support different
application requirements.

Special Arguments
This section describes the flag and hint arguments used by the Fourier transform functions.
The Fourier transform functions require you to specify the flag and hint arguments.
The flag argument specifies the result normalization method. The following table lists the possible values forthe flag argument. Specify one and only one of the represented values in the flag argument. The A and B
factors are multipliers used in the DFT computation.

291

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Flag Arguments for Fourier Transform Functions
Value

A

B

Description

IPP_FFT_DIV_FWD_BY_
N
IPP_FFT_DIV_INV_BY_
N
IPP_FFT_DIV_BY_SQRT
N

1/N

1

Forward transform is donewith the 1/N normalization.

1

1/N

Inverse transform is donewith the 1/N normalization.

1/N1/2

1/N1/2

Forward and inverse
transform is done with the1/ N1/2 normalization.

IPP_FFT_NODIV_BY_AN
Y

1

1

Forward or inverse
transform is done without
the 1/ N or 1/N1/2
normalization.

Packed Formats
This section describes the main packed formats Perm, Pack, and CCS used by the Fourier transformfunctions.

Pack Format
The Pack format is a convenient, compact representation of a complex conjugate-symmetric sequence. The
disadvantage of this format is that it is not the natural format used by the real Fourier transform algorithms(“natural” in the sense that bit-reversed order is natural for radix-2 complex Fourier transforms). In Pack
format, the output samples of the Fourier transform are arranged as shown in the tables below. The output
signal can be unpacked to a complex signal using the function ippsConjPack.

Perm Format
The Perm format stores the values in the order in which the Fourier transform algorithms use them. This is
the most natural way of storing values for the Fourier transform algorithms. The Perm format is an arbitrary
permutation of the Pack format. An important characteristic of the Perm format is that the real andimaginary parts of a given sample need not be adjacent.
In Perm format, the output samples of the Fourier transform are arranged as shown in the tables below. The
output signal can be unpacked to a complex signal using the function ippsConjPerm.
NOTE
For input signal of odd length the perm and pack format are identical.

CCS Format
The CCS format stores the values of the first half of the output complex signal resulted from the forward
Fourier transform.
In CCS format, the output samples of the Fourier transform are arranged as shown in the tables below. Notethat the signal stored in CCS format is one complex element longer. The output signal can be unpacked to acomplex signal using the function ippsConjCcs.
Arrangement of Forward Fourier Transform Results in Packed Formats - Even Length
Index

0

1

2

3

...

N-2

N-1

Pack

R0

R1

I1

R2

...

I(N-1)/2

RN/2

Perm

R0

RN/2

R1

I1

...

RN/2-1

IN/2-1

CCS

R0

0

R1

I1

...

RN/2-1

IN/2-1

292

N

N+1

RN/2

0

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Forward Fourier transform Result Representation in Packed Formats - Odd Length
Index

0

1

2

3

...

N-2

N-1

Pack

R0

R1

I1

R2

...

R(N-1)/2

I(N-1)/2

Perm

R0

R1

I1

R2

...

R(N-1)/2

I(N-1)/2

CCS

R0

0

R1

I1

...

I(N-1)/2-1

R(N-1)/2

N

I(N-1)/2

Format Conversion Functions
The following functions ippsConjPack, ippsConjPerm, and ippsConjCcs convert data from the packed
formats to a usual complex data format using the FFT symmetry property for transforming real data. The
output data is complex, the output array length is defined by the number of complex elements in the output
vector. Note that the output array size is two times as big as the input array size. The data stored in CCS
format require a bigger array than the other formats. Even and odd length arrays have some specificfeatures discussed for each function separately.
ConjPack
Converts the data in Pack format to complex data
format.

SyntaxIppStatus ippsConjPack_32fc(const Ipp32f* pSrc, Ipp32fc* pDst, int lenDst);
IppStatus ippsConjPack_64fc(const Ipp64f* pSrc, Ipp64fc* pDst, int lenDst);
IppStatus ippsConjPack_32fc_I(Ipp32fc* pSrcDst, int lenDst);
IppStatus ippsConjPack_64fc_I(Ipp64fc* pSrcDst, int lenDst);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

pSrcDstlenDstPointer to the source and destination vector (for the in-place
operation).
Number of elements in the vector.

Description
This function converts the data in Pack format in the vector pSrc to complex data format and stores theresults in pDst.
The in-place function ippsConjPack converts the data in Pack format in the vector pSrcDst to complex
data format and stores the results in pSrcDst.

293

1

Intel® Integrated Performance Primitives Developer Guide and Reference

The table below shows the examples of unpack from the Pack format. The Data column contains the real
input data to be converted by the forward FFT transform to the packed data. The packed real data is in the
Packed column. The output result is the complex data vector in the Extended column. The number of vector
elements is in the Length column.
Examples of Unpack from the Pack Format
Data

PackedExtended

LengthFFT([1])1{1, 0}

1

FFT([1 2])

3, -1{3, 0}, {-1, 0}

2

FFT([1 2 3])

6, -1.5, 0.86

{6, 0}, {-1.5, 0.86},{-1.5, -0.86}

3

FFT([1 2 3 9])15, -2, 7, -7{15, 0}, {-2, 7}, {-7, 0},{-2, -7}

4

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pSrcDst, pDst, or pSrc pointer is
NULL.

ippStsSizeErr

Indicates an error when lenDst is less than or equal to 0.

ExampleConjPerm
Converts the data in Perm format to complex data
format.

SyntaxIppStatus ippsConjPerm_32fc(const Ipp32f* pSrc, Ipp32fc* pDst, int lenDst);
IppStatus ippsConjPerm_64fc(const Ipp64f* pSrc, Ipp64fc* pDst, int lenDst);
IppStatus ippsConjPerm_32fc_I(Ipp32fc* pSrcDst, int lenDst);
IppStatus ippsConjPerm_64fc_I(Ipp64fc* pSrcDst, int lenDst);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

pSrcDstlenDst294

Pointer to the source and destination vector (for the in-place
operation).
Number of elements in the vector.

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Description
This function converts the data in Perm format in the vector pSrc to complex data format and stores theresults in pDst.
The in-place function ippsConjPerm converts the data in Perm format in the vector pSrcDst to complex
data format and stores the results in pSrcDst.
The following table shows the examples of unpack from the Perm format. The Data column contains the real
input data to be converted by the forward FFT transform to the packed data. The packed real data are in the
Packed column. The output result is the complex data vector in the Extended column. The number of vector
elements is in the Length column.
Examples of Packed Data Obtained by FFT
Data

PackedExtended

LengthFFT([1])1{1, 0}

1

FFT([1 2])

3, -1{3, 0}, {-1, 0}

2

FFT([1 2 3])

6, -1.5, 0.86

{6, 0}, {-1.5, 0.86},{-1.5, -0.86}

3

FFT([1 2 3 9])15, -7, -2, 7{15, 0}, {-2, 7}, {-7, 0},{-2, -7}

4

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pSrcDst, pDst, or pSrc pointer is
NULL.

ippStsSizeErr

Indicates an error when lenDst is less than or equal to 0.

ConjCcs
Converts the data in CCS format to complex data
format.

SyntaxIppStatus ippsConjCcs_32fc(const Ipp32f* pSrc, Ipp32fc* pDst, int lenDst);
IppStatus ippsConjCcs_64fc(const Ipp64f* pSrc, Ipp64fc* pDst, int lenDst);
IppStatus ippsConjCcs_32fc_I(Ipp32fc* pSrcDst, int lenDst);
IppStatus ippsConjCcs_64fc_I(Ipp64fc* pSrcDst, int lenDst);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

295

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Pointer to the source and destination vector (for the in-place
operation).
Number of elements in the vector.

pSrcDstlenDstDescription
This function converts the data in CCS format in the vector pSrc to complex data format and stores theresults in pDst.
The in-place function ippsConjCcs converts the data in CCS format in the vector pSrcDst to complex data
format and stores the results in pSrcDst.
The following table shows the examples of unpack from the CCS format. The Data column contains the real
input data to be converted by the forward FFT transform to the packed data. The packed real data are in the
Packed column. The output result is the complex data vector in the Extended column. The number of vector
elements is in the Length column. The data stored in CCS format are two real elements longer.
Examples of Unpack from the CCS Format
Data

PackedExtended

LengthFFT([1])

1, 0{1, 0}

1

FFT([1 2])

3, 0, -1, 0{3, 0}, {-1, 0}

2

FFT([1 2 3])6, 0, -1.5, 0.86

{6, 0}, {-1.5, 0.86},{-1.5, -0.86}

3

FFT([1 2 3 9])15, 0, -2, 7, -7, 0{15, 0}, {-2, 7}, {-7, 0},{-2, -7}

4

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pSrcDst, pDst, or pSrc pointer is
NULL.

ippStsSizeErr

Indicates an error when lenDst is less than or equal to 0.

Functions for Packed Data Multiplication
The functions described in this section perform the element-wise complex multiplication of vectors stored inPack or Perm formats. These functions are used with the function ippsFFTFwd and ippsFFTInv to perform
fast convolution on real signals.
The standard vector multiplication function ippsMul can not be used to multiply Pack or Perm format vectors
because:••Two real samples are stored in Pack format.
The Perm format might not pair the real parts of a signal with their corresponding imaginary parts.
NOTE
The vectors stored in CCS format can be multiplied using the standard function for complex data
multiplication.

MulPack
Multiply the elements of two vectors stored in Pack
format.

296

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

SyntaxCase 1: Not-in-place operation
IppStatus ippsMulPack_32f(const Ipp32f* pSrc1, const Ipp32f* pSrc2, Ipp32f* pDst, int
len);
IppStatus ippsMulPack_64f(const Ipp64f* pSrc1, const Ipp64f* pSrc2, Ipp64f* pDst, int
len);Case 2: In-place operation
IppStatus ippsMulPack_32f_I(const Ipp32f* pSrc, Ipp32f* pSrcDst, int len);
IppStatus ippsMulPack_64f_I(const Ipp64f* pSrc, Ipp64f* pSrcDst, int len);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc1, pSrc2
pDst
pSrc
pSrcDstlen

Pointers to the vectors whose elements are to be multiplied
together.
Pointer to the destination vector which stores the result of themultiplication pSrc1[n] * pSrc2[n].
Pointer to the vector whose elements are to be multiplied by
the elements of pSrcDst in-place.
Pointer to the source and destination vector (for the in-place
operation).
Number of elements in the vector.

Description
This function multiplies the elements of the vector pSrc1 by the elements of the vector pSrc2, and storesthe result in pDst.
The in-place flavors ippsMulPack multiply the elements of the vector pSrc by the elements of the vector
pSrcDst, and store the result in pSrcDst.
The functions multiply the packed data according to their packed format. The data in Pack packed format
include several real values, the rest are complex. Thus, the function performs several real multiplication
operations on real elements and complex multiplication operations on complex data. Such kind of packed
data multiplication is usually used for signals filtering with the FFT transform when the element-wise
multiplication is performed in the frequency domain.

Return Values
ippStsNoErr

Indicates no error

ippStsNullPtrErr

Indicates an error when the pSrcDst, pDst, pSrc1, pSrc2, orpSrc pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

297

1

Intel® Integrated Performance Primitives Developer Guide and Reference

ExampleMulPerm
Multiply the elements of two vectors stored in Perm
format.

SyntaxCase 1: Not-in-place operation
IppStatus ippsMulPerm_32f(const Ipp32f* pSrc1, const Ipp32f* pSrc2, Ipp32f* pDst, int
len);
IppStatus ippsMulPerm_64f(const Ipp64f* pSrc1, const Ipp64f* pSrc2, Ipp64f* pDst, int
len);Case 2: In-place operation
IppStatus ippsMulPerm_32f_I(const Ipp32f* pSrc, Ipp32f* pSrcDst, int len);
IppStatus ippsMulPerm_64f_I(const Ipp64f* pSrc, Ipp64f* pSrcDst, int len);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc1, pSrc2
pDst
pSrc
pSrcDstlen

Pointers to the vectors whose elements are to be multiplied
together.
Pointer to the destination vector which stores the result of themultiplication pSrc1[n] * pSrc2[n].
Pointer to the vector whose elements are to be multiplied by
the elements of pSrcDst in-place.
Pointer to the source and destination vector (for the in-place
operation).
Number of elements in the vector.

Description
This function multiplies the elements of the vector pSrc1 by the elements of the vector pSrc2, and storesthe result in pDst.
The in-place flavors of ippsMulPerm multiply the elements of the vector pSrc by the elements of the vector
pSrcDst, and store the result in pSrcDst.
The function multiplies the packed data according to their packed format. The data in Perm packed formats
include several real values, the rest are complex. Thus, the function performs several real multiplication
operations on real elements and complex multiplication operations on complex data. Such kind of packed
data multiplication is usually used for signals filtering with the FFT transform when the element-wise
multiplication is performed in the frequency domain.

298

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pSrcDst, pDst, pSrc1, pSrc2, orpSrc pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

MulPackConj
Multiplies elements of a vector by the elements of acomplex conjugate vector stored in Pack format.

SyntaxIppStatus ippsMulPackConj_32f_I(const Ipp32f* pSrc, Ipp32f* pSrcDst, int len);
IppStatus ippsMulPackConj_64f_I(const Ipp64f* pSrc, Ipp64f* pSrcDst, int len);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc

Pointer to the first source vector.

pSrcDstPointer to the second source and destination vector.

len

Number of elements in the vector.

Description
This function multiplies the elements of a source vector pSrc by elements of the vector that is complex
conjugate to the source vector pSrcDst and stores the results in pSrcDst. The function performs only inplace operations on data stored in Pack format.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pSrc or pSrcDst pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

Fast Fourier Transform Functions
The functions described in this section compute the forward and inverse fast Fourier transform of real andcomplex signals. The FFT is similar to the discrete Fourier transform (DFT) but is significantly faster. The
length of the vector transformed by the FFT must be a power of 2.
To use the FFT functions, initialize the specification structure which contains such data as tables of twiddle
factors. The initialization functions create the specifications for both forward and inverse transforms. The
amount of prior calculations is thus reduced and the overall performance increased.
The hint argument, passed to the initialization functions, suggests using special algorithm, faster or moreaccurate. The flag argument specifies the result normalization method.

299

1

Intel® Integrated Performance Primitives Developer Guide and Reference

To initialize the FFT specification structure, use the ippsFFTInit_R and ippsFFTInit_C functions. Before
using these functions, you need to compute the size of the specification structure using ippsFFTGetSize_R
and ippsFFTGetSize_C, respectively.
The complex signal can be represented as a single array containing complex elements, or two separate
arrays containing real and imaginary parts. The output result of the FFT can be packed in Perm, Pack, or CCS
format.
You can speed up the FFT by using an external buffer. The use of external buffer can improve performance by
avoiding allocation and deallocation of internal buffers and storing data in cache. The size of the externalbuffer is returned by the ippsFFTInit_R and ippsFFTInit_C functions.
FFTInit_R, FFTInit_C
Initializes the FFT specification structure for real andcomplex signals.

SyntaxCase 1: Operation on real signal
IppStatus ippsFFTInit_R_32f(IppsFFTSpec_R_32f** ppFFTSpec, int order, int flag,
IppHintAlgorithm hint, Ipp8u* pSpec, Ipp8u* pSpecBuffer);
IppStatus ippsFFTInit_R_64f(IppsFFTSpec_R_64f** ppFFTSpec, int order, int flag,
IppHintAlgorithm hint, Ipp8u* pSpec, Ipp8u* pSpecBuffer);

Case 2: Operation on complex signal
IppStatus ippsFFTInit_C_32f(IppsFFTSpec_C_32f** ppFFTSpec, int order, int flag,
IppHintAlgorithm hint, Ipp8u* pSpec, Ipp8u* pSpecBuffer);
IppStatus ippsFFTInit_C_64f(IppsFFTSpec_C_64f** ppFFTSpec, int order, int flag,
IppHintAlgorithm hint, Ipp8u* pSpec, Ipp8u* pSpecBuffer);
IppStatus ippsFFTInit_C_32fc(IppsFFTSpec_C_32fc** ppFFTSpec, int order, int flag,
IppHintAlgorithm hint, Ipp8u* pSpec, Ipp8u* pSpecBuffer);
IppStatus ippsFFTInit_C_64fc(IppsFFTSpec_C_64fc** ppFFTSpec, int order, int flag,
IppHintAlgorithm hint, Ipp8u* pSpec, Ipp8u* pSpecBuffer);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
order
flag

FFT order. The input signal length is N= 2order.
Specifies the result normalization method. The values for theflag argument are described in the section Flag and Hint
Arguments.

hintThis parameter is deprecated. Set the value to ippAlgHintNone.

ppFFTSpec

Double pointer to the FFT specification structure to be created.

pSpec

Pointer to the area for the FFT specification structure.

300

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

pSpecBuffer

Pointer to the work buffer.

Description
These functions initialize the FFT specification structure ppFFTSpec with the following parameters:•••

the transform order. This parameter defines the transform length. Input and output signals are arrays of
2 order length.
the normalization flag
the specific code hint

Before calling these functions, you need to compute the size of the specification structure and the work
buffer (if it is required) using the ippsFFTGetSize_R and ippsFFTGetSize_C functions.
If pSpecBufferSize returned by the ippsFFTGetSize function is equal to zero, the parameter
pSpecBuffer can be NULL.
The suffix after the function name indicates the flavors of the FFT functions: ippsFFTInit_C is for complex
flavors and ippsFFTInit_R is for real flavors.

Application Notes
The maximum values for signal length are:Function Flavor

Max Length

C_32fc268435456 (2^28)

C_64fc67108864 (2^27)

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsFftOrderErr

Indicates an error when the order value is incorrect.

ippStsFftFlagErr

Indicates an error when the flag value is incorrect.

See Also
FFTGetSize_R FFTGetSize_C Computes sizes of the FFT specification structure and required
working buffers.
FFTGetSize_R, FFTGetSize_C
Computes sizes of the FFT specification structure andrequired working buffers.

SyntaxCase 1: Operation on real signal
IppStatus ippsFFTGetSize_R_32f(int order, int flag, IppHintAlgorithm hint, int*
pSpecSize, int* pSpecBufferSize, int* pBufferSize);
IppStatus ippsFFTGetSize_R_64f(int order, int flag, IppHintAlgorithm hint, int*
pSpecSize, int* pSpecBufferSize, int* pBufferSize);

Case 2: Operation on complex signal
IppStatus ippsFFTGetSize_C_32f(int order, int flag, IppHintAlgorithm hint, int*
pSpecSize, int* pSpecBufferSize, int* pBufferSize);
IppStatus ippsFFTGetSize_C_64f(int order, int flag, IppHintAlgorithm hint, int*
pSpecSize, int* pSpecBufferSize, int* pBufferSize);301

1Intel® Integrated Performance Primitives Developer Guide and Reference

IppStatus ippsFFTGetSize_C_32fc(int order, int flag, IppHintAlgorithm hint, int*
pSpecSize, int* pSpecBufferSize, int* pBufferSize);
IppStatus ippsFFTGetSize_C_64fc(int order, int flag, IppHintAlgorithm hint, int*
pSpecSize, int* pSpecBufferSize, int* pBufferSize);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
order
flag

FFT order. The input signal length is N= 2order.
Specifies the result normalization method. The values for theflag argument are described in Flag and Hint Arguments.

hintThis parameter is deprecated. Set the value to ippAlgHintNone.

pSpecSize

Pointer to the FFT specification structure size value.

pSpecBufferSize

Pointer to the buffer size value for FFT initialization function.

pBufferSize

Pointer to the size value of the FFT external work buffer.

Description
These functions compute the following:•••

the size of the FFT specification structure. Computed value stored in pSpecSize.
the work buffer size for the FFT structure initialization functions ippsFFTInit_R and ippsFFTInit_C.
Computed value is stored in pSpecBufferSize.
the size of the FFT work buffer for the different flavors of ippsFFTFwd and ippsFFTInv. Computed value
is stored in pBufferSize.

The suffix after the function name indicates the flavors of the FFT functions: ippsFFTGetSize_C is forcomplex flavors and ippsFFTGetSize_R is for real flavors.

Application Notes
The maximum values for signal length are:Function Flavor

Max Length

Order

R_32f

536870912 (2^29)

0..29

R_64f

268435456 (2^28)

0..28

C_32f

268435456 (2^28)

0..28

C_64f

134217728 (2^27)

0..27

C_32fc268435456 (2^28)

0..28

C_64fc134217728 (2^27)

0..27

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

302

Developer Guide and Reference for Intel® Integrated Performance Primitives

ippStsFftOrderErr

Indicates an error when the order value is incorrect.

ippStsFftFlagErr

Indicates an error when the flag value is incorrect.

1

See Also
Special Arguments
FFTInit_R FFTInit_C Initializes the FFT specification structure for real and complex signals.
FFTFwd_CToC
Computes the forward fast Fourier transform (FFT) of
a complex signal.

SyntaxCase 1: Not-in-place operation on real data type
IppStatus ippsFFTFwd_CToC_32f(const Ipp32f* pSrcRe, const Ipp32f* pSrcIm, Ipp32f*
pDstRe, Ipp32f* pDstIm, const IppsFFTSpec_C_32f* pFFTSpec, Ipp8u* pBuffer);
IppStatus ippsFFTFwd_CToC_64f(const Ipp64f* pSrcRe, const Ipp64f* pSrcIm, Ipp64f*
pDstRe, Ipp64f* pDstIm, const IppsFFTSpec_C_64f* pFFTSpec, Ipp8u* pBuffer);

Case 2: Not-in-place operation on complex data type
IppStatus ippsFFTFwd_CToC_32fc(const Ipp32fc* pSrc, Ipp32fc* pDst, const
IppsFFTSpec_C_32fc* pFFTSpec, Ipp8u* pBuffer);
IppStatus ippsFFTFwd_CToC_64fc(const Ipp64fc* pSrc, Ipp64fc* pDst, const
IppsFFTSpec_C_64fc* pFFTSpec, Ipp8u* pBuffer);

Case 3: In-place operation on real data type.
IppStatus ippsFFTFwd_CToC_32f_I(Ipp32f* pSrcDstRe, Ipp32f* pSrcDstIm, const
IppsFFTSpec_C_32f* pFFTSpec, Ipp8u* pBuffer);
IppStatus ippsFFTFwd_CToC_64f_I(Ipp64f* pSrcDstRe, Ipp64f* pSrcDstIm, const
IppsFFTSpec_C_64f* pFFTSpec, Ipp8u* pBuffer);

Case 4: In-place operation on complex data type.
IppStatus ippsFFTFwd_CToC_32fc_I(Ipp32fc* pSrcDst, const IppsFFTSpec_C_32fc* pFFTSpec,
Ipp8u* pBuffer);
IppStatus ippsFFTFwd_CToC_64fc_I(Ipp64fc* pSrcDst, const IppsFFTSpec_C_64fc* pFFTSpec,
Ipp8u* pBuffer);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pFFTSpec

Pointer to the FFT specification structure.

pSrc

Pointer to the input array containing complex values.

pDst

Pointer to the output array containing complex values.

303

1

Intel® Integrated Performance Primitives Developer Guide and ReferencepSrcRepSrcImpDstRepDstImpSrcDstpSrcDstRepSrcDstIm
pBuffer

Pointer to the input array containing real parts of the signal.
Pointer to the input array containing imaginary parts of thesignal.
Pointer to the output array containing real parts of the signal.
Pointer to the output array containing imaginary parts of thesignal.
Pointer to the input and output array containing complex values(for the in-place operation).
Pointer to the input and output array containing real parts ofthe signal (for the in-place operation).
Pointer to the input and output array containing imaginaryparts of the signal (for the in-place operation).
Pointer to the external work buffer.

Description
This function computes the forward FFT of a complex signal according to the following pFFTSpec specification
parameters: the transform order, the normalization flag, and the specific code hint. Before calling thesefunctions, you need to initialize the FFT specification structure using the ippsFFTInit_C function.
The functions using the complex data type, for example with the 32fc suffixes, process the input complex
array pSrc and store the result in pDst. Their in-place flavors use the complex array pSrcDst.
The functions using the real data type and processing complex signals represented by separate real pSrcReand imaginary pSrcIm parts, for example, with the 32f suffixes, store the result separately in pDstRe andpDstIm, respectively. Their in-place flavors use separate real and imaginary arrays pSrcDstRe andpSrcDstIm, respectively.
Use this function with the external work buffer pBuffer. Once the work buffer is allocated, it can be used for
all following calls of the functions computing FFT. The use of an external buffer improves performance
significantly, especially for the small size transforms.
The size of the external buffer must be previously computed by the function ippsFFTGetBufSize_C orippsFFTGetSize_C.
The length of the FFT must be a power of 2.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers withexception of pBuffer is NULL.

ippStsContextMatchErr
ippStsMemAllocErr

Indicates an error when the specification identifier pFFTSpec isincorrect.
Indicates an error when no memory is allocated.

ExampleThe code example below demonstrates how to use the ippsFFTGetSize, ippsFFTInit, andippsFFTFwd_CToC functions.

void ippsFFT_32fc_example(){
Ipp32fc Src[32] = {

304

1

Developer Guide and Reference for Intel® Integrated Performance Primitives{0.0, 1.0}, {2.0, 3.0}, {4.0, 5.0}, {6.0, 7.0},{0.0, 1.0}, {2.0, 3.0}, {4.0, 5.0}, {6.0, 7.0},{0.0, 1.0}, {2.0, 3.0}, {4.0, 5.0}, {6.0, 7.0},{0.0, 1.0}, {2.0, 3.0}, {4.0, 5.0}, {6.0, 7.0},{0.0, 1.0}, {2.0, 3.0}, {4.0, 5.0}, {6.0, 7.0},{0.0, 1.0}, {2.0, 3.0}, {4.0, 5.0}, {6.0, 7.0},{0.0, 1.0}, {2.0, 3.0}, {4.0, 5.0}, {6.0, 7.0},{0.0, 1.0}, {2.0, 3.0}, {4.0, 5.0}, {6.0, 7.0}};
Ipp32fc Dst[32];int FFTOrder = 5;
IppsFFTSpec_C_32fc *pSpec = 0;
Ipp8u *pMemSpec = 0;
Ipp8u *pMemInit = 0;
Ipp8u *pMemBuffer = 0;
int sizeSpec = 0;
int sizeInit = 0;
int sizeBuffer = 0;
int flag = IPP_FFT_NODIV_BY_ANY;/// get sizes for required buffers
ippsFFTGetSize_C_32fc(FFTOrder, flag, ippAlgHintNone, &sizeSpec, &sizeInit, &sizeBuffer);/// allocate memory for required buffers
pMemSpec = (Ipp8u*) ippMalloc(sizeSpec);
if (sizeInit > 0){
pMemInit = (Ipp8u*) ippMalloc(sizeInit);}
if (sizeBuffer > 0){pMemBuffer = (Ipp8u*) ippMalloc(sizeBuffer);}/// initialize FFT specification structureippsFFTInit_C_32fc(&pSpec, FFTOrder, flag, ippAlgHintNone, pMemSpec, pMemInit);/// free initialization buffer
if (sizeInit > 0){
ippFree(pMemInit);}/// perform forward FFT
ippsFFTFwd_CToC_32fc(Src, Dst, pSpec, pMemBuffer);/// ...
/// free buffers
if (sizeBuffer > 0){
ippFree(pMemBuffer);

305

1

Intel® Integrated Performance Primitives Developer Guide and Reference}
ippFree(pMemSpec);}
Result:Dst ->{ 96.0, 128.0 }, { 0.0, 0.0 }, { 0.0, 0.0 }, { 0.0, 0.0 },{0.0,0.0 }, { 0.0, 0.0 }, { 0.0, 0.0 }, { 0.0, 0.0 },{ -64.0,
0.0 }, { 0.0, 0.0 }, { 0.0, 0.0 }, { 0.0, 0.0 },{0.0,0.0 }, { 0.0, 0.0 }, { 0.0, 0.0 }, { 0.0, 0.0 },{ -32.0, -32.0 }, { 0.0, 0.0 }, { 0.0, 0.0 }, { 0.0, 0.0 },{0.0,0.0 }, { 0.0, 0.0 }, { 0.0, 0.0 }, { 0.0, 0.0 },{0.0, -64.0 }, { 0.0, 0.0 }, { 0.0, 0.0 }, { 0.0, 0.0 },{0.0,0.0 }, { 0.0, 0.0 }, { 0.0, 0.0 }, { 0.0, 0.0 }See Also
Integer Scaling
FFTInit_R FFTInit_C Initializes the FFT specification structure for real and complex signals.
FFTGetSize_R FFTGetSize_C Computes sizes of the FFT specification structure and required
working buffers.
FFTInv_CToC
Computes the inverse fast Fourier transform (FFT) of acomplex signal.

SyntaxCase 1: Not-in-place operation on real data type
IppStatus ippsFFTInv_CToC_32f(const Ipp32f* pSrcRe, const Ipp32f* pSrcIm, Ipp32f*
pDstRe, Ipp32f* pDstIm, const IppsFFTSpec_C_32f* pFFTSpec, Ipp8u* pBuffer);
IppStatus ippsFFTInv_CToC_64f(const Ipp64f* pSrcRe, const Ipp64f* pSrcIm, Ipp64f*
pDstRe, Ipp64f* pDstIm, const IppsFFTSpec_C_64f* pFFTSpec, Ipp8u* pBuffer);

Case 2: Not-in-place operation on complex data type
IppStatus ippsFFTInv_CToC_32fc(const Ipp32fc* pSrc, Ipp32fc* pDst, const
IppsFFTSpec_C_32fc* pFFTSpec, Ipp8u* pBuffer);
IppStatus ippsFFTInv_CToC_64fc(const Ipp64fc* pSrc, Ipp64fc* pDst, const
IppsFFTSpec_C_64fc* pFFTSpec, Ipp8u* pBuffer);

Case 3: In-place operation on real data type
IppStatus ippsFFTInv_CToC_32f_I(Ipp32f* pSrcDstRe, Ipp32f* pSrcDstIm, const
IppsFFTSpec_C_32f* pFFTSpec, Ipp8u* pBuffer);
IppStatus ippsFFTInv_CToC_64f_I(Ipp64f* pSrcDstRe, Ipp64f* pSrcDstIm, const
IppsFFTSpec_C_64f* pFFTSpec, Ipp8u* pBuffer);

Case 4: In-place operation on complex data type
IppStatus ippsFFTInv_CToC_32fc_I(Ipp32fc* pSrcDst, const IppsFFTSpec_C_32fc* pFFTSpec,
Ipp8u* pBuffer);
IppStatus ippsFFTInv_CToC_64fc_I(Ipp64fc* pSrcDst, const IppsFFTSpec_C_64fc* pFFTSpec,
Ipp8u* pBuffer);

Include Files
ipps.h306

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Domain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pFFTSpec

Pointer to the FFT specification structure.

pSrc

Pointer to the input array containing complex values.

pDst

Pointer to the output array containing complex values.

pSrcRePointer to the input array containing real parts of the signal.

pSrcImpDstRepDstImpSrcDstpSrcDstRepSrcDstIm
pBuffer

Pointer to the input array containing imaginary parts of thesignal.
Pointer to the output array containing real parts of the signal.
Pointer to the output array containing imaginary parts of thesignal.
Pointer to the input and output array containing complex values(for the in-place operation).
Pointer to the input and output array containing real parts ofthe signal(for the in-place operation).
Pointer to the input and output array containing imaginaryparts of the signal(for the in-place operation).
Pointer to the external work buffer.

Description
This function computes the inverse FFT of a complex signal according to the pFFTSpec specification
parameters: the transform order, the normalization flag, and the specific code hint. The FFT specification
structure must be initialized by the ippsFFTInit_C function beforehand.
The function flavors using the complex data type, for example with the 32fc suffixes, process the input
complex array pSrc and store the result in pDst. Their in-place flavors use the complex array pSrcDst.
The function flavors using the real data type and processing complex signals represented by separate realpSrcRe and imaginary pSrcIm parts, for example with the 32f suffixes, store the result separately in
pDstRe and pDstIm, respectively. Their in-place flavors uses separate real and imaginary arrays pSrcDstReand pSrcDstIm, respectively.
Use this function with the external work buffer pBuffer. Once the work buffer is allocated, it can be used for
all following calls to the functions computing FFT. The use of an external buffer improves performance
significantly, especially for the small size transforms.
The size of the external buffer must be previously computed by the ippsFFTGetSize_C function.
The length of the FFT must be a power of 2.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers withexception of pBuffer is NULL.

ippStsContextMatchErr

Indicates an error when the specification identifier pFFTSpec isincorrect.
307

1Intel® Integrated Performance Primitives Developer Guide and ReferenceippStsMemAllocErr

Indicates an error when no memory is allocated.

FFTFwd_RToPack, FFTFwd_RToPerm, FFTFwd_RToCCS
Computes the forward or inverse fast Fouriertransform (FFT) of a real signal.

SyntaxCase 1: Not-in-place operation, result in Pack Format
IppStatus ippsFFTFwd_RToPack_32f(const Ipp32f* pSrc, Ipp32f* pDst, const
IppsFFTSpec_R_32f* pFFTSpec, Ipp8u* pBuffer);
IppStatus ippsFFTFwd_RToPack_64f(const Ipp64f* pSrc, Ipp64f* pDst, const
IppsFFTSpec_R_64f* pFFTSpec, Ipp8u* pBuffer);

Case 2: In-place operation, result in Pack Format.
IppStatus ippsFFTFwd_RToPack_32f_I(Ipp32f* pSrcDst, const IppsFFTSpec_R_32f* pFFTSpec,
Ipp8u* pBuffer);
IppStatus ippsFFTFwd_RToPack_64f_I(Ipp64f* pSrcDst, const IppsFFTSpec_R_64f* pFFTSpec,
Ipp8u* pBuffer);

Case 3: Not-in-place operation, result in Perm Format
IppStatus ippsFFTFwd_RToPerm_32f(const Ipp32f* pSrc, Ipp32f* pDst, const
IppsFFTSpec_R_32f* pFFTSpec, Ipp8u* pBuffer);
IppStatus ippsFFTFwd_RToPerm_64f(const Ipp64f* pSrc, Ipp64f* pDst, const
IppsFFTSpec_R_64f* pFFTSpec, Ipp8u* pBuffer);

Case 4: In-place operation, result in Perm Format.
IppStatus ippsFFTFwd_RToPerm_32f_I(Ipp32f* pSrcDst, const IppsFFTSpec_R_32f* pFFTSpec,
Ipp8u* pBuffer);
IppStatus ippsFFTFwd_RToPerm_64f_I(Ipp64f* pSrcDst, const IppsFFTSpec_R_64f* pFFTSpec,
Ipp8u* pBuffer);

Case 5: Not-in-place operation, result in CCS Format
IppStatus ippsFFTFwd_RToCCS_32f(const Ipp32f* pSrc, Ipp32f* pDst, const
IppsFFTSpec_R_32f* pFFTSpec, Ipp8u* pBuffer);
IppStatus ippsFFTFwd_RToCCS_64f(const Ipp64f* pSrc, Ipp64f* pDst, const
IppsFFTSpec_R_64f* pFFTSpec, Ipp8u* pBuffer);

Case 6: In-place operation, result in CCS Format.
IppStatus ippsFFTFwd_RToCCS_64f_I(Ipp64f* pSrcDst, const IppsFFTSpec_R_64f* pFFTSpec,
Ipp8u* pBuffer);
IppStatus ippsFFTFwd_RToCCS_32f_I(Ipp32f* pSrcDst, const IppsFFTSpec_R_32f* pFFTSpec,
Ipp8u* pBuffer);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

308Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Parameters
pFFTSpec

Pointer to the FFT specification structure.

pSrc

Pointer to the input array.

pDst

Pointer to the output array containing packed complex values.

pSrcDstpBuffer

Pointer to the input and output arrays for the in-place
operation.
Pointer to the external work buffer.

Description
These functions compute the forward FFT of a real signal and store the result in Pack, Perm, or CCS packed
formats respectively. The transform is performed in accordance with the pFFTSpec specification parameters:
the transform order, the normalization flag, and the specific code hint. Before calling these functions the
FFT specification structure must be initialized by the corresponding flavors of ippsFFTInit_R. The length of
the FFT must be a power of 2.
Use these functions with the external work buffer pBuffer. Once the work buffer is allocated, it can be used
for all following calls to the functions computing FFT. The use of an external buffer improves performance
significantly, especially for the small size transforms.
The size of the external buffer must be previously computed by the ippsFFTGetSize_R function.

ippsFFTFwd_RToPack. This function computes the forward FFT and stores the result in Pack format.
ippsFFTFwd_RToPerm. This function computes the forward FFT and stores the result in Perm format.
ippsFFTFwd_RToCCS. This function computes the forward FFT and stores the result in CCS format.

Tables "Arrangement of Forward Fourier Transform Results in Packed Formats - Even Length" and "Forshow how the output results are arranged in the packed formats.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers withexception of pBuffer is NULL.

ippStsContextMatchErr
ippStsMemAllocErr

Indicates an error when the specification identifier pFFTSpec isincorrect.
Indicates an error when no memory is allocated.

ExampleFFTInv_PackToR, FFTInv_PermToR, FFTInv_CCSToR
Computes the inverse fast Fourier transform (FFT) of areal signal.

SyntaxCase 1: Not-in-place operation on input data in Pack format
IppStatus ippsFFTInv_PackToR_32f(const Ipp32f* pSrc, Ipp32f* pDst, const
IppsFFTSpec_R_32f* pFFTSpec, Ipp8u* pBuffer);
IppStatus ippsFFTInv_PackToR_64f(const Ipp64f* pSrc, Ipp64f* pDst, const
IppsFFTSpec_R_64f* pFFTSpec, Ipp8u* pBuffer);309

1Intel® Integrated Performance Primitives Developer Guide and Reference

Case 2: In-place operation on input data in Pack format
IppStatus ippsFFTInv_PackToR_32f_I(Ipp32f* pSrcDst, const IppsFFTSpec_R_32f* pFFTSpec,
Ipp8u* pBuffer);
IppStatus ippsFFTInv_PackToR_64f_I(Ipp64f* pSrcDst, const IppsFFTSpec_R_64f* pFFTSpec,
Ipp8u* pBuffer);

Case 3: Not-in-place operation on input data in Perm format
IppStatus ippsFFTInv_PermToR_32f(const Ipp32f* pSrc, Ipp32f* pDst, const
IppsFFTSpec_R_32f* pFFTSpec, Ipp8u* pBuffer);
IppStatus ippsFFTInv_PermToR_64f(const Ipp64f* pSrc, Ipp64f* pDst, const
IppsFFTSpec_R_64f* pFFTSpec, Ipp8u* pBuffer);

Case 4: In-place operation on input data in Perm format
IppStatus ippsFFTInv_PermToR_32f_I(Ipp32f* pSrcDst, const IppsFFTSpec_R_32f* pFFTSpec,
Ipp8u* pBuffer);
IppStatus ippsFFTInv_PermToR_64f_I(Ipp64f* pSrcDst, const IppsFFTSpec_R_64f* pFFTSpec,
Ipp8u* pBuffer);

Case 5 Not-in-place operation on input data in CCS format
IppStatus ippsFFTInv_CCSToR_32f(const Ipp32f* pSrc, Ipp32f* pDst, const
IppsFFTSpec_R_32f* pFFTSpec, Ipp8u* pBuffer);
IppStatus ippsFFTInv_CCSToR_64f(const Ipp64f* pSrc, Ipp64f* pDst, const
IppsFFTSpec_R_64f* pFFTSpec, Ipp8u* pBuffer);

Case 6: In-place operation on input data in CCS format
IppStatus ippsFFTInv_CCSToR_32f_I(Ipp32f* pSrcDst, const IppsFFTSpec_R_32f* pFFTSpec,
Ipp8u* pBuffer);
IppStatus ippsFFTInv_CCSToR_64f_I(Ipp64f* pSrcDst, const IppsFFTSpec_R_64f* pFFTSpec,
Ipp8u* pBuffer);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pFFTSpec

Pointer to the FFT specification structure.

pSrc

Pointer to the input array.

pDst

Pointer to the output array containing real values.

pSrcDstPointer to the input and output for the in-place operation.

pBuffer

Pointer to the external work buffer.

310

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Description
Use these functions with the external work buffer pBuffer. Once the work buffer is allocated, it can be used
for all following calls to the functions computing FFT. The use of an external buffer improves performance
significantly, especially for the small size transforms.
The size of the external buffer must be previously computed by the function ippsFFTGetSize_R.

ippsFFTInv_PackToR. This function computes the inverse FFT of input data in Pack format.
ippsFFTInv_PermToR. This function computes the inverse FFT of input data in Perm format.
ippsFFTInv_CCSToR. This function computes the inverse FFT of input data in CCS format.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers withexception of pBuffer is NULL.

ippStsContextMatchErr
ippStsMemAllocErr

Indicates an error when the specification identifier pFFTSpec isincorrect.
Indicates an error when no memory is allocated.

Discrete Fourier Transform Functions
The functions described in this section compute the forward and inverse discrete Fourier transform of realand complex signals. The DFT is less efficient than the fast Fourier transform, however the length of thevector transformed by the DFT can be arbitrary.
The hint argument, passed to the initialization functions, suggests using special algorithm, faster or moreaccurate. The flag argument specifies the result normalization method. The complex signal can be
represented as a single array containing complex elements, or two separate arrays containing real andimaginary parts. The output result of the FFT can be packed in Pack, Perm, or CCS formats.
To use the DFT functions, you should initialize the specification structure which contains such data as tablesof twiddle factors. Use the ippsDFTInit_R and ippsDFTInit_C functions to initialize the specification
structure both for forward and inverse transforms. Before using these functions, compute the size of the DFT
specification structure using the ippsDFTGetSize_R or ippsDFTGetSize_C functions and allocate memory
for the structure beforehand.
Speed up the DFT by using an external buffer. The size of the external buffer is returned by theippsDFTInit_R and ippsDFTInit_C functions.

For more information about the fast computation of the discrete Fourier transform, see [Mit93], section 8-2,
Fast Computation of the DFT.
A special set of Intel IPP functions provides the so called “out-of-order” DFT of the complex signal. In thiscase, the elements in frequency domain for both forward and inverse transforms can be re-ordered to speedup the computation of the transforms. This re-ordering is hidden from the user and can be different indifferent implementations of the functions. However, reversibility of each pair of functions for forward/inverse
transforms is ensured.
DFTInit_R, DFTInit_C
Initializes the DFT specification structure for real andcomplex signals.

SyntaxCase 1: Operation on real signal
IppStatus ippsDFTInit_R_32f(int length, int flag, IppHintAlgorithm hint,
IppsDFTSpec_R_32f* pDFTSpec, Ipp8u* pMemInit);311

1Intel® Integrated Performance Primitives Developer Guide and Reference

IppStatus ippsDFTInit_R_64f(int length, int flag, IppHintAlgorithm hint,
IppsDFTSpec_R_64f* pDFTSpec, Ipp8u* pMemInit);

Case 2: Operation on complex signal
IppStatus ippsDFTInit_C_32fc(int length, int flag, IppHintAlgorithm hint,
IppsDFTSpec_C_32fc* pDFTSpec, Ipp8u* pMemInit);
IppStatus ippsDFTInit_C_32f(int length, int flag, IppHintAlgorithm hint,
IppsDFTSpec_C_32f* pDFTSpec, Ipp8u* pMemInit);
IppStatus ippsDFTInit_C_64fc(int length, int flag, IppHintAlgorithm hint,
IppsDFTSpec_C_64fc* pDFTSpec, Ipp8u* pMemInit);
IppStatus ippsDFTInit_C_64f(int length, int flag, IppHintAlgorithm hint,
IppsDFTSpec_C_64f* pDFTSpec, Ipp8u* pMemInit);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
lengthLength of the DFT transform.

flag

Specifies the result normalization method. The values for the flagargument are described in the section Flag and Hint Arguments.

hintThis parameter is deprecated. Set the value to ippAlgHintNone.

pDFTSpec

Pointer to the DFT specification structure to be initialized.

pMemInit

Pointer to the temporary work buffer.

Description
These functions initialize the DFT specification structure pDFTSpec with the following parameters: thetransform length, the normalization flag, and the specific code hint. The length argument defines thetransform length.
Before calling these functions the memory must be allocated for the DFT specification structure and thetemporary work buffer (if it is required). The size of the DFT specification structure and the work buffer must
be computed by the functions ippsDFTGetSize_R or ippsDFTGetSize_C.
If the work buffer is not used, the parameter pMemInit can be NULL. If the work buffer is used, theparameter pMemInit cannot be NULL. After initialization is done, the temporary work buffer can be freed.

ippsDFTInit_R function initializes the real DFT specification structure.
ippsDFTInit_C function initializes the complex DFT specification structure.

Application Notes
The maximum values for length are:Function Flavor

Max length

C_32fc134217727 (2^27 - 1)

312

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Function Flavor

Max length

C_64fc67108863 (2^26 - 1)

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsFftFlagErr

Indicates an error when the flag value is incorrect.

ippStsFftOrderErr

Indicates an error when the memory needed to calculate the length
value of the DFT transform exceeds the limit.

ippStsSizeErr

Indicates an error when length is less than, or equal to 0.

DFTGetSize_R, DFTGetSize_C
Computes sizes of the DFT work buffer and required
working buffers.

SyntaxCase 1: Operation on real signal
IppStatus ippsDFTGetSize_R_32f(int length, int flag, IppHintAlgorithm hint, int*
pSizeSpec, int* pSizeInit, int* pSizeBuf);
IppStatus ippsDFTGetSize_R_64f(int length, int flag, IppHintAlgorithm hint, int*
pSizeSpec, int* pSizeInit, int* pSizeBuf);

Case 2: Operation on complex signal
IppStatus ippsDFTGetSize_C_32fc(int length, int flag, IppHintAlgorithm hint, int*
pSizeSpec, int* pSizeInit, int* pSizeBuf);
IppStatus ippsDFTGetSize_C_32f(int length, int flag, IppHintAlgorithm hint, int*
pSizeSpec, int* pSizeInit, int* pSizeBuf);
IppStatus ippsDFTGetSize_C_64fc(int length, int flag, IppHintAlgorithm hint, int*
pSizeSpec, int* pSizeInit, int* pSizeBuf);
IppStatus ippsDFTGetSize_C_64f(int length, int flag, IppHintAlgorithm hint, int*
pSizeSpec, int* pSizeInit, int* pSizeBuf);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
lengthLength of the DFT transform.

flag

Specifies the result normalization method. The values for the flagargument are described in the section Flag and Hint Arguments.

hintThis parameter is deprecated. Set the value to ippAlgHintNone.

313

1

Intel® Integrated Performance Primitives Developer Guide and Reference

pSizeSpec

Pointer to the DFT specification structure size value.

pSizeInit

Pointer to the buffer size value for DFT initialization functions.

pSizeBuf

Pointer to the size value of the DFT external work buffer.

Description
These functions compute the size of DFT specification structure, the work buffer size for the DFT structure
initialization functions ippsDFTInit_R and ippsDFTInit_C, and size of the DFT work buffer for different
flavors of ippsDFTFwd and ippsDFTInv. Their values in bytes are stored in pSpecSize, pSizeInit, andpSizeBuf respectively.

ippsDFTGetSize_R function is used for real flavors of the DFT functions.
ippsDFTGetSize_C function is used for complex flavors of the DFT functions.

Application Notes
The maximum values for length are:Function Flavor

Max length

C_32fc134217727 (2^27 - 1)

C_64fc67108863 (2^26 - 1)

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsFftFlagErr

Indicates an error when the flag value is incorrect.

ippStsFftOrderErr

Indicates an error when the memory needed to calculate the length
value of the DFT transform exceeds the limit.

ippStsSizeErr

Indicates an error when length is less than, or equal to 0.

DFTFwd_CToC
Computes the forward discrete Fourier transform of acomplex signal.

SyntaxCase 1: Operation on real data type
IppStatus ippsDFTFwd_CToC_32f(const Ipp32f* pSrcRe, const Ipp32f* pSrcIm, Ipp32f*
pDstRe, Ipp32f* pDstIm, const IppsDFTSpec_C_32f* pDFTSpec, Ipp8u* pBuffer);
IppStatus ippsDFTFwd_CToC_64f(const Ipp64f* pSrcRe, const Ipp64f* pSrcIm, Ipp64f*
pDstRe, Ipp64f* pDstIm, const IppsDFTSpec_C_64f* pDFTSpec, Ipp8u* pBuffer);

Case 2: Operation on complex data type
IppStatus ippsDFTFwd_CToC_32fc(const Ipp32fc* pSrc, Ipp32fc* pDst, const
IppsDFTSpec_C_32fc* pDFTSpec, Ipp8u* pBuffer);
IppStatus ippsDFTFwd_CToC_64fc(const Ipp64fc* pSrc, Ipp64fc* pDst, const
IppsDFTSpec_C_64fc* pDFTSpec, Ipp8u* pBuffer);

Include Files
ipps.h314

1Developer Guide and Reference for Intel® Integrated Performance Primitives

Domain Dependencies
Flavors declared in ipps.h:
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pDFTSpec

Pointer to the DFT specification structure.

pSrc

Pointer to the input array containing complex values.

pDst

Pointer to the output array containing complex values.

pSrcRePointer to the input array containing real parts of the signal.

pSrcImpDstRepDstImpBuffer

Pointer to the input array containing imaginary parts of thesignal.
Pointer to the output array containing real parts of the signal.
Pointer to the output array containing imaginary parts of thesignal.
Pointer to the work buffer.

Description
These functions compute the forward DFT according to the pDFTSpec specification parameters: thetransform len, the normalization flag, and the specific code hint.
The functions operating on the complex data type process the input complex array pSrc and store the resultin pDst.
The functions operating on the real data type (processing complex signals represented by separate realpSrcRe and imaginary pSrcIm parts) store the result separately in pDstRe and pDstIm, respectively.
Use this function with the external work buffer pBuffer.
Required buffer size must be computed by the corresponding function ippsDFTGetSize_R or
ippsDFTGetSize_C prior to using DFT computation functions.

NOTE
Data vectors for these functions must be aligned to an appropriate number of bytes that isdetermined by the SIMD width that is supported by the customer's platform - use ippMalloc
function for such alignment.

The forward DFT functionality can be described as follows:

315

1

Intel® Integrated Performance Primitives Developer Guide and Reference

where k is the index of elements in the frequency domain, n is the index of elements in the time domain, N is
the input signal len, and A is a multiplier defined by flag. Also, x(n) is pSrc[n] and X(k) is pDst[k].
Product and Performance Information
Performance varies by use, configuration and other factors. Learn more at www.Intel.com/
PerformanceIndex.
Notice revision #20201201

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers withexception of pBuffer is NULL.

ippStsMemAllocErr

Indicates an error when the specification identifier pDFTSpec isincorrect.
Indicates an error when no memory is allocated.

ippStsFftFlagErr

Indicates an error when the flag value is incorrect.

ippStsContextMatchErr

DFTFwd_Direct_CToC
Computes the forward discrete Fourier transform of acomplex signal.

SyntaxIppStatus ippsDFTFwd_Direct_CToC_16fc(const Ipp16fc *pSrc, Ipp16fc *pDst, int length);

Include Files
ipps.hDomain Dependencies
Flavors declared in ipps.h:
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc

Pointer to the input array containing complex values.

pDst

Pointer to the output array containing complex values.

lengthLength of transform

Description
This function computes the forward DFT according to the transform length.
The function operating on the complex data type processes the input complex array pSrc and stores theresult in pDst.

316

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

NOTE
Data vectors for this function must be aligned to an appropriate number of bytes that isdetermined by the SIMD width that is supported by the customer's platform - use ippMalloc
function for such alignment.
The direct form of DFT uses the static twiddle tables and therefore supports only the limited set oftransform lengths. 47 DFT lengths and 11 FFT lengths: 12, 24, 36, 48, 60, 72, 96, 108, 120, 144,
180, 192, 216, 240, 288, 300, 324, 360, 384, 432, 480, 540, 576, 600, 648, 720, 768, 864, 900,
960, 972, 1080, 1152, 1200, 1296, 1440, 1500, 1536, 1620, 1920, 1944, 2160, 2400, 2700, 2916,
3000, 3240 - DFT, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096 - FFT

The forward DFT functionality can be described as follows:

where k is the index of elements in the frequency domain, n is the index of elements in the time domain, N is
the input signal len, and A is a multiplier equal to 1.0 (no normalization). Also, x(n) is pSrc[n] and X(k) is
pDst[k].
Product and Performance Information
Performance varies by use, configuration and other factors. Learn more at www.Intel.com/
PerformanceIndex.
Notice revision #20201201

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers withexception of pBuffer is NULL.

ippStsSizeErr

This length is not supported by direct function.

DFTInv_CToC
Computes the inverse discrete Fourier transform of acomplex signal.

SyntaxCase 1: Operation on real data type
IppStatus ippsDFTInv_CToC_32f(const Ipp32f* pSrcRe, const Ipp32f* pSrcIm, Ipp32f*
pDstRe, Ipp32f* pDstIm, const IppsDFTSpec_C_32f* pDFTSpec, Ipp8u* pBuffer);
IppStatus ippsDFTInv_CToC_64f(const Ipp64f* pSrcRe, const Ipp64f* pSrcIm, Ipp64f*
pDstRe, Ipp64f* pDstIm, const IppsDFTSpec_C_64f* pDFTSpec, Ipp8u* pBuffer);

Case 2: Operation on complex data type
IppStatus ippsDFTInv_CToC_32fc(const Ipp32fc* pSrc, Ipp32fc* pDst, const
IppsDFTSpec_C_32fc* pDFTSpec, Ipp8u* pBuffer);317

1Intel® Integrated Performance Primitives Developer Guide and Reference

IppStatus ippsDFTInv_CToC_64fc(const Ipp64fc* pSrc, Ipp64fc* pDst, const
IppsDFTSpec_C_64fc* pDFTSpec, Ipp8u* pBuffer);

Include Files
ipps.hDomain Dependencies
Flavors declared in ipps.h:
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pDFTSpec

Pointer to the DFT specification structure.

pSrc

Pointer to the input array containing complex values.

pDst

Pointer to the output array containing complex values.

pSrcRePointer to the input array containing real parts of the signal.

pSrcImpDstRepDstImpBuffer

Pointer to the input array containing imaginary parts of thesignal.
Pointer to the output array containing real parts of the signal.
Pointer to the output array containing imaginary parts of thesignal.
Pointer to the work buffer.

Description
These functions compute the inverse DFT according to the pDFTSpec specification parameters: the transformlen, the normalization flag, and the specific code hint.
The functions using the complex data type, for example with 32fc suffixes, process the input complex arraypSrc and store the result in pDst.
The functions using the real data type and processing complex signals represented by separate real pSrcReand imaginary pSrcIm parts, for example with 32f suffixes, store the result separately in pDstRe andpDstIm, respectively.
Use this function with the external work buffer pBuffer. Once the work buffer is allocated, it can be used for
all following calls to the functions computing DFT. The use of an external buffer improves performance
significantly, especially for the small size transforms.
Required buffer size must be computed by the corresponding function ippsDFTGet BufSize_C prior to using
DFT computation functions.
Product and Performance Information
Performance varies by use, configuration and other factors. Learn more at www.Intel.com/
PerformanceIndex.
Notice revision #20201201

318

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers withexception of pBuffer is NULL.

ippStsMemAllocErr

Indicates an error when the specification identifier pDFTSpec isincorrect.
Indicates an error when no memory is allocated.

ippStsFftFlagErr

Indicates an error when the flag value is incorrect.

ippStsContextMatchErr

DFTInv_Direct_CToC
Computes the inverse discrete Fourier transform of acomplex signal.

SyntaxIppStatus ippsDFTInv_Direct_CToC_16fc(const Ipp16fc *pSrc, Ipp16fc *pDst, int length);

Include Files
ipps.hDomain Dependencies
Flavors declared in ipps.h:
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc

Pointer to the input array containing complex values.

pDst

Pointer to the output array containing complex values.

lengthLength of transform

Description
This function computes the inverse DFT according to the transform length.
The function operating on the complex data type processes the input complex array pSrc and stores theresult in pDst.

NOTE
Data vectors for this function must be aligned to an appropriate number of bytes that isdetermined by the SIMD width that is supported by the customer's platform - use ippMalloc
function for such alignment.
The direct form of DFT uses the static twiddle tables and therefore supports only the limited set oftransform lengths. 47 DFT lengths and 11 FFT lengths: 12, 24, 36, 48, 60, 72, 96, 108, 120, 144,
180, 192, 216, 240, 288, 300, 324, 360, 384, 432, 480, 540, 576, 600, 648, 720, 768, 864, 900,
960, 972, 1080, 1152, 1200, 1296, 1440, 1500, 1536, 1620, 1920, 1944, 2160, 2400, 2700, 2916,
3000, 3240 - DFT, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096 - FFT

319

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Product and Performance Information
Performance varies by use, configuration and other factors. Learn more at www.Intel.com/
PerformanceIndex.
Notice revision #20201201

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers withexception of pBuffer is NULL.

ippStsSizeErr

This length is not supported by direct function.

DFTFwd_RToPack, DFTFwd_RToPerm, DFTFwd_RToCCS
Computes the forward discrete Fourier transform of areal signal.

SyntaxCase 1: Result in Pack format
IppStatus ippsDFTFwd_RToPack_32f(const Ipp32f* pSrc, Ipp32f* pDst, const
IppsDFTSpec_R_32f* pDFTSpec, Ipp8u* pBuffer);
IppStatus ippsDFTFwd_RToPack_64f(const Ipp64f* pSrc, Ipp64f* pDst, const
IppsDFTSpec_R_64f* pDFTSpec, Ipp8u* pBuffer);
supported value for <len>: integer in the range [2, 64].

Case 2: Result in Perm format
IppStatus ippsDFTFwd_RToPerm_32f(const Ipp32f* pSrc, Ipp32f* pDst, const
IppsDFTSpec_R_32f* pDFTSpec, Ipp8u* pBuffer);
IppStatus ippsDFTFwd_RToPerm_64f(const Ipp64f* pSrc, Ipp64f* pDst, const
IppsDFTSpec_R_64f* pDFTSpec, Ipp8u* pBuffer);

Case 3: Result in CCS format
IppStatus ippsDFTFwd_RToCCS_32f(const Ipp32f* pSrc, Ipp32f* pDst, const
IppsDFTSpec_R_32f* pDFTSpec, Ipp8u* pBuffer);
IppStatus ippsDFTFwd_RToCCS_64f(const Ipp64f* pSrc, Ipp64f* pDst, const
IppsDFTSpec_R_64f* pDFTSpec, Ipp8u* pBuffer);

Include Files
ipps.hDomain Dependencies
Flavors declared in ipps.h:
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pDFTSpec

320

Pointer to the DFT specification structure.

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

pSrc

Pointer to the input array containing real values .

pDst

Pointer to the output array containing packed complex values.

pBuffer

Pointer to the work buffer.

Description
These functions compute the forward DFT of a real signal. The result of the forward transform (that is in thefrequency-domain) of real signals is represented in several possible packed formats: Pack, Perm, or CCS. The
data can be packed due to the symmetry property of the DFT transform of a real signal. Tables show how theoutput results are arranged in the packed formats.
These functions compute the forward DFT according to the pDFTSpec specification parameters: the transformlen, the normalization flag, and the specific code hint.
Use these functions with the external work buffer pBuffer. Once the work buffer is allocated, it can be used
for all following calls to the functions computing DFT. The use of an external buffer improves performance
significantly, especially for the small size transforms.

ippsDFTFwd_RToPack. These functions compute the forward DFT and stores the result in Pack format.
ippsDFTFwd_RToPerm. These functions compute the forward DFT and stores the result in Perm format.
ippsDFTFwd_RToCCS. These functions compute the forward DFT and stores the result in CCS format.
Product and Performance Information
Performance varies by use, configuration and other factors. Learn more at www.Intel.com/
PerformanceIndex.
Notice revision #20201201

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers withexception of pBuffer is NULL.

ippStsMemAllocErr

Indicates an error when the specification identifier pDFTSpec isincorrect.
Indicates an error when no memory is allocated.

ippStsFftFlagErr

Indicates an error when the flag value is incorrect.

ippStsContextMatchErr

DFTInv_PackToR, DFTInv_PermToR, DFTInv_CCSToR
Computes the inverse discrete Fourier transform of areal signal.

SyntaxCase 1: Input data in Pack format
IppStatus ippsDFTInv_PackToR_32f(const Ipp32f* pSrc, Ipp32f* pDst, const
IppsDFTSpec_R_32f* pDFTSpec, Ipp8u* pBuffer);
IppStatus ippsDFTInv_PackToR_64f(const Ipp64f* pSrc, Ipp64f* pDst, const
IppsDFTSpec_R_64f* pDFTSpec, Ipp8u* pBuffer);

321

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Case 2: Input data in Perm format
IppStatus ippsDFTInv_PermToR_32f(const Ipp32f* pSrc, Ipp32f* pDst, const
IppsDFTSpec_R_32f* pDFTSpec, Ipp8u* pBuffer);
IppStatus ippsDFTInv_PermToR_64f(const Ipp64f* pSrc, Ipp64f* pDst, const
IppsDFTSpec_R_64f* pDFTSpec, Ipp8u* pBuffer);

Case 3: Input data in CCS format
IppStatus ippsDFTInv_CCSToR_32f(const Ipp32f* pSrc, Ipp32f* pDst, const
IppsDFTSpec_R_32f* pDFTSpec, Ipp8u* pBuffer);
IppStatus ippsDFTInv_CCSToR_64f(const Ipp64f* pSrc, Ipp64f* pDst, const
IppsDFTSpec_R_64f* pDFTSpec, Ipp8u* pBuffer);

Include Files
16s_Sfs flavors: ipps.h

Domain Dependencies
16s_Sfs:
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pDFTSpec

Pointer to the DFT specification structure.

pSrc

Pointer to the input array containing packed complex values.

pDst

Pointer to the output array containing real values.

pBuffer

Pointer to the work buffer.

Description
These functions compute the inverse DFT of a real signal. The input data (that is in the frequency-domain)
are represented in several possible packed formats: Pack, Perm, or CCS. Tables show how the input data canbe represented in the packed formats.
Use these functions with the external work buffer pBuffer. Once the work buffer is allocated, it can be used
for all following calls to the functions computing DFT. The use of an external buffer improves performance
significantly, especially for the small size transforms.

ippsDFTInv_PackToR. This function computes the inverse DFT for input data in Pack format.
ippsDFTInv_PermToR. This function computes the inverse DFT for input data in Perm format.
ippsDFTInv_CCSToR. This function computes the inverse DFT for input data in CCS format.
Product and Performance Information
Performance varies by use, configuration and other factors. Learn more at www.Intel.com/
PerformanceIndex.
Notice revision #20201201

Return Values
ippStsNoErr

322

Indicates no error.

Developer Guide and Reference for Intel® Integrated Performance Primitives

ippStsNullPtrErr

1

Indicates an error when one of the specified pointers withexception of pBuffer is NULL.

ippStsMemAllocErr

Indicates an error when the specification identifier pDFTSpec isincorrect.
Indicates an error when no memory is allocated.

ippStsFftFlagErr

Indicates an error when the flag value is incorrect.

ippStsContextMatchErr

DFT for a Given Frequency (Goertzel) Functions
The functions described in this section compute a single or a number of the discrete Fourier transforms for agiven frequency. Note that the DFT exists only for the following normalized frequencies: 0, 1/N, 2/N,...
( N-1)/N, where N is the number of time domain samples. Therefore you must select the frequency value
from the above set.
These Intel IPP functions use a Goertzel algorithm [Mit98] and are more efficient when a small number of
DFT values is needed.
Some of the functions compute two values, not one. The applications computing several values, for example
the dual-tone multi frequency signal detection, work faster with such functions.
GoertzComputes the discrete Fourier transform for a given
frequency for a single signal.

SyntaxIppStatus ippsGoertz_32f(const Ipp32f* pSrc, int len, Ipp32fc* pVal, Ipp32f rFreq);
IppStatus ippsGoertz_64f(const Ipp64f* pSrc, int len, Ipp64fc* pVal, Ipp64f rFreq);
IppStatus ippsGoertz_32fc(const Ipp32fc* pSrc, int len, Ipp32fc* pVal, Ipp32f rFreq);
IppStatus ippsGoertz_64fc(const Ipp64fc* pSrc, int len, Ipp64fc* pVal, Ipp64f rFreq);
IppStatus ippsGoertz_16s_Sfs(const Ipp16s* pSrc, int len, Ipp16sc* pVal, Ipp32f rFreq,
int scaleFactor);
IppStatus ippsGoertz_16sc_Sfs(const Ipp16sc* pSrc, int len, Ipp16sc* pVal, Ipp32f
rFreq, int scaleFactor);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc

Pointer to the input data vector.

len

Number of elements in the vector.

pVal

Pointer to the output DFT value.

rFreq

Single relative frequency value [0, 1.0).

scaleFactor

Scale factor, refer to Integer Scaling.

323

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Description
This function computes a DFT for an input len-length vector pSrc for a given frequency rFreq, and storesthe result in pVal.

ippsGoertzQ15. This function operates with relative frequency in Q15 format. Data in Q15 format areconverted to the corresponding float data type that lay in the range [0, 1.0).
The functionality of the Goertzel algorithm can be described as follows:

where k/N is the normalized rFreq value for which the DFT is computed.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsRelFreqErr

Indicates an error when rFreq is out of range.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

ExampleThe example below illustrates the use of Goertzel functions for selecting the magnitudes of a given frequency
when computing DFTs.

IppStatusgoertzel( void ) {#undef LEN#define LEN 100
IppStatus status;
Ipp32fc *x = ippsMalloc_32fc( LEN ), y;
int n;///generate a signal of 60 Hz freq that/// is sampled with 400 Hz freq
for( n=0; n<LEN; ++n) {x[n].re =(Ipp32f)sin(IPP_2PI * n * 60 / 400);x[n].im = 0;}
status = ippsGoertz_32fc( x, LEN, &y, 60.0f / 400 );printf_32fc("goertz =", &y, 1, status );ippsFree( x );return status;}
Output:goertz = {0.000090,-50.000008}
Matlab* Analog>> N=100;F=60/400;n=0:N-1;x=sin(2*pi*n*F);y=fft(x);n=N*F;y(n+1)

324Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Discrete Cosine Transform Functions
This section describes the functions that compute the discrete cosine transform (DCT) of a signal. DCT
functions used in the Intel IPP signal processing data-domain implement the modified computation algorithm
proposed in [Rao90].

DCTFwdInit
Initializes the forward discrete cosine transformstructure.

SyntaxIppStatus ippsDCTFwdInit_32f(IppsDCTFwdSpec_32f** ppDCTSpec, int len, IppHintAlgorithm
hint, Ipp8u* pSpec, Ipp8u* pSpecBuffer);
IppStatus ippsDCTFwdInit_64f(IppsDCTFwdSpec_64f** ppDCTSpec, int len, IppHintAlgorithm
hint, Ipp8u* pSpec, Ipp8u* pSpecBuffer);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters

len

Double pointer to the forward DCT specification structure to becreated.
Number of samples in the DCT.

hint

This parameter is deprecated. Set the value to ippAlgHintNone.

pSpec

Pointer to the area for the DCT specification structure.

pSpecBuffer

Pointer to the additional work buffer, can be NULL.

ppDCTSpec

Description
This function initializes the forward DCT specification structure ppDCTSpec with the following parameters: thetransform len, and the specific code hint.
Before calling this function the memory must be allocated for the DCT specification structure and the work
buffer. The size of the DCT specification structure and the work buffer must be computed by the function
ippsDCTFwdGetSize beforehand.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers withexception of pSpecBuffer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

DCTInvInit
Initializes the inverse discrete cosine transformstructure.

325

1

Intel® Integrated Performance Primitives Developer Guide and Reference

SyntaxIppStatus ippsDCTInvInit_32f(IppsDCTInvSpec_32f** ppDCTSpec, int len, IppHintAlgorithm
hint, Ipp8u* pSpec, Ipp8u* pSpecBuffer);
IppStatus ippsDCTInvInit_64f(IppsDCTInvSpec_64f** ppDCTSpec, int len, IppHintAlgorithm
hint, Ipp8u* pSpec, Ipp8u* pSpecBuffer);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters

len

Double pointer to the inverse DCT specification structure to becreated.
Number of samples in the DCT.

hint

This parameter is deprecated. Set the value to ippAlgHintNone.

pSpec

Pointer to the area for the DCT specification structure.

pSpecBuffer

Pointer to the work buffer, can be NULL.

ppDCTSpec

Description
This function initializes in the buffer pSpec the inverse DCT specification structure ppDCTSpec with thefollowing parameters: the transform len, and the specific code hint.
Before calling this function the memory must be allocated for the DCT specification structure and the work
buffer. The size of the DFT specification structure and the work buffer must be computed by the function
ippsDCTInvGetSize.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers withexception of pSpecBuffer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

DCTFwdGetSize
Computes the size of all buffers required for theforward DCT.

SyntaxIppStatus ippsDCTFwdGetSize_32f(int len, IppHintAlgorithm hint, int* pSpecSize, int*
pSpecBufferSize, int* pBufferSize);
IppStatus ippsDCTFwdGetSize_64f(int len, IppHintAlgorithm hint, int* pSpecSize, int*
pSpecBufferSize, int* pBufferSize);

326

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameterslen

Number of samples in the DCT.

hint

This parameter is deprecated. Set the value to ippAlgHintNone.

pSpecSize

Pointer to the size of the forward DCT specification structure.

pSpecBufferSize

Pointer to the size of the work buffer for the initialization
function.

pBufferSize

Pointer to the size of the forward DCT work buffer.

Description
This function computes the size pSpecSize for the forward DCT structure with the following parameters: thetransform len, and the specific code hint. Additionally the function computes the size pSpecBufferSize of
the work buffer for the initialization function ippsDCTFwdInit , and the size pBufferSize of the work buffer
for the function ippsDCTFwd .
The function ippsDCTFwdGetSize should be called prior to them.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

DCTInvGetSize
Computes the size of all buffers required for the
inverse DCT.

SyntaxIppStatus ippsDCTInvGetSize_32f(int len, IppHintAlgorithm hint, int* pSpecSize, int*
pSpecBufferSize, int* pBufferSize);
IppStatus ippsDCTInvGetSize_64f(int len, IppHintAlgorithm hint, int* pSpecSize, int*
pSpecBufferSize, int* pBufferSize);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

327

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Parameterslen

Number of samples in the DCT.

hint

This parameter is deprecated. Set the value to ippAlgHintNone.

pSpecSize

Pointer to the size of the forward DCT specification structure.

pSpecBufferSize
pBufferSize

Pointer to the size of the work buffer for the initialization
function.
Pointer to the size of the forward DCT work buffer.

Description
This function computes in bytes the size pSpecSize of the external buffer for the inverse DCT structure withthe following parameters: the transform len, and the specific code hint. Additionally the function computes
the size pSpecBufferSize of the work buffer for the initialization function ippsDCTInvInit and the size
pBufferSize of the work buffer for the function ippsDCTInv.
The function ippsDCTInvGetSize must be called prior to them.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

DCTFwdComputes the forward discrete cosine transform of asignal.

SyntaxCase 1: Not-in-place operation
IppStatus ippsDCTFwd_32f(const Ipp32f* pSrc, Ipp32f* pDst, const IppsDCTFwdSpec_32f*
pDCTSpec, Ipp8u* pBuffer);
IppStatus ippsDCTFwd_64f(const Ipp64f* pSrc, Ipp64f* pDst, const IppsDCTFwdSpec_64f*
pDCTSpec, Ipp8u* pBuffer);

Case 2: In-place operation
IppStatus ippsDCTFwd_32f_I(Ipp32f* pSrcDst, const IppsDCTFwdSpec_32f* pDCTSpec, Ipp8u*
pBuffer);
IppStatus ippsDCTFwd_64f_I(Ipp64f* pSrcDst, const IppsDCTFwdSpec_64f* pDCTSpec, Ipp8u*
pBuffer);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

328

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Parameters
pDCTSpec

Pointer to the forward DCT specification structure.

pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

pSrcDstpBuffer

Pointer to the source and destination vector for in-place
operations.
Pointer to the external work buffer.

Description
This function computes the forward discrete cosine transform (DCT) of the source signal pSrc (pSrcDst forin-place operations) in accordance with the specification structure pDCTSpec that must be initialized bycalling ippsDCTFwdInit beforehand. The result in stored in the pDst (pSrcDst for in-place operations).
If len is a power of 2, the function use an efficient algorithm that is significantly faster than the directcomputation of DCT. For other values of len, these functions use the direct formulas given below; however,the symmetry of the cosine function is taken into account, which allows to perform about half of themultiplication operations in the formulas.
In the following definition of DCT, N = len,x(n) is pSrc[n] and y(k) is pDst[k].
The forward DCT is defined by the formula:

Use this function with the external work buffer pBuffer. Once the work buffer is allocated, it can be used for
all following calls to the functions computing DCT. The use of an external buffer improves performance
significantly, especially for the small size transforms.
The size of this buffer must be computed previously using ippsDCTFwdGetSize.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the pDCTSpec, pSrc, pDst, pSrcDst
pointers is NULL.

ippStsContextMatchErr
ippStsMemAllocErr

Indicates an error if the specification identifier pDCTSpec isincorrect.
Indicates an error if memory allocation fails.

329

1

Intel® Integrated Performance Primitives Developer Guide and Reference

DCTInvComputes the inverse discrete cosine transform of asignal.

SyntaxCase 1: Not-in-place operation
IppStatus ippsDCTInv_32f(const Ipp32f* pSrc, Ipp32f* pDst, const IppsDCTInvSpec_32f*
pDCTSpec, Ipp8u* pBuffer);
IppStatus ippsDCTInv_64f(const Ipp64f* pSrc, Ipp64f* pDst, const IppsDCTInvSpec_64f*
pDCTSpec, Ipp8u* pBuffer);

Case 2: In-place operation
IppStatus ippsDCTInv_32f_I(Ipp32f* pSrcDst, const IppsDCTInvSpec_32f* pDCTSpec, Ipp8u*
pBuffer);
IppStatus ippsDCTInv_64f_I(Ipp64f* pSrcDst, const IppsDCTInvSpec_64f* pDCTSpec, Ipp8u*
pBuffer);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pDCTSpec

Pointer to the inverse DCT specification structure.

pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

pSrcDstpBuffer

Pointer to the source and destination vector for in-place
operations.
Pointer to the external work buffer.

Description
This function computes the inverse discrete cosine transform (DCT) of the source signal pSrc (pSrcDst forin-place operations) in accordance with the specification structure pDCTSpec that must be initialized bycalling ippsDCTInvInit beforehand. The result in stored in the pDst (pSrcDst for in-place operations).
If len is a power of 2, the functions use an efficient algorithm that is significantly faster than the directcomputation of DCT. For other values of len, these functions use the direct formulas given below; however,the symmetry of the cosine function is taken into account, which allows to perform about half of themultiplication operations in the formulas.
In the following definition of DCT, N = len,x(n) is pDst[n] and y(k) is pSrc[k].
330Developer Guide and Reference for Intel® Integrated Performance Primitives

1

The inverse DCT is defined by the formula:

Use this function with the external work buffer pBuffer. Once the work buffer is allocated, it can be used for
all following calls to the functions computing DCT. The use of an external buffer improves performance
significantly, especially for the small size transforms.
The size of this buffer must be computed previously using ippsDCTInvGetSize.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the pDCTSpec, pSrc, pDst, pSrcDst
pointers is NULL.

ippStsContextMatchErr
ippStsMemAllocErr

Indicates an error when the specification identifier pDCTSpec isincorrect.
Indicates an error if memory allocation fails.

Hilbert Transform Functions
The functions described in this section compute a discrete-time analytic signal from a real data sequence
using the Hilbert transform. The analytic signal is a complex signal whose real part is a replica of the original
data, and imaginary part contains the Hilbert transform. That is, the imaginary part is a version of theoriginal real data with a 90 degrees phase shift. The Hilbert transformed data have the same amplitude andfrequency content as the original real data, plus the additional phase information.

HilbertGetSize
Computes the size of the Hilbert transform structure
and temporary work buffer.

SyntaxIppStatus ippsHilbertGetSize_32f32fc(int length, IppHintAlgorithm hint, int* pSpecSize,int* pBufferSize);
IppStatus ippsHilbertGetSize_64f64fc(int length, IppHintAlgorithm hint, int* pSpecSize,int* pBufferSize);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

331

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Parameters
lengthNumber of samples in the Hilbert transform.

pSpecSize

Option to select the algorithmic implementation of thetransform function (DFT). The values for the hint argument aredescribed in Flag and Hint Arguments.
Pointer to the size, in bytes, of the Hilbert context structure.

pBufferSize

Pointer to the size, in bytes, of the work buffer.

hint

Description
This function computes the size of the Hilbert specification structure and temporary work buffer for theippsHilbert function.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when any of the specified pointers is NULL.

ippStsSizeErr

Indicates an error when length is less than 1.

See Also
Hilbert MODIFIED API. Computes an analytic signal using the Hilbert transform.
HilbertInit
Initializes the Hilbert transform structure.

SyntaxIppStatus ippsHilbertInit_32f32fc(int length, IppHintAlgorithm hint, IppsHilbertSpec*
pSpec, Ipp8u* pBuffer);
IppStatus ippsHilbertInit_64f64fc(int length, IppHintAlgorithm hint, IppsHilbertSpec*
pSpec, Ipp8u* pBuffer);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
lengthNumber of samples in the Hilbert transform.

pSpec

Option to select the algorithmic implementation of thetransform function (DFT). The values for the hint argument aredescribed in Flag and Hint Arguments.
Pointer to the Hilbert context structure.

pBuffer

Pointer to the work buffer.

hint

332

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Description
This function initializes the Hilbert specification structure pSpec with the following parameters: the length of
the transform length, and the specific code indicator hint. Call this function before using the Hilberttransform function ippsHilbert.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when any of the specified pointers is NULL.

ippStsSizeErr

Indicates an error when length is less than, or equal to 0.

See Also
Hilbert MODIFIED API. Computes an analytic signal using the Hilbert transform.
Hilbert
MODIFIED API. Computes an analytic signal using theHilbert transform.

SyntaxIppStatus ippsHilbert_32f32fc(const Ipp32f* pSrc, Ipp32fc* pDst, IppsHilbertSpec*
pSpec, Ipp8u* pBuffer);
IppStatus ippsHilbert_64f64fc(const Ipp64f* pSrc, Ipp64fc* pDst, IppsHilbertSpec*
pSpec, Ipp8u* pBuffer);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSpec

Pointer to the Hilbert specification structure.

pSrc

Pointer to the vector containing original real data.

pDst

Pointer to the output array containing complex data.

pBuffer

Pointer to the work buffer.

Description
Important The API of this function has been modified in Intel IPP 9.0 release.

The ippsHilbert function computes a complex analytic signal pDst, which contains the original real signal
pSrc as its real part and computed Hilbert transform as its imaginary part. The Hilbert transform isperformed according to the pSpec specification parameters: the number of samples len, and the specificcode hint. The input data is zero-padded or truncated to the size of len as appropriate.
Before using this function, you need to compute the size of the work buffer and specification structure using
the HilbertGetSize function and initialize the structure using HilbertInit.

333

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsContextMatchErr

Indicates an error when the specification identifier pSpec isincorrect.

ExampleThe example below shows how to initialize the specification structure and use the function
ippsHilbert_32f32fc.

IppStatus hilbert( ){Ipp32f x[10];Ipp32fc y[10];int n;
IppStatus status;
IppsHilbertSpec* pSpec;
Ipp8u* pBuffer;
int sizeSpec, sizeBuf;
status = ippsHilbertGetSize_32f32fc(10, ippAlgHintNone, &sizeSpec, &sizeBuf);
pSpec = (IppsHilbertSpec*)ippMalloc(sizeSpec);
pBuffer = (Ipp8u*)ippMalloc(sizeBuf);
status = ippsHilbertInit_32f32fc(10, ippAlgHintNone, pSpec, pBuffer);for (n = 0; n < 10; n ++) {x[n] = (Ipp32f)cos(IPP_2PI * n * 2 / 9);}
status = ippsHilbert_32f32fc(x, y, pSpec, pBuffer);
ippsMagnitude_32fc((Ipp32fc*)y, x, 5);
ippFree(pSpec);
ippFree(pBuffer);
printf_32f("hilbert magn =", x, 5, status);
return status;}
Output:hilbert magn = 1.0944 1.1214 1.0413 0.9707 0.9839
Matlab* Analog:>> n=0:9; x=cos(2*pi*n*2/9); y=abs(hilbert(x)); y(1:5)

See Also
HilbertGetSize Computes the size of the Hilbert transform structure and temporary work buffer.
HilbertInit Initializes the Hilbert transform structure.
Wavelet Transform Functions
This section describes the wavelet transform functions implemented in Intel IPP.

334

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

In signal processing, signals can represented in both frequency and time-frequency domains. In many cases
the wavelet transforms become an alternative to short time Fourier transforms.
The discrete wavelet signal can be considered as a set of the coefficients ai,k with two indices, one of which isa “frequency” characteristic and the other is a time localization. The coefficient value corresponds to the
localized wave amplitude or to one of basis transform functions. The “frequency” index shows the time scaleof the localized wave. Function bases originated from one local wave by decreasing the wave by 2n in time
are the most widely used. Such transforms can be used for building very efficient implementations called fast
wavelet transforms by analogy with fast Fourier transforms. Figure "Wavelet Decomposition Coefficients in
Time-Frequency Domain" shows how the time and frequency plane is divided into areas that correspond to
the local wave amplitudes. This kind of transforms is implemented in Intel IPP and referred to as the discrete
wavelet transform (DWT).
Wavelet Decomposition Coefficients in Time-Frequency Domain

335

1

Intel® Integrated Performance Primitives Developer Guide and Reference

The DWT is one of the wavelet analysis methods that stem from the basis functions related to the scale
factor 2. Thus, there is a basic common element shared by the DWT and the other packet analysis methods.
Likewise another basic element for signal reconstruction or synthesis can be defined, called the one-level
inverse DWT. Figure "Three-Level Discrete Wavelet Decomposition" shows the diagram of the forward DWT
which allows to switch to time-frequency representation shown in Figure above. The diagram includes threelevels of decomposition. Figure "Three-Level Discrete Wavelet Reconstruction" shows the corresponding
procedure of signal reconstruction based on the elementary one-level inverse transform.
The implementation of discrete multi-scale transforms is based on the use of interpolation and decimation
filters with the resampling factor 2. The basis of the multi-scale signal decomposition and reconstruction
functions uniquely defines the filter parameters. The Intel IPP multi-scale transform functions use filters withfinite impulse response.
The Primitives contains two sets of functions.
•

Transforms designed for fixed filter banks. These transforms yield the highest performance.

336

Developer Guide and Reference for Intel® Integrated Performance Primitives

1•

Transforms that enable the user to work with arbitrary filters. These functions use effective polyphasefiltration algorithms. The transform interface gives the option of processing the data in blocks, including inreal-time applications.
Three-Level Discrete Wavelet Decomposition

Three-Level Discrete Wavelet Reconstruction

337

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Transforms for Fixed Filter BanksThis section describes the functions that perform forward or inverse wavelet transforms for fixed filter banks.
WTHaarFwd, WTHaarInv
Performs forward or inverse single-level discrete
wavelet Haar transforms.

SyntaxCase 1: Forward transform
IppStatus ippsWTHaarFwd_32f(const Ipp32f* pSrc, int len, Ipp32f* pDstLow, Ipp32f*
pDstHigh);
IppStatus ippsWTHaarFwd_64f(const Ipp64f* pSrc, int len, Ipp64f* pDstLow, Ipp64f*
pDstHigh);
IppStatus ippsWTHaarFwd_16s_Sfs(const Ipp16s* pSrc, int len, Ipp16s* pDstLow, Ipp16s*
pDstHigh, int scaleFactor);

Case 2: Inverse transform
IppStatus ippsWTHaarInv_32f(const Ipp32f* pSrcLow, const Ipp32f* pSrcHigh, Ipp32f*
pDst, int len);
IppStatus ippsWTHaarInv_64f(const Ipp64f* pSrcLow, const Ipp64f* pSrcHigh, Ipp64f*
pDst, int len);
IppStatus ippsWTHaarInv_16s_Sfs(const Ipp16s* pSrcLow, const Ipp16s* pSrcHigh, Ipp16s*
pDst, int len, int scaleFactor);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrc

Pointer to the source vector for forward transform.

len

Number of elements in the vector.

pDstLow
pDstHighpSrcLow
pSrcHighpDst
scaleFactor

338

Pointer to the array with the coarse "low frequency"
components of the output for forward transform.
Pointer to the array with the detail "high frequency"
components of the output for forward transform.
Pointer to the array with the coarse "low frequency"
components of the input for inverse transform.
Pointer to the array with the detail "high frequency"
components of the input for inverse transform.
Pointer to the array with the output signal for inverse
transform.
Scale factor, refer to Integer Scaling.

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Description
These functions perform forward and inverse single-level discrete Haar transforms. These transforms are
orthogonal and reconstruct the original signal perfectly.
The forward transform can be considered as wavelet signal decomposition with lowpass decimation filter
coefficients {1/2, 1/2} and highpass decimation filter coefficients {1/2, -1/2}.
The inverse transform is represented as a wavelet signal reconstruction with lowpass interpolation filter
coefficients {1, 1} and highpass interpolation filter coefficients {-1, 1}.
The decomposition filter coefficients are frequency response normalized to provide the same value range forboth input and output signals. Thus, the amplitude of the low pass filter frequency response is 1 for zerovalued frequency, and the amplitude of the high pass filter frequency response is also 1 for the frequency
value near to 0.5.
As the absolute values of the interpolation filter coefficients are equal to 1, the reconstruction of the signal
requires few operations. It is well suited for usage in data compression applications. As the decomposition
filter coefficients are powers of 2, the integer functions perform lossless decomposition with thescaleFactor value equal to -1. To avoid saturation, use higher-precision data types.
Note that the filter coefficients can be power spectral response normalized, see [Strang96] for more
information. Thus, the decomposition filter coefficients are {2-1/2, 2-1/2} and {2-1/2, -2-1/2}; accordingly; thereconstruction filter coefficients are {2-1/2, 2-1/2} and {-2-1/2, 2-1/2}.
In the following definition of the forward single-level discrete Haar transform, N = len. The coarse "lowfrequency" component c(k) is pDstLow[k] and the detail "high-frequency" component d(k) is pDstHigh[k];also x(2k) and x(2k+1) are even and odd values of the input signal pSrc, respectively.
c(k) = (x (2k) + x(2k+1 ))/2
d(k) = (x(2k+1) - x(2k))/2
In the inverse direction, N= len. The coarse "low-frequency" component c(k) is pSrcLow[k] and the detail"high-frequency" component d(k) is pSrcHigh[k]; also y(2i) and y(2i+1) are even and odd values of theoutput signal pDst, respectively.
y(2i) = c(i) - d(i)y(2i+1) = c(i) + d(i)For even length N, 0 ≤ k < N/2 and 0 ≤ i < N/2. Also, "low-frequency" and "high-frequency" components
are of size N/2 for both original and reconstructed signals. The total length of components is equal to thesignal length N.
In case of odd length N, the vector is considered as a vector of the extended length N+1 whose two lastelements are equal to each other x[N] = x[N - 1]. The last elements of the coarse and detail components ofthe decomposed signal are defined as follows:c((N+1 )/2 - 1) = x(N - 1)d((N + 1)/2 - 1) = 0
Correspondingly, the last element of the reconstructed signal is defined as:y(N) = y(N - 1) = c((N+ 1)/2 - 1)
For odd length N, 0 ≤ k < N - 1)/2 and 0 ≤ i < N - 1)/2 , assuming that c((N+ 1)/2 - 1) = x(N - 1) and y(N- 1) = c((N + 1)/2 - 1). The "low-frequency" component is of size (N + 1)/2. The "high-frequency"
component is of size (N - 1)/2, because the last element d((N + 1)/2 - 1) is always equal to 0. The total
length of components is also N.
Such an approach applies continuation of boundaries for filters having the symmetry properties, see [Bris94].

339

1

Intel® Integrated Performance Primitives Developer Guide and Reference

When performing block mode transforms, take into consideration that for decomposition and reconstructionof even-length signals no extrapolations at the boundaries is used. In case of odd-length signals, asymmetric continuation of the signal boundary with the last point replica is applied.
When it is necessary to have a continuous set of output blocks, all the input blocks are to be of even length,
besides the last one (which can be either of odd or even length). Thus, if the whole amount of elements isodd, only the last block can be of odd length.

ippsWTHaarFwd. Thise function performs the forward single-level discrete Haar transform of a len-length
signal pSrc and stores the decomposed coarse "low-frequency" components in pDstLow, and the detail"high-frequency" components in pDstHigh.
ippsWTHaarInv. This function performs the inverse single-level discrete Haar transform of the coarse "lowfrequency" components pSrcLow and detail "high-frequency" components pSrcHigh, and stores thereconstructed signal in the len-length vector pDst.
For more information on wavelet transforms see [Strang96] and [Bris94].

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pDst or pSrc pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than 4 for the function
ippsWinBlackmanOpt and less than 3 for all other functions of
the family.

ExampleThe example below illustrates the use of the function ippsWTHaarFwd_32f.

IppStatus wthaar(void){
Ipp32f x[8], lo[4], hi[4];IppStatus status;
ippsSet_32f(7, x, 8);--x[4];
status = ippsWTHaarFwd_32f(x, 8, lo, hi);printf_32f("WT Haar low =", lo, 4, status);printf_32f("WT Haar high =", hi, 4, status);
return status; }Output:WT Haar low = 7.000000 7.000000 6.500000 7.000000
WT Haar high = 0.000000 0.000000 0.500000 0.000000

Transforms for User Filter BanksThis section describes the functions that perform forward or inverse wavelet transforms for user filter banks.
WTFwdGetSize, WTInvGetSize
Compute the size of the wavelet transform state
structures.

SyntaxIppStatus ippsWTFwdGetSize(IppDataType srcType, int lenLow, int offsLow, int lenHigh,int offsHigh, int* pStateSize);
IppStatus ippsWTInvGetSize(IppDataType dstType, int lenLow, int offsLow, int lenHigh,int offsHigh, int* pStateSize);340

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
srcType, dstType

Data type of the transformed vector.

lenLow

Length of the low-pass filter.

offsLow

Input delay of the low-pass filter.

lenHighLength of the high-pass filter.

offsHigh

Input delay of the high-pass filter.

pStateSize

Pointer to the size of the ippsWTFwd or ippsWTInv state structure, in
bytes.

Description
The ippsWTFwd and ippsWTInv functions compute the size of the ippsWTFwd and ippsWTInv state
structures, in bytes, for the ippsWTFwdInit and ippsWTInvInit functions, respectively.
For an example on how to use these functions, refer to Wavelet Transforms Example.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when any of the specified pointers is NULL.

ippStsSizeErr
ippStsWtOffsetErr

Indicates an error when lenLow or lenHigh is less than, or
equal to zero.
Indicates an error when the filter delay offsLow or offsHigh isless than -1.

See Also
WTFwdInit, WTInvInt Initialize the wavelet transform state structures.
WTFwd Computes the forward wavelet transform.
WTInv Computes the inverse wavelet transform.
Wavelet Transforms Example
WTFwdInit, WTInvInit
Initialize the wavelet transform state structures.

SyntaxCase 1: Forward transform
IppStatus ippsWTFwdInit_32f(IppsWTFwdState_32f* pState, const Ipp32f* pTapsLow, int
lenLow, int offsLow, const Ipp32f* pTapsHigh, int lenHigh, int offsHigh);
IppStatus ippsWTFwdInit_8u32f(IppsWTFwdState_8u32f* pState, const Ipp32f* pTapsLow, int
lenLow, int offsLow, const Ipp32f* pTapsHigh, int lenHigh, int offsHigh);

341

1

Intel® Integrated Performance Primitives Developer Guide and Reference

IppStatus ippsWTFwdInit_16s32f(IppsWTFwdState_16s32f* pState, const Ipp32f* pTapsLow,
int lenLow, int offsLow, const Ipp32f* pTapsHigh, int lenHigh, int offsHigh);
IppStatus ippsWTFwdInit_16u32f(IppsWTFwdState_16u32f* pState, const Ipp32f* pTapsLow,
int lenLow, int offsLow, const Ipp32f* pTapsHigh, int lenHigh, int offsHigh);

Case 2: Inverse transform
IppStatus ippsWTInvInit_32f(IppsWTInvState_32f* pState, const Ipp32f* pTapsLow, int
lenLow, int offsLow, const Ipp32f* pTapsHigh, int lenHigh, int offsHigh);
IppStatus ippsWTInvInit_32f8u(IppsWTInvState_32f8u* pState, const Ipp32f* pTapsLow, int
lenLow, int offsLow, const Ipp32f* pTapsHigh, int lenHigh, int offsHigh);
IppStatus ippsWTInvInit_32f16s(IppsWTInvState_32f16s* pState, const Ipp32f* pTapsLow,
int lenLow, int offsLow, const Ipp32f* pTapsHigh, int lenHigh, int offsHigh);
IppStatus ippsWTInvInit_32f16u(IppsWTInvState_32f16u* pState, const Ipp32f* pTapsLow,
int lenLow, int offsLow, const Ipp32f* pTapsHigh, int lenHigh, int offsHigh);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters

pTapsLow

Pointer to the initialized forward or inverse wavelet transform
state structure.
Pointer to the vector of low-pass filter taps.

lenLow

Number of taps in the low-pass filter.

offsLow

Input delay (offset) of the low-pass filter.

pTapsHigh

Pointer to the vector of high-pass filter taps.

lenHigh

Number of taps in the high-pass filter.

offsHigh

Input delay (offset) of the high-pass filter.

pStateDescription
The ippsWTFwdInit and ippsWTInvInit functions initialize the forward and inverse wavelet transform state
structures, respectively, with the following parameters: the low-pass and high-pass filter taps pTapsLow andpTapsHigh, lengths lenLow and lenHigh, input additional delays offsLow and offsHigh.

Application Notes
These functions initialize the wavelet state structure and return thepState pointer to it. The initialization
procedures are implemented separately for forward and inverse transforms. To perform both forward andinverse wavelet transforms, create two separate state structures. In general, the meanings of initialization
parameters of forward and inverse transforms are similar. Each function has parameters describing of a pairof filters. The forward transform uses the taps pTapsHigh and pTapsLow, and the lengths lenHigh andlenLow of a pair of analysis filters. The inverse transform uses the taps pTapsHigh and pTapsLow, and thelengths lenHigh and lenLow of a pair of synthesis filters. You can also specify an additional delay offsLow
and offsHigh for each filter. With the adjustable values of delays you can synchronize:342

Developer Guide and Reference for Intel® Integrated Performance Primitives

1• Group of delays for high-pass and low-pass filters• Delays between data of different levels in multilevel decomposition and reconstruction algorithms
For more information about using these parameters, see descriptions of the ippsWTFwd and ippsWTInv
functions. The minimum allowed value of the additional delay for the forward transform is -1. For the inverse
transform the delay values must be greater than, or equal to 0. See descriptions of the ippsWTFwd andippsWTInv functions for an example showing how to choose additional delay values. The initialization
functions copy filter taps into the state structure pState. So all the memory referred to with the pointers canbe freed or modified after the functions finished operating. In case of the memory shortage, the function setsa zero pointer to the structure.
Boundaries extrapolation. Typically, reversible wavelet transforms of a bounded signal require data
extrapolation towards one or both sides. All internal delay lines are set to zero at the initialization stage. To
set a non-zero signal prehistory, call the function ippsWTFwdSetDlyLine. When processed an entire limited
data set, data extrapolation may be performed both towards the start and the end of the data vector. For
that, the source data and their initial extrapolation are used to form the delay line, the rest of the signal is
subdivided into the main block and the signal end. The signal end data and their extrapolation are used toform the last block.
For an example on how to use these functions, refer to Wavelet Transforms Example.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when any of the specified pointers is NULL.

ippStsSizeErr
ippStsWtOffsetErr

Indicates an error when lenLow or lenHigh is less than, or
equal to 0.
Indicates an error when the filter delay offsLow or offsHigh isless than -1.

See Also
WTFwd Computes the forward wavelet transform.
Wavelet Transforms Example
WTFwd
Computes the forward wavelet transform.

SyntaxIppStatus ippsWTFwd_32f(const Ipp32f* pSrc, Ipp32f* pDstLow, Ipp32f* pDstHigh, int
dstLen, IppsWTFwdState_32f* pState);
IppStatus ippsWTFwd_8u32f(const Ipp8u* pSrc, Ipp32f* pDstLow, Ipp32f* pDstHigh, int
dstLen, IppsWTFwdState_8u32f* pState);
IppStatus ippsWTFwd_16s32f(const Ipp16s* pSrc, Ipp32f* pDstLow, Ipp32f* pDstHigh, int
dstLen, IppsWTFwdState_16s32f* pState);
IppStatus ippsWTFwd_16u32f(const Ipp16u* pSrc, Ipp32f* pDstLow, Ipp32f* pDstHigh, int
dstLen, IppsWTFwdState_16u32f* pState);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.h

343

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Libraries: ippcore.lib, ippvm.lib

Parameters

dstLenPointer to the vector which holds the input signal fordecomposition.
Pointer to the vector which holds output coarse “low frequency”
components.
Pointer to the vector which holds output detail “high frequency”
components.
Number of elements in the vectors pDstHigh and pDstLow.

pStatePointer to the state structure.

pSrc
pDstLow
pDstHigh

Description
This function computes the forward wavelet transform. The function transforms the (2*dstLen)-length
source data block pSrc into “low frequency” components pDstLow and “high frequency” components
pDstHigh. The transform parameters are specified in the state structure pState.
Before using this function, you need to compute the size of the state structure and work buffer using theWTFwdGetSize_ WTInvGetSize function, and initialize the structure using WTFwdInit WTInvInit.
For an example on how to use this function, refer to Wavelet Transforms Example.

Application Notes
These functions perform the one-level forward discrete multi-scale transform. An equivalent transform
diagram is shown in the Figure below. The input signal is divided into the “low frequency” and “highfrequency” components. The transfer characteristics of filters are defined by the coefficients set at theinitialization stage. The functions are designed for the block processing of data; the transform state structure
pState contains all needed filter delay lines. Besides these main delay lines each function has an additional
delay line for each filter. Adjustable extra delay lines help synchronize group delay times of both highpass
and lowpass filters. Moreover, in multilevel systems of signal decomposition delays between different
decomposition levels may also be synchronized.
Input and output data block lengths. The functions are designed to decompose signal blocks of evenlength, therefore, these functions have one parameter only, that is the length of input components. The
length of the input block must be double the size of each component.
Filter group delays synchronization. Some applications may require synchronization of highpass andlowpass filter time responses. A typical example of this synchronization is synchronizing symmetrical filters ofdifferent length.
Below follows an example of bi orthogonal set of spline filters of respective length of 6 and 2:

static const float decLow[6] = {-6.25000000e-002f,
6.25000000e-002f,
5.00000000e-001f,
5.00000000e-001f,
6.25000000e-002f,-6.25000000e-002f };static const float decHigh[2] = {-5.00000000e-001f,

5.00000000e-001f };In this case the lowpass filter gives a delay two samples longer than the highpass filter, which is exactly what
the difference between additional initialization function delays should be. The following values must be
selected to ensure minimum common signal delay, offsLow=-1, offsHigh=-1 + 2 = 1. In this case thegroup times of filter delays are balanced by additional delays. The total delay time is equal to the lowpass
filter group delay which has the value of two samples in the decomposition stage in the original signal timeframe.

344

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

NOTE
Biorthogonal and orthogonal filter banks are distinguished by one specific peculiarity, that is,
forward transform additional delays must be uniformly even for faultless signal
reconstruction.
Multilevel decomposition algorithm. The implementation of multilevel decomposition algorithms may
require synchronization of signal delays across components of different levels.
This is illustrated in the example of the three-level decomposition shown in Figure "Three-Level Discrete
Wavelet Decomposition". Assume that for transformation the biorthogonal set of spline filters with respective
filter length of 6 and 2 is used. Since group delay definitely needs to be synchronized, for the last level selectadditional filter delays offsLow3 = -1, offsHigh3 = 1. Total delay at the last stage of decomposition for thisset of filters is two samples. This value corresponds to the time scale of the input of the last stage ofdecomposition. In order to ensure an equivalent delay of the “detail” part on the second level, the delay must
be increased by 2*2 samples. Respective values of additional delays for the second level is equal tooffsLow2 = -1, offsHigh2 = offsHigh3 + 4 = 5. A greater value of the “high frequency” component delayneeds to be selected for the first level of decomposition, offsLow1 = -1, offsHigh1 = offsHigh2 + 2*4 =13.
Total delay for three levels of decomposition is equal to 12 samples.
One Level Forward Transform

345

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsContextMatchErr

Indicates an error when the state identifier pState is incorrect.

ippStsSizeErr

Indicates an error when dstLen or srcLen is less than or equal
to 0.

See Also
WTFwdGetSize Compute the size of the wavelet transform state structures.
WTFwdInit Initialize the wavelet transform state structures.
WTInv Computes the inverse wavelet transform.
Wavelet Transforms Example
WTFwdSetDlyLine, WTFwdGetDlyLine
Sets and gets the delay lines of the forward wavelet
transform.

SyntaxIppStatus ippsWTFwdSetDlyLine_32f(IppsWTFwdState_32f* pState, const Ipp32f* pDlyLow,
const Ipp32f* pDlyHigh);
IppStatus ippsWTFwdSetDlyLine_8u32f(IppsWTFwdState_8u32f* pState, const Ipp32f*
pDlyLow, const Ipp32f* pDlyHigh);
IppStatus ippsWTFwdSetDlyLine_16s32f(IppsWTFwdState_16s32f* pState, const Ipp32f*
pDlyLow, const Ipp32f* pDlyHigh);
IppStatus ippsWTFwdSetDlyLine_16u32f(IppsWTFwdState_16u32f* pState, const Ipp32f*
pDlyLow, const Ipp32f* pDlyHigh);
IppStatus ippsWTFwdGetDlyLine_32f(IppsWTFwdState_32f* pState, Ipp32f* pDlyLow, Ipp32f*
pDlyHigh);
IppStatus ippsWTFwdGetDlyLine_8u32f(IppsWTFwdState_8u32f* pState, Ipp32f* pDlyLow,
Ipp32f* pDlyHigh);
IppStatus ippsWTFwdGetDlyLine_16s32f(IppsWTFwdState_16s32f* pState, Ipp32f* pDlyLow,
Ipp32f* pDlyHigh);
IppStatus ippsWTFwdGetDlyLine_16u32f(IppsWTFwdState_16u32f* pState, Ipp32f* pDlyLow,
Ipp32f* pDlyHigh);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

346

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Parameters
pStatepDlyLow
pDlyHigh

Pointer to the state structure.
Pointer to the vector which holds the delay lines for “lowfrequency” components.
Pointer to the vector which holds the delay lines for “highfrequency” components.

Description
These functions copy the delay line values from pDlyHigh and pDlyLow, and stores them into the state
structure pState.

ippsWTFwdSetDlyLine. This function sets the delay line values of the forward WT state.
ippsWTFwdGetDlyLine. This function gets the delay line values of the forward WT state.

Application Notes
These functions are designed to shape the signal prehistory, save and reconstruct delay lines. Delay lines are
implemented separately for highpass and lowpass filters, which gives the option of getting independent signal
prehistories for each filter.
Delay line data format. Despite that any delay line formats could be used inside transformations, thefunctions provide the simplest format of received and returned vectors. Data either transferred to or returned
from the delay lines have the same format as the initial signal fed into the forward transform functions, i.e.,delay line vectors must be made up of a succession of the signal prehistory counts in the same time frame as
the initial signal.
Delay line lengths. The length of the vectors that are transferred to or received by the delay line
installation or reading functions is uniquely defined by the filter length and the value of additional filter delay.
The following expression defines the length of the delay line vector of the “low frequency” component filter:

dlyLowLen = lenLow + offsLow - 1,
where lenLow and offsLow are respectively the length and additional delay of the “low frequency”
component filter.
The following expression defines the length of the delay line vector of the “high frequency” component filter:
dlyHighLen = lenHigh + offsHigh - 1,
where lenHigh and offsHigh are respectively the length and additional delay of the “high frequency”
component filter.
The lenLow, offsLow, lenHigh, and offsHigh parameters are specified by the function ippsWTFwdInit.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pDlyLow or pDlyHigh is NULL.

ippStsStateMatchErr

Indicates an error when the state identifier pState is incorrect.

WTInv
Computes the inverse wavelet transform.

SyntaxIppStatus ippsWTInv_32f(const Ipp32f* pSrcLow, const Ipp32f* pSrcHigh, int srcLen,
Ipp32f* pDst, IppsWTInvState_32f* pState);347

1Intel® Integrated Performance Primitives Developer Guide and Reference

IppStatus ippsWTInv_32f8u(const Ipp32f* pSrcLow, const Ipp32f* pSrcHigh, int srcLen,
Ipp8u* pDst, IppsWTInvState_32f8u* pState);
IppStatus ippsWTInv_32f16s(const Ipp32f* pSrcLow, const Ipp32f* pSrcHigh, int srcLen,
Ipp16s* pDst, IppsWTInvState_32f16s* pState);
IppStatus ippsWTInv_32f16u(const Ipp32f* pSrcLow, const Ipp32f* pSrcHigh, int srcLen,
Ipp16u* pDst, IppsWTInvState_32f16u* pState);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pSrcLow
pSrcHigh
srcLenpDst
pStatePointer to the vector which holds input coarse “low frequency”
components.
Pointer to the vector which holds detail “high frequency”
components.
Number of elements in the vectors pSrcHigh and pSrcLow.
Pointer to the vector which holds the output reconstructedsignal.
Pointer to the state structure.

Description
This function computes the inverse wavelet transform. The function transforms the “low frequency”
components pSrcLow and “high frequency” components pSrcHigh into the (2*srcLen)-length destination
data block pDst. The transform parameters are specified in the state structure pState.
Before using this function, you need to compute the size of the state structure and work buffer using theWTFwdGetSize_ WTInvGetSize function, and initialize the structure using WTFwdInit_ WTInvInit.
For an example on how to use this function, refer to Wavelet Transforms Example.

Application Notes
These functions are used for one level of inverse multiscale transformation which results in reconstructing theoriginal signal from the two “low frequency” and “high frequency” components. The Figure below shows anequivalent transform algorithm. Two interpolation filters are used for signal reconstruction; their coefficientsare set at the initialization stage. The inverse transform implementation, similar to forward transform
implementation, contains additional delay lines needed to synchronize the group time of filter delays anddelays across different levels of data reconstruction.
Input and output data block lengths. These functions are designed to reconstruct the blocks of the evenlength signal. The signal component length must be the input data. The length of the output block of thereconstructed signal must be double the length of each of the components.
Filter group delay synchronization. In this example consider a biorthogonal set of spline filters of length 2
and 6:

static const float recLow[2] ={1.00000000e+000f,

348

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

1.00000000e+000f};
static const float recHigh[6] ={-1.25000000e-001f,-1.25000000e-001f,
1.00000000e+000f,-1.00000000e+000f,
1.25000000e-001f,
1.25000000e-001f};
This set of filters corresponds to the set of filters considered in a similar section of the description of theforward transform function ippsWTFwd.
Unlike the case described above, this time the high-pass filter generates a delay greater by two samples
compared against the low frequency filter. The two sample difference should also exist between initialization
function additional delays. The following parameters of additional delays need to be selected in order toensure the minimum total delay, offsLow = 2, offsHigh = 0. In this case the total delay is equal to thehigh-pass filter group delay, which at the decomposition stage is equal to two samples in the original signal
time frame.
Total delay of one level of decomposition and reconstruction is equal to 4 samples, considering thedecomposition stage delay.

NOTE
Biorthogonal and orthogonal filter banks are distinguished by one specific peculiarity, that is,inverse transform additional delays must be uniformly even and opposite to the evenness ofthe decomposition delays for faultless signal reconstruction.
Multilevel reconstruction algorithms. An example of a three-level signal reconstruction algorithm isshown in Figure "Three-Level Discrete Wavelet Reconstruction". The scheme corresponds to thedecomposition scheme described in the section of the description of the forward transform function
ippsWTFwd. Therefore, for the inverse transform the biorthogonal set of spline filters with respective filter
length of 6 and 2 is used. The lowest level filter delays are set to offsLow3 = 2, offsHigh3 = 0. The total
delay at this stage of reconstruction is equal to two samples. In order to ensure an equivalent delay of the“detail” part in the middle level, the delay must be increased. Respective values of additional delays for thesecond level are equal to offsLow2 = 2, offsHigh2 = offsHigh3 + 2*2 = 4. A greater value of highfrequency component delay needs to be selected for the last level of reconstruction, offsLow1 = -1,
offsHigh1 = offsHigh2 + 2*4 = 12.

349

1

Intel® Integrated Performance Primitives Developer Guide and Reference

The total delay for three levels of reconstruction is equal to 12 samples. The total delay of the three-level
decomposition and reconstruction cycle is equal to 24 samples.
One Level Inverse Wavelet Transform

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsStateMatchErr

Indicates an error when the state identifier pState is incorrect.

ippStsSizeErr

Indicates an error when dstLen or srcLen is less than, or equal
to 0.

See Also
WTFwdGetSize, WTInvGetSize Compute the size of the wavelet transform state structures.
WTFwdInit, WTInvInit Initialize the wavelet transform state structures.
WTFwd Computes the forward wavelet transform.
Wavelet Transforms Example
WTInvSetDlyLine, WTInvGetDlyLine

350

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Sets and gets the delay lines of the inverse wavelet
transform.

SyntaxIppStatus ippsWTInvSetDlyLine_32f(IppsWTInvState_32f* pState, const Ipp32f* pDlyLow,
const Ipp32f* pDlyHigh);
IppStatus ippsWTInvSetDlyLine_32f8u(IppsWTInvState_32f8u* pState, const Ipp32f*
pDlyLow, const Ipp32f* pDlyHigh);
IppStatus ippsWTInvSetDlyLine_32f16s(IppsWTInvState_32f16s* pState, const Ipp32f*
pDlyLow, const Ipp32f* pDlyHigh);
IppStatus ippsWTInvSetDlyLine_32f16u(IppsWTInvState_32f16u* pState, const Ipp32f*
pDlyLow, const Ipp32f* pDlyHigh);
IppStatus ippsWTInvGetDlyLine_32f(IppsWTInvState_32f* pState, Ipp32f* pDlyLow, Ipp32f*
pDlyHigh);
IppStatus ippsWTInvGetDlyLine_32f8u(IppsWTInvState_32f8u* pState, Ipp32f* pDlyLow,
Ipp32f* pDlyHigh);
IppStatus ippsWTInvGetDlyLine_32f16s(IppsWTInvState_32f16s* pState, Ipp32f* pDlyLow,
Ipp32f* pDlyHigh);
IppStatus ippsWTInvGetDlyLine_32f16u(IppsWTInvState_32f16u* pState, Ipp32f* pDlyLow,
Ipp32f* pDlyHigh);

Include Files
ipps.hDomain Dependencies
Headers: ippcore.h, ippvm.hLibraries: ippcore.lib, ippvm.lib

Parameters
pStatepDlyLow
pDlyHigh

Pointer to the state structure.
Pointer to the vector which holds delay lines for “lowfrequency” components.
Pointer to the vector which holds delay lines for “highfrequency” components.

Description
These functions copy the delay line values from pDlyHigh and pDlyLow, and store them into the state
structure pState.

ippsWTInvSetDlyLine. This function sets the delay line values of the inverse WT state.
ippsWTInvGetDlyLine. This function gets the delay line values of the inverse WT state.

Application Notes
These functions set and read delay lines of inverse multiscale transformation. The functions receive or return
filter low and high frequency component delay line vectors. The functions may be used to shape previous
history of each of the components. Installation functions and read functions together ensure that delay lines
from each filter are saved and reconstructed.

351

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Delay line data format. Despite that any delay line formats could be used inside transformations, thefunctions provide the simplest format of received and returned vectors. Data either transferred to or returned
from the delay lines have the same format as the low and high frequency components at the input of theinverse transform functions. Thus, delay line vectors must be made up of a succession of signal prehistory
counts in the same time frame as the input components.
Delay line lengths. The length of the vectors that are transferred to or received by the delay line
installation or reading functions is uniquely defined by the filter length and the value of additional filter delay.
The following expression defines the length of the delay line vector of the “low frequency” component filter interms of the C language (integer division by two is used here for simplicity):

dlyLowLen = (lenLow + offsLow - 1) / 2,
where lenLow and offsLow are respectively the length and additional delay of the “low frequency”
component filter.
The following expression defines the length of the delay line vector of the “high frequency” component filterin terms of the C language:

dlyHighLen = (lenHigh + offsHigh - 1) / 2,
where lenHigh and offsHigh are respectively the length and additional delay of the “high frequency”
component filter.
The lenLow, offsLow, lenHigh, and offsHigh parameters are specified by the function ippsWTInvInit.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pDlyLow or pDlyHigh is NULL.

ippStsStateMatchErr

Indicates an error when the state identifier pState is incorrect.

Wavelet Transforms Example
The delay line paradigm is well-known interface solution for functions that require some pre-history in thestreaming processing. In such application the use of the Intel IPP wavelet transform functions is similar to
the use of the FIR, IIR, or multi-rate filters. (See also the discussion on the synchronization of low-pass andhigh-pass filter delays in this chapter.) But very often the wavelet transforms are used to process entire nonstreaming data by extending with borders that are suitable for filter bank type that are used in transforms.
The following code example demonstrates how to implement this approach using the Intel IPP functions. It
performs forward and inverse wavelet transforms of a short vector containing 12 elements. It uses
Daubechies filter bank of the order 2 (that allows the perfect reconstruction) and periodical data extension bywrapping.
It is also may be useful as an illustration of how to fill delay line, if you need non-zero pre-history of signal instreaming applications.

Example//Filter bank for Daubechies, order 2static const int fwdFltLenL = 4;
static const int fwdFltLenH = 4;
static const Ipp32f pFwdFltL[4] ={-1.294095225509215e-001f,
2.241438680418574e-001f,
4.829629131446903e-001f };static const Ipp32f pFwdFltH[4] ={-4.829629131446903e-001f,
8.365163037374690e-001f,-1.294095225509215e-001f };static const int invFltLenL = 4;
static const int invFltLenH = 4;352

8.365163037374690e-001f,-2.241438680418574e-001f,

Developer Guide and Reference for Intel® Integrated Performance Primitives

static const Ipp32f pInvFltL[4] ={4.829629131446903e-001f,
8.365163037374690e-001f,-1.294095225509215e-001f };static const Ipp32f pInvFltH[4] ={-1.294095225509215e-001f,-2.241438680418574e-001f,-4.829629131446903e-001f };// minimal values
static const int fwdFltOffsL = -1;
static const int fwdFltOffsH = -1;// minimal values, that corresponds to perfect reconstruction
static const int invFltOffsL = 0;
static const int invFltOffsH = 0;12.241438680418574e-001f,
8.365163037374690e-001f,

void func_wavelet(){
IppStatus status=ippStsNoErr;
Ipp32f pSrc[] = {1, -10, 324, 48, -483, 4, 7, -5532, 34, 8889, -57, 54};
Ipp32f pDst[12];Ipp32f pLow[6];Ipp32f pHigh[6];IppsWTFwdState_32f* pFwdState;
IppsWTInvState_32f* pInvState;
int i, szState;
printf("original:\n");for(i = 0; i < 12; i++)printf("%.0f; ", pSrc[i]);printf("\n");// Forward transform
ippsWTFwdGetSize( ipp32f, fwdFltLenL, fwdFltOffsL, fwdFltLenH, fwdFltOffsH, &szState );pFwdState = (IppsWTFwdState_32f*)ippMalloc( szState );ippsWTFwdInit_32f( pFwdState, pFwdFltL, fwdFltLenL, fwdFltOffsL, pFwdFltH, fwdFltLenH,
fwdFltOffsH);// We substitute wrapping extension in "the beginning of stream"// Here should be the same pointers for this offsets,// but in the general case it may be different
ippsWTFwdSetDlyLine_32f( pFwdState, &pSrc[10], &pSrc[10] );ippsWTFwd_32f( pSrc, pLow, pHigh, 6, pFwdState );printf("approx:\n");for(i = 0; i < 6; i++)printf("%.4f; ", pLow[i]);printf("\n");printf("details:\n");for(i = 0; i < 6; i++)printf("%.4f; ", pHigh[i]);printf("\n");// Inverse transform
ippsWTInvGetSize( ipp32f, invFltLenL, invFltOffsL, invFltLenH, invFltOffsH, &szState );pInvState = (IppsWTInvState_32f*)ippMalloc( szState );ippsWTInvInit_32f( pInvState, pInvFltL, invFltLenL, invFltOffsL, pInvFltH, invFltLenH,
invFltOffsH );// For this particular case (non-shifted reconstruction)// here is first data itself,// that we need to place to delay line// [(invFltLenL + invFltOffsL - 1) / 2] elements for l. filtering

353

1

Intel® Integrated Performance Primitives Developer Guide and Reference// [(invFltLenH + invFltOffsH - 1) / 2] elements for h. filtering
ippsWTInvSetDlyLine_32f( pInvState, pLow, pHigh);
ippsWTInv_32f( &pLow[1], &pHigh[1], 5, pDst, pInvState );// Here are the substitution of the wrapping extension// at the "end of stream" and calculation of last samples of reconstruction// We do not use additional buffer and do not copy any data externally,// just substitute beginning of input data itself to simulate wrapping
ippsWTInv_32f( pLow, pHigh, 1, &pDst[10], pInvState );printf("reconstruction:\n");for(i = 0; i < 12; i++)printf("%.0f; ", pDst[i]);printf("\n");ippFree(pFwdState);
ippFree(pInvState);}
After compiling and running it gives the following console output:

original:
1; -10; 324; 48; -483; 4; 7; -5532; 34; 8889; -57; 54;
approx:19.1612; 58.5288; 87.8536; 487.5375; -5766.9277; 7432.4497;
details:
0.9387; 249.9611; -458.6568; 2739.2146; -3025.5576; -2070.5762;
reconstruction:
1; -10; 324; 48; -483; 4; 7; -5532; 34; 8889; -57; 54;
The program prints on console the original data, approximation, and details components after forward
transform and perfect reconstruction of original data after inverse transform.

Fixed-Accuracy Arithmetic Functions
This chapter describes Intel® IPP fixed-accuracy transcendental mathematical real and complex functions ofvector arguments. These functions take an input vector as argument, compute values of the respective
elementary function element-wise, and return the results in an output vector.
Function specifications comply with the common API agreement of Intel IPP, but include some new features
essential to scientific arithmetic functions. The main feature is a more elaborate specification of accuracy thatdiffers from the common definition in adding several new levels of accuracy, besides original levels introducedby single precision and double precision data formats.
Fixed-accuracy vector functions implementation supports the IEEE-754 standard in all flavors, which means
that:
•
•

All functions have a precisely determined and guaranteed level of accuracy for all argument values.
All special value processing and exceptions handling requirements are met, which implies that whenaccuracy is below the standard level, the function meets the IEEE-754 requirements in all other respects.

The choice of accuracy levels should be based on practical experience and identified application demands.
Available options are specified in the function name suffix and include A11, A21, or A24 for the single
precision, and A26, A50, or A53 for the double precision data format. Flavors A11, A21, A26, and A50 provide
approximately 3, 6, 8, and 15 exact decimal digits, respectively. For flavors A24 and A53, the maximum
guaranteed error is within 1 ulp and in most cases does not exceed 0.55 ulp.
Fixed-accuracy arithmetic functions subset of Intel IPP has the similar functionality as the respective part of
the Intel® Math Kernel Library (Intel® MKL).
However, Intel IPP provides lower-level transcendental functions that have separate flavors for each mode ofoperations and data type and are better suitable for multimedia and signal processing in real time
applications.

354

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

NOTE
Do not confuse fixed-accuracy arithmetic functions described here with common arithmetic functions
that have similar functionality but follow different accuracy specifications.
Intel IPP fixed-accuracy arithmetic functions may return status codes of the specific warnings listed in thetable below. In this case, the value returned is positive and the computation is continued.
Warning Status Codes for Fixed-Accuracy Arithmetic Functions
IppStsOverflow
IppStsUnderflow
IppStsSingularity
IppStsDomain

Value

Message

12
17
18
19

Overflow occurred in the operation.
Underflow occurred in the operation.
Singularity occurred in the operation.
Argument is out of the function
domain.

See appendix A "Handling of Special Cases" for more information on function operation in cases when theirarguments take on specific values that are outside the range of function definition.
NOTE
All functions described in this chapter support in-place operation.

Arithmetic Functions
Add
Performs element by element addition of two vectors.

SyntaxIppStatus ippsAdd_32f_A24 (const Ipp32f* pSrc1, const Ipp32f* pSrc2, Ipp32f* pDst,
Ipp32s len);
IppStatus ippsAdd_64f_A53 (const Ipp64f* pSrc1, const Ipp64f* pSrc2, Ipp64f* pDst,
Ipp32s len);
IppStatus ippsAdd_32fc_A24 (const Ipp32fc* pSrc1, const Ipp32fc* pSrc2, Ipp32fc* pDst,
Ipp32s len);
IppStatus ippsAdd_64fc_A53 (const Ipp64fc* pSrc1, const Ipp64fc* pSrc2, Ipp64fc* pDst,
Ipp32s len);

Include Files
ippvm.h

Domain Dependencies
Headers: ippcore.hLibraries: ippcore.lib

Parameters
pSrc1

Pointer to the first source vector.

pSrc2

Pointer to the second source vector.

pDst

Pointer to the destination vector.

355

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Number of elements in the vectors.

len

Description
This function performs element by element addition of the vectors pSrc1 and pSrc2, and stores the result in
the corresponding element of the vector pDst.
For single precision data:
function flavors ippsAdd_32f_A24 and ippsAdd_32fc_A24 guarantee 24 correctly rounded bits ofsignificand, including the implied bit, with the maximum guaranteed error within 1 ulp.
For double precision data:
function flavors ippsAdd_64f_A53 and ippsAdd_64fc_A53 guarantee 53 correctly rounded bits ofsignificand, including the implied bit, with the maximum guaranteed error within 1 ulp.
The computation is performed as follows:

pDst[n] = (pSrc1[n]) + (pSrc2[n]), 0 ≤ n < len.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrc1, pSrc2 or pDst pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

ExampleThe example below shows how to use the function ippsAdd.

IppStatus ippsAdd_32f_A24_sample(void) {const Ipp32f x1[4] = {+4.885, -0.543, -3.809, -4.953};
const Ipp32f x2[4] = {-0.543, -3.809, -4.953, +4.885};
Ipp32f y[4];IppStatus st = ippsAdd_32f_A24( x1, x2, y, 4 );printf(" ippsAdd_32f_A24:\n");printf(" x1 = %+.3f %+.3f %+.3f %+.3f \n", x1[0], x1[1], x1[2], x1[3]);printf(" x2 = %+.3f %+.3f %+.3f %+.3f \n", x2[0], x2[1], x2[2], x2[3]);printf(" y = %+.3f %+.3f %+.3f %+.3f \n", y[0], y[1], y[2], y[3]);return st;}
Output:ippsAdd_32f_A24:
x1 = +4.885 -0.543 -3.809 -4.953
x2 = -0.543 -3.809 -4.953 +4.885
y = +4.342 -4.352 -8.762 -0.068

Sub
Performs element by element subtraction of one
vector from another.

SyntaxIppStatus ippsSub_32f_A24 (const Ipp32f* pSrc1, const Ipp32f* pSrc2, Ipp32f* pDst,
Ipp32s len);356

1Developer Guide and Reference for Intel® Integrated Performance Primitives

IppStatus ippsSub_64f_A53 (const Ipp64f* pSrc1, const Ipp64f* pSrc2, Ipp64f* pDst,
Ipp32s len);
IppStatus ippsSub_32fc_A24 (const Ipp32fc* pSrc1, const Ipp32fc* pSrc2, Ipp32fc* pDst,
Ipp32s len);
IppStatus ippsSub_64fc_A53 (const Ipp64fc* pSrc1, const Ipp64fc* pSrc2, Ipp64fc* pDst,
Ipp32s len);

Include Files
ippvm.h

Domain Dependencies
Headers: ippcore.hLibraries: ippcore.lib

Parameters
pSrc1

Pointer to the first source vector.

pSrc2

Pointer to the second source vector.

pDst

Pointer to the destination vector.

len

Number of elements in the vectors.

Description
This function performs element by element subtraction of the vector pSrc2 from the vector pSrc1, andstores the result in the corresponding element of the vector pDst.
For single precision data:
function flavors ippsSub_32f_A24 and ippsSub_32fc_A24 guarantee 24 correctly rounded bits ofsignificand, including the implied bit, with the maximum guaranteed error within 1 ulp.
For double precision data:
function flavors ippsSub_64f_A53 and ippsSub_64fc_A53 guarantee 53 correctly rounded bits ofsignificand, including the implied bit, with the maximum guaranteed error within 1 ulp.
The computation is performed as follows:

pDst[n] = (pSrc1[n]) - (pSrc2[n]), 0 ≤ n < len.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrc1, pSrc2 or pDst pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

ExampleThe example below shows how to use the function ippsSub.

IppStatus ippsSub_32f_A24_sample(void) {const Ipp32f x1[4] = {+4.885, -0.543, -3.809, -4.953};
const Ipp32f x2[4] = {-0.543, -3.809, -4.953, +4.885};

357

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Ipp32f y[4];IppStatus st = ippsSub_32f_A24( x1, x2, y, 4 );printf(" ippsSub_32f_A24:\n");printf(" x1 = %+.3f %+.3f %+.3f %+.3f \n", x1[0], x1[1], x1[2], x1[3]);printf(" x2 = %+.3f %+.3f %+.3f %+.3f \n", x2[0], x2[1], x2[2], x2[3]);printf(" y = %+.3f %+.3f %+.3f %+.3f \n", y[0], y[1], y[2], y[3]);return st;}
Output:ippsSub_32f_A24:
x1 = +4.885 -0.543 -3.809 -4.953
x2 = -0.543 -3.809 -4.953 +4.885
y = +5.428 +3.266 +1.144 -9.838

Sqr
Performs element by element squaring of the vector.

SyntaxIppStatus ippsSqr_32f_A24 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsSqr_64f_A53 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);

Include Files
ippvm.h

Domain Dependencies
Headers: ippcore.hLibraries: ippcore.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

len

Number of elements in the vectors.

Description
This function performs element by element squaring of the vector pSrc, and stores the result in thecorresponding element of pDst.
For single precision data:
function flavor ippsSqr_32f_A24 guarantees 24 correctly rounded bits of significand, including the implied
bit, with the maximum guaranteed error within 1 ulp.
For double precision data:
function flavor ippsSqr_64f_A53 guarantees 53 correctly rounded bits of significand, including the implied
bit, with the maximum guaranteed error within 1 ulp.
The computation is performed as follows:

pDst[n] = (pSrc[n])2, 0 ≤ n < len.

358

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrc or pDst pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

ExampleThe example below shows how to use the function ippsSqr.

IppStatus ippsSqr_32f_A24_sample(void) {const Ipp32f x[4] = {+4.885, -0.543, -3.809, -4.953};
Ipp32f y[4];IppStatus st = ippsSqr_32f_A24( x, y, 4 );printf(" ippsSqr_32f_A24:\n");printf(" x = %+.3f %+.3f %+.3f %+.3f \n", x[0], x[1], x[2], x[3]);printf(" y = %+.3f %+.3f %+.3f %+.3f \n", y[0], y[1], y[2], y[3]);return st;}
Output:ippsSqr_32f_A24:
x = +4.885 -0.543 -3.809 -4.953
y = +23.863 +0.295 +14.508 +24.532

Mul
Performs element by element multiplication of two
vectors.

SyntaxIppStatus ippsMul_32f_A24 (const Ipp32f* pSrc1, const Ipp32f* pSrc2, Ipp32f* pDst,
Ipp32s len);
IppStatus ippsMul_64f_A53 (const Ipp64f* pSrc1, const Ipp64f* pSrc2, Ipp64f* pDst,
Ipp32s len);
IppStatus ippsMul_32fc_A11 (const Ipp32fc* pSrc1, const Ipp32fc* pSrc2, Ipp32fc* pDst,
Ipp32s len);
IppStatus ippsMul_32fc_A21 (const Ipp32fc* pSrc1, const Ipp32fc* pSrc2, Ipp32fc* pDst,
Ipp32s len);
IppStatus ippsMul_32fc_A24 (const Ipp32fc* pSrc1, const Ipp32fc* pSrc2, Ipp32fc* pDst,
Ipp32s len);
IppStatus ippsMul_64fc_A26 (const Ipp64fc* pSrc1, const Ipp64fc* pSrc2, Ipp64fc* pDst,
Ipp32s len);
IppStatus ippsMul_64fc_A50 (const Ipp64fc* pSrc1, const Ipp64fc* pSrc2, Ipp64fc* pDst,
Ipp32s len);
IppStatus ippsMul_64fc_A53 (const Ipp64fc* pSrc1, const Ipp64fc* pSrc2, Ipp64fc* pDst,
Ipp32s len);

359

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Include Files
ippvm.h

Domain Dependencies
Headers: ippcore.hLibraries: ippcore.lib

Parameters
pSrc1

Pointer to the first source vector.

pSrc2

Pointer to the second source vector.

pDst

Pointer to the destination vector.

len

Number of elements in the vectors.

Description
This function performs element by element multiplication of the vectors pSrc1 and pSrc2, and stores theresult in the corresponding element of the vector pDst.
For single precision data:
function flavor ippsMul_32fc_A11 guarantees 11 correctly rounded bits of significand, or at least 3 exact
decimal digits;
function flavor ippsMul_32fc_A21 guarantees 21 correctly rounded bits of significand, or 4 ulps, or about 6
exact decimal digits;
function flavors ippsMul_32f_A24 and ippsMul_32fc_A24 guarantee 24 correctly rounded bits ofsignificand, including the implied bit, with the maximum guaranteed error within 1 ulp.
For double precision data:
function flavor ippsMul_64fc_A26 guarantees 26 correctly rounded bits of significand, or 6.7E+7 ulps, orapproximately 8 exact decimal digits;
function flavor ippsMul_64fc_A50 guarantees 50 correctly rounded bits of significand, or 4 ulps, orapproximately 15 exact decimal digits;
function flavors ippsMul_64f_A53 and ippsMul_64fc_A53 guarantee 53 correctly rounded bits ofsignificand, including the implied bit, with the maximum guaranteed error within 1 ulp.
The computation is performed as follows:

pDst[n] = (pSrc1[n]) x (pSrc2[n]), 0 ≤ n < len.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrc1, pSrc2 or pDst pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

360

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

ExampleThe example below shows how to use the function ippsMul.

IppStatus ippsMul_32f_A24_sample(void) {const Ipp32f x1[4] = {+4.885, -0.543, -3.809, -4.953};
const Ipp32f x2[4] = {-0.543, -3.809, -4.953, +4.885};
Ipp32f y[4];IppStatus st = ippsMul_32f_A24( x1, x2, y, 4 );printf(" ippsMul_32f_A24:\n");printf(" x1 = %+.3f %+.3f %+.3f %+.3f \n", x1[0], x1[1], x1[2], x1[3]);printf(" x2 = %+.3f %+.3f %+.3f %+.3f \n", x2[0], x2[1], x2[2], x2[3]);printf(" y = %+.3f %+.3f %+.3f %+.3f \n", y[0], y[1], y[2], y[3]);return st;}
Output:ippsMul_32f_A24:
x1 = +4.885 -0.543 -3.809 -4.953
x2 = -0.543 -3.809 -4.953 +4.885
y = -2.653 +2.068 +18.866 -24.195

MulByConj
Performs element by element multiplication of avector a element and a conjugated vector b element.

SyntaxIppStatus ippsMulByConj_32fc_A11 (const Ipp32fc* pSrc1, const Ipp32fc* pSrc2, Ipp32fc*
pDst, Ipp32s len);
IppStatus ippsMulByConj_32fc_A21 (const Ipp32fc* pSrc1, const Ipp32fc* pSrc2, Ipp32fc*
pDst, Ipp32s len);
IppStatus ippsMulByConj_32fc_A24 (const Ipp32fc* pSrc1, const Ipp32fc* pSrc2, Ipp32fc*
pDst, Ipp32s len);
IppStatus ippsMulByConj_64fc_A26 (const Ipp64fc* pSrc1, const Ipp64fc* pSrc2, Ipp64fc*
pDst, Ipp32s len);
IppStatus ippsMulByConj_64fc_A50 (const Ipp64fc* pSrc1, const Ipp64fc* pSrc2, Ipp64fc*
pDst, Ipp32s len);
IppStatus ippsMulByConj_64fc_A53 (const Ipp64fc* pSrc1, const Ipp64fc* pSrc2, Ipp64fc*
pDst, Ipp32s len);

Include Files
ippvm.h

Domain Dependencies
Headers: ippcore.hLibraries: ippcore.lib

361

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Parameters
pSrc1

Pointer to the first source vector.

pSrc2

Pointer to the second source vector.

pDst

Pointer to the destination vector.

len

Number of elements in the vectors.

Description
This function performs element by element multiplication of the vector pSrc1 and the conjugated vector
pSrc2, and stores the result in the corresponding element of the vector pDst.
For single precision data:
function flavor ippsMulByConj_32fc_A11 guarantees 11 correctly rounded bits of significand, or at least 3
exact decimal digits;
function flavor ippsMulByConj_32fc_A21 guarantees 21 correctly rounded bits of significand, or 4 ulps, orabout 6 exact decimal digits;
function flavor ippsMulByConj_32fc_A24 guarantees 24 correctly rounded bits of significand, including theimplied bit, with the maximum guaranteed error within 1 ulp.
For double precision data:
function flavor ippsMulByConj_64fc_A26 guarantees 26 correctly rounded bits of significand, or 6.7E+7
ulps, or approximately 8 exact decimal digits;
function flavor ippsMulByConj_64fc_A50 guarantees 50 correctly rounded bits of significand, or 4 ulps, orapproximately 15 exact decimal digits;
function flavor ippsMulByConj_64fc_A53 guarantees 53 correctly rounded bits of significand, including theimplied bit, with the maximum guaranteed error within 1 ulp.
The computation is performed as follows:

pDst[n] = pSrc1[n] x CONJ(pSrc2[n]), 0 ≤ n < len.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrc1, pSrc2 or pDst pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

ExampleThe example below shows how to use the function ippsMulByConj.

IppStatus ippsMulByConj_32fc_A24_sample(void) {const Ipp32fc x1[4] = {{+2.885,-1.809}, {-0.543,-2.809}};
const Ipp32fc x2[4] = {{-0.543,-2.809}, {-1.809,-2.809}};
Ipp32fc y[2];IppStatus st = ippsMulByConj_32fc_A24( x1, x2, y, 2 );printf(" ippsMulByConj_32fc_A24:\n");printf(" x1 = %+.3f%+.3f*i%+.3f%+.3f*i \n", x1[0].re, x1[0].im, x1[1].re, x1[1].im);
printf(" x2 = %+.3f%+.3f*i%+.3f%+.3f*i \n", x2[0].re, x2[0].im, x2[1].re, x2[1].im);362

Developer Guide and Reference for Intel® Integrated Performance Primitives

printf(" yreturn st;= %+.3f%+.3f*i%+.3f%+.3f*i \n",y[0].re,y[0].im,y[1].re,1y[1].im);}
Output:ippsMulByConj_32fc_A24:
x1 = +2.885-1.809*i-0.543-2.809*ix2 = -0.543-2.809*i-1.809-2.809*i
y = +3.515+9.086*i+8.873+3.556*i

Conj
Performs element by element conjugation of thevector.

SyntaxIppStatus ippsConj_32fc_A24 (const Ipp32fc* pSrc, Ipp32fc* pDst, Ipp32s len);
IppStatus ippsConj_64fc_A53 (const Ipp64fc* pSrc, Ipp64fc* pDst, Ipp32s len);

Include Files
ippvm.h

Domain Dependencies
Headers: ippcore.hLibraries: ippcore.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

len

Number of elements in the vectors.

Description
This function performs element by element conjugation of the vector pSrc and stores the result in thecorresponding element of the vector pDst.
For single precision data:
function flavor ippsConj_32fc_A24 guarantees 24 correctly rounded bits of significand, including theimplied bit, with the maximum guaranteed error within 1 ulp.
For double precision data:
function flavor ippsConj_64fc_A53 guarantees 53 correctly rounded bits of significand, including theimplied bit, with the maximum guaranteed error within 1 ulp.
The computation is performed as follows:

pDst[n] = CONJ(pSrc[n]), 0 ≤ n < len.

Return Values
ippStsNoErr

Indicates no error.

363

1

Intel® Integrated Performance Primitives Developer Guide and ReferenceippStsNullPtrErr

Indicates an error when pSrc1, pSrc2 or pDst pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

ExampleThe example below shows how to use the function ippsConj.

IppStatus ippsConj_32fc_A24_sample(void) {const Ipp32fc x[2] = {{+2.885,-1.809}, {-0.543,-2.809}};
Ipp32fc y[2];IppStatus st = ippsConj_32fc_A24( x, y, 2 );printf(" ippsConj_32fc_A24:\n");printf(" x = %+.3f%+.3f*i%+.3f%+.3f*i \n", x[0].re, x[0].im, x[1].re, x[1].im);
printf(" y = %+.3f%+.3f*i%+.3f%+.3f*i \n", y[0].re, y[0].im, y[1].re, y[1].im);
return st;}
Output:ippsConj_32fc_A24:
x = +2.885-1.809*i
y = +2.885+1.809*i-0.543-2.809*i-0.543+2.809*i

Abs
Computes the absolute value of vector elements.

SyntaxIppStatus ippsAbs_32f_A24 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsAbs_64f_A53 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsAbs_32fc_A11 (const Ipp32fc* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsAbs_32fc_A21 (const Ipp32fc* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsAbs_32fc_A24 (const Ipp32fc* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsAbs_64fc_A26 (const Ipp64fc* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsAbs_64fc_A50 (const Ipp64fc* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsAbs_64fc_A53 (const Ipp64fc* pSrc, Ipp64f* pDst, Ipp32s len);

Include Files
ippvm.h

Domain Dependencies
Headers: ippcore.hLibraries: ippcore.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

364

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Number of elements in the vectors.

len

Description
This function computes the absolute value of the vector pSrc elements and stores the result in thecorresponding element of the vector pDst.
For single precision data:
function flavor ippsAbs_32fc_A11 guarantees 11 correctly rounded bits of significand, or at least 3 exact
decimal digits;
function flavor ippsAbs_32fc_A21 guarantees 21 correctly rounded bits of significand, or 4 ulps, or about 6
exact decimal digits;
function flavors ippsAbs_32f_A24 and ippsAbs_32fc_A24 guarantee 24 correctly rounded bits ofsignificand, including the implied bit, with the maximum guaranteed error within 1 ulp.
For double precision data:
function flavor ippsAbs_64fc_A26 guarantees 26 correctly rounded bits of significand, or 6.7E+7 ulps, orapproximately 8 exact decimal digits;
function flavor ippsAbs_64fc_A50 guarantees 50 correctly rounded bits of significand, or 4 ulps, orapproximately 15 exact decimal digits;
function flavors ippsAbs_64f_A53 and ippsAbs_64fc_A53 guarantee 53 correctly rounded bits ofsignificand, including the implied bit, with the maximum guaranteed error within 1 ulp.
The computation is performed as follows:

pDst[n] = |pSrc1[n]|, 0 ≤ n < len.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrc1, pSrc2 or pDst pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

ExampleThe example below shows how to use the function ippsAbs.

IppStatus ippsAbs_32fc_A24_sample(void) {const Ipp32fc x[2] = {{+2.885,-1.809}, {-0.543,-2.809}};
Ipp32fc y[2];IppStatus st = ippsAbs_32fc_A24( x, y, 2 );printf(" ippsAbs_32fc_A24:\n");printf(" x = %+.3f%+.3f*i%+.3f%+.3f*i \n", x[0].re, x[0].im, x[1].re, x[1].im);
printf(" y = %+.3f%+.3f%\n", y[0],y[1]);
return st;}
Output:ippsAbs_32fc_A24:
x = +2.885-1.809*i
y = +3.405-0.543-2.809*i+2.861365

1Intel® Integrated Performance Primitives Developer Guide and Reference

Arg
Computes the argument of vector elements.

SyntaxIppStatus ippsArg_32fc_A11(const Ipp32fc* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsArg_32fc_A21(const Ipp32fc* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsArg_32fc_A24(const Ipp32fc* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsArg_64fc_A26(const Ipp64fc* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsArg_64fc_A50(const Ipp64fc* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsArg_64fc_A53(const Ipp64fc* pSrc, Ipp64f* pDst, Ipp32s len);

Include Files
ippvm.h

Domain Dependencies
Headers: ippcore.hLibraries: ippcore.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

len

Number of elements in the vectors.

Description
This function computes the argument of the vector pSrc elements and stores the result in the corresponding
element of the vector pDst.
For single precision data:
function flavor ippsArg_32fc_A11 guarantees 11 correctly rounded bits of significand, or at least 3 exact
decimal digits;
function flavor ippsArg_32fc_A21 guarantees 21 correctly rounded bits of significand, or 4 ulps, or about 6
exact decimal digits;
function flavor ippsArg_32fc_A24 guarantees 24 correctly rounded bits of significand, including the implied
bit, with the maximum guaranteed error within 1 ulp.
For double precision data:
function flavor ippsArg_64fc_A26 guarantees 26 correctly rounded bits of significand, or 6.7E+7 ulps, orapproximately 8 exact decimal digits;
function flavor ippsArg_64fc_A50 guarantees 50 correctly rounded bits of significand,or 4 ulps, orapproximately 15 exact decimal digits;
function flavor ippsArg_64fc_A53 guarantees 53 correctly rounded bits of significand, including the implied
bit, with the maximum guaranteed error within 1 ulp.
The computation is performed as follows:

pDst[n] = φ(pSrc1[n]), 0 ≤ n < len.

366

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrc1, pSrc2 or pDst pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

ExampleThe example below shows how to use the function ippsArg.

IppStatus ippsArg_32fc_A24_sample(void) {const Ipp32fc x[2] = {{+2.885,-1.809}, {-0.543,-2.809}};
Ipp32fc y[2];IppStatus st = ippsArg_32fc_A24( x, y, 2 );printf(" ippsArg_32fc_A24:\n");printf(" x = %+.3f%+.3f*i%+.3f%+.3f*i \n", x[0].re, x[0].im, x[1].re, x[1].im);
printf(" y = %+.3f%+.3f%\n", y[0],y[1]);
return st;}
Output:ippsArg_32fc_A24:
x = +2.885-1.809*i
y = -0.560-0.543-2.809*i-1.762

Power and Root Functions
Inv
Computes inverse value of each vector element.

SyntaxIppStatus ippsInv_32f_A11 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsInv_32f_A21 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsInv_32f_A24 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsInv_64f_A26 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsInv_64f_A50 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsInv_64f_A53 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);

Include Files
ippvm.h

Domain Dependencies
Headers: ippcore.hLibraries: ippcore.lib

367

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

len

Number of elements in the vectors.

Description
This function computes the inverse value of each element of the vector pSrc, and stores the result in thecorresponding element of the vector pDst.
For single precision data:
function flavor ippsInv_32f_A11 guarantees 11 correctly rounded bits of significand, or at least 3 exact
decimal digits;
function flavor ippsInv_32f_A21 guarantees 21 correctly rounded bits of significand, or 4 ulps, or about 6
exact decimal digits;
function flavor ippsInv_32f_A24 guarantees 24 correctly rounded bits of significand, including the implied
bit, with the maximum guaranteed error within 1 ulp.
For double precision data:
function flavor ippsInv_64f_A26 guarantees 26 correctly rounded bits of significand, or 6.7E+7 ulps, orapproximately 8 exact decimal digits;
function flavor ippsInv_64f_A50 guarantees 50 correctly rounded bits of significand, or 4 ulps, orapproximately 15 exact decimal digits;
function flavor ippsInv_64f_A53 guarantees 53 correctly rounded bits of significand, including the implied
bit, with the maximum guaranteed error within 1 ulp.
The computation is performed as follows:

pDst[n] = 1/(pSrc[n]), 0 ≤ n < len.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrc or pDst pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

IppStsSingularity

Indicates a warning that the argument is the singularity point,that is, at least one of the elements of pSrc is equal to 0.

ExampleThe example below shows how to use the function ippsInv.

IppStatus ippsInv_32f_A21_sample(void) {const Ipp32f x[4] = {-9.975, 1.272, -6.134, 6.175};
Ipp32f y[4];IppStatus st = ippsInv_32f_A21( x, y, 4 );printf(" ippsInv_32f_A21:\n");printf(" x = %.3f %.3f %.3f %.3f \n", x[0], x[1], x[2], x[3]);368Developer Guide and Reference for Intel® Integrated Performance Primitives

1

printf(" y = %.3f %.3f %.3f %.3f \n", y[0], y[1], y[2], y[3]);return st;}
Output:ippsInv_32f_A21:
x = -9.975 1.272 -6.134 6.175
y = -0.100 0.786 -0.163 0.162

Div
Divides each element of the first vector bycorresponding element of the second vector.

SyntaxIppStatus ippsDiv_32f_A11 (const Ipp32f* pSrc1, const Ipp32f* pSrc2, Ipp32f* pDst,
Ipp32s len);
IppStatus ippsDiv_32f_A21 (const Ipp32f* pSrc1, const Ipp32f* pSrc2, Ipp32f* pDst,
Ipp32s len);
IppStatus ippsDiv_32f_A24 (const Ipp32f* pSrc1, const Ipp32f* pSrc2, Ipp32f* pDst,
Ipp32s len);
IppStatus ippsDiv_64f_A26 (const Ipp64f* pSrc1, const Ipp64f* pSrc2, Ipp64f* pDst,
Ipp32s len);
IppStatus ippsDiv_64f_A50 (const Ipp64f* pSrc1, const Ipp64f* pSrc2, Ipp64f* pDst,
Ipp32s len);
IppStatus ippsDiv_64f_A53 (const Ipp64f* pSrc1, const Ipp64f* pSrc2, Ipp64f* pDst,
Ipp32s len);
IppStatus ippsDiv_32fc_A11 (const Ipp32fc* pSrc1, const Ipp32fc* pSrc2, Ipp32fc* pDst,
Ipp32s len);
IppStatus ippsDiv_32fc_A21 (const Ipp32fc* pSrc1, const Ipp32fc* pSrc2, Ipp32fc* pDst,
Ipp32s len);
IppStatus ippsDiv_32fc_A24 (const Ipp32fc* pSrc1, const Ipp32fc* pSrc2, Ipp32fc* pDst,
Ipp32s len);
IppStatus ippsDiv_64fc_A26 (const Ipp64fc* pSrc1, const Ipp64fc* pSrc2, Ipp64fc* pDst,
Ipp32s len);
IppStatus ippsDiv_64fc_A50 (const Ipp64fc* pSrc1, const Ipp64fc* pSrc2, Ipp64fc* pDst,
Ipp32s len);
IppStatus ippsDiv_64fc_A53 (const Ipp64fc* pSrc1, const Ipp64fc* pSrc2, Ipp64fc* pDst,
Ipp32s len);

Include Files
ippvm.h

Domain Dependencies
Headers: ippcore.hLibraries: ippcore.lib

369

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Parameters
pSrc1

Pointer to the first source vector.

pSrc2

Pointer to the second source vector.

pDst

Pointer to the destination vector.

len

Number of elements in the vectors.

Description
This function divides each element of the vector pSrc1 by the corresponding element of the vector pSrc2
and stores the result in the corresponding element of pDst.
For single precision data:
function flavors ippsDiv_32f_A11and ippsDiv_32cf_A11 guarantee 11 correctly rounded bits ofsignificand, or at least 3 exact decimal digits;
function flavors ippsDiv_32f_A21 and ippsDiv_32fc_A21 guarantee 21 correctly rounded bits ofsignificand, or 4 ulps, or about 6 exact decimal digits;
function flavors ippsDiv_32f_A24 and ippsDiv_32fc_A24 guarantee 24 correctly rounded bits ofsignificand, including the implied bit, with the maximum guaranteed error within 1 ulp.
For double precision data:
function flavors ippsDiv_64f_A26 and ippsDiv_64fc_A26 guarantee 26 correctly rounded bits ofsignificand, or 6.7E+7 ulps, or approximately 8 exact decimal digits;
function flavors ippsDiv_64f_A50 and ippsDiv_64fc_A50 guarantee 50 correctly rounded bits ofsignificand, or 4 ulps, or approximately 15 exact decimal digits;
function flavors ippsDiv_64f_A53 and ippsDiv_64fc_A53 guarantee 53 correctly rounded bits ofsignificand, including the implied bit, with the maximum guaranteed error within 1 ulp.
The computation is performed as follows:

pDst[n] = (pSrc1[n]) /(pSrc2[n]), 0 ≤ n < len.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrc1 or pSrc2 or pDst pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

IppStsSingularity

In real functions, indicates a warning that the argument is the
singularity point, that is, at least one of the elements of pSrc2
is equal to 0.

ExampleThe example below shows how to use the function ippsDiv.

IppStatus ippsDiv_32f_A21_sample(void) {const Ipp32f x1[4] = {599.088, 735.034, 572.448, 151.640};
const Ipp32f x2[4] = {385.297, 609.005, 361.403, 225.182};
Ipp32f y[4];IppStatus st = ippsDiv_32f_A21( x1, x2, y, 4 );370

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

printf(" ippsDiv_32f_A21:\n");printf(" x1 = %.3f %.3f %.3f %.3f \n", x1[0], x1[1], x1[2], x1[3]);printf(" x2 = %.3f %.3f %.3f %.3f \n", x2[0], x2[1], x2[2], x2[3]);printf(" y = %.3f %.3f %.3f %.3f \n", y[0], y[1], y[2], y[3]);return st;}
Output:ippsDiv_32f_A21:
x1 = 599.088 735.034 572.448 151.640
x2 = 385.297 609.005 361.403 225.182
y = 1.555 1.207 1.584 0.673

Sqrt
Computes square root of each vector element.

SyntaxIppStatus ippsSqrt_32f_A11 ( const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsSqrt_32f_A21 ( const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsSqrt_32f_A24 ( const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsSqrt_64f_A26 ( const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsSqrt_64f_A50 ( const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsSqrt_64f_A53 ( const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsSqrt_32fc_A11 ( const Ipp32fc* pSrc, Ipp32fc* pDst, Ipp32s len);
IppStatus ippsSqrt_32fc_A21 ( const Ipp32fc* pSrc, Ipp32fc* pDst, Ipp32s len);
IppStatus ippsSqrt_32fc_A24 ( const Ipp32fc* pSrc, Ipp32fc* pDst, Ipp32s len);
IppStatus ippsSqrt_64fc_A26 ( const Ipp64fc* pSrc, Ipp64fc* pDst, Ipp32s len);
IppStatus ippsSqrt_64fc_A50 ( const Ipp64fc* pSrc, Ipp64fc* pDst, Ipp32s len);
IppStatus ippsSqrt_64fc_A53 ( const Ipp64fc* pSrc, Ipp64fc* pDst, Ipp32s len);

Include Files
ippvm.h

Domain Dependencies
Headers: ippcore.hLibraries: ippcore.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

len

Number of elements in the vectors.

371

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Description
This function computes square root of each element of pSrc and stores the result in the corresponding
element of pDst.
For single precision data:
function flavors ippsSqrt_32f_A11and ippsSqrt_32cf_A11 guarantee 11 correctly rounded bits ofsignificand, or at least 3 exact decimal digits;
function flavors ippsSqrt_32f_A21 and ippsSqrt_32fc_A21 guarantee 21 correctly rounded bits ofsignificand, or 4 ulps, or about 6 exact decimal digits;
function flavors ippsSqrt_32f_A24 and ippsSqrt_32fc_A24 guarantee 24 correctly rounded bits ofsignificand, including the implied bit, with the maximum guaranteed error within 1 ulp.
For double precision data:
function flavors ippsSqrt_64f_A26 and ippsSqrt_64fc_A26 guarantee 26 correctly rounded bits ofsignificand, or 6.7E+7 ulps, or approximately 8 exact decimal digits;
function flavors ippsSqrt_64f_A50 and ippsSqrt_64fc_A50 guarantee 50 correctly rounded bits ofsignificand, or 4 ulps, or approximately 15 exact decimal digits;
function flavors ippsSqrt_64f_A53 and ippsSqrt_64fc_A53 guarantee 53 correctly rounded bits ofsignificand, including the implied bit, with the maximum guaranteed error within 1 ulp.
The computation is performed as follows:

pDst[n] = (pSrc[n])1/2, 0 ≤ n < len.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrc or pDst pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

IppStsDomain

In real functions, indicates a warning that the argument is outof the function domain, that is, at least one of the elements ofpSrc is less than 0.

ExampleThe example below shows how to use the function ippsSqrt.

IppStatus ippsSqrt_32f_A21_sample(void) {const Ipp32f x[4] = {5850.093, 4798.730, 3502.915, 8959.624};
Ipp32f y[4];IppStatus st = ippsSqrt_32f_A21( x, y, 4 );printf(" ippsSqrt_32f_A21:\n");printf(" x = %.3f %.3f %.3f %.3f \n", x[0], x[1], x[2], x[3]);printf(" y = %.3f %.3f %.3f %.3f \n", y[0], y[1], y[2], y[3]);return st;
}

372

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Output:ippsSqrt_32f_A21:
x = 5850.093 4798.730 3502.915 8959.624
y = 76.486 69.273 59.185 94.655

InvSqrtComputes inverse square root of each vector element.

SyntaxIppStatus ippsInvSqrt_32f_A11 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsInvSqrt_32f_A21 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsInvSqrt_32f_A24 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsInvSqrt_64f_A26 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsInvSqrt_64f_A50 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsInvSqrt_64f_A53 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);

Include Files
ippvm.h

Domain Dependencies
Headers: ippcore.hLibraries: ippcore.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

len

Number of elements in the vectors.

Description
This function computes inverse square root of each element of pSrc and stores the result in thecorresponding element of pDst.
For single precision data:
function flavor ippsInvSqrt_32f_A11 guarantees 11 correctly rounded bits of significand, or at least 3
exact decimal digits;
function flavor ippsInvSqrt_32f_A21 guarantees 21 correctly rounded bits of significand, or 4 ulps, orabout 6 exact decimal digits;
function flavor ippsInvSqrt_32f_A24 guarantees 24 correctly rounded bits of significand, including theimplied bit, with the maximum guaranteed error within 1 ulp.
For double precision data:
function flavor ippsInvSqrt_64f_A26 guarantees 26 correctly rounded bits of significand, or 6.7E+7 ulps,
or approximately 8 exact decimal digits;
function flavor ippsInvSqrt_64f_A50 guarantees 50 correctly rounded bits of significand, or 4 ulps, orapproximately 15 exact decimal digits;

373

1

Intel® Integrated Performance Primitives Developer Guide and Referencefunction flavor ippsInvSqrt_64f_A53 guarantees 53 correctly rounded bits of significand, including theimplied bit, with the maximum guaranteed error within 1 ulp.
The computation is performed as follows:

pDst[n] = (pSrc[n])-1/2, 0 ≤ n < len.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrc or pDst pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

IppStsDomain

IppStsSingularity

Indicates a warning that the argument is out of the function
domain, that is, at least one of the elements of pSrc is lessthan 0.
Indicates a warning that the argument is the singularity point,that is, at least one of the elements of pSrc is equal to 0.

ExampleThe example below shows how to use the function ippsInvSqrt.

IppStatus ippsInvSqrt_32f_A21_sample(void) {const Ipp32f x[4] = {7105.043, 5135.398, 3040.018, 149.944};
Ipp32f y[4];IppStatus st = ippsInvSqrt_32f_A21( x, y, 4 );printf(" ippsInvSqrt_32f_A21:\n");printf(" x = %.3f %.3f %.3f %.3f \n", x[0], x[1], x[2], x[3]);printf(" y = %.3f %.3f %.3f %.3f \n", y[0], y[1], y[2], y[3]);return st;}
Output:ippsInvSqrt_32f_A21:
x = 7105.043 5135.398 3040.018 149.944
y = 0.012 0.014 0.018 0.082

Cbrt
Computes cube root of each vector element.

SyntaxIppStatus ippsCbrt_32f_A11 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsCbrt_32f_A21 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsCbrt_32f_A24 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsCbrt_64f_A26 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsCbrt_64f_A50 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsCbrt_64f_A53 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);

Include Files
ippvm.h374

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Domain Dependencies
Headers: ippcore.hLibraries: ippcore.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

len

Number of elements in the vectors.

Description
This function computes cube root of each element of pSrc, and stores the result in the corresponding
element of pDst.
For single precision data:
function flavor ippsCbrt_32f_A11 guarantees 11 correctly rounded bits of significand, or at least 3 exact
decimal digits;
function flavor ippsCbrt_32f_A21 guarantees 21 correctly rounded bits of significand, or 4 ulps, or about 6
exact decimal digits;
function flavor ippsCbrt_32f_A24 guarantees 24 correctly rounded bits of significand, including the implied
bit, with the maximum guaranteed error within 1 ulp.
For double precision data:
function flavor ippsCbrt_64f_A26 guarantees 26 correctly rounded bits of significand, or 6.7E+7 ulps, orapproximately 8 exact decimal digits;
function flavor ippsCbrt_64f_A50 guarantees 50 correctly rounded bits of significand, or 4 ulps, orapproximately 15 exact decimal digits;
function flavor ippsCbrt_64f_A53 guarantees 53 correctly rounded bits of significand, including the implied
bit, with the maximum guaranteed error within 1 ulp.
The computation is performed as follows:

pDst[n] = (pSrc[n])1/3, 0 ≤ n < len.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrc or pDst pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

ExampleThe example below shows how to use the function ippsCbrt.

IppStatus ippsCbrt_32f_A21_sample(void) {const Ipp32f x[4] = {6456.801, 4932.096, -6517.838, 7178.869};
Ipp32f y[4];IppStatus st = ippsCbrt_32f_A21( x, y, 4 );printf(" ippsCbrt_32f_A21:\n");

375

1

Intel® Integrated Performance Primitives Developer Guide and Reference

printf(" x = %.3f %.3f %.3f %.3f \n", x[0], x[1], x[2], x[3]);printf(" y = %.3f %.3f %.3f %.3f \n", y[0], y[1], y[2], y[3]);return st;}
Output:ippsCbrt_32f_A21:
x = 6456.801 4932.096 -6517.838 7178.869
y = 18.621 17.022 -18.680 19.291

InvCbrtComputes inverse cube root of each vector element.

SyntaxIppStatus ippsInvCbrt_32f_A11 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsInvCbrt_32f_A21 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsInvCbrt_32f_A24 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsInvCbrt_64f_A26 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsInvCbrt_64f_A50 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsInvCbrt_64f_A53 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);

Include Files
ippvm.h

Domain Dependencies
Headers: ippcore.hLibraries: ippcore.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

len

Number of elements in the vectors.

Description
This function computes inverse cube root of each element of pSrc and stores the result in the corresponding
element of pDst.
For single precision data:
function flavor ippsInvCbrt_32f_A11 guarantees 11 correctly rounded bits of significand, or at least 3
exact decimal digits;
function flavor ippsInvCbrt_32f_A21 guarantees 21 correctly rounded bits of significand, or 4 ulps, orabout 6 exact decimal digits;
function flavor ippsInvCbrt_32f_A24 guarantees 24 correctly rounded bits of significand, including theimplied bit, with the maximum guaranteed error within 1 ulp.
For double precision data:376

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

function flavor ippsInvCbrt_64f_A26 guarantees 26 correctly rounded bits of significand, or 6.7E+7 ulps,
or approximately 8 exact decimal digits;
function flavor ippsInvCbrt_64f_A50 guarantees 50 correctly rounded bits of significand, or 4 ulps, orapproximately 15 exact decimal digits;
function flavor ippsInvCbrt_64f_A53 guarantees 53 correctly rounded bits of significand, including theimplied bit, with the maximum guaranteed error within 1 ulp.
The computation is performed as follows:

pDst[n] = (pSrc[n])-1/3, 0 ≤ n < len.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrc or pDst pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

IppStsSingularity

Indicates a warning that the argument is the singularity point,that is, at least one of the elements of pSrc is equal to 0.

ExampleThe example below shows how to use the function ippsInvCbrt.

IppStatus ippsInvCbrt_32f_A21_sample(void) {const Ipp32f x[4] = {914.120, 3644.584, 1473.214, 1659.070};
Ipp32f y[4];IppStatus st = ippsInvCbrt_32f_A21( x, y, 4 );printf(" ippsInvCbrt_32f_A21:\n");printf(" x = %.3f %.3f %.3f %.3f \n", x[0], x[1], x[2], x[3]);printf(" y = %.3f %.3f %.3f %.3f \n", y[0], y[1], y[2], y[3]);return st;}
Output:ippsInvCbrt_32f_A21:
x = 914.120 3644.584 1473.214 1659.070
y = 0.103 0.065 0.088 0.084

Pow2o3
Computes the value of each vector element raised tothe power of 2/3.

SyntaxIppStatus ippsPow2o3_32f_A11 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsPow2o3_32f_A21 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsPow2o3_32f_A24 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsPow2o3_64f_A26 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsPow2o3_64f_A50 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsPow2o3_64f_A53 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);

377

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Include Files
ippvm.h

Domain Dependencies
Headers: ippcore.hLibraries: ippcore.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

len

Number of elements in the vectors.

Description
This function computes the value of each vector element of the vector pSrc raised to 2/3 power and storesthe result in the corresponding element of the vector pDst.
For single precision data:
function flavor ippsPow2o3_32f_A11 guarantees 11 correctly rounded bits of significand, or at least 3 exact
decimal digits;
function flavor ippsPow2o3_32f_A21 guarantees 21 correctly rounded bits of significand, or 4 ulps, or about
6 exact decimal digits;
function flavor ippsPow2o3_32f_A24 guarantees 24 correctly rounded bits of significand, including theimplied bit, with the maximum guaranteed error within 1 ulp.
For double precision data:
function flavor ippsPow2o3_64f_A26 guarantees 26 correctly rounded bits of significand, or 6.7E+7 ulps, orapproximately 8 exact decimal digits;
function flavor ippsPow2o3_64f_A50 guarantees 50 correctly rounded bits of significand, or 4 ulps, orapproximately 15 exact decimal digits;
function flavor ippsPow2o3_64f_A53 guarantees 53 correctly rounded bits of significand, including theimplied bit, with the maximum guaranteed error within 1 ulp.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrc or pDst pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

Pow3o2Computes the value of each vector element raised tothe power of 3/2.

SyntaxIppStatus ippsPow3o2_32f_A11 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsPow3o2_32f_A21 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsPow3o2_32f_A24 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);378

1Developer Guide and Reference for Intel® Integrated Performance Primitives

IppStatus ippsPow3o2_64f_A26 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsPow3o2_64f_A50 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsPow3o2_64f_A53 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);

Include Files
ippvm.h

Domain Dependencies
Headers: ippcore.hLibraries: ippcore.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

len

Number of elements in the vectors.

Description
This function computes the value of each vector element of the vector pSrc raised to 3/2 power and storesthe result in the corresponding element of the vector pDst.
For single precision data:
function flavor ippsPow3o2_32f_A11 guarantees 11 correctly rounded bits of significand, or at least 3 exact
decimal digits;
function flavor ippsPow3o2_32f_A21 guarantees 21 correctly rounded bits of significand, or 4 ulps, or about
6 exact decimal digits;
function flavor ippsPow3o2_32f_A24 guarantees 24 correctly rounded bits of significand, including theimplied bit, with the maximum guaranteed error within 1 ulp.
For double precision data:
function flavor ippsPow3o2_64f_A26 guarantees 26 correctly rounded bits of significand, or 6.7E+7 ulps, orapproximately 8 exact decimal digits;
function flavor ippsPow3o2_64f_A50 guarantees 50 correctly rounded bits of significand, or 4 ulps, orapproximately 15 exact decimal digits;
function flavor ippsPow3o2_64f_A53 guarantees 53 correctly rounded bits of significand, including theimplied bit, with the maximum guaranteed error within 1 ulp.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrc or pDst pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

IppStsDomain

Indicates a warning that the argument is out of the function
domain, that is, at least one of the elements of pSrc is lessthan 0.

379

1Intel® Integrated Performance Primitives Developer Guide and Reference

Pow
Raises each element of the first vector to the power ofcorresponding element of the second vector.

SyntaxIppStatus ippsPow_32f_A11 (const Ipp32f* pSrc1, const Ipp32f* pSrc2, Ipp32f* pDst,
Ipp32s len);
IppStatus ippsPow_32f_A21 (const Ipp32f* pSrc1, const Ipp32f* pSrc2, Ipp32f* pDst,
Ipp32s len);
IppStatus ippsPow_32f_A24 (const Ipp32f* pSrc1, const Ipp32f* pSrc2, Ipp32f* pDst,
Ipp32s len);
IppStatus ippsPow_64f_A26 (const Ipp64f* pSrc1, const Ipp64f* pSrc2, Ipp64f* pDst,
Ipp32s len);
IppStatus ippsPow_64f_A50 (const Ipp64f* pSrc1, const Ipp64f* pSrc2, Ipp64f* pDst,
Ipp32s len);
IppStatus ippsPow_64f_A53 (const Ipp64f* pSrc1, const Ipp64f* pSrc2, Ipp64f* pDst,
Ipp32s len);
IppStatus ippsPow_32fc_A11 (const Ipp32fc* pSrc1, const Ipp32fc* pSrc2, Ipp32fc* pDst,
Ipp32s len);
IppStatus ippsPow_32fc_A21 (const Ipp32fc* pSrc1, const Ipp32fc* pSrc2, Ipp32fc* pDst,
Ipp32s len);
IppStatus ippsPow_32fc_A24 (const Ipp32fc* pSrc1, const Ipp32fc* pSrc2, Ipp32fc* pDst,
Ipp32s len);
IppStatus ippsPow_64fc_A26 (const Ipp64fc* pSrc1, const Ipp64fc* pSrc2, Ipp64fc* pDst,
Ipp32s len);
IppStatus ippsPow_64fc_A50 (const Ipp64fc* pSrc1, const Ipp64fc* pSrc2, Ipp64fc* pDst,
Ipp32s len);
IppStatus ippsPow_64fc_A53 (const Ipp64fc* pSrc1, const Ipp64fc* pSrc2, Ipp64fc* pDst,
Ipp32s len);

Include Files
ippvm.h

Domain Dependencies
Headers: ippcore.hLibraries: ippcore.lib

Parameters
pSrc1

Pointer to the first source vector.

pSrc2

Pointer to the second source vector.

pDst

Pointer to the destination vector.

len

Number of elements in the vectors.

380

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Description
This function raises each element of vector pSrc1 to the power of the corresponding element of the vector
pSrc2 and stores the result in the corresponding element of pDst.
For single precision data:
function flavors ippsPow_32f_A11and ippsPow_32cf_A11 guarantee 11 correctly rounded bits ofsignificand, or at least 3 exact decimal digits;
function flavors ippsPow_32f_A21 and ippsPow_32fc_A21 guarantee 21 correctly rounded bits ofsignificand, or 4 ulps, or about 6 exact decimal digits;
function flavors ippsPow_32f_A24 and ippsPow_32fc_A24 guarantee 24 correctly rounded bits ofsignificand, including the implied bit, with the maximum guaranteed error within 1 ulp.
For double precision data:
function flavors ippsPow_64f_A26 and ippsPow_64fc_A26 guarantee 26 correctly rounded bits ofsignificand, or 6.7E+7 ulps, or approximately 8 exact decimal digits;
function flavors ippsPow_64f_A50 and ippsPow_64fc_A50 guarantee 50 correctly rounded bits ofsignificand, or 4 ulps, or approximately 15 exact decimal digits;
function flavors ippsPow_64f_A53 and ippsPow_64fc_A53 guarantee 53 correctly rounded bits ofsignificand, including the implied bit, with the maximum guaranteed error within 1 ulp.
Note that for ippsPow complex functions there may be argument ranges where the accuracy specification
does not hold.
The computation is performed as follows:

pDst[n] = (pSrc1[n])pSrc2[n] , 0 ≤ n < len.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrc1 or pSrc2 or pDst pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

IppStsDomain

IppStsSingularity

In real functions, indicates a warning that the argument is outof the function domain, that is, at least one pair of the source
elements meets the following condition: element of pSrc1 isfinite, less than 0, and element of pSrc2 is finite, non-integer.
In real functions, indicates a warning that the argument is the
singularity point, that is, at least one pair of the elements is asfollows: element of pSrc1 is equal to 0, and element of pSrc2 is
integer and less than 0.

ExampleThe example below shows how to use the function ippsPow.

IppStatus ippsPow_32f_A21_sample(void) {const Ipp32f x1[4] = {0.483, 0.565, 0.776, 0.252};
const Ipp32f x2[4] = {0.823, 0.991, 0.411, 0.692};
Ipp32f y[4];IppStatus st = ippsPow_32f_A21( x1, x2, y, 4 );printf(" ippsPow_32f_A21:\n");

381

1

Intel® Integrated Performance Primitives Developer Guide and Reference

printf(" x1 = %.3f %.3f %.3f %.3f \n", x1[0], x1[1], x1[2], x1[3]);printf(" x2 = %.3f %.3f %.3f %.3f \n", x2[0], x2[1], x2[2], x2[3]);printf(" y = %.3f %.3f %.3f %.3f \n", y[0], y[1], y[2], y[3]);return st;}
Output:ippsPow_32f_A21:
x1 = 0.483 0.565 0.776 0.252
x2 = 0.823 0.991 0.411 0.692
y = 0.549 0.568 0.901 0.386

Powx
Raises each element of a vector to a constant power.

SyntaxIppStatus ippsPowx_32f_A11 (const Ipp32f* pSrc1, const Ipp32f ConstValue, Ipp32f* pDst,
Ipp32s len);
IppStatus ippsPowx_32f_A21 (const Ipp32f* pSrc1, const Ipp32f ConstValue, Ipp32f* pDst,
Ipp32s len);
IppStatus ippsPowx_32f_A24 (const Ipp32f* pSrc1, const Ipp32f ConstValue, Ipp32f* pDst,
Ipp32s len);
IppStatus ippsPowx_64f_A26 (const Ipp64f* pSrc1, const Ipp64f ConstValue, Ipp64f* pDst,
Ipp32s len);
IppStatus ippsPowx_64f_A50 (const Ipp64f* pSrc1, const Ipp64f ConstValue, Ipp64f* pDst,
Ipp32s len);
IppStatus ippsPowx_64f_A53 (const Ipp64f* pSrc1, const Ipp64f ConstValue, Ipp64f* pDst,
Ipp32s len);
IppStatus ippsPowx_32fc_A11 (const Ipp32fc* pSrc1, const Ipp32fc ConstValue, Ipp32fc*
pDst, Ipp32s len);
IppStatus ippsPowx_32fc_A21 (const Ipp32fc* pSrc1, const Ipp32fc ConstValue, Ipp32fc*
pDst, Ipp32s len);
IppStatus ippsPowx_32fc_A24 (const Ipp32fc* pSrc1, const Ipp32fc ConstValue, Ipp32fc*
pDst, Ipp32s len);
IppStatus ippsPowx_64fc_A26 (const Ipp64fc* pSrc1, const Ipp64fc ConstValue, Ipp64fc*
pDst, Ipp32s len);
IppStatus ippsPowx_64fc_A50 (const Ipp64fc* pSrc1, const Ipp64fc ConstValue, Ipp64fc*
pDst, Ipp32s len);
IppStatus ippsPowx_64fc_A53 (const Ipp64fc* pSrc1, const Ipp64fc ConstValue, Ipp64fc*
pDst, Ipp32s len);

Include Files
ippvm.h

Domain Dependencies
Headers: ippcore.h382

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Libraries: ippcore.lib

Parameters
pSrc1

Pointer to the source vector.

ConstValue

Constant value.

pDst

Pointer to the destination vector.

len

Number of elements in the vectors.

Description
This function raises each element of the vector pSrc1 to the constant power ConstValue and stores theresult in the corresponding element of pDst.
For single precision data:
function flavors ippsPowx_32f_A11and ippsPowx_32cf_A11 guarantee 11 correctly rounded bits ofsignificand, or at least 3 exact decimal digits;
function flavors ippsPowx_32f_A21 and ippsPowx_32fc_A21 guarantee 21 correctly rounded bits ofsignificand, or 4 ulps, or about 6 exact decimal digits;
function flavors ippsPowx_32f_A24 and ippsPowx_32fc_A24 guarantee 24 correctly rounded bits ofsignificand, including the implied bit, with the maximum guaranteed error within 1 ulp.
For double precision data:
function flavors ippsPowx_64f_A26 and ippsPowx_64fc_A26 guarantee 26 correctly rounded bits ofsignificand, or 6.7E+7 ulps, or approximately 8 exact decimal digits;
function flavors ippsPowx_64f_A50 and ippsPowx_64fc_A50 guarantee 50 correctly rounded bits ofsignificand, or 4 ulps, or approximately 15 exact decimal digits;
function flavors ippsPowx_64f_A53 and ippsPowx_64fc_A53 guarantee 53 correctly rounded bits ofsignificand, including the implied bit, with the maximum guaranteed error within 1 ulp.
Note that for ippsPowx complex functions there may be argument ranges where the accuracy specification
does not hold.
The computation is performed as follows:

pDst[n] = (pSrc[n])ConstValue, 0 ≤ n < len.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrc1 or pDst pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

ippStsDomain

IppStsSingularity

In real functions, indicates a warning that the argument is outof the function domain, that is, at least one pair of theelements meets the following condition: element of pSrc1 isfinite, less than 0, and ConstValue is finite, non-integer.
In real functions, indicates a warning that the argument is the
singularity point, that is, at least one pair of the elements is asfollows: element of pSrc1 is equal to 0, and ConstValue is
integer and less than 0.

383

1

Intel® Integrated Performance Primitives Developer Guide and Reference

ExampleThe example below shows how to use the function ippsPowx.

IppStatus ippsPowx_32f_A21_sample(void) {const Ipp32f x1[4] = {0.483, 0.565, 0.776, 0.252};
const Ipp32f x2 = 0.823;
Ipp32f y[4];IppStatus st = ippsPowx_32f_A21( x1, x2, y, 4 );printf(" ippsPowx_32f_A21:\n");printf(" x1 = %.3f %.3f %.3f %.3f \n", x1[0], x1[1], x1[2], x1[3]);printf(" x2 = %.3f \n", x2);
printf(" y = %.3f %.3f %.3f %.3f \n", y[0], y[1], y[2], y[3]);return st;}
Output results:

ippsPowx_32f_A21:
x1 = 0.483 0.565 0.776 0.252
x2 = 0.823
y = 0.549 0.625 0.812 0.322

Hypot
Computes a square root of sum of two squared
elements.

SyntaxIppStatus ippsHypot_32f_A11 (const Ipp32f* pSrc1, const Ipp32f pSrc2, Ipp32f* pDst,
Ipp32s len);
IppStatus ippsHypot_32f_A21 (const Ipp32f* pSrc1, const Ipp32f* pSrc2, Ipp32f* pDst,
Ipp32s len);
IppStatus ippsHypot_32f_A24 (const Ipp32f* pSrc1, const Ipp32f* pSrc2, Ipp32f* pDst,
Ipp32s len);
IppStatus ippsHypot_64f_A26 (const Ipp64f* pSrc1, const Ipp64f* pSrc2, Ipp64f* pDst,
Ipp32s len);
IppStatus ippsHypot_64f_A50 (const Ipp64f* pSrc1, const Ipp64f* pSrc2, Ipp64f* pDst,
Ipp32s len);
IppStatus ippsHypot_64f_A53 (const Ipp64f* pSrc1, const Ipp64f* pSrc2, Ipp64f* pDst,
Ipp32s len);

Include Files
ippvm.h

Domain Dependencies
Headers: ippcore.hLibraries: ippcore.lib

384

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Parameters
pSrc1

Pointer to the first source vector.

pSrc2

Pointer to the second source vector.

pDst

Pointer to the destination vector.

len

Number of elements in the vectors.

Description
This function computes square of each element of the pSrc1 and pSrc2 vectors, sums corresponding
elements, computes square roots of each sum and stores the result in the corresponding element of pDst.
For single precision data:
function flavor ippsHypot_32f_A11 guarantees 11 correctly rounded bits of significand, or at least 3 exact
decimal digits;
function flavor ippsHypot_32f_A21 guarantees 21 correctly rounded bits of significand, or 4 ulps, or about 6
exact decimal digits;
function flavor ippsHypot_32f_A24 guarantees 24 correctly rounded bits of significand, including theimplied bit, with the maximum guaranteed error within 1 ulp.
For double precision data:
function flavor ippsHypot_64f_A26 guarantees 26 correctly rounded bits of significand, or 6.7E+7 ulps, orapproximately 8 exact decimal digits;
function flavor ippsHypot_64f_A50 guarantees 50 correctly rounded bits of significand, or 4 ulps, orapproximately 15 exact decimal digits;
function flavor ippsHypot_64f_A53 guarantees 53 correctly rounded bits of significand, including theimplied bit, with the maximum guaranteed error within 1 ulp.
The computation is performed as follows:

pDst[n] = ((pSrc1[n])2 + (pSrc2[n])2)1/2, 0 ≤ n < len.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrc1 or pSrc2 or pDst pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

ExampleThe example below shows how to use the function ippsHypot.

IppStatus ippsHypot_32f_A21_sample(void) {const Ipp32f x1[4] = {0.483, 0.565, 0.776, 0.252}
const Ipp32f x2[4] = {0.823, 0.991, 0.411, 0.692};
Ipp32f y[4];IppStatus st = ippsHypot_32f_A21( x1, x2, y, 4 );printf(" ippsHypot_32f_A21:\n");printf(" x1 = %.3f %.3f %.3f %.3f \n", x1[0], x1[1], x1[2], x1[3]);printf(" x2 = %.3f %.3f %.3f %.3f \n", x2[0], x2[1], x2[2], x2[3]);

385

1

Intel® Integrated Performance Primitives Developer Guide and Reference

printf(" yreturn st;= %.3f %.3f %.3f %.3f \n", y[0],

y[1],

y[2],

y[3]);}
Output:ippsHypot_32f_A21:
x1 = 0.483 0.565 0.776 0.252
x2 = 0.823 0.991 0.411 0.692
y = 0.954 1.141 0.878 0.736

Exponential and Logarithmic Functions
Exp
Raises e to the power of each vector element.

SyntaxIppStatus ippsExp_32f_A11 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsExp_32f_A21 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsExp_32f_A24 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsExp_64f_A26 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsExp_64f_A50 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsExp_64f_A53 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsExp_32fc_A11 (const Ipp32fc* pSrc, Ipp32fc* pDst, Ipp32s len);
IppStatus ippsExp_32fc_A21 (const Ipp32fc* pSrc, Ipp32fc* pDst, Ipp32s len);
IppStatus ippsExp_32fc_A24 (const Ipp32fc* pSrc, Ipp32fc* pDst, Ipp32s len);
IppStatus ippsExp_64fc_A26 (const Ipp64fc* pSrc, Ipp64fc* pDst, Ipp32s len);
IppStatus ippsExp_64fc_A50 (const Ipp64fc* pSrc, Ipp64fc* pDst, Ipp32s len);
IppStatus ippsExp_64fc_A53 (const Ipp64fc* pSrc, Ipp64fc* pDst, Ipp32s len);

Include Files
ippvm.h

Domain Dependencies
Headers: ippcore.hLibraries: ippcore.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

len

Number of elements in the vectors.

386

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Description
This function raises e to the power of each element of pSrc and stores the result in the corresponding
element of pDst.
For single precision data:
function flavors ippsExp_32f_A11and ippsExp_32cf_A11 guarantee 11 correctly rounded bits ofsignificand, or at least 3 exact decimal digits;
function flavors ippsExp_32f_A21 and ippsExp_32fc_A21 guarantee 21 correctly rounded bits ofsignificand, or 4 ulps, or about 6 exact decimal digits;
function flavors ippsExp_32f_A24 and ippsExp_32fc_A24 guarantee 24 correctly rounded bits ofsignificand, including the implied bit, with the maximum guaranteed error within 1 ulp.
For double precision data:
function flavors ippsExp_64f_A26 and ippsExp_64fc_A26 guarantee 26 correctly rounded bits ofsignificand, or 6.7E+7 ulps, or approximately 8 exact decimal digits;
function flavors ippsExp_64f_A50 and ippsExp_64fc_A50 guarantee 50 correctly rounded bits ofsignificand, or 4 ulps, or approximately 15 exact decimal digits;
function flavors ippsExp_64f_A53 and ippsExp_64fc_A53 guarantee 53 correctly rounded bits ofsignificand, including the implied bit, with the maximum guaranteed error within 1 ulp.
The computation is performed as follows:

pDst[n] = epSrc[n], 0 ≤ n < len.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrc or pDst pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

IppStsOverflow

IppStsUnderflow

In real functions, indicates a warning that the function
overflows, that is, at least one of elements of pSrc is greaterthan Ln(FPMAX), where FPMAX is the maximum representablefloating-point number.
In real functions, indicates a warning that the function
underflows, that is, at least one of elements of pSrc is lessthan Ln(FPMIN), where FPMIN is the minimum positive floatingpoint value.

ExampleThe example below shows how to use the function ippsExp.

IppStatus ippsExp_32f_A21_sample(void) {const Ipp32f x[4] = {4.885, -0.543, -3.809, -4.953};
Ipp32f y[4];IppStatus st = ippsExp_32f_A21( x, y, 4 );printf(" ippsExp_32f_A21:\n");printf(" x = %.3f %.3f %.3f %.3f \n", x[0], x[1], x[2], x[3]);printf(" y = %.3f %.3f %.3f %.3f \n", y[0], y[1], y[2], y[3]);return st;
}

387

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Output:ippsExp_32f_A21:
x = 4.885 -0.543 -3.809 -4.953
y = 132.324 0.581 0.022 0.007

Expm1
Computes e raised to the power of each vector
element and decreased by 1.

SyntaxIppStatus ippsExpm1_32f_A11 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsExpm1_32f_A21 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsExpm1_32f_A24 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsExpm1_64f_A26 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsExpm1_64f_A50 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsExpm1_64f_A53 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);

Include Files
ippvm.h

Domain Dependencies
Headers: ippcore.hLibraries: ippcore.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

len

Number of elements in the vectors.

Description
This function computes e raised to the power of each vector element of pSrc and decreased by 1, and storesthe result in the corresponding element of the vector pDst.
For single precision data:
function flavor ippsExpm1_32f_A11 guarantees 11 correctly rounded bits of significand, or at least 3 exact
decimal digits;
function flavor ippsExpm1_32f_A21 guarantees 21 correctly rounded bits of significand, or 4 ulps, or about 6
exact decimal digits;
function flavor ippsExpm1_32f_A24 guarantees 24 correctly rounded bits of significand, including theimplied bit, with the maximum guaranteed error within 1 ulp.
For double precision data:
function flavor ippsExpm1_64f_A26 guarantees 26 correctly rounded bits of significand, or 6.7E+7 ulps, orapproximately 8 exact decimal digits;388

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

function flavor ippsExpm1_64f_A50 guarantees 50 correctly rounded bits of significand, or 4 ulps, orapproximately 15 exact decimal digits;
function flavor ippsExpm1_64f_A53 guarantees 53 correctly rounded bits of significand, including theimplied bit, with the maximum guaranteed error within 1 ulp.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrc or pDst pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

IppStsOverflow

Indicates a warning that the function overflows, that is, at least
one of elements of pSrc is greater than Ln(FPMAX), where
FPMAX is the maximum representable floating-point number.

Ln
Computes natural logarithm of each vector element.

SyntaxIppStatus ippsLn_32f_A11 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsLn_32f_A21 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsLn_32f_A24 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsLn_64f_A26 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsLn_64f_A50 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsLn_64f_A53 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsLn_32fc_A11 (const Ipp32fc* pSrc, Ipp32fc* pDst, Ipp32s len);
IppStatus ippsLn_32fc_A21 (const Ipp32fc* pSrc, Ipp32fc* pDst, Ipp32s len);
IppStatus ippsLn_32fc_A24 (const Ipp32fc* pSrc, Ipp32fc* pDst, Ipp32s len);
IppStatus ippsLn_64fc_A26 (const Ipp64fc* pSrc, Ipp64fc* pDst, Ipp32s len);
IppStatus ippsLn_64fc_A50 (const Ipp64fc* pSrc, Ipp64fc* pDst, Ipp32s len);
IppStatus ippsLn_64fc_A53 (const Ipp64fc* pSrc, Ipp64fc* pDst, Ipp32s len);

Include Files
ippvm.h

Domain Dependencies
Headers: ippcore.hLibraries: ippcore.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

len

Number of elements in the vectors.

389

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Description
This function computes a natural logarithm of each element of pSrc and stores the result in thecorresponding element of pDst.
For single precision data:
function flavors ippsLn_32f_A11and ippsLn_32cf_A11 guarantee 11 correctly rounded bits of significand,or at least 3 exact decimal digits;
function flavors ippsLn_32f_A21 and ippsLn_32fc_A21 guarantee 21 correctly rounded bits of significand,or 4 ulps, or about 6 exact decimal digits;
function flavors ippsLn_32f_A24 and ippsLn_32fc_A24 guarantee 24 correctly rounded bits of significand,including the implied bit, with the maximum guaranteed error within 1 ulp.
For double precision data:
function flavors ippsLn_64f_A26 and ippsLn_64fc_A26 guarantee 26 correctly rounded bits of significand,or 6.7E+7 ulps, or approximately 8 exact decimal digits;
function flavors ippsLn_64f_A50 and ippsLn_64fc_A50 guarantee 50 correctly rounded bits of significand,or 4 ulps, or approximately 15 exact decimal digits;
function flavors ippsLn_64f_A53 and ippsLn_64fc_A53 guarantee 53 correctly rounded bits of significand,including the implied bit, with the maximum guaranteed error within 1 ulp.
The computation is performed as follows:

pDst[n] = loge(pSrc[n]), 0 ≤ n < len.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrc or pDst pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

IppStsDomain

IppStsSingularity

In real functions, indicates a warning that the argument is outof the function domain, that is, at least one of the elements ofpSrc is less than 0.
In real functions, indicates a warning that the argument is the
singularity point, that is, at least one of the elements of pSrc is
equal to 0.

ExampleThe example below shows how to use the function ippsLn.

IppStatus ippsLn_32f_A21_sample(void) {const Ipp32f x[4] = {0.188, 3.841, 5.363, 5.755};
Ipp32f y[4];IppStatus st = ippsLn_32f_A21( x, y, 4 );printf(" ippsLn_32f_A21:\n");printf(" x = %.3f %.3f %.3f %.3f \n", x[0], x[1], x[2], x[3]);printf(" y = %.3f %.3f %.3f %.3f \n", y[0], y[1], y[2], y[3]);return st;
}

390

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Output:ippsLn_32f_A21:
x = 0.188 3.841 5.363 5.755
y = -1.670 1.346 1.680 1.750

Log10
Computes common logarithm of each vector element.

SyntaxIppStatus ippsLog10_32f_A11 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsLog10_32f_A21 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsLog10_32f_A24 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsLog10_64f_A26 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsLog10_64f_A50 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsLog10_64f_A53 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsLog10_32fc_A11 (const Ipp32fc* pSrc, Ipp32fc* pDst, Ipp32s len);
IppStatus ippsLog10_32fc_A21 (const Ipp32fc* pSrc, Ipp32fc* pDst, Ipp32s len);
IppStatus ippsLog10_32fc_A24 (const Ipp32fc* pSrc, Ipp32fc* pDst, Ipp32s len);
IppStatus ippsLog10_64fc_A26 (const Ipp64fc* pSrc, Ipp64fc* pDst, Ipp32s len);
IppStatus ippsLog10_64fc_A50 (const Ipp64fc* pSrc, Ipp64fc* pDst, Ipp32s len);
IppStatus ippsLog10_64fc_A53 (const Ipp64fc* pSrc, Ipp64fc* pDst, Ipp32s len);

Include Files
ippvm.h

Domain Dependencies
Headers: ippcore.hLibraries: ippcore.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

len

Number of elements in the vectors.

Description
This function computes a natural logarithm of each element of pSrc and stores the result in thecorresponding element of pDst.
For single precision data:
function flavors ippsLog10_32f_A11and ippsLog10_32cf_A11 guarantee 11 correctly rounded bits ofsignificand, or at least 3 exact decimal digits;
function flavors ippsLog10_32f_A21 and ippsLog10_32fc_A21 guarantee 21 correctly rounded bits ofsignificand, or 4 ulps, or about 6 exact decimal digits;

391

1

Intel® Integrated Performance Primitives Developer Guide and Referencefunction flavors ippsLog10_32f_A24 and ippsLog10_32fc_A24 guarantee 24 correctly rounded bits ofsignificand, including the implied bit, with the maximum guaranteed error within 1 ulp.
For double precision data:
function flavors ippsLog10_64f_A26 and ippsLog10_64fc_A26 guarantee 26 correctly rounded bits ofsignificand, or 6.7E+7 ulps, or approximately 8 exact decimal digits;
function flavors ippsLog10_64f_A50 and ippsLog10_64fc_A50 guarantee 50 correctly rounded bits ofsignificand, or 4 ulps, or approximately 15 exact decimal digits;
function flavors ippsLog10_64f_A53 and ippsLog10_64fc_A53 guarantee 53 correctly rounded bits ofsignificand, including the implied bit, with the maximum guaranteed error within 1 ulp.
The computation is performed as follows:

pDst[n] = log10(pSrc[n]), 0 ≤ n < len.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrc or pDst pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

IppStsDomain

IppStsSingularity

In real functions, indicates a warning that the argument is outof the function domain, that is, at least one of the elements ofpSrc is less than 0.
In real functions, indicates a warning that the argument is the
singularity point, that is, at least one of the elements of pSrc is
equal to 0.

ExampleThe example below shows how to use the function ippsLog10.

IppStatus ippsLog10_32f_A21_sample(void) {const Ipp32f x[4] = {6.057, 6.111, 1.746, 6.664};
Ipp32f y[4];IppStatus st = ippsLog10_32f_A21( x, y, 4 );printf(" ippsLog10_32f_A21:\n");printf(" x = %.3f %.3f %.3f %.3f \n", x[0], x[1], x[2], x[3]);printf(" y = %.3f %.3f %.3f %.3f \n", y[0], y[1], y[2], y[3]);return st;}
Output:ippsLog10_32f_A21:
x = 6.057 6.111 1.746 6.664
y = 0.782 0.786 0.242 0.824

Log1p
Computes natural logarithm of each vector element
decreased by 1.

SyntaxIppStatus ippsLog1p_32f_A11 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);392

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

IppStatus ippsLog1p_32f_A21 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsLog1p_32f_A24 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsLog1p_64f_A26 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsLog1p_64f_A50 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsLog1p_64f_A53 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);

Include Files
ippvm.h

Domain Dependencies
Headers: ippcore.hLibraries: ippcore.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

len

Number of elements in the vectors.

Description
This function computes a natural logarithm of each vector element of pSrc decreased by 1, and stores theresult in the corresponding element of the vector pDst.
For single precision data:
function flavor ippsLog1p_32f_A11 guarantees 11 correctly rounded bits of significand, or at least 3 exact
decimal digits;
function flavor ippsLog1p_32f_A21 guarantees 21 correctly rounded bits of significand, or 4 ulps, or about 6
exact decimal digits;
function flavor ippsLog1p_32f_A24 guarantees 24 correctly rounded bits of significand, including theimplied bit, with the maximum guaranteed error within 1 ulp.
For double precision data:
function flavor ippsLog1p_64f_A26 guarantees 26 correctly rounded bits of significand, or 6.7E+7 ulps, orapproximately 8 exact decimal digits;
function flavor ippsLog1p_64f_A50 guarantees 50 correctly rounded bits of significand, or 4 ulps, orapproximately 15 exact decimal digits;
function flavor ippsLog1p_64f_A53 guarantees 53 correctly rounded bits of significand, including theimplied bit, with the maximum guaranteed error within 1 ulp.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrc or pDst pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

IppStsDomain

Indicates a warning that the argument is out of the function
domain, that is, at least one of the elements of pSrc is lessthan -1.
393

1Intel® Integrated Performance Primitives Developer Guide and Reference

IppStsSingularity

Indicates a warning that the argument is the singularity point,that is, at least one of the elements of pSrc is equal to -1.

Trigonometric Functions
Cos
Computes cosine of each vector element.

SyntaxIppStatus ippsCos_32f_A11 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsCos_32f_A21 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsCos_32f_A24 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsCos_64f_A26 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsCos_64f_A50 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsCos_64f_A53 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsCos_32fc_A11 (const Ipp32fc* pSrc, Ipp32fc* pDst, Ipp32s len);
IppStatus ippsCos_32fc_A21 (const Ipp32fc* pSrc, Ipp32fc* pDst, Ipp32s len);
IppStatus ippsCos_32fc_A24 (const Ipp32fc* pSrc, Ipp32fc* pDst, Ipp32s len);
IppStatus ippsCos_64fc_A26 (const Ipp64fc* pSrc, Ipp64fc* pDst, Ipp32s len);
IppStatus ippsCos_64fc_A50 (const Ipp64fc* pSrc, Ipp64fc* pDst, Ipp32s len);
IppStatus ippsCos_64fc_A53 (const Ipp64fc* pSrc, Ipp64fc* pDst, Ipp32s len);

Include Files
ippvm.h

Domain Dependencies
Headers: ippcore.hLibraries: ippcore.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

len

Number of elements in the vectors.

Description
This function computes a cosine of each element of pSrc, and stores the result in the corresponding elementof pDst.
For single precision data:
function flavors ippsCos_32f_A11and ippsCos_32cf_A11 guarantee 11 correctly rounded bits ofsignificand, or at least 3 exact decimal digits;
function flavors ippsCos_32f_A21 and ippsCos_32fc_A21 guarantee 21 correctly rounded bits ofsignificand, or 4 ulps, or about 6 exact decimal digits;394

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

function flavors ippsCos_32f_A24 and ippsCos_32fc_A24 guarantee 24 correctly rounded bits ofsignificand, including the implied bit, with the maximum guaranteed error within 1 ulp.
For double precision data:
function flavors ippsCos_64f_A26 and ippsCos_64fc_A26 guarantee 26 correctly rounded bits ofsignificand, or 6.7E+7 ulps, or approximately 8 exact decimal digits;
function flavors ippsCos_64f_A50 and ippsCos_64fc_A50 guarantee 50 correctly rounded bits ofsignificand, or 4 ulps, or approximately 15 exact decimal digits;
function flavors ippsCos_64f_A53 and ippsCos_64fc_A53 guarantee 53 correctly rounded bits ofsignificand, including the implied bit, with the maximum guaranteed error within 1 ulp.
The computation is performed as follows:

pDst[n] = cos(pSrc[n]), 0 ≤ n < len.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrc or pDst pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

IppStsDomain

In real functions, indicates a warning that the argument is outof the function domain, that is, at least one of the elements ofpSrc is equal to ± INF.

ExampleThe example below shows how to use the function ippsCos.

IppStatus ippsCos_32f_A21_sample(void) {const Ipp32f x[4] = {-984.222, -2957.549, -8859.218, 2153.691};
Ipp32f y[4];IppStatus st = ippsCos_32f_A21( x, y, 4 );printf(" ippsCos_32f_A21:\n");printf(" x = %.3f %.3f %.3f %.3f \n", x[0], x[1], x[2], x[3]);printf(" y = %.3f %.3f %.3f %.3f \n", y[0], y[1], y[2], y[3]);return st;}
Output:ippsCos_32f_A21:
x = -984.222 -2957.549 -8859.218 2153.691
y = -0.619 -0.258 0.997 0.129

Sin
Computes sine of each vector element.

SyntaxIppStatus ippsSin_32f_A11 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsSin_32f_A21 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsSin_32f_A24 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);

395

1

Intel® Integrated Performance Primitives Developer Guide and Reference

IppStatus ippsSin_64f_A26 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsSin_64f_A50 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsSin_64f_A53 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsSin_32fc_A11 (const Ipp32fc* pSrc, Ipp32fc* pDst, Ipp32s len);
IppStatus ippsSin_32fc_A21 (const Ipp32fc* pSrc, Ipp32fc* pDst, Ipp32s len);
IppStatus ippsSin_32fc_A24 (const Ipp32fc* pSrc, Ipp32fc* pDst, Ipp32s len);
IppStatus ippsSin_64fc_A26 (const Ipp64fc* pSrc, Ipp64fc* pDst, Ipp32s len);
IppStatus ippsSin_64fc_A50 (const Ipp64fc* pSrc, Ipp64fc* pDst, Ipp32s len);
IppStatus ippsSin_64fc_A53 (const Ipp64fc* pSrc, Ipp64fc* pDst, Ipp32s len);

Include Files
ippvm.h

Domain Dependencies
Headers: ippcore.hLibraries: ippcore.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

len

Number of elements in the vectors.

Description
This function computes a sine of each element of pSrc, and stores the result in the corresponding element ofpDst.
For single precision data:
function flavors ippsSin_32f_A11and ippsSin_32fc_A11 guarantee 11 correctly rounded bits ofsignificand, or at least 3 exact decimal digits;
function flavors ippsSin_32f_A21 and ippsSin_32fc_A21 guarantee 21 correctly rounded bits ofsignificand, or 4 ulps, or about 6 exact decimal digits;
function flavors ippsSin_32f_A24 and ippsSin_32fc_A24 guarantee 24 correctly rounded bits ofsignificand, including the implied bit, with the maximum guaranteed error within 1 ulp.
For double precision data:
function flavors ippsSin_64f_A26 and ippsSin_64fc_A26 guarantee 26 correctly rounded bits ofsignificand, or 6.7E+7 ulps, or approximately 8 exact decimal digits;
function flavors ippsSin_64f_A50 and ippsSin_64fc_A50 guarantee 50 correctly rounded bits ofsignificand, or 4 ulps, or approximately 15 exact decimal digits;
function flavors ippsSin_64f_A53 and ippsSin_64fc_A53 guarantee 53 correctly rounded bits ofsignificand, including the implied bit, with the maximum guaranteed error within 1 ulp.
The computation is performed as follows:

pDst[n] = sin(pSrc[n]), 0 ≤ n < len.

396

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrc or pDst pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

IppStsDomain

In real functions, indicates a warning that the argument is outof the function domain, that is, at least one of the elements ofpSrc is equal to ± INF.

ExampleThe example below shows how to use the function ippsSin.

IppStatus ippsSin_32f_A21_sample(void) {const Ipp32f x[4] = {5666.372, 6052.125, 397.656, -3960.997};
Ipp32f y[4];IppStatus st = ippsSin_32f_A21( x, y, 4 );printf(" ippsSin_32f_A21:\n");printf(" x = %.3f %.3f %.3f %.3f \n", x[0], x[1], x[2], x[3]);printf(" y = %.3f %.3f %.3f %.3f \n", y[0], y[1], y[2], y[3]);return st;}
Output:ippsSin_32f_A21:
x = 5666.372 6052.125 397.656 -3960.997
y = -0.873 0.988 0.970 -0.524

SinCosComputes sine and cosine of each vector element.

SyntaxIppStatus ippsSinCos_32f_A11 (const Ipp32f* pSrc, Ipp32f* pDst1, Ipp32f* pDst2, Ipp32s
len);
IppStatus ippsSinCos_32f_A21 (const Ipp32f* pSrc, Ipp32f* pDst1, Ipp32f* pDst2, Ipp32s
len);
IppStatus ippsSinCos_32f_A24 (const Ipp32f* pSrc, Ipp32f* pDst1, Ipp32f* pDst2, Ipp32s
len);
IppStatus ippsSinCos_64f_A26 (const Ipp64f* pSrc, Ipp64f* pDst1, Ipp64f* pDst2, Ipp32s
len);
IppStatus ippsSinCos_64f_A50 (const Ipp64f* pSrc, Ipp64f* pDst1, Ipp64f* pDst2, Ipp32s
len);
IppStatus ippsSinCos_64f_A53 (const Ipp64f* pSrc, Ipp64f* pDst1, Ipp64f* pDst2, Ipp32s
len);Include Files
ippvm.h397

1Intel® Integrated Performance Primitives Developer Guide and Reference

Domain Dependencies
Headers: ippcore.hLibraries: ippcore.lib

Parameters
pSrc

Pointer to the first source vector.

pDst1

Pointer to the destination vector for sine values.

pDst2

Pointer to the destination vector for cosine values.

len

Number of elements in the vectors.

Description
This function computes sine of each element of pSrc and stores the result in the corresponding element of
pDst1; computes cosine of each element of pSrc and stores the result in the corresponding element of
pDst2.
For single precision data:
function flavor ippsSinCos_32f_A11 guarantees 11 correctly rounded bits of significand, or at least 3 exact
decimal digits;
function flavor ippsSinCos_32f_A21 guarantees 21 correctly rounded bits of significand, or 4 ulps, or about
6 exact decimal digits;
function flavor ippsSinCos_32f_A24 guarantees 24 correctly rounded bits of significand, including theimplied bit, with the maximum guaranteed error within 1 ulp.
For double precision data:
function flavor ippsSinCos_64f_A26 guarantees 26 correctly rounded bits of significand, or 6.7E+7 ulps, orapproximately 8 exact decimal digits;
function flavor ippsSinCos_64f_A50 guarantees 50 correctly rounded bits of significand, or 4 ulps, orapproximately 15 exact decimal digits;
function flavor ippsSinCos_64f_A53 guarantees 53 correctly rounded bits of significand, including theimplied bit, with the maximum guaranteed error within 1 ulp.
The computation is performed as follows:

pDst1[n] = sin(pSrc[n]), pDst2[n] = cos(pSrc[n]), 0 ≤ n < len.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pDst1 or pDst2 or pSrc pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

IppStsDomain

398

In real functions, indicates a warning that the argument is outof the function domain, that is, at least one of the pSrc
elements is equal to ± INF.

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

ExampleThe example below shows how to use the function ippsSinCos.

IppStatus ippsSinCos_32f_A21_sample(void) {const Ipp32f x[4] = {3857.845, -3939.024, -1468.856, -8592.486};
Ipp32f y1[4];Ipp32f y2[4];IppStatus st = ippsSinCos_32f_A21( x, y1, y2, 4 );printf(" ippsSinCos_32f_A21:\n");printf(" x = %.3f %.3f %.3f %.3f \n", x[0], x[1], x[2], x[3]);printf(" y1 = %.3f %.3f %.3f %.3f \n", y1[0], y1[1], y1[2], y1[3]);printf(" y2 = %.3f %.3f %.3f %.3f \n", y2[0], y2[1], y2[2], y2[3]);return st;}
Output results:

ippsSinCos_32f_A21:
x = 3857.845 -3939.024 -1468.856 -8592.486
y1 = -0.031 0.508 0.987 0.228
y2 = 1.000 0.861 0.161 -0.974

CIS
Computes complex exponent of each vector element.

SyntaxIppStatus ippsCIS_32fc_A11 (const Ipp32f* pSrc, Ipp32fc* pDst, Ipp32s len);
IppStatus ippsCIS_32fc_A21 (const Ipp32f* pSrc, Ipp32fc* pDst, Ipp32s len);
IppStatus ippsCIS_32fc_A24 (const Ipp32f* pSrc, Ipp32fc* pDst, Ipp32s len);
IppStatus ippsCIS_64fc_A26 (const Ipp64f* pSrc, Ipp64fc* pDst, Ipp32s len);
IppStatus ippsCIS_64fc_A50 (const Ipp64f* pSrc, Ipp64fc* pDst, Ipp32s len);
IppStatus ippsCIS_64fc_A53 (const Ipp64f* pSrc, Ipp64fc* pDst, Ipp32s len);

Include Files
ippvm.h

Domain Dependencies
Headers: ippcore.hLibraries: ippcore.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

len

Number of elements in the vectors.

Description
This function computes a complex exponent of each vector element of pSrc and stores the result in thecorresponding element of the vector pDst.

399

1

Intel® Integrated Performance Primitives Developer Guide and Reference

For single precision data:
function flavor ippsCIS_32fc_A11 guarantees 11 correctly rounded bits of significand, or at least 3 exact
decimal digits;
function flavor ippsCIS_32fc_A21 guarantees 21 correctly rounded bits of significand, or 4 ulps, or about 6
exact decimal digits;
function flavor ippsCIS_32fc_A24 guarantees 24 correctly rounded bits of significand, including the implied
bit, with the maximum guaranteed error within 1 ulp.
For double precision data:
function flavor ippsCIS_64fc_A26 guarantees 26 correctly rounded bits of significand, or 6.7E+7 ulps, orapproximately 8 exact decimal digits;
function flavor ippsCIS_64fc_A50 guarantees 50 correctly rounded bits of significand, or 4 ulps, orapproximately 15 exact decimal digits;
function flavor ippsCIS_64fc_A53 guarantees 53 correctly rounded bits of significand, including the implied
bit, with the maximum guaranteed error within 1 ulp.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrc or pDst pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

ippStsDomain

Indicates a warning that the argument is out of the function
domain, that is, at least one of the pSrc elements is equal to
±INF.

Tan
Computes tangent of each vector element.

SyntaxIppStatus ippsTan_32f_A11 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsTan_32f_A21 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsTan_32f_A24 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsTan_64f_A26 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsTan_64f_A50 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsTan_64f_A53 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsTan_32fc_A11 (const Ipp32fc* pSrc, Ipp32fc* pDst, Ipp32s len);
IppStatus ippsTan_32fc_A21 (const Ipp32fc* pSrc, Ipp32fc* pDst, Ipp32s len);
IppStatus ippsTan_32fc_A24 (const Ipp32fc* pSrc, Ipp32fc* pDst, Ipp32s len);
IppStatus ippsTan_64fc_A26 (const Ipp64fc* pSrc, Ipp64fc* pDst, Ipp32s len);
IppStatus ippsTan_64fc_A50 (const Ipp64fc* pSrc, Ipp64fc* pDst, Ipp32s len);
IppStatus ippsTan_64fc_A53 (const Ipp64fc* pSrc, Ipp64fc* pDst, Ipp32s len);

Include Files
ippvm.h400

1Developer Guide and Reference for Intel® Integrated Performance Primitives

Domain Dependencies
Headers: ippcore.hLibraries: ippcore.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

len

Number of elements in the vectors.

Description
This function computes the tangent of each element of pSrc, and stores the result in the corresponding
element of pDst.
For single precision data:
function flavors ippsTan_32f_A11and ippsTan_32cf_A11 guarantee 11 correctly rounded bits ofsignificand, or at least 3 exact decimal digits;
function flavors ippsTan_32f_A21 and ippsTan_32fc_A21 guarantee 21 correctly rounded bits ofsignificand, or 4 ulps, or about 6 exact decimal digits;
function flavors ippsTan_32f_A24 and ippsTan_32fc_A24 guarantee 24 correctly rounded bits ofsignificand, including the implied bit, with the maximum guaranteed error within 1 ulp.
For double precision data:
function flavors ippsTan_64f_A26 and ippsTan_64fc_A26 guarantee 26 correctly rounded bits ofsignificand, or 6.7E+7 ulps, or approximately 8 exact decimal digits;
function flavors ippsTan_64f_A50 and ippsTan_64fc_A50 guarantee 50 correctly rounded bits ofsignificand, or 4 ulps, or approximately 15 exact decimal digits;
function flavors ippsTan_64f_A53 and ippsTan_64fc_A53 guarantee 53 correctly rounded bits ofsignificand, including the implied bit, with the maximum guaranteed error within 1 ulp.
The computation is performed as follows:

pDst[n] = tan(pSrc[n]), 0 ≤ n < len.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrc or pDst pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

IppStsDomain

In real functions, indicates a warning that the argument is outof the function domain, that is, at least one of the elements ofpSrc is equal to ± INF.

ExampleThe example below shows how to use the function ippsTan.

IppStatus ippsTan_32f_A21_sample(void) {const Ipp32f x[4] = {7519.456, 4533.524, 9118.015, 8514.359};
Ipp32f y[4];

401

1

Intel® Integrated Performance Primitives Developer Guide and Reference

IppStatus st = ippsTan_32f_A21( x, y, 4 );printf(" ippsTan_32f_A21:\n");printf(" x = %.3f %.3f %.3f %.3f \n", x[0], x[1], x[2], x[3]);printf(" y = %.3f %.3f %.3f %.3f \n", y[0], y[1], y[2], y[3]);return st;}
Output:ippsTan_32f_A21:
x = 7519.456 4533.524 9118.015 8514.359
y = -18.656 0.209 2.028 0.750

Acos
Computes inverse cosine of each vector element.

SyntaxIppStatus ippsAcos_32f_A11 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsAcos_32f_A21 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsAcos_32f_A24 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsAcos_64f_A26 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsAcos_64f_A50 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsAcos_64f_A53 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsAcos_32fc_A11 (const Ipp32fc* pSrc, Ipp32fc* pDst, Ipp32s len);
IppStatus ippsAcos_32fc_A21 (const Ipp32fc* pSrc, Ipp32fc* pDst, Ipp32s len);
IppStatus ippsAcos_32fc_A24 (const Ipp32fc* pSrc, Ipp32fc* pDst, Ipp32s len);
IppStatus ippsAcos_64fc_A26 (const Ipp64fc* pSrc, Ipp64fc* pDst, Ipp32s len);
IppStatus ippsAcos_64fc_A50 (const Ipp64fc* pSrc, Ipp64fc* pDst, Ipp32s len);
IppStatus ippsAcos_64fc_A53 (const Ipp64fc* pSrc, Ipp64fc* pDst, Ipp32s len);

Include Files
ippvm.h

Domain Dependencies
Headers: ippcore.hLibraries: ippcore.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

len

Number of elements in the vectors.

402

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Description
This function computes the inverse cosine of each element of pSrc, and stores the result in thecorresponding element of pDst.
For single precision data:
function flavors ippsAcos_32f_A11and ippsAcos_32cf_A11 guarantee 11 correctly rounded bits ofsignificand, or at least 3 exact decimal digits;
function flavors ippsAcos_32f_A21 and ippsAcos_32fc_A21 guarantee 21 correctly rounded bits ofsignificand, or 4 ulps, or about 6 exact decimal digits;
function flavors ippsAcos_32f_A24 and ippsAcos_32fc_A24 guarantee 24 correctly rounded bits ofsignificand, including the implied bit, with the maximum guaranteed error within 1 ulp.
For double precision data:
function flavors ippsAcos_64f_A26 and ippsAcos_64fc_A26 guarantee 26 correctly rounded bits ofsignificand, or 6.7E+7 ulps, or approximately 8 exact decimal digits;
function flavors ippsAcos_64f_A50 and ippsAcos_64fc_A50 guarantee 50 correctly rounded bits ofsignificand, or 4 ulps, or approximately 15 exact decimal digits;
function flavors ippsAcos_64f_A53 and ippsAcos_64fc_A53 guarantee 53 correctly rounded bits ofsignificand, including the implied bit, with the maximum guaranteed error within 1 ulp.
The computation is performed as follows:

pDst[n] = acos(pSrc[n]), 0 ≤ n < len.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrc or pDst pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

IppStsDomain

In real functions, indicates a warning that the argument is outof the function domain, that is, at least one of the elements ofpSrc has an absolute value greater than 1.

ExampleThe example below shows how to use the function ippsAcos.

IppStatus ippsAcos_32f_A21_sample(void) {const Ipp32f x[4] = {0.079, -0.715, -0.076, -0.529};
Ipp32f y[4];IppStatus st = ippsAcos_32f_A21( x, y, 4 );printf(" ippsAcos_32f_A21:\n");printf(" x = %.3f %.3f %.3f %.3f \n", x[0], x[1], x[2], x[3]);printf(" y = %.3f %.3f %.3f %.3f \n", y[0], y[1], y[2], y[3]);return st;
}

403

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Output:ippsAcos_32f_A21:
x = 0.079 -0.715 -0.076 -0.529
y = 1.492 2.368 1.647 2.129

Asin
Computes inverse sine of each vector element.

SyntaxIppStatus ippsAsin_32f_A11 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsAsin_32f_A21 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsAsin_32f_A24 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsAsin_64f_A26 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsAsin_64f_A50 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsAsin_64f_A53 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsAsin_32fc_A11 (const Ipp32fc* pSrc, Ipp32fc* pDst, Ipp32s len);
IppStatus ippsAsin_32fc_A21 (const Ipp32fc* pSrc, Ipp32fc* pDst, Ipp32s len);
IppStatus ippsAsin_32fc_A24 (const Ipp32fc* pSrc, Ipp32fc* pDst, Ipp32s len);
IppStatus ippsAsin_64fc_A26 (const Ipp64fc* pSrc, Ipp64fc* pDst, Ipp32s len);
IppStatus ippsAsin_64fc_A50 (const Ipp64fc* pSrc, Ipp64fc* pDst, Ipp32s len);
IppStatus ippsAsin_64fc_A53 (const Ipp64fc* pSrc, Ipp64fc* pDst, Ipp32s len);

Include Files
ippvm.h

Domain Dependencies
Headers: ippcore.hLibraries: ippcore.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

len

Number of elements in the vectors.

Description
This function computes the inverse sine of each element of pSrc, and stores the result in the corresponding
element of pDst.
For single precision data:
function flavors ippsAsin_32f_A11and ippsAsin_32cf_A11 guarantee 11 correctly rounded bits ofsignificand, or at least 3 exact decimal digits;
function flavors ippsAsin_32f_A21 and ippsAsin_32fc_A21 guarantee 21 correctly rounded bits ofsignificand, or 4 ulps, or about 6 exact decimal digits;404

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

function flavors ippsAsin_32f_A24 and ippsAsin_32fc_A24 guarantee 24 correctly rounded bits ofsignificand, including the implied bit, with the maximum guaranteed error within 1 ulp.
For double precision data:
function flavors ippsAsin_64f_A26 and ippsAsin_64fc_A26 guarantee 26 correctly rounded bits ofsignificand, or 6.7E+7 ulps, or approximately 8 exact decimal digits;
function flavors ippsAsin_64f_A50 and ippsAsin_64fc_A50 guarantee 50 correctly rounded bits ofsignificand, or 4 ulps, or approximately 15 exact decimal digits;
function flavors ippsAsin_64f_A53 and ippsAsin_64fc_A53 guarantee 53 correctly rounded bits ofsignificand, including the implied bit, with the maximum guaranteed error within 1 ulp.
The computation is performed as follows:

pDst[n] = asin(pSrc[n]), 0 ≤ n < len.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrc or pDst pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

IppStsDomain

In real functions, indicates a warning that the argument is outof the function domain, that is, at least one of the elements ofpSrc has an absolute value greater than 1.

ExampleThe example below shows how to use the function ippsAsin.

IppStatus ippsAsin_32f_A21_sample(void) {const Ipp32f x[4] = {0.724, -0.581, 0.559, 0.687};
Ipp32f y[4];IppStatus st = ippsAsin_32f_A21( x, y, 4 );printf(" ippsAsin_32f_A21:\n");printf(" x = %.3f %.3f %.3f %.3f \n", x[0], x[1], x[2], x[3]);printf(" y = %.3f %.3f %.3f %.3f \n", y[0], y[1], y[2], y[3]);return st;}
Output:ippsAsin_32f_A21:
x = 0.724 -0.581 0.559 0.687
y = 0.810 -0.620 0.594 0.758

Atan
Computes inverse tangent of each vector element.

SyntaxIppStatus ippsAtan_32f_A11 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsAtan_32f_A21 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsAtan_32f_A24 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);

405

1

Intel® Integrated Performance Primitives Developer Guide and Reference

IppStatus ippsAtan_64f_A26 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsAtan_64f_A50 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsAtan_64f_A53 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsAtan_32fc_A11 (const Ipp32fc* pSrc, Ipp32fc* pDst, Ipp32s len);
IppStatus ippsAtan_32fc_A21 (const Ipp32fc* pSrc, Ipp32fc* pDst, Ipp32s len);
IppStatus ippsAtan_32fc_A24 (const Ipp32fc* pSrc, Ipp32fc* pDst, Ipp32s len);
IppStatus ippsAtan_64fc_A26 (const Ipp64fc* pSrc, Ipp64fc* pDst, Ipp32s len);
IppStatus ippsAtan_64fc_A50 (const Ipp64fc* pSrc, Ipp64fc* pDst, Ipp32s len);
IppStatus ippsAtan_64fc_A53 (const Ipp64fc* pSrc, Ipp64fc* pDst, Ipp32s len);

Include Files
ippvm.h

Domain Dependencies
Headers: ippcore.hLibraries: ippcore.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

len

Number of elements in the vectors.

Description
This function computes the inverse tangent of each element of pSrc, and stores the result in thecorresponding element of pDst.
For single precision data:
function flavors ippsAtan_32f_A11and ippsAtan_32cf_A11 guarantee 11 correctly rounded bits ofsignificand, or at least 3 exact decimal digits;
function flavors ippsAtan_32f_A21 and ippsAtan_32fc_A21 guarantee 21 correctly rounded bits ofsignificand, or 4 ulps, or about 6 exact decimal digits;
function flavors ippsAtan_32f_A24 and ippsAtan_32fc_A24 guarantee 24 correctly rounded bits ofsignificand, including the implied bit, with the maximum guaranteed error within 1 ulp.
For double precision data:
function flavors ippsAtan_64f_A26 and ippsAtan_64fc_A26 guarantee 26 correctly rounded bits ofsignificand, or 6.7E+7 ulps, or approximately 8 exact decimal digits;
function flavors ippsAtan_64f_A50 and ippsAtan_64fc_A50 guarantee 50 correctly rounded bits ofsignificand, or 4 ulps, or approximately 15 exact decimal digits;
function flavors ippsAtan_64f_A53 and ippsAtan_64fc_A53 guarantee 53 correctly rounded bits ofsignificand, including the implied bit, with the maximum guaranteed error within 1 ulp.
The computation is performed as follows:

pDst[n] = atan(pSrc[n]), 0 ≤ n < len.

406

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrc or pDst pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

ExampleThe example below shows how to use the function ippsAtan.

IppStatus ippsAtan_32f_A21_sample(void) {const Ipp32f x[4] = {0.994, 0.999, 0.223, -0.215};
Ipp32f y[4];IppStatus st = ippsAtan_32f_A21( x, y, 4 );printf(" ippsAtan_32f_A21:\n");printf(" x = %.3f %.3f %.3f %.3f \n", x[0], x[1], x[2], x[3]);printf(" y = %.3f %.3f %.3f %.3f \n", y[0], y[1], y[2], y[3]);return st;}
Output:ippsAtan_32f_A21:
x = 0.994 0.999 0.223 -0.215
y = 0.782 0.785 0.219 -0.212

Atan2
Computes four-quadrant inverse tangent of elementsof two vectors.

SyntaxIppStatus ippsAtan2_32f_A11 (const Ipp32f* pSrc1, const Ipp32f* pSrc2, Ipp32f* pDst,
Ipp32s len);
IppStatus ippsAtan2_32f_A21 (const Ipp32f* pSrc1, const Ipp32f* pSrc2, Ipp32f* pDst,
Ipp32s len);
IppStatus ippsAtan2_32f_A24 (const Ipp32f* pSrc1, const Ipp32f* pSrc2, Ipp32f* pDst,
Ipp32s len);
IppStatus ippsAtan2_64f_A26 (const Ipp64f* pSrc1, const Ipp64f* pSrc2, Ipp64f* pDst,
Ipp32s len);
IppStatus ippsAtan2_64f_A50 (const Ipp64f* pSrc1, const Ipp64f* pSrc2, Ipp64f* pDst,
Ipp32s len);
IppStatus ippsAtan2_64f_A53 (const Ipp64f* pSrc1, const Ipp64f* pSrc2, Ipp64f* pDst,
Ipp32s len);

Include Files
ippvm.h

Domain Dependencies
Headers: ippcore.h

407

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Libraries: ippcore.lib

Parameters
pSrc1

Pointer to the first source vector.

pSrc2

Pointer to the second source vector.

pDst

Pointer to the destination vector.

len

Number of elements in the vectors.

Description
This function computes the angle between the X axis and the line from the origin to the point (X,Y), for eachelement of pSrc1 as a Y (the ordinate) and corresponding element of pSrc2 as an X (the abscissa), andstores the result in the corresponding element of pDst. The result angle varies from - π to + π.
For single precision data:
function flavor ippsAtan2_32f_A11 guarantees 11 correctly rounded bits of significand, or at least 3 exact
decimal digits;
function flavor ippsAtan2_32f_A21 guarantees 21 correctly rounded bits of significand, or 4 ulps, or about 6
exact decimal digits;
function flavor ippsAtan2_32f_A24 guarantees 24 correctly rounded bits of significand, including theimplied bit, with the maximum guaranteed error within 1 ulp.
For double precision data:
function flavor ippsAtan2_64f_A26 guarantees 26 correctly rounded bits of significand, or 6.7E+7 ulps, orapproximately 8 exact decimal digits;
function flavor ippsAtan2_64f_A50 guarantees 50 correctly rounded bits of significand, or 4 ulps, orapproximately 15 exact decimal digits;
function flavor ippsAtan2_64f_A53 guarantees 53 correctly rounded bits of significand, including theimplied bit, with the maximum guaranteed error within 1 ulp.
The computation is performed as follows:

pDst[n] = atan2(pSrc1[n], pSrc2[n]), 0 ≤ n < len.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrc1, pSrc2 or pDst pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

ExampleThe example below shows how to use the function ippsAtan2.

IppStatus ippsAtan2_32f_A21_sample(void) {const Ipp32f x1[4] = {1.492, 1.700, 1.147, 1.142};
const Ipp32f x2[4] = {1.064, 1.505, 1.950, 1.905};
Ipp32f y[4];IppStatus st = ippsAtan2_32f_A21( x1, x2, y, 4 );printf(" ippsAtan2_32f_A21:\n");408

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

printf(" x1 = %.3f %.3f %.3f %.3f \n", x1[0], x1[1], x1[2], x1[3]);printf(" x2 = %.3f %.3f %.3f %.3f \n", x2[0], x2[1], x2[2], x2[3]);printf(" y = %.3f %.3f %.3f %.3f \n", y[0], y[1], y[2], y[3]);return st;}
Output:ippsAtan2_32f_A21:
x1 = 1.492 1.700 1.147 1.142
x2 = 1.064 1.505 1.950 1.905
y = 0.951 0.846 0.532 0.540

Hyperbolic Functions
Cosh
Computes hyperbolic cosine of each vector element.

SyntaxIppStatus ippsCosh_32f_A11 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsCosh_32f_A21 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsCosh_32f_A24 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsCosh_64f_A26 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsCosh_64f_A50 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsCosh_64f_A53 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsCosh_32fc_A11 (const Ipp32fc* pSrc, Ipp32fc* pDst, Ipp32s len);
IppStatus ippsCosh_32fc_A21 (const Ipp32fc* pSrc, Ipp32fc* pDst, Ipp32s len);
IppStatus ippsCosh_32fc_A24 (const Ipp32fc* pSrc, Ipp32fc* pDst, Ipp32s len);
IppStatus ippsCosh_64fc_A26 (const Ipp64fc* pSrc, Ipp64fc* pDst, Ipp32s len);
IppStatus ippsCosh_64fc_A50 (const Ipp64fc* pSrc, Ipp64fc* pDst, Ipp32s len);
IppStatus ippsCosh_64fc_A53 (const Ipp64fc* pSrc, Ipp64fc* pDst, Ipp32s len);

Include Files
ippvm.h

Domain Dependencies
Headers: ippcore.hLibraries: ippcore.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

len

Number of elements in the vectors.

409

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Description
This function computes the hyperbolic cosine of each element of pSrc, and stores the result in thecorresponding element of pDst.
For single precision data:
function flavors ippsCosh_32f_A11and ippsCosh_32cf_A11 guarantee 11 correctly rounded bits ofsignificand, or at least 3 exact decimal digits;
function flavors ippsCosh_32f_A21 and ippsCosh_32fc_A21 guarantee 21 correctly rounded bits ofsignificand, or 4 ulps, or about 6 exact decimal digits;
function flavors ippsCosh_32f_A24 and ippsCosh_32fc_A24 guarantee 24 correctly rounded bits ofsignificand, including the implied bit, with the maximum guaranteed error within 1 ulp.
For double precision data:
function flavors ippsCosh_64f_A26 and ippsCosh_64fc_A26 guarantee 26 correctly rounded bits ofsignificand, or 6.7E+7 ulps, or approximately 8 exact decimal digits;
function flavors ippsCosh_64f_A50 and ippsCosh_64fc_A50 guarantee 50 correctly rounded bits ofsignificand, or 4 ulps, or approximately 15 exact decimal digits;
function flavors ippsCosh_64f_A53 and ippsCosh_64fc_A53 guarantee 53 correctly rounded bits ofsignificand, including the implied bit, with the maximum guaranteed error within 1 ulp.
The computation is performed as follows:

pDst[n] = cosh(pSrc[n]), 0 ≤ n < len.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrc or pDst pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

IppStsOverflow

In real functions, indicates a warning that the function
overflows, that is, at least one of elements of pSrc has theabsolute value greater than Ln(FPMAX) + Ln(2), where FPMAX isthe maximum representable floating-point number.

ExampleThe example below shows how to use the function ippsCosh.

IppStatus ippsCosh_32f_A21_sample(void) {const Ipp32f x[4] = {-4.676, -4.054, 6.803, -9.525};
Ipp32f y[4];IppStatus st = ippsCosh_32f_A21( x, y, 4 );printf(" ippsCosh_32f_A21:\n");printf(" x = %.3f %.3f %.3f %.3f \n", x[0], x[1], x[2], x[3]);printf(" y = %.3f %.3f %.3f %.3f \n", y[0], y[1], y[2], y[3]);return st;}410

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Output:ippsCosh_32f_A21:
x = -4.676 -4.054 6.803 -9.525
y = 53.661 28.833 450.219 6849.870

Sinh
Computes hyperbolic sine of each vector element.

SyntaxIppStatus ippsSinh_32f_A11 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsSinh_32f_A21 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsSinh_32f_A24 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsSinh_64f_A26 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsSinh_64f_A50 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsSinh_64f_A53 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsSinh_32fc_A11 (const Ipp32fc* pSrc, Ipp32fc* pDst, Ipp32s len);
IppStatus ippsSinh_32fc_A21 (const Ipp32fc* pSrc, Ipp32fc* pDst, Ipp32s len);
IppStatus ippsSinh_32fc_A24 (const Ipp32fc* pSrc, Ipp32fc* pDst, Ipp32s len);
IppStatus ippsSinh_64fc_A26 (const Ipp64fc* pSrc, Ipp64fc* pDst, Ipp32s len);
IppStatus ippsSinh_64fc_A50 (const Ipp64fc* pSrc, Ipp64fc* pDst, Ipp32s len);
IppStatus ippsSinh_64fc_A53 (const Ipp64fc* pSrc, Ipp64fc* pDst, Ipp32s len);

Include Files
ippvm.h

Domain Dependencies
Headers: ippcore.hLibraries: ippcore.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

len

Number of elements in the vectors.

Description
This function computes the hyperbolic sine of each element of pSrc, and stores the result in thecorresponding element of pDst.
For single precision data:
function flavors ippsSinh_32f_A11and ippsSinh_32cf_A11 guarantee 11 correctly rounded bits ofsignificand, or at least 3 exact decimal digits;
function flavors ippsSinh_32f_A21 and ippsSinh_32fc_A21 guarantee 21 correctly rounded bits ofsignificand, or 4 ulps, or about 6 exact decimal digits;

411

1

Intel® Integrated Performance Primitives Developer Guide and Referencefunction flavors ippsSinh_32f_A24 and ippsSinh_32fc_A24 guarantee 24 correctly rounded bits ofsignificand, including the implied bit, with the maximum guaranteed error within 1 ulp.
For double precision data:
function flavors ippsSinh_64f_A26 and ippsSinh_64fc_A26 guarantee 26 correctly rounded bits ofsignificand, or 6.7E+7 ulps, or approximately 8 exact decimal digits;
function flavors ippsSinh_64f_A50 and ippsSinh_64fc_A50 guarantee 50 correctly rounded bits ofsignificand, or 4 ulps, or approximately 15 exact decimal digits;
function flavors ippsSinh_64f_A53 and ippsSinh_64fc_A53 guarantee 53 correctly rounded bits ofsignificand, including the implied bit, with the maximum guaranteed error within 1 ulp.
The computation is performed as follows:

pDst[n] = sinh(pSrc[n]), 0 ≤ n < len.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrc or pDst pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

IppStsOverflow

In real functions, indicates a warning that the function
overflows, that is, at least one of elements of pSrc has theabsolute value greater than Ln(FPMAX) + Ln(2), where FPMAX isthe maximum representable floating-point number.

ExampleThe example below shows how to use the function ippsSinh.

IppStatus ippsSinh_32f_A21_sample(void) {const Ipp32f x[4] = {-2.483, -8.148, 3.544, -8.876};
Ipp32f y[4];IppStatus st = ippsSinh_32f_A21( x, y, 4 );printf(" ippsSinh_32f_A21:\n");printf(" x = %.3f %.3f %.3f %.3f \n", x[0], x[1], x[2], x[3]);printf(" y = %.3f %.3f %.3f %.3f \n", y[0], y[1], y[2], y[3]);return st;}
Output:ippsSinh_32f_A21:
x = -2.483 -8.148 3.544 -8.876
y = -5.945 -1727.412 17.290 -3577.970

TanhComputes hyperbolic tangent of each vector element.

SyntaxIppStatus ippsTanh_32f_A11 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsTanh_32f_A21 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsTanh_32f_A24 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);412

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

IppStatus ippsTanh_64f_A26 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsTanh_64f_A50 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsTanh_64f_A53 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsTanh_32fc_A11 (const Ipp32fc* pSrc, Ipp32fc* pDst, Ipp32s len);
IppStatus ippsTanh_32fc_A21 (const Ipp32fc* pSrc, Ipp32fc* pDst, Ipp32s len);
IppStatus ippsTanh_32fc_A24 (const Ipp32fc* pSrc, Ipp32fc* pDst, Ipp32s len);
IppStatus ippsTanh_64fc_A26 (const Ipp64fc* pSrc, Ipp64fc* pDst, Ipp32s len);
IppStatus ippsTanh_64fc_A50 (const Ipp64fc* pSrc, Ipp64fc* pDst, Ipp32s len);
IppStatus ippsTanh_64fc_A53 (const Ipp64fc* pSrc, Ipp64fc* pDst, Ipp32s len);

Include Files
ippvm.h

Domain Dependencies
Headers: ippcore.hLibraries: ippcore.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

len

Number of elements in the vectors.

Description
This function computes the hyperbolic tangent of each element of pSrc and stores the result in thecorresponding element of pDst.
For single precision data:
function flavors ippsTanh_32f_A11and ippsTanh_32cf_A11 guarantee 11 correctly rounded bits ofsignificand, or at least 3 exact decimal digits;
function flavors ippsTanh_32f_A21 and ippsTanh_32fc_A21 guarantee 21 correctly rounded bits ofsignificand, or 4 ulps, or about 6 exact decimal digits;
function flavors ippsTanh_32f_A24 and ippsTanh_32fc_A24 guarantee 24 correctly rounded bits ofsignificand, including the implied bit, with the maximum guaranteed error within 1 ulp.
For double precision data:
function flavors ippsTanh_64f_A26 and ippsTanh_64fc_A26 guarantee 26 correctly rounded bits ofsignificand, or 6.7E+7 ulps, or approximately 8 exact decimal digits;
function flavors ippsTanh_64f_A50 and ippsTanh_64fc_A50 guarantee 50 correctly rounded bits ofsignificand, or 4 ulps, or approximately 15 exact decimal digits;
function flavors ippsTanh_64f_A53 and ippsTanh_64fc_A53 guarantee 53 correctly rounded bits ofsignificand, including the implied bit, with the maximum guaranteed error within 1 ulp.
The computation is performed as follows:

pDst[n] = tanh(pSrc[n]), 0 ≤ n < len.

413

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrc or pDst pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

ExampleThe example below shows how to use the function ippsTanh.

IppStatus ippsTanh_32f_A21_sample(void) {const Ipp32f x[4] = {-0.982, 0.838, -0.448, -0.454};
Ipp32f y[4];IppStatus st = ippsTanh_32f_A21( x, y, 4 );printf(" ippsTanh_32f_A21:\n");printf(" x = %.3f %.3f %.3f %.3f \n", x[0], x[1], x[2], x[3]);printf(" y = %.3f %.3f %.3f %.3f \n", y[0], y[1], y[2], y[3]);return st;}
Output:ippsTanh_32f_A21:
x = -0.982 0.838 -0.448 -0.454
y = -0.754 0.685 -0.420 -0.425

AcoshComputes inverse hyperbolic cosine of each vector
element.

SyntaxIppStatus ippsAcosh_32f_A11 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsAcosh_32f_A21 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsAcosh_32f_A24 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsAcosh_64f_A26 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsAcosh_64f_A50 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsAcosh_64f_A53 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsAcosh_32fc_A11 (const Ipp32fc* pSrc, Ipp32fc* pDst, Ipp32s len);
IppStatus ippsAcosh_32fc_A21 (const Ipp32fc* pSrc, Ipp32fc* pDst, Ipp32s len);
IppStatus ippsAcosh_32fc_A24 (const Ipp32fc* pSrc, Ipp32fc* pDst, Ipp32s len);
IppStatus ippsAcosh_64fc_A26 (const Ipp64fc* pSrc, Ipp64fc* pDst, Ipp32s len);
IppStatus ippsAcosh_64fc_A50 (const Ipp64fc* pSrc, Ipp64fc* pDst, Ipp32s len);
IppStatus ippsAcosh_64fc_A53 (const Ipp64fc* pSrc, Ipp64fc* pDst, Ipp32s len);

Include Files
ippvm.h414

1Developer Guide and Reference for Intel® Integrated Performance Primitives

Domain Dependencies
Headers: ippcore.hLibraries: ippcore.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

len

Number of elements in the vectors.

Description
This function computes the inverse (nonnegative) hyperbolic cosine of each element of pSrc, and stores theresult in the corresponding element of pDst.
For single precision data:
function flavors ippsAcosh_32f_A11and ippsAcosh_32cf_A11 guarantee 11 correctly rounded bits ofsignificand, or at least 3 exact decimal digits;
function flavors ippsAcosh_32f_A21 and ippsAcosh_32fc_A21 guarantee 21 correctly rounded bits ofsignificand, or 4 ulps, or about 6 exact decimal digits;
function flavors ippsAcosh_32f_A24 and ippsAcosh_32fc_A24 guarantee 24 correctly rounded bits ofsignificand, including the implied bit, with the maximum guaranteed error within 1 ulp.
For double precision data:
function flavors ippsAcosh_64f_A26 and ippsAcosh_64fc_A26 guarantee 26 correctly rounded bits ofsignificand, or 6.7E+7 ulps, or approximately 8 exact decimal digits;
function flavors ippsAcosh_64f_A50 and ippsAcosh_64fc_A50 guarantee 50 correctly rounded bits ofsignificand, or 4 ulps, or approximately 15 exact decimal digits;
function flavors ippsAcosh_64f_A53 and ippsAcosh_64fc_A53 guarantee 53 correctly rounded bits ofsignificand, including the implied bit, with the maximum guaranteed error within 1 ulp.
The computation is performed as follows:

pDst[n] = acosh(pSrc[n]), 0 ≤ n < len.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrc or pDst pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

IppStsDomain

In real functions, indicates a warning that the argument is outof the function domain, that is, at least one of the elements ofpSrc is less than 1.

ExampleThe example below shows how to use the function ippsAcosh.

IppStatus ippsAcosh_32f_A21_sample(void) {const Ipp32f x[4] = {588.321, 691.492, 837.773, 726.767};
Ipp32f y[4];

415

1

Intel® Integrated Performance Primitives Developer Guide and Reference

IppStatus st = ippsAcosh_32f_A21( x, y, 4 );printf(" ippsAcosh_32f_A21:\n");printf(" x = %.3f %.3f %.3f %.3f \n", x[0], x[1], x[2], x[3]);printf(" y = %.3f %.3f %.3f %.3f \n", y[0], y[1], y[2], y[3]);return st;}
Output:ippsAcosh_32f_A21:
x = 588.321 691.492 837.773 726.767
y = 7.070 7.232 7.424 7.282

AsinhComputes inverse hyperbolic sine of each vector
element.

SyntaxIppStatus ippsAsinh_32f_A11(const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsAsinh_32f_A21(const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsAsinh_32f_A24(const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsAsinh_64f_A26(const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsAsinh_64f_A50(const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsAsinh_64f_A53(const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsAsinh_32fc_A11(const Ipp32fc* pSrc, Ipp32fc* pDst, Ipp32s len);
IppStatus ippsAsinh_32fc_A21(const Ipp32fc* pSrc, Ipp32fc* pDst, Ipp32s len);
IppStatus ippsAsinh_32fc_A24(const Ipp32fc* pSrc, Ipp32fc* pDst, Ipp32s len);
IppStatus ippsAsinh_64fc_A26(const Ipp64fc* pSrc, Ipp64fc* pDst, Ipp32s len);
IppStatus ippsAsinh_64fc_A50(const Ipp64fc* pSrc, Ipp64fc* pDst, Ipp32s len);
IppStatus ippsAsinh_64fc_A53(const Ipp64fc* pSrc, Ipp64fc* pDst, Ipp32s len);

Include Files
ippvm.h

Domain Dependencies
Headers: ippcore.hLibraries: ippcore.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

len

Number of elements in the vectors.

416

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Description
This function computes the inverse hyperbolic sine of each element of pSrc, and stores the result in thecorresponding element of pDst.
For single precision data:
function flavors ippsAsinh_32f_A11and ippsAsinh_32cf_A11 guarantee 11 correctly rounded bits ofsignificand, or at least 3 exact decimal digits;
function flavors ippsAsinh_32f_A21 and ippsAsinh_32fc_A21 guarantee 21 correctly rounded bits ofsignificand, or 4 ulps, or about 6 exact decimal digits;
function flavors ippsAsinh_32f_A24 and ippsAsinh_32fc_A24 guarantee 24 correctly rounded bits ofsignificand, including the implied bit, with the maximum guaranteed error within 1 ulp.
For double precision data:
function flavors ippsAsinh_64f_A26 and ippsAsinh_64fc_A26 guarantee 26 correctly rounded bits ofsignificand, or 6.7E+7 ulps, or approximately 8 exact decimal digits;
function flavors ippsAsinh_64f_A50 and ippsAsinh_64fc_A50 guarantee 50 correctly rounded bits ofsignificand, or 4 ulps, or approximately 15 exact decimal digits;
function flavors ippsAsinh_64f_A53 and ippsAsinh_64fc_A53 guarantee 53 correctly rounded bits ofsignificand, including the implied bit, with the maximum guaranteed error within 1 ulp.
The computation is performed as follows:

pDst[n] = asinh(pSrc[n]), 0 ≤ n < len.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrc or pDst pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

ExampleThe example below shows how to use the function ippsAsinh.

IppStatus ippsAsinh_32f_A21_sample(void) {const Ipp32f x[4] = {-30.122, -589.282, 487.472, -63.082};
Ipp32f y[4];IppStatus st = ippsAsinh_32f_A21( x, y, 4 );printf(" ippsAsinh_32f_A21:\n");printf(" x = %.3f %.3f %.3f %.3f \n", x[0], x[1], x[2], x[3]);printf(" y = %.3f %.3f %.3f %.3f \n", y[0], y[1], y[2], y[3]);return st;}
Output:ippsAsinh_32f_A21:
x = -30.122 -589.282 487.472 -63.082
y = -4.099 -7.072 6.882 -4.838

417

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Atanh
Computes inverse hyperbolic tangent of each vector
element.

SyntaxIppStatus ippsAtanh_32f_A11 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsAtanh_32f_A21 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsAtanh_32f_A24 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsAtanh_64f_A26 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsAtanh_64f_A50 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsAtanh_64f_A53 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsAtanh_32fc_A11 (const Ipp32fc* pSrc, Ipp32fc* pDst, Ipp32s len);
IppStatus ippsAtanh_32fc_A21 (const Ipp32fc* pSrc, Ipp32fc* pDst, Ipp32s len);
IppStatus ippsAtanh_32fc_A24 (const Ipp32fc* pSrc, Ipp32fc* pDst, Ipp32s len);
IppStatus ippsAtanh_64fc_A26 (const Ipp64fc* pSrc, Ipp64fc* pDst, Ipp32s len);
IppStatus ippsAtanh_64fc_A50 (const Ipp64fc* pSrc, Ipp64fc* pDst, Ipp32s len);
IppStatus ippsAtanh_64fc_A53 (const Ipp64fc* pSrc, Ipp64fc* pDst, Ipp32s len);

Include Files
ippvm.h

Domain Dependencies
Headers: ippcore.hLibraries: ippcore.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

len

Number of elements in the vectors.

Description
This function computes the inverse hyperbolic tangent of each element of pSrc, and stores the result in thecorresponding element of pDst.
For single precision data:
function flavors ippsAtanh_32f_A11 and ippsAtanh_32fc_A11 guarantee 11 correctly rounded bits ofsignificand, or at least 3 exact decimal digits;
function flavors ippsAtanh_32f_A21 and ippsAtanh_32fc_A21 guarantee 21 correctly rounded bits ofsignificand, or 4 ulps, or about 6 exact decimal digits;
function flavors ippsAtanh_32f_A24 and ippsAtanh_32fc_A24 guarantee 24 correctly rounded bits ofsignificand, including the implied bit, with the maximum guaranteed error within 1 ulp.
For double precision data:418

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

function flavors ippsAtanh_64f_A26 and ippsAtanh_64fc_A26 guarantee 26 correctly rounded bits ofsignificand, or 6.7E+7 ulps, or approximately 8 exact decimal digits;
function flavors ippsAtanh_64f_A50 and ippsAtanh_64fc_A50 guarantee 50 correctly rounded bits ofsignificand, or 4 ulps, or approximately 15 exact decimal digits;
function flavors ippsAtanh_64f_A53 and ippsAtanh_64fc_A53 guarantee 53 correctly rounded bits ofsignificand, including the implied bit, with the maximum guaranteed error within 1 ulp.
The computation is performed as follows:

pDst[n] = atanh(pSrc[n]), 0 ≤ n < len.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrc or pDst pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

IppStsDomain

IppStsSingularity

In real functions, indicates a warning that the argument is outof the function domain, that is, at least one of the elements ofpSrc has absolute value greater than 1.
In real functions, indicates a warning that the argument is the
singularity point, that is, at least one of the elements of pSrc
has absolute value equal to 1.

ExampleThe example below shows how to use the function ippsAtanh.

IppStatus ippsAtanh_32f_A21_sample(void) {const Ipp32f x[4] = {-0.076, 0.808, 0.440, -0.705};
Ipp32f y[4];IppStatus st = ippsAtanh_32f_A21( x, y, 4 );printf(" ippsAtanh_32f_A21:\n");printf(" x = %.3f %.3f %.3f %.3f \n", x[0], x[1], x[2], x[3]);printf(" y = %.3f %.3f %.3f %.3f \n", y[0], y[1], y[2], y[3]);return st;}
Output:ippsAtanh_32f_A21:
x = -0.076 0.808 0.440 -0.705
y = -0.076 1.123 0.472 -0.877

Special Functions
Erf
Computes the error function value.

SyntaxIppStatus ippsErf_32f_A11 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsErf_32f_A21 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);

419

1

Intel® Integrated Performance Primitives Developer Guide and Reference

IppStatus ippsErf_32f_A24 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsErf_64f_A26 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsErf_64f_A50 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsErf_64f_A53 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);

Include Files
ippvm.h

Domain Dependencies
Headers: ippcore.hLibraries: ippcore.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

len

Number of elements in the vectors.

Description
This function computes the error function value for each element of pSrc and stores the result in thecorresponding element of pDst.
For single precision data:
function flavor ippsErf_32f_A11 guarantees 11 correctly rounded bits of significand, or at least 3 exact
decimal digits;
function flavor ippsErf_32f_A21 guarantees 21 correctly rounded bits of significand, or 4 ulps, or about 6
exact decimal digits;
function flavor ippsErf_32f_A24 guarantees 24 correctly rounded bits of significand, including the implied
bit, with the maximum guaranteed error within 1 ulp.
For double precision data:
function flavor ippsErf_64f_A26 guarantees 26 correctly rounded bits of significand, or 6.7E+7 ulps, orapproximately 8 exact decimal digits;
function flavor ippsErf_64f_A50 guarantees 50 correctly rounded bits of significand, or 4 ulps, orapproximately 15 exact decimal digits;
function flavor ippsErf_64f_A53 guarantees 53 correctly rounded bits of significand, including the implied
bit, with the maximum guaranteed error within 1 ulp.
The computation is performed as follows:

pDst[n] = erf(pSrc[n]), 0 ≤ n < len, where420Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrc or pDst pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

ExampleThe example below shows how to use the function ippsErf.

IppStatus ippsErf_32f_A21_sample(void) {const Ipp32f x[4] = {-0.982, 0.838, -0.448, -0.454};
Ipp32f y[4];IppStatus st = ippsErf_32f_A21( x, y, 4 );printf(" ippsErf_32f_A21:\n");printf(" x = %.3f %.3f %.3f %.3f \n", x[0], x[1], x[2], x[3]);printf(" y = %.3f %.3f %.3f %.3f \n", y[0], y[1], y[2], y[3]);return st;}
Output:ippsErf_32f_A21:
x = -0.982 0.838 -0.448 -0.454
y = -0.835 0.764 -0.474 -0.479

Erfc
Computes the complementary error function value.

SyntaxIppStatus ippsErfc_32f_A11 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsErfc_32f_A21 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsErfc_32f_A24 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsErfc_64f_A26 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsErfc_64f_A50 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsErfc_64f_A53 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);

Include Files
ippvm.h

Domain Dependencies
Headers: ippcore.hLibraries: ippcore.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

421

1

Intel® Integrated Performance Primitives Developer Guide and ReferencelenNumber of elements in the vectors.

Description
This function computes the complementary error function value for each element of pSrc and stores theresult in the corresponding element of pDst.
For single precision data:
function flavor ippsErfc_32f_A11 guarantees 11 correctly rounded bits of significand, or at least 3 exact
decimal digits;
function flavor ippsErfc_32f_A21 guarantees 21 correctly rounded bits of significand, or 4 ulps, or about 6
exact decimal digits;
function flavor ippsErfc_32f_A24 guarantees 24 correctly rounded bits of significand, including the implied
bit, with the maximum guaranteed error within 1 ulp.
For double precision data:
function flavor ippsErfc_64f_A26 guarantees 26 correctly rounded bits of significand, or 6.7E+7 ulps, orapproximately 8 exact decimal digits;
function flavor ippsErfc_64f_A50 guarantees 50 correctly rounded bits of significand, or 4 ulps, orapproximately 15 exact decimal digits;
function flavor ippsErfc_64f_A53 guarantees 53 correctly rounded bits of significand, including the implied
bit, with the maximum guaranteed error within 1 ulp.
The computation is performed as follows:

pDst[n] = erfc(pSrc[n]), 0 ≤ n < len, where

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrc or pDst pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

IppStsUnderflow

Indicates a warning that the function underflows, that is, atleast one element of pSrc is less than some threshold value,
where the function result is less than the minimum positive
floating-point value in target precision.

ExampleThe example below shows how to use the function ippsErfc.

IppStatus ippsErfc_32f_A21_sample(void) {const Ipp32f x[4] = {-0.982, 0.838, -0.448, -0.454};
Ipp32f y[4];IppStatus st = ippsErfc_32f_A21( x, y, 4 );printf(" ippsErfc_32f_A21:\n");printf(" x = %.3f %.3f %.3f %.3f \n", x[0], x[1], x[2], x[3]);4221Developer Guide and Reference for Intel® Integrated Performance Primitives

printf(" y = %.3f %.3f %.3f %.3f \n", y[0], y[1], y[2], y[3]);return st;}
Output:ippsErfc_32f_A21:
x = -0.982 0.838 -0.448 -0.454
y = -0.754 0.685 -0.420 -0.425

CdfNorm
Computes the cumulative normal distribution function
values of vector element.

SyntaxIppStatus ippsCdfNorm_32f_A11 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsCdfNorm_32f_A21 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsCdfNorm_32f_A24 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsCdfNorm_64f_A26 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsCdfNorm_64f_A50 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsCdfNorm_64f_A53 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);

Include Files
ippvm.h

Domain Dependencies
Headers: ippcore.hLibraries: ippcore.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

len

Number of elements in the vectors.

Description
This function computes the cumulative normal distribution function values of pSrc element and stores theresult in the corresponding element of pDst.
For single precision data:
function flavor ippsCdfNorm_32f_A11 guarantees 11 correctly rounded bits of significand, or at least 3
exact decimal digits;
function flavor ippsCdfNorm_32f_A21 guarantees 21 correctly rounded bits of significand, or 4 ulps, orabout 6 exact decimal digits;
function flavor ippsCdfNorm_32f_A24 guarantees 24 correctly rounded bits of significand, including theimplied bit, with the maximum guaranteed error within 1 ulp.
For double precision data:

423

1

Intel® Integrated Performance Primitives Developer Guide and Referencefunction flavor ippsCdfNorm_64f_A26 guarantees 26 correctly rounded bits of significand, or 6.7E+7 ulps,
or approximately 8 exact decimal digits;
function flavor ippsCdfNorm_64f_A50 guarantees 50 correctly rounded bits of significand, or 4 ulps, orapproximately 15 exact decimal digits;
function flavor ippsCdfNorm_64f_A53 guarantees 53 correctly rounded bits of significand, including theimplied bit, with the maximum guaranteed error within 1 ulp.
The computation is performed as follows:

pDst[n] = CdfNorm(pSrc[n]), 0 ≤ n < len, where

The example below shows how to use the function ippsCdfNorm.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrc or pDst pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

IppStsUnderflow

424

Indicates a warning that the function underflows, that is, atleast one element of pSrc is less than some threshold value,
where the function result is less than the minimum positive
floating-point value in the target precision.

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Using ippsCdfNorm Function
IppStatus ippsCdfNorm_32f_A24_sample(void){
const Ipp32f x[4] = {+4.885, -0.543, -3.809, -4.953};
Ipp32fy[4];IppStatus st = ippsCdfNorm_32f_A24( x, y, 4 );printf(" ippsCdfNorm_32f_A24:\n");printf(" x = %+.3f %+.3f %+.3f %+.3f \n", x[0], x[1], x[2], x[3]);printf(" y = %+.3f %+.3f %+.3f %+.3f \n", y[0], y[1], y[2], y[3]);return st;}
Output results:
ippsCdfNorm_32f_A24:
x = +4.885 -0.543 -3.809 -4.953
y = +1.000 +0.294 +0.000 +0.000

ErfInvComputes the inverse error function value.

SyntaxIppStatus ippsErfInv_32f_A11 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsErfInv_32f_A21 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsErfInv_32f_A24 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsErfInv_64f_A26 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsErfInv_64f_A50 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsErfInv_64f_A53 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);

Include Files
ippvm.h

Domain Dependencies
Headers: ippcore.hLibraries: ippcore.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

425

1

Intel® Integrated Performance Primitives Developer Guide and ReferencelenNumber of elements in the vectors.

Description
This function computes the inverse error function value for each element of pSrc and stores the result in thecorresponding element of pDst.
For single precision data:
function flavor ippsErfInv_32f_A11 guarantees 11 correctly rounded bits of significand, or at least 3 exact
decimal digits;
function flavor ippsErfInv_32f_A21 guarantees 21 correctly rounded bits of significand, or 4 ulps, or about
6 exact decimal digits;
function flavor ippsErfInv_32f_A24 guarantees 24 correctly rounded bits of significand, including theimplied bit, with the maximum guaranteed error within 1 ulp.
For double precision data:
function flavor ippsErfInv_64f_A26 guarantees 26 correctly rounded bits of significand, or 6.7E+7 ulps, orapproximately 8 exact decimal digits;
function flavor ippsErfInv_64f_A50 guarantees 50 correctly rounded bits of significand, or 4 ulps, orapproximately 15 exact decimal digits;
function flavor ippsErfInv_64f_A53 guarantees 53 correctly rounded bits of significand, including theimplied bit, with the maximum guaranteed error within 1 ulp.
The computation is performed as follows:

pDst[n] = erfinv(pSrc[n]), 0 ≤ n < len, where erfinv(x) = erf -1(x), and erf(x) denotes theerror function defined as given by:

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrc or pDst pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

ippStsDomain

ippStsSingularity

Indicates a warning that the argument is out of the function
domain, that is, at least one of pSrc elements has the absolutevalue greater than 1.
Indicates a warning that the argument is a singularity point,that is, at least one of the elements of pSrc has the absolutevalue equal to 1.

ExampleThe example below shows how to use the function ippsErfcInv.

IppStatus ippsErfInv_32f_A21_sample(void) {const Ipp32f x[4] = {-0.842, 0.638, -0.345, -0.774};
Ipp32f y[4];IppStatus st = ippsErfInv_32f_A21( x, y, 4 );426

1Developer Guide and Reference for Intel® Integrated Performance Primitives

printf(" ippsErfInv_32f_A21:\n");printf(" x = %.3f %.3f %.3f %.3f \n", x[0], x[1], x[2], x[3]);printf(" y = %.3f %.3f %.3f %.3f \n", y[0], y[1], y[2], y[3]);return st;}
Output:ippsErfInv_32f_A21:
x = -0.842 0.638 -0.345 -0.774
y = -0.998 0.645 -0.316 -0.856

ErfcInv
Computes the inverse complementary error function
value of vector element.

SyntaxIppStatus ippsErfcInv_32f_A11 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsErfcInv_32f_A21 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsErfcInv_32f_A24 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsErfcInv_64f_A26 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsErfcInv_64f_A50 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsErfcInv_64f_A53 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);

Include Files
ippvm.h

Domain Dependencies
Headers: ippcore.hLibraries: ippcore.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

len

Number of elements in the vectors.

Description
This function computes the inverse complementary error function value of each pSrc vector element andstores the result in the corresponding element of pDst.
For single precision data:
function flavor ippsErfcInv_32f_A11 guarantees 11 correctly rounded bits of significand, or at least 3
exact decimal digits;
function flavor ippsErfcInv_32f_A21 guarantees 21 correctly rounded bits of significand, or 4 ulps, orabout 6 exact decimal digits;

427

1

Intel® Integrated Performance Primitives Developer Guide and Referencefunction flavor ippsErfcInv_32f_A24 guarantees 24 correctly rounded bits of significand, including theimplied bit, with the maximum guaranteed error within 1 ulp.
For double precision data:
function flavor ippsErfcInv_64f_A26 guarantees 26 correctly rounded bits of significand, or 6.7E+7 ulps,
or approximately 8 exact decimal digits;
function flavor ippsErfcInv_64f_A50 guarantees 50 correctly rounded bits of significand, or 4 ulps, orapproximately 15 exact decimal digits;
function flavor ippsErfcInv_64f_A53 guarantees 53 correctly rounded bits of significand, including theimplied bit, with the maximum guaranteed error within 1 ulp.
The computation is performed as follows:

pDst[n] = erfcinv(pSrc[n]), 0 ≤ n < len, where erfcinv(x) = erfinv(1 - x, and erfinv(x)denotes the error function defined as given by:

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrc or pDst pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

ippStsDomain

ippStsSingularity

Indicates a warning that the argument is out of the function
domain, that is, at least one of pSrc elements is outside thefunction domain [0; 2].
Indicates a warning that the argument is a singularity point,that is, at least one of the elements of pSrc is equal to 0 or 2.

ExampleThe example below shows how to use the function ippsErfcInv.

IppStatus ippsErfcInv_32f_A24_sample(void) {const Ipp32f x[4] = {+0.885, +0.543, +1.809, +0.953};
Ipp32f y[4];IppStatus st = ippsErfcInv_32f_A24( x, y, 4 );printf(" ippsErfcInv_32f_A24:\n");printf(" x = %+.3f %+.3f %+.3f %+.3f \n", x[0], x[1], x[2], x[3]);printf(" y = %+.3f %+.3f %+.3f %+.3f \n", y[0], y[1], y[2], y[3]);return st;}
Output:ippsErfcInv_32f_A24:
x = +0.885 +0.543 +1.809 +0.953
y = +0.102 +0.430 -0.925 +0.042428

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

CdfNormInv
Computes the inverse cumulative normal distributionfunction values of vector elements.

SyntaxIppStatus ippsCdfNormInv_32f_A11 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsCdfNormInv_32f_A21 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsCdfNormInv_32f_A24 (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsCdfNormInv_64f_A26 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsCdfNormInv_64f_A50 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);
IppStatus ippsCdfNormInv_64f_A53 (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);

Include Files
ippvm.h

Domain Dependencies
Headers: ippcore.hLibraries: ippcore.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

len

Number of elements in the vectors.

Description
This function computes the inverse cumulative normal distribution function values of pSrc vector elements
and stores the result in the corresponding element of pDst.
For single precision data:
function flavor ippsCdfNormInv_32f_A11 guarantees 11 correctly rounded bits of significand, or at least 3
exact decimal digits;
function flavor ippsCdfNormInv_32f_A21 guarantees 21 correctly rounded bits of significand, or 4 ulps, orabout 6 exact decimal digits;
function flavor ippsCdfNormInv_32f_A24 guarantees 24 correctly rounded bits of significand, including theimplied bit, with the maximum guaranteed error within 1 ulp.
For double precision data:
function flavor ippsCdfNormInv_64f_A26 guarantees 26 correctly rounded bits of significand, or 6.7E+7
ulps, or approximately 8 exact decimal digits;
function flavor ippsCdfNormInv_64f_A50 guarantees 50 correctly rounded bits of significand, or 4 ulps, orapproximately 15 exact decimal digits;
function flavor ippsCdfNormInv_64f_A53 guarantees 53 correctly rounded bits of significand, including theimplied bit, with the maximum guaranteed error within 1 ulp.
The computation is performed as follows:

429

1

Intel® Integrated Performance Primitives Developer Guide and Reference

pDst[n] = CdfNormInv(pSrc[n]), 0 ≤ n < len, where CdfNormInv(x) = CdfNorm-1(x), andCdfNorm(x) denotes the cumulative normal distribution function:

The example below shows how to use the function ippsCdfNormInv.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrc or pDst pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

ippStsDomain

ippStsSingularity

Indicates a warning that the argument is out of the function
domain, that is, at least one of pSrc elements is outside thefunction domain [0; 1].
Indicates a warning that the argument is a singularity point,that is, at least one of the elements of pSrc is equal to 0 or 1.

Using ippsCdfNormInv Function
IppStatus ippsCdfNormInv_32f_A24_sample(void){
const Ipp32f x[4] = {+0.085, +0.543, +1.809, +0.953};
Ipp32fy[4];IppStatus st = ippsCdfNormInv_32f_A24( x, y, 4 );printf(" ippsCdfNormInv_32f_A24:\n");printf(" x = %+.3f %+.3f %+.3f %+.3f \n", x[0], x[1], x[2], x[3]);printf(" y = %+.3f %+.3f %+.3f %+.3f \n", y[0], y[1], y[2], y[3]);return st;}
Output results:
ippsCdfNormInv_32f_A24:
x = +0.085 +0.543 +1.809 +0.953
y = -1.372 +0.108 +0.874 +1.675

Rounding Functions430

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Floor
Computes integer value rounded toward minus infinity
for each vector element.

SyntaxIppStatus ippsFloor_32f (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsFloor_64f (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);

Include Files
ippvm.h

Domain Dependencies
Headers: ippcore.hLibraries: ippcore.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

len

Number of elements in the vectors.

Description
This function computes an integer value rounded towards minus infinity for each element of the vector pSrc,
and stores the result in the corresponding element of the vector pDst.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrc or pDst pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

ExampleThe example below shows how to use the function ippsFloor.

IppStatus ippsFloor_32f_ sample(void) {const Ipp32f x[4] = {-0.883, -0.265, 0.176, 0.752};
Ipp32f y[4];IppStatus st = ippsFloor_32f ( x, y, 4 );printf(" ippsFloor_32f:\n");printf(" x = %.3f %.3f %.3f %.3f \n", x[0], x[1], x[2], x[3]);printf(" y = %.3f %.3f %.3f %.3f \n", y[0], y[1], y[2], y[3]);return st;}
Output:ippsFloor_32f:
x = -0.883 -0.265 0.176 0.752
y = -1.000 -1.000 0.000 0.000431

1Intel® Integrated Performance Primitives Developer Guide and Reference

Frac
Computes a signed fractional part for each element ofa vector.

SyntaxIppStatus ippsFrac_32f (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsFrac_64f (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);

Include Files
ippvm.h

Domain Dependencies
Headers: ippcore.hLibraries: ippcore.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

len

Number of elements in the vectors.

Description
This function computes a fractional part of each element of the pSrc vector. The result is stored in thecorresponding element of the pDst vector.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrc or pDst pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than, or equal to zero.

ExampleThe example below shows how to use the ippsFrac function.

IppStatus ippsFrac_32f_sample(void){
const Ipp32f x[4] = {-1.883, -0.265, 0.176, 1.752};
Ipp32f y[4];IppStatus st = ippsFrac_32f ( x, y, 4 );printf(" ippsFrac_32f:\n");printf(" x = %.3f %.3f %.3f %.3f \n", x[0], x[1], x[2], x[3]);printf(" y = %.3f %.3f %.3f %.3f \n", y[0], y[1], y[2], y[3]);return st;}
Result:ippsFrac_32f:
x = -1.883 -0.265 0.176 1.752
y = -0.883 -0.265 0.176 0.752

432

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Ceil
Computes integer value rounded toward plus infinity
for each vector element.

SyntaxIppStatus ippsCeil_32f (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsCeil_64f (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);

Include Files
ippvm.h

Domain Dependencies
Headers: ippcore.hLibraries: ippcore.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

len

Number of elements in the vectors.

Description
This function computes an integer value rounded towards plus infinity for each element of the vector pSrc,
and stores the result in the corresponding element of the vector pDst.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrc or pDst pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

ExampleThe example below shows how to use the function ippsCeil.

IppStatus ippsCeil_32f_sample(void) {const Ipp32f x[4] = {-0.883, -0.265, 0.176, 0.752};
Ipp32f y[4];IppStatus st = ippsCeil_32f ( x, y, 4 );printf(" ippsCeil_32f:\n");printf(" x = %.3f %.3f %.3f %.3f \n", x[0], x[1], x[2], x[3]);printf(" y = %.3f %.3f %.3f %.3f \n", y[0], y[1], y[2], y[3]);return st;}
Output:ippsCeil_32f:
x = -0.883 -0.265 0.176 0.752
y = 0.000 0.000 1.000 1.000433

1Intel® Integrated Performance Primitives Developer Guide and Reference

Trunc
Computes integer value rounded toward zero for each
vector element.

SyntaxIppStatus ippsTrunc_32f (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsTrunc_64f (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);

Include Files
ippvm.h

Domain Dependencies
Headers: ippcore.hLibraries: ippcore.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

len

Number of elements in the vectors.

Description
This function computes an integer value rounded towards zero for each element of the vector pSrc, andstores the result in the corresponding element of the vector pDst.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrc or pDst pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

ExampleThe example below shows how to use the function ippsTrunc.

IppStatus ippsTrunc_32f_ sample(void) {const Ipp32f x[4] = {-1.883, -0.265, 0.176, 1.752};
Ipp32f y[4];IppStatus st = ippsTrunc_32f ( x, y, 4 );printf(" ippsTrunc_32f:\n");printf(" x = %.3f %.3f %.3f %.3f \n", x[0], x[1], x[2], x[3]);printf(" y = %.3f %.3f %.3f %.3f \n", y[0], y[1], y[2], y[3]);return st;}
Output:ippsTrunc_32f:
x = -1.883 -0.265 0.176 1.752
y = -1.000 0.000 0.000 1.000434Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Round
Computes integer value rounded to nearest for each
vector element.

SyntaxIppStatus ippsRound_32f (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsRound_64f (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);

Include Files
ippvm.h

Domain Dependencies
Headers: ippcore.hLibraries: ippcore.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

len

Number of elements in the vectors.

Description
This function computes a rounded to the nearest integer value for each element of the vector pSrc, andstores the result in the corresponding element of the vector pDst. Halfway values, that is, 0.5, -1.5, and thelike, are rounded off away from zero, that is, 0.5 -> 1, -1.5 -> -2, and so on.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrc or pDst pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

ExampleThe example below shows how to use the function ippsRound.

IppStatus ippsRound_32f_ sample(void) {const Ipp32f x[4] = {-1.883, -0.265, 0.176, 1.752};
Ipp32f y[4];IppStatus st = ippsRound_32f ( x, y, 4 );printf(" ippsRound_32f:\n");printf(" x = %.3f %.3f %.3f %.3f \n", x[0], x[1], x[2], x[3]);printf(" y = %.3f %.3f %.3f %.3f \n", y[0], y[1], y[2], y[3]);return st;
}

435

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Output:ippsRound_32f:
x = -1.883 -0.265 0.176 1.752
y = -2.000 0.000 0.000 2.000

NearbyInt
Computes rounded integer value in current rounding
mode for each vector element.

SyntaxIppStatus ippsNearbyInt_32f (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsNearbyInt_64f (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);

Include Files
ippvm.h

Domain Dependencies
Headers: ippcore.hLibraries: ippcore.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

len

Number of elements in the vectors.

Description
This function computes a rounded integer value in a current rounding mode for each element of the vector
pSrc, and stores the result in the corresponding element of the vector pDst.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrc or pDst pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

ExampleThe example below shows how to use the ippsNearbyInt function.

#include <fenv.h>
void ippsNearbyInt_32f_ sample(void) {const Ipp32f x[4] = {-1.883, -0.265, 0.176, 1.752};
Ipp32f y1[4], y2[4];fesetround(FE_TONEAREST);ippsNearbyInt_32f ( x, y1, 4 );fesetround(FE_TOWARDZERO);
ippsNearbyInt_32f ( x, y2, 4 );436

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

printf(" ippsNearbyInt_32f:\n");printf(" x = %.3f %.3f %.3f %.3f \n", x[0], x[1], x[2], x[3]);printf(" y1 = %.3f %.3f %.3f %.3f \n", y1[0], y1[1], y1[2], y1[3]);printf(" y2 = %.3f %.3f %.3f %.3f \n", y2[0], y2[1], y2[2], y2[3]);}Output:ippsNearInt_32f:
x = -1.883 -0.265 0.176 1.752
y1 = -2.000 0.000 0.000 2.000
y2 = -1.000 0.000 0.000 1.000

Rint
Computes rounded integer value in current rounding
mode for each vector element with inexact result
exception raised for each changed value.

SyntaxIppStatus ippsRint_32f (const Ipp32f* pSrc, Ipp32f* pDst, Ipp32s len);
IppStatus ippsRint_64f (const Ipp64f* pSrc, Ipp64f* pDst, Ipp32s len);

Include Files
ippvm.h

Domain Dependencies
Headers: ippcore.hLibraries: ippcore.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

len

Number of elements in the vectors.

Description
This function computes a rounded integer value in a current rounding mode for each element of the vector
pSrc, and stores the result in the corresponding element of the vector pDst raising inexact result exception
if the value has changed.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrc or pDst pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

437

1

Intel® Integrated Performance Primitives Developer Guide and Reference

ExampleThe example below shows how to use the ippsRint function.

#include <fenv.h>
void ippsRint_32f_ sample(void) {const Ipp32f x[4] = {-1.883, -0.265, 0.176, 1.752};
Ipp32f y1[4], y2[4];fesetround(FE_TONEAREST);ippsRint_32f ( x, y1, 4 );fesetround(FE_TOWARDZERO);
ippsRint_32f ( x, y2, 4 );printf(" ippsRint_32f:\n");printf(" x = %.3f %.3f %.3f %.3f \n", x[0], x[1], x[2], x[3]);printf(" y1 = %.3f %.3f %.3f %.3f \n", y1[0], y1[1], y1[2], y1[3]);printf(" y2 = %.3f %.3f %.3f %.3f \n", y2[0], y2[1], y2[2], y2[3]);}Output:ippsRint_32f:
x = -1.883 -0.265 0.176 1.752
y1 = -2.000 0.000 0.000 2.000
y2 = -1.000 0.000 0.000 1.000

Modf
Computes truncated integer value and remaining
fraction part for each vector element.

SyntaxIppStatus ippsModf_32f (const Ipp32f* pSrc, Ipp32f* pDst1, Ipp32f* pDst2, Ipp32s len);
IppStatus ippsModf_64f (const Ipp64f* pSrc, Ipp64f* pDst1, Ipp64f* pDst2, Ipp32s len);

Include Files
ippvm.h

Domain Dependencies
Headers: ippcore.hLibraries: ippcore.lib

Parameters
pSrc

Pointer to the source vector.

pDst1

Pointer to the first destination vector.

pDst2

Pointer to the second destination vector.

len

Number of elements in the vectors.

438

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Description
This function computes a truncated value and a remainder of each element of the vector pSrc. The truncatedinteger value is stored in the corresponding element of the pDst1 vector and the remainder is stored in thecorresponding element of the pDst2 vector.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrc or pDst1 or pDst2 pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

ExampleThe example below shows how to use the function ippsModf.

IppStatus ippsModf_32f_sample(void) {const Ipp32f x[4] = {-1.883, -0.265, 0.176, 1.752};
Ipp32f y1[4], y2[4];IppStatus st = ippsModf_32f ( x, y1, y2, 4 );printf(" ippsModf_32f:\n");printf(" x = %.3f %.3f %.3f %.3f \n", x[0], x[1], x[2], x[3]);printf(" y1 = %.3f %.3f %.3f %.3f \n", y1[0], y1[1], y1[2], y1[3]);printf(" y2 = %.3f %.3f %.3f %.3f \n", y2[0], y2[1], y2[2], y2[3]);return st;}
Output results:

ippsModf_32f:
x = -1.883 -0.265 0.176 1.752
y1 = -1.000 0.000 0.000 1.000
y2 = -0.883 -0.265 0.176 0.752

Long Term Evolution (LTE) Wireless Support Functions
NOTE
This functionality is available only within the Intel® System Studio suite.
This section describes functions that implement the Long Term Evolution (LTE) multiple input multiple output(MIMO) algorithm to estimate the minimum mean square error (MMSE).
The LTE MIMO uplink provides the following:•••

Spatial multiplexing to enable high data rates within a limited bandwidth
Additional diversity against fading on the radio channel
Beam-forming to shape the overall antenna beam in a certain way to maximize the overall antenna gain in
the direction of the target receiver

MIMO MMSE Estimator
NOTE
This functionality is available only within the Intel® System Studio suite.

439

1

Intel® Integrated Performance Primitives Developer Guide and Reference

The MIMO MMSE is based on the output of FFT (y) and channel estimation (H).
The figure below shows the system model used for the MMSE estimation per subcarrier.

According to this figure, the basic equation is

y=H*x+n
where

•
•
•

Nr is the number of receive antennas (2, 4, or 8)
Nt is the number of transmit antennas (1 or 2)
x is the data frequency domain symbol440

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

MimoMMSE
DEPRECATED. Implements the MIMO MMSE estimator
algorithm.

SyntaxIppStatus ippsMimoMMSE_1X2_16sc(Ipp16sc* pSrcH[2], int srcHStride2, int srcHStride1,
int srcHStride0, Ipp16sc* pSrcY[4][12], int Sigma2, IppFourSymb* pDstX, int
dstXStride1, int dstXStride0, int numSymb, int numSC, int SINRIdx, Ipp32f* pDstSINR,
int scaleFactor);
IppStatus ippsMimoMMSE_2X2_16sc(Ipp16sc* pSrcH[2], int srcHStride2, int srcHStride1,
int srcHStride0, Ipp16sc* pSrcY[4][12], int Sigma2, IppFourSymb* pDstX, int
dstXStride1, int dstXStride0, int numSymb, int numSC, int SINRIdx, Ipp32f* pDstSINR,
int scaleFactor);
IppStatus ippsMimoMMSE_1X4_16sc(Ipp16sc* pSrcH[2], int srcHStride2, int srcHStride1,
int srcHStride0, Ipp16sc* pSrcY[4][12], int Sigma2, IppFourSymb* pDstX, int
dstXStride1, int dstXStride0, int numSymb, int numSC, int SINRIdx, Ipp32f* pDstSINR,
int scaleFactor);
IppStatus ippsMimoMMSE_2X4_16sc(Ipp16sc* pSrcH[2], int srcHStride2, int srcHStride1,
int srcHStride0, Ipp16sc* pSrcY[4][12], int Sigma2, IppFourSymb* pDstX, int
dstXStride1, int dstXStride0, int numSymb, int numSC, int SINRIdx, Ipp32f* pDstSINR,
int scaleFactor);

Include Files
ippe.hParameters
pSrcH

Pointer to line 2 of the H matrix.

srcHStride2

Stride between H matrices (H[symb0] and (H[symb1]).

srcHStride1

Stride between rows of the H matrix (h00 and h10)srcHStride0

Stride between elements of the row (h00 and h01).

Sigma2

Array of pointers to the RX signal Y. The maximum size is four
TX antennas and 12 symbols.
Noise power.

numSymb

Number of symbols.

numSC

Number of subcarriers.

pSrcY

dstXStride1

Pointer to the estimated TX signal grouped by four symbols(quads).
Stride between TX signals (X[ant0] and X[ant1]).

dstXStride0

Stride between quads inside one antenna.

SINRIdx

Index of symbol to calculate the SINR.

pDstSINR

Pointer to an array of SINR for layer 1,2.

scaleFactor

Scale factor, refer to Integer Scaling.

pDstX

441

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Description
NOTE This function is deprecated and will be removed in a future release. If you have concerns, open
a ticket and provide feedback at https://supporttickets.intel.com/.

NOTE
This functionality is available only within the Intel® System Studio suite.
This function implements the MMSE estimator algorithm. The MMSE estimation process consists of thefollowing steps:

2.

Calculate B=HH*H, where H is the channel matrix, and superscript H denotes Hermitian operator(transpose and conjugate).
Calculate A=HH*H+σ2n*INt, where

3.
4.
5.
6.

Nt is the number of transmit antennas (1 or 2).
Calculate A-1=(HH*H+σ2n*INt)-1.
Calculate Z=HH*y.
Calculate x=A-1*Z=(HH*H+σ2n*INt)-1*HH*y.
Calculate D=W*H=A-1*HH*H.

1.

Signal to interference plus noise ratio (SINR) is computed as follows:

where
M is the number of subcarriers.
The destination data is grouped by four symbols.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error if numSymb or numSC is less than, or equal to
zero.

442

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

CRC_8uComputes checksum for a given data vector.

SyntaxIppStatus ippsCRC_8u(Ipp8u* pSrc, int len, Ipp64u poly, Ipp8u optPoly[128], Ipp32u
init, Ipp32u* pCRC16);

Include Files
ippe.hDomain Dependencies
ippcore.hLibraries
ippe.lib

ParameterspSrc

The pointer to the source vector.

len

The length of the vector, number of items.

optPoly

CRC polynomial with explicit leading 1. Indicates CRC length:
8/16/24/32 bits.
The initialized data table (NULL, by default).

init

The initial value of a register.

pCRC

Pointer to the CRC value.

poly

Description
This function computes the CRC value with the polynomial poly and the initial value init for the input
vector pSrc with the length len bytes. The default optPoly value is NULL.
This function supports only 8, 16, 24, and 32 bytes-length polynomials. The bytes number of the CRC
algorithm (8, 16, 24, or 32) is defined by the position of the most significant 1 bit in poly. The polynomialmust be specified in full. For example, for CRC16 with the 0x1021 polynomial, the poly value must be
0x11021.
Low-level ippsCRC_8u optimization requires special tables for every poly value. This function calls the
optimized code only for the fixed set of polynomials by default and returns ippStsNoErr status. If such table
is not available for poly, it calculates CRC using non-optimized code and returns theippStsNonOptimalPathSelected warning.
To compute CRC for an arbitrary polynomial with low-level optimization, you need to initialize the optPoly
table first with the ippsGenCRCOptPoly_8u function and transfer optPoly into ippsCRC_8u.

Example//Computing CRC16 for the 0x1021 polynomial
int main(){
Ipp8u* src = "123456789";
IppStatus status;
Ipp32u CRC;
Ipp64u poly = 0x11021;//Default polynomial

443

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Ipp32u init = 0xFFFF;
status = ippsCRC_8u(src, 9, poly, NULL, init, &CRC);
printf("status = '%s'\n", ippGetStatusString(status));printf("CRC=0x%x\n", CRC);
return 0;}
The result:status = 'ippStsNoErr: No errors'
CRC=0x29b1

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if the pointer to the source vector is NULL.

ippStsSizeErr
ippStsAlgTypeErr
ippStsBadArgErr
ippStsNonOptimalPathSelected

Indicates an error if the length of the source vector is less thanor equal to 0.
Indicates an error if the most significant 1 bit is in the wrong
position.
Indicates an error if the optPoly value does not match polyvalue.
Indicates an error if the function returns the positive warning.
Call ippsGenCRCOptPoly_8u to compute the table.

ippsGenCRCOptPoly_8u
Computes optimization table for ippsCRC_8u.

SyntaxIppStatus ippsGenCRCOptPoly_8u(Ipp64u* poly, Ipp8u optPoly[128]);

Include Files
ippe.hDomain Dependencies
ippcore.hLibraries
ippe.lib

Parameters
poly
optPoly

CRC polynomial with explicit leading 1. Indicates CRC length:
8/16/24/32 bits.
The initialized data table (NULL, by default).

Description
The ippsGenCRCOptPoly_8u function is auxiliary for ippsCRC_8u and computes a table for low-level
optimization in ippsCRC_8u. You can use this function in the initialization procedure of the application.

444

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Low-level ippsCRC_8u optimization requires special tables for every poly value. This function calls the
optimized code only for the fixed set of polynomials by default and returns the ippStsNoErr status. If suchtable is not available for poly, it calculates CRC using non-optimized code and returns theippStsNonOptimalPathSelected warning.
To compute CRC for an arbitrary polynomial with low-level optimization, you need to initialize the optPoly
table first with the ippsGenCRCOptPoly_8u function and transfer optPoly into ippsCRC_8u.

Example//Computing the table for the function that does not support CRC16 with the 0x8005 polynomial.
int main(){
Ipp8u* src = "123456789";
IppStatus status;
Ipp32u CRC;
Ipp64u poly = 0x18005;
Ipp32u init = 0;
Ipp8u optPoly[128];//function returns ippStsNonOptimalPathSelected
status = ippsCRC_8u(src, 9, poly, NULL, init, &CRC);
printf("status = '%s'\n", ippGetStatusString(status));printf("CRC=0x%x\n", CRC);//function returns ippStsNoErr and//calls optimized code
status = ippsGenCRCOptPoly_8u(poly, optPoly);
status = ippsCRC_8u(src, 9, poly, optPoly, init, &CRC);
printf("status = '%s'\n", ippGetStatusString(status));printf("CRC=0x%x\n", CRC);
return 0;}
The result:status = 'The function is inefficient due to the combination of input parameters'
CRC=0xfee8
status = 'ippStsNoErr: No errors'
CRC=0xfee8//
Computing CRC6
int main(){
Ipp8u* src = "123456789";
IppStatus status;
Ipp32u CRC;
Ipp64u poly = 0x61;//CRC6 polynomial;
Ipp32u init = 0x0;
Ipp8u optPoly[128];//Function calculates crc8/crc16/crc24/crc32//Shift 2 bits left, CRC6 -> CRC8
poly <<= 2;status = ippsGenCRCOptPoly_8u(poly, optPoly);
status = ippsCRC_8u(src, 9, poly, optPoly, init, &CRC);
printf("status = %d, '%s'\n", status, ippGetStatusString(status));//Shift 2 bits right, CRC8 -> CRC6

445

1

Intel® Integrated Performance Primitives Developer Guide and Reference

printf("crc6=%x\n", CRC >> 2);
return 0;}

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if the pointer to the source vector is NULL.

ippStsAlgTypeErr

Indicates an error if the most significant 1 bit is in the wrong
position.

CRC16
Computes the CRC16 checksum for the source data
buffer.

SyntaxIppStatus ippsCRC16_8u(Ipp8u* pSrc, int len, Ipp32u* pCRC16);
IppStatus ippsCRC16_1u(Ipp8u* pSrc, int srcBitOffset, Ipp8u* pDst, int dstBitOffset,
int bitLen);

Include Files
ippe.hDomain Dependencies
ippcore.hLibraries
ippcore.lib

Parameters
pSrc

Pointer to the source data buffer.

srcBitOffset

Offset in bits from the source data buffer.

pDst

Pointer to the destination data buffer.

dstBitOffset

Offset in bits from the destination data buffer.

len

Number of elements in the source data buffer.

pCRC16

Pointer to the checksum value.

bitLenLength of the input source vector, in bits.

Description
This function computes the checksum for srcLen elements of the source data buffer pSrc and stores it in
the pCRC16 respectively. The following polynomial representation is used:
x16 + X12 + X5 + X + 1

ippsCRC16_1u. This function flavor computes the CRC16 checksum of a vector that has a 8u data type. Itmeans that each byte consists of eight consecutive elements of the vector (1 bit per element). You need to
specify the offsets from the source and destination data buffers in the srcBitOffset and dstBitOffset
parameters, respectively.

446

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

This function can be used to compute the accumulated value of the checksum for multiple buffers in the data
stream by specifying as an input parameter the checksum value obtained in the preceding function call.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if the pSrc pointer is NULL.

ippStsSizeErr

Indicates an error if the length of the source vector is less thanor equal to 0.

CRC24a, CRC24b, CRC24c
Computes the CRC24 checksum for the source data
buffer.

SyntaxIppStatus ippsCRC24a_8u(Ipp8u* pSrc, int len, Ipp32u* pCRC24);
IppStatus ippsCRC24b_8u(Ipp8u* pSrc, int len, Ipp32u* pCRC24);
IppStatus ippsCRC24c_8u(Ipp8u* pSrc, int len, Ipp32u* pCRC24);
IppStatus ippsCRC24a_1u(Ipp8u* pSrc, int srcBitOffset, Ipp8u* pDst, int dstBitOffset,
int bitLen);
IppStatus ippsCRC24b_1u(Ipp8u* pSrc, int srcBitOffset, Ipp8u* pDst, int dstBitOffset,
int bitLen);
IppStatus ippsCRC24c_1u(Ipp8u* pSrc, int srcBitOffset, Ipp8u* pDst, int dstBitOffset,
int bitLen);

Include Files
ippe.hDomain Dependencies
ippcore.hLibraries
ippe.lib

Parameters
pSrc

Pointer to the source data buffer.

srcBitOffset

Offset in bits from the source data buffer.

pDst

Pointer to the destination data buffer.

dstBitOffset

Offset in bits from the destination data buffer.

len

Number of elements in the source data buffer.

pCRC24

Pointer to the checksum value.

bitLenLength of the input source vector, in bits.

447

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Description
These functions compute the checksum for srcLen elements of the source data buffer pSrc using different
polynomials and store it in the pCRC24 respectively. The following polynomial representations are used:

ippsCRC24a

X24 + X23 + X18 + X17 + X14 + X11 + X10 + X7 + X6 + X5 + X4 + X3 + X + 1

ippsCRC24b

X24 + X23 + X6 + X5 + X + 1

ippsCRC24c

X24 + X23 + X21 + X20 + X17 + X15 + X13 + X12 + X8 + X4 + X2 + X + 1

These functions can be used to compute the accumulated value of the checksum for multiple buffers in thedata stream by specifying as an input parameter the checksum value obtained in the preceding function call.

ippsCRC24{a|b|c}_1u. These function flavors compute the checksum of vectors that have a 8u data type.
It means that each byte consists of eight consecutive elements of the vector (1 bit per element). You need to
specify the offsets from the source and destination vectors in the srcBitOffset and dstBitOffset
parameters, respectively.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if the pSrc pointer is NULL.

ippStsSizeErr

Indicates an error if the length of the source vector is less thanor equal to 0.

Data Compression Functions
This chapter describes the Intel® IPP functions for data compression that support a number of different
compression methods: Huffman and variable-length coding, dictionary-based coding methods (including
support of ZLIB compression), and methods based on Burrows-Wheeler Transform.

Application Notes•••

The functions in this domain can be divided into two types: the functions that actually compress data, andtransformation functions. The latters do not compress data but only modify them and prepare for further
compression. The examples of such transformation are the Burrows-Weller Transform, or MoveToFrontalgorithm. To do data compression efficient, you should develop the proper consequence of functions ofdifferent type that will transform data and then compress them.
Compression ratio depends on the statistics of input data. For some types of input data no compression
could be achieved at all.
The size of memory required for the output of data compression functions typically is not obvious. As arule encoding functions uses less memory for output than the size of the input buffer, on the contrary
decoding functions use more memory for output than the size of the input buffer. You should accountthese issues and allocate the proper quantity of output memory using the techniques provided byfunctions in this domain. For example, you can use a double-pointer technique for automatic shifting theuser submitted pointer. For some other functions it is possible to compute the upper limit of the size of therequired output buffer.

Dictionary-Based Compression Functions
This section describes the Intel IPP functions that use different dictionary-based compression methods.

LZSS Compression Functions
These functions implement the LZSS (Lempel-Ziv-Storer-Szymanski) compression algorithm [Storer82]. The
functions perform LZSS coding with a vocabulary size of 32KB and 256-byte maximum match string length.

448

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

EncodeLZSSInit
Initializes the LZSS encoder state structure.

SyntaxIppStatus ippsEncodeLZSSInit_8u (IppLZSSState_8u* pLZSSState);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pLZSSState

Pointer to the LZSS encoder state structure.

Description
This function initializes the LZSS state structure pLZSSState in the external buffer. Its size must be
computed previously by calling the function ippsLZSSGetSize.
The LZSS encoder state structure is required for the encoder functions ippsEncodeLZSS andippsEncodeLZSSFlush.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if the pointer pLZSSState is NULL.

LZSSGetSize
Computes the size of the LZSS state structure.

SyntaxIppStatus ippsLZSSGetSize_8u (int* pLZSSStateSize);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pLZSSStateSize

Pointer to the size of the LZSS state structure.

Description
This function computes the size in bytes of the LZSS state structure for encoding and decoding and stores it
to an integer pointed to by pLZSSStateSize. The function must be called prior to the function
ippsEncodeLZSSInit or ippsDecodeLZSSInit.

449

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if the pointer pLZSSStateSize is NULL.

EncodeLZSS
Performs LZSS encoding.

SyntaxIppStatus ippsEncodeLZSS_8u (Ipp8u** ppSrc, int* pSrcLen, Ipp8u** ppDst, int* pDstLen,
IppLZSSState_8u* pLZSSState);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
ppSrc
pSrcLen
ppDst
pDstLenpLZSSState

Double pointer to the source buffer.
Pointer to the number of elements in the source buffer; it is
updated after encoding.
Double pointer to the destination buffer.
Pointer to the length of the destination buffer; it is updated andreturns the length of the destination buffer after encoding.
Pointer to the LZSS encoding state structure.

Description
This function performs LZSS encoding of data in the source buffer ppSrc of length pSrcLen and stores theresult in the destination buffer pDst of length pDstLen. The LZSS encoder state structure pLZSSState must
be initialized by ippsEncodeLZSSInit beforehand.
After encoding the function returns the pointers to source and destination buffers shifted by the number ofsuccessfully read and encoded bytes, respectively. The function updates pSrcLen and pDstLen so they
return the actual number of elements in the source and destination buffers respectively.
Code example shows how to use the function ippsEncodeLZSS_8u and supporting functions.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error if srcLen is less than or equal to 0.

ippStsDstSizeLessExpected

Indicates a warning that the size of the destination buffer isinsufficient for completing the operation.

EncodeLZSSFlush450

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Encodes the last few bits in the bitstream and aligns
the output data on the byte boundary.

SyntaxIppStatus ippsEncodeLZSSFlush_8u (Ipp8u** ppDst, int* pDstLen, IppLZSSState_8u*
pLZSSState);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
ppDst

Double pointer to the destination buffer.

pDstLen

Pointer to the length of destination buffer.

pLZSSState

Pointer to the LZSS encoder state structure.

Description
This function encodes the last few bits (remainder) in the bitstream, writes them to ppDst, and aligns theoutput data on a byte boundary.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the pointers is NULL.

ippStsSizeErr

Indicates an error if pDstLen is less than or equal to 0.

ippStsDstSizeLessExpected

Indicates a warning that the size of the destination buffer isinsufficient for completing the operation.

ExampleDecodeLZSSInit
Initializes the LZSS decoder state structure.

SyntaxIppStatus ippsDecodeLZSSInit_8u (IppLZSSState_8u* pLZSSState);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

451

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Parameters
pLZSSState

Pointer to the LZSS decoder state structure.

Description
This function initializes the LZSS decoder state structure in the external buffer, the size of which must be
computed previously by calling the function ippsLZSSGetSize.
The LZSS decoder state structure is required for the function ippsDecodeLZSS.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if the pointer pLZSSState is NULL.

DecodeLZSS
Performs LZSS decoding.

SyntaxIppStatus ippsDecodeLZSS_8u (Ipp8u** ppSrc, int* pSrcLen, Ipp8u** ppDst, int* pDstLen,
IppLZSSState_8u* pLZSSState);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
ppSrc

Double pointer to the source buffer.

pSrcLen

Pointer to the length of the source buffer.

ppDst

Double pointer to the destination buffer.

pDstLen

Pointer to the length of the destination buffer.

pLZSSState

Pointer to the LZSS decoding state structure.

Description
This function performs LZSS decoding of the pSrcLen elements of the ppSrc source buffer and stores theresult in the pDst destination vector. The length of the destination vector is stored in pDstLen. The LZSS
decoder state structure pLZSSState must be initialized by ippsDecodeLZSSInit beforehand.
After decoding the function returns the pointers to source and destination buffers shifted by the number ofsuccessfully read and decoded bytes respectively. The function updates pSrcLen so it is equal to the actual
number of elements in the source buffer.

Return Values
ippStsNoErr

452

Indicates no error.

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

ippStsNullPtrErr

Indicates an error if one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error if pSrcLen or pDstLen is negative.

ippStsDstSizeLessExpected

Indicates a warning that the size of the destination buffer isinsufficient for completing the operation.

ZLIB Coding Functions
This section describes Intel IPP data compression functions that implement compression methods and data
formats defined by the following specifications: [RFC1950], [RFC1951], and [RFC1952]. These formats arealso known as ZLIB, DEFLATE, and GZIP, respectively.
A basic algorithm for these data compression methods is based on the Lempel-Ziv (LZ77) [Ziv77] dictionarybased compression.

453

1

Intel® Integrated Performance Primitives Developer Guide and Reference

The structure of ZLIB data is schematically shown in Figure "ZLIB Data Structure".
ZLIB Data Structure

454

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

The full version of the zlib library is included with the product at <ipp directory>/interfaces/datacompression/ipp_zlib.
Special Parameters
The ZLIB coding functions have several special parameters.
The comprLevel parameter specifies the level of compression rate and compression ratio. The table below
lists the possible values of the comprLevel parameter and their meanings.
Parameter comprLevel for ZLIB Functions
Value

Descriptions

IppLZ77FastCompr

Fast compression, maximum compression rate, and below
average compression ratio
Average compression rate, average compression ratio

IppLZ77AverageCompr
IppLZ77BestCompr

Slow compression, maximum compression ratio

The checksum parameter specifies what algorithm is used to compute checksum for input data. The
table below lists the possible values of the checksum parameter and their meanings.
Parameter checksum for ZLIB Functions
Value

Description

IppLZ77NoChcksm
IppLZ77Adler32
IppLZ77CRC32

Checksum is calculated using Adler32 algorithm.

Checksum is not calculated.
Checksum is calculated using the CRC32 algorithm.

The flush parameter specifies the encoding mode for data block encoding. The table below lists the possible
values of the flush parameter and their meanings.
Parameter flush for ZLIB Functions
Value

Descriptions

IppLZ77NoFlushIppLZ77SyncFlushThe end of the block is aligned to a byte boundary.

IppLZ77FullFlushIppLZ77FinishFlushThe end of the block is aligned to a byte boundary, and 4byte marker is written to pDst.
The end of the block is aligned to a byte boundary, 4-byte
marker is written to pDst, sliding dictionary is zeroed.
The end of the block is aligned to a byte boundary and thefunction returns the ippStsStreamEnd status.

The deflateStatus parameter specifies the encoding status to ensure the compatibility with the RFC1951
specification. This parameter is used by Intel IPP ZLIB encoding functions. The table below lists the possible
values of the deflateStatus parameter and their meanings.
Parameter deflateStatus for ZLIB Encoding Functions
Value

Descriptions

IppLZ77StatusInit

Specified the deflate implementation of encoding
functions, must be used before stream encoding.
Call the deflate implementation of encoding function.

IppLZ77StatusLZ77Process
IppLZ77StatusHuffProcess
IppLZ77StatusFinal

Call the deflate implementation of the encoding function
with the fixed Huffman codes.
Specified the last block in the stream.

The inflateStatus parameter specifies the decoding status to ensure the compatibility with the RFC1951
specification. This parameter is used by Intel IPP ZLIB decoding functions. The table below lists the possible
values of the inflateStatus parameter and their meanings.
Parameter inflateStatus for ZLIB Decoding Functions
Value

Descriptions

IppLZ77inflateStatusInit

Specified the deflate implementation of encoding
functions, must be used before stream encoding.

455

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Value

Descriptions

IppLZ77InflateStatusHuffProcess

Call the deflate implementation of the encoding function
with the fixed Huffman codes.
Call the deflate implementation of encoding function.

IppLZ77InflateStatusLZ77Process
IppLZ77InflateStatusFinal

Specified the last block in the stream.

Adler32
Computes the Adler32 checksum for the source data
buffer.

SyntaxIppStatus ippsAdler32_8u (const Ipp8u* pSrc, int srcLen, Ipp32u* pAdler32);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source data buffer.

srcLenNumber of elements in the source data buffer.

pAdler32

Pointer to the checksum value.

Description
This function computes the checksum for srcLen elements of the source data buffer pSrc and stores it in
the pAdler32. The checksum is computed using the Adler32 algorithm that is a modified version of the
Fletcher algorithm [Flet82], [ITU224 ], [RFC1950].
You need to call the Adler32 function twice: once with a NULL/zero length buffer to prime the checksum to
1, then call it again to compute the checksum on the buffer.
You can use this function to compute the accumulated value of the checksum for multiple buffers in the data
stream by specifying as an input parameter the checksum value obtained in the preceding function call.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if the pSrc pointer is NULL.

ippStsSizeErr

Indicates an error if srcLen is less than or equal to 0.

CRC32, CRC32C
Computes the CRC32 checksum for the source data
buffer.

SyntaxIppStatus ippsCRC32_8u (const Ipp8u* pSrc, int srcLen, Ipp32u* pCRC32);
IppStatus ippsCRC32C_8u(const Ipp8u* pSrc, Ipp32u srcLen, Ipp32u* pCRC32C);
456

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source data buffer.

srcLenNumber of elements in the source data buffer.

pCRC32, pCRC32C

Pointer to the checksum value.

Description
These functions compute the checksum for srcLen elements of the source data buffer pSrc using different
algorithms and stores it in the pCRC32 or pCRC32C respectively.
The function ippsCRC32 uses algorithm described in [Griff87], [Nel92], the function ippsCRC32C uses
algorithm described in [Cast93].
These functions can be used to compute the accumulated value of the checksum for multiple buffers in thedata stream by specifying as an input parameter the checksum value obtained in the preceding function call.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if the pSrc pointer is NULL.

ippStsSizeErr

Indicates an error if the length of the source vector is less thanor equal to 0.

ExampleThe example below shows how to use the function ippsCRC32C_8u.

#include <iostream>#include <iomanip>#include "ipp.h"using namespace std;
void crc32c_core( Ipp8u* src, Ipp32u src_len ) {Ipp32u crc32c = ~(Ipp32u)0;
ippsCRC32C_8u( src, src_len, &crc32c );ippsSwapBytes_32u_I( &crc32c, 1 );cout << "0x" << setbase(16) << ~crc32c << endl;}
int main() {Ipp8u buff[48] = { 0x01, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00,
0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x18,
0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,

457

1

Intel® Integrated Performance Primitives Developer Guide and Reference

0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };cout << "An iSCSI - SCSI Read (10) Command PDU: ";crc32c_core( buff, 48 );cout << "32 bytes of zeroes: ";for( int i = 0; i < 32; i++ ) buff[i] = 0;
crc32c_core( buff, 32 );cout << "32 bytes of ones: ";for( int i = 0; i < 32; i++ ) buff[i] = 0xff;
crc32c_core( buff, 32 );cout << "32 bytes of incrementing 00..1f: ";for( int i = 0; i < 32; i++ ) buff[i] = i;
crc32c_core( buff, 32 );cout << "32 bytes of decrementing 1f..00: ";for( int i = 0; i < 32; i++ ) buff[i] = 31 - i;
crc32c_core( buff, 32 );return 0;}
Output: An iSCSI - SCSI Read (10) Command PDU: 0x563a96d9 32 bytes of zeroes: 0xaa36918a 32
bytes of ones: 0x43aba862 32 bytes of incrementing 00..1f: 0x4e79dd46 32 bytes of decrementing
1f..00: 0x5cdb3f11
DeflateLZ77
Performs LZ77 encoding according to the specifiedcompression level.

SyntaxIppStatus ippsDeflateLZ77_8u(const Ipp8u** ppSrc, Ipp32u* pSrcLen, Ipp32u* pSrcIdx,
const Ipp8u* pWindow, Ipp32u winSize, Ipp32s* pHashHead, Ipp32s* pHashPrev, Ipp32u
hashSize, IppDeflateFreqTable pLitFreqTable[286], IppDeflateFreqTable
pDistFreqTable[30], Ipp8u* pLitDst, Ipp16u* pDistDst, Ipp32u* pDstLen, int comprLevel,
IppLZ77Flush flush);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
ppSrc

Double pointer to the source vector.

pSrcLen

Pointer to the length of the source vector.

pSrcIdx

Pointer to the index of the current position in the source vector.

pWindow

Pointer to the sliding window (the dictionary for the LZ77
algorithm).

458

Developer Guide and Reference for Intel® Integrated Performance Primitives

winSize

Size of the sliding window and the pHashPrev table.

pHashHead

Pointer to the table containing heads of the hash chains.

1

hashSize

Pointer to the table contating indexes to the previous strings
with the same hash key.
Size of the pHashHead table.

pLitFreqTable

Pointer to the literals/lengths frequency table.

pDistFreqTable

Pointer to the distances frequency table.

pLitDstPointer to the destination vector containing literals/lengths.

pDistDst

Pointer to the destination vector containing distances.

pDstLen

Pointer to the length of the destination vectors.

comprLevel

Compression level in range [0..9] in accordance with ZLIB.

flush

Specifies the encoding mode for data blocks (see flushparameter).

pHashPrev

Description
This function performs LZ77 encoding of source data ppSrc according to the compression level comprLevel,
which is similar to the ZLIB compression level.
To correctly process the first bytes of the source vector, initialize the pHashHead table with the winSize
value.
The pSrcIdx parameter returns the index of the current position in the source vector, and is used toestablish a correlation between the current position in the source vector and indexes in hash tables. After
processing each 2GB of source data, the index and hash tables must be normalized (instead of 64K of source
data in ZLIB).

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when at least one of the specified pointers is
NULL.

See Also
Special Parameters
DeflateLZ77Fast
Performs LZ77 encoding according to the fastalgorithm and parameters of a match.

SyntaxIppStatus ippsDeflateLZ77Fast_8u(const Ipp8u** ppSrc, Ipp32u* pSrcLen, Ipp32u* pSrcIdx,
const Ipp8u* pWindow, Ipp32u winSize, Ipp32s* pHashHead, Ipp32s* pHashPrev, Ipp32u
hashSize, IppDeflateFreqTable pLitFreqTable[286], IppDeflateFreqTable
pDistFreqTable[30], Ipp8u* pLitDst, Ipp16u* pDistDst, Ipp32u* pDstLen, int* pVecMatch,
IppLZ77Flush flush);

Include Files
ippdc.h459

1Intel® Integrated Performance Primitives Developer Guide and Reference

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
ppSrc

Double pointer to the source vector.

pSrcLen

Pointer to the length of the source vector.

pSrcIdx

Pointer to the index of the current position in the source vector.

pWindow

Pointer to the sliding window (the dictionary for the LZ77
algorithm).

winSize

Size of the sliding window and the pHashPrev table.

pHashHead

Pointer to the table containing heads of the hash chains.

hashSize

Pointer to the table containing indexes to the previous strings
with the same hash key.
Size of the pHashHead table.

pLitFreqTable

Pointer to the literals/lengths frequency table.

pDistFreqTable

Pointer to the distances frequency table.

pLitDstPointer to the destination vector containing literals/lengths.

pDistDst

Pointer to the destination vector containing distances.

pDstLen

Pointer to the length of the destination vectors.

pHashPrev

pVecMatch

flush

Pointer to the vector containing the following parameters of amatch: max_chain_length, good_match, nice_match,
max_lazy_match (for more information, see [ZLIB]).
Specifies the encoding mode for data blocks (see flushparameter).

Description
This function performs LZ77 encoding of the ppSrc data according to the fast algorithm and parameters of amatch.
To correctly process the first bytes of the source vector, initialize the pHashHead table with the winSize
value.
The pSrcIdx parameter returns the index of the current position in the source vector, and is used toestablish a correlation between the current position in the source vector and indexes in hash tables. After
processing each 2GB of source data, the index and hash tables must be normalized (instead of 64K of source
data in ZLIB).

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 winSize is less than 256, or more than
32768; or hashSize is less than 256, or more than 65536.

460

Developer Guide and Reference for Intel® Integrated Performance Primitives

ippStsBadArgErr

1

Indicates an error when good_match, nice_match, or
max_lazy_match is less than 4.

See Also
Special Parameters
DeflateLZ77Fastest
Performs LZ77 encoding according to the fastest
algorithm.

SyntaxIppStatus ippsDeflateLZ77Fastest_8u(const Ipp8u** ppSrc, Ipp32u* pSrcLen, Ipp32u*
pSrcIdx, const Ipp8u* pWindow, Ipp32u winSize, Ipp32s* pHashHead, Ipp32u hashSize,Ipp16u* pCode, Ipp32u* pCodeLenBits, Ipp8u* pDst, Ipp32u dstLen, Ipp32u* pDstIdx,
IppDeflateHuffCode pLitHuffCodes[286], IppDeflateHuffCode pDistHuffCodes[30],IppLZ77Flush flush);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
ppSrc

Double pointer to the source vector.

pSrcLen

Pointer to the length of the source vector.

pSrcIdx

Pointer to the index of the current position in the source vector.

winSize

Pointer to the sliding window (the dictionary for the LZ77
algorithm).
Size of the sliding window and the pHashPrev table.

pHashHead

Pointer to the table containing heads of the hash chains.

hashSize

Size of the pHashHead table.

pCode

Pointer to the bit buffer.

pCodeLenBits

Pointer to the number of valid bits in the bit buffer.

pDst

Pointer to the destination vector.

dstLenLenght of the destination vector.

pDstIdx

Pointer to the index in the destination vector.

pLitHuffCodes

Pointer to the literals/lengths Huffman codes.

pDistHuffCodes

Pointer to the distances Huffman codes.

flush

Specifies the encoding mode for data blocks (see flushparameter).

pWindow

Description
This function performs LZ77 encoding of the ppSrc data according to the fastest algorithm.

461

1

Intel® Integrated Performance Primitives Developer Guide and Reference

To correctly process the first bytes of the source vector, initialize the pHashHead table with the winSize
value.
The pSrcIdx parameter returns the index of the current position in the source vector, and is used toestablish a correlation between the current position in the source vector and indexes in hash tables. After
processing each 2GB of source data, the index and hash tables must be normalized (instead of 64K of source
data in ZLIB).

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when at least one of the specified pointers is
NULL.

ippStsSizeErr

Indicates an error if winSize is less than 256, or more than
32768; or hashSize is less than 256, or more than 65536.

See Also
Special Parameters
DeflateLZ77FastestGenHeader
Computes a header of the provided Huffman tables
description.

SyntaxIppStatus ippsDeflateLZ77FastestGenHeader_8u(const IppDeflateHuffCode
pLitCodeTable[286], const IppDeflateHuffCode pDistCodeTable[30], Ipp8u* pDstHeader,
int* pDstLen, int* pDstBits);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pLitCodeTable

Pointer to literals/lengths in a Huffman code.

pDistCodeTable

Pointer to distances in a Huffman code.

pDstHeader

Pointer to the header.

pDstLen

Pointer to the header length.

pDstBits

Pointer to the header length, in bits.

Description
This function gets a header of the provided Huffman tables description.

Return Values
ippStsNoErr

462

Indicates no error.

Developer Guide and Reference for Intel® Integrated Performance Primitives

ippStsNullPtrErr

1

Indicates an error when one of the specified pointers is NULL.

DeflateLZ77FastestGenHuffTable
Builds Huffman tables according to statistical datacollections.

SyntaxIppStatus ippsDeflateLZ77FastestGenHuffTable_8u(const int pLitStat[286], const int
pDistStat[30], IppDeflateHuffCode pLitCodeTable[286], IppDeflateHuffCode
pDistCodeTable[30]);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pLitStat

Pointer to data collection for literals and match lengths.

pDistStat

Pointer to data collection for distances.

pLitCodeTable

Pointer to the literals/lengths Huffman codes.

pDistCodeTable

Pointer to the distances Huffman codes.

Description
This function builds Huffman tables for literals/lengths according to the provided statistical data collection.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

DeflateLZ77FastestGetStat
Performs statistical data collection required to build
user's Huffman table.

SyntaxIppStatus ippsDeflateLZ77FastestGetStat_8u(const Ipp8u** ppSrc, Ipp32u* pSrcLen,
Ipp32u* pSrcIdx, const Ipp8u* pWindow, Ipp32u winSize, Ipp32s* pHashHead, Ipp32u
hashSize, int pLitStat[286], int pDistStat[30], IppLZ77Flush flush);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h

463

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
ppSrc

Double pointer to the source vector.

pSrcLen

Pointer to the length of the source vector.

pSrcIdx

Pointer to the index of the current position in the source vector.

winSize

Pointer to the sliding window (the dictionary for the LZ77
algorithm).
Size of the sliding window and the pHashPrev table.

pHashHead

Pointer to the table containing heads of the hash chains.

hashSize

Size of the pHashHead table.

pLitStat

Pointer to data collection for literals and match lengths.

pDistStat

Pointer to data collection for distances.

flush

Specifies the encoding mode for data blocks.

pWindow

Description
This function performs collection of statistical data. This data is needed for functions building user's Huffman
table ippsDeflateLZ77FastestGenHuffTable and functions computing a header of Huffman tables
description ippsDeflateLZ77FastestGenHeader.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error when winSize is less than 256 or more than
32768, or if hashSize is less than 256 or more than 65536.

DeflateLZ77FastestPrecompHeader
Performs LZ77 encoding using the fastest algorithmwith prebuilding of customer Huffman tables andprediction header.

SyntaxIppStatus ippsDeflateLZ77FastestPrecompHeader_8u(const Ipp8u** ppSrc, Ipp32u* pSrcLen,
Ipp32u* pSrcIdx, const Ipp8u* pWindow, Ipp32u winSize, Ipp32s* pHashHead, Ipp32u
hashSize, Ipp16u* pCode, Ipp32u* pCodeLenBits, Ipp8u* pDst, Ipp32u dstLen, Ipp32u*
pDstIdx, IppDeflateHuffCode pLitHuffCodes[288], IppDeflateHuffCode pDistHuffCodes[30],const Ipp8u* pHeaderCodeLens, int numBitsHeader, IppLZ77Flush flush);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

464

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Parameters
ppSrc

Double pointer to the source vector.

pSrcLen

Pointer to the length of the source vector.

pSrcIdx

Pointer to the index of the current position in the source vector.

winSize

Pointer to the sliding window (the dictionary for the LZ77
algorithm).
Size of the sliding window and the pHashPrev table.

pHashHead

Pointer to the table containing heads of the hash chains.

hashSize

Size of the pHashHead table.

pCode

Pointer to the bit buffer.

pCodeLenBits

Pointer to the number of valid bits in the bit buffer.

pDst

Pointer to the destination vector.

dstLenThe length of the destination vector.

pDstIdx

Pointer to the index in the destination vector.

pLitHuffCodes

Pointer to the literals/lengths Huffman codes.

pDistHuffCodes

Pointer to the distances Huffman codes.

pWindow

numBitsHeader

Pointer to the prediction header with description of Huffman
tables.
Length of the prediction header, in bits.

flush

Specifies the encoding mode for data blocks.

pHeaderCodeLens

Description
This function performs LZ77 encoding of source data ppSrc using the fastest algorithm.
To correctly process the first bytes of the source vector, initialize the pHashHead table with -winSize value.
The pSrcIdx parameter returns the index of the current position in the source vector and is used to correlate
the current position in the source vector and indexes in the hash tables. After processing each 2GB of source
data, this index and hash tables must be normalized (instead of 64K of source data in ZLIB).

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error when winSize is less than 256 or more than
32768, or if hashSize is less than 256 or more than 65536, orif *pDstIdx is more than or equal to dstLen.

DeflateLZ77Slow
Performs LZ77 encoding according to the slow
algorithm and parameters of a match.

465

1

Intel® Integrated Performance Primitives Developer Guide and Reference

SyntaxIppStatus ippsDeflateLZ77Slow_8u(const Ipp8u** ppSrc, Ipp32u* pSrcLen, Ipp32u* pSrcIdx,
const Ipp8u* pWindow, Ipp32u winSize, Ipp32s* pHashHead, Ipp32s* pHashPrev, Ipp32u
hashSize, IppDeflateFreqTable pLitFreqTable[286], IppDeflateFreqTable
pDistFreqTable[30], Ipp8u* pLitDst, Ipp16u* pDistDst, Ipp32u* pDstLen, int* pVecMatch,
IppLZ77Flush flush);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
ppSrc

Double pointer to the source vector.

pSrcLen

Pointer to the length of the source vector.

pSrcIdx

Pointer to the index of the current position in the source vector.

winSize

Pointer to the sliding window (the dictionary for the LZ77
algorithm).
Size of the sliding window and the pHashPrev table.

pHashHead

Pointer to the table containing heads of the hash chains.

pWindow

hashSize

Pointer to the table contating indexes to the previous strings
with the same hash key.
Size of the pHashHead table.

pLitFreqTable

Pointer to the literals/lengths frequency table.

pDistFreqTable

Pointer to the distances frequency table.

pLitDstPointer to the destination vector containing literals/lengths.

pDistDst

Pointer to the destination vector containing distances.

pDstLen

Pointer to the length of the destination vectors.

pHashPrev

pVecMatch

flush

Pointer to the vector containing the following parameters of amatch: max_chain_length, good_match, nice_match,
max_lazy_match (for more information, see [ZLIB]).
Specifies the encoding mode for data blocks (see flushparameter).

Description
This function performs LZ77 encoding of source data ppSrc according to the slow algorithm and match
parameters.
To correctly process the first bytes of the source vector, initialize the pHashHead table with the winSize
value.

466

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

The pSrcIdx parameter returns the index of the current position in the source vector, and is used toestablish a correlation between the current position in the source vector and indexes in hash tables. After
processing each 2GB of source data, the index and hash tables must be normalized (instead of 64K of source
data in ZLIB).

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when at least one of the specified pointers is
NULL.

ippStsSizeErr
ippStsBadArgErr

Indicates an error if winSize is less than 256 or more than
32768 or hashSize is less than 256 or more than 65536.
Indicates an error when good_match, nice_match, or
max_lazy_match is less than 4, or max_chain_length is lessthan 1.

See Also
Special Parameters
DeflateDictionarySet
Presets the user's dictionary for LZ77 encoding.

SyntaxIppStatus ippsDeflateDictionarySet_8u(const Ipp8u* pDictSrc, Ipp32u dictLen, Ipp32s*
pHashHeadDst, Ipp32u hashSize, Ipp32s* pHashPrevDst, Ipp8u* pWindowDst, Ipp32u winSize,
int comprLevel);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pDictSrc

Pointer to the user's dictionary.

dictLenLength of the user's dictionary.

pHashHeadDst

Pointer to the table containing heads of the hash chains.

pHashPrevDst
hashSizepWindowDst
winSizecomprLevel

Pointer to the table containing indexes to the previous strings
with the same hash key.
Size of the pHashHeadDst table.
Pointer to the sliding window that is used as the dictionary for
LZ77 encoding.
Size of the sliding window and the elements of the

pHashPrevDst table.

Compression level in range [0..9] in accordance with ZLIB.

Description
This function presets the user's dictionary for LZ77 encoding.

467

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the specified pointers is NULL.

DeflateUpdate Hash
Performs LZ77 encoding according to the specifiedcompression level.

SyntaxIppStatus ippsDeflateUpdateHash_8u(const Ipp8u* pSrc, Ipp32u srcIdx, Ipp32u srcLen,
Ipp32s* pHashHeadDst, Ipp32u hashSize, Ipp32s* pHashPrevDst, Ipp32u winSize, int
comprLevel);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source vector.

srcIdxIndex of the current position in the source vector.

srcLenLength of the source vector.

pHashHeadDst

Pointer to the table containing heads of the hash chains.

hashSize

Size of the pHashHeadDst table.

pHashPrevDst

Pointer to the table contating indexes to the previous strings with thesame hash key.

winSize

Size of the sliding window and the pHashPrevDst table.

comprLevel

Compression level in range [0..9] in accordance with ZLIB.

Description
This function updates hash tables according to the source context.
The function parameter srcIdx - index of the current position in the source vector - is used to correlate thecurrent position in the source vector and indexes in the hash tables. After processing each 2GB of source
data, this index and hash tables must be normalized (instead of 64K of source data in ZLIB).

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the specified pointers is NULL.

468

Developer Guide and Reference for Intel® Integrated Performance Primitives

ippStsSizeErr

1

Indicates an error if winSize is less than or equal to 256, orgreater than 32768; or if hashSize is less than or equal to 256,
or greater than 65536.

DeflateHuff
Performs Huffman encoding .

SyntaxIppStatus ippsDeflateHuff_8u(const Ipp8u* pLitSrc, const Ipp16u* pDistSrc, Ipp32u
srcLen, Ipp16u* pCode, Ipp32u* pCodeLenBits, IppDeflateHuffCode pLitHuffCodes[286],
IppDeflateHuffCode pDistHuffCodes[30], Ipp8u* pDst, Ipp32u* pDstIdx);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pLitSrc

Pointer to the literals/lengths source vector.

pDistSrc

Pointer to the distances source vector.

srcLenLength of the source vectors.

pCode

Pointer to the bit buffer.

pCodeLenBits

Pointer to the number of valid bits in the bit buffer.

pLitHuffCodes

Pointer to the literals/lengths Huffman codes.

pDistHuffCodes

Pointer to the distances Huffman codes.

pDst

Pointer to the destination vector.

pDstIdx

Pointer to the index in the destination vector.

Description
This function performs Huffman encoding of source data.
The function parameter pDstIdx returns the index of the current position in the destination vector: zlib uses
the intermediate buffer for the Huffman encoding and we need to know the indexes of the first (input
parameter) and the last (output parameter) symbols, which are written by the function.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the specified pointers is NULL.

InflateBuildHuffTable
Builds the Huffman code table for compressed block in
the “deflate” format.

469

1

Intel® Integrated Performance Primitives Developer Guide and Reference

SyntaxIppStatus ippsInflateBuildHuffTable(const Ipp16u* pCodeLens, unsigned int nLitCodeLens,
unsigned int nDistCodeLens, IppInflateState* pIppInflateState);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters

nLitCodeLens

Pointer to the common array with lengths of the Huffman codes
for literals/lengths and distances.
Number of lengths of the Huffman codes for literals/lengths.

nDistCodeLens

Number of lengths of the Huffman codes for distances.

pIppInflateState

Pointer to the structure with the parameters of decoding.

pCodeLens

Description
This function builds tables of Hufman codes for literals/lengths and distances to decode a block compressedwith use of the dynamic Huffman codes in accordance with the “deflate” format [RFC1951].
The structure IppInflateState contains the following fields:

pWindow
winSizetableTypetableBufferSize

Pointer to the sliding window (the dictionary for the LZ77
algorithm).
Size of the sliding window in the range [256, 32768].
Type of the Huffman code tables. For dynamic Huffman code itis greater than 0, for fixed Huffman codes is equal to 0.
Size of the buffer containing the tables. Its value is 8192 sizeof(IppInflateState). (8192 =ENOUGH*sizeof(code);
ENOUGH is defined in ZLIB and is equal to 2048,
sizeof(code)=4.)

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the pointers is NULL.

ippStsSizeErr

Indicates an error if nLitCodeLens is greater than 286 or
nDistCodeLens is greater than 30.

ippStsSrcDataErr

Indicates an error if a not valid literal/length and distance set
occurs in the common lengths array.

InflateDecodes data in the “deflate” format.

470

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

SyntaxIppStatus ippsInflate_8u(Ipp8u** ppSrc, unsigned int* pSrcLen, Ipp32u* pCode, unsigned
int* pCodeLenBits, unsigned int winIdx, Ipp8u** ppDst, unsigned int* pDstLen, unsigned
int dstIdx, IppInflateMode* pMode, IppInflateState* pIppInflateState);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
ppSrc

Double pointer to the source vector.

pSrcLen

Pointer to the length of source vector.

pCode

Pointer to the bit buffer.

pCodeLenBits

Number of valid bits in the bit buffer.

winIdxIndex of the start position of the sliding window.

ppDst

Double pointer to the destination vector.

pDstLen

Pointer to the length of destination vector.

dstIdxIndex of the current position in the destination vector.

pMode

Pointer to the current decode mode. Possible values are:ippTYPE - block decoding is completed;
ippLEN - decoding from the beginning of the sequence;
ippLENEXT - extra bits are required to decode the sequence.

pIppInflateState

Pointer to the structure that contains parameters of decoding.

Description
This function decodes the data encoded in the "deflate" format [RFC1951] in accordance with the parameters
set in the structure pIppInflateState. If the data is compressed using dynamic Huffman codes, theHuffman code tables must be built by the function ippsInflateBuildHuffTable beforehand. If the data iscompressed using the fixed Huffman codes, the fileld tableType in the pIppInflateState must be set to0, and code tables are not required to be built at all.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the pointers is NULL.

ippStsSizeErr

ippStsSrcDataErr

Indicates an error if pCodeLenBits is greater than 32, or if
winIdx is greater than pIppInflateState->winSize, or if
dstIdx is greater than pDstLen.
Indicates an error if a not valid literal/length and distance set
occurs during decoding.

471

1

Intel® Integrated Performance Primitives Developer Guide and Reference

LZO Compression Functions
This section describes Intel IPP data compression functions, that implement the LZO (Lempel-ZivOberhumer) compressed data format. This format and algorithm use 64KB compression dictionary and do
not require additional memory for decompression. (See original code of the LZO library at http://
www.oberhumer.com.)
Special Parameters
The LZO coding initialization functions have a special parameter method. This parameter specifies level ofparallelization and generic LZO compatibility to be used in the LZO encoding. The table below lists possible
values of the method parameter and their meanings.
Parameter method for the LZO Compression Functions
Value

Descriptions

IppLZO1XSTThe compression and decompression are performed
sequentially in a single-thread mode with full binary
compatibility with generic LZO libraries andapplications.

IppLZO1XMTThe compression and decompression are performedin parallel (multi-threaded mode), it is more fast,
but not compatible with the generic LZO.

IppLZO1X1ST

The compression and decompression are performed
sequentially in a single-threaded mode with fullbinary compatibility with generic LZO libraries andapplications.
The compression ratio of this method corresponds
to the LZO lzo1x_1_compress function (default
function for the lzop compressor). The
IppLZO1X1ST method provides lower compression
ratio than IppLZO1XST but better compression
performance.

EncodeLZOGetSize
Calculates the size of LZO encoding structure.

SyntaxIppStatus ippsEncodeLZOGetSize(IppLZOMethod method, Ipp32u maxInputLen, Ipp32u* pSize);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
methodmaxInputLen

472

Specifies required LZO compression method, possible values
are listed in Table "method Parameter").
Specifies the maximum length of the input data buffer during
compression operations. Not required for the IppLZO1XST and
IppLZO1X1ST compression methods.

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

pSize

Pointer to the variable, receiving the size of LZO encoding
structure.

Description
This function calculates the size of the memory buffer that must be allocated for the LZO encoding structure.
For the single-thread compression (method = IppLZO1XST) the size of the structure is fixed, and the valueof the maxInputLen parameter is ignored, for example, it can be set to 0.
For the multi-threaded compression (method = IppLZO1XMT) maxInputLen parameter is important andaffects the size of the structure. If it is set to 0, then each compression operation starts with memory
allocation for internal buffers and ends with memory freeing. This significantly decreases the performance ofcompression/decompression.
Code example shows how the Intel IPP functions for the LZO compression can be used.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if the pointer pSize is NULL.

ippStsBadArgErr

Indicates an error if the parameter method has an illegal value.

ExampleEncodeLZOInit
Initializes LZO encoding structure.

SyntaxIppStatus ippsEncodeLZOInit_8u(IppLZOMethod method, Ipp32u maxInputLen, IppLZOState_8u*
pLZOState);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
methodmaxInputLen

pLZOState

Specifies required LZO compression method, possible values
are listed in Table "method Parameter").
Specifies the maximum length of the input data buffer during
compression operations. Not required for the IppLZO1XST and
IppLZO1X1ST compression methods.
Pointer to the LZO encoding structure.

Description
This function initializes the LZO encoding structure in the external buffer. Its size must be calculated bycalling the function ippsEncodeLZOGetSize beforehand.
The parameter method must be the same for both functions.

473

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if the pointer pLZOState is NULL.

ippStsBadArgErr I

ndicates an error if the parameter method has an illegal value.

ExampleEncodeLZO
Compresses input data, returns the length of thecompressed data.

SyntaxIppStatus ippsEncodeLZO_8u (const Ipp8u* pSrc, Ipp32u srcLen, Ipp8u* pDst, Ipp32u*
pDstLen, IppLZOState_8u* pLZOState);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source buffer.

srcLenLength of the source buffer.

pDst

Pointer to the destination buffer.

pDstLen

Pointer to the length of the destination buffer.

pLZOState

Pointer to the LZO state structure.

Description
This function performs compression of the source data pSrc according to the method specified in the LZO
state structure pLZOState. It must be previously initialized by the function ippsEncodeLZOInit.
Compressed data are stored in the pDst, the pointer pDstLen points to the number of elements in thisbuffer.
Code example shows how the Intel IPP functions for the LZO compression can be used.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the specified pointers is NULL.

ExampleDecodeLZO

474

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Decompresses input data, returns the length of thedecompressed data.

SyntaxIppStatus ippsDecodeLZO_8u (const Ipp8u* pSrc, Ipp32u srcLen, Ipp8u* pDst, Ipp32u*
pDstLen);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source data buffer.

srcLenNumber of elements in the source data buffer.

pDst

Pointer to the destination data buffer.

pDstLen

Pointer to the variable with the number of elements in the destination
data buffer.

Description
The function decompresses the source (compressed) data according to the compressed data format. Thisfunction can decompress both single-thread and multi-threaded data. Note that the maximum performancecan be obtained only in multi-threaded decompression of data compressed in the multi-threaded mode.

NOTE
Destination data buffer must have enough free space to hold uncompressed data. No output
buffer check is performed and no error code is returned. In the case of doubts use safe
version of this function DecodeLZOSafe .
Code example shows how the Intel IPP functions for the LZO compression can be used.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the specified pointers is NULL.

ExampleDecodeLZOSafe
Decompresses input data with constantly checking
integrity of output.

SyntaxIppStatus ippsDecodeLZOSafe_8u(const Ipp8u* pSrc, Ipp32u srcLen, Ipp8u* pDst, Ipp32u*
pDstLen);475

1Intel® Integrated Performance Primitives Developer Guide and Reference

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source data buffer.

srcLenNumber of elements in the source data buffer.

pDst

Pointer to the destination data buffer.

pDstLen

Pointer to the variable with the number of elements in the destination
data buffer.

Description
This function is a version of the function ippsDecodeLZO. It decompresses the source (compressed) dataaccording to the compressed data format. The function can decompress both single-thread and multithreaded data. The maximum performance can be obtained only in multi-threaded decompression of datacompressed in the multi-threaded mode. Additionally this function checks the integrity of the destination data
buffer, that is checks the buffer boundary limits. This function works slower, it can be used in doubtful cases
when the compressed data integrity is not guaranteed, for example, decoding data received via non-reliablecommunication lines.
Destination data buffer must have enough free space to hold uncompressed data. Prior to the function callthe destination buffer size variable pointed to by pDstLen must be initialized with actual number of freebytes in the destination buffer.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the specified pointers is NULL.

ippStsLzoBrokenStreamErr
ippStsDstSizeLessExpected

Indicates an error if compressed data is not valid - not an LZO
compressed data.
Destination buffer is too small to store decompressed data.

ExampleLZ4 Compression Functions
This section describes Intel IPP data compression functions that implement the LZ4 compressed data format.
This format and algorithm use 64Kb compression dictionary. The original code of the library is available at
http://www.lz4.org.
EncodeLZ4HashTableGetSize
Calculates the size of the LZ4 hash table.

SyntaxIppStatus ippsEncodeLZ4HashTableGetSize(int* pHashTableSize);
476

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pHashTableSize

Pointer to the variable containing the size of the LZ4 hashtable.

Description
This function calculates the size of the memory buffer that must be allocated for the LZ4 hash table.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if the pHashTableSize pointer is NULL.

ExampleEncodeLZ4HashTableInit, EncodeLZ4DictHashTableInit
Initializes the LZ4 hash table.

SyntaxIppStatus ippsEncodeLZ4HashTableInit_8u(Ipp8u* pHashTable, int srcLen);
IppStatus ippsEncodeLZ4DictHashTableInit_8u(Ipp8u* pHashTable, int srcLen);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pHashTable

Pointer to the LZ4 hash table.

srcLenLength of the source data for compression.

Description
This function initializes the LZ4 hash table. Before using this function, compute the size of the LZ4 hash tableusing the EncodeLZ4HashTableGetSize function.

Return Values
ippStsNoErr

Indicates no error.

477

1

Intel® Integrated Performance Primitives Developer Guide and ReferenceippStsNullPtrErr

Indicates an error if the pHashTable pointer is NULL.

ippStsSizeErr

Indicates an error if the srcLen value is less than, or equal to
zero.

ExampleEncodeLZ4LoadDict
Initializes the LZ4 hash table that uses dictionary.

SyntaxIppStatus ippsEncodeLZ4LoadDict_8u(Ipp8u* pHashTable, const Ipp8u* pDict, int dictLen);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pHashTable

Pointer to the LZ4 hash table.

pDict

Pointer to the dictionary.

dictLenLength of the dictionary.

Description
This function initializes the LZ4 hash table with values from the dictionary.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if the pHashTable pointer is NULL.

ippStsSizeErr

Indicates an error if the dictLen value is less than, or equal tozero.

EncodeLZ4
Performs LZ4 encoding.

SyntaxIppStatus ippsEncodeLZ4_8u(const Ipp8u* pSrc, int srcLen, Ipp8u* pDst, int* pDstLen,
Ipp8u* pHashTable);
IppStatus ippsEncodeLZ4Fast_8u(const Ipp8u* pSrc, int srcLen, Ipp8u* pDst, int*
pDstLen, Ipp8u* pHashTable, int* acceleration);
IppStatus ippsEncodeLZ4Safe_8u(const Ipp8u* pSrc, int* pSrcLen, Ipp8u* pDst, int*
pDstLen, Ipp8u* pHashTable);
IppStatus ippsEncodeLZ4Dict_8u(const Ipp8u* pSrc, int srcIdx, int srcLen, Ipp8u* pDst,
int* pDstLen, Ipp8u* pHashTable, const Ipp8u* pDict, int dictLen);
478

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

IppStatus ippsEncodeLZ4DictSafe_8u(const Ipp8u* pSrc, int srcIdx, int* pSrcLen, Ipp8u*
pDst, int* pDstLen, Ipp8u* pHashTable, const Ipp8u* pDict, int dictLen);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source data.

srcLenLength of the source data for compression.

srcIdxIndex of the starting byte in the source vector.

pSrcLen

Pointer to the length of the source data for compression.

pDst

Pointer to the compressed data.

pDstLen

Pointer to the length of the compressed data.

pHashTable

Pointer to the LZ4 hash table.

pDict

Pointer to the dictionary.

dictLenLength of the dictionary.

acceleraion

Acceleration value.

Description
These functions perform encoding of the source data pSrc using the LZ4 algorithm. The destination buffer
must have sufficient length for the operation. The length of the compressed data is set to pDstLen.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsBadArgErr
ippStsDstSizeLessExpected

Indicates no error.
Indicates an error if at least one of the specified pointers is

NULL.

Indicates an error if the srcLen value is less than, or equal tozero.
Indicates an error if the index of the starting byte is less thanzero.
Indicates an error if the length of the destination buffer is not
sufficient.

ExampleLZ4:
LZ4Dict:
LZ4Safe:479

1Intel® Integrated Performance Primitives Developer Guide and Reference

EncodeLZ4Safe
Performs LZ4 encoding.

SyntaxIppStatus ippsEncodeLZ4Safe_8u(const Ipp8u* pSrc, int* srcLen, Ipp8u* pDst, int*
pDstLen, Ipp8u* pHashTable);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source data.

srcLenLength of the source data for compression.

pDst

Pointer to the compressed data.

pDstLen
pHashTable

Pointer to the length of the destination buffer and the length ofthe compressed data.
Pointer to the LZ4 hash table.

Description
This function performs encoding of the source data pSrc using the LZ4 algorithm. The length of thecompressed data is set to pDstLen. The length of the processed source data is set to pSrcLen

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if at lease one of the specified pointers is
NULL.

ippStsSizeErr
ippStsDstSizeLessExpectedErr

Indicates an error if the srcLen or dstLen value is less than, or
equal to zero.
Indicates an error if the destination buffer has insufficient
length.

DecodeLZ4
Performs LZ4 decoding.

SyntaxIppStatus ippsDecodeLZ4_8u(const Ipp8u* pSrc, int srcLen, Ipp8u* pDst, int* pDstLen);
IppStatus ippsDecodeLZ4Dict_8u(const Ipp8u* pSrc, int* pSrcLen, Ipp8u* pDst, int
dstIdx, int* pDstLen, const Ipp8u* pDict, int dictSize);

Include Files
ippdc.h480

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source data.

srcLenLength of the source data for decompression.

pSrcLen

Pointer to the length of the source data for decompression.

pDst

Pointer to the compressed data.

pDstLen

Pointer to the length of the uncompressed data.

dstIdxIndex of the starting byte in the destination vector.

pDict

Pointer to the dictionary.

dictSize

Length of the dictionary.

Description
This function performs decoding of the source data pSrc using the LZ4 algorithm. The destination buffer
must have sufficient length for the operation. The length of the uncompressed data is set to pDstLen.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if at lease one of the specified pointers is
NULL.

ippStsSizeErr
ippStsMemAllocErr

Indicates an error if the srcLen value is less than, or equal tozero.
Indicates an error if the size of the allocated memory is not
sufficient for decompression.

ExampleLZ4 Compression Functions for High Compression (HC) Mode
This section describes Intel IPP data compression functions that implement the LZ4 compressed data format
and can be used in high compression (HC) mode. This format and algorithm use 64Kb compression
dictionary. The original code of the library is available at http://www.lz4.org.
EncodeLZ4HCHashTableGetSize
Calculates the size of the LZ4 HashTable andPrevTable for HC mode.

SyntaxIppStatus ippsEncodeLZ4HCHashTableGetSize(int* pHashTableSize, int* pPrevTableSize);

Include Files
ippdc.h481

1Intel® Integrated Performance Primitives Developer Guide and Reference

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pHashTableSize
pHashPrevSize

Pointer to the variable containing the size of the LZ4

HashTable.

Pointer to the variable containing the size of the LZ4PrevTable.

Description
This function calculates the size of the memory buffer that must be allocated for the LZ4 HashTable andPrevTable in HC mode.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if pHashTableSize or pPrevTableSize is
NULL.

ExampleEncodeLZ4HCHashTableInit
Initializes LZ4 hash tables for HC mode.

SyntaxIppStatus ippsEncodeLZ4HCHashTableInit_8u(Ipp8u** ppHashTables);Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
ppHashTables

Pointer to an array of pointers to LZ4 hash tables for HC mode;

ppHashTables[0]=pHashTable, ppHashTables[1]=pPrevTable.

Description
This function initializes the LZ4 HashTable and PrevTable. Before using this function, compute the size of
the LZ4 hash tables using the EncodeLZ4HCHashTableGetSize function.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if any of the ppHashTables pointers is NULL.

482

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

ExampleEncodeLZ4HC
Performs LZ4 encoding in HC mode.

SyntaxIppStatus ippsEncodeLZ4HC_8u(const Ipp8u* pSrc, int srcIdx, int* pSrcLen, Ipp8u* pDst,
int* pDstLen, Ipp8u** ppHashTables, const Ipp8u* pDict, int dictLen, int level);
IppStatus ippsEncodeLZ4HCDictLimit_8u(const Ipp8u* pSrc, int srcIdx, int* pSrcLen,
Ipp8u* pDst, int* pDstLen, Ipp8u** ppHashTables, const Ipp8u* pDict, int dictLen, intlevel, int lowDictIdx);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source data.

srcIdxIndex of the starting byte in the source vector.

pSrcLen

Pointer to the length of the source data for compression.

pDst

Pointer to the compressed data.

pDstLen

Pointer to the length of the compressed data.

ppHashTables

Pointer to an array of pointers to the LZ4 hash tables for HC
mode; ppHashTables[0] = pHashTable,
ppHashTables[1]=pPrevTable .

pDict

Pointer to the dictionary.

dictLenLength to the dictionary.

level

Compression level.

lowDictIdx

Lowest valid index in dictionary.

Description
These functions perform encoding of the source data pSrc using the LZ4 algorithm in HC (High Compression)mode. The destination buffer must have sufficient length for the operation. The length of the compresseddata is set to pDstLen.

Return Values
ippStsNoErr
ippStsNullPtrErr

Indicates no error.
Indicates an error if at least one of the specified pointers is

NULL.

483

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Indicates an error if the srcLen value is less than, or equal tozero.
Indicates an error if the index of the starting byte is less thanzero.
Indicates an error if the function does not support the specified
combination of parameters' values.

ippStsSizeErr
ippStsBadArgErr
ippStsNotSupportedModeErr

ExampleBWT-Based Compression Functions
This section describes the Intel IPP functions that support composed algorithms based on the BurrowsWheeler transform (BWT).

Burrows-Wheeler Transform
Burrows-Wheeler Transform (BWT) does not compress data, but it simplifies the structure of input data andmakes more effective further compression. One of the distinctive feature of this method is operation on theblock of data (as a rule of size 512kB - 2 mB). The main idea of this method is block sorting which groups
symbols with a similar context. Let us consider how BWT works on the input data block ‘abracadabra'. The
first step is to create a matrix containing all its possible cyclic permutations. The first row is input string, thesecond is created by shifting it to the left by one symbol and so on:

abracadabra bracadabraa racadabraab acadabraabr cadabraabra adabraabrac dabraabraca abraabracad
braabracada raabracadab aabracadabr
Then all rows are sorted in accordance with the lexicographic order:

0 aabracadabr 1 abraabracad 2 abracadabra 3 acadabraabr 4 adabraabracbracadabraa 7 cadabraabra 8 dabraabraca 9 raabracadab 10 racadabraab

5 braabracada

6

The last step is to write out the last column and the index of the input string: rdarcaaaabb, 2 - this is a
result of the forward BWT transform.
Inverse BTW is performed as follows:
elements of the input string are numbered in ascending order

0

r

1

d

2

a

3

r

4

c

5

a

6

a

7

a

8

a

9

b 10

b

1

d

0

r

r

and sorted in accordance with the lexicographic order:

2

a

5

a

6

a

7

a

8

a

9

b 10

b

4

c

3

This index array is a vector of the inverse transform (Inv), the further reconstruction of the string is
performed in the following manner:src[] = "rdarcaaaabb";
Inv[] = {2,5,6,7,8,9,10,4,1,0,3};
index = 2; // index of the initial string is known from the forward BWTfor( i = 0; i < len; i++ ) {index = Inv[index];
dst[i] = src[index];}
BWTFwdGetSize

484

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Computes the size of the external buffer for theforward BWT transform.

SyntaxIppStatus ippsBWTFwdGetSize_8u(int wndSize, int* pBWTFwdBuffSize);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
wndSize

Window size for BWT transform.

pBWTFwdBuffSize

Pointer to the computed size of the additional buffer.

Description
This function computes the size of memory (in bytes) of the external buffer that is required by the function
ippsBWTFwd for the forward BWT transform.
Code example shows how to use the function ippsBWTFwdGetSize_8u.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if pBWTFwdBuffSize pointer is NULL.

BWTFwdPerforms the forward BWT transform.

SyntaxIppStatus ippsBWTFwd_8u(const Ipp8u* pSrc, Ipp8u* pDst, int len, int* pIndex, Ipp8u*
pBWTFwdBuff);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

len

Number of elements in the source and destination vectors.

485

1

Intel® Integrated Performance Primitives Developer Guide and Reference

pIndexpBWTFwdBuff

Pointer to the index of first position for the forward BWTtransform.
Pointer to the additional buffer.

Description
This function performs the forward BWT transform of len elements starting from pIndex element of thesource vector pSrc and stores result in the vector pDst. The function uses the external buffer pBWTFwdBuff.
The size of this buffer must be computed by calling the function ippsBWTFwdGetSize beforehand.
Code example shows how to use the function ippsBWTFwd_8u.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error if len is less than or equal to 0.

BWTFwdGetBufSize_SelectSort
Computes the size of the external buffer for theforward BWT transform.

SyntaxIppStatus ippsBWTFwdGetBufSize_SelectSort_8u(Ipp32u wndSize, Ipp32u* pBWTFwdBufSize,IppBWTSortAlgorithmHint sortAlgorithmHint);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
wndSize

Window size for BWT transform.

pBWTFwdBufSize

Pointer to the computed size of the additional buffer.

sortAlgorithmHint

Specifies the sort algorithm used. Possible values are:••••ippBWTItohTanakaLimSort
ippBWTItohTanakaUnlimSort
ippBWTSuffixSort
ippBWTAutoSort

Description
This function computes the size of memory (in bytes) of the external buffer that is required by the function
BWTFwd_SelectSort for the forward BWT transform.

486

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if pBuffSize pointer is NULL.

BWTFwd_SelectSort
Performs the forward BWT transform with specified
sort algorithm.

SyntaxIppStatus ippsBWTFwd_SelectSort_8u(const Ipp8u* pSrc, Ipp8u* pDst, Ipp32u len, Ipp32u*
index, Ipp8u* pBWTFwdBuf, IppBWTSortAlgorithmHint sortAlgorithmHint);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

len

Number of elements in the source and destination vectors.

index

Index of the first position for the forward BWT transform.

pBWTFwdBuf

Pointer to the additional buffer.

sortAlgorithmHint

Specifies the sort algorithm used. Possible values are:••••ippBWTItohTanakaLimSort
ippBWTItohTanakaUnlimSort
ippBWTSuffixSort
ippBWTAutoSort

Description
This function performs the forward BWT transform of len elements starting from pIndex element of thesource vector pSrc and stores result in the vector pDst. The parameter sortAlgorithmHint specifies thedesired algorithm of sorting. The function uses the external buffer pBuff. The size of this buffer must be
computed by calling the function BWTFwdGetBufSize_SelectSort beforehand.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error if len is less than or equal to 0.

BWTInvGetSize

487

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Computes the size of the external buffer for the
inverse BWT transform.

SyntaxIppStatus ippsBWTInvGetSize_8u(int wndSize, int* pBWTInvBuffSize);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
wndSize

Window size for BWT transform.

pBWTInvBuffSize

Pointer to the computed size of the additional buffer.

Description
This function computes the size of memory (in bytes) of the external buffer that is required by the function
ippsBWTInv for the inverse BWT transform.
Code example shows how to use the function ippsBWTInvGetSize_8u.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if pBWTInvBuffSize pointer is NULL.

BWTInv
Performs the inverse BWT transform.

SyntaxIppStatus ippsBWTInv_8u(const Ipp8u* pSrc, Ipp8u* pDst, int len, int index, Ipp8u*
pBWTInvBuff);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

len

Number of elements in the source and destination vectors.

index

Index of first position for the inverse BWT transform.

488

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Pointer to the additional buffer.

pBWTInvBuff

Description
This function performs the inverse BWT transform of len elements starting from pIndex element of thesource vector pSrc and stores result in the vector pDst. The function uses the external buffer pBWTInvBuff.
The size of this buffer must be computed by calling the function ippsBWTInvGetSize beforehand.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error if len is less than or equal to 0.

ExampleThe code example below shows how to use the function ippsBWTInv_8u.

void func_BWT() {int wndSize = 8;
int pBWTFwdBuffSize;
int pBWTInvBuffSize;Ipp8u pSrc[] = "baadeffg";
int len = 8;
int pIndex;
Ipp8u* pDst = ippsMalloc_8u(len);
Ipp8u* pDstInv = ippsMalloc_8u(len);ippsBWTFwdGetSize_8u(wndSize, &pBWTFwdBuffSize);
Ipp8u* pBWTFwdBuff = ippsMalloc_8u(pBWTFwdBuffSize);
ippsBWTFwd_8u(pSrc, pDst, len, &pIndex, pBWTFwdBuff);
ippsBWTInvGetSize_8u( wndSize, &pBWTInvBuffSize);
Ipp8u* pBWTInvBuff = ippsMalloc_8u(pBWTInvBuffSize);
ippsBWTInv_8u(pDst, pDstInv, len, pIndex, pBWTInvBuff);}
Result:pDst ->
pDstInv ->"bagadeff""baadeffg"

Move To Front Functions
This section describes the functions that performs Move To Front (MTF) data transform method. The basic
idea is to represent the symbols of the source sequence as the current indexes of that symbols in themodified alphabet. This alphabet is a list where frequently used symbols are placed in the upper lines. Whenthe given symbols occurs it is replaced by its index in the list, then this symbol is moved in the first positionin the list, and all indexes are updated. For example, the sequence “baabbfffacczzdd” contains symbols
that form the ordered ‘alphabet'{'a', 'b', 'c', 'd', 'f', 'z'}. The function will operate in thefollowing manner:

489

1

Intel® Integrated Performance Primitives Developer Guide and ReferenceMove To Front Operation
source

b
a
a
b
f
f
f
a
c
c
z
z
d
d

destinationalphabet

1
1
0
1
4
0
0
2
3
0
5
0
5
0

0, 1, 2, 3, 4, 5, 6'a', 'b', 'c', 'd', 'f', 'z''b', 'a', 'c', 'd', 'f', 'z''a', 'b', 'c', 'd', 'f', 'z''a', 'b', 'c', 'd', 'f', 'z''b', 'a', 'c', 'd', 'f', 'z''f', 'b', 'a', 'c', 'd', 'z''f', 'b', 'a', 'c', 'd', 'z''f', 'b', 'a', 'c', 'd', 'z''a', 'f', 'b', 'c', 'd', 'z''c', 'a', 'f', 'b','d', 'z''c', 'a', 'f', 'b', 'd', 'z''z', 'c', 'a', 'f', 'b', 'd''z', 'c', 'a', 'f', 'b', 'd''d', 'z', 'c', 'a', 'f', 'b''d', 'z', 'c', 'a', 'f', 'b'

Finally, the function returns the destination sequence: 11014002305050.
These transformed data can be used for the following effective compression. This method is often used after
Burrows-Wheeler transform.
MTFInit
Initializes the MTF structure.

SyntaxIppStatus ippsMTFInit_8u(IppMTFState_8u* pMTFState);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pMTFState

Pointer to the MTF structure.

Description
This function initializes the MTF structure that contains parameters for the MTF transform in the externalbuffer. This structure is used by the functions ippsMTFFwd and ippsMTFInv. The size of this buffer must be
computed previously by calling the function ippsMTFGetSize.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if pMTFState pointer is NULL.

MTFGetSize
Computes the size of the MTF structure.

490

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

SyntaxIppStatus ippsMTFGetSize_8u(int* pMTFStateSize);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pMTFStateSize

Pointer to the computed MTF structure size.

Description
This function computes the size of memory (in bytes) that is required for the MTF structure. This function
must be called prior to the function ippsMTFInit.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if pMTFStateSize pointer is NULL.

MTFFwdPerforms the forward MTF transform.

SyntaxIppStatus ippsMTFFwd_8u(const Ipp8u* pSrc, Ipp8u* pDst, int len, IppMTFState_8u*
pMTFState);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source buffer.

pDst

Pointer to the destination buffer.

len

Number of elements in the source and destination buffers.

pMTFState

Pointer to the MTF structure.

Description
This function performs the forward MTF transform of len elements of the data in the source buffer pSrc andstores result in the buffer pDst. The parameters of the MTF transform are specified in the MTF structure
pMTFState that must be initialized by ippsMTFInit beforehand.

491

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error if len is less than or equal to 0.

MTFInv
Performs the inverse MTF transform.

SyntaxIppStatus ippsMTFInv_8u(const Ipp8u* pSrc, Ipp8u* pDst, int len, IppMTFState_8u*
pMTFState);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source buffer.

pDst

Pointer to the destination buffer.

len

Number of elements in the source and destination buffers.

pMTFState

Pointer to the MTF structure.

Description
This function performs the inverse MTF transform of len elements of data in the source buffer pSrc andstores result in the buffer pDst. The parameters of the MTF transform are specified in the MTF structure
pMTFState that must be initialized by ippsMTFInit beforehand.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error if len is less than or equal to 0.

bzip2 Coding Functions
This section describes different Intel IPP functions to perform bzip2 encoding and decoding.
EncodeRLEInit_BZ2
Initializes the bzip2-specific RLE structure.

SyntaxIppStatus ippsEncodeRLEInit_BZ2_8u(IppRLEState_BZ2* pRLEState);492

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pRLEState

Pointer to the bzip2-specific RLE structure.

Description
This function initializes the bzip2-specific RLE structure that contains parameters for the RLE in the externalbuffer. This structure is used by the function ippsEncodeRLE_BZ2. The size of this buffer must be computed
previously by calling the function ippsRLEGetSize_BZ2.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if pRLEState pointer is NULL.

RLEGetSize_BZ2
Compute the size of the state structure for the bzip2specific RLE.

SyntaxIppStatus ippsRLEGetSize_BZ2_8u(int* pRLEStateSize);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pRLEStateSize

Pointer to the size of the state structure for bzip2-specific RLE.

Description
This function computes the size of memory (in bytes) of the internal state structure for the bzip2-specific
RLE.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if pRLEStateSize pointer is NULL.

EncodeRLE_BZ2

493

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Performs the bzip2-specific RLE.

SyntaxIppStatus ippsEncodeRLE_BZ2_8u(Ipp8u** ppSrc, int* pSrcLen, Ipp8u* pDst, int* pDstLen,
IppRLEState_BZ2* pRLEState);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
ppSrc

Double pointer to the source buffer.

pSrcLen

Pointer to the length of the source buffer.

pDst

Pointer to the destination buffer.

pDstLen

Pointer to the length of the destination buffer.

pRLEState

Pointer to the bzip2-specific RLE state structure.

Description
This function performs RLE encoding with thresholding equal to 4. It processes the input data ppSrc andwrites the results to the pDst buffer. The function uses the bzip2-specific RLE state structure pRLEState.
This structure must be initialized by ippsEncodeRLEInit_BZ2 beforehand.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the pointers is NULL.

ippStsSizeErr
ippStsDstSizeLessExpected

Indicates an error if length of the source or destination buffer
is less than or equal to 0.
Indicates a warning if size of the destination buffer isinsufficient to store all output elements.

EncodeRLEFlush_BZ2
Flushes the remaining data after RLE.

SyntaxIppStatus ippsEncodeRLEFlush_BZ2_8u(Ipp8u* pDst, int* pDstLen, IppRLEState_BZ2*
pRLEState);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

494Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Parameters
pDst

Pointer to the destination buffer.

pDstLen

Pointer to the length of the destination buffer.

pRLEState

Pointer to the bzip2-specific RLE state structure.

Description
This function flushes the remaining data after RLE encoding with thresholding equal to 4. The function uses
the initialized bzip2-specific RLE state structure pRLEState.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the pointers is NULL.

ippStsSizeErr

Indicates an error if length of the destination buffer is less thanor equal to 0.

RLEGetInUseTable
Gets the pointer to the inUse vector from the RLE
state structure.

SyntaxIppStatus ippsRLEGetInUseTable_8u(Ipp8u inUse[256], IppRLEState_BZ2* pRLEState);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
inUse

Pointer to the inUse vector.

pRLEState

Pointer to the bzip2-specific RLE state structure.

Description
This function gets the pointer to the inUse vector (table) from the initialized bzip2-specific RLE state
structure pRLEState.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the pointers is NULL.

DecodeRLEStateInit_BZ2
Initializes the bzip2-specific RLE structure.

495

1

Intel® Integrated Performance Primitives Developer Guide and Reference

SyntaxIppStatus ippsDecodeRLEStateInit_BZ2_8u(IppRLEState_BZ2* pRLEState);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pRLEState

Pointer to the bzip2-specific RLE structure.

Description
This function initializes the bzip2-specific RLE structure that contains parameters for the RLE in the externalbuffer. This structure is used by the function DecodeRLEState_BZ2.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if pRLEState pointer is NULL.

DecodeRLEState_BZ2
Performs the bzip2-specific RLE decoding.

SyntaxIppStatus ippsDecodeRLEState_BZ2_8u(Ipp8u** ppSrc, Ipp32u* pSrcLen, Ipp8u** ppDst,
Ipp32u* pDstLen, IppRLEState_BZ2* pRLEState);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
ppSrc

Double pointer to the source buffer.

pSrcLen

Pointer to the length of the source buffer.

ppDst

Double pointer to the destination buffer.

pDstLen

Pointer to the length of the destination buffer.

pRLEState

Pointer to the bzip2-specific RLE state structure.

496

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Description
This function performs RLE decoding with thresholding equal to 4. It processes the input data ppSrc andwrites the results to the ppDst buffer. The function uses the bzip2-specific RLE state structure pRLEState.
This structure must be initialized by the functions DecodeRLEStateInit_BZ2 beforehand.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the pointers is NULL.

ippStsSizeErr
ippStsDstSizeLessExpected

Indicates an error if length of the source or destination buffer
is less than or equal to 0.
Indicates a warning if size of the destination buffer isinsufficient to store all output elements.

DecodeRLEStateFlush_BZ2
Flushes the remaining data after RLE decoding.

SyntaxIppStatus ippsDecodeRLEStateFlush_BZ2_8u(IppRLEState_BZ2* pRLEState, Ipp8u** ppDst,
Ipp32u* pDstLen);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pRLEState

Pointer to the bzip2-specific RLE state structure.

ppDst

Double pointer to the destination buffer.

pDstLen

Pointer to the length of the destination buffer.

Description
This function flushes the remaining data after RLE decoding with thresholding equal to 4. The function uses
the initialized bzip2-specific RLE state structure pRLEState.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the pointers is NULL.

ippStsSizeErr

Indicates an error if length of the destination buffer is less thanor equal to 0.

EncodeZ1Z2_BZ2Performs the bzip2-specific Z1Z2 encoding.

497

1

Intel® Integrated Performance Primitives Developer Guide and Reference

SyntaxIppStatus ippsEncodeZ1Z2_BZ2_8u16u(Ipp8u** ppSrc, int* pSrcLen, Ipp16u* pDst, int*
pDstLen, int freqTable[258]);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
ppSrc
pSrcLen
pDst
pDstLenfreqTable

Double pointer to the source buffer.
Pointer to the length of the source buffer, after decoding pointer to the size of the remaining data.
Pointer to the destination buffer.
Pointer to the length of the destination buffer, after decoding pointer to the resulting size of the destination buffer.
Table of frequencies collected for the alphabet symbols.

Description
This function performs the bzip2-specific Z1Z2 encoding.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the pointers is NULL.

ippStsSizeErr
ippStsDstSizeLessExpected

Indicates an error if length of the source or destination buffer
is less than or equal to 0.
Indicates a warning if size of the destination buffer isinsufficient to store all output elements.

DecodeZ1Z2_BZ2Performs the bzip2-specific Z1Z2 decoding.

SyntaxIppStatus ippsDecodeZ1Z2_BZ2_16u8u(Ipp16u** ppSrc, int* pSrcLen, Ipp8u* pDst, int*
pDstLen);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

498Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Parameters
ppSrc
pSrcLen
pDst
pDstLenDouble pointer to the source buffer.
Pointer to the length of the source buffer, after decoding pointer to the size of the remaining data.
Pointer to the destination buffer.
Pointer to the length of the destination buffer, after decoding pointer to the resulting size of the destination buffer.

Description
This function performs the bzip2-specific Z1Z2 decoding.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the pointers is NULL.

ippStsSizeErr
ippStsDstSizeLessExpected

Indicates an error if length of the source or destination buffer
is less than or equal to 0.
Indicates a warning if size of the destination buffer isinsufficient to store all output elements.

ReduceDictionary
Performs the dictionary reducing.

SyntaxIppStatus ippsReduceDictionary_8u_I(const Ipp8u inUse[256], Ipp8u* pSrcDst, int
srcDstLen, int* pSizeDictionary);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
inUse

Table of 256 values of the Ipp8u type.

pSrcDstPointer to the source and destination buffer.

srcDstLen

Length of the source and destination buffer.

pSizeDictionary

Pointer to the size of the dictionary on entry, and to the size of
reduced dictionary after operation.

Description
This function performs the dictionary reducing.

499

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the pointers is NULL.

ippStsSizeErr

Indicates an error if length of the source and destination buffer
is less than or equal to 0.

ExpandDictionary
Performs the dictionary expanding.

SyntaxIppStatus ippsExpandDictionary_8u_I(const Ipp8u inUse[256], Ipp8u* pSrcDst, int
srcDstLen, int sizeDictionary);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
inUse

Table of 256 values of the Ipp8u type.

pSrcDstPointer to the source and destination buffer.

srcDstLen

Length of the source and destination buffer.

sizeDictionary

Size of the dictionary on entry, and to the size of expanded
dictionary after operation.

Description
This function performs the dictionary expanding.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the pointers is NULL.

ippStsSizeErr

Indicates an error if length of the source and destination buffer
is less than or equal to 0.

CRC32_BZ2
Computes the CRC32 checksum for the source data
buffer.

SyntaxIppStatus ippsCRC32_BZ2_8u(const Ipp8u* pSrc, int srcLen, Ipp32u* pCRC32);

Include Files
ippdc.h500

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source data buffer.

srcLenNumber of elements in the source data buffer.

pCRC32

Pointer to the accumulated checksum value.

Description
This function computes the checksum for srcLen elements of the source data buffer pSrc and stores it in
the pCRC32. The checksum is computed using the CRC32 direct algorithm that is specific for the bzip2
coding.
You can use this function to compute the accumulated value of the checksum for multiple buffers by
specifying as an input parameter the checksum value obtained in the preceding function call.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if the pSrc pointer is NULL.

ippStsSizeErr

Indicates an error if the length of the source vector is less thanor equal to 0.

EncodeHuffGetSize_BZ2
Computes the size of the internal state for bzip2specific Huffman encoding.

SyntaxIppStatus ippsEncodeHuffGetSize_BZ2_16u8u(int wndSize, int* pEncodeHuffStateSize);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
wndSize

Size of the block to be processed.

pEncodeHuffStateSize

Pointer to the size of the internal state for bzip2-specific
Huffman coding.

Description
This function computes the size of the internal state structure for bzip2-specific Huffman encoding in
dependence of the size of the block to be encoded.

501

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if the pointer pEncodeHuffStateSize is NULL.

ippStsSizeErr

Indicates an error if wndSize is less than or equal to 0.

EncodeHuffInit_BZ2
Initializes the elements of the bzip2-specific internal
state for Huffman encoding.

SyntaxIppStatus ippsEncodeHuffInit_BZ2_16u8u(int sizeDictionary, const int freqTable[258],
const Ipp16u* pSrc, int srcLen, IppEncodeHuffState_BZ2* pEncodeHuffState);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
sizeDictionary

Size of the dictionary.

freqTable

Table of frequencies of symbols.

pSrc

Pointer to the source vector.

srcLenLength of the source vector.

pEncodeHuffState

Pointer to internal state structure for bzip2 specific Huffman
coding.

Description
This function initializes the elements of the bzip2-specific internal state for Huffman encoding. This structureis used by the function ippsEncodeHuff_BZ2. The size of this buffer must be computed previously by callingthe function ippsEncodeHuffGetSize_BZ2.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the pointers is NULL.

ippStsSizeErr

Indicates an error if length of the source buffer is less than orequal to 0.

PackHuffContext_BZ2
Performs the bzip2-specific encoding of Huffman
context.

502

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

SyntaxIppStatus ippsPackHuffContext_BZ2_16u8u(Ipp32u* pCode, int* pCodeLenBits, Ipp8u* pDst,
int* pDstLen, IppEncodeHuffState_BZ2* pEncodeHuffState);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pCode

Pointer to the bit buffer.

pCodeLenBits

Number of valid bits in the bit buffer.

pDst

Pointer to the destination vector.

pDstLenpEncodeHuffState

Pointer to the size of destination buffer on input, pointer to theresulting length of the destination vector on output.
Pointer to internal state structure for bzip2 specific Huffman
encoding.

Description
This function performs the bzip2-specific encoding of the Huffman context. The function uses the bzip2specific Huffman encoding state structure pEncodeHuffState. This structure must be initialized byippsEncodeHuffInit_BZ2 beforehand.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the pointers is NULL.

ippStsSizeErr
ippStsDstSizeLessExpected

Indicates an error if length of the destination buffer is less thanor equal to 0.
Indicates a warning if size of the destination buffer isinsufficient to store all output elements.

EncodeHuff_BZ2
Performs the bzip2-specific Huffman encoding.

SyntaxIppStatus ippsEncodeHuff_BZ2_16u8u(Ipp32u* pCode, int* pCodeLenBits, Ipp16u** ppSrc,
int* pSrcLen, Ipp8u* pDst, int* pDstLen, IppEncodeHuffState_BZ2* pEncodeHuffState);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

503

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Parameters
pCode

Pointer to the bit buffer.

pCodeLenBits

Number of valid bits in the bit buffer.

ppSrc

Double pointer to the source vector.

pSrcLen

Pointer to the length of source vector.

pDst

Pointer to the destination vector.

pDstLenpEncodeHuffState

Pointer to the size of destination buffer on input, pointer to theresulting length of the destination vector on output.
Pointer to internal state structure for bzip2 specific Huffman
encoding.

Description
This function performs the bzip2-specific Huffman encoding. The function uses the bzip2-specific Huffman
encoding state structure pEncodeHuffState. This structure must be initialized byippsEncodeHuffInit_BZ2 beforehand.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the pointers is NULL.

ippStsSizeErr
ippStsDstSizeLessExpected

Indicates an error if length of the source or destination buffer
is less than or equal to 0.
Indicates a warning if size of the destination buffer isinsufficient to store all output elements.

DecodeHuffGetSize_BZ2
Computes the size of the internal state for bzip2specific Huffman decoding.

SyntaxIppStatus ippsDecodeHuffGetSize_BZ2_8u16u(int wndSize, int* pDecodeHuffStateSize);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
wndSize

Size of the block to be processed.

pDecodeHuffStateSize

Pointer to the size of the internal state for bzip2-specific
Huffman coding.

Description
This function computes the size of the internal state structure for bzip2-specific Huffman decoding.

504

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if the pointer pDecodeHuffStateSize is NULL.

ippStsSizeErr

Indicates an error if wndSize is less than or equal to 0.

DecodeHuffInit_BZ2
Initializes the elements of the bzip2-specific internal
state for Huffman decoding.

SyntaxIppStatus ippsDecodeHuffInit_BZ2_8u16u(int sizeDictionary, IppDecodeHuffState_BZ2*
pDecodeHuffState);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
sizeDictionary

Size of the dictionary.

pDecodeHuffState

Pointer to internal state structure for bzip2 specific Huffman
coding.

Description
This function initializes the elements of the bzip2-specific internal state for Huffman decoding. This structureis used by the function ippsDecodeHuff_BZ2. The size of this buffer must be computed previously by callingthe function ippsDecodeHuffGetSize_BZ2.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if the pDecodeHuffState pointer is NULL.

ippStsSizeErr

Indicates an error if sizeDictionary is less than or equal to 0.

UnpackHuffContext_BZ2
Performs the bzip2-specific decoding of Huffman
context.

SyntaxIppStatus ippsUnpackHuffContext_BZ2_8u16u(Ipp32u* pCode, int* pCodeLenBits, Ipp8u**
ppSrc, int* pSrcLen, IppDecodeHuffState_BZ2* pDecodeHuffState);

Include Files
ippdc.h505

1Intel® Integrated Performance Primitives Developer Guide and Reference

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pCode

Pointer to the bit buffer.

pCodeLenBits

Number of valid bits in the bit buffer.

ppSrc

Double pointer to the source vector.

pSrcLen

Pointer to the size of source buffer on input, pointer to theresulting length of the source vector on output.

pDecodeHuffState

Pointer to internal state structure for bzip2 specific Huffman
decoding.

Description
This function performs the bzip2-specific decoding of the Huffman context. The function uses the bzip2specific Huffman decoding state structure pDecodeHuffState. This structure must be initialized by
ippsDecodeHuffInit_BZ2 beforehand.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the pointers is NULL.

ippStsSizeErr
ippStsSrcSizeLessExpected

Indicates an error if length of the destination buffer is less thanor equal to 0.
Indicates a warning if size of the source buffer is insufficient tostore all output elements.

DecodeHuff_BZ2
Performs the bzip2-specific Huffman decoding.

SyntaxIppStatus ippsDecodeHuff_BZ2_8u16u(Ipp32u* pCode, int* pCodeLenBits, Ipp8u** ppSrc,
int* pSrcLen, Ipp16u* pDst, int* pDstLen, IppDecodeHuffState_BZ2* pDecodeHuffState);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pCode

Pointer to the bit buffer.

pCodeLenBits

Number of valid bits in the bit buffer.

ppSrc

Double pointer to the source vector.

506

Developer Guide and Reference for Intel® Integrated Performance Primitives

pSrcLen

Pointer to the size of source buffer.

pDst

Pointer to the destination vector.

pDstLenpDecodeHuffState

1

Pointer to the size of destination buffer on input, pointer to theresulting length of the destination vector on output.
Pointer to internal state structure for bzip2 specific Huffman
decoding.

Description
This function performs the bzip2-specific Huffman decoding. The function uses the bzip2-specific Huffman
decoding state structure pDecodeHuffState. This structure must be initialized by
ippsDecodeHuffInit_BZ2 beforehand.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the pointers is NULL.

ippStsSizeErr
ippStsSrcSizeLessExpected

Indicates an error if length of the destination buffer is less thanor equal to 0.
Indicates a warning if size of the source buffer is insufficient tostore all output elements.

DecodeBlockGetSize_BZ2
Computes the size of the additional buffer for bzip2specific block decoding.

SyntaxIppStatus ippsDecodeBlockGetSize_BZ2_8u(int blockSize, int* pBuffSize);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
blockSize

Size of the block to be processed.

pBuffSize

Pointer to the size of the buffer for bzip2-specific decoding.

Description
This function computes the size of the additional buffer for bzip2-specific decoding.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if the pointer pBuffSize is NULL.

507

1

Intel® Integrated Performance Primitives Developer Guide and Reference

DecodeBlock_BZ2
Performs the bzip2-specific block decoding.

SyntaxIppStatus ippsDecodeBlock_BZ2_16u8u(const Ipp16u* pSrc, int srcLen, Ipp8u* pDst, int*
pDstLen, int index, int dictSize, const Ipp8u inUse[256], Ipp8u* pBuff);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source vector.

srcLenPointer to the length of the source vector.

pDst

Pointer to the destination vector.

pDstLen

Pointer to the size of destination buffer on input, pointer to theresulting length of the destination vector on output.

index

Index of first position for the inverse BWT transformdictSize

Size of the reduced dictionary.

inUse

Table of 256 values of Ipp8u type.

pBuff

Pointer to the additional buffer.

Description
This function performs the bzip2-specific block decoding. The function uses the bzip2-specific additional
buffer pBuff. The size of this buffer must be computed by the function DecodeBlockGetSize_BZ2
beforehand.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the pointers is NULL.

ippStsSizeErr

ippStsSrcSizeLessExpected

Indicates an error if length of the source or destination buffer
is less than or equal to 0; or if index is greater than or equal tosrcLen.
Indicates a warning if size of the source buffer is insufficient tostore all output elements.

ZFP Compression Functions
This section describes the Intel® Integrated Performance Primitives data compression functions that
implement the ZFP compressed data format. You can use the ZFP algorithm to perform lossy compression of
3D floating point data. The ZFP format and algorithm are described in [ZFP].

508

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

EncodeZfpGetStateSize
Calculates the size of the buffer for the ZFP
compression structure.

SyntaxIppStatus ippsEncodeZfpGetStateSize_32f(int* pStateSize);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pStateSize

Pointer to the variable receiving the size of the ZFP
compression structure.

Description
This function calculates the size of the memory buffer that your application must allocate to hold the ZFP
compression structure.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if the pointer pStateSize is NULL.

EncodeZfpInit, EncodeZfpInitLong
Initializes the ZFP compression structure with default
values.

SyntaxIppStatus ippsEncodeZfpInit_32f(Ipp8u* pDst, int dstLen, IppEncodeZfpState_32f*
pState);IppStatus ippsEncodeZfpInitLong_32f(Ipp8u* pDst, Ipp64u dstLen, IppEncodeZfpState_32f*
pState);Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pDst

Pointer to the destination buffer for compressed data.

dstLenLength of the destination buffer.

509

1

Intel® Integrated Performance Primitives Developer Guide and Reference

pStatePointer to the ZFP compression structure.

Description
This function initializes the ZFP compression structure. Its size must be calculated by calling the function

EncodeZfpGetStateSize beforehand. Use the EncodeZfpInitLong function to process large 3D floating
point arrays.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if any of the pointers is NULL.

ippStsSizeErr

Indicates an error if the parameter dstLen is less than or equal
to zero (applies only to the EncodeZfpInit function.

EncodeZfpSet
Populates fields of the ZFP compression structure with
input values.

SyntaxIppStatus ippsEncodeZfpSet_32f(int minBits, int maxBits, int maxPrec, int minExp,
IppEncodeZfpState_32f* pState);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
minBits

Minimum number of bits for a compressed block; the default
value is IppZFPMINBITS.

maxBits

Maximum number of bits for a compressed block; the default
value is IppZFPMAXBITS.

maxPrec

Maximum level of precision; the default value is
IppZFPMAXPREC.

minExpMinimum level of exponent; the default value is IppZFPMINEXP.

pStatePointer to the ZFP compression structure.

Description
This function populates fields of the ZFP compression structure with the corresponding input values. Refer to[ZFP] and associated documentation for more information about the compression parameters.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if the pState pointer is NULL.

510

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

ippStsContexMatchErr

Indicates an error if the ZFP compression structure data isinvalid.

EncodeZfpSetAccuracy
Sets the desired precision value in the ZFP
compression structure.

SyntaxIppStatus ippsEncodeZfpSetAccuracy_32f(Ipp64f precision, IppEncodeZfpState_32f*
pState);Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
precision
pStateValue to assign to the minExp field of the ZFP compression
structure.
Pointer to the ZFP compression structure.

Description
This function sets the value of the minExp field in the ZFP compression structure to the value of the
precision input parameter.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if the pState pointer is NULL.

ippStsContexMatchErr

Indicates an error if the ZFP compression structure data isinvalid.

EncodeZfp444
Encodes a 4x4x4 block of 3D floating point data.

SyntaxIppStatus ippsEncodeZfp444_32f(const Ipp32f* pSrc, int srcStep, int srcPlaneStep,
IppEncodeZfpState_32f* pState);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

511

1

Intel® Integrated Performance Primitives Developer Guide and Reference

ParameterssrcStep

Pointer to the value at the coordinates (0, 0, 0) of the 3D
source data block.
Row step in bytes.

srcPlaneStep

Plane step in bytes.

pStatePointer to the ZFP compression structure.

pSrc

Description
This function encodes a 3D 4x4x4 block of floating point values. The function adds the encoded data to aninternal bit stream. The pointer to the bit stream is initialized by calling the EncodeZfpInit function and is
updated automatically.
The 3D source data must be arranged in memory in such a way that for any set of coordinates (x, y, z)
within the 4x4x4 block,

pXYZ = (float *)((char *)pSrc + x + y * srcStep + z * srcPlaneStep)
is a pointer to the value at (x, y, z).

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if any of the pointers is NULL.

ippStsContexMatchErr

Indicates an error if ZFP compression structure data is invalid.

EncodeZfpGetCompressedBitSize
Returns the current compressed data size.

SyntaxIppStatus ippsEncodeZfpGetCompressedBitSize_32f(IppEncodeZfpState_32f* pState, Ipp64u*
pCompressedBitSize);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pStatePointer to the ZFP compression structure.

pCompressedBitSize

Pointer to the variable receiving the compressed data size, inbits.

Description
This function returns the current compressed data size in bits. You can call this function during compression
or after the compression of your array is finished. Call this function before using EncodeZfpFlush to get
actual bits size. Otherwise, the function returns size which is rounded (aligned) to an upper byte.

512

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if any of the pointers is NULL.

ippStsContexMatchErr

Indicates an error if the ZFP compression structure data isinvalid.

EncodeZfpFlush
Writes any buffered encoded data from the ZFP
compression structure to the destination buffer.

SyntaxIppStatus ippsEncodeZfpFlush_32f(IppEncodeZfpState_32f* pState);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pStatePointer to the ZFP compression structure.

Description
This function writes any buffered encoded data from the ZFP compression structure to the destination buffer.
Your application must call this function after the last call to EncodeZfp444 to properly finish all compression
operations.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if the pointer to pState is NULL.

ippStsContexMatchErr

Indicates an error if the ZFP compression structure data isinvalid.

EncodeZfpGetCompressedSize, EncodeZfpGetCompressedSizeLong
Returns the current compressed data size.

SyntaxIppStatus ippsEncodeZfpGetCompressedSize_32f(IppEncodeZfpState_32f* pState, int*
pCompressedSize);
IppStatus ippsEncodeZfpGetCompressedSizeLong_32f(IppEncodeZfpState_32f* pState, Ipp64u*
pCompressedSize);

Include Files
ippdc.h513

1Intel® Integrated Performance Primitives Developer Guide and Reference

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pStatePointer to the ZFP compression structure.

pCompressedSize

Pointer to the variable receiving the compressed data size.

Description
This function returns the current compressed data size, in bytes. You can call this function during
compression or after the compression of your array is finished.
Use EncodeZfpGetCompressedSizeLong for large 3D floating point arrays.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if any of the pointers is NULL.

ippStsContexMatchErr

Indicates an error if the ZFP compression structure data isinvalid.

DecodeZfpGetStateSize
Calculates the size of the buffer for the ZFPdecompression structure.

SyntaxIppStatus ippsDecodeZfpGetStateSize_32f(int* pStateSize);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pStateSize

Pointer to the variable receiving the size of the ZFPdecompression structure.

Description
This function calculates the size of the memory buffer that your application must allocate for ZFP
decompression operations.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if the pStateSize pointer is NULL.

514

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

DecodeZfpInit, DecodeZfpInitLong
Initializes the ZFP decompression structure withdefault values.

SyntaxIppStatus ippsDecodeZfpInit_32f(const Ipp8u* pSrc, int srcLen, IppDecodeZfpState_32f*
pState);IppStatus ippsDecodeZfpInitLong_32f(const Ipp8u* pSrc, Ipp64u srcLen,
IppDecodeZfpState_32f* pState);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the input buffer holding the compressed data.

srcLenLength of the compressed data buffer.

pStatePointer to the ZFP decompression structure.

Description
This function initializes the ZFP decompression structure. Before using this function, calculate the size of thestructure calling the DecodeZfpGetStateSize function.
Use ippsDecodeZfpInitLong to process large 3D floating point arrays.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if any of the pointers is NULL.

ippStsSizeErr

Indicates an error if the parameter srcLen is less than or equal
to zero (applies only to ippsDecodeZfpInit).

DecodeZfpSet
Populates fields of the ZFP decompression structurewith input values.

SyntaxIppStatus ippsDecodeZfpSet_32f(int minBits, int maxBits, int maxPrec, int minExp,
IppDecodeZfpState_32f* pState);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h

515

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
minBits

Minimum number of bits for a compressed block; the default
value is IppZFPMINBITS.

maxBits

Maximum number of bits for a compressed block; the default
value is IppZFPMAXBITS.

maxPrec

Maximum level of precision; the default value is
IppZFPMAXPREC.

minExpMinimum level of exponent; the default value is IppZFPMINEXP.

pStatePointer to the ZFP decompression structure.

Description
This function populates fields of the ZFP decompression structure with the corresponding input values. Refer
to [ZFP] and associated documentation for more information about the compression parameters.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if the pState pointer is NULL.

ippStsContexMatchErr

Indicates an error if the ZFP decompression structure is invalid.

DecodeZfpSetAccuracy
Sets the desired precision value in the ZFPdecompression structure.

SyntaxIppStatus ippsDecodeZfpSetAccuracy_32f(Ipp64f precision, IppDecodeZfpState_32f*
pState);Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
precision
pStateValue to assign to the minExp field of the ZFP decompression
structure.
Pointer to the ZFP decompression structure.

Description
This function sets the value of the minExp field in the ZFP decompression structure to the value of the
precision input parameter.

516

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if the pState pointer is NULL.

ippStsContexMatchErr

Indicates an error if the ZFP decompression structure is invalid.

DecodeZfp444
Decodes a 4x4x4 block of 3D floating point data.

SyntaxIppStatus ippsDecodeZfp444_32f(IppDecodeZfpState_32f* pState, Ipp32f* pDst, int
dstStep, int dstPlaneStep);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pStatePointer to the ZFP decompression structure.

dstStep

Pointer to the value at the coordinates (0, 0, 0) of the 3D
destination buffer.
Row step in bytes.

dstPlaneStep

Plane step in bytes.

pDst

Description
This function decodes a 4x4x4 block of 3D floating point data. The source data pointer is initialized by calling
DecodeZfpInit and is updated automatically.
The function arranges the decompressed 3D data in the destination buffer in such a way that for any set ofcoordinates (x, y, z) within the 4x4x4 block,

pXYZ = (float *)((char *)pDst + x + y * dstStep + z * dstPlaneStep)
is a pointer to the value at (x, y, z).

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if any of the pointers is NULL.

ippStsContexMatchErr

Indicates an error if the ZFP decompression structure data isinvalid.

DecodeZfpGetCompressedSize, DecodeZfpGetCompressedSizeLong
Returns the current decompressed data size.

517

1

Intel® Integrated Performance Primitives Developer Guide and Reference

SyntaxIppStatus ippsDecodeZfpGetCompressedSize_32f(IppDecodeZfpState_32f* pState, int*
pDecompressedSize);
IppStatus ippsDecodeZfpGetCompressedSizeLong_32f(IppDecodeZfpState_32f* pState, Ipp64u*
pDecompressedSize);

Include Files
ippdc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pStatePointer to the ZFP compression structure.

pDeompressedSize

Pointer to the variable receiving the decompressed data size.

Description
This function returns the current decompressed data size, in bytes. You can call this function duringdecompression or after the decompression of your array is finished.
Use DecodeZfpGetCompressedSizeLong for large 3D floating point arrays.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if any of the pointers is NULL.

ippStsContexMatchErr

Indicates an error if the ZFP decompression structure data isinvalid.

String Functions
NOTE These functions are deprecated and will be removed in a future release. If you have concerns,
open a ticket and provide feedback at https://supporttickets.intel.com/.
This chapter describes the Intel® IPP functions that perform operations with a text. First part describes thefunctions for simple string manupulation. Second part contains functions that perform more sophisticatedmatching operation using patterns of the regular expressions.

String Manipulation
NOTE These functions are deprecated and will be removed in a future release. If you have concerns,
open a ticket and provide feedback at https://supporttickets.intel.com/.
This section describes the Intel IPP functions that perform operations with strings. Intel IPP string functions
for do not consider zero as the end of the string, but require that the length of the string (number of
elements) be specified explicitly. Overlapping of the strings is not supported (for not in-place operations).
Intel IPP string functions operate with two data types, Ipp8u and Ipp16u.

518

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Find, FindRev
DEPRECATED. Look for the first occurrence of thesubstring matching the specified string.

SyntaxIppStatus ippsFind_8u(const Ipp8u* pSrc, int len, const Ipp8u* pFind, int lenFind, int*
pIndex);IppStatus ippsFind_Z_8u(const Ipp8u* pSrcZ, const Ipp8u* pFindZ, int* pIndex);
IppStatus ippsFindRev_8u(const Ipp8u* pSrc, int len, const Ipp8u* pFind, int lenFind,
int* pIndex);

Include Files
ippch.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source string.

pSrcZ

Pointer to the zero-ended source string.

len

Number of elements in the source string.

pFind

Pointer to the reference string.

pFindZ

Pointer to the zero-ended reference string.

lenFindNumber of elements in the reference string.

pIndex

Pointer to the result index.

Description
NOTE These functions are deprecated and will be removed in a future release. If you have concerns,
open a ticket and provide feedback at https://supporttickets.intel.com/.

These functions search through the source string pSrc for a substring of elements that match the specified
reference string pFind. Starting point of the first occurrence of the matching substring is stored in pIndex. If
no matching substring is found, then pIndex is set to -1.
The function flavor ippsFind_Z operates with the zero-ended source and reference strings. The function
ippsFindRev searches the source string in the reverse direction. The search is case-sensitive.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error condition if at least one of the specified
pointers is NULL.

ippStsLengthErr

Indicates an error condition if len or lenFind is negative.

519

1

Intel® Integrated Performance Primitives Developer Guide and Reference

ExampleThe code example below shows how to use the function ippsFind_8u.

Ipp8u string[] = "abracadabra";*/----------0123456789a*/
Ipp8u substring[] = "abra";
Ipp8u any_of [] = "ftr";
int index;
ippsFind_8u( string, sizeof (string) - 1, substring, sizeof (substring) - 1, &index );printf ( "ippsFind_8u returned index = %d.\n", index );ippsFindC_Z_8u( string, " c ", &index );printf ( "ippsFind_Z_8u returned index = %d.\n", index );ippsFindRevCAny_8u( string, sizeof (string) - 1, any_of , sizeof ( any_of ) - 1, &index );printf ( "ippsFindRevCAny_8u returned index = %d.\n", index );Output:ippsFind_8u returned index = 0.
ippsFind_Z_8u returned index = 4.
ippsFindRevCAny_8u returned index = 9.

FindC, FindRevC
DEPRECATED. Look for the first occurrence of thespecified element within the source string.

SyntaxIppStatus ippsFindC_8u(const Ipp8u* pSrc, int len, Ipp8u valFind, int* pIndex);
IppStatus ippsFindC_Z_8u(const Ipp8u* pSrcZ, Ipp8u valFind, int* pIndex);
IppStatus ippsFindRevC_8u(const Ipp8u* pSrc, int len, Ipp8u valFind, int* pIndex);

Include Files
ippch.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source string.

pSrcZ

Pointer to the source zero-ended string.

len

Number of elements in the source string.

valFind

Value of the specified element.

pIndex

Pointer to the result index.

520

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Description
NOTE These functions are deprecated and will be removed in a future release. If you have concerns,
open a ticket and provide feedback at https://supporttickets.intel.com/.

Functions ippsFindC and ippsFindRevC are declared in the ippch.h file. These functions search throughthe source string pSrc for the first occurrence of the specified element with the value valFind. The positionof this element is stored in pIndex. If no matching element is found, then pIndex is set to -1. The function
flavor ippsFindC_Z operates with the zero-ended source string. The function ippsFindRevC searches thesource string in the reverse direction. The search is case-sensitive.
Code example shows how to use the function ippsFindC_Z_8u.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error condition if at least one of the specified
pointers is NULL.

ippStsLengthErr

Indicates an error condition if len is negative.

FindCAny, FindRevCAny
DEPRECATED. Looks for the first occurrence of any
element of the specified array within the source string.

SyntaxIppStatus ippsFindCAny_8u(const Ipp8u* pSrc, int len, const Ipp8u* pAnyOf, int
lenAnyOf, int* pIndex);
IppStatus ippsFindRevCAny_8u(const Ipp8u* pSrc, int len, const Ipp8u* pAnyOf, int
lenAnyOf, int* pIndex);

Include Files
ippch.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source string.

len

Number of elements in the source string.

pAnyOfPointer to the array containing reference elements.

lenAnyOf

Number of elements in the array.

pIndex

Pointer to the result index.

521

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Description
NOTE These functions are deprecated and will be removed in a future release. If you have concerns,
open a ticket and provide feedback at https://supporttickets.intel.com/.

These functions search through the source string pSrc for the first occurrence of any reference element fromthe specified array pAnyOf. The position of this element is stored in pIndex. If no matching element isfound, then pIndex is set to -1. The function ippsFindRevCAny searches the source string in the reverse
direction. The search is case-sensitive.
Code example shows how to use the function ippsFindCAny_8u.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error condition if at least one of the specified
pointers is NULL.

ippStsLengthErr

Indicates an error condition if len or lenAnyOf is negative.

Insert
DEPRECATED. Inserts a string into another string.

SyntaxIppStatus ippsInsert_8u(const Ipp8u* pSrc, int srcLen, const Ipp8u* pInsert, int
insertLen, Ipp8u* pDst, int startIndex);
IppStatus ippsInsert_8u_I(const Ipp8u* pInsert, int insertLen, Ipp8u* pSrcDst, int*
pSrcDstLen, int startIndex);

Include Files
ippch.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source string.

srcLenNumber of elements in the source string.

pInsertPointer to the string to be inserted.

insertLen

Number of elements in the string to be inserted.

pDst

Pointer to the destination string.

pSrcDstpSrcDstLen
startIndex

522

Pointer to the source and destination string for in-place
operation.
Pointer to the number of elements in the source anddestination string for in-place operation.
Index of the insertion point.

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Description
NOTE This function is deprecated and will be removed in a future release. If you have concerns, open
a ticket and provide feedback at https://supporttickets.intel.com/.

This function inserts the string pInsert containing insertLen elements into a source string pSrc of length
srcLen. Insertion position is specified by startIndex. The result is stored in the pDst.
The in-place flavors of ippsInsert insert the string pInsert in the source string pSrcDst and store theresult in the destination string pSrcDst.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsLengthErr

Indicates no error.
Indicates an error condition if one of the specified pointers is

NULL.

Indicates an error condition if one of the srcLen, insertLen,
pSrcSdtLen, startIndex is negative, or startIndex is greaterthan srcLen or pSrcDstLen.

ExampleThe code example below shows how to use the function ippsInsert_8u.

Ipp8u string[] = " 1st string part 2nd string part ";Ipp8u substring[] = " substring ";Ipp8u dst_string [ sizeof (string) + sizeof (substring) - 1];
int dst_string_len ;ippsInsert_8u( string, sizeof (string) - 1, substring, sizeof (substring) - 1, dst_string ,16 );dst_string [ sizeof ( dst_string ) - 1] = 0;
printf ( "ippsInsert_8u returned: %s.\n", (char*) dst_string );dst_string_len = sizeof ( dst_string ) - 1;
ippsRemove_8u_I( dst_string , & dst_string_len , 16, sizeof (substring) - 1 );dst_string [ dst_string_len ] = 0;
printf ( "ippsRemove_8u_I returned: %s.\n", (char*) dst_string );Result:ippsInsert_8u returned: 1st string part substring 2nd string part .
ippsRemove_8u_I returned: 1st string part 2nd string part .

Remove
DEPRECATED. Removes a specified number of
elements from the string.

SyntaxIppStatus ippsRemove_8u(const Ipp8u* pSrc, int srcLen, Ipp8u* pDst, int startIndex, int
len);
IppStatus ippsRemove_8u_I(Ipp8u* pSrcDst, int* pSrcDstLen, int startIndex, int len);

Include Files
ippch.h523

1Intel® Integrated Performance Primitives Developer Guide and Reference

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source string.

srcLenNumber of elements in the source string.

pDst

Pointer to the destination string.

pSrcDstPointer to the source and destination string for in-place
operation.

startIndex

Pointer to the number of elements in the source anddestination string for in-place operation.
Index of the starting point.

len

Number of elements to be removed.

pSrcDstLen

Description
NOTE This function is deprecated and will be removed in a future release. If you have concerns, open
a ticket and provide feedback at https://supporttickets.intel.com/.

This function removes the len elements from a source string pSrc of length srcLen. Starting position is
specified by startIndex. The result is stored in the pDst.
The in-place flavors of ippsRemove remove the len elements from the source string pSrcDst and store theresult in the destination string pSrcDst.
Code example shows how to use the function ippsRemove_8u_I.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error condition if at least one of the specified
pointers is NULL.

ippStsLengthErr

Indicates an error condition if one of the srcLen, len,pSrcSdtLen, startIndex is negative, or (startIndex+len) is
greater than srcLen or pSrcDstLen.

Compare
DEPRECATED. Compares two strings of the fixed
length.

SyntaxIppStatus ippsCompare_8u(const Ipp8u* pSrc1, const Ipp8u* pSrc2, int len, int*pResult);

Include Files
ippch.h524

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc1

Pointer to the first source string.

pSrc2

Pointer to the second source string.

len

Maximum number of elements to be compared.

pResult

Pointer to the result.

Description
NOTE This function is deprecated and will be removed in a future release. If you have concerns, open
a ticket and provide feedback at https://supporttickets.intel.com/.

This function compares first len elements of two strings pSrc1 and pSrc2. The value pResult =pSrc1[i]- pSrc2[i] is computed successively for each i-th element, i =0,...len-1. When the first pairof non-matching elements occurs (that is, when pResult is not equal to zero), the function stops operation
and returns the value pResult. The returned value is positive when pSrc1[i]> pSrc2[i] and negative
when pSrc1[i]< pSrc2[i]. If the strings are equal, the function returns pResult = 0. The comparison iscase-sensitive.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error condition if at least one of the specified
pointers is NULL.

ippStsLengthErr

Indicates an error condition if len is negative.

ExampleThe code example below shows how to use the function ippsCompare_8u.

Ipp8u string0[] = "These functions compare two strings";
Ipp8u string1[] = "These FUNCTIONS compare two strings";
int result;ippsCompare_8u( string0, string1, sizeof (string0) - 1, &result );printf ( "ippsCompare_8u said: " );printf ( "string0 is %s string1.\n", (result < 0) ? "less than" :((result > 0) ? "greater than" : "equal to") );ippsCompareIgnoreCaseLatin_8u( string0, string1, sizeof (string0) - 1,
&result );printf ( "ippsCompareIgnoreCaseLatin_8u said: " );printf ( "string0 is %s string1.\n", (result < 0) ? "less than" :((result > 0) ? "greater than" : "equal to") );Output:ippsCompare_8u said: string0 is greater than string1.
ippsCompareIgnoreCaseLatin_8u said: string0 is equal to string1.

525

1

Intel® Integrated Performance Primitives Developer Guide and Reference

CompareIgnoreCase, CompareIgnoreCaseLatin
DEPRECATED. Compare two strings of the fixed length
ignoring case.

SyntaxIppStatus ippsCompareIgnoreCaseLatin_8u(const Ipp8u* pSrc1, const Ipp8u* pSrc2, intlen, int* pResult);

Include Files
ippch.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc1

Pointer to the first source string.

pSrc2

Pointer to the second source string.

len

Maximum number of elements to be compared.

pResult

Pointer to the result.

Description
NOTE These functions are deprecated and will be removed in a future release. If you have concerns,
open a ticket and provide feedback at https://supporttickets.intel.com/.

These functions compare first len elements of two strings pSrc1 and pSrc2. If all pairs of elements in thestrings are equal, the function returns pResult = 0. If the pair of non-matching elements occurs in the i-th
position, the function stops operation and returns pResult. The returned value is positive when pSrc1[i]>pSrc2[i] and negative when pSrc1[i]< pSrc2[i]. The comparison is case-insensitive.
The function ippsCompareIgnore operates with Unicode characters. The function
ippsCompareIgnoreLatin operates with ASCII characters.
Code example shows how to use the function ippsCompareIgnoreCaseLatin_8u.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error condition if at least one of the specified
pointers is NULL.

ippStsLengthErr

Indicates an error condition if len is negative.

Equal
DEPRECATED. Compares two string of the fixed lengthfor equality.

SyntaxIppStatus ippsEqual_8u(const Ipp8u* pSrc1, const Ipp8u* pSrc2, int len, int* pResult);526

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Include Files
ippch.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc1

Pointer to the first source string.

pSrc2

Pointer to the second source string.

len

Maximum number of elements to be compared.

pResult

Pointer to the result.

Description
NOTE This function is deprecated and will be removed in a future release. If you have concerns, open
a ticket and provide feedback at https://supporttickets.intel.com/.

This function compares first len elements of two strings pSrc1 and pSrc2. Each element of the first string iscompared with the corresponding element of the second string. When the first pair of non-matching elements
is found, the function stops operation and stores 0 in pResult. If the strings are equal, the function stores 1
in pResult. The comparison is case-sensitive.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error condition if at least one of the specified
pointers is NULL.

ippStsLengthErr

Indicates an error condition if len is negative.

TrimC
DEPRECATED. Deletes all occurrences of a specified
symbol in the beginning and in the end of the string.

SyntaxIppStatus ippsTrimC_8u(const Ipp8u* pSrc, int srcLen, Ipp8u odd, Ipp8u* pDst, int*
pDstLen);IppStatus ippsTrimC_8u_I(Ipp8u* pSrcDst, int* pLen, Ipp8u odd);

Include Files
ippch.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

527

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Parameters
pSrc

Pointer to the source string.

srcLenNumber of elements in the source string.

pSrcDstpDst
pDstLen
pLen
odd

Pointer to the source and destination string for the in-place
operation.
Pointer to the destination string.
Pointer to the computed number of elements in the destination
string.
Pointer to the number of elements in the source anddestination string for the in-place operation.
Symbol to be deleted.

Description
NOTE This function is deprecated and will be removed in a future release. If you have concerns, open
a ticket and provide feedback at https://supporttickets.intel.com/.

This function deletes all occurrences of a specified symbol odd if it is present in the beginning and in the endof the source string pSrc containing srcLen elements. The function stores the result string containing
pDstLen elements in pDst.
The in-place flavors of ippsTrimC delete all occurrences of a specified symbol odd if it is present in the
beginning and in the end of the source string pSrcDst containing pLen elements. These functions store theresult string containing pLen elements in pSrcDst.
The operation is case-sensitive.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error condition if at least one of the specified
pointers is NULL.

ippStsLengthErr

Indicates an error condition if srcLen or pLen is negative.

ExampleThe code example below shows how to use the function ippsTrimC_8u_I.

Ipp8u string[] = " ### abracadabra $$$ ";Ipp8u trim[] = " $#* ";Ipp8u dst_string [ sizeof (string)];
int string_len , dst_string_len ;ippsTrimCAny_8u( string, sizeof (string) - 1, trim, sizeof (string) - 1, dst_string,&
dst_string_len );dst_string [ dst_string_len ] = 0;
printf ( "ippsTrimCAny_8u returned: %s.\n", (char*) dst_string );string_len = sizeof (string) - 1;
ippsTrimC_8u_I( string, & string_len , ' # ' );string[ string_len ] = 0;
printf ( "ippsTrimC_8u_I returned: %s.\n", (char*)string );528

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Result:ippsTrimCAny_8u returned: abracadabra .
ippsTrimC_8u_I returned: abracadabra$$$ .

TrimCAny, TrimStartCAny, TrimEndCAny
DEPRECATED. Delete all occurrences of any of thespecified symbols in the beginning and in the end of
the source string.

SyntaxIppStatus ippsTrimCAny_8u(const Ipp8u* pSrc, int srcLen, const Ipp8u* pTrim, int
trimLen, Ipp8u* pDst, int* pDstLen);
IppStatus ippsTrimStartCAny_8u(const Ipp8u* pSrc, int srcLen, const Ipp8u* pTrim, int
trimLen, Ipp8u* pDst, int* pDstLen);
IppStatus ippsTrimEndCAny_8u(const Ipp8u* pSrc, int srcLen, const Ipp8u* pTrim, int
trimLen, Ipp8u* pDst, int* pDstLen);

Include Files
ippch.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source string.

srcLenNumber of elements in the source string.

pTrim

Pointer to the array containing the specified elements.

trimLen

Number of elements in the array.

pDst

Pointer to the destination string.

pDstLen

Pointer to the computed number of elements in the destination
string.

Description
NOTE These functions are deprecated and will be removed in a future release. If you have concerns,
open a ticket and provide feedback at https://supporttickets.intel.com/.

The function ippsTrimCAny deletes all occurrences of any of the specified elements stored in the arraypTrim if they are present either in the beginning or in the end of the source string pSrc, and stores theresult string containing pDstLen elements in pDst. The function stops operation when it finds the first nonmatching element. The functions ippsTrimStartCAny and ippsTrimEndCAny perform this operation only inthe beginning or in the end of the source string pSrc, respectively. The operation is case-sensitive.
Code example shows how to use the function ippsTrimCAny_8u.

529

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error condition if at least one of the specified
pointers is NULL.

ippStsLengthErr

Indicates an error condition if srcLen or trimLen is negative.

ReplaceC
DEPRECATED. Replaces all occurrences of a specified
element in the source string with another element.

SyntaxIppStatus ippsReplaceC_8u(const Ipp8u* pSrc, Ipp8u* pDst, int len, Ipp8u oldVal, Ipp8u
newVal);Include Files
ippch.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source string.

len

Number of elements in the source string.

pDst

Pointer to the destination string.

oldValElement to be replaced.

newValElement that replaces oldVal.

Description
NOTE This function is deprecated and will be removed in a future release. If you have concerns, open
a ticket and provide feedback at https://supporttickets.intel.com/.

This function replaces all occurrences of a specified element oldVal in the source string pSrc with anotherspecified element newVal, and stores the new string in the pDst. The operation is case-sensitive.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error condition if at least one of the specified
pointers is NULL.

ippStsLengthErr

Indicates an error condition if len is negative.

530

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

ExampleThe code example below shows how to use the function ippsReplaceC_8u.

Ipp8u string[] = "abracadabra";
Ipp8u dst_string [ sizeof (string)];ippsReplaceC_8u( string, dst_string , sizeof (string), 'a', 'o' );printf ( "ippsReplaceC_8u returned: %s.\n", (char*) dst_string );Output:ippsReplaceC_8u returned: obrocodobro.

Uppercase, UppercaseLatin
DEPRECATED. Convert alphabetic characters of astring to all uppercase symbols.

SyntaxIppStatus ippsUppercaseLatin_8u(const Ipp8u* pSrc, Ipp8u* pDst, int len);
IppStatus ippsUppercaseLatin_8u_I(Ipp8u* pSrcDst, int len);

Include Files
ippch.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source string.

pDst

Pointer to the destination string.

pSrcDstlen

Pointer to the source and destination string for the in-place
operation.
Number of elements in the string.

Description
NOTE These functions are deprecated and will be removed in a future release. If you have concerns,
open a ticket and provide feedback at https://supporttickets.intel.com/.

These functions convert each alphabetic character of the source string pSrc to upper case and stores theresult in pDst.
The in-place flavors of these functions convert each alphabetic character of the source string pSrcDst to
upper case and store the result in pSrcDst.
The function ippsUppercase operates with Unicode characters. The function ippsUppercaseLatin operates
with ASCII characters.
Code example shows how to use the function ippsUppercaseLatin_8u.

531

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error condition if at least one of the specified
pointers is NULL.

ippStsLengthErr

Indicates an error condition if len is negative.

Lowercase, LowercaseLatin
DEPRECATED. Converts alphabetic characters of astring to all lowercase symbols.

SyntaxIppStatus ippsLowercaseLatin_8u(const Ipp8u* pSrc, Ipp8u* pDst, int len);
IppStatus ippsLowercaseLatin_8u_I(Ipp8u* pSrcDst, int len);

Include Files
ippch.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source string.

pDst

Pointer to the destination string.

pSrcDstlen

Pointer to the source and destination string for the in-place
operation.
Number of elements in the string.

Description
NOTE This function is deprecated and will be removed in a future release. If you have concerns, open
a ticket and provide feedback at https://supporttickets.intel.com/.

These functions convert each alphabetic character of the source string pSrc to lower case and store theresult in pDst.
The in-place flavors of these functions convert each alphabetic character of the source string pSrcDst tolower case and store the result in pSrcDst.
The function ippsLowercase operates with Unicode characters. The function ippsLowercaseLatin operates
with ASCII characters.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error condition if at least one of the specified
pointers is NULL.

532

Developer Guide and Reference for Intel® Integrated Performance Primitives

ippStsLengthErr

1

Indicates an error condition if len is negative.

ExampleThe code example below shows how to use the function ippsLowercaseLatin_8u_I.

Ipp8u string[] = "These Functions Vary the Case!";ippsLowercaseLatin_8u_I( string, sizeof (string) - 1 );printf ( "Lower: %s\n", (char*)string );ippsUppercaseLatin_8u_I( string, sizeof (string) - 1 );printf ( "Upper: %s\n", (char*)string );Result:Lower: these functions vary the case!
Upper: THESE FUNCTIONS VARY THE CASE!

Hash
DEPRECATED. Calculates the hash value for the string.

SyntaxIppStatus ippsHash_8u32u(const Ipp8u* pSrc, int len, Ipp32u* pHashVal);
IppStatus ippsHash_16u32u(const Ipp16u* pSrc, int len, Ipp32u* pHashVal);
IppStatus ippsHashSJ2_8u32u(const Ipp8u* pSrc, int len, Ipp32u* pHashVal);
IppStatus ippsHashSJ2_16u32u(const Ipp16u* pSrc, int len, Ipp32u* pHashVal);
IppStatus ippsHashMSCS_8u32u(const Ipp8u* pSrc, int len, Ipp32u* pHashVal);
IppStatus ippsHashMSCS_16u32u(const Ipp16u* pSrc, int len, Ipp32u* pHashVal);

Include Files
ippch.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source string.

len

Number of elements in the string.

pHashVal

Pointer to the result value.

Description
NOTE This function is deprecated and will be removed in a future release. If you have concerns, open
a ticket and provide feedback at https://supporttickets.intel.com/.

This function produces the hash value pHasVal for the specified string pSrc. The hash value is fairly uniqueto the given string. If hash values of two strings are different, the strings are different as well. If the hushvalues are the same, the strings are probably identical. The hash value is calculated in the following manner:

533

1

Intel® Integrated Performance Primitives Developer Guide and Reference

initial value is set to 0, then the hash value is calculated successively for each i-th string element as
pHashVal[i] = 2* pHashVal[i-1]^ pSrc[i], where ^ denotes a bitwise exclusive OR (XOR) operator.
The hash value for the last element is the hash value for the whole string.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsLengthErr

Indicates no error.
Indicates an error condition if one of the specified pointers is

NULL.

Indicates an error condition if len is negative.

ExampleThe code example below shows how to use the functions ippsHash_8u32u, ippsHashSJ2_8u32u, andippsHashMSCS_8u32u.

Ipp8u string[] = "monkey";
Ipp32u hash;hash = 0;
ippsHash_8u32u( string, sizeof (string) - 1, &hash );printf ( "ippsHash_8u32u hash value: %u\n", hash );hash = 0;
ippsHashSJ2_8u32u( string, sizeof (string) - 1, &hash );printf ( "ippsHashSJ2_8u32u hash value: %u\n", hash );hash = 0;
ippsHashMSCS_8u32u( string, sizeof (string) - 1, &hash );printf ( "ippsHashMSCS_8u32u hash value: %u\n", hash );Output:ippsHash_8u32u hash value: 2367
ippsHashSJ2_8u32u hash value: 3226471379
ippsHashMSCS_8u32u hash value: 1466279646

Concat
DEPRECATED. Concatenates several strings together.

SyntaxIppStatus ippsConcat_8u_D2L(const Ipp8u* const pSrc[], const int srcLen[], int numSrc,
Ipp8u* pDst);
IppStatus ippsConcat_8u(const Ipp8u* pSrc1, int len1, const Ipp8u* pSrc2, int len2,
Ipp8u* pDst);

Include Files
ippch.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

534

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Parameters
pSrc1

Pointer to the first source string.

len1

Number of elements in the first string.

pSrc2

Pointer to the second source string.

len2

Number of elements in the second string.

pSrc

Pointer to the array of source strings.

srcLenPointer to the array of lengths of the source strings.

numSrcNumber of source strings.

pDst

Pointer to the destination string.

Description
NOTE This function is deprecated and will be removed in a future release. If you have concerns, open
a ticket and provide feedback at https://supporttickets.intel.com/.

This function concatenates several strings together. Functions with D2L suffix operate with multiple numSrc
strings pSrc[], while functions without this suffix operate with two strings pSrc1 and pSrc2 only. Resulting
string is stored in the pDst. Necessary memory blocks must be allocated for the destination string before thefunction is called. Summary length of the strings to be concatenated can not be greater than IPP_MAX_32S.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error condition if at least one of the specified
pointers is NULL.

ippStsLengthErr

Indicates an error condition if len1 or len2 is negative, or
srcLen[i] is negative for i < numSrc.

ippStsSizeErr

Indicates an error condition if numSrc is equal to or less than 0.

ExampleThe code example below shows how to use the functions ippsConcat_8u and ippsConcat_8u_D2L.

Ipp8u string0[] = "This is the initial string.";
Ipp8u string1[] = "Extra text added to the string...";
Ipp8u* string_ptr [2] = { string0, string1 };int string_len_ptr [2] = { sizeof (string0) - 1, sizeof (string1)};
Ipp8u dst_string [ sizeof (string0) + sizeof (string1)];
ippsConcat_8u( string0, sizeof (string0) - 1, string1, sizeof (string1), dst_string );printf ("ippsConcat_8u said: %s\n", (char*) dst_string );ippsConcat_8u_D2L( string_ptr , string_len_ptr , 2, dst_string );printf ("ippsConcat_8u_D2L said: %s\n", (char*) dst_string );ippsConcatC_8u_D2L( string_ptr , string_len_ptr, 2, '#', dst_string );printf ("ippsConcatC_8u_D2L said: %s\n", (char*) dst_string );Output:535

1Intel® Integrated Performance Primitives Developer Guide and ReferenceippsConcat_8u said: This is the initial string. Extra text added to the string...
ippsConcat_8u_D2L said: This is the initial string. Extra text added to the string...
ippsConcatC_8u_D2L said: This is the initial string. # Extra text added to the string...

ConcatC
DEPRECATED. Concatenates several strings together
and inserts symbol delimiters between them.

SyntaxIppStatus ippsConcatC_8u_D2L(const Ipp8u* const pSrc[], const int srcLen[], int numSrc,
Ipp8u delim, Ipp8u* pDst);

Include Files
ippch.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the array of source strings.

srcLenPointer to the array of lengths of the source strings.

numSrcNumber of source strings.

delim

Symbol delimiter.

pDst

Pointer to the destination string.

Description
NOTE This function is deprecated and will be removed in a future release. If you have concerns, open
a ticket and provide feedback at https://supporttickets.intel.com/.

This function concatenates numSrc strings pSrc together and inserts a specified delimiter symbol delim
between them in the resulting string pDst.
Code example shows how to use the function ippsConcatC_8u_D2L.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error condition if at least one of the specified
pointers is NULL.

ippStsLengthErr

Indicates an error condition if srcLen[i] is negative for i <numSrc.

ippStsSizeErr

Indicates an error condition if numSrc is equal to or less than 0.

536

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

SplitC
DEPRECATED. Splits source string into separate parts.

SyntaxIppStatus ippsSplitC_8u_D2L(const Ipp8u* pSrc, int srcLen, Ipp8u delim, Ipp8u* pDst[],int dstLen[], int* pNumDst);

Include Files
ippch.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source strings.

srcLenNumber of elements in the source string.

delim

Symbol delimiter.

pDst

Pointer to the array of the destination strings.

dstLenPointer to array of the destination string lengths.

pNumDstNumber of destination strings.

Description
NOTE This function is deprecated and will be removed in a future release. If you have concerns, open
a ticket and provide feedback at https://supporttickets.intel.com/.

This function breaks source string pSrc into pNumDst separate strings pDst using a specified symbol delim
as a delimiter. If n specified delimiters occur in the beginning or in the end of the source string, then n empty
strings are appended to the array of destination strings. If n specified delimiters occur in a certain position
within the source string, then (n-1) empty strings are inserted into the array of destination strings, where nis the number of delimiter occurrences in this position.

Return Values
ippStsNoErr
ippStsNullPtrErr

Indicates no error.
Indicates an error condition if one of the specified pointers is

NULL.

ippStsLengthErr

Indicates an error condition if srcLen is negative, or dstLen isnegative for i < pNumDst.

ippStsSizeErr

Indicates an error condition if pNumDst is equal to or less than0.

ippStsOvermatchStrings

Indicates a warning if number of output strings exceeds theinitially specified number pNumDst; in this case odd strings are
discarded.

537

1

Intel® Integrated Performance Primitives Developer Guide and ReferenceippStsOverlongString

Indicates a warning if in some output strings the number of
elements exceeds the initially specified value dstLen; in thiscase corresponding strings are truncated to initial lengths.

ExampleThe code example below shows how to use the function ippsSplitC_8u_2DL.

Ipp8u string[] = "1st string # 2nd string";
Ipp8u dst_string0[ sizeof (string)];
Ipp8u dst_string1[ sizeof (string)];
Ipp8u* dst_string_ptr [] = { dst_string0, dst_string1 };int dst_string_len_ptr [] = { sizeof (dst_string0), sizeof (dst_string1) };int dst_string_num = 2;
int i ;
ippsSplitC_8u_D2L( string, sizeof (string) - 1, '#', dst_string_ptr, dst_string_len_ptr, &dst_string_num );printf ( "Destination strings number: %d\n", dst_string_num );for( i = 0; i < dst_string_num ; i ++ ) {dst_string_ptr [ i ][ dst_string_len_ptr [ i ]] = 0;
printf ( "%d: %s.\n", i, (char*) dst_string_ptr [ i ] );}Output:Destination strings number: 2
0: 1st string.
1: 2nd string.

Regular Expressions
NOTE These functions are deprecated and will be removed in a future release. If you have concerns,
open a ticket and provide feedback at https://supporttickets.intel.com/.
This section describes the Intel IPP functions that perform matching operations with the Perl-compatible
regular expression patterns. See http://search.cpan.org/dist/perl/pod/perlre.pod for more details about Perlcompatible regular expressions.
The current version of the Intel IPP functions for regular expressions have some limitations, specifically they
do not support literal (metacharacters \l, \L, \u, \U, \N{name}), embedded Perl code (?{code}), extended
regular expression ( ??{code}).

RegExpInit
DEPRECATED. Initializes the structure for processing
matching operation with regular expressions.

SyntaxIppStatus ippsRegExpInit(const char* pPattern, const char* pOptions, IppRegExpState*pRegExpState, int* pErrOffset);

Include Files
ippch.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

538Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Parameters
pPattern
pOptionspRegExpState
pErrOffset

Pointer to the pattern of regular expression.
Pointer to options for compiling and executing regularexpressions (possible values i, s, m, x, g). It must be NULL if nooptions are required.
Pointer to the structure containing internal form of a regularexpression.
Pointer to the offset in the pattern if compiling is break.

Description
NOTE This function is deprecated and will be removed in a future release. If you have concerns, open
a ticket and provide feedback at https://supporttickets.intel.com/.

This function initializes a regular expression state structure pRegExpState in the external buffer. The size of
this buffer must be computed previously by calling the function ippsRegExpGetSize. The function compiles
the initial pattern of regular expressions pPattern in accordance with the compiling options specified by
pOptions, converts it to the specific internal form, and stores it in the initialized structure. This structure isused by the function ippsRegExpFind to perform matching operation.
If the compiling is not completed, the function returns the pointer pErrOffset pointed to the position in thepattern where the compiling is interrupted.

NOTE
The parameter pPattern must be the same for both functions ippsRegExpInit andippsRegExpGetSize.

Return Values
ippStsNoErr
ippStsNullPtrErr

Indicates no error.
Indicates an error condition if one of the specified pointers is

NULL.

ippStsRegExpOptionsErr

Indicates an error if specified options are incorrectippStsRegExpQuantifierErr

Indicates an error if the quantifier is incorrectippStsRegExpGroupingErr

Indicates an error if the grouping is incorrectippStsRegExpBackRefErr

Indicates an error if the back reference is incorrectippStsRegExpChClassErr

Indicates an error if the character class is incorrectippStsRegExpMetaChErr

Indicates an error if the metacharacter is incorrect

RegExpGetSize
DEPRECATED. Computes the size of the regularexpression state structure.

SyntaxIppStatus ippsRegExpGetSize(const char* pPattern, int* pRegExpStateSize);

539

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Include Files
ippch.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pPattern

Pointer to the pattern of regular expression.

pRegExpStateSize

Pointer to the computed size of the regular expression
structure.

Description
NOTE This function is deprecated and will be removed in a future release. If you have concerns, open
a ticket and provide feedback at https://supporttickets.intel.com/.

This function computes the size of the memory that is necessary to initialize by the function
ippsRegExpInit the regular expression state structure containing the pattern pPattern in the internal
form. The value of the computed size is stored in the pRegExpStateSize.

NOTE
The parameter pPattern must be the same for both functions ippsRegExpInit andippsRegExpGetSize.

Return Values
ippStsNoErr
ippStsNullPtrErr

Indicates no error.
Indicates an error condition if one of the specified pointers is

NULL.

RegExpSetMatchLimit
DEPRECATED. Sets the value of the matchLimitparameter.

SyntaxIppStatus ippsRegExpSetMatchLimit(int matchLimit, IppRegExpState* pRegExpState);

Include Files
ippch.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

540

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Parameters
matchLimit

Value of the of the matches kept in stack.

pRegExpState

Pointer to the structure containing internal form of a regularexpression.

Description
NOTE This function is deprecated and will be removed in a future release. If you have concerns, open
a ticket and provide feedback at https://supporttickets.intel.com/.

This function sets the value of the parameter matchLimit that specifies how many times the function
ippsRegExpFind can be called through the single execution avoiding the possible stack overflow. The default
value is set very large, so you should set this parameter to the reasonable value in accordance with yourneeds.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error condition if the pRegExpState pointer is NULL.

RegExpFind
DEPRECATED. Looks for the occurrences of thesubstrings matching the specified regular expression.

SyntaxIppStatus ippsRegExpFind_8u(const Ipp8u* pSrc, int srcLen, IppRegExpState*pRegExpState, IppRegExpFind* pFind, int* pNumFind);

Include Files
ippch.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source strings.

srcLenNumber of elements in the source string.

pRegExpStatepFind
pNumFind

Pointer to the structure containing internal form of regularexpression.
Array of pointers to the matching substrings.
Size of the array pFind on input, number of matching
substrings on output.

541

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Description
NOTE This function is deprecated and will be removed in a future release. If you have concerns, open
a ticket and provide feedback at https://supporttickets.intel.com/.

This function search through the srcLen elements of the source string pSrc for substrings that match thespecified regular expression in accordance with the regular expression pattern that is stored in the structurepRegExpState. This structure must be initialized by the ippsRegExpInit function beforehand. Initially theparameter pNumFind specifies the size of array pFind, the output parameter pNumFind returns the numberof the matching substrings.

pFind->pFind specifies the offset of the pointer to the matching substring, and pFind->lenFind - numberof elements in the matching substring. pFind [0] points to the substring that matches the whole regularexpression, pFind [1] points to the substring that matches the first grouping, pFind[2] points to thesubstring that matches the second grouping, and so on.
If number of matches exceeds the size of the pFind array, the function returns ippStsOverflow status. In
this case you should increase pNumFind value and repeat the search.

NOTE
It is recommended to set the default value of the parameter matchLimit in accordance withreal necessity by calling the function ippsRegExpSetMatchLimit beforehand.

Return Values
ippStsNoErr
ippStsNullPtrErr

Indicates no error.
Indicates an error condition if one of the specified pointers is

NULL.

ippStsRegExpErr

Indicates an error condition if srcLen is negative, or pNumFind
is less than or equal to 0.
The state structure pRegExpState contains wrong data.

ippStsRegExpMatchLimitErr

The match limit has been exhausted.

ippStsOverflow

The size of pFind array is less than the number of matching
substrings.

ippStsSizeErr

ExampleRegExpSetFormat
DEPRECATED. Sets source encoding format for given
compiled pattern.

SyntaxIppStatus ippsRegExpSetFormat(IppRegExpFormat fmt, IppRegExpState* pRegExpState);

Include Files
ippch.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h542

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parametersfmt

New source encoding mode.

pRegExpState

Pointer to the structure containing internal form of a regularexpression.

Description
The function sets the new source encoding format for given compiled pattern. Default source encoding
format after ippsRegExpInit is UTF-8 with ASCII auto detection.
The enumeration IppRegExpFormat for representing a source encoding mode is defined as

typedef enum {ippFmtASCII=0,
ippFmtUTF8,}IppRegExpFormat;

CautionThe function ippsRegExpFind returns ippStsRegExpErr when pattern and source string arecoded with different encoding, or pattern contains unsupported features by chosen encoding
format.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pRegExpState pointer is NULL.

ippStsRangeErr

Indicates an error when mode is not a valid element of theenumerated type IppRegExpFormat.

ConvertUTF
DEPRECATED. Converts the UTF16BE or UTF16LE
format to UTF8 and vice versa.

SyntaxIppStatus ippsConvertUTF_8u16u(const Ipp8u* pSrc, Ipp32u* pSrcLen, Ipp16u* pDst,
Ipp32u* pDstLen, int BEFlag);
IppStatus ippsConvertUTF_16u8u(const Ipp16u* pSrc, Ipp32u* pSrcLen, Ipp8u* pDst,
Ipp32u* pDstLen, int BEFlag);Include Files
ippch.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

543

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Parameters
pSrc

Pointer to the source vector.

pSrcLenLength of the pSrc vector on input; its used length on output.

pDst

Pointer to the destination vector.

pDstLenLength of the pDst vector on input; its used length on output.

BEFlag

Flag to indicate the UTF16BE format. 0 means the UTF16LE
format.

Description
NOTE This function is deprecated and will be removed in a future release. If you have concerns, open
a ticket and provide feedback at https://supporttickets.intel.com/.

The function flavor ippsConvertUTF_8u16u converts the UTF8 format to the UTF16LE or UTF16BE format.
The function flavor ippsConvertUTF_16u8u converts UTF16LE or UTF16BE format to the UTF8 format.

Return Values
ippStsNoErr
ippStsNullPtrErr

Indicates no error.
Indicates an error condition if one of the specified pointers is

NULL.

RegExpReplaceGetSize
DEPRECATED. Calculates the size of the state
structure for the find-replace operation.

SyntaxIppStatus ippsRegExpReplaceGetSize(const Ipp8u* pSrcReplacement, Ipp32u* pSize);

Include Files
ippch.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrcReplacement

Pointer to the source null-terminated replace pattern.

pSize

Pointer to the size of the state structure for the find andreplace operation.

Description
NOTE This function is deprecated and will be removed in a future release. If you have concerns, open
a ticket and provide feedback at https://supporttickets.intel.com/.

544

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

This function calculates the size of the memory that is necessary to initialize the state structure required by
the function ippsRegExpReplaceInit. The value of the calculated size is stored in the pSize.

NOTE
Value of the parameter pSrcReplacement must be the same as used for theippsRegExpReplaceInit function call.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pSize pointer is NULL.

RegExpReplaceInit
DEPRECATED. Initialize the state structure for thefind-replace operation.

SyntaxIppStatus ippsRegExpReplaceInit(const Ipp8u* pSrcReplacement, IppRegExpReplaceState*
pReplaceState);

Include Files
ippch.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrcReplacement

Pointer to the source null-terminated replace pattern.

pReplaceState

Pointer to the state structure for the find and replace operation.

Description
NOTE This function is deprecated and will be removed in a future release. If you have concerns, open
a ticket and provide feedback at https://supporttickets.intel.com/.

This function initializes a state structure pState for the find and replace operation in the external buffer. The
size of this buffer must be computed previously by calling the function ippsRegExpReplaceGetSize.

NOTE
Value of the parameter pSrcReplacement must be the same as used for theippsRegExpReplaceGetSize function call.

545

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pReplaceState or pSrcReplacement
pointer is NULL.

RegExpReplace
DEPRECATED. Performs find and replace operation.

SyntaxIppStatus ippsRegExpReplace_8u(const Ipp8u* pSrc, int* pSrcLenOffset, Ipp8u* pDst, int*
pDstLen, IppRegExpFind* pFind, int* pNumFind, IppRegExpState* pRegExpState,
IppRegExpReplaceState* pReplaceState);

Include Files
ippch.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
Pointer to the source string.

pSrc
pSrcLenOffset
pDst

Pointer to length of the pSrc vector on input; its used length on
output.
Pointer to the destination string.

pDstLen

Pointer to length of the pDst vector on input; its used length on
output.

pFind

Array of pointers to the matching substrings.

pRegExpState

Pointer to size of the array pFind on input, to number ofmatching substrings on output.
Pointer to the compiled pattern structure.

pReplaceState

Pointer to the state structure for the find and replace operation.

pNumFind

Description
NOTE This function is deprecated and will be removed in a future release. If you have concerns, open
a ticket and provide feedback at https://supporttickets.intel.com/.

This function search through the pSrcLen elements of the source string pSrc for substrings that match thespecified regular expression in accordance with the regular expression pattern that is stored in the structurepRegExpState. This state structure must be initialized by the ippsRegExpInit function beforehand. All
found matches are replaced according to the replacement pattern that is stored in the structure
pReplaceState. This structure must be initialized beforehand by the function ippsRegExpReplaceInit.

546

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Initially the parameter pNumFind specifies the size of array pFind, the output parameter pNumFind returns
the number of the matching substrings. pFind->pFind specifies the offset of the pointer to the matching
substring, and pFind->lenFind - number of elements in the matching substring. pFind [0] points to thesubstring that matches the whole regular expression, pFind[1] points to the substring that matches the firstgrouping, pFind [2] points to the substring that matches the second grouping, and so on.

NOTE
The compiled regular expression pattern and/or replacement pattern can be used for
different input strings in different combinations.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error when pSrcLen or pDstLen is less than orequal to zero.

Appendix A: Handling of Special Cases
Some mathematical functions implemented in Intel IPP are not defined for all possible argument values. Thisappendix describes how the corresponding Intel IPP functions used in signal processing domains handle
situations when their input arguments fall outside the range of function definition or may lead to ambiguously
determined output results.
The table "Special Cases for Intel IPP Signal Processing Functions" below summarizes these special cases forgeneral vector functions described in Essential Functions and lists result values together with status codes
returned by these functions. The status codes ending with Err (except for the ippStsNoErr status) indicate
an error. When an error occurs, the function execution is interrupted. All other status codes indicate that the
input argument is outside the range, but the function execution is continued with the corresponding result
value.
Special Cases for Intel IPP Signal Processing Functions
Function Base
Name

Data
Type

Case Description

Result Value

Status Code

Sqrt

16s

Sqrt (x<0)

0ippStsSqrtNegArg

32f

Sqrt (x<0)

NAN_32F

ippStsSqrtNegArg

64s

Sqrt (x<0)

0ippStsSqrtNegArg

64f

Sqrt (x<0)

NAN_64F

ippStsSqrtNegArg

8u

Div (0/0)

0ippStsDivByZero

Div (x/0)

IPP_MAX_8U

ippStsDivByZero

Div (0/0)

0ippStsDivByZero

Div (x/0), x>0

IPP_MAX_16S

ippStsDivByZero

Div (x/0), x<0

IPP_MIN_16S

ippStsDivByZero

Div (0/0)

0ippStsDivByZero

Div (x/0)

0ippStsDivByZero

Div, Div_Round

16s

16sc

547

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Function Base
Name

Data
Type

Case Description

Result Value

Status Code32f

Div (0/0)

NAN_32F

ippStsDivByZero

Div (x/0), x>0

INF_32F

ippStsDivByZero

Div (x/0), x<0

INF_NEG_32F

ippStsDivByZero

Div (0/0)

NAN_32F

ippStsDivByZero

Div (x/0)

NAN_32F

ippStsDivByZero

Div (0/0)

NAN_32F

ippStsDivByZero

Div (x/0), x>0

INF_32F

ippStsDivByZero

Div (x/0), x<0

INF_NEG_32F

ippStsDivByZero

Div (0/0)

NAN_32F

ippStsDivByZero

Div (x/0)

NAN_32F

ippStsDivByZero

32fc

64f

64fc

DivC

all

Div(x/0)-

ippStsDivByZeroErr

Ln

16s

Ln (0)

IPP_MIN_16S

ippStsLnZeroArg

Ln (x<0)

IPP_MIN_16S

ippStsLnZeroArg

Ln (0)

IPP_MIN_32S

ippStsLnZeroArg

Ln (x<0)

IPP_MIN_32S

ippStsLnNegArg

Ln (x<0)

NAN_32F

ippStsLnNegArg

Ln(x<IPP_MINABS_3
2F)

INF_NEG_32F

ippStsLnZeroArg

NAN_64F

ippStsLnNegArg

INF_NEG_64F

ippStsLnZeroArg

32s

32f

64f
Ln (x<0)Ln(x<IPP_MINABS_6
4F)
Exp

548

16s

overflow

IPP_MAX_16S

ippStsNoErr

32s

overflow

IPP_MAX_32S

ippStsNoErr

64s

overflow

IPP_MAX_64S

ippStsNoErr

32f

overflow

INF_32F

ippStsNoErr

64f

overflow

INF_64F

ippStsNoErr

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Here x denotes an input value. For the definition of the constants used, see Data Ranges in Intel® Integrated
Performance Primitives Concepts.
Note that flavors of the same math function operating on different data types may produce different resultsfor equal argument values. However, for a given function and a fixed data type, handling of special cases is
the same for all function flavors that have different descriptors in their names. For example, the logarithm
function ippiLn operating on 16s data treats zero argument values in the same way for all its flavors
ippsLn_16s_Sfs and ippiLn_16s_ISfs.
The table below summarizes special cases for fixed-accuracy arithmetic functions.
Special Cases for Intel IPP Fixed-Accuracy Arithmetic Functions
Function
Base
Name

Data
Typ
e

Case Description

Result Value

Status Code

Inv

32f

Inv (x=+0)

INF_32F

Inv (x=-0)-INF_32F

ippStsSingularity

Inv (x=+0)

INF_64F

Inv (x=-0)-INF_64F

64f

ippStsSingularityippStsSingularityippStsSingulari
ty

Div

32f

64f

Div (x>0, y=+0)

INF_32F

Div (x>0, y=-0)-INF_32F

Div (x<0, y=+0)

INF_32F

Div (x<0, y=-0)-INF_32F

Div (x=0, y=0)

NAN_32F

Div (x>0, y=+0)

INF_64F

Div (x>0, y=-0)-INF_64F

Div (x<0, y=+0)

INF_64F

Div (x<0, y=-0)-INF_64F

Div (x=0, y=0)

NAN_64F

ippStsSingularityippStsSingularityippStsSingularityippStsSingularityippStsSingularityippStsSingularityippStsSingularityippStsSingularityippStsSingularityippStsSingulari
ty

Sqrt

32f
64f

InvSqrt32f

Sqrt(x<0)

NAN_32F

ippStsDomain

Sqrt(x=-INF)

NAN_32F

ippStsDomain

Sqrt(x<0)

NAN_64F

ippStsDomain

Sqrt(x=-INF)

NAN_64F

ippStsDomain

InvSqrt (x<0)

NAN_32F

ippStsDomain

549

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Function
Base
Name

Data
Typ
e

64f

Case Description

Result Value

Status CodeInvSqrt (x=+0)

INF_32F

InvSqrt (x=-0)-INF_32F

ippStsSingularity

InvSqrt (x=-INF)

NAN_32F

InvSqrt (x<0)

NAN_64F

InvSqrt (x=+0)

INF_64F

InvSqrt (x=-0)-INF_64F

InvSqrt (x=-INF)

NAN_64F

ippStsSingularityippStsDomain
ippStsDomain
ippStsSingularityippStsSingularityippStsDomain

InvCbrt32f
64f

InvCbrt (x=+0)

INF_32F

InvCbrt (x=-0)-INF_32F

InvCbrt (x=+0)

INF_64F

InvCbrt (x=-0)-INF_64F

ippStsSingularityippStsSingularityippStsSingularityippStsSingularity

Pow3o232f
64f

Pow, Powx

32f

64f

Pow3o2 (x<0)

NAN_32F

ippStsDomain

Pow3o2 (x=-INF)

NAN_32F

ippStsDomain

Pow3o2 (x<0)

NAN_64F

ippStsDomain

Pow3o2 (x=-INF)

NAN_64F

ippStsDomain

Pow (x=+0, y=-ODD_INT)

INF_32F

Pow (x=-0, y=-ODD_INT)-INF_32F

ippStsSingularity

Pow (x=0, y=-EVEN_INT)

INF_32F

Pow (x=0, y=NON_INT_NEG)

INF_32F

Pow (x<0, y=NON_INT_POS)

NAN_32F

Pow (x=0, y=-INF)

INF_32F

Pow (x=+0, y=-ODD_INT)

INF_64F

ippStsSingularity

Pow (x=-0, y=-ODD_INT)-INF_64F

ippStsDomain

Pow (x=0, y=-EVEN_INT)

INF_64F

Pow (x=0, y=NON_INT_NEG)

INF_64F

ippStsSingularity

Pow (x<0, y=NON_INT_POS)

NAN_64F

Pow (x=0, y=-INF)

INF_64F

ippStsSingularityippStsSingularityippStsSingularityippStsSingularityippStsSingularity550

Developer Guide and Reference for Intel® Integrated Performance Primitives

Function
Base
Name

Data
Typ
e

Case Description

Result Value

1

Status CodeippStsSingularityippStsDomain
ippStsSingulari
ty
Exp

32f

Exp (x), x<underflow

0

ippStsUnderflow

Exp (x), x>overflow

INF_32F

ippStsOverflow

Exp (x), x<underflow

0

ippStsUnderflow

Exp (x), x>overflow

INF_64F

ippStsOverflow

32f

Expm1(x), x>overflow

INF_32F

ippStsOverflow

64f

Expm1(x), x>overflow

INF_64F

ippStsOverflow

32f

Ln(x<0)

NAN_32F

ippStsDomain

Ln(x=-INF)

NAN_32F

ippStsDomain

Ln(x=0)-INF_32F

Ln(x<0)

NAN_64F

ippStsSingularityLn(x=-INF)

NAN_64F

Ln(x=0)-INF_64F

64f

Expm1

Ln, Log10

64f

ippStsDomain
ippStsDomain
ippStsSingulari
ty

Log1p

32f

64f

Ln(x<-1)

NAN_32F

ippStsDomain

Ln(x=-INF)

NAN_32F

ippStsDomain

Ln(x=-1)-INF_32F

Ln(x<-1)

NAN_64F

ippStsSingularityLn(x=-INF)

NAN_64F

Ln(x=-1)-INF_64F

ippStsDomain
ippStsDomain
ippStsSingulari
ty

Cos

Sin

SinCos

CIS

Tan

32f

Cos(INF)

NAN_32F

ippStsDomain

64f

Cos(INF)

NAN_64F

ippStsDomain

32f

Sin(INF)

NAN_32F

ippStsDomain

64f

Sin(INF)

NAN_64F

ippStsDomain

32f

SinCos(INF)

NAN_32F, NAN_32F

ippStsDomain

64f

SinCos(INF)

NAN_64F, NAN_64F

ippStsDomain

32fc

CIS(INF)

NAN_32F, NAN_32F

ippStsDomain

64fc

CIS(INF)

NAN_64F, NAN_64F

ippStsDomain

32f

Tan(INF)

NAN_32F

ippStsDomain

551

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Function
Base
Name

Acos

Data
Typ
e

Case Description

Result Value

Status Code64f

Tan(INF)

NAN_64F

ippStsDomain

32f

Acos(x), |x|>1

NAN_32F

ippStsDomain

Acos(INF)

NAN_32F

ippStsDomain

Acos(x), |x|>1

NAN_64F

ippStsDomain

Acos(INF)

NAN_64F

ippStsDomain

Asin(x), |x|>1

NAN_32F

ippStsDomain

Asin(INF)

NAN_32F

ippStsDomain

Asin(x), |x|>1

NAN_64F

ippStsDomain

Asin(INF)

NAN_64F

ippStsDomain

32f

Cosh(x), |x|>overflow

INF_32F

ippStsOverflow

64f

Cosh(x), |x|>overflow

INF_64F

ippStsOverflow

32f

Sinh(x), |x|>overflow

INF_32F

ippStsOverflow

64fSinh(x), |x|>overflow

INF_64F

ippStsOverflow

32f

Acosh(x<1)

NAN_32F

ippStsDomain

Acosh(x=-INF)

NAN_32F

ippStsDomain

Acosh(x<1)

NAN_64F

ippStsDomain

Acosh(x=-INF)

NAN_64F

ippStsDomain

Atanh(x=1)

INF_32F

Atanh(x=-1)-INF_32F

ippStsSingularityAtanh(x), |x|>1

NAN_32F

Atanh(INF)

NAN_32F

Atanh(x=1)

INF_64F

Atanh(x=-1)-INF_64F

Atanh(x), |x|>1

NAN_64F

Atanh(INF)

NAN_64F

64f

Asin

32f
64f

Cosh

Sinh

Acosh

64f

Atanh

32f

64f

ippStsSingularityippStsDomain
ippStsDomain
ippStsSingularityippStsSingularityippStsDomain
ippStsDomain

Erfc

ErfInv

32f

Erfc(x), |x|>underflow

0

ippStsUnderflow

64f

Erfc(x), |x|>underflow

0

ippStsUnderflow

32f

ErfInv(x=1)

INF_32F

ErfInv(x=-1)-INF_32F

ippStsSingularity

ErfInv(x), |x|>1

NAN_32F

ErfInv(INF)

NAN_32F

ErfInv(x=1)

INF_64F

64f

552

ippStsSingularityippStsDomain

Developer Guide and Reference for Intel® Integrated Performance Primitives

Function
Base
Name

Data
Typ
e

1

Case Description

Result Value

Status Code

ErfInv(x=-1)-INF_64F

ippStsDomain

ErfInv(x), |x|>1

NAN_64F

ErfInv(INF)

NAN_64F

ippStsSingularityippStsSingularityippStsDomain
ippStsDomain

ErfcInv

32f

64f

ErfcInv(x=2)-INF_32F

ErfcInv(x=0)

INF_32F

ErfcInv(x), |x|<0

NAN_32F

ErfcInv(x), |x|>2

NAN_32F

ErfcInv(INF)

NAN_32F

ErfcInv(x=2)-INF_64F

ErfcInv(x=0)

INF_64F

ErfcInv(x), |x|<0

NAN_64F

ErfcInv(x), |x|>2

NAN_64F

ErfcInv(INF)

NAN_64F

ippStsSingularityippStsSingularityippStsDomain
ippStsDomain
ippStsDomain
ippStsSingularityippStsSingularityippStsDomain
ippStsDomain
ippStsDomain

CdfNorm

32f

CdfNorm(x), |x|<underflow

0

ippStsUnderflow

64f

CdfNorm(x), |x|<underflow

0

ippStsUnderflow

CdfNormInv(x=1)

INF_32F

CdfNormInv(x=0)-INF_32F

ippStsSingularity

CdfNormInv(x), x<0

NAN_32F

CdfNormInv(x), x>1

NAN_32F

CdfNormInv(INF)

NAN_32F

CdfNormInv(x=1)

INF_64F

CdfNormInv(x=0)-INF_64F

CdfNormInv(x), x<0

NAN_64F

CdfNormInv(x), x>1

NAN_64F

CdfNormInv(INF)

NAN_64F

CdfNormInv 32f

64f

ippStsSingularityippStsDomain
ippStsDomain
ippStsDomain
ippStsSingularityippStsSingularityippStsDomain
ippStsDomain
ippStsDomain

553

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Appendix B: Removed Functions for Signal Processing
This appendix contains tables that list the functions removed from Intel IPP 9.0. If an application createdwith the previous versions calls a function listed here, then the source code must be modified. The tables
specify the corresponding Intel IPP 9.0 functions or workaround to replace the removed functions:
•
•
•
•
•
•
•
•

ippcore.hipps.hippdi.hippch.hippdc.hippsc.h - the whole domain is removed
ippac.h - the whole domain is removed
ippgen.h - the whole domain is removed
NOTE
To get information on possible alternatives to the removed functions that do not have substitution or
workaround in Intel IPP , refer to https://software.intel.com/en-us/articles/the-alternatives-for-intelipp-legacy-domains-and-functions or file a support request at Online Service Center.

ippcore.h:Removed from 9.0

Substitution or WorkaroundippEnableCpu

N/A

ippGetCpuTypeippGetCpuFeatures

ippGetMessageStatusI18n

N/A

ippGetNumCoresOnDie

N/AippInitCpu

ippSetCpuFeatures

ippMessageCatalogCloseI18n

N/A

ippMessageCatalogOpenI18n

N/A

ippSetAffinity

N/A

ippStaticInit

ippInit

ippStatusToMessageIdI18n

N/A

ipps.h:Removed from 9.0

Substitution or Workaroundipps10Log10_32s_ISfs

Use ippsConvert_32s32f+ippsLog10_32f_A24(ippVM)

ipps10Log10_32s_Sfs

Use ippsConvert_32s32f+ippsLog10_32f_A24(ippVM)

ippsALawToLin_8u16s

Use any open-source g711 implementation

ippsALawToLin_8u32f

Use any open-source g711 implementation554

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Removed from 9.0

Substitution or WorkaroundippsALawToMuLaw_8u

Use any open-source g711 implementation

ippsAutoCorr_16s_Sfs

Use ippsConvert_16s32f andippsAutoCorrNorm_32f

ippsAutoCorr_32f

ippsAutoCorrNorm

ippsAutoCorr_32fc

ippsAutoCorrNorm

ippsAutoCorr_64f

ippsAutoCorrNorm

ippsAutoCorr_64fc

ippsAutoCorrNorm

ippsAutoCorr_NormA_16s_Sfs

ippsAutoCorrNorm

ippsAutoCorr_NormA_32f

ippsAutoCorrNorm

ippsAutoCorr_NormA_32fc

ippsAutoCorrNorm

ippsAutoCorr_NormA_64f

ippsAutoCorrNorm

ippsAutoCorr_NormA_64fc

ippsAutoCorrNorm

ippsAutoCorr_NormB_16s_Sfs

ippsAutoCorrNorm

ippsAutoCorr_NormB_32f

ippsAutoCorrNorm

ippsAutoCorr_NormB_32fc

ippsAutoCorrNorm

ippsAutoCorr_NormB_64f

ippsAutoCorrNorm

ippsAutoCorr_NormB_64fc

ippsAutoCorrNorm

ippsBuildSymblTableDV4D_16sc

N/A

ippsCalcStatesDV_16sc

N/A

ippsCauchyDD2_32f_I

N/A

ippsCauchyD_32f_I

N/A

ippsCauchy_32f_I

N/A

ippsConjCcs_16sc

ippsConvert_16s32f+ippsConjCcs_32fc

ippsConjCcs_16sc_I

ippsConvert_16s32f+ippsConjCcs_32fc_I

ippsConjPack_16sc

ippsConvert_16s32f+ippsConjPack_32fc

ippsConjPack_16sc_I

ippsConvert_16s32f+ippsConjPack_32fc_I

ippsConjPerm_16sc

ippsConvert_16s32f+ippsConjPerm_32fc

ippsConjPerm_16sc_I

ippsConvert_16s32f+ippsConjPerm_32fc_I

ippsConvCyclic4x4_32f32fc

N/A

ippsConvCyclic8x8_16s_Sfs

N/A

ippsConvCyclic8x8_32f

N/A

555

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippsConv_16s_Sfs

ippsConvert_16s32f+ippsConvolve_32f

ippsConv_32f

ippsConvolve_32f

ippsConv_64f

ippsConvolve_64f

ippsCopy_1u

ippsCopyLE_1u and ippsCopyBE_1u

ippsCrossCorr_16s64s

Use ippsConvert_16s32f andippsCrossCorrNorm_32f

ippsCrossCorr_16s_Sfs

Use ippsConvert_16s32f andippsCrossCorrNorm_32f

ippsCrossCorr_32f

ippsCrossCorrNorm_32f

ippsCrossCorr_32fc

ippsCrossCorrNorm_32fc

ippsCrossCorr_64f

ippsCrossCorrNorm_64f

ippsCrossCorr_64fc

ippsCrossCorrNorm_64fc

ippsDCTFwdFree_16s

Use ippsFree

ippsDCTFwdFree_32f

Use ippsFree

ippsDCTFwdFree_64f

Use ippsFree

ippsDCTFwdGetBufSize_16s

ippsDCTGetSize

ippsDCTFwdGetBufSize_32f

ippsDCTGetSize

ippsDCTFwdGetBufSize_64f

ippsDCTGetSize

ippsDCTFwdGetSize_16s

ippsDCTFwdGetSize_32f

ippsDCTFwdInitAlloc_16s

ippsDCTGetSize+ippsMalloc+ippsDCTInit

ippsDCTFwdInitAlloc_32f

ippsDCTGetSize+ippsMalloc+ippsDCTInit

ippsDCTFwdInitAlloc_64f

ippsDCTGetSize+ippsMalloc+ippsDCTInit

ippsDCTFwdInit_16s

ippsDCTFwdInit_32f

ippsDCTFwd_16s_ISfs

ippsDCTFwd_32f_I

ippsDCTFwd_16s_Sfs

ippsDCTFwd_32f

ippsDCTInvFree_16s

ippsFreeippsDCTInvFree_32f

ippsFreeippsDCTInvFree_64f

ippsFreeippsDCTInvGetBufSize_16s

ippsDCTGetSize

ippsDCTInvGetBufSize_32f

ippsDCTGetSize

ippsDCTInvGetBufSize_64f

ippsDCTGetSize

556

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippsDCTInvGetSize_16s

ippsDCTInvGetSize_32f

ippsDCTInvInitAlloc_16s

ippsDCTGetSize+ippsMalloc+ippsDCTInit

ippsDCTInvInitAlloc_32f

ippsDCTGetSize+ippsMalloc+ippsDCTInit

ippsDCTInvInitAlloc_64f

ippsDCTGetSize+ippsMalloc+ippsDCTInit

ippsDCTInvInit_16s

ippsDCTInvInit_32f

ippsDCTInv_16s_ISfs

ippsDCTInv_32f_I

ippsDCTInv_16s_Sfs

ippsDCTInv_32f

ippsDFTFree_C_16s

ippsFreeippsDFTFree_C_16sc

ippsFreeippsDFTFree_C_32f

ippsFreeippsDFTFree_C_32fc

ippsFreeippsDFTFree_C_64f

ippsFreeippsDFTFree_C_64fc

ippsFreeippsDFTFree_R_16s

ippsFreeippsDFTFree_R_32f

ippsFreeippsDFTFree_R_64f

ippsFreeippsDFTFwd_CToC_16s_Sfs

ippsDFTFwd_CToC_32f

ippsDFTFwd_CToC_16sc_Sfs

ippsDFTFwd_CToC_32fc

ippsDFTFwd_RToCCS_16s_Sfs

ippsDFTFwd_RToCCS_32f

ippsDFTFwd_RToPack_16s_Sfs

ippsDFTFwd_RToPack_32f

ippsDFTFwd_RToPerm_16s_Sfs

ippsDFTFwd_RToPerm_32f

ippsDFTGetBufSize_C_16s

ippsDFTGetSize

ippsDFTGetBufSize_C_16sc

ippsDFTGetSize

ippsDFTGetBufSize_C_32f

ippsDFTGetSize

ippsDFTGetBufSize_C_32fc

ippsDFTGetSize

ippsDFTGetBufSize_C_64f

ippsDFTGetSize

ippsDFTGetBufSize_C_64fc

ippsDFTGetSize

ippsDFTGetBufSize_R_16s

ippsDFTGetSize

ippsDFTGetBufSize_R_32f

ippsDFTGetSize

ippsDFTGetBufSize_R_64f

ippsDFTGetSize

557

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippsDFTInitAlloc_C_16s

ippsDFTGetSize+ippsMalloc+ippsDFTInit

ippsDFTInitAlloc_C_16sc

ippsDFTGetSize+ippsMalloc+ippsDFTInit

ippsDFTInitAlloc_C_32f

ippsDFTGetSize+ippsMalloc+ippsDFTInit

ippsDFTInitAlloc_C_32fc

ippsDFTGetSize+ippsMalloc+ippsDFTInit

ippsDFTInitAlloc_C_64f

ippsDFTGetSize+ippsMalloc+ippsDFTInit

ippsDFTInitAlloc_C_64fc

ippsDFTGetSize+ippsMalloc+ippsDFTInit

ippsDFTInitAlloc_R_16s

ippsDFTGetSize+ippsMalloc+ippsDFTInit

ippsDFTInitAlloc_R_32f

ippsDFTGetSize+ippsMalloc+ippsDFTInit

ippsDFTInitAlloc_R_64f

ippsDFTGetSize+ippsMalloc+ippsDFTInit

ippsDFTInv_CCSToR_16s_Sfs

ippsDFTInv_CCSToR_32f

ippsDFTInv_CToC_16s_Sfs

ippsDFTInv_CToC_32f

ippsDFTInv_CToC_16sc_Sfs

ippsDFTInv_CToC_32fc

ippsDFTInv_PackToR_16s_Sfs

ippsDFTInv_PackToR_32f

ippsDFTInv_PermToR_16s_Sfs

ippsDFTInv_PermToR_32f

ippsDFTOutOrdFree_C_32fc

N/A

ippsDFTOutOrdFree_C_64fc

N/A

ippsDFTOutOrdFwd_CToC_32fc

N/A

ippsDFTOutOrdFwd_CToC_64fc

N/A

ippsDFTOutOrdGetBufSize_C_32fc

N/A

ippsDFTOutOrdGetBufSize_C_64fc

N/A

ippsDFTOutOrdInitAlloc_C_32fc

N/A

ippsDFTOutOrdInitAlloc_C_64fc

N/A

ippsDFTOutOrdInv_CToC_32fc

N/A

ippsDFTOutOrdInv_CToC_64fc

N/A

ippsDemodulateFM_CToR_16s

N/A

ippsDotProd_16s16sc32fc

Use simple C-loop and Intel compiler, or convert tosupported data type and use another flavor of
DotProd function

ippsDotProd_16s16sc32sc_Sfs

Use simple C-loop and Intel compiler, or convert tosupported data type and use another flavor of
DotProd function

ippsDotProd_16s16sc_Sfs

Use ippsDotProd_16s16sc64sc

558

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Removed from 9.0

Substitution or WorkaroundippsDotProd_16s_Sfs

Use ippsDotProd_16s64s

ippsDotProd_16sc32fc

Use simple C-loop and Intel compiler, or convert tosupported data type and use another flavor of
DotProd function

ippsDotProd_16sc32sc_Sfs

Use simple C-loop and Intel compiler, or convert tosupported data type and use another flavor of
DotProd function

ippsDotProd_16sc_Sfs

Use ippsDotProd_16sc64sc

ippsDotProd_32s32sc_Sfs

Use simple C-loop and Intel compiler, or convert tosupported data type and use another flavor of
DotProd function

ippsDotProd_32sc_Sfs

Use simple C-loop and Intel compiler, or convert tosupported data type and use another flavor of
DotProd function

ippsExp_32f64f

Use ippsConvert_32f64f and ippsExp_64f

ippsExp_64s_ISfs

Use ippsConvert_64s64f and ippsExp_64f_I

ippsExp_64s_Sfs

Use ippsConvert_64s64f and ippsExp_64f

ippsFFTFree_C_16s

ippsFreeippsFFTFree_C_16sc

ippsFreeippsFFTFree_C_32f

ippsFreeippsFFTFree_C_32fc

ippsFreeippsFFTFree_C_32s

ippsFreeippsFFTFree_C_32sc

ippsFreeippsFFTFree_C_64f

ippsFreeippsFFTFree_C_64fc

ippsFreeippsFFTFree_R_16s

ippsFreeippsFFTFree_R_16s32s

ippsFreeippsFFTFree_R_32f

ippsFreeippsFFTFree_R_32s

ippsFreeippsFFTFree_R_64f

ippsFreeippsFFTFwd_CToC_16s_ISfs

ippsFFTFwd_CToC_32f_I

ippsFFTFwd_CToC_16s_Sfs

ippsFFTFwd_CToC_32f

ippsFFTFwd_CToC_16sc_ISfs

ippsFFTFwd_CToC_32fc_I

559

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippsFFTFwd_CToC_16sc_Sfs

ippsFFTFwd_CToC_32fc

ippsFFTFwd_CToC_32s_ISfs

ippsFFTFwd_CToC_64f_I

ippsFFTFwd_CToC_32s_Sfs

ippsFFTFwd_CToC_64f

ippsFFTFwd_CToC_32sc_ISfs

ippsFFTFwd_CToC_64fc_I

ippsFFTFwd_CToC_32sc_Sfs

ippsFFTFwd_CToC_64fc

ippsFFTFwd_RToCCS_16s32s_Sfs

ippsFFTFwd_RToCCS_32f

ippsFFTFwd_RToCCS_16s_ISfs

ippsFFTFwd_RToCCS_32f_I

ippsFFTFwd_RToCCS_16s_Sfs

ippsFFTFwd_RToCCS_32f

ippsFFTFwd_RToCCS_32s_ISfs

ippsFFTFwd_RToCCS_64f_I

ippsFFTFwd_RToCCS_32s_Sfs

ippsFFTFwd_RToCCS_64f

ippsFFTFwd_RToPack_16s_ISfs

ippsFFTFwd_RToPack_32f_I

ippsFFTFwd_RToPack_16s_Sfs

ippsFFTFwd_RToPack_32f

ippsFFTFwd_RToPack_32s_ISfs

ippsFFTFwd_RToPack_64f_I

ippsFFTFwd_RToPack_32s_Sfs

ippsFFTFwd_RToPack_64f

ippsFFTFwd_RToPerm_16s_ISfs

ippsFFTFwd_RToPerm_32f_I

ippsFFTFwd_RToPerm_16s_Sfs

ippsFFTFwd_RToPerm_32f

ippsFFTFwd_RToPerm_32s_ISfs

ippsFFTFwd_RToPerm_64f_I

ippsFFTFwd_RToPerm_32s_Sfs

ippsFFTFwd_RToPerm_64f

ippsFFTGetBufSize_C_16s

ippsFFTGetSize

ippsFFTGetBufSize_C_16sc

ippsFFTGetSize

ippsFFTGetBufSize_C_32f

ippsFFTGetSize

ippsFFTGetBufSize_C_32fc

ippsFFTGetSize

ippsFFTGetBufSize_C_32s

ippsFFTGetSize

ippsFFTGetBufSize_C_32sc

ippsFFTGetSize

ippsFFTGetBufSize_C_64f

ippsFFTGetSize

ippsFFTGetBufSize_C_64fc

ippsFFTGetSize

ippsFFTGetBufSize_R_16s

ippsFFTGetSize

ippsFFTGetBufSize_R_16s32s

ippsFFTGetSize

ippsFFTGetBufSize_R_32f

ippsFFTGetSize

ippsFFTGetBufSize_R_32s

ippsFFTGetSize

560

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

ippsFFTGetBufSize_R_64f
ippsFFTGetSize_C_16s

Substitution or WorkaroundippsFFTGetSize
Use 16s->32f conversion and 32f flavor of FFT -ippsFFTGetSize_C_32f
ippsFFTGetSize_C_16sc

Use 16s->32f conversion and 32f flavor of FFT -ippsFFTGetSize_C_32fc
ippsFFTGetSize_C_32s

Use 32s->32f (or to 64f) conversion and 32f (64f)
flavor of FFT - ippsFFTGetSize_C_32f (64f)

ippsFFTGetSize_C_32sc

Use 32s->32f (or to 64f) conversion and 32f (64f)
flavor of FFT - ippsFFTGetSize_C_32fc (64fc)

ippsFFTGetSize_R_16s

Use 16s->32f conversion and 32f flavor of FFT

ippsFFTGetSize_R_32f
ippsFFTGetSize_R_16s32s

Use 16s->32f conversion and 32f flavor of FFT -ippsFFTGetSize_R_32f
ippsFFTGetSize_R_32s

Use 32s->32f (or to 64f) conversion and 32f (64f)
flavor of FFT - ippsFFTGetSize_R_32f (64f)

ippsFFTInitAlloc_C_16s

ippsFFTGetSize+ippsMalloc+ippsFFTInit

ippsFFTInitAlloc_C_16sc

ippsFFTGetSize+ippsMalloc+ippsFFTInit

ippsFFTInitAlloc_C_32f

ippsFFTGetSize+ippsMalloc+ippsFFTInit

ippsFFTInitAlloc_C_32fc

ippsFFTGetSize+ippsMalloc+ippsFFTInit

ippsFFTInitAlloc_C_32s

ippsFFTGetSize+ippsMalloc+ippsFFTInit

ippsFFTInitAlloc_C_32sc

ippsFFTGetSize+ippsMalloc+ippsFFTInit

ippsFFTInitAlloc_C_64f

ippsFFTGetSize+ippsMalloc+ippsFFTInit

ippsFFTInitAlloc_C_64fc

ippsFFTGetSize+ippsMalloc+ippsFFTInit

ippsFFTInitAlloc_R_16s

ippsFFTGetSize+ippsMalloc+ippsFFTInit

ippsFFTInitAlloc_R_16s32s

ippsFFTGetSize+ippsMalloc+ippsFFTInit

ippsFFTInitAlloc_R_32f

ippsFFTGetSize+ippsMalloc+ippsFFTInit

ippsFFTInitAlloc_R_32s

ippsFFTGetSize+ippsMalloc+ippsFFTInit

ippsFFTInitAlloc_R_64f

ippsFFTGetSize+ippsMalloc+ippsFFTInit

ippsFFTInit_C_16s

Use 16s->32f conversion and 32f flavor of FFT -ippsFFTInit_C_32f
ippsFFTInit_C_16sc

Use 16s->32f conversion and 32f flavor of FFT -ippsFFTInit_C_32fc
ippsFFTInit_C_32s

Use 32s->32f (or to 64f) conversion and 32f (64f)
flavor of FFT - ippsFFTInit_C_32f (64f)

561

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippsFFTInit_C_32sc

Use 32s->32f (or to 64f) conversion and 32f (64f)
flavor of FFT - ippsFFTInit_C_32fc (64fc)

ippsFFTInit_R_16s

Use 16s->32f conversion and 32f flavor of FFT

ippsFFTInit_R_32f
ippsFFTInit_R_16s32s

Use 16s->32f conversion and 32f flavor of FFT -ippsFFTInit_R_32f
ippsFFTInit_R_32s

Use 32s->32f (or to 64f) conversion and 32f (64f)
flavor of FFT - ippsFFTInit_R_32f (64f)

ippsFFTInv_CCSToR_16s_ISfs

ippsFFTInv_CCSToR_32f_I

ippsFFTInv_CCSToR_16s_Sfs

ippsFFTInv_CCSToR_32f

ippsFFTInv_CCSToR_32s16s_Sfs

ippsFFTInv_CCSToR_32f

ippsFFTInv_CCSToR_32s_ISfs

ippsFFTInv_CCSToR_64f_I

ippsFFTInv_CCSToR_32s_Sfs

ippsFFTInv_CCSToR_64f

ippsFFTInv_CToC_16s_ISfs

ippsFFTInv_CToC_32f_I

ippsFFTInv_CToC_16s_Sfs

ippsFFTInv_CToC_32f

ippsFFTInv_CToC_16sc_ISfs

ippsFFTInv_CToC_32fc_I

ippsFFTInv_CToC_16sc_Sfs

ippsFFTInv_CToC_32fc

ippsFFTInv_CToC_32s_ISfs

ippsFFTInv_CToC_64f_I

ippsFFTInv_CToC_32s_Sfs

ippsFFTInv_CToC_64f

ippsFFTInv_CToC_32sc_ISfs

ippsFFTInv_CToC_64fc_I

ippsFFTInv_CToC_32sc_Sfs

ippsFFTInv_CToC_64fc

ippsFFTInv_PackToR_16s_ISfs

ippsFFTInv_PackToR_32f_I

ippsFFTInv_PackToR_16s_Sfs

ippsFFTInv_PackToR_32f

ippsFFTInv_PackToR_32s_ISfs

ippsFFTInv_PackToR_64f_I

ippsFFTInv_PackToR_32s_Sfs

ippsFFTInv_PackToR_64f

ippsFFTInv_PermToR_16s_ISfs

ippsFFTInv_PermToR_32f_I

ippsFFTInv_PermToR_16s_Sfs

ippsFFTInv_PermToR_32f

ippsFFTInv_PermToR_32s_ISfs

ippsFFTInv_PermToR_64f_I

ippsFFTInv_PermToR_32s_Sfs

ippsFFTInv_PermToR_64f

ippsFIR32f_16s_ISfs

Use new FIRSR and FIRMR APIs

ippsFIR32f_16s_Sfs

Use new FIRSR and FIRMR APIs

ippsFIR32f_Direct_16s_ISfs

Use new FIRSR and FIRMR APIs562

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippsFIR32f_Direct_16s_Sfs

Use new FIRSR and FIRMR APIs

ippsFIR32fc_16sc_ISfs

Use new FIRSR and FIRMR APIs

ippsFIR32fc_16sc_Sfs

Use new FIRSR and FIRMR APIs

ippsFIR32fc_Direct_16sc_ISfs

Use new FIRSR and FIRMR APIs

ippsFIR32fc_Direct_16sc_Sfs

Use new FIRSR and FIRMR APIs

ippsFIR32s_16s_ISfs

Use new FIRSR and FIRMR APIs

ippsFIR32s_16s_Sfs

Use new FIRSR and FIRMR APIs

ippsFIR32s_Direct_16s_ISfs

Use new FIRSR and FIRMR APIs

ippsFIR32s_Direct_16s_Sfs

Use new FIRSR and FIRMR APIs

ippsFIR32sc_16sc_ISfs

Use new FIRSR and FIRMR APIs

ippsFIR32sc_16sc_Sfs

Use new FIRSR and FIRMR APIs

ippsFIR32sc_Direct_16sc_ISfs

Use new FIRSR and FIRMR APIs

ippsFIR32sc_Direct_16sc_Sfs

Use new FIRSR and FIRMR APIs

ippsFIR64f_16s_ISfs

Use new FIRSR and FIRMR APIs

ippsFIR64f_16s_Sfs

Use new FIRSR and FIRMR APIs

ippsFIR64f_32f

Use new FIRSR and FIRMR APIs

ippsFIR64f_32f_I

Use new FIRSR and FIRMR APIs

ippsFIR64f_32s_ISfs

Use new FIRSR and FIRMR APIs

ippsFIR64f_32s_Sfs

Use new FIRSR and FIRMR APIs

ippsFIR64f_Direct_16s_ISfs

Use new FIRSR and FIRMR APIs

ippsFIR64f_Direct_16s_Sfs

Use new FIRSR and FIRMR APIs

ippsFIR64f_Direct_32f

Use new FIRSR and FIRMR APIs

ippsFIR64f_Direct_32f_I

Use new FIRSR and FIRMR APIs

ippsFIR64f_Direct_32s_ISfs

Use new FIRSR and FIRMR APIs

ippsFIR64f_Direct_32s_Sfs

Use new FIRSR and FIRMR APIs

ippsFIR64fc_16sc_ISfs

Use new FIRSR and FIRMR APIs

ippsFIR64fc_16sc_Sfs

Use new FIRSR and FIRMR APIs

ippsFIR64fc_32fc

Use new FIRSR and FIRMR APIs

ippsFIR64fc_32fc_I

Use new FIRSR and FIRMR APIs

ippsFIR64fc_32sc_ISfs

Use new FIRSR and FIRMR APIs

ippsFIR64fc_32sc_Sfs

Use new FIRSR and FIRMR APIs

1

563

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippsFIR64fc_Direct_16sc_ISfs

Use new FIRSR and FIRMR APIs

ippsFIR64fc_Direct_16sc_Sfs

Use new FIRSR and FIRMR APIs

ippsFIR64fc_Direct_32fc

Use new FIRSR and FIRMR APIs

ippsFIR64fc_Direct_32fc_I

Use new FIRSR and FIRMR APIs

ippsFIR64fc_Direct_32sc_ISfs

Use new FIRSR and FIRMR APIs

ippsFIR64fc_Direct_32sc_Sfs

Use new FIRSR and FIRMR APIs

ippsFIRFree32f_16s

Use new FIRSR and FIRMR APIs

ippsFIRFree32fc_16sc

Use new FIRSR and FIRMR APIs

ippsFIRFree32s_16s

Use new FIRSR and FIRMR APIs

ippsFIRFree32sc_16sc

Use new FIRSR and FIRMR APIs

ippsFIRFree64f_16s

Use new FIRSR and FIRMR APIs

ippsFIRFree64f_32f

Use new FIRSR and FIRMR APIs

ippsFIRFree64f_32s

Use new FIRSR and FIRMR APIs

ippsFIRFree64fc_16sc

Use new FIRSR and FIRMR APIs

ippsFIRFree64fc_32fc

Use new FIRSR and FIRMR APIs

ippsFIRFree64fc_32sc

Use new FIRSR and FIRMR APIs

ippsFIRFree_16s

Use new FIRSR and FIRMR APIs

ippsFIRFree_32f

Use new FIRSR and FIRMR APIs

ippsFIRFree_32fc

Use new FIRSR and FIRMR APIs

ippsFIRFree_32s

Use new FIRSR and FIRMR APIs

ippsFIRFree_64f

Use new FIRSR and FIRMR APIs

ippsFIRFree_64fc

Use new FIRSR and FIRMR APIs

ippsFIRGetDlyLine32f_16s

Use new FIRSR and FIRMR APIs

ippsFIRGetDlyLine32fc_16sc

Use new FIRSR and FIRMR APIs

ippsFIRGetDlyLine32s_16s

Use new FIRSR and FIRMR APIs

ippsFIRGetDlyLine32sc_16sc

Use new FIRSR and FIRMR APIs

ippsFIRGetDlyLine64f_16s

Use new FIRSR and FIRMR APIs

ippsFIRGetDlyLine64f_32f

Use new FIRSR and FIRMR APIs

ippsFIRGetDlyLine64f_32s

Use new FIRSR and FIRMR APIs

ippsFIRGetDlyLine64fc_16sc

Use new FIRSR and FIRMR APIs

ippsFIRGetDlyLine64fc_32fc

Use new FIRSR and FIRMR APIs

564

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippsFIRGetDlyLine64fc_32sc

Use new FIRSR and FIRMR APIs

ippsFIRGetDlyLine_16s

Use new FIRSR and FIRMR APIs

ippsFIRGetDlyLine_32f

Use new FIRSR and FIRMR APIs

ippsFIRGetDlyLine_32fc

Use new FIRSR and FIRMR APIs

ippsFIRGetDlyLine_64f

Use new FIRSR and FIRMR APIs

ippsFIRGetDlyLine_64fc

Use new FIRSR and FIRMR APIs

ippsFIRGetStateSize32f_16s

Use new FIRSR and FIRMR APIs

ippsFIRGetStateSize32fc_16sc

Use new FIRSR and FIRMR APIs

ippsFIRGetStateSize32s_16s

Use new FIRSR and FIRMR APIs

ippsFIRGetStateSize32s_16s32f

Use new FIRSR and FIRMR APIs

ippsFIRGetStateSize32sc_16sc

Use new FIRSR and FIRMR APIs

ippsFIRGetStateSize32sc_16sc32fc

Use new FIRSR and FIRMR APIs

ippsFIRGetStateSize64f_16s

Use new FIRSR and FIRMR APIs

ippsFIRGetStateSize64f_32f

Use new FIRSR and FIRMR APIs

ippsFIRGetStateSize64f_32s

Use new FIRSR and FIRMR APIs

ippsFIRGetStateSize64fc_16sc

Use new FIRSR and FIRMR APIs

ippsFIRGetStateSize64fc_32fc

Use new FIRSR and FIRMR APIs

ippsFIRGetStateSize64fc_32sc

Use new FIRSR and FIRMR APIs

ippsFIRGetStateSize_16s

Use new FIRSR and FIRMR APIs

ippsFIRGetStateSize_32f

Use new FIRSR and FIRMR APIs

ippsFIRGetStateSize_32fc

Use new FIRSR and FIRMR APIs

ippsFIRGetStateSize_32s

Use new FIRSR and FIRMR APIs

ippsFIRGetStateSize_64f

Use new FIRSR and FIRMR APIs

ippsFIRGetStateSize_64fc

Use new FIRSR and FIRMR APIs

ippsFIRGetTaps32f_16s

Use new FIRSR and FIRMR APIs

ippsFIRGetTaps32fc_16sc

Use new FIRSR and FIRMR APIs

ippsFIRGetTaps32s_16s

Use new FIRSR and FIRMR APIs

ippsFIRGetTaps32s_16s32f

Use new FIRSR and FIRMR APIs

ippsFIRGetTaps32sc_16sc

Use new FIRSR and FIRMR APIs

ippsFIRGetTaps32sc_16sc32fc

Use new FIRSR and FIRMR APIs

ippsFIRGetTaps64f_16s

Use new FIRSR and FIRMR APIs

1

565

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippsFIRGetTaps64f_32f

Use new FIRSR and FIRMR APIs

ippsFIRGetTaps64f_32s

Use new FIRSR and FIRMR APIs

ippsFIRGetTaps64fc_16sc

Use new FIRSR and FIRMR APIs

ippsFIRGetTaps64fc_32fc

Use new FIRSR and FIRMR APIs

ippsFIRGetTaps64fc_32sc

Use new FIRSR and FIRMR APIs

ippsFIRGetTaps_16s

Use new FIRSR and FIRMR APIs

ippsFIRGetTaps_32f

Use new FIRSR and FIRMR APIs

ippsFIRGetTaps_32fc

Use new FIRSR and FIRMR APIs

ippsFIRGetTaps_32s

Use new FIRSR and FIRMR APIs

ippsFIRGetTaps_64f

Use new FIRSR and FIRMR APIs

ippsFIRGetTaps_64fc

Use new FIRSR and FIRMR APIs

ippsFIRInit32f_16s

Use new FIRSR and FIRMR APIs

ippsFIRInit32fc_16sc

Use new FIRSR and FIRMR APIs

ippsFIRInit32s_16s

Use new FIRSR and FIRMR APIs

ippsFIRInit32s_16s32f

Use new FIRSR and FIRMR APIs

ippsFIRInit32sc_16sc

Use new FIRSR and FIRMR APIs

ippsFIRInit32sc_16sc32fc

Use new FIRSR and FIRMR APIs

ippsFIRInit64f_16s

Use new FIRSR and FIRMR APIs

ippsFIRInit64f_32f

Use new FIRSR and FIRMR APIs

ippsFIRInit64f_32s

Use new FIRSR and FIRMR APIs

ippsFIRInit64fc_16sc

Use new FIRSR and FIRMR APIs

ippsFIRInit64fc_32fc

Use new FIRSR and FIRMR APIs

ippsFIRInit64fc_32sc

Use new FIRSR and FIRMR APIs

ippsFIRInitAlloc32f_16s

Use new FIRSR and FIRMR APIs

ippsFIRInitAlloc32fc_16sc

Use new FIRSR and FIRMR APIs

ippsFIRInitAlloc32s_16s

Use new FIRSR and FIRMR APIs

ippsFIRInitAlloc32s_16s32f

Use new FIRSR and FIRMR APIs

ippsFIRInitAlloc32sc_16sc

Use new FIRSR and FIRMR APIs

ippsFIRInitAlloc32sc_16sc32fc

Use new FIRSR and FIRMR APIs

ippsFIRInitAlloc64f_16s

Use new FIRSR and FIRMR APIs

ippsFIRInitAlloc64f_32f

Use new FIRSR and FIRMR APIs

566

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippsFIRInitAlloc64f_32s

Use new FIRSR and FIRMR APIs

ippsFIRInitAlloc64fc_16sc

Use new FIRSR and FIRMR APIs

ippsFIRInitAlloc64fc_32fc

Use new FIRSR and FIRMR APIs

ippsFIRInitAlloc64fc_32sc

Use new FIRSR and FIRMR APIs

ippsFIRInitAlloc_16s

Use new FIRSR and FIRMR APIs

ippsFIRInitAlloc_32f

Use new FIRSR and FIRMR APIs

ippsFIRInitAlloc_32fc

Use new FIRSR and FIRMR APIs

ippsFIRInitAlloc_32s

Use new FIRSR and FIRMR APIs

ippsFIRInitAlloc_64f

Use new FIRSR and FIRMR APIs

ippsFIRInitAlloc_64fc

Use new FIRSR and FIRMR APIs

ippsFIRInit_16s

Use new FIRSR and FIRMR APIs

ippsFIRInit_32f

Use new FIRSR and FIRMR APIs

ippsFIRInit_32fc

Use new FIRSR and FIRMR APIs

ippsFIRInit_32s

Use new FIRSR and FIRMR APIs

ippsFIRInit_64f

Use new FIRSR and FIRMR APIs

ippsFIRInit_64fc

Use new FIRSR and FIRMR APIs

ippsFIRLMSFree32f_16s

ippsFreeippsFIRLMSFree_32f

ippsFreeippsFIRLMSInitAlloc32f_16s

FIRLMSGetSize+ippsMalloc+FIRLMSInit

ippsFIRLMSInitAlloc_32f

FIRLMSGetSize+ippsMalloc+FIRLMSInit

ippsFIRLMSMRFree32s_16s

N/A

ippsFIRLMSMRFree32sc_16sc

N/A

ippsFIRLMSMRGetDlyLine32s_16s

N/A

ippsFIRLMSMRGetDlyLine32sc_16sc

N/A

ippsFIRLMSMRGetDlyVal32s_16s

N/A

ippsFIRLMSMRGetDlyVal32sc_16sc

N/A

ippsFIRLMSMRGetTaps32s_16s

N/A

ippsFIRLMSMRGetTaps32sc_16sc

N/A

ippsFIRLMSMRGetTapsPointer32s_16s

N/A

ippsFIRLMSMRGetTapsPointer32sc_16sc

N/A

ippsFIRLMSMRInitAlloc32s_16s

N/A

1

567

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippsFIRLMSMRInitAlloc32sc_16sc

N/A

ippsFIRLMSMROne32s_16s

N/A

ippsFIRLMSMROne32sc_16sc

N/A

ippsFIRLMSMROneVal32s_16s

N/A

ippsFIRLMSMROneVal32sc_16sc

N/A

ippsFIRLMSMRPutVal32s_16s

N/A

ippsFIRLMSMRPutVal32sc_16sc

N/A

ippsFIRLMSMRSetDlyLine32s_16s

N/A

ippsFIRLMSMRSetDlyLine32sc_16sc

N/A

ippsFIRLMSMRSetMu32s_16s

N/A

ippsFIRLMSMRSetMu32sc_16sc

N/A

ippsFIRLMSMRSetTaps32s_16s

N/A

ippsFIRLMSMRSetTaps32sc_16sc

N/A

ippsFIRLMSMRUpdateTaps32s_16s

N/A

ippsFIRLMSMRUpdateTaps32sc_16sc

N/A

ippsFIRLMSOne_Direct32f_16s

Use new FIRSR and FIRMR APIs

ippsFIRLMSOne_DirectQ15_16s

Use new FIRSR and FIRMR APIs

ippsFIRLMSOne_Direct_32f

Use new FIRSR and FIRMR APIs

ippsFIRMR32f_Direct_16s_ISfs

Use new FIRSR and FIRMR APIs

ippsFIRMR32f_Direct_16s_Sfs

Use new FIRSR and FIRMR APIs

ippsFIRMR32fc_Direct_16sc_ISfs

Use new FIRSR and FIRMR APIs

ippsFIRMR32fc_Direct_16sc_Sfs

Use new FIRSR and FIRMR APIs

ippsFIRMR32s_Direct_16s_ISfs

Use new FIRSR and FIRMR APIs

ippsFIRMR32s_Direct_16s_Sfs

Use new FIRSR and FIRMR APIs

ippsFIRMR32sc_Direct_16sc_ISfs

Use new FIRSR and FIRMR APIs

ippsFIRMR32sc_Direct_16sc_Sfs

Use new FIRSR and FIRMR APIs

ippsFIRMR64f_Direct_16s_ISfs

Use new FIRSR and FIRMR APIs

ippsFIRMR64f_Direct_16s_Sfs

Use new FIRSR and FIRMR APIs

ippsFIRMR64f_Direct_32f

Use new FIRSR and FIRMR APIs

ippsFIRMR64f_Direct_32f_I

Use new FIRSR and FIRMR APIs

ippsFIRMR64f_Direct_32s_ISfs

Use new FIRSR and FIRMR APIs

568

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippsFIRMR64f_Direct_32s_Sfs

Use new FIRSR and FIRMR APIs

ippsFIRMR64fc_Direct_16sc_ISfs

Use new FIRSR and FIRMR APIs

ippsFIRMR64fc_Direct_16sc_Sfs

Use new FIRSR and FIRMR APIs

ippsFIRMR64fc_Direct_32fc

Use new FIRSR and FIRMR APIs

ippsFIRMR64fc_Direct_32fc_I

Use new FIRSR and FIRMR APIs

ippsFIRMR64fc_Direct_32sc_ISfs

Use new FIRSR and FIRMR APIs

ippsFIRMR64fc_Direct_32sc_Sfs

Use new FIRSR and FIRMR APIs

ippsFIRMRGetStateSize32f_16s

Use new FIRSR and FIRMR APIs

ippsFIRMRGetStateSize32fc_16sc

Use new FIRSR and FIRMR APIs

ippsFIRMRGetStateSize32s_16s

Use new FIRSR and FIRMR APIs

ippsFIRMRGetStateSize32s_16s32f

Use new FIRSR and FIRMR APIs

ippsFIRMRGetStateSize32sc_16sc

Use new FIRSR and FIRMR APIs

ippsFIRMRGetStateSize32sc_16sc32fc

Use new FIRSR and FIRMR APIs

ippsFIRMRGetStateSize64f_16s

Use new FIRSR and FIRMR APIs

ippsFIRMRGetStateSize64f_32f

Use new FIRSR and FIRMR APIs

ippsFIRMRGetStateSize64f_32s

Use new FIRSR and FIRMR APIs

ippsFIRMRGetStateSize64fc_16sc

Use new FIRSR and FIRMR APIs

ippsFIRMRGetStateSize64fc_32fc

Use new FIRSR and FIRMR APIs

ippsFIRMRGetStateSize64fc_32sc

Use new FIRSR and FIRMR APIs

ippsFIRMRGetStateSize_16s

Use new FIRSR and FIRMR APIs

ippsFIRMRGetStateSize_32f

Use new FIRSR and FIRMR APIs

ippsFIRMRGetStateSize_32fc

Use new FIRSR and FIRMR APIs

ippsFIRMRGetStateSize_64f

Use new FIRSR and FIRMR APIs

ippsFIRMRGetStateSize_64fc

Use new FIRSR and FIRMR APIs

ippsFIRMRInit32f_16s

Use new FIRSR and FIRMR APIs

ippsFIRMRInit32fc_16sc

Use new FIRSR and FIRMR APIs

ippsFIRMRInit32s_16s

Use new FIRSR and FIRMR APIs

ippsFIRMRInit32s_16s32f

Use new FIRSR and FIRMR APIs

ippsFIRMRInit32sc_16sc

Use new FIRSR and FIRMR APIs

ippsFIRMRInit32sc_16sc32fc

Use new FIRSR and FIRMR APIs

ippsFIRMRInit64f_16s

Use new FIRSR and FIRMR APIs

1

569

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippsFIRMRInit64f_32f

Use new FIRSR and FIRMR APIs

ippsFIRMRInit64f_32s

Use new FIRSR and FIRMR APIs

ippsFIRMRInit64fc_16sc

Use new FIRSR and FIRMR APIs

ippsFIRMRInit64fc_32fc

Use new FIRSR and FIRMR APIs

ippsFIRMRInit64fc_32sc

Use new FIRSR and FIRMR APIs

ippsFIRMRInitAlloc32f_16s

Use new FIRSR and FIRMR APIs

ippsFIRMRInitAlloc32fc_16sc

Use new FIRSR and FIRMR APIs

ippsFIRMRInitAlloc32s_16s

Use new FIRSR and FIRMR APIs

ippsFIRMRInitAlloc32s_16s32f

Use new FIRSR and FIRMR APIs

ippsFIRMRInitAlloc32sc_16sc

Use new FIRSR and FIRMR APIs

ippsFIRMRInitAlloc32sc_16sc32fc

Use new FIRSR and FIRMR APIs

ippsFIRMRInitAlloc64f_16s

Use new FIRSR and FIRMR APIs

ippsFIRMRInitAlloc64f_32f

Use new FIRSR and FIRMR APIs

ippsFIRMRInitAlloc64f_32s

Use new FIRSR and FIRMR APIs

ippsFIRMRInitAlloc64fc_16sc

Use new FIRSR and FIRMR APIs

ippsFIRMRInitAlloc64fc_32fc

Use new FIRSR and FIRMR APIs

ippsFIRMRInitAlloc64fc_32sc

Use new FIRSR and FIRMR APIs

ippsFIRMRInitAlloc_16s

Use new FIRSR and FIRMR APIs

ippsFIRMRInitAlloc_32f

Use new FIRSR and FIRMR APIs

ippsFIRMRInitAlloc_32fc

Use new FIRSR and FIRMR APIs

ippsFIRMRInitAlloc_64f

Use new FIRSR and FIRMR APIs

ippsFIRMRInitAlloc_64fc

Use new FIRSR and FIRMR APIs

ippsFIRMRInit_16s

Use new FIRSR and FIRMR APIs

ippsFIRMRInit_32f

Use new FIRSR and FIRMR APIs

ippsFIRMRInit_32fc

Use new FIRSR and FIRMR APIs

ippsFIRMRInit_64f

Use new FIRSR and FIRMR APIs

ippsFIRMRInit_64fc

Use new FIRSR and FIRMR APIs

ippsFIRMRStreamGetStateSize_16s

Use new FIRSR and FIRMR APIs

ippsFIRMRStreamGetStateSize_32f

Use new FIRSR and FIRMR APIs

ippsFIRMRStreamInitAlloc_16s

Use new FIRSR and FIRMR APIs

ippsFIRMRStreamInitAlloc_32f

Use new FIRSR and FIRMR APIs

570

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippsFIRMRStreamInit_16s

Use new FIRSR and FIRMR APIs

ippsFIRMRStreamInit_32f

Use new FIRSR and FIRMR APIs

ippsFIRMR_Direct_32f

Use new FIRSR and FIRMR APIs

ippsFIRMR_Direct_32f_I

Use new FIRSR and FIRMR APIs

ippsFIRMR_Direct_32fc

Use new FIRSR and FIRMR APIs

ippsFIRMR_Direct_32fc_I

Use new FIRSR and FIRMR APIs

ippsFIRMR_Direct_64f

Use new FIRSR and FIRMR APIs

ippsFIRMR_Direct_64f_I

Use new FIRSR and FIRMR APIs

ippsFIRMR_Direct_64fc

Use new FIRSR and FIRMR APIs

ippsFIRMR_Direct_64fc_I

Use new FIRSR and FIRMR APIs

ippsFIROne32f_16s_Sfs

Use new FIRSR and FIRMR APIs

ippsFIROne32f_Direct_16s_ISfs

Use new FIRSR and FIRMR APIs

ippsFIROne32f_Direct_16s_Sfs

Use new FIRSR and FIRMR APIs

ippsFIROne32fc_16sc_Sfs

Use new FIRSR and FIRMR APIs

ippsFIROne32fc_Direct_16sc_ISfs

Use new FIRSR and FIRMR APIs

ippsFIROne32fc_Direct_16sc_Sfs

Use new FIRSR and FIRMR APIs

ippsFIROne32s_16s_Sfs

Use new FIRSR and FIRMR APIs

ippsFIROne32s_Direct_16s_ISfs

Use new FIRSR and FIRMR APIs

ippsFIROne32s_Direct_16s_Sfs

Use new FIRSR and FIRMR APIs

ippsFIROne32sc_16sc_Sfs

Use new FIRSR and FIRMR APIs

ippsFIROne32sc_Direct_16sc_ISfs

Use new FIRSR and FIRMR APIs

ippsFIROne32sc_Direct_16sc_Sfs

Use new FIRSR and FIRMR APIs

ippsFIROne64f_16s_Sfs

Use new FIRSR and FIRMR APIs

ippsFIROne64f_32f

Use new FIRSR and FIRMR APIs

ippsFIROne64f_32s_Sfs

Use new FIRSR and FIRMR APIs

ippsFIROne64f_Direct_16s_ISfs

Use new FIRSR and FIRMR APIs

ippsFIROne64f_Direct_16s_Sfs

Use new FIRSR and FIRMR APIs

ippsFIROne64f_Direct_32f

Use new FIRSR and FIRMR APIs

ippsFIROne64f_Direct_32f_I

Use new FIRSR and FIRMR APIs

ippsFIROne64f_Direct_32s_ISfs

Use new FIRSR and FIRMR APIs

ippsFIROne64f_Direct_32s_Sfs

Use new FIRSR and FIRMR APIs

1

571

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippsFIROne64fc_16sc_Sfs

Use new FIRSR and FIRMR APIs

ippsFIROne64fc_32fc

Use new FIRSR and FIRMR APIs

ippsFIROne64fc_32sc_Sfs

Use new FIRSR and FIRMR APIs

ippsFIROne64fc_Direct_16sc_ISfs

Use new FIRSR and FIRMR APIs

ippsFIROne64fc_Direct_16sc_Sfs

Use new FIRSR and FIRMR APIs

ippsFIROne64fc_Direct_32fc

Use new FIRSR and FIRMR APIs

ippsFIROne64fc_Direct_32fc_I

Use new FIRSR and FIRMR APIs

ippsFIROne64fc_Direct_32sc_ISfs

Use new FIRSR and FIRMR APIs

ippsFIROne64fc_Direct_32sc_Sfs

Use new FIRSR and FIRMR APIs

ippsFIROne_16s_Sfs

Use new FIRSR and FIRMR APIs

ippsFIROne_32f

Use new FIRSR and FIRMR APIs

ippsFIROne_32fc

Use new FIRSR and FIRMR APIs

ippsFIROne_32s_Sfs

Use new FIRSR and FIRMR APIs

ippsFIROne_64f

Use new FIRSR and FIRMR APIs

ippsFIROne_64fc

Use new FIRSR and FIRMR APIs

ippsFIROne_Direct_16s_ISfs

Use new FIRSR and FIRMR APIs

ippsFIROne_Direct_16s_Sfs

Use new FIRSR and FIRMR APIs

ippsFIROne_Direct_32f

Use new FIRSR and FIRMR APIs

ippsFIROne_Direct_32f_I

Use new FIRSR and FIRMR APIs

ippsFIROne_Direct_32fc

Use new FIRSR and FIRMR APIs

ippsFIROne_Direct_32fc_I

Use new FIRSR and FIRMR APIs

ippsFIROne_Direct_64f

Use new FIRSR and FIRMR APIs

ippsFIROne_Direct_64f_I

Use new FIRSR and FIRMR APIs

ippsFIROne_Direct_64fc

Use new FIRSR and FIRMR APIs

ippsFIROne_Direct_64fc_I

Use new FIRSR and FIRMR APIs

ippsFIRSetDlyLine32f_16s

Use new FIRSR and FIRMR APIs

ippsFIRSetDlyLine32fc_16sc

Use new FIRSR and FIRMR APIs

ippsFIRSetDlyLine32s_16s

Use new FIRSR and FIRMR APIs

ippsFIRSetDlyLine32sc_16sc

Use new FIRSR and FIRMR APIs

ippsFIRSetDlyLine64f_16s

Use new FIRSR and FIRMR APIs

ippsFIRSetDlyLine64f_32f

Use new FIRSR and FIRMR APIs572

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippsFIRSetDlyLine64f_32s

Use new FIRSR and FIRMR APIs

ippsFIRSetDlyLine64fc_16sc

Use new FIRSR and FIRMR APIs

ippsFIRSetDlyLine64fc_32fc

Use new FIRSR and FIRMR APIs

ippsFIRSetDlyLine64fc_32sc

Use new FIRSR and FIRMR APIs

ippsFIRSetDlyLine_16s

Use new FIRSR and FIRMR APIs

ippsFIRSetDlyLine_32f

Use new FIRSR and FIRMR APIs

ippsFIRSetDlyLine_32fc

Use new FIRSR and FIRMR APIs

ippsFIRSetDlyLine_64f

Use new FIRSR and FIRMR APIs

ippsFIRSetDlyLine_64fc

Use new FIRSR and FIRMR APIs

ippsFIRSetTaps32f_16s

Use new FIRSR and FIRMR APIs

ippsFIRSetTaps32fc_16sc

Use new FIRSR and FIRMR APIs

ippsFIRSetTaps32s_16s

Use new FIRSR and FIRMR APIs

ippsFIRSetTaps32s_16s32f

Use new FIRSR and FIRMR APIs

ippsFIRSetTaps32sc_16sc

Use new FIRSR and FIRMR APIs

ippsFIRSetTaps32sc_16sc32fc

Use new FIRSR and FIRMR APIs

ippsFIRSetTaps64f_16s

Use new FIRSR and FIRMR APIs

ippsFIRSetTaps64f_32f

Use new FIRSR and FIRMR APIs

ippsFIRSetTaps64f_32s

Use new FIRSR and FIRMR APIs

ippsFIRSetTaps64fc_16sc

Use new FIRSR and FIRMR APIs

ippsFIRSetTaps64fc_32fc

Use new FIRSR and FIRMR APIs

ippsFIRSetTaps64fc_32sc

Use new FIRSR and FIRMR APIs

ippsFIRSetTaps_16s

Use new FIRSR and FIRMR APIs

ippsFIRSetTaps_32f

Use new FIRSR and FIRMR APIs

ippsFIRSetTaps_32fc

Use new FIRSR and FIRMR APIs

ippsFIRSetTaps_32s

Use new FIRSR and FIRMR APIs

ippsFIRSetTaps_64f

Use new FIRSR and FIRMR APIs

ippsFIRSetTaps_64fc

Use new FIRSR and FIRMR APIs

ippsFIRStreamGetStateSize_16s

Use new FIRSR and FIRMR APIs

ippsFIRStreamGetStateSize_32f

Use new FIRSR and FIRMR APIs

ippsFIRStreamInitAlloc_16s

Use new FIRSR and FIRMR APIs

ippsFIRStreamInitAlloc_32f

Use new FIRSR and FIRMR APIs

1

573

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippsFIRStreamInit_16s

Use new FIRSR and FIRMR APIs

ippsFIRStreamInit_32f

Use new FIRSR and FIRMR APIs

ippsFIR_16s_ISfs

Use new FIRSR and FIRMR APIs

ippsFIR_16s_Sfs

Use new FIRSR and FIRMR APIs

ippsFIR_32f

Use new FIRSR and FIRMR APIs

ippsFIR_32f_I

Use new FIRSR and FIRMR APIs

ippsFIR_32fc

Use new FIRSR and FIRMR APIs

ippsFIR_32fc_I

Use new FIRSR and FIRMR APIs

ippsFIR_32s_ISfs

Use new FIRSR and FIRMR APIs

ippsFIR_32s_Sfs

Use new FIRSR and FIRMR APIs

ippsFIR_64f

Use new FIRSR and FIRMR APIs

ippsFIR_64f_I

Use new FIRSR and FIRMR APIs

ippsFIR_64fc

Use new FIRSR and FIRMR APIs

ippsFIR_64fc_I

Use new FIRSR and FIRMR APIs

ippsFIR_Direct_16s_ISfs

Use new FIRSR and FIRMR APIs

ippsFIR_Direct_16s_Sfs

Use new FIRSR and FIRMR APIs

ippsFIR_Direct_32f

Use new FIRSR and FIRMR APIs

ippsFIR_Direct_32f_I

Use new FIRSR and FIRMR APIs

ippsFIR_Direct_32fc

Use new FIRSR and FIRMR APIs

ippsFIR_Direct_32fc_I

Use new FIRSR and FIRMR APIs

ippsFIR_Direct_64f

Use new FIRSR and FIRMR APIs

ippsFIR_Direct_64f_I

Use new FIRSR and FIRMR APIs

ippsFIR_Direct_64fc

Use new FIRSR and FIRMR APIs

ippsFIR_Direct_64fc_I

Use new FIRSR and FIRMR APIs

ippsGetVarPointDV_16sc

N/A

ippsGoertzQ15_16sc_Sfs

Q15 is not supported anymore - use 32f or 16s
data types

ippsGoertzTwoQ15_16sc_Sfs

Q15 is not supported anymore - use 32f or 16s
data types

ippsGoertzTwo_16sc_Sfs

2xippsGoertz_16sc_Sfs

ippsGoertzTwo_32f2xippsGoertz_32f

ippsGoertzTwo_32fc

2xippsGoertz_32fc

574

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippsGoertzTwo_64f2xippsGoertz_64f

ippsGoertzTwo_64fc

2xippsGoertz_64fc

ippsHilbertFree_16s16sc

ippsFreeippsHilbertFree_16s32fc

ippsFreeippsHilbertFree_32f32fc

ippsFreeippsHilbertInitAlloc_16s16sc

Use ippsHilbertGetSize+ippsMalloc+ippsHilbertInit for 32f data typeippsHilbertInitAlloc_16s32fc

Use ippsHilbertGetSize+ippsMalloc+ippsHilbertInit for 32f data typeippsHilbertInitAlloc_32f32fc

Use ippsHilbertGetSize+ippsMalloc+ippsHilbertInit

ippsHilbert_16s16sc_Sfs

Use ippsConvert_16s32f+ippsHilbert_32f32fc

ippsHilbert_16s32fc

Use ippsConvert_16s32f+ippsHilbert_32f32fc

ippsIIR32s_16s_ISfs

Use IIR with 32f taps

ippsIIR32s_16s_Sfs

Use IIR with 32f taps

ippsIIR32sc_16sc_ISfs

Use IIR with 32f taps

ippsIIR32sc_16sc_Sfs

Use IIR with 32f taps

ippsIIRFree32f_16s

ippsFreeippsIIRFree32fc_16sc

ippsFreeippsIIRFree32s_16s

ippsFreeippsIIRFree32sc_16sc

ippsFreeippsIIRFree64f_16s

ippsFreeippsIIRFree64f_32f

ippsFreeippsIIRFree64f_32s

ippsFreeippsIIRFree64fc_16sc

ippsFreeippsIIRFree64fc_32fc

ippsFreeippsIIRFree64fc_32sc

ippsFreeippsIIRFree_32f

ippsFreeippsIIRFree_32fc

ippsFreeippsIIRFree_64f

ippsFree

1

575

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippsIIRFree_64fc

ippsFreeippsIIRGetDlyLine32s_16s

Use IIR with 32f taps

ippsIIRGetDlyLine32sc_16sc

Use IIR with 32f taps

ippsIIRGetStateSize32s_16s

Use IIR with 32f taps

ippsIIRGetStateSize32s_16s32f

Use IIR with 32f taps

ippsIIRGetStateSize32s_BiQuad_16s

Use IIR with 32f taps

ippsIIRGetStateSize32s_BiQuad_16s32f

Use IIR with 32f taps

ippsIIRGetStateSize32sc_16sc

Use IIR with 32f taps

ippsIIRGetStateSize32sc_16sc32fc

Use IIR with 32f taps

ippsIIRGetStateSize32sc_BiQuad_16sc

Use IIR with 32f taps

ippsIIRGetStateSize32sc_BiQuad_16sc32fc

Use IIR with 32f taps

ippsIIRInit32s_16s

Use IIR with 32f taps

ippsIIRInit32s_16s32f

Use IIR with 32f taps

ippsIIRInit32s_BiQuad_16s

Use IIR with 32f taps

ippsIIRInit32s_BiQuad_16s32f

Use IIR with 32f taps

ippsIIRInit32sc_16sc

Use IIR with 32f taps

ippsIIRInit32sc_16sc32fc

Use IIR with 32f taps

ippsIIRInit32sc_BiQuad_16sc

Use IIR with 32f taps

ippsIIRInit32sc_BiQuad_16sc32fc

Use IIR with 32f taps

ippsIIRInitAlloc32f_16s

ippsIIRGetSize+ippsMalloc+ippsIIRInit

ippsIIRInitAlloc32f_BiQuad_16s

ippsIIRGetSize+ippsMalloc+ippsIIRInit

ippsIIRInitAlloc32fc_16sc

ippsIIRGetSize+ippsMalloc+ippsIIRInit

ippsIIRInitAlloc32fc_BiQuad_16sc

ippsIIRGetSize+ippsMalloc+ippsIIRInit

ippsIIRInitAlloc32s_16s

Use ippsIIRGetSize+ippsMalloc+ippsIIRInit
for 32f taps

ippsIIRInitAlloc32s_16s32f

Use ippsIIRGetSize+ippsMalloc+ippsIIRInit
for 32f taps

ippsIIRInitAlloc32s_BiQuad_16s

Use ippsIIRGetSize+ippsMalloc+ippsIIRInit
for 32f taps

ippsIIRInitAlloc32s_BiQuad_16s32f

Use ippsIIRGetSize+ippsMalloc+ippsIIRInit
for 32f taps

ippsIIRInitAlloc32sc_16sc

Use ippsIIRGetSize+ippsMalloc+ippsIIRInit
for 32f taps

576

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippsIIRInitAlloc32sc_16sc32fc

Use ippsIIRGetSize+ippsMalloc+ippsIIRInit
for 32f taps

ippsIIRInitAlloc32sc_BiQuad_16sc

Use ippsIIRGetSize+ippsMalloc+ippsIIRInit
for 32f taps

ippsIIRInitAlloc32sc_BiQuad_16sc32fc

Use ippsIIRGetSize+ippsMalloc+ippsIIRInit
for 32f taps

ippsIIRInitAlloc64f_16s

ippsIIRGetSize+ippsMalloc+ippsIIRInit

ippsIIRInitAlloc64f_32f

ippsIIRGetSize+ippsMalloc+ippsIIRInit

ippsIIRInitAlloc64f_32s

ippsIIRGetSize+ippsMalloc+ippsIIRInit

ippsIIRInitAlloc64f_BiQuad_16s

ippsIIRGetSize+ippsMalloc+ippsIIRInit

ippsIIRInitAlloc64f_BiQuad_32f

ippsIIRGetSize+ippsMalloc+ippsIIRInit

ippsIIRInitAlloc64f_BiQuad_32s

ippsIIRGetSize+ippsMalloc+ippsIIRInit

ippsIIRInitAlloc64f_BiQuad_DF1_32s

ippsIIRGetSize+ippsMalloc+ippsIIRInit

ippsIIRInitAlloc64fc_16sc

ippsIIRGetSize+ippsMalloc+ippsIIRInit

ippsIIRInitAlloc64fc_32fc

ippsIIRGetSize+ippsMalloc+ippsIIRInit

ippsIIRInitAlloc64fc_32sc

ippsIIRGetSize+ippsMalloc+ippsIIRInit

ippsIIRInitAlloc64fc_BiQuad_16sc

ippsIIRGetSize+ippsMalloc+ippsIIRInit

ippsIIRInitAlloc64fc_BiQuad_32fc

ippsIIRGetSize+ippsMalloc+ippsIIRInit

ippsIIRInitAlloc64fc_BiQuad_32sc

ippsIIRGetSize+ippsMalloc+ippsIIRInit

ippsIIRInitAlloc_32f

ippsIIRGetSize+ippsMalloc+ippsIIRInit

ippsIIRInitAlloc_32fc

ippsIIRGetSize+ippsMalloc+ippsIIRInit

ippsIIRInitAlloc_64f

ippsIIRGetSize+ippsMalloc+ippsIIRInit

ippsIIRInitAlloc_64fc

ippsIIRGetSize+ippsMalloc+ippsIIRInit

ippsIIRInitAlloc_BiQuad_32f

ippsIIRGetSize+ippsMalloc+ippsIIRInit

ippsIIRInitAlloc_BiQuad_32fc

ippsIIRGetSize+ippsMalloc+ippsIIRInit

ippsIIRInitAlloc_BiQuad_64f

ippsIIRGetSize+ippsMalloc+ippsIIRInit

ippsIIRInitAlloc_BiQuad_64fc

ippsIIRGetSize+ippsMalloc+ippsIIRInit

ippsIIRInitAlloc_BiQuad_DF1_32f

ippsIIRGetSize+ippsMalloc+ippsIIRInit

ippsIIROne32f_16s_Sfs

ippsIIR32f_16s_Sfs

ippsIIROne32fc_16sc_Sfs

ippsIIR32fc_16sc_Sfs

ippsIIROne32s_16s_Sfs

Use IIR with 32f taps

577

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippsIIROne32sc_16sc_Sfs

Use IIR with 32f taps

ippsIIROne64f_16s_Sfs

ippsIIR64f_16s_Sfs

ippsIIROne64f_32f

ippsIIR64f_32f

ippsIIROne64f_32s_Sfs

ippsIIR64f_32s_Sfs

ippsIIROne64fc_16sc_Sfs

ippsIIR64fc_16sc_Sfs

ippsIIROne64fc_32fc

ippsIIR64fc_32fc

ippsIIROne64fc_32sc_Sfs

ippsIIR64fc_32sc_Sfs

ippsIIROne_32f

ippsIIR_32f

ippsIIROne_32fc

ippsIIR_32fc

ippsIIROne_64f

ippsIIR_64f

ippsIIROne_64fc

ippsIIR_64fc

ippsIIROne_BiQuadDirect_16s

Use IIR with 32f taps

ippsIIROne_BiQuadDirect_16s_I

Use IIR with 32f taps

ippsIIROne_Direct_16s

Use IIR with 32f taps

ippsIIROne_Direct_16s_I

Use IIR with 32f taps

ippsIIRSetDlyLine32s_16s

Use IIR with 32f taps

ippsIIRSetDlyLine32sc_16sc

Use IIR with 32f taps

ippsIIRSetTaps32f_16s

Set new taps with ippsIIRInit function

ippsIIRSetTaps32fc_16sc

Set new taps with ippsIIRInit function

ippsIIRSetTaps32s_16s

Set new taps with ippsIIRInit function

ippsIIRSetTaps32s_16s32f

Set new taps with ippsIIRInit function

ippsIIRSetTaps32sc_16sc

Set new taps with ippsIIRInit function

ippsIIRSetTaps32sc_16sc32fc

Set new taps with ippsIIRInit function

ippsIIRSetTaps64f_16s

Set new taps with ippsIIRInit function

ippsIIRSetTaps64f_32f

Set new taps with ippsIIRInit function

ippsIIRSetTaps64f_32s

Set new taps with ippsIIRInit function

ippsIIRSetTaps64fc_16sc

Set new taps with ippsIIRInit function

ippsIIRSetTaps64fc_32fc

Set new taps with ippsIIRInit function

ippsIIRSetTaps64fc_32sc

Set new taps with ippsIIRInit function

ippsIIRSetTaps_32f

Set new taps with ippsIIRInit function578

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Removed from 9.0

Substitution or WorkaroundippsIIRSetTaps_32fc

Set new taps with ippsIIRInit function

ippsIIRSetTaps_64f

Set new taps with ippsIIRInit function

ippsIIRSetTaps_64fc

Set new taps with ippsIIRInit function

ippsIIR_BiQuadDirect_16s

Use IIR with 32f taps

ippsIIR_BiQuadDirect_16s_I

Use IIR with 32f taps

ippsIIR_Direct_16s

Use IIR with 32f taps

ippsIIR_Direct_16s_I

Use IIR with 32f taps

ippsJoinScaled_32f16s_D2L

Use simple C-loop and Intel compiler

ippsJoinScaled_32f24s_D2L

Use simple C-loop and Intel compiler

ippsLinToALaw_16s8u

Use any open-source g711 implementation

ippsLinToALaw_32f8u

Use any open-source g711 implementation

ippsLinToMuLaw_16s8u

Use any open-source g711 implementation

ippsLinToMuLaw_32f8u

Use any open-source g711 implementation

ippsLn_32s16s_Sfs

Use ippsLn32s_Sfs and ippsConvert_32s16s

ippsLn_64f32f

Use ippsLn_64f and ippsConvert_64f32f

ippsMagSquared_32fc64f

Use ippsConvert_32f64f+ippsPowerSpectr_64fc

ippsMagSquared_32sc32s_Sfs

Use ippsConvert_32s32f+ippsPowerSpectr_32fc

ippsMuLawToALaw_8u

Use any open-source g711 implementation

ippsMuLawToLin_8u16s

Use any open-source g711 implementation

ippsMuLawToLin_8u32f

Use any open-source g711 implementation

ippsMulPack_16s_ISfs

ippsMulPack_32f_I

ippsMulPack_16s_Sfs

ippsMulPack_32f

ippsMulPerm_16s_ISfs

ippsMulPerm_32f_I

ippsMulPerm_16s_Sfs

ippsMulPerm_32f

ippsMul_32s32sc_ISfs

Use simple C-loop and Intel compiler, or convert tosupported data type and use another flavor of Mul
function

ippsMul_32s32sc_Sfs

Use simple C-loop and Intel compiler, or convert tosupported data type and use another flavor of Mul
function579

1Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippsMul_Low_32s_Sfs

Use simple C-loop and Intel compiler, or convert tosupported data type and use another flavor of Mul
function

ippsPackBits_32u8u

N/A

ippsPhase_32sc_Sfs

Use ippsConvert_32s32f+ippsPhase_32fc

ippsPolarToCart_16sc

ippsConvert_16s32f+ippsPolarToCart_32fc

ippsPolarToCart_32sc

ippsConvert_32s32f+ippsPolarToCart_32fc

ippsPreemphasize_16s

Use simple C-loop and Intel compiler

ippsPreemphasize_32f

Use simple C-loop and Intel compiler

ippsRandGaussFree_16s

ippsFreeippsRandGaussFree_32f

ippsFreeippsRandGaussFree_8u

ippsFreeippsRandGaussInitAlloc_16s

ippsRandGaussGetSize_16s+ippsMalloc_8u+ippsRandGaussInit_16s

ippsRandGaussInitAlloc_32f

ippsRandGaussGetSize_32f+ippsMalloc_8u+ippsRandGaussInit_32f

ippsRandGaussInitAlloc_8u

ippsRandGaussGetSize_8u+ippsMalloc_8u+ippsRandGaussInit_8u

ippsRandGauss_Direct_16s

ippsRandGauss_16sippsRandGauss_Direct_32f

ippsRandGauss_32f

ippsRandGauss_Direct_64f

ippsRandGauss_32f+ippsConvert_32f64f

ippsRandUniformFree_16s

ippsFreeippsRandUniformFree_32f

ippsFreeippsRandUniformFree_8u

ippsFreeippsRandUniformInitAlloc_16s

ippsRandUniformGetSize_16s+ippsMalloc_8u+ippsRandUniformInit_16s

ippsRandUniformInitAlloc_32f

ippsRandUniformGetSize_32f+ippsMalloc_8u+ippsRandUniformInit_32f

ippsRandUniformInitAlloc_8u

ippsRandUniformGetSize_8u+ippsMalloc_8u+ippsRandUniformInit_8u

ippsRandUniform_Direct_16s

ippsRandUniform_16s

ippsRandUniform_Direct_32f

ippsRandUniform_32f

ippsRandUniform_Direct_64f

ippsRandUniform_32f+ippsConvert_32f64f

580

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Removed from 9.0

Substitution or WorkaroundippsSplitScaled_16s32f_D2L

Use simple C-loop and Intel compiler

ippsSplitScaled_24s32f_D2L

Use simple C-loop and Intel compiler

ippsSqrt_64s16s_Sfs

Convert to supported data typeippsSqrt_64s_ISfs

Convert to 64f and use ippsSqrt_64f_I

ippsSqrt_64s_Sfs

Convert to 64f and use ippsSqrt_64f

ippsToneFree

N/A

ippsToneGetStateSizeQ15_16s

N/A

ippsToneInitAllocQ15_16s

N/A

ippsToneInitQ15_16s

N/A

ippsToneQ15_16s

Q15 is not supported anymore; use ippsTone_16s+manual conversion to Q15 format

ippsToneQ15_Direct_16s

Q15 is not supported anymore; use ippsTone_16s+manual conversion to Q15 format

ippsTone_Direct_16s

ippsTone_16s

ippsTone_Direct_16sc

ippsTone_16sc

ippsTone_Direct_32f

ippsTone_32f

ippsTone_Direct_32fc

ippsTone_32fc

ippsTone_Direct_64f

ippsTone_64f

ippsTone_Direct_64fc

ippsTone_64fc

ippsTriangleFree

N/A

ippsTriangleGetStateSizeQ15_16s

N/A

ippsTriangleInitAllocQ15_16s

N/A

ippsTriangleInitQ15_16s

N/A

ippsTriangleQ15_16s

Q15 is not supported anymore; use

ippsTriangle_16s+manual conversion to Q15
formatippsTriangleQ15_Direct_16s

Q15 is not supported anymore; use
ippsTriangle_16s+manual conversion to Q15
formatippsTriangle_Direct_16s

ippsTriangle_16s

ippsTriangle_Direct_16sc

ippsTriangle_16sc

ippsTriangle_Direct_32f

ippsTriangle_32f

ippsTriangle_Direct_32fc

ippsTriangle_32fc

581

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippsTriangle_Direct_64f

ippsTriangle_64f

ippsTriangle_Direct_64fc

ippsTriangle_64fc

ippsUpdateLinear_16s32s_I

Use simple C-loop and Intel compiler

ippsUpdatePathMetricsDV_16u

N/A

ippsUpdatePower_16s32s_I

Use simple C-loop and Intel compiler

ippsVectorJaehne_32u32u is not supported anymore; if still required - canbe emulated with ippsVectorJaehne_32s+level
shift: (Ipp32u)(x[i]+(-IPP_MIN_32S))

ippsVectorJaehne_8s

8s is not supported anymore; if still required - canbe emulated with ippsVectorJaehne_16s+ippsConvert_16s8s_Sfs

ippsVectorRamp_16s

ippsVectorSlope_16s

ippsVectorRamp_16u

ippsVectorSlope_16u

ippsVectorRamp_32f

ippsVectorSlope_32f

ippsVectorRamp_32s

ippsVectorSlope_32s

ippsVectorRamp_32u

ippsVectorSlope_32u

ippsVectorRamp_64f

ippsVectorSlope_64f

ippsVectorRamp_8s

8s is not supported anymore; if still required - canbe emulated with ippsVectorSlope_16s+ippsConvert_16s8s_Sfs

ippsVectorRamp_8u

ippsVectorSlope_8u

ippsVectorSlope_8s

Convert 8s to 8u or 16s data typeippsWTFwdFree_16s32f

ippsFreeippsWTFwdFree_16u32f

ippsFreeippsWTFwdFree_32f

ippsFreeippsWTFwdFree_8s32f

ippsFreeippsWTFwdFree_8u32f

ippsFreeippsWTFwdGetDlyLine_8s32f

Convert 8s to 8u or 16s data typeippsWTFwdInitAlloc_16s32f

Use ippsWTFGetSize+ippsMalloc+ippsWTFInit

ippsWTFwdInitAlloc_16u32f

Use ippsWTFGetSize+ippsMalloc+ippsWTFInit

ippsWTFwdInitAlloc_32f

Use ippsWTFGetSize+ippsMalloc+ippsWTFInit

ippsWTFwdInitAlloc_8s32f

Use ippsWTFGetSize+ippsMalloc+ippsWTFInit

ippsWTFwdInitAlloc_8u32f

Use ippsWTFGetSize+ippsMalloc+ippsWTFInit

582

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippsWTFwdSetDlyLine_8s32f

Convert 8s to 8u or 16s data typeippsWTFwd_8s32f

Convert 8s to 8u or 16s data typeippsWTHaarFwd_16s

ippsWTHaarFwd_16s_Sfs

ippsWTHaarFwd_32s

ippsConvert_32s32f+ippsWTHaarFwd_32f

ippsWTHaarFwd_32s_Sfs

ippsConvert_32s32f+ippsWTHaarFwd_32f

ippsWTHaarFwd_64s

ippsConvert_64s64f+ippsWTHaarFwd_64f

ippsWTHaarFwd_64s_Sfs

ippsConvert_64s64f+ippsWTHaarFwd_64f

ippsWTHaarFwd_8s

ippsConvert_8s16s+ippsWTHaarFwd_16s_Sfs

ippsWTHaarFwd_8s_Sfs

ippsConvert_8s16s+ippsWTHaarFwd_16s_Sfs

ippsWTHaarInv_16s

ippsWTHaarInv_16s_Sfs

ippsWTHaarInv_32s

ippsConvert_32s32f+ippsWTHaarInv_32f

ippsWTHaarInv_32s_Sfs

ippsConvert_32s32f+ippsWTHaarInv_32f

ippsWTHaarInv_64s

ippsConvert_64s64f+ippsWTHaarInv_64f

ippsWTHaarInv_64s_Sfs

ippsConvert_64s64f+ippsWTHaarInv_64f

ippsWTHaarInv_8s

ippsConvert_8s16s+ippsWTHaarInv_16s_Sfs

ippsWTHaarInv_8s_Sfs

ippsConvert_8s16s+ippsWTHaarInv_16s_Sfs

ippsWTInvFree_32f

ippsFreeippsWTInvFree_32f16s

ippsFreeippsWTInvFree_32f16u

ippsFreeippsWTInvFree_32f8s

ippsFreeippsWTInvFree_32f8u

ippsFreeippsWTInvGetDlyLine_32f8s

Convert 8s to 8u or 16s data typeippsWTInvInitAlloc_32f

ippsWTFGetSize+ippsMalloc+ippsWTFInit

ippsWTInvInitAlloc_32f16s

ippsWTFGetSize+ippsMalloc+ippsWTFInit

ippsWTInvInitAlloc_32f16u

ippsWTFGetSize+ippsMalloc+ippsWTFInit

ippsWTInvInitAlloc_32f8s

ippsWTFGetSize+ippsMalloc+ippsWTFInit

ippsWTInvInitAlloc_32f8u

ippsWTFGetSize+ippsMalloc+ippsWTFInit

ippsWTInvSetDlyLine_32f8s

Convert 8s to 8u or 16s data typeippsWTInv_32f8s

Convert 8s to 8u or 16s data type

583

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippsWinBlackmanQ15_16s

Q15 is not supported anymore, use 32f or 16s data
type

ippsWinBlackmanQ15_16s_I

Q15 is not supported anymore, use 32f or 16s data
type

ippsWinBlackmanQ15_16s_ISfs

Q15 is not supported anymore, use 32f or 16s data
type

ippsWinBlackmanQ15_16sc

Q15 is not supported anymore, use 32f or 16s data
type

ippsWinBlackmanQ15_16sc_I

Q15 is not supported anymore, use 32f or 16s data
type

ippsWinKaiserQ15_16s

Q15 is not supported anymore, use 32f or 16s data
type

ippsWinKaiserQ15_16s_I

Q15 is not supported anymore, use 32f or 16s data
type

ippsWinKaiserQ15_16sc

Q15 is not supported anymore, use 32f or 16s data
type

ippsWinKaiserQ15_16sc_I

Q15 is not supported anymore, use 32f or 16s data
type

ippdi.h:Removed from 9.0

Substitution or WorkaroundippdiGetLibVersion

N/A

ippsGFAdd_8u

N/A

ippsGFDiv_8u

N/A

ippsGFExpAlpha_8u

N/A

ippsGFGetSize_8u

N/A

ippsGFInit_8u

N/A

ippsGFInv_8u

N/A

ippsGFLogAlpha_8u

N/A

ippsGFMul_8u

N/A

ippsGFNeg_8u

N/A

ippsGFPow_8u

N/A

ippsGFSub_8u

N/A

ippsPolyGFAdd_8u

N/A

ippsPolyGFCopy_8u

N/A

584

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippsPolyGFDerive_8u

N/A

ippsPolyGFDiv_8u

N/A

ippsPolyGFGCD_8u

N/A

ippsPolyGFGetRef_8u

N/A

ippsPolyGFGetSize_8u

N/A

ippsPolyGFInit_8u

N/A

ippsPolyGFIrreducible_8u

N/A

ippsPolyGFMod_8u

N/A

ippsPolyGFMul_8u

N/A

ippsPolyGFPrimitive_8u

N/A

ippsPolyGFRoots_8u

N/A

ippsPolyGFSetCoeffs_8u

N/A

ippsPolyGFSetDegree_8u

N/A

ippsPolyGFShlC_8u

N/A

ippsPolyGFShrC_8u

N/A

ippsPolyGFSub_8u

N/A

ippsPolyGFValue_8u

N/A

ippsRSDecodeBMGetBufferSize_8u

N/A

ippsRSDecodeBM_8u

N/A

ippsRSDecodeEEGetBufferSize_8u

N/A

ippsRSDecodeEE_8u

N/A

ippsRSDecodeGetSize_8u

N/A

ippsRSDecodeInit_8u

N/A

ippsRSEncodeGetBufferSize_8u

N/A

ippsRSEncodeGetSize_8u

N/A

ippsRSEncodeInit_8u

N/A

ippsRSEncode_8u

N/A1ippch.h:Removed from 9.0

Substitution or WorkaroundippsCompareIgnoreCaseLatin_16u

N/A

ippsCompareIgnoreCase_16u

N/A

585

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippsCompare_16u

N/A

ippsConcatC_16u_D2L

N/A

ippsConcat_16u

N/A

ippsConcat_16u_D2L

N/A

ippsEqual_16u

N/A

ippsFindCAny_16u

N/A

ippsFindC_16u

N/A

ippsFindC_Z_16u

N/A

ippsFindRevCAny_16u

N/A

ippsFindRevC_16u

N/A

ippsFindRev_16u

N/A

ippsFind_16u

N/A

ippsFind_Z_16u

N/A

ippsInsert_16u

N/A

ippsInsert_16u_I

N/A

ippsLowercaseLatin_16u

N/A

ippsLowercaseLatin_16u_I

N/A

ippsLowercase_16u

N/A

ippsLowercase_16u_I

N/A

ippsRegExpFree

ippFreeippsRegExpInitAlloc

ippsRegExpGetSize+ippMalloc+ippsRegExpInit

ippsRegExpMultiAdd

N/A

ippsRegExpMultiDelete

N/A

ippsRegExpMultiFind_8u

N/A

ippsRegExpMultiFree

N/A

ippsRegExpMultiGetSize

N/A

ippsRegExpMultiInit

N/A

ippsRegExpMultiInitAlloc

N/A

ippsRegExpMultiModify

N/A

ippsRemove_16u

N/A

586

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippsRemove_16u_I

N/A

ippsReplaceC_16u

N/A

ippsSplitC_16u_D2L

N/A

ippsTrimCAny_16u

N/A

ippsTrimC_16u

N/A

ippsTrimC_16u_I

N/A

ippsTrimEndCAny_16u

N/A

ippsTrimStartCAny_16u

N/A

ippsUppercaseLatin_16u

N/A

ippsUppercaseLatin_16u_I

N/A

ippsUppercase_16u

N/A

ippsUppercase_16u_I

N/A

1

ippdc.h:Removed from 9.0

Substitution or WorkaroundippsBWTFwd_SmallBlock_8u

N/A

ippsBWTGetSize_SmallBlock_8u

N/A

ippsBWTInv_SmallBlock_8u

N/A

ippsDecodeGITGetSize_8u

N/A

ippsDecodeGITInitAlloc_8u

N/A

ippsDecodeGITInit_8u

N/A

ippsDecodeGIT_8u

N/A

ippsDecodeHuffFree_BZ2_8u16u

ippFree

ippsDecodeHuffInitAlloc_8u

N/A

ippsDecodeHuffInitAlloc_BZ2_8u16u

ippsDecodeHuffGetSize_BZ2_8u16u+ippMalloc+ippsDecodeHuffInit_BZ2_8u16u

ippsDecodeHuffInit_8u

N/A

ippsDecodeHuffOne_8u

N/A

ippsDecodeHuff_8u

N/A

ippsDecodeLZ77CopyState_8u

N/A

ippsDecodeLZ77DynamicHuffFull_8u

N/A

ippsDecodeLZ77DynamicHuff_8u

N/A

587

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippsDecodeLZ77FixedHuffFull_8u

N/A

ippsDecodeLZ77FixedHuff_8u

N/A

ippsDecodeLZ77GetBlockType_8u

N/A

ippsDecodeLZ77GetPairs_8u

N/A

ippsDecodeLZ77GetSize_8u

N/A

ippsDecodeLZ77GetStatus_8u

N/A

ippsDecodeLZ77InitAlloc_8u

N/A

ippsDecodeLZ77Init_8u

N/A

ippsDecodeLZ77Reset_8u

N/A

ippsDecodeLZ77SetDictionary_8u

N/A

ippsDecodeLZ77SetPairs_8u

N/A

ippsDecodeLZ77SetStatus_8u

N/A

ippsDecodeLZ77StoredBlock_8u

N/A

ippsDecodeLZ77StoredHuff_8u

N/A

ippsDecodeLZ77_8u

N/A

ippsDecodeLZSSInitAlloc_8u

ippsLZSSGetSize_8u+ippMalloc+ippsDecodeLZSSInit_8u

ippsDecodeRLE_8u

N/A

ippsDecodeRLE_BZ2_8u

N/A

ippsEncodeGITGetSize_8u

N/A

ippsEncodeGITInitAlloc_8u

N/A

ippsEncodeGITInit_8u

N/A

ippsEncodeGIT_8u

N/A

ippsEncodeHuffFinal_8u

N/A

ippsEncodeHuffFree_BZ2_16u8u

ippFreeippsEncodeHuffInitAlloc_8u

N/A

ippsEncodeHuffInitAlloc_BZ2_16u8u

ippsEncodeHuffGetSize_BZ2_16u8u+ippMalloc+ippsEncodeHuffInit_BZ2_16u8u

ippsEncodeHuffInit_8u

N/A

ippsEncodeHuffOne_8u

N/A

ippsEncodeHuff_8u

N/A

ippsEncodeLZ77DynamicHuff_8u

N/A

588

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippsEncodeLZ77FixedHuff_8u

N/A

ippsEncodeLZ77Flush_8u

N/A

ippsEncodeLZ77GetPairs_8u

N/A

ippsEncodeLZ77GetSize_8u

N/A

ippsEncodeLZ77GetStatus_8u

N/A

ippsEncodeLZ77InitAlloc_8u

N/A

ippsEncodeLZ77Init_8u

N/A

ippsEncodeLZ77Reset_8u

N/A

ippsEncodeLZ77SelectHuffMode_8u

N/A

ippsEncodeLZ77SetDictionary_8u

N/A

ippsEncodeLZ77SetPairs_8u

N/A

ippsEncodeLZ77SetStatus_8u

N/A

ippsEncodeLZ77StoredBlock_8u

N/A

ippsEncodeLZ77_8u

N/A

ippsEncodeLZSSInitAlloc_8u

ippsLZSSGetSize_8u+ippMalloc+ippsEncodeLZSSInit_8u

ippsEncodeRLEInitAlloc_BZ2_8u

ippsRLEGetSize_BZ2_8u+ippMalloc+ippsEncodeRLEInit_BZ2_8u

ippsEncodeRLE_8u

N/A

ippsGITFree_8u

N/A

ippsHuffFree_8u

N/A

ippsHuffGetDstBuffSize_8u

N/A

ippsHuffGetLenCodeTable_8u

N/A

ippsHuffGetSize_8u

N/A

ippsHuffLenCodeTablePack_8u

N/A

ippsHuffLenCodeTableUnpack_8u

N/A

ippsLZ77Free_8u

N/A

ippsLZSSFree_8u

ippFreeippsMTFFree_8u

ippFreeippsMTFInitAlloc_8u

ippsMTFGetSize_8u+ippMalloc+ippsMTFInit_8u

ippsRLEFree_BZ2_8u

ippFree

1

589

1

Intel® Integrated Performance Primitives Developer Guide and Reference

ippsc.h:Removed from 9.0

Substitution or WorkaroundippsACELPFixedCodebookSearch_G723_16s

N/A

ippsACELPFixedCodebookSearch_G723_32s16s

N/A

ippsALCGetStateSize_G169_16s

N/A

ippsALCInit_G169_16s

N/A

ippsALCSetGain_G169_16s

N/A

ippsALCSetLevel_G169_16s

N/A

ippsALC_G169_16s

N/A

ippsAdaptiveCodebookContribution_G729_16s

N/A

ippsAdaptiveCodebookContribution_G729_32f

N/A

ippsAdaptiveCodebookDecodeGetSize_AMRWB_16s N/A
ippsAdaptiveCodebookDecodeInit_AMRWB_16s

N/A

ippsAdaptiveCodebookDecodeUpdate_AMRWB_16s N/A
ippsAdaptiveCodebookDecode_AMRWBE_16s

N/A

ippsAdaptiveCodebookDecode_AMRWB_16s

N/A

ippsAdaptiveCodebookDecode_GSMAMR_16s

N/A

ippsAdaptiveCodebookGainCoeff_AMRWB_16s

N/A

ippsAdaptiveCodebookGainCoeffs_GSMAMR_16s

N/A

ippsAdaptiveCodebookGain_G7291_16s

N/A

ippsAdaptiveCodebookGain_G729A_16s

N/A

ippsAdaptiveCodebookGain_G729_16s

N/A

ippsAdaptiveCodebookGain_GSMAMR_16s

N/A

ippsAdaptiveCodebookSearch_AMRWBE_16s

N/A

ippsAdaptiveCodebookSearch_AMRWB_16s

N/A

ippsAdaptiveCodebookSearch_G723

N/A

ippsAdaptiveCodebookSearch_G7291_16s

N/A

ippsAdaptiveCodebookSearch_G729A_16s

N/A

ippsAdaptiveCodebookSearch_G729D_16s

N/A

ippsAdaptiveCodebookSearch_G729_16s

N/A

ippsAdaptiveCodebookSearch_GSMAMR_16s

N/A

ippsAdaptiveCodebookSearch_RTA_32f

N/A

590

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippsAlgebraicCodebookDecode_AMRWB_16s

N/A

ippsAlgebraicCodebookSearchEX_AMRWB_16s

N/A

ippsAlgebraicCodebookSearchEX_GSMAMR_16s

N/A1

ippsAlgebraicCodebookSearchGetBufferSize_AMRWB_16s
N/A
ippsAlgebraicCodebookSearchGetBufferSize_GSMAMR_16s
N/A
ippsAlgebraicCodebookSearchL1_G7291_16s

N/A

ippsAlgebraicCodebookSearchL2_G7291_16s

N/A

ippsAlgebraicCodebookSearch_AMRWB_16s

N/A

ippsAlgebraicCodebookSearch_GSMAMR_16s

N/A

ippsAutoCorrLagMax_32f

N/A

ippsAutoCorrLagMax_Fwd_16s

N/A

ippsAutoCorrLagMax_Inv_16s

N/A

ippsAutoCorr_16s32s

N/A

ippsAutoCorr_G723_16s

N/A

ippsAutoCorr_G729B

N/A

ippsAutoCorr_GSMAMR_16s32s

N/A

ippsAutoCorr_NormE_16s32s

N/A

ippsAutoCorr_NormE_G723_16s

N/A

ippsAutoCorr_NormE_NR_16s

N/A

ippsAutoScale_16s

N/A

ippsAutoScale_16s_I

N/A

ippsBandJoinUpsample_AMRWBE_16s

N/A

ippsBandJoin_AMRWBE_16s

N/A

ippsBandPassFilter_RTA_32f_I

N/A

ippsBandSplitDownsample_AMRWBE_16s

N/A

ippsBandSplit_AMRWBE_16s

N/A

ippsClassifyFrame_G722_16s_I

N/A

ippsCodebookSearchTCQ_G728_16s8u

N/A

ippsCodebookSearch_G728_16s

N/A

ippsCombinedFilterGetStateSize_G728_16s

N/A

ippsCombinedFilterInit_G728_16s

N/A

591

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippsCombinedFilterZeroInput_G728_16s

N/A

ippsCombinedFilterZeroState_G728_16s

N/A

ippsCompressEnvelopTime_G7291_16s

N/A

ippsConvPartial_16s32s

N/A

ippsConvPartial_16s_Sfs

N/A

ippsConvPartial_NR_16s

N/A

ippsConvPartial_NR_Low_16s

N/A

ippsCrossCorrLagMax_16s

N/A

ippsCrossCorrLagMax_32f64f

N/A

ippsCrossCorr_16s32s_Sfs

N/A

ippsCrossCorr_NR_16s

N/A

ippsCrossCorr_NR_16s32s

N/A

ippsCrossCorr_NR_16s_Sfs

N/A

ippsCrossCorr_NormM_16s

N/A

ippsDCTFwd_G7221_16s

N/A

ippsDCTFwd_G722_16s

N/A

ippsDCTInv_G7221_16s

N/A

ippsDCTInv_G722_16s

N/A

ippsDecDTXBuffer_AMRWB_16s

N/A

ippsDecDTXBuffer_GSMAMR_16s

N/A

ippsDecodeAdaptiveVector_G723_16s

N/A

ippsDecodeAdaptiveVector_G729_16s

N/A

ippsDecodeAdaptiveVector_G729_16s_I

N/A

ippsDecodeAdaptiveVector_G729_32f_I

N/A

ippsDecodeDemux_AMRWBE_16s

N/A

ippsDecodeGain_AMRWB_16s

N/A

ippsDecodeGain_G729I_16s

N/A

ippsDecodeGain_G729_16s

N/A

ippsDecodeGetStateSize_G726_8u16s

N/A

ippsDecodeInit_G726_8u16s

N/A

ippsDecode_G726_8u16s

N/A

592

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippsDecomposeDCTToMLT_G7221_16s

N/A

ippsDecomposeDCTToMLT_G722_16s

N/A

ippsDecomposeMLTToDCT_G7221_16s

N/A

ippsDecomposeMLTToDCT_G722_16s

N/A

ippsDeemphasize_AMRWBE_NR_16s_I

N/A

ippsDeemphasize_AMRWB_32s16s

N/A

ippsDeemphasize_AMRWB_NR_16s_I

N/A

ippsDeemphasize_GSMFR_16s_I

N/A

ippsDotProdAutoScale_16s32s_Sfs

N/A

ippsDotProd_G729A_16s32s

N/A

ippsDotProd_G729A_32f

N/A

ippsDownsampleFilter_G722_16s

N/A

ippsDownsample_AMRWBE_16s

N/A

ippsEncDTXBuffer_AMRWB_16s

N/A

ippsEncDTXBuffer_GSMAMR_16s

N/A

ippsEncDTXHandler_GSMAMR_16s

N/A

ippsEncDTXSID_GSMAMR_16s

N/A

ippsEncodeGetStateSize_G726_16s8u

N/A

ippsEncodeInit_G726_16s8u

N/A

ippsEncodeMux_AMRWBE_16s

N/A

ippsEncode_G726_16s8u

N/A

ippsEnvelopFrequency_G7291_16s

N/A

ippsEnvelopTime_G7291_16s

N/A

ippsFFTFwd_RToPerm_AMRWBE_16s

N/A

ippsFFTFwd_RToPerm_GSMAMR_16s_I

N/A

ippsFFTInv_PermToR_AMRWBE_16s

N/A

ippsFIRGenMidBand_AMRWBE_16s

N/A

ippsFIRSubbandAPCoeffUpdate_EC_32fc_I

N/A

ippsFIRSubbandCoeffUpdate_EC_32fc_I

N/A

ippsFIRSubbandCoeffUpdate_EC_32sc_I

N/A

ippsFIRSubbandLowCoeffUpdate_EC_32sc_I

N/A

1

593

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippsFIRSubbandLow_EC_32sc_Sfs

N/A

ippsFIRSubband_EC_32fc

N/A

ippsFIRSubband_EC_32sc_Sfs

N/A

ippsFIR_EC_16s

N/A

ippsFIR_EC_32f

N/A

ippsFilterHighband_G722_16s_I

N/A

ippsFilterHighpassGetStateSize_G7291_16s

N/A

ippsFilterHighpassInit_G7291_16s

N/A

ippsFilterHighpass_G7291_16s_ISfs

N/A

ippsFilterLowpass_G7291_16s_I

N/A

ippsFilterNoiseDetectModerate_EC_32f64f

N/A

ippsFilterNoiseDetect_EC_32f64f

N/A

ippsFilterNoiseGetStateSize_EC_32f

N/A

ippsFilterNoiseGetStateSize_RTA_32f

N/A

ippsFilterNoiseInit_EC_32f

N/A

ippsFilterNoiseInit_RTA_32f

N/A

ippsFilterNoiseLevel_EC_32f

N/A

ippsFilterNoiseLevel_RTA_32f

N/A

ippsFilterNoiseSetMode_EC_32f

N/A

ippsFilterNoise_EC_32f

N/A

ippsFilterNoise_EC_32f_I

N/A

ippsFilterNoise_RTA_32f

N/A

ippsFilterNoise_RTA_32f_I

N/A

ippsFilteredExcitation_G729_32f

N/A

ippsFixedCodebookDecode_GSMAMR_16s

N/A

ippsFixedCodebookSearchBuffer_RTA_32f

N/A

ippsFixedCodebookSearchRandom_RTA_32f

N/A

ippsFixedCodebookSearch_G729A_16s

N/A

ippsFixedCodebookSearch_G729A_32f

N/A

ippsFixedCodebookSearch_G729A_32s16s

N/A

ippsFixedCodebookSearch_G729D_16s

N/A

594

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippsFixedCodebookSearch_G729D_32f

N/A

ippsFixedCodebookSearch_G729E_16s

N/A

ippsFixedCodebookSearch_G729E_32f

N/A

ippsFixedCodebookSearch_G729_16s

N/A

ippsFixedCodebookSearch_G729_32f

N/A

ippsFixedCodebookSearch_G729_32s16s

N/A

1

ippsFixedCodebookSearch_RTA_GetBufferSize_32f
N/A
ippsFullbandControllerGetSize_EC_16s

N/A

ippsFullbandControllerGetSize_EC_32f

N/A

ippsFullbandControllerInit_EC_16s

N/A

ippsFullbandControllerInit_EC_32f

N/A

ippsFullbandControllerReset_EC_16s

N/A

ippsFullbandControllerReset_EC_32f

N/A

ippsFullbandControllerUpdate_EC_16s

N/A

ippsFullbandControllerUpdate_EC_32f

N/A

ippsFullbandController_EC_16s

N/A

ippsFullbandController_EC_32f

N/A

ippsGainCodebookSearch_G729D_32f

N/A

ippsGainCodebookSearch_G729_32f

N/A

ippsGainControl_G723_16s_I

N/A

ippsGainControl_G7291_16s_I

N/A

ippsGainControl_G729A_16s_I

N/A

ippsGainControl_G729_16s_I

N/A

ippsGainControl_G729_32f_I

N/A

ippsGainDecodeTCX_AMRWBE_16s

N/A

ippsGainQuantTCX_AMRWBE_16s

N/A

ippsGainQuant_AMRWBE_16s

N/A

ippsGainQuant_AMRWB_16s

N/A

ippsGainQuant_G723_16s

N/A

ippsGainQuant_G7291_16s

N/A

ippsGainQuant_G729D_16s

N/A

595

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippsGainQuant_G729_16s

N/A

ippsGenerateExcitationGetStateSize_G7291_16sN/A
ippsGenerateExcitationInit_G7291_16s

N/A

ippsGenerateExcitation_G7291_16s

N/A

ippsHarmonicFilter_16s_I

N/A

ippsHarmonicFilter_32f_I

N/A

ippsHarmonicFilter_NR_16s

N/A

ippsHarmonicNoiseSubtract_G723_16s_I

N/A

ippsHarmonicSearch_G723_16s

N/A

ippsHighPassFilterGetDlyLine_AMRWB_16s

N/A

ippsHighPassFilterGetSize_AMRWB_16s

N/A

ippsHighPassFilterInit_AMRWB_16s

N/A

ippsHighPassFilterInit_G729

N/A

ippsHighPassFilterSetDlyLine_AMRWB_16s

N/A

ippsHighPassFilterSize_G729

N/A

ippsHighPassFilter_AMRWB_16s_ISfs

N/A

ippsHighPassFilter_AMRWB_16s_Sfs

N/A

ippsHighPassFilter_Direct_AMRWB_16s

N/A

ippsHighPassFilter_G723_16s

N/A

ippsHighPassFilter_G729_16s_ISfs

N/A

ippsHighPassFilter_GSMFR_16s

N/A

ippsHighPassFilter_RTA_32f

N/A

ippsHuffmanEncode_G722_16s32u

N/A

ippsIIR16sGetStateSize_G728_16s

N/A

ippsIIR16sInit_G728_16s

N/A

ippsIIR16sLow_G729_16s

N/A

ippsIIR16s_G723_16s32s

N/A

ippsIIR16s_G723_16s_I

N/A

ippsIIR16s_G723_32s16s_Sfs

N/A

ippsIIR16s_G728_16s

N/A

ippsIIR16s_G729_16s

N/A

596

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippsISFQuantDTX_AMRWB_16s

N/A

ippsISFQuantDecodeDTX_AMRWB_16s

N/A

ippsISFQuantDecodeHighBand_AMRWBE_16s

N/A

ippsISFQuantDecode_AMRWBE_16s

N/A

ippsISFQuantDecode_AMRWB_16s

N/A

ippsISFQuantHighBand_AMRWBE_16s

N/A

ippsISFQuant_AMRWB_16s

N/A

ippsISFToISP_AMRWB_16s

N/A

ippsISPToISF_Norm_AMRWB_16s

N/A

ippsISPToLPC_AMRWB_16s

N/A

ippsImpulseResponseEnergy_G728_16s

N/A

ippsImpulseResponseTarget_GSMAMR_16s

N/A

ippsInterpolateC_G729_16s_Sfs

N/A

ippsInterpolateC_G729_32f

N/A

ippsInterpolateC_NR_16s

N/A

ippsInterpolateC_NR_G729_16s_Sfs

N/A

ippsInterpolate_G729_16s

N/A

ippsInterpolate_GSMAMR_16s

N/A

ippsInvSqrt_32s_I

N/A

ippsLPCInverseFilter_G728_16s

N/A

ippsLPCToISP_AMRWBE_16s

N/A

ippsLPCToISP_AMRWB_16s

N/A

ippsLPCToLSF_G723_16s

N/A

ippsLPCToLSP_G729A_16s

N/A

ippsLPCToLSP_G729A_32f

N/A

ippsLPCToLSP_G729_16s

N/A

ippsLPCToLSP_G729_32f

N/A

ippsLPCToLSP_GSMAMR_16s

N/A

ippsLPCToLSP_RTA_32f

N/A

ippsLSFDecodeErased_G729_16s

N/A

ippsLSFDecodeErased_G729_32f

N/A

1

597

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippsLSFDecode_G723_16s

N/A

ippsLSFDecode_G7291_16s

N/A

ippsLSFDecode_G729B_16s

N/A

ippsLSFDecode_G729B_32f

N/A

ippsLSFDecode_G729_16s

N/A

ippsLSFDecode_G729_32f

N/A

ippsLSFQuant_G723_16s32s

N/A

ippsLSFQuant_G729B_16s

N/A

ippsLSFQuant_G729B_32f

N/A

ippsLSFQuant_G729_16s

N/A

ippsLSFToLPC_G723_16s

N/A

ippsLSFToLPC_G723_16s_I

N/A

ippsLSFToLSP_G729_16s

N/A

ippsLSFToLSP_GSMAMR_16s

N/A

ippsLSPQuant_G729E_16s

N/A

ippsLSPQuant_G729E_32f

N/A

ippsLSPQuant_G729_16s

N/A

ippsLSPQuant_GSMAMR_16s

N/A

ippsLSPQuant_RTA_32f

N/A

ippsLSPToLPC_G729_16s

N/A

ippsLSPToLPC_G729_32f

N/A

ippsLSPToLPC_GSMAMR_16s

N/A

ippsLSPToLPC_RTA_32f

N/A

ippsLSPToLSF_G729_16s

N/A

ippsLSPToLSF_Norm_G729_16s

N/A

ippsLagWindow_G729_32s_I

N/A

ippsLevinsonDurbin_G723_16s

N/A

ippsLevinsonDurbin_G729B

N/A

ippsLevinsonDurbin_G729_32f

N/A

ippsLevinsonDurbin_G729_32s16s

N/A

ippsLevinsonDurbin_GSMAMR_32s16s

N/A

598

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippsLevinsonDurbin_RTA_32f

N/A

ippsLongTermPostFilter_G729A_16s

N/A

ippsLongTermPostFilter_G729B_16s

N/A

ippsLongTermPostFilter_G729_16s

N/A

ippsMDCTFwd_G7291_16s

N/A

ippsMDCTInv_G7291_16s

N/A

ippsMDCTPostProcess_G7291_16s

N/A

ippsMDCTQuantFwd_G7291_16s32u

N/A

ippsMDCTQuantInv_G7291_32u16s

N/A

ippsMPMLQFixedCodebookSearch_G723

N/A

ippsMulC_NR_16s_ISfs

N/A

ippsMulC_NR_16s_Sfs

N/A

ippsMulPowerC_NR_16s_Sfs

N/A

ippsMul_NR_16s_ISfs

N/A

ippsMul_NR_16s_Sfs

N/A

ippsNLMS_EC_16s

N/A

ippsNLMS_EC_32f

N/A

ippsOpenLoopPitchSearchDTXVAD1_GSMAMR_16s

N/A1

ippsOpenLoopPitchSearchDTXVAD2_GSMAMR_16s32sN/A
ippsOpenLoopPitchSearchNonDTX_GSMAMR_16s

N/A

ippsOpenLoopPitchSearch_AMRWBE_16s

N/A

ippsOpenLoopPitchSearch_AMRWB_16s

N/A

ippsOpenLoopPitchSearch_G723_16s

N/A

ippsOpenLoopPitchSearch_G729A_16s

N/A

ippsOpenLoopPitchSearch_G729A_32f

N/A

ippsOpenLoopPitchSearch_G729_16s

N/A

ippsPhaseDispersionGetStateSize_G729D_16s

N/A

ippsPhaseDispersionInit_G729D_16s

N/A

ippsPhaseDispersionUpdate_G729D_16s

N/A

ippsPhaseDispersion_G729D_16s

N/A

ippsPitchPeriodExtraction_G728_16s

N/A

599

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippsPitchPostFilter_G723_16s

N/A

ippsPostFilterAdapterGetStateSize_G728

N/A

ippsPostFilterAdapterStateInit_G728

N/A

ippsPostFilterGetStateSize_G728_16s

N/A

ippsPostFilterGetStateSize_RTA_32f

N/A

ippsPostFilterInit_G728_16s

N/A

ippsPostFilterInit_RTA_32f

N/A

ippsPostFilterLowBand_AMRWBE_16s

N/A

ippsPostFilter_G728_16s

N/A

ippsPostFilter_GSMAMR_16s

N/A

ippsPostFilter_RTA_32f_I

N/A

ippsPreemphasize_32f_I

N/A

ippsPreemphasize_AMRWB_16s_ISfs

N/A

ippsPreemphasize_G729A_16s

N/AippsPreemphasize_G729A_16s_I

N/A

ippsPreemphasize_GSMAMR_16s

N/A

ippsPreemphasize_GSMFR_16s

N/A

ippsQMFDecode_G722_16s

N/A

ippsQMFDecode_G7291_16s

N/A

ippsQMFDecode_RTA_32f

N/A

ippsQMFEncode_G722_16s

N/A

ippsQMFEncode_G7291_16s

N/A

ippsQMFEncode_RTA_32f

N/A

ippsQMFGetStateSize_G7291_16s

N/A

ippsQMFGetStateSize_RTA_32f

N/A

ippsQMFInit_G7291_16s

N/A

ippsQMFInit_RTA_32f

N/A

ippsQuantLSPDecode_GSMAMR_16s

N/A

ippsQuantParam_G7291_16s

N/A

ippsQuantTCX_AMRWBE_16s

N/A

ippsRPEQuantDecode_GSMFR_16s

N/A

600

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippsRandomNoiseExcitation_G729B_16s

N/A

ippsRandomNoiseExcitation_G729B_16s32f

N/A

ippsResamplePolyphase_AMRWBE_16s

N/A

ippsResidualFilter_AMRWB_16s_Sfs

N/A

ippsResidualFilter_G729E_16s

N/A

ippsResidualFilter_G729_16s

N/A

ippsResidualFilter_Low_16s_Sfs

N/A

ippsSBADPCMDecodeInit_G722_16s

N/A

ippsSBADPCMDecodeStateSize_G722_16s

N/A

ippsSBADPCMDecodeStateUpdate_G722_16s

N/A

ippsSBADPCMDecode_G722_16s

N/A

ippsSBADPCMEncodeInit_G722_16s

N/A

ippsSBADPCMEncodeStateSize_G722_16s

N/A

ippsSBADPCMEncode_G722_16s

N/A

ippsSNR_AMRWBE_16s

N/A

ippsSchur_GSMFR_32s16s

N/A

ippsShapeEnvelopFrequency_G7291_16s

N/A

ippsShapeEnvelopTime_G7291_16s

N/A

ippsShortTermAnalysisFilter_GSMFR_16s_I

N/A

ippsShortTermPostFilter_G729_16s

N/A

ippsShortTermPostFilter_G729A_16s

N/A

ippsShortTermSynthesisFilter_GSMFR_16s

N/A

ippsSubbandAPControllerUpdate_EC_32f

N/A

ippsSubbandAnalysis_16s32sc_Sfs

N/A

ippsSubbandAnalysis_32f32fc

N/A

ippsSubbandControllerDTGetSize_EC_16s

N/A

ippsSubbandControllerDTInit_EC_16s

N/A

ippsSubbandControllerDTReset_EC_16s

N/A

ippsSubbandControllerDTUpdate_EC_16s

N/A

ippsSubbandControllerDT_EC_16s

N/A

ippsSubbandControllerGetSize_EC_16s

N/A

1

601

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippsSubbandControllerGetSize_EC_32f

N/A

ippsSubbandControllerInit_EC_16s

N/A

ippsSubbandControllerInit_EC_32f

N/A

ippsSubbandControllerReset_EC_16s

N/A

ippsSubbandControllerReset_EC_32f

N/A

ippsSubbandControllerUpdate_EC_16s

N/A

ippsSubbandControllerUpdate_EC_32f

N/A

ippsSubbandController_EC_16s

N/A

ippsSubbandController_EC_32f

N/A

ippsSubbandProcessGetSize_16s

N/A

ippsSubbandProcessGetSize_32f

N/A

ippsSubbandProcessInit_16s

N/A

ippsSubbandProcessInit_32f

N/A

ippsSubbandSynthesis_32fc32f

N/A

ippsSubbandSynthesis_32sc16s_Sfs

N/A

ippsSyntesisFilterZeroInput_G728_16s

N/A

ippsSynthesisFilterGetStateSize_G728_16s

N/A

ippsSynthesisFilterInit_G728_16s

N/A

ippsSynthesisFilterLow_NR_16s_ISfs

N/A

ippsSynthesisFilterZeroStateResponse_NR_16s N/A
ippsSynthesisFilter_AMRWBE_16s32s_I

N/A

ippsSynthesisFilter_AMRWB_16s32s_I

N/A

ippsSynthesisFilter_G723_16s

N/A

ippsSynthesisFilter_G723_16s32s

N/A

ippsSynthesisFilter_G729E_16s

N/A

ippsSynthesisFilter_G729E_16s_I

N/A

ippsSynthesisFilter_G729_32f

N/A

ippsSynthesisFilter_NR_16s_ISfs

N/A

ippsSynthesisFilter_NR_16s_Sfs

N/A

ippsTiltCompensation_G723_32s16s

N/A

ippsTiltCompensation_G7291_16s

N/A

602

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippsTiltCompensation_G729A_16s

N/A

ippsTiltCompensation_G729E_16s

N/A

ippsTiltCompensation_G729_16s

N/A

ippsToeplizMatrix_G723_16s

N/A

ippsToeplizMatrix_G723_16s32s

N/A

ippsToeplizMatrix_G729D_32f

N/A

ippsToeplizMatrix_G729_16s

N/A

ippsToeplizMatrix_G729_16s32s

N/A

ippsToeplizMatrix_G729_32f

N/A

ippsToneDetectGetStateSize_EC_16s

N/A

ippsToneDetectGetStateSize_EC_32f

N/A

ippsToneDetectInit_EC_16s

N/A

ippsToneDetectInit_EC_32f

N/A

ippsToneDetect_EC_16s

N/A

ippsToneDetect_EC_32f

N/A

ippsUpsampleEX_AMRWBE_16s

N/A

ippsUpsampleGetBufferSize_AMRWBE_16s

N/A

ippsUpsample_AMRWBE_16s

N/A

ippsVAD1_GSMAMR_16s

N/A

ippsVAD2_GSMAMR_16s

N/A

ippsVADGetEnergyLevel_AMRWB_16s

N/A

ippsVADGetSize_AMRWB_16s

N/A

ippsVADInit_AMRWB_16s

N/A

ippsVAD_AMRWB_16s

N/A

ippsWeightingFilter_GSMFR_16s

N/A

ippsWinHybridBlock_G728_16s

N/A

ippsWinHybridGetStateSize_G728_16s

N/A

ippsWinHybridGetStateSize_G729E_16s

N/A

ippsWinHybridGetStateSize_G729E_32f

N/A

ippsWinHybridInit_G728_16s

N/A

ippsWinHybridInit_G729E_16s

N/A

1

603

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippsWinHybridInit_G729E_32f

N/A

ippsWinHybrid_G728_16s

N/A

ippsWinHybrid_G729E_16s32s

N/A

ippsWinHybrid_G729E_32f

N/A

ippscGetLibVersion

N/A

ippac.h:Removed from 9.0

Substitution or WorkaroundippacGetLibVersion

N/A

ippsAnalysisFilterEncFree_SBR_32f

N/A

ippsAnalysisFilterEncGetSize_SBR_32f

N/A

ippsAnalysisFilterEncInitAlloc_SBR_32f

N/A

ippsAnalysisFilterEncInit_SBR_32f

N/A

ippsAnalysisFilterEnc_SBR_32f32fc

N/A

ippsAnalysisFilterFree_PQMF_MP3_32f

N/A

ippsAnalysisFilterFree_SBRHQ_32s32sc

N/A

ippsAnalysisFilterFree_SBRLP_32s

N/A

ippsAnalysisFilterGetSize_PQMF_MP3_32f

N/A

ippsAnalysisFilterGetSize_SBRHQ_32s32sc

N/A

ippsAnalysisFilterGetSize_SBRLP_32s

N/A

ippsAnalysisFilterGetSize_SBR_RToC_32f

N/A

ippsAnalysisFilterGetSize_SBR_RToC_32f32fc N/A
ippsAnalysisFilterGetSize_SBR_RToR_32f

N/A

ippsAnalysisFilterInitAlloc_PQMF_MP3_32f

N/A

ippsAnalysisFilterInitAlloc_SBRHQ_32s32sc

N/A

ippsAnalysisFilterInitAlloc_SBRLP_32s

N/A

ippsAnalysisFilterInit_PQMF_MP3_32f

N/A

ippsAnalysisFilterInit_SBRHQ_32s32sc

N/A

ippsAnalysisFilterInit_SBRLP_32s

N/A

ippsAnalysisFilterInit_SBR_RToC_32f

N/A

ippsAnalysisFilterInit_SBR_RToC_32f32fc

N/A

ippsAnalysisFilterInit_SBR_RToR_32f

N/A

604

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippsAnalysisFilter_PQMF_MP3_32f

N/A

ippsAnalysisFilter_PS_32fc_D2

N/A

ippsAnalysisFilter_SBRHQ_32s32sc

N/A

ippsAnalysisFilter_SBRLP_32s

N/A

ippsAnalysisFilter_SBR_RToC_32f32fc_D2L

N/A

ippsAnalysisFilter_SBR_RToC_32f_D2L

N/A

ippsAnalysisFilter_SBR_RToR_32f_D2L

N/A

ippsAnalysisPQMF_MP3_16s32s

N/A

ippsBitReservoirInit_MP3

N/A

ippsCalcSF_16s32f

N/A

ippsDecodeChanPairElt_AAC

N/A

ippsDecodeChanPairElt_MP4_AAC

N/A

ippsDecodeDatStrElt_AAC

N/A

ippsDecodeExtensionHeader_AAC

N/A

ippsDecodeFillElt_AAC

N/A

ippsDecodeIsStereo_AAC_32s

N/A

ippsDecodeMainHeader_AAC

N/A

ippsDecodeMsPNS_AAC_32s

N/A

ippsDecodeMsStereo_AAC_32s_I

N/A

ippsDecodePNS_AAC_32s

N/A

ippsDecodePrgCfgElt_AAC

N/A

ippsDecodeTNS_AAC_32s_I

N/A

ippsDeinterleaveSpectrum_AAC_32s

N/A

ippsDeinterleave_16s

N/A

ippsDeinterleave_32f

N/A

ippsDetectTransient_SBR_32f

N/A

ippsEncodeTNS_AAC_32s_I

N/A

ippsEstimateTNR_SBR_32f

N/A

ippsFDPFree_32f

N/A

ippsFDPFwd_32f

N/A

ippsFDPGetSize_32f

N/A

1

605

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippsFDPInitAlloc_32f

N/A

ippsFDPInit_32f

N/A

ippsFDPInv_32f_I

N/A

ippsFDPResetGroup_32f

N/A

ippsFDPResetSfb_32f

N/A

ippsFDPReset_32f

N/A

ippsFIRBlockFree_32f

N/A

ippsFIRBlockInitAlloc_32f

N/A

ippsFIRBlockOne_32f

N/A

ippsHuffmanDecodeSfbMbp_MP3_1u32s

N/A

ippsHuffmanDecodeSfb_MP3_1u32s

N/A

ippsHuffmanDecode_MP3_1u32s

N/A

ippsHuffmanEncode_MP3_32s1u

N/A

ippsInterleave_16s

N/A

ippsInterleave_32f

N/A

ippsJoin_32f16s_D2L

N/A

ippsJointStereoEncode_MP3_32s_I

N/A

ippsLongTermPredict_AAC_32s

N/A

ippsLongTermReconstruct_AAC_32s

N/A

ippsLtpUpdate_AAC_32s

N/A

ippsMDCTFwdFree_16s

N/A

ippsMDCTFwdFree_32f

N/A

ippsMDCTFwdGetBufSize_16s

N/A

ippsMDCTFwdGetBufSize_32f

N/A

ippsMDCTFwdGetSize_16s

N/A

ippsMDCTFwdGetSize_32f

N/A

ippsMDCTFwdInitAlloc_16s

N/A

ippsMDCTFwdInitAlloc_32f

N/A

ippsMDCTFwdInit_16s

N/A

ippsMDCTFwdInit_32f

N/A

ippsMDCTFwd_16s_Sfs

N/A

606

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippsMDCTFwd_32f

N/A

ippsMDCTFwd_32f_I

N/A

ippsMDCTFwd_AAC_32s

N/A

ippsMDCTFwd_AAC_32s_I

N/A

ippsMDCTFwd_MP3_32s

N/A

ippsMDCTInvFree_32f

N/A

ippsMDCTInvGetBufSize_32f

N/A

ippsMDCTInvGetSize_32f

N/A

ippsMDCTInvInitAlloc_32f

N/A

ippsMDCTInvInit_32f

N/A

ippsMDCTInvWindow_MP3_32s

N/A

ippsMDCTInv_32f

N/A

ippsMDCTInv_32f_I

N/A

ippsMDCTInv_AAC_32s16s

N/A

ippsMDCTInv_AAC_32s_I

N/A

ippsMDCTInv_MP3_32s

N/A

ippsMakeFloat_16s32f

N/A

ippsNoiselessDecode_AAC

N/A

ippsNoiselessDecoder_LC_AAC

N/A

ippsPackFrameHeader_MP3

N/A

ippsPackScaleFactors_MP3_8s1u

N/A

ippsPackSideInfo_MP3

N/A

ippsPow34_16s_Sfs

N/A

ippsPow34_32f

N/A

ippsPow34_32f16s

N/A

ippsPow43Scale_16s32s_Sf

N/A

ippsPow43_16s32f

N/A

ippsPredictCoef_SBR_C_32f_D2L

N/A

ippsPredictCoef_SBR_C_32fc_D2L

N/A

ippsPredictCoef_SBR_R_32f_D2L

N/A

ippsPredictOneCoef_SBRHQ_32sc_D2L

N/A

1

607

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippsPredictOneCoef_SBRLP_32s_D2L

N/A

ippsPsychoacousticModelTwo_MP3_16s

N/A

ippsQuantInv_AAC_32s_I

N/A

ippsQuantize_MP3_32s_I

N/A

ippsReQuantizeSfb_MP3_32s_I

N/A

ippsReQuantize_MP3_32s_I

N/A

ippsScale_32f_I

N/A

ippsSpread_16s_Sfs

N/A

ippsSynthPQMF_MP3_32s16s

N/A

ippsSynthesisDownFilterFree_SBRHQ_32sc32s

N/A

ippsSynthesisDownFilterFree_SBRLP_32s

N/A

ippsSynthesisDownFilterGetSize_SBRHQ_32sc32sN/A
ippsSynthesisDownFilterGetSize_SBRLP_32s

N/A

ippsSynthesisDownFilterGetSize_SBR_CToR_32f N/A
ippsSynthesisDownFilterGetSize_SBR_CToR_32fc32f
N/A
ippsSynthesisDownFilterGetSize_SBR_RToR_32f N/A
ippsSynthesisDownFilterInitAlloc_SBRHQ_32sc32s
N/A
ippsSynthesisDownFilterInitAlloc_SBRLP_32s N/A
ippsSynthesisDownFilterInit_SBRHQ_32sc32s

N/A

ippsSynthesisDownFilterInit_SBRLP_32s

N/A

ippsSynthesisDownFilterInit_SBR_CToR_32f

N/A

ippsSynthesisDownFilterInit_SBR_CToR_32fc32fN/A
ippsSynthesisDownFilterInit_SBR_RToR_32f

N/A

ippsSynthesisDownFilter_SBRHQ_32sc32s

N/A

ippsSynthesisDownFilter_SBRLP_32s

N/A

ippsSynthesisDownFilter_SBR_CToR_32f_D2L

N/A

ippsSynthesisDownFilter_SBR_CToR_32fc32f_D2LN/A
ippsSynthesisDownFilter_SBR_RToR_32f_D2L

N/A

ippsSynthesisFilterFree_DTS_32f

N/A

ippsSynthesisFilterFree_PQMF_MP3_32f

N/A

ippsSynthesisFilterFree_SBRHQ_32sc32s

N/A

608

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippsSynthesisFilterFree_SBRLP_32s

N/A

ippsSynthesisFilterGetSize_DTS_32f

N/A

ippsSynthesisFilterGetSize_PQMF_MP3_32f

N/A

ippsSynthesisFilterGetSize_SBRHQ_32sc32s

N/A

ippsSynthesisFilterGetSize_SBRLP_32s

N/A

ippsSynthesisFilterGetSize_SBR_CToR_32f

N/A

1

ippsSynthesisFilterGetSize_SBR_CToR_32fc32f N/A
ippsSynthesisFilterGetSize_SBR_RToR_32f

N/A

ippsSynthesisFilterInitAlloc_DTS_32f

N/A

ippsSynthesisFilterInitAlloc_PQMF_MP3_32f

N/A

ippsSynthesisFilterInitAlloc_SBRHQ_32sc32s N/A
ippsSynthesisFilterInitAlloc_SBRLP_32s

N/A

ippsSynthesisFilterInit_DTS_32f

N/A

ippsSynthesisFilterInit_PQMF_MP3_32f

N/A

ippsSynthesisFilterInit_SBRHQ_32sc32s

N/A

ippsSynthesisFilterInit_SBRLP_32s

N/A

ippsSynthesisFilterInit_SBR_CToR_32f

N/A

ippsSynthesisFilterInit_SBR_CToR_32fc32f

N/A

ippsSynthesisFilterInit_SBR_RToR_32f

N/A

ippsSynthesisFilter_DTS_32f

N/A

ippsSynthesisFilter_PQMF_MP3_32f

N/A

ippsSynthesisFilter_SBRHQ_32sc32s

N/A

ippsSynthesisFilter_SBRLP_32s

N/A

ippsSynthesisFilter_SBR_CToR_32f_D2L

N/A

ippsSynthesisFilter_SBR_CToR_32fc32f_D2L

N/A

ippsSynthesisFilter_SBR_RToR_32f_D2L

N/A

ippsUnpackADIFHeader_AAC

N/A

ippsUnpackADTSFrameHeader_AAC

N/A

ippsUnpackFrameHeader_MP3

N/A

ippsUnpackScaleFactors_MP3_1u8s

N/A

ippsUnpackSideInfo_MP3

N/A

609

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippsVLCCountBits_16s32s

N/A

ippsVLCCountEscBits_AAC_16s32s

N/A

ippsVLCCountEscBits_MP3_16s32s

N/A

ippsVLCDecodeBlock_1u16s

N/A

ippsVLCDecodeEscBlock_AAC_1u16s

N/A

ippsVLCDecodeEscBlock_MP3_1u16s

N/A

ippsVLCDecodeFree_32s

N/A

ippsVLCDecodeGetSize_32s

N/A

ippsVLCDecodeInitAlloc_32s

N/A

ippsVLCDecodeInit_32s

N/A

ippsVLCDecodeOne_1u16s

N/A

ippsVLCDecodeUTupleBlock_1u16s

N/A

ippsVLCDecodeUTupleEscBlock_AAC_1u16s

N/A

ippsVLCDecodeUTupleEscBlock_MP3_1u16s

N/A

ippsVLCDecodeUTupleFree_32s

N/A

ippsVLCDecodeUTupleGetSize_32s

N/A

ippsVLCDecodeUTupleInitAlloc_32s

N/A

ippsVLCDecodeUTupleInit_32s

N/A

ippsVLCDecodeUTupleOne_1u16s

N/A

ippsVLCEncodeBlock_16s1u

N/A

ippsVLCEncodeEscBlock_AAC_16s1u

N/A

ippsVLCEncodeEscBlock_MP3_16s1u

N/A

ippsVLCEncodeFree_32s

N/A

ippsVLCEncodeGetSize_32s

N/A

ippsVLCEncodeInitAlloc_32s

N/A

ippsVLCEncodeInit_32s

N/A

ippsVLCEncodeOne_16s1u

N/A

ippsVQCodeBookFree_32f

N/A

ippsVQCodeBookGetSize_32f

N/A

ippsVQCodeBookInitAlloc_32f

N/A

ippsVQCodeBookInit_32f

N/A

610

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippsVQIndexSelect_32f

N/A

ippsVQMainSelect_32f

N/A

ippsVQPreliminarySelect_32f

N/A

ippsVQReconstruction_32f

N/A1

ippgen.h:Removed from 9.0

Substitution or WorkaroundippgDCT4Free_32f

N/A

ippgDCT4Free_64f

N/A

ippgDCT4GetSize_32f

N/A

ippgDCT4GetSize_64f

N/A

ippgDCT4InitAlloc_32f

N/A

ippgDCT4InitAlloc_64f

N/A

ippgDCT4Init_32f

N/A

ippgDCT4Init_64f

N/A

ippgDCT4_32f

N/A

ippgDCT4_64f

N/A

ippgDFTFwd_CToC_10_32fc

N/A

ippgDFTFwd_CToC_10_64fc

N/A

ippgDFTFwd_CToC_11_32fc

N/A

ippgDFTFwd_CToC_11_64fc

N/A

ippgDFTFwd_CToC_12_32fc

N/A

ippgDFTFwd_CToC_12_64fc

N/A

ippgDFTFwd_CToC_13_32fc

N/A

ippgDFTFwd_CToC_13_64fc

N/A

ippgDFTFwd_CToC_14_32fc

N/A

ippgDFTFwd_CToC_14_64fc

N/A

ippgDFTFwd_CToC_15_32fc

N/A

ippgDFTFwd_CToC_15_64fc

N/A

ippgDFTFwd_CToC_16_32fc

N/A

ippgDFTFwd_CToC_16_64fc

N/A

ippgDFTFwd_CToC_17_32fc

N/A

611

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippgDFTFwd_CToC_17_64fc

N/A

ippgDFTFwd_CToC_18_32fc

N/A

ippgDFTFwd_CToC_18_64fc

N/A

ippgDFTFwd_CToC_19_32fc

N/A

ippgDFTFwd_CToC_19_64fc

N/A

ippgDFTFwd_CToC_20_32fc

N/A

ippgDFTFwd_CToC_20_64fc

N/A

ippgDFTFwd_CToC_21_32fc

N/A

ippgDFTFwd_CToC_21_64fc

N/A

ippgDFTFwd_CToC_22_32fc

N/A

ippgDFTFwd_CToC_22_64fc

N/A

ippgDFTFwd_CToC_23_32fc

N/A

ippgDFTFwd_CToC_23_64fc

N/A

ippgDFTFwd_CToC_24_32fc

N/A

ippgDFTFwd_CToC_24_64fc

N/A

ippgDFTFwd_CToC_25_32fc

N/A

ippgDFTFwd_CToC_25_64fc

N/A

ippgDFTFwd_CToC_26_32fc

N/A

ippgDFTFwd_CToC_26_64fc

N/A

ippgDFTFwd_CToC_27_32fc

N/A

ippgDFTFwd_CToC_27_64fc

N/A

ippgDFTFwd_CToC_28_32fc

N/A

ippgDFTFwd_CToC_28_64fc

N/A

ippgDFTFwd_CToC_29_32fc

N/A

ippgDFTFwd_CToC_29_64fc

N/A

ippgDFTFwd_CToC_2_32fc

N/A

ippgDFTFwd_CToC_2_64fc

N/A

ippgDFTFwd_CToC_30_32fc

N/A

ippgDFTFwd_CToC_30_64fc

N/A

ippgDFTFwd_CToC_31_32fc

N/A

ippgDFTFwd_CToC_31_64fc

N/A

612

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippgDFTFwd_CToC_32_32fc

N/A

ippgDFTFwd_CToC_32_64fc

N/A

ippgDFTFwd_CToC_32fc

N/A

ippgDFTFwd_CToC_33_32fc

N/A

ippgDFTFwd_CToC_33_64fc

N/A

ippgDFTFwd_CToC_34_32fc

N/A

ippgDFTFwd_CToC_34_64fc

N/A

ippgDFTFwd_CToC_35_32fc

N/A

ippgDFTFwd_CToC_35_64fc

N/A

ippgDFTFwd_CToC_36_32fc

N/A

ippgDFTFwd_CToC_36_64fc

N/A

ippgDFTFwd_CToC_37_32fc

N/A

ippgDFTFwd_CToC_37_64fc

N/A

ippgDFTFwd_CToC_38_32fc

N/A

ippgDFTFwd_CToC_38_64fc

N/A

ippgDFTFwd_CToC_39_32fc

N/A

ippgDFTFwd_CToC_39_64fc

N/A

ippgDFTFwd_CToC_3_32fc

N/A

ippgDFTFwd_CToC_3_64fc

N/A

ippgDFTFwd_CToC_40_32fc

N/A

ippgDFTFwd_CToC_40_64fc

N/A

ippgDFTFwd_CToC_41_32fc

N/A

ippgDFTFwd_CToC_41_64fc

N/A

ippgDFTFwd_CToC_42_32fc

N/A

ippgDFTFwd_CToC_42_64fc

N/A

ippgDFTFwd_CToC_43_32fc

N/A

ippgDFTFwd_CToC_43_64fc

N/A

ippgDFTFwd_CToC_44_32fc

N/A

ippgDFTFwd_CToC_44_64fc

N/A

ippgDFTFwd_CToC_45_32fc

N/A

ippgDFTFwd_CToC_45_64fc

N/A

1

613

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippgDFTFwd_CToC_46_32fc

N/A

ippgDFTFwd_CToC_46_64fc

N/A

ippgDFTFwd_CToC_47_32fc

N/A

ippgDFTFwd_CToC_47_64fc

N/A

ippgDFTFwd_CToC_48_32fc

N/A

ippgDFTFwd_CToC_48_64fc

N/A

ippgDFTFwd_CToC_49_32fc

N/A

ippgDFTFwd_CToC_49_64fc

N/A

ippgDFTFwd_CToC_4_32fc

N/A

ippgDFTFwd_CToC_4_64fc

N/A

ippgDFTFwd_CToC_50_32fc

N/A

ippgDFTFwd_CToC_50_64fc

N/A

ippgDFTFwd_CToC_51_32fc

N/A

ippgDFTFwd_CToC_51_64fc

N/A

ippgDFTFwd_CToC_52_32fc

N/A

ippgDFTFwd_CToC_52_64fc

N/A

ippgDFTFwd_CToC_53_32fc

N/A

ippgDFTFwd_CToC_53_64fc

N/A

ippgDFTFwd_CToC_54_32fc

N/A

ippgDFTFwd_CToC_54_64fc

N/A

ippgDFTFwd_CToC_55_32fc

N/A

ippgDFTFwd_CToC_55_64fc

N/A

ippgDFTFwd_CToC_56_32fc

N/A

ippgDFTFwd_CToC_56_64fc

N/A

ippgDFTFwd_CToC_57_32fc

N/A

ippgDFTFwd_CToC_57_64fc

N/A

ippgDFTFwd_CToC_58_32fc

N/A

ippgDFTFwd_CToC_58_64fc

N/A

ippgDFTFwd_CToC_59_32fc

N/A

ippgDFTFwd_CToC_59_64fc

N/A

ippgDFTFwd_CToC_5_32fc

N/A

614

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippgDFTFwd_CToC_5_64fc

N/A

ippgDFTFwd_CToC_60_32fc

N/A

ippgDFTFwd_CToC_60_64fc

N/A

ippgDFTFwd_CToC_61_32fc

N/A

ippgDFTFwd_CToC_61_64fc

N/A

ippgDFTFwd_CToC_62_32fc

N/A

ippgDFTFwd_CToC_62_64fc

N/A

ippgDFTFwd_CToC_63_32fc

N/A

ippgDFTFwd_CToC_63_64fc

N/A

ippgDFTFwd_CToC_64_32fc

N/A

ippgDFTFwd_CToC_64_64fc

N/A

ippgDFTFwd_CToC_64fc

N/A

ippgDFTFwd_CToC_6_32fc

N/A

ippgDFTFwd_CToC_6_64fc

N/A

ippgDFTFwd_CToC_7_32fc

N/A

ippgDFTFwd_CToC_7_64fc

N/A

ippgDFTFwd_CToC_8_32fc

N/A

ippgDFTFwd_CToC_8_64fc

N/A

ippgDFTFwd_CToC_9_32fc

N/A

ippgDFTFwd_CToC_9_64fc

N/A

ippgDFTFwd_RToCCS_10_32f

N/A

ippgDFTFwd_RToCCS_10_64f

N/A

ippgDFTFwd_RToCCS_11_32f

N/A

ippgDFTFwd_RToCCS_11_64f

N/A

ippgDFTFwd_RToCCS_12_32f

N/A

ippgDFTFwd_RToCCS_12_64f

N/A

ippgDFTFwd_RToCCS_13_32f

N/A

ippgDFTFwd_RToCCS_13_64f

N/A

ippgDFTFwd_RToCCS_14_32f

N/A

ippgDFTFwd_RToCCS_14_64f

N/A

ippgDFTFwd_RToCCS_15_32f

N/A

1

615

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippgDFTFwd_RToCCS_15_64f

N/A

ippgDFTFwd_RToCCS_16_32f

N/A

ippgDFTFwd_RToCCS_16_64f

N/A

ippgDFTFwd_RToCCS_17_32f

N/A

ippgDFTFwd_RToCCS_17_64f

N/A

ippgDFTFwd_RToCCS_18_32f

N/A

ippgDFTFwd_RToCCS_18_64f

N/A

ippgDFTFwd_RToCCS_19_32f

N/A

ippgDFTFwd_RToCCS_19_64f

N/A

ippgDFTFwd_RToCCS_20_32f

N/A

ippgDFTFwd_RToCCS_20_64f

N/A

ippgDFTFwd_RToCCS_21_32f

N/A

ippgDFTFwd_RToCCS_21_64f

N/A

ippgDFTFwd_RToCCS_22_32f

N/A

ippgDFTFwd_RToCCS_22_64f

N/A

ippgDFTFwd_RToCCS_23_32f

N/A

ippgDFTFwd_RToCCS_23_64f

N/A

ippgDFTFwd_RToCCS_24_32f

N/A

ippgDFTFwd_RToCCS_24_64f

N/A

ippgDFTFwd_RToCCS_25_32f

N/A

ippgDFTFwd_RToCCS_25_64f

N/A

ippgDFTFwd_RToCCS_26_32f

N/A

ippgDFTFwd_RToCCS_26_64f

N/A

ippgDFTFwd_RToCCS_27_32f

N/A

ippgDFTFwd_RToCCS_27_64f

N/A

ippgDFTFwd_RToCCS_28_32f

N/A

ippgDFTFwd_RToCCS_28_64f

N/A

ippgDFTFwd_RToCCS_29_32f

N/A

ippgDFTFwd_RToCCS_29_64f

N/A

ippgDFTFwd_RToCCS_2_32f

N/A

ippgDFTFwd_RToCCS_2_64f

N/A

616

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippgDFTFwd_RToCCS_30_32f

N/A

ippgDFTFwd_RToCCS_30_64f

N/A

ippgDFTFwd_RToCCS_31_32f

N/A

ippgDFTFwd_RToCCS_31_64f

N/A

ippgDFTFwd_RToCCS_32_32f

N/A

ippgDFTFwd_RToCCS_32_64f

N/A

ippgDFTFwd_RToCCS_32f

N/A

ippgDFTFwd_RToCCS_33_32f

N/A

ippgDFTFwd_RToCCS_33_64f

N/A

ippgDFTFwd_RToCCS_34_32f

N/A

ippgDFTFwd_RToCCS_34_64f

N/A

ippgDFTFwd_RToCCS_35_32f

N/A

ippgDFTFwd_RToCCS_35_64f

N/A

ippgDFTFwd_RToCCS_36_32f

N/A

ippgDFTFwd_RToCCS_36_64f

N/A

ippgDFTFwd_RToCCS_37_32f

N/A

ippgDFTFwd_RToCCS_37_64f

N/A

ippgDFTFwd_RToCCS_38_32f

N/A

ippgDFTFwd_RToCCS_38_64f

N/A

ippgDFTFwd_RToCCS_39_32f

N/A

ippgDFTFwd_RToCCS_39_64f

N/A

ippgDFTFwd_RToCCS_3_32f

N/A

ippgDFTFwd_RToCCS_3_64f

N/A

ippgDFTFwd_RToCCS_40_32f

N/A

ippgDFTFwd_RToCCS_40_64f

N/A

ippgDFTFwd_RToCCS_41_32f

N/A

ippgDFTFwd_RToCCS_41_64f

N/A

ippgDFTFwd_RToCCS_42_32f

N/A

ippgDFTFwd_RToCCS_42_64f

N/A

ippgDFTFwd_RToCCS_43_32f

N/A

ippgDFTFwd_RToCCS_43_64f

N/A

1

617

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippgDFTFwd_RToCCS_44_32f

N/A

ippgDFTFwd_RToCCS_44_64f

N/A

ippgDFTFwd_RToCCS_45_32f

N/A

ippgDFTFwd_RToCCS_45_64f

N/A

ippgDFTFwd_RToCCS_46_32f

N/A

ippgDFTFwd_RToCCS_46_64f

N/A

ippgDFTFwd_RToCCS_47_32f

N/A

ippgDFTFwd_RToCCS_47_64f

N/A

ippgDFTFwd_RToCCS_48_32f

N/A

ippgDFTFwd_RToCCS_48_64f

N/A

ippgDFTFwd_RToCCS_49_32f

N/A

ippgDFTFwd_RToCCS_49_64f

N/A

ippgDFTFwd_RToCCS_4_32f

N/A

ippgDFTFwd_RToCCS_4_64f

N/A

ippgDFTFwd_RToCCS_50_32f

N/A

ippgDFTFwd_RToCCS_50_64f

N/A

ippgDFTFwd_RToCCS_51_32f

N/A

ippgDFTFwd_RToCCS_51_64f

N/A

ippgDFTFwd_RToCCS_52_32f

N/A

ippgDFTFwd_RToCCS_52_64f

N/A

ippgDFTFwd_RToCCS_53_32f

N/A

ippgDFTFwd_RToCCS_53_64f

N/A

ippgDFTFwd_RToCCS_54_32f

N/A

ippgDFTFwd_RToCCS_54_64f

N/A

ippgDFTFwd_RToCCS_55_32f

N/A

ippgDFTFwd_RToCCS_55_64f

N/A

ippgDFTFwd_RToCCS_56_32f

N/A

ippgDFTFwd_RToCCS_56_64f

N/A

ippgDFTFwd_RToCCS_57_32f

N/A

ippgDFTFwd_RToCCS_57_64f

N/A

ippgDFTFwd_RToCCS_58_32f

N/A

618

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippgDFTFwd_RToCCS_58_64f

N/A

ippgDFTFwd_RToCCS_59_32f

N/A

ippgDFTFwd_RToCCS_59_64f

N/A

ippgDFTFwd_RToCCS_5_32f

N/A

ippgDFTFwd_RToCCS_5_64f

N/A

ippgDFTFwd_RToCCS_60_32f

N/A

ippgDFTFwd_RToCCS_60_64f

N/A

ippgDFTFwd_RToCCS_61_32f

N/A

ippgDFTFwd_RToCCS_61_64f

N/A

ippgDFTFwd_RToCCS_62_32f

N/A

ippgDFTFwd_RToCCS_62_64f

N/A

ippgDFTFwd_RToCCS_63_32f

N/A

ippgDFTFwd_RToCCS_63_64f

N/A

ippgDFTFwd_RToCCS_64_32f

N/A

ippgDFTFwd_RToCCS_64_64f

N/A

ippgDFTFwd_RToCCS_64f

N/A

ippgDFTFwd_RToCCS_6_32f

N/A

ippgDFTFwd_RToCCS_6_64f

N/A

ippgDFTFwd_RToCCS_7_32f

N/A

ippgDFTFwd_RToCCS_7_64f

N/A

ippgDFTFwd_RToCCS_8_32f

N/A

ippgDFTFwd_RToCCS_8_64f

N/A

ippgDFTFwd_RToCCS_9_32f

N/A

ippgDFTFwd_RToCCS_9_64f

N/A

ippgDFTFwd_RToPack_10_32f

N/A

ippgDFTFwd_RToPack_10_64f

N/A

ippgDFTFwd_RToPack_11_32f

N/A

ippgDFTFwd_RToPack_11_64f

N/A

ippgDFTFwd_RToPack_12_32f

N/A

ippgDFTFwd_RToPack_12_64f

N/A

ippgDFTFwd_RToPack_13_32f

N/A

1

619

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippgDFTFwd_RToPack_13_64f

N/A

ippgDFTFwd_RToPack_14_32f

N/A

ippgDFTFwd_RToPack_14_64f

N/A

ippgDFTFwd_RToPack_15_32f

N/A

ippgDFTFwd_RToPack_15_64f

N/A

ippgDFTFwd_RToPack_16_32f

N/A

ippgDFTFwd_RToPack_16_64f

N/A

ippgDFTFwd_RToPack_17_32f

N/A

ippgDFTFwd_RToPack_17_64f

N/A

ippgDFTFwd_RToPack_18_32f

N/A

ippgDFTFwd_RToPack_18_64f

N/A

ippgDFTFwd_RToPack_19_32f

N/A

ippgDFTFwd_RToPack_19_64f

N/A

ippgDFTFwd_RToPack_20_32f

N/A

ippgDFTFwd_RToPack_20_64f

N/A

ippgDFTFwd_RToPack_21_32f

N/A

ippgDFTFwd_RToPack_21_64f

N/A

ippgDFTFwd_RToPack_22_32f

N/A

ippgDFTFwd_RToPack_22_64f

N/A

ippgDFTFwd_RToPack_23_32f

N/A

ippgDFTFwd_RToPack_23_64f

N/A

ippgDFTFwd_RToPack_24_32f

N/A

ippgDFTFwd_RToPack_24_64f

N/A

ippgDFTFwd_RToPack_25_32f

N/A

ippgDFTFwd_RToPack_25_64f

N/A

ippgDFTFwd_RToPack_26_32f

N/A

ippgDFTFwd_RToPack_26_64f

N/A

ippgDFTFwd_RToPack_27_32f

N/A

ippgDFTFwd_RToPack_27_64f

N/A

ippgDFTFwd_RToPack_28_32f

N/A

ippgDFTFwd_RToPack_28_64f

N/A

620

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippgDFTFwd_RToPack_29_32f

N/A

ippgDFTFwd_RToPack_29_64f

N/A

ippgDFTFwd_RToPack_2_32f

N/A

ippgDFTFwd_RToPack_2_64f

N/A

ippgDFTFwd_RToPack_30_32f

N/A

ippgDFTFwd_RToPack_30_64f

N/A

ippgDFTFwd_RToPack_31_32f

N/A

ippgDFTFwd_RToPack_31_64f

N/A

ippgDFTFwd_RToPack_32_32f

N/A

ippgDFTFwd_RToPack_32_64f

N/A

ippgDFTFwd_RToPack_32f

N/A

ippgDFTFwd_RToPack_33_32f

N/A

ippgDFTFwd_RToPack_33_64f

N/A

ippgDFTFwd_RToPack_34_32f

N/A

ippgDFTFwd_RToPack_34_64f

N/A

ippgDFTFwd_RToPack_35_32f

N/A

ippgDFTFwd_RToPack_35_64f

N/A

ippgDFTFwd_RToPack_36_32f

N/A

ippgDFTFwd_RToPack_36_64f

N/A

ippgDFTFwd_RToPack_37_32f

N/A

ippgDFTFwd_RToPack_37_64f

N/A

ippgDFTFwd_RToPack_38_32f

N/A

ippgDFTFwd_RToPack_38_64f

N/A

ippgDFTFwd_RToPack_39_32f

N/A

ippgDFTFwd_RToPack_39_64f

N/A

ippgDFTFwd_RToPack_3_32f

N/A

ippgDFTFwd_RToPack_3_64f

N/A

ippgDFTFwd_RToPack_40_32f

N/A

ippgDFTFwd_RToPack_40_64f

N/A

ippgDFTFwd_RToPack_41_32f

N/A

ippgDFTFwd_RToPack_41_64f

N/A

1

621

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippgDFTFwd_RToPack_42_32f

N/A

ippgDFTFwd_RToPack_42_64f

N/A

ippgDFTFwd_RToPack_43_32f

N/A

ippgDFTFwd_RToPack_43_64f

N/A

ippgDFTFwd_RToPack_44_32f

N/A

ippgDFTFwd_RToPack_44_64f

N/A

ippgDFTFwd_RToPack_45_32f

N/A

ippgDFTFwd_RToPack_45_64f

N/A

ippgDFTFwd_RToPack_46_32f

N/A

ippgDFTFwd_RToPack_46_64f

N/A

ippgDFTFwd_RToPack_47_32f

N/A

ippgDFTFwd_RToPack_47_64f

N/A

ippgDFTFwd_RToPack_48_32f

N/A

ippgDFTFwd_RToPack_48_64f

N/A

ippgDFTFwd_RToPack_49_32f

N/A

ippgDFTFwd_RToPack_49_64f

N/A

ippgDFTFwd_RToPack_4_32f

N/A

ippgDFTFwd_RToPack_4_64f

N/A

ippgDFTFwd_RToPack_50_32f

N/A

ippgDFTFwd_RToPack_50_64f

N/A

ippgDFTFwd_RToPack_51_32f

N/A

ippgDFTFwd_RToPack_51_64f

N/A

ippgDFTFwd_RToPack_52_32f

N/A

ippgDFTFwd_RToPack_52_64f

N/A

ippgDFTFwd_RToPack_53_32f

N/A

ippgDFTFwd_RToPack_53_64f

N/A

ippgDFTFwd_RToPack_54_32f

N/A

ippgDFTFwd_RToPack_54_64f

N/A

ippgDFTFwd_RToPack_55_32f

N/A

ippgDFTFwd_RToPack_55_64f

N/A

ippgDFTFwd_RToPack_56_32f

N/A

622

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippgDFTFwd_RToPack_56_64f

N/A

ippgDFTFwd_RToPack_57_32f

N/A

ippgDFTFwd_RToPack_57_64f

N/A

ippgDFTFwd_RToPack_58_32f

N/A

ippgDFTFwd_RToPack_58_64f

N/A

ippgDFTFwd_RToPack_59_32f

N/A

ippgDFTFwd_RToPack_59_64f

N/A

ippgDFTFwd_RToPack_5_32f

N/A

ippgDFTFwd_RToPack_5_64f

N/A

ippgDFTFwd_RToPack_60_32f

N/A

ippgDFTFwd_RToPack_60_64f

N/A

ippgDFTFwd_RToPack_61_32f

N/A

ippgDFTFwd_RToPack_61_64f

N/A

ippgDFTFwd_RToPack_62_32f

N/A

ippgDFTFwd_RToPack_62_64f

N/A

ippgDFTFwd_RToPack_63_32f

N/A

ippgDFTFwd_RToPack_63_64f

N/A

ippgDFTFwd_RToPack_64_32f

N/A

ippgDFTFwd_RToPack_64_64f

N/A

ippgDFTFwd_RToPack_64f

N/A

ippgDFTFwd_RToPack_6_32f

N/A

ippgDFTFwd_RToPack_6_64f

N/A

ippgDFTFwd_RToPack_7_32f

N/A

ippgDFTFwd_RToPack_7_64f

N/A

ippgDFTFwd_RToPack_8_32f

N/A

ippgDFTFwd_RToPack_8_64f

N/A

ippgDFTFwd_RToPack_9_32f

N/A

ippgDFTFwd_RToPack_9_64f

N/A

ippgDFTFwd_RToPerm_10_32f

N/A

ippgDFTFwd_RToPerm_10_64f

N/A

ippgDFTFwd_RToPerm_11_32f

N/A

1

623

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippgDFTFwd_RToPerm_11_64f

N/A

ippgDFTFwd_RToPerm_12_32f

N/A

ippgDFTFwd_RToPerm_12_64f

N/A

ippgDFTFwd_RToPerm_13_32f

N/A

ippgDFTFwd_RToPerm_13_64f

N/A

ippgDFTFwd_RToPerm_14_32f

N/A

ippgDFTFwd_RToPerm_14_64f

N/A

ippgDFTFwd_RToPerm_15_32f

N/A

ippgDFTFwd_RToPerm_15_64f

N/A

ippgDFTFwd_RToPerm_16_32f

N/A

ippgDFTFwd_RToPerm_16_64f

N/A

ippgDFTFwd_RToPerm_17_32f

N/A

ippgDFTFwd_RToPerm_17_64f

N/A

ippgDFTFwd_RToPerm_18_32f

N/A

ippgDFTFwd_RToPerm_18_64f

N/A

ippgDFTFwd_RToPerm_19_32f

N/A

ippgDFTFwd_RToPerm_19_64f

N/A

ippgDFTFwd_RToPerm_20_32f

N/A

ippgDFTFwd_RToPerm_20_64f

N/A

ippgDFTFwd_RToPerm_21_32f

N/A

ippgDFTFwd_RToPerm_21_64f

N/A

ippgDFTFwd_RToPerm_22_32f

N/A

ippgDFTFwd_RToPerm_22_64f

N/A

ippgDFTFwd_RToPerm_23_32f

N/A

ippgDFTFwd_RToPerm_23_64f

N/A

ippgDFTFwd_RToPerm_24_32f

N/A

ippgDFTFwd_RToPerm_24_64f

N/A

ippgDFTFwd_RToPerm_25_32f

N/A

ippgDFTFwd_RToPerm_25_64f

N/A

ippgDFTFwd_RToPerm_26_32f

N/A

ippgDFTFwd_RToPerm_26_64f

N/A

624

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippgDFTFwd_RToPerm_27_32f

N/A

ippgDFTFwd_RToPerm_27_64f

N/A

ippgDFTFwd_RToPerm_28_32f

N/A

ippgDFTFwd_RToPerm_28_64f

N/A

ippgDFTFwd_RToPerm_29_32f

N/A

ippgDFTFwd_RToPerm_29_64f

N/A

ippgDFTFwd_RToPerm_2_32f

N/A

ippgDFTFwd_RToPerm_2_64f

N/A

ippgDFTFwd_RToPerm_30_32f

N/A

ippgDFTFwd_RToPerm_30_64f

N/A

ippgDFTFwd_RToPerm_31_32f

N/A

ippgDFTFwd_RToPerm_31_64f

N/A

ippgDFTFwd_RToPerm_32_32f

N/A

ippgDFTFwd_RToPerm_32_64f

N/A

ippgDFTFwd_RToPerm_32f

N/A

ippgDFTFwd_RToPerm_33_32f

N/A

ippgDFTFwd_RToPerm_33_64f

N/A

ippgDFTFwd_RToPerm_34_32f

N/A

ippgDFTFwd_RToPerm_34_64f

N/A

ippgDFTFwd_RToPerm_35_32f

N/A

ippgDFTFwd_RToPerm_35_64f

N/A

ippgDFTFwd_RToPerm_36_32f

N/A

ippgDFTFwd_RToPerm_36_64f

N/A

ippgDFTFwd_RToPerm_37_32f

N/A

ippgDFTFwd_RToPerm_37_64f

N/A

ippgDFTFwd_RToPerm_38_32f

N/A

ippgDFTFwd_RToPerm_38_64f

N/A

ippgDFTFwd_RToPerm_39_32f

N/A

ippgDFTFwd_RToPerm_39_64f

N/A

ippgDFTFwd_RToPerm_3_32f

N/A

ippgDFTFwd_RToPerm_3_64f

N/A

1

625

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippgDFTFwd_RToPerm_40_32f

N/A

ippgDFTFwd_RToPerm_40_64f

N/A

ippgDFTFwd_RToPerm_41_32f

N/A

ippgDFTFwd_RToPerm_41_64f

N/A

ippgDFTFwd_RToPerm_42_32f

N/A

ippgDFTFwd_RToPerm_42_64f

N/A

ippgDFTFwd_RToPerm_43_32f

N/A

ippgDFTFwd_RToPerm_43_64f

N/A

ippgDFTFwd_RToPerm_44_32f

N/A

ippgDFTFwd_RToPerm_44_64f

N/A

ippgDFTFwd_RToPerm_45_32f

N/A

ippgDFTFwd_RToPerm_45_64f

N/A

ippgDFTFwd_RToPerm_46_32f

N/A

ippgDFTFwd_RToPerm_46_64f

N/A

ippgDFTFwd_RToPerm_47_32f

N/A

ippgDFTFwd_RToPerm_47_64f

N/A

ippgDFTFwd_RToPerm_48_32f

N/A

ippgDFTFwd_RToPerm_48_64f

N/A

ippgDFTFwd_RToPerm_49_32f

N/A

ippgDFTFwd_RToPerm_49_64f

N/A

ippgDFTFwd_RToPerm_4_32f

N/A

ippgDFTFwd_RToPerm_4_64f

N/A

ippgDFTFwd_RToPerm_50_32f

N/A

ippgDFTFwd_RToPerm_50_64f

N/A

ippgDFTFwd_RToPerm_51_32f

N/A

ippgDFTFwd_RToPerm_51_64f

N/A

ippgDFTFwd_RToPerm_52_32f

N/A

ippgDFTFwd_RToPerm_52_64f

N/A

ippgDFTFwd_RToPerm_53_32f

N/A

ippgDFTFwd_RToPerm_53_64f

N/A

ippgDFTFwd_RToPerm_54_32f

N/A

626

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippgDFTFwd_RToPerm_54_64f

N/A

ippgDFTFwd_RToPerm_55_32f

N/A

ippgDFTFwd_RToPerm_55_64f

N/A

ippgDFTFwd_RToPerm_56_32f

N/A

ippgDFTFwd_RToPerm_56_64f

N/A

ippgDFTFwd_RToPerm_57_32f

N/A

ippgDFTFwd_RToPerm_57_64f

N/A

ippgDFTFwd_RToPerm_58_32f

N/A

ippgDFTFwd_RToPerm_58_64f

N/A

ippgDFTFwd_RToPerm_59_32f

N/A

ippgDFTFwd_RToPerm_59_64f

N/A

ippgDFTFwd_RToPerm_5_32f

N/A

ippgDFTFwd_RToPerm_5_64f

N/A

ippgDFTFwd_RToPerm_60_32f

N/A

ippgDFTFwd_RToPerm_60_64f

N/A

ippgDFTFwd_RToPerm_61_32f

N/A

ippgDFTFwd_RToPerm_61_64f

N/A

ippgDFTFwd_RToPerm_62_32f

N/A

ippgDFTFwd_RToPerm_62_64f

N/A

ippgDFTFwd_RToPerm_63_32f

N/A

ippgDFTFwd_RToPerm_63_64f

N/A

ippgDFTFwd_RToPerm_64_32f

N/A

ippgDFTFwd_RToPerm_64_64f

N/A

ippgDFTFwd_RToPerm_64f

N/A

ippgDFTFwd_RToPerm_6_32f

N/A

ippgDFTFwd_RToPerm_6_64f

N/A

ippgDFTFwd_RToPerm_7_32f

N/A

ippgDFTFwd_RToPerm_7_64f

N/A

ippgDFTFwd_RToPerm_8_32f

N/A

ippgDFTFwd_RToPerm_8_64f

N/A

ippgDFTFwd_RToPerm_9_32f

N/A

1

627

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippgDFTFwd_RToPerm_9_64f

N/A

ippgDFTInv_CCSToR_10_32f

N/A

ippgDFTInv_CCSToR_10_64f

N/A

ippgDFTInv_CCSToR_11_32f

N/A

ippgDFTInv_CCSToR_11_64f

N/A

ippgDFTInv_CCSToR_12_32f

N/A

ippgDFTInv_CCSToR_12_64f

N/A

ippgDFTInv_CCSToR_13_32f

N/A

ippgDFTInv_CCSToR_13_64f

N/A

ippgDFTInv_CCSToR_14_32f

N/A

ippgDFTInv_CCSToR_14_64f

N/A

ippgDFTInv_CCSToR_15_32f

N/A

ippgDFTInv_CCSToR_15_64f

N/A

ippgDFTInv_CCSToR_16_32f

N/A

ippgDFTInv_CCSToR_16_64f

N/A

ippgDFTInv_CCSToR_17_32f

N/A

ippgDFTInv_CCSToR_17_64f

N/A

ippgDFTInv_CCSToR_18_32f

N/A

ippgDFTInv_CCSToR_18_64f

N/A

ippgDFTInv_CCSToR_19_32f

N/A

ippgDFTInv_CCSToR_19_64f

N/A

ippgDFTInv_CCSToR_20_32f

N/A

ippgDFTInv_CCSToR_20_64f

N/A

ippgDFTInv_CCSToR_21_32f

N/A

ippgDFTInv_CCSToR_21_64f

N/A

ippgDFTInv_CCSToR_22_32f

N/A

ippgDFTInv_CCSToR_22_64f

N/A

ippgDFTInv_CCSToR_23_32f

N/A

ippgDFTInv_CCSToR_23_64f

N/A

ippgDFTInv_CCSToR_24_32f

N/A

ippgDFTInv_CCSToR_24_64f

N/A

628

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippgDFTInv_CCSToR_25_32f

N/A

ippgDFTInv_CCSToR_25_64f

N/A

ippgDFTInv_CCSToR_26_32f

N/A

ippgDFTInv_CCSToR_26_64f

N/A

ippgDFTInv_CCSToR_27_32f

N/A

ippgDFTInv_CCSToR_27_64f

N/A

ippgDFTInv_CCSToR_28_32f

N/A

ippgDFTInv_CCSToR_28_64f

N/A

ippgDFTInv_CCSToR_29_32f

N/A

ippgDFTInv_CCSToR_29_64f

N/A

ippgDFTInv_CCSToR_2_32f

N/A

ippgDFTInv_CCSToR_2_64f

N/A

ippgDFTInv_CCSToR_30_32f

N/A

ippgDFTInv_CCSToR_30_64f

N/A

ippgDFTInv_CCSToR_31_32f

N/A

ippgDFTInv_CCSToR_31_64f

N/A

ippgDFTInv_CCSToR_32_32f

N/A

ippgDFTInv_CCSToR_32_64f

N/A

ippgDFTInv_CCSToR_32f

N/A

ippgDFTInv_CCSToR_33_32f

N/A

ippgDFTInv_CCSToR_33_64f

N/A

ippgDFTInv_CCSToR_34_32f

N/A

ippgDFTInv_CCSToR_34_64f

N/A

ippgDFTInv_CCSToR_35_32f

N/A

ippgDFTInv_CCSToR_35_64f

N/A

ippgDFTInv_CCSToR_36_32f

N/A

ippgDFTInv_CCSToR_36_64f

N/A

ippgDFTInv_CCSToR_37_32f

N/A

ippgDFTInv_CCSToR_37_64f

N/A

ippgDFTInv_CCSToR_38_32f

N/A

ippgDFTInv_CCSToR_38_64f

N/A

1

629

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippgDFTInv_CCSToR_39_32f

N/A

ippgDFTInv_CCSToR_39_64f

N/A

ippgDFTInv_CCSToR_3_32f

N/A

ippgDFTInv_CCSToR_3_64f

N/A

ippgDFTInv_CCSToR_40_32f

N/A

ippgDFTInv_CCSToR_40_64f

N/A

ippgDFTInv_CCSToR_41_32f

N/A

ippgDFTInv_CCSToR_41_64f

N/A

ippgDFTInv_CCSToR_42_32f

N/A

ippgDFTInv_CCSToR_42_64f

N/A

ippgDFTInv_CCSToR_43_32f

N/A

ippgDFTInv_CCSToR_43_64f

N/A

ippgDFTInv_CCSToR_44_32f

N/A

ippgDFTInv_CCSToR_44_64f

N/A

ippgDFTInv_CCSToR_45_32f

N/A

ippgDFTInv_CCSToR_45_64f

N/A

ippgDFTInv_CCSToR_46_32f

N/A

ippgDFTInv_CCSToR_46_64f

N/A

ippgDFTInv_CCSToR_47_32f

N/A

ippgDFTInv_CCSToR_47_64f

N/A

ippgDFTInv_CCSToR_48_32f

N/A

ippgDFTInv_CCSToR_48_64f

N/A

ippgDFTInv_CCSToR_49_32f

N/A

ippgDFTInv_CCSToR_49_64f

N/A

ippgDFTInv_CCSToR_4_32f

N/A

ippgDFTInv_CCSToR_4_64f

N/A

ippgDFTInv_CCSToR_50_32f

N/A

ippgDFTInv_CCSToR_50_64f

N/A

ippgDFTInv_CCSToR_51_32f

N/A

ippgDFTInv_CCSToR_51_64f

N/A

ippgDFTInv_CCSToR_52_32f

N/A

630

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippgDFTInv_CCSToR_52_64f

N/A

ippgDFTInv_CCSToR_53_32f

N/A

ippgDFTInv_CCSToR_53_64f

N/A

ippgDFTInv_CCSToR_54_32f

N/A

ippgDFTInv_CCSToR_54_64f

N/A

ippgDFTInv_CCSToR_55_32f

N/A

ippgDFTInv_CCSToR_55_64f

N/A

ippgDFTInv_CCSToR_56_32f

N/A

ippgDFTInv_CCSToR_56_64f

N/A

ippgDFTInv_CCSToR_57_32f

N/A

ippgDFTInv_CCSToR_57_64f

N/A

ippgDFTInv_CCSToR_58_32f

N/A

ippgDFTInv_CCSToR_58_64f

N/A

ippgDFTInv_CCSToR_59_32f

N/A

ippgDFTInv_CCSToR_59_64f

N/A

ippgDFTInv_CCSToR_5_32f

N/A

ippgDFTInv_CCSToR_5_64f

N/A

ippgDFTInv_CCSToR_60_32f

N/A

ippgDFTInv_CCSToR_60_64f

N/A

ippgDFTInv_CCSToR_61_32f

N/A

ippgDFTInv_CCSToR_61_64f

N/A

ippgDFTInv_CCSToR_62_32f

N/A

ippgDFTInv_CCSToR_62_64f

N/A

ippgDFTInv_CCSToR_63_32f

N/A

ippgDFTInv_CCSToR_63_64f

N/A

ippgDFTInv_CCSToR_64_32f

N/A

ippgDFTInv_CCSToR_64_64f

N/A

ippgDFTInv_CCSToR_64f

N/A

ippgDFTInv_CCSToR_6_32f

N/A

ippgDFTInv_CCSToR_6_64f

N/A

ippgDFTInv_CCSToR_7_32f

N/A

1

631

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippgDFTInv_CCSToR_7_64f

N/A

ippgDFTInv_CCSToR_8_32f

N/A

ippgDFTInv_CCSToR_8_64f

N/A

ippgDFTInv_CCSToR_9_32f

N/A

ippgDFTInv_CCSToR_9_64f

N/A

ippgDFTInv_CToC_10_32fc

N/A

ippgDFTInv_CToC_10_64fc

N/A

ippgDFTInv_CToC_11_32fc

N/A

ippgDFTInv_CToC_11_64fc

N/A

ippgDFTInv_CToC_12_32fc

N/A

ippgDFTInv_CToC_12_64fc

N/A

ippgDFTInv_CToC_13_32fc

N/A

ippgDFTInv_CToC_13_64fc

N/A

ippgDFTInv_CToC_14_32fc

N/A

ippgDFTInv_CToC_14_64fc

N/A

ippgDFTInv_CToC_15_32fc

N/A

ippgDFTInv_CToC_15_64fc

N/A

ippgDFTInv_CToC_16_32fc

N/A

ippgDFTInv_CToC_16_64fc

N/A

ippgDFTInv_CToC_17_32fc

N/A

ippgDFTInv_CToC_17_64fc

N/A

ippgDFTInv_CToC_18_32fc

N/A

ippgDFTInv_CToC_18_64fc

N/A

ippgDFTInv_CToC_19_32fc

N/A

ippgDFTInv_CToC_19_64fc

N/A

ippgDFTInv_CToC_20_32fc

N/A

ippgDFTInv_CToC_20_64fc

N/A

ippgDFTInv_CToC_21_32fc

N/A

ippgDFTInv_CToC_21_64fc

N/A

ippgDFTInv_CToC_22_32fc

N/A

ippgDFTInv_CToC_22_64fc

N/A

632

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippgDFTInv_CToC_23_32fc

N/A

ippgDFTInv_CToC_23_64fc

N/A

ippgDFTInv_CToC_24_32fc

N/A

ippgDFTInv_CToC_24_64fc

N/A

ippgDFTInv_CToC_25_32fc

N/A

ippgDFTInv_CToC_25_64fc

N/A

ippgDFTInv_CToC_26_32fc

N/A

ippgDFTInv_CToC_26_64fc

N/A

ippgDFTInv_CToC_27_32fc

N/A

ippgDFTInv_CToC_27_64fc

N/A

ippgDFTInv_CToC_28_32fc

N/A

ippgDFTInv_CToC_28_64fc

N/A

ippgDFTInv_CToC_29_32fc

N/A

ippgDFTInv_CToC_29_64fc

N/A

ippgDFTInv_CToC_2_32fc

N/A

ippgDFTInv_CToC_2_64fc

N/A

ippgDFTInv_CToC_30_32fc

N/A

ippgDFTInv_CToC_30_64fc

N/A

ippgDFTInv_CToC_31_32fc

N/A

ippgDFTInv_CToC_31_64fc

N/A

ippgDFTInv_CToC_32_32fc

N/A

ippgDFTInv_CToC_32_64fc

N/A

ippgDFTInv_CToC_32fc

N/A

ippgDFTInv_CToC_33_32fc

N/A

ippgDFTInv_CToC_33_64fc

N/A

ippgDFTInv_CToC_34_32fc

N/A

ippgDFTInv_CToC_34_64fc

N/A

ippgDFTInv_CToC_35_32fc

N/A

ippgDFTInv_CToC_35_64fc

N/A

ippgDFTInv_CToC_36_32fc

N/A

ippgDFTInv_CToC_36_64fc

N/A

1

633

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippgDFTInv_CToC_37_32fc

N/A

ippgDFTInv_CToC_37_64fc

N/A

ippgDFTInv_CToC_38_32fc

N/A

ippgDFTInv_CToC_38_64fc

N/A

ippgDFTInv_CToC_39_32fc

N/A

ippgDFTInv_CToC_39_64fc

N/A

ippgDFTInv_CToC_3_32fc

N/A

ippgDFTInv_CToC_3_64fc

N/A

ippgDFTInv_CToC_40_32fc

N/A

ippgDFTInv_CToC_40_64fc

N/A

ippgDFTInv_CToC_41_32fc

N/A

ippgDFTInv_CToC_41_64fc

N/A

ippgDFTInv_CToC_42_32fc

N/A

ippgDFTInv_CToC_42_64fc

N/A

ippgDFTInv_CToC_43_32fc

N/A

ippgDFTInv_CToC_43_64fc

N/A

ippgDFTInv_CToC_44_32fc

N/A

ippgDFTInv_CToC_44_64fc

N/A

ippgDFTInv_CToC_45_32fc

N/A

ippgDFTInv_CToC_45_64fc

N/A

ippgDFTInv_CToC_46_32fc

N/A

ippgDFTInv_CToC_46_64fc

N/A

ippgDFTInv_CToC_47_32fc

N/A

ippgDFTInv_CToC_47_64fc

N/A

ippgDFTInv_CToC_48_32fc

N/A

ippgDFTInv_CToC_48_64fc

N/A

ippgDFTInv_CToC_49_32fc

N/A

ippgDFTInv_CToC_49_64fc

N/A

ippgDFTInv_CToC_4_32fc

N/A

ippgDFTInv_CToC_4_64fc

N/A

ippgDFTInv_CToC_50_32fc

N/A

634

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippgDFTInv_CToC_50_64fc

N/A

ippgDFTInv_CToC_51_32fc

N/A

ippgDFTInv_CToC_51_64fc

N/A

ippgDFTInv_CToC_52_32fc

N/A

ippgDFTInv_CToC_52_64fc

N/A

ippgDFTInv_CToC_53_32fc

N/A

ippgDFTInv_CToC_53_64fc

N/A

ippgDFTInv_CToC_54_32fc

N/A

ippgDFTInv_CToC_54_64fc

N/A

ippgDFTInv_CToC_55_32fc

N/A

ippgDFTInv_CToC_55_64fc

N/A

ippgDFTInv_CToC_56_32fc

N/A

ippgDFTInv_CToC_56_64fc

N/A

ippgDFTInv_CToC_57_32fc

N/A

ippgDFTInv_CToC_57_64fc

N/A

ippgDFTInv_CToC_58_32fc

N/A

ippgDFTInv_CToC_58_64fc

N/A

ippgDFTInv_CToC_59_32fc

N/A

ippgDFTInv_CToC_59_64fc

N/A

ippgDFTInv_CToC_5_32fc

N/A

ippgDFTInv_CToC_5_64fc

N/A

ippgDFTInv_CToC_60_32fc

N/A

ippgDFTInv_CToC_60_64fc

N/A

ippgDFTInv_CToC_61_32fc

N/A

ippgDFTInv_CToC_61_64fc

N/A

ippgDFTInv_CToC_62_32fc

N/A

ippgDFTInv_CToC_62_64fc

N/A

ippgDFTInv_CToC_63_32fc

N/A

ippgDFTInv_CToC_63_64fc

N/A

ippgDFTInv_CToC_64_32fc

N/A

ippgDFTInv_CToC_64_64fc

N/A

1

635

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippgDFTInv_CToC_64fc

N/A

ippgDFTInv_CToC_6_32fc

N/A

ippgDFTInv_CToC_6_64fc

N/A

ippgDFTInv_CToC_7_32fc

N/A

ippgDFTInv_CToC_7_64fc

N/A

ippgDFTInv_CToC_8_32fc

N/A

ippgDFTInv_CToC_8_64fc

N/A

ippgDFTInv_CToC_9_32fc

N/A

ippgDFTInv_CToC_9_64fc

N/A

ippgDFTInv_PackToR_10_32f

N/A

ippgDFTInv_PackToR_10_64f

N/A

ippgDFTInv_PackToR_11_32f

N/A

ippgDFTInv_PackToR_11_64f

N/A

ippgDFTInv_PackToR_12_32f

N/A

ippgDFTInv_PackToR_12_64f

N/A

ippgDFTInv_PackToR_13_32f

N/A

ippgDFTInv_PackToR_13_64f

N/A

ippgDFTInv_PackToR_14_32f

N/A

ippgDFTInv_PackToR_14_64f

N/A

ippgDFTInv_PackToR_15_32f

N/A

ippgDFTInv_PackToR_15_64f

N/A

ippgDFTInv_PackToR_16_32f

N/A

ippgDFTInv_PackToR_16_64f

N/A

ippgDFTInv_PackToR_17_32f

N/A

ippgDFTInv_PackToR_17_64f

N/A

ippgDFTInv_PackToR_18_32f

N/A

ippgDFTInv_PackToR_18_64f

N/A

ippgDFTInv_PackToR_19_32f

N/A

ippgDFTInv_PackToR_19_64f

N/A

ippgDFTInv_PackToR_20_32f

N/A

ippgDFTInv_PackToR_20_64f

N/A

636

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippgDFTInv_PackToR_21_32f

N/A

ippgDFTInv_PackToR_21_64f

N/A

ippgDFTInv_PackToR_22_32f

N/A

ippgDFTInv_PackToR_22_64f

N/A

ippgDFTInv_PackToR_23_32f

N/A

ippgDFTInv_PackToR_23_64f

N/A

ippgDFTInv_PackToR_24_32f

N/A

ippgDFTInv_PackToR_24_64f

N/A

ippgDFTInv_PackToR_25_32f

N/A

ippgDFTInv_PackToR_25_64f

N/A

ippgDFTInv_PackToR_26_32f

N/A

ippgDFTInv_PackToR_26_64f

N/A

ippgDFTInv_PackToR_27_32f

N/A

ippgDFTInv_PackToR_27_64f

N/A

ippgDFTInv_PackToR_28_32f

N/A

ippgDFTInv_PackToR_28_64f

N/A

ippgDFTInv_PackToR_29_32f

N/A

ippgDFTInv_PackToR_29_64f

N/A

ippgDFTInv_PackToR_2_32f

N/A

ippgDFTInv_PackToR_2_64f

N/A

ippgDFTInv_PackToR_30_32f

N/A

ippgDFTInv_PackToR_30_64f

N/A

ippgDFTInv_PackToR_31_32f

N/A

ippgDFTInv_PackToR_31_64f

N/A

ippgDFTInv_PackToR_32_32f

N/A

ippgDFTInv_PackToR_32_64f

N/A

ippgDFTInv_PackToR_32f

N/A

ippgDFTInv_PackToR_33_32f

N/A

ippgDFTInv_PackToR_33_64f

N/A

ippgDFTInv_PackToR_34_32f

N/A

ippgDFTInv_PackToR_34_64f

N/A

1

637

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippgDFTInv_PackToR_35_32f

N/A

ippgDFTInv_PackToR_35_64f

N/A

ippgDFTInv_PackToR_36_32f

N/A

ippgDFTInv_PackToR_36_64f

N/A

ippgDFTInv_PackToR_37_32f

N/A

ippgDFTInv_PackToR_37_64f

N/A

ippgDFTInv_PackToR_38_32f

N/A

ippgDFTInv_PackToR_38_64f

N/A

ippgDFTInv_PackToR_39_32f

N/A

ippgDFTInv_PackToR_39_64f

N/A

ippgDFTInv_PackToR_3_32f

N/A

ippgDFTInv_PackToR_3_64f

N/A

ippgDFTInv_PackToR_40_32f

N/A

ippgDFTInv_PackToR_40_64f

N/A

ippgDFTInv_PackToR_41_32f

N/A

ippgDFTInv_PackToR_41_64f

N/A

ippgDFTInv_PackToR_42_32f

N/A

ippgDFTInv_PackToR_42_64f

N/A

ippgDFTInv_PackToR_43_32f

N/A

ippgDFTInv_PackToR_43_64f

N/A

ippgDFTInv_PackToR_44_32f

N/A

ippgDFTInv_PackToR_44_64f

N/A

ippgDFTInv_PackToR_45_32f

N/A

ippgDFTInv_PackToR_45_64f

N/A

ippgDFTInv_PackToR_46_32f

N/A

ippgDFTInv_PackToR_46_64f

N/A

ippgDFTInv_PackToR_47_32f

N/A

ippgDFTInv_PackToR_47_64f

N/A

ippgDFTInv_PackToR_48_32f

N/A

ippgDFTInv_PackToR_48_64f

N/A

ippgDFTInv_PackToR_49_32f

N/A

638

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippgDFTInv_PackToR_49_64f

N/A

ippgDFTInv_PackToR_4_32f

N/A

ippgDFTInv_PackToR_4_64f

N/A

ippgDFTInv_PackToR_50_32f

N/A

ippgDFTInv_PackToR_50_64f

N/A

ippgDFTInv_PackToR_51_32f

N/A

ippgDFTInv_PackToR_51_64f

N/A

ippgDFTInv_PackToR_52_32f

N/A

ippgDFTInv_PackToR_52_64f

N/A

ippgDFTInv_PackToR_53_32f

N/A

ippgDFTInv_PackToR_53_64f

N/A

ippgDFTInv_PackToR_54_32f

N/A

ippgDFTInv_PackToR_54_64f

N/A

ippgDFTInv_PackToR_55_32f

N/A

ippgDFTInv_PackToR_55_64f

N/A

ippgDFTInv_PackToR_56_32f

N/A

ippgDFTInv_PackToR_56_64f

N/A

ippgDFTInv_PackToR_57_32f

N/A

ippgDFTInv_PackToR_57_64f

N/A

ippgDFTInv_PackToR_58_32f

N/A

ippgDFTInv_PackToR_58_64f

N/A

ippgDFTInv_PackToR_59_32f

N/A

ippgDFTInv_PackToR_59_64f

N/A

ippgDFTInv_PackToR_5_32f

N/A

ippgDFTInv_PackToR_5_64f

N/A

ippgDFTInv_PackToR_60_32f

N/A

ippgDFTInv_PackToR_60_64f

N/A

ippgDFTInv_PackToR_61_32f

N/A

ippgDFTInv_PackToR_61_64f

N/A

ippgDFTInv_PackToR_62_32f

N/A

ippgDFTInv_PackToR_62_64f

N/A

1

639

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippgDFTInv_PackToR_63_32f

N/A

ippgDFTInv_PackToR_63_64f

N/A

ippgDFTInv_PackToR_64_32f

N/A

ippgDFTInv_PackToR_64_64f

N/A

ippgDFTInv_PackToR_64f

N/A

ippgDFTInv_PackToR_6_32f

N/A

ippgDFTInv_PackToR_6_64f

N/A

ippgDFTInv_PackToR_7_32f

N/A

ippgDFTInv_PackToR_7_64f

N/A

ippgDFTInv_PackToR_8_32f

N/A

ippgDFTInv_PackToR_8_64f

N/A

ippgDFTInv_PackToR_9_32f

N/A

ippgDFTInv_PackToR_9_64f

N/A

ippgDFTInv_PermToR_10_32f

N/A

ippgDFTInv_PermToR_10_64f

N/A

ippgDFTInv_PermToR_11_32f

N/A

ippgDFTInv_PermToR_11_64f

N/A

ippgDFTInv_PermToR_12_32f

N/A

ippgDFTInv_PermToR_12_64f

N/A

ippgDFTInv_PermToR_13_32f

N/A

ippgDFTInv_PermToR_13_64f

N/A

ippgDFTInv_PermToR_14_32f

N/A

ippgDFTInv_PermToR_14_64f

N/A

ippgDFTInv_PermToR_15_32f

N/A

ippgDFTInv_PermToR_15_64f

N/A

ippgDFTInv_PermToR_16_32f

N/A

ippgDFTInv_PermToR_16_64f

N/A

ippgDFTInv_PermToR_17_32f

N/A

ippgDFTInv_PermToR_17_64f

N/A

ippgDFTInv_PermToR_18_32f

N/A

ippgDFTInv_PermToR_18_64f

N/A

640

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippgDFTInv_PermToR_19_32f

N/A

ippgDFTInv_PermToR_19_64f

N/A

ippgDFTInv_PermToR_20_32f

N/A

ippgDFTInv_PermToR_20_64f

N/A

ippgDFTInv_PermToR_21_32f

N/A

ippgDFTInv_PermToR_21_64f

N/A

ippgDFTInv_PermToR_22_32f

N/A

ippgDFTInv_PermToR_22_64f

N/A

ippgDFTInv_PermToR_23_32f

N/A

ippgDFTInv_PermToR_23_64f

N/A

ippgDFTInv_PermToR_24_32f

N/A

ippgDFTInv_PermToR_24_64f

N/A

ippgDFTInv_PermToR_25_32f

N/A

ippgDFTInv_PermToR_25_64f

N/A

ippgDFTInv_PermToR_26_32f

N/A

ippgDFTInv_PermToR_26_64f

N/A

ippgDFTInv_PermToR_27_32f

N/A

ippgDFTInv_PermToR_27_64f

N/A

ippgDFTInv_PermToR_28_32f

N/A

ippgDFTInv_PermToR_28_64f

N/A

ippgDFTInv_PermToR_29_32f

N/A

ippgDFTInv_PermToR_29_64f

N/A

ippgDFTInv_PermToR_2_32f

N/A

ippgDFTInv_PermToR_2_64f

N/A

ippgDFTInv_PermToR_30_32f

N/A

ippgDFTInv_PermToR_30_64f

N/A

ippgDFTInv_PermToR_31_32f

N/A

ippgDFTInv_PermToR_31_64f

N/A

ippgDFTInv_PermToR_32_32f

N/A

ippgDFTInv_PermToR_32_64f

N/A

ippgDFTInv_PermToR_32f

N/A

1

641

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippgDFTInv_PermToR_33_32f

N/A

ippgDFTInv_PermToR_33_64f

N/A

ippgDFTInv_PermToR_34_32f

N/A

ippgDFTInv_PermToR_34_64f

N/A

ippgDFTInv_PermToR_35_32f

N/A

ippgDFTInv_PermToR_35_64f

N/A

ippgDFTInv_PermToR_36_32f

N/A

ippgDFTInv_PermToR_36_64f

N/A

ippgDFTInv_PermToR_37_32f

N/A

ippgDFTInv_PermToR_37_64f

N/A

ippgDFTInv_PermToR_38_32f

N/A

ippgDFTInv_PermToR_38_64f

N/A

ippgDFTInv_PermToR_39_32f

N/A

ippgDFTInv_PermToR_39_64f

N/A

ippgDFTInv_PermToR_3_32f

N/A

ippgDFTInv_PermToR_3_64f

N/A

ippgDFTInv_PermToR_40_32f

N/A

ippgDFTInv_PermToR_40_64f

N/A

ippgDFTInv_PermToR_41_32f

N/A

ippgDFTInv_PermToR_41_64f

N/A

ippgDFTInv_PermToR_42_32f

N/A

ippgDFTInv_PermToR_42_64f

N/A

ippgDFTInv_PermToR_43_32f

N/A

ippgDFTInv_PermToR_43_64f

N/A

ippgDFTInv_PermToR_44_32f

N/A

ippgDFTInv_PermToR_44_64f

N/A

ippgDFTInv_PermToR_45_32f

N/A

ippgDFTInv_PermToR_45_64f

N/A

ippgDFTInv_PermToR_46_32f

N/A

ippgDFTInv_PermToR_46_64f

N/A

ippgDFTInv_PermToR_47_32f

N/A

642

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippgDFTInv_PermToR_47_64f

N/A

ippgDFTInv_PermToR_48_32f

N/A

ippgDFTInv_PermToR_48_64f

N/A

ippgDFTInv_PermToR_49_32f

N/A

ippgDFTInv_PermToR_49_64f

N/A

ippgDFTInv_PermToR_4_32f

N/A

ippgDFTInv_PermToR_4_64f

N/A

ippgDFTInv_PermToR_50_32f

N/A

ippgDFTInv_PermToR_50_64f

N/A

ippgDFTInv_PermToR_51_32f

N/A

ippgDFTInv_PermToR_51_64f

N/A

ippgDFTInv_PermToR_52_32f

N/A

ippgDFTInv_PermToR_52_64f

N/A

ippgDFTInv_PermToR_53_32f

N/A

ippgDFTInv_PermToR_53_64f

N/A

ippgDFTInv_PermToR_54_32f

N/A

ippgDFTInv_PermToR_54_64f

N/A

ippgDFTInv_PermToR_55_32f

N/A

ippgDFTInv_PermToR_55_64f

N/A

ippgDFTInv_PermToR_56_32f

N/A

ippgDFTInv_PermToR_56_64f

N/A

ippgDFTInv_PermToR_57_32f

N/A

ippgDFTInv_PermToR_57_64f

N/A

ippgDFTInv_PermToR_58_32f

N/A

ippgDFTInv_PermToR_58_64f

N/A

ippgDFTInv_PermToR_59_32f

N/A

ippgDFTInv_PermToR_59_64f

N/A

ippgDFTInv_PermToR_5_32f

N/A

ippgDFTInv_PermToR_5_64f

N/A

ippgDFTInv_PermToR_60_32f

N/A

ippgDFTInv_PermToR_60_64f

N/A

1

643

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippgDFTInv_PermToR_61_32f

N/A

ippgDFTInv_PermToR_61_64f

N/A

ippgDFTInv_PermToR_62_32f

N/A

ippgDFTInv_PermToR_62_64f

N/A

ippgDFTInv_PermToR_63_32f

N/A

ippgDFTInv_PermToR_63_64f

N/A

ippgDFTInv_PermToR_64_32f

N/A

ippgDFTInv_PermToR_64_64f

N/A

ippgDFTInv_PermToR_64f

N/A

ippgDFTInv_PermToR_6_32f

N/A

ippgDFTInv_PermToR_6_64f

N/A

ippgDFTInv_PermToR_7_32f

N/A

ippgDFTInv_PermToR_7_64f

N/A

ippgDFTInv_PermToR_8_32f

N/A

ippgDFTInv_PermToR_8_64f

N/A

ippgDFTInv_PermToR_9_32f

N/A

ippgDFTInv_PermToR_9_64f

N/A

ippgHartley_10_32f

N/A

ippgHartley_10_64f

N/A

ippgHartley_11_32f

N/A

ippgHartley_11_64f

N/A

ippgHartley_12_32f

N/A

ippgHartley_12_64f

N/A

ippgHartley_13_32f

N/A

ippgHartley_13_64f

N/A

ippgHartley_14_32f

N/A

ippgHartley_14_64f

N/A

ippgHartley_15_32f

N/A

ippgHartley_15_64f

N/A

ippgHartley_16_32f

N/A

ippgHartley_16_64f

N/A

644

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippgHartley_17_32f

N/A

ippgHartley_17_64f

N/A

ippgHartley_18_32f

N/A

ippgHartley_18_64f

N/A

ippgHartley_19_32f

N/A

ippgHartley_19_64f

N/A

ippgHartley_20_32f

N/A

ippgHartley_20_64f

N/A

ippgHartley_21_32f

N/A

ippgHartley_21_64f

N/A

ippgHartley_22_32f

N/A

ippgHartley_22_64f

N/A

ippgHartley_23_32f

N/A

ippgHartley_23_64f

N/A

ippgHartley_24_32f

N/A

ippgHartley_24_64f

N/A

ippgHartley_25_32f

N/A

ippgHartley_25_64f

N/A

ippgHartley_26_32f

N/A

ippgHartley_26_64f

N/A

ippgHartley_27_32f

N/A

ippgHartley_27_64f

N/A

ippgHartley_28_32f

N/A

ippgHartley_28_64f

N/A

ippgHartley_29_32f

N/A

ippgHartley_29_64f

N/A

ippgHartley_2_32f

N/A

ippgHartley_2_64f

N/A

ippgHartley_30_32f

N/A

ippgHartley_30_64f

N/A

ippgHartley_31_32f

N/A

1

645

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippgHartley_31_64f

N/A

ippgHartley_32_32f

N/A

ippgHartley_32_64f

N/A

ippgHartley_32f

N/A

ippgHartley_33_32f

N/A

ippgHartley_33_64f

N/A

ippgHartley_34_32f

N/A

ippgHartley_34_64f

N/A

ippgHartley_35_32f

N/A

ippgHartley_35_64f

N/A

ippgHartley_36_32f

N/A

ippgHartley_36_64f

N/A

ippgHartley_37_32f

N/A

ippgHartley_37_64f

N/A

ippgHartley_38_32f

N/A

ippgHartley_38_64f

N/A

ippgHartley_39_32f

N/A

ippgHartley_39_64f

N/A

ippgHartley_3_32f

N/A

ippgHartley_3_64f

N/A

ippgHartley_40_32f

N/A

ippgHartley_40_64f

N/A

ippgHartley_41_32f

N/A

ippgHartley_41_64f

N/A

ippgHartley_42_32f

N/A

ippgHartley_42_64f

N/A

ippgHartley_43_32f

N/A

ippgHartley_43_64f

N/A

ippgHartley_44_32f

N/A

ippgHartley_44_64f

N/A

ippgHartley_45_32f

N/A

646

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippgHartley_45_64f

N/A

ippgHartley_46_32f

N/A

ippgHartley_46_64f

N/A

ippgHartley_47_32f

N/A

ippgHartley_47_64f

N/A

ippgHartley_48_32f

N/A

ippgHartley_48_64f

N/A

ippgHartley_49_32f

N/A

ippgHartley_49_64f

N/A

ippgHartley_4_32f

N/A

ippgHartley_4_64f

N/A

ippgHartley_50_32f

N/A

ippgHartley_50_64f

N/A

ippgHartley_51_32f

N/A

ippgHartley_51_64f

N/A

ippgHartley_52_32f

N/A

ippgHartley_52_64f

N/A

ippgHartley_53_32f

N/A

ippgHartley_53_64f

N/A

ippgHartley_54_32f

N/A

ippgHartley_54_64f

N/A

ippgHartley_55_32f

N/A

ippgHartley_55_64f

N/A

ippgHartley_56_32f

N/A

ippgHartley_56_64f

N/A

ippgHartley_57_32f

N/A

ippgHartley_57_64f

N/A

ippgHartley_58_32f

N/A

ippgHartley_58_64f

N/A

ippgHartley_59_32f

N/A

ippgHartley_59_64f

N/A

1

647

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippgHartley_5_32f

N/A

ippgHartley_5_64f

N/A

ippgHartley_60_32f

N/A

ippgHartley_60_64f

N/A

ippgHartley_61_32f

N/A

ippgHartley_61_64f

N/A

ippgHartley_62_32f

N/A

ippgHartley_62_64f

N/A

ippgHartley_63_32f

N/A

ippgHartley_63_64f

N/A

ippgHartley_64_32f

N/A

ippgHartley_64_64f

N/A

ippgHartley_64f

N/A

ippgHartley_6_32f

N/A

ippgHartley_6_64f

N/A

ippgHartley_7_32f

N/A

ippgHartley_7_64f

N/A

ippgHartley_8_32f

N/A

ippgHartley_8_64f

N/A

ippgHartley_9_32f

N/A

ippgHartley_9_64f

N/A

ippgWHTGetBufferSize_32f

N/A

ippgWHTGetBufferSize_64f

N/A

ippgWHT_10_32f

N/A

ippgWHT_10_64f

N/A

ippgWHT_11_32f

N/A

ippgWHT_11_64f

N/A

ippgWHT_12_32f

N/A

ippgWHT_12_64f

N/A

ippgWHT_13_32f

N/A

ippgWHT_13_64f

N/A

648

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippgWHT_1_32f

N/A

ippgWHT_1_64f

N/A

ippgWHT_2_32f

N/A

ippgWHT_2_64f

N/A

ippgWHT_32f

N/A

ippgWHT_3_32f

N/A

ippgWHT_3_64f

N/A

ippgWHT_4_32f

N/A

ippgWHT_4_64f

N/A

ippgWHT_5_32f

N/A

ippgWHT_5_64f

N/A

ippgWHT_64f

N/A

ippgWHT_6_32f

N/A

ippgWHT_6_64f

N/A

ippgWHT_7_32f

N/A

ippgWHT_7_64f

N/A

ippgWHT_8_32f

N/A

ippgWHT_8_64f

N/A

ippgWHT_9_32f

N/A

ippgWHT_9_64f

N/A

ippgenGetLibVersion

N/A

1

Bibliography for Signal Processing
This bibliography provides a list of reference books and other sources of additional information that might beuseful to the application programmer. This list is neither complete nor exhaustive, but serves as a starting
point. Of all the references listed, [Mit93] will be the most useful to those readers who already have a basic
understanding of signal processing. This reference collects the work of 27 experts in the field and has both
great breadth and depth.
The books [Opp75], [Opp89], [Jack89], and [Zie83] are undergraduate signal processing texts. [Opp89] is amuch revised edition of the classic [Opp75]; [Jack89] is more concise than the others; and [Zie83] also
covers continuous-time systems.
[AMRWB+]

3GPP Technical Specification 26.290: Extended Adaptive Multi-Rate Wideband (AMR-WB+) codec; Transcoding functions, v.6.3.0, rel.6,
June-2005.

[Arn97]

Z. Arnavut, S. Magliveras. Block-Sorting and Compression. IEEE Data
Compression Conference, Snowbird, Utah, pp.181-190, March 1997.

649

1

Intel® Integrated Performance Primitives Developer Guide and Reference[Ash94]

M.R. Asharif and F. Amano. Acoustic Echo Canceler Using the FBAF
Algorithm. IEEE Trans. Comm., Vol. 42, No. 12, pp. 3090-3094, Dec.
1994.

[Berl68]

Elwin R. Berlekamp. Algebraic Coding Theory. McGraw-Hill Book
Company, 1968

[Bla84]

Richard E. Blahut. Theory and Practice of Error Control Codes.
Addison-Wesley Publishing Company, 1984

[Bris94]

C. Brislawn. Classification of Nonexpansive Symmetric Extension
Transforms for Multirate Filter Banks. Los Alamos Report LAUR-94-1747, 1994.

[Cap78]

V. Cappellini, A. G. Constantinides, and P. Emilani. Digital Filters andTheir Applications. Academic Press, London, 1978.

[Cap94]Cappé O. Elimination of the musical noise phenomenon with the
Ephraim and Malah noise suppressor. IEEE Trans. Speech and Audio
Processing, vol. 2(2), (1994).

[Cast93]

G.Castagnoli, S.Brauer, M.Herrmann. Optimization of cyclic
redundancy-check codes with 24 and 32 parity bits. IEEE Transactions
on Communications, Vol.41, No.6, June, 1993, pp.883-892.

[CCITT]

CCITT, Recommendation G.711. Pulse Code Modulation ofFrequencies, 1984.

[Coh02]

I. Cohen and B. Berdugo. Noise Estimation by Minima Controlled
Recursive Averaging for Robust Speech Enhancement. IEEE Signal
Proc. Letters, Vol. 9, No. 1, Jan. 2002, pp. 12-15.

[Cro83]R. E. Crochiere and L. R. Rabiner. Multirate Digital Signal Processing.
Prentice Hall, Englewood Cliffs, New Jersey, 1983.

[Dau92]

I. Daubechies. Ten Lectures on Wavelets. Springer Verlag,
Pennsylvania, 1992.

[Eph84]Y. Ephraim and D. Malah. Speech Enhancement Using a Minimum
Mean-Square Error Short-Time Spectral Amplitude Estimator. IEEE
Trans. ASSP, Vol. 32, No. 6, Dec. 1984, pp. 1109-1121.

[ETSI02]ETSI TS 102 114:2002 (DTS Coherent Acoustics - Core andExtensions)(2002). http://www.etsi.org/services_products/
freestandard/home.htm[EC126]ETSI TS 126 404 V6.0.0. UMTS. General audio codec audio processing
functions; Enhanced aacPlus general audio codec; Encoder
specification; SBR PART - 3GPP TS 26.404 version 6.0.0 Release 6(09/2004).

[ES201]ETSI ES 201 108 V1.1.2. ETSI Standard. Speech processing,Transmission and Quality aspects (STQ); Distributed speech
recognition; Front-end feature extraction algorithm; Compression
algorithms.

[ES202]ETSI ES 202 050 V1.1.1. ETSI Standard. Speech processing,Transmission and Quality aspects (STQ); Distributed speech
recognition; Advanced front-end feature extraction algorithm;
Compression algorithms.

[Feig92]

E. Feig and S. Winograd. Fast algorithms for DCT. IEEE Transactions
on Signal Processing, vol.40, No.9, 1992.

650

1

Developer Guide and Reference for Intel® Integrated Performance Primitives[Gal75]

R. Gallager, D.Van Voorhis. Optimal source codes for geometrically
distributed integer alphabets. IEEE Transactions on Information
Theory, vol. IT-21, No. 3, pp.228-230, 1975.

[Griff87]

G.Griffiths, G.C.Stones. The tea-leaf reader algorithm: an efficient
implementation of CRC-16 and CRC-32. Communications of the ACM ,vol.30, No.7, 1987, pp.617-620.

[Ham83]

R.W. Hamming. Digital Filters, Prentice-Hall, New Jersey 1983.

[Har78]

F. Harris. On the Use of Windows. Proceedings of the IEEE, vol. 66,
No.1, IEEE, 1978.

[Hay91]

S. Haykin. Adaptive Filter Theory. Prentice Hall, Englewood Cliffs, New
Jersey, 1991.

[ICCC]

Intel (R) C++ Compiler 11.1. User and Reference Guides.. Document
number 304968-023US.

[ISO11172]

ISO/IEC 11172-3 - Information technology. Coding of moving pictures
and associated audio for digital storage media at up to about 1,5
Mbit/s. Part 3: Audio (1993)[ISO13818 ]ISO/IEC 13818-3 - Information technology. Generic coding of moving
pictures and associated audio information. Part 3: Audio (1998).

[ISO14496]

ISO/IEC 14496-3 - Information technology. Coding of audio-visualobjects. Part 3: Audio (2001).

[ISO14496A]

ISO/IEC 14496-3/Amd.1:2003 - Bandwidth Extension (2003).

[ISO14496B]

ISO/IEC 14496-3/Amd.2:2004 - Parametric coding for high-quality
audio (2004).

[ITU169]

JITU-T Recommendation G.169. Automatic Level Control Devices,(06/99).

[ITU224]

ITU-T Recommendation X.224 Annex D. Checksum Algorithms,(11/93), pp144,145.

[ITU722]

ITU-T Recommendation G.722.1 (09/99), Coding at 24 and 32 8 kbit/s
for hand-free operation in systems with low frame loss.

[ITU723]

ITU-T Recommendation G.723.1 . Dual Rate speech coder for
Multimedia Communications transmitting at 5.3 and 6.3 Kbit/s,(03/96).

[ITU723A]

ITU-T Recommendation G.723.1 Annex A. Silence compression
scheme, (11/96).

[ITU728]

ITU-T Recommendation G.728. Coding of Speech at 16 kbits/s Using
Low-Delay Code Excited Linear Prediction, 1992.

[ITU729]

ITU-T Recommendation G.729. Coding of Speech at 8 kbit/s Using
Conjugate-Structure Algebraic-Code-Excited Linear-Prediction (CSACELP), (03/96).

[ITU729A]

ITU-T Recommendation G.729 Annex A. Reduced Complexity 8 kbit/s
CS-ACELP speech codec, (11/96).

[ITU729B]

ITU-T Recommendation G.729 Annex B. A silence compression
scheme for G.729 optimized for terminals conforming to
Recommendation V.70, (10/96).

[ITU729B1]

ITU-T Recommendation G.729 Annex B Corrigendum 1, (02/98).

651

1

Intel® Integrated Performance Primitives Developer Guide and Reference[ITU7291]

ITU-T Recommendation G.729.1. G729 Based Embeded Variable BitRate Coder: a 8-32 kbits/s Scalable Wideband Coder Bitstream
Interoperable with G.729, (06/06).

[ITUV34]

ITU-T Recommendation V.34. A modem operating at data signallingrates of up to 33 600 bit/s for use on the general switched telephone
network and on leased point-to-point 2-wire telephone-type circuit.
(02/98).

[Jack89]

Leland B. Jackson. Digital Filters and Signal Processing. Kluwer
Academic Publishers, second edition, 1989.

[Kab86]

P. Kabal and P.Ramachandran. The Computation of line Spectral
Frequencies Using Chebyshev Polynomials. IEEE transaction on
acoustic, speech and signal processing, vol. ASSP-34, No.6, 1986.

[Lyn89]Paul A. Lynn. Introductory Digital Signal Processing with Computer
Applications. John Wiley&Sons, Inc., New York, 1993.

[Mar01]R. Martin. Noise Power Spectral Density Estimation Based on Optimal
Smoothing and Minimum Statistics. IEEE Trans. Speech and Audio,Vol. 9, No. 5, July 2001, pp. 504-512.

[Med91]

Y. Medan, E. Yair, D. Chazan. Super Resolution Pitch Determination of
Speech Signals. IEEE Transactions on Signal Processing, vol 39, No.1,
1991.

[Mit93]

Sanjit K. Mitra and James F. Kaiser editors. Handbook for Digital
Signal Processing. John Wiley & Sons, Inc., New York, 1993

[Mit98]

Sanjit K. Mitra. Digital Signal Processing. McGraw Hill, 1998.

[Mor02]Robert H.Morelos-Zaragoza. The Art of Error Correcting Coding. Wiley& Sons, Ltd., 2002.

[Nel92]

M.R.Nelson. File verification using CRC 32-bit cyclical redundancy
check. Dr.Dobb's Journal, vol. 17, Issue 5, 1992, p.64.

[NIC91]Nam Ik Cho and Sang Uk Lee. Fast algorithm and implementation of
2D DCT. IEEE Transactions on Circuits and Systems, vol. 31, No.3,
1991.

[Opp75]

A.V. Oppenheim and R.W. Schafer. Digital Signal Processing. PrenticeHall, Englewood Cliffs, New Jersey, 1975.

[Opp89]

A.V. Oppenheim and R.W. Schafer. Discrete-Time Signal Processing.
Prentice Hall, Englewood Cliffs, New Jersey, 1989.

[Rab78]L.R. Rabiner and R.W. Schafer. Digital Processing of Speech Signals.
Prentice Hall, Englewood Cliffs, New Jersey, 1978.

[Rao90]K.R. Rao and P. Yip. Discrete Cosine Transform. Algorithms,
Advantages and Applications. Academic Press, San Diego, 1990.

[RFC1950]

P.Deutsch, J-L.Gailly. ZLIB Compressed Data Format Specification
version 3.3, May, 1996. http://www.ietf.org/rfc/rfc1950.txt[RFC1951]

P.Deutsch. DEFLATE Compressed Data Format Specification version
1.3, May, 1996.
http://www.ietf.org/rfc/rfc1951.txt[RFC1952]

652

P.Deutsch. GZIP file format specification version 4.3, May, 1996.
http://www.ietf.org/rfc/rfc1952.txt

Developer Guide and Reference for Intel® Integrated Performance Primitives

1[Seg78]R. Sedgewick. Implementing quicksort programs. Communications of
the ACM, Vol. 21, No. 10, pp. 847-857, Oct. 1978.

[Storer82]

J. Storer, T.Szymanski. Data Compression via Textual Substitution.
Journal of the Association for Computing Machinery (ACM), vol.19,
No.4, pp.928-951, Oct.1982.

[Strang96]

G. Strang and T. Nguyen. Wavelet and Filter Banks. WellesleyCambridge Press, 1996, pp. 153-157.

[Tuc92]

R. Tucker. Voice Activity Detection Using a Periodicity Measure. IEEE
Proceedings-I, vol. 139, No. 4, August 1992, pp. 377-380.

[Vai93]P. P. Vaidyanathan. Multirate Systems and Filter Banks. Prentice Hall,Englewood Cliffs, New Jersey.

[Wid85]

B. Widrow and S.D. Stearns. Adaptive Signal Processing. Prentice-Hall,Englewood Cliffs, New Jersey, 1985.

[ZFP]

zfp & fpzip: Floating Point Compression. https://computation.llnl.gov/
projects/floating-point-compression[Zie83]Rodger E. Ziemer, William H. Tranter and D. Ronald Fannin. Signals
and Systems: Continuous and Discrete. Macmillan Publishing Co., New
York, 1983.

[Ziv77]

J. Ziv and A. Lempel. A Universal Algorithm for Sequential Data
Compression. IEEE Transactions on Information Theory, vol.23, No.3,
pp.337-343, May 1977.

[ZLIB]

J. Gailly and M. Adler. Zlib 1.2.8 Manual, April 2013. http://
www.zlib.net/manual.html

Glossary
adaptive filter

Colors specified by each pixel's coordinates in a color space. Intel
Integrated Performance Primitives for image processing use images
with absolute colors.An adaptive filter varies its filter coefficients(taps) over time. Typically, the filter's coefficients are varied to makeits output match a prototype “desired” signal as closely as possible.
Non-adaptive filters do not vary their filter coefficients over time.

BQ

One of the modes, which indicates that the IIR initialization function
initializes a cascade of biquads.

CCS

See complex conjugate-symmetriccompanding functions

The functions that perform an operation of data compression by using
a logarithmic encoder-decoder. Companding allows you to maintainthe percentage error constant by logarithmically spacing thequantization levels.

complex conjugate-symmetric

A kind of symmetry that arises in the Fourier transform of real signals.
A complex conjugate-symmetric signal has the property that x(-n) =x(n)*, where “*” denotes conjugation.

conjugate

The conjugate of a complex number a + bj is a - bj.

conjugate-symmetric

See complex conjugate-symmetric.

DCT

Acronym for the discrete cosine transform.

653

1

Intel® Integrated Performance Primitives Developer Guide and Reference

decimation

Filtering a signal followed by down-sampling. Filtering prevents
aliasing distortion in the subsequent down-sampling. See downsampling.

down-sampling

Down-sampling conceptually decreases a signal's sampling rate byremoving samples from between neighboring samples of a signal. Seedecimation.

element-wise

An element-wise operation performs the same operation on eachelement of a vector, or uses the elements of the same position in
multiple vectors as inputs to the operation. For example, the elementwise addition of the vectors {x0, x1, x2} and {y0, y1, y2} isperformed as follows: {x0, x1, x2} + {y0, y1, y2} = {x0 + y0, x1 +y1, x2 + y2}.

FIR

Abbreviation for finite impulse response filter. Finite impulse response
filters do not vary their filter coefficients (taps) over time.

FIR LMS

Abbreviation for least mean squares finite impulse response filter.

fixed-point data format

A format that assigns one bit for a sign and all other bits for fractional
part. This format is used for optimized conversion operations withsigned, purely fractional vectors. For example, S.31 format assumes asign bit and 31 fractional bits; S15.16 assumes a sign bit, 15 integer
bits, and 16 fractional bits.

IIR

Abbreviation for infinite impulse response filters.

in-place operation

A function that performs its operation in-place, takes its input from anarray and returns its output to the same array. See not-in-place
operation.

interpolation

Up-sampling a signal followed by filtering. The filtering gives theinserted samples a value close to the samples of their neighboring
samples in the original signal. See up-sampling.

LMS

Abbreviation for least mean square, an algorithm frequently used asa measure of the difference between two signals. Also used as
shorthand for an adaptive FIR filter employing the LMS algorithm foradaptation.

LTI

Abbreviation for linear time-invariant systems. In LTI systems, if an
input consists of the sum of a number of signals, then the output isthe sum of the system's responses to each signal consideredseparately.

MMX™ technology

An enhancement to Intel architecture aimed at better performance inmultimedia and communications applications. The technology uses
four additional data types, eight 64-bit MMX registers, and 57
additional instructions implementing the SIMD (single instruction,
multiple data) technique.

MR

One of the modes, indicating the multi-rate variety of the function.

multi-rate

An operation or signal processing system involving signals withmultiple sample rates. Decimation and interpolation are examples ofmulti-rate operations.

not-in-place operation

A function that performs its operation not-in-place takes its input froma source array and puts its output in a second, destination array.

polyphase

A computationally efficient method for multi-rate filtering. For
example, interpolation or decimation.

654

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

CCS

A representation of a complex conjugate-symmetric sequence which iseasier to use than the Pack or Perm formats.

Pack

A compact representation of a complex conjugate-symmetricsequence. The disadvantage of this format is that it is not the naturalformat used by the real FFT algorithms (“natural” in the sense that
bit-reversed order is natural for radix-2 complex FFTs).

Perm

A format for storing the values for the FFT algorithm. The Perm format
stores the values in the order in which the FFT algorithm uses them.
That is, the real and imaginary parts of a given sample need not be
adjacent.

saturation

Using saturation arithmetic, when a number exceeds the data-range
limit for its data type, it saturates to the upper data-range limit. For
example, a signed word greater than 7FFFh saturates to 7FFFh. Whena number is less than the lower data-range limit, it saturates to thelower data-range. For example, a signed word less than 8000h
saturates to 8000h.

sinusoid

See toneIntel® Streaming SIMD Extensions

The major enhancement to Intel architecture instruction set.
Incorporates a group of general-purpose floating-point instructions
operating on packed data, additional packed integer instructions,
together with cacheability control and state management instructions.
These instructions significantly improve performance of applications
using compute-intensive processing of floating-point and integer data.

tone

A sinusoid of a given frequency, phase, and magnitude. Tones areused as test signals and as building blocks for more complex signals.

up-samplingUp-sampling conceptually increases the signal sampling rate byinserting zero-valued samples between neighboring samples of asignal.

window

A mathematical function by which a signal is multiplied to improve thecharacteristics of some subsequent analysis. Windows are commonlyused in FFT-based spectral analysis.

Intel® Integrated Performance Primitives for Intel® Architecture Developer Reference.
Volume 2: Image Processing
The following are some important features of the image processing part of the Intel® Integrated Performance
Primitives (Intel® IPP) library:

Computer Vision
Computer Vision functions provide feature detection, pattern recognition, distance transform, image
segmentation, and other operations.

Image Color Conversion
Image Color Conversion functions include color model, color-gray scale, and format conversions, as well as
color twist, color keying, gamma correction, and intensity transformation.

Image Geometry Transforms
Image Geometry Transforms offer functions for resizing, rotation, warping, and remapping of an image.

655

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Filtering Functions
Filtering Functions perform convolution and deconvolution operations, as well as median, linear, separable,
Wiener, and fixed filtering.

Image Statistics Functions
Image Statistics Functions compute different statistical parameters of an image, such as sum, integral, meanand standard deviation, intensity histogram, and others.

Image Arithmetic and Logical Operations
Image Arithmetic and Logical Operations modify pixel values of an image buffer using arithmetic and logicaloperations. This group also includes functions that perform image composition based on opacity (alphablending).

Image Data Exchange and Initialization Functions
Image Data Exchange and Initialization Functions perform image data manipulation, exchange, andinitialization operations.
Product and Performance Information
Performance varies by use, configuration and other factors. Learn more at www.Intel.com/
PerformanceIndex.
Notice revision #20201201

Intel® Integrated Performance Primitives Concepts
This set of topics explains the purpose and structure of the Intel® Integrated Performance Primitives (Intel®
IPP) for Intel® Architecture software and looks over some of the basic concepts used in the image part ofIntel IPP. It also describes the supported data formats and operation modes, and defines function naming
conventions in the document.

Function Naming
Naming conventions for the Intel IPP functions are similar for all covered domains.
Function names in Intel IPP have the following general format:

ipp<data-domain><name>_<datatypedescriptor>][<_extension>](<parameters>);
The elements of this format are explained in the sections that follow.

Data-Domain
The data-domain is a single character that denotes the subset of functionality to which a given function
belongs. The current version of Intel IPP supports the following data-domains:s

for signals (expected data type is a 1D signal)i

for images and video (expected data type is a 2D image)m

for matrices (expected data type is a matrix)r

for realistic rendering functionality and 3D data processing (expected data type
depends on supported rendering techniques)gfor signals of fixed length

For example, function names that begin with ippi signify that respective functions are used for image orvideo processing.

656

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Name
The name field identifies what function does and has the following format:<name> = <operation>[_modifier]The operation component is one ore more words, acronyms, and abbreviations that describe the core
operation.
The modifier component, if present, is a word or abbreviation that denotes a slight modification or variationof the given function.
For example, names without modifiers: Add, RGBToYCbCr, MorphAddGetSize; with modifiers:
DCT8x8Inv_2x2, DCT8x8Inv_4x4, RGBToYCbCr_JPEG.

Data Types
The datatype field indicates data types used by the function, in the following format:<bit depth><bit interpretation> ,where

bit depth = <1|8|16|32|64>and

bit interpretation = <u|s|f>[c]Here u indicates “unsigned integer”, s indicates “signed integer”, f indicates “floating point”, and c indicates“complex”.
Intel IPP supports the following data types for image and video processing functions:

8u

8 bit, unsigned data

8s

8 bit, signed data

16u

16 bit, unsigned data

16uc

16-bit, complex unsigned short data †16s

16 bit, signed data

16sc

16-bit, complex short data

32u

32 bit, unsigned data

32s

32 bit, signed data

32sc

32-bit, complex int data

32f

32-bit, single-precision real floating point data

32fc

32-bit, single-precision complex floating point data64s64-bit, quadword signed data64f64-bit, double-precision real floating point data

† - only partial support for intermediate result after transforms (in the so-called “time” domain).

NOTE
For image processing functions that do not support 1u data type, convert bitonal images to 8u grayscale images using the ippiConvert_1u8u_C1R function.

657

1

Intel® Integrated Performance Primitives Developer Guide and Reference

The formats for complex data are represented in Intel IPP by structures defined as follows:

typedef struct {Ipp16s re;

Ipp16s im; } Ipp16sc;

typedef struct {Ipp32s re;

Ipp32s im; } Ipp32sc;

typedef struct {Ipp32f re;

Ipp32f im; } Ipp32fc;

where re, im denote the real and imaginary parts, respectively.
Complex data formats are used by several arithmetic image processing functions. The 32fc format is also
used to store input/output data in some Fourier transform functions.
The 64-bit formats, 64s and 64f, are used for storing data computed by some image statistics functions.
For functions that operate on a single data type, the datatype field contains only one of the values listed
above.
If a function operates on source and destination images that have different data types, the respective data
type identifiers are listed in the function name in order of source and destination as follows:<datatype> = <src1Datatype>[src2Datatype][dstDatatype]For example, the function that converts 8-bit unsigned source image data to 32-bit floating point destination
image data has the 8u32f value for the datatype field.
NOTE
In the lists of function parameters (arguments), the Ipp prefix is written in the data type. For
example, the 8-bit unsigned data is denoted as Ipp8u type. These Intel IPP-specific data types aredefined in the respective library header files.

Descriptors
The descriptors field further describes the operation. Descriptors are individual characters that indicate
additional details of the operation.
The following descriptors are used in image and video processing functions:
Descriptor

Description

A

Image data contains an alpha channel as the last channel, requires C4, alphachannel is not processed

A0

Image data contains an alpha channel as the first channel, requires C4, alphachannel is not processed

C1, C2, C3, C4

Image data is in pixel order and made up of 1, 2, 3 or 4 discrete interleaved
channelsC

Channel of interest (COI) is used in the operation

I

Operation is performed in-place - that is result of operation is written back into thesource (default is not-in-place)

M

Operation uses a mask to determine pixels to be processed

P

Function works with non-contiguous volume data (the location of the planes ispassed to the function using pointers on the plane)

P2, P3, P4

Image data is in planar order and made up of 2, 3 or 4 discrete planar (noninterleaved) channels, with a separate pointer to each plane658

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Descriptor

Description

R

Function operates on a defined region of interest (ROI) for each source image

Sfs

Saturation and fixed scaling mode is useds

Saturation and no scaling (default)

V

Function operates on a defined volume of interest (VOI) for each source image

If more that one descriptor is used, they are presented in the function name in alphabetical order.
Every function that operates on image data has a channel count descriptor Cn (for interleaved image) or Pn(for planar). No default channel count is defined.
If input and output channel layouts are different, both source and destination layouts are listed. For example,
the function ippiHLSToBGR_8u_C3P3R converts three-channel interleaved HLS image to the three-plane BGR
image.

Parameters
The parameters in functions are in the following order: all source operands, all destination operands, all otheroperation-specific parameters.
Source parameters are named Src or SrcN, if there is more than one input image. Destination parameters
are named Dst. For in-place operations, the input/output parameter contains the name SrcDst. All
parameters defined as pointers start with lowercase p , for example, pSrc , pMean , pSpec .

Extensions
The extension field denotes an Intel IPP extension to which the function belongs. The following extensions
are supported in Intel IPP Image Processing functions:
Extension

Description

ExampleL
LTIntel IPP platform-aware functions

ippiAddC_8u_AC4R_L
ippiSubC_8u_C1RSfs_LT

TIntel IPP threading layer (TL)
functions based on the Platform
Aware APIIntel IPP threading layer (TL)
functions based on the Classic API

ipprFilterMedian_64f_C1V_T

See Also
Platform-Aware Functions for Image Processing
Threading Layer Functions
Function Prototypes in Intel IPP
Function names in Intel IPP contain datatype and descriptor fields after the name field (see Function
Naming ). Most of the Intel IPP functions for image processing have a number of flavors that differ in datatypes associated with the operation, and in some additional parameters.
Each function flavor has its unique prototype used in function definition and for calling the function from theapplication program. For many flavors of a given function, these prototypes look quite similar.
To avoid listing all the similar prototypes in function description in this document, only different templates forsuch prototypes followed by the table of applicable data types and descriptors for each function may be
given. For simplicity, in such cases the data type and descriptor fields in the function name are denoted asmod:<mod> = <datatype>_<descriptors>
For example, the template for the prototype of the image dilation function that performs not-in-place
operation, looks like this:

659

1

Intel® Integrated Performance Primitives Developer Guide and Reference

IppStatus ippiDilate_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>* pDst,
int dstStep, IppiSize roiSize);
where the supported values for modare:

8u_C1R
8u_C3R
8u_AC4R
This notation means that the ippiDilate function has three flavors for a not-in-place operation, which
process 8-bit unsigned data (of Ipp8u type) and differ in the number of channels in processed images. Theseflavors have the following prototypes:

IppStatus ippiDilate_8u_C1R(const Ipp8u* pSrc, int srcStep,
IppiSize roiSize);

Ipp8u* pDst, int dstStep,

IppStatus ippiDilate_8u_C3R(const Ipp8u* pSrc, int srcStep,
IppiSize roiSize);

Ipp8u* pDst, int dstStep,

IppStatus ippiDilate_8u_AC4R(const Ipp8u* pSrc, int srcStep,
IppiSize roiSize);

Ipp8u* pDst, int dstStep,

Thus, to obtain the full name and parameters list for the specific function flavor, not listed directly, do thefollowing:
1.
2.
3.

Choose the function operation mode (denoted in this document as Case 1, 2 and so on) and look in thetable for the supported data types and descriptors.
Set the mod field in the function name as the concatenation of the chosen data type and descriptor,
delimited by the underscore.
Use the respective template, substituting all the datatype fields in the parameters list with the chosendata type. Note that Ipp prefix is written before the datatype in the parameters list (see Data Typesfor details).

ExampleTo get the prototype for the ippiSet function flavor that sets each channel of a 3-channel destination image
to 16-bit signed values, choose Case 2: Setting each color channel to a specified value and use
datatype = 16s, descriptors = C3R.
After substituting the mod field with 16s_C3R, obtain the required prototype as

ippiSet_16s_C3R(const Ipp16svalue[3], Ipp16* pDst, int dstStep, IppiSize roiSize);

Rounding Mode
As many Intel IPP functions have to meet the bit-exact requirement, image processing functions use
rounding. The default rounding mode for all functions can be described as "nearest even", that is the fixed
point number x=N + α, 0 ≤ α < 0, where N is an integer number, is rounded as given by:

For example, 1.5 is rounded to 2, and 2.5 to 2.

660

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Some image processing functions have additional rounding modes, which are set by the parameterroundMode.

Integer Result Scaling
The default for image processing functions is to saturate the results without scaling them.
Some image processing functions operating on integer data use scaling of the internally computed output
results by the integer scaleFactor, which is specified as one of the function parameters. These functions
have the Sfs descriptor in their names.
The scale factor can be negative, positive, or zero. Scaling is applied because internal computations are
generally performed with a higher precision than the data types used for input and output images.
NOTE
The result of integer operations is always saturated to the destination data type range even when
scaling is used.
The scaling of an integer result is done by multiplying the output pixel values by 2-scaleFactor before thefunction returns. This helps retain either the output data range or its precision. Usually the scaling with apositive factor is performed by the shift operation. The result is rounded off to the nearest even integer
number (see Rounding Mode).
For example, the integer Ipp16s result of the square operation ippiSqr for the input value 200 is equal to32767 instead of 40000, that is, the result is saturated and the exact value cannot be restored. The scalingof the output value with the factor scaleFactor = 1 yields the result 20000, which is not saturated, and theexact value can be restored as 20000*2. Thus, the output data range is retained.
The following example shows how the precision can be partially retained by means of scaling. The integer
square root operation ippiSqr (without scaling) for the input value 2 gives the result equal to 1 instead of
1.414. Scaling of the internally computed output value with the factor scaleFactor = -3 gives the result 11,
and permits the more precise value to be restored as 11*2-3 = 1.375.

Error Reporting
The Intel IPP functions return status codes of the performed operation to report errors and warnings to thecalling program. Thus, it is up to the application to perform error-related actions and/or recover from theerror. The last value of the error status is not stored, and the user is to decide whether to check it or not as
the function returns. The status codes are of IppStatus type and are global constant integers.
The status codes and corresponding messages reported by Intel IPP for image and video processing arelisted in Table Status Codes and Messages.
Status Codes and Messages
Status CodeippStsNotSupportedModeErr
ippStsDecimateFractionErr
ippStsWeightErr
ippStsQualityIndexErr
ippStsResizeNoOperationErr
ippStsBlockStepErr
ippStsMBStepErr
ippStsNoiseRangeErr
ippStsLPCCalcErr
ippStsJPEG2KBadPassNumber
ippStsJPEG2KDamagedCodeBlock
ippStsH263CBPYCodeErr

Message
The requested mode is currently not supported.
Unsupported fraction in decimate.
Incorrect value for weight.
Quality Index cannot be calculated for an image filled with a constant.
One of the output image dimensions is less than 1 pixel.
Step for Block is less than 8.
Step for MB is less than 16.
Noise value for Wiener Filter is out of range.
Cannot evaluate linear prediction.
Pass number exceeds the limits of [0,nOfPasses-1].
Codeblock for decoding is damaged.
Illegal Huffman code is detected during CBPY stream processing.

661

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Status Code

Message

ippStsH263MCBPCInterCodeErr

Illegal Huffman code is detected during MCBPC Inter stream
processing.
Illegal Huffman code is detected during MCBPC Intra stream
processing.
Step value is not pixel multiple.

ippStsH263MCBPCIntraCodeErr
ippStsNotEvenStepErr
ippStsHistoNofLevelsErr
ippStsLUTNofLevelsErr
ippStsMP4BitOffsetErr
ippStsMP4QPErr
ippStsMP4BlockIdxErr
ippStsMP4BlockTypeErr
ippStsMP4MVCodeErr
ippStsMP4VLCCodeErr
ippStsMP4DCCodeErr
ippStsMP4FcodeErr
ippStsMP4AlignErr
ippStsMP4TempDiffErr
ippStsMP4BlockSizeErr
ippStsMP4ZeroBABErr
ippStsMP4PredDirErr
ippStsMP4BitsPerPixelErr
ippStsMP4VideoCompModeErr
ippStsMP4LinearModeErr
ippStsH263PredModeErr
ippStsH263BlockStepErr
ippStsH263MBStepErr
ippStsH263FrameWidthErr
ippStsH263FrameHeightErr
ippStsH263ExpandPelsErr
ippStsH263PlaneStepErr
ippStsH263QuantErr
ippStsH263MVCodeErr
ippStsH263VLCCodeErr
ippStsH263DCCodeErr
ippStsH263ZigzagLenErr
ippStsJPEGHuffTableErr
ippStsJPEGDCTRangeErr
ippStsJPEGOutOfBufErr
ippStsChannelOrderErr
ippStsZeroMaskValueErr
ippStsRangeErr
ippStsQPErr
ippStsQuadErr
ippStsRectErr
ippStsCoeffErr
ippStsNoiseValErr
ippStsDitherLevelsErr
ippStsNumChannelsErr

662

Number of levels for histogram is less than 2.
Number of levels for LUT is less than 2.
Incorrect value for bit offset.
Incorrect value for quantization parameter.
Incorrect value for block index.
Incorrect block type.
Illegal Huffman code is detected during MV stream processing.
Illegal Huffman code is detected during VLC stream processing.
Illegal code is detected during DC stream processing.
Incorrect value for fcode.
Incorrect buffer alignment.
Incorrect temporal difference.
Incorrect size of block or macroblock.
All BAB values are equal to zero.
Incorrect prediction direction.
Incorrect number of bits per pixel.
Incorrect video component mode.
Incorrect DC linear mode.
Incorrect value for Prediction Mode.
The step value is less than 8.
The step value is less than 16.
The frame width is less than 8.
The frame height is less than, or equal to zero.
The expand pixels number is less than 8.
Step value is less than the plane width.
Quantizer value is less than, or equal to zero, or more than 31.
Illegal Huffman code is detetcted during MV stream processing.
Illegal Huffman code is detetcted during VLC stream processing.
Illegal code is detetcted during DC stream processing.
Zigzag compact length is more than 64.
JPEG Huffman table is destroyed.
JPEG DCT coefficient is out of range.
An attempt to access out of the buffer.
Incorrect order of the destination channels.
All values of the mask are equal to zero.
Incorrect values for bounds: the lower bound is greater than the upperbound.
Incorrect value for a quantizer parameter.
The quadrangle is nonconvex or degenerates into triangle, line, orpoint.
Size of the rectangular region is less than, or equal to 1.
Incorrect values for the transformation coefficients.
Incorrect value for the noise amplitude for dithering.
Number of dithering levels is out of range.
Incorrect or unsupported number of channels.

Developer Guide and Reference for Intel® Integrated Performance Primitives

Status CodeippStsDataTypeErr
ippStsCOIErr
ippStsOutOfRangeErr
ippStsDivisorErr
ippStsAlphaTypeErr
ippStsGammaRangeErr
ippStsGrayCoefSumErr
ippStsChannelErr
ippStsJaehneErr
ippStsStepErr
ippStsStrideErr
ippStsEpsValErr
ippStsScaleRangeErr
ippStsThresholdErr
ippStsWtOffsetErr
ippStsAnchorErr
ippStsMaskSizeErr
ippStsShiftErr
ippStsSampleFactorErr
ippStsResizeFactorErr
ippStsDivByZeroErr
ippStsInterpolationErr
ippStsMirrorFlipErr
ippStsMoment00ZeroErr
ippStsThreshNegLevelErr
ippStsContextMatchErr
ippStsFftFlagErr
ippStsFftOrderErr
ippStsMemAllocErr
ippStsNullPtrErr
ippStsSizeErr
ippStsBadArgErr
ippStsNoErr
ippStsNoOperation
ippStsMisalignedBuf
ippStsSqrtNegArg
ippStsInvZero
ippStsEvenMedianMaskSize
ippStsDivByZero
ippStsLnZeroArg
ippStsLnNegArg
ippStsNanArg
ippStsDoubleSize
ippStsJPEGMarker
ippStsResFloor
ippStsAffineQuadChanged
ippStsWrongIntersectROI

1

Message
Incorrect or unsupported data type.
COI is out of range.
Argument is out of range or point is outside the image.
Divisor is equal to zero, function is aborted.
Illegal type of image composition operation.
Gamma range bound is less than, or equal to zero.
Sum of the conversion coefficients must be less than, or equal to 1.
Illegal channel number.
Magnitude value is negative.
Step value is less than, or equal to zero.
Stride value is less than the row length.
Negative epsilon value.
Scale bounds are out of range.
Invalid threshold bounds.
Invalid offset value for the wavelet filter.
Anchor point is outside the mask.
Invalid mask size.
Shift value is less than zero.
Sampling factor is less than, or equal to zero.
Resize factor(s) is less than, or equal to zero.
An attempt to divide by zero.
Invalid interpolation mode.
Invalid flip mode.
Moment value M(0,0) is too small to continue calculations.
Negative value of the level in the threshold operation.
Context parameter does not match the operation.
Invalid value of the FFT flag parameter.
Invalid value of the FFT order parameter.
Not enough memory for the operation.
Pointer is NULL.
Wrong value for the data size.
Invalid or bad argument.
No errors.
No operation has been executed.
Misaligned pointer in operation in which it must be aligned.
Negative value(s) of the argument in the function Sqrt.

INF result. Zero value was met by InvThresh with zero level.
Even size of the Median Filter mask was replaced by the odd number.
Zero value(s) of the divisor in the function Div .
Zero value(s) of the argument in the function Ln.
Negative value(s) of the argument in the function Ln.
Argument value is not a number.
Sizes of image are not multiples of 2.
JPEG marker in the bitstream.
All result values are floored.
The fourth ertex of destination quad is not equal to the customer's
one.
Incorrect ROI that has no intersection with the source or destination
image. No operation.

663

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Status Code

Message

ippStsWrongIntersectQuad

Incorrect quadrangle that has no intersection with the source ordestination ROI. No operation.
The kernel is not symmetric.

ippStsSymKernelExpected
ippStsEvenMedianWeight
ippStsNoAntialiasing
ippStsAlgTypeErr
ippStsAccurateModeNotSupported

Even weight of the Weighted Median Filter was replaced by the oddone.
The mode does not support antialiasing.
The algorithm type is not supported.
Accurate mode is not supported.

The status codes ending with Err (except for the ippStsNoErr status) indicate an error; the integer valuesof these codes are negative. When an error occurs, the function execution is interrupted.
The status code ippStsNoErr indicates no error. All other status codes indicate warnings. When a specificcase is encountered, the function execution is completed and the corresponding warning status is returned.
For example, if the function ippiDiv meets an attempt to divide a positive value by zero, the function
execution is not aborted. The result of the operation is set to the maximum value that can be represented by
the source data type, and the user is warned by the output status ippStsDivByZero. See appendix A
Handling of Special Cases for more information.

Platform-Aware Functions for Image Processing
Intel® Integrated Performance Primitives (Intel® IPP) library provides so-called platform-aware functions.
These functions use the special data type IppSizeL for object sizes. The IppSizeL data type represents
memory-related quantities: it can be 32- or 64-bit wide depending on the target architecture.
While the rest of Intel IPP functions support only objects of 32-bit integer size, platform-aware functions canwork with 64-bit object sizes if it is supported by the platform. The API of platform-aware functions is similar
to the API of other Intel IPP functions and has only slight differences. You can distinguish platform-aware
functions by the L suffix in the function name, for example, ippiAdd_8u_C1RSfs_L.
Currently, the following image processing functions have platform-aware APIs:
Function Group

HeaderFunction Name

Arithmetic Functions

ippi.h/ippi_l.hLinear Filters

ippi.h/ippi_l.h

Resize Transform Functions

ippi.h/ippi_l.h

Support Functions

ippi.h/ippi_l.h

Add
AddC
Sub
SubC
Mul
MulC
Div
FilterBilateralBorderGetBufferSize
FilterBilateralBorderInit
FilterBilateralBorder
ResizeGetSize
ResizeGetBufferSize
ResizeGetBorderSize
Resize{Nearest|Linear|Cubic|Lanczos|Sup
Resize{Nearest|Linear|Cubic|Lanczos|Sup
ResizeAntialiasing{Nearest|Linear|Cubic
ResizeAntialiasing{Nearest|Linear|Cubic
MallocIntel IPP platform-aware functions are documented as additional flavors to the existing functions declared instandard Intel IPP headers (without the l suffix). The ippi_l.h header is included into ippi.h.

664

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Threading Layer Functions
Intel® Integrated Performance Primitives (Intel® IPP) library provides threading layer (TL) functions for image
processing. It is a set of functions that are implemented as wrappers over Intel IPP platform-aware functions
by using tiling and multithreading with OpenMP*. For implementation details, please see the corresponding
source code files.
The API of TL functions is similar to the API of other Intel IPP functions and has only slight differences. You
can distinguish Intel IPP TL functions by the _LT or _T suffix in the function name, for example,
ippiAdd_8u_C1RSfs_LT. See Extensions for more information about function naming.
For more information about the TL functions usage, refer to the Intel IPP Developer Guide.
Product and Performance Information
Performance varies by use, configuration and other factors. Learn more at www.Intel.com/
PerformanceIndex.
Notice revision #20201201

Structures and Enumerators
This topic describes the structures and enumerators used by the Intel Integrated Performance Primitives forimage processing.
The IppStatus constant enumerates the status code values returned by Intel IPP functions, indicating
whether the operation was error-free or not.
See Error Reporting for more information on the set of valid status codes and corresponding error messages
for image and video processing functions.
The structure IppiPoint for storing the geometric position of a point is defined as

typedef struct {int x;
int y;} IppiPoint;where x, y denote the coordinates of the point.
The structure IppPointPolar for storing the geometric position of a point in polar coordinates is defined as

typedef struct {Ipp32f rho;
Ipp32f theta;} IppPointPolar;
where rho - a radial coordinate (radial distance from the origin), theta - an angular coordinate(counterclockwise angle from the x-axis).
The structure IppiSize for storing the size of a rectangle is defined as

typedef struct {int width;
int height;} IppiSize;
where width and height denote the dimensions of the rectangle in the x- and y-directions, respectively.

665

1

Intel® Integrated Performance Primitives Developer Guide and Reference

The structure IppiRect for storing the geometric position and size of a rectangle is defined as

typedef struct {int x;
int y;
int width;
int height;} IppiRect;
where x, y denote the coordinates of the top left corner of the rectangle that has dimensions width in the xdirection by height in the y-direction.
The ippiConnectedComp structure used in Computer Vision functions defines the connected component asfollows:

typedef struct _IppiConnectedComp {Ipp64f area;
Ipp64f value[3];IppiRect rect;} IppiConnectedComp;
where area - area of the segmented component; value[3] - gray scale value of the segmented component;
rect - bounding rectangle of the segmented component.
The IppiMaskSize enumeration defines the neighborhood area for some morphological and filteringfunctions:typedef enum {ippMskSize1x3 = 13,
ippMskSize1x5 = 15,
ippMskSize3x1 = 31,
ippMskSize3x3 = 33,
ippMskSize5x1 = 51,
ippMskSize5x5 = 55
} IppiMaskSize;
The IppCmpOp enumeration defines the type of compare operation to be used in image comparison functions:typedef enum {ippCmpLess,
ippCmpLessEq,
ippCmpEq,
ippCmpGreaterEq,
ippCmpGreater} IppCmpOp;
The IppRoundMode enumeration defines the rounding mode to be used in some conversion, filtering andarithmetic functions:typedef enum {ippRndZero,ippRndNear,
ippRndFinancial,
ippRndHintAccurate=0x10} IppRoundMode;

666

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

The IppHintAlgorithm enumeration defines the type of code to be used in some image transform andstatistics functions, that is, faster but less accurate, or vice-versa, more accurate but slower. For more
information on using this enumerator, see Table Hint Arguments for Image Moment Functions.

typedef enum {ippAlgHintNone,
ippAlgHintFast,
ippAlgHintAccurate} IppHintAlgorithm;
The types of interpolation used by geometric transform functions are defined as follows:enum {
IPPI_INTER_NN= 1,
IPPI_INTER_LINEAR= 2,
IPPI_INTER_CUBIC= 4,
IPPI_INTER_CUBIC2P_BSPLINE,
IPPI_INTER_CUBIC2P_CATMULLROM,IPPI_INTER_CUBIC2P_B05C03,
IPPI_INTER_SUPER= 8,
IPPI_INTER_LANCZOS= 16,
IPPI_ANTIALIASING=(1 << 29)
IPPI_SUBPIXEL_EDGE=(1 << 30)
IPPI_SMOOTH_EDGE= IPP_MIN_32S};
The IppiAlphaType enumeration defines the type of the compositing operation to be used in the alphacomposition functions:typedef enum {ippAlphaOver,
ippAlphaIn,
ippAlphaOut,
ippAlphaATop,
ippAlphaXor,
ippAlphaPlus,
ippAlphaOverPremul,
ippAlphaInPremul,
ippAlphaOutPremul,
ippAlphaATopPremul,
ippAlphaXorPremul,
ippAlphaPlusPremul} IppiAlphaType;The IppiDitherType enumeration defines the type of dithering to be used by the ippiReduceBits
function:

typedef enum {ippDitherNone,
ippDitherFS,
ippDitherJJN,
ippDitherStucki,
ippDitherBayer} IppiDitherType;

667

1

Intel® Integrated Performance Primitives Developer Guide and Reference

The layout of the image slices used in some image format conversion functions is defined as follows:enum {
IPP_UPPERIPP_LEFTIPP_CENTER
IPP_RIGHT
IPP_LOWER
IPP_UPPER_LEFT
IPP_UPPER_RIGHTIPP_LOWER_LEFT
IPP_LOWER_RIGHT
};

= 1,
= 2,
= 4,
= 8,
= 16,
= 32,
= 64,
= 128,= 256

The IppiAxis enumeration defines the flip axes for the ippiMirror functions or direction of the image
intensity ramp for the ippiImageRamp functions:typedef enum {ippAxsHorizontal,
ippAxsVertical,
ippAxsBoth,ippAxs45,
ippAxs135} IppiAxis;
The IppiBorderType enumeration defines the border type that is used by some Separable Filters and Fixed
Filters functions:typedef enum _IppiBorderType {ippBorderRepl= 1,
ippBorderWrap= 2,
ippBorderMirror= 3,
ippBorderMirrorR= 4,
ippBorderDefault= 5,
ippBorderConst= 6,
ippBorderTransp= 7,
ippBorderInMemTop= 0x0010,
ippBorderInMemBottom = 0x0020,
ippBorderInMemLeft= 0x0040,
ippBorderInMemRight= 0x0080,
ippBorderFirstStageInMemTop=
ippBorderFirstStageInMemBottom =ippBorderFirstStageInMemLeft=
ippBorderFirstStageInMemRight=} IppiBorderType;0x0100,0x0200,0x0400,0x0800,The IppiFraction enumeration defines shapes of the structuring element used in some decimate filter
functions:typedef enum {ippPolyphase_1_2,
ippPolyphase_3_5,
ippPolyphase_2_3,
ippPolyphase_7_10,
ippPolyphase_3_4,} IppiFraction;

668

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

The IppiNormOp enumeration defines the type of normalization that should be applied to the output data:

typedef enum {ippiNormNone= 0x00000000, // default
ippiNorm= 0x00000100, // normalized form
ippiNormCoefficient = 0x00000200, // correlation coefficient in the range [-1.0,…,1.0]
ippiNormMask= 0x0000FF00,} IppiNormOp;
The IppiROIShape enumeration defines the window shape for the two-dimensional convolution-specificfunctions:typedef enum {ippiROIFull
ippiROIValid
ippiROISame
ippiROIMask} IppiROIShape;= 0x00000000,= 0x00010000,= 0x00020000,= 0x00FF0000

The IppNormType enumeration defines the norm type that should be applied when computing the magnitudeof the gradient:typedef enum {ippNormInf
ippNormL1
ippNormL2} IppNormType;===

0x00000001, // Infinity norm
0x00000002, // L1 normalization
0x00000004 // L2 normalization

The IppiHOGConfig structure defines the configuration parameters for the HOG descriptor:

typedef struct {int
cvCompatible;
int
cellSize;int
blockSize;
int
blockStride;
int
nbins;
Ipp32fsigma;
Ipp32fl2thresh;
IppiSize winSize;} IppiHOGConfig;/* openCV compatible output format *//* squre cell size (pixels) *//* square block size (pixels) *//* block displacement (the same for x- and y- directions) *//* required number of bins *//* gaussian factor of HOG block weights *//* normalization factor *//* detection window size (pixels) */The code flags used by the FastN functions are defined as follows:enum {
IPP_FASTN_ORIENTATION = 0x0001,
IPP_FASTN_NMS= 0x0002,
IPP_FASTN_CIRCLE= 0X0004,
IPP_FASTN_SCORE_MODE0 = 0X0020};
The IppiFastNSpec specification structure is used by the FastN function:

struct FastNSpec;
typedef struct FastNSpec IppiFastNSpec;The IppiCornerFastN structure used by the FastN2DToVec function stores the destination vector ofstructures:typedef struct _IppiCornerFastN {
int
x;
int
y;
int
cornerType;

669

1

Intel® Integrated Performance Primitives Developer Guide and Reference

intorientation;
float
angle;
float
score;} IppiCornerFastN;
The IppFGMModel structure contains parameters for the Gaussian mixture-based segmentation algorithm:

typedef struct{unsigned int
unsigned int

numFrames;
numGauss;/* length of history *//* maximal number of gaussian components per pixel *//* (numGauss<=maxNumGauss) */Ipp32f varInit;/* initial value of variance for new gaussian component */Ipp32f varMin;/* minimal bound of variance */Ipp32f varMax;/* maximal bound of variance */Ipp32f varWBRatio; /* background threshold */Ipp32f bckgThr;/* background total weights sum threshold */Ipp32f varNGRatio; /* threshold for adding new gaussian component to list */Ipp32f reduction;/* speed of reduction non-active gaussian components */Ipp8u shadowValue; /* returned shadow value */charshadowFlag; /* search shadows flag */Ipp32f shadowRatio; /* shadow threshold */} IppFGMModel
The IppiMorphMode enumerator defines modes for mask processing at the second stage of advanced
morphology operations:typedef enum {IPP_MORPH_DEFAULT= 0x0000,
IPP_MORPH_MASK_NO_FLIP = 0x0001,} IppiMorphMode;
The IppChannels enumerator defines the number of channels in the image:

typedef enum {
ippC0
= 0,
ippC1
= 1,
ippC2
= 2,
ippC3
= 3,
ippC4
= 4,
ippP2
= 5,
ippP3
= 6,
ippP4
= 7,
ippAC1 = 8,
ippAC4 = 9,
ippA0C4 = 10,
ippAP4 = 11
} IppChannels
The IppiFilterBilateralType enumerator defines the type of the bilateral filter that is used by some
Filtering Functions:typedef enum {ippiFilterBilateralGauss= 100,
ippiFilterBilateralGaussFast = 101} IppiFilterBilateralType670

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

The IppiWarpTransformType enumerator defines the type of the warp transform for some Warp Functions
with Prior Initialization:

typedef enum {ippWarpAffine,
ippWarpPerspective,
ippWarpBilinear} IppiWarpTransformType
The IppiDistanceMethodType structure stores the method of defining the difference in intensity between
pixels. It is defines as:

typedef enum {ippDistNormL1 = 0x00000002;
ippDistNormL2 = 0x00000004;} IppiDistanceMethodType;
Structures for 3D Data Processing Functions
The ipprBorderType enumeration defines the border type that is used by some 3D Data Processing
Functions:typedef enum _IpprBorderType {ipprBorderRepl= ippBorderRepl,
ipprBorderConst= ippBorderConst,/* Flags to use source image memory pixels from outside of the border in particular
directions */ipprBorderInMemTop= 0x0010,
ipprBorderInMemBottom = 0x0020,
ipprBorderInMemLeft= 0x0040,
ipprBorderInMemRight= 0x0080,
ipprBorderInMemFront= 0x1000,
ipprBorderInMemBack= 0x2000,
ipprBorderInMem= ipprBorderInMemLeft|ipprBorderInMemTop|ipprBorderInMemRight|
ipprBorderInMemBottom|ipprBorderInMemFront|ipprBorderInMemBack,} IpprBorderType;The IpprVolumeL structure stores the volume of a three-dimensional space. It is defined as:

typedef struct {int width;
int height;
int depth;} IpprVolume;
The IpprCuboid structure stores the volume of interest of a three-dimensional space. It is defined as:

typedef struct {int x;
int y;
int z;
int width;
int height;
int depth;} IpprCuboid;

Function Context Structures
Some Intel IPP functions use special structures to store function-specific (context) information. For example,
the IppiFFTSpec structure stores twiddle factors and bit reverse indexes needed in computing the fast
Fourier transform.

671

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Two different kinds of structures are used: structures that are not modified during function operation - they
have the suffix Spec in their names, and structures that are modified during operation - they have the suffix
State in their names.
These context-related structures are not defined in the public headers, and their fields are not accessible. It
was done because the function context interpretation is processor dependent. Thus, you may only use
context-related functions and may not create a function context as an automatic variable.

Structures and Enumerators for Platform-Aware Functions
This topic describes the structures and enumerators used by the Intel IPP platform-aware functions for image
processing.
The IppiPointL structure stores the geometric position of a point. It is defined as:

typedef struct {IppSizeL x;
IppSizeL y;} IppiPointL;
where x, y denote the coordinates of the point.
The IppiSizeL structure stores the size of a rectangle. It is defined as:

typedef struct {IppSizeL width;
IppSizeL height;} IppiSizeL;
where width and height denote the dimensions of the rectangle in the x- and y-directions, respectively.
The IppiRectL structure stores the geometric position and size of a rectangle. It is defined as:

typedef struct {IppSizeL x;
IppSizeL y;
IppSizeL width;
IppSizeL height;} IppiRectL;
where x, y denote the coordinates of the top left corner of the rectangle that has dimensions width in the xdirection by height in the y-direction.
The IpprVolumeL structure stores the volume of a three-dimensional space. It is defined as:

typedef struct {IppSizeL width;
IppSizeL height;
IppSizeL depth;} IpprVolumeL;
where width, height, and depth denote the dimensions of the three-dimensional space.

672

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

The IpprBorderType enumerator defines the border type that is used by some 3D Data Processing
Functions:typedef enum _IpprBorderType {ipprBorderRepl= ippBorderRepl,
ipprBorderConst= ippBorderConst,
ipprBorderInMemTop
ipprBorderInMemBottom
ipprBorderInMemLeft
ipprBorderInMemRight
ipprBorderInMemFront
ipprBorderInMemBack} IpprBorderType;

=
=
=
=
=
=

0x0010,0x0020,0x0040,0x0080,0x1000,0x2000

Image Data Types and Ranges
The Intel IPP image processing functions support only absolute color images in which each pixel isrepresented by its channel intensities. The data storage for an image can be either pixel-oriented or planeoriented (planar). For images in pixel order, all channel values for each pixel are clustered and storedconsecutively, for example, RGBRGBRGB in case of an RGB image. The number of channels in a pixel-order
image can be 1, 2, 3, or 4.
For images in planar order, all image data for each channel is stored contiguously followed by the next
channel, for example, RRR...GGG...BBB.
Functions that operate on planar images are identified by the presence of Pn descriptor in their names. In
this case, n pointers (one for each plane) may be specified.
The image data type is determined by the pixel depth in bits per channel, or bit depth. Bit depth for eachchannel can be 8, 16 or 32 and is included in the function name as one of these numbers (see Function
Naming for details). The data may be signed (s), unsigned (u), or floating-point real (f). For some arithmetic
and FFT/DFT functions, data in complex format (sc or fc) can be used, where each channel value isrepresented by two numbers: real and imaginary part. All channels in an image must have the same datatype.
For example, in an absolute color 24-bit RGB image, three consecutive bytes (24 bits) per pixel represent thethree channel intensities in the pixel mode. This data type is identified in function names as the 8u_C3
descriptor, where 8u represents 8-bit unsigned data for each channel and C3 represents three channels.
Some functions operate with images in 16-bit packed RGB format (see RGB Image Formats in Image Color
Conversion for more details). In this case data of all 3 channels are represented as 16u data type.
For example, in an absolute color 16-bit packed RGB image, two consecutive bytes (16 bits) per pixel
represent the three channel intensities in the pixel mode. This data type is identified in function names as the
16u_C3 descriptor, where 16u represents 16-bit unsigned data (not a bit depth) for all packed channels
together and C3 stands for three channels.
If an alpha (opacity) channel is present in image data, the image must have four channels, with alphachannel being the last or the first one. This data type is indicated by the AC4 or A0C4 descriptors
respectively. The presence of the alpha channel can modify the function's behavior. For such functions, IntelIPP provides versions with and without alpha. If an alpha channel is specified, the operation usually is not
performed on that channel.
The range of values that can be represented by each data type lies between the lower and upper bounds.
The following table lists data ranges and constant identifiers used in Intel IPP to denote the respective range
bounds:673

1Intel® Integrated Performance Primitives Developer Guide and Reference

Image Data Types and Ranges
Data
Type

8s

Lower Bound
Identifier

Value

Identifier

Value

IPP_MIN_8S-128

IPP_MAX_8S

127

0

IPP_MAX_8U

255-32768

IPP_MAX_16S

32767

0

IPP_MAX_16U

65535

-231

IPP_MAX_32S

231-1

0

IPP_MAX_32U

232-1

1.175494351e-38

IPP_MAXABS_32F

3.402823466e38

8u
16s

IPP_MIN_16S

16u
32s

IPP_MIN_32S

32u
32f†

Upper Bound

IPP_MINABS_32F† The range for absolute values

Major Operation Models
Most Intel IPP image processing functions perform identical and independent operations on all channels of
the processed image except for alpha channel. It means that the same operation is applied to each channel,
and the computed results do not depend on values of other channels. Some exceptions include theippiFilterMedianColor function and color conversion functions, which process three channels together.
Intel IPP image processing functions can be divided by two major models of operation:••

Point operations: functions operate on one pixel to compute the result, for example, ippiAdd
Neighborhood operations: functions operate on a group of pixels, for example, ippiFilterBox

See Also
FilterMedianColor Filters an image using a color median filter.
Add Adds pixel values of two images.
FilterBox Blurs an image using a simple box filter.
Neighborhood Operations
The result of a neighborhood operation is based on values of a certain group of pixels located near a given
input pixel. The set of neighboring pixels is typically defined by a rectangular mask (or kernel) and anchor
cell, specifying the mask alignment with respect to the position of the input pixel as shown in the following
figure.

The anchor cell is a fixed cell within the kernel, which is used for positioning the kernel with respect to thecurrently processed pixel of the source image. The kernel is placed on the image in such a way that theanchor cell coincides with the input pixel. The anchor cell is specified by its coordinates anchor.x andanchor.y in the coordinate system associated with the top left corner of the kernel.

674

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

If position of the anchor cell is not specified explicitly in the function description, coordinates of the anchor
are computed by the default formula:anchor.x=(kernel.width-1)/2
anchor.y=(kernel.height-1)/2
wherekernel.width and kernel.height is the width and height of the filter kernel, respectively.

Regions of Interest in Intel IPP
Most Intel IPP image processing functions operate not only on entire images but also on image areas. Image
region of interest (ROI) is a rectangular area that may be either some part of the image or the whole image.
The Intel IPP functions with ROI support have an R descriptor in their names. ROI of an image is defined by
the size and offset from the image origin as shown in figure Image, ROI, and Offsets. The origin of an image
is in the top left corner, with x values increasing from left to right and y values increasing downwards.
__border__top
Image, ROI, and Offsets

Both the source and destination images can have a ROI. In such cases the sizes of ROIs are assumed to be
the same while offsets may differ. Image processing is performed on data of the source ROI, and the results
are written to the destination ROI. In function call sequences, ROI is specified by:•••roiSize parameter of the IppiSize typepSrc and pDst pointers to the starts of source and destination ROI buffers
srcStep and dstStep parameters that are equal to distances in bytes between the starting points ofconsecutive lines in source and destination images, respectively.

Thus, the srcStep and dstStep parameters set steps in bytes through image buffers to start processing a newline in the ROI of an image.
The following code example illustrates the use of the dstStep parameter in function calls:

ExampleIppStatus roi( void ) {Ipp8u x[8*3] = {0};IppiSize roiSize = {3,2};
IppiPoint roiPoint = {2,1};

675

1

Intel® Integrated Performance Primitives Developer Guide and Reference/// place the pointer to the ROI start position
return ippiSet_8u_C1R( 7, x+8*roiPoint.y+roiPoint.x, 8, roiSize );}The resulting image x contains the following data:

00 00 00 00 00 00 00 00
00 00 07 07 07 00 00 00
00 00 07 07 07 00 00 00
If ROI is present:•••

source and destination images can have different sizes;
lines may have padding at the end for aligning the line sizes;
application must correctly define the pSrc, pDst, and roiSize parameters.

The pSrc and pDst parameters are the shifted pointers to the image data. For example, in case of ROI
operations on 3-bytes-per-pixel image data (8u_C3R), pSrc points to the start of the source ROI buffer andcan be interpreted as follows:

pSrc = pSrcImg + 3*(srcImgSize.width * srcRoiOffset.y + srcRoiOffset.x),
where
pSrcImg

points to the start of the source image buffersrcImgSize

is the image size in pixels (of the IppiSize type)srcRoiOffset

determines an offset of ROI relative to the start of the image as shown in
Figure Image, ROI, and Offsets.

Another example for operations on four-channel image of 32-bit floating point data type 32f_AC4:

pSrc = (Ipp32f*)((Ipp8u*)pSrcImg + srcImgStep * srcRoiOffset.y +4*SizeOf(Ipp32f)*srcRoiOffset.x.
In this example the multiplier 4 is used because the AC4 pixel consists of 4 values - R, G, B, A. Pointer typeconversion is required as in Intel IPP all image steps are always in bytes, and it is not recommended to use
step/SizeOf(Ipp32f) as in a general case step value may be not a multiple of 4.
For functions using ROI with a neighborhood, you should correctly use values of the pSrc and roiSize
parameters. These functions assume that the points in the neighborhood exist and that therefore pSrc isalmost never equal to pSrcImg. Figure Using ROI with Neighborhood illustrates the case when neighborhood
pixels can fall outside the source image.

676

Developer Guide and Reference for Intel® Integrated Performance Primitives

1__border__top
Using ROI with Neighborhood

To ensure valid operation when image pixels are processed, the application should correctly define additional
border pixels (see Borders in Neighborhood Operations).
Warning
If the required border pixels are not defined prior to calling neighborhood functions that attempt toprocess such pixels, you may get memory violation errors.
The following code example shows how to process an image with ROI:

ExampleIppStatus alignedLine( void) {Ipp8u x[8*3] = {0};IppiSize imgSize = {5,3};/// The image is of size 5x3. Width 8 has been/// chosen by the user to align every line of the image
return ippiSet_8u_C1R( 7, x, 8, imgSize);}
The resulting image x contains the following data:

07 07 07 07 07 00 00 00
07 07 07 07 07 00 00 00
07 07 07 07 07 00 00 00

See Also
Borders in Neighborhood Operations
Tiled Image Processing
Intel IPP can process images composed from tiles, or tiled images.

Support Functions
This chapter describes the Intel® IPP support functions that are used to:

677

1
•
•
•
•

Intel® Integrated Performance Primitives Developer Guide and Reference

retrieve information about the current Intel IPP software version
get a brief explanation of the returned status codes
allocate and free memory that is needed for the operation of other Intel IPP image and video processing
functionsexecute Intel IPP Threading Layer service routines.

Version Information Function
This function returns the version number and other information about the active Intel IPP image processing
software.

GetLibVersion
Returns information about the used version of IntelIPP software for image processing.

Syntaxconst IppLibraryVersion* ippiGetLibVersion(void);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Description
This function returns a pointer to a static data structure IppLibraryVersion that contains information
about the current version of Intel IPP for image processing. You need not release memory referenced by the
returned pointer, as it points to a static variable. The following fields of the IppLibraryVersion structure
are available:

major

the major number of the current library version

minor

the minor number of the current library version

majorBuild

the number of builds of the major version

build

current build number

targetCpu[4]Intel® processor.

Namethe name of the current library version

Versionthe library version string

BuildDatethe library version actual build date

For example, if the library version is 9.0, build revision number is 49671, library name is ippIP AVX2, target
CPU is processor with Intel® Advanced Vector Extensions 2 (Intel® AVX2) and build date is “Dec 7 2015”, thenthe fields in this structure are set as:

major = 9, minor = 0, Name = “ippIP AVX2”, Version = “9.0.1 (r49671)”, targetCpu[4]=“h9”, BuildDate= “Dec 7 2015”678

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

NOTE
Each sub-library that is used in the image processing domain has its own similar function to
retrieve information about the active library version. These functions are:ippiGetLibVersion, ippcvGetLibVersion, and ippccGetLibVersion. They are declared in thefollowing header files: ippcore.h, ippcv.h, ippcc.h, respectively, and have the sameinterface as the above described function.

Status Information Function
Use this function to get a brief description of the status code returned by the current Intel IPP software.

ippGetStatusString
Translates a status code into a message.

Syntaxconst char* ippGetStatusString(IppStatus StsCode);

Include Files
ippcore.hParameters
StsCodeCode that indicates the status type (see Table Status Codes andMessages)

Description
This function returns a pointer to the text string associated with a status code StsCode. Use this function to
produce error and warning messages. The returned pointer is a pointer to an internal static buffer and needs
not be released.
The status information function translates this code into the corresponding message Null Pointer Error:

ExampleA code example below shows how to use the ippGetStatusString function. If you call an Intel IPP function,in this example ippiSet_8u_C1R, with a NULL pointer, it returns an error code -8.

void statusInfo( void ) {IppiSize roi = {0};IppStatus st = ippiSet_8u_C1R(3, 0, 0, roi );printf( " %d : %s\n", st, ippGetStatusString( st ));}Output:-8, Null Pointer Error

Memory Allocation Functions
This topic describes the Intel IPP functions that allocate aligned memory blocks for data of required type, or
free previously allocated memory.

679

1

Intel® Integrated Performance Primitives Developer Guide and Reference

NOTE
The only function to free the memory allocated by any of these functions is ippiFree().

Malloc
Allocates memory aligned to 64-byte boundary.

SyntaxCase 1: Memory allocation for blocks of 32-bit sizes
Ipp<datatype>* ippiMalloc_<mod>(int widthPixels, int heightPixels, int* pStepBytes);
Supported values for mod:8u_C1

16u_C1

16s_C132s_C1

32f_C132sc_C1

32fc_C1

8u_C2

16u_C216s_C232s_C2

32f_C232sc_C2

32fc_C2

8u_C3

16u_C316s_C332s_C3

32f_C332sc_C3

32fc_C3

8u_C4

16u_C4

16s_C432s_C4

32f_C432sc_C4

32fc_C4

8u_AC4

16u_AC4

16s_AC4

32s_AC4

32f_AC4

32sc_AC4

32fc_AC4

Case 2: Memory allocation for platform-aware functions
Ipp<datatype>* ippiMalloc_<mod>(IppSizeL widthPixels, IppSizeL heightPixels, IppSizeL*
pStepBytes);
Supported values for mod:8u_C1_L

16u_C1_L

16s_C1_L

32s_C1_L

32f_C1_L

32sc_C1_L

32fc_C1_L

8u_C2_L

16u_C2_L

16s_C2_L

32s_C2_L

32f_C2_L

32sc_C2_L

32fc_C2_L

8u_C3_L

16u_C3_L

16s_C3_L

32s_C3_L

32f_C3_L

32sc_C3_L

32fc_C3_L

8u_C4_L

16u_C4_L

16s_C4_L

32s_C4_L

32f_C4_L

32sc_C4_L

32fc_C4_L

8u_AC4_L

16u_AC4_L

16s_AC4_L

32s_AC4_L

32f_AC4_L

32sc_AC4_L

32fc_AC4_L

Include Files
ippi.h
Flavors with the _L suffixippi_l.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
widthPixels

Width of an image, in pixels.

heightPixels

Height of an image, in pixels.

pStepBytes

Pointer to the distance, in bytes, between the starting points ofconsecutive lines in the image

680

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Description
This function allocates a memory block aligned to 64-byte boundary for elements of different data types.
Every line of the image is aligned in accordance with the pStepBytes parameter, which is calculated by the
Malloc function and returned for further use.
The function Malloc allocates one continuous memory block. Functions that operate on planar images
require an array of separate pointers (IppType* plane[3]) to each plane as an input. In this case, you
should call the Malloc function three times.
The function allocates a maximum of 2,147,483,647 bytes. If larger blocks are needed user should use
instead ippsMalloc_<mod>_L().

ExampleThe code example below demonstrates how to construct an array and set correct values to the pointers to
use the allocated memory block with the Intel IPP functions operating on planar images. You need to specify
pStepBytes for each plane. The example is given for the 8u data type.

int stepBytes[3];Ipp8u* plane[3];plane[0] = ippiMalloc_8u_C1(widthPixels, heightPixels,&(stepBytes [0]));plane[1] = ippiMalloc_8u_C1(widthPixels/2, heightPixels/2,&(stepBytes [1]));plane[2] = ippiMalloc_8u_C1(widthPixels/2, heightPixels/2,&(stepBytes [2]));Return Values
The return value of Malloc function is a pointer to an aligned memory block.
If no memory is available in the system, the NULL value is returned.
To free the allocated memory block, use the Free function.

Free
Frees memory allocated by the function ippiMalloc.

Syntaxvoid ippiFree(void* ptr);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
ptr

Pointer to a memory block to be freed. This block must have beenpreviously allocated by the function ippiMalloc.

Description
This function frees the aligned memory block allocated by the function ippiMalloc.

681

1

Intel® Integrated Performance Primitives Developer Guide and Reference

NOTE
The function ippiFree cannot be used to free memory allocated by standard functions likemalloc or calloc, nor can the memory allocated by ippiMalloc be freed by free.

Threading Layer Functions
This section described the Intel IPP Threading Layer (TL) functions for image processing. For more
information about the TL functions usage, refer to the Intel IPP Developer Guide.

SplitUniform2D
Splits an image into tiles.

SyntaxCase 1: Operation with TL functions based on the Platform Aware API
IppStatus ippiSplitUniform2D_LT(IppiSizeL roiSize, IppSizeL minItemNumber, IppiPointL*
pSplit, IppiSizeL* pTileSize, IppiSizeL* pTailSize);

Case 2: Operation with TL functions based on the Classic API
IppStatus ippiSplitUniform2D_T(IppiSize roiSize, int minItemNumber, IppiPoint* pSplit,
IppiSize* pTileSize, IppiSize* pTailSize);

Include Files
ippi_tl.hParameters
roiSize

Image ROI size.

minItemNumber

Minimal size of a tile, in pixels.

pSplitNumber of split parts along x and y axes.

pTileSize

Size of a tile.

pTailSize

Size of the last corner tile.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function splits an image into tiles.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

Indicates no error.
Indicates an error condition when the pSplit, pTileSize, or

pTailSize pointer is NULL.

Indicates an error condition when minItemNumber is less thanzero.

ParallelFor
Performs parallel iterations for a processing function.

682

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

SyntaxCase 1: Operation with TL functions based on the Platform Aware API
IppStatus ippParallelFor_LT(IppSizeL numTiles, void* arg, functype_l func);

Case 2: Operation with TL functions based on the Classic API
IppStatus ippParallelFor_T(int numTiles, void* arg, functype func);

Include Files
ippcore_tl.h

Parameters
numTilesNumber of tiles.

arg

Pointer to the structure that contains arguments for the processing
function.

func

Pointer to the processing function used in the "parallel for" loop.

Description
This function performs parallel iterations of a processing function, which is passed as an argument for eachtile.

Return Values
ippStsNoErr

Indicates no error.
Any IPP error that the processing function can return.

GetTilePointerReturns a pointer to the specified image tile.

SyntaxCase 1: Operation with TL functions based on the Platform Aware API
IppStatus ippiGetTilePointer_32f_LT(const Ipp32f* pSrc, Ipp32f** pDst, IppSizeL
srcStep, IppSizeL x, IppSizeL y, Ipp32s numChannels);
IppStatus ippiGetTilePointer_64f_LT(const Ipp64f* pSrc, Ipp64f** pDst, IppSizeL
srcStep, IppSizeL x, IppSizeL y, Ipp32s numChannels);

Case 2: Operation with TL functions based on the Classic API
IppStatus ippiGetTilePointer_32f_T(const Ipp32f* pSrc, Ipp32f** pDst, int srcStep, int
x, int y, Ipp32s numChannels);
IppStatus ippiGetTilePointer_64f_T(const Ipp64f* pSrc, Ipp64f** pDst, int srcStep, int
x, int y, Ipp32s numChannels);

Include Files
ippi_tl.hParameters
pSrc

Pointer to the source image.

683

1

Intel® Integrated Performance Primitives Developer Guide and Reference

pDst

Pointer to the memory location of the pointer to the destination
image.

srcStep

Distance in bytes between consecutive lines in the source image.

x

x coordinate of a tile, in pixels.

yy coordinate of a tile, in pixels.

numChannels

Number of channels in the image. Possible values are 1, 3, and 4.

Description
This function returns a pointer to the specified image tile.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error condition when the pSrc or pDst pointer is
NULL.

ippStsSizeErr

Indicates an error condition when x or y is less than zero.

ippStsNumChannelsErr

Indicates an error condition when numChannels has an illegal
value.

GetTileParamsByIndex
Returns the offset and size of a tile by a given index.

SyntaxCase 1: Operation with TL functions based on the Platform Aware API
IppStatus ippiGetTileParamsByIndex_LT(IppSizeL index, IppiPointL splitImage, IppiSizeL
tileSize, IppiSizeL tailSize, IppiPointL* pTileOffset, IppiSizeL* pTileSize);

Case 2: Operation with TL functions based on the Classic API
IppStatus ippiGetTileParamsByIndex_T(int index, IppiPoint splitImage, IppiSize
tileSize, IppiSize tailSize, IppiPoint* pTileOffset, IppiSize* pTileSize);

Include Files
ippi_tl.hParameters
index

Ordinal index of a tile.

splitImage

Split of the image by x and y axis correspondingly.

tileSize

Size of a tile.

tailSize

Size of the last bottom right tile.

pTileOffset

Offset of the tile corresponding to the top left image corner.

pTileSize

Size of a tile.

Description
This function returns the offset and size of a tile by a given index.

684

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Return Values
ippStsNoErr
ippStsNullPtrErr

Indicates no error.
Indicates an error condition when the pTileOffset or

pTileSize pointer is NULL.

GetThreadingType
Returns type of the threading layer.

SyntaxCase 1: Operation with TL functions based on the Platform Aware API
IppStatus ippGetThreadingType_LT(IppThreadingType* thrType);

Case 2: Operation with TL functions based on the Classic API
IppStatus ippGetThreadingType_T(IppThreadingType* thrType);

Include Files
ippcore_tl.h

Parameters
thrType

Pointer to the threading type.

Description
This function returns OMP if the OpenMP* Threading Layer and TBB if the TBB* Threading Layer is used.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error condition when the thrType pointer is NULL.

GetThreadIdx
Returns a unique thread identification number.

SyntaxCase 1: Operation with TL functions based on the Platform Aware API
IppStatus ippGetThreadIdx_LT(int* pThrIdx);

Case 2: Operation with TL functions based on the Classic API
IppStatus ippGetThreadIdx_T(int* pThrIdx);

Include Files
ippcore_tl.h

Parameters
pThrIdx

Pointer to the index of a thread.

Description
This function returns a unique thread identification number.

685

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error condition when the pThrIdx pointer is NULL.

Image Data Exchange and Initialization Functions
This chapter describes the Intel® IPP image processing functions that perform image data manipulation,exchange and initialization operations.

ConvertConverts image pixel values from one data type toanother.

SyntaxCase 1: Conversion to increase bit depth and change signed to unsigned type
IppStatus ippiConvert_<mod>(const Ipp<srcDatatype>* pSrc, int srcStep,
Ipp<dstDatatype>* pDst, int dstStep, IppiSize roiSize);
Supported values for mod:8u16u_C1R

8u16s_C1R

8u32s_C1R

8u32f_C1R

8s32s_C1R

8u16u_C3R

8u16s_C3R

8u32s_C3R

8u32f_C3R

8s32s_C3R

8u16u_C4R

8u16s_C4R

8u32s_C4R

8u32f_C4R

8s32s_C4R

8s32f_C1R

16u32s_C1R

16u32f_C1R

16s32s_C1R

16s32f_C1R

8s32f_C3R

16u32s_C3R

16u32f_C3R

16s32s_C3R

16s32f_C3R

8s32f_C4R

16u32s_C4R

16u32f_C4R

16s32s_C4R

16s32f_C4R

8s8u_C1Rs

16s16u_C1Rs

16u32u_C1R32s32u_C1Rs

32u32f_C1R

8s16u_C1Rs

16s32u_C1Rs

32s32f_C1R

8s16s_C1R
8s32u_C1Rs
8s64f_C1R
IppStatus ippiConvert_<mod>(const Ipp<srcDatatype>* pSrc, int srcStep,
Ipp<dstDatatype>* pDst, int dstStep, IppiSize roiSize);
Supported values for mod:8u16u_AC4R

8u16s_AC4R

8u32s_AC4R

8u32f_AC4R

8s32s_AC4R

8s32f_AC4R

16u32s_AC4R

16u32f_AC4R

16s32s_AC4R

16s32f_AC4R

Case 2: Conversion to reduce bit depth and change unsigned to signed type: integer to integer type
IppStatus ippiConvert_<mod>(const Ipp<srcDatatype>* pSrc, int srcStep,
Ipp<dstDatatype>* pDst, int dstStep, IppiSize roiSize);
Supported values for mod:16u8u_C1R

16s8u_C1R

32s8u_C1R

32s8s_C1R

16u8u_C3R

16s8u_C3R

32s8u_C3R

32s8s_C3R

16u8u_C4R

16s8u_C4R

32s8u_C4R

32s8s_C4R

686

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

IppStatus ippiConvert_<mod>(const Ipp<srcDatatype>* pSrc, int srcStep,
Ipp<dstDatatype>* pDst, int dstStep, IppiSize roiSize, IppRoundMode roundMode, int
scaleFactor);
Supported values for mod:8u8s_C1RSfs

16u8s_C1RSfs

32u8u_C1RSfs

32s16u_C1RSfs

16s8s_C1RSfs

32u8s_C1RSfs

32s16s_C1RSfs

16u16s_C1RSfs

32u16u_C1RSfs
32u16s_C1RSfs
32u32s_C1RSfs

IppStatus ippiConvert_<mod>(const Ipp<srcDatatype>* pSrc, int srcStep,
Ipp<dstDatatype>* pDst, int dstStep, IppiSize roiSize);
Supported values for mod:16u8u_AC4R

16s8u_AC4R

32s8u_AC4R

32s8s_AC4R

Floating point to integer type:
IppStatus ippiConvert_<mod>(const Ipp32f* pSrc, int srcStep, Ipp<dstDatatype>* pDst,
int dstStep, IppiSize roiSize, IppRoundMode roundMode);
Supported values for mod:32f8u_C1R

32f8s_C1R

32f16u_C1R

32f16s_C1R

32f8u_C3R

32f8s_C3R

32f16u_C3R

32f16s_C3R

32f8u_C4R

32f8s_C4R

32f16u_C4R

32f16s_C4R

IppStatus ippiConvert_<mod>(const Ipp<srcDatatype>* pSrc, int srcStep,
Ipp<dstDatatype>* pDst, int dstStep, IppiSize roiSize, IppRoundMode roundMode, int
scaleFactor);
Supported values for mod:32f8u_C1RSfs

32f8s_C1RSfs

32f16u_C1RSfs

32f16s_C1RSfs

64f8u_C1RSfs

64f8s_C1RSfs

64f16u_C1RSfs

64f16s_C1RSfs

32f32u_C1RSfs

687

3
2
f
3
2
s
_
C
1
R
S
f
s

1

Intel® Integrated Performance Primitives Developer Guide and Reference

IppStatus ippiConvert_32f32u_C1IRSfs(Ipp32u* pSrcDst, int srcDstStep, IppiSize roiSize,
IppRoundMode roundMode, int scaleFactor);
IppStatus ippiConvert_<mod>(const Ipp32f* pSrc, int srcStep, Ipp<dstDatatype>* pDst,
int dstStep, IppiSize roiSize, IppRoundMode roundMode);
Supported values for mod:32f8u_AC4R

32f8s_AC4R

32f16u_AC4R

32f16s_AC4R

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source image ROI.

srcStep

Distance, in bytes, between the starting points of consecutive lines inthe source image.

pDst

Pointer to the destination image ROI.

pSrcDstPointer to the source and destination image ROI for in-place
operation.

dstStep

Distance, in bytes, between the starting points of consecutive lines inthe destination image.

srcDstStep

Distance, in bytes, between the starting points of consecutive lines inthe source and destination image for in-place operation.

roiSize

Size of the source and destination ROI in pixels.

scaleFactor

Scale factor (see Integer Result Scaling).

roundModeRounding mode, the following values are possible:

ippRndZero
ippRndNear

ippRndFinancial

688

specifies that floating-point values aretruncated to zero,
specifies that floating-point values arerounded to the nearest even integer
when the fractional part equals 0.5;
otherwise they are rounded to thenearest integer,
specifies that floating-point values arerounded 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 or greaterthan 0.5.

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Description
This function operates with ROI.
This function converts pixel values in the source image ROI pSrc to a different data type and writes them tothe destination image ROI pDst.
The result of integer operations is always saturated to the destination data type range. It means that if thevalue of the source pixel is out of the data range of the destination image, the value of the corresponding
destination pixel is set to the value of the lower or upper bound (minimum or maximum) of the destination
data range:x = pSrc[i,j]if (x > MAX_VAL) x = MAX_VAL
if (x < MIN_VAL) x = MIN_VAL
pDst[i,j] = (CASTING)x
If you want to shift data from the signed range to the unsigned range and vice-versa, see "Application Notes"
below.
The function flavors with the Sfs descriptor in their names perform scaling of the internally computed resultsin accordance with the scaleFactor parameter.
When converting from floating-point to integer type, rounding defined by roundMode is performed, and theresult is saturated to the destination data type range.
NOTE
The bit order of each byte in the source image is inverse to the pixel order. It means that the first pixel
in a row represents the last (seventh) bit of the first byte in a row.

Application Notes
When data is converted from the signed integer to the corresponding unsigned integer and vice versa (8s ->8u, 16u --> 16s), the pixel information may be lost because all negative values will be set to zero (signedunsigned conversion), or unsigned values from the high half of the range will be set to the maximum value ofthe signed range (unsigned - signed conversion).
If you need just to shift the data from the signed range to the unsigned range and vice versa, use thefunction ippiXorC with the parameter value specified in such a way that the most significant bit is set to 1,
and all other bits are set to 0. For example, if you want to convert pixel values from Ipps16s type to Ipp16u
type with the rage shift call the function:
ippiXorC_16u_C1R( (Ipp16u *)pSrc, srcStep, 0x8000, pDst, dstStep, roiSize);
In this case the pixels values are converted as follows:-32768 --> 0-32767 --> 1...
-1 --> 32767
0 --> 32768
1 --> 32769
...

689

1

Intel® Integrated Performance Primitives Developer Guide and Reference

32766 --> 65534
32767 --> 65535

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error or a warning.

ippStsNullPtrErr

Indicates an error when any of the specified pointers is NULL, with the
exception of second mode in Case 4.

ippStsSizeErr

Indicates an error when roiSize has a field with zero or negativevalue, or srcBitOffset/dstBitOffset is less than zero.

ippStsStepErr

Indicates an error whensrcStep or dstStep has a zero or negativevalue.

ippStsMemAllocErr

Indicates an error when memory allocation fails.

ExampleThe code example below shows data conversion without scaling.

IppStatus convert( void ) {IppiSize roi={5,4};
Ipp32f x[5*4];
Ipp8u y[5*4];
ippiSet_32f_C1R( -1.0f, x, 5*sizeof(Ipp32f), roi );x[1] = 300; x[2] = 150;
return ippiConvert_32f8u_C1R( x, 5*sizeof(Ipp32f), y, 5, roi, ippRndNear );}The destination image y contains:

00 FF 96 00 00
00 00 00 00 00
00 00 00 00 00
00 00 00 00 00

See Also
Integer Result Scaling
Regions of Interest in Intel IPP
BinToGray, GrayToBin
Converts a bitonal image to a grayscale image andvice versa.

690

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

SyntaxCase 1: Conversion of a bitonal image to a grayscale image
IppStatus ippiBinToGray_1u<dstDataType>_C1R(const Ipp8u* pSrc, int srcStep, int
srcBitOffset, Ipp<dstDataType>* pDst, int dstStep, IppiSize roiSize, Ipp<dstDataType>loVal, Ipp<dstDataType> hiVal);
Supported values for dstDataType:

8u

16u

16s

32f

Case 2: Conversion of a grayscale image to a bitonal image
IppStatus ippiGrayToBin_<srcDataType>1u_C1R(const Ipp<srcDataType>* pSrc, int srcStep,
Ipp8u* pDst, int dstStep, int dstBitOffset, IppiSize roiSize, Ipp<sourceDataType>
threshold);
Supported values for srcDataType:

8u

16u

16s

32f

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source image ROI.

srcStep

Distance, in bytes, between the starting points of consecutive lines inthe source image.

srcBitOffset

Offset, in bits, from the first byte of the source image row.

pDst

Pointer to the destination image ROI.

dstStep

Distance, in bytes, between the starting points of consecutive lines inthe destination image.

dstBitOffset

Offset, in bits, from the first byte of the destination image row.

roiSize

Size of the ROI in pixels.

loVal

Destination value that corresponds to the "0" value of thecorresponding source element.

hiVal

Destination value that corresponds to the "1" value of thecorresponding source element.

thresholdThreshold level.

Description
These functions operate with ROI.

691

1

Intel® Integrated Performance Primitives Developer Guide and Reference

The ippiBinToGray function converts a bitonal image to grayscale, and the ippiGrayToBin function
converts a grayscale image to bitonal. The data type of the bitonal image is 8u. It means that each byte
consists of eight consecutive pixels of the image (1 bit per pixel). You need to specify the start position of the
ROI buffer in the srcBitOffset and dstBitOffset parameters.
The ippiBinToGray function transforms each bit of the source image into the pixel of the destination image
in the following way:••

If the input pixel is equal to 0, the corresponding output pixel is set to loVal.
If the input pixel is equal to 1, the corresponding output pixel is set to hiVal.

The ippiGrayToBin function transforms each pixel of the source image into the bit of the destination image
in the following way:••

If the input pixel is more than the threshold value, the corresponding output bit is set to 1.
If the input pixel is less than, or equal to the threshold value, the corresponding output bit is set to 0.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when any of the specified pointers is NULL.

ippStsStepErr
ippStsSizeErr

Indicates an error when the srcStep or dstStep value is lessthan, or equal to zero.
Indicates an error when:••

roiSize has a zero or negative value
the srcBitOffset or dstBitOffset value is less than zeroSee Also
Regions of Interest in Intel IPP
Scale
Scales pixel values of an image and converts them toanother bit depth.

SyntaxCase 1: Scaling with conversion to integer data of increased bit depth
IppStatus ippiScale_<mod>(const Ipp<srcDatatype>* pSrc, int srcStep, Ipp<dstDatatype>*pDst, int dstStep, IppiSize roiSize);
Supported values for mod:8u16u_C1R

8u16s_C1R

8u32s_C1R

8u16u_C3R

8u16s_C3R

8u32s_C3R

8u16u_C4R

8u16s_C4R

8u32s_C4R

IppStatus ippiScale_<mod>(const Ipp<srcDatatype>* pSrc, int srcStep, Ipp<dstDatatype>*pDst, int dstStep, IppiSize roiSize);
Supported values for mod:8u16u_AC4R692

8u16s_AC4R

8u32s_AC4R

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Case 2: Scaling with conversion to floating-point data
IppStatus ippiScale_<mod>(const Ipp8u* pSrc, int srcStep, Ipp32f* pDst, int dstStep,
IppiSize roiSize, Ipp32f vMin, Ipp32f vMax);
Supported values for mod:8u32f_C1R
8u32f_C3R
8u32f_C4R

IppStatus ippiScale_8u32f_AC4R(const Ipp8u* pSrc, int srcStep, Ipp32f* pDst, int
dstStep, IppiSize roiSize, Ipp32f vMin, Ipp32f vMax);

Case 3: Scaling of integer data with conversion to reduced bit depth
IppStatus ippiScale_<mod> (const Ipp<srcDatatype>* pSrc, int srcStep, Ipp<dstDatatype>*pDst, int dstStep, IppiSize roiSize, IppHintAlgorithm hint);
Supported values for mod:16u8u_C1R

16s8u_C1R

32s8u_C1R

16u8u_C3R

16s8u_C3R

32s8u_C3R

16u8u_C4R

16s8u_C4R

32s8u_C4R

IppStatus ippiScale_<mod> (const Ipp<srcDatatype>* pSrc, int srcStep, Ipp<dstDatatype>*pDst, int dstStep, IppiSize roiSize, IppHintAlgorithm hint);
Supported values for mod:16u8u_AC4R

16s8u_AC4R

32s8u_AC4R

Case 4: Scaling of floating-point data with conversion to integer data type
IppStatus ippiScale_<mod>(const Ipp32f* pSrc, int srcStep, Ipp8u* pDst, int dstStep,
IppiSize roiSize, Ipp32f vMin, Ipp32f vMax);
Supported values for mod:32f8u_C1R
32f8u_C3R
32f8u_C4R

IppStatus ippiScale_32f8u_AC4R(const Ipp32f* pSrc, int srcStep, Ipp8u* pDst, int
dstStep, IppiSize roiSize, Ipp32f vMin, Ipp32f vMax);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

693

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Parameters
pSrc

Pointer to the source image ROI.

srcStep

Distance, in bytes, between the starting points of consecutive lines inthe source image.

pDst

Pointer to the destination image ROI.

dstStep

Distance, in bytes, between the starting bytes of consecutive lines inthe destination image.

roiSize

Size of the source and destination ROI in pixels.

vMin, vMax

Minimum and maximum values of the input data.

hint

Option to select the algorithmic implementation of the function (seeHint Arguments for Image Moment Functions).

Description
This function operates with ROI.
This function converts pixel values of a source image ROI pSrc to the destination data type, using a linear
mapping. The computation algorithm is specified by the hint argument. For conversion between integer datatypes, the whole range [src_Min..src_Max] of the input data type is mapped onto the range[dst_Min..dst_Max] of the output data type.
The source pixel p is mapped to the destination pixel p′ by the following formula:p′ = dst_Min + k*(p - src_Min)wherek = (dst_Max - dst_Min)/(src_Max - src_Min)
For conversions to and from floating-point data type, the user-defined floating-point data range[vMin..vMax] is mapped onto the source or destination data type range.
If the conversion is from Ipp32f type and some of the input floating-point values are outside the specified
input data range [vMin..vMax], the corresponding output values saturate. To determine the actual floatingpoint data range in your image, use the ippiMinMax function.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error or a warning.

ippStsNullPtrErr

Indicates an error when any of the specified pointers is NULL.

ippStsSizeErr

Indicates an error condition if roiSize has a field with a zero or
negative value.

ippStsStepErr

Indicates an error condition if srcStep or dstStep has a zero or
negative value.

ippStsScaleRangeErr

Indicates an error condition if the input data bounds are incorrect,
that is, vMax is less than or equal to vMin .

694

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

ExampleThe code example below shows how to use scaling to preserve the data range.

IppStatus scale( void ) {IppiSize roi = {5,4};
Ipp32f x[5*4];
Ipp8u y[5*4];
ippiSet_32f_C1R( -1.0f, x, 5*sizeof(Ipp32f), roi );x[1] = 300; x[2] = 150;
return ippiScale_32f8u_C1R( x, 5*sizeof(Ipp32f), y, 5, roi, -1, 300 );}The destination image y contains:

00 FF 80 00 00
00 00 00 00 00
00 00 00 00 00
00 00 00 00 00

See Also
Regions of Interest in Intel IPP
Image Moments
Intel® Integrated Performance Primitives Concepts
MinMax Computes the minimum and maximum of image pixel values.
ScaleC
Scales pixel values of an image and converts them toanother bit depth.

SyntaxCase 1: Not-in-place operation
IppStatus ippiScaleC_<mod>_C1R(const Ipp<srcDatatype>* pSrc, int srcStep, Ipp64f mVal,
Ipp64f aVal, Ipp<dstDatatype>* pDst, int dstStep, IppiSize roiSize, IppHintAlgorithmhint);
Supported values for mod:

8u

8u8s

8u16u

8u16s

8u32s

8u32f

8u64f

8s8u

8s

8s16u

8s16s

8s32s

8s32f

8s64f

16u8u

16u8s

16u

16u16s16u32s16u32f

16u64f

16s8u

16s8s

16s16u16s

16s32s16s32f16s64f

32s8u

32s8s

32s16u32s16s32s

32s32f32s64f

32f8u

32f8s

32f16u32f16s32f32s32f

32f64f

64f8u

64f8s

64f16u64f16s64f32s64f32f

64f

695

1

Intel® Integrated Performance Primitives Developer Guide and Reference

where the first value is srcDatatype and the second value is dstDatatype.

Case 2: In-place operation
IppStatus ippiScaleC_<mod>_C1IR(const Ipp<datatype>* pSrcDst, int srcDstStep, Ipp64f
mVal, Ipp64f aVal, IppiSize roiSize, IppHintAlgorithm hint);
Supported values for mod:

8u

8s

16u

16s

32s

32f

64f

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source image ROI.

pSrcDstPointer to the source and destination buffer or an array of pointers toseparate source and destination color planes for in-place operation.

srcDstStep

Distance, in bytes, between the starting points of consecutive lines inthe source and destination image for in-place operation.

srcStep

Distance, in bytes, between the starting points of consecutive lines inthe source image.

mVal

Value of the multiplier used for scaling.

aVal

Offset value for scaling.

pDst

Pointer to the destination image ROI.

dstStep

Distance, in bytes, between the starting bytes of consecutive lines inthe destination image.

roiSize

Size of the source and destination ROI, in pixels.

hint

Option to select the algorithmic implementation of the function.
Supported values are ippAlgHintFast (default) andippAlgHintAccurate.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function scales pixel values of the source image ROI and converts them to the destination data typeaccording to the following formula:

dst = saturate_to_dstType(src * mVal + aVal)696

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error or a warning.

ippStsNullPtrErr

Indicates an error when any of the specified pointers is NULL.

ippStsSizeErr

Indicates an error when roiSize has a field with a zero or negativevalue.

ippStsStepErr

Indicates an error when the step value is less than, or equal to zero.

ExampleSee Also
Regions of Interest in Intel IPP
Set
Sets pixels of an array to a constant value.

SyntaxCase 1: Setting one-channel data to a value
IppStatus ippiSet_<mod>(Ipp<datatype> value, Ipp<datatype>* pDst, int dstStep, IppiSize
roiSize);
Supported values for mod:8u_C1R

16u_C1R

16s_C1R

32s_C1R

32f_C1R

Case 2: Setting each color channel to a specified value
IppStatus ippiSet_<mod>(const Ipp<datatype> value[3], Ipp<datatype>* pDst, int dstStep,
IppiSize roiSize);
Supported values for mod:8u_C3R

16u_C3R

16s_C3R

32s_C3R

32f_C3R

8u_AC4R

16u_AC4R

16s_AC4R

32s_AC4R

32f_AC4R

Case 3: Setting color channels and alpha channel to specified values
IppStatus ippiSet_<mod>(const Ipp<datatype> value[4], Ipp<datatype>* pDst, int dstStep,
IppiSize roiSize);
Supported values for mod:8u_C4R

16u_C4R

16s_C4R

32s_C4R

32f_C4R

Case 4: Setting masked one-channel data to a value
IppStatus ippiSet_<mod>(Ipp<datatype> value, Ipp<datatype>* pDst, int dstStep, IppiSize
roiSize, const Ipp8u* pMask, int maskStep);
Supported values for mod:8u_C1MR

16u_C1MR

16s_C1MR

32s_C1MR

32f_C1MR

697

1Intel® Integrated Performance Primitives Developer Guide and Reference

Case 5: Setting color channels of masked multi-channel data to specified values
IppStatus ippiSet_<mod>(const Ipp<datatype> value[3], Ipp<datatype>* pDst, int dstStep,
IppiSize roiSize, const Ipp8u* pMask, int maskStep);
Supported values for mod:8u_C3MR

16u_C3MR

16s_C3MR

32s_C3MR

32f_C3MR

8u_AC4MR

16u_AC4MR

16s_AC4MR

32s_AC4MR

32f_AC4MR

Case 6: Setting all channels of masked multi-channel data to specified values
IppStatus ippiSet_<mod>(const Ipp<datatype> value[4], Ipp<datatype>* pDst, int dstStep,
IppiSize roiSize, const Ipp8u* pMask, int maskStep);
Supported values for mod:8u_C4MR

16u_C4MR

16s_C4MR

32s_C4MR

32f_C4MR

Case 7: Setting selected channel of multi-channel data to a value
IppStatus ippiSet_<mod>(Ipp<datatype> value, Ipp<datatype>* pDst, int dstStep, IppiSize
roiSize);
Supported values for mod:8u_C3CR

16u_C3CR

16s_C3CR

32s_C3CR

32f_C3CR

8u_C4CR

16u_C4CR

16s_C4CR

32s_C4CR

32f_C4CR

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
value

Constant value to assign to each pixel in the destination image ROI.

pDst

Pointer to the destination image ROI.

dstStep

Distance, in bytes, between the starting points of consecutive lines inthe destination image.

roiSize

Size of the image ROI in pixels.

pMask

Pointer to the mask image buffer.

maskStep

Distance, in bytes, between the starting points of consecutive lines in
the mask image buffer.

Description
This function operates with ROI.
This function sets pixels in the destination image ROI pDst to the value constant. Either all pixels in arectangular ROI, or only those selected by the specified mask pMask, can be set to a value. In case ofmasked operation, the function sets pixel values in the destination buffer only if the spatially corresponding698

Developer Guide and Reference for Intel® Integrated Performance Primitives

1mask array value is non-zero. When a channel of interest is selected, that is only one channel of a multichannel image must be set (see Case 7), the pDst pointer points to the start of ROI buffer in the requiredchannel. If alpha channel is present in the source image data, the alpha components may be either skipped,or set to a value, depending on the chosen ippiSet function flavor.
This function supports negative step value.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error or a warning.

ippStsNullPtrErr

Indicates an error when any of the specified pointers is NULL.

ippStsSizeErr

Indicates an error condition if roiSize has a field with zero or
negative value.

ippStsStepErr

Indicates an error condition if dstStep or maskStep has a zero value.

ExampleThe code example below shows how to use the function ippiSet_8u_C1R.

void func_set(){
IppiSize roi = {5,4};
Ipp8u x[8*4] = {0};ippiSet_8u_C1R(1, x, 8, roi);}
Result:01 01 01 01 01 00 00 00
01 01 01 01 01 00 00 00
01 01 01 01 01 00 00 00
01 01 01 01 01 00 00 00

See Also
Regions of Interest in Intel IPP
Copy
Copies pixel values between two buffers.

SyntaxCase 1: Copying all pixels of all color channels
IppStatus ippiCopy_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>* pDst,
int dstStep, IppiSize roiSize);
Supported values for mod:8u_C1R

16u_C1R

16s_C1R

32s_C1R

32f_C1R

8u_C3R

16u_C3R

16s_C3R

32s_C3R

32f_C3R

8u_C4R

16u_C4R

16s_C4R

32s_C4R

32f_C4R

8u_AC4R

16u_AC4R

16s_AC4R

32s_AC4R

32f_AC4R

8u_C3AC4R

16u_C3AC4R

16s_C3AC4R

32s_C3AC4R

32f_C3AC4R

8u_AC4C3R

16u_AC4C3R

16s_AC4C3R

32s_AC4C3R

32f_AC4C3R

699

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Case 2: Copying masked pixels only
IppStatus ippiCopy_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>* pDst,
int dstStep, IppiSize roiSize,const Ipp8u* pMask, int maskStep);
Supported values for mod:8u_C1MR

16u_C1MR

16s_C1MR

32s_C1MR

32f_C1MR

8u_C3MR

16u_C3MR

16s_C3MR

32s_C3MR

32f_C3MR

8u_C4MR

16u_C4MR

16s_C4MR

32s_C4MR

32f_C4MR

8u_AC4MR

16u_AC4MR

16s_AC4MR

32s_AC4MR

32f_AC4MR

Case 3: Copying a selected channel in a multi-channel image
IppStatus ippiCopy_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>* pDst,
int dstStep, IppiSize roiSize);
Supported values for mod:8u_C3CR

16u_C3CR

16s_C3CR

32s_C3CR

32f_C3CR

8u_C4CR

16u_C4CR

16s_C4CR

32s_C4CR

32f_C4CR

Case 4: Copying a selected channel to a one-channel image
IppStatus ippiCopy_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>* pDst,
int dstStep, IppiSize roiSize);
Supported values for mod:8u_C3C1R

16u_C3C1R

16s_C3C1R

32s_C3C1R

32f_C3C1R

8u_C4C1R

16u_C4C1R

16s_C4C1R

32s_C4C1R

32f_C4C1R

Case 5: Copying a one-channel image to a multi-channel image
IppStatus ippiCopy_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>* pDst,
int dstStep, IppiSize roiSize);
Supported values for mod:8u_C1C3R

16u_C1C3R

16s_C1C3R

32s_C1C3R

32f_C1C3R

8u_C1C4R

16u_C1C4R

16s_C1C4R

32s_C1C4R

32f_C1C4R

Case 6: Splitting color image into separate planes
IppStatus ippiCopy_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>* const
pDst[3], int dstStep, IppiSize roiSize);
Supported values for mod:8u_C3P3R

16u_C3P3R

16s_C3P3R

32s_C3P3R

32f_C3P3R

IppStatus ippiCopy_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>* const
pDst[4], int dstStep, IppiSize roiSize);
Supported values for mod:8u_C4P4R

700

16u_C4P4R

16s_C4P4R

32s_C4P4R

32f_C4P4R

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Case 7: Composing color image from separate planes
IppStatus ippiCopy_<mod>(const Ipp<datatype>* const pSrc[3], int srcStep,
Ipp<datatype>* pDst, int dstStep, IppiSize roiSize);
Supported values for mod:8u_P3C3R

16u_P3C3R

16s_P3C3R

32s_P3C3R

32f_P3C3R

IppStatus ippiCopy_<mod>(const Ipp<datatype>* const pSrc[4], int srcStep,
Ipp<datatype>* pDst, int dstStep, IppiSize roiSize);
Supported values for mod:8u_P4C4R

16u_P4C4R

16s_P4C4R

32s_P4C4R

32f_P4C4R

Case 8: Copying all pixels of all color channels with platform-aware functions
IppStatus ippiCopy_<mod>(const Ipp<datatype>* pSrc, IppSizeL srcStep, Ipp<datatype>*pDst, IppSizeL dstStep, IppiSizeL roiSize);
Supported values for mod:8u_C1R_L

16s_C1R_L

16u_C1R_L

32s_C1R_L

32f_C1R_L

8u_C3R_L

16s_C3R_L

16u_C3R_L

32s_C3R_L

32f_C3R_L

8u_C4R_L

16s_C4R_L

16u_C4R_L

32s_C4R_L

32f_C4R_L

8u_AC4R_L

16s_AC4R_L

16u_AC4R_L

32s_AC4R_L

32f_AC4R_L

Include Files
ippi.h
Flavors with the _L suffix: ippi_l.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source image ROI. The array storing pointers to thecolor planes of the source planar image.

srcStep

Distance, in bytes, between the starting points of consecutive lines inthe source image.

pDst

Pointer to the destination image ROI. The array storing pointers to thecolor planes of the destination planar image.

dstStep

Distance, in bytes, between the starting points of consecutive lines inthe destination image.

roiSize

Size of the source and destination ROI in pixels.

pMask

Pointer to the mask image buffer.

701

1

Intel® Integrated Performance Primitives Developer Guide and Reference

maskStep

Distance, in bytes, between the starting points of consecutive lines in
the mask image buffer.

Description
This function operates with ROI.
This function copies data from the source image pSrc to the destination image pDst. Copying pixels selectedby a mask pMask is supported as well.
For masked operation (Case 2), the function writes pixel values in the destination buffer only if the spatiallycorresponding mask array value is non-zero (as illustrated in the code example below).
Function flavors operating with the channel of interest (descriptor C) copy only one specified channel of asource multi-channel image to the channel of another multi-channel image (see Case 3). For thesefunctions, the pSrc and pDst pointers point to the starts of ROI buffers in the specified channels of sourceand destination images, respectively.
Some function flavors add alpha channel to the 3-channel source image (flavors with the _C3AC4R
descriptor), or discard alpha channel from the source image (flavors with the _AC4C3R descriptor) - see Case
1.
Special function flavors copy data from only one specified channel pSrc of a multi-channel image to a onechannel image pDst (see Case 4), as well as to copy data from a one-channel image pSrc to only one
specified channel of a multi-channel image pDst (see Case 5).
You can also use the ippiCopy function to convert the interleaved color image into separate planes and viceversa (see Case 6 and Case 7).

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error or a warning.

ippStsNullPtrErr

Indicates an error when any of the specified pointers is NULL, with the
exception of second mode in Case 4.

ippStsSizeErr

Indicates an error condition if roiSize has a field with a zero or
negative value.

ippStsStepErr

Indicates an error condition if srcStep or dstStep is less thanroiSize.width * <pixelSize> for Cases 4 and 5.

ExampleThe code example below shows how to copy masked data.

IppStatus copyWithMask( void ) {Ipp8u mask[3*3], x[5*4], y[5*4]={0};IppiSize imgroi={5,4}, mskroi={3,3};
ippiSet_8u_C1R( 3, x, 5, imgroi );/// set mask with a hole in upper left corner
ippiSet_8u_C1R( 1, mask, 3, mskroi );mask[0] = 0;/// copy roi with mask
return ippiCopy_8u_C1MR( x, 5, y, 5, mskroi, mask, 3 );
}

702

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

The destination image y contains:

00 03 03 00 00
03 03 03 00 00
03 03 03 00 00
00 00 00 00 00

See Also
Regions of Interest in Intel IPP
CopyManaged
Copies pixel values between two images in accordancewith the specified type of copying.

SyntaxIppStatus ippiCopyManaged_8u_C1R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int
dstStep, IppiSize roiSize, int flags);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source image ROI.

srcStep

Distance, in bytes, between the starting points of consecutive lines inthe source image.

pDst

Pointer to the destination image ROI.

dstStep

Distance, in bytes, between the starting points of consecutive lines inthe destination image.

roiSize

Size of the image ROI in pixels.

flags

Specifies the type of copying. Possible values are:••

IPP_TEMPORAL_COPY - standard copying
IPP_NONTEMPORAL_STORE - copying without caching the•

IPP_NONTEMPORAL_LOAD - processor uses non-temporal load

destination image
instructions

Description
This function operates with ROI.
This function copies data from a source image ROI pSrc to the destination image ROI pDst. The flags
parameter specifies the type of copying that the function performs:••

When flags is set to IPP_TEMPORAL_COPY, the function is identical to the ippiCopy_8u_C1R function.
When flags is set to IPP_NONTEMPORAL_STORE, the processor uses non-temporal store instructions.
Copying is performed without caching the data of the destination image.

703

1
•

Intel® Integrated Performance Primitives Developer Guide and Reference

When flags is set to IPP_NONTEMPORAL_LOAD, the processor uses non-temporal load instructions.

To achieve better performance, align data to 64-byte boundary.
Product and Performance Information
Performance varies by use, configuration and other factors. Learn more at www.Intel.com/
PerformanceIndex.
Notice revision #20201201

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error or a warning.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error when roiSize has a field with a zero or negativevalue.

See Also
Regions of Interest in Intel IPP
CopyConstBorder
Copies pixels values between two images and adds
the border pixels with a constant value.

SyntaxCase 1: Not-in-place operation on one-channel data
IppStatus ippiCopyConstBorder_<mod>(const Ipp<datatype>* pSrc, int srcStep, IppiSize
srcRoiSize, Ipp<datatype>* pDst, int dstStep, IppiSize dstRoiSize, int topBorderHeight,
int leftBorderWidth, Ipp<datatype> value);
Supported values for mod:8u_C1R

16u_C1R

16s_C1R

32s_C1R

32f_C1R

Case 2: In-place operation on one-channel data
IppStatus ippiCopyConstBorder_<mod>(Ipp<datatype>* pSrcDst, int srcDstStep, IppiSize
srcRoiSize, IppiSize dstRoiSize, int topBorderHeight, int leftBorderWidth, const
Ipp<datatype> value);
Supported values for mod:8u_C1IR

16u_C1IR

16s_C1IR

32s_C1IR

32f_C1IR

Case 3: Not-in-place operation on multi-channel data
IppStatus ippiCopyConstBorder_<mod>(const Ipp<datatype>* pSrc, int srcStep, IppiSize
srcRoiSize, Ipp<datatype>* pDst, int dstStep, IppiSize dstRoiSize, int topBorderHeight,
int leftBorderWidth, const Ipp<datatype> value[3]);Supported values for mod:8u_C3R

16u_C3R

16s_C3R

32s_C3R

32f_C3R

8u_AC4R

16u_AC4R

16s_AC4R

32s_AC4R

32f_AC4R

704

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

IppStatus ippiCopyConstBorder_<mod>(const Ipp<datatype>* pSrc, int srcStep, IppiSize
srcRoiSize, Ipp<datatype>* pDst, int dstStep, IppiSize dstRoiSize, int topBorderHeight,
int leftBorderWidth, const Ipp<datatype> value[4]);Supported values for mod:8u_C4R

16u_C4R

16s_C4R

32s_C4R

32f_C4R

Case 4: In-place operation on multi-channel data
IppStatus ippiCopyConstBorder_<mod>(Ipp<datatype>* pSrcDst, int srcDstStep, IppiSize
srcRoiSize, IppiSize dstRoiSize, int topBorderHeight, int leftBorderWidth, const
Ipp<datatype> value[3]);Supported values for mod:8u_C3IR

16u_C3IR

16s_C3IR

32s_C3IR

32f_C3IR

8u_AC4IR

16u_AC4IR

16s_AC4IR

32s_AC4IR

32f_AC4IR

IppStatus ippiCopyConstBorder_<mod>(Ipp<datatype>* pSrcDst, int srcDstStep, IppiSize
srcRoiSize, IppiSize dstRoiSize, int topBorderHeight, int leftBorderWidth, const
Ipp<datatype> value[4]);Supported values for mod:8u_C4IR

16u_C4IR

16s_C4IR

32s_C4IR

32f_C4IR

Case 5: Not-in-place operation on one-channel data with platform-aware functions
IppStatus ippiCopyConstBorder_<mod>(const Ipp<datatype>* pSrc, IppSizeL srcStep,
IppiSizeL srcRoiSize, Ipp<datatype>* pDst, IppSizeL dstStep, IppiSizeL dstRoiSize,
IppSizeL topBorderHeight, IppSizeL leftBorderWidth, Ipp<datatype> value);
Supported values for mod:8u_C1R_L

16u_C1R_L

16s_C1R_L

32s_C1R_L

32f_C1R_L

Case 6: In-place operation on one-channel data with platform-aware functions
IppStatus ippiCopyConstBorder_<mod>(Ipp<datatype>* pSrcDst, IppSizeL srcDstStep,
IppiSizeL srcRoiSize, IppiSizeL dstRoiSize, IppSizeL topBorderHeight, IppSizeL
leftBorderWidth, const Ipp<datatype> value);
Supported values for mod:8u_C1IR_L

16u_C1IR_L

16s_C1IR_L

32s_C1IR_L

32f_C1IR_L

Case 7: Not-in-place operation on multi-channel data with platform-aware functions
IppStatus ippiCopyConstBorder_<mod>(const Ipp<datatype>* pSrc, IppSizeL srcStep,
IppiSizeL srcRoiSize, Ipp<datatype>* pDst, IppSizeL dstStep, IppiSizeL dstRoiSize,
IppSizeL topBorderHeight, IppSizeL leftBorderWidth, const Ipp<datatype> value[3]);Supported values for mod:8u_C3R_L

16u_C3R_L

16s_C3R_L

32s_C3R_L

32f_C3R_L

8u_AC4R_L

16u_AC4R_L

16s_AC4R_L

32s_AC4R_L

32f_AC4R_L

705

1

Intel® Integrated Performance Primitives Developer Guide and Reference

IppStatus ippiCopyConstBorder_<mod>(const Ipp<datatype>* pSrc, IppSizeL srcStep,
IppiSizeL srcRoiSize, Ipp<datatype>* pDst, IppSizeL dstStep, IppiSizeL dstRoiSize,
IppSizeL topBorderHeight, IppSizeL leftBorderWidth, const Ipp<datatype> value[4]);Supported values for mod:8u_C4R_L

16u_C4R_L

16s_C4R_L

32s_C4R_L

32f_C4R_L

Case 8: In-place operation on multi-channel data with platform-aware functions
IppStatus ippiCopyConstBorder_<mod>(Ipp<datatype>* pSrcDst, IppSizeL srcDstStep,
IppiSizeL srcRoiSize, IppiSizeL dstRoiSize, IppSizeL topBorderHeight, IppSizeL
leftBorderWidth, const Ipp<datatype> value[3]);Supported values for mod:8u_C3IR_L

16u_C3IR_L

16s_C3IR_L

32s_C3IR_L

32f_C3IR_L

8u_AC4IR_L

16u_AC4IR_L

16s_AC4IR_L

32s_AC4IR_L

32f_AC4IR_L

IppStatus ippiCopyConstBorder_<mod>(Ipp<datatype>* pSrcDst, IppSizeL srcDstStep,
IppiSizeL srcRoiSize, IppiSizeL dstRoiSize, IppSizeL topBorderHeight, IppSizeL
leftBorderWidth, const Ipp<datatype> value[4]);Supported values for mod:8u_C4IR_L

16u_C4IR_L

16s_C4IR_L

32s_C4IR_L

32f_C4IR_L

Include Files
ippi.h
Flavors with the _L suffix: ippi_l.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source image ROI.

srcStep

Distance in bytes between starts of consecutive lines in the source
image.

pDst

Pointer to the destination image.

pSrcDstPointer to the source/destination image (for in-place flavors).

dstStep

Distance, in bytes, between the starting points of consecutive lines inthe destination image.

srcDstStep

Distance, in bytes, between the starting points of consecutive lines inthe source/destination image (for in-place flavors).

srcRoiSize

Size of the source ROI, in pixels.

dstRoiSize

Size of the destination ROI, in pixels.

topBorderHeight

Height of the top border, in pixels.

706

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

leftBorderWidth

Width of the left border, in pixels.

value

The constant value to assign to the border pixels (constant vector incase of multi-channel images).

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function copies the source image pSrc to the destination image pDst and creates border outside thecopied area; pixel values of the border are set to the specified constant value that is passed by the value
argument. The parameters topBorderHeight and leftBorderWidth specify the position of the first pixel ofthe source ROI in the destination image ROI (see Figure Creating a Border of Pixels with Constant Value.)
Squares marked in red correspond to pixels copied from the source image, that is, the source image ROI.
Creating a Border of Pixels with Constant Value

The height (width) of the destination ROI cannot be less than the sum of the height (width) of source ROI
and the topBorderHeight (leftBorderWidth) parameter.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error or a warning.

ippStsNullPtrErr

Indicates an error when any of the specified pointers is NULL.

ippStsSizeErr

Indicates an error condition if srcRoiSize or dstRoiSize has a fieldwith a zero or negative value, or topBorderHeight orleftBorderWidth is less than zero, or dstRoiSize.width <srcRoiSize.width + leftBorderWidth, or dstRoiSize.height <srcRoiSize.height + topBorderHeight.

ippStsStepErr

Indicates an error condition if srcStep or dstStep has a zero or
negative value.

707

1

Intel® Integrated Performance Primitives Developer Guide and Reference

ExampleThe code example below shows how to use the function ippiCopyConstBorder_8u_C1R.

Ipp8u src[8*4] = {3, 3, 3, 3, 3, 8, 8, 8,
3, 2, 1, 2, 3, 8, 8, 8,
3, 2, 1, 2, 3, 8, 8, 8,
3, 3, 3, 3, 3, 8, 8, 8};Ipp8u dst[8*6];
IppiSize srcRoi = { 5, 4 };IppiSize dstRoi = { 7, 6 };int borderWidth = 1;
int borderHeight = 1;
int borderVal = 0;
ippiCopyConstBorder_8u_C1R(src, 8, srcRoi, dst, 8, dstRoi, borderHeight, borderWidth, borderVal);
Resultssource image:3 3 3 3 3 8 8 8
3 2 1 2 3 8 8 8
3 2 1 2 3 8 8 83 3 3 3 3 8 8 8src

destination image:0 0 0 0 0 0 0
0 3 3 3 3 3 0
0 3 2 1 2 3 0
0 3 2 1 2 3 0dst
0 3 3 3 3 3 0
0 0 0 0 0 0 0

CopyMirrorBorder
Copies pixels values between two images and adds
the mirrored border pixels.

SyntaxCase 1: Not-in-place operation
IppStatus ippiCopyMirrorBorder_<mod>(const Ipp<datatype>* pSrc, int srcStep, IppiSize
srcRoiSize, Ipp<datatype>* pDst, int dstStep, IppiSize dstRoiSize, int topBorderHeight,
int leftBorderWidth);
Supported values for mod:8u_C1R

16u_C1R

16s_C1R

32s_C1R

32f_C1R

8u_C3R

16u_C3R

16s_C3R

32s_C3R

32f_C3R

8u_C4R

16u_C4R

16s_C4R

32s_C4R

32f_C4R

Case 2: In-place operation
IppStatus ippiCopyMirrorBorder_<mod>(const Ipp<datatype>* pSrc, int srcDstStep,
IppiSize srcRoiSize, IppiSize dstRoiSize, int topBorderHeight, int leftBorderWidth);
Supported values for mod:8u_C1IR

708

16u_C1IR

16s_C1IR

32s_C1IR

32f_C1IR

Developer Guide and Reference for Intel® Integrated Performance Primitives

8u_C3IR

16u_C3IR

16s_C3IR

32s_C3IR

32f_C3IR

8u_C4IR

16u_C4IR

16s_C4IR

32s_C4IR

32f_C4IR

1

Case 3: Not-in-place operation with platform-aware functions
IppStatus ippiCopyMirrorBorder_<mod>(const Ipp<datatype>* pSrc, IppSizeL srcStep,
IppiSizeL srcRoiSize, Ipp<datatype>* pDst, IppSizeL dstStep, IppiSizeL dstRoiSize,
IppSizeL topBorderHeight, IppSizeL leftBorderWidth);
Supported values for mod:8u_C1R_L

16u_C1R_L

16s_C1R_L

32s_C1R_L

32f_C1R_L

8u_C3R_L

16u_C3R_L

16s_C3R_L

32s_C3R_L

32f_C3R_L

8u_C4R_L

16u_C4R_L

16s_C4R_L

32s_C4R_L

32f_C4R_L

Case 4: In-place operation with platform-aware functions
IppStatus ippiCopyMirrorBorder_<mod>(const Ipp<datatype>* pSrc, IppSizeL srcDstStep,
IppiSizeL srcRoiSize, IppiSizeL dstRoiSize, IppSizeL topBorderHeight, IppSizeL
leftBorderWidth);
Supported values for mod:8u_C1IR_L

16u_C1IR_L

16s_C1IR_L

32s_C1IR_L

32f_C1IR_L

8u_C3IR_L

16u_C3IR_L

16s_C3IR_L

32s_C3IR_L

32f_C3IR_L

8u_C4IR_L

16u_C4IR_L

16s_C4IR_L

32s_C4IR_L

32f_C4IR_L

Include Files
ippi.h
Flavors with the _L suffix: ippi_l.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source image ROI.

srcStep

Distance, in bytes, between the starting points of consecutive lines inthe source image.

pDst

Pointer to the destination image.

dstStep

Distance, in bytes, between the starting points of consecutive lines inthe destination image.

srcDstStep

Distance, in bytes, between the starting points of consecutive lines inthe source and destination image.

srcRoiSize

Size of the source ROI, in pixels.

dstRoiSize

Size of the destination ROI, in pixels.

topBorderHeight

Height of the top border, in pixels.

709

1

Intel® Integrated Performance Primitives Developer Guide and Reference

leftBorderWidth

Width of the left border, in pixels.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function copies the source image pSrc to the destination image pDst and fills pixels outside the copiedarea (border pixels) in the destination image with the values of the source image pixels according to thescheme illustrated in the figure below. Squares marked in red correspond to pixels copied from the source
image, that is, the source image ROI.
Creating a Mirrored Border

NOTE
In-place flavors actually add border pixels to the source image ROI, thus a destination image ROI islarger than the initial image.

The parameters topBorderHeight and leftBorderWidth specify the position of the first pixel of the source
ROI in the destination image ROI.
The height (width) of the destination ROI cannot be less than the sum of the height (width) of source ROI
and the topBorderHeight (leftBorderWidth) parameter.
NOTE
If border width is greater than the image size in the corresponding dimension, multiple reflections are
obtained for this border.

710

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

NOTE
If you use this function for a tiled image, note that to perform correct mirroring, the size of a tile must
be more than the size of the used border. For example, if the image referenced above is divided into
two tiles of size 3x3 and 2x3 , the second tile (cells are highlighted in yellow) is extended with top,right, and bottom borders (highlighted in gray). The width of the right border is not less than thesecond tile width, so the pixels (blue) required for constructing the border of the tiled image are out ofthe processed tile. Therefore the last column (red) of the border extended image is computed
incorrectly:

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error or a warning.

ippStsNullPtrErr

Indicates an error when any of the specified pointers is NULL.

ippStsSizeErr

Indicates an error in any of the following cases:•

srcRoiSize or dstRoiSize has a field with a zero or negative
value

•
•
•

ippStsStepErr

topBorderHeight or leftBorderWidth is less than zero
dstRoiSize.width < srcRoiSize.width + leftBorderWidth
dstRoiSize.height < srcRoiSize.height +topBorderHeight

Indicates an error when srcStep or dstStep has a zero or negativevalue.

ExampleThe code example below shows how to use the ippiCopyMirrorBorder_8u_C1R function.

Ipp8u src[8*4] = { 1, 2, 3, 8, 8, 8, 8, 8,
10, 9, 8, 8, 8, 8, 8, 8,
11, 12, 13, 8, 8, 8, 8, 8,
19, 18, 17, 8, 8, 8, 8, 8};Ipp8u dst[10*8];
IppiSize srcRoi = { 3, 4 }; IppiSize dstRoi = { 10, 8 };int topBorderHeight = 2;

711

1

Intel® Integrated Performance Primitives Developer Guide and Reference

int leftBorderWidth= 2;

ippiCopyMirrorBorder_8u_C1R(src, 8, srcRoi, dst, 10, dstRoi, topBorderHeight, leftBorderWidth);
Result:source image:
1 2 3 8 8
10 9 8 8 8
11 12 13 8 819 18 17 8 8

8
8
8
8

8
8
8
8

8
8
8
8

destination image:
13 12 11 12 13 12 11 12 13 12
8 9 10 9 8 9 10 9 8 9
3 2 1 2 3 2 1 2 3 2
8 9 10 9 8 9 10 9 8 913 12 11 12 13 12 11 12 13 12
17 18 19 18 17 18 19 18 17 18
13 12 11 12 13 12 11 12 13 12
8 9 10 9 8 9 10 9 8 9

See Also
Regions of Interest in Intel IPP
CopyReplicateBorder
Copies pixels values between two images and adds
the replicated border pixels.

SyntaxCase 1: Not-in-place operation
IppStatus ippiCopyReplicateBorder_<mod>(const Ipp<datatype>* pSrc, int srcStep,
IppiSize srcRoiSize, Ipp<datatype>* pDst, int dstStep, IppiSize dstRoiSize, int
topBorderHeight, int leftBorderWidth);
Supported values for mod:8u_C1R

16u_C1R

16s_C1R

32s_C1R

32f_C1R

8u_C3R

16u_C3R

16s_C3R

32s_C3R

32f_C3R

8u_C4R

16u_C4R

16s_C4R

32s_C4R

32f_C4R

8u_AC4R

16u_AC4R

16s_AC4R

32s_AC4R

32f_AC4R

Case 2: In-place operation
IppStatus ippiCopyReplicateBorder_<mod>(const Ipp<datatype>* pSrc, int srcDstStep,
IppiSize srcRoiSize, IppiSize dstRoiSize, int topBorderHeight, int leftBorderWidth);
Supported values for mod:8u_C1IR

16u_C1IR

16s_C1IR

32s_C1IR

32f_C1IR

8u_C3IR

16u_C3IR

16s_C3IR

32s_C3IR

32f_C3IR

8u_C4IR

16u_C4IR

16s_C4IR

32s_C4IR

32f_C4IR

8u_AC4IR

16u_AC4IR

16s_AC4IR

32s_AC4IR

32f_AC4IR

712

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Case 3: Not-in-place operation for platform-aware functions
IppStatus ippiCopyReplicateBorder_<mod>(const Ipp<datatype>* pSrc, IppSizeL srcStep,
IppiSizeL srcRoiSize, Ipp<datatype>* pDst, IppSizeL dstStep, IppiSizeL dstRoiSize,
IppSizeL topBorderHeight, IppSizeL leftBorderWidth);
Supported values for mod:8u_C1R_L

16u_C1R_L

16s_C1R_L

32s_C1R_L

32f_C1R_L

8u_C3R_L

16u_C3R_L

16s_C3R_L

32s_C3R_L

32f_C3R_L

8u_C4R_L

16u_C4R_L

16s_C4R_L

32s_C4R_L

32f_C4R_L

8u_AC4R_L

16u_AC4R_L

16s_AC4R_L

32s_AC4R_L

32f_AC4R_L

Case 4: In-place operation for platform-aware functions
IppStatus ippiCopyReplicateBorder_<mod>(const Ipp<datatype>* pSrc, IppSizeL srcDstStep,
IppiSizeL srcRoiSize, IppiSizeL dstRoiSize, IppSizeL topBorderHeight, IppSizeL
leftBorderWidth);
Supported values for mod:8u_C1IR_L

16u_C1IR_L

16s_C1IR_L

32s_C1IR_L

32f_C1IR_L

8u_C3IR_L

16u_C3IR_L

16s_C3IR_L

32s_C3IR_L

32f_C3IR_L

8u_C4IR_L

16u_C4IR_L

16s_C4IR_L

32s_C4IR_L

32f_C4IR_L

8u_AC4IR_L

16u_AC4IR_L

16s_AC4IR_L

32s_AC4IR_L

32f_AC4IR_L

Include Files
ippi.h
Flavors with the _L suffix: ippi_l.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source image ROI.

srcStep

Distance in bytes between starts of consecutive lines in the source
image.

pDst

Pointer to the destination image.

dstStep

Distance in bytes between starts of consecutive lines in destination
image.

srcDstStep

Distance in bytes between starts of consecutive lines in the source andthe destination image.

srcRoiSize

Size of the source ROI in pixels.

dstRoiSize

Size of the destination ROI in pixels.

topBorderHeight

Height of the top border in pixels.

leftBorderWidth

Width of the left border in pixels.

713

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function copies the source image pSrc to the destination image pDst and fills pixels ("border") outside
the copied area in the destination image with the values of the source image pixels according to the scheme
illustrated in Figure Creating a Replicated Border. Squares marked in red correspond to pixels copied from thesource image, that is, the source image ROI.
Note that the in-place function flavor actually adds border pixels to the source image ROI, thus a destination
image ROI is larger than the initial image.
The parameters topBorderHeight and leftBorderWidth specify the position of the first pixel of the source
ROI in the destination image ROI.
Creating a Replicated Border

The height (width) of the destination ROI cannot be less than the sum of the height (width) of source ROI
and the topBorderHeight (leftBorderWidth) parameter.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error or a warning.

ippStsNullPtrErr

Indicates an error when any of the specified pointers is NULL.

ippStsSizeErr

Indicates an error condition if srcRoiSize or dstRoiSize has a fieldwith a zero or negative value, or topBorderHeight orleftBorderWidth is less than zero, or dstRoiSize.width <srcRoiSize.width + leftBorderWidth, or dstRoiSize.height <srcRoiSize.height + topBorderHeight.

ippStsStepErr

Indicates an error condition if srcStep or dstStep has a zero or
negative value.

ExampleThe code example below shows how to use the ippiCopyReplicateBorder_8u_C1R function.

Ipp8u src[8*4] = {5, 4, 3, 4, 5, 8, 8, 8,
3, 2, 1, 2, 3, 8, 8, 8,
3, 2, 1, 2, 3, 8, 8, 8,714

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

5, 4, 3, 4, 5, 8, 8, 8};Ipp8u dst[9*8];
IppiSize srcRoi = { 5, 4 };IppiSize dstRoi = { 9, 8 };int topborderHeight = 2;
int leftborderWidth = 2;
ippiCopyReplicateBorder_8u_C1R(src, 8, srcRoi, dst, 9, dstRoi, topBorderHeight, leftBorderWidth);
Resultssource image:
5 4 3 4 5 8 8 8
3 2 1 2 3 8 8 8
3 2 1 2 3 8 8 8
5 4 3 4 5 8 8 8destination image:
5 5 5 4 3 4 5 5 5
5 5 5 4 3 4 5 5 5
5 5 5 4 3 4 5 5 5
3 3 3 2 1 2 3 3 3
3 3 3 2 1 2 3 3 3
5 5 5 4 3 4 5 5 5
5 5 5 4 3 4 5 5 5
5 5 5 4 3 4 5 5 5

CopyWrapBorder
Copies pixels values between two images and adds
the border pixels.

SyntaxCase 1: Not-in-place operation
IppStatus ippiCopyWrapBorder_32s_C1R(const Ipp32s* pSrc, int srcStep, IppiSize
srcRoiSize, Ipp32s* pDst, int dstStep, IppiSize dstRoiSize, int topBorderHeight, int
leftBorderWidth);
IppStatus ippiCopyWrapBorder_32f_C1R(const Ipp32f* pSrc, int srcStep, IppiSize
srcRoiSize, Ipp32f* pDst, int dstStep, IppiSize dstRoiSize, int topBorderHeight, int
leftBorderWidth);

Case 2: In-place operation
IppStatus ippiCopyWrapBorder_32s_C1IR(const Ipp32s* pSrc, int srcDstStep, IppiSize
srcRoiSize, IppiSize dstRoiSize, int topBorderHeight, int leftBorderWidth);
IppStatus ippiCopyWrapBorder_32f_C1IR(const Ipp32f* pSrc, int srcDstStep, IppiSize
srcRoiSize, IppiSize dstRoiSize, int topBorderHeight, int leftBorderWidth);

Case 3: Not-in-place operation with platform-aware functions
IppStatus ippiCopyWrapBorder_32s_C1R_L(const Ipp32s* pSrc, IppSizeL srcStep, IppiSizeL
srcRoiSize, Ipp32s* pDst, IppSizeL dstStep, IppiSizeL dstRoiSize, IppSizeL
topBorderHeight, IppSizeL leftBorderWidth);
IppStatus ippiCopyWrapBorder_32f_C1R_L(const Ipp32f* pSrc, IppSizeL srcStep, IppiSizeL
srcRoiSize, Ipp32f* pDst, IppSizeL dstStep, IppiSizeL dstRoiSize, IppSizeL
topBorderHeight, IppSizeL leftBorderWidth);

715

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Case 4: In-place operation with platform-aware functions
IppStatus ippiCopyWrapBorder_32s_C1IR_L(const Ipp32s* pSrc, IppSizeL srcDstStep,
IppiSizeL srcRoiSize, IppiSizeL dstRoiSize, IppSizeL topBorderHeight, IppSizeL
leftBorderWidth);
IppStatus ippiCopyWrapBorder_32f_C1IR_L(const Ipp32f* pSrc, IppSizeL srcDstStep,
IppiSizeL srcRoiSize, IppiSizeL dstRoiSize, IppSizeL topBorderHeight, IppSizeL
leftBorderWidth);

Include Files
ippi.h
Flavors with the _L suffix: ippi_l.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source image ROI.

srcStep

Distance in bytes between starts of consecutive lines in the source
image.

pDst

Pointer to the destination image ROI.

dstStep

Distance in bytes between starts of consecutive lines in the destination
image.

srcDstStep

Distance in bytes between starts of consecutive lines in the source anddestination image for in-place flavor.

srcRoiSize

Size of the source ROI in pixels.

dstRoiSize

Size of the destination ROI in pixels.

topBorderHeight

Height of the top border in pixels.

leftBorderWidth

Width of the left border in pixels.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function copies the source image pSrc to the destination image pDst and fills pixels ("border") outside
the copied area in the destination image with the values of the source image pixels according to the scheme
illustrated in Figure Creating a Border of Pixels by ippiCopyWrapBorder Function. Squares marked in red
correspond to pixels copied from the source image.
Note that the in-place function flavor actually adds border pixels to the source image ROI, thus a destination
image ROI is larger than the initial image.

716

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

The parameters topBorderHeight and leftBorderWidth specify the position of the first pixel of the source
ROI in the destination image ROI.
Creating a Border of Pixels by ippiCopyWrapBorder Function

The height (width) of the destination ROI cannot be less than the sum of the height (width) of source ROI
and the topBorderHeight (leftBorderWidth) parameter.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error or a warning.

ippStsNullPtrErr

Indicates an error when any of the specified pointers is NULL.

ippStsSizeErr

Indicates an error condition if srcRoiSize or dstRoiSize has a fieldwith a zero or negative value, or topBorderHeight orleftBorderWidth is less than zero, or dstRoiSize.width <srcRoiSize.width + leftBorderWidth, or dstRoiSize.height <srcRoiSize.height + topBorderHeight.

ippStsStepErr

Indicates an error condition if srcStep or dstStep has a zero or
negative value.

ippStsNotEvenStepErr

Indicates an error condition if one of the step values is not divisible by
4 for floating point images, or by 2 for short integer images.

ExampleThe code example below shows how to use the ippiCopyWrapBorder_32s_C1R function.

Ipp32s src[8*4] = {5, 4, 3, 4, 5, 8, 8, 8,
3, 2, 1, 2, 3, 8, 8, 8,
3, 2, 1, 2, 3, 8, 8, 8,
5, 4, 3, 4, 5, 8, 8, 8};
Ipp32s dst[9*8];
IppiSize srcRoi = { 5, 4 };717

1Intel® Integrated Performance Primitives Developer Guide and Reference

IppiSize dstRoi = { 9, 8 };int topborderHeight = 2;
int leftborderWidth = 2;
ippiCopyWrapBorder_32s_C1R (src, 8*sizeof(Ipp32s), srcRoi, dst,
9*sizeof(Ipp32s), dstRoi, topBorderHeight, leftBorderWidth);
Resultssource image:
5 4 3 4 5 8 8 8
3 2 1 2 3 8 8 8
3 2 1 2 3 8 8 8
5 4 3 4 5 8 8 8destination image:2 3 3 2 1 2 3 3 2
4 5 5 4 3 4 5 5 4
4 5 5 4 3 4 5 5 4
2 3 3 2 1 2 3 3 2
2 3 3 2 1 2 3 3 2
4 5 5 4 3 4 5 5 4
4 5 5 4 3 4 5 5 4
2 3 3 2 1 2 3 3 2

CopySubpix
Copies pixel values between two images with subpixel
precision.

SyntaxCase 1: Copying without conversion or with conversion to floating point data
IppStatus ippiCopySubpix_<mod>(const Ipp<srcDatatype>* pSrc, int srcStep,
Ipp<dstDatatype>* pDst, int dstStep, IppiSize roiSize, Ipp32f dx, Ipp32f dy);
Supported values for mod:8u_C1R

16u_C1R

8u32f_C1R

16u32f_C1R

32f_C1R

Case 2: Copying with conversion to integer data
IppStatus ippiCopySubpix_8u16u_C1R_Sfs(const Ipp8u* pSrc, int srcStep, Ipp16u* pDst,
int dstStep, IppiSize roiSize, Ipp32f dx, Ipp32f dy, int scaleFactor);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

718

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Parameters
pSrc

Pointer to the source image ROI.

srcStep

Distance in bytes between starts of consecutive lines in the source
image.

pDst

Pointer to the destination image ROI.

dstStep

Distance in bytes between starts of consecutive lines in the destination
image.

roiSize

Size of the source and destination ROI in pixels.

dx

Fractional part of the x-coordinate in the source image.

dy

Fractional part of the y-coordinate in the source image.

scaleFactor

Scale factor (see Integer Result Scaling).

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function computes the pixel value of the destination image using linear interpolation (see Linear
Interpolation in Appendix B) in accordance with the following formula:where i = 0, ... roiSize.height - 1 , j = 0, ... roiSize.width - 1 .

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error or a warning.

ippStsNullPtrErr

Indicates an error when any of the specified pointers is NULL.

ippStsSizeErr

Indicates an error condition if roiSize has a field with a zero or
negative value.

ippStsStepErr

Indicates an error condition if srcStep or dstStep is less thanroiSize.width * <pixelSize>.

ippStsNotEvenStepErr

Indicates an error condition if one of srcStep or dstStep is notdivisible by 4 for floating point images, or by 2 for short integer
images.

CopySubpixIntersect
Copies pixel values of the intersection with specified
window with subpixel precision.

719

1

Intel® Integrated Performance Primitives Developer Guide and Reference

SyntaxCase 1: Copying without conversion or with conversion to floating point data
IppStatus ippiCopySubpixIntersect_<mod>(const Ipp<srcDatatype>* pSrc, int srcStep,
IppiSize srcRoiSize, Ipp<dstDatatype>* pDst, int dstStep, IppiSize dstRoiSize,
IppiPoint_32f point, IppiPoint* pMin, IppiPoint* pMax);
Supported values for mod:8u_C1R

16u_C1R

8u32f_C1R

16u32f_C1R

32f_C1R

Case 2: Copying with conversion to integer data
IppStatus ippiCopySubpixIntersect_8u16u_C1R_Sfs(const Ipp8u* pSrc, int srcStep,
IppiSize srcRoiSize, Ipp16u* pDst, int dstStep, IppiSize dstRoiSize, IppiPoint_32f
point, IppiPoint* pMin, IppiPoint* pMax, int scaleFactor);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc

Pointer to the source image ROI.

srcStep

Distance in bytes between starts of consecutive lines in the source
image.

srcRoiSize

Size of the source image ROI in pixels.

pDst

Pointer to the destination image ROI.

dstStep

Distance in bytes between starts of consecutive lines in the source anddestination image.

dstRoiSize

Size of the destination ROI in pixels.

point

Center point of the window.

pMin

Pointer to coordinates of the top left pixel of the intersection in thedestination image.

pMax

Pointer to coordinates of the bottom right pixel of the intersection in
the destination image.

scaleFactor

Scale factor (see Integer Result Scaling).

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function determines the intersection of the source image and the window of size dstRoiSize centeredin point point. The corresponding pixels of the destination image are calculated using linear interpolation(see Linear Interpolation in Appendix B) in accordance with the following formula:720

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

where Xsubpix(j) = min(max(point.x + j - 0.5*(dstRoiSize.width - 1), 0), srcRoiSize.width - 1),
Ysubpix(i) = min(max(point.y + i - 0.5*(dstRoiSize.height - 1), 0), srcRoiSize.height - 1),

i = 0, ... dstRoiSize.height - 1 , j = 0, ... dstRoiSize.width - 1 .
Minimal values of j and i (coordinates of the top left calculated destination pixel) are assigned to pMin.x andpMin.y, maximal values (coordinates of the top left calculated destination pixel) - to pMin.x and pMin.y.
(See Figure Image Copying with Subpixel Precision Using ippiCopySubpixIntersect Function.)
Image Copying with Subpixel Precision Using ippiCopySubpixIntersect Function

The height (width) of the destination ROI cannot be less than the sum of the height (width) of source ROI
and the topBorderHeight (leftBorderWidth) parameter.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error or a warning.

ippStsNullPtrErr

Indicates an error when any of the specified pointers is NULL.

ippStsSizeErr

Indicates an error condition if srcRoiSize or dstRoiSize has a fieldwith a zero or negative value.

ippStsStepErr

Indicates an error condition if srcStep is less thansrcRoiSize.width * <pixelSize>, or dstStep is less thandstRoiSize.width * <pixelSize>.

721

1

Intel® Integrated Performance Primitives Developer Guide and Reference

ExampleThe code example below shows how to use the function ippiCopySubpixIntersect_8u_C1R.

Ipp8u src[8*6] = {7, 7, 6, 6, 6, 6, 7, 7,
6, 5, 5, 5, 5, 5, 5, 6,
6, 5, 4, 3, 3, 4, 5, 6,
6, 5, 4, 3, 3, 4, 5, 6,
6, 5, 5, 5, 5, 5, 5, 6,
6, 6, 6, 6, 6, 6, 6, 6};
Ipp8u dst[7*4];
IppiSize srcRoi = { 8, 6 };IppiSize dstRoi = { 7, 4 };IppiPoint_32f point = { 4, 1 };IppiPoint min;IppiPoint max;
ippiCopySubpixIntersect_8u_C1R (src, 8, srcRoi, dst, 7, dstRoi, point, &min, &max );Resultssource image:
7 7 6 6 6 6 7 7
6 5 5 5 5 5 5 6
6 5 4 3 3 4 5 6
6 5 4 3 3 4 5 6
6 5 5 5 5 5 5 6
6 6 6 6 6 6 6 6destination image:
7 6 6 6 6 7 7
6 6 6 6 6 6 7
5 5 4 4 5 5 6
5 4 3 3 4 5 6
min = { 0, 1 }max = { 5, 3 }Dup
Copies a gray scale image to all channels of the color
image.

SyntaxIppStatus ippiDup_8u_C1C3R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int dstStep,
IppiSize roiSize);
IppStatus ippiDup_8u_C1C4R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int dstStep,
IppiSize roiSize);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

722

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Parameters
pSrc

Pointer to the source image ROI.

srcStep

Distance in bytes between starts of consecutive lines in the source
image.

pDst

Pointer to the destination image ROI.

dstStep

Distance in bytes between starts of consecutive lines in the destination
image.

roiSize

Size of the source and destination ROI in pixels.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function copies a one-channel (gray scale) image pSrc to each channel of the multi-channel image
pDst.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error or a warning.

ippStsNullPtrErr

Indicates an error when any of the specified pointers is NULL.

ippStsSizeErr

Indicates an error condition if RoiSize has a field with a zero or
negative value.

Transpose
Transposes a source image.

SyntaxCase 1: Not-in-place operation
IppStatus ippiTranspose_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>*pDst, int dstStep, IppiSize roiSize);
Supported values for mod:8u_C1R

16u_C1R

16s_C1R

32s_C1R

32f_C1R

8u_C3R

16u_C3R

16s_C3R

32s_C3R

32f_C3R

8u_C4R

16u_C4R

16s_C4R

32s_C4R

32f_C4R

Case 2: In-place operation
IppStatus ippiTranspose_<mod>(Ipp<datatype>* pSrcDst, int srcDstStep, IppiSize
roiSize);
Supported values for mod:8u_C1IR

16u_C1IR

16s_C1IR

32s_C1IR

32f_C1IR

8u_C3IR

16u_C3IR

16s_C3IR

32s_C3IR

32f_C3IR

8u_C4IR

16u_C4IR

16s_C4IR

32s_C4IR

32f_C4IR

Include Files
ippi.h723

1Intel® Integrated Performance Primitives Developer Guide and Reference

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source image ROI.

srcStep

Distance, in bytes, between the starting points of consecutive lines inthe source image.

pDst

Pointer to the destination image ROI.

dstStep

Distance, in bytes, between the starting points of consecutive lines inthe destination image.

pSrcDstPointer to the source and destination ROI for in-place operation.

srcDstStep

Distance, in bytes, between the starting points of consecutive lines inthe source and destination image buffer for the in-place operation.

roiSize

Size of the source ROI in pixels.

Description
This function operates with ROI.
This function transposes the source image pSrc (pSrcDst for in-place flavors) and stores the result in pDst
(pSrcDst). The destination image is obtained from the source image by transforming the columns to therows: pDst(x,y) = pSrc(y,x)
The parameter roiSize is specified for the source image. The value of the roiSize.width parameter forthe destination image is equal to roiSize.height for the source image, and roiSize.height for thedestination image is equal to roiSize.width for the source image.

NOTE
For in-place operations, roiSize.width must be equal to roiSize.height.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error or a warning.

ippStsNullPtrErr

Indicates an error when any of the specified pointers is NULL, with the
exception of second mode in Case 4.

ippStsSizeErr

Indicates an error when:••

roiSize has a field with a zero or negative value
roiSize.width is not equal to roiSize.height for in-placeflavors724

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

ExampleThe code example below shows how to use the ippiTranspose_8u_C1R function.

Ipp8u src[8*4] = {1, 2, 3, 4, 8, 8, 8, 8,
1, 2, 3, 4, 8, 8, 8, 8,
1, 2, 3, 4, 8, 8, 8, 8,
1, 2, 3, 4, 8, 8, 8, 8};Ipp8u dst[4*4];
IppiSize srcRoi = { 4, 4 };ippiTranspose_8u_C1R ( src, 8, dst, 4, srcRoi );Result:1 2 3 4 8 8 8 8
1 2 3 4 8 8 8 8
1 2 3 4 8 8 8 81 1 1 12 2 2 23 3 3 34 4 4 4src

dst

See Also
Regions of Interest in Intel IPP
SwapChannels
Copies channels of the source image to the destination
image.

SyntaxCase 1: Not-in-place operation
IppStatus ippiSwapChannels_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>*pDst, int dstStep, IppiSize roiSize, const int dstOrder[3]);Supported values for mod:8u_C3R

16u_C3R

16s_C3R

32s_C3R

32f_C3R

8u_AC4R

16u_AC4R

16s_AC4R

32s_AC4R

32f_AC4R

IppStatus ippiSwapChannels_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>*pDst, int dstStep, IppiSize roiSize, const int dstOrder[4]);Supported values for mod:8u_C4R

16u_C4R

16s_C4R

32s_C4R

32f_C4R

Case 2: In-place operation
IppStatus ippiSwapChannels_8u_C3IR(Ipp8u* pSrcDst, int srcDstStep, IppiSize roiSize,const int dstOrder[3]);IppStatus ippiSwapChannels_8u_C4IR(Ipp8u* pSrcDst, int srcDstStep, IppiSize roiSize,const int dstOrder[4]);7251Intel® Integrated Performance Primitives Developer Guide and Reference

Case 3: Operation with converting 3-channel image to the 4-channel image
IppStatus ippiSwapChannels_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>*pDst, int dstStep, IppiSize roiSize, const int dstOrder[4], Ipp<datatype> val);Supported values for mod:8u_C3C4R

16u_C3C4R

16s_C3C4R

32s_C3C4R

32f_C3C4R

Case 4: Operation with converting 4-channel image to the 3-channel image
IppStatus ippiSwapChannels_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>*pDst, int dstStep, IppiSize roiSize, const int dstOrder[3]);Supported values for mod:8u_C4C3R

16u_C4C3R

16s_C4C3R

32s_C4C3R

32f_C4C3R

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source image ROI.

srcStep

Distance in bytes between starts of consecutive lines in the source
image.

pDst

Pointer to the destination image ROI.

dstStep

Distance in bytes between starts of consecutive lines in the destination
image.

pSrcDstPointer to the source and destination ROI for in-place operation.

srcDstStep

Distance in bytes between starts of consecutive lines in the source anddestination image for the in-place operation.

roiSize

Size of the source and destination ROI in pixels.

dstOrderOrder of channels in the destination image.

valConstant value.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function copies the data from specified channels of the source image ROI pSrc to the specified channelsof the destination image ROI pDst.
The first channel in the destination image is determined by the first component of dstOrder. Its value lies in
the range [0..2] for a 3-channel image, and [0..3] for a 4-channel image, and indicates the corresponding
channel number of the source image. Other channels are specified in the similar way. For example, if thesequence of channels in the source 3-channel image is A, B, C, and dstOrder[0]=2, dstOrder[1]=0,726

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

dstOrder[2]=1, then the order of channels in the 3-channel destination image is C, A, B. Some or allcomponents of dstOrder may have the same values. It means that data from a certain channel of thesource image may be copied to several channels of the destination image.
Some functions flavors convert a 3-channel source image to the 4-channel destination image (see Case 3).
In this case an additional channel contains data from any specified source channel, or its pixel values are set
to the specified constant value val (corresponding component dstOrder[n] should be set to 3), or its pixel
values are not set at all (corresponding component dstOrder[n] should be set to an arbitrary value greaterthan 3). For example, the sequence of channels in the source 3-channel image is A, B, C, if dstOrder[0]=1,
dstOrder[1]=0, dstOrder[2]=1, dstOrder[3]=2, then the order of channels in the 4-channel destination
image will be B, A, B, C; if dstOrder[0]=4, dstOrder[1]=0, dstOrder[2]=1, dstOrder[3]=2, then theorder of channels in the 4-channel destination image will be D, A, B, C, where D is a channel whose pixel
values are not set.
The function flavors that support image with the alpha channel do not perform operation on it.
This function supports negative step values.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error or a warning.

ippStsNullPtrErr

Indicates an error when any of the specified pointers is NULL.

ippStsSizeErr

Indicates an error condition if roiSize has a field with zero or
negative value.

ippStsStepErr

Indicates an error condition if srcStep or dstStep has a zero value.

ExampleThe code example below shows how to use the function ippiSwapChannels_8u_C3R.

Ipp8u src[12*3] = { 255, 0, 0, 255, 0, 0, 255, 0, 0, 255, 0, 0,
0, 255, 0, 0, 255, 0, 0, 255, 0, 0, 255, 0,
0, 0, 255, 0, 0, 255, 0, 0, 255, 0, 0, 255};
Ipp8u dst[12*3];
IppiSize roiSize = { 4, 3 };int order[3] = { 2, 1, 0 }ippiSwapChannels_8u_C3R ( src, 12, dst, 12, roiSize, order );Result:src[rgb]
255 0 0 255 0 0 255 0 0 255 0 0
0 255 0 0 255 0 0 255 0 0 255 000 255 0 0 255 0 0 255 0 0 255
dst

[bgr]

0
0 255 0 0 255 0 0 255 0 0 255
0 255 0 0 255 0 0 255 0 0 255 0
255 0 0 255 0 0 255 0 0 255 0 0

727

1

Intel® Integrated Performance Primitives Developer Guide and Reference

AddRandUniform
Generates random samples with uniform distribution
and adds them to an image data.

SyntaxIppStatus ippiAddRandUniform_<mod>(Ipp<datatype>* pSrcDst, int srcDstStep, IppiSize
roiSize, Ipp<datatype> low, Ipp<datatype> high, unsigned int* pSeed);
Supported values for mod:8u_C1IR

16u_C1IR

16s_C1IR

32f_C1IR

8u_C3IR

16u_C3IR

16s_C3IR

32f_C3IR

8u_C4IR

16u_C4IR

16s_C4IR

32f_C4IR

8u_AC4IR

16u_AC4IR

16s_AC4IR

32f_AC4IR

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrcDstPointer to the source and destination image ROI.

srcDstStep

Distance in bytes between starts of consecutive lines in the source anddestination image.

roiSize

Size of the image ROI in pixels.

low

The lower bound for the range of uniformly distributed values.

high

The upper bound for the range of uniformly distributed values.

pSeed

The initial seed value for the pseudo-random number generator.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
The function generates samples with uniform distribution over the range [low, high] and adds them to asource image pointed to by pSrcDst.
The resulting pixel values that exceed the image data range are saturated to the respective data-range
limits. To obtain an image that contains pure noise with uniform distribution, call ippiAddRandUniform
using a source image with zero data as input.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error or a warning.

ippStsNullPtrErr

Indicates an error when any of the specified pointers is NULL.

ippStsSizeErr

Indicates an error condition if roiSize has a field with zero or
negative value.

728

Developer Guide and Reference for Intel® Integrated Performance Primitives

ippStsStepErr

1

Indicates an error condition if srcDstStep has a zero or negativevalue.

ExampleThe code example below shows data conversion without scaling.

IppStatus randUniform( void ) {unsigned int seed = 123456;
Ipp8u img[2048], mn, mx;
IppiSize roi={2048,1};
Ipp64f mean;
IppStatus st;
ippiSet_8u_C1R( 0, img, 2048, roi );st = ippiAddRandUniform_8u_C1IR(img, 2048, roi, 0, 255, &seed);
ippiMean_8u_C1R( img, 2048, roi, &mean );ippiMinMax_8u_C1R( img, 2048, roi, &mn, &mx );printf( "[%d..%d], mean=%.3f\n", mn, mx, mean );return st;}

AddRandGauss
Generates random samples with Gaussian distribution
and adds them to an image data.

SyntaxIppStatus ippiAddRandGauss_<mod>(Ipp<datatype>* pSrcDst, int srcDstStep, IppiSize
roiSize, Ipp<datatype> mean, Ipp<datatype> stDev, unsigned int* pSeed);
Supported values for mod:8u_C1IR

16u_C1IR

16s_C1IR

32f_C1IR

8u_C3IR

16u_C3IR

16s_C3IR

32f_C3IR

8u_C4IR

16u_C4IR

16s_C4IR

32f_C4IR

8u_AC4IR

16u_AC4IR

16s_AC4IR

32f_AC4IR

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrcDstPointer to the source and destination image ROI.

srcDstStep

Distance in bytes between starts of consecutive lines in the source anddestination image.

roiSize

Size of the image ROI in pixels.

mean

The mean of the Gaussian distribution.

stDev

The standard deviation of the Gaussian distribution.

729

1

Intel® Integrated Performance Primitives Developer Guide and Reference

The initial seed value for the pseudo-random number generator.

pSeed

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
The function generates samples with Gaussian distribution that have the mean value mean and standard
deviation stdev and adds them to a source image ROI pointed to by pSrcDst.
The resulting pixel values that exceed the image data range are saturated to the respective data-range
limits. To obtain an image which contains pure noise with Gaussian distribution, call ippiAddRandGaussusing a source image with zero data as input.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error or a warning.

ippStsNullPtrErr

Indicates an error condition if pSrcDst or pSeed pointer is NULL.

ippStsSizeErr

Indicates an error condition if roiSize has a field with zero or
negative value.

ippStsStepErr

Indicates an error condition if srcDstStep has a zero or negativevalue.

ImageJaehne
Creates Jaehne test image.

SyntaxIppStatus ippiImageJaehne_<mod>(Ipp<datatype>* pDst, int dstStep, IppiSize roiSize);
Supported values for mod:8u_C1R

16u_C1R

16s_C1R

32f_C1R

8u_C3R

16u_C3R

16s_C3R

32f_C3R

8u_C4R

16u_C4R

16s_C4R

32f_C4R

8u_AC4R

16u_AC4R

16s_AC4R

32f_AC4R

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pDst

Pointer to the destination image ROI.

dstStep

Distance in bytes between starts of consecutive lines in the destination
image.

roiSize

Size of the destination image ROI in pixels.

730

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function creates a specific one- or three-channel test image that has been first introduced to digital
image processing by B.Jaehne (see [Jae95]).
The destination image pixel values are computed according to the following formula:

Dst(x,y) = A*sin(0.5*IPP_PI* (x22 + y22) / roiSize.height),
where x, y are pixel coordinates varying in the range

0 ≤ x ≤roiSize.width-1, 0 ≤ y ≤roiSize.height-1;
IPP_PI is the library constant that stands for π value.
x2 = (x-roiSize.width+1)/2.0,
y2 = (y-roiSize.height+1)/2.0,
A is the constant value that depends upon the image type being created.
For the 32f floating point data, the pixel values in the created image can vary in the range between 0(inclusive) and 1 (exclusive).

731

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Figure Example of a Generated Jaehne's Test Image illustrates an example of a test image generated by theippiImageJaehne function.
Example of a Generated Jaehne's Test Image

These test images can be effectively used when you need to visualize and interpret the results of applying
filtering functions, similarly to what is proposed in [Jae95].

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error or a warning.

ippStsNullPtrErr

Indicates an error condition if the pDst pointer is NULL.

ippStsSizeErr

Indicates an error condition if roiSize has a field with a zero or
negative value, or if dstStep is less than or equal to zero.

732

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

ImageRamp
Creates a test image that has an intensity ramp.

SyntaxIppStatus ippiImageRamp_<mod>(Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, float
offset, float slope, IppiAxis axis);
Supported values for mod:8u_C1R

16u_C1R

16s_C1R

32f_C1R

8u_C3R

16u_C3R

16s_C3R

32f_C3R

8u_C4R

16u_C4R

16s_C4R

32f_C4R

8u_AC4R

16u_AC4R

16s_AC4R

32f_AC4R

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pDst

Pointer to the destination image ROI.

dstStep

Distance in bytes between starts of consecutive lines in the destination
image.

roiSize

Size of the destination image ROI in pixels.

offsetOffset value.

slope

Slope coefficient.

axis

Specifies the direction of the image intensity ramp; can be one of thefollowing:ippAxsHorizontal

for the ramp in X-direction,ippAxsVertical

for the ramp in Y-direction,ippAxsBoth

for the ramp in both X and Y-directions.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
The function creates a one- or three-channel image that can be used as a test image to examine the effect ofapplying different image processing functions.
The destination image pixel values are computed according to one of the following formulas:dst(x,y) = offset + slope * x, if axis = ippAxsHorizontal,
dst(x,y) = offset + slope * y, if axis = ippAxsVertical,
dst(x,y) = offset + slope * x * y, if axis = ippAxsBoth,where x, y are pixel coordinates varying in the range

733

1

Intel® Integrated Performance Primitives Developer Guide and Reference

0 ≤ x ≤roiSize.width-1, 0 ≤ y ≤roiSize.height-1;
Note that linear transform coefficients offset and slope have floating-point values for all function flavors.
The computed pixel values that exceed the image data range are saturated to the respective data-range
limits.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error or a warning.

ippStsNullPtrErr

Indicates an error condition if the pDst pointer is NULL.

ippStsSizeErr

Indicates an error condition if roiSize has a field with a zero or
negative value, or if dstStep is less than or equal to zero.

ExampleThe code example below illustrates how to use the ippiImageRamp function.

IppStatus ramp( void ){Ipp8u dst[8*4];
IppiSize roiSize = { 8, 4 };return ippiImageRamp_8u_C1R( dst, 8, roiSize, 0.0f, 256.0f/7,}

ippAxsHorizontal);

The destination image contains the following data:

00 25 49 6E 92 B7 DB FF
00 25 49 6E 92 B7 DB FF
00 25 49 6E 92 B7 DB FF
00 25 49 6E 92 B7 DB FF

SampleLine
Puts a raster line into buffer.

SyntaxIppStatus ippiSampleLine_<mod>(const Ipp<datatype>* pSrc, int srcStep, IppiSize
roiSize, Ipp<datatype>* pDst, IppiPoint pt1, IppiPoint pt2);
Supported values for mod:8u_C1R

16u_C1R

32f_C1R

8u_C3R

16u_C3R

32f_C3R

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc

734

Pointer to the ROI in the source raster image.

Developer Guide and Reference for Intel® Integrated Performance Primitives

1srcStep

Distance in bytes between starts of consecutive lines in the raster
image.

roiSize

Size of the image ROI in pixels.

pDst

Pointer to the destination buffer. The buffer is to store at least max(|
pt2.x - pt1.x| + 1, |pt2.y - pt1.y| + 1) points.

pt1

Starting point of the line.

pt2

Ending point of the line.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function iterates through the points that belong to the raster line using the 8-point connected
Bresenham algorithm, and puts the resulting pixels into the destination buffer.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error or a warning.

ippStsNullPtrErr

Indicates an error condition if any of the specified pointers is NULL.

ippStsSizeErr

Indicates an error condition if roiSize.width or roiSize.height isless than or equal to zero.

ippStsStepErr

Indicates an error condition if srcStep is less than roiSize.width *<pixelSize>.

ippStsNotEvenStepErr

Indicates an error when the step for the floating-point image cannot
be divided by 4.

ippStsOutOfRangeErr

Indicates an error when any of the line ending points is outside theimage.

ExampleThe code example below shows how to use the function ippiSampleLine_8u_C1R .

void func_sampleline(){
Ipp8u pSrc[5*4] = { 0, 1, 2, 3, 4,
5, 6, 7, 8, 9,
0, 9, 8, 7, 6,
5, 4, 3, 2, 1 };IppiSize roiSize = {5, 4};
IppiPoint pt1 = {1, 1};
IppiPoint pt2 = {2, 3};
Ipp8u pDst[3];int srcStep = 5;
ippiSampleLine_8u_C1R( pSrc, srcStep, roiSize, pDst, pt1, pt2 );printf("%Result: d,%d, %d\n", pDst[0], pDst[1], pDst[2] ); // << this wrong line
printf("%Result: %d, %d, %d\n", pDst[0], pDst[1], pDst[2] ); // this is correct line}
Result: 6, 9, 3

735

1

Intel® Integrated Performance Primitives Developer Guide and Reference

ZigzagFwd8x8
Converts a conventional order to the zigzag order.

SyntaxIppStatus ippiZigzagFwd8x8_16s_C1(const Ipp16s* pSrc, Ipp16s* pDst);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source data.

pDst

Pointer to the destination data.

Description
This function rearranges data in an 8x8 block from a conventional order (left-to-right, top-to-bottom) to thezigzag sequence.

736

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Figure Zigzag Sequence specifies the resulting zigzag sequence.
Zigzag Sequence

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when any of the specified pointers is NULL.

ExampleThe code example below shows how to use the ippiZigzagFwd8x8_16s_C1 function.

Ipp16s src[8*8] = {0, 1, 5, 7, 9, 2, 4, 1,
5, 4, 8, 6, 3, 8, 0, 3,
6, 2, 6, 8, 1, 4, 2, 8,
4, 3, 2, 9, 3, 0, 6, 6,
7, 7, 3, 0, 4, 1, 0, 9,
5, 1, 9, 2, 5, 7, 1, 7,
0, 3, 5, 0, 7, 5, 9, 8,
2, 9, 1, 4, 6, 8, 2, 3
737

1Intel® Integrated Performance Primitives Developer Guide and Reference};
Ipp16s dst[8*8];ippiZigzagFwd8x8_16s_C1 ( src, dst );Result:0 1 5 7 9 2 4 1
5 4 8 6 3 8 0 3
6 2 6 8 1 4 2 8
4 3 2 9 3 0 6 6
7 7 3 0 4 1 0 9
5 1 9 2 5 7 1 7
0 3 5 0 7 5 9 8
2 9 1 4 6 8 2 3
0 1 5 6 4 5 7 8
2 4 7 3 6 6 9 2
3 8 2 7 5 0 1 3
9 1 8 4 1 0 4 3
0 9 3 2 9 5 2 4
0 2 3 8 6 1 5 0
1 4 7 7 0 6 9 1
5 6 8 9 7 8 2 3

src//conventional orderdst//zigzag order

ZigzagInv8x8
Converts a zigzag order to the conventional order.

SyntaxIppStatus ippiZigzagInv8x8_16s_C1(const Ipp16s* pSrc, Ipp16s* pDst);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source data.

pDst

Pointer to the destination data.

Description
This function rearranges data in an 8x8 block from a zigzag sequence to the conventional order (left-to-right,
top-to-bottom).
Figure Zigzag Sequence specifies the resulting zigzag sequence.

Return Values
ippStsNoErr

738

Indicates no error.

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Indicates an error when any of the specified pointers is NULL.

ippStsNullPtrErr

Image Arithmetic and Logical Operations
This chapter describes functions that modify pixel values of an image buffer using arithmetic or logicaloperations. It also includes functions that perform image compositing based on opacity (alpha-blending).
An additional suffix C, if present in the function name, indicates operation with a constant. Arithmetic
functions that operate on integer data perform fixed scaling of the internally computed results. In case ofoverflow the result value is saturated to the destination data type range.
NOTE
Most arithmetic and logical functions support data with 1-,3-, or 4-channel pixel values. In the alphachannel case (AC4), the alpha channels are not processed.

Arithmetic Operations
Functions described in this section perform arithmetic operations on pixel values. Arithmetic operations
include addition, multiplication, subtraction, and division of pixel values of two images as well as similar
operations on a single image and a constant. Computation of an absolute value, square, square root,
exponential, and natural logarithm of pixels in an image buffer is also supported. Functions of this groupperform operations on each pixel in the source buffer(s), and write the results into the destination buffer.
Some functions also support processing of images with complex data.

Add
Adds pixel values of two images.

SyntaxCase 1: Not-in-place operation on integer or complex data
IppStatus ippiAdd_<mod>(const Ipp<datatype>* pSrc1, int src1Step, const Ipp<datatype>*pSrc2, int src2Step, Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, int
scaleFactor);
Supported values for mod:8u_C1RSfs

16u_C1RSfs

16s_C1RSfs

8u_C3RSfs

16u_C3RSfs

16s_C3RSfs

8u_C4RSfs

16u_C4RSfs

16s_C4RSfs

8u_AC4RSfs

16u_AC4RSfs

16s_AC4RSfs

Case 2: Not-in-place operation on floating point or complex data
IppStatus ippiAdd_<mod>(const Ipp<datatype>* pSrc1, int src1Step, const Ipp<datatype>*pSrc2, int src2Step, Ipp<datatype>* pDst, int dstStep, IppiSize roiSize);
Supported values for mod:32f_C1R
32f_C3R

739

1Intel® Integrated Performance Primitives Developer Guide and Reference

32f_C4R
IppStatus ippiAdd_32f_AC4R(const Ipp32f* pSrc1, int src1Step, const Ipp32f* pSrc2, int
src2Step, Ipp32f* pDst, int dstStep, IppiSize roiSize);

Case 3: In-place operation on integer or complex data
IppStatus ippiAdd_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>* pSrcDst,
int srcDstStep, IppiSize roiSize, int scaleFactor);
Supported values for mod:8u_C1IRSfs

16u_C1IRSfs

16s_C1IRSfs

8u_C3IRSfs

16u_C3IRSfs

16s_C3IRSfs

8u_AC4IRSfs

16u_AC4IRSfs

16s_AC4IRSfs

8u_C4IRSfs

16u_C4IRSfs

16s_C4IRSfs

Case 4: In-place operation on floating point or complex data
IppStatus ippiAdd_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>* pSrcDst,
int srcDstStep, IppiSize roiSize);
Supported values for mod:32f_C1IR
32f_C3IR
32f_AC4IR
32f_C4IR

Case 5: In-place operation using a floating point accumulator image
IppStatus ippiAdd_<mod>(const Ipp<srcDatatype>* pSrc, int srcStep, Ipp32f* pSrcDst, int
srcDstStep, IppiSize roiSize);
Supported values for mod:8u32f_C1IR 16u32f_C1IR

Case 6: Masked in-place operation using a floating point accumulator image
IppStatus ippiAdd_<mod>(const Ipp<srcDatatype>* pSrc, int srcStep, const Ipp8u* pMask,
int maskStep, Ipp32f* pSrcDst, int srcDstStep, IppiSize roiSize);
Supported values for mod:8u32f_C1IMR 16u32f_C1IMR 32f_C1IMR

740

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Case 7: Not-in-place operation on integer data with platform-aware functions
IppStatus ippiAdd_<mod>(const Ipp<datatype>* pSrc1, IppSizeL src1Step, const
Ipp<datatype>* pSrc2, IppSizeL src2Step, Ipp<datatype>* pDst, IppSizeL dstStep,
IppiSizeL roiSize, int scaleFactor);
Supported values for mod:8u_C1RSfs_L

16u_C1RSfs_L

16s_C1RSfs_L

8u_C3RSfs_L

16u_C3RSfs_L

16s_C3RSfs_L

8u_C4RSfs_L

16u_C4RSfs_L

16s_C4RSfs_L

8u_AC4RSfs_L 16u_AC4RSfs_L 16s_AC4RSfs_L

Case 8: Not-in-place operation on floating point data with platform-aware functions
IppStatus ippiAdd_<mod>(const Ipp<datatype>* pSrc1, IppSizeL src1Step, const
Ipp<datatype>* pSrc2, IppSizeL src2Step, Ipp<datatype>* pDst, IppSizeL dstStep,
IppiSizeL roiSize);
Supported values for mod:32f_C1R_L
32f_C3R_L
32f_C4R_L
32f_AC4R_L

Case 9: In-place operation on integer data with platform-aware functions
IppStatus ippiAdd_<mod>(const Ipp<datatype>* pSrc, IppSizeL srcStep, Ipp<datatype>*pSrcDst, IppSizeL srcDstStep, IppiSizeL roiSize, int scaleFactor);
Supported values for mod:8u_C1IRSfs_L

16u_C1IRSfs_L

16s_C1IRSfs_L

8u_C3IRSfs_L

16u_C3IRSfs_L

16s_C3IRSfs_L

8u_C4IRSfs_L

16u_C4IRSfs_L

16s_C4IRSfs_L

8u_AC4IRSfs_L 16u_AC4IRSfs_L 16s_AC4IRSfs_L

Case 10: In-place operation on floating point data with platform-aware functions
IppStatus ippiAdd_<mod>(const Ipp<datatype>* pSrc1, IppSizeL src1Step, Ipp<datatype>*pDst, IppSizeL dstStep, IppiSizeL roiSize);
Supported values for mod:32f_C1IR_L
32f_C3IR_L
32f_C4IR_L

741

1

Intel® Integrated Performance Primitives Developer Guide and Reference

32f_AC4IR_L

Case 11: Not-in-place operation on integer data with threading layer (TL) functions
IppStatus ippiAdd_<mod>(const Ipp<datatype>* pSrc1, IppSizeL src1Step, const
Ipp<datatype>* pSrc2, IppSizeL src2Step, Ipp<datatype>* pDst, IppSizeL dstStep,
IppiSizeL roiSize, int scaleFactor);
Supported values for mod:8u_C1RSfs_LT

16u_C1RSfs_LT

16s_C1RSfs_LT

8u_C3RSfs_LT

16u_C3RSfs_LT

16s_C3RSfs_LT

8u_C4RSfs_LT

16u_C4RSfs_LT

16s_C4RSfs_LT

8u_AC4RSfs_LT 16u_AC4RSfs_LT 16s_AC4RSfs_LT

Case 12: Not-in-place operation on floating point data with TL functions
IppStatus ippiAdd_<mod>(const Ipp<datatype>* pSrc1, IppSizeL src1Step, const
Ipp<datatype>* pSrc2, IppSizeL src2Step, Ipp<datatype>* pDst, IppSizeL dstStep,
IppiSizeL roiSize);
Supported values for mod:32f_C1R_LT
32f_C3R_LT
32f_C4R_LT
32f_AC4R_LT

Case 13: In-place operation on integer data with TL functions
IppStatus ippiAdd_<mod>(const Ipp<datatype>* pSrc, IppSizeL srcStep, Ipp<datatype>*pSrcDst, IppSizeL srcDstStep, IppiSizeL roiSize, int scaleFactor);
Supported values for mod:8u_C1IRSfs_LT

16u_C1IRSfs_LT

16s_C1IRSfs_LT

8u_C3IRSfs_LT

16u_C3IRSfs_LT

16s_C3IRSfs_LT

8u_C4IRSfs_LT

16u_C4IRSfs_LT

16s_C4IRSfs_LT

8u_AC4IRSfs_LT 16u_AC4IRSfs_LT 16s_AC4IRSfs_LT

Case 14: In-place operation on floating point data with TL functions
IppStatus ippiAdd_<mod>(const Ipp<datatype>* pSrc1, IppSizeL src1Step, Ipp<datatype>*pDst, IppSizeL dstStep, IppiSizeL roiSize);
Supported values for mod:32f_C1IR_LT
32f_C3IR_LT

742

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

32f_C4IR_LT
32f_AC4IR_LT

Case 15: In-place operation on integer data with TL functions based on classic API
IppStatus ippiAdd_<mod>(const Ipp<datatype>* pSrc, IppSize srcStep, Ipp<datatype>*pSrcDst, IppSize srcDstStep, IppiSize roiSize, int scaleFactor);
Supported values for mod:16s_C1IRSfs_T 32s_C1IRSfs_T
16s_C3IRSfs_T
16s_C4IRSfs_T

Include Files
ippcv.hippi.hippi_l.hippi_tl.h

Domain Dependencies
Flavors declared in ippi.h:
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib
Flavors declared in ippcv.h:
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib
Flavors declared in ippi64x.h:
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib, ippcore_tl.lib, ippi_tl.lib

Parameters
pSrc, pSrc1, pSrc2

Pointer to the ROI in the source images.

srcStep, src1Step, src2Step

Distance, in bytes, between the starting points of consecutive
lines in the source images.
Pointer to the destination image ROI.

pDst
dstStep
pSrc
srcStep

Distance, in bytes, between the starting points of consecutive
lines in the destination image.
Pointer to the first source image ROI for the in-place operation.
Distance, in bytes, between the starting points of consecutive
lines in the first source image for the in-place operation.

743

1

Intel® Integrated Performance Primitives Developer Guide and ReferencepSrcDstsrcDstStep

pMask

Pointer to the second source and destination image ROI for thein-place operation.
Distance, in bytes, between the starting points of consecutive
lines in the source and destination image for the in-place
operation.
Pointer to the mask image ROI for the masked operation.

roiSize

Distance, in bytes, between the starting points of consecutive
lines in the mask image for the masked operation.
Size of the source and destination ROI in pixels.

scaleFactor

Scale factor (see Integer Result Scaling).

maskStep

Description
This function operates with ROI.
This function adds corresponding pixel values of two source image buffers and places the results in a
destination buffer. In case of operations on integer data, the resulting values are scaled by scaleFactor. For
complex data, the function processes both real and imaginary parts of pixel values. Some function flavors
add 8u, 8s, 16u, or 32f source image pixel values to a floating point accumulator image in-place. Addition of
pixel values in case of a masked operation is performed only if the respective mask value is non-zero;otherwise, the accumulator pixel value remains unchanged.

NOTE
For the functions that operate on complex data, step values must be positive. For thefunctions that use an accumulator image, step values must be no less thanroiSize.width*<pixelSize>.
Functions with AC4 descriptor do not process alpha channels.
Function flavors described in Case 5 and Case 6 are declared in the ippcv.h.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsStepErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition when any of the specified pointers
is NULL.
Indicates an error condition when roiSize has a field with zeroor negative value.
Indicates an error condition in the following cases:• For functions that operate on complex data, if any of the specified
step values is zero or negative.

• For functions using an accumulator image, if any of the specified
step values is less than roiSize.width * <pixelSize>.

ippStsNotEvenStepErr

744

Indicates an error condition when one of step values forfloating-point images cannot be divided by 4.

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

ExampleThe code example below shows how to use the function ippiAdd_8u_C1RSfs.

Ipp8u src1[8*4] = {8, 4, 2, 1, 0, 0, 0, 0,
8, 4, 2, 1, 0, 0, 0, 0,
8, 4, 2, 1, 0, 0, 0, 0,
8, 4, 2, 1, 0, 0, 0, 0};Ipp8u src2[8*4] = {4, 3, 2, 1, 0, 0, 0, 0,
4, 3, 2, 1, 0, 0, 0, 0,
4, 3, 2, 1, 0, 0, 0, 0,
4, 3, 2, 1, 0, 0, 0, 0};Ipp8u dst[8*4];
IppiSize srcRoi = { 4, 4 };Int scaleFactor = 1;// later examples for 2 and -2 values
ippiAdd_8u_C1RSfs (src1, 8, src2, 8, dst, 4, srcRoi, scaleFactor );Result:src1
8 4 2 1 0 0 0 0
8 4 2 1 0 0 0 0
8 4 2 1 0 0 0 0
8 4 2 1 0 0 0 0
dst >>src2
4 3 2 1 0 0 0 0
4 3 2 1 0 0 0 0
4 3 2 1 0 0 0 0
4 3 2 1 0 0 0 0

scaleFactor = 1
6 4 2 16 4 2 16 4 2 16 4 2 1scaleFactor = 2
3 2 1 03 2 1 03 2 1 03 2 1 0ScaleFactor = -2
48 28 16 8
48 28 16 8
48 28 16 8
48 28 16 8

See Also
Regions of Interest in Intel IPP
AddC
Adds a constant to pixel values of an image.

SyntaxCase 1: Not-in-place operation on one-channel integer or complex data
IppStatus ippiAddC_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype> value,
Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, int scaleFactor);
Supported values for mod:8u_C1RSfs

16u_C1RSfs

16s_C1RSfs

Case 2: Not-in-place operation on multi-channel integer or complex data
IppStatus ippiAddC_<mod>(const Ipp<datatype>* pSrc, int srcStep, const Ipp<datatype>value[3], Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, int scaleFactor);
Supported values for mod:8u_C3RSfs

16u_C3RSfs

16s_C3RSfs

745

1

Intel® Integrated Performance Primitives Developer Guide and Reference

IppStatus ippiAddC_<mod>(const Ipp<datatype>* pSrc, int srcStep, const Ipp<datatype>value[4], Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, int scaleFactor);
Supported values for mod:8u_C4RSfs

16u_C4RSfs

16s_C4RSfs

IppStatus ippiAddC_<mod>(const Ipp<datatype>* pSrc, int srcStep, const Ipp<datatype>value[3], Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, int scaleFactor);
Supported values for mod:8u_AC4RSfs

16u_AC4RSfs

16s_AC4RSfs

Case 3: Not-in-place operation on one-channel floating-point or complex data
IppStatus ippiAddC_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype> value,
Ipp<datatype>* pDst, int dstStep, IppiSize roiSize);
Supported values for mod:32f_C1R

Case 4: Not-in-place operation on multi-channel floating-point or complex data
IppStatus ippiAddC_<mod>(const Ipp<datatype>* pSrc, int srcStep, const Ipp<datatype>value[3], Ipp<datatype>* pDst, int dstStep, IppiSize roiSize);
Supported values for mod:32f_C3R
IppStatus ippiAddC_32f_C4R(const Ipp32f* pSrc, int srcStep, const Ipp32f value[4],Ipp32f* pDst, int dstStep, IppiSize roiSize);
IppStatus ippiAddC_<mod>(const Ipp<datatype>* pSrc, int srcStep, const Ipp<datatype>value[3], Ipp<datatype>* pDst, int dstStep, IppiSize roiSize);
Supported values for mod:32f_AC4R

Case 5: In-place operation on one-channel integer or complex data
IppStatus ippiAddC_<mod>(Ipp<datatype> value, Ipp<datatype>* pSrcDst, int srcDstStep,
IppiSize roiSize, int scaleFactor);
Supported values for mod:8u_C1IRSfs

746

16u_C1IRSfs

16s_C1IRSfs

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Case 6: In-place operation on multi-channel integer or complex data
IppStatus ippiAddC_<mod>(const Ipp<datatype> value[3], Ipp<datatype>* pSrcDst, int
srcDstStep, IppiSize roiSize, int scaleFactor);
Supported values for mod:8u_C3IRSfs

16u_C3IRSfs

16s_C3IRSfs

8u_AC4IRSfs

16u_AC4IRSfs

16s_AC4IRSfs

IppStatus ippiAddC_<mod>(const Ipp<datatype> value[4], Ipp<datatype>* pSrcDst, int
srcDstStep, IppiSize roiSize, int scaleFactor);
Supported values for mod:8u_C4IRSfs

16u_C4IRSfs

16s_C4IRSfs

Case 7: In-place operation on one-channel floating-point or complex data
IppStatus ippiAddC_32f_C1IR(Ipp32f value, Ipp32f* pSrcDst, int srcDstStep, IppiSize
roiSize);

Case 8: In-place operation on multi-channel floating-point or complex data
IppStatus ippiAddC_<mod>(const Ipp<datatype> value[3], Ipp<datatype>* pSrcDst, int
srcDstStep, IppiSize roiSize);
Supported values for mod:32f_C3IR
32f_AC4IR
IppStatus ippiAddC_32f_C4IR(const Ipp32f value[4], Ipp32f* pSrcDst, int srcDstStep,
IppiSize roiSize);

Case 9: Not-in-place operation on one-channel integer data with platform-aware functions
IppStatus ippiAddC_<mod>(const Ipp<datatype>* pSrc, IppSizeL srcStep, Ipp<datatype>value, Ipp<datatype>* pDst, IppSizeL dstStep, IppiSizeL roiSize, int scaleFactor);
Supported values for mod:8u_C1RSfs_L

16u_C1RSfs_L

16s_C1RSfs_L

Case 10: Not-in-place operation on multi-channel integer data with platform-aware functions
IppStatus ippiAddC_<mod>(const Ipp<datatype>* pSrc, IppSizeL srcStep, const
Ipp<datatype> value[3], Ipp<datatype>* pDst, IppSizeL dstStep, IppiSizeL roiSize, int
scaleFactor);
Supported values for mod:8u_C3RSfs_L

16u_C3RSfs_L

16s_C3RSfs_L

8u_AC4RSfs_L

16u_AC4RSfs_L

16s_AC4RSfs_L

747

1

Intel® Integrated Performance Primitives Developer Guide and Reference

IppStatus ippiAddC_<mod>(const Ipp<datatype>* pSrc, IppSizeL srcStep, const
Ipp<datatype> value[4], Ipp<datatype>* pDst, IppSizeL dstStep, IppiSizeL roiSize, int
scaleFactor);
Supported values for mod:8u_C4RSfs_L

16u_C4RSfs_L

16s_C4RSfs_L

Case 11: Not-in-place operation on one-channel floating point data with platform-aware functions
IppStatus ippiAddC_32f_C1R_L(const Ipp32f* pSrc, IppSizeL srcStep, Ipp32f value,
Ipp32f* pDst, IppSizeL dstStep, IppiSizeL roiSize);

Case 12: Not-in-place operation on multi-channel floating point data with platform-aware functions
IppStatus ippiAddC_<mod>(const Ipp32f* pSrc, IppSizeL srcStep, const Ipp32f value[3],Ipp32f* pDst, IppSizeL dstStep, IppiSizeL roiSize);
Supported values for mod:32f_C3R_L
32f_AC4R_L
IppStatus ippiAddC_32f_C4R_L(const Ipp32f* pSrc, IppSizeL srcStep, const Ipp32f
value[4], Ipp32f* pDst, IppSizeL dstStep, IppiSizeL roiSize);

Case 13: In-place operation on one-channel integer data with platform-aware functions
IppStatus ippiAddC_<mod>(Ipp<datatype> value, Ipp<datatype>* pSrcDst, IppSizeL
srcDstStep, IppiSizeL roiSize, int scaleFactor);
Supported values for mod:8u_C1IRSfs_L

16u_C1IRSfs_L

16s_C1IRSfs_L

Case 14: In-place operation on multi-channel integer data with platform-aware functions
IppStatus ippiAddC_<mod>(const Ipp<datatype> value[3], Ipp<datatype>* pSrcDst, IppSizeL
srcDstStep, IppiSizeL roiSize, int scaleFactor);
Supported values for mod:8u_C3IRSfs_L

16u_C3IRSfs_L

16s_C3IRSfs_L

8u_AC4IRSfs_L

16u_AC4IRSfs_L

16s_AC4IRSfs_L

IppStatus ippiAddC_<mod>(const Ipp<datatype> value[4], Ipp<datatype>* pSrcDst, IppSizeL
srcDstStep, IppiSizeL roiSize, int scaleFactor);
Supported values for mod:8u_C4IRSfs_L

16u_C4IRSfs_L

16s_C4IRSfs_L

Case 15: In-place operation on one-channel floating point data with platform-aware functions
IppStatus ippiAddC_32f_C1IR_L(Ipp32f value, Ipp32f* pSrcDst, IppSizeL srcDstStep,
IppiSizeL roiSize);

748

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Case 16: In-place operation on multi-channel integer data with platform-aware functions
IppStatus ippiAddC_<mod>(const Ipp32f value[3], Ipp32f* pSrcDst, IppSizeL srcDstStep,
IppiSizeL roiSize);
Supported values for mod:32f_C3IR_L
32f_AC4IR_L
IppStatus ippiAddC_32f_C4IR_L(const Ipp32f value[4], Ipp32f* pSrcDst, IppSizeL
srcDstStep, IppiSizeL roiSize);

Case 17: Not-in-place operation on one-channel integer data with threading layer (TL) functions
IppStatus ippiAddC_<mod>(const Ipp<datatype>* pSrc, IppSizeL srcStep, Ipp<datatype>value, Ipp<datatype>* pDst, IppSizeL dstStep, IppiSizeL roiSize, int scaleFactor);
Supported values for mod:8u_C1RSfs_LT

16u_C1RSfs_LT

16s_C1RSfs_LT

Case 18: Not-in-place operation on multi-channel integer data with TL functions
IppStatus ippiAddC_<mod>(const Ipp<datatype>* pSrc, IppSizeL srcStep, const
Ipp<datatype> value[3], Ipp<datatype>* pDst, IppSizeL dstStep, IppiSizeL roiSize, int
scaleFactor);
Supported values for mod:8u_C3RSfs_LT

16u_C3RSfs_LT

16s_C3RSfs_LT

8u_AC4RSfs_LT

16u_AC4RSfs_LT

16s_AC4RSfs_LT

IppStatus ippiAddC_<mod>(const Ipp<datatype>* pSrc, IppSizeL srcStep, const
Ipp<datatype> value[4], Ipp<datatype>* pDst, IppSizeL dstStep, IppiSizeL roiSize, int
scaleFactor);
Supported values for mod:8u_C4RSfs_LT

16u_C4RSfs_LT

16s_C4RSfs_LT

Case 19: Not-in-place operation on one-channel floating point data with TL functions
IppStatus ippiAddC_32f_C1R_LT(const Ipp32f* pSrc, IppSizeL srcStep, Ipp32f value,
Ipp32f* pDst, IppSizeL dstStep, IppiSizeL roiSize);

Case 20: Not-in-place operation on multi-channel floating point data with TL functions
IppStatus ippiAddC_<mod>(const Ipp32f* pSrc, IppSizeL srcStep, const Ipp32f value[3],Ipp32f* pDst, IppSizeL dstStep, IppiSizeL roiSize);
Supported values for mod:32f_C3R_LT
32f_AC4R_LT

749

1

Intel® Integrated Performance Primitives Developer Guide and Reference

IppStatus ippiAddC_32f_C4R_LT(const Ipp32f* pSrc, IppSizeL srcStep, const Ipp32f
value[4], Ipp32f* pDst, IppSizeL dstStep, IppiSizeL roiSize);

Case 21: In-place operation on one-channel integer data with TL functions
IppStatus ippiAddC_<mod>(Ipp<datatype> value, Ipp<datatype>* pSrcDst, IppSizeL
srcDstStep, IppiSizeL roiSize, int scaleFactor);
Supported values for mod:8u_C1IRSfs_LT

16u_C1IRSfs_LT

16s_C1IRSfs_LT

Case 22: In-place operation on multi-channel integer data with TL functions
IppStatus ippiAddC_<mod>(const Ipp<datatype> value[3], Ipp<datatype>* pSrcDst, IppSizeL
srcDstStep, IppiSizeL roiSize, int scaleFactor);
Supported values for mod:8u_C3IRSfs_LT

16u_C3IRSfs_LT

16s_C3IRSfs_LT

8u_AC4IRSfs_LT

16u_AC4IRSfs_LT

16s_AC4IRSfs_LT

IppStatus ippiAddC_<mod>(const Ipp<datatype> value[4], Ipp<datatype>* pSrcDst, IppSizeL
srcDstStep, IppiSizeL roiSize, int scaleFactor);
Supported values for mod:8u_C4IRSfs_LT

16u_C4IRSfs_LT

16s_C4IRSfs_LT

Case 23: In-place operation on one-channel floating point data with TL functions
IppStatus ippiAddC_32f_C1IR_LT(Ipp32f value, Ipp32f* pSrcDst, IppSizeL srcDstStep,
IppiSizeL roiSize);

Case 24: In-place operation on multi-channel integer data with TL functions
IppStatus ippiAddC_<mod>(const Ipp32f value[3], Ipp32f* pSrcDst, IppSizeL srcDstStep,
IppiSizeL roiSize);
Supported values for mod:32f_C3IR_LT
32f_AC4IR_LT
IppStatus ippiAddC_32f_C4IR_LT(const Ipp32f value[4], Ipp32f* pSrcDst, IppSizeL
srcDstStep, IppiSizeL roiSize);

Include Files
ippi.h
Flavors with the _LT suffix: ippi_tl.h
Flavors with the _L suffix: ippi_l.h

Domain Dependencies
Flavors declared in ippi.h:
Headers: ippcore.h, ippvm.h, ipps.h750

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Libraries: ippcore.lib, ippvm.lib, ipps.lib
Flavors declared in ippi_tl.h:
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib, ippcore_tl.lib, ippi_tl.lib

Parameters
Pointer to the source image ROI.

pSrc
srcStep
value
pDst
dstStep

Distance in bytes between starts of consecutive lines in thesource image.
The constant value to add to image pixel values (constantvector in case of multi-channel images).
Pointer to the destination image ROI.
Distance in bytes between starts of consecutive lines in thedestination image.

roiSize

Pointer to the source and destination image ROI for the inplace operation.
Distance in bytes between starts of consecutive lines in thesource and destination image buffer for the in-place operation.
Size of the source and destination ROI in pixels.

scaleFactor

Scale factor (see Integer Result Scaling).

pSrcDstsrcDstStep

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function changes the image intensity by adding value to image pixel values. For one-channel images, apositive value brightens the image (increases the intensity); a negative value darkens the image (decreases
the intensity). For multi-channel images, the components of a constant vector value are added to pixel
channel values. For complex data, the function processes both real and imaginary parts of pixel values.

NOTE
Step values must be positive for functions that operate on complex data.
In case of operations on integer data, the resulting values are scaled by scaleFactor.
Note that the functions with AC4 descriptor do not process alpha channels.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsStepErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if any of the specified pointers is
NULL.
Indicates an error condition if roiSize has a field with zero or
negative value.
Indicates an error condition if any of the specified buffer step
values is zero or negative for functions that operate oncomplex data.

751

1

Intel® Integrated Performance Primitives Developer Guide and Reference

AddSquare
Adds squared pixel values of a source image tofloating-point pixel values of an accumulator image.

SyntaxCase 1: In-place operation
IppStatus ippiAddSquare_<mod>(const Ipp<srcDatatype>* pSrc, int srcStep, Ipp32f*
pSrcDst, int srcDstStep, IppiSize roiSize);
Supported values for mod:8u32f_C1IR

16u32f_C1IR

32f_C1IR

Case 2: Masked in-place operation
IppStatus ippiAddSquare_<mod>(const Ipp<srcDatatype>* pSrc, int srcStep, const Ipp8u*
pMask, int maskStep, Ipp32f* pSrcDst, int srcDstStep, IppiSize roiSize);
Supported values for mod:8u32f_C1IMR

16u32f_C1IMR

32f_C1IMR

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pMask
maskSteppSrcDstsrcDstStep
roiSize

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the mask image.
Distance in bytes between starts of consecutive lines in themask image.
Pointer to the destination (accumulator) image ROI.
Distance in bytes between starts of consecutive lines in theaccumulator image.
Size of the image ROI in pixels.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function adds squared pixel values of the source image pSrc to floating-point pixel values of theaccumulator image pSrcDst as follows:

pSrcDst(x,y) = pSrcDst(x,y) + pSrc(x,y)2
Addition of the squared pixel values in case of a masked operation is performed only if the respective mask
value is nonzero; otherwise, the accumulator pixel value remains unchanged.

752

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsStepErr
ippStsNotEvenStepErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if any of the specified pointers is
NULL.
Indicates an error when roiSize.width or roiSize.height isnegative.
Indicates an error when srcStep, maskStep, or srcDstStep isless than roiSize.width * <pixelSize>.
Indicates an error condition if one of step values for floatingpoint images cannot be divided by 4.

AddProductAdds product of pixel values of two source images tofloating-point pixel values of an accumulator image.

SyntaxCase 1: In-place operation
IppStatus ippiAddProduct_<mod>(const Ipp<srcDatatype>* pSrc1, int src1Step, const
Ipp<srcDatatype>* pSrc2, int src2Step, Ipp32f* pSrcDst, int srcDstStep, IppiSize
roiSize);
Supported values for mod:8u32f_C1IR

16u32f_C1IR

32f_C1IR

Case 2: Masked in-place operation
IppStatus ippiAddProduct_<mod>(const Ipp<srcDatatype>* pSrc1, int src1Step, const
Ipp<srcDatatype>* pSrc2, int src2Step, const Ipp8u* pMask, int maskStep, Ipp32f*
pSrcDst, int srcDstStep, IppiSize roiSize);
Supported values for mod:8u32f_C1IMR

16u32f_C1IMR

32f_C1IMR

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc1, pSrc2

Pointers to the source images ROI.

src1Step, src2Step

Distances in bytes between starts of consecutive lines in thesource images.
Pointer to the mask image.

pMask

753

1

Intel® Integrated Performance Primitives Developer Guide and Reference

maskSteppSrcDstsrcDstStep
roiSize

Distance in bytes between starts of consecutive lines in themask image.
Pointer to the destination (accumulator) image ROI.
Distance in bytes between starts of consecutive lines in theaccumulator image.
Size of the image ROI in pixels.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function adds the product of pixel values of two source images pSrc1 and pSrc2 to floating-point pixel
values of the accumulator image pSrcDst as given by:

pSrcDst(x,y) = pSrcDst(x,y) + pSrc1(x,y) * pSrc2(x,y)
The products of pixel values in case of a masked operation are added only if the respective mask value isnonzero; otherwise, the accumulator pixel value remains unchanged.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when any of the specified pointers is null.

ippStsSizeErr
ippStsStepErr
ippStsNotEvenStepErr

Indicates an error when roiSize.width or roiSize.height isnegative.
Indicates an error if src1Step, src2Step, maskStep, or
srcDdstStep is less than roiSize.width * <pixelSize>.
Indicates an error condition if one of step values for floatingpoint images cannot be divided by 4.

AddWeighted
Adds weighted pixel values of a source image tofloating-point pixel values of an accumulator image.

SyntaxCase 1: In-place operation
IppStatus ippiAddWeighted_<mod>(const Ipp<srcDatatype>* pSrc, int srcStep, Ipp32f*
pSrcDst, int srcDstStep, IppiSize roiSize, Ipp32f alpha);
Supported values for mod:8u32f_C1IR

16u32f_C1IR

32f_C1IR

Case 2: Masked in-place operation
IppStatus ippiAddWeighted_<mod>(const Ipp<srcDatatype>* pSrc, int srcStep, const Ipp8u*
pMask, int maskStep, Ipp32f* pSrcDst, int srcDstStep, IppiSize roiSize, Ipp32f alpha);
Supported values for mod:8u32f_C1IMR

754

16u32f_C1IMR

32f_C1IMR

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Case 3: Not-in-place operation
IppStatus ippiAddWeighted_32f_C1R(const Ipp32f* pSrc1, int src1Step, const Ipp32f*
pSrc2, int src2Step, Ipp32f* pDst, int dstStep, IppiSize roiSize, Ipp32f alpha);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc

Pointer to the source image ROI for the in-place operation.

pSrc1, pSrc2

Pointers to the ROI in the source images.

srcStep
src1Step, src2Step
pMask
maskSteppSrcDstsrcDstStep
pDst

Distance in bytes between starts of consecutive lines in thesource image for the in-place operation.
Distance in bytes between starts of consecutive lines in thesource images.
Pointer to the mask image.
Distance in bytes between starts of consecutive lines in themask image.
Pointer to the destination (accumulator) image ROI for the inplace operation.
Distance in bytes between starts of consecutive lines in theaccumulator image.
Pointer to the destination image ROI.

roiSize

Distance in bytes between starts of consecutive lines in thedestination image.
Size of the image ROI in pixels.

alpha

Weight a of the source image.

dstStep

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function adds pixel values of the source image pSrc1 multiplied by a weight factor alpha to pixel valuesof the image pSrc2 multiplied by (1-alpha) and stores result in the pDst as follows:pDst(x,y) = pSrc1(x,y)* alpha + pSrc2(x,y)*(1- alpha).
The in-place flavors of the function adds pixel values of the source image pSrc multiplied by a weight factor
alpha to floating-point pixel values of the accumulator image pSrcDst multiplied by (1-alpha) as follows:

pSrcDst(x,y) = pSrcDst(x,y)* (1-alpha) + pSrc(x,y)*alpha
Addition of the weighted pixel values in case of a masked operation is performed only if the respective mask
value is nonzero; otherwise, the accumulator pixel value remains unchanged.

Return Values
ippStsNoErr

Indicates no error.

755

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Indicates an error when any of the specified pointers is NULL.

ippStsNullPtrErr

Indicates an error when roiSize.width or roiSize.height isequal to 0 or negative.
Indicates an error when one of the step values is equal to zero,or is less than roiSize.width * <pixelSize>.

ippStsSizeErr
ippStsStepErr

Indicates an error when one of step values for floating-point
images cannot be divided by 4.

ippStsNotEvenStepErr

Mul
Multiplies pixel values of two images.

Case 1: Not-in-place operation on integer or complex data
IppStatus ippiMul_<mod>(const Ipp<datatype>* pSrc1, int src1Step, const Ipp<datatype>*pSrc2, int src2Step, Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, int
scaleFactor);
Supported values for mod:8u_C1RSfs

16u_C1RSfs

16s_C1RSfs

8u_C3RSfs

16u_C3RSfs

16s_C3RSfs

8u_AC4RSfs

16u_AC4RSfs

16s_AC4RSfs

8u_C4RSfs

16u_C4RSfs

16s_C4RSfs

Case 2: Not-in-place operation on floating-point or complex data
IppStatus ippiMul_<mod>(const Ipp<datatype>* pSrc1, int src1Step, const Ipp<datatype>*pSrc2, int src2Step, Ipp<datatype>* pDst, int dstStep, IppiSize roiSize);
Supported values for mod:32f_C1R

32f_AC4R

32f_C3R

32f_C4R

Case 3: In-place operation on integer or complex data
IppStatus ippiMul_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>* pSrcDst,
int srcDstStep, IppiSize roiSize, int scaleFactor);
Supported values for mod:8u_C1IRSfs

16u_C1IRSfs

16s_C1IRSfs

8u_C3IRSfs

16u_C3IRSfs

16s_C3IRSfs

8u_AC4IRSfs

16u_AC4IRSfs

16s_AC4IRSfs

8u_C4IRSfs

16u_C4IRSfs

16s_C4IRSfs

756

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Case 4: In-place operation on floating-point or complex data
IppStatus ippiMul_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>* pSrcDst,
int srcDstStep, IppiSize roiSize);
Supported values for mod:32f_C1IR
32f_C3IR
32f_AC4IR
32f_C4IR

Case 5: Not-in-place operation on integer data with platform-aware functions
IppStatus ippiMul_<mod>(const Ipp<datatype>* pSrc1, IppSizeL src1Step, const
Ipp<datatype>* pSrc2, IppSizeL src2Step, Ipp<datatype>* pDst, IppSizeL dstStep,
IppiSizeL roiSize, int scaleFactor);
Supported values for mod:8u_C1RSfs_L

16u_C1RSfs_L

16s_C1RSfs_L

8u_C3RSfs_L

16u_C3RSfs_L

16s_C3RSfs_L

8u_AC4RSfs_L

16u_AC4RSfs_L

16s_AC4RSfs_L

8u_C4RSfs_L

16u_C4RSfs_L

16s_C4RSfs_L

Case 6: Not-in-place operation on floating-point data with platform-aware functions
IppStatus ippiMul_<mod>(const Ipp<datatype>* pSrc1, IppSizeL src1Step, const
Ipp<datatype>* pSrc2, IppSizeL src2Step, Ipp<datatype>* pDst, IppSizeL dstStep,
IppiSizeL roiSize);
Supported values for mod:32f_C1R_L
32f_C3R_L
32f_C4R_L
32f_AC4R_L

Case 7: In-place operation on integer data with platform-aware functions
IppStatus ippiMul_<mod>(const Ipp<datatype>* pSrc, IppSizeL srcStep, Ipp<datatype>*pSrcDst, IppSizeL srcDstStep, IppiSizeL roiSize, int scaleFactor);
Supported values for mod:8u_C1IRSfs_L

16u_C1IRSfs_L

16s_C1IRSfs_L

8u_C3IRSfs_L

16u_C3IRSfs_L

16s_C3IRSfs_L

8u_AC4IRSfs_L

16u_AC4IRSfs_L

16s_AC4IRSfs_L

757

1

Intel® Integrated Performance Primitives Developer Guide and Reference

8u_C4IRSfs_L

16u_C4IRSfs_L

16s_C4IRSfs_L

Case 8: In-place operation on floating-point data with platform-aware functions
IppStatus ippiMul_<mod>(const Ipp<datatype>* pSrc, IppSizeL srcStep, Ipp<datatype>*pSrcDst, IppSizeL srcDstStep, IppiSizeL roiSize);
Supported values for mod:32f_C1IR_L
32f_C3IR_L
32f_AC4IR_L
32f_C4IR_L

Case 9: Not-in-place operation on integer data with threading layer (TL) functions
IppStatus ippiMul_<mod>(const Ipp<datatype>* pSrc1, IppSizeL src1Step, const
Ipp<datatype>* pSrc2, IppSizeL src2Step, Ipp<datatype>* pDst, IppSizeL dstStep,
IppiSizeL roiSize, int scaleFactor);
Supported values for mod:8u_C1RSfs_LT

16u_C1RSfs_LT

16s_C1RSfs_LT

8u_C3RSfs_LT

16u_C3RSfs_LT

16s_C3RSfs_LT

8u_AC4RSfs_LT

16u_AC4RSfs_LT

16s_AC4RSfs_LT

8u_C4RSfs_LT

16u_C4RSfs_LT

16s_C4RSfs_LT

Case 10: Not-in-place operation on floating-point data with TL functions
IppStatus ippiMul_<mod>(const Ipp<datatype>* pSrc1, IppSizeL src1Step, const
Ipp<datatype>* pSrc2, IppSizeL src2Step, Ipp<datatype>* pDst, IppSizeL dstStep,
IppiSizeL roiSize);
Supported values for mod:32f_C1R_LT
32f_C3R_LT
32f_C4R_LT
32f_AC4R_LT

Case 11: In-place operation on integer data with TL functions
IppStatus ippiMul_<mod>(const Ipp<datatype>* pSrc, IppSizeL srcStep, Ipp<datatype>*pSrcDst, IppSizeL srcDstStep, IppiSizeL roiSize, int scaleFactor);
Supported values for mod:8u_C1IRSfs_LT

16u_C1IRSfs_LT

16s_C1IRSfs_LT

8u_C3IRSfs_LT

16u_C3IRSfs_LT

16s_C3IRSfs_LT

758

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

8u_AC4IRSfs_LT

16u_AC4IRSfs_LT

16s_AC4IRSfs_LT

8u_C4IRSfs_LT

16u_C4IRSfs_LT

16s_C4IRSfs_LT

Case 12: In-place operation on floating-point data with TL functions
IppStatus ippiMul_<mod>(const Ipp<datatype>* pSrc, IppSizeL srcStep, Ipp<datatype>*pSrcDst, IppSizeL srcDstStep, IppiSizeL roiSize);
Supported values for mod:32f_C1IR_LT
32f_C3IR_LT
32f_AC4IR_LT
32f_C4IR_LT

Include Files
ippi.h
Flavors with the _LT suffix: ippi_tl.h
Flavors with the _L suffix: ippi_l.h

Domain Dependencies
Flavors declared in ippi.h:
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib
Flavors declared in ippi_tl.h:
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib, ippcore_tl.lib, ippi_tl.lib

Parameters
pSrc, pSrc1, pSrc2

Pointers to the source images ROI.

srcStep, src1Step, src2Step

Distances in bytes between starts of consecutive lines in thesource images.
Pointer to the destination image ROI.

pDst

roiSize

Distance in bytes between starts of consecutive lines in thedestination image.
Pointer to the source and destination image ROI for the inplace operation.
Distance in bytes between starts of consecutive lines in thesource and destination image for the in-place operation.
Size of the source and destination ROI in pixels.

scaleFactor

Scale factor (see Integer Result Scaling).

dstStep
pSrcDstsrcDstStep

Description
This function operates with ROI (see Regions of Interest in Intel IPP).

759

1

Intel® Integrated Performance Primitives Developer Guide and ReferenceThis function multiplies corresponding pixel values of two source image buffers and places the results in a
destination buffer. In case of operations on integer data, the resulting values are scaled by scaleFactor.
For complex data, the function processes both real and imaginary parts of pixel values.

NOTE
Step values must be positive for functions that operate on complex data.
Note that the functions with AC4 descriptor do not process alpha channels.

Return Values
ippStsNoErr
ippStsNullPtrErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if any of the pointers is NULL.
Indicates an error condition if roiSize has a field with zero or
negative value.
Indicates an error condition if any of the specified buffer step
values is zero or negative for functions that operate oncomplex data.

ippStsSizeErr
ippStsStepErr

MulC
Multiplies pixel values of an image by a constant.

SyntaxCase 1: Not-in-place operation on one-channel integer or complex data
IppStatus ippiMulC_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype> value,
Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, int scaleFactor);
Supported values for mod:8u_C1RSfs

16u_C1RSfs

16s_C1RSfs

Case 2: Not-in-place operation on multi-channel integer or complex data
IppStatus ippiMulC_<mod>(const Ipp<datatype>* pSrc, int srcStep, const Ipp<datatype>value[3], Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, int scaleFactor);
Supported values for mod:8u_C3RSfs

16u_C3RSfs

16s_C3RSfs

IppStatus ippiMulC_<mod>(const Ipp<datatype>* pSrc, int srcStep, const Ipp<datatype>value[4], Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, int scaleFactor);
Supported values for mod:8u_C4RSfs

760

16u_C4RSfs

16s_C4RSfs

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

IppStatus ippiMulC_<mod>(const Ipp<datatype>* pSrc, int srcStep, const Ipp<datatype>value[3], Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, int scaleFactor);
Supported values for mod:8u_AC4RSfs

16u_AC4RSfs

16s_AC4RSfs

Case 3: Not-in-place operation on one-channel floating-point or complex data
IppStatus ippiMulC_32f_C1R(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype> value,
Ipp<datatype>* pDst, int dstStep, IppiSize roiSize);

Case 4: Not-in-place operation on multi-channel floating-point or complex data
IppStatus ippiMulC_32f_C3R(const Ipp<datatype>* pSrc, int srcStep, const Ipp<datatype>value[3], Ipp<datatype>* pDst, int dstStep, IppiSize roiSize);
IppStatus ippiMulC_32f_C4R(const Ipp32f* pSrc, int srcStep, const Ipp32f value[4],Ipp32f* pDst, int dstStep, IppiSize roiSize);
IppStatus ippiMulC_<mod>(const Ipp<datatype>* pSrc, int srcStep, const Ipp<datatype>value[3], Ipp<datatype>* pDst, int dstStep, IppiSize roiSize);
Supported values for mod:32f_AC4R

IppStatus ippiMulC_32f_C4R(const Ipp32f* pSrc, int srcStep, const Ipp32f value[4],Ipp32f* pDst, int dstStep, IppiSize roiSize);

Case 5: In-place operation on one-channel integer or complex data
IppStatus ippiMulC_<mod>(Ipp<datatype> value, Ipp<datatype>* pSrcDst, int srcDstStep,
IppiSize roiSize, int scaleFactor);
Supported values for mod:8u_C1IRSfs

16u_C1IRSfs

16s_C1IRSfs

Case 6: In-place operation on multi-channel integer or complex data
IppStatus ippiMulC_<mod>(const Ipp<datatype> value[3], Ipp<datatype>* pSrcDst, int
srcDstStep, IppiSize roiSize, int scaleFactor);
Supported values for mod:8u_C3IRSfs

16u_C3IRSfs

16s_C3IRSfs

8u_AC4IRSfs

16u_AC4IRSfs

16s_AC4IRSfs

IppStatus ippiMulC_<mod>(const Ipp<datatype> value[4], Ipp<datatype>* pSrcDst, int
srcDstStep, IppiSize roiSize, int scaleFactor);
Supported values for mod:8u_C4IRSfs 16u_C4IRSfs 16s_C4IRSfs

761

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Case 7: In-place operation on one-channel floating-point or complex data
IppStatus ippiMulC_32f_C1IR(Ipp32f value, Ipp32f* pSrcDst, int srcDstStep, IppiSize
roiSize);

Case 8: In-place operation on multi-channel floating-point or complex data
IppStatus ippiMulC_<mod>(const Ipp<datatype> value[3], Ipp<datatype>* pSrcDst, int
srcDstStep, IppiSize roiSize);
Supported values for mod:32f_C3IR
32f_AC4IR
IppStatus ippiMulC_32f_C4IR(const Ipp32f value[4], Ipp32f* pSrcDst, int srcDstStep,
IppiSize roiSize);

Case 9: Not-in-place operation on one-channel integer data with platform-aware functions
IppStatus ippiMulC_<mod>(const Ipp<datatype>* pSrc, IppSizeL srcStep, Ipp<datatype>value, Ipp<datatype>* pDst, IppSizeL dstStep, IppiSizeL roiSize, int scaleFactor);
Supported values for mod:8u_C1RSfs_L

16u_C1RSfs_L

16s_C1RSfs_L

Case 10: Not-in-place operation on multi-channel integer data with platform-aware functions
IppStatus ippiMulC_<mod>(const Ipp<datatype>* pSrc, IppSizeL srcStep, const
Ipp<datatype> value[3], Ipp<datatype>* pDst, IppSizeL dstStep, IppiSizeL roiSize, int
scaleFactor);
Supported values for mod:8u_C3RSfs_L

16u_C3RSfs_L

16s_C3RSfs_L

8u_AC4RSfs_L

16u_AC4RSfs_L

16s_AC4RSfs_L

IppStatus ippiMulC_<mod>(const Ipp<datatype>* pSrc, IppSizeL srcStep, const
Ipp<datatype> value[4], Ipp<datatype>* pDst, IppSizeL dstStep, IppiSizeL roiSize, int
scaleFactor);
Supported values for mod:8u_C4RSfs_L

16u_C4RSfs_L

16s_C4RSfs_L

Case 11: Not-in-place operation on one-channel floating point data with platform-aware functions
IppStatus ippiMulC_32f_C1R_L(const Ipp32f* pSrc, IppSizeL srcStep, Ipp32f value,
Ipp32f* pDst, IppSizeL dstStep, IppiSizeL roiSize);

Case 12: Not-in-place operation on multi-channel floating point data with platform-aware functions
IppStatus ippiMulC_<mod>(const Ipp32f* pSrc, IppSizeL srcStep, const Ipp32f value[3],Ipp32f* pDst, IppSizeL dstStep, IppiSizeL roiSize);
Supported values for mod:32f_C3R_L

762

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

32f_AC4R_L
IppStatus ippiMulC_32f_C4R_L(const Ipp32f* pSrc, IppSizeL srcStep, const Ipp32f
value[4], Ipp32f* pDst, IppSizeL dstStep, IppiSizeL roiSize);

Case 13: In-place operation on one-channel integer data with platform-aware functions
IppStatus ippiMulC_<mod>(Ipp<datatype> value, Ipp<datatype>* pSrcDst, IppSizeL
srcDstStep, IppiSizeL roiSize, int scaleFactor);
Supported values for mod:8u_C1IRSfs_L

16u_C1IRSfs_L

16s_C1IRSfs_L

Case 14: In-place operation on multi-channel integer data with platform-aware functions
IppStatus ippiMulC_<mod>(const Ipp<datatype> value[3], Ipp<datatype>* pSrcDst, IppSizeL
srcDstStep, IppiSizeL roiSize, int scaleFactor);
Supported values for mod:8u_C3IRSfs_L

16u_C3IRSfs_L

16s_C3IRSfs_L

8u_AC4IRSfs_L

16u_AC4IRSfs_L

16s_AC4IRSfs_L

IppStatus ippiMulC_<mod>(const Ipp<datatype> value[4], Ipp<datatype>* pSrcDst, IppSizeL
srcDstStep, IppiSizeL roiSize, int scaleFactor);
Supported values for mod:8u_C4IRSfs_L

16u_C4IRSfs_L

16s_C4IRSfs_L

Case 15: In-place operation on one-channel floating point data with platform-aware functions
IppStatus ippiMulC_32f_C1IR_L(Ipp32f value, Ipp32f* pSrcDst, IppSizeL srcDstStep,
IppiSizeL roiSize);

Case 16: In-place operation on multi-channel integer data with platform-aware functions
IppStatus ippiMulC_<mod>(const Ipp32f value[3], Ipp32f* pSrcDst, IppSizeL srcDstStep,
IppiSizeL roiSize);
Supported values for mod:32f_C3IR_L
32f_AC4IR_L
IppStatus ippiMulC_32f_C4IR_L(const Ipp32f value[4], Ipp32f* pSrcDst, IppSizeL
srcDstStep, IppiSizeL roiSize);

Case 17: Not-in-place operation on one-channel integer data with threading layer (TL)functions
IppStatus ippiMulC_<mod>(const Ipp<datatype>* pSrc, IppSizeL srcStep, Ipp<datatype>value, Ipp<datatype>* pDst, IppSizeL dstStep, IppiSizeL roiSize, int scaleFactor);
Supported values for mod:8u_C1RSfs_LT

16u_C1RSfs_LT

16s_C1RSfs_LT

763

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Case 18: Not-in-place operation on multi-channel integer data with TL functions
IppStatus ippiMulC_<mod>(const Ipp<datatype>* pSrc, IppSizeL srcStep, const
Ipp<datatype> value[3], Ipp<datatype>* pDst, IppSizeL dstStep, IppiSizeL roiSize, int
scaleFactor);
Supported values for mod:8u_C3RSfs_LT

16u_C3RSfs_LT

16s_C3RSfs_LT

8u_AC4RSfs_LT

16u_AC4RSfs_LT

16s_AC4RSfs_LT

IppStatus ippiMulC_<mod>(const Ipp<datatype>* pSrc, IppSizeL srcStep, const
Ipp<datatype> value[4], Ipp<datatype>* pDst, IppSizeL dstStep, IppiSizeL roiSize, int
scaleFactor);
Supported values for mod:8u_C4RSfs_LT

16u_C4RSfs_LT

16s_C4RSfs_LT

Case 19: Not-in-place operation on one-channel floating point data with TL functions
IppStatus ippiMulC_32f_C1R_LT(const Ipp32f* pSrc, IppSizeL srcStep, Ipp32f value,
Ipp32f* pDst, IppSizeL dstStep, IppiSizeL roiSize, int scaleFactor);

Case 20: Not-in-place operation on multi-channel floating point data with TL functions
IppStatus ippiMulC_<mod>(const Ipp32f* pSrc, IppSizeL srcStep, const Ipp32f value[3],Ipp32f* pDst, IppSizeL dstStep, IppiSizeL roiSize);
Supported values for mod:32f_C3R_LT
32f_AC4R_LT
IppStatus ippiMulC_32f_C4R_LT(const Ipp32f* pSrc, IppSizeL srcStep, const Ipp32f
value[4], Ipp32f* pDst, IppSizeL dstStep, IppiSizeL roiSize);

Case 21: In-place operation on one-channel integer data with TL functions
IppStatus ippiMulC_<mod>(Ipp<datatype> value, Ipp<datatype>* pSrcDst, IppSizeL
srcDstStep, IppiSizeL roiSize, int scaleFactor);
Supported values for mod:8u_C1IRSfs_LT

16u_C1IRSfs_LT

16s_C1IRSfs_LT

Case 22: In-place operation on multi-channel integer data with TL functions
IppStatus ippiMulC_<mod>(const Ipp<datatype> value[3], Ipp<datatype>* pSrcDst, IppSizeL
srcDstStep, IppiSizeL roiSize, int scaleFactor);
Supported values for mod:8u_C3IRSfs_LT

16u_C3IRSfs_LT

16s_C3IRSfs_LT

8u_AC4IRSfs_LT

16u_AC4IRSfs_LT

16s_AC4IRSfs_LT764

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

IppStatus ippiMulC_<mod>(const Ipp<datatype> value[4], Ipp<datatype>* pSrcDst, IppSizeL
srcDstStep, IppiSizeL roiSize, int scaleFactor);
Supported values for mod:8u_C4IRSfs_LT

16u_C4IRSfs_LT

16s_C4IRSfs_LT

Case 23: In-place operation on one-channel floating point data with TL functions
IppStatus ippiMulC_32f_C1IR_LT(Ipp32f value, Ipp32f* pSrcDst, IppSizeL srcDstStep,
IppiSizeL roiSize);

Case 24: In-place operation on multi-channel integer data with TL functions
IppStatus ippiMulC_<mod>(const Ipp32f value[3], Ipp32f* pSrcDst, IppSizeL srcDstStep,
IppiSizeL roiSize);
Supported values for mod:32f_C3IR_LT
32f_AC4IR_LT
IppStatus ippiMulC_32f_C4IR_LT(const Ipp32f value[4], Ipp32f* pSrcDst, IppSizeL
srcDstStep, IppiSizeL roiSize);

Include Files
ippi.h
Flavors with the _LT suffix: ippi_tl.h
Flavors with the _L suffix: ippi_l.h

Domain Dependencies
Flavors declared in ippi.h:
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib
Flavors declared in ippi_tl.h:
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib, ippcore_tl.lib, ippi_tl.lib

Parameters
pSrc
srcStep
value
pDst
dstStep
pSrcDstPointer to the source image ROI.
Distance, in bytes, between the starting points of consecutive
lines in the source image.
The constant value to add to image pixel values (constantvector in case of multi-channel images).
Pointer to the destination image ROI.
Distance, in bytes, between the starting points of consecutive
lines in the destination image.
Pointer to the source and destination image ROI for the inplace operation.

765

1

Intel® Integrated Performance Primitives Developer Guide and Reference

roiSize

Distance, in bytes, between the starting points of consecutive
lines in the source and destination image for the in-place
operation.
Size of the source and destination ROI in pixels.

scaleFactor

Scale factor (see Integer Result Scaling).

srcDstStep

Description
This function operates with ROI (see Regions of Regions of Interest in Intel IPP).
This function multiplies pixel values of an image by a constant value. For multi-channel images, pixel
channel values are multiplied by the components of a constant vector value. For complex data, the function
processes both real and imaginary parts of pixel values.

NOTE
Step values must be positive for functions that operate on complex data.
In case of operations on integer data, the resulting values are scaled by scaleFactor.
Note that the functions with AC4 descriptor do not process alpha channels.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsStepErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if any of the specified pointers is
NULL.
Indicates an error condition if roiSize has a field with zero or
negative value.
Indicates an error condition if any of the specified buffer step
values is zero or negative for functions that operate oncomplex data.

MulC64f
Multiplies pixel values of an image by a constantarray.

SyntaxNot-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);766

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

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);

767

1

Intel® Integrated Performance Primitives Developer Guide and Reference

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.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source image.

value

Pointer to the source and destination image ROI for in-place
operations.
Distance, in bytes, between the starting points of consecutive
lines in the source image.
Distance, in bytes, between the starting points of consecutive
lines in the source and destination image for in-place
operations.
Constant vector to add to image pixel values.

pDst

Pointer to the destination image.

pSrcDstsrcStep
srcDstStep

dstStep
roiSizehint

rndMode768

Distance, in bytes, between the starting points of consecutive
lines in the destination image.
Size of the image ROI, in pixels.
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 overaccuracy and some output pixels can differ
by +-1 from the exact result.

Rounding mode, the following values are supported:
ippRndZero

Floating-point values are truncated to zero.

ippRndNear

Floating-point values are rounded to thenearest even integer when the fractional part
equals 0.5; otherwise they are rounded to
the nearest integer.

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

ippRndFinancial

Floating-point values are rounded down to
the nearest integer when the fractional partis less than 0.5, or rounded up to thenearest 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 lessthan, or equal to zero.

ExampleMulScaleMultiplies pixel values of two images and scales the
products.

SyntaxCase 1: Not-in-place operation
IppStatus ippiMulScale_<mod>(const Ipp<datatype>* pSrc1, int src1Step, const
Ipp<datatype>* pSrc2, int src2Step, Ipp<datatype>* pDst, int dstStep, IppiSize
roiSize);
Supported values for mod:8u_C1R

16u_C1R

8u_C3R

16u_C3R

8u_C4R

16u_C4R

8u_AC4R

16u_AC4R

Case 2: In-place operation
IppStatus ippiMulScale_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>*pSrcDst, int srcDstStep, IppiSize roiSize);
Supported values for mod:8u_C1IR

16u_C1IR

8u_C3IR

16u_C3IR

8u_C4IR

16u_C4IR

769

1Intel® Integrated Performance Primitives Developer Guide and Reference

8u_AC4IR

16u_AC4IR

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc, pSrc1, pSrc2

Pointers to the source images ROI.

srcStep, src1Step, src2Step

Distances in bytes between starts of consecutive lines in thesource images.
Pointer to the destination image ROI.

pDst
dstStep
pSrcDstsrcDstStep
roiSize

Distance in bytes between starts of consecutive lines in thedestination image.
Pointer to the source and destination image ROI for the inplace operation.
Distance in bytes between starts of consecutive lines in thesource and destination image for the in-place operation.
Size of the source and destination ROI in pixels.

Description
This function operates with ROI (see Regions of Regions of Interest in Intel IPP).
This function multiplies corresponding pixel values of two input buffers and scales the products using thefollowing formula:

dst_pixel = src1_pixel * src2_pixel / max_val,
where src1_pixel and src2_pixel are pixel values of the source buffers, dst_pixel is the resultant pixel
value, and max_val is the maximum value of the pixel data range (see Table “Image Data Types and Ranges”
for details). The function is implemented for 8-bit and 16-bit unsigned data types only.
Note that the functions with AC4 descriptor do not process alpha channelss.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsStepErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if any of the specified pointers is
NULL.
Indicates an error condition if roiSize has a field with zero or
negative value.
Indicates an error condition if any of the specified buffer step
values is zero or negative.

MulCScaleMultiplies pixel values of an image by a constant andscales the products.

770

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

SyntaxCase 1: Not-in-place operation on one-channel data
IppStatus ippiMulCScale_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>value, Ipp<datatype>* pDst, int dstStep, IppiSize roiSize);
Supported values for mod:8u_C1R

16u_C1R

Case 2: Not-in-place operation on multi-channel data
IppStatus ippiMulCScale_<mod>(const Ipp<datatype>* pSrc, int srcStep, const
Ipp<datatype> value[3], Ipp<datatype>* pDst, int dstStep, IppiSize roiSize);
Supported values for mod:8u_C3R

16u_C3R

8u_AC4R

16u_AC4R

IppStatus ippiMulCScale_<mod>(const Ipp<datatype>* pSrc, int srcStep, const
Ipp<datatype> value[4], Ipp<datatype>* pDst, int dstStep, IppiSize roiSize);
Supported values for mod:8u_C4R

16u_C4R

Case 3: In-place operation on one-channel data
IppStatus ippiMulCScale_<mod>(Ipp<datatype> value, Ipp<datatype>* pSrcDst, int
srcDstStep, IppiSize roiSize);
Supported values for mod:8u_C1IR

16u_C1IR

Case 4: In-place operation on multi-channel data
IppStatus ippiMulCScale_<mod>(const Ipp<datatype> value[3], const Ipp<datatype>*pSrcDst, int srcDstStep, IppiSize roiSize);
Supported values for mod:8u_C3IR

16u_C3IR

8u_AC4IR

16u_AC4IR

IppStatus ippiMulCScale_<mod>(const Ipp<datatype> value[4], Ipp<datatype>* pSrcDst, int
srcDstStep, IppiSize roiSize);
Supported values for mod:8u_C4IR

16u_C4IR

Include Files
ippi.h771

1Intel® Integrated Performance Primitives Developer Guide and Reference

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc
srcStep
value
pDst
dstStep
pSrcDstsrcDstStep
roiSize

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
The constant value to multiply each pixel value in a source
image (constant vector in case of 3- or four-channel images).
Pointer to the destination image ROI.
Distance in bytes between starts of consecutive lines in thedestination image.
Pointer to the source and destination image ROI for the inplace operation.
Distance in bytes between starts of consecutive lines in thesource and destination image for the in-place operation.
Size of the source and destination ROI in pixels.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function multiplies pixel values in the input buffer by a constant value and scales the products using thefollowing formula:

dst_pixel = src_pixel * value / max_val,
where src_pixel is a pixel values of the source buffer, dst_pixel is the resultant pixel value, and max_val
is the maximum value of the pixel data range (see Table “Image Data Types and Ranges” for details).
The function is implemented for 8-bit and 16-bit unsigned data types only. It can be used to multiply pixel
values by a number between 0 and 1.
Note that the functions with AC4 descriptor do not process alpha channelss.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsStepErr

ndicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointers is
NULL.
Indicates an error condition if the roiSize has a field with zeroor negative value.
Indicates an error condition if any of the specified buffer step
values is zero or negative.

ExampleThe code example below shows how to use the function ippiMulCScale_8u_C1R.

void func_mulcscale(){
IppiSize ROI = {8,4};772

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

IppiSize ROI2 = {5,4};
Ipp8u src[8*4];
Ipp8u dst[8*4];
Ipp8u v = 100;ippiSet_8u_C1R(100,src,8,ROI);
ippiSet_8u_C1R(0,dst,8,ROI);
ippiMulCScale_8u_C1R(src,8,v,dst,8,ROI2);}
Result:src1
100 100 100 100 100 100 100 100
100 100 100 100 100 100 100 100
100 100 100 100 100 100 100 100
100 100 100 100 100 100 100 100

dst
39 39 39 39 39 0 0 039 39 39 39 39 0 0 039 39 39 39 39 0 0 039 39 39 39 39 0 0 0Sub
Subtracts pixel values of two images.

SyntaxCase 1: Not-in-place operation on integer or complex data
IppStatus ippiSub_<mod>(const Ipp<datatype>* pSrc1, int src1Step, const Ipp<datatype>*pSrc2, int src2Step, Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, int
scaleFactor);
Supported values for mod

8u_C1RSfs

16u_C1RSfs

16s_C1RSfs

8u_C3RSfs

16u_C3RSfs

16s_C3RSfs

8u_AC4RSfs

16u_AC4RSfs

16s_AC4RSfs

8u_C4RSfs

16u_C4RSfs

16s_C4RSfs

Case 2: Not-in-place operation on floating-point or complex data
IppStatus ippiSub_<mod>(const Ipp<datatype>* pSrc1, int src1Step, const Ipp<datatype>*pSrc2, int src2Step, Ipp<datatype>* pDst, int dstStep, IppiSize roiSize);
Supported values for mod:32f_C1R
32f_C3R
32f_AC4R
32f_C4R

773

1Intel® Integrated Performance Primitives Developer Guide and Reference

Case 3: In-place operation on integer or complex data
IppStatus ippiSub_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>* pSrcDst,
int srcDstStep, IppiSize roiSize, int scaleFactor);
Supported values for mod:8u_C1IRSfs

16u_C1IRSfs

16s_C1IRSfs

8u_C3IRSfs

16u_C3IRSfs

16s_C3IRSfs

8u_AC4IRSfs

16u_AC4IRSfs

16s_AC4IRSfs

8u_C4IRSfs

16u_C4IRSfs

16s_C4IRSfs

Case 4: In-place operation on floating-point or complex data
IppStatus ippiSub_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>* pSrcDst,
int srcDstStep, IppiSize roiSize);
Supported values for mod:32f_C1IR
32f_C3IR
32f_AC4IR
32f_C4IR

Case 5: Not-in-place operation on integer data with platform-aware functions
IppStatus ippiSub_<mod>(const Ipp<datatype>* pSrc1, IppSizeL src1Step, const
Ipp<datatype>* pSrc2, IppSizeL src2Step, Ipp<datatype>* pDst, IppSizeL dstStep,
IppiSizeL roiSize, int scaleFactor);
Supported values for mod:8u_C1RSfs_L

16u_C1RSfs_L

16s_C1RSfs_L

8u_C3RSfs_L

16u_C3RSfs_L

16s_C3RSfs_L

8u_AC4RSfs_L

16u_AC4RSfs_L

16s_AC4RSfs_L

8u_C4RSfs_L

16u_C4RSfs_L

16s_C4RSfs_L

Case 6: Not-in-place operation on floating-point data with platform-aware functions
IppStatus ippiSub_<mod>(const Ipp<datatype>* pSrc1, IppSizeL src1Step, const
Ipp<datatype>* pSrc2, IppSizeL src2Step, Ipp<datatype>* pDst, IppSizeL dstStep,
IppiSizeL roiSize);
Supported values for mod:32f_C1R_L
32f_C3R_L
32f_C4R_L

774

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

32f_AC4R_L

Case 7: In-place operation on integer data with platform-aware functions
IppStatus ippiSub_<mod>(const Ipp<datatype>* pSrc, IppSizeL srcStep, Ipp<datatype>*pSrcDst, IppSizeL srcDstStep, IppiSizeL roiSize, int scaleFactor);
Supported values for mod:8u_C1IRSfs_L

16u_C1IRSfs_L

16s_C1IRSfs_L

8u_C3IRSfs_L

16u_C3IRSfs_L

16s_C3IRSfs_L

8u_AC4IRSfs_L

16u_AC4IRSfs_L

16s_AC4IRSfs_L

8u_C4IRSfs_L

16u_C4IRSfs_L

16s_C4IRSfs_L

Case 8: In-place operation on floating-point data with platform-aware functions
IppStatus ippiSub_<mod>(const Ipp<datatype>* pSrc1, IppSizeL src1Step, Ipp<datatype>*pDst, IppSizeL dstStep, IppiSizeL roiSize);
Supported values for mod:32f_C1IR_L
32f_C3IR_L
32f_AC4IR_L
32f_C4IR_L

Case 9: Not-in-place operation on integer data with threading layer (TL) functions
IppStatus ippiSub_<mod>(const Ipp<datatype>* pSrc1, IppSizeL src1Step, const
Ipp<datatype>* pSrc2, IppSizeL src2Step, Ipp<datatype>* pDst, IppSizeL dstStep,
IppiSizeL roiSize, int scaleFactor);
Supported values for mod:8u_C1RSfs_LT

16u_C1RSfs_LT

16s_C1RSfs_LT

8u_C3RSfs_LT

16u_C3RSfs_LT

16s_C3RSfs_LT

8u_AC4RSfs_LT

16u_AC4RSfs_LT

16s_AC4RSfs_LT

8u_C4RSfs_LT

16u_C4RSfs_LT

16s_C4RSfs_LT

Case 10: Not-in-place operation on floating-point data with TL functions
IppStatus ippiSub_<mod>(const Ipp<datatype>* pSrc1, IppSizeL src1Step, const
Ipp<datatype>* pSrc2, IppSizeL src2Step, Ipp<datatype>* pDst, IppSizeL dstStep,
IppiSizeL roiSize);
Supported values for mod:32f_C1R_LT
32f_C3R_LT

775

1

Intel® Integrated Performance Primitives Developer Guide and Reference

32f_C4R_LT
32f_AC4R_LT

Case 11: In-place operation on integer data with TL functions
IppStatus ippiSub_<mod>(const Ipp<datatype>* pSrc, IppSizeL srcStep, Ipp<datatype>*pSrcDst, IppSizeL srcDstStep, IppiSizeL roiSize, int scaleFactor);
Supported values for mod:8u_C1IRSfs_LT

16u_C1IRSfs_LT

16s_C1IRSfs_LT

8u_C3IRSfs_LT

16u_C3IRSfs_LT

16s_C3IRSfs_LT

8u_AC4IRSfs_LT

16u_AC4IRSfs_LT

16s_AC4IRSfs_LT

8u_C4IRSfs_LT

16u_C4IRSfs_LT

16s_C4IRSfs_LT

Case 12: In-place operation on floating-point data with TL functions
IppStatus ippiSub_<mod>(const Ipp<datatype>* pSrc1, IppSizeL src1Step, Ipp<datatype>*pDst, IppSizeL dstStep, IppiSizeL roiSize);
Supported values for mod:32f_C1IR_LT
32f_C3IR_LT
32f_AC4IR_LT
32f_C4IR_LT

Include Files
ippi.h
Flavors with the _LT suffix: ippi_tl.h
Flavors with the _L suffix: ippi_l.h

Domain Dependencies
Flavors declared in ippi.h:
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib
Flavors declared in ippi_tl.h:
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib, ippcore_tl.lib, ippi_tl.lib

Parameters
pSrc, pSrc1, pSrc2

Pointers to the source images ROI.

srcStep, src1Step, src2Step

Distances in bytes between starts of consecutive lines in thesource images.
Pointer to the destination image ROI.

pDst

776

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

roiSize

Distance in bytes between starts of consecutive lines in thedestination image.
Pointer to the source and destination image ROI for the inplace operation.
Distance in bytes between starts of consecutive lines in thesource and destination image for the in-place operation.
Size of the source and destination ROI in pixels.

scaleFactor

Scale factor (see Integer Result Scaling).

dstStep
pSrcDstsrcDstStep

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function subtracts pixel values of the source buffer pSrc1 from the corresponding pixel values of thebuffer pSrc2 and places the result in the destination buffer pDst. For in-place operations, the values in pSrc
are subtracted from the values in pSrcDst and the results are placed into pSrcDst. For complex data, thefunction processes both real and imaginary parts of pixel values.

NOTE
Step values must be positive for functions that operate on complex data.
In case of operations on integer data, the resulting values are scaled by scaleFactor.
Note that the functions with AC4 descriptor do not process alpha channels.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsStepErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointers is
NULL.
Indicates an error condition if roiSize has a field with zero or
negative value.
Indicates an error condition if any of the specified buffer step
values is zero or negative for functions that operate oncomplex data.

SubC
Subtracts a constant from pixel values of an image.

SyntaxCase 1: Not-in-place operation on one-channel integer or complex data
IppStatus ippiSubC_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype> value,
Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, int scaleFactor);
Supported values for mod:8u_C1RSfs

16u_C1RSfs

16s_C1RSfs

777

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Case 2: Not-in-place operation on multi-channel integer or complex data
IppStatus ippiSubC_<mod>(const Ipp<datatype>* pSrc, int srcStep, const Ipp<datatype>value[3], Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, int scaleFactor);
Supported values for mod:8u_C3RSfs

16u_C3RSfs

16s_C3RSfs

IppStatus ippiSubC_<mod>(const Ipp<datatype>* pSrc, int srcStep, const Ipp<datatype>value[4], Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, int scaleFactor);
Supported values for mod:8u_C4RSfs

16u_C4RSfs

16s_C4RSfs

IppStatus ippiSubC_<mod>(const Ipp<datatype>* pSrc, int srcStep, const Ipp<datatype>value[3], Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, int scaleFactor);
Supported values for mod:8u_AC4RSfs

16u_AC4RSfs

16s_AC4RSfs

Case 3: Not-in-place operation on one-channel floating-point or complex data
IppStatus ippiSubC_32f_C1R(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype> value,
Ipp<datatype>* pDst, int dstStep, IppiSize roiSize);

Case 4: Not-in-place operation on multi-channel floating-point or complex data
IppStatus ippiSubC_32f_C3R(const Ipp<datatype>* pSrc, int srcStep, const Ipp<datatype>value[3], Ipp<datatype>* pDst, int dstStep, IppiSize roiSize);
IppStatus ippiSubC_32f_C4R(const Ipp32f* pSrc, int srcStep, const Ipp32f value[4],Ipp32f* pDst, int dstStep, IppiSize roiSize);
IppStatus ippiSubC_<mod>(const Ipp<datatype>* pSrc, int srcStep, const Ipp<datatype>value[3], Ipp<datatype>* pDst, int dstStep, IppiSize roiSize);
Supported values for mod:32f_AC4R

Case 5: In-place operation on one-channel integer or complex data
IppStatus ippiSubC_<mod>(Ipp<datatype> value, Ipp<datatype>* pSrcDst, int srcDstStep,
IppiSize roiSize, int scaleFactor);
Supported values for mod:8u_C1IRSfs

778

16u_C1IRSfs

16s_C1IRSfs

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Case 6: In-place operation on multi-channel integer or complex data
IppStatus ippiSubC_<mod>(const Ipp<datatype> value[3], Ipp<datatype>* pSrcDst, int
srcDstStep, IppiSize roiSize, int scaleFactor);
Supported values for mod:8u_C3IRSfs

16u_C3IRSfs

16s_C3IRSfs

8u_AC4IRSfs

16u_AC4IRSfs

16s_AC4IRSfs

IppStatus ippiSubC_<mod>(const Ipp<datatype> value[4], Ipp<datatype>* pSrcDst, int
srcDstStep, IppiSize roiSize, int scaleFactor);
Supported values for mod:8u_C4IRSfs

16u_C4IRSfs

16s_C4IRSfs

Case 7: In-place operation on one-channel floating-point or complex data
IppStatus ippiSubC_32f_C1IR(Ipp<datatype> value, Ipp<datatype>* pSrcDst, int
srcDstStep, IppiSize roiSize);

Case 8: In-place operation on multi-channel floating-point or complex data:
IppStatus ippiSubC_<mod>(const Ipp<datatype> value[3], Ipp<datatype>* pSrcDst, int
srcDstStep, IppiSize roiSize);
Supported values for mod:32f_C3IR
32f_AC4IR
IppStatus ippiSubC_32f_C4IR(const Ipp32f value[4], Ipp32f* pSrcDst, int srcDstStep,
IppiSize roiSize);

Case 9: Not-in-place operation on one-channel integer data with platform-aware functions
IppStatus ippiSubC_<mod>(const Ipp<datatype>* pSrc, IppSizeL srcStep, Ipp<datatype>value, Ipp<datatype>* pDst, IppSizeL dstStep, IppiSizeL roiSize, int scaleFactor);
Supported values for mod:8u_C1RSfs_L

16u_C1RSfs_L

16s_C1RSfs_L

Case 10: Not-in-place operation on multi-channel integer data with platform-aware functions
IppStatus ippiSubC_<mod>(const Ipp<datatype>* pSrc, IppSizeL srcStep, const
Ipp<datatype> value[3], Ipp<datatype>* pDst, IppSizeL dstStep, IppiSizeL roiSize, int
scaleFactor);
Supported values for mod:8u_C3RSfs_L

16u_C3RSfs_L

16s_C3RSfs_L

8u_AC4RSfs_L

16u_AC4RSfs_L

16s_AC4RSfs_L

779

1

Intel® Integrated Performance Primitives Developer Guide and Reference

IppStatus ippiSubC_<mod>(const Ipp<datatype>* pSrc, IppSizeL srcStep, const
Ipp<datatype> value[4], Ipp<datatype>* pDst, IppSizeL dstStep, IppiSizeL roiSize, int
scaleFactor);
Supported values for mod:8u_C4RSfs_L

16u_C4RSfs_L

16s_C4RSfs_L

Case 11: Not-in-place operation on one-channel floating point data with platform-aware functions
IppStatus ippiSubC_32f_C1R_L(const Ipp32f* pSrc, IppSizeL srcStep, Ipp32f value,
Ipp32f* pDst, IppSizeL dstStep, IppiSizeL roiSize);

Case 12: Not-in-place operation on multi-channel floating point data with platform-aware functions
IppStatus ippiSubC_<mod>(const Ipp32f* pSrc, IppSizeL srcStep, const Ipp32f value[3],Ipp32f* pDst, IppSizeL dstStep, IppiSizeL roiSize);
Supported values for mod:32f_C3R_L
32f_AC4R_L
IppStatus ippiSubC_32f_C4R_L(const Ipp32f* pSrc, IppSizeL srcStep, const Ipp32f
value[4], Ipp32f* pDst, IppSizeL dstStep, IppiSizeL roiSize);

Case 13: In-place operation on one-channel integer data with platform-aware functions
IppStatus ippiSubC_<mod>(Ipp<datatype> value, Ipp<datatype>* pSrcDst, IppSizeL
srcDstStep, IppiSizeL roiSize, int scaleFactor);
Supported values for mod:8u_C1IRSfs_L

16u_C1IRSfs_L

16s_C1IRSfs_L

Case 14: In-place operation on multi-channel integer data with platform-aware functions
IppStatus ippiSubC_<mod>(const Ipp<datatype> value[3], Ipp<datatype>* pSrcDst, IppSizeL
srcDstStep, IppiSizeL roiSize, int scaleFactor);
Supported values for mod:8u_C3IRSfs_L

16u_C3IRSfs_L

16s_C3IRSfs_L

8u_AC4IRSfs_L

16u_AC4IRSfs_L

16s_AC4IRSfs_L

IppStatus ippiSubC_<mod>(const Ipp<datatype> value[4], Ipp<datatype>* pSrcDst, IppSizeL
srcDstStep, IppiSizeL roiSize, int scaleFactor);
Supported values for mod:8u_C4IRSfs_L

16u_C4IRSfs_L

16s_C4IRSfs_L

Case 15: In-place operation on one-channel floating point data with platform-aware functions
IppStatus ippiSubC_32f_C1IR_L(Ipp32f value, Ipp32f* pSrcDst, IppSizeL srcDstStep,
IppiSizeL roiSize);

780

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Case 16: In-place operation on multi-channel integer data with platform-aware functions
IppStatus ippiSubC_<mod>(const Ipp32f value[3], Ipp32f* pSrcDst, IppSizeL srcDstStep,
IppiSizeL roiSize);
Supported values for mod:32f_C3IR_L
32f_AC4IR_L
IppStatus ippiSubC_32f_C4IR_L(const Ipp32f value[4], Ipp32f* pSrcDst, IppSizeL
srcDstStep, IppiSizeL roiSize);

Case 17: Not-in-place operation on one-channel integer data with threading layer (TL) functions
IppStatus ippiSubC_<mod>(const Ipp<datatype>* pSrc, IppSizeL srcStep, Ipp<datatype>value, Ipp<datatype>* pDst, IppSizeL dstStep, IppiSizeL roiSize, int scaleFactor);
Supported values for mod:8u_C1RSfs_LT

16u_C1RSfs_LT

16s_C1RSfs_LT

Case 18: Not-in-place operation on multi-channel integer data with TL functions
IppStatus ippiSubC_<mod>(const Ipp<datatype>* pSrc, IppSizeL srcStep, const
Ipp<datatype> value[3], Ipp<datatype>* pDst, IppSizeL dstStep, IppiSizeL roiSize, int
scaleFactor);
Supported values for mod:8u_C3RSfs_LT

16u_C3RSfs_LT

16s_C3RSfs_LT

8u_AC4RSfs_LT

16u_AC4RSfs_LT

16s_AC4RSfs_LT

IppStatus ippiSubC_<mod>(const Ipp<datatype>* pSrc, IppSizeL srcStep, const
Ipp<datatype> value[4], Ipp<datatype>* pDst, IppSizeL dstStep, IppiSizeL roiSize, int
scaleFactor);
Supported values for mod:8u_C4RSfs_LT

16u_C4RSfs_LT

16s_C4RSfs_LT

Case 19: Not-in-place operation on one-channel floating point data with TL functions
IppStatus ippiSubC_32f_C1R_LT(const Ipp32f* pSrc, IppSizeL srcStep, Ipp32f value,
Ipp32f* pDst, IppSizeL dstStep, IppiSizeL roiSize);

Case 20: Not-in-place operation on multi-channel floating point data with TL functions
IppStatus ippiSubC_<mod>(const Ipp32f* pSrc, IppSizeL srcStep, const Ipp32f value[3],Ipp32f* pDst, IppSizeL dstStep, IppiSizeL roiSize);
Supported values for mod:32f_C3R_LT
32f_AC4R_LT

781

1

Intel® Integrated Performance Primitives Developer Guide and Reference

IppStatus ippiSubC_32f_C4R_LT(const Ipp32f* pSrc, IppSizeL srcStep, const Ipp32f
value[4], Ipp32f* pDst, IppSizeL dstStep, IppiSizeL roiSize);

Case 21: In-place operation on one-channel integer data with TL functions
IppStatus ippiSubC_<mod>(Ipp<datatype> value, Ipp<datatype>* pSrcDst, IppSizeL
srcDstStep, IppiSizeL roiSize, int scaleFactor);
Supported values for mod:8u_C1IRSfs_LT

16u_C1IRSfs_LT

16s_C1IRSfs_LT

Case 22: In-place operation on multi-channel integer data with TL functions
IppStatus ippiSubC_<mod>(const Ipp<datatype> value[3], Ipp<datatype>* pSrcDst, IppSizeL
srcDstStep, IppiSizeL roiSize, int scaleFactor);
Supported values for mod:8u_C3IRSfs_LT

16u_C3IRSfs_LT

16s_C3IRSfs_LT

8u_AC4IRSfs_LT

16u_AC4IRSfs_LT

16s_AC4IRSfs_LT

IppStatus ippiSubC_<mod>(const Ipp<datatype> value[4], Ipp<datatype>* pSrcDst, IppSizeL
srcDstStep, IppiSizeL roiSize, int scaleFactor);
Supported values for mod:8u_C4IRSfs_LT

16u_C4IRSfs_LT

16s_C4IRSfs_LT

Case 23: In-place operation on one-channel floating point data with TL functions
IppStatus ippiSubC_32f_C1IR_LT(Ipp32f value, Ipp32f* pSrcDst, IppSizeL srcDstStep,
IppiSizeL roiSize);

Case 24: In-place operation on multi-channel integer data with TL functions
IppStatus ippiSubC_<mod>(const Ipp32f value[3], Ipp32f* pSrcDst, IppSizeL srcDstStep,
IppiSizeL roiSize);
Supported values for mod:32f_C3IR_LT
32f_AC4IR_LT
IppStatus ippiSubC_32f_C4IR_LT(const Ipp32f value[4], Ipp32f* pSrcDst, IppSizeL
srcDstStep, IppiSizeL roiSize);

Include Files
ippi.h
Flavors with the _LT suffix: ippi_tl.h
Flavors with the _L suffix: ippi_l.h

Domain Dependencies
Flavors declared in ippi.h:
Headers: ippcore.h, ippvm.h, ipps.h

782

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Libraries: ippcore.lib, ippvm.lib, ipps.lib
Flavors declared in ippi_tl.h:
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib, ippcore_tl.lib, ippi_tl.lib

Parameters
Pointer to the source image ROI.

pSrc
srcStep
value

pDst
dstStep

Distance in bytes between starts of consecutive lines in thesource image.
The constant value to subtract from each pixel value in asource image (constant vector in case of multi-channel
images).
Pointer to the destination image ROI.
Distance in bytes between starts of consecutive lines in thedestination image.

roiSize

Pointer to the source and destination image ROI for the inplace operation.
Distance in bytes between starts of consecutive lines in thesource and destination image for the in-place operation.
Size of the source and destination ROI in pixels.

scaleFactor

Scale factor (see Integer Result Scaling).

pSrcDstsrcDstStep

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function changes image intensity by subtracting the constant value from pixel values of an image
buffer. For multi-channel images, the components of a constant vector value are subtracted from pixel
channel values. For complex data, the function processes both real and imaginary parts of pixel values.

NOTE
Step values must be positive for functions that operate on complex data.
In case of operations on integer data, the resulting values are scaled by scaleFactor.
Note that the functions with the AC4 descriptor do not process alpha channels.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsStepErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointers is
NULL.
Indicates an error condition if roiSize has a field with zero or
negative value.
Indicates an error condition if any of the specified buffer step
values is zero or negative for functions that operate oncomplex data.

783

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Div
Divides pixel values of an image by pixel values ofanother image.

SyntaxCase 1: Not-in-place operation on integer or complex data
IppStatus ippiDiv_<mod>(const Ipp<datatype>* pSrc1, int src1Step, const Ipp<datatype>*pSrc2, int src2Step, Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, int
scaleFactor);
Supported values for mod:8u_C1RSfs

16u_C1RSfs

16s_C1RSfs

8u_C3RSfs

16u_C3RSfs

16s_C3RSfs

8u_AC4RSfs

16u_AC4RSfs

16s_AC4RSfs

8u_C4RSfs

16u_C4RSfs

16s_C4RSfs

Case 2: Not-in-place operation on floating-point or complex data
IppStatus ippiDiv_<mod>(const Ipp<datatype>* pSrc1, int src1Step, const Ipp<datatype>*pSrc2, int src2Step, Ipp<datatype>* pDst, int dstStep, IppiSize roiSize);
Supported values for mod:32f_C1R
32f_C3R
32f_AC4R
32f_C4R

Case 3: In-place operation on integer or complex data
IppStatus ippiDiv_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>* pSrcDst,
int srcDstStep, IppiSize roiSize, int scaleFactor);
Supported values for mod:8u_C1IRSfs

16u_C1IRSfs

16s_C1IRSfs

8u_C3IRSfs

16u_C3IRSfs

16s_C3IRSfs

8u_AC4IRSfs

16u_AC4IRSfs

16s_AC4IRSfs

8u_C4IRSfs

16u_C4IRSfs

16s_C4IRSfs

Case 4: In-place operation on floating-point or complex data
IppStatus ippiDiv_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>* pSrcDst,
int srcDstStep, IppiSize roiSize);
Supported values for mod:32f_C1IR784

1Developer Guide and Reference for Intel® Integrated Performance Primitives

32f_C3IR
32f_AC4IR
32f_C4IR

Case 5: Not-in-place operation on integer data with platform-aware functions
IppStatus ippiDiv_<mod>(const Ipp<datatype>* pSrc1, IppSizeL src1Step, const
Ipp<datatype>* pSrc2, IppSizeL src2Step, Ipp<datatype>* pDst, IppSizeL dstStep,
IppiSizeL roiSize, int scaleFactor);
Supported values for mod:8u_C1RSfs_L

16u_C1RSfs_L

16s_C1RSfs_L

8u_C3RSfs_L

16u_C3RSfs_L

16s_C3RSfs_L

8u_AC4RSfs_L

16u_AC4RSfs_L

16s_AC4RSfs_L

8u_C4RSfs_L

16u_C4RSfs_L

16s_C4RSfs_L

Case 6: Not-in-place operation on floating-point data with platform-aware functions
IppStatus ippiDiv_<mod>(const Ipp<datatype>* pSrc1, IppSizeL src1Step, const
Ipp<datatype>* pSrc2, IppSizeL src2Step, Ipp<datatype>* pDst, IppSizeL dstStep,
IppiSizeL roiSize);
Supported values for mod:32f_C1R_L
32f_C3R_L
32f_AC4R_L
32f_C4R_L

Case 7: In-place operation on integer data with platform-aware functions
IppStatus ippiDiv_<mod>(const Ipp<datatype>* pSrc, IppSizeL srcStep, Ipp<datatype>*pSrcDst, IppSizeL srcDstStep, IppiSizeL roiSize, int scaleFactor);
Supported values for mod:8u_C1IRSfs_L

16u_C1IRSfs_L

16s_C1IRSfs_L

8u_C3IRSfs_L

16u_C3IRSfs_L

16s_C3IRSfs_L

8u_AC4IRSfs_L

16u_AC4IRSfs_L

16s_AC4IRSfs_L

8u_C4IRSfs_L

16u_C4IRSfs_L

16s_C4IRSfs_L

785

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Case 8: In-place operation on floating-point data with platform-aware functions
IppStatus ippiDiv_<mod>(const Ipp<datatype>* pSrc, IppSizeL srcStep, Ipp<datatype>*pSrcDst, IppSizeL srcDstStep, IppiSizeL roiSize);
Supported values for mod:32f_C1IR_L
32f_C3IR_L
32f_AC4IR_L
32f_C4IR_L

Case 9: Not-in-place operation on integer data with threading layer (TL) functions
IppStatus ippiDiv_<mod>(const Ipp<datatype>* pSrc1, IppSizeL src1Step, const
Ipp<datatype>* pSrc2, IppSizeL src2Step, Ipp<datatype>* pDst, IppSizeL dstStep,
IppiSizeL roiSize, int scaleFactor);
Supported values for mod:8u_C1RSfs_LT

16u_C1RSfs_LT

16s_C1RSfs_LT

8u_C3RSfs_LT

16u_C3RSfs_LT

16s_C3RSfs_LT

8u_AC4RSfs_LT

16u_AC4RSfs_LT

16s_AC4RSfs_LT

8u_C4RSfs_LT

16u_C4RSfs_LT

16s_C4RSfs_LT

Case 10: Not-in-place operation on floating-point data with TL functions
IppStatus ippiDiv_<mod>(const Ipp<datatype>* pSrc1, IppSizeL src1Step, const
Ipp<datatype>* pSrc2, IppSizeL src2Step, Ipp<datatype>* pDst, IppSizeL dstStep,
IppiSizeL roiSize);
Supported values for mod:32f_C1R_LT
32f_C3R_LT
32f_C4R_LT
32f_AC4R_LT

Case 11: In-place operation on integer data with TL functions
IppStatus ippiDiv_<mod>(const Ipp<datatype>* pSrc, IppSizeL srcStep, Ipp<datatype>*pSrcDst, IppSizeL srcDstStep, IppiSizeL roiSize, int scaleFactor);
Supported values for mod:8u_C1IRSfs_LT

16u_C1IRSfs_LT

16s_C1IRSfs_LT

8u_C3IRSfs_LT

16u_C3IRSfs_LT

16s_C3IRSfs_LT

8u_AC4IRSfs_LT

16u_AC4IRSfs_LT

16s_AC4IRSfs_LT

786

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

8u_C4IRSfs_LT

16u_C4IRSfs_LT

16s_C4IRSfs_LT

Case 12: In-place operation on floating-point data with TL functions
IppStatus ippiDiv_<mod>(const Ipp<datatype>* pSrc, IppSizeL srcStep, Ipp<datatype>*pSrcDst, IppSizeL srcDstStep, IppiSizeL roiSize);
Supported values for mod:32f_C1IR_LT
32f_C3IR_LT
32f_AC4IR_LT
32f_C4IR_LT

Include Files
ippi.h
Flavors with the _LT suffix: ippi_tl.h
Flavors with the _L suffix: ippi_l.h

Domain Dependencies
Flavors declared in ippi.h:
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib
Flavors declared in ippi_tl.h:
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib, ippcore_tl.lib, ippi_tl.lib

Parameters
pSrc, pSrc1, pSrc2

Pointers to the source images ROI.

srcStep, src1Step, src2Step

Distances in bytes between starts of consecutive lines in thesource images.
Pointer to the destination image ROI.

pDst

roiSize

Distance in bytes between starts of consecutive lines in thedestination image.
Pointer to the source and destination image ROI for the inplace operation.
Distance in bytes between starts of consecutive lines in thesource and destination image for the in-place operation.
Size of the source and destination ROI in pixels.

scaleFactor

Scale factor (see Integer Result Scaling).

dstStep
pSrcDstsrcDstStep

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function divides pixel values of the source buffer pSrc2 by the corresponding pixel values of the buffer
pSrc1 and places the result in a destination buffer pDst. For in-place operations, the values in pSrcDst are
divided by the values in pSrc and placed into pSrcDst. For complex data, the function processes both real

787

1

Intel® Integrated Performance Primitives Developer Guide and Reference

and imaginary parts of pixel values. In case of operations on integer data, the resulting values are scaled byscaleFactor and rounded (not truncated). When the function encounters a zero divisor value, the execution
is not interrupted. The function returns the warning message and corresponding result value (see appendix“Handling of Special Cases” for more information).
Note that the functions with the AC4 descriptor do not process alpha channels.

Return Values
Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointers is
NULL.

ippStsNoErr
ippStsNullPtrErr

Indicates an error condition if roiSize has a field with zero or
negative value.
Indicates an error condition if any of the specified buffer step
values is zero or negative.
Indicates a warning that a divisor value is zero. The function
execution is continued.

ippStsSizeErr
ippStsStepErr
ippStsDivByZero

ExampleThe code example below illustrates how the function ippiDiv can be used.

IppStatus div32f( void ) {Ipp32f a[4*3], b[4*3];
IppiSize roi = {2,2};
int i;
for( i=0; i<4*3; ++i ) a[i] = b[i] = (float)i;
return ippiDiv_32f_C1IR( a, 4*sizeof(Ipp32f), b,
4*sizeof(Ipp32f), roi );}The destination image b contains-1.#IND+1.000+2.000+3.000+1.000+1.000+6.000+7.000+8.000+9.000+10.00+11.00Console output:-- warning in div32f:(6) Zero value(s) of divisor in the function Div

Div_Round
Divides pixel values of an image by pixel values ofanother image with different rounding modes.

788

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

SyntaxCase 1: Not-in-place operation on integer data
IppStatus ippiDiv_Round_<mod>(const Ipp<datatype>* pSrc1, int src1Step, const
Ipp<datatype>* pSrc2, int src2Step, Ipp<datatype>* pDst, int dstStep, IppiSize roiSize,
IppRoundMode rndMode, int scaleFactor);
Supported values for mod:8u_C1RSfs

16u_C1RSfs

16s_C1RSfs

8u_C3RSfs

16u_C3RSfs

16s_C3RSfs

8u_AC4RSfs

16u_AC4RSfs

16s_AC4RSfs

8u_C4RSfs

16u_C4RSfs

16s_C4RSfs

Case 2: In-place operation on integer data
IppStatus ippiDiv_Round_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>*pSrcDst, int srcDstStep, IppiSize roiSize, IppRoundMode rndMode, int scaleFactor);
Supported values for mod:8u_C1IRSfs

16u_C1IRSfs

16s_C1IRSfs

8u_C3IRSfs

16u_C3IRSfs

16s_C3IRSfs

8u_AC4IRSfs

16u_AC4IRSfs

16s_AC4IRSfs

8u_C4IRSfs

16u_C4IRSfs

16s_C4IRSfs

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc, pSrc1, pSrc2

Pointers to the source images ROI.

srcStep, src1Step, src2Step

Distances in bytes between starts of consecutive lines in the source
images.

pDst

Pointer to the destination image ROI.

dstStep

Distance in bytes between starts of consecutive lines in the destination
image.

pSrcDstPointer to the source and destination image ROI for the in-place
operation.

srcDstStep

Distance in bytes between starts of consecutive lines in the source anddestination image for the in-place operation.

789

1

Intel® Integrated Performance Primitives Developer Guide and Reference

roiSize

Size of the source and destination ROI in pixels.

roundModeRounding mode, the following values are possible:

ippRndZero
ippRndNear

ippRndFinancial

scaleFactor

specifies that floating-point values aretruncated toward zero,
specifies that floating-point values arerounded to the nearest even integer
when the fractional part equals 0.5;
otherwise they are rounded to thenearest integer,
specifies that floating-point values arerounded 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 or greaterthan 0.5.

Scale factor (see Integer Result Scaling).

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function divides pixel values of the source buffer pSrc2 by the corresponding pixel values of the buffer
pSrc1 and places the result in a destination buffer pDst. For in-place operations, the values in pSrcDst are
divided by the values in pSrc and placed into pSrcDst. The resulting values are scaled by scaleFactor androunded using the rounding method specified by the parameter roundMode. When the function encounters azero divisor value, the execution is not interrupted. The function returns the warning message andcorresponding result value (see appendix “Handling of Special Cases” for more information).
Note that the functions with the AC4 descriptor do not process alpha channelss.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error or a warning.

ippStsNullPtrErr

Indicates an error condition if one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error condition if roiSize has a field with zero or
negative value.

ippStsStepErr

Indicates an error condition if any of the specified buffer step values iszero or negative.

ippStsDivByZero

Indicates a warning that a divisor value is zero. The function execution
is continued.

ippStsStsRoundModeNotSupported Indicates an error condition if the roundMode has an illegal value.
Err

DivC
Divides pixel values of an image by a constant.

790

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

SyntaxCase 1: Not-in-place operation on one-channel integer or complex data
IppStatus ippiDivC_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype> value,
Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, int scaleFactor);
Supported values for mod:8u_C1RSfs

16u_C1RSfs

16s_C1RSfs

Case 2: Not-in-place operation on multi-channel integer or complex data
IppStatus ippiDivC_<mod>(const Ipp<datatype>* pSrc, int srcStep, const Ipp<datatype>value[3], Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, int scaleFactor);
Supported values for mod:8u_C3RSfs

16u_C3RSfs

16s_C3RSfs

16s_AC4RSfs

IppStatus ippiDivC_<mod>(const Ipp<datatype>* pSrc, int srcStep, const Ipp<datatype>value[4], Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, int scaleFactor);
Supported values for mod:8u_C4RSfs 16u_C4RSfs 16s_C4RSfs
IppStatus ippiDivC_<mod>(const Ipp<datatype>* pSrc, int srcStep, const Ipp<datatype>value[3], Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, int scaleFactor);
Supported values for mod:8u_AC4RSfs

16u_AC4RSfs

Case 3: Not-in-place operation on one-channel floating-point or complex data
IppStatus ippiDivC_32f_C1R(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype> value,
Ipp<datatype>* pDst, int dstStep, IppiSize roiSize);

Case 4: Not-in-place operation on multi-channel floating-point or complex data
IppStatus ippiDivC_32f_C3R(const Ipp<datatype>* pSrc, int srcStep, const Ipp<datatype>value[3], Ipp<datatype>* pDst, int dstStep, IppiSize roiSize);
IppStatus ippiDivC_32f_C4R(const Ipp32f* pSrc, int srcStep, const Ipp32f value[4],Ipp32f* pDst, int dstStep, IppiSize roiSize);
IppStatus ippiDivC_<mod>(const Ipp<datatype>* pSrc, int srcStep, const Ipp<datatype>value[3], Ipp<datatype>* pDst, int dstStep, IppiSize roiSize);
Supported values for mod:32f_AC4R
IppStatus ippiDivC_32f_C4R(const Ipp32f* pSrc, int srcStep, const Ipp32f value[4],Ipp32f* pDst, int dstStep, IppiSize roiSize);

791

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Case 5: In-place operation on one-channel integer or complex data
IppStatus ippiDivC_<mod>(Ipp<datatype> value, Ipp<datatype>* pSrcDst, int srcDstStep,
IppiSize roiSize, int scaleFactor);
Supported values for mod:8u_C1IRSfs

16u_C1IRSfs

16s_C1IRSfs

Case 6: In-place operation on multi-channel integer or complex data
IppStatus ippiDivC_<mod>(const Ipp<datatype> value[3], Ipp<datatype>* pSrcDst, int
srcDstStep, IppiSize roiSize, int scaleFactor);
Supported values for mod:8u_C3IRSfs

16u_C3IRSfs

16s_C3IRSfs

8u_AC4IRSfs

16u_AC4IRSfs

16s_AC4IRSfs

IppStatus ippiDivC_<mod>(const Ipp<datatype> value[4], Ipp<datatype>* pSrcDst, int
srcDstStep, IppiSize roiSize, int scaleFactor);
Supported values for mod:8u_C4IRSfs 16u_C4IRSfs 16s_C4IRSfs

Case 7: In-place operation on one-channel floating-point or complex data
IppStatus ippiDivC_<mod>(Ipp<datatype> value, Ipp<datatype>* pSrcDst, int srcDstStep,
IppiSize roiSize);
Supported values for mod:32f_C1IR

Case 8: In-place operation on multi-channel floating-point or complex data
IppStatus ippiDivC_<mod>(const Ipp<datatype> value[3], Ipp<datatype>* pSrcDst, int
srcDstStep, IppiSize roiSize);
Supported values for mod:32f_C3IR
32f_AC4IR
IppStatus ippiDivC_32f_C4IR(const Ipp32f value[4], Ipp32f* pSrcDst, int srcDstStep,
IppiSize roiSize);

Case 9: Not-in-place operation on one-channel integer data with platform-aware functions
IppStatus ippiDivC_<mod>(const Ipp<datatype>* pSrc, IppSizeL srcStep, Ipp<datatype>value, Ipp<datatype>* pDst, IppSizeL dstStep, IppiSizeL roiSize, int scaleFactor);
Supported values for mod:8u_C1RSfs_L

792

16u_C1RSfs_L

16s_C1RSfs_L

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Case 10: Not-in-place operation on multi-channel integer data with platform-aware functions
IppStatus ippiDivC_<mod>(const Ipp<datatype>* pSrc, IppSizeL srcStep, const
Ipp<datatype> value[3], Ipp<datatype>* pDst, IppSizeL dstStep, IppiSizeL roiSize, int
scaleFactor);
Supported values for mod:8u_C3RSfs_L

16u_C3RSfs_L

16s_C3RSfs_L

8u_AC4RSfs_L

16u_AC4RSfs_L

16s_AC4RSfs_L

IppStatus ippiDivC_<mod>(const Ipp<datatype>* pSrc, IppSizeL srcStep, const
Ipp<datatype> value[4], Ipp<datatype>* pDst, IppSizeL dstStep, IppiSizeL roiSize, int
scaleFactor);
Supported values for mod:8u_C4RSfs_L

16u_C4RSfs_L

16s_C4RSfs_L

Case 11: Not-in-place operation on one-channel floating point data with platform-aware functions
IppStatus ippiDivC_32f_C1R_L(const Ipp32f* pSrc, IppSizeL srcStep, Ipp32f value,
Ipp32f* pDst, IppSizeL dstStep, IppiSizeL roiSize);

Case 12: Not-in-place operation on multi-channel floating point data with platform-aware functions
IppStatus ippiDivC_<mod>(const Ipp32f* pSrc, IppSizeL srcStep, const Ipp32f value[3],Ipp32f* pDst, IppSizeL dstStep, IppiSizeL roiSize);
Supported values for mod:32f_C3R_L
32f_AC4R_L
IppStatus ippiDivC_32f_C4R_L(const Ipp32f* pSrc, IppSizeL srcStep, const Ipp32f
value[4], Ipp32f* pDst, IppSizeL dstStep, IppiSizeL roiSize);

Case 13: In-place operation on one-channel integer data with platform-aware functions
IppStatus ippiDivC_<mod>(Ipp<datatype> value, Ipp<datatype>* pSrcDst, IppSizeL
srcDstStep, IppiSizeL roiSize, int scaleFactor);
Supported values for mod:8u_C1IRSfs_L

16u_C1IRSfs_L

16s_C1IRSfs_L

Case 14: In-place operation on multi-channel integer data with platform-aware functions
IppStatus ippiDivC_<mod>(const Ipp<datatype> value[3], Ipp<datatype>* pSrcDst, IppSizeL
srcDstStep, IppiSizeL roiSize, int scaleFactor);
Supported values for mod:8u_C3IRSfs_L

16u_C3IRSfs_L

16s_C3IRSfs_L

8u_AC4IRSfs_L

16u_AC4IRSfs_L

16s_AC4IRSfs_L

793

1

Intel® Integrated Performance Primitives Developer Guide and Reference

IppStatus ippiDivC_<mod>(const Ipp<datatype> value[4], Ipp<datatype>* pSrcDst, IppSizeL
srcDstStep, IppiSizeL roiSize, int scaleFactor);
Supported values for mod:8u_C4IRSfs_L

16u_C4IRSfs_L

16s_C4IRSfs_L

Case 15: In-place operation on one-channel floating point data with platform-aware functions
IppStatus ippiDivC_32f_C1IR_L(Ipp32f value, Ipp32f* pSrcDst, IppSizeL srcDstStep,
IppiSizeL roiSize);

Case 16: In-place operation on multi-channel integer data with platform-aware functions
IppStatus ippiDivC_<mod>(const Ipp32f value[3], Ipp32f* pSrcDst, IppSizeL srcDstStep,
IppiSizeL roiSize);
Supported values for mod:32f_C3IR_L
32f_AC4IR_L
IppStatus ippiDivC_32f_C4IR_L(const Ipp32f value[4], Ipp32f* pSrcDst, IppSizeL
srcDstStep, IppiSizeL roiSize);

Case 17: Not-in-place operation on one-channel integer data with threading layer (TL) functions
IppStatus ippiDivC_<mod>(const Ipp<datatype>* pSrc, IppSizeL srcStep, Ipp<datatype>value, Ipp<datatype>* pDst, IppSizeL dstStep, IppiSizeL roiSize, int scaleFactor);
Supported values for mod:8u_C1RSfs_LT

16u_C1RSfs_LT

16s_C1RSfs_LT

Case 18: Not-in-place operation on multi-channel integer data with TL functions
IppStatus ippiDivC_<mod>(const Ipp<datatype>* pSrc, IppSizeL srcStep, const
Ipp<datatype> value[3], Ipp<datatype>* pDst, IppSizeL dstStep, IppiSizeL roiSize, int
scaleFactor);
Supported values for mod:8u_C3RSfs_LT

16u_C3RSfs_LT

16s_C3RSfs_LT

8u_AC4RSfs_LT

16u_AC4RSfs_LT

16s_AC4RSfs_LT

IppStatus ippiDivC_<mod>(const Ipp<datatype>* pSrc, IppSizeL srcStep, const
Ipp<datatype> value[4], Ipp<datatype>* pDst, IppSizeL dstStep, IppiSizeL roiSize, int
scaleFactor);
Supported values for mod:8u_C4RSfs_LT

16u_C4RSfs_LT

16s_C4RSfs_LT

Case 19: Not-in-place operation on one-channel floating point data with TL functions
IppStatus ippiDivC_32f_C1R_LT(const Ipp32f* pSrc, IppSizeL srcStep, Ipp32f value,
Ipp32f* pDst, IppSizeL dstStep, IppiSizeL roiSize);794

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Case 20: Not-in-place operation on multi-channel floating point data with TL functions
IppStatus ippiDivC_<mod>(const Ipp32f* pSrc, IppSizeL srcStep, const Ipp32f value[3],Ipp32f* pDst, IppSizeL dstStep, IppiSizeL roiSize);
Supported values for mod:32f_C3R_LT
32f_AC4R_LT
IppStatus ippiDivC_32f_C4R_LT(const Ipp32f* pSrc, IppSizeL srcStep, const Ipp32f
value[4], Ipp32f* pDst, IppSizeL dstStep, IppiSizeL roiSize);

Case 21: In-place operation on one-channel integer data with TL functions
IppStatus ippiDivC_<mod>(Ipp<datatype> value, Ipp<datatype>* pSrcDst, IppSizeL
srcDstStep, IppiSizeL roiSize, int scaleFactor);
Supported values for mod:8u_C1IRSfs_LT

16u_C1IRSfs_LT

16s_C1IRSfs_LT

Case 22: In-place operation on multi-channel integer data with TL functions
IppStatus ippiDivC_<mod>(const Ipp<datatype> value[3], Ipp<datatype>* pSrcDst, IppSizeL
srcDstStep, IppiSizeL roiSize, int scaleFactor);
Supported values for mod:8u_C3IRSfs_LT

16u_C3IRSfs_LT

16s_C3IRSfs_LT

8u_AC4IRSfs_LT

16u_AC4IRSfs_LT

16s_AC4IRSfs_LT

IppStatus ippiDivC_<mod>(const Ipp<datatype> value[4], Ipp<datatype>* pSrcDst, IppSizeL
srcDstStep, IppiSizeL roiSize, int scaleFactor);
Supported values for mod:8u_C4IRSfs_LT

16u_C4IRSfs_LT

16s_C4IRSfs_LT

Case 23: In-place operation on one-channel floating point data with TL functions
IppStatus ippiDivC_32f_C1IR_LT(Ipp32f value, Ipp32f* pSrcDst, IppSizeL srcDstStep,
IppiSizeL roiSize);

Case 24: In-place operation on multi-channel integer data with TL functions
IppStatus ippiDivC_<mod>(const Ipp32f value[3], Ipp32f* pSrcDst, IppSizeL srcDstStep,
IppiSizeL roiSize);
Supported values for mod:32f_C3IR_LT
32f_AC4IR_LT
IppStatus ippiDivC_32f_C4IR_LT(const Ipp32f value[4], Ipp32f* pSrcDst, IppSizeL
srcDstStep, IppiSizeL roiSize);

795

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Include Files
ippi.h
Flavors with the _LT suffix: ippi_tl.h
Flavors with the _L suffix: ippi_l.h

Domain Dependencies
Flavors declared in ippi.h:
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib
Flavors declared in ippi_tl.h:
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib, ippcore_tl.lib, ippi_tl.lib

Parameters
pSrc
srcStep
value
pDst

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
The constant value to divide each pixel value in a source buffer(constant vector in case of 3- or four-channel images).
Pointer to the destination image ROI.

roiSize

Distance in bytes between starts of consecutive lines in thedestination image.
Pointer to the source and destination image ROI for the inplace operation.
Distance in bytes between starts of consecutive lines in thesource and destination image for the in-place operation.
Size of the source and destination ROI in pixels.

scaleFactor

Scale factor (see InInteger Result Scaling).

dstStep
pSrcDstsrcDstStep

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function changes image intensity by dividing pixel values of an image buffer by the constant value. For
multi-channel images, pixel channel values are divided by the components of a constant vector value. For
complex data, the function processes both real and imaginary parts of pixel values. In case of operations on
integer data, the resulting values are scaled by scaleFactor and rounded (not truncated).
When the divisor value is zero, the function execution is aborted and the ippStsDivByZeroErr error status
is set. Note that in the alpha channel case (AC4), the alpha channels are not processed.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

796

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointers is
NULL.
Indicates an error condition if roiSize has a field with zero or
negative value.

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

ippStsStepErr

Indicates an error condition if srcStep, dstStep, orsrcDstStep
has a zero or negative value.

ippStsDivByZeroErr

Indicates an error condition if the divisor value is zero.

Abs
Computes absolute pixel values of a source image andplaces them into the destination image.

Case 1: Not-in-place operation
IppStatus ippiAbs_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>* pDst,
int dstStep, IppiSize roiSize);
Supported values for mod:16s_C1R

32f_C1R

16s_C3R

32f_C3R

16s_C4R

32f_C4R
32f_AC4R

IppStatus ippiAbs_16s_AC4R(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>* pDst,
int dstStep, IppiSize roiSize);

Case 2: In-place operation
IppStatus ippiAbs_<mod>(Ipp<datatype>* pSrcDst, int srcDstStep, IppiSize roiSize);
Supported values for mod:16s_C1IR

32f_C1IR

16s_C3IR

32f_C3IR

16s_C4IR

32f_C4IR

16s_AC4IR

32f_AC4IR

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc
srcStep
pDst

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the destination image ROI.

797

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Distance in bytes between starts of consecutive lines in thedestination image.
Pointer to the source and destination image ROI for the inplace operation.
Distance in bytes between starts of consecutive lines in thesource and destination image for the in-place operation.
Size of the source and destination ROI in pixels.

dstStep
pSrcDstsrcDstStep
roiSize

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function takes the absolute value of each channel in each pixel of the source image ROI and places theresult into a destination image ROI. It operates on signed data only. Note that the functions with the AC4
descriptor do not process alpha channels.

Return Values
Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointers is
NULL.

ippStsNoErr
ippStsNullPtrErr

Indicates an error condition if roiSize has a field with zero or
negative value.

ippStsSizeErr

AbsDiff
Calculates absolute difference between two images.

SyntaxIppStatus ippiAbsDiff_<mod>(const Ipp<datatype>* pSrc1, int src1Step, const
Ipp<datatype>* pSrc2, int src2Step, Ipp<datatype>* pDst, int dstStep, IppiSize
roiSize);
Supported values for mod:8u_C1R

16u_C1R

32f_C1R

8u_C3R

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc1

Pointer to the first source image.

src1Step

Distance in bytes between starts of consecutive lines in the firstsource image.

798

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Pointer to second source image.

pSrc2

Distance in bytes between starts of consecutive lines in thesecond source image.
Pointer to the destination image.

src2Step
pDst

Distance in bytes between starts of consecutive lines in thedestination image.
Size of the image ROI in pixels.

dstStep
roiSize

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function calculates the absolute pixel-wise difference between two images by the formula:pDst(x,y) = abs(pSrc1(x,y) - pSrc2(x,y)).

Return Values
Indicates no error.

ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsStepErr
ippStsNotEvenStepErr

Indicates an error condition if one of the specified pointers is

NULL.

Indicates an error condition if roiSize has a field with zero or
negative value.
Indicates an error when src1Step, src2Step or dstStep is lessthan roiSize.width * <pixelSize>.
Indicates an error condition if one of step values for floatingpoint images cannot be divided by 4.

AbsDiffC
Calculates absolute difference between image andscalar value.

SyntaxIppStatus ippiAbsDiffC_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>*pDst, int dstStep, IppiSize roiSize, int value);
Supported values for mod:8u_C1R

16u_C1R

IppStatus ippiAbsDiffC_32f_C1R(const Ipp32f* pSrc, int srcStep, Ipp32f* pDst, int
dstStep, IppiSize roiSize, Ipp32f value);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

799

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Parameters
Pointer to the source image.

pSrc

Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the destination image.

srcStep
pDst

Distance in bytes between starts of consecutive lines in thedestination image.
Size of the image ROI in pixels.

dstStep
roiSize

Scalar value used to decrement each element of the source
image.

value

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function calculates the absolute pixel-wise difference between the source image pSrc and the scalarvalue by the formula:pDst(x,y) = abs(pSrc(x,y) - value.
The function clips the value to the range [0, 255] for the 8u data type, and to the range [0, 65535] for the
16u data type.

Return Values
Indicates no error.

ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsStepErr
ippStsNotEvenStepErr

Indicates an error condition if one of the specified pointers is

NULL.

Indicates an error condition if roiSize has a field with zero or
negative value.
Indicates an error when srcStep or dstStep is less thanroiSize.width * <pixelSize>.
Indicates an error condition if one of step values for floatingpoint images cannot be divided by 4.

Sqr
Squares pixel values of an image and writes them into
the destination image.

SyntaxCase 1: Not-in-place operation on integer data
IppStatus ippiSqr_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>* pDst,
int dstStep, IppiSize roiSize, int scaleFactor);
Supported values for mod:8u_C1RSfs

16u_C1RSfs

16s_C1RSfs

8u_C3RSfs

16u_C3RSfs

16s_C3RSfs

8u_C4RSfs

16u_C4RSfs

16s_C4RSfs

800

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

8u_AC4RSfs 16u_AC4RSfs 16s_AC4RSfs

Case 2: Not-in-place operation on floating-point data
IppStatus ippiSqr_<mod>(const Ipp32f* pSrc, int srcStep, Ipp32f* pDst, int dstStep,
IppiSize roiSize);
Supported values for mod:32f_C1R
32f_C3R
32f_C4R
32f_AC4R

Case 3: In-place operation on integer data
IppStatus ippiSqr_<mod>(Ipp<datatype>* pSrcDst, int srcDstStep, IppiSize roiSize, int
scaleFactor);
Supported values for mod:8u_C1IRSfs

16u_C1IRSfs

16s_C1IRSfs

8u_C3IRSfs

16u_C3IRSfs

16s_C3IRSfs

8u_C4IRSfs

16u_C4IRSfs

16s_C4IRSfs

8u_AC4IRSfs 16u_AC4IRSfs 16s_AC4IRSfs

Case 4: In-place operation on floating-point data
IppStatus ippiSqr_<mod>(Ipp32f* pSrcDst, int srcDstStep, IppiSize roiSize);
Supported values for mod:32f_C1IR
32f_C3IR
32f_C4IR
32f_AC4IR

Case 5: Threading layer functions based on classic API
IppStatus ippiSqr_16s_C1IRSfs_T(Ipp16s* pSrcDst, int srcDstStep, IppiSize roiSize, int
scaleFactor);
IppStatus ippiSqr_16s32s_C1RSfs_T(const Ipp16s* pSrc, int srcStep, Ipp32s* pDst, int
dstStep, IppiSize roiSize, int scaleFactor);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h

801

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
Pointer to the source image ROI.

pSrc

Distance, in bytes, between the starting points of consecutive
lines in the source image.
Pointer to the destination image ROI.

srcStep
pDst

roiSize

Distance, in bytes, between the starting points of consecutive
lines in the destination image.
Pointer to the source and destination image ROI for the inplace operation.
Distance, in bytes, between the starting points of consecutive
lines in the source and destination image for the in-place
operation.
Size of the source and destination ROI in pixels.

scaleFactor

Scale factor (see Integer Result Scaling).

dstStep
pSrcDstsrcDstStep

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function squares pixel values of the source image ROI and writes them to the destination image ROI.
The function flavors operating on integer data apply fixed scaling defined by scaleFactor to the internallycomputed values, and saturate the results before writing them to the destination image ROI.
Note that the functions with the AC4 descriptor do not process alpha channels.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

Indicates an error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointers is
NULL.
Indicates an error condition if roiSize has a field with zero or
negative value.

Sqrt
Computes square roots of pixel values of a source
image and writes them into the destination image.

SyntaxCase 1: Not-in-place operation on integer data
IppStatus ippiSqrt_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>* pDst,
int dstStep, IppiSize roiSize, int scaleFactor);
Supported values for mod:8u_C1RSfs

16u_C1RSfs

16s_C1RSfs

8u_C3RSfs

16u_C3RSfs

16s_C3RSfs

802

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

8u_AC4RSfs 16u_AC4RSfs 16s_AC4RSfs

Case 2: Not-in-place operation on floating-point data
IppStatus ippiSqrt_<mod>(const Ipp32f* pSrc, int srcStep, Ipp32f* pDst, int dstStep,
IppiSize roiSize);
Supported values for mod:32f_C1R
32f_C3R
32f_AC4R

Case 3: In-place operation on integer data
IppStatus ippiSqrt_<mod>(Ipp<datatype>* pSrcDst, int srcDstStep, IppiSize roiSize, int
scaleFactor);
Supported values for mod:8u_C1IRSfs

16u_C1IRSfs

16s_C1IRSfs

8u_C3IRSfs

16u_C3IRSfs

16s_C3IRSfs

8u_AC4IRSfs 16u_AC4IRSfs 16s_AC4IRSfs

Case 4: In-place operation on floating-point data
IppStatus ippiSqrt_<mod>(Ipp32f* pSrcDst, int srcDstStep, IppiSize roiSize);
Supported values for mod:32f_C1IR
32f_C3IR
32f_C4IR
32f_AC4IR

Case 5: Threading layer functions based on classic API
IppStatus ippiSqrt_16s_C1IRSfs_T(Ipp16s* pSrcDst, int srcDstStep, IppiSize roiSize, int
scaleFactor);
IppStatus ippiSqrt_16s32s_C1RSfs_T(const Ipp16s* pSrc, int srcStep, Ipp32s* pDst, int
dstStep, IppiSize roiSize, int scaleFactor);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

803

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Parameters
pSrc
srcStep
pDst

Pointer to the source image ROI.
Distance, in bytes, between the starting points of consecutive
lines in the source image.
Pointer to the destination image ROI.

roiSize

Distance, in bytes, between the starting points of consecutive
lines in the destination image.
Pointer to the source and destination image ROI for the inplace operation.
Distance, in bytes, between the starting points of consecutive
lines in the source and destination image for the in-place
operation.
Size of the source and destination ROI in pixels.

scaleFactor

Scale factor (see Integer Result Scaling).

dstStep
pSrcDstsrcDstStep

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function computes square roots of pixel values of the source image ROI and writes them into thedestination image ROI. The function flavors operating on integer data apply fixed scaling defined byscaleFactor to the internally computed values, and saturate the results before writing them to thedestination image ROI. If a source pixel value is negative, the function issues a warning and continues
execution with the corresponding result value (see appendix “Handling of Special Cases” for more
information ).
Note that the functions with the AC4 descriptor do not process alpha channels.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsSqrtNegArg

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointers is
NULL.
Indicates an error condition if roiSize has a field with zero or
negative value.
Indicates a warning that a source pixel has a negative value.

Ln
Computes the natural logarithm of pixel values in asource image and writes the results into thedestination image.

804

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

SyntaxCase 1: Not-in-place operation on integer data
IppStatus ippiLn_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>* pDst, int
dstStep, IppiSize roiSize, int scaleFactor);
Supported values for mod:8u_C1RSfs

16u_C1RSfs

16s_C1RSfs

8u_C3RSfs

16u_C3RSfs

16s_C3RSfs

Case 2: Not-in-place operation on floating-point data
IppStatus ippiLn_<mod>(const Ipp32f* pSrc, int srcStep, Ipp32f* pDst, int dstStep,
IppiSize roiSize);
Supported values for mod:32f_C1R
32f_C3R

Case 3: In-place operation on integer data
IppStatus ippiLn_<mod>(Ipp<datatype>* pSrcDst, int srcDstStep, IppiSize roiSize, int
scaleFactor);
Supported values for mod:8u_C1IRSfs

16u_C1IRSfs

16s_C1IRSfs

8u_C3IRSfs

16u_C3IRSfs

16s_C3IRSfs

Case 4: In-place operation on floating-point data
IppStatus ippiLn_<mod>(Ipp32f* pSrcDst, int srcDstStep, IppiSize roiSize);
Supported values for mod:32f_C1IR
32f_C3IR

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source image ROI.

srcStep

Distance in bytes between starts of consecutive lines in thesource image.

805

1

Intel® Integrated Performance Primitives Developer Guide and Reference

pDst

Pointer to the destination image ROI.

roiSize

Distance in bytes between starts of consecutive lines in thedestination image.
Pointer to the source and destination image ROI for the inplace operation.
Distance in bytes between starts of consecutive lines in thesource and destination image for the in-place operation.
Size of the source and destination ROI in pixels.

scaleFactor

Scale factor (see Integer Result Scaling).

dstStep
pSrcDstsrcDstStep

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function computes natural logarithms of pixel values of the source image ROI and writes the resultant
values to the destination image ROI. The function flavors operating on integer data apply fixed scaling
defined by scaleFactor to the internally computed values, and saturate the results before writing them tothe destination image ROI.
If a source pixel value is zero or negative, the function issues a corresponding warning and continues
execution with the corresponding result value (see appendix “Handling of Special Cases” for more
information).
When several inputs have zero or negative value, the status code returned by the function corresponds to thefirst encountered case as illustrated in the code example below.

Return Values
ippStsNoErr
ippStsNullPtrErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointers is
NULL.

ippStsLnZeroArg

Indicates an error condition if roiSize has a field with zero or
negative value.
Indicates an error condition if srcStep,dstStep, or srcDstStep
has a zero or negative value.
Indicates a warning that a source pixel has a zero value.

ippStsLnNegArg

Indicates a warning that a source pixel has a negative value.

ippStsSizeErr
ippStsStepErr

ExampleThe code example below shows how to use Ln function.

IppStatus ln( void ) {Ipp32f img[8*8];
IppiSize roi = { 8, 8 };IppStatus st;
ippiSet_32f_C1R( (float)IPP_E, img, 8*4, roi );img[0] = -0;
img[1] = -1;
st = ippiLn_32f_C1IR( img, 8*sizeof(Ipp32f), roi );printf( "%f %f %f\n", img[0], img[1], img[2] );return st;
}

806

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Output values:-1.#INF00 -1.#IND00 1.000000
Status value and message:(7) Zero value(s) of argument in the Ln function

Exp
Computes the exponential of pixel values in a source
image and writes the results into the destination
image.

SyntaxCase 1: Not-in-place operation on integer data
IppStatus ippiExp_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>* pDst,
int dstStep, IppiSize roiSize, int scaleFactor);
Supported values for mod:8u_C1RSfs 16u_C1RSfs 16s_C1RSfs
8u_C3RSfs 16u_C3RSfs 16s_C3RSfs

Case 2: Not-in-place operation on floating-point data
IppStatus ippiExp_<mod>(const Ipp32f* pSrc, int srcStep, Ipp32f* pDst, int dstStep,
IppiSize roiSize);
Supported values for mod:32f_C1R
32f_C3R

Case 3: In-place operation on integer data
IppStatus ippiExp_<mod>(Ipp<datatype>* pSrcDst, int srcDstStep, IppiSize roiSize, int
scaleFactor);
Supported values for mod:8u_C1IRSfs 16u_C1IRSfs 16s_C1IRSfs
8u_C3IRSfs 16u_C3IRSfs 16s_C3IRSfs

Case 4: In-place operation on floating-point data
IppStatus ippiExp_<mod>(Ipp32f* pSrcDst, int srcDstStep, IppiSize roiSize);
Supported values for mod:32f_C1IR
32f_C3IR

Include Files
ippi.h807

1Intel® Integrated Performance Primitives Developer Guide and Reference

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc
srcStep
pDst
dstStep
pSrcDstPointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the destination image ROI.
Distance in bytes between starts of consecutive lines in thedestination image.
Pointer to the source and destination image ROI for the inplace operation.

roiSize

Distance in bytes between starts of consecutive lines in thesource and destination image for the in-place operation.
Size of the source and destination ROI in pixels.

scaleFactor

Scale factor (see Integer Result Scaling).

srcDstStep

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function computes e to the power of pixel values of the source image ROI and writes the resultant
values into the destination image ROI. The function flavors operating on integer data apply fixed scaling
defined by scaleFactor to the internally computed values, and saturate the results before writing them tothe destination image ROI.
When the overflow occurs, the resultant value is determined in accordance with the data type (see appendix“Handling of Special Cases” for more information).

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsStepErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointers is
NULL.
Indicates an error condition if roiSize has a field with zero or
negative value.
Indicates an error condition if srcStep, dstStep, or srcDstStep
has a zero or negative value.

DotProd
Computes the dot product of pixel values of twosource images.

808

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

SyntaxCase 1: Operation on one-channel integer data
IppStatus ippiDotProd_<mod>(const Ipp<srcDatatype>* pSrc1, int src1Step, const
Ipp<srcDatatype>* pSrc2, int src2Step, IppiSize roiSize, Ipp64f* pDp);
Supported values for mod:8u64f_C1R

16u64f_C1R

16s64f_C1R

32u64f_C1R

32s64f_C1R

Case 2: Operation on three-channel integer data
IppStatus ippiDotProd_<mod>(const Ipp<srcDatatype>* pSrc1, int src1Step, const
Ipp<srcDatatype>* pSrc2, int src2Step, IppiSize roiSize, Ipp64f pDp[3]);Supported values for mod:8u64f_C3R

16u64f_C3R

16s64f_C3R

32u64f_C3R

32s64f_C3R

Case 3: Operation on four-channel integer data
IppStatus ippiDotProd_<mod>(const Ipp<srcDatatype>* pSrc1, int src1Step, const
Ipp<srcDatatype>* pSrc2, int src2Step, IppiSize roiSize, Ipp64f pDp[4]);Supported values for mod:8u64f_C4R

16u64f_C4R

16s64f_C4R

32u64f_C4R

32s64f_C4R

IppStatus ippiDotProd_<mod>(const Ipp<srcDatatype>* pSrc1, int src1Step, const
Ipp<srcDatatype>* pSrc2, int src2Step, IppiSize roiSize, Ipp64f pDp[3]);Supported values for mod:8u64f_AC4R

16u64f_AC4R

16s64f_AC4R

32s64f_AC4R

32u64f_AC4R

Case 4: Operation on floating-point data
IppStatus ippiDotProd_32f64f_C1R(const Ipp32f* pSrc1, int src1Step, const Ipp32f*
pSrc2, int src2Step, IppiSize roiSize, Ipp64f* pDp, IppHintAlgorithm hint);
IppStatus ippiDotProd_32f64f_C3R(const Ipp32f* pSrc1, int src1Step, const Ipp32f*
pSrc2, int src2Step, IppiSize roiSize, Ipp64f pDp[3], IppHintAlgorithm hint);
IppStatus ippiDotProd_32f64f_C4R(const Ipp32f* pSrc1, int src1Step, const Ipp32f*
pSrc2, int src2Step, IppiSize roiSize, Ipp64f pDp[4], IppHintAlgorithm hint);
IppStatus ippiDotProd_32f64f_AC4R(const Ipp32f* pSrc1, int src1Step, const Ipp32f*
pSrc2, int src2Step, IppiSize roiSize, Ipp64f pDp[3], IppHintAlgorithm hint);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h

809

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc1, pSrc2

Pointer to the ROI in the source images.

src1Step, src2Step

Distance, in bytes, between the starting points of consecutive
lines in the source images.

roiSize

Size of the source image ROI.

pDp
hint

Pointer to the dot product or to the array containing thecomputed dot products for multi-channel images.
Option to select the algorithmic implementation of the function,
see Table “Hint Arguments for Image Moment Functions”.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function computes the dot product of pixel values of two source images pSrc1 and pSrc2 using
algorithm indicated by the hint argument (see Table “Hint Arguments for Image Moment Functions”) andstores the result in pDp. In case of multi-channel images, the dot product is computed for each channel
separately and stored in the array pDp.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if one of the specified pointers is
NULL.

ippStsSizeErr
ippStsStepErr

Indicates an error condition if roiSize has a field with zero or
negative value.
Indicates an error condition if one of the step values has zeroor negative value.

DotProdCol
Calculates the dot product of taps vector and columnsof the specified set of rows.

SyntaxIppStatus ippiDotProdCol_32f_L2(const Ipp32f* const ppSrcRow[], const Ipp32f* pTaps,
int tapsLen, Ipp32f* pDst, int width);
IppStatus ippiDotProdCol_64f_L2(const Ipp64f* const ppSrcRow[], const Ipp64f* pTaps,
int tapsLen, Ipp64f* pDst, int width);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

810

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Parameters
ppSrcRow

Pointer to the set of rows.

pTaps

Pointer to the taps vector.

tapsLenLength of taps vector, is equal to the number of rows.

pDst

Pointer to the destination row.

width

Width of the source and destination rows.

Description
This function calculates the dot product of taps vector pTaps and columns of the specified set of the rows
ppSrcRow. It is useful for external vertical filtering pipeline implementation.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if one of the specified pointers is
NULL.

ippStsSizeErr

Indicates an error condition if width is less than or equal to 0.

Complement
Converts pixel values from two's complement tobinary representation.

SyntaxCase 1: Not-in-place operation
IppStatus ippiComplement_<mod>(Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>* pDst,
int dstStep, IppiSize roiSize);
Supported values for mod:8s_C1R

16s_C1R

32s_C1R

8s_C3R

16s_C3R

32s_C3R

8s_C4R

16s_C4R

32s_C4R

8s_AC4R

16s_AC4R

32s_AC4R

Case 2: In-place operation
IppStatus ippiComplement_<mod>(Ipp<datatype>* pSrc, int srcStep, IppiSize roiSize);
Supported values for mod:8s_C1IR

16s_C1IR

32s_C3IR

8s_C3IR

16s_C3IR

32s_C3IR

8s_C4IR

16s_C4IR

32s_C4IR

8s_AC4IR

16s_AC4IR

32s_AC4IR

811

1Intel® Integrated Performance Primitives Developer Guide and Reference

Include Files
ippi.hParameters
pSrc, pDst, pSrcDst

Pointers to the start of the array with the source image.

srcStep, dstStep, srcDstStep

Distances in bytes between starts of adjacent lines in thesource image.
Size of the image ROI in pixels.

roiSize

Description
This function converts the value of each pixel from the two's complement representation to the binary
representation. This function takes the data from pSrc and saves the result inpDst.
In-place functions convert the value of each pixel by rewriting the source data. These functions take the datafrom pSrcDst and saves the result inpSrcDst.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when any of the specified pointers is null.

ippStsSizeErr

Indicates an error when the value for the data size is incorrect.

ippStsStepErr

Indicates an error when step value is less than, or equal tozero.

Logical Operations
Functions described in this section perform bitwise operations on pixel values. The operations include logicalAND, NOT, inclusive OR, exclusive OR, and bit shifts.

And
Performs a bitwise AND operation between
corresponding pixels of two images.

SyntaxCase 1: Not-in-place operation
IppStatus ippiAnd_<mod>(const Ipp<datatype>* pSrc1, int src1Step, const Ipp<datatype>*pSrc2, int src2Step, Ipp<datatype>* pDst, int dstStep, IppiSize roiSize);
Supported values for mod:8u_C1R

16u_C1R

32s_C1R

8u_C3R

16u_C3R

32s_C3R

8u_C4R

16u_C4R

32s_C4R

8u_AC4R

16u_AC4R

32s_AC4R

812

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Case 2: In-place operation
IppStatus ippiAnd_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>* pSrcDst,
int srcDstStep, IppiSize roiSize);
Supported values for mod:8u_C1IR

16u_C1IR

32s_C1IR

8u_C3IR

16u_C3IR

32s_C3IR

8u_C4IR

16u_C4IR

32s_C4IR

8u_AC4IR 16u_AC4IR 32s_AC4IR

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc, pSrc1, pSrc2

Pointers to the source images ROI.

srcStep, src1Step, src2Step

Distances in bytes between starts of consecutive lines in thesource images.
Pointer to the destination image ROI.

pDst
dstStep
pSrcDstsrcDstStep
roiSize

Distance in bytes between starts of consecutive lines in thedestination image.
Pointer to the source and destination image ROI for the inplace operation.
Distance in bytes between starts of consecutive lines in thesource and destination imager for the in-place operation.
Size of the source and destination ROI in pixels.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function performs a bitwise AND operation between the values of corresponding pixels of two source
image ROIs, and writes the result into a destination image ROI.
Note that the functions with the AC4 descriptor do not process alpha channelss.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointers is
NULL.
Indicates an error condition if roiSize has a field with zero or
negative value.

813

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Indicates an error condition if any of the specified buffer step
values is zero or negative.

ippStsStepErr

AndC
Performs a bitwise AND operation of each pixel with aconstant.

SyntaxCase 1: Not-in-place operation on one-channel data
IppStatus ippiAndC_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype> value,
Ipp<datatype>* pDst, int dstStep, IppiSize roiSize);
Supported values for mod:8u_C1R

16u_C1R

32s_C1R

Case 2: Not-in-place operation on multi-channel data
IppStatus ippiAndC_<mod>(const Ipp<datatype>* pSrc, int srcStep, const Ipp<datatype>value[3], Ipp<datatype>* pDst, int dstStep, IppiSize roiSize);
Supported values for mod:8u_C3R

16u_C3R

32s_C3R

8u_AC4R

16u_AC4R

32s_AC4R

IppStatus ippiAndC_<mod>(const Ipp<datatype>* pSrc, int srcStep, const Ipp<datatype>value[4], Ipp<datatype>* pDst, int dstStep, IppiSize roiSize);
Supported values for mod:8u_C4R

16u_C4R

32s_C4R

Case 3: In-place operation on one-channel data
IppStatus ippiAndC_<mod>(Ipp<datatype> value, Ipp<datatype>* pSrcDst, int srcDstStep,
IppiSize roiSize);
Supported values for mod:8u_C1IR

16u_C1IR

32s_C1IR

Case 4: In-place operation on multi-channel data
IppStatus ippiAndC_<mod>(const Ipp<datatype> value[3], Ipp<datatype>* pSrcDst, int
srcDstStep, IppiSize roiSize);
Supported values for mod:8u_C3IR

16u_C3IR

32s_C3IR

8u_AC4IR

16u_AC4IR

32s_AC4IR

814

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

IppStatus ippiAndC_<mod>(const Ipp<datatype> value[4], Ipp<datatype>* pSrcDst, int
srcDstStep, IppiSize roiSize);
Supported values for mod:8u_C4IR

16u_C4IR

32s_C4IR

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc
srcStep
value

pDst
dstStep
pSrcDstsrcDstStep
roiSize

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
The constant value to perform the bitwise AND operation oneach pixel of the source image ROI (constant vector in case ofmulti-channel images).
Pointer to the destination image ROI.
Distance in bytes between starts of consecutive lines in thedestination image.
Pointer to the source and destination image ROI for the inplace operation.
Distance in bytes between starts of consecutive lines in thesource and destination image buffer for the in-place operation.
Size of the source and destination ROI in pixels.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function performs a bitwise AND operation between each pixel value of a source image ROI and constantvalue.
Note that the functions with the AC4 descriptor do not process alpha channels.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsStepErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointers is
NULL.
Indicates an error condition if roiSize has a field with a zero or
negative value.
Indicates an error condition if srcStep, dstStep, or srcDstStep
has a zero or negative value.

815

1

Intel® Integrated Performance Primitives Developer Guide and ReferenceOr
Performs bitwise inclusive OR operation between
pixels of two source buffers.

SyntaxCase 1: Not-in-place operation
IppStatus ippiOr_<mod>(const Ipp<datatype>* pSrc1, int src1Step, const Ipp<datatype>*pSrc2, int src2Step, Ipp<datatype>* pDst, int dstStep, IppiSize roiSize);
Supported values for mod:8u_C1R

16u_C1R

32s_C1R

8u_C3R

16u_C3R

32s_C3R

8u_C4R

16u_C4R

32s_C4R

8u_AC4R

16u_AC4R

32s_AC4R

Case 2: In-place operation
IppStatus ippiOr_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>* pSrcDst,
int srcDstStep, IppiSize roiSize);
Supported values for mod:8u_C1IR

16u_C1IR

32s_C1IR

8u_C3IR

16u_C3IR

32s_C3IR

8u_C4IR

16u_C4IR

32s_C4IR

8u_AC4IR

16u_AC4IR

32s_AC4IR

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc, pSrc1, pSrc2

Pointers to the source images ROI.

srcStep, src1Step, src2Step

Distances in bytes between starts of consecutive lines in thesource images.
Pointer to the destination image ROI.

pDst
dstStep
pSrcDstsrcDstStep

816

Distance in bytes between starts of consecutive lines in thedestination image.
Pointer to the source and destination image ROI for the inplace operation.
Distance in bytes between starts of consecutive lines in thesource and destination image for the in-place operation.

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Size of the source and destination ROI in pixels.

roiSize

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function performs a bitwise inclusive OR operation between the values of corresponding pixels of twosource image ROIs, and writes the result into a destination image ROI. Note that the functions with the AC4
descriptor do not process alpha channels.

Return Values
Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointers is
NULL.

ippStsNoErr
ippStsNullPtrErr

Indicates an error condition if roiSize has a field with zero or
negative value.
Indicates an error condition if any of the specified buffer step
values is zero or negative.

ippStsSizeErr
ippStsStepErr

ExampleThe code example below show how to use the function ippiOr_8u_C1R.

void func_or(){
IppiSize Src1ROI = {8,4};
IppiSize Src2ROI = {8,4};
IppiSize DstROI = {5,4};
Ipp8u src1[8*4];
Ipp8u src2[8*4];
Ipp8u dst[8*4];
ippiSet_8u_C1R(0,dest,8,Src1ROI);
ippiSet_8u_C1R(5,src1,8,Src1ROI);
ippiSet_8u_C1R(6,src2,8,Src2ROI);
ippiOr_8u_C1R(src1,8,src2,8,dst,8,DstROI);}
Result:src1
05 05 05 05 05 05 05 05
05 05 05 05 05 05 05 05
05 05 05 05 05 05 05 05
05 05 05 05 05 05 05 05

src2
06 06 06 06 06 06 06 06
06 06 06 06 06 06 06 06
06 06 06 06 06 06 06 06
06 06 06 06 06 06 06 06

dst
07 07 07 07 07 00 00 00
07 07 07 07 07 00 00 00
07 07 07 07 07 00 00 00
07 07 07 07 07 00 00 00

OrC
Performs a bitwise inclusive OR operation between
each pixel of a buffer and a constant.

817

1

Intel® Integrated Performance Primitives Developer Guide and Reference

SyntaxCase 1: Not-in-place operation on one-channel data
IppStatus ippiOrC_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype> value,
Ipp<datatype>* pDst, int dstStep, IppiSize roiSize);
Supported values for mod:8u_C1R

16u_C1R

32s_C1R

Case 2: Not-in-place operation on multi-channel data
IppStatus ippiOrC_<mod>(const Ipp<datatype>* pSrc, int srcStep, const Ipp<datatype>value[3], Ipp<datatype>* pDst, int dstStep, IppiSize roiSize);
Supported values for mod:8u_C3R

16u_C3R

32s_C3R

8u_AC4R

16u_AC4R

32s_AC4R

IppStatus ippiOrC_<mod>(const Ipp<datatype>* pSrc, int srcStep, const Ipp<datatype>value[4], Ipp<datatype>* pDst, int dstStep, IppiSize roiSize);
Supported values for mod:8u_C4R

16u_C4R

32s_C4R

Case 3: In-place operation on one-channel data
IppStatus ippiOrC_<mod>(Ipp<datatype> value, Ipp<datatype>* pSrcDst, int srcDstStep,
IppiSize roiSize);
Supported values for mod:8u_C1IR

16u_C1IR

32s_C1IR

Case 4: In-place operation on multi-channel data
IppStatus ippiOrC_<mod>(const Ipp<datatype> value[3], Ipp<datatype>* pSrcDst, int
srcDstStep, IppiSize roiSize);
Supported values for mod:8u_C3IR

16u_C3IR

32s_C3IR

8u_AC4IR 16u_AC4IR 32s_AC4IR
IppStatus ippiOrC_<mod>(const Ipp<datatype> value[4], Ipp<datatype>* pSrcDst, int
srcDstStep, IppiSize roiSize);
Supported values for mod:8u_C4IR

Include Files
ippi.h818

16u_C4IR

32s_C4IR

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc
srcStep
value

pDst
dstStep
pSrcDstsrcDstStep
roiSize

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
The constant value to perform the bitwise OR operation oneach pixel of the source image (constant vector in case ofmulti-channel images).
Pointer to the destination image ROI.
Distance in bytes between starts of consecutive lines in thedestination image.
Pointer to the source and destination image ROI for the inplace operation.
Distance in bytes between starts of consecutive lines in thesource and destination image for the in-place operation.
Size of the source and destination ROI in pixels.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function performs a bitwise inclusive OR operation between each pixel value of a source image ROI andconstant value.
Note that the functions with the AC4 descriptor do not process alpha channels.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsStepErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointers is
NULL.
Indicates an error condition if roiSize has a field with zero or
negative value.
Indicates an error condition if srcStep, dstStep, or srcDstStep
has a zero or negative value.

Xor
Performs bitwise exclusive OR operation between
pixels of two source buffers.

819

1

Intel® Integrated Performance Primitives Developer Guide and Reference

SyntaxCase 1: Not-in-place operation
IppStatus ippiXor_<mod>(const Ipp<datatype>* pSrc1, int src1Step, const Ipp<datatype>*pSrc2, int src2Step, Ipp<datatype>* pDst, int dstStep, IppiSize roiSize);
Supported values for mod:8u_C1R

16u_C1R

32s_C1R

8u_C3R

16u_C3R

32s_C3R

8u_C4R

16u_C4R

32s_C4R

8u_AC4R

16u_AC4R

32s_AC4R

Case 2: In-place operation
IppStatus ippiXor_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>* pSrcDst,
int srcDstStep, IppiSize roiSize);
Supported values for mod:8u_C1IR

16u_C1IR

32s_C1IR

8u_C3IR

16u_C3IR

32s_C3IR

8u_C4IR

16u_C4IR

32s_C4IR

8u_AC4IR 16u_AC4IR 32s_AC4IR

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc, pSrc1, pSrc2

Pointers to the source images ROI.

srcStep, src1Step, src2Step

Distances in bytes between starts of consecutive lines in thesource images.
Pointer to the destination image ROI.

pDst
dstStep
pSrcDstsrcDstStep
roiSize

Distance in bytes between starts of consecutive lines in thedestination image.
Pointer to the source and destination image ROI for the inplace operation.
Distance in bytes between starts of consecutive lines in thesource and destination image for the in-place operation.
Size of the source and destination ROI in pixels.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).

820

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

This function performs a bitwise exclusive OR operation between the values of corresponding pixels of twosource image ROIs, and writes the result into a destination image ROI.
Note that the functions with the AC4 descriptor do not process alpha channels.

Return Values
Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointers is
NULL.

ippStsNoErr
ippStsNullPtrErr

Indicates an error condition if roiSize has a field with zero or
negative value.
Indicates an error condition if any of the specified buffer step
values is zero or negative.

ippStsSizeErr
ippStsStepErr

XorC
Performs a bitwise exclusive OR operation between
each pixel of a buffer and a constant.

SyntaxCase 1: Not-in-place operation on one-channel data
IppStatus ippiXorC_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype> value,
Ipp<datatype>* pDst, int dstStep, IppiSize roiSize);
Supported values for mod:8u_C1R

16u_C1R

32s_C1R

Case 2: Not-in-place operation on multi-channel data
IppStatus ippiXorC_<mod>(const Ipp<datatype>* pSrc, int srcStep, const Ipp<datatype>value[3], Ipp<datatype>* pDst, int dstStep, IppiSize roiSize);
Supported values for mod:8u_C3R

16u_C3R

32s_C3R

8u_AC4R

16u_AC4R

32s_AC4R

IppStatus ippiXorC_<mod>(const Ipp<datatype>* pSrc, int srcStep, const Ipp<datatype>value[4], Ipp<datatype>* pDst, int dstStep, IppiSize roiSize);
Supported values for mod:8u_C4R

16u_C4R

32s_C4R

Case 3: In-place operation on one-channel data
IppStatus ippiXorC_<mod>(Ipp<datatype> value, Ipp<datatype>* pSrcDst, int srcDstStep,
IppiSize roiSize);
Supported values for mod:8u_C1IR

16u_C1IR

32s_C1IR

821

1Intel® Integrated Performance Primitives Developer Guide and Reference

Case 4: In-place operation on multi-channel data
IppStatus ippiXorC_<mod>(const Ipp<datatype> value[3], Ipp<datatype>* pSrcDst, int
srcDstStep, IppiSize roiSize);
Supported values for mod:8u_C3IR

16u_C3IR

32s_C3IR

8u_AC4IR 16u_AC4IR 32s_AC4IR
IppStatus ippiXorC_<mod>(const Ipp<datatype> value[4], Ipp<datatype>* pSrcDst, int
srcDstStep, IppiSize roiSize);
Supported values for mod:8u_C4IR

16u_C4IR

32s_C4IR

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc
srcStep
value

pDst
dstStep
pSrcDstsrcDstStep
roiSize

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
The constant value to perform the bitwise XOR operation oneach pixel of the source image ROI (constant vector in case ofmulti-channel images).
Pointer to the destination image ROI.
Distance in bytes between starts of consecutive lines in thedestination image.
Pointer to the source and destination image ROI for the inplace operation.
Distance in bytes between starts of consecutive lines in thesource and destination image for the in-place operation.
Size of the source and destination ROI in pixels.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function performs a bitwise exclusive OR operation between each pixel value of a source image ROI andconstant value.
Note that the functions with the AC4 descriptor do not process alpha channels.

822

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsStepErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointers is
NULL.
Indicates an error condition if roiSize has a field with zero or
negative value.
Indicates an error condition if srcStep, dstStep, or srcDstStep
has a zero or negative value.

Not
Performs a bitwise NOT operation on each pixel of asource buffer.

SyntaxCase 1: Not-in-place operation
IppStatus ippiNot_<mod>(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int dstStep,
IppiSize roiSize);
Supported values for mod:8u_C1R
8u_C3R
8u_C4R
8u_AC4R

Case 2: In-place operation
IppStatus ippiNot_<mod>(Ipp8u* pSrcDst, int srcDstStep, IppiSize roiSize);
Supported values for mod:8u_C1IR
8u_C3IR
8u_C4IR
8u_AC4IR

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

823

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Parameters
Pointer to the source image ROI.

pSrc

Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the destination image ROI.

srcStep
pDst

Distance in bytes between starts of consecutive lines in thedestination image.
Pointer to the source and destination image ROI for the inplace operation.
Distance in bytes between starts of consecutive lines in thesource and destination image for the in-place operation.
Size of the source and destination ROI in pixels.

dstStep
pSrcDstsrcDstStep
roiSize

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function performs a bitwise NOT operation on each pixel value of a source image ROI.
Note that the functions with the AC4 descriptor do not process alpha channels.

Return Values
Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointers is
NULL.

ippStsNoErr
ippStsNullPtrErr

Indicates an error condition if roiSize has a field with zero or
negative value.
Indicates an error condition if srcStep, dstStep, or srcDstStep
has a zero or negative value.

ippStsSizeErr
ippStsStepErr

RShiftC
Shifts bits in pixel values to the right.

Case 1: Not-in-place operation on one-channel data
IppStatus ippiRShiftC_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp32u value,
Ipp<datatype>* pDst, int dstStep, IppiSize roiSize);
Supported values for mod:8u_C1R

16u_C1R

16s_C1R

32s_C1R

Case 2: Not-in-place operation on multi-channel data
IppStatus ippiRShiftC_<mod>(const Ipp<datatype>* pSrc, int srcStep, const Ipp32uvalue[3], Ipp<datatype>* pDst, int dstStep, IppiSize roiSize);
Supported values for mod:8u_C3R824

16u_C3R

16s_C3R

32s_C3R

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

IppStatus ippiRShiftC_<mod>(const Ipp<datatype>* pSrc, int srcStep, const Ipp32uvalue[4], Ipp<datatype>* pDst, int dstStep, IppiSize roiSize);
Supported values for mod:8u_C4R

16u_C4R

16s_C4R

32s_C4R

IppStatus ippiRShiftC_<mod>(const Ipp<datatype>* pSrc, int srcStep, const Ipp32uvalue[3], Ipp<datatype>* pDst, int dstStep, IppiSize roiSize);
Supported values for mod:8u_AC4R

16u_AC4R

16s_AC4R

32s_AC4R

Case 3: In-place operation on one-channel data
IppStatus ippiRShiftC_<mod>(Ipp32u value, Ipp<datatype>* pSrcDst, int srcDstStep,
IppiSize roiSize);
Supported values for mod:8u_C1IR

16u_C1IR

16s_C1IR

32s_C1IR

Case 4: In-place operation on multi-channel data
IppStatus ippiRShiftC_<mod>(const Ipp32u value[3], Ipp<datatype>* pSrcDst, int
srcDstStep, IppiSize roiSize);
Supported values for mod:8u_C3IR

16u_C3IR

16s_C3IR

32s_C3IR

8u_AC4IR

16u_AC4IR

16s_AC4IR

32s_AC4IR

IppStatus ippiRShiftC_<mod>(const Ipp32u value[4], Ipp<datatype>* pSrcDst, int
srcDstStep, IppiSize roiSize);
Supported values for mod:8u_C4IR

16u_C4IR

16s_C4IR

32s_C4IR

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source image ROI.

srcStep

Distance in bytes between starts of consecutive lines in thesource image.

825

1

Intel® Integrated Performance Primitives Developer Guide and Reference

The number of bits to shift (constant vector in case of multichannel images).
Pointer to the destination image ROI.

value
pDst

Distance in bytes between starts of consecutive lines in thedestination image.
Pointer to the source and destination image ROI for the inplace operation.
Distance in bytes between starts of consecutive lines in thesource and destination image for the in-place operation.
Size of the source and destination ROI in pixels.

dstStep
pSrcDstsrcDstStep
roiSize

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function decreases the intensity of pixels in the source image ROI by shifting the bits in each pixel value
by value bits to the right. The positions vacated after shifting the bits are filled with the sign bit. In case ofmulti-channel data, each color channel can have its own shift value. This operation is equivalent to dividing
the pixel values by a constant power of 2.
Note that the functions with the AC4 descriptor do not process alpha channels.

Return Values
Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointers is
NULL.

ippStsNoErr
ippStsNullPtrErr

Indicates an error condition if roiSize has a field with a zero or
negative value.
Indicates an error condition if srcStep, dstStep, or srcDstStep
has a zero or negative value.

ippStsSizeErr
ippStsStepErr

LShiftC
Shifts bits in pixel values to the left.

SyntaxCase 1: Not-in-place operation on one-channel data
IppStatus ippiLShiftC_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp32u value,
Ipp<datatype>* pDst, int dstStep, IppiSize roiSize);
Supported values for mod:8u_C1R

16u_C1R

32s_C1R

Case 2: Not-in-place operation on multi-channel data
IppStatus ippiLShiftC_<mod>(const Ipp<datatype>* pSrc, int srcStep, const Ipp32uvalue[3], Ipp<datatype>* pDst, int dstStep, IppiSize roiSize);
Supported values for mod:8u_C3R826

16u_C3R

32s_C3R

32s_AC4R

Developer Guide and Reference for Intel® Integrated Performance Primitives

8u_AC4R

1

16u_AC4R

IppStatus ippiLShiftC_<mod>(const Ipp<datatype>* pSrc, int srcStep, const Ipp32uvalue[4], Ipp<datatype>* pDst, int dstStep, IppiSize roiSize);
Supported values for mod:8u_C4R

16u_C4R

32s_C4R

Case 3: In-place operation on one-channel data
IppStatus ippiLShiftC_<mod>(Ipp32u value, Ipp<datatype>* pSrcDst, int srcDstStep,
IppiSize roiSize);
Supported values for mod:8u_C1IR

16u_C1IR

32s_C1IR

Case 4: In-place operation on multi-channel data
IppStatus ippiLShiftC_<mod>(const Ipp32u value[3], Ipp<datatype>* pSrcDst, int
srcDstStep, IppiSize roiSize);
Supported values for mod:8u_C3IR

16u_C3IR

32s_C3IR

8u_AC4IR

16u_AC4IR

32s_AC4IR

IppStatus ippiLShiftC_<mod>(const Ipp32u value[4], Ipp<datatype>* pSrcDst, int
srcDstStep, IppiSize roiSize);
Supported values for mod:8u_C4IR

16u_C4IR

32s_C4IR

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc
srcStep
value
pDst
dstStep

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
The number of bits to shift (constant vector in case of multichannel images).
Pointer to the destination image ROI.
Distance in bytes between starts of consecutive lines in thedestination image.

827

1

Intel® Integrated Performance Primitives Developer Guide and ReferencepSrcDstsrcDstStep
roiSize

Pointer to the source and destination image ROI for the inplace operation.
Distance in bytes between starts of consecutive lines in thesource and destination image for the in-place operation.
Size of the source and destination ROI in pixels.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function changes the intensity of pixels in the source image ROI by shifting the bits in each pixel value
by value bits to the left. In case of multi-channel data, each color channel can have its own shift value. The
positions vacated after shifting the bits are filled with zeros. Values obtained as a result of left shiftoperations are not saturated. To get saturated values, use multiplication functions instead.
Note that the functions with the AC4 descriptor do not process alpha channels.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsStepErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointers is
NULL.
Indicates an error condition if roiSize has a field with zero or
negative value.
Indicates an error condition if srcStep, dstStep, orsrcDstStep
has a zero or negative value.

ExampleThe code example below illustrates the use of left shift function.

IppStatus lshift( void ) {Ipp8u img[8*8] = { 1, 0x7F, 0xFE };IppiSize roi = { 8, 8 };IppStatus st = ippiLShiftC_8u_C1IR( 1, img, 8, roi );printf( "%02x %02x %02x\n", img[0], img[1], img[2] );return st;}
Output values:

02 fe fc

Alpha Composition
The Intel IPP provides functions that composite two image buffers using either the opacity (alpha) channel inthe images or provided alpha values.
These functions operate on image buffers with 8-bit or 16-bit data in RGB or RGBA format. In all compositing
operations a resultant pixel in destination buffer pDst is created by overlaying a pixel from the foregroundimage buffer pSrc1 over a pixel from the background image buffer pSrc2. The supported types of images
combining by using alpha values are listed in the table below.
Types of Image Composing Operations
Type

Output Pixel
Color Components

828

Alpha value

Description in Imaging
Terms

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

OVER

αA*A+(1- αA)* αB*B

αA+(1-αA)* αB

A occludes BIN

αA*A*αB

αA*αB

A within B. A acts as a mattefor B. A shows only where B
is visible.

OUT

αA*A*(1-αB)

αA*(1-αB)

A outside B. NOT-B acts as amatte for A. A shows only
where B is not visible.

ATOP

αA*A*αB+(1- αA)* αB*B

αA*αB+(1- αA)* αB

Combination of (A IN B) and(B OUT A). B is both background and matte for A.

XOR

αA*A*(1-αB)+(1- αA)* αB*B

αA*(1-αB)+(1- αA)* αB

Combination of (A OUT B)
and (B OUT A). A and B
mutually exclude each other.

PLUS

αA*A+αB*B

αA+αB

Blend without precedence

In the formulas above, the input image buffers are denoted as A and B for simplicity. The Greek letter α with
subscripts denotes the normalized (scaled) alpha value in the range 0 to 1. It is related to the integer alphavalue alpha as:

α = alpha / max_val
where max_val is 255 for 8-bit or 65535 for 16-bit unsigned pixel data.
For the ippiAlphaComp function that operates on 4-channel RGBA buffers only, αA andαB are the normalizedalpha values of the two input image buffers, respectively.
For the ippiAlphaCompC function, αA andαBare the normalized constant alpha values that are passed asparameters to the function.
Note that in formulas for computing the resultant color channel values, A and B stand for the pixel color
components of the respective input image buffers.
To save a significant amount of computation for some of the alpha compositing operations, use functions

AlphaPremul , AlphaPremulC for pre-multiplying color channel values by the alpha values. This reduces thenumber of multiplications required in the compositing operations, which is especially efficient for repeatedcompositing of an image.

The type of composition operation that is performed by the function AlphaComp and AlphaCompC is specified
by the parameter alphaType, the table below lists its possible values.
Possible Values of alphaType Parameter
Operation types

Parameter ValueOVER

ippAlphaOver

ippAlphaOverPremul

IN

ippAlphaIn

ippAlphaInPremul

OUT

ippAlphaOut

ippAlphaOutPremul

ATOP

ippAlphaATop

ippAlphaATopPremul

XOR

ippAlphaXor

ippAlphaXorPremul

PLUS

ippAlphaPlus

ippAlphaPlusPremul

829

1

Intel® Integrated Performance Primitives Developer Guide and Reference

AlphaComp
Combines two images using alpha (opacity) values ofboth images.

SyntaxCase 1: Not-in-place operation
IppStatus ippiAlphaComp_<mod>(const Ipp<datatype>* pSrc1, int src1Step, const
Ipp<datatype>* pSrc2, int src2Step, Ipp<datatype>* pDst, int dstStep, IppiSize roiSize,
IppiAlphaType alphaType);
Supported values for mod:8u_AC1R

16u_AC1R

1333
6222
susf
____
AAAA
CCCC
4111
RRRR

8u_AC4R

16u_AC4R

1333
6222
susf
____
AAAA
CCCC
1444
RRRR

IppStatus ippiAlphaComp_<mod>(const Ipp<datatype>* const pSrc1[4], int src1Step, const
Ipp<datatype>* const pSrc2[4], int src2Step, Ipp<datatype>* const pDst[4], int dstStep,
IppiSize roiSize, IppiAlphaType alphaType);
Supported values for mod:8u_AP4R

16u_AP4R

Case 2: In-place operation
IppStatus ippiAlphaComp_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>*pSrcDst, int srcDstStep, IppiSize roiSize, IppiAlphaType alphaType);
Supported values for mod:8u_AC4IR830

16u_AC4IR 1333
6222
susf
____
AAAA
CCCC

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

4444
IIII
RRRR
IppStatus ippiAlphaComp_<mod>(const Ipp<datatype>* const pSrc[4], int srcStep,
Ipp<datatype>* const pSrcDst[4], int srcDstStep, IppiSize roiSize, IppiAlphaTypealphaType);
Supported values for mod:8u_AP4IR

16u_AP4IR

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc, pSrc1, pSrc2

srcStep, src1Step, src2Step
pSrcDstpDst

srcDstStep

dstStep
roiSizealphaType

Pointers to the source image ROI for pixel-order data. An arrayof pointers to ROI in the separate source color planes in case ofplanar data.
Distances, in bytes, between the starting points of consecutive
lines in the source images.
Pointer to the source and destination buffer or an array ofpointers to separate source and destination color planes for inplace operation.
Pointer to the destination image ROI for pixel-order data. An
array of pointers to ROI in the separate destination color planes
in case of planar data.
Distance, in bytes, between the starting points of consecutive
lines in the source and destination image for in-place
operation.
Distance, in bytes, between the starting points of consecutive
lines in the destination image.
Size of the source and destination ROI, in pixels.
The composition type to perform. See Table “Possible Values of
the Parameter alphaType” for the type value and description.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function performs an image compositing operation on RGBA images using alpha values of both images.
The compositing is done by overlaying pixels (rA, gA,bA, αA) from the foreground image pSrc1 with pixels(rB,gB,bB, αB) from the background image pSrc2 to produce pixels (rC,gC,bC, αC) in the resultant image pDst.
The alpha values are assumed to be normalized to the range [0..1].

831

1

Intel® Integrated Performance Primitives Developer Guide and Reference

The type of the compositing operation is indicated by the alphaType parameter. Use Table “Possible Valuesof the Parameter alphaType” to choose a valid alphaType value depending on the required composition type.
For example, the resulting pixel color components for the OVER operation (see Table “Types of Image
Composing Operations”) are computed as follows:rC = αA * rA +(1 - αA)* αB *rB
gC = αA * gA +(1 - αA)* αB *gB
bC = αA * bA +(1 - αA)* αB *bB
The resulting (normalized) alpha value is computed as
αC = αA +(1 - αA)* αB
This function can be used for unsigned pixel data only.

Return Values
Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointers is
NULL.

ippStsNoErr
ippStsNullPtrErr

Indicates an error condition if roiSize has a field with zero or
negative value.

ippStsSizeErr

AlphaCompC
Combines two images using constant alpha values.

SyntaxCase 1: Not-in-place operation
IppStatus ippiAlphaCompC_<mod>(const Ipp<datatype>* pSrc1, int src1Step, Ipp<datatype>alpha1, const Ipp<datatype>* pSrc2, int src2Step, Ipp<datatype> alpha2, Ipp<datatype>*pDst, int dstStep, IppiSize roiSize, IppiAlphaType alphaType);
Supported values for mod:8u_C1R

8u_C3R

8u_C4R

8u_AC4R

16u_C1R 16u_C3R 16u_C4R 16u_AC4R
16s_C1R
32u_C1R
32s_C1R
32f_C1R

832

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

IppStatus ippiAlphaCompC_<mod>(const Ipp<datatype>* const pSrc1[4], int src1Step,
Ipp<datatype> alpha1, const Ipp<datatype>* const pSrc2[4], int src2Step, Ipp<datatype>alpha2, Ipp<datatype>* const pDst[4], int dstStep, IppiSize roiSize, IppiAlphaTypealphaType);
Supported values for mod:8u_AP4R

16u_AP4R

Case 2: In-place operation
IppStatus ippiAlphaCompC_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>alpha1, Ipp<datatype>* pSrcDst, int srcDstStep, Ipp<datatype> alpha2, IppiSize roiSize,
IppiAlphaType alphaType);
Supported values for mod:8u_C1IR

16u_C1IR

8u_C3IR

16u_C3IR

8u_C4IR

16u_C4IR

16s_C1IR 32s_C1IR 32u_C1IR 32f_C1IR

8u_AC4IR 16u_AC4IR

IppStatus ippiAlphaCompC_<mod>(const Ipp<datatype>* const pSrc[4], int srcStep,
Ipp<datatype> alpha1, Ipp<datatype>* const pSrcDst[4], int srcDstStep, Ipp<datatype>alpha2, IppiSize roiSize, IppiAlphaType alphaType);
Supported values for mod:8u_AP4IR

16u_AP4IR

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc1, pSrc2

src1Step, src2Step
pSrcDstpDst

Pointers to the source image ROI for pixel-order data. An arrayof pointers to ROI in the separate source color planes in case ofplanar data.
Distances, in bytes, between the starting points of consecutive
lines in the source images.
Pointer to the source and destination buffer or an array ofpointers to separate source and destination color planes for inplace operation.
Pointer to the destination image ROI for pixel-order data. An
array of pointers to ROI in the separate destination color planes
in case of planar data.

833

1

Intel® Integrated Performance Primitives Developer Guide and Reference

roiSize

Distance, in bytes, between the starting points of consecutive
lines in the source and destination image for in-place
operation.
Distance, in bytes, between the starting points of consecutive
lines in the destination image.
Size of the source and destination ROI in pixels.

alpha1, alpha2

Constant alpha values to use for the compositing operation.

alphaTypeThe composition type to perform. See Table “Possible Values of
the Parameter alphaType” for the type value and description.

srcDstStep

dstStep

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function performs an image compositing operation on one-channel image buffers, three-channel RGB
and four-channel RGBA image buffers and on planar images, using constant alpha values alpha1 andalpha2. These values are passed to the function as parameters.
The compositing is done by overlaying pixels from the foreground image ROI pSrc1 with pixels from thebackground image ROI pSrc2 to produce pixels in the resultant image ROI pDst. The alpha values arenormalized to the range [0..1].
The type of the compositing operation is indicated by the alphaType parameter. Use Table “Possible Valuesof the Parameter alphaType” to choose a valid alphaType value depending on the required composition type.
For example, the resulting pixel color components for the OVER operation (see Table “Types of Image
Composing Operations”) are computed as follows:rC = α1 * rA +(1 - α1)* α2 *rB
gC = α1 * gA +(1 - α1)* α2 *gB
bC = α1 * bA +(1 - α1)* α2 *bB
where α1, α2 are the normalised alpha values alpha1, alpha2.
This function can be used for unsigned pixel data only.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointers is
NULL.
Indicates an error condition if roiSize has a field with zero or
negative value.

ExampleThe code example below shows how to use alpha composition function.

IppStatus acomp( void ) {Ipp8u imga[8*8], imgb[8*8], imgc[8*8];
IppiSize roi = { 8, 8 };IppStatus st;
ippiImageRamp_8u_C1R( imga, 8, roi, 0, 1, ippAxsHorizontal );ippiImageRamp_8u_C1R( imgb, 8, roi, 0, 2, ippAxsHorizontal );st = ippiAlphaCompC_8u_C1R( imga, 8, 255/3, imgb, 8, 255, imgc, 8, roi, ippAlphaOver );printf( "over: a=%d,A=255/3; b=%d,B=255; c=%d //834

Developer Guide and Reference for Intel® Integrated Performance Primitives

1c=a*A+b*(1-A)*B\n",imga[6],imgb[6],imgc[6] );return st;}
Outputover: a=6,A=255/3; b=12,B=255; c=10 // c=a*A+b*B*(1-A)

AlphaPremul
Pre-multiplies pixel values of an image by its alphavalues.

SyntaxCase 1: Not-in-place operation
IppStatus ippiAlphaPremul_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>*pDst, int dstStep, IppiSize roiSize);
Supported values for mod:8u_AC4R

16u_AC4R

IppStatus ippiAlphaPremul_<mod>(const Ipp<datatype>* const pSrc[4], int srcStep,
Ipp<datatype>* const pDst[4], int dstStep, IppiSize roiSize);
Supported values for mod:8u_AP4R

16u_AP4R

Case 2: In-place operation
IppStatus ippiAlphaPremul_<mod>(Ipp<datatype>* pSrcDst, int srcDstStep, IppiSize
roiSize);
Supported values for mod:8u_AC4IR

16u_AC4IR

IppStatus ippiAlphaPremul_<mod>(Ipp<datatype>* const pSrcDst[4], int srcDstStep,
IppiSize roiSize);
Supported values for mod:8u_AP4IR

16u_AP4IR

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

835

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Parameters
Pointer to the source image ROI for pixel-order data. An arrayof pointers to ROI in the separate source color planes in case ofplanar data.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the destination image ROI for pixel-order data. An
array of pointers to ROI in the separate destination color planes
in case of planar data.
Distance in bytes between starts of consecutive lines in thedestination image.
Pointer to the source and destination buffer or an array ofpointers to separate source and destination color planes for thein-place operation.
Distance in bytes between starts of consecutive lines in thesource and destination image for the in-place operation.
Size of the source and destination ROI in pixels.

pSrc

srcStep
pDst

dstStep
pSrcDstsrcDstStep
roiSize

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts a RGBA source image (pixel order or planar) to the pre-multiplied alpha form. If(r,g,b,a) are the red, green, blue, and alpha values of a pixel, then new pixel values are (r* α, g*α, b*α, a)after execution of this function. Here α is the pixel normalized alpha value in the range 0 to 1.
The function ippiAlphaPremul can be used for unsigned pixel data only.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointers is
NULL.
Indicates an error condition if roiSize has a field with zero or
negative value.

AlphaPremulC
Pre-multiplies pixel values of an image using constantalpha (opacity) values.

SyntaxCase 1: Not-in-place operation
IppStatus ippiAlphaPremulC_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>alpha, Ipp<datatype>* pDst, int dstStep, IppiSize roiSize);
Supported values for mod :8u_C1R

16u_C1R

8u_C3R

16u_C3R

836

Developer Guide and Reference for Intel® Integrated Performance Primitives

8u_C4R

16u_C4R

8u_AC4R

16u_AC4R

1

IppStatus ippiAlphaPremulC_<mod>(const Ipp<datatype>* const pSrc[4], int srcStep,
Ipp<datatype> alpha, Ipp<datatype>* const pDst[4], int dstStep, IppiSize roiSize);
Supported values for mod :8u_AP4R

16u_AP4R

Case 2: In-place operation
IppStatus ippiAlphaPremulC_<mod>(Ipp<datatype> alpha, Ipp<datatype>* pSrcDst, int
srcDstStep, IppiSize roiSize);
Supported values for mod :8u_C1IR

16u_C1IR

8u_C3IR

16u_C3IR

8u_C4IR

16u_C4IR

8u_AC4IR

16u_AC4IR

IppStatus ippiAlphaPremulC_<mod>(Ipp<datatype> alpha, Ipp<datatype>* const pSrcDst[4],int srcDstStep, IppiSize roiSize);
Supported values for mod :8u_AP4IR

16u_AP4IR

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

srcStep
pDst

dstStep

Pointer to the source image ROI for pixel-order data. An arrayof pointers to ROI in the separate source color planes in case ofplanar data.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the destination image ROI for pixel-order data. An
array of pointers to separate ROI in the destination color planes
in case of planar data.
Distance in bytes between starts of consecutive lines in thedestination image.

837

1

Intel® Integrated Performance Primitives Developer Guide and Reference

roiSize

Pointer to the source and destination image ROI or an array ofpointers to ROI in the separate source and destination color
planes for the in-place operation.
Distance in bytes between starts of consecutive lines in thesource and destination image for the in-place operation.
Size of the source and destination ROI in pixels.

alpha

Global alpha value used for pre-multiplying pixel values.

pSrcDstsrcDstStep

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts either a one-, three-, four-channel image or planar RGBA image to the pre-multipliedalpha form, using the global alpha value alpha. For one-, three-, four-channel image buffers, pixel values ineach channel are multiplied by α; for RGBA (pixel order and planar) images with (r,g,b,a) pixel values, newpixel values are (r*α, g*α, b*α, alpha) after execution of this function. Here α is the normalized alpha value
in the range 0 to 1.
The function ippiAlphaPremulC can be used for unsigned pixel data only.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointers is
NULL.
Indicates an error condition if roiSize has a field with zero or
negative value.

Image Color Conversion
This chapter describes image processing functions that perform different types of image color conversion.
The Intel IPP software supports the following image color conversions:•••

Color models conversion
Conversion from color to gray scale and vice versa
Different types of format conversion:

•
•
•
•
•

– from pixel-order to planar format and vice versa– changing number of channels or planes– changing sampling format– altering order of samples or planes
Gamma correction
Reduction from high bit resolution color to low bit resolution color
Intensity transformation using lookup tables
Color twist
Color keying

All Intel IPP color conversion functions perform point operations on pixels of the source image. For a given
destination pixel, the resultant channel values are computed using channel values of the corresponding
source pixel only, and not involving any neighborhood pixels. Thus, the rectangular region of interest (ROI,
see Regions of Interest in Intel IPP) used in function operations may extend to the size of the whole image.
This chapter starts with introductory material that discusses color space models essential for understandingof the Intel IPP color conversion functions.
For more information about color spaces and color conversion techniques, see [Jack01], [Rogers85], and[Foley90].

838

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Gamma Correction
Gamma correction of images is used to optimize the usage of data type depth when encoding an image bytaking advantage of the non-linear manner in which humans perceive light and color. This non-linearity must
be compensated to achieve correct color reproduction. To do this, luminance of each of the linear red, green,
and blue components is reduced to a non-linear form using an inverse transformation. This process is called
gamma correction.
The Intel IPP functions use the following basic equations to convert an RGB image to a gamma-corrected
R'G'B' image:for R,G,B < 0.018

R' = 4.5R
G' = 4.5G
B' = 4.5B
for R,G,B≥ 0.018

R' =1.099R0.45 - 0.099
G' =1.099G0.45 - 0.099
B' =1.099B0.45 - 0.099
Note that the channel intensity values are normalized to fit in the range [0..1]. The gamma value is equal to
1/0.45 = 2.22 in conformity with ITU Rec.709 specification (see [ITU709]).

CIE Chromaticity Diagram and Color Gamut
Figure CIE xyY Chromaticity Diagram and Color Gamut presents a diagram of all visible colors. It wasdeveloped as a result of the experimental investigations performed by CIE (International Commission on
Illumination, http://members.eunet.at/cie). The diagram presents visible colors as a function of x (red) and y(green) components called chromaticity coordinates. Positions of various spectrum colors (from violet tored) are indicated as the points of a tongue-shaped curve called spectrum locus. The straight line connecting
the ends of the curve is called the purple line. The point of equal energy represents the CIE standard forwhite light. Any point within the diagram represents some mixture of spectrum colors. The pure or fully
saturated colors lie on the spectrum locus. A straight-line segment joining any two points in the diagram
defines all color variations that can be obtained by additively combining these two colors. A triangle withvertices at any three points determine the gamut of colors that can be obtained by combining corresponding
three colors.
The structure of the human eye that distinguishes three different stimuli, establishes the three-dimensional
nature of color. The color may be described with a set of three parameters called tristimulus values, orcomponents. These values may, for example, be dominant wavelength, purity, and luminance, or so-called
primary colors: red, green, and blue.

839

1

Intel® Integrated Performance Primitives Developer Guide and Reference

The chromaticity diagram exhibits that the gamut of any three fixed colors cannot enclose all visible colors.
For example, Figure CIE xyY Chromaticity Diagram and Color Gamut shows schematically the gamut ofreproducible colors for the RGB primaries of a typical color CRT monitor, CMYK color printing, and for the
NTSC television.
CIE xyY Chromaticity Diagram and Color Gamut

Color Models
The purpose of a color model is to facilitate the specification of colors in some standard generally accepted
way. In essence, a color model is a specification of a 3-D coordinate system and a subspace within thatsystem where each color is represented by a single point.
Each industry that uses color employs the most suitable color model. For example, the RGB color model isused in computer graphics, YUV or YCbCr are used in video systems, PhotoYCC* is used in PhotoCD*
production and so on. Transferring color information from one industry to another requires transformationfrom one set of values to another. Intel IPP provides a wide number of functions to convert different color
spaces to RGB and vice versa.

840

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

RGB Color ModelIn the RGB model, each color appears as a combination of red, green, and blue. This model is called additive,
and the colors are called primary colors. The primary colors can be added to produce the secondary colors oflight (see Primary and Secondary Colors for RGB and CMYK Models) - magenta (red plus blue), cyan (green
plus blue), and yellow (red plus green). The combination of red, green, and blue at full intensities makes
white.
Primary and Secondary Colors for RGB and CMYK Models

The color subspace of interest is a cube shown in Figure RGB and CMY Color Models (RGB values arenormalized to 0..1), in which RGB values are at three corners; cyan, magenta, and yellow are the three othercorners, black is at their origin; and white is at the corner farthest from the origin.
The gray scale extends from black to white along the diagonal joining these two points. The colors are thepoints on or inside the cube, defined by vectors extending from the origin.
Thus, images in the RGB color model consist of three independent image planes, one for each primary color.
As a rule, the Intel IPP color conversion functions operate with non-linear gamma-corrected images R'G'B'.

841

1

Intel® Integrated Performance Primitives Developer Guide and Reference

The importance of the RGB color model is that it relates very closely to the way that the human eye
perceives color. RGB is a basic color model for computer graphics because color displays use red, green, andblue to create the desired color. Therefore, the choice of the RGB color space simplifies the architecture anddesign of the system. Besides, a system that is designed using the RGB color space can take advantage of alarge number of existing software routines, because this color space has been around for a number of years.
RGB and CMY Color Models

However, RGB is not very efficient when dealing with real-world images. To generate any color within the
RGB color cube, all three RGB components need to be of equal pixel depth and display resolution. Also, any
modification of the image requires modification of all three planes.

CMYK Color Model
The CMYK color model is a subset of the RGB model and is primarily used in color print production. CMYK isan acronym for cyan, magenta, and yellow along with black (noted as K). The CMYK color space issubtractive, meaning that cyan, magenta yellow, and black pigments or inks are applied to a white surface tosubtract some color from white surface to create the final color. For example (see Figure Primary andSecondary Colors for RGB and CMYK Models), cyan is white minus red, magenta is white minus green, andyellow is white minus blue. Subtracting all colors by combining the CMY at full saturation should, in theory,
render black. However, impurities in the existing CMY inks make full and equal saturation impossible, andsome RGB light does filter through, rendering a muddy brown color. Therefore, the black ink is added to CMY.
The CMY cube is shown in Figure RGB and CMY Color Models, in which CMY values are at three corners; red,green, and blue are the three other corners, white is at the origin; and black is at the corner farthest fromthe origin.

842

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

YUV Color Model
The YUV color model is the basic color model used in analogue color TV broadcasting. Initially YUV is the recoding of RGB for transmission efficiency (minimizing bandwidth) and for downward compatibility with blackand white television. The YUV color space is “derived” from the RGB space. It comprises the luminance (Y)and two color difference (U, V) components. The luminance can be computed as a weighted sum of red,green and blue components; the color difference, or chrominance, components are formed by subtracting
luminance from blue and from red.
The principal advantage of the YUV model in image processing is decoupling of luminance and color
information. The importance of this decoupling is that the luminance component of an image can beprocessed without affecting its color component. For example, the histogram equalization of the color image
in the YUV format may be performed simply by applying histogram equalization to its Y component.
There are many combinations of YUV values from nominal ranges that result in invalid RGB values, because
the possible RGB colors occupy only part of the YUV space limited by these ranges. Figure RGB Colors Cubein the YUV Color Space shows the valid color block in the YUV space that corresponds to the RGB color cube
RGB values that are normalized to [0..1]).
The Y'U'V' notation means that the components are derived from gamma-corrected R'G'B'. Weighted sumof these non-linear components forms a signal representative of luminance that is called lumaY'. (Luma isoften loosely referred to as luminance, so you need to be careful to determine whether a particular author
assigns a linear or non-linear interpretation to the term luminance).
The Intel IPP functions use the following basic equation ([Jack01]) to convert between gamma-corrected
R'G'B' and Y'U'V' models:Y'= 0.299*R' + 0.587*G' + 0.114*B'
U'= -0.147*R' - 0.289*G' + 0.436*B' = 0.492*(B'- Y')
V'= 0.615*R' - 0.515*G' - 0.100*B' = 0.877*(R'- Y')
R' = Y' + 1.140*V'
G' = Y' - 0.394*U' - 0.581*V'

843

1

Intel® Integrated Performance Primitives Developer Guide and Reference

B' = Y' + 2.032*U'
RGB Colors Cube in the YUV Color Space

There are several YUV sampling formats such as 4:4:4, 4:2:2, and 4:2:0 that are supported by the Intel IPP
color conversion functions and are described in Image Downsampling.

YCbCr and YCCK Color Models
The YCbCr color space is used for component digital video and was developed as part of the ITU-R BT.601
Recommendation. YCbCr is a scaled and offset version of the YUV color space.
The Intel IPP functions use the following basic equations [Jack01] to convert between R'G'B' in the range
0-255 and Y'Cb'Cr' (this notation means that all components are derived from gamma-corrected R'G'B'):

Y' = 0.257*R' + 0.504*G' + 0.098*B' + 16
Cb' = -0.148*R' - 0.291*G' + 0.439*B' + 128
Cr' = 0.439*R' - 0.368*G' - 0.071*B' + 128
R' = 1.164*(Y'-16) + 1.596*(Cr'-128)
G' = 1.164*(Y'-16) - 0.813*(Cr'-128) - 0.392*(Cb'-128)
B' = 1.164*(Y'-16) + 2.017*(Cb'-128)844

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Possible RGB colors occupy only part of the YCbCr color space (see Figure RGB Colors Cube in the YCbCr
Space) limited by the nominal ranges, therefore there are many YCbCr combinations that result in invalid
RGB values.
There are several YCbCr sampling formats such as 4:4:4, 4:2:2, 4:1:1, and 4:2:0, which are supported by
the Intel IPP color conversion functions and are described in Image Downsampling.
RGB Colors Cube in the YCbCr Space

PhotoYCC Color Model
The Kodak* PhotoYCC* was developed for encoding Photo CD* image data. It is based on both the ITU
Recommendations 601 and 709, using luminance-chrominance representation of color like in BT.601 YCbCr
and BT.709 ([ITU709]). This model comprises luminance (Y) and two color difference, or chrominance (C1,C2) components. The PhotoYCC is optimized for the color photographic material, and provides a color gamutthat is greater than the one that can currently be displayed.
The Intel IPP functions use the following basic equations [Jack01] to convert non-linear gamma-corrected

R'G'B' to Y'C'C':
Y' = 0.213*R' + 0.419*G' + 0.081*B'
C1' = -0.131*R' - 0.256*G' + 0.387*B'+ 0.612
C2' = 0.373*R' - 0.312*R' - 0.061*B' + 0.537
The equations above are given on the assumption that R',G', and B' values are normalized to the range[0..1].

845

1Intel® Integrated Performance Primitives Developer Guide and Reference

Since the PhotoYCC model attempts to preserve the dynamic range of film, decoding PhotoYCC images
requires selection of a color space and range appropriate for the output device. Thus, the decoding equations
are not always the exact inverse of the encoding equations. The following equations [Jack01] are used inIntel IPP to generate R'G'B' values for driving a CRT display and require a unity relationship between theluma in the encoded image and the displayed image:

R' = 0.981 * Y + 1.315 * (C2 - 0.537)
G' = 0.981 * Y - 0.311 * (C1 - 0.612)- 0.669 * (C2 - 0.537)
B' = 0.981 * Y + 1.601 * (C1 - 0.612)
The equations above are given on the assumption that source Y, C1 and C2 values are normalized to therange [0..1], and the display primaries have the chromaticity values in accordance with [ITU709]
specifications.
The possible RGB colors occupy only part of the YCC color space (see RGB Colors in the YCC Color Space)
limited by the nominal ranges, therefore there are many YCC combinations that result in invalid RGB values.
RGB Colors in the YCC Color Space

YCoCg Color Models
The YCoCg color model was developed to increase the effectiveness of the image compression [Malvar03].
This color model comprises the luminance (Y) and two color difference components (Co - offset orange, Cg offset green).

846

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

The Intel IPP functions use the following simple basic equations [Malvar03] to convert between RGB and
YCoCg:

Y = R/4 + G/2 + B/4
Co = R/2 - B/2
Cg = -R/4 + G/2 - B/4
R = Y + Co - Cg
G = Y + Cg
B = Y - Co - Cg
A variation of this color space which is called YCoCg-R, enables transformation reversibility with a smaller
dynamic range requirements than does YCoCg [Malvar03-1].
The possible RGB colors occupy only part of the YCoCg color space (see RGB Color Cube in the YCoCg ColorSpace) limited by the nominal ranges, therfore there are many YCoCg combinations that result in invalid RGB
values.
RGB Color Cube in the YCoCg Color SpaceHSV, and HLS Color Models
The HLS (hue, lightness, saturation) and HSV (hue, saturation, value) color models were developed to be
more “intuitive” in manipulating with color and were designed to approximate the way humans perceive andinterpret color.

847

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Hue defines the color itself. The values for the hue axis vary from 0 to 360 beginning and ending with red
and running through green, blue and all intermediary colors.

Saturation indicates the degree to which the hue differs from a neutral gray. The values run from 0, whichmeans no color saturation, to 1, which is the fullest saturation of a given hue at a given illumination.
Intensity component - lightness (HLS) or value (HSV), indicates the illumination level. Both vary from 0(black, no light) to 1 (white, full illumination). The difference between the two is that maximum saturation ofhue (S=1) is at value V=1 (full illumination) in the HSV color model, and at lightness L=0.5 in the HLS color
model.
The HSV color space is essentially a cylinder, but usually it is represented as a cone or hexagonal cone(hexcone) as shown in the Figure HSV Solid, because the hexcone defines the subset of the HSV space withvalid RGB values. The value V is the vertical axis, and the vertex V=0 corresponds to black color. Similarly, acolor solid, or 3D-representation, of the HLS model is a double hexcone (Figure HSV Solid) with lightness as
the axis, and the vertex of the second hexcone corresponding to white.

848

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Both color models have intensity component decoupled from the color information. The HSV color spaceyields a greater dynamic range of saturation. Conversions from RGBToHSV/RGBToHSV and vice-versa in Intel
IPP are performed in accordance with the respective pseudocode algorithms [Rogers85] given in thedescriptions of corresponding conversion functions.
HSV Solid

HLS Solid

849

1Intel® Integrated Performance Primitives Developer Guide and Reference

l'Eclairage). This model is based on three hypothetical primaries, XYZ, and all visible colors can be
represented by using only positive values of X, Y, and Z. The CIE XYZ primaries are hypothetical because
they do not correspond to any real light wavelengths. The Y primary is intentionally defined to match closely
to luminance, while X and Z primaries give color information. The main advantage of the CIE XYZ space (andany color space based on it) is that this space is completely device-independent. The chromaticity diagram in
Figure CIE xyY Chromaticity Diagram and Color Gamut is in fact a two-dimensional projection of the CIE XYZ
sub-space. Note that arbitrarily combining X, Y, and Z values within nominal ranges can easily lead to a color
outside of the visible color spectrum.
The position of the block of RGB-representable colors in the XYZ space is shown in RGB Colors Cube in the
XYZ Color Space.
RGB Colors Cube in the XYZ Color SpaceIntel IPP functions use the following basic equations [Rogers85], to convert between RGB and CIE XYZ
models:X = 0.412453*R + 0.35758 *G + 0.180423*B
Y = 0.212671*R + 0.71516 *G + 0.072169*B
Z = 0.019334*R + 0.119193*G + 0.950227*B
The equations for X,Y,Z calculation are given on the assumption that R,G, and B values are normalized to
the range [0..1].

R = 3.240479 * X - 1.53715 * Y - 0.498535 * Z
850

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

G = -0.969256 * X + 1.875991 * Y + 0.041556 * Z
B = 0.055648 * X - 0.204043 * Y + 1.057311 * Z
The equations for R,G, and B calculation are given on the assumption that X,Y, and Z values are in the range[0..1].

CIE LUV and CIE Lab Color Models
The CIE LUV and CIE Lab color models are considered to be perceptually uniform and are referred to as
uniform color models. Both are uniform derivations from the standard CIE XYZ space. “Perceptually uniform”
means that two colors that are equally distant in the color space are equally distant perceptually. To
accomplish this approach, a uniform chromaticity scale (UCS) diagram was proposed by CIE (Figure CIE u',v'Uniform Chromaticity Scale Diagram). The UCS diagram uses a mathematical formula to transform the XYZvalues or x, y coordinates (Figure CIE xyY Chromaticity Diagram and Color Gamut), to a new set of values
that present a visually more accurate two-dimensional model. The Y lightness scale is replaced with a newscale called L that is approximately uniformly spaced but is more indicative of the actual visual differences.
Chrominance components are U and V for CIE LUV, and a and b (referred to also respectively as red/blue andyellow/blue chrominances) in CIE Lab. Both color spaces are derived from the CIE XYZ color space.
CIE u',v' Uniform Chromaticity Scale Diagram

The CIE LUV color space is derived from CIE XYZ as follows ([Rogers85]),

L = 116. * (Y/Yn)1/3. - 16.
851

1Intel® Integrated Performance Primitives Developer Guide and Reference

U = 13. * L * (u - un)
V = 13. * L * (v - vn)
where

u = 4.*X / (X + 15.*Y + 3.*Z)
v = 9.*Y / (X + 15.*Y + 3.*Z)
un = 4.*xn / ( -2.*xn + 12.*yn + 3. )vn = 9.*yn / ( -2.*xn + 12.*yn + 3. )Inverse conversion is performed in accordance with equations:

Y = Yn * ((L + 16.) / 116.)3.
X = -9.* Y * u / ((u - 4.)* v - u * v )Z = (9.* Y - 15*v*Y - v*X) / 3. * v
whereu = U / (13.* L) + un
v = V / (13.* L) + vn
and un, vn are defined above.
Here xn = 0.312713, yn = 0.329016 are the CIE chromaticity coordinates of the D65 white point ([ITU709]),
and Yn = 1.0 is the luminance of the D65 white point. The values of the L component are in the range[0..100], U component in the range [-134..220], and V component in the range [-140..122].

852

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

The RGB-representable colors occupy only part of the LUV color space (see RGB Color Cube in the CIE LUVColor Space) limited by the nominal ranges, therefore there are many LUV combinations that result in invalid
RGB values.
RGB Color Cube in the CIE LUV Color Space

The CIE Lab color space is derived from CIE XYZ as follows:

L = 116. * (Y/Yn)1/3. - 16 for Y/Yn > 0.008856
L = 903.3 * (Y/Yn)1/3. for Y/Yn⩽ 0.008856
a = 500. * [f(X/Xn)-f(Y/Yn)]b = 200. * [f(Y/Yn)-f(Z/Zn)]
wheref(t) = t1/3. - 16 for t > 0.008856
f(t) = 7.787*t + 16/116 for t ⩽ 0.008856
Here Yn = 1.0 is the luminance, and Xn = 0.950455, Zn = 1.088753 are the chrominances for the D65 white
point.
The values of the L component are in the range [0..100], a and b component values are in the range[-128..127].
Inverse conversion is performed in accordance with equations:

853

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Y = Yn * P3.
X = Xn * (P + a/500.)3.
Z = Zn * (P - b/200.)3.
where

P = (L +16)/116.

Image Downsampling
Conventionally, digital color images are represented by setting specific values of the color space coordinates
for each pixel. Color spaces with decoupled luminance and chrominance coordinates (YUV type) allow thenumber of bits required for acceptable color description of an image to be reduced. This reduction is basedon greater sensitivity of the human eye to changes in luminance than to changes in chrominance. The idea
behind this approach is to set individual value of luminance component to each pixel, while assigning thesame color (chrominance components) to certain groups of pixels (sometimes called macropixels) inaccordance with some specific rules. This process is called downsampling and there are different sampling
formats depending on the underlying scheme.
The following sampling formats are supported by the Intel IPP image processing functions (excluding theJPEG functions):

4:4:4 YUV (YCbCr) - conventional format, no downsampling, Y, U(Cb), V(Cr) components are sampled atevery pixel. If each component takes 8 bits, than every pixel requires 24 bits. This format is often denoted as
YUV (YCbCr) with the 4:4:4 descriptor omitted.
4:2:2 YUV (YCbCr) - uses the 2:1 horizontal downsampling. It means that the Y component is sampled ateach pixel, while U(Cb) and V(Cr) components are sampled every 2 pixels in horizontal direction. If eachcomponent takes 8 bits, the pair of pixels requires 32 bits.
4:1:1 YCbCr - uses the 4:1 horizontal downsampling. It means that the Y component is sampled at eachpixel, while Cb and Cr components are sampled every 4 pixels horizontally. If each component takes 8 bits,
each four horizontal pixels require 48 bits.

4:2:0 YUV (YCbCr) - uses the 2:1 horizontal downsampling and the 2:1 vertical downsampling. Y is

sampled at each pixel, U(Cb) and V(Cr) are sampled at every block of 2x2 pixels. If each component takes 8
bits, each four-pixel block requires 48 bits.
In JPEG compression, downsampling has specific distinctive features and is denoted in a slightly different
way. In JPEG domain, sampling formats determine the structure of minimal coded units, or MCUs. Therefore,
the Intel IPP functions specific for a JPEG codec, support the following sampling formats:

4:4:4 YCbCr - for every 8x8 block of Y samples, there is one 8x8 block of each Cb and Cr samples.
4:2:2 YCbCr - for every two horizontal 8x8 blocks of Y samples, there is one 8x8 block of each Cb and Cr
samples.

4:1:1 YCbCr - for every four (two in horizontal and two in vertical direction) 8x8 blocks of Y samples, there
is one 8x8 block of each Cb and Cr samples.

854

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Structure of the corresponding MCU for each of these sampling formats is shown in Figure MCU Structure forDifferent JPEG Sampling Formats.
MCU Structure for Different JPEG Sampling Formats

RGB Image Formats
In addition to the 24-bit-per-pixel RGB/BGR image formats, the Intel IPP color conversion functions support
32-bit-per-pixel RGB/BGR formats, which include three RGB channels plus alpha channel. For 24-bit formats,each color is one byte, every pixel is three bytes. For 32-bit formats, each color is one byte and alphacomponent is one byte, which yields four bytes per pixel. Memory layout for these formats is given in Table“Pixel-Order Image Formats”.
For 16-bit formats, every pixel is two bytes and each color occupies a specified number of bits. The figure
below shows all the supported 16-bit-per-pixel formats and their memory layout (bit order):16-bit pixel formats

855

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Pixel and Planar Image Formats
Data storage for an image can be pixel-oriented or planar-oriented (planar). For images in pixel order, allchannel values for each pixel are clustered and stored consecutively. Their layout depends on the color modeland downsampling scheme.
Table “Pixel-Order Image Formats” lists all pixel-order image formats that are supported by the Intel IPP
color conversion functions and shows the corresponding channel values order (here, group of underlined
symbols represents one pixel and symbol A denotes alpha-channel value). The last column of this table gives
an example of an Intel IPP color conversion function that uses the respective image format.
Pixel-Order Image Formats
Image
FormatNumberofChannels

Channel Values Order

ExampleRGB

3

R0 G0 B0 R1 G1 B1 R2 G2 B2ippiRGBTToYUV_8u_C3R

RGB444ippiYCbCrToRGB444_8u16u_C3R

RGB555ippiYCbCrToRGB555_8u16u_C3R

RGB565ippiYCbCrToRGB565_8u16u_C3R

RGB

4

R0 G0 B0 A0 R1 G1 B1 A1

ippiRGBToYUV_8u_AC4R

BGR

3

B0 G0 R0 B1 G1 R1 B2 G2 R2ippiYCbCrToBGR_8u_P3C3R

BGR444ippiYCbCrToBGR444_8u16u_C3R

BGR555ippiYCbCrToBGR555_8u16u_C3R

BGR565ippiYCbCrToBGR565_8u16u_C3R

BGR

4

B0 G0 R0 A0 B1 G1 R1 A1ippiBGRToHLS_8u_A C4R

YUV3Y0 U0 V0 Y1 U1 V1 Y2 U2 V2ippiYUVToRGB_8u_ C3R

YUV4

Y0 U0 V0 A0 Y1 U1 V1 A1

ippiYUVToRGB_8u_A C4R

4:2:2 YUV2

Y0 U0 Y1 V0 Y2 U1 Y3 V1

ippiYUV422T0RGB_8u_ C2C3R

YCbCr

3

Y0 Cb0 Cr0 Y1 Cb1 Cr1ippiYCbCrToRGB_8u_ C3R

YCbCr

4

Y0 Cb0 Cr0 A0 Y1 Cb1 Cr1 A1

ippiYCbCrToRGB_8u_A C4R

4:2:2 YCbCr

2

Y0 Cb0 Y1 Cr0 Y2 Cb1 Y3 Cr1

ippiYCbCr422ToRGB_8u_ C2C3R

4:2:2 YCrCb

2

Y0 Cr0 Y1 Cb0 Y2 Cr1 Y3 Cb1

ippiYCrCb422ToYCbCr422_8u_
C2P3R

4:2:2 CbYCr

2

Cb0 Y0 Cr0 Y1 Cb1 Y2 Cr1 Y3

ippiCbYCr422ToRGB_8u_ C2C3R

XYZ

3X0 Y0 Z0 X1 Y1 Z1 X2 Y2 Z2ippiXYZToRGB_8u_ C3R

XYZ

4

X0 Y0 Z0 X1 Y1 Z1 X2 Y2 Z2ippiXYZToRGB_16u_A C4R

LUV

3

L0 U0 V0 L1 U1 V1 L2 U2 V2ippiLUVToRGB_16s_ C3R

LUV

4

L0 U0 V0 A0 L1 U1 V1 A1ippiLUVToRGB_32f_A C4R

YCC

3Y0 C0 C0 Y1 C1 C1 Y2 C2 C2ippiYCCToRGB_8u_C3R

YCC

4

Y0 C0 C0 A0 Y1 C1 C1 A1ippiYCCToRGB_8u_A C4R

HLS

3

H0 L0 S0 H1 L1 S1 H2 L2 S2ippiHLSToRGB_16u_C3R

856

Developer Guide and Reference for Intel® Integrated Performance Primitives

Image
FormatNumberofChannels

Channel Values Order

ExampleHLS

4

H0 L0 S0 A0 H1 L1 S1 A0

ippiHLSToRGB_16u_AC4R

HSV

3

H0 S0 V0 H1 S1 V1 H2 S2 V2ippiHSVToRGB_16s_C3R

HSV

4

H0 S0 V0 A0 H1 S1 C1 A1ippiHSVToRGB_16s_AC4R

1

Planar image formats supported by the Intel IPP color conversion functions are listed in Table “Planar Image
Formats” along with examples of the Intel IPP functions using that format. Planes layout and their relative
sizes are shown in Figure Plane Size and Layout: 3-planes Images and Figure Plane Size and Layout: 2planes Images.
Planar Image Formats
Image
FormatNumbe
r ofPlanesRGB

Planes Layout

Example

pl.
1

pl.2

pl.
3

3

R

G

B

see Figure below, aippiRGBToYUV_8u_P3R

YUV

3

Y

U

V

see Figure below, a

ippiYUVToRGB_8u_P3R

4:2:2 YUV

3

Y

U

V

see Figure below, b

ippiYUV422ToRGB_8u_P3

4:2:0 YUV

3

Y

U

V

see Figure below, d

ippiYUV420ToRGB_8uP3C3R

YCbCr

3

Y

Cb

Cr

see Figure below, a

ippiYCbCrToRGB_8u_P3R

4:2:2
YCbCr

3

Y

Cb

Cr

see Figure below, b

ippiYCbCr422_8u_P3C2R

4:1:1
YCbCr

3

Y

Cb

Cr

see Figure below, c

ippiYCbCr411_8u_P3P2R

4:1:1
YCbCr

2

Y

CbCr

-

see Figure below for
2-planes images, a

ippiYCbCr411_8u_P2P3R

4:2:0
YCbCr

3

Y

Cb

Cr

see Figure below, dippiRGBToYCbCr420_8u_C3P3R

4:2:0
YCbCr

2

Y

CbCr

-

see Figure below for
2-planes images, b

ippiYCbCr420_8u_P2P3R

857

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Image
FormatNumbe
r ofPlanes

4:2:0
YCrCb

3

Planes Layout
pl.
1

pl.2

pl.
3

Y

Cr

Cb

Plane Size and Layout - 3-planes Images

Plane Size and Layout - 2-planes Images858

see Figure below, dExampleippiYCrCb420ToYCbCr422_8u_P3R

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Color Model Conversion
RGBToYUV
Converts an RGB image to the YUV color model.

SyntaxCase 1: Operation on pixel-order data
IppStatus ippiRGBToYUV_<mod>(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int dstStep,
IppiSize roiSize);
Supported values for mod:8u_C3R

8u_AC4R

Case 2: Operation on planar data
IppStatus ippiRGBToYUV_8u_P3R(const Ipp8u* pSrc[3], int srcStep, Ipp8u* pDst[3], int
dstStep, IppiSize roiSize);

Case 3: Conversion from pixel-order to planar data
IppStatus ippiRGBToYUV_8u_C3P3R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst[3],int
dstStep, IppiSize roiSize);
IppStatus ippiRGBToYUV_8u_AC4P4R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst[4], int
dstStep, IppiSize roiSize);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc

srcStep
pDst

dstStep
roiSize

Pointer to the source image ROI for pixel-order data. An arrayof pointers to the source image ROI in separate color planes incase of planar data.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the destination ROI for pixel-order data. An array ofpointers to destination buffers in separate color planes in caseof planar data.
Distance in bytes between starts of consecutive lines in thedestination image.
Size of the source and destination ROI in pixels.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts the gamma-corrected R'G'B' image pSrc to the Y'U'V' image pDst (see Figure
Converting an RGB image to YUV) according to the following formulas:

Y' = 0.299*R' + 0.587*G' + 0.114*B'859

1Intel® Integrated Performance Primitives Developer Guide and Reference

U' = -0.147*R' - 0.289*G' + 0.436*B' = 0.492*(B'-Y')V' = 0.615*R' - 0.515*G' - 0.100*B' = 0.877*(R'-Y')
For digital RGB values in the range [0..255], Y' has the range [0..255], U varies in the range [-112..+112],
and V in the range [-157..+157]. To fit in the range of [0..255], a constant value 128 is added to computed U
and V values, and V is then saturated.
Converting an RGB image to YUV

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pSrc or pDst pointer is NULL.
Indicates an error condition if roiSize has a field with a zero or
negative value.

ExampleThe code example below shows how to use the function ippiRGBToYUV_8u_C3R.

# define nChannels 3
int main () {Ipp 8 u src [3*3* nChannels ] = {255, 0, 0, 255, 0, 0, 255, 0, 0,
0, 255, 0, 0, 255, 0, 0, 255, 0,
0, 0, 255, 0, 0, 255, 0, 0, 255};
Ipp 8 u dst [3*3* nChannels ];IppiSize roiSize = { 3, 3 };IppStatus st = ippStsNoErr ;int srcStep = 3* nChannels ;int dstStep = 3* nChannels ;st = ippiRGBToYUV _8 u _ C 3 R ( src , srcStep , dst , dstStep , roiSize );if ( st == ippStsNoErr){
printf("\n ************* passed ****************\n");}else{
printf("\n ************* failed ****************\t");}return 0;}860

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Result:

255
0
0 255
0
0 255
0
0
0 255
0
0 255
0
0 255
0
0
0 255
0
0 255
0
0 255

src

76 90 255 76 90 255 76 90 255
149 540 149 54
0 149 540
29 239 102 29 239 102 29 239 102

dst

YUVToRGB
Converts a YUV image to the RGB color model.

SyntaxCase 1: Operation on pixel-order data
IppStatus ippiYUVToRGB_<mod>(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int dstStep,
IppiSize roiSize);
Supported values for mod:8u_C3R
8u_AC4R
IppStatus ippiYUVToRGB_8u_C3C4R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int
dstStep, IppiSize roiSize, Ipp8u aval);

Case 2: Operation on planar data
IppStatus ippiYUVToRGB_8u_P3R(const Ipp8u* pSrc[3], int srcStep, Ipp8u* pDst[3], int
dstStep, IppiSize roiSize);

Case 3: Conversion from planar to pixel-order data
IppStatus ippiYUVToRGB_8u_P3C3R(const Ipp8u* pSrc[3], int srcStep, Ipp8u* pDst, int
dstStep, IppiSize roiSize);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pDst

dstStep

Pointer to the source buffer for pixel-order data. An array ofpointers to separate source color planes in case of planar data.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the destination buffer for pixel-order data. An arrayof pointers to separate destination color planes in case ofplanar data.
Distance in bytes between starts of consecutive lines in thedestination image.

861

1

Intel® Integrated Performance Primitives Developer Guide and ReferenceavalConstant value to create the fourth channel.

roiSize

Size of the source and destination ROI in pixels.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts the Y'U'V' image pSrc to the gamma-corrected R'G'B' image pDst according to thefollowing formulas:

R' = Y' + 1.140*V'
G' = Y' - 0.394*U' - 0.581*V'
B' = Y' + 2.032*U'

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pSrc or pDst is NULL.
Indicates an error condition if roiSize has a field with a zero or
negative value.

RGBToYUV422
Converts an RGB image to the YUV color model; uses
4:2:2 sampling.

SyntaxCase 1: Operation on pixel-order data
IppStatus ippiRGBToYUV422_8u_C3C2R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int
dstStep, IppiSize roiSize);

Case 2: Operation on planar data with ROI
IppStatus ippiRGBToYUV422_8u_P3R(const Ipp8u* pSrc[3], int srcStep, Ipp8u* pDst[3], int
dstStep[3], IppiSize roiSize);

Case 3: Operation on planar data without ROI
IppStatus ippiRGBToYUV422_8u_P3(const Ipp8u* pSrc[3], Ipp8u* pDst[3], IppiSize
imgSize);

Case 4: Conversion from pixel-order to planar data with ROI
IppStatus ippiRGBToYUV422_8u_C3P3R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst[3], int
dstStep[3], IppiSize roiSize);

Case 5: Conversion from pixel-order to planar data without ROI
IppStatus ippiRGBToYUV422_8u_C3P3(const Ipp8u* pSrc, Ipp8u* pDst[3], IppiSize imgSize);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

862

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Parameters
pSrc

srcStep
pDst

dstStep

roiSize
imgSize

Pointer to the source image buffer for pixel-order image. An
array of pointers to the source image buffer in each color plane
for planar image.
Distance in bytes between starts of consecutive lines in thesource image for operations with ROI.
Pointer to the destination image buffer for pixel-order image.
An array of pointers to the destination image buffer in eachcolor plane for planar image.
Distance in bytes between starts of consecutive lines in thedestination image for operations with ROI. An array of threevalues for planar image.
Size of the source and destination ROI in pixels.
Size of the source and destination images in pixels for
operations without ROI.

Description
This function converts the gamma-corrected R'G'B' image pSrc to the Y'U'V' image pDst with 4:2:2
sampling format, according to the same formulas as the function ippiRGBToYUV does. For more details on
this sampling format, see Table “Pixel-Order Image Formats” and Table “Planar Image Formats”.
For digital RGB values in the range [0..255], Y' has the range [0..255], U varies in the range [-112..+112],
and V in the range [-157..+157]. To fit in the range of [0..255], the constant value 128 is added to computed
U and V values, and V is then saturated.
Some function flavors operates with ROI (see Regions of Interest in Intel IPP). The function flavors that does
not use ROI operate on the assumption that both the source and destination images have the same size andoccupy a contiguous memory area, which means that image rows are not padded with zeroes. In this casethe step parameters are not needed.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pSrc or pDst pointer is NULL.
Indicates an error condition if roiSize or imgSize has a fieldwith a zero or negative value.

YUV422ToRGB
Converts a YUV image with the 4:2:2 sampling to the
RGB color model.

SyntaxCase 1: Operation on pixel-order data
IppStatus ippiYUV422ToRGB_8u_C2C3R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int
dstStep, IppiSize roiSize);

Case 2: Operation on planar data with ROI
IppStatus ippiYUV422ToRGB_8u_P3R(const Ipp8u* pSrc[3], int srcStep[3], Ipp8u* pDst[3],int dstStep, IppiSize roiSize);

863

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Case 3: Operation on planar data without ROI
IppStatus ippiYUV422ToRGB_8u_P3(const Ipp8u* pSrc[3], Ipp8u* pDst[3], IppiSize
imgSize);

Case 4: Conversion from planar to pixel-order data with ROI
IppStatus ippiYUV422ToRGB_<mod>(const Ipp8u* pSrc[3], int srcStep[3], Ipp8u* pDst, int
dstStep, IppiSize roiSize);
Supported values for mod:8u_P3C3R

8u_P3AC4R

Case 5: Conversion from planar to pixel-order data without ROI
IppStatus ippiYUV422ToRGB_8u_P3C3(const Ipp8u* pSrc[3], Ipp8u* pDst, IppiSize imgSize);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc

srcStep

pDst

dstStep
roiSize
imgSize

Pointer to the source image buffer for pixel-order image. An
array of pointers to the source image buffer in each color plane
for planar image.
Distance in bytes between starts of consecutive lines in thesource image for operations with ROI. An array of three values
in case of planar image.
Pointer to the destination image buffer for pixel-order image.
An array of pointers to the destination image buffers in eachcolor plane for planar image.
Distance in bytes between starts of consecutive lines in thedestination image for operations with ROI.
Size of the source and destination ROI in pixels.
Size of the source and destination images in pixels for
operations without ROI.

Description
This function converts the Y'U'V' image pSrc to the gamma-corrected R'G'B' image pDst according to thesame formulas as the function ippiYUVToRGB does. The difference is that ippiYUV422ToRGB4:2:0
sampling the input data to be in 4:2:2 sampling format (see Table “Pixel-Order Image Formats” and Table“Planar Image Formats” for more details).
The function ippiYUV422ToRGB_P3AC4R additionally creates an alpha channel in the destination image withalpha values set to zero.
Some function flavors operates with ROI (see Regions of Interest in Intel IPP). The function flavors that do
not use ROI operate on the assumption that both the source and destination images have the same size andoccupy a contiguous memory area, which means that image rows are not padded with zeroes. In this casethe step arguments are not needed.

864

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pSrc or pDst is NULL.
ndicates an error condition if roiSize or imgSize has a fieldwith a zero or negative value.

RGBToYUV420
Converts an RGB image to the 4:2:0 YUV image.

SyntaxCase 1: Operation on planar data with ROI
IppStatus ippiRGBToYUV420_8u_P3R(const Ipp8u* pSrc[3], int srcStep, Ipp8u* pDst[3], int
dstStep[3], IppiSize roiSize);

Case 2: Operation on planar data without ROI
IppStatus ippiRGBToYUV420_8u_P3(const Ipp8u*pSrc[3], Ipp8u* pDst[3], IppiSize imgSize);

Case 3: Conversion from pixel-order to planar data with ROI
IppStatus ippiRGBToYUV420_8u_C3P3R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst[3], int
dstStep[3], IppiSize roiSize);

Case 4: Conversion from pixel-order to planar data without ROI
IppStatus ippiRGBToYUV420_8u_C3P3(const Ipp8u* pSrc, Ipp8u* pDst[3], IppiSize imgSize);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc

srcStep
pDst
dstStep

roiSize
imgSize

Pointer to the source image buffer for pixel-order image. An
array of pointers to the source image buffers in each color
plane for planar image.
Distance in bytes between starts of consecutive lines in thesource image for operations with ROI.
An array of pointers to the destination image buffers in eachcolor plane.
An array of distances in bytes between starts of consecutive
lines in each plane of the destination image for operations with
ROI.
Size of the source and destination ROI in pixels.
Size of the source and destination images in pixels for
operations without ROI.

865

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Description
This function converts the gamma-corrected R'G'B' image pSrc to the Y'U'V' image pDst with the 4:2:0
sampling (see Table “Planar Image Formats” for more details). The conversion is performed in theaccordance with the same formulas as the function ippiRGBToYUV does.
For digital RGB values in the range [0..255], Y' has the range [0..255], U varies in the range [-112..+112],
and V in the range [-157..+157]. To fit in the range of [0..255], a constant value 128 is added to computed U
and V values, and V is then saturated.
Some function flavors operates with ROI see Regions of Interest in Intel IPP).
The function flavors that does not use ROI operate on the assumption that both the source and destination
images have the same size and occupy a contiguous memory area, which means that image rows are notpadded with zeroes. In this case the step parameters are not needed.

roiSize.width (imgSize.width) and roiSize.height (imgSize.height) should be multiples of 2.
Otherwise, the function reduces their original values to the nearest multiples of 2, performs operation, andreturns warning message.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsDoubleSize

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pSrc or pDst is NULL.
Indicates an error condition if roiSize or imgSize has a fieldwith a zero or negative value.
Indicates a warning if roiSize or imgSize has a field that is nota multiple of 2.

YUV420ToRGB
Converts a YUV image that has 4:2:0 sampling format
to the RGB image.

SyntaxCase 1: Operation on planar data with ROI
IppStatus ippiYUV420ToRGB_8u_P3R(const Ipp8u* pSrc[3], int srcStep[3], Ipp8u* pDst[3],int dstStep, IppiSize roiSize);

Case 2: Operation on planar data without ROI
IppStatus ippiYUV420ToRGB_8u_P3(const Ipp8u* pSrc[3], Ipp8u* pDst[3], IppiSize
imgSize);

Case 3: Conversion from planar to pixel-order data with ROI
IppStatus ippiYUV420ToRGB_<mod>(const Ipp8u* pSrc[3], int srcStep[3], Ipp8u* pDst, int
dstStep, IppiSize roiSize);
Supported values for mod:8u_P3C3R

8u_P3AC4R

Case 4: Conversion from planar to pixel-order data without ROI
IppStatus ippiYUV420ToRGB_8u_P3C3(const Ipp8u* pSrc[3], Ipp8u* pDst, IppiSize imgSize);

Include Files
ippcc.h866

1Developer Guide and Reference for Intel® Integrated Performance Primitives

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pDst

dstStep

An array of pointers to the source image buffers in each color
plane.
An array of distances in bytes between starts of consecutive
lines in each source image planes for operations with ROI.
Pointer to the destination image buffer for pixel-order images.
An array of pointers to the destination image buffers in eachcolor plane for planar images.
Distance in bytes between starts of consecutive lines in thedestination image for operations with ROI.

roiSize

Size of the source and destination ROI in pixels.

imgSize

Size of the source and destination images in pixels for
operations without ROI.

Description
This function converts the Y'U'V' image pSrc to the gamma-corrected R'G'B' image pDst according to thesame formulas as the function ippiYUVToRGB does. The difference is that ippiYUV420ToRGB4:2:0
sampling the input data to be in 4:2:2 sampling format (see Table “Planar Image Formats” for moredetails).
The function ippiYUV420ToRGB_P3AC4R additionally creates an alpha channel in the destination image withalpha values set to zero.
Some function flavors operates with ROI see Regions of Interest in Intel IPP ).
The function flavors that does not use ROI operate on the assumption that both the source and destination
images have the same size and occupy a contiguous memory area, which means that image rows are notpadded with zeroes. In this case the step parameters are not needed.

roiSize.width (imgSize.width) and roiSize.height (imgSize.height) should be multiples of 2.
Otherwise, the function reduces their original values to the nearest multiples of 2, performs operation, andreturns warning message.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsDoubleSize

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pSrc or pDst pointer is NULL.
Indicates an error condition if roiSize or imgSize has a fieldwith a zero or negative value.
Indicates a warning if roiSize or imgSize has a field that is nota multiple of 2.

BGRToYUV420
Converts an BGR image to the YUV color model; uses
4:2:0 sampling

867

1

Intel® Integrated Performance Primitives Developer Guide and Reference

SyntaxIppStatus ippiBGRToYUV420_8u_AC4P3R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst[3], int
dstStep[3], IppiSize roiSize);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pDst
dstStep
roiSize

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
An array of pointers to the destination image buffers in eachcolor plane.
An array of distances in bytes between starts of consecutive
lines in each plane of the destination image.
Size of the source and destination ROI in pixels.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts the gamma-corrected B'G'R' image pSrc to the Y'U'V' image pDst with the 4:2:0
sampling (see Table “Planar Image Formats” for more details). The function uses the same formulas as thefunction ippiRGBToYUV does.
For digital BGR values in the range [0..255], Y' varies in the range [0..255], U - in the range [-112..+112],
and V - in the range [-157..+157]. To fit in the range of [0..255], a constant value 128 is added to thecomputed U and V values, and V is then saturated.

roiSize.width and roiSize.height should be multiples of 2. If not the function reduces their originalvalues to the nearest multiples of 2, performs operation, and returns warning message.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsDoubleSize

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pSrc or pDst is NULL.
Indicates an error condition if roiSize or imgSize has a fieldwith a zero or negative value.
Indicates a warning if roiSize or imgSize has a field that is nota multiple of 2.

YUV420ToBGRConverts a YUV image that has 4:2:0 sampling to the
BGR image.

868

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

SyntaxIppStatus ippiYUV420ToBGR_8u_P3C3R(const Ipp8u* pSrc[3], int srcStep[3], Ipp8u* pDst,
int dstStep, IppiSize roiSize);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pDst
dstStep
roiSize

An array of pointers to ROI in each color plane in the source
image.
An array of distances in bytes between starts of consecutive
lines in the source image planes.
Pointer to the destination image ROI.
Distance in bytes between starts of consecutive lines in thedestination image.
Size of the source and destination ROI in pixels.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts the Y'U'V' image pSrc to the gamma-corrected B'G'R' image pDst according to thesame formulas as the function ippiYUVToRGB does. The input data must be presented in the 4:2:0
sampling format (see Table “Planar Image Formats” for more details).

roiSize.width and roiSize.height should be multiples of 2. Otherwise, the function reduces their
original values to the nearest multiples of 2, performs operation, and returns warning message.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsDoubleSize

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pSrc or pDst is NULL.
Indicates an error condition if roiSize has a field with a zero or
negative value.
Indicates a warning if roiSize has a field that is not a multiple
of 2.

YUV422v210ToRGB, YUV422v210ToBGRConverts a YUV422 (v210) image to a RGB/BGR
image for ITU-R BT.709 HDTV signal.

SyntaxIppStatus ippiYUV422v210ToRGB_709HDTV_32u16u_C3(const Ipp32u* pSrc, int srcStep,
Ipp16u* pDst, int dstStep, IppiSize roiSize);

869

1

Intel® Integrated Performance Primitives Developer Guide and Reference

IppStatus ippiYUV422v210ToBGR_709HDTV_32u16u_C3(const Ipp32u* pSrc, int srcStep,
Ipp16u* pDst, int dstStep, IppiSize roiSize);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pDst
dstStep
roiSize

Pointer to the source image ROI.
Distance, in bytes, between starts of consecutive lines in thesource image.
Pointer to the destination image ROI.
Distance, in bytes, between starts of consecutive lines in thedestination image.
Size of the source and destination ROI in pixels.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts the YUV image pSrc, packed in the 4:2:2 sampling format, to the gamma-corrected
RGB/BGR image pDst for digital component video signals in compliance with the ITU-R BT.709
Recommendation [ITU709] for high-definition TV (HDTV). The source YUV image has the following sequenceof bytes: UYV|YUY|VYU|YVY, ... . The conversion is performed according to the following formulas:

R = Y + 1.540*(V - 512)
G = Y - 0.459*(V - 512) - 0.183*(U - 512)
B = Y + 1.816*(U - 512)
The output RGB/BGR values are saturated to the range R [0..31], G [0..63], B [0..31].

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pSrc or pDst is NULL.
Indicates an error condition if roiSize has a field with a zero or
negative value.

YUV422v210ToGray
Converts a YUV422 (v210) image to a grayscale
image for ITU-R BT.709 HDTV signal

SyntaxIppStatus ippiYUV422v210ToGray_709HDTV_32u16u_C3C1(const Ipp32u* pSrc, int srcStep,
Ipp16u* pDst, int dstStep, IppiSize roiSize);870

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
Pointer to the source image ROI.

pSrc

Distance, in bytes, between starts of consecutive lines in thesource image.
Pointer to the destination image ROI.

srcStep
pDst

Distance, in bytes, between starts of consecutive lines in thedestination image.
Size of the source and destination ROI in pixels.

dstStep
roiSize

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts the YUV image pSrc, packed in the 4:2:2 sampling format, to the grayscale 16U_C1
image pDst for digital component video signals in compliance with the ITU-R BT.709 Recommendation[ITU709] for high-definition TV (HDTV). The source YUV image has the following sequence of bytes: UYV|YUY|VYU|YVY, ... .

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pSrc or pDst is NULL.
Indicates an error condition if roiSize has a field with a zero or
negative value.

RGBToYCbCr
Converts an RGB image to the YCbCr color model.

SyntaxCase 1: Operation on pixel-order data
IppStatus ippiRGBToYCbCr_<mod>(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int
dstStep, IppiSize roiSize);
Supported values for mod:8u_C3R

8u_AC4R

Case 2: Operation on planar data
IppStatus ippiRGBToYCbCr_8u_P3R(const Ipp8u* pSrc[3], int srcStep, Ipp8u* pDst[3], int
dstStep, IppiSize roiSize);

871

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Case 3: Conversion from pixel-order to planar data
IppStatus ippiRGBToYCbCr_<mod>(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst[3], int
dstStep, IppiSize roiSize);
Supported values for mod:8u_C3P3R

8u_AC4P3R

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc

srcStep
pDst
dstStep
roiSize

Pointer to the source image ROI for a pixel-order image. An
array of pointers to ROI in each separate source color planes
for planar images.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the destination imnage ROI. Array of pointers to ROI
in the separate destination color planes for planar images.
Distance in bytes between starts of consecutive lines in thedestination image.
Size of the source and destination ROI in pixels.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts the gamma-corrected R'G'B' image pSrc with values in the range [0..255] to the
Y'Cb'Cr' image pDst according to the following formulas:

Y' = 0.257*R' + 0.504*G' + 0.098*B' + 16
Cb' = -0.148*R' - 0.291*G' + 0.439*B' + 128
Cr' = 0.439*R' - 0.368*G' - 0.071*B' + 128
In the YCbCr model, Y is defined to have a nominal range [16..235], while Cb and Cr are defined to have arange [16..240], with the value of 128 as corresponding to zero.
Both the source and destination images have the same bit depth.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

872

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pSrc or pDst is NULL.
Indicates an error condition if roiSize has a field with a zero or
negative value.

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

YCbCrToRGB
Converts a YCbCr image to the RGB color model.

SyntaxCase 1: Operation on pixel-order data
IppStatus ippiYCbCrToRGB_<mod>(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int
dstStep, IppiSize roiSize);
Supported values for mod:8u_C3R

8u_AC4R

Case 2: Operation on planar data
IppStatus ippiYCbCrToRGB_8u_P3R(const Ipp8u* pSrc[3], int srcStep, Ipp8u* pDst[3], int
dstStep, IppiSize roiSize);
IppStatus ippiYCbCrToRGB_8u_P3C3R(const Ipp8u* pSrc[3], int srcStep, Ipp8u* pDst, int
dstStep, IppiSize roiSize);

Case 3: Conversion from planar to pixel-order data
IppStatus ippiYCbCrToRGB_8u_P3C4R(const Ipp8u* pSrc[3], int srcStep, Ipp8u* pDst , int
dstStep, IppiSize roiSize, Ipp8u aval);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters

roiSize

Pointer to the source image ROI for pixel-order image. Array ofpointers to the ROI in each separate source color planes forplanar images.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the destination image ROI. Array of pointers to the
ROI in the separate destination color planes for planar images.
Distance in bytes between starts of consecutive lines in thedestination image.
Size of the source and destination ROI in pixels.

aval

Constant value to create the fourth channel.

pSrc

srcStep
pDst
dstStep

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts the Y'Cb'Cr' image pSrc to the 24-bit gamma-corrected R'G'B' image pDst. The
following formulas are used for conversion:

R' = 1.164*(Y' - 16) + 1.596*(Cr' - 128)
G' = 1.164*(Y' - 16) - 0.813*(Cr' - 128) - 0.392*(Cb' - 128)
B' = 1.164*(Y' - 16) + 2.017*(Cb' - 128)873

1Intel® Integrated Performance Primitives Developer Guide and Reference

The output R'G'B' values are saturated to the range [0..255].
The fourth channel is created by setting channel values to the constant value aval.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pSrc or pDst pointer is NULL.
Indicates an error condition if roiSize has a field with a zero or
negative value.

YCbCrToBGRConverts a YCbCr image to the BGR color model.

SyntaxIppStatus ippiYCbCrToBGR_8u_P3C3R(const Ipp8u* pSrc[3], int srcStep, Ipp8u* pDst, int
dstStep, IppiSize roiSize);
IppStatus ippiYCbCrToBGR_8u_P3C4R(const Ipp8u* pSrc[3], int srcStep, Ipp8u* pDst, int
dstStep, IppiSize roiSize, Ipp8u aval);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pDst

An array of pointers to ROI in each separate source color
planes.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the destination image ROI.

roiSize

Distance in bytes between starts of consecutive lines in thedestination image.
Size of the source and destination ROI in pixels.

aval

Constant value to create the fourth channel.

dstStep

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts the Y'Cb'Cr' image pSrc to the 24-bit gamma-corrected B'G'R' image pDst
according to the same formulas as the function ippiYCbCrToRGB does. The output B'G'R' values are
saturated to the range [0..255].
The fourth channel is created by setting channel values to the constant value aval.

874

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pSrc or pDst is NULL.
Indicates an error condition if roiSize.width is less than 4 orroiSize.height is less than 1.

YCbCrToBGR_709CSC
Converts a YCbCr image to the BGR image for ITU-R
BT.709 CSC signal.

SyntaxIppStatus ippiYCbCrToBGR_709CSC_8u_P3C3R(const Ipp8u* pSrc[3], int srcStep, Ipp8u*
pDst, int dstStep, IppiSize roiSize);
IppStatus ippiYCbCrToBGR_709CSC_8u_P3C4R(const Ipp8u* pSrc[3], int srcStep, Ipp8u*
pDst, int dstStep, IppiSize roiSize, Ipp8u aval);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pDst

An array of pointers to ROI in separate planes of the source
image.
An array of distances in bytes between starts of consecutive
lines in the source image planes.
Pointer to the destination image ROI.

dstStep

Distance in bytes between starts of consecutive lines in thedestination image.

roiSize

Size of the source and destination ROI in pixels.

aval

Constant value to create fourth channel.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts a planar Y'Cb'Cr' image pSrc to the three- or four-channel gamma-corrected B'G'R'
image pDst for digital component video signals complied with the ITU-R BT.709 Recommendation [ITU709]
for computer systems consideration (CSC). The conversion is performed according to the following formulas[Jack01]:

R' = 1.164*(Y' - 16) + 1.793*(Cr' - 128)
G' = 1.164*(Y' - 16) - 0.534*(Cr' - 128) - 0.213*(Cb' - 128)
B' = 1.164*(Y' - 16) + 2.115*(Cb' - 128)
The output R'G'B' values are saturated to the range [0..255].

875

1

Intel® Integrated Performance Primitives Developer Guide and Reference

The fourth channel is created by setting channel values to the constant value aval.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pSrc or pDst is NULL.
Indicates an error condition if roiSize has a field with a zero or
negative value.

RGBToYCbCr422
Converts an RGB image to the YCbCr image with
4:2:2 sampling.

SyntaxCase 1: Operation on pixel-order data
IppStatus ippiRGBToYCbCr422_8u_C3C2R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int
dstStep, IppiSize roiSize);

Case 2; Conversion from pixel-order to planar data
IppStatus ippiRGBToYCbCr422_8u_C3P3R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst[3],int dstStep[3], IppiSize roiSize);

Case 2: Conversion from planar to pixel-order data
IppStatus ippiRGBToYCbCr422_8u_P3C2R(const Ipp8u* pSrc[3], int srcStep, Ipp8u* pDst,
int dstStep, IppiSize roiSize);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc

srcStep
pDst

dstStep
roiSize

876

Pointer to the source image ROI for pixel-order image. An arrayof pointers to ROI in each separate source color planes forplanar images.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the destination image ROI for pixel-order image. An
array of pointer to ROI in each separate planes for the planar
destination image.
Distance in bytes between starts of consecutive lines in thedestination image.
Size of the source and destination ROI in pixels.

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Description
This function operates with ROI (see Regions of Interest in Intel IPP). This function converts the gammacorrected R'G'B' image pSrc to the Y'Cb'Cr' image pDst with 4:2:2 sampling (see Table “Pixel-Order
Image Formats” and Table “Planar Image Formats” for more details). The conversion is performed according
to the same formulas as the function ippiRGBToYCbCr does.
The converted buffer for pixel-order image has the reduced bit depth of a 16 bits per pixel, whereas thesource buffer has 24 bit depth.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pSrc or pDst is NULL.
Indicates an error condition if roiSize has a field with a zero or
negative value.

YCbCr422ToRGB
Converts an YCbCr image with the 4:2:2 sampling to
the RGB image.

SyntaxCase 1: Operation on pixel-order data
IppStatus ippiYCbCr422ToRGB_8u_C2C3R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int
dstStep, IppiSize roiSize);
IppStatus ippiYCbCr422ToRGB_8u_C2C4R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int
dstStep, IppiSize roiSize, Ipp8u aval);

Case 2: Conversion from pixel-order to planar data
IppStatus ippiYCbCr422ToRGB_8u_C2P3R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst[3],int dstStep, IppiSize roiSize);

Case 3: Conversion from planar to pixel-order data
IppStatus ippiYCbCr422ToRGB_8u_P3C3R(const Ipp8u* pSrc[3], int srcStep[3], Ipp8u* pDst,
int dstStep, IppiSize roiSize);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc

srcStep

Pointer to the source image ROI for pixel-order image. An arrayof pointers to ROI in each separate source planes for planar
images.
Distance, in bytes, between the starting points of consecutive
lines in the source image.

877

1

Intel® Integrated Performance Primitives Developer Guide and Reference

roiSize

Pointer to the ROI in the destination pixel-order image. An
array of pointers to ROI in each planes of the destination
planar image.
Distance, in bytes, between the starting points of consecutive
lines in the destination image.
Size of the source and destination ROI in pixels.

aval

Constant value to create the fourth channel.

pDst

dstStep

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts the Y'Cb'Cr' image pSrc with the 4:2:2 sampling (see Table “Pixel-Order Image
Formats” and Table “Planar Image Formats” for more details) to the gamma-corrected R'G'B' image pDst
according to the same formulas as the function ippiYCbCrToRGB does. The output R'G'B' values are
saturated to the range [0..255].

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pSrc or pDst is NULL.
Indicates an error condition if roiSize has a field with a zero or
negative value.

ExampleThe code example below demonstrates how to use the ippiYCbCr422ToRGB_8u_C2C4R function.

const int WIDTH = 2;
const int HEIGHT = 2;
Ipp8u pSrc[WIDTH * HEIGHT * 2] ={236,50,236,80,
236,50,236,80,};
Ipp8u pDstRGB[(WIDTH * HEIGHT) * 4];
int srcStep = WIDTH * 2, dstStep = WIDTH * 4;
IppiSize roiSize = {WIDTH, HEIGHT};
Ipp8u alphaValue = 0xFF;
IppStatus status = ippiYCbCr422ToRGB_8u_C2C4R(pSrc, srcStep, pDstRGB, dstStep, roiSize,alphaValue);if ( status == ippStsNoErr)
printf("\n ************* passed ****************\n");else
printf("\n ************* failed ****************\n");RGBToYCrCb422
Converts 24-bit per pixel RGB image to 16-bit per
pixel YCrCb image

878

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

SyntaxCase 1: Operation on pixel-order data
IppStatus ippiRGBToYCrCb422_8u_C3C2R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int
dstStep, IppiSize roiSize);

Case 2: Conversion from planar to pixel-order data
IppStatus ippiRGBToYCrCb422_8u_P3C2R(const Ipp8u* pSrc[3], int srcStep, Ipp8u* pDst,
int dstStep, IppiSize roiSize);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc

srcStep
pDst
dstStep
roiSize

Pointer to the source image ROI for pixel-order image. An arrayof pointers to ROI in each separate source color planes forplanar images.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the destination image ROI.
Distance in bytes between starts of consecutive lines in thedestination image.
Size of the source and destination ROI in pixels.

Description
This function operates with ROI (see Regions of Interest in Intel IPP). This function converts the gammacorrected R'G'B' image pSrc to the Y'Cb'Cr' image pDst according to the same formulas as the function
ippiRGBToYCbCrippiRGBToYCbCr does. The difference is that ippiRGBToYCrCb422 uses 4:2:2 sampling
format for the converted image (see Table “Pixel-Order Image Formats” and Table “Planar Image Formats”
for more details).
The converted buffer has the reduced bit depth of 16 bits per pixel, whereas the source buffer has 24 bit
depth.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pSrc or pDst is NULL.
Indicates an error condition if roiSize has a field with a zero or
negative value.

YCrCb422ToRGB, YCrCb422ToBGRConvert 16-bit per pixel YCrCb image to 24 or 32-bit
per pixel RGB or BGR image.

879

1

Intel® Integrated Performance Primitives Developer Guide and Reference

SyntaxCase 1: Operation on pixel-order data
IppStatus ippiYCrCb422ToRGB_8u_C2C3R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int
dstStep, IppiSize roiSize);
IppStatus ippiYCrCb422ToRGB_8u_C2C4R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int
dstStep, IppiSize roiSize, Ipp8u aval);
IppStatus ippiYCrCb422ToBGR_8u_C2C3R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int
dstStep, IppiSize roiSize);
IppStatus ippiYCrCb422ToBGR_8u_C2C4R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int
dstStep, IppiSize roiSize, Ipp8u aval);

Case 2: Conversion from pixel-order to planar data
IppStatus ippiYCrCb422ToRGB_8u_C2P3R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst[3],int dstStep, IppiSize roiSize);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters

roiSize

Pointer to the source image ROI for pixel-order image. An arrayof pointers to ROI in each separate source plane for planar
images.
Distance, in bytes, between the starting points of consecutive
lines in the source image.
Pointer to the ROI in the destination pixel-order image. An
array of pointers to ROI in each plane of the destination planar
image.
Distance, in bytes, between the starting points of consecutive
lines in the destination image.
Size of the source and destination ROI in pixels.

aval

Constant value to create the fourth channel.

pSrc

srcStep
pDst

dstStep

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts the Y'Cr'Cb' image pSrc, packed in 4:2:2 sampling format (see Table “Pixel-Order
Image Formats” and Table “Planar Image Formats” for more details) to the 24-bit gamma-corrected R'G'B'
or B'G'R' image pDst according to the same formulas as the function ippiYCbCrToRGBdoes. The output
R'G'B' values are saturated to the range [0..255]. Y'Cr'Cb' image with 4:2:2 sampling is also known as
YVYU format.

Return Values
ippStsNoErr

880

Indicates no error. Any other value indicates an error or awarning.

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

ippStsNullPtrErr

Indicates an error condition if pSrc or pDst is NULL.

ippStsSizeErr

Indicates an error condition if roiSize has a field with a zero or
negative value.

ExampleThe code example below demonstrates how to use the ippiYCrCb422ToRGB_8u_C2C4R function.

#define WIDTH 2#define HEIGHT 2
Ipp8u pSrc[WIDTH * HEIGHT * 2] ={236,50,236,80,
236,50,236,80,};
Ipp8u pDstRGB[(WIDTH * HEIGHT) * 4];
int srcStep = WIDTH * 2, dstStep = WIDTH * 4;
IppiSize roiSize = {WIDTH, HEIGHT};
Ipp8u alphaValue = 0xFF;
IppStatus status = ippiYCrCb422ToRGB_8u_C2C4R(pSrc, srcStep, pDstRGB, dstStep, roiSize,alphaValue);if ( status == ippStsNoErr)
printf("\n ************* passed ****************\n");else
printf("\n ************* failed ****************\n");BGRToYCbCr422
Converts 24-bit per pixel BGR image to 16-bit per
pixel YCbCr image.

SyntaxCase 1: Operation on pixel-order data
IppStatus ippiBGRToYCbCr422_8u_C3C2R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int
dstStep, IppiSize roiSize);
IppStatus ippiBGRToYCbCr422_8u_AC4C2R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int
dstStep, IppiSize roiSize);

Case 2: Conversion from pixel-order to planar data
IppStatus ippiBGRToYCbCr422_8u_C3P3R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst[3],int dstStep[3], IppiSize roiSize);
IppStatus ippiBGRToYCbCr422_8u_AC4P3R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst[3],int dstStep[3], IppiSize roiSize);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

881

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Parameters
pSrc
srcStep
pDst

dstStep

roiSize

Pointer to the source mage ROI.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the ROI in the destination pixel-order image. An
array of pointers to ROI in each planes of the destination
planar image.
Distance in bytes between starts of consecutive lines in thedestination pixel-order image. An array of distances in bytes
for each plane of the destination planar image.
Size of the source and destination ROI in pixels.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts a three- or four-channel gamma-corrected B'G'R' image pSrc to the two-channel orthree-planes Y'Cb'Cr' image pDst according to the same formulas as the function ippiRGBToYCbCr does.
The difference is that ippiBGRToYCbCr422 uses the 4:2:2 sampling format (see Table “Pixel-Order Image
Formats” and Table “Planar Image Formats” for more details).

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pSrc or pDst is NULL.
Indicates an error condition if roiSize.width is less than 2 orroiSize.height is less than 1.

YCbCr422ToBGRConverts a YCbCr image with 4:2:2 sampling to the
BGR image.

SyntaxCase 1: Operation on pixel-order data
IppStatus ippiYCbCr422ToBGR_8u_C2C3R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int
dstStep, IppiSize roiSize);
IppStatus ippiYCbCr422ToBGR_8u_C2C4R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int
dstStep, IppiSize roiSize, Ipp8u aval);

Case 2: Conversion from planar to pixel-order data
IppStatus ippiYCbCr422ToBGR_8u_P3C3R(const Ipp8u* pSrc[3], int srcStep[3], Ipp8u* pDst,
int dstStep, IppiSize roiSize);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

882

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Parameters
pSrc
srcStep

pDst

Pointer to the source image ROI. An array of pointers to the
ROI in each separate plane of the source planar image.
Distance in bytes between starts of consecutive lines in thesource image. An array of such distances in bytes for eachplane of the source planar image.
Pointer to the destination image ROI.

roiSize

Distance in bytes between starts of consecutive lines in thedestination image.
Size of the source and destination ROI in pixels.

aval

Constant value to create the fourth channel.

dstStep

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts the Y'Cb'Cr' image pSrc with 4:2:2 sampling (see Table “Pixel-Order Image
Formats” and Table “Planar Image Formats” for more details) to the gamma-corrected B'G'R' image pDst
according to the same formulas as the function ippiYCbCrToRGB does.
The output B'G'R' values are saturated to the range [0..255].
The fourth channel is created by setting channel values to the constant value aval.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pSrc or pDst is NULL.
Indicates an error condition if roiSize.width is less than 2 orroiSize.height is less than 1.

YCbCr422ToGray
Converts an interlaced 4:2:2 YCbCr or YCrCb image togray-scale extracting luminance (Y) component.

SyntaxIppStatus ippiYCbCr422ToGray_8u_C2C1R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int
dstStep, IppiSize roiSize);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc

Pointer to the source image ROI.

883

1

Intel® Integrated Performance Primitives Developer Guide and Reference

srcStep
pDst
dstStep
roiSize

Distance, in bytes, between the starting points of consecutive
lines in the source image.
Pointer to the destination image ROI.
Distance, in bytes, between the starting points of consecutive
lines in the destination image.
Size of the source and destination ROI in pixels.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts an interlaced Y'Cb'Cr' or Y'Cr'Cb' image pSrc with the 4:2:2 sampling (see Table“Pixel-Order Image Formats” and Table “Planar Image Formats” for more details) to the gray-scale image
pDst extracting luminance (Y) component.

Y'Cb'Cr' image with 4:2:2 sampling is also known as YUY2 format, and Y'Cr'Cb' as YVYU.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pSrc or pDst is NULL.
Indicates an error condition if roiSize has a field with a zero or
negative value.

ExampleThe code example below demonstrates how to use the ippiYCbCr422ToGray_8u_C2C1R function.

const int WIDTH = 2;
const int HEIGHT = 2;
Ipp8u pSrc[WIDTH * HEIGHT * 2] = {190,70,191,80,
200,71,201,81,};
Ipp8u pDst[WIDTH * HEIGHT];
int srcStep = WIDTH * 2, dstStep = WIDTH;
IppiSize roiSize = {WIDTH, HEIGHT};
IppStatus status = ippiYCbCr422ToGray_8u_C2C1R(pSrc, srcStep, pDst, dstStep, roiSize);if ( status == ippStsNoErr)
printf("PASS:\n%3d %3d\n%3d %3d\n", pDst[0], pDst[1], pDst[2], pDst[3]);else
printf("FAIL: status = %d\n", status);
Result:PASS:
190 191
200 201

RGBToCbYCr422, RGBToCbYCr422Gamma
Convert 24-bit per pixel RGB image to 16-bit per pixel
CbYCr image.

884

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

SyntaxIppStatus ippiRGBToCbYCr422_8u_C3C2R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int
dstStep, IppiSize roiSize);
IppStatus ippiRGBToCbYCr422Gamma_8u_C3C2R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst,
int dstStep, IppiSize roiSize);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pDst
dstStep
roiSize

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the destination image ROI.
Distance in bytes between starts of consecutive lines in thedestination image.
Size of the source and destination ROI in pixels.

Description
These functions operate with ROI (see Regions of Interest in Intel IPP).
The function ippiRGBToCbYCr422 converts the gamma-corrected R'G'B' image pSrc to the Cb'Y'Cr'
image pDst according to the same formulas as the function ippiRGBToYCbCr does.
The function ippiRGBToCbYCr422Gamma performs gamma-correction of the source RGB image pSrc
according to the same formula as the function ippiGammaFwd does, and then converts it to the Cb'Y'Cr'
image pDst according to the same formulas as the function ippiRGBToYCbCr does.
The functions ippiRGBToCbYCr422 and ippiRGBToCbYCr422Gamma use 4:2:2 sampling format for theconverted image.
A CbYCr image has the following sequence of bytes: Cb0Y0Cr0Y1, Cb1Y2Cr1Y3, ....

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pSrc or pDst is NULL.
Indicates an error condition if roiSize has a field with a zero or
negative value.

CbYCr422ToRGB
Converts 16-bit per pixel CbYCr image to 24-bit per
pixel RGB image.

885

1

Intel® Integrated Performance Primitives Developer Guide and Reference

SyntaxIppStatus ippiCbYCr422ToRGB_8u_C2C3R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int
dstStep, IppiSize roiSize);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pDst
dstStep
roiSize

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the destination image ROI.
Distance in bytes between starts of consecutive lines in thedestination image.
Size of the source and destination ROI in pixels

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts the Cb'Y'Cr' image pSrc, packed in the 4:2:2 sampling format, to the 24-bit
gamma-corrected R'G'B' image pDst according to the same formulas as the function ippiYCbCrToRGBdoes.
A CbYCr image has the following sequence of bytes: Cb0Y0Cr0Y1, Cb1Y2Cr1Y3, ... .
The output R'G'B' values are saturated to the range [0..255].

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error or awarning.

ippStsNullPtrErr

Indicates an error condition if pSrc or pDst is NULL.

ippStsSizeErr

Indicates an error condition if roiSize has a field with a zero or
negative value.

BGRToCbYCr422
Converts 32-bit per pixel BGR image to 16-bit per
pixel CbYCr image.

SyntaxIppStatus ippiBGRToCbYCr422_8u_AC4C2R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int
dstStep, IppiSize roiSize);

Include Files
ippcc.h886

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pDst
dstStep
roiSize

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the destination image ROI.
Distance in bytes between starts of consecutive lines in thedestination image.
Size of the source and destination ROI in pixels.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts the four-channel gamma-corrected B'G'R' image pSrc to the two-channel Cb'Y'Cr'
image pDst according to the same formulas as the function ippiRGBToYCbCr does. The function
ippiBGRToCbYCr422 uses 4:2:2 sampling format for the converted image. An alpha-channel information
is lost.
An CbYCr image has the following sequence of bytes: Cb0Y0Cr0Y1, Cb1Y2Cr1Y3, ... .

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pSrc or pDst is NULL.
Indicates an error condition if roiSize has a field with a zero or
negative value.

BGRToCbYCr422_709HDTV
Converts BGR image to 16-bit per pixel CbYCr image
for ITU-R BT.709 HDTV signal.

SyntaxIppStatus ippiBGRToCbYCr422_709HDTV_8u_C3C2R(const Ipp8u* pSrc, int srcStep, Ipp8u*
pDst, int dstStep, IppiSize roiSize);
IppStatus ippiBGRToCbYCr422_709HDTV_8u_AC4C2R(const Ipp8u* pSrc, int srcStep, Ipp8u*
pDst, int dstStep, IppiSize roiSize);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

887

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Parameters
pSrc
srcStep
pDst
dstStep
roiSize

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the destination image ROI.
Distance in bytes between starts of consecutive lines in thedestination image.
Size of the source and destination ROI in pixels.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts the three- or four-channel gamma-corrected B'G'R' image pSrc to the two-channel
Cb'Y'Cr' image pDst for digital component video signals complied with the ITU-R BT.709 Recommendation[ITU709] for high-definition TV (HDTV). The source image pixel values are in the range [16..235]. The
conversion is performed according to the following formulas [Jack01]:

Y' = 0.213*R' + 0.715*G' + 0.072*B'
Cb' = -0.117*R' - 0.394*G' + 0.511*B' + 128
Cr' = 0.511*R' - 0.464*G' - 0.047*B' + 128
The values of Y' of the destination image are in the range [16..235], the values of Cb', Cr' are in the range[16..240]. They should be saturated at the 1 and 254 levels.
The function ippiBGRToCbYCr422_709HDTV uses the 4:2:2 sampling format for the converted image. The
alpha-channel information is lost.
A CbYCr image has the following sequence of bytes: Cb0Y0Cr0Y1, Cb1Y2Cr1Y3, ... .

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pSrc or pDst pointer is NULL.
Indicates an error condition if roiSize has a field with a zero or
negative value.

CbYCr422ToBGRConverts 16-bit per pixel CbYCr image to four channel
BGR image.

SyntaxIppStatus ippiCbYCr422ToBGR_8u_C2C4R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int
dstStep, IppiSize roiSize, Ipp8u aval);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

888Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Parameters
pSrc
srcStep
pDst

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the destination image ROI.

roiSize

Distance in bytes between starts of consecutive lines in thedestination image.
Size of the source and destination ROI in pixels.

aval

Constant value to create the fourth channel.

dstStep

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts the Cb'Y'Cr' image pSrc, packed in 4:2:2 sampling format, to the four channel
gamma-corrected B'G'R' image pDst according to the same formulas as the function ippiYCbCrToRGBdoes.
A CbYCr image has the following sequence of bytes: Cb0Y0Cr0Y1, Cb1Y2Cr1Y3, ... .
The output B'G'R' values are saturated to the range [0..255].
The fourth channel is created by setting channel values to the constant value aval.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pSrc or pDst is NULL.
Indicates an error condition if roiSize has a field with a zero or
negative value.

CbYCr422ToBGR_709HDTV
Converts 16-bit per pixel CbYCr image to the BGR
image for ITU-R BT.709 HDTV signal.

SyntaxIppStatus ippiCbYCr422ToBGR_709HDTV_8u_C2C3R(const Ipp8u* pSrc, int srcStep, Ipp8u*
pDst, int dstStep, IppiSize roiSize);
IppStatus ippiCbYCr422ToBGR_709HDTV_8u_C2C4R(const Ipp8u* pSrc, int srcStep, Ipp8u*
pDst, int dstStep, IppiSize roiSize, Ipp8u aval);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

889

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Parameters
pSrc
srcStep
pDst

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the destination image ROI.

roiSize

Distance in bytes between starts of consecutive lines in thedestination image.
Size of the source and destination ROI in pixels.

aval

Constant value to create the fourth channel.

dstStep

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts the Cb'Y'Cr' image pSrc, packed in 4:2:2 sampling format, to the three- or fourchannel gamma-corrected B'G'R' image pDst for digital component video signals complied with the ITU-R
BT.709 Recommendation [ITU709] for high-definition TV (HDTV). A source CbYCr image has the following
sequence of bytes: Cb0Y0Cr0Y1, Cb1Y2Cr1Y3, ... . The values of Y' are in the range [16..235], the values ofCb', Cr' are in the range [16..240]. The conversion is performed according to the following formulas[Jack01]:

R' = Y' + 1.540*(Cr' - 128)
G' = Y' - 0.459*(Cr' - 128) - 0.183*(Cb' - 128)
B' = Y' + 1.816*(Cb' - 128)
The destination image pixel values have a nominal range [16..235]. The resulting R'G'B' values should besaturated at the 0 and 255 levels.
The output B'G'R' values are saturated to the range [0..255].
The fourth channel is created by setting channel values to the constant value aval.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error or awarning.

ippStsNullPtrErr

Indicates an error condition if pSrc or pDst is NULL.

ippStsSizeErr

Indicates an error condition if roiSize has a field with a zero or
negative value.

RGBToYCbCr420
Converts an RGB image to the YCbCr color model;
uses 4:2:0 sampling.

SyntaxIppStatus ippiRGBToYCbCr420_8u_C3P3R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst[3],int dstStep[3], IppiSize roiSize);
IppStatus ippiRGBToYCbCr420_8u_C3P2R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDstY, int
dstYStep, Ipp8u* pDstCbCr, int dstCbCrStep, IppiSize roiSize);
IppStatus ippiRGBToYCbCr420_8u_C4P2R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDstY, int
dstYStep, Ipp8u* pDstCbCr, int dstCbCrStep, IppiSize roiSize);890

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pDst
dstStep
pDstY
dstStep, dstYStep
pDstCbCr
dstCbCrStep
roiSize

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
An array of pointers to ROI in the separate planes of thedestination image for three-plane image.
Array of distances in bytes between starts of consecutive lines
in each plane of the destination image for three-plane image.
Pointer to ROI in the luminance plane of the destination image
for two-plane image.
Distance in bytes between starts of consecutive lines in theluminance plane for two-plane image.
Pointer to ROI in the interleaved chrominance plane of thedestination image for two-plane image.
Distance in bytes between starts of consecutive lines in theinterleaved chrominance plane for two-plane image.
Size of the source and destination ROI in pixels.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts the gamma-corrected R'G'B' image pSrc to the Y'Cb'Cr' image according to thesame formulas as the function ippiRGBToYCbCr does. The difference is that ippiRGBToYCbCr420 uses
4:2:0 sampling format for the converted image (see Table “Planar Image Formats” for more details).

roiSize.width should be multiple of 2, and roiSize.height should be multiple of 2 (for three-plane
image) or 4 (for two-plane image). If not the function reduces their original values to the nearest multiples of
2 or 4 correspondingly, performs operation, and returns warning message.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsDoubleSize

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pSrc or pDst is NULL.
Indicates an error condition if roiSize has a field with valueless than 2.
Indicates a warning if roiSize.width is not a multiple of 2, or
if roiSize.height is not a multiple of 2 (for three-plane
image) or 4 (for two-plane image).

891

1

Intel® Integrated Performance Primitives Developer Guide and Reference

YCbCr420ToRGB, YCbCr420ToBGRConvert a YCbCr image that has 4:2:0 sampling
format to the RGB or BGR color model.

SyntaxIppStatus ippiYCbCr420ToRGB_8u_P3C3R(const Ipp8u* pSrc[3], int srcStep[3], Ipp8u* pDst,
int dstStep, IppiSize roiSize);
IppStatus ippiYCbCr420ToRGB_8u_P2C3R(const Ipp8u* pSrcY, int srcYStep, const Ipp8u*
pSrcCbCr, int srcCbCrStep, Ipp8u* pDst, int dstStep, IppiSize roiSize);
IppStatus ippiYCbCr420ToRGB_8u_P2C4R(const Ipp8u* pSrcY, int srcYStep, const Ipp8u*
pSrcCbCr, int srcCbCrStep, Ipp8u* pDst, int dstStep, IppiSize roiSize, Ipp8u aval);
IppStatus ippiYCbCr420ToBGR_8u_P2C3R(const Ipp8u* pSrcY, int srcYStep, const Ipp8u*
pSrcCbCr, int srcCbCrStep, Ipp8u* pDst, int dstStep, IppiSize roiSize);
IppStatus ippiYCbCr420ToBGR_8u_P2C4R(const Ipp8u* pSrcY, int srcYStep, const Ipp8u*
pSrcCbCr, int srcCbCrStep, Ipp8u* pDst, int dstStep, IppiSize roiSize, Ipp8u aval);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pSrcY
srcYSteppSrcCbCr
srcCbCrStep
pDst

An array of pointers to ROI in separate planes of the threeplane source image.
An array of distances in bytes between starts of consecutive
lines in each plane of the three-plane source image.
Pointer to ROI in the luminance plane of the two-plane source
image.
Distance in bytes between starts of consecutive lines in theluminance plane of the two-plane source image.
Pointer to ROI in the interleaved chrominance plane of the twoplane source image.
Distance in bytes between starts of consecutive lines in theinterleaved chrominance plane of the two-plane source image.
Pointer to the destination image ROI.

roiSize

Distance in bytes between starts of consecutive lines in thedestination image.
Size of the source and destination ROI in pixels.

aval

Constant value to create the fourth channel.

dstStep

Description
This function operates with ROI (see Regions of Interest in Intel IPP).

892

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

This function converts the Y'Cb'Cr' image pSrc to the gamma-corrected R'G'B' or B'G'R' image pDst
according to the same formulas as the function ippiYCbCrToRGB does. The difference is that theippiYCbCr420ToRGB and ippiYCbCr420ToBGR functions use the input data in the 4:2:0 sampling format,
in which the number of Cb and Cr samples is reduced by half in both vertical and horizontal directions (seeTable “Planar Image Formats” for more details). Two-plane Y'Cb'Cr' image with 4:2:0 sampling is also
known as NV12 format.
The value of roiSize.width and roiSize.height must be a multiple of 2. Otherwise, the function reduces
original values to the nearest multiples of 2, performs operation, and returns a warning message.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsDoubleSize

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pSrc or pDst is NULL.
Indicates an error condition if roiSize has a field with valueless than 2.
Indicates a warning if roiSize has a field that is not a multipleof 2.

ExampleThe code example below demonstrates how to use the ippiYCbCr420ToRGB_8u_P2C4R function.

#define WIDTH 4#define HEIGHT 4
Ipp8u pSrcY[WIDTH * HEIGHT] ={236,236,236,236,
236,236,236,236,
236,236,236,236,
236,236,236,236};
Ipp8u pSrcCbCr[WIDTH * HEIGHT / 2] ={128,128,128,128,
128,128,128,128};
Ipp8u pDstRGB[(WIDTH * HEIGHT) * 4];
int srcYStep = WIDTH, srcCbCrStep = WIDTH, dstStep = WIDTH * 4;
IppiSize roiSize = {WIDTH, HEIGHT};
Ipp8u alphaValue = 0xFF;
IppStatus status = ippiYCbCr420ToRGB_8u_P2C4R(pSrcY, srcYStep, pSrcCbCr, srcCbCrStep,pDstRGB, dstStep, roiSize, alphaValue);if ( status == ippStsNoErr)
printf("\n ************* passed ****************\n");else
printf("\n ************* failed ****************\n");RGBToYCrCb420
Converts an RGB image to the YCrCb image with
4:2:0 sampling format.

893

1

Intel® Integrated Performance Primitives Developer Guide and Reference

SyntaxIppStatus ippiRGBToYCrCb420_8u_AC4P3R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst[3],int dstStep[3], IppiSize roiSize);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pDst
dstStep
roiSize

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
Array of pointers to ROI in separate planes of the destination
image.
Array of distances in bytes between starts of consecutive lines
in the destination image planes.
Size of the source and destination ROI in pixels.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts a four-channel gamma-corrected R'G'B' image pSrc to the planar Y'Cr'Cb' image
pDst with the 4:2:0 sampling (see Table “Planar Image Formats” for more details). The conversion is
performed according to the same formulas as the function ippiRGBToYCbCr does.

roiSize.width and roiSize.height should be multiples of 2. If not the function reduces their originalvalues to the nearest multiples of 2, performs the operation, and returns a warning message.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsDoubleSize

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pSrc or pDst is NULL.
Indicates an error condition if roiSize has a field with a zero or
negative value.
Indicates a warning if roiSize has a field that is not a multiple
of 2.

YCrCb420ToRGB, YCrCb420ToBGRConvert a YCrCb image with the 4:2:0 sampling to the
RGB or BGR image.

SyntaxIppStatus ippiYCrCb420ToRGB_8u_P3C4R (const Ipp8u* pSrc[3],int srcStep[3], Ipp8u* pDst,
int dstStep, IppiSize roiSize, Ipp8u aval);894

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

IppStatus ippiYCrCb420ToRGB_8u_P2C4R (const Ipp8u* pSrcY, int srcYStep, const Ipp8u*
pSrcCrCb, int srcCrCbStep, Ipp8u* pDst, int dstStep, IppiSize roiSize, Ipp8u aval);
IppStatus ippiYCrCb420ToRGB_8u_P2C3R (const Ipp8u* pSrcY, int srcYStep, const Ipp8u*
pSrcCrCb, int srcCrCbStep, Ipp8u* pDst, int dstStep, IppiSize roiSize);
IppStatus ippiYCrCb420ToBGR_8u_P2C3R (const Ipp8u* pSrcY, int srcYStep, const Ipp8u*
pSrcCrCb, int srcCrCbStep, Ipp8u* pDst, int dstStep, IppiSize roiSize);
IppStatus ippiYCrCb420ToBGR_8u_P2C4R (const Ipp8u* pSrcY, int srcYStep, const Ipp8u*
pSrcCrCb, int srcCrCbStep, Ipp8u* pDst, int dstStep, IppiSize roiSize, Ipp8u aval);
IppStatus ippiYCrCb420ToBGR_Filter_8u_P3C4R (const Ipp8u* pSrc[3], int srcStep[3],Ipp8u* pDst, int dstStep, IppiSize roiSize, Ipp8u aval);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep

pSrcY
srcYSteppSrcCrCb
srcCrCbStep

pDst

An array of pointers to ROI in separate planes of the threeplane source image.
An array of distances, in bytes, between the starting points ofconsecutive lines in each plane of the three-plane source
image.
Pointer to ROI in the luminance plane of the two-plane source
image.
Distance, in bytes, between the starting points of consecutive
lines in the luminance plane of the two-plane source image.
Pointer to ROI in the interleaved plane chrominance plane of
the two-plane source image.
Distance, in bytes, between the starting points of consecutive
lines in the interleaved chrominance plane of the two-planesource image.
Pointer to the destination image ROI.

roiSize

Distance, in bytes, between the starting points of consecutive
lines in the destination image.
Size of the source and destination ROI, in pixels.

aval

Constant value to create the fourth channel.

dstStep

Description
This function operates with ROI.
This function converts the Y'Cr'Cb' image pSrc to the gamma-corrected R'G'B' or B'G'R' image pDst
according to the same formulas as the ippiippiYCbCrToRGB function does. The difference is that theippiYCrCb420ToRGB and ippiYCrCb420ToBGR functions use the source data in the 4:2:0 sampling

895

1

Intel® Integrated Performance Primitives Developer Guide and Reference

format, in which the number of Cb and Cr samples is reduced by half in both vertical and horizontal
directions (see Table “Planar Image Formats” for more details). Two-plane Y'Cr'Cb image with 4:2:0
sampling is also known as NV21 format.
The value of roiSize.width and roiSize.height must be a multiple of 2. Otherwise, the function reduces
original values of roiSize.width and roiSize.height to the nearest multiples of 2, performs operation,and returns a warning.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsDoubleSize

Indicates no error. Any other value indicates an error or awarning.
Indicates an error when pSrc or pDst is NULL.
Indicates an error when roiSize has a field with a value lessthan 2.
Indicates a warning if roiSize has a field that is not a multipleof 2.

ExampleThe code example below demonstrates how to use the ippiYCrCb420ToRGB_8u_P2C4R function.

static void sampleNV21ToRGBA(){
Ipp8u pY[4*4]={
236,236,236,236,
236,236,236,236,
236,236,236,236,
236,236,236,236};
Ipp8u pCbCr[4*2]={
128,128,128,128,
128,128,128,128};
Ipp8u pRGB[(4*4)*4];
int YStep = 4, CbCrStep = 4, rgbStep = 4*4;
IppiSize roiSize = {4,4};
Ipp8u alpha = 0xFF;
IppStatus status = ippiYCrCb420ToRGB_8u_P2C4R(pY, YStep, pCbCr, CbCrStep, pRGB, rgbStep,roiSize, alpha);if ( status == ippStsNoErr)
printf("\n ************* passed ****************\n");else
printf("\n ************* failed ****************\t");}See Also
Regions of Interest in Intel IPP
BGRToYCbCr420
Converts a BGR image to the YCbCr image with 4:2:0
sampling format.

896

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

SyntaxIppStatus ippiBGRToYCbCr420_8u_C3P3R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst[3],int dstStep[3], IppiSize roiSize);
IppStatus ippiBGRToYCbCr420_8u_C3P2R(const Ipp8u* pRGB, int rgbStep, Ipp8u* pY, int
yStep, Ipp8u* pCbCr, int cbCrStep, IppiSize roiSize);
IppStatus ippiBGRToYCbCr420_8u_AC4P3R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst[3],int dstStep[3], IppiSize roiSize);
IppStatus ippiBGRToYCbCr420_8u_AC4P2R(const Ipp8u* pRGB, int rgbStep, Ipp8u* pY, int
yStep, Ipp8u* pCbCr, int cbCrStep, IppiSize roiSize);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc, pRGB

Pointer to the source image ROI.

pY

Pointer to the image Y plane.

srcStep, rgbStep

Distance, in bytes, between the starting points of consecutive
lines in the source image.

yStep

Distance, in bytes, between the starting points of consecutive lines in
the image Y plane.

pDst, pCbCr

An array of pointers to ROI in separate planes of thedestination image.
An array of distances, in bytes, between the starting points ofconsecutive lines in the destination image planes.
Size of the source and destination ROI in pixels.

dstStep, cbCrStep
roiSize

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts a three- or four-channel gamma-corrected B'G'R' image to the planar Y'Cb'Cr' image
according to the same formulas as the function ippiRGBToYCbCr does. The difference is that
ippiBGRToYCbCr420 uses 4:2:0 sampling format (see Table “Planar Image Formats” for more details).

roiSize.width and roiSize.height should be multiples of 2. If not the function reduces their originalvalues to the nearest multiples of 2, performs operation, and returns warning message.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pSrc ( pRGB) or pDst ( pCbCr) is
NULL.
Indicates an error condition if roiSize.width is less than 2 orroiSize.height is less than 2.

897

1

Intel® Integrated Performance Primitives Developer Guide and ReferenceippStsDoubleSize

Indicates a warning if roiSize has a field that is not a multipleof 2.

BGRToYCbCr420_709CSC
Converts a BGR image to the YCbCr image with 4:2:0
sampling for ITU-R BT.709 CSC signal.

SyntaxIppStatus ippiBGRToYCbCr420_709CSC_8u_C3P3R(const Ipp8u* pSrc, int srcStep, Ipp8u*
pDst[3], int dstStep[3], IppiSize roiSize);
IppStatus ippiBGRToYCbCr420_709CSC_8u_C3P2R(const Ipp8u* pSrc, int srcStep, Ipp8u*
pDstY, int dstYStep, Ipp8u* pDstCbCr, int dstCbCrStep, IppiSize roiSize);
IppStatus ippiBGRToYCbCr420_709CSC_8u_AC4P3R(const Ipp8u* pSrc, int srcStep, Ipp8u*
pDst[3], int dstStep[3], IppiSize roiSize);
IppStatus ippiBGRToYCbCr420_709CSC_8u_AC4P2R(const Ipp8u* pSrc, int srcStep, Ipp8u*
pDstY, int dstYStep, Ipp8u* pDstCbCr, int dstCbCrStep, IppiSize roiSize);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pDst, pDstY, pDstCbCr
dstStep, dstYStep, dstCbCrStep
roiSize

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
An array of pointers to ROI in separate planes of thedestination image.
An array of distances in bytes between starts of consecutive
lines in the destination image planes.
Size of the source and destination ROI in pixels.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts a three- or four-channel gamma-corrected B'G'R' image pSrc to the planar Y'Cb'Cr'
image pDst for digital component video signals complied with the ITU-R BT.709 Recommendation [ITU709]
for computer systems consideration (CSC). The source image pixel values are in the range [0..255]. The
conversion is performed according to the following formulas [Jack01]:

Y' = 0.183*R' + 0.614*G' + 0.062*B' + 16
Cb' = -0.101*R' - 0.338*G' + 0.439*B' + 128
Cr' = 0.439*R' - 0.399*G' - 0.040*B' + 128
The destination image pDst has 4:2:0 sampling format (see Table “Planar Image Formats” for moredetails).

898

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

The values of roiSize.width and roiSize.height should be multiples of 2. Otherwise, the function
reduces their original values to the nearest multiples of 2, performs operation, and returns a warning
message.

Return Values
ippStsNoErr
ippStsNullPtrErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pSrc or pDst is NULL.

ippStsSizeErr

Indicates an error condition if roiSize.width is less than 2 orroiSize.height is less than 2.

ippStsDoubleSize

Indicates a warning if roiSize has a field that is not a multipleof 2.

BGRToYCbCr420_709HDTV
Converts a BGR image to the YCbCr image with 4:2:0
sampling for ITU-R BT.709 HDTV signal.

SyntaxIppStatus ippiBGRToYCbCr420_709HDTV_8u_AC4P3R(const Ipp8u* pSrc, int srcStep, Ipp8u*
pDst[3], int dstStep[3], IppiSize roiSize);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pDst
dstStep
roiSize

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
An array of pointers to ROI in separate planes of thedestination image.
An array of distances in bytes between starts of consecutive
lines in the destination image planes.
Size of the source and destination ROI in pixels.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts a four-channel gamma-corrected B'G'R' image pSrc to the planar Y'Cb'Cr' image
pDst for digital component video signals complied with the ITU-R BT.709 Recommendation [ITU709] forhigh-definition TV (HDTV). The source image pixel values are in the range [16..235]. The conversion is
performed according to the following formulas [Jack01]:

Y' = 0.213*R' + 0.715*G' + 0.072*B'
Cb' = -0.117*R' - 0.394*G' + 0.511*B' + 128
Cr' = 0.511*R' - 0.464*G' - 0.047*B' + 128
899

1Intel® Integrated Performance Primitives Developer Guide and Reference

The values of Y' of the destination image are in the range [16..235], the values of Cb', Cr' are in the range[16..240]. They should be saturated at the 1 and 254 levels.
The destination image pDst has the 4:2:0 sampling format (see Table “Planar Image Formats” for moredetails).
The values of roiSize.width and roiSize.height should be multiples of 2. Otherwise, the function
reduces their original values to the nearest multiples of 2, performs the operation, and returns a warning
message.

Return Values
ippStsNoErr
ippStsNullPtrErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pSrc or pDst is NULL.

ippStsSizeErr

Indicates an error condition if roiSize.width is less than 2 orroiSize.height is less than 2.

ippStsDoubleSize

Indicates a warning if roiSize has a field that is not a multipleof 2.

BGRToYCrCb420_709CSC
Converts a BGR image to the YCrCb image with 4:2:0
sampling for ITU-R BT.709 CSC signal.

SyntaxIppStatus ippiBGRToYCrCb420_709CSC_8u_AC4P3R(const Ipp8u* pSrc, int srcStep, Ipp8u*
pDst[3], int dstStep[3], IppiSize roiSize);
IppStatus ippiBGRToYCrCb420_709CSC_8u_C3P3R(const Ipp8u* pSrc, int srcStep, Ipp8u*
pDst[3], int dstStep[3], IppiSize roiSize);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pDst
dstStep
roiSize

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
An array of pointers to ROI in separate planes of thedestination image.
An array of distances in bytes between starts of consecutive
lines in the destination image planes.
Size of the source and destination ROI in pixels.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).

900

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

This function converts a three- or four-channel gamma-corrected B'G'R' image pSrc to the planar Y'Cr'Cb'
image pDst for digital component video signals complied with the ITU-R BT.709 Recommendation [ITU709]
for computer systems consideration (CSC). The source image pixel values are in the range [0..255]. The
conversion is performed according to the following formulas [Jack01]:

Y' = 0.183*R' + 0.614*G' + 0.062*B' + 16
Cb' = -0.101*R' - 0.338*G' + 0.439*B' + 128
Cr' = 0.439*R' - 0.399*G' - 0.040*B' + 128
The destination image pDst has 4:2:0 sampling format (see Table “Planar Image Formats” for moredetails).
The values of roiSize.width and roiSize.height should be multiples of 2. Otherwise, the function
reduces their original values to the nearest multiples of 2, performs the operation, and returns a warning
message.

Return Values
ippStsNoErr
ippStsNullPtrErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pSrc or pDst is NULL.

ippStsSizeErr

Indicates an error condition if roiSize.width is less than 2 orroiSize.height is less than 2.

ippStsDoubleSize

Indicates a warning if roiSize has a field that is not a multiple
of 2.

YCbCr420ToBGRConverts a YCbCr image with the 4:2:0 sampling to
the BGR image.

SyntaxIppStatus ippiYCbCr420ToBGR_8u_P3C3R(const Ipp8u* pSrc[3], int srcStep[3], Ipp8u* pDst,
int dstStep, IppiSize roiSize);
IppStatus ippiYCbCr420ToBGR_8u_P3C4R(const Ipp8u* pSrc[3], int srcStep[3],Ipp8u* pDst,
int dstStep, IppiSize roiSize, Ipp8u aval);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pDst

An array of pointers to ROI in separate planes of the source
image.
An array of distances in bytes between starts of consecutive
lines in the source image planes.
Pointer to the destination image ROI.

901

1

Intel® Integrated Performance Primitives Developer Guide and Reference

roiSize

Distance in bytes between starts of consecutive lines in thedestination image.
Size of the source and destination ROI in pixels.

aval

Constant value to create fourth channel.

dstStep

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts the Y'Cb'Cr' image pSrc with the 4:2:0 sampling (see Table “Planar Image
Formats” for more details) to the gamma-corrected three- or four-channel B'G'R' image pDst. The
conversion is performed according to the same formulas as the function ippiYCbCrToRGB does.
Fourth channel is created by setting channel values to the constant value aval.
The values of roiSize.width and roiSize.height should be multiples of 2. If not the function reduces
their original values to the nearest multiples of 2, performs operation, and returns warning message.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsDoubleSize

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pSrc or pDst is NULL.
Indicates an error condition if roiSize has a field with a zero or
negative value.
Indicates a warning if roiSize has a field that is not a multiple
of 2.

YCbCr420ToBGR_709CSC
Converts a YCbCr image with 4:2:0 sampling to the
BGR image for ITU-R BT.709 CSC signal.

SyntaxIppStatus ippiYCbCr420ToBGR_709CSC_8u_P3C3R(const Ipp8u* pSrc[3], int srcStep[3],Ipp8u* pDst, int dstStep, IppiSize roiSize);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pDst
dstStep902

An array of pointers to ROI in separate planes of the source
image.
An array of distances in bytes between starts of consecutive
lines in the source image planes.
Pointer to the destination image ROI.
Distance in bytes between starts of consecutive lines in thedestination image.

Developer Guide and Reference for Intel® Integrated Performance Primitives

roiSize

1

Size of the source and destination ROI in pixels.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts a planar Y'Cb'Cr' image pSrc to the three-channel gamma-corrected B'G'R' image
pDst for digital component video signals complied with the ITU-R BT.709 Recommendation [ITU709] forcomputer systems consideration (CSC). The conversion is performed according to the following formulas[Jack01]:

R' = 1.164*(Y' - 16) + 1.793*(Cr' - 128)
G' = 1.164*(Y' - 16) - 0.534*(Cr' - 128) - 0.213*(Cb' - 128)
B' = 1.164*(Y' - 16) + 2.115*(Cb' - 128)
The output R'G'B' values are saturated to the range [0..255]. The source image pDst has the 4:2:0
sampling format (see Table “Planar Image Formats” for more details).
The values of roiSize.width and roiSize.height should be multiples of 2. Otherwise, the function
reduces their original values to the nearest multiples of 2, performs the operation, and returns a warning
message.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsDoubleSize

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pSrc or pDst is NULL.
Indicates an error condition if roiSize has a field with a zero or
negative value.
Indicates a warning if roiSize has a field that is not a multiple
of 2.

YCbCr420ToBGR_709HDTV
Converts a YCbCr image with 4:2:0 sampling to the
BGR image for ITU-R BT.709 HDTV signal.

SyntaxIppStatus ippiYCbCr420ToBGR_709HDTV_8u_P3C4R(const Ipp8u* pSrc[3], int srcStep[3],Ipp8u* pDst, int dstStep, IppiSize roiSize, Ipp8u aval);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep

An array of pointers to ROI in separate planes of the source
image.
An array of distances in bytes between starts of consecutive
lines in the source image planes.

903

1

Intel® Integrated Performance Primitives Developer Guide and Reference

pDst

Pointer to the destination image ROI.

roiSize

Distance in bytes between starts of consecutive lines in thedestination image.
Size of the source and destination ROI in pixels.

aval

Constant value to create fourth channel.

dstStep

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts a planar Y'Cb'Cr' image pSrc to the four-channel gamma-corrected B'G'R' image
pDst for digital component video signals complied with the ITU-R BT.709 Recommendation [ITU709] forhigh-definition TV (HDTV). The values of Y' are in the range [16..235], the values of Cb', Cr' are in therange [16..240]. The conversion is performed according to the following formulas [Jack01]:

R' = Y' + 1.540*(Cr' - 128)
G' = Y' - 0.459*(Cr' - 128) - 0.183*(Cb' - 128)
B' = Y' + 1.816*(Cb' - 128)
The destination image pixel values have a nominal range [16..235]. The resulting R'G'B' values should besaturated at the 0 and 255 levels.
The source image pDst has the 4:2:0 sampling format (see Table “Planar Image Formats” for moredetails).
The values of roiSize.width and roiSize.height should be multiples of 2. Otherwise the function
reduces their original values to the nearest multiples of 2, performs operation, and returns a warning
message.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsDoubleSize

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pSrc or pDst is NULL.
Indicates an error condition if roiSize has a field with a zero or
negative value.
Indicates a warning if roiSize has a field that is not a multipleof 2.

BGRToYCrCb420
Converts a BGR image to the YCrCb image with 4:2:0
sampling format.

SyntaxIppStatus ippiBGRToYCrCb420_8u_C3P3R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst[3],int dstStep[3], IppiSize roiSize);
IppStatus ippiBGRToYCrCb420_8u_AC4P3R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst[3],int dstStep[3], IppiSize roiSize);

Include Files
ippcc.h904

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pDst
dstStep
roiSize

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
An array of pointers to ROI in separate planes of thedestination image.
An array of distances in bytes between starts of consecutive
lines in the destination image planes.
Size of the source and destination ROI in pixels.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts a three- or four-channel gamma-corrected B'G'R' image pSrc to the planar
Y'Cr'Cb' image pDst according to the same formulas as the function ippiRGBToYCbCr does. The
destination image pDst has the 4:2:0 sampling format and the following order of pointers: Y-plane, Crplane, Cb-plane (see Table “Planar Image Formats” for more details).

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pSrc or pDst is NULL.
Indicates an error condition if roiSize.width is less than 2 orroiSize.height is less than 2.

BGRToYCbCr411
Converts a BGR image to the YCbCr planar image thathas a 4:1:1 sampling format.

SyntaxIppStatus ippiBGRToYCbCr411_8u_C3P3R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst[3],int dstStep[3], IppiSize roiSize);
IppStatus ippiBGRToYCbCr411_8u_AC4P3R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst[3],int dstStep[3], IppiSize roiSize);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

905

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Parameters
pSrc
srcStep
pDst
dstStep
roiSize

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
An array of pointers to ROI in separate planes of thedestination image.
An array of distances in bytes between starts of consecutive
lines in the destination image planes.
Size of the source and destination ROI in pixels.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts a three- or four-channel gamma-corrected B'G'R' image pSrc to the planar Y'Cb'Cr'
image pDst according to the same formulas as the function ippiRGBToYCbCr does. The difference is that
ippiBGRToYCbCr411 uses the 4:1:1 sampling format (see Table “Planar Image Formats” for more details).

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pSrc or pDst is NULL.
Indicates an error condition if roiSize.width is less than 4 orroiSize.height is less than 1.

YCbCr411ToBGRConverts a YCbCr image that has 4:1:1 sampling
format to the RGB color model.

SyntaxIppStatus ippiYCbCr411ToBGR_8u_P3C3R(const Ipp8u* pSrc[3], int srcStep[3], Ipp8u* pDst,
int dstStep, IppiSize roiSize);
IppStatus ippiYCbCr411ToBGR_8u_P3C4R(const Ipp8u* pSrc[3], int srcStep[3], Ipp8u* pDst,
int dstStep, IppiSize roiSize, Ipp8u aval);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep906

An array of pointers to ROI in separate planes of the source
image.
An array of distances in bytes between starts of consecutive
lines in the source image planes.

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Pointer to the destination image ROI.

pDst

roiSize

Distance in bytes between starts of consecutive lines in thedestination image.
Size of the source and destination ROI in pixels.

aval

Constant value to create fourth channel.

dstStep

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts the planar Y'Cb'Cr' image pSrc to the three- or four-channel image pDst.To
compute gamma-corrected R'G'B' (B'G'R') channel values the above formulas are used. The difference isthat ippiYCbCr411ToBGR uses the input data in the 4:1:1 sampling format (see Table “Planar Image
Formats” for more details). Fourth channel is created by setting channel values to the constant value aval.

Return Values
ippStsNoErr
ippStsNullPtrErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pSrc or pDst is NULL.
Indicates an error condition if roiSize has a field with a zero or
negative value.

ippStsSizeErr

RGBToXYZConverts an RGB image to the XYZ color model.

SyntaxIppStatus ippiRGBToXYZ_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>*pDst, int dstStep, IppiSize roiSize);
Supported values for mod:8u_C3R

16u_C3R

16s_C3R

32f_C3R

8u_AC4R

16u_AC4R

16s_AC4R

32f_AC4R

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pDst
dstStep

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the destination image ROI.
Distance in bytes between starts of consecutive lines in thedestination image.

907

1

Intel® Integrated Performance Primitives Developer Guide and ReferenceSize of the source and destination ROI in pixels.

roiSize

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts the RGB image pSrc to the CIEXYZ image pDst according to the following basic
equations:

X = 0.412453*R + 0.35758 *G + 0.180423*B
Y = 0.212671*R + 0.71516 *G + 0.072169*B
Z = 0.019334*R + 0.119193*G + 0.950227*B
The equations above are given on the assumption that R,G, and B values are normalized to the range [0..1].
In case of the floating-point data type, the input RGB values must already be in the range [0..1]. For integer
data types, normalization is done by the conversion function internally.
The computed XYZ values are saturated if they fall out of range [0..1].
In case of integer function flavors, these values are then scaled to the full range of the destination data type(see Table “Image Data Types and Ranges”).

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if pSrc or pDst is NULL.

ippStsSizeErr

Indicates an error condition if roiSize has a field with a zero or
negative value.

XYZToRGB
Converts an XYZ image to the RGB color model.

SyntaxIppStatus ippiXYZToRGB_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>*pDst, int dstStep, IppiSize roiSize);
Supported values for mod:8u_C3R

16u_C3R

16s_C3R

32f_C3R

8u_AC4R

16u_AC4R

16s_AC4R

32f_AC4R

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc

Pointer to the source image ROI.

srcStep

Distance in bytes between starts of consecutive lines in thesource image.

908

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Pointer to the destination image ROI.

pDst

Distance in bytes between starts of consecutive lines in thedestination image.
Size of the source and destination ROI in pixels.

dstStep
roiSize

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts the CIEXYZ image pSrc to the RGB image pDst according to the following basic
equations:

R = 3.240479 * X - 1.53715 * Y - 0.498535 * Z
G = -0.969256 * X + 1.875991 * Y + 0.041556 * Z
B = 0.055648 * X - 0.204043 * Y + 1.057311 * Z
The equations above are given on the assumption that X,Y, and Z values are in the range [0..1]. In case of
the floating-point data type, the input XYZ values must already be in the range [0..1]. For integer datatypes, normalization is done by the conversion function internally.
The computed RGB values are saturated if they fall out of range [0..1].
In case of integer function flavors, these values are then scaled to the full range of the destination data type(see Table “Image Data Types and Ranges”).

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if pSrc or pDst is NULL.

ippStsSizeErr

Indicates an error condition if roiSize has a field with a zero or
negative value.

RGBToLUV, BGRToLUVConverts an RGB or BGR image to the LUV color
model.

SyntaxCase 1: RGB to LUVIppStatus ippiRGBToLUV_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>*pDst, int dstStep, IppiSize roiSize);
Supported values for mod:8u_C3R

16u_C3R

16s_C3R

32f_C3R

8u_AC4R

16u_AC4R

16s_AC4R

32f_AC4R

Case 2: BGR to LUVIppStatus ippiBGRToLUV_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>*pDst, int dstStep, IppiSize roiSize);
Supported values for mod:8u_C3R

32f_C3R

909

1Intel® Integrated Performance Primitives Developer Guide and Reference

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pDst
dstStep
roiSize

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the destination image ROI.
Distance in bytes between starts of consecutive lines in thedestination image.
Size of the source and destination ROI in pixels.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts the RGB or BGR image pSrc to the CIE LUV CIE LUV image pDstin two steps. First,
the conversion is done into CIE XYZ format, using equations defined for the ippiRGBToXYZ function. After
that, conversion to LUV image is performed in accordance with the following equations:

L = 116. * (Y/Yn)1/3. - 16.
U = 13. * L * (u - un)
V = 13. * L * (v - vn)
where

u = 4.*X / (X + 15.*Y + 3.*Z)
v = 9.*Y / (X + 15.*Y + 3.*Z)
un = 0.197839
vn = 0.468342
The computed values of the L component are in the range [0..100], U component in the range [-134..220],
and V component in the range [-140..122].
The equations above are given on the assumption that R, G, and B values are normalized to the range [0..1].
In case of the floating-point data type, the input RGB values must already be in the range [0..1]. For integer
data types, normalization is done by the conversion function internally.
In case of 8u data type, the computed L, U, and V values are quantized and converted to fit in the range[0..IPP_MAX_8U] as follows:

L = L * IPP_MAX_8U / 100.
U = (U + 134.) * IPP_MAX_8U / 354.
V = (V + 140.) * IPP_MAX_8U / 262.
In case of 16u data type, the computed L, U, and V values are quantized and converted to fit in the range[0..IPP_MAX_16U] as follows:910

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

L = L * IPP_MAX_16U / 100.
U = (U + 134.) * IPP_MAX_16U / 354.
V = (V + 140.) * IPP_MAX_16U / 262.
In case of 16s data type, the computed L,U, and V values are quantized and converted to fit in the range[IPP_MIN_16S..IPP_MAX_16S] as follows:

L = L * IPP_MAX_16U / 100. + IPP_MIN_16S
U = (U + 134.) * IPP_MAX_16U / 354. + IPP_MIN_16S
V = (V + 140.) * IPP_MAX_16U / 262. + IPP_MIN_16S
For 32f data type, no further conversion is done and L, U, and V components remain in the ranges [0..100],[-134..220], and [-140..122], respectively.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if pSrc or pDst is NULL.

ippStsSizeErr

Indicates an error condition if roiSize has a field with a zero or
negative value.

LUVToRGB, LUVToBGRConverts a LUV image to the RGB or BGR color model.

SyntaxCase 1: LUV to RGB
IppStatus ippiLUVToRGB_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>*pDst, int dstStep, IppiSize roiSize);
Supported values for mod:8u_C3R

16u_C3R

16s_C3R

32f_C3R

8u_AC4R

16u_AC4R

16s_AC4R

32f_AC4R

Case 2: LUV to BGRIppStatus ippiLUVToBGR_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>*pDst, int dstStep, IppiSize roiSize);
Supported values for mod:8u_C3R

32f_C3R

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

911

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Parameters
pSrc
srcStep
pDst
dstStep
roiSize

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the destination image ROI.
Distance in bytes between starts of consecutive lines in thedestination image.
Size of the source and destination ROI in pixels.

Description
This function operates with ROI (see Regions of Interest in Intel IPP ).
This function converts the CIE LUV image pSrc to the RGB or BGR image pDst in two steps. First, theconversion is carried out into CIE XYZ format.
To accomplish it, LUV components are transformed back into their original range. This is done for different
data types in the following way.
For 8u data type:

L = L * 100./ IPP_MAX_8U
U = (U * 354./ IPP_MAX_8U) - 134.
V = (V * 262./ IPP_MAX_8U) - 140.
For 16u data type:

L = L * 100./ IPP_MAX_16U
U = (U * 354./ IPP_MAX_16U) - 134.
V = (V * 262./ IPP_MAX_16U) - 140.
For 16s data type:

L = (L - IPP_MIN_16S)* 100./ IPP_MAX_16U
U = ((U - IPP_MIN_16S)* 354./ IPP_MAX_16U) - 134.
V = ((V - IPP_MIN_16S) * 262./ IPP_MAX_16U) - 140.
After that, conversion to XYZ format takes place as follows:

Y = Yn * ((L + 16.) / 116.)**3.
X = -9.* Y * u / ((u - 4.)* v - u* v )Z = (9.* Y - 15*v*Y - v*X) / 3. * v
whereu = U / (13.* L) + un
v = V / (13.* L) + vn
andun = 4.*xn / (-2.*xn + 12.*yn + 3.)
vn = 9.*yn / (-2.*xn + 12.*yn + 3.)

912

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Here xn = 0.312713, yn = 0.329016 are the CIE chromaticity coordinates of the D65 white point, and Yn =1.0 is the luminance of the D65 white point.
After this intermediate conversion is done, the obtained XYZ image is then converted to the destination RGB
or BGR format using equations defined for the ippiXYZToRGB function.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if pSrc or pDst is NULL.

ippStsSizeErr

Indicates an error condition if roiSize has a field with a zero or
negative value.

BGRToLab, RGBToLab
Converts a BGR or RGB image to the Lab color model.

SyntaxCase 1: BGR to Lab
IppStatus ippiBGRToLab_8u_C3R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int dstStep,
IppiSize roiSize);
IppStatus ippiBGRToLab_8u16u_C3R(const Ipp8u* pSrc, int srcStep, Ipp16u* pDst, int
dstStep, IppiSize roiSize);
IppStatus ippiBGRToLab_32f_C3R(const Ipp32f* pSrc, int srcStep, Ipp32f* pDst, int
dstStep, IppiSize roiSize);

Case 2: RGB to Lab
IppStatus ippiRGBToLab_8u_C3R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int dstStep,
IppiSize roiSize);
IppStatus ippiRGBToLab_32f_C3R(const Ipp32f* pSrc, int srcStep, Ipp32f* pDst, int
dstStep, IppiSize roiSize);
IppStatus ippiRGBToLab_32f_P3R(const Ipp32f* pSrc[3], int srcStep[3], Ipp32f* pDst[3],int dstStep[3], IppiSize roiSize);
IppStatus ippiRGBToLab_64f_P3R(const Ipp64f* pSrc[3], int srcStep[3], Ipp64f* pDst[3],int dstStep[3], IppiSize roiSize);

Case 3: RGB to Lab with platform-aware functions
IppStatus ippiRGBToLab_32f_P3R_L(const Ipp32f* pSrc[3], IppSizeL srcStep[3], Ipp32f*
pDst[3], IppSizeL dstStep[3], IppiSizeL roiSize);
IppStatus ippiRGBToLab_64f_P3R_L(const Ipp64f* pSrc[3], IppSizeL srcStep[3], Ipp64f*
pDst[3], IppSizeL dstStep[3], IppiSizeL roiSize);

Case 4: RGB to Lab with TL functions based on the Platform Aware API
IppStatus ippiRGBToLab_32f_P3R_LT(const Ipp32f* pSrc[3], IppSizeL srcStep[3], Ipp32f*
pDst[3], IppSizeL dstStep[3], IppiSizeL roiSize);
IppStatus ippiRGBToLab_64f_P3R_LT(const Ipp64f* pSrc[3], IppSizeL srcStep[3], Ipp64f*
pDst[3], IppSizeL dstStep[3], IppiSizeL roiSize);

Case 5: RGB to Lab with TL functions based on the Classic API
IppStatus ippiRGBToLab_32f_P3R_T(const Ipp32f* pSrc[3], int srcStep[3], Ipp32f*
pDst[3], int dstStep[3], IppiSize roiSize);913

1Intel® Integrated Performance Primitives Developer Guide and Reference

IppStatus ippiRGBToLab_64f_P3R_T(const Ipp64f* pSrc[3], int srcStep[3], Ipp64f*
pDst[3], int dstStep[3], IppiSize roiSize);

Include Files
ippcc.hippcc_l.hippcc_tl.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc, pSrc[3]Pointer to the source image ROI.

srcStep, srcStep[3]Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the destination image ROI.

pDst, pDst[3]Distance in bytes between starts of consecutive lines in thedestination image.
Size of the source and destination ROI in pixels.

dstStep, dstStep[3]roiSize

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts the BGR or RGB image pSrc to the CIE Lab image pDst, and vice versa. Conversion to
Lab consists of two steps. First, the conversion is done into CIE XYZ format, using equations defined for thefunction ippiRGBToXYZ. After that, conversion to the Lab image is performed in accordance with thefollowing equations:

L = 116. * (Y/Yn)1/3. - 16 for Y/Yn > 0.008856
L = 903.3 * (Y/Yn)1/3. for Y/Yn ≤ 0.008856
a = 500. * [f(X/Xn)-f(Y/Yn)]b = 200. * [f(Y/Yn)-f(Z/Zn)]
where

f t =

t 1/3,

1 29 24
t + 293 6

t > 6/29

3

Here Yn = 1.0, Xn = 0.950455, Zn = 1.088753 for the D65 white point with the CIE chromaticity coordinates
xn = 0.312713, yn = 0.329016.
The equations above are given on the assumption that initial B, G, R values are normalized to the range[0..1]. The computed values of the L component are in the range [0..100], a and b component values are in
the range [-128..127].
These values are quantized and scaled to the 8-bit range of 0 to 255 for 8u_C3 flavors:

L = L * 255./100.

914

Developer Guide and Reference for Intel® Integrated Performance Primitives1

a = (a + 128.)b = (a + 128.)or to the 16-bit range of 0 to 65535 for ippiBGRToLab_8u16u_C3R:

L = L * 65535./100.
a = (a + 128.)* 255
b = (a + 128.)* 255

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if pSrc, pSrc[3], pDst, or pDst[3]is NULL.

ippStsSizeErr

Indicates an error condition if roiSize has a field with a zero or
negative value.

LabToBGR, LabToRGB
Converts a Lab image to the BGR or RGB color model.

SyntaxCase 1: Lab to BGRIppStatus ippiLabToBGR_8u_C3R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int dstStep,
IppiSize roiSize);
IppStatus ippiLabToBGR_16u8u_C3R(const Ipp16u* pSrc, int srcStep, Ipp8u* pDst, int
dstStep, IppiSize roiSize);
IppStatus ippiLabToBGR_32f_C3R(const Ipp32f* pSrc, int srcStep, Ipp32f* pDst, int
dstStep, IppiSize roiSize);

Case 2: Lab to RGB
IppStatus ippiLabToRGB_8u_C3R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int dstStep,
IppiSize roiSize);
IppStatus ippiLabToRGB_32f_C3R(const Ipp32f* pSrc, int srcStep, Ipp32f* pDst, int
dstStep, IppiSize roiSize);
IppStatus ippiLabToRGB_32f_P3R(const Ipp32f* pSrc[3], int srcStep[3], Ipp32f* pDst[3],int dstStep[3], IppiSize roiSize);
IppStatus ippiLabToRGB_64f_P3R(const Ipp64f* pSrc[3], int srcStep[3], Ipp64f* pDst[3],int dstStep[3], IppiSize roiSize);

Case 3: Lab to RGB with platform-aware functions
IppStatus ippiLabToRGB_32f_P3R_L(const Ipp32f* pSrc[3], IppSizeL srcStep[3], Ipp32f*
pDst[3], IppSizeL dstStep[3], IppiSizeL roiSize);
IppStatus ippiLabToRGB_64f_P3R_L(const Ipp64f* pSrc[3], IppSizeL srcStep[3], Ipp64f*
pDst[3], IppSizeL dstStep[3], IppiSizeL roiSize);

Case 4: Lab to RGB with TL functions based on the Platform Aware API
IppStatus ippiLabToRGB_32f_P3R_LT(const Ipp32f* pSrc[3], IppSizeL srcStep[3], Ipp32f*
pDst[3], IppSizeL dstStep[3], IppiSizeL roiSize);
IppStatus ippiLabToRGB_64f_P3R_LT(const Ipp64f* pSrc[3], IppSizeL srcStep[3], Ipp64f*
pDst[3], IppSizeL dstStep[3], IppiSizeL roiSize);915

1Intel® Integrated Performance Primitives Developer Guide and Reference

Case 5: Lab to RGB with TL functions based on the Classic API
IppStatus ippiLabToRGB_32f_P3R_T(const Ipp32f* pSrc[3], int srcStep[3], Ipp32f*
pDst[3], int dstStep[3], IppiSize roiSize);
IppStatus ippiLabToRGB_64f_P3R_T(const Ipp64f* pSrc[3], int srcStep[3], Ipp64f*
pDst[3], int dstStep[3], IppiSize roiSize);

Include Files
ippcc.hippcc_l.hippcc_tl.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc, pSrc[3]Pointer to the source image ROI.

srcStep, srcStep[3]Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the destination image ROI.

pDst, pDst[3]dstStep, dstStep[3]roiSize

Distance in bytes between starts of consecutive lines in thedestination image.
Size of the source and destination ROI in pixels.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts the CIE Lab image pSrc to the BGR or RGB image pDst in two steps. First, theconversion is carried out into CIE XYZ format.
To accomplish it, Lab components are transformed back into their original range. This is done for different
data types in the following way.
For 8u data type:

L = L * 100./255.
a = a - 128.
b = b - 128.
For 16u data type:

L = L * 100./65535.
a = (a/255. - 128.)b = (b/255.) - 128.)
After that, conversion to XYZ format takes place as follows:

Y = Yn* P3.
X = Xn*(P + a/500.)3.

916

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Z = Zn*(P - b/200.)3.
where

P = (L +16)/116.
After this intermediate conversion is done, the obtained XYZ image is then converted to the destination BGRor RGB format using equations defined for the ippiXYZToRGB function.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if pSrc, pSrc[3], pDst, or pDst[3]is NULL.

ippStsSizeErr

Indicates an error condition if roiSize has a field with a zero or
negative value.

RGBToYCC
Converts an RGB image to the YCC color model.

SyntaxIppStatus ippiRGBToYCC_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>*pDst, int dstStep, IppiSize roiSize);
Supported values for mod:8u_C3R

16u_C3R

16s_C3R

32f_C3R

8u_AC4R

16u_AC4R

16s_AC4R

32f_AC4R

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pDst
dstStep
roiSize

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the destination image ROI.
Distance in bytes between starts of consecutive lines in thedestination image.
Size of the source and destination ROI in pixels.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts the gamma-corrected R'B'G' image pSrc to the PhotoY'C'C' image pDst according
to the following basic equations:

Y' = 0.299*R' + 0.587*G' + 0.114*B'917

1Intel® Integrated Performance Primitives Developer Guide and Reference

C1' = -0.299*R' - 0.587*G' + 0.886*B' = B'- Y
C2' = 0.701*R' - 0.587*G' - 0.114*B' = R'- Y
The equations above are given on the assumption that R',G', and B' values are normalized to the range[0..1]. In case of the floating-point data type, the input R'G'B' values must already be in the range [0..1]. For
integer data types, normalization is done by the conversion function internally.
The computed Y', C1', C2' values are then quantized and converted to fit in the range [0..1] as follows:

Y' = 1. / 1.402 * Y'
C1' = 111.4 / 255. * C1' + 156. / 255.
C2' = 135.64 /255. * C2' + 137. / 255.
In case of integer function flavors, these values are then scaled to the full range of the destination data type(see Table “Image Data Types and Ranges”).

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if pSrc or pDst is NULL.

ippStsSizeErr

Indicates an error condition if roiSize has a field with a zero or
negative value.

YCCToRGB
Converts a YCC image to the RGB color model.

SyntaxIppStatus ippiYCCToRGB_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>*pDst, int dstStep, IppiSize roiSize);
Supported values for mod:8u_C3R

16u_C3R

16s_C3R

32f_C3R

8u_AC4R

16u_AC4R

16s_AC4R

32f_AC4R

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pDst
dstStep

918

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the destination image ROI.
Distance in bytes between starts of consecutive lines in thedestination image.

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Size of the source and destination ROI in pixels.

roiSize

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts the PhotoY'C'C' image pSrc to the R'B'G' image pDst. The function ippiYCCToRGB
first restores normal luminance and chrominance data as:

Y' = 1.3584 * Y'
C1' = 2.2179 * (C1' - 156./255.)
C2' = 1.8215 * (C2' - 137./255.)
The equations above are given on the assumption that source Y, C1, and C2 values are normalized to therange [0..1]. In case of the floating-po int data type, the input YCC values must already be in the range[0..1]. For integer data types, normalization is done by the conversion function internally.
After that, YCC data are transformed into RGB format according to the following basic equations:

R' = Y' + C2'
G' = Y' - 0.194*C1' - 0.509*C2'
B' = Y' + C1'
In case of integer function flavors, the computed R'B'G' values are then scaled to the full range of thedestination data type (see Table “Image Data Types and Ranges”).

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if pSrc or pDst is NULL.

ippStsSizeErr

Indicates an error condition if roiSize has a field with a zero or
negative value.

RGBToHLS
Converts an RGB image to the HLS color model.

SyntaxIppStatus ippiRGBToHLS_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>*pDst, int dstStep, IppiSize roiSize);
Supported values for mod:8u_C3R

16u_C3R

16s_C3R

32f_C3R

8u_AC4R

16u_AC4R

16s_AC4R

32f_AC4R

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

919

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Parameters
pSrc
srcStep
pDst
dstStep
roiSize

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the destination image ROI.
Distance in bytes between starts of consecutive lines in thedestination image.
Size of the source and destination ROI in pixels.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts the R'B'G' image pSrc to the HLS image pDst. For function flavors operating on the
floating point data, source RGB values must be in the range [0..1].
The conversion algorithm from RGB to HLS can be represented in pseudocode as follows:// Lightness:
M1 = max(R,G,B); M2 = min(R,G,B); L = (M1+M2)/2// Saturation:
if M1 = M2 then // achromatics case
S = 0
H = 0
else // chromatics case
if L <= 0.5 thenS = (M1-M2) / (M1+M2)
else
S = (M1-M2) / (2-M1-M2)// Hue:Cr = (M1-R) / (M1-M2)
Cg = (M1-G) / (M1-M2)
Cb = (M1-B) / (M1-M2)
if R = M1 then H = Cb - Cg//change R=M2 to R=M1
if G = M1 then H = 2 + Cr - Cb//change G=M2 to G=M1
if B = M1 then H = 4 + Cg - Cr//change B=M2 to B=M1
H = 60*H
if H < 0 then H = H + 360
For floating point function flavors, the computed H, L, S values are scaled to the range [0..1]. In case of
integer function flavors, these values are scaled to the full range of the destination data type (Table “Image
Data Types and Ranges”).

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if pSrc or pDst is NULL.

ippStsSizeErr

Indicates an error condition if roiSize has a field with a zero or
negative value.

HLSToRGB
Converts an HLS image to the RGB color model.

920

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

SyntaxIppStatus ippiHLSToRGB_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>*pDst, int dstStep, IppiSize roiSize);
Supported values for mod:8u_C3R

16u_C3R

16s_C3R

32f_C3R

8u_AC4R

16u_AC4R

16s_AC4R

32f_AC4R

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pDst
dstStep
roiSize

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the destination image ROI.
Distance in bytes between starts of consecutive lines in thedestination image.
Size of the source and destination ROI in pixels.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts the HLS image pSrc to the R'B'G' image pDst. For function flavors operating on the
floating point data, source HLS values must be in the range [0..1]. The conversion algorithm from HLS to RGB
can be represented in pseudocode as follows:

if L <= 0.5 thenM2 = L *(1 + S) else
M2 = L + S - L * S M1 = 2 * L - M2 if S = 0
then
R = G = B = L else
h = H + 120
if h > 360 thenh = h - 360
ifh < 60 thenR = ( M1 + ( M2 - M1 ) * h / 60)
else if h < 180 thenR =M2else if h < 240 thenR = M1 + ( M2 - M1 ) * ( 240 - h ) / 60
else
R = M1h = H
if h < 60 thenG = ( M1 + ( M2 - M1 ) * h /60else if h < 180 thenG = M2else if h < 240 thenG = M1 + ( M2
- M1 ) * ( 240 - h ) / 60
else
G = M1h = H - 120
if h < 0thenh += 360
if h < 60 thenB = ( M1 + ( M2 - M1 ) * h / 60
else if h < 180 thenB = M2else if h < 240 thenB = M1 + ( M2 - M1 ) *( 240 - h ) / 60
else
B = M1
For floating point function flavors, the computed R',G',B' values are scaled to the range [0..1]. In case of
integer function flavors, these values are scaled to the full range of the destination data type (see Table“Image Data Types and Ranges”).

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if pSrc or pDst is NULL.

921

1

Intel® Integrated Performance Primitives Developer Guide and ReferenceippStsSizeErr

Indicates an error condition if roiSize has a field with a zero or
negative value.

BGRToHLS
Converts a BGR image to the HLS color model.

SyntaxIppStatus ippiBGRToHLS_8u_AC4R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int
dstStep, IppiSize roiSize);
IppStatus ippiBGRToHLS_8u_C3P3R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst[3], int
dstStep, IppiSize roiSize);
IppStatus ippiBGRToHLS_8u_AC4P4R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst[4], int
dstStep, IppiSize roiSize);
IppStatus ippiBGRToHLS_8u_P3C3R(const Ipp8u* pSrc[3], int srcStep, Ipp8u* pDst, int
dstStep, IppiSize roiSize);
IppStatus ippiBGRToHLS_8u_AP4C4R(const Ipp8u* pSrc[4], int srcStep, Ipp8u* pDst, int
dstStep, IppiSize roiSize);
IppStatus ippiBGRToHLS_8u_P3R(const Ipp8u* pSrc[3], int srcStep, Ipp8u* pDst[3], int
dstStep, IppiSize roiSize);
IppStatus ippiBGRToHLS_8u_AP4R(const Ipp8u* pSrc[4], int srcStep, Ipp8u* pDst[4], int
dstStep, IppiSize roiSize);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pDst

dstStep
roiSize

Pointer to the ROI in the pixel-order source image. An array ofpointers to ROI in each plane in the planar source image.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the ROI in the pixel-order destination image. An
array of pointers to ROI in each plane in the planar destination
image.
Distance in bytes between starts of consecutive lines in thedestination image.
Size of the source and destination ROI in pixels.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts the B'G'R' image pSrc to the HLS image pDst according to the same formula as thefunction ippiRGBToHLS does.

922

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if pSrc or pDst is NULL.

ippStsSizeErr

Indicates an error condition if roiSize has a field with a zero or
negative value.

HLSToBGR
Converts an HLS image to the RGB color model.

SyntaxIppStatus ippiHLSToBGR_8u_C3P3R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst[3], int
dstStep, IppiSize roiSize);
IppStatus ippiHLSToBGR_8u_AC4P4R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst[4], int
dstStep, IppiSize roiSize);
IppStatus ippiHLSToBGR_8u_AP4R(const Ipp8u* pSrc[4], int srcStep, Ipp8u* pDst[4], int
dstStep, IppiSize roiSize);
IppStatus ippiHLSToBGR_8u_P3R(const Ipp8u* pSrc[3], int srcStep, Ipp8u* pDst[3], int
dstStep, IppiSize roiSize);
IppStatus ippiHLSToBGR_8u_AP4C4R(const Ipp8u* pSrc[4], int srcStep, Ipp8u* pDst, int
dstStep, IppiSize roiSize);
IppStatus ippiHLSToBGR_8u_P3C3R(const Ipp8u* pSrc[3], int srcStep, Ipp8u* pDst, int
dstStep, IppiSize roiSize);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pDst

dstStep
roiSize

Pointer to the ROI in the pixel-order source image. An array ofpointers to ROI in each plane in the planar source image.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the ROI in the pixel-order destination image. An
array of pointers to ROI in each plane in the planar destination
image.
Distance in bytes between starts of consecutive lines in thedestination image.
Size of the source and destination ROI in pixels.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).

923

1

Intel® Integrated Performance Primitives Developer Guide and ReferenceThis functionconverts the HLS image pSrc to the B'G'R' image pDst according to the same formula as thefunction ippiHLSToRGB does.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if pSrc or pDst is NULL.

ippStsSizeErr

Indicates an error condition if roiSize has a field with a zero or
negative value.

RGBToHSV
Converts an RGB image to the HSV color model.

SyntaxIppStatus ippiRGBToHSV_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>*pDst, int dstStep, IppiSize roiSize);
Supported values for mod:8u_C3R

16u_C3R

8u_AC4R

16u_AC4R

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pDst
dstStep
roiSize

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the destination image ROI.
Distance in bytes between starts of consecutive lines in thedestination image.
Size of the source and destination ROI in pixels.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts the R'G'B' image pSrc to the HSV image pDst.
The conversion algorithm from RGB to HSV can be represented in pseudocode as follows:// Value: V = max(R,G,B); // Saturation: temp = min(R,G,B); if V = 0 then // achromatics
case
S = 0//
H = 0 else // chromatics caseS = (V - temp)/V // Hue: Cr = (V R) / (V - temp) Cg = (V - G) / (V - temp) Cb = (V - B) / (V - temp) if R = V then H = Cb - Cg if
G = V then H = 2 + Cr - Cb if B = V then H = 4 + Cg - Cr H = 60*H if H < 0 then H = H + 360
The computed H,S,V values are scaled to the full range of the destination data type (see Table “Image Data
Types and Ranges”).

924

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if pSrc or pDst is NULL.

ippStsSizeErr

Indicates an error condition if roiSize has a field with a zero or
negative value.

HSVToRGB
Converts an HSV image to the RGB color model.

SyntaxIppStatus ippiHSVToRGB_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>*pDst, int dstStep, IppiSize roiSize);
Supported values for mod:8u_C3R

16u_C3R

8u_AC4R

16u_AC4R

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pDst
dstStep
roiSize

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the destination image ROI.
Distance in bytes between starts of consecutive lines in thedestination image.
Size of the source and destination ROI in pixels.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts a HSV image pSrc to the image R'G'B'pDst.
The conversion algorithm from HSV to RGB can be represented in pseudocode as follows:

if S = 0 then
R = G = B = V else
if H = 360 then
H = 0
else
H =
H/60
I = floor(H)F = H - I;
M = V * ( 1 - S);
N = V * ( 1 - S * F);K= V * ( 1 - S * (1 - F));
if(I == 0)then{ R = V;G = K;B = M;}
if(I == 1)then{ R = N;G= V;B = M;}
if(I == 2)then{ R = M;G = V;B = K;}
if(I == 3)then{ R = M;G = N;B =V;}
if(I == 4)then{ R = K;G = M;B = V;}if(I == 5)then{ R = V;G = M;B = N;}
The computed R',G',B' values are scaled to the full range of the destination data type (see Table “Image
Data Types and Ranges”).

925

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if pSrc or pDst is NULL.

ippStsSizeErr

Indicates an error condition if roiSize has a field with a zero or
negative value.

RGBToYCoCg
Converts a RGB image to the YCoCg color model.

SyntaxIppStatus ippiRGBToYCoCg_8u_C3P3R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst[3], int
dstStep, IppiSize roi);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pDst
dstSteproi

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
Array of pointers to the destination image ROI in each plane.
Distance in bytes between starts of consecutive lines in thedestination image.
Size of the source and destination ROI in pixels.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts a RGB image pSrc to the YCoCg image pDst according to the following formulas:

Y = ((R + 2*G + B)+ 2)/4
Co = ((R - B) + 1))/2
Cg = (( - R + 2*G - B) + 2)/4

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if one of the specified pointers is
NULL.

YCoCgToRGB
Converts a YCoCg image to the RGB image.

926

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

SyntaxIppStatus ippiYCoCgToRGB_8u_P3C3R(const Ipp8u* pSrc[3], int srcStep, Ipp8u* pDst,int
dstStep, IppiSize roi);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pDst
dstSteproi

Array of pointers to the source image ROI in each plane.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the destination image ROI.
Distance in bytes between starts of consecutive lines in thedestination image.
Size of the source and destination ROI in pixels.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts the YCoCg image pSrc to the RGB image pDst according to the following formulas:

R = Y + Co - Cg
G = Y + Cg
B = Y - Co - Cg

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if one of the specified pointers is
NULL.

BGRToYCoCg
Converts a 24-bit BGR image to the YCoCg color
model.

SyntaxIppStatus ippiBGRToYCoCg_8u16s_C3P3R(const Ipp8u* pBGR, int bgrStep, Ipp16s* pYCC[3],int yccStep, IppiSize roiSize);
IppStatus ippiBGRToYCoCg_8u16s_C4P3R(const Ipp8u* pBGR, int bgrStep, Ipp16s* pYCC[3],int yccStep, IppiSize roiSize);

Include Files
ippcc.h927

1Intel® Integrated Performance Primitives Developer Guide and Reference

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
Pointer to the source image ROI.

pBGR

Distance in bytes between starts of consecutive lines in thesource image.
Array of pointers to the destination image ROI in each plane.

bgrStep
pYCC

Distance in bytes between starts of consecutive lines in thedestination image.
Size of the source and destination ROI in pixels.

yccStep
roiSize

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts the 24-bit BGR image pBGR to the YCoCg image pYCC according to the following
formulas:Y = ((R + 2*G + B)+ 2)/4
Co = ((R - B) + 1))/2
Cg = (( - R + 2*G - B) + 2)/4

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if one of the specified pointers is
NULL.

SBGRToYCoCg
Converts a 48-bit BGR image to the YCoCg color
model.

SyntaxIppStatus ippiSBGRToYCoCg_<mod>(const Ipp16s* pBGR, int bgrStep, Ipp<dstDatatype>*
pYCC[3], int yccStep, IppiSize roiSize);
Supported values for mod:16s_C3P3R

16s32s_C3P3R

16s_C4P3R

16s32s_C4P3R

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

928

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Parameters
pBGR
bgrStep
pYCC
yccStep
roiSize

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
Array of pointers to the destination image ROI in each plane.
Distance in bytes between starts of consecutive lines in thedestination image.
Size of the source and destination ROI in pixels.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts the 48-bit BGR image pBGR to the YCoCg image pYCC according to the following
formulas:Y = ((R + 2*G + B)+ 2)/4
Co = ((R - B) + 1))/2
Cg = (( - R + 2*G - B) + 2)/4

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if one of the specified pointers is
NULL.

YCoCgToBGRConverts a YCoCg image to the 24-bit BGR image.

SyntaxIppStatus ippiYCoCgToBGR_16s8u_P3C3R(const Ipp16s* pYCC[3], int yccStep, Ipp8u*
pBGR,int bgrStep, IppiSize roiSize);
IppStatus ippiYCoCgToBGR_16s8u_P3C4R(const Ipp16s* pYCC[3], int yccStep, Ipp8u* pBGR,
int bgrStep, IppiSize roiSize, Ipp8u aval);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pYCC
yccSteppBGR

Array of pointers to the source image ROI in each plane.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the destination image ROI.

929

1

Intel® Integrated Performance Primitives Developer Guide and Reference

roiSize

Distance in bytes between starts of consecutive lines in thedestination image.
Size of the source and destination ROI in pixels.

aval

Constant value to create the fourth channel.

bgrStep

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts the YCoCg image pYCC to the 24-bit BGR image pBGR according to the following
formulas:

R = Y + Co - Cg
G = Y + Cg
B = Y - Co - Cg
The fourth channel is created by setting channel values to the constant value aval.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if one of the specified pointers is
NULL.

YCoCgToSBGRConverts a YCoCg image to the 48-bit BGR image.

SyntaxCase 1: Conversion to 3-channel image
IppStatus ippiYCoCgToSBGR_16s_P3C3R(const Ipp16s* pYCC[3], int yccStep, Ipp16s* pBGR,
int bgrStep, IppiSize roiSize);
IppStatus ippiYCoCgToSBGR_32s16s_P3C3R(const Ipp32s* pYCC[3], int yccStep, Ipp16s*
pBGR, int bgrStep, IppiSize roiSize);

Case 2: Conversion to 4-channel image
IppStatus ippiYCoCgToSBGR_16s_P3C4R(const Ipp16s* pYCC[3], int yccStep, Ipp16s* pBGR,
int bgrStep, IppiSize roiSize, Ipp16s aval);
IppStatus ippiYCoCgToSBGR_32s16s_P3C4R(const Ipp32s* pYCC[3], int yccStep, Ipp16s*
pBGR, int bgrStep, IppiSize roiSize, Ipp16s aval);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pYCC

930

Array of pointers to the source image ROI in each plane.

Developer Guide and Reference for Intel® Integrated Performance Primitives

yccSteppBGR

1Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the destination image ROI.

roiSize

Distance in bytes between starts of consecutive lines in thedestination image.
Size of the source and destination ROI in pixels.

aval

Constant value to create the fourth channel.

bgrStep

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts the YCoCg image pYCC to the 48-bit BGR image pBGR according to the following
formulas:

R = Y + Co - Cg
G = Y + Cg
B = Y - Co - Cg
The fourth channel is created by setting channel values to the constant value aval.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if one of the specified pointers is
NULL.

BGRToYCoCg_Rev
Converts a 24-bit BGR image to the YCoCg-R color
model.

SyntaxIppStatus ippiBGRToYCoCg_Rev_8u16s_C3P3R(const Ipp8u* pBGR, int bgrStep, Ipp16s*
pYCC[3], int yccStep, IppiSize roiSize);
IppStatus ippiBGRToYCoCg_Rev_8u16s_C4P3R(const Ipp8u* pBGR, int bgrStep, Ipp16s*
pYCC[3], int yccStep, IppiSize roiSize);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pBGR
bgrStep
pYCC

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
Array of pointers to the destination image ROI in each plane.

931

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Distance in bytes between starts of consecutive lines in thedestination image.
Size of the source and destination ROI in pixels.

yccStep
roiSize

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts the 24-bit BGR image pSrc to the YCoCg-R image pDst according to the following
formulas:Co = R - B
t = B + (Co >> 1)
Cg = G - t
Y = t + (Cg >> 1)

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if one of the specified pointers is
NULL.

SBGRToYCoCg_Rev
Converts a 48-bit BGR image to the YCoCg-R color
model.

SyntaxIppStatus ippiSBGRToYCoCg_Rev_<mod>(const Ipp16s* pBGR, int bgrStep, Ipp<dstDatatype>*
pYCC[3], int yccStep, IppiSize roiSize);
Supported values for mod:16s_C3P3R

16s32s_C3P3R

16s_C4P3R

16s32s_C4P3R

Include Files
ippcc.hParameters
pBGR
bgrStep
pYCC
yccStep
roiSize

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
Array of pointers to the destination image ROI in each plane.
Distance in bytes between starts of consecutive lines in thedestination image.
Size of the source and destination ROI in pixels.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).

932

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

This function converts the 48-bit BGR image pBGR to the YCoCg-R image pYCC according to the following
formulas:Co = R - B
t = B + (Co >> 1)
Cg = G - t
Y = t + (Cg >> 1)

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if one of the specified pointers is
NULL.

YCoCgToBGR_Rev
Converts a YCoCg-R image to the 24-bit BGR image.

SyntaxIppStatus ippiYCoCgToBGR_Rev_16s8u_P3C3R(const Ipp16s* pYCC[3], int yccStep, Ipp8u*
pBGR, int bgrStep, IppiSize roiSize);
IppStatus ippiYCoCgToBGR_Rev_16s8u_P3C4R(const Ipp16s* pYCC[3], int yccStep, Ipp8u*
pBGR, int bgrStep, IppiSize roiSize, Ipp8u aval);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pYCC
yccSteppBGR

Array of pointers to the source image ROI in each plane.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the destination image ROI.

roiSize

Distance in bytes between starts of consecutive lines in thedestination image.
Size of the source and destination ROI in pixels.

aval

Constant value to create the fourth channel.

bgrStep

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts the YCoCg-R image pYCC to the 24-bit BGR image pBGR according to the following
formulas:t = Y - (Cg >> 1)
G = Cg + t
933

1Intel® Integrated Performance Primitives Developer Guide and Reference

B = t - (Co >> 1)
R = B + Co
The fourth channel is created by setting channel values to the constant value aval.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if one of the specified pointers is
NULL.

YCoCgToSBGR_Rev
Converts a YCoCg-R image to the 48-bit BGR image.

SyntaxCase 1: Conversion to 3-channel image.
IppStatus ippiYCoCgToSBGR_Rev_16s_P3C3R(const Ipp16s* pYCC[3], int yccStep, Ipp16s*
pBGR, int bgrStep, IppiSize roiSize);
IppStatus ippiYCoCgToSBGR_Rev_32s16s_P3C3R(const Ipp32s* pYCC[3], int yccStep, Ipp16s*
pBGR, int bgrStep, IppiSize roiSize);

Case 2: Conversion to 4-channel image
IppStatus ippiYCoCgToSBGR_Rev_16s_P3C4R(const Ipp16s* pYCC[3], int yccStep, Ipp16s*
pBGR, int bgrStep, IppiSize roiSize, Ipp16s aval);
IppStatus ippiYCoCgToSBGR_Rev_32s16s_P3C4R(const Ipp32s* pYCC[3], int yccStep, Ipp16s*
pBGR, int bgrStep, IppiSize roiSize, Ipp16s aval);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pYCC
yccSteppBGR

Array of pointers to the source image ROI in each plane.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the destination image ROI.

roiSize

Distance in bytes between starts of consecutive lines in thedestination image.
Size of the source and destination ROI in pixels.

aval

Constant value to create the fourth channel.

bgrStep

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts the YCoCg-R image pYCC to the 48-bit BGR image pBGR according to the following
formulas:934

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

t = Y - (Cg >> 1)
G = Cg + t
B = t - (Co >> 1)
R = B + Co
The fourth channel is created by setting channel values to the constant value aval.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if one of the specified pointers is
NULL.

Color - Gray Scale Conversions
GrayToRGB
Coverts a gray scale image to RGB/BGR by copying
luminance component to color components.

SyntaxIppStatus ippiGrayToRGB_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>*pDst, int dstStep, IppiSize roiSize);
Supported values for mod:8u_C1C3R

16u_C1C3R

32f_C1C3R

IppStatus ippiGrayToRGB_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>*pDst, int dstStep, IppiSize roiSize, Ipp<datatype> aval);Supported values for mod:8u_C1C4R

16u_C1C4R

32f_C1C4R

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pDst
dstStep
roiSize

Pointer to the source image ROI.
Distance, in bytes, between the starting points of consecutive
lines in the source image.
Pointer to the destination image ROI.
Distance, in bytes, between the starting points of consecutive
lines in the destination image.
Size of the source and destination ROI, in pixels.

935

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Constant value to create the fourth channel.

aval

Description
This function operates with ROI (see Regions of Interest in Intel IPP ).
This function converts a gray scale image to an RGB/BGR image by copying luminance component to color
components.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error when pSrc or pDst is NULL.

ippStsSizeErr

Indicates an error condition if roiSize has a field with a zero or
negative value.

ExampleThe code example below demonstrates how to use the ippiGrayToRGB_8u_C1C4R function.

const int WIDTH = 2;
const int HEIGHT = 1;
Ipp8u pSrc[WIDTH * HEIGHT] = {113,113,};
Ipp8u pDst[WIDTH * HEIGHT * 4];
int srcStep = WIDTH, dstStep = WIDTH * 4;
IppiSize roiSize = {WIDTH, HEIGHT};
IppStatus status = ippiGrayToRGB_8u_C1C4R(pSrc, srcStep, pDst, dstStep, roiSize, 0xFF);
if ( status == ippStsNoErr) {printf("PASS:\n(%3d %3d %3d %3d), (%3d %3d %3d %3d)\n", pDst[0], pDst[1], pDst[2],pDst[3], pDst[4], pDst[5], pDst[6], pDst[7]);}else
printf("FAIL: status = %d\n", status);
Result:PASS:(113 113 113 255), (113 113 113 255)

See Also
Regions of Interest in Intel IPP
RGBToGray
Converts an RGB image to gray scale using fixedtransform coefficients.

SyntaxIppStatus ippiRGBToGray_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>*pDst, int dstStep, IppiSize roiSize);
Supported values for mod:8u_C3C1R

16u_C3C1R

16s_C3C1R

32f_C3C1R

8u_AC4C1R

16u_AC4C1R

16s_AC4C1R

32f_AC4C1R

936

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pDst
dstStep
roiSize

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the destination image ROI.
Distance in bytes between starts of consecutive lines in thedestination image.
Size of the source and destination ROI in pixels.

Description
This function operates with ROI.
Conversion from RGB image to gray scale (see figure Converting an RGB Image to Gray Scale) uses thefollowing basic equation to compute luma from nonlinear gamma-corrected red, green, and blue values: Y'= 0.299 * R' + 0.587 * G' + 0.114 * B'. Note that the transform coefficients conform to the standard
for the NTSC red, green, and blue CRT phosphors.
Converting an RGB Image to Gray Scale

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if pSrc or pDst pointer is NULL.

ippStsSizeErr

Indicates an error condition if roiSize has a field with a zero or
negative value.

937

1

Intel® Integrated Performance Primitives Developer Guide and Reference

ExampleThe code example below demonstrates how to use the function ippiRGBToGray_8u_C3C1R.

Ipp8u

src[12*3] = { 255, 0, 0, 255, 0, 0, 255, 0, 0, 255, 0, 0,
0, 255, 0, 0, 255, 0, 0, 255, 0, 0, 255, 0,
0, 0, 255, 0, 0, 255, 0, 0, 255, 0, 0, 255};
Ipp8u dst[4*3];
IppiSize srcRoi = { 4, 3 };ippiRGBToGray_8u_C3C1R ( src, 12, dst, 4, srcRoi );Result:

255 0
0
255 0
0
255 0
0
255 0
0
0
255 0
0
255 0
0
255 0
0
255 0
0
0
255 0
0
255 0
0
255 0
0
255
76 76 76 76
149 149 149 149
29 29 29 29

src

dst

ColorToGray
Converts an RGB image to gray scale using custom
transform coefficients.

SyntaxIppStatus ippiColorToGray_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>*pDst, int dstStep, IppiSize roiSize, const Ipp32f coeffs[3]);Supported values for mod:8u_C3C1R

16u_C3C1R

16s_C3C1R

32f_C3C1R

8u_AC4C1R

16u_AC4C1R

16s_AC4C1R

32f_AC4C1R

IppStatus ippiColorToGray_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>*pDst, int dstStep, IppiSize roiSize, const Ipp64f coeffs[3]);Supported values for mod:64f_C3C1R
64f_AC4C1R

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc

938

Pointer to the source image ROI.

Developer Guide and Reference for Intel® Integrated Performance Primitives

srcStep
pDst

1Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the destination image ROI.

roiSize

Distance in bytes between starts of consecutive lines in thedestination image.
Size of the source and destination ROI in pixels.

coeffsTransform coefficients.

dstStep

Description
This function operates with ROI (see Regions of Interest in Intel IPP ).
This function uses the following equation to convert an RGB image to gray scale:

Y = coeffs[0] * R + coeffs[1] * G + coeffs[2] * B,
where the coeffs array contains user-defined transform coefficients which must be non-negative and satisfy
the condition

coeffs[0] + coeffs[1] + coeffs[2] ≤ 1.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if pSrc or pDst is NULL.

ippStsSizeErr

Indicates an error condition if roiSize has a field with a zero or
negative value.

CFAToBGRA
Restores the RGB image from the gray-scale CFA
image using the VNG algorithm.

SyntaxIppStatus ippiCFAToBGRA_VNG_8u_C1C4R(const Ipp8u* pSrc, IppiRect srcRoi, IppiSize
srcSize, int srcStep, Ipp32f scale[4], Ipp8u* pDst, int dstStep, IppiBayerGrid grid);
IppStatus ippiCFAToBGRA_VNG_16u_C1C4R(const Ipp16u* pSrc, IppiRect srcRoi, IppiSize
srcSize, int srcStep, Ipp32f scale[4], Ipp16u* pDst, int dstStep, IppiBayerGrid grid);

Platform-aware functions
IppStatus ippiCFAToBGRA_VNG_8u_C1C4R_L(const Ipp8u* pSrc, IppiRectL srcRoiL, IppiSizeL
srcSizeL, IppSizeL srcStepL, Ipp32f scale[4], Ipp8u* pDst, IppSizeL dstStepL,
IppiBayerGrid grid);
IppStatus ippiCFAToBGRA_VNG_16u_C1C4R_L(const Ipp16u* pSrc, IppiRectL srcRoiL,
IppiSizeL srcSizeL, IppSizeL srcStepL, Ipp32f scale[4], Ipp16u* pDst, IppSizeL
dstStepL, IppiBayerGrid grid);

Include Files
ippcc.hippcc_l.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h

939

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc

Pointer to the source image.

srcRoi, srcRoiL

Region of interest in the source image (of the IppiRect or
IppiRectL type).

srcSize, srcSizeL

Size of the source image.

srcStep, srcStepL

Distance, in bytes, between the starting points of consecutive
lines in the source image.
Coefficients by which the resulting RGB channels are multiplied
after interpolation. By default, equal to 1.0.
Pointer to the destination image.

scale[4]pDst
dstStep, dstStepL

Distance, in bytes, between the starting points of consecutive
lines in the destination image.

grid

Specifies the configuration of the Bayer grid in the source image. The
function copies 2-pixel width border pixels from the internal
neighborhood pixels. The following values are possible:

ippiBayerBGGR
ippiBayerRGGB
ippiBayerGBRG
ippiBayerGRBG

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function transforms the one-channel gray-scale image pSrc that is produced by applying the color filter
array (CFA) to 24-bit three-channel RGB image using the Variable Number of Gradients (VNG) demosaicing
algorithm.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if one of the specified pointers is
NULL.

ippStsSizeErr

ippStsBadArgErr

Indicates an error condition if the srcSize or srcSizeL has afield that is less than 2, or if the srcRoi or srcRoiL has a fieldwith a negative or zero value.
Indicates an error condition if grid has an illegal value.

See Also
Structures and Enumerators
Structures and Enumerators for Platform-Aware Functions
CFAToRGB
Restores the RGB image from the gray-scale CFA
image.

940

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

SyntaxIppStatus ippiCFAToRGB_8u_C1C3R(const Ipp8u* pSrc, IppiRect srcRoi, IppiSize srcSize,
int srcStep, Ipp8u* pDst, int dstStep, IppiBayerGrid grid, int interpolation);
IppStatus ippiCFAToRGB_16u_C1C3R(const Ipp16u* pSrc, IppiRect srcRoi, IppiSize srcSize,
int srcStep, Ipp16u* pDst, int dstStep, IppiBayerGrid grid, int interpolation);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc

Pointer to the source image origin.

srcSize

Size of the source image.

srcRoiRegion of interest in the source image (of the IppiRect type).

srcStep
pDst

Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the destination image.

dstStep

Distance in bytes between starts of consecutive lines in thedestination image.

grid

Specifies the configuration of the Bayer grid in the source image. The
following values are possible:

ippiBayerBGGR
ippiBayerRGGB
ippiBayerGBRG
ippiBayerGRBG
interpolation

Interpolation method, reserved, must be 0.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).

941

1

Intel® Integrated Performance Primitives Developer Guide and ReferenceThis function transforms the one-channel gray-scale image pSrc that is produced by applying the color filter
array (CFA) - an array of Bayer filters, to 24-bit three-channel RGB image. The order of the color component
in the source image - Bayer grid - is specified by the parameter grid. Four possible values of this parametercorrespond to the allowed variants of the Bayer grid (see Figure below).
Possible Configurations of the Bayer Grids

Each element of the source image contains an intensity value for only one color component, two others areinterpolated using neighbor elements. R and B values are interpolated linearly from the nearest neighbors of
the same color. When interpolating R and B values on green pixel, the average values of the two nearest
neighbors (above and below, or left and right) of the same colors are used. When interpolating R or B values
on the blue or red pixel respectively, the average values of the four nearest blue (red) pixels cornering thered (blue) pixel are used. G values are interpolated using an adaptive interpolation [Sak98] from a pair ofnearest neighbors (vertical or horizontal) and taking into account the correlation in the red (or blue)
component. The pair is chosen depending on the values of the difference between the red (blue) pixels in thevertical and horizontal directions. If the difference is smaller in the vertical direction - a vertical pair of green
pixels is used, if it is smaller in the horizontal direction - a horizontal pair is used. If the difference is thesame, all four neighbors are used.
This interpolation requires border pixels for the input pixels near the horizontal or vertical edge of the image.
The function uses the mirrored border of two edge rows or columns of the input image. In this case the Gvalues is calculated as the average of four nearest green pixels.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if one of the specified pointer is
NULL.

ippStsSizeErr

ippStsBadArgErr

Indicates an error condition if the srcSize has a field that isless than 2, or if the roiSize has a field with negative or zero
value.
Indicates an error condition if grid has an illegal value.

DemosaicAHD
Restores the RGB image from the gray-scale CFA
image using AHD algorithm.

SyntaxIppStatus ippiDemosaicAHD_8u_C1C3R(const Ipp8u* pSrc, IppiRect srcRoi, IppiSize
srcSize, int srcStep, Ipp8u* pDst, int dstStep, IppiBayerGrid grid, Ipp8u* pTmp, int
tmpStep);942

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

IppStatus ippiDemosaicAHD_16u_C1C3R(const Ipp16u* pSrc, IppiRect srcRoi, IppiSize
srcSize, int srcStep, Ipp16u* pDst, int dstStep, IppiBayerGrid grid, Ipp16u* pTmp, int
tmpStep);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc

Pointer to the source image.

srcRoiRegion of interest in the source image (of the IppiRect type).

srcSize

Size of the source image.

srcStep
pDst
dstStep
gridDistance in bytes between starts of consecutive lines in thesource image.
Pointer to the destination image.
Distance in bytes between starts of consecutive lines in thedestination image.
Specifies the configuration of the Bayer grid in the source image. The
following values are possible (see Figure Possible Configurations of theBayer Grids):

ippiBayerBGGR
ippiBayerRGGB
ippiBayerGBRG
ippiBayerGRBG
pTmp

Pointer to the temporary image of (srcRoi.width + 6, 30) size.

tmpStep

Distance in bytes between starts of consecutive lines in thetemporary image.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function transforms the one-channel gray-scale image pSrc that is produced by applying the color filter
array (CFA) to 24-bit three-channel RGB image using the adaptive homogeneity-directed demosaicing (AHD)
algorithm [Hir05]. The algorithm requires the temporary image pTmp of size srcRoi.width +6.30.
The type of the Bayer grid (see Figure Possible Configurations of the Bayer Grids) is specified by theparameter grid.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if one of the specified pointer is
NULL.

943

1

Intel® Integrated Performance Primitives Developer Guide and ReferenceippStsSizeErr

ippStsBadArgErr

Indicates an error condition if the srcSize has a field that isless than 5, or if the roiSize has a field with negative or zero
value.
Indicates an error condition if grid has an illegal value.

Format Conversion
This section describes Intel IPP functions that perform image color conversion without changing the color
space. These functions convert pixel-order images to planar format and vice versa, change the number ofchannels or planes, alter sampling formats and sequences of samples and planes. Several functions
additionally perform filtering - deinterlacing and upsampling.
Intel IPP format conversion functions are specified mainly in the YCbCr color space, but as they do nottransform color model they may be used to perform described types of conversion for any other color spaces
with decoupled luminance and chrominance coordinates (YUV type).

YCbCr422
Converts 4:2:2 YCbCr image.

SyntaxIppStatus ippiYCbCr422_8u_C2P3R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst[3], int
dstStep[3], IppiSize roiSize);
IppStatus ippiYCbCr422_8u_P3C2R(const Ipp8u* pSrc[3], int srcStep[3], Ipp8u* pDst, int
dstStep, IppiSize roiSize);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep

pDst

dstStep

roiSize

Pointer to the ROI in the pixel-order source image. Array ofpointers to the ROI in each plane of the planar source image.
Distance in bytes between starts of consecutive lines in thesource image. Array of distance values for the source image
planes.
Pointer to the ROI in the pixel-order destination image. Array ofpointers to the ROI in each plane of the planar destination
image.
Distance in bytes between starts of consecutive lines in thedestination image. Array of distance values for the destination
image planes.
Size of the source and destination ROI in pixels.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).

944

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

This function converts the 4:2:2 two-channel source image pSrc to the 4:2:2 three-plane image pDst andvice versa (see Table “Pixel-Order Image Formats” and Table “Planar Image Formats” for more details on
4:2:2 planar and pixel-order formats).

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if any of the specified pointers is
NULL.

ippStsSizeErr

Indicates an error condition if roiSize.width of the first planeis less than 2, or roiSize.height is less than or equal to zero.

YCbCr422ToYCrCb422
Converts 4:2:2 YCbCr image to 4:2:2 YCrCb image.

SyntaxIppStatus ippiYCbCr422ToYCrCb422_8u_C2R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst,
int dstStep, IppiSize roiSize);
IppStatus ippiYCbCr422ToYCrCb422_8u_P3C2R(const Ipp8u* pSrc[3], int srcStep[3], Ipp8u*
pDst, int dstStep, IppiSize roiSize);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep

pDst
dstStep
roiSize

Pointer to the ROI in the pixel-order source image. Array ofpointers to the ROI in each plane of the planar source image.
Distance in bytes between starts of consecutive lines in thesource image. Array of distance values for the source image
planes.
Pointer to the destination image ROI.
Distance in bytes between starts of consecutive lines in thedestination image.
Size of the ROI in pixels, its width should be multiple of 2.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts 4:2:2YCbCr source image pSrc to the 4:2:2 YCrCb two-channel image pDst that has
the following sequence of samples: Y0, Cr0, Y1, Cb0, Y2, Cr1, Y3, Cb1, ... (see Table “Pixel-Order Image
Formats”). The source image can be either two-channel or three-plane (see Table “Pixel-Order Image
Formats” and Table “Planar Image Formats”).

945

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if any of the specified pointers is
NULL.

ippStsSizeErr

Indicates an error condition if roiSize.width is less than 2.

YCbCr422ToCbYCr422
Converts 4:2:2 YCbCr image to 4:2:2 CbYCr image.

SyntaxIppStatus ippiYCbCr422ToCbYCr422_8u_C2R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst,
int dstStep, IppiSize roiSize);
IppStatus ippiYCbCr422ToCbYCr422_8u_P3C2R(const Ipp8u* pSrc[3], int srcStep[3], Ipp8u*
pDst, int dstStep, IppiSize roiSize);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep

pDst
dstStep
roiSize

Pointer to the ROI in the pixel-order source image. Array ofpointers to the ROI in each plane of the planar source image.
Distance in bytes between starts of consecutive lines in thesource image. Array of distance values for the source image
planes.
Pointer to the destination image ROI.
Distance in bytes between starts of consecutive lines in thedestination image.
Size of the source and destination ROI in pixels; its width
should be multiple of 2.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts 4:2:2YCbCr source image pSrc to the 4:2:2 CbYCr two-channel image pDst that has
the following sequence of samples: Cb0, Y0, Cr0, Y1, Cb1, Y2, Cr1, Y3, Cb3, ... (see Table “Pixel-Order
Image Formats”). The source image can be either two-channel or three-plane (see Table “Pixel-Order Image
Formats” and Table “Planar Image Formats”).

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if any of the specified pointers is
NULL.

946

Developer Guide and Reference for Intel® Integrated Performance Primitives

ippStsSizeErr

1

Indicates an error condition if roiSize.width of the first planeis less than 2, or roiSize.height is less than or equal to zero.

YCbCr422ToYCbCr420
Converts YCbCr image from 4:2:2 sampling format to
4:2:0 format.

SyntaxCase 1: Operation on planar data
IppStatus ippiYCbCr422ToYCbCr420_8u_P3R(const Ipp8u* pSrc[3], int srcStep[3], Ipp8u*
pDst[3], int dstStep[3], IppiSize roiSize);
IppStatus ippiYCbCr422ToYCbCr420_8u_P3P2R(const Ipp8u* pSrc[3], int srcStep[3], Ipp8u*
pDstY, int dstYStep, Ipp8u* pDstCbCr, int dstCbCrStep, IppiSize roiSize);

Case 2: Conversion from pixel-order to planar data
IppStatus ippiYCbCr422ToYCbCr420_8u_C2P3R(const Ipp8u* pSrc, int srcStep, Ipp8u*
pDst[3], int dstStep[3], IppiSize roiSize);
IppStatus ippiYCbCr422ToYCbCr420_8u_C2P2R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDstY,
int dstYStep, Ipp8u* pDstCbCr, int dstCbCrStep, IppiSize roiSize);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep

pDst
dstStep
pDstY
dstYStep
pDstCbCr
dstCbCrStep
roiSize

Pointer to the ROI in the pixel-order source image. Array ofpointers to the ROI in each plane of the planar source image.
Distance in bytes between starts of consecutive lines in thesource image. Array of distance values for the source image
planes.
Array of pointers to the ROI in each plane for a three-plane
destination image.
Array of distances in bytes between starts of consecutive lines
in each plane for a three-plane destination image.
Pointer to the ROI in the luminance plane for a two-plane
destination image.
Distance in bytes between starts of consecutive lines in theluminance plane of a destination image.
Pointer to the ROI in the interleaved chrominance plane for a
two-plane destination image.
Distance in bytes between starts of consecutive lines in thechrominance plane of a destination image.
Size of the ROI in pixels, height and width should be multiple of
2.

947

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts the 4:2:2 image pSrc to the 4:2:0 image. The source image can be two-channel orthree-plane , destination image always is planar with two or three planes (see Table “Pixel-Order Image
Formats” and Table “Planar Image Formats”). Two-plane image contains luminance samples Y0, Y1, Y2, .. inthe first plane pDstY, and interleaved chrominance samples Cb0, Cr0, Cb1, Cr1, ... in the second plane
pDstCbCr.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if any of the specified pointers is
NULL.

ippStsSizeErr

Indicates an error condition if any field of the roiSize is lessthan 2.

ExampleThe code example below shows how to use the function ippiYCbCr422ToYCbCr420_8u_C2P3R.

{
Ipp8u*
ImageI420[3];int
stepI420[3];Ipp8u*
ImageYUY2;
int
stepYUY2;
IppiSize roiSize = { 1024, 768};
ImageI420[0] = ippiMalloc_8u_C1( roiSize.width, roiSize.height, &(stepI420[0]));
ImageI420[1] = ippiMalloc_8u_C1( roiSize.width, roiSize.height, &(stepI420[1]));
ImageI420[2] = ippiMalloc_8u_C1( roiSize.width, roiSize.height, &(stepI420[2]));
ImageYUY2= ippiMalloc_8u_C2( roiSize.width, roiSize.height, &stepYUY2 );ippiYCbCr422ToYCbCr420_8u_C2P3R( ImageYUY2, stepYUY2, ImageI420, stepI420, roiSize);
ippiFree(ImageI420[0]);ippiFree(ImageI420[1]);ippiFree(ImageI420[2]);ippiFree(ImageYUY2);}

YCbCr422To420_Interlace
Converts interlaced YCbCr image from 4:2:2 sampling
format to 4:2:0 format.

SyntaxIppStatus ippiYCbCr422To420_Interlace_8u_P3R(const Ipp8u* pSrc[3], int srcStep[3],Ipp8u* pDst[3], int dstStep[3], IppiSize roiSize);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

948

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Parameters
pSrc
srcStep
pDst
dstStep
roiSize

Array of pointers to the ROI in each plane for source image.
Array of distances in bytes between starts of consecutive lines
in each plane for the source image.
Array of pointers to the ROI in each plane for destination
image.
Array of distances in bytes between starts of consecutive lines
in each plane fore destination image.
Size of the source and destination ROI in pixels, its width mustbe multiple of 2, and height must be multiple of 4.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts the interlaced 4:2:2 image pSrc to the 4:2:0 image pDst (see Table “Planar Image
Formats”).
The conversion is performed in accordance with the following formulas:

Y1dest = Y1src;
Cb0(Cr0)dest = (3*Cb0(Cr0)src + Cb2(Cr2)src + 2)/4;
Cb1(Cr1)dest = (Cb1(Cr1)src + 3*Cb3(Cr3)src + 2)/4;

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if any of the specified pointers is
NULL.

ippStsSizeErr

Indicates an error condition if roiSize.width is less than 2, or
roiSize.height is less than 4.

ippStsDoubleSize

Indicates a warning if roiSize.width is not multiple of 2, or
roiSize.height is not multiple of 4.

YCbCr422ToYCrCb420
Converts 4:2:2 YCbCr image to 4:2:0 YCrCb image.

SyntaxIppStatus ippiYCbCr422ToYCrCb420_8u_C2P3R(const Ipp8u* pSrc, int srcStep, Ipp8u*
pDst[3], int dstStep[3], IppiSize roiSize);
IppStatus ippiYCbCr422ToYCrCb420_8u_C2P2R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDstY,
int dstYStep, Ipp8u* pDstCrCb, int dstUVStep, IppiSize roiSize);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

949

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Parameters
pSrc
srcStep
pDst
pDstY
dstStep
dstYStep
dstUVSteproiSize

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
Array of pointers to the ROI in each plane of the destination
image.
Pointer to the destination image Y plane.
Array of distances, in bytes, between the starting points ofconsecutive lines in the destination image planes.
Array of distances, in bytes, between the starting points ofconsecutive lines in the destination image Y plane.
Array of distances, in bytes, between the starting points ofconsecutive lines in the destination image UV plane.
Size of the source and destination ROI in pixels, height andwidth should be multiple of 2.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts the 4:2:2 two-channel image pSrc that has the following sequence of samples: Y0,
Cb0, Y1, Cr0, Y2, Cb1, Y3, Cr1, ... to the 4:2:0 three-plane image pDst with the following order of pointers:
Y-plane, Cr-plane, Cb-plane (see Table “Pixel-Order Image Formats” and Table “Planar Image Formats”).

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if any of the specified pointers is
NULL.

ippStsSizeErr

Indicates an error condition if any field of the roiSize is lessthan 2.

YCbCr422ToYCbCr411
Converts YCbCr image from 4:2:2 sampling format to
4:1:1 format.

SyntaxCase 1: Operation on planar data
IppStatus ippiYCbCr422ToYCbCr411_8u_P3R(const Ipp8u* pSrc[3], int srcStep[3], Ipp8u*
pDst[3], int dstStep[3], IppiSize roiSize);
IppStatus ippiYCbCr422ToYCbCr411_8u_P3P2R(const Ipp8u* pSrc[3], int srcStep[3], Ipp8u*
pDstY, int dstYStep, Ipp8u* pDstCbCr, int dstCbCrStep, IppiSize roiSize);

Case 2: Conversion from pixel-order to planar data
IppStatus ippiYCbCr422ToYCbCr411_8u_C2P3R(const Ipp8u* pSrc, int srcStep, Ipp8u*
pDst[3], int dstStep[3], IppiSize roiSize);
IppStatus ippiYCbCr422ToYCbCr411_8u_C2P2R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDstY,
int dstYStep, Ipp8u* pDstCbCr, int dstCbCrStep, IppiSize roiSize);950

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep

pDst
dstStep
pDstY
dstYStep
pDstCbCr
dstCbCrStep
roiSize

Pointer to the ROI in the pixel-order source image. Array ofpointers to the ROI in each plane of the planar source image.
Distance in bytes between starts of consecutive lines in thesource image. Array of distance values for the source image
planes.
Array of pointers to the ROI in each plane for a three-plane
destination image.
Array of distances in bytes between starts of consecutive lines
in each plane for a three-plane destination image.
Pointer to the ROI in the luminance plane for a two-plane
destination image.
Distance in bytes between starts of consecutive lines in theluminance plane of a destination image.
Pointer to the ROI in the interleaved chrominance plane for a
two-plane destination image.
Distance in bytes between starts of consecutive lines in thechrominance plane of a destination image.
Size of the ROI in pixels.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts the 4:2:2 image pSrc to the 4:1:1 image. The source image can be two-channel orthree-plane (see Table “Pixel-Order Image Formats” for more details), destination image always is planarwith two or three planes (see Table “Planar Image Formats” for more details). The two-plane image contains
luminance samples Y0, Y1, Y2, .. in the first plane pDstY, and interleaved chrominance samples Cb0, Cr0,
Cb1, Cr1, ... in the second plane pDstCbCr.
The value of the fields of the roiSize have certain limitations:- its width should be multiple of 4 and cannot be less than 4 for operation on two-channel images;- its width should be multiple of 4 and cannot be less than 4, and its height should be multiple of 2 and can
not be less than 2 for three-plane to two-plane image conversion;- both height and width should be multiple of 2 and cannot be less than 2 for operation on three-plane
images.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if any of the specified pointers is
NULL.

951

1

Intel® Integrated Performance Primitives Developer Guide and ReferenceippStsSizeErr

Indicates an error condition if corresponding fileds of theroiSize is less than specified above values.

YCrCb422ToYCbCr422
Converts 4:2:2 YCrCb image to 4:2:2 YCbCr image.

SyntaxIppStatus ippiYCrCb422ToYCbCr422_8u_C2P3R(const Ipp8u* pSrc, int srcStep, Ipp8u*
pDst[3], int dstStep[3], IppiSize roiSize);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pDst
dstStep
roiSize

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
Array of pointers to the ROI in each plane of the destination
image.
Array of distances in bytes between starts of consecutive lines
in the destination image planes.
Size of the ROI in pixels, its width should be multiple of 2.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts the 4:2:2YCrCb two-channel image pSrc (see Table “Pixel-Order Image Formats”) to
the 4:2:2YCbCr three-plane image pDst (see Table “Planar Image Formats”).

Return Values
ppStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if any of the specified pointers is
NULL.

ippStsSizeErr

Indicates an error condition if roiSize.width is less than 2.

YCrCb422ToYCbCr420
Converts 4:2:2 YCrCb image to 4:2:0 YCbCr image.

SyntaxIppStatus ippiYCrCb422ToYCbCr420_8u_C2P3R(const Ipp8u* pSrc, int srcStep, Ipp8u*
pDst[3], int dstStep[3], IppiSize roiSize);

Include Files
ippcc.h952

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pDst
dstStep
roiSize

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
Array of pointers to the ROI in each plane of the destination
image.
Array of distances in bytes between starts of consecutive lines
in the destination image planes.
Size of the ROI in pixels, height and width should be multiple of2.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This functions converts the 4:2:2YCrCb two-channel image pSrc (see Table “Pixel-Order Image Formats”) to
the 4:2:0YCbCr three-plane image pDst (see Table “Planar Image Formats”).

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if any of the specified pointers is
NULL.

ippStsSizeErr

Indicates an error condition if any field of the roiSize is lessthan 2.

YCrCb422ToYCbCr411
Converts 4:2:2 YCrCb image to 4:1:1 YCbCr image.

SyntaxIppStatus ippiYCrCb422ToYCbCr411_8u_C2P3R(const Ipp8u* pSrc, int srcStep, Ipp8u*
pDst[3], int dstStep[3], IppiSize roiSize);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc

Pointer to the source image ROI.

srcStep

Distance in bytes between starts of consecutive lines in thesource image.

953

1

Intel® Integrated Performance Primitives Developer Guide and Reference

pDst
dstStep
roiSize

Array of pointers to the ROI in each plane of the destination
image.
Array of distances in bytes between starts of consecutive lines
in the destination image planes.
Size of the ROI in pixels, its width should be multiple of 4.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts the 4:2:2YCrCb two-channel image pSrc (see Table “Pixel-Order Image Formats”) to
the 4:1:1YCbCr three-plane image pDst (see Table “Planar Image Formats”).

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if any of the specified pointers is
NULL.

ippStsSizeErr

Indicates an error condition if roiSize.width is less than 4.

CbYCr422ToYCbCr422
Converts 4:2:2 CbYCr image to 4:2:2 YCbCr image.

SyntaxIppStatus ippiCbYCr422ToYCbCr422_8u_C2R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst,
int dstStep, IppiSize roiSize);
IppStatus ippiCbYCr422ToYCbCr422_8u_C2P3R(const Ipp8u* pSrc, int srcStep, Ipp8u*
pDst[3], int dstStep[3], IppiSize roiSize);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pDst

dstStep

roiSize

954

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the ROI in the pixel-order destination image. Array ofpointers to the ROI in each plane of the planar destination
image.
Distance in bytes between starts of consecutive lines in thedestination image. Array of distance values for the destination
image planes.
Size of the ROI in pixels, its width should be multiple of 2.

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts the 4:2:2CbYCr two-channel image pSrc to the 4:2:2 YCbCr two-channel or threeplane image pDst (see Table “Pixel-Order Image Formats” and Table “Planar Image Formats”). The source
image has the following sequence of samples: Cb0, Y0, Cr0, Y1, Cb1, Y2, Cr1, Y3, Cb2, ... . Two-channel
destination image has different sequence of samples: Y0, Cb0, Y1, Cr0, Y2, Cb1, Y3, Cr1, Y4, ....

Return Values
ppStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if any of the specified pointers is
NULL.

ippStsSizeErr

Indicates an error condition if roiSize.width is less than 2.

CbYCr422ToYCbCr420
Converts 4:2:2 CbYCr image to 4:2:0 YCbCr image.

SyntaxIppStatus ippiCbYCr422ToYCbCr420_8u_C2P3R(const Ipp8u* pSrc, int srcStep, Ipp8u*
pDst[3], int dstStep[3], IppiSize roiSize);
IppStatus ippiCbYCr422ToYCbCr420_8u_C2P2R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDstY,
int dstYStep,Ipp8u* pDstCbCr, int dstCbCrStep, IppiSize roiSize);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pDst
dstStep
pDstY
dstYStep
pDstCbCr
dstCbCrStep

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
Array of pointers to the ROI in each plane for a three-plane
destination image.
Array of distances in bytes between starts of consecutive lines
in each plane for a three-plane destination image.
Pointer to the ROI in the luminance plane for a two-plane
destination image.
Distance in bytes between starts of consecutive lines in theluminance plane of a destination image.
Pointer to the ROI in the interleaved chrominance plane for a
two-plane destination image.
Distance in bytes between starts of consecutive lines in thechrominance plane of a destination image.

955

1

Intel® Integrated Performance Primitives Developer Guide and Reference

roiSize

Size of the source and destination ROI in pixels, height andwidth should be multiple of 2.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts the 4:2:2CbYCr two-channel image pSrc to the 4:2:0YCbCr two- or three-plane
image pDst (see Table “Pixel-Order Image Formats” and Table “Planar Image Formats”). The source image
has the following sequence of samples: Cb0, Y0, Cr0, Y1, Cb1, Y2, Cr1, Y3, Cb2, ... . Three-plane destination
image has the following order of pointers: Y-plane, Cb-plane, Cr-plane. Two-plane destination image contains
luminance samples Y0, Y1, Y2, ... in the first plane pDstY, and interleaved chrominance samples Cb0, Cr0,
Cb1, Cr1, ... in the second plane pDstCbCr.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if any of the specified pointers is
NULL.

ippStsSizeErr

Indicates an error condition if any field of the roiSize is lessthan 2.

CbYCr422ToYCbCr420_Interlace
Converts interlaced 4:2:2 CbYCr image to 4:2:0 YCbCr
image.

SyntaxIppStatus ippiCbYCr422ToYCbCr420_Interlace_8u_C2P3R(const Ipp8u* pSrc, int srcStep,
Ipp8u* pDst[3], int dstStep[3], IppiSize roiSize);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pDst
dstStep
roiSize

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
Array of pointers to the ROI in each plane for destination
image.
Array of distances in bytes between starts of consecutive lines
in each plane for a three-plane destination image.
Size of the source and destination ROI in pixels, its width mustbe multiple of 2, and height must be multiple of 4.

Description
This function operates with ROI (see Regions of Interest in Intel IPP ).

956

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

This function converts interlaced 4:2:2CbYCr two-channel image pSrc to the 4:2:0YCbCr three-plane
image pDst (see Table “Pixel-Order Image Formats” and Table “Planar Image Formats”). The source image
has the following sequence of samples: Cb0, Y0, Cr0, Y1, Cb1, Y2, Cr1, Y3, Cb2, ... . Three-plane destination
image has the following order of pointers: Y-plane, Cb-plane, Cr-plane.
The conversion is performed in accordance with the following formulas:

Y1dest = Y1src;
Cb0(Cr0)dest = (3*Cb0(Cr0)src + Cb2(Cr2)src + 2)/4;
Cb1(Cr1)dest = (Cb1(Cr1)src + 3*Cb3(Cr3)src + 2)/4;

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if any of the specified pointers is
NULL.

ippStsSizeErr

Indicates an error condition if roiSize.width is less than 2, or
roiSize.height is less than 4.

ippStsDoubleSize

Indicates a warning if roiSize.width is not multiple of 2, or
roiSize.height is not multiple of 4.

CbYCr422ToYCrCb420
Converts 4:2:2 CbYCr image to 4:2:0 YCrCb image.

SyntaxIppStatus ippiCbYCr422ToYCrCb420_8u_C2P3R(const Ipp8u* pSrc, int srcStep, Ipp8u*
pDst[3], int dstStep[3], IppiSize roiSize);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pDst
dstStep
roiSize

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
Array of pointers to the ROI in each plane of the destination
image.
Array of distances in bytes between starts of consecutive lines
in the destination image planes.
Size of the source and destination ROI in pixels, height andwidth should be multiple of 2.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).

957

1

Intel® Integrated Performance Primitives Developer Guide and ReferenceThis function converts the 4:2:2CbYCr two-channel image pSrc to the 4:2:0YCrCb three-plane image pDst.
The source image has the following sequence of samples: Cb0, Y0, Cr0, Y1, Cb1, Y2, Cr1, Y3, Cb2, ... . The
destination image has the following order of pointers: Y-plane, Cr-plane, Cb-plane (see Table “Pixel-Order
Image Formats” and Table “Planar Image Formats”).

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if any of the specified pointers is
NULL.

ippStsSizeErr

Indicates an error condition if any field of the roiSize is lessthan 2.

CbYCr422ToYCbCr411
Converts 4:2:2 CbYCr image to 4:1:1 YCbCr image.

SyntaxIppStatus ippiCbYCr422ToYCbCr411_8u_C2P3R(const Ipp8u* pSrc, int srcStep, Ipp8u*
pDst[3], int dstStep[3], IppiSize roiSize);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pDst
dstStep
roiSize

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
Array of pointers to the ROI in each plane of the destination
image.
Array of distances in bytes between starts of consecutive lines
in the destination image planes.
Size of the ROI in pixels, its width should be multiple of 4.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts the 4:2:2CbYCr two-channel image pSrc to the 4:1:1YCbCr three-plane image pDst.
The source image has the following sequence of samples: Cb0, Y0, Cr0, Y1, Cb1, Y2, Cr1, Y3, Cb2, ... . The
destination image has the following order of pointers: Y-plane, Cb-plane, Cr-plane (see Table “Pixel-Order
Image Formats” and Table “Planar Image Formats”).

Return Values
ippStsNoErr

958

Indicates no error. Any other value indicates an error.

Developer Guide and Reference for Intel® Integrated Performance Primitives

ippStsNullPtrErr
ippStsSizeErr

1

Indicates an error condition if any of the specified pointers is

NULL.

Indicates an error condition if roiSize.width is less than 4.

YCbCr420
Converts 4:2:0 YCbCr image.

SyntaxIppStatus ippiYCbCr420_8u_P3P2R(const Ipp8u* pSrc[3], int srcStep[3], Ipp8u* pDstY, int
dstYStep, Ipp8u* pDstCbCr, int dstCbCrStep, IppiSize roiSize);
IppStatus ippiYCbCr420_8u_P2P3R(const Ipp8u* pSrcY, int srcYStep, const Ipp8u*
pSrcCbCr, int srcCbCrStep, Ipp8u* pDst[3], int dstStep[3], IppiSize roiSize);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pSrcY
srcYSteppSrcCbCr
srcCbCrStep
pDst
dstStep
pDstY
dstYStep
pDstCbCr
dstCbCrStep
roiSize

Array of pointers to the ROI in each plane for a three-planesource image.
Array of distances in bytes between starts of consecutive lines
in each plane for a three-plane source image.
Pointer to the ROI in the luminance plane for a two-planesource image.
Distance in bytes between starts of consecutive lines in theluminance plane of a source image.
Pointer to the ROI in the interleaved chrominance plane for a
two-plane source image.
Distance in bytes between starts of consecutive lines in theinterleaved chrominance plane of the source image.
Array of pointers to the ROI in each plane for a three-plane
destination image.
Array of distances in bytes between starts of consecutive lines
in each plane for a three-plane destination image.
Pointer to the ROI in the luminance plane for a two-plane
destination image.
Distance in bytes between starts of consecutive lines in theluminance plane of a destination image.
Pointer to the ROI in the interleaved chrominance plane for a
two-plane destination image.
Distance in bytes between starts of consecutive lines in thechrominance plane of a destination image.
Size of the source and destination ROI in pixels, height andwidth should be multiple of 2.

959

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts the 4:2:0 three-plane (see Table “Planar Image Formats”) source image pSrc to the
4:2:0 two-plane image and vice versa. Two-plane image contains luminance samples Y0, Y1, Y2, .. in thefirst plane, and interleaved chrominance samples Cb0, Cr0, Cb1, Cr1,... in the second plane.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if any of the specified pointers is
NULL.

ippStsSizeErr

Indicates an error condition if any field of the roiSize is lessthan 2.

YCbCr420ToYCbCr422
Converts YCbCr image from 4:2:0 sampling format to
4:2:2 format.

SyntaxIppStatus ippiYCbCr420ToYCbCr422_8u_P3R(const Ipp8u* pSrc[3], int srcStep[3], Ipp8u*
pDst[3], int dstStep[3], IppiSize roiSize);
IppStatus ippiYCbCr420ToYCbCr422_8u_P2P3R(const Ipp8u* pSrcY, int srcYStep, const
Ipp8u* pSrcCbCr, int srcCbCrStep, Ipp8u* pDst[3], int dstStep[3], IppiSize roiSize);
IppStatus ippiYCbCr420ToYCbCr422_8u_P2C2R(const Ipp8u* pSrcY, int srcYStep, const
Ipp8u* pSrcCbCr, int srcCbCrStep, Ipp8u* pDst, int dstStep, IppiSize roiSize);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pSrcY
srcYSteppSrcCbCr
srcCbCrStep

960

Array of pointers to the ROI in each plane for a three-planesource image.
Array of distances in bytes between starts of consecutive lines
in each plane for a three-plane source image.
Pointer to the ROI in the luminance plane for a two-planesource image.
Distance in bytes between starts of consecutive lines in theluminance plane of a source image.
Pointer to the ROI in the interleaved chrominance plane for a
two-plane source image.
Distance in bytes between starts of consecutive lines in theinterleaved chrominance plane of the source image.

Developer Guide and Reference for Intel® Integrated Performance Primitives

pDst

dstStep

roiSize

1

Pointer to the ROI in the pixel-order destination image. Array ofpointers to the ROI in each plane of the planar destination
image.
Distance in bytes between starts of consecutive lines in thedestination image. Array of distance values for the destination
image planes.
Size of the ROI in pixels, height and width should be multiple of2.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts the 4:2:0 planar source image pSrc to the 4:2:2 image pDst. The source image canbe two- or three-plane image (see Table “Planar Image Formats”). The first plane of the two-plane source
image pSrcY contains luminance samples Y0, Y1, Y2, ..., the second plane pSrcCbCr contains interleaved
chrominance samples Cb0, Cr0, Cb1, Cr1, .... . The destination image pDst can be three-plane or twochannel (see Table “Pixel-Order Image Formats” and Table “Planar Image Formats”).

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if any of the specified pointers is
NULL.

ippStsSizeErr

Indicates an error condition if any field of the roiSize is lessthan 2.

YCbCr420ToYCbCr422_Filter
Convert 4:2:0 image to 4:2:2 image with additional
filtering.

SyntaxIppStatus ippiYCbCr420ToYCbCr422_Filter_8u_P3R(const Ipp8u* pSrc[3], int srcStep[3],Ipp8u* pDst[3], int dstStep[3], IppiSize roiSize);
IppStatus ippiYCbCr420ToYCbCr422_Filter_8u_P2P3R(const Ipp8u* pSrcY, int srcYStep,
const Ipp8u* pSrcCbCr, int srcCbCrStep, Ipp8u* pDst[3], int dstStep[3], IppiSize
roiSize);
IppStatus ippiYCbCr420ToYCbCr422_Filter_8u_P2C2R(const Ipp8u* pSrcY, int srcYStep,
const Ipp8u* pSrcCbCr, int srcCbCrStep, Ipp8u* pDst, int dstStep, IppiSize roiSize, int
layout);Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

961

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Parameters

roiSize

Array of pointers to the ROI in each plane for athree-plane source image.
Array of distances in bytes between starts ofconsecutive lines in each plane for a three-planesource image.
Pointer to the ROI in the luminance plane for a
two-plane source image.
Distance in bytes between starts of consecutive
lines in the luminance plane of a source image.
Pointer to the ROI in the interleaved
chrominance plane for a two-plane source
image.
Distance in bytes between starts of consecutive
lines in the interleaved chrominance plane of thesource image.
Pointer to the ROI in the pixel-order destination
image. Array of pointers to the ROI in eachplane of the planar destination image.
Distance in bytes between starts of consecutive
lines in the destination image. Array of distancevalues for the destination image planes.
Size of the ROI in pixels.

layoutSlice layout. Possible values:

pSrc
srcStep

pSrcY
srcYSteppSrcCbCr

srcCbCrStep

pDst

dstStep

IPP_UPPER

Upper (first) slice

IPP_CENTER

Middle slices

IPP_LOWER

Lowermost (last) slice

IPP_LOWER &&IPP_UPPER &&IPP_CENTER

Image is not sliced

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts the 4:2:0 planar source image pSrc to the 4:2:2 image pDst and performs
additional filtering. The source image can be two- or three-plane image (see Table “Planar Image Formats”).
The first plane of the two-plane source image pSrcY contains luminance samples Y0, Y1, Y2, ..., the second
plane pSrcCbCr contains interleaved chrominance samples Cb0, Cr0, Cb1, Cr1, .... . The destination image
pDst can be three-plane or two-channel (see Table “Pixel-Order Image Formats” and Table “Planar Image
Formats”).
The function flavors ippiYCbCr420ToYCbCr422_Filter_8u_P3R and
ippiYCbCr420ToYCbCr422_Filter_8u_P2P3R additionally perform the vertical upsampling using a CatmullRom interpolation (cubic convolution interpolation). In this case roiSize.width should be multiple of 2, androiSize.height should be multiple of 8.

962

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

The function ippiYCbCr420ToYCbCr422_Filter_8u_P2C2R additionally performs deinterlace filtering.
Commonly it is used to process images that are divided into slices. In this case slice layout should bespecified, since the function processes the first (upper), last (lowermost), and intermediate (middle) slices
differently. The height of slices should be a multiple of 16.

Caution
The image slices should be processed exactly in the following order: the first slice,
intermediate slices, the last slice.
The function may be applied to a not-sliced image as well. In this case roiSize.width androiSize.height should be multiple of 2.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if any of the specified pointers is
NULL.

ippStsSizeErr

Indicates an error condition if roiSize.width has wrong value.

YCbCr420To422_Interlace
Converts interlaced YCbCr image from 4:2:0 sampling
format to 4:2:2 format.

SyntaxIppStatus ippiYCbCr420To422_Interlace_8u_P3R(const Ipp8u* pSrc[3], int srcStep[3],Ipp8u* pDst[3], int dstStep[3], IppiSize roiSize);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pDst
dstStep
roiSize

Array of pointers to the ROI in each plane for source image.
Array of distances in bytes between starts of consecutive lines
in each plane for the source image.
Array of pointers to the ROI in each plane for destination
image.
Array of distances in bytes between starts of consecutive lines
in each plane for the destination image.
Size of the source and destination ROI in pixels, its width mustbe multiple of 2, and height must be multiple of 4.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).

963

1

Intel® Integrated Performance Primitives Developer Guide and ReferenceThis function converts the interlaced planar 4:2:0 source image pSrc to the 4:2:2 image pDst. Three-plane
image has the following order of pointers: Y-plane, Cb-plane, Cr-plane.
The conversion is performed in accordance with the following formulas:

Yndest = Ynsrc;
Cb0(Cr0)dest = (5*Cb0(Cr0)src + 3*Cb2(Cr2)src + 4)/8;
Cb1(Cr1)dest = (7*Cb1(Cr1)src + Cb3(Cr3)src + 4)/8;
Cb2(Cr2)dest = (Cb0(Cr0)src + 7*Cb2(Cr2)src + 4)/8;
Cb3(Cr3)dest = (3*Cb1(Cr1)src + 5*Cb3(Cr3)src + 4)/8;

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if any of the specified pointers is
NULL.

ippStsSizeErr

Indicates an error condition if roiSize.width is less than 2, or
roiSize.height is less than 4.

ippStsDoubleSize

Indicates a warning if roiSize.width is not multiple of 2, or
roiSize.height is not multiple of 4.

YCbCr420ToCbYCr422
Converts 4:2:0 YCbCr image to 4:2:2 CbYCr image.

SyntaxIppStatus ippiYCbCr420ToCbYCr422_8u_P2C2R(const Ipp8u* pSrcY, int srcYStep, const
Ipp8u* pSrcCbCr, int srcCbCrStep, Ipp8u* pDst, int dstStep, IppiSize roiSize);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrcY
srcYSteppSrcCbCr
srcCbCrStep
pDst
dstStep

964

Pointer to the ROI in the luminance plane of the source image.
Distance in bytes between starts of consecutive lines in theluminance plane of the source image.
Pointer to the ROI in the interleaved chrominance plane of thesource image.
Distance in bytes between starts of consecutive lines in theinterleaved chrominance plane of the source image.
Pointer to the destination image ROI.
Distance in bytes between starts of consecutive lines in thedestination image.

Developer Guide and Reference for Intel® Integrated Performance Primitives

roiSize

1

Size of the source and destination ROI in pixels, height andwidth should be multiple of 2.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts the planar 4:2:0 two-plane source image to the pixel-order 4:2:2 two-channel
image. The first plane of the source image pSrcY contains luminance samples Y0, Y1, Y2, .., the second
plane pSrcCbCr contains interleaved chrominance samples Cb0, Cr0, Cb1, Cr1, ... . The destination image
pDst has the following sequence of samples: Cb0, Y0, Cr0, Y1, Cb1, Y2, Cr1, Y3, Cb2, ...

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if any of the specified pointers is
NULL.

ippStsSizeErr

Indicates an error condition if any field of the roiSize is lessthan 2.

YCbCr420ToCbYCr422_Interlace
Converts interlaced 4:2:0 YCbCr image to 4:2:2 CbYCr
image.

SyntaxIppStatus ippiYCbCr420ToCbYCr422_Interlace_8u_P3C2R(const Ipp8u* pSrc[3], int
srcStep[3], Ipp8u* pDst, int dstStep, IppiSize roiSize);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pDst
dstStep
roiSize

Array of pointers to the ROI in each plane for source image.
Array of distances in bytes between starts of consecutive lines
in each plane for the source image.
Pointer to the destination image ROI.
Distance in bytes between starts of consecutive lines in thedestination image.
Size of the source and destination ROI in pixels, its width mustbe multiple of 2, and height must be multiple of 4.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts the interlaced planar 4:2:0 image to the pixel-order 4:2:2 two-channel image.
Three-plane source image has the following order of pointers: Y-plane, Cb-plane, Cr-plane.The destination
image pDst has the following sequence of samples: Cb0, Y0, Cr0, Y1, Cb1, Y2, Cr1, Y3, Cb2, ...

965

1

Intel® Integrated Performance Primitives Developer Guide and Reference

The conversion is performed in accordance with the following formulas:

Yndest = Ynsrc;
Cb0(Cr0)dest = (5*Cb0(Cr0)src + 3*Cb2(Cr2)src + 4)/8;
Cb1(Cr1)dest = (7*Cb1(Cr1)src + Cb3(Cr3)src + 4)/8;
Cb2(Cr2)dest = (Cb0(Cr0)src + 7*Cb2(Cr2)src + 4)/8;
Cb3(Cr3)dest = (3*Cb1(Cr1)src + 5*Cb3(Cr3)src + 4)/8;

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if any of the specified pointers is
NULL.

ippStsSizeErr

Indicates an error condition if roiSize.width is less than 2, or
roiSize.height is less than 4.

ippStsDoubleSize

Indicates a warning if roiSize.width is not multiple of 2, or
roiSize.height is not multiple of 4.

YCbCr420ToYCrCb420
Converts 4:2:0 YCbCr image to 4:2:0 YCrCb image.

SyntaxIppStatus ippiYCbCr420ToYCrCb420_8u_P2P3R(const Ipp8u* pSrcY, int srcYStep, const
Ipp8u* pSrcCbCr, int srcCbCrStep, Ipp8u* pDst[3], int dstStep[3], IppiSize roiSize);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrcY
srcYSteppSrcCbCr
srcCbCrStep
pDst
dstStep
roiSize

966

Pointer to the ROI in the luminance plane of the source image.
Distance in bytes between starts of consecutive lines in theluminance plane of the source image.
Pointer to the ROI in the interleaved chrominance plane of thesource image.
Distance in bytes between starts of consecutive lines in theinterleaved chrominance plane of the source image.
Array of pointers to the ROI in each plane of the destination
image.
Array of distances in bytes between starts of consecutive lines
in the destination image planes.
Size of the source and destination ROI in pixels, height andwidth should be multiple of 2.

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts the 4:2:0 two-plane source image pSrc to the 4:2:0 three-plane image pDst. The
first plane of the source image pSrcY contains luminance samples Y0, Y1, Y2, ..., the second plane
pSrcCbCr contains interleaved chrominance samples Cb0, Cr0, Cb1, Cr1, .... The destination image pDst
has the following order of pointers:Y-plane, Cr-plane, Cb-plane (see Table “Planar Image Formats”).

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if any of the specified pointers is
NULL.

ippStsSizeErr

Indicates an error condition if any field of the roiSize is lessthan 2.

YCbCr420ToYCrCb420_Filter
Convert 4:2:0 YCbCr image to 4:2:0 YCrCb image
with deinterlace filtering.

SyntaxIppStatus ippiYCbCr420ToYCrCb420_Filter_8u_P2P3R(const Ipp8u* pSrcY, int srcYStep,
const Ipp8u* pSrcCbCr, int srcCbCrStep, Ipp8u* pDst[3], int dstStep[3], IppiSize
roiSize, int layout);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrcY
srcYSteppSrcCbCr
srcCbCrStep

pDst
dstStep

Pointer to the ROI in the luminance plane of thesource image.
Distance in bytes between starts of consecutive
lines in the luminance plane of the source
image.
Pointer to the ROI in the interleaved
chrominance plane of the source image.
Distance in bytes between starts of consecutive
lines in the interleaved chrominance plane of thesource image.
Array of pointers to the ROI in each plane of thedestination image.
Array of distances in bytes between starts ofconsecutive lines in the destination image
planes.

967

1Intel® Integrated Performance Primitives Developer Guide and Reference

roiSize

Size of the source and destination ROI in pixels,
height and width should be multiple of 2.

layoutSlice layout. Possible values:

IPP_UPPER

Upper (first) slice

IPP_CENTER

Middle slices

IPP_LOWER

Lowermost (last) slice

IPP_LOWER &&IPP_UPPER &&IPP_CENTER

Image is not sliced

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts the 4:2:0 two-plane source image to the 4:2:0 three-plane image. The first plane of
the source image pSrcY contains luminance samples Y0, Y1, Y2, ..., the second plane pSrcCbCr contains
interleaved chrominance samples Cb0, Cr0, Cb1, Cr1, .... The destination image pDst has the following
order of pointers: Y-plane, Cr-plane, Cb-plane. The function additionally performs deinterlace filtering.
Commonly it is used to process sliced images. In this case the slice layout should be specified, since thefunction processes the first (upper), last (lowermost), and intermediate (middle) slices differently. The heightof slices should be a multiple of 16. The function may be applied to a not-sliced image as well.

Caution
The image slices should be processed exactly in the following order: the first slice,
intermediate slices, the last slice.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if any of the specified pointers is
NULL.

ippStsSizeErr

Indicates an error condition if any field of the roiSize is lessthan 2.

YCbCr420ToYCbCr411
Converts YCbCr image from 4:2:0 sampling format to
4:1:1 format.

SyntaxIppStatus ippiYCbCr420ToYCbCr411_8u_P3P2R(const Ipp8u* pSrc[3], int srcStep[3], Ipp8u*
pDstY, int dstYStep, Ipp8u* pDstCbCr, int dstCbCrStep, IppiSize roiSize);
IppStatus ippiYCbCr420ToYCbCr411_8u_P2P3R(const Ipp8u* pSrcY, int srcYStep, const
Ipp8u* pSrcCbCr, int srcCbCrStep, Ipp8u* pDst[3], int dstStep[3], IppiSize roiSize);
IppStatus ippiYCbCr420To411_8u_P3R(const Ipp8u* pSrc[3], int srcStep[3], Ipp8u*
pDst[3] , int dstStep[3], IppiSize roiSize);
IppStatus ippiYCbCr420To1620_8u_P3R(const Ipp8u* pSrc[3], int srcStep[3], Ipp8u*
pDst[3] , int dstStep[3], IppiSize roiSize);968

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

IppStatus ippiYCbCr1620To420_8u_P3R(const Ipp8u* pSrc[3], int srcStep[3], Ipp8u*
pDst[3] , int dstStep[3], IppiSize roiSize);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pSrcY
srcYSteppSrcCbCr
srcCbCrStep
pDst
dstStep
pDstY
dstYStep
pDstCbCr
dstCbCrStep
roiSize

Array of pointers to the ROI in each plane for a three-planesource image.
Array of distances in bytes between starts of consecutive lines
in each plane for a three-plane source image.
Pointer to the ROI in the luminance plane for a two-planesource image.
Distance in bytes between starts of consecutive lines in theluminance plane of a source image.
Pointer to the ROI in the interleaved chrominance plane for a
two-plane source image.
Distance in bytes between starts of consecutive lines in theinterleaved chrominance plane of the source image.
Array of pointers to the ROI in each plane for a three-plane
destination image.
Array of distances in bytes between starts of consecutive lines
in each plane for a three-plane destination image.
Pointer to the ROI in the luminance plane for a two-plane
destination image.
Distance in bytes between starts of consecutive lines in theluminance plane of a destination image.
Pointer to the ROI in the interleaved chrominance plane for a
two-plane destination image.
Distance in bytes between starts of consecutive lines in thechrominance plane of a destination image.
Size of the ROI in pixels, its width should be multiple of 4, its
height should be multiple of 2.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts the 4:2:0 source image to the 4:1:1 destination image. The source two-plane image
is converted to destination three-plane image and vice versa. The first plane of the two-plane image contains
luminance samples Y0, Y1, Y2, ..., the second plane contains interleaved chrominance samples Cb0, Cr0,
Cb1, Cr1, .... The three-plane image has the following order of pointers: Y-plane, Cb-plane, Cr-plane (seeTable “Planar Image Formats”).

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

969

1

Intel® Integrated Performance Primitives Developer Guide and ReferenceippStsNullPtrErr
ippStsSizeErr

Indicates an error condition if any of the specified pointers is

NULL.

Indicates an error condition if roiSize.width is less than 4 orroiSize.height is less than 2.

YCrCb420ToYCbCr422
Converts 4:2:0 YCrCb image to 4:2:2 YCbCr image.

SyntaxIppStatus ippiYCrCb420ToYCbCr422_8u_P3R(const Ipp8u* pSrc[3], int srcStep[3], Ipp8u*
pDst[3], int dstStep[3], IppiSize roiSize);
IppStatus ippiYCrCb420ToYCbCr422_8u_P3C2R(const Ipp8u* pSrc[3], int srcStep[3], Ipp8u*
pDst, int dstStep, IppiSize roiSize);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pDst

dstStep

roiSize

Array of pointers to the ROI in each plane of the source image.
Array of distances in bytes between starts of consecutive lines
in each plane of the source image.
Pointer to the ROI in the pixel-order destination image. Array ofpointers to the ROI in each plane of the planar destination
image.
Distance in bytes between starts of consecutive lines in thedestination image. Array of distance values for the destination
image planes.
Size of the ROI in pixels, height and width should be multiple of2.

Description
This function converts the 4:2:0YCrCb three-plane image pSrc to the 4:2:2YCbCr three-plane or twochannel image pDst (see Table “Pixel-Order Image Formats” and Table “Planar Image Formats”).
This function operates with ROI (see Regions of Interest in Intel IPP).

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if any of the specified pointers is
NULL.

ippStsSizeErr

Indicates an error condition if any field of the roiSize is lessthan 2.

970

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

YCrCb420ToYCbCr422_Filter
Converts 4:2:0 YCrCb image to 4:2:2 YCbCr image
with additional filtering.

SyntaxIppStatus ippiYCrCb420ToYCbCr422_Filter_8u_P3R(const Ipp8u* pSrc[3], int srcStep[3],Ipp8u* pDst[3], int dstStep[3], IppiSize roiSize);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pDst
dstStep
roiSize

Array of pointers to the ROI in each plane of the source image.
Array of distances in bytes between starts of consecutive lines
in each plane of the source image.
Array of pointers to the ROI in each plane of the destination
image.
Array of distances in bytes between starts of consecutive lines
in each plane of the destination image.
Size of the ROI in pixels, its width should be multiple of 2, its
height should be multiple of 8.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts the 4:2:0YCrCb three-plane image pSrc to the 4:2:2YCbCr three-plane image pDst
(see Table “Planar Image Formats”).
Additionally, this function performs the vertical upsampling using a Catmull-Rom interpolation (cubic
convolution interpolation).

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if any of the specified pointers is
NULL.

ippStsSizeErr

Indicates an error condition if roiSize.width is less than 2 orroiSize.height is less than 8.

YCrCb420ToCbYCr422
Converts 4:2:0 YCrCb image to 4:2:2 CbYCr image.

SyntaxIppStatus ippiYCrCb420ToCbYCr422_8u_P3C2R(const Ipp8u* pSrc[3], int srcStep[3], Ipp8u*
pDst, int dstStep, IppiSize roiSize);

971

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pDst
dstStep
roiSize

Array of pointers to the ROI in each plane of the source image.
Array of distances in bytes between starts of consecutive lines
in each plane of the source image.
Pointer to the destination image ROI.
Distance in bytes between starts of consecutive lines in thedestination image.
Size of the source and destination ROI in pixels, height andwidth should be multiple of 2.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts the 4:2:0YCrCb three-plane image pSrc (see Table “Planar Image Formats”) to the
4:2:2CbYCr two-channel image pDst with the following sequence of samples: Cb0, Y0, Cr0, Y1, Cb1, Y2,
Cr1, Y3, Cb2, ... (see Table “Pixel-Order Image Formats”).

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if any of the specified pointers is
NULL.

ippStsSizeErr

Indicates an error condition if any field of the roiSize is lessthan 2.

YCrCb420ToYCbCr420
Converts 4:2:0 YCrCb image to 4:2:0 YCbCr image.

SyntaxIppStatus ippiYCrCb420ToYCbCr420_8u_P3P2R(const Ipp8u* pSrc[3], int srcStep[3], Ipp8u*
pDstY, int dstYStep, Ipp8u* pDstCbCr, int dstCbCrStep, IppiSize roiSize);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

972

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Parameters
pSrc
srcStep
pDstY
dstYStep
pDstCbCr
dstCbCrStep
roiSize

Array of pointers to the ROI in each plane of the source image.
Array of distances in bytes between starts of consecutive lines
in each plane of the source image.
Pointer to the ROI in the luminance plane of a destination
image.
Distance in bytes between starts of consecutive lines in theluminance plane of the destination image.
Pointer to the ROI in the interleaved chrominance plane of thedestination image.
Distance in bytes between starts of consecutive lines in theinterleaved chrominance plane of a destination image.
Size of the source and destination ROI in pixels, height andwidth should be multiple of 2.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts the 4:2:0YCrCb three-plane image pSrc (see Table “Planar Image Formats”) to the
4:2:0 YCbCr two-plane image that contains luminance samples Y0, Y1, Y2, .. in the first plane pDstY, andinterleaved chrominance samples Cb0, Cr0, Cb1, Cr1, ... in the second plane pDstCbCr.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if any of the specified pointers is
NULL.

ippStsSizeErr

Indicates an error condition if any field of the roiSize is lessthan 2.

YCrCb420ToYCbCr411
Converts 4:2:0 YCrCb image to 4:1:1 YCbCr image.

SyntaxIppStatus ippiYCrCb420ToYCbCr411_8u_P3P2R(const Ipp8u* pSrc[3], int srcStep[3], Ipp8u*
pDstY, int dstYStep, Ipp8u* pDstCbCr, int dstCbCrStep, IppiSize roiSize);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc

Array of pointers to the ROI in each plane of the source image.

srcStep

Array of distances in bytes between starts of consecutive lines
in each plane of the source image.

973

1

Intel® Integrated Performance Primitives Developer Guide and Reference

pDstY
dstYStep
pDstCbCr
dstCbCrStep
roiSize

Pointer to the ROI in the luminance plane of a destination
image.
Distance in bytes between starts of consecutive lines in theluminance plane of the destination image.
Pointer to the ROI in the interleaved chrominance plane of thedestination image.
Distance in bytes between starts of consecutive lines in theinterleaved chrominance plane of a destination image.
Size of the ROI in pixels, its width should be multiple of 4, its
height should be multiple of 2.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts the 4:2:0YCrCb three-plane image pSrc (see Table “Planar Image Formats”) to the
4:1:1YCbCr two-plane image that contains luminance samples Y0, Y1, Y2, .. in the first plane pDstY, andinterleaved chrominance samples Cb0, Cr0, Cb1, Cr1, ... in the second plane pDstCbCr..

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if any of the specified pointers is
NULL.

ippStsSizeErr

Indicates an error condition if roiSize.width is less than 4 orroiSize.height is less than 2.

YCbCr411
Converts 4:1:1 YCbCr image.

SyntaxIppStatus ippiYCbCr411_8u_P3P2R(const Ipp8u* pSrc[3], int srcStep[3], Ipp8u* pDstY, int
dstYStep, Ipp8u* pDstCbCr, int dstCbCrStep, IppiSize roiSize);
IppStatus ippiYCbCr411_8u_P2P3R(const Ipp8u* pSrcY, int srcYStep, const Ipp8u*
pSrcCbCr, int srcCbCrStep, Ipp8u* pDst[3], int dstStep[3], IppiSize roiSize);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcSteppSrcY

974

Array of pointers to the ROI in each plane for a three-planesource image.
Array of distances in bytes between starts of consecutive lines
in each plane for a three-plane source image.
Pointer to the ROI in the luminance plane for a two-planesource image.

Developer Guide and Reference for Intel® Integrated Performance Primitives

srcYSteppSrcCbCr
srcCbCrStep
pDst
dstStep
pDstY
dstYStep
pDstCbCr
dstCbCrStep
roiSize

1

Distance in bytes between starts of consecutive lines in theluminance plane of a source image.
Pointer to the ROI in the interleaved chrominance plane for a
two-plane source image.
Distance in bytes between starts of consecutive lines in theinterleaved chrominance plane of the source image.
Array of pointers to the ROI in each plane for a three-plane
destination image.
Array of distances in bytes between starts of consecutive lines
in each plane for a three-plane destination image.
Pointer to the ROI in the luminance plane for a two-plane
destination image.
Distance in bytes between starts of consecutive lines in theluminance plane of a destination image.
Pointer to the ROI in the interleaved chrominance plane for a
two-plane destination image.
Distance in bytes between starts of consecutive lines in thechrominance plane of a destination image.
Size of the ROI in pixels, its width should be multiple of 4.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts the 4:1:1 three-plane (see Table “Planar Image Formats”) source image pSrc to the
4:1:1 two-plane image and vice versa. Two-plane image contains luminance samples Y0, Y1, Y2, .. in thefirst plane, and interleaved chrominance samples Cb0, Cr0, Cb1, Cr1, ... in the second plane.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if any of the specified pointers is
NULL.

ippStsSizeErr

Indicates an error condition if roiSize.width is less than 4.

YCbCr411ToYCbCr422
Converts 4:1:1 YCbCr image to 4:2:2 YCbCr image.

SyntaxIppStatus ippiYCbCr411ToYCbCr422_8u_P3R(const Ipp8u* pSrc[3], int srcStep[3], Ipp8u*
pDst[3], int dstStep[3], IppiSize roiSize);
IppStatus ippiYCbCr411ToYCbCr422_8u_P3C2R(const Ipp8u* pSrc[3], int srcStep[3], Ipp8u*
pDst, int dstStep, IppiSize roiSize);
IppStatus ippiYCbCr411ToYCbCr422_8u_P2P3R(const Ipp8u* pSrcY, int srcYStep, const
Ipp8u* pSrcCbCr, int srcCbCrStep, Ipp8u* pDst[3], int dstStep[3], IppiSize roiSize);
IppStatus ippiYCbCr411ToYCbCr422_8u_P2C2R(const Ipp8u* pSrcY, int srcYStep, const
Ipp8u* pSrcCbCr, int srcCbCrStep, Ipp8u* pDst, int dstStep, IppiSize roiSize);

Include Files
ippcc.h975

1Intel® Integrated Performance Primitives Developer Guide and Reference

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pSrcY
srcYSteppSrcCbCr
srcCbCrStep
pDst

dstStep

roiSize

Array of pointers to the ROI in each plane for a three-planesource image.
Array of distances in bytes between starts of consecutive lines
in each plane for a three-plane source image.
Pointer to the ROI in the luminance plane for a two-planesource image.
Distance in bytes between starts of consecutive lines in theluminance plane of a source image.
Pointer to the ROI in the interleaved chrominance plane for a
two-plane source image.
Distance in bytes between starts of consecutive lines in theinterleaved chrominance plane of the source image.
Pointer to the ROI in the pixel-order destination image. Array ofpointers to the ROI in each plane of the planar destination
image.
Distance in bytes between starts of consecutive lines in thedestination image. Array of distance values for the destination
image planes.
Size of the ROI in pixels, its width should be multiple of 4.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This functionconverts 4:1:1 planar source image pSrc to the 4:2:2 image pDst. The first plane of the twoplane source image pSrcY contains luminance samples Y0, Y1, Y2, ..., the second plane pSrcCbCr contains
interleaved chrominance samples Cb0, Cr0, Cb1, Cr1, .... The destination image pDst can be either threeplane (see Table “Planar Image Formats”) or two-channel image (see Table “Pixel-Order Image Formats”).

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if any of the specified pointers is
NULL.

ippStsSizeErr

Indicates an error condition if roiSize.width is less than 4.

YCbCr411ToYCrCb422
Converts 4:1:1 YCbCr image to 4:2:2 YCrCb image.

SyntaxIppStatus ippiYCbCr411ToYCrCb422_8u_P3R(const Ipp8u* pSrc[3], int srcStep[3], Ipp8u*
pDst[3], int dstStep[3], IppiSize roiSize);
IppStatus ippiYCbCr411ToYCrCb422_8u_P3C2R(const Ipp8u* pSrc[3], int srcStep[3], Ipp8u*
pDst, int dstStep, IppiSize roiSize);

976

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pDst

dstStep

roiSize

Array of pointers to the ROI in each plane for a three-planesource image.
Array of distances in bytes between starts of consecutive lines
in each plane for a three-plane source image.
Pointer to the ROI in the pixel-order destination image. Array ofpointers to the ROI in each plane of the planar destination
image.
Distance in bytes between starts of consecutive lines in thedestination image. Array of distance values for the destination
image planes.
Size of the ROI in pixels, its width should be multiple of 4.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts the 4:1:1 three-plane image pSrc to the 4:2:2 two-channel or three-plane image
pDst with different order of components. The source image has the following order of pointers: Y-plane, Cbplane, Cr-plane (see Table “Planar Image Formats”). The three-plane destination image has the following
order of pointers: Y-plane, Cr-plane, Cb-plane (see Table “Planar Image Formats”), and two-channel
destination image has the following sequence of samples: Y0, Cr0, Y1, Cb0, Y2, Cr1, Y3, Cb1, ... (see Table“Pixel-Order Image Formats”).

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if any of the specified pointers is
NULL.

ippStsSizeErr

Indicates an error condition if roiSize.width is less than 4.

YCbCr411ToYCbCr420, YCbCr411To420
Converts 4:1:1 YCbCr image to 4:2:0 YCbCr image.

SyntaxIppStatus ippiYCbCr411ToYCbCr420_8u_P3R(const Ipp8u* pSrc[3], int srcStep[3], Ipp8u*
pDst[3], int dstStep[3], IppiSize roiSize);
IppStatus ippiYCbCr411ToYCbCr420_8u_P3P2R(const Ipp8u* pSrc[3], int srcStep[3], Ipp8u*
pDstY, int dstYStep, Ipp8u* pDstCbCr, int dstCbCrStep, IppiSize roiSize);
IppStatus ippiYCbCr411ToYCbCr420_8u_P2P3R(const Ipp8u* pSrcY, int srcYStep, const
Ipp8u* pSrcCbCr, int srcCbCrStep, Ipp8u* pDst[3], int dstStep[3], IppiSize roiSize);

977

1

Intel® Integrated Performance Primitives Developer Guide and Reference

IppStatus ippiYCbCr411To420_8u_P3R(const Ipp8u* pSrc[3], int srcStep[3], Ipp8u*
pDst[3], int dstStep[3], IppiSize roiSize);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pSrcY
srcYSteppSrcCbCr
srcCbCrStep
pDst
dstStep
pDstY
dstYStep
pDstCbCr
dstCbCrStep
roiSize

Array of pointers to the ROI in each plane for a three-planesource image.
Array of distances in bytes between starts of consecutive lines
in each plane for a three-plane source image.
Pointer to the ROI in the luminance plane for a two-planesource image.
Distance in bytes between starts of consecutive lines in theluminance plane of a source image.
Pointer to the ROI in the interleaved chrominance plane for a
two-plane source image.
Distance in bytes between starts of consecutive lines in theinterleaved chrominance plane of the source image.
Array of pointers to the ROI in each plane for a three-plane
destination image.
Array of distances in bytes between starts of consecutive lines
in each plane for a three-plane destination image.
Pointer to the ROI in the luminance plane for a two-plane
destination image.
Distance in bytes between starts of consecutive lines in theluminance plane of a destination image.
Pointer to the ROI in the interleaved chrominance plane for a
two-plane destination image.
Distance in bytes between starts of consecutive lines in thechrominance plane of a destination image.
Size of the ROI in pixels, its width should be multiple of 4, its
height should be multiple of 2.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts the 4:1:1 planar source image pSrc (see Table “Planar Image Formats”) to the 4:2:0
planar image pDst. Both source and destination images can be three- or two-plane. Three-plane images has
the following order of pointers: Y-plane, Cb-plane, Cr-plane (see Table “Planar Image Formats”). Two-plane
images contain luminance samples Y0, Y1, Y2, .. in the first plane, and interleaved chrominance samples
Cb0, Cr0, Cb1, Cr1, ... in the second plane.

Return Values
ippStsNoErr

978

Indicates no error. Any other value indicates an error.

Developer Guide and Reference for Intel® Integrated Performance Primitives

ippStsNullPtrErr
ippStsSizeErr

1

Indicates an error condition if any of the specified pointers is

NULL.

Indicates an error condition if roiSize.width is less than 4 orroiSize.height is less than 2.

YCbCr411ToYCrCb420
Converts 4:1:1 YCbCr image to 4:2:0 YCrCb image.

SyntaxIppStatus ippiYCbCr411ToYCrCb420_8u_P2P3R(const Ipp8u* pSrcY, int srcYStep, const
Ipp8u* pSrcCbCr, int srcCbCrStep, Ipp8u* pDst[3], int dstStep[3], IppiSize roiSize);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrcY
srcYSteppSrcCbCr
srcCbCrStep
pDst
dstStep
roiSize

Pointer to the ROI in the luminance plane of the source image.
Distance in bytes between starts of consecutive lines in theluminance plane of the source image.
Pointer to the ROI in the interleaved chrominance plane of thesource image.
Distance in bytes between starts of consecutive lines in theinterleaved chrominance plane of the source image.
Array of pointers to the ROI in each plane of the destination
image.
Array of distances in bytes between starts of consecutive lines
in each plane of the destination image.
Size of the ROI in pixels, its width should be multiple of 4, its
height should be multiple of 2.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts the 4:1:1 two-plane source image pSrc to the 4:2:0 three-plane image pDst with adifferent order of components. The first plane of the source image pSrcY contains luminance samples Y0, Y1,
Y2, ..., the second plane pSrcCbCr contains interleaved chrominance samples Cb0, Cr0, Cb1, Cr1, ... .The
destination image has the following order of pointers: Y-plane, Cr-plane, Cb-plane (see Table “Planar Image
Formats”),

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if any of the specified pointers is
NULL.

979

1

Intel® Integrated Performance Primitives Developer Guide and ReferenceippStsSizeErr

Indicates an error condition if roiSize.width is less than 4 orroiSize.height is less than 2.

Color Twist
Color twist conversion functions use values of all color channels of a source pixel to compute the resultant
destination channel value. The destination channel value is obtained as the result of multiplying thecorresponding row of the color-twist matrix by the vector of source pixel channel values.
For example, if (r,g,b) is a source pixel, then the destination pixel values (R,G,B) are computed as follows:

R = t11*r + t12*g + t13*b + t14
G = t21*r + t22*g + t23*b + t24
B = t31*r + t32*g + t33*b + t343
whereis the color twist matrix. The color twist matrix used by the Intel IPP functions is a matrix of size 3x4, or 4x4
with floating-point elements. The matrix elements are specific for each particular type of color conversion.

ColorTwist
Applies a color twist matrix to an image with floatingpoint pixel values.

SyntaxCase 1: Not-in-place operation on pixel-order data
IppStatus ippiColorTwist_<mod>(const Ipp32f* pSrc, int srcStep, Ipp32f* pDst, int
dstStep, IppiSize roiSize, const Ipp32f twist[3][4]);Supported values for mod:32f_C3R
32f_AC4R
IppStatus ippiColorTwist_32f_C4R(const Ipp32f* pSrc, int srcStep, Ipp32f* pDst, int
dstStep, IppiSize roiSize, const Ipp32f twist[4][4]);Case 2: Not-in-place operation on planar data
IppStatus ippiColorTwist_32f_P3R(const Ipp32f* pSrc[3], int srcStep, Ipp32f* pDst[3],int dstStep, IppiSize roiSize, const Ipp32f twist[3][4]);Case 3: In-place operation on pixel-order data
IppStatus ippiColorTwist_<mod>(Ipp32f* pSrcDst, int srcDstStep, IppiSize roiSize, const
Ipp32f twist[3][4]);Supported values for mod:32f_C3IR
32f_AC4IR

980

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Case 4: In-place operation on planar data
IppStatus ippiColorTwist_32f_IP3R(Ipp32f* pSrcDst[3], int srcDstStep, IppiSize roiSize,const Ipp32f twist[3][4]);Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pDst

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the destination image ROI.

roiSize

Distance in bytes between starts of consecutive lines in thedestination image.
Pointer to the source and destination image ROI for the inplace operation.
Distance in bytes between starts of consecutive lines in thesource and destination image for the in-place operation.
Size of the source and destination ROI in pixels.

twist

The array containing color-twist matrix elements.

dstStep
pSrcDstsrcDstStep

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function applies the color-twist matrix to all three color channels in the source image with floating-point
pixel values to obtain the resulting data in the destination image. The destination channel value is obtained
as the result of multiplying the corresponding row of the color-twist matrix by the vector of source pixel
channel values.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if pSrc, pDst, or pSrcDst is NULL.

ippStsSizeErr

Indicates an error condition if roiSize has a field with a zero or
negative value.

ColorTwist32f
Applies a color twist matrix to an image with integer
pixel values.

981

1

Intel® Integrated Performance Primitives Developer Guide and Reference

SyntaxCase 1: Not-in-place operation on pixel-order data
IppStatus ippiColorTwist32f_<mod>(const Ipp<datatype>* pSrc, int srcStep,
Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, const Ipp32f twist[3][4]);Supported values for mod:8u_C3R

16u_C3R

16s_C3R

8u_AC4R

16u_AC4R

16s_AC4R

Case 2: Not-in-place operation on planar data
IppStatus ippiColorTwist32f_<mod>(const Ipp<datatype>* pSrc[3], int srcStep,
Ipp<datatype>* pDst[3], int dstStep, IppiSize roiSize, const Ipp32f twist[3][4]);Supported values for mod :8u_P3R

16u_P3R

16s_P3R

Case 3: In-place operation on pixel-order data
IppStatus ippiColorTwist32f_<mod>(Ipp<datatype>* pSrcDst, int srcDstStep, IppiSize
roiSize, const Ipp32f twist[3][4]);Supported values for mod :8u_C3IR

16u_C3IR

16s_C3IR

8u_AC4IR

16u_AC4IR

16s_AC4IR

Case 4: In-place operation on planar data
IppStatus ippiColorTwist32f_<mod>(Ipp<datatype>* pSrcDst[3], int srcDstStep, IppiSize
roiSize, const Ipp32f twist[3][4]);Supported values for mod :8u_IP3R

16u_IP3R

16s_IP3R

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pDst
dstStep
pSrcDst982

Pointer to the source image ROI.
Distance, in bytes, between the starting points of consecutive
lines in the source image.
Pointer to the destination image ROI.
Distance, in bytes, between the starting points of consecutive
lines in the destination image.
Pointer to the source and destination image ROI for the inplace operation.

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

roiSize

Distance, in bytes, between the starting points of consecutive
lines in the source and destination image for the in-place
operation.
Size of the source and destination ROI in pixels.

twist

The array containing color-twist matrix elements.

srcDstStep

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function applies the color-twist matrix to all three color channel values in the integer source image toobtain the resulting data in the destination image. For example, the conversion from the RGB to the YCbCr
format can be done as

Y = 0.299*R + 0.587*G + 0.114*B
Cb = - 0.16874*R - 0.33126*G + 0.5*B + 0.5
Cr = 0.5*R - 0.41869*G - 0.08131*B + 0.5
which can be described in terms of the following color twist matrix:

0.29900f-0.16874f
0.50000f

0.58700f-0.33126f-0.41869f

0.11400f
0.50000f-0.08131f

0.000f128.0f128.0fColor-twist matrices may also be used to perform many other color conversions.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if pSrc, pDst, or pSrcDst is NULL.

ippStsSizeErr

Indicates an error condition if roiSize has a field with a zero or
negative value.

Color Keying
CompColorKey
Performs color keying of two images.

SyntaxCase 1: Operation on one-channel data
IppStatus ippiCompColorKey_<mod>(const Ipp<datatype>* pSrc1, int src1Step, const
Ipp<datatype>* pSrc2, int src2Step, Ipp<datatype>* pDst, int dstStep, IppiSize roiSize,Ipp<datatype> colorKey);
Supported values for mod:8u_C1R

16u_C1R

16s_C1R

983

1Intel® Integrated Performance Primitives Developer Guide and Reference

Case 2: Operation on multi-channel data
IppStatus ippiCompColorKey_<mod>(const Ipp<datatype>* pSrc1, int src1Step, const
Ipp<datatype>* pSrc2, int src2Step, Ipp<datatype>* pDst, int dstStep, IppiSize roiSize,Ipp<datatype> colorKey[3]);Supported values for mod:8u_C3R

16u_C3R

16s_C3R

IppStatus ippiCompColorKey_<mod>(const Ipp<datatype>* pSrc1, int src1Step, const
Ipp<datatype>* pSrc2, int src2Step, Ipp<datatype>* pDst, int dstStep, IppiSize roiSize,Ipp<datatype> colorKey[4]);Supported values for mod:8u_C4R

16u_C4R

16s_C4R

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc1, pSrc2
src1Step, src2Step
pDst
dstStep
roiSizecolorKey

Pointer to the source images ROI.
Distances in bytes between starts of consecutive lines in thesource images.
Pointer to the destination image ROI.
Distance in bytes between starts of consecutive lines in thedestination image.
Size of the source and destination ROI in pixels.
Value of the key color for 1-channel images, array of color
values for multi-channel images.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function replaces all areas of the source image pSrc1 containing the specified key color colorKey withthe corresponding pixels of the background image pSrc2 and stores the result in the destination image pDst.

984

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

The Figure Applying the Function ippiCompColorKey to Sample Images shows an example of how the function
ippiCompColorKey works.
Applying the Function ippiCompColorKey to Sample Images

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if one of the specified pointers is
NULL.

ippStsSizeErr
ippStsStepErr

Indicates an error condition if roiSize has a field with a zero or
negative value.
Indicates an error condition if one of the step values is lessthan or equal to 0.

AlphaCompColorKey
Performs color keying and alpha composition of two
images.

SyntaxIppStatus ippiAlphaCompColorKey_8u_AC4R(const Ipp8u* pSrc1, int src1Step, Ipp8u alpha1,
const Ipp8u* pSrc2, int src2Step, Ipp8u alpha2, Ipp8u* pDst, int dstStep, IppiSize
roiSize, Ipp8u colorKey[4], IppiAlphaType alphaType);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc1, pSrc2

Pointer to the source images ROI.

985

1

Intel® Integrated Performance Primitives Developer Guide and Referencealpha1, alpha2

Distances in bytes between starts of consecutive lines in thesource images.
Alpha value.

pDst

Pointer to the destination image ROI.

src1Step, src2Step

roiSize

Distance in bytes between starts of consecutive lines in thedestination image.
Size of the source and destination ROI in pixels.

colorKey

Array of color values.

dstStep

The type of composition to perform (without pre-multiplying).
See Table “Possible Values of alphaType Parameter” for moredetails.

alphaType

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function replaces all areas of the source image pSrc1 containing the specified key color colorKey withthe corresponding pixels of the background image pSrc2 and additionally performs alpha composition (seesupported Table “Types of Image Compositing Operations”) in accordance with the parameter alphaType.
Note the alpha channel in the pDst is not changed after color keying.
The parameter alphaType should not be set to the values intended for operations with pre-multiplying.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if one of the specified pointers is
NULL.

ippStsSizeErr
ippStsStepErr
ippStsAlphaTypeErr

Indicates an error condition if roiSize has a field with a zero or
negative value.
Indicates an error condition if one of the step values is lessthan or equal to 0.
Indicates an error condition if alphaType specifies theunsupported type of composition.

Gamma Correction
GammaFwd
Performs gamma-correction of the source image with
RGB data.

SyntaxCase 1: Not-in-place operation on integer pixel-order data
IppStatus ippiGammaFwd_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>*pDst, int dstStep, IppiSize roiSize);
Supported values for mod:8u_C3R

16u_C3R

8u_AC4R

16u_AC4R

986

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Case 2: Not-in-place operation on integer planar data
IppStatus ippiGammaFwd_<mod>(const Ipp<datatype>* pSrc[3], int srcStep, Ipp<datatype>*
pDst[3], int dstStep, IppiSize roiSize);
Supported values for mod:8u_P3R

16u_P3R

Case 3: Not-in-place operation on floating-point pixel-order data
IppStatus ippiGammaFwd_<mod>(const Ipp32f* pSrc, int srcStep, Ipp32f* pDst, int
dstStep, IppiSize roiSize, Ipp32f vMin, Ipp32f vMax);
Supported values for mod:32f_C3R
32f_AC4R

Case 4: Not-in-place operation on floating-point planar data
IppStatus ippiGammaFwd_32f_P3R (const Ipp32f* pSrc[3], int srcStep, Ipp32f* pDst[3],int dstStep, IppiSize roiSize, Ipp32f vMin, Ipp32f vMax);

Case 5: In-place operation on integer pixel-order data
IppStatus ippiGammaFwd_<mod>(Ipp<datatype>* pSrcDst, int srcDstStep, IppiSize roiSize);
Supported values for mod:8u_C3IR

16u_C3IR

8u_AC4IR

16u_AC4IR

Case 6: In-place operation on integer planar data
IppStatus ippiGammaFwd_<mod>(Ipp<datatype>* pSrcDst[3], int srcDstStep, IppiSize
roiSize);
Supported values for mod:8u_IP3R

16u_IP3R

Case 7: In-place operation on floating-point pixel-order data
IppStatus ippiGammaFwd_<mod>(Ipp32f* pSrcDst, int srcDstStep, IppiSize roiSize, Ipp32f
vMin, Ipp32f vMax);
Supported values for mod:32f_C3IR
32f_AC4IR

Case 8: In-place operation on floating-point planar data
IppStatus ippiGammaFwd_32f_IP3R (Ipp32f* pSrcDst[3], int srcDstStep, IppiSize roiSize,
Ipp32f vMin, Ipp32f vMax);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h

987

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pDst

dstStep
pSrcDstPointer to the ROI in the pixel-order source image. Array ofpointers to the ROI in each plane of the planar source image.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the ROI in the pixel-order destination image. Array ofpointers to the ROI in each plane of the planar destination
image.
Distance in bytes between starts of consecutive lines in thedestination image.
Pointer to the source and destination image ROI for the inplace operation.

roiSize

Distance in bytes between starts of consecutive lines in thesource and destination image for the in-place operation.
Size of the source and destination ROI in pixels.

vMin, vMax

Minimum and maximum values of the input floating-point data.

srcDstStep

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function performs gamma-correction of the source image with RGB data. It uses the following basic
equations to convert an RGB image to the gamma-corrected R'G'B' image:for R,G,B < 0.018

R' = 4.5 * R
G' = 4.5 * G
B' = 4.5 * B
for R,G,B ≥ 0.018

R' = 1.099 * R0.45 - 0.099
G' = 1.099 * G0.45 - 0.099
B' = 1.099 * B0.45 - 0.099
Note that the channel intensity values are normalized to fit in the range of [0..1]. The gamma value is equal
to 1/0.45 = 2.22 in conformity with [ITU709] specification.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if pSrc, pDst, or pSrcDst is NULL.

ippStsSizeErr
ippStsGammaRangeErr

988

Indicates an error condition if roiSize has a field with a zero or
negative value.
Indicates an error condition if the input data bounds areincorrect, that is vMax is less than or equal to vMin.

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

GammaInv
Converts a gamma-corrected R'G'B' image back to theoriginal RGB image.

SyntaxCase 1: Not-in-place operation on integer pixel-order data
IppStatus ippiGammaInv_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>*pDst, int dstStep, IppiSize roiSize);
Supported values for mod:8u_C3R

16u_C3R

8u_AC4R

16u_AC4R

Case 2: Not-in-place operation on integer planar data
IppStatus ippiGammaInv_<mod>(const Ipp<datatype>* pSrc[3], int srcStep, Ipp<datatype>*
pDst[3], int dstStep, IppiSize roiSize);
Supported values for mod:8u_P3R

16u_P3R

Case 3: Not-in-place operation on floating-point pixel-order data
IppStatus ippiGammaInv_<mod>(const Ipp32f* pSrc, int srcStep, Ipp32f* pDst, int
dstStep, IppiSize roiSize, Ipp32f vMin, Ipp32f vMax);
Supported values for mod:32f_C3R
32f_AC4R

Case 4: Not-in-place operation on floating-point planar data
IppStatus ippiGammaInv_32f_P3R (const Ipp32f* pSrc[3], int srcStep, Ipp32f* pDst[3],int dstStep, IppiSize roiSize, Ipp32f vMin, Ipp32f vMax);

Case 5: In-place operation on integer pixel-order data
IppStatus ippiGammaInv_<mod>(Ipp<datatype>* pSrcDst, int srcDstStep, IppiSize roiSize);
Supported values for mod:8u_C3IR

16u_C3IR

8u_AC4IR

16u_AC4IR

Case 6: In-place operation on integer planar data
IppStatus ippiGammaInv_<mod>(Ipp<datatype>* pSrcDst[3], int srcDstStep, IppiSize
roiSize);
Supported values for mod:8u_IP3R

16u_IP3R

989

1Intel® Integrated Performance Primitives Developer Guide and Reference

Case 7: In-place operation on floating-point pixel-order data
IppStatus ippiGammaInv_<mod>(Ipp32f* pSrcDst, int srcDstStep, IppiSize roiSize, Ipp32f
vMin, Ipp32f vMax);
Supported values for mod:32f_C3IR
32f_AC4IR

Case 8: In-place operation on floating-point planar data
IppStatus ippiGammaInv_32f_IP3R (Ipp32f* pSrcDst[3], int srcDstStep, IppiSize roiSize,
Ipp32f vMin, Ipp32f vMax);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters

roiSize

Pointer to the ROI in the pixel-order source image. Array ofpointers to the ROI in each plane of the planar source image.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the ROI in the pixel-order destination image. Array ofpointers to the ROI in each plane of the planar destination
image.
Distance in bytes between starts of consecutive lines in thedestination image.
Pointer to the source and destination image ROI for the inplace operation.
Distance in bytes between starts of consecutive lines in thesource and destination image for the in-place operation.
Size of the source and destination ROI in pixels.

vMin, vMax

Minimum and maximum values of the input floating-point data.

pSrc
srcStep
pDst

dstStep
pSrcDstsrcDstStep

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts a gamma-correctedR'G'B' image back to the original RGB image. It uses thefollowing equations:for R',G',B' < 0.0812

R = R'/4.5
G = G'/4.5
B = B'/4.5
for R',G',B'≥ 0.0812

990

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Note that the channel intensity values are normalized to fit in the range of [0..1]. The gamma value is equal
to 1/0.45 = 2.22 in conformity with [ITU709] specification.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if pSrc, pDst, or pSrcDst is NULL.

ippStsSizeErr
ippStsGammaRangeErr

Indicates an error condition if roiSize has a field with a zero or
negative value.
Indicates an error condition if the input data bounds areincorrect, that is, vMax is less than or equal to vMin.

Intensity Transformation
The functions described in this section perform different types of intensity transformation including reductionof the intensity levels in each channel of the image, intensity transformation using lookup tables, andmapping high dynamic range image (HDRI) into low dynamic range image (LDRI).

991

1

Intel® Integrated Performance Primitives Developer Guide and Reference

ReduceBitsGetBufferSize
Computes the size of the work buffer for theippiReduceBits function.

SyntaxIppStatus ippiReduceBitsGetBufferSize(IppChannels ippChan, IppiSize roiSize, int noise,
IppiDitherType dtype, int* pBufferSize);

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
ippChanroiSizenoise
dtype
pBufferSize

Number of channels in the source images. Possible values:

ippC1, ippC3, or ippAC4.

Size, in pixels, of the source images.
Number specifying the amount of noise added (as a percentageof the range [0..100]).
Type of dithering to be used. For the list of supported types,
refer to the ippiReduceBits function description.
Pointer to the computed value of the buffer size, in bytes.

Description
The function computes the size of the work buffer, in bytes, for the ippiReduceBits function and stores theresult in the pBufferSize parameter.

Return Values

ippStsNullPtrErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error when any of the specified pointers is NULL.

ippStsSizeErr

Indicates an error when roiSize is less than, or equal to zero.

ippStsChannelErr

Indicates an error when ippChan has an illegal value.

ippStsNoErr

ippStsDataTypeErr
ippStsDataTypeErr

Indicates an error when noise is less than 0, or greater than
100.
Indicates an error when the specified dithering type is notsupported.

See Also
ReduceBits Reduces the bit resolution of an image.
ReduceBits
Reduces the bit resolution of an image.

992

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

SyntaxCase 1: Operation on data of the same source and destination bit depths
IppStatus ippiReduceBits_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>*pDst, int dstStep, IppiSize roiSize, int noise, IppiDitherType dtype, int levels,
Ipp8u* pBuffer);
Supported values for mod:8u_C1R

16u_C1R

16s_C1R

8u_C3R

16u_C3R

16s_C3R

8u_C4R

16u_C4R

16s_C4R

IppStatus ippiReduceBits_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>*pDst, int dstStep, IppiSize roiSize, int noise, IppiDitherType dtype, int levels,
Ipp8u* pBuffer);
Supported values for mod:8u_AC4R

16u_AC4R

16s_AC4R

Case 2: Operation on data of different source and destination bit depths
IppStatus ippiReduceBits_8u1u_C1R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int
dstStep, int dstBitOffset, IppiSize roiSize, int noise, int seed, IppiDitherType dtype,Ipp8u threshold, Ipp8u* pBuffer);
IppStatus ippiReduceBits_<mod>(const Ipp<srcDatatype>* pSrc, int srcStep,
Ipp<dstDatatype>* pDst, int dstStep, IppiSize roiSize, int noise, IppiDitherType dtype,
int levels, Ipp8u* pBuffer);
Supported values for mod:16u8u_C1R

16s8u_C1R

32f8u_C1R

32f16u_C1R

32f16s_C1R

16u8u_C3R

16s8u_C3R

32f8u_C3R

32f16u_C3R

32f16s_C3R

16u8u_C4R

16s8u_C4R

32f8u_C4R

32f16u_C4R

32f16s_C4R

IppStatus ippiReduceBits_<mod>(const Ipp<srcDatatype>* pSrc, int srcStep,
Ipp<dstDatatype>* pDst, int dstStep, IppiSize roiSize, int noise, IppiDitherType dtype,
int levels, Ipp8u* pBuffer);
Supported values for mod:16u8u_AC4R

16s8u_AC4R

32f8u_AC4R

32f16u_AC4R

32f16s_AC4R

Include Files
ippcc.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

993

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Parameters
pSrc

Pointer to the source image ROI.

srcStep

Distance in bytes between starts of consecutive lines in the source
image.

pDst

Pointer to the destination image ROI.

dstStep

Distance in bytes between starts of consecutive lines in the destination
image.

dstBitOffset

Offset (in bits) in the first byte of the destination image row.

roiSize

Size of the source and destination ROI in pixels.

noise

The number specifying the amount of noise added. This parameter is
set as a percentage of range [0..100].

seed

The seed value used by the pseudo-random number generation,
should be set to 0.

dtype

The type of dithering to be used. The following types are supported:

ippDitherNone

No dithering is done

ippDitherStucki

The Stucki's error diffusion dithering
algorithm is used

ippDitherFS

The Floid-Steinberg error diffusion dithering
algorithm is used

ippDitherJJN

The Jarvice-Judice-Ninke error diffusion
dithering algorithm is used

ippDitherBayer

The Bayer's threshold dithering algorithm isusedlevelsThe number of output levels for halftoning (dithering); can be variedin the range [2..(1<< depth)], where depth is the bit depth of thedestination image.

thresholdThreshold level for Stucki's dithering for the function
ippiReduceBits_8u1u_C1R.

pBuffer

Pointer to the buffer for internal calculations. To compute the size ofthe buffer, use the ReduceBitsGetBufferSize function.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function reduces the number of intensity levels in each channel of the source image pSrc and places theresults in respective channels of the destination image pDst. Note that for floating point source data type,
RGB values must be in the range [0..1].
The levels parameter sets the resultant number of intensity levels in each channel of the destination image.
If the noise value is greater than 0, some random noise is added to the threshold level used incomputations. The amplitude of the noise signal is specified by the noise parameter set as a percentage ofthe destination image luminance range. For the 4x4 ordered dithering mode, the threshold value isdetermined by the dither matrix used, whereas for the error diffusion dithering mode the input threshold is
set as half of the range value, where994Developer Guide and Reference for Intel® Integrated Performance Primitives

1range = ((1<< depth) - 1)/(levels - 1)
and depth is the bit depth of the source image.
For floating-point data type, range = 1.0/(levels - 1).
8u to 1u conversion. Source image is converted to a bitonal image. The function
ippiReduceBits_8u1u_C1R supports only one dithering algorithm - Stucki's error diffusion. The destination
image has a 8u data type, where each byte represents eight consecutive pixels of the bitonal image (1 bit
per pixel). In this case, additional parameter dstBitOffset is required to specify the start position of thedestination ROI buffer.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if pSrc or pDst is NULL.

ippStsSizeErr
ippStsNoiseValErr
ippStsDitherTypeErr
ippStsDitherLevelsErr
ippStsMemAllocErr

Indicates an error condition if roiSize has a field with a zero or
negative value.
Indicates an error condition if noise has an illegal value.
Indicates an error condition if the specified dithering type is notsupported.
Indicates an error condition if levels value is out of admissible
range.
Indicates an error condition if memory allocation fails.

See Also
ReduceBitsGetBufferSize Computes the size of the work buffer for the ippiReduceBits function.
LUT_GetSize
Computes the size of the LUT specification structure.

SyntaxIppStatus ippiLUT_GetSize(IppiInterpolationType interpolation, IppDataType dataType,
IppChannels channels, IppiSize roiSize, const int nLevels[], int* pSpecSize);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parametersinterpolation

Interpolation algorithm, possible values are:ippNearest

Nearest neighbor interpolation.

ippCubic

Cubic interpolation.

ippLinear

Linear interpolation.

995

1

Intel® Integrated Performance Primitives Developer Guide and Reference

dataType

Data type of the image. Possible values are ipp8u, ipp16u,

ipp16s, or ipp32f.

channels

Number of channels in the image. Possible values are: ippC1,
ippC3, ippC4, or ippAC4.

roiSizeSize, in pixels, of the destination ROI.

nLevels

Number of levels, separate for each channel.

pSpecSize

Pointer to the computed size, in bytes, of the specification
structure.

Description
This function computes the size of the specification structure for the ippiLUT function. The result is stored in
the pSpecSize parameter.
For an example on how to use this function, refer to the example provided with the ippiLUT function
description.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when any of the specified pointers is NULL.

ippStsChannelErr

Indicates an error when roiSize has a field with a value lessthan 1.
Indicates an error when channel has an illegal value.

ippStsDataTypeErr

Indicates an error when dataType has an illegal value.

ippStsInterpolationErr

Indicates an error when interpolation has an illegal value.

ippStsSizeErr

See Also
LUT MODIFIED API. Maps an image by applying intensity transformation.
LUT_Init
Initializes the LUT specification structure.

SyntaxIppStatus ippiLUT_Init_8u(IppiInterpolationType interpolation, IppChannels channels,
IppiSize roiSize, const Ipp32s* pValues[], const Ipp32s* pLevels[], int nLevels[],
IppiLUT_Spec* pSpec);
IppStatus ippiLUT_Init_16u(IppiInterpolationType interpolation, IppChannels channels,
IppiSize roiSize, const Ipp32s* pValues[], const Ipp32s* pLevels[], int nLevels[],
IppiLUT_Spec* pSpec);
IppStatus ippiLUT_Init_16s(IppiInterpolationType interpolation, IppChannels channels,
IppiSize roiSize, const Ipp32s* pValues[], const Ipp32s* pLevels[], int nLevels[],
IppiLUT_Spec* pSpec);
IppStatus ippiLUT_Init_32f(IppiInterpolationType interpolation, IppChannels channels,
IppiSize roiSize, const Ipp32f* pValues[], const Ipp32f* pLevels[], int nLevels[],
IppiLUT_Spec* pSpec);

Include Files
ippi.h996

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parametersinterpolation

Interpolation algorithm, possible values are:ippNearest

Nearest neighbor interpolation.

ippCubic

Cubic interpolation.

ippLinear

Linear interpolation.

channels

Number of channels in the image. Possible values are: ippC1,
ippC3, ippC4, or ippAC4.

roiSizeSize, in pixels, of the destination ROI.

nLevels

Pointer to the array with intensity values, separate for eachchannel.
Pointer to the array with level values, separate for eachchannel.
Number of levels, separate for each channel.

pSpec

Pointer to the LUT specification structure.

pValuespLevels

Description
This function initializes the specification structure for the ippiLUT function. To compute the size of thestructure, use the ippiLUT_GetSize function.
Length of the pLevels and pValues arrays is defined by the nLevels parameter. Number of level andintensity values are nLevels-1.
The interpolation parameter defines the mapping algorithm for the LUT function:••

ippNearest: Every source pixel pSrc(x,y) from the range [pLevels[k], pLevels[k+1]) is mapped
to the destination pixel pDst(x,y) which value is equal to pValues[k].
ippLinear: Every source pixel pSrc(x, y) from the range [pLevels[k], pLevels[k+1]) is mapped
to the destination pixel pDst(x, y) which value is computed according to the following formula:pDst(x, y)=pValues[k]+(pSrc(x, y)-pLevels[k])*(pValues[k+1]-pValues[k])/(pLevels[k+1]Levels[k])• ippCubic: Every source pixel pSrc(x,y) from the range [pLevels[k], pLevels[k+1]) is mapped tothe destination pixel pDst(x,y) which value is computed aspDst(x,y)= A*pSrc(x,y)3 + B*pSrc(x,y)2 + C*pSrc(x,y) + D.
The function operates on the assumption that the cubic polynomial curve passes through the following
four points:([pLevels[k-1], pLevels[k-1])([pLevels[k], pLevels[k])([pLevels[k+1], pLevels[k+1])([pLevels[k+2], pLevels[k+2])
Based on that, coefficients A, B, C, D are computed by solving the following set of linear equations:

997

1

Intel® Integrated Performance Primitives Developer Guide and Reference

A*pLevels[k-1]3 + B*pLevels[k-1]2 + C*pLevels[k-1] + D = pValues[k-1]A*pLevels[k]3 + B*pLevels[k]2 + C*pLevels[k] + D = pValues[k]A*pLevels[k+1]3 + B*pLevels[k+1]2 + C*pLevels[k+1] + D = pValues[k+1]A*pLevels[k+2]3 + B*pLevels[k+2]2 + C*pLevels[k+2] + D = pValues[k+2]Pixels in the pSrc image that are not in the range [pLevels[0], pLevels[nLevels-1]) are copied to the
pDst image without any transformation.
For an example on how to use this function, refer to the example provided with the ippiLUT function
description.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when any of the specified pointers is NULL.

ippStsChannelErr

Indicates an error when roiSize has a field with a value lessthan 1.
Indicates an error when channel has an illegal value.

ippStsLUTNofLevelsErr

Indicates an error when nLevels is less than 2.

ippStsInterpolationErr

Indicates an error when interpolation has an illegal value.

ippStsSizeErr

See Also
LUT MODIFIED API. Maps an image by applying intensity transformation.
LUT_GetSize Computes the size of the LUT specification structure.
LUT
MODIFIED API. Maps an image by applying intensity
transformation.

SyntaxCase 1: Not-in-place operation on one-channel integer data
IppStatus ippiLUT_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>* pDst,
int dstStep, IppiSize roiSize, IppiLUT_Spec* pSpec);
Supported values for mod:8u_C1R

16u_C1R

16s_C1R

Case 2: Not-in-place operation on multi-channel integer data
IppStatus ippiLUT_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>* pDst,
int dstStep, IppiSize roiSize, IppiLUT_Spec* pSpec);
Supported values for mod:8u_C3R

16u_C3R

16s_C3R

8u_AC4R

16u_AC4R

16s_AC4R

998

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

IppStatus ippiLUT_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>* pDst,
int dstStep, IppiSize roiSize, IppiLUT_Spec* pSpec);
Supported values for mod:8u_C4R

16u_C4R

16s_C4R

Case 3: Not-in-place operation on one-channel floating-point data
IppStatus ippiLUT_32f_C1R(const Ipp32f* pSrc, int srcStep, Ipp32f* pDst, int dstStep,
IppiSize roiSize, IppiLUT_Spec* pSpec);

Case 4: Not-in-place operation on multi-channel floating-point data
IppStatus ippiLUT_<mod>(const Ipp32f* pSrc, int srcStep, Ipp32f* pDst, int dstStep,
IppiSize roiSize, IppiLUT_Spec* pSpec);
Supported values for mod:32f_C3R
32f_AC4R
IppStatus ippiLUT_32f_C4R(const Ipp32f* pSrc, int srcStep, Ipp32f* pDst, int dstStep,
IppiSize roiSize, IppiLUT_Spec* pSpec);

Case 5: In-place operation on one-channel integer data
IppStatus ippiLUT_<mod>(Ipp<datatype>* pSrcDst, int srcDstStep, IppiSize roiSize,
IppiLUT_Spec* pSpec);
Supported values for mod:8u_C1IR

16u_C1IR

16s_C1IR

Case 6: In-place operation on multi-channel integer data
IppStatus ippiLUT_<mod>(Ipp<datatype>* pSrcDst, int srcDstStep, IppiSize roiSize,
IppiLUT_Spec* pSpec);
Supported values for mod:8u_C3IR

16u_C3IR

16s_C3IR

8u_AC4IR

16u_AC4IR

16s_AC4IR

IppStatus ippiLUT_<mod>(Ipp<datatype>* pSrcDst, int srcDstStep, IppiSize roiSize,
IppiLUT_Spec* pSpec);
Supported values for mod:8u_C4IR

16u_C4IR

16s_C4IR

Case 7: In-place operation on one-channel floating-point data
IppStatus ippiLUT_32f_C1IR(Ipp32f* pSrcDst, int srcDstStep, IppiSize roiSize,
IppiLUT_Spec* pSpec);

Case 8: In-place operation on multi-channel floating-point data
IppStatus ippiLUT_<mod>(Ipp32f* pSrcDst, int srcDstStep, IppiSize roiSize,
IppiLUT_Spec* pSpec);
Supported values for mod:32f_C3IR

999

1Intel® Integrated Performance Primitives Developer Guide and Reference

32f_AC4IR
IppStatus ippiLUT_32f_C4IR(Ipp32f* pSrcDst, int srcDstStep, IppiSize roiSize,
IppiLUT_Spec* pSpec);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
Pointer to the source image ROI.

pSrc
srcStep
pDst

Distance, in bytes, between the starting points of consecutive
lines in the source image.
Pointer to the destination image ROI.

roiSize

Distance, in bytes, between the starting points of consecutive
lines in the destination image.
Pointer to the source and destination mage ROI for the in-place
operation.
Distance, in bytes, between the starting points of consecutive
lines in the source and destination image for the in-place
operation.
Size of the source ROI, in pixels.

pSpec

Pointer to the LUT specification structure.

dstStep
pSrcDstsrcDstStep

Description
Important The API of this function has been modified in Intel IPP 9.0 release.

This function operates with ROI (see Regions of Interest in Intel IPP).
Before using this function, you need to compute the size of the specification structure using the LUT_GetSize
function and initialize the structure using LUT_Init.
This function performs intensity transformation of the source image pSrc using the lookup table (LUT)
specified by the arrays pLevels, pValues, and interpolation type specified in the LUT_Init function when
pSpec is initialized.
The figure below shows particular curves that are used in all the ippiLUT function flavors for mapping. The
level values are 0, 64, 128, 192, 256; the intensity values are 20, 60, 160, 180, 230.

1000

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsStepErr
ippStsBadArgErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error when any of the specified pointers is NULL.
Indicates an error when roiSize has a field with a value lessthan 1.
Indicates an error when srcStep, dstStep, or srcDstStep has azero or negative value.
Indicates an error when pSpec initialization is incorrect.

ExampleThe code example below demonstrates how to use LUT_GetSize, LUT_Init, and ippiLUT functions.

#include "ippcore.h"#include "ippi.h"#include <iostream>#include <iomanip>
void func_LUTLinear(){
IppStatus status;
Ipp32f pSrc[8 * 8];
int srcStep = 8 * sizeof(Ipp32f);
IppiSize roiSize = { 8, 8 };Ipp32f pDst[8 * 8];
int dstStep = 8 * sizeof(Ipp32f);
Ipp32f pLevels[5] = { 0.0, 0.128, 0.256, 0.512, 1.0 };const Ipp32f* ppLevels[1] = { pLevels };Ipp32f pValues[5] = { 0.2, 0.4, 0.6, 0.8, 1.0 };const Ipp32f* ppValues[1] = { pValues };int nLevels[1] = { 5 };int specSize;

1001

1

Intel® Integrated Performance Primitives Developer Guide and Reference

IppiLUT_Spec* pSpec;status = ippiImageJaehne_32f_C1R(pSrc, srcStep, roiSize);
std::cout << "pSrc:\n";for (int row = 0; row < roiSize.height; row++) {for (int col = 0; col < roiSize.width; col++) {std::cout << std::fixed << std::setprecision(2) <<pSrc[roiSize.width * row + col] <<"\t";}
std::cout << "\n";}ippiLUT_GetSize(ippLinear, ipp32f, ippC1, roiSize, nLevels, &specSize);
pSpec = (IppiLUT_Spec*)ippMalloc(specSize);
ippiLUT_Init_32f(ippLinear, ippC1, roiSize, ppValues, ppLevels, nLevels, pSpec);
status = ippiLUT_32f_C1R(pSrc, srcStep, pDst, dstStep, roiSize, pSpec);
std::cout << "pDst:\n";for (int row = 0; row < roiSize.height; row++) {for (int col = 0; col < roiSize.width; col++) {std::cout << pDst[roiSize.width * row + col] << "\t";}std::cout << "\n";}ippFree(pSpec);}
Result:pSrc:
0.00 0.26 0.65 0.82 0.82 0.65 0.26 0.00
0.26 0.82 1.00 0.98 0.98 1.00 0.82 0.26
0.65 1.00 0.89 0.74 0.74 0.89 1.00 0.65
0.82 0.98 0.74 0.55 0.55 0.74 0.98 0.82
0.82 0.98 0.74 0.55 0.55 0.74 0.98 0.82
0.65 1.00 0.89 0.74 0.74 0.89 1.00 0.65
0.26 0.82 1.00 0.98 0.98 1.00 0.82 0.26
0.00 0.26 0.65 0.82 0.82 0.65 0.26 0.00
pDst:
0.20 0.61 0.85 0.93 0.93 0.85 0.61 0.20
0.61 0.93 1.00 0.99 0.99 1.00 0.93 0.61
0.85 1.00 0.95 0.89 0.89 0.95 1.00 0.85
0.93 0.99 0.89 0.82 0.82 0.89 0.99 0.93
0.93 0.99 0.89 0.82 0.82 0.89 0.99 0.93
0.85 1.00 0.95 0.89 0.89 0.95 1.00 0.85
0.61 0.93 1.00 0.99 0.99 1.00 0.93 0.61
0.20 0.61 0.85 0.93 0.93 0.85 0.61 0.20

See Also
Regions of Interest in Intel IPP
LUT_GetSize Computes the size of the LUT specification structure.
LUT_Init Initializes the LUT specification structure.
1002

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

LUTPalette, LUTPaletteSwap
Maps an image by applying intensity transformation inaccordance with a palette table.

SyntaxCase 1: Operations on one-channel data
IppStatus ippiLUTPalette_<mod>(const Ipp<srcDatatype>* pSrc, int srcStep,
Ipp<dstDatatype>* pDst, int dstStep, IppiSize roiSize, const Ipp<dstDatatype>* pTable,
int nBitSize);
Supported values for mod:8u_C1R

16u_C1R

8u32u_C1R

16u8u_C1R
16u32u_C1R

IppStatus ippiLUTPalette_<mod>(const Ipp<srcDatatype>* pSrc, int srcStep, Ipp8u* pDst,
int dstStep, IppiSize roiSize, const Ipp8u* pTable, int nBitSize);
Supported values for mod:8u24u_C1R

16u24u_C1R

Case 2: Operations on multi-channel data
IppStatus ippiLUTPalette_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>*pDst, int dstStep, IppiSize roiSize, const Ipp<datatype>* const pTable[3], int
nBitSize);
Supported values for mod:8u_C3R

16u_C3R

8u_AC4R

16u_AC4R

IppStatus ippiLUTPalette_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>*pDst, int dstStep, IppiSize roiSize, const Ipp<datatype>* const pTable[4], int
nBitSize);
Supported values for mod:8u_C4R

16u_C4R

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source image ROI.

srcStep

Distance in bytes between starts of consecutive lines in thesource image.

1003

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Pointer to the destination image ROI.

pDst
dstStep
roiSizepTablenBitSize

Distance in bytes between starts of consecutive lines in thedestination image.
Size of the source ROI in pixels.
Pointer to the palette table, or an array of pointers to thepalette tables for each source channel.
Number of significant bits in the source image.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
The function ippiLUTPalette performs intensity transformation of the source image pSrc using the palette
lookup table pTable. This table is a vector with 2nBitSize elements that contain intensity values specified
by the user. The function uses nBitSize lower bits of intensity value of each source pixel as an index in the
pTable and assigns the correspondent intensity value from the table to the respective pixel in thedestination image pDst. The number of significant bits nBitSize should be in the range [1, 8] for functions
that operate on 8u source images, and [1, 16] for functions that operate on 16u source images.
Some function flavors that operate on the 3-channel source image additionally create a 4-th channel - alphachannel - in the destination image and place it at first position. The channel values of the alpha channel canbe set to the arbitrary constant value alhaValue. If this value is less than 0 or greater than the upperboundary of the data range, the channel values are not set.
The function flavor ippiLUTPaletteSwap reverses the order of channels in the destination image.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsOutOfRangeErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error when any of the specified pointers is NULL.
Indicates an error condition if roiSize has a field with a zero or
negative value.
Indicates an error if nBitSize is out of the range.

ExampleThe code example below shows how to use the function ippiLUTPalette_8u32u_C1R.

#include "ippcore.h"#include "ippi.h"#include <iostream>
void func_LUTPalette(){
IppStatus status;
Ipp8u pSrc[8 * 8];
int srcStep = 8 * sizeof(Ipp8u);
IppiSize roiSize = { 8, 8 };Ipp32u pDst[8 * 8];
int dstStep = 8 * sizeof(Ipp32f);
int nBitSize = 3;
Ipp32u pTable[8] = { 1, 2, 3, 4, 5, 6, 7, 8 };1004

Developer Guide and Reference for Intel® Integrated Performance Primitives

1status = ippiImageJaehne_8u_C1R(pSrc, srcStep, roiSize);
std::cout << "pSrc:\n";for (int row = 0; row < roiSize.height; row++) {for (int col = 0; col < roiSize.width; col++) {std::cout << (int)pSrc[roiSize.width * row + col] << "\t";}std::cout << "\n";}status = ippiLUTPalette_8u32u_C1R(pSrc, srcStep, pDst, dstStep, roiSize, pTable, nBitSize);
std::cout << "pDst:\n";for (int row = 0; row < roiSize.height; row++) {for (int col = 0; col < roiSize.width; col++) {std::cout << pDst[roiSize.width * row + col] << "\t";}std::cout << "\n";}}Result:pSrc:
1 68 165 209 209 165 68 1
68 209 255 250 250 255 209 68
165 255 227 188 188 227 255 165
209 250 188 141 141 188 250 209
209 250 188 141 141 188 250 209
165 255 227 188 188 227 255 165
68 209 255 250 250 255 209 68
1 68 165 209 209 165 68 1
pDst:
2 5 6 2 2 6 5 2
5 2 8 3 3 8 2 5
6 8 4 5 5 4 8 6
2 3 5 6 6 5 3 2
2 3 5 6 6 5 3 2
6 8 4 5 5 4 8 6
5 2 8 3 3 8 2 5
2 5 6 2 2 6 5 2

ToneMapLinear, ToneMapMean
Maps an HDRI image to the LDRI image.

SyntaxIppStatus ippiToneMapLinear_32f8u_C1R(const Ipp32f* pSrc, int srcStep, Ipp8u* pDst, int
dstStep, IppiSize roiSize);
IppStatus ippiToneMapMean_32f8u_C1R(const Ipp32f* pSrc, int srcStep, Ipp8u* pDst, int
dstStep, IppiSize roiSize);

Include Files
ippcc.h1005

1Intel® Integrated Performance Primitives Developer Guide and Reference

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc

Pointer to the ROI in the HDRI source image.

srcStep

Distance in bytes between starts of consecutive lines in the source
image.

pDst

Pointer to the ROI in the LDRI destination image.

dstStep

Distance in bytes between starts of consecutive lines in the destination
image.

roiSize

Size of the source and destination ROI in pixels.

Description
They both operate with ROI (see Regions of Interest in Intel IPP).
These functions convert the source high dynamic range image (HDRI) pSrc into low dynamic range image(LDRI) pDst. Pixel values of the source image must be positive.
The function ippiToneMapLinear implements the Linear Scale-Factor method converting each source pixel
pSrc[i] in accordance with the formula:pSrc[i] = pSrc[i]/Lmax, Lmax = max{pSrc[i]}.
The function ippiToneMapMean implements the Mean Value method converting each source pixel pSrc[i] inaccordance with the formula:pSrc[i] = 0.5*pSrc[i]/Lave, Lave = average{pSrc[i]}.
If the value of Lmax or Lave is less than 0, then the function does not perform the operation and returns thewarning message.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsNoOperation

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pSrc or pDst is NULL.
Indicates an error condition if roiSize has a field with a zero or
negative value.
Indicates a warning if the values of Lmax or Lave are less than
0.

Image Bit Conversion
Functions described in this section convert images from one bit format to another.

UnpackConverts 12-bit image to 16-bit image by padding
with 4 zero bits.

1006

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

SyntaxIppStatus ippiUnpack_12u16u_C1R(Ipp8u* pSrc, int srcStep, Ipp16u* pDst, int dstStep,
IppiSize roiSize);

Include Files
ippcc.hParameters
pSrc

Pointer to the source image ROI.

srcStep

Steps throught the source image.

pDst

Pointer to the destination image ROI.

dstStep

Steps throught the destination image.

roiSize

Size of the source and destination ROI in pixels.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts 12-bit image to 16-bit image by padding with 4 zero bits.
For 12-bit images, neighboring 2 pixels occupy 3 bytes and occupy memory space in the following order:

bits
7
0
Byte 0: P0[11]Byte 1: P0[ 3]Byte 2: P1[ 7]

6

5

4

3

2

1

P0[10]
P0[ 2]
P1[ 6]

P0[ 9]
P0[ 1]
P1[ 5]

P0[ 8]
P0[ 0]
P1[ 4]

P0[ 7]
P1[11]
P1[ 3]

P0[ 6]
P1[10]
P1[ 2]

P0[ 5]
P1[ 9]
P1[ 1]

P0[ 4]
P1[ 8]
P1[ 0]

If the width of the image is odd, the last pixel occupies 2 bytes.
Despite the fact that the pointer to a 12-bit image is of the Ipp8u* type, in fact, such an image occupies atleast roiSize.height*roiSize.width*(12/8) bytes, satisfying the condition srcStep >=roiSize.width*(12/8).

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if one of the pointers is NULL.

ippStsStepErr
ippStsSizeErr

Indicates an error condition if srcStep or dstStep is less thanor equal to zero.
Indicates an error condition if roiSize has a field with a zero or
negative value.

Pack
Converts 16-bit image to 12-bit image by discarding 4
upper bits (MSB).

SyntaxIppStatus ippiPack_16u12u_C1R(Ipp16u* pSrc, int srcStep, Ipp8u* pDst, int dstStep,
IppiSize roiSize);

1007

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Include Files
ippcc.hParameters
pSrc

Pointer to the source image ROI.

srcStep

Steps throught the source image.

pDst

Pointer to the destination image ROI.

dstStep

Steps throught the destination image.

roiSize

Size of the source and destination ROI in pixels.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts 16-bit image to 12-bit image by discarding 4 upper bits (MSB).
For 12-bit images, neighboring 2 pixels occupy 3 bytes and occupy memory space in the following order:

bits
7
0
Byte 0: P0[11]Byte 1: P0[ 3]Byte 2: P1[ 7]

6

5

4

3

2

1

P0[10]
P0[ 2]
P1[ 6]

P0[ 9]
P0[ 1]
P1[ 5]

P0[ 8]
P0[ 0]
P1[ 4]

P0[ 7]
P1[11]
P1[ 3]

P0[ 6]
P1[10]
P1[ 2]

P0[ 5]
P1[ 9]
P1[ 1]

P0[ 4]
P1[ 8]
P1[ 0]

If the width of the image is odd, the last pixel occupies 2 bytes.
Despite the fact that the pointer to a 12-bit image is of the Ipp8u* type, in fact, such an image occupies atleast roiSize.height*roiSize.width*(12/8) bytes, satisfying the condition srcStep >=roiSize.width*(12/8).

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if one of the pointers is NULL.

ippStsStepErr
ippStsSizeErr

Indicates an error condition if srcStep or dstStep is less thanor equal to zero.
Indicates an error condition if roiSize has a field with a zero or
negative value.

Threshold and Compare Operations
This chapter describes the Intel® IPP image processing functions that operate on a pixel-by-pixel basis:threshold and compare functions.

Thresholding
The threshold functions change pixel values depending on whether they are less or greater than the specified

threshold.

The type of comparison operation used to threshold pixel values is specified by the ippCmpOp parameter; thisoperation can be either “greater than” or “less than” (see Structures and Enumerators for more information).
For some thresholding functions the type of comparison operation is fixed.

1008

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

If an input pixel value satisfies the compare condition, the corresponding output pixel is set to the fixed valuethat is specific for a given threshold function flavor. Otherwise, it is either not changed, or set to anotherfixed value, which is defined in a particular function description.
For images with multi-channel data, the compare conditions should be set separately for each channel.

Threshold
Performs thresholding of pixel values in an image
buffer.

SyntaxCase 1: Not-in-place operation on one-channel data
IppStatus ippiThreshold_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>*pDst, int dstStep, IppiSize roiSize, Ipp<datatype> threshold, IppCmpOp ippCmpOp);
Supported values for mod:8u_C1R

16u_C1R

16s_C1R

32f_C1R

Case 2: Not-in-place operation on multi-channel data
IppStatus ippiThreshold_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>*pDst, int dstStep, IppiSize roiSize, const Ipp<datatype> threshold[3], IppCmpOp
ippCmpOp);
Supported values for mod:8u_C3R

16u_C3R

16s_C3R

32f_C3R

8u_AC4R

16u_AC4R

16s_AC4R

32f_AC4R

Case 3: In-place operation on one-channel data
IppStatus ippiThreshold_<mod>(Ipp<datatype>* pSrcDst, int srcDstStep, IppiSize roiSize,Ipp<datatype> threshold, IppCmpOp ippCmpOp);
Supported values for mod:8u_C1IR

16u_C1IR

16s_C1IR

32f_C1IR

Case 4: In-place operation on multi-channel data
IppStatus ippiThreshold_<mod>(Ipp<datatype>* pSrcDst, int srcDstStep, IppiSize roiSize,const Ipp<datatype> threshold[3], IppCmpOp ippCmpOp);
Supported values for mod:8u_C3IR

16u_C3IR

16s_C3IR

32f_C3IR

8u_AC4IR

16u_AC4IR

16s_AC4IR

32f_AC4IR

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h

1009

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc
srcStep
pDst
dstStep
pSrcDstsrcDstStep

roiSizethresholdippCmpOp

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the destination image ROI.
Distance in bytes between starts of consecutive lines in thedestination image.
Pointer to the source and destination image ROI (for the inplace operation).
Distance in bytes between starts of consecutive lines in thesource and destination image buffer (for the in-place
operation).
Size of the source and destination ROI in pixels.
The threshold level value to use for each pixel. In case ofmulti-channel data, an array of threshold values for each color
channel is used.
The operation specified for comparing pixel values and thethreshold. Comparison for either “less than” or “greater than”
can be used.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function thresholds pixels in the source image pSrc using the specified level threshold. Pixel values inthe source image are compared to the threshold value according to the type of comparison operation
specified in the ippCmpOp. The following values for ippCmpOp are possible:•

ippCmpLess specifies the “less than” comparison and defines the threshold value as a lower bound.
Comparison is performed by the following formula:•ippCmpGreater specifies the “greater than” comparison and defines the threshold value as an upperbound. Comparison is performed by the following formula:

If the result of comparison is true, the corresponding output pixel is set to the threshold value. Otherwise,
it is set to the source pixel value.

Return Values
ippStsNoErr

1010

Indicates no error. Any other value indicates an error or awarning.

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Indicates an error condition if one of the specified pointer is
NULL.

ippStsNullPtrErr
ippStsSizeErr
ippStsStepErr
ippStsNotSupportedModeErr

Indicates an error condition if roiSize has a field with zero or
negative value.
Indicates an error condition if srcStep, dstStep, or srcDstStep
has a zero or negative value
Indicates an error if the comparison mode is not supported.

ExampleThe code example below shows how to use the ippiThreshold_8u_C1R function.

void func_threshold(){
IppiSize ROI = {5,4};
Ipp8u src[9*4] = {1, 2, 4, 8, 16, 8, 4, 2, 1,
1, 2, 4, 8, 16, 8, 4, 2, 1,
1, 2, 4, 8, 16, 8, 4, 2, 1,
1, 2, 4, 8, 16, 8, 4, 2, 1};
Ipp8u dst[9*4];
Ipp8u threshold = 6;
ippiThreshold_8u_C1R(src, 9, dst, 9, ROI, threshold, ippCmpGreater);}
Result:

1
1
1
1

2
2
2
2

dst
4 6
4 6
4 6
4 6

6
6
6
6

8
8
8
8

4
4
4
4

2
2
2
2

1
1
1
1

Threshold_GT
Performs thresholding of pixel values in an image,using the comparison for “greater than”.

SyntaxCase 1: Not-in-place operation on one-channel data
IppStatus ippiThreshold_GT_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>*pDst, int dstStep, IppiSize roiSize, Ipp<datatype> threshold);
Supported values for mod:8u_C1R

16u_C1R

16s_C1R

32f_C1R

Case 2: Not-in-place operation on multi-channel data
IppStatus ippiThreshold_GT_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>*pDst, int dstStep, IppiSize roiSize, const Ipp<datatype> threshold[3]);Supported values for mod:8u_C3R

16u_C3R

16s_C3R

32f_C3R

8u_AC4R

16u_AC4R

16s_AC4R

32f_AC4R

1011

1Intel® Integrated Performance Primitives Developer Guide and Reference

Case 3: In-place operation on one-channel data
IppStatus ippiThreshold_GT_<mod>(Ipp<datatype>* pSrcDst, int srcDstStep, IppiSize
roiSize, Ipp<datatype> threshold);
Supported values for mod:8u_C1IR

16u_C1IR

16s_C1IR

32f_C1IR

Case 4: In-place operation on multi-channel data
IppStatus ippiThreshold_GT_<mod>(Ipp<datatype>* pSrcDst, int srcDstStep, IppiSize
roiSize, const Ipp<datatype> threshold[3]);Supported values for mod:8u_C3IR

16u_C3IR

16s_C3IR

32f_C3IR

8u_AC4IR

16u_AC4IR

16s_AC4IR

32f_AC4IR

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc
srcStep
pDst
dstStep
pSrcDstsrcDstStep

roiSizethreshold

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the destination image ROI.
Distance in bytes between starts of consecutive lines in thedestination image.
Pointer to the source and destination image ROI (for the inplace operation).
Distance in bytes between starts of consecutive lines in thesource and destination image buffer (for the in-place
operation).
Size of the source and destination ROI in pixels.
The threshold level value to use for each pixel. In case ofmulti-channel data, an array of threshold values for each color
channel is used.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function performs thresholding of pixels in the source image pSrc using the specified level threshold.
Pixel values in the source image are compared to the threshold value for “greater than”.
If the result of the compare is true, the corresponding output pixel is set to the threshold value. Otherwise,
it is set to the source pixel value.

1012

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Return Values
ippStsNoErr
ippStsNullPtrErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointer is
NULL.
Indicates an error condition if roiSize has a field with zero or
negative value.
Indicates an error condition if srcStep, dstStep, or srcDstStep
has a zero or negative value.

ippStsSizeErr
ippStsStepErr

Threshold_LT
Performs thresholding of pixel values in an image
buffer, using the comparison for “less than”.

SyntaxCase 1: Not-in-place operation on one-channel data
IppStatus ippiThreshold_LT_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>*pDst, int dstStep, IppiSize roiSize, Ipp<datatype> threshold);
Supported values for mod:8u_C1R

16u_C1R

16s_C1R

32f_C1R

Case 2: Not-in-place operation on multi-channel data
IppStatus ippiThreshold_LT_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>*pDst, int dstStep, IppiSize roiSize, const Ipp<datatype> threshold[3]);Supported values for mod:8u_C3R

16u_C3R

16s_C3R

32f_C3R

8u_AC4R

16u_AC4R

16s_AC4R

32f_AC4R

Case 3: In-place operation on one-channel data
IppStatus ippiThreshold_LT_<mod>(Ipp<datatype>* pSrcDst, int srcDstStep, IppiSize
roiSize, Ipp<datatype> threshold);
Supported values for mod:8u_C1IR

16u_C1IR

16s_C1IR

32f_C1IR

Case 4: In-place operation on multi-channel data
IppStatus ippiThreshold_LT_<mod>(Ipp<datatype>* pSrcDst, int srcDstStep, IppiSize
roiSize, const Ipp<datatype> threshold[3]);Supported values for mod:8u_C3IR

16u_C3IR

16s_C3IR

32f_C3IR

8u_AC4IR

16u_AC4IR

16s_AC4IR

32f_AC4IR

1013

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc
srcStep
pDst
dstStep
pSrcDstsrcDstStep

roiSizethreshold

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the destination image ROI.
Distance in bytes between starts of consecutive lines in thedestination image.
Pointer to the source and destination image ROI (for the inplace operation).
Distance in bytes between starts of consecutive lines in thesource and destination image buffer (for the in-place
operation).
Size of the source and destination ROI in pixels.
The threshold level value to use for each pixel. In case ofmulti-channel data, an array of threshold values for each color
channel is used.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function performs thresholding of pixels in the source image pSrc using the specified level threshold.
Pixel values in the source image are compared to the threshold value for “less than”. If the result of thecompare is true, the corresponding output pixel is set to the threshold value. Otherwise, it is set to thesource pixel value.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsStepErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointer is
NULL.
Indicates an error condition if roiSize has a field with zero or
negative value.
Indicates an error condition if srcStep, dstStep, or srcDstStep
has a zero or negative value.

Threshold_Val
Performs thresholding of pixel values in an image
buffer. Pixels that satisfy the compare condition are
set to a specified value.

1014

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

SyntaxCase 1: Not-in-place operation on one-channel data
IppStatus ippiThreshold_Val_<mod>(const Ipp<datatype>* pSrc, int srcStep,
Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, Ipp<datatype> threshold,Ipp<datatype> value, IppCmpOp ippCmpOp);
Supported values for mod:8u_C1R

16u_C1R

16s_C1R

32f_C1R

Case 2: Not-in-place operation on multi-channel data
IppStatus ippiThreshold_Val_<mod>(const Ipp<datatype>* pSrc, int srcStep,
Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, const Ipp<datatype> threshold[3],const Ipp<datatype> value[3], IppCmpOp ippCmpOp);
Supported values for mod:8u_C3R

16u_C3R

16s_C3R

32f_C3R

8u_AC4R

16u_AC4R

16s_AC4R

32f_AC4R

Case 3: In-place operation on one-channel data
IppStatus ippiThreshold_Val_<mod>(Ipp<datatype>* pSrcDst, int srcDstStep, IppiSize
roiSize, Ipp<datatype> threshold, Ipp<datatype> value, IppCmpOp ippCmpOp);
Supported values for mod:8u_C1IR

16u_C1IR

16s_C1IR

32f_C1IR

Case 4: In-place operation on multi-channel data
IppStatus ippiThreshold_Val_<mod>(Ipp<datatype>* pSrcDst, int srcDstStep, IppiSize
roiSize, const Ipp<datatype> threshold[3], const Ipp<datatype> value[3], IppCmpOp
ippCmpOp);
Supported values for mod:8u_C3IR

16u_C3IR

16s_C3IR

32f_C3IR

8u_AC4IR

16u_AC4IR

16s_AC4IR

32f_AC4IR

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source image ROI.

1015

1

Intel® Integrated Performance Primitives Developer Guide and Reference

srcStep
pDst
dstStep
pSrcDstsrcDstStep

roiSizethresholdvalue

ippCmpOp

Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the destination image ROI.
Distance in bytes between starts of consecutive lines in thedestination image.
Pointer to the source and destination image ROI (for the inplace operation).
Distance in bytes between starts of consecutive lines in thesource and destination image buffer (for the in-place
operation).
Size of the source and destination ROI in pixels.
The threshold value to use for each pixel.In case of multichannel data, an array of 3 threshold values (one for each color
channel) is used.
The output value to be set for each pixel that satisfies thecompare condition. In case of multi-channel data, an array of 3
output values (one for each color channel) is used.
The operation to use for comparing pixel values and thethreshold. Comparison for either “less than” or “greater than”
can be used.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function thresholds pixels in the source image pSrc using the specified level threshold. Pixel values inthe source image are compared to the threshold value using the ippCmpOp comparison operation. If theresult of the compare is true, the corresponding output pixel is set to the specified value. Otherwise, it is set
to the source pixel value.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsStepErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointer is
NULL.
Indicates an error condition if roiSize has a field with zero or
negative value.
Indicates an error condition if srcStep, dstStep, or srcDstStep
has a zero or negative value.

Threshold_GTVal
Performs thresholding of pixel values in an image.
Pixels that are greater than threshold, are set to a
specified value.

1016

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

SyntaxCase 1: Not-in-place operation on one-channel data
IppStatus ippiThreshold_GTVal_<mod>(const Ipp<datatype>* pSrc, int srcStep,
Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, Ipp<datatype> threshold,Ipp<datatype> value);
Supported values for mod:8u_C1R

16u_C1R

16s_C1R

32f_C1R

Case 2: Not-in-place operation on multi-channel data
IppStatus ippiThreshold_GTVal_<mod>(const Ipp<datatype>* pSrc, int srcStep,
Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, const Ipp<datatype> threshold[3],const Ipp<datatype> value[3]);Supported values for mod:8u_C3R

16u_C3R

16s_C3R

32f_C3R

8u_AC4R

16u_AC4R

16s_AC4R

32f_AC4R

IppStatus ippiThreshold_GTVal_<mod>(const Ipp<datatype>* pSrc, int srcStep,
Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, const Ipp<datatype> threshold[4],const Ipp<datatype> value[4]);Supported values for mod:8u_C4R

16u_C4R

16s_C4R

32f_C4R

Case 3: In-place operation on one-channel data
IppStatus ippiThreshold_GTVal_<mod>(Ipp<datatype>* pSrcDst, int srcDstStep, IppiSize
roiSize, Ipp<datatype> threshold, Ipp<datatype> value);
Supported values for mod:8u_C1IR

16u_C1IR

16s_C1IR

32f_C1IR

Case 4: In-place operation on multi-channel data
IppStatus ippiThreshold_GTVal_<mod>(Ipp<datatype>* pSrcDst, int srcDstStep, IppiSize
roiSize, const Ipp<datatype> threshold[3], const Ipp<datatype> value[3]);Supported values for mod:8u_C3IR

16u_C3IR

16s_C3IR

32f_C3IR

8u_AC4IR

16u_AC4IR

16s_AC4IR

32f_AC4IR

IppStatus ippiThreshold_GTVal_<mod>(Ipp<datatype>* pSrcDst, int srcDstStep, IppiSize
roiSize, const Ipp<datatype> threshold[4], const Ipp<datatype> value[4]);Supported values for mod:8u_C4IR

16u_C4IR

16s_C4IR

32f_C4IR

1017

1Intel® Integrated Performance Primitives Developer Guide and Reference

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc
srcStep
pDst
dstStep
pSrcDstsrcDstStep

roiSizethresholdvalue

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the destination image ROI.
Distance in bytes between starts of consecutive lines in thedestination image.
Pointer to the source and destination image ROI (for the inplace operation).
Distance in bytes between starts of consecutive lines in thesource and destination image buffer (for the in-place
operation).
Size of the source and destination ROI in pixels.
The threshold value to use for each pixel.In case of multichannel data, an array of threshold values (one for eachchannel) is used.
The output value to be set for each pixel that satisfies thecompare condition. In case of multi-channel data, an array of
output values (one for each channel) is used.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function thresholds pixels in the source image pSrc using the specified level threshold. Pixel values inthe source image are compared to the threshold value for “greater than”.
If the result of the compare is true, the corresponding output pixel is set to the specified value. Otherwise, it
is set to the source pixel value.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsStepErr

1018

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointer is
NULL.
Indicates an error condition if roiSize has a field with zero or
negative value.
Indicates an error condition if srcStep, dstStep, or srcDstStep
has a zero or negative value.

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Threshold_LTVal
Performs thresholding of pixel values in an image.
Pixels that are less than threshold, are set to a
specified value.

SyntaxCase 1: Not-in-place operation on one-channel data
IppStatus ippiThreshold_LTVal_<mod>(const Ipp<datatype>* pSrc, int srcStep,
Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, Ipp<datatype> threshold,Ipp<datatype> value);
Supported values for mod:8u_C1R

16u_C1R

16s_C1R

32f_C1R

Case 2: Not-in-place operation on multi-channel data
IppStatus ippiThreshold_LTVal_<mod>(const Ipp<datatype>* pSrc, int srcStep,
Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, const Ipp<datatype> threshold[3],const Ipp<datatype> value[3]);Supported values for mod:8u_C3R

16u_C3R

16s_C3R

32f_C3R

8u_AC4R

16u_AC4R

16s_AC4R

32f_AC4R

IppStatus ippiThreshold_LTVal_<mod>(const Ipp<datatype>* pSrc, int srcStep,
Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, const Ipp<datatype> threshold[4],const Ipp<datatype> value[4]);Supported values for mod:8u_C4R

16u_C4R

16s_C4R

32f_C4R

Case 3: In-place operation on one-channel data
IppStatus ippiThreshold_LTVal_<mod>(Ipp<datatype>* pSrcDst, int srcDstStep, IppiSize
roiSize, Ipp<datatype> threshold, Ipp<datatype> value);
Supported values for mod:8u_C1IR

16u_C1IR

16s_C1IR

32f_C1IR

Case 4: In-place operation on multi-channel data
IppStatus ippiThreshold_LTVal_<mod>(Ipp<datatype>* pSrcDst, int srcDstStep, IppiSize
roiSize, const Ipp<datatype> threshold[3], const Ipp<datatype> value[3]);Supported values for mod:8u_C3IR

16u_C3IR

16s_C3IR

32f_C3IR

8u_AC4IR

16u_AC4IR

16s_AC4IR

32f_AC4IR

1019

1

Intel® Integrated Performance Primitives Developer Guide and Reference

IppStatus ippiThreshold_LTVal_<mod>(Ipp<datatype>* pSrcDst, int srcDstStep, IppiSize
roiSize, const Ipp<datatype> threshold[4], const Ipp<datatype> value[4]);Supported values for mod:8u_C4IR

16u_C4IR

16s_C4IR

32f_C4IR

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc
srcStep
pDst
dstStep
pSrcDstsrcDstStep

roiSizethresholdvalue

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the destination image ROI.
Distance in bytes between starts of consecutive lines in thedestination image.
Pointer to the source and destination image ROI (for the inplace operation).
Distance in bytes between starts of consecutive lines in thesource and destination image buffer (for the in-place
operation).
Size of the source and destination ROI in pixels.
The threshold value to use for each pixel.In case of multichannel data, an array of threshold values (one for eachchannel) is used.
The output value to be set for each pixel that satisfies thecompare condition. In case of multi-channel data, an array of
output values (one for each channel) is used.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function thresholds pixels in the source image pSrc using the specified level threshold. Pixel values inthe source image are compared to the threshold value for “less than”. If the result of the compare is true,
the corresponding output pixel is set to the specified value. Otherwise, it is set to the source pixel value.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

1020

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointer is
NULL.
Indicates an error condition if roiSize has a field with zero or
negative value.

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Indicates an error condition if srcStep, dstStep, or srcDstStep
has a zero or negative value.

ippStsStepErr

Threshold_LTValGTVal
Performs double thresholding of pixel values in animage buffer.

SyntaxCase 1: Not-in-place operation on one-channel data
IppStatus ippiThreshold_LTValGTVal_<mod>(const Ipp<datatype>* pSrc, int srcStep,
Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, Ipp<datatype> thresholdLT,
Ipp<datatype> valueLT, Ipp<datatype> thresholdGT, Ipp<datatype> valueGT);Supported values for mod:8u_C1R

16u_C1R

16s_C1R

32f_C1R

Case 2: Not-in-place operation on multi-channel data
IppStatus ippiThreshold_LTValGTVal_<mod>(const Ipp<datatype>* pSrc, int srcStep,
Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, const Ipp<datatype> thresholdLT[3],const Ipp<datatype> valueLT[3], const Ipp<datatype> thresholdGT[3], const Ipp<datatype>valueGT[3]);Supported values for mod:8u_C3R

16u_C3R

16s_C3R

32f_C3R

8u_AC4R

16u_AC4R

16s_AC4R

32f_AC4R

Case 3: In-place operation on one-channel data
IppStatus ippiThreshold_LTValGTVal_<mod>(Ipp<datatype>* pSrcDst, int srcDstStep,
IppiSize roiSize, Ipp<datatype> thresholdLT, Ipp<datatype> valueLT, Ipp<datatype>thresholdGT, Ipp<datatype> valueGT);Supported values for mod:8u_C1IR

16u_C1IR

16s_C1IR

32f_C1IR

Case 4: In-place operation on multi-channel data
IppStatus ippiThreshold_LTValGTVal_<mod>(Ipp<datatype>* pSrcDst, int srcDstStep,
IppiSize roiSize, const Ipp<datatype> thresholdLT[3], const Ipp<datatype> valueLT[3],const Ipp<datatype> thresholdGT[3], const Ipp<datatype> valueGT[3]);Supported values for mod

8u_C3IR

16u_C3IR

16s_C3IR

32f_C3IR

8u_AC4IR

16u_AC4IR

16s_AC4IR

32f_AC4IR

Include Files
ippi.h1021

1Intel® Integrated Performance Primitives Developer Guide and Reference

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc
srcStep
pDst
dstStep
pSrcDstsrcDstStep

roiSizethresholdLT

valueLTthresholdGT

valueGT

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the destination image ROI.
Distance in bytes between starts of consecutive lines in thedestination image.
Pointer to the source and destination image ROI (for the inplace operation).
Distance in bytes between starts of consecutive lines in thesource and destination image buffer (for the in-place
operation).
Size of the source and destination ROI in pixels.
The lower threshold value to use for each pixel.In case ofmulti-channel data, an array of three lower threshold values(one for each color channel) is used.
The lower output value to be set for each pixel that is less thanthresholdLT. In case of multi-channel data, an array of 3 lower
output values (one for each color channel) is used.
The upper threshold value to use for each pixel.In case ofmulti-channel data, an array of three upper threshold values(one for each color channel) is used.
The upper output value to be set for each pixel that exceeds
thresholdGT. In case of multi-channel data, an array of three
upper output values (one for each color channel) is used.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function thresholds pixels in the source image pSrc using two specified levels thresholdLT and
thresholdGT. Pixel values in the source image are compared to these levels. If the pixel value is less thanthresholdLT, the corresponding output pixel is set to valueLT. If the pixel value is greater thanthresholdGT, the output pixel is set to valueGT. Otherwise, it is set to the source pixel value. The value ofthresholdLT should be less than or equal to thresholdGT.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsThresholdErr

1022

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointer is
NULL.
Indicates an error condition if roiSize has a field with zero or
negative value.
Indicates an error when thresholdLT is greater thanthresholdGT.

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

ippStsStepErr

Indicates an error condition if srcStep, dstStep, or srcDstStep
has a zero or negative value.

ExampleThe code example below illustrates thresholding with two levels.

IppStatus threshold( void ) {Ipp8u x[5*4];
IppiSize roi = {5,4};
int i;
for( i=0; i<5*4; ++i ) x[i] = (Ipp8u)i;
return ippiThreshold_LTValGTVal_8u_C1IR( x, 5, roi, 2,1,6,7 );}The destination image x contains:

01 01 02 03 04
05 06 07 07 07
07 07 07 07 07
07 07 07 07 07

ComputeThreshold_Otsu
Computes the value of the Otsu threshold.

SyntaxIppStatus ippiComputeThreshold_Otsu_8u_C1R(const Ipp8u* pSrc, int srcStep, IppiSize
roiSize, Ipp8u* pThreshold);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source image ROI.

roiSize

Distance in bytes between starts of consecutive lines in thesource image.
Size of the image ROI in pixels.

pThreshold

Pointer to the Otsu threshold value.

srcStep

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function calculates the Otsu threshold ([Otsu79]) for the source image pSrc in accordance with thefollowing formula:

1023

1

Intel® Integrated Performance Primitives Developer Guide and Reference

where 0 ≤x < roiSize.width, 0 ≤y < roiSize.height, and T is the Otsu threshold.

where

The computed Otsu threshold can be used in the thresholding functions described above.

1024

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

For example, the following figures shows how the Otsu threshold can be used for background/foregroundselection. The figure a) below shows the initial image, the figure b) shows the histogram of the initial image
with the red line indicating the computed Otsu threshold. The figure c) demonstrates the resulting image
obtained by applying the function ippiThreshold_8u_C1R with a computed Otsu threshold value to thesource image.
Using Otsu Threshold for Background/Foreground Selection

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if one of the specified pointer is
NULL.

ippStsSizeErr
ippStsStepErr

Indicates an error condition if roiSize has a field with zero or
negative value.
Indicates an error condition if srcStep is less than or equal to0.

Compare Operations
This section describes functions that compare images. Each compare function writes its results to a onechannel Ipp8u output image. The output pixel is set to a non-zero value if the corresponding input pixel(s)satisfy the compare condition; otherwise, the output pixel is set to 0. You can compare either two images, oran image and a constant value, using the following compare conditions: “greater”, “greater or equal”, “less”,

1025

1

Intel® Integrated Performance Primitives Developer Guide and Reference“less or equal”, “equal”. Compare condition is specified as a function argument of IppCmpOp type (seeStructures and Enumerators for more information). Images containing floating-point data can also becompared for being equal within a given tolerance eps.
For images with multi-channel data, the compare condition for a given pixel is true only when each color
channel value of that pixel satisfies this condition.

CompareCompares pixel values of two images using a specified
compare operation.

SyntaxIppStatus ippiCompare_<mod>(const Ipp<datatype>* pSrc1, int src1Step, const
Ipp<datatype>* pSrc2, int src2Step, Ipp8u* pDst, int dstStep, IppiSize roiSize,
IppCmpOp ippCmpOp);
Supported values for mod:8u_C1R

16u_C1R

16s_C1R

32f_C1R

8u_C3R

16u_C3R

16s_C3R

32f_C3R

8u_C4R

16u_C4R

16s_C4R

32f_C4R

IppStatus ippiCompare_<mod>(const Ipp<datatype>* pSrc1, int src1Step, const
Ipp<datatype>* pSrc2, int src2Step, Ipp8u* pDst, int dstStep, IppiSize roiSize,
IppCmpOp ippCmpOp);
Supported values for mod:8u_AC4R

16u_AC4R

16s_AC4R

32f_AC4R

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc1, pSrc2

Pointers to the source image ROIs.

src1Step, src2Step

Distances in bytes between starts of consecutive lines in thesource images.
Pointer to the destination image ROI.

pDst

roiSize

Distance in bytes between starts of consecutive lines in thedestination image.
Size of the source and destination ROI in pixels.

ippCmpOp

Compare operation to be used for comparing the pixel values.

dstStep

Description
This function operates with ROI (see Regions of Interest in Intel IPP).

1026

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

This function compares the corresponding pixels of ROI in two source images pSrc1, pSrc2 using theippCmpOp compare operation, and writes the results to a one-channel Ipp8u image pDst. If the result of thecompare is true, the corresponding output pixel is set to an IPP_MAX_8U value; otherwise, it is set to 0.

Return Values
ippStsNoErr
ippStsNullPtrErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointer is
NULL.
Indicates an error condition if roiSize has a field with zero or
negative value.
Indicates an error condition if src1Step, src2Step, or dstStep
has a zero or negative value.

ippStsSizeErr
ippStsStepErr

CompareC
Compares pixel values of a source image to a given
value using a specified compare operation.

SyntaxCase 1: Operation on one-channel data
IppStatus ippiCompareC_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>value, Ipp8u* pDst, int dstStep, IppiSize roiSize, IppCmpOp ippCmpOp);
Supported values for mod:8u_C1R

16u_C1R

16s_C1R

32f_C1R

Case 2: Operation on multi-channel data
IppStatus ippiCompareC_<mod>(const Ipp<datatype>* pSrc, int srcStep, const
Ipp<datatype> value[3], Ipp8u* pDst, int dstStep, IppiSize roiSize, IppCmpOp ippCmpOp);
Supported values for mod:8u_C3R

16u_C3R

16s_C3R

32f_C3R

IppStatus ippiCompareC_<mod>(const Ipp<datatype>* pSrc, int srcStep, const
Ipp<datatype> value[4], Ipp8u* pDst, int dstStep, IppiSize roiSize, IppCmpOp ippCmpOp);
Supported values for mod:8u_C4R

16u_C4R

16s_C4R

32f_C4R

IppStatus ippiCompareC_<mod>(const Ipp<datatype>* pSrc, int srcStep, const
Ipp<datatype> value[3], Ipp8u* pDst, int dstStep, IppiSize roiSize, IppCmpOp ippCmpOp);
Supported values for mod:8u_AC4R

16u_AC4R

16s_AC4R

32f_AC4R

Include Files
ippi.h1027

1Intel® Integrated Performance Primitives Developer Guide and Reference

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc
srcStep
value
pDst

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
The value to compare each pixel to. In case of multi-channel
data, an array of separate values (one for each channel).
Pointer to the destination image ROI.

dstStep

Distance in bytes between starts of consecutive lines in thedestination image.

roiSize

Size of the source and destination ROI in pixels.

ippCmpOp

Compare operation to be used for comparing the pixel values.

Description
This function operates with ROI (Regions of Interest in Intel IPP).
This function compares pixels of the each channel of the source image ROI pSrc to a given value specified
for each channel using the ippCmpOp compare operation, and writes the results to a one-channel Ipp8u
image pDst. If the result of the compare is true, that is, all pixels of all channels meet the specified
condition, then the corresponding output pixel is set to an IPP_MAX_8U value; otherwise, it is set to 0.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsStepErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointer is
NULL.
Indicates an error condition if roiSize has a field with zero or
negative value.
Indicates an error condition if srcStep or dstStep has a zero or
negative value.

ExampleThe code example below shows how to use the comparison function and create a mask image:

IppStatus compare ( void ) {Ipp8u x[5*4], y[5*4];
IppiSize roi = {5,4};
int i;
for( i=0; i<5*4; ++i ) x[i] = (Ipp8u)i;
return ippiCompareC_8u_C1R ( x, 5, 7, y, 5, roi, ippCmpGreater );}1028

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

The mask image y contains:

00 00 00 00 00
00 00 00 FF FF
FF FF FF FF FF
FF FF FF FF FF

CompareEqualEps
Compares two images with floating-point data, testingwhether pixel values are equal within a certain
tolerance eps.

SyntaxIppStatus ippiCompareEqualEps_<mod>(const Ipp32f* pSrc1, int src1Step, const Ipp32f*
pSrc2, int src2Step, Ipp8u* pDst, int dstStep, IppiSize roiSize, Ipp32f eps);
Supported values for mod:32f_C1R
32f_C3R
32f_C4R
IppStatus ippiCompareEqualEps_32f_AC4R(const Ipp32f* pSrc1, int src1Step, const Ipp32f*
pSrc2, int src2Step, Ipp8u* pDst, int dstStep, IppiSize roiSize, Ipp32f eps);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc1, pSrc2

Pointers to the source image ROIs.

src1Step, src2Step

Distances in bytes between starts of consecutive lines in thesource images.
Pointer to the destination image ROI.

pDst

roiSize

Distance in bytes between starts of consecutive lines in thedestination image.
Size of the source and destination ROI in pixels.

eps

The tolerance value.

dstStep

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function tests if the corresponding pixels of ROI in two source images pSrc1, pSrc2 are equal within thetolerance eps, and writes the results to a one-channel Ipp8u image pDst. If the absolute value of differenceof the pixel values in pSrc1 and pSrc2 is less than or equal to eps, then the corresponding pixel in pDst is

1029

1

Intel® Integrated Performance Primitives Developer Guide and Reference

set to an IPP_MAX_8U value; otherwise the pixel in pDst is set to 0. For multi-channel images, thedifferences for all color channel values of a pixel must be within the eps tolerance for the compare condition
to be true.
This function processes images with floating-point data only.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsStepErr
ippStsEpsValErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointer is
NULL.
Indicates an error condition if roiSize has a field with zero or
negative value.
Indicates an error condition if src1Step, src2Step, or dstStep
has a zero or negative value.
Indicates an error condition if eps has a negative value.

CompareEqualEpsC
Tests whether floating-point pixel values of an image
are equal to a given value within a certain tolerance
eps.

SyntaxCase 1: Operation on one-channel data
IppStatus ippiCompareEqualEpsC_32f_C1R(const Ipp32f* pSrc, int srcStep, Ipp32f value,
Ipp8u* pDst, int dstStep, IppiSize roiSize, Ipp32f eps);

Case 2: Operation on multi-channel data
IppStatus ippiCompareEqualEpsC_32f_C3R(const Ipp32f* pSrc, int srcStep, const Ipp32f
value[3], Ipp8u* pDst, int dstStep, IppiSize roiSize, Ipp32f eps);
IppStatus ippiCompareEqualEpsC_32f_C4R(const Ipp32f* pSrc, int srcStep, const Ipp32f
value[4], Ipp8u* pDst, int dstStep, IppiSize roiSize, Ipp32f eps);
IppStatus ippiCompareEqualEpsC_32f_AC4R(const Ipp32f* pSrc, int srcStep, const Ipp32f
value[3], Ipp8u* pDst, int dstStep, IppiSize roiSize, Ipp32f eps);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc
srcStep
value

1030

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
The value to compare each pixel to. In case of multi-channel
data, an array of separate values (one for each channel).

Developer Guide and Reference for Intel® Integrated Performance Primitives

pDst

1

Pointer to the destination image ROI.

roiSize

Distance in bytes between starts of consecutive lines in thedestination image.
Size of the source and destination ROI in pixels.

eps

The tolerance value.

dstStep

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function tests if pixel values of the source image ROI pSrc are equal to a given constant value within
the tolerance eps, and writes the results to a one-channel Ipp8u image pDst. If the absolute value ofdifference between the pixel value in pSrc and value is less than or equal to eps, then the corresponding
pixel in pDst is set to an IPP_MAX_8U value; otherwise the pixel in pDst is set to 0. For multi-channel
images, the differences between all color channel values of a pixel and the respective components of value
must be within the tolerance eps for the compare condition to be true.
This function processes images with floating-point data only.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsStepErr
ippStsEpsValErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointer is
NULL.
Indicates an error condition if roiSize has a field with a zero or
negative value.
Indicates an error condition if srcStep or dstStep has a zero or
negative value.
Indicates an error condition if eps has a negative value.

Morphological Operations
This chapter describes the Intel® IPP image processing functions that perform morphological operations on
images.
Generally, the erosion and dilation smooth the boundaries of objects without significantly changing theirarea. Opening and closing smooth thin projections or gaps. Morphological operations use a structuring
element (SE) that is a a user-defined rectangular mask, or for some functions - symmetric 3x3 mask.
In a more general sense, morphological operations involve an image A called the object of interest and akernel element B called the structuring element. The image and structuring element could be in any numberof dimensions, but the most common use is with a 2D binary image, or with a 3D gray scale image. The

1031

1

Intel® Integrated Performance Primitives Developer Guide and Reference

element B is most often a square or a circle, but it could be of any shape. Just like in convolution, B is akernel or template with an anchor point. Figure "Dilation and Erosion of A by B" shows dilation and erosion of
object A by B. In the figure, B is rectangular with an anchor point at upper left shown as a dark square.
Dilation and Erosion of A by B

Let Bt is the SE with pixel t in the anchor position, B is transpose of the SE.
Dilation of binary image A {A(t) = 1, t∈A; 0 - otherwise} by binary SE B is

It means that every pixel is in the set, if the intersection is not null. That is, a pixel under the anchor point of
B is marked “on”, if at least one pixel of B is inside of A.
Erosion of the binary image A by the binary SE B is

That is, a pixel under the anchor of B is marked “on”, if B is entirely within A.
Generalization of dilation and erosion for the gray-scale image A and the binary SE B is

Generalization of dilation and erosion for the gray-scale image A and the gray-scale SE B is1032

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Opening operation of A by B is A∘B = (AΘB) ⊕B.
Closing operation of A by B is A•B = ( A⊕B) ΘB.
Top-hat operation of A by B is A - AºB.
Black-hat operation of A by B is A•B - A.
Black-hat operation of A by B is A⊕B - AΘB.
Morphological reconstruction [Vincent93]ρA(C) of an image A from the image C, A(t) ≥C(t) ∀t by dilation withthe mask B is an image

Morphological reconstruction ρA(C) of an image A from the image C, A(t) ≤C(t) ∀t by erosion with the mask B
is an image

Figure "Morphological Operations Performed by Intel IPP" presents the results of different morphologicaloperations applied to the initial image. In these operations, the SE is a matrix of 3x3 size with the following
values:for common and advanced morphology, and

1033

1

Intel® Integrated Performance Primitives Developer Guide and Reference

for gray morphology.

1034

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

The anchor cell is in the center cell (1,1) of the matrix.
Morphological Operations Performed by Intel IPP

Flat Structuring Elements for Grayscale Image
Erosion and dilation can be done in 3D space, that is, with gray levels. 3D structuring elements can be used,
but the simplest and the best way is to use a flat structuring element B. Figure "1D Cross Section of Dilationand Erosion of A by B" is a 1D cross section of dilation and erosion of a grayscale image A by a flat
structuring element B. In the figure, B has an anchor slightly to the right of the center as shown by the darkmark on B.
1D Cross Section of Dilation and Erosion of A by B
1035

In Figure "1D Cross Section of Dilation and Erosion of A by B" above, dilation is mathematically1Intel® Integrated Performance Primitives Developer Guide and Reference

and erosion is.

Dilate3x3
Performs dilation of an image using a 3x3 mask.

SyntaxIppStatus ippiDilate3x3_64f_C1R(const Ipp64f* pSrc, int srcStep, Ipp<datatype>* pDst,
int dstStep, IppiSize roiSize);

1036

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc
srcStep
pDst
dstStep
roiSize

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the destination image ROI.
Distance in bytes between starts of consecutive lines in thedestination image.
Size of the source and destination ROI in pixels.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function performs dilation of a rectangular ROI area inside a 2D image using a symmetric 3x3 mask.
Source and destination images can be of different sizes, but the ROI size is the same for both images. The
output pixel is set to the maximum of the corresponding input pixel and its eight neighboring pixels.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsStepErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pSrc or pDst is NULL.
Indicates an error condition if roiSize has a field with zero or
negative value.
Indicates an error condition if srcStep or dstStep has a zero or
negative value.

DilatePerforms dilation of an image using a specified mask.

SyntaxIppStatus ippiDilate_8u_C1R_L(const Ipp8u* pSrc, IppSizeL srcStep, Ipp8u* pDst,
IppSizeL dstStep, IppiSizeL roiSize, IppiBorderType borderType, const Ipp8u
borderValue[1], const IppiMorphStateL* pMorphSpec, Ipp8u* pBuffer);
IppStatus ippiDilate_8u_C3R_L(const Ipp8u* pSrc, IppSizeL srcStep, Ipp8u* pDst,
IppSizeL dstStep, IppiSizeL roiSize, IppiBorderType borderType, const Ipp8u
borderValue[3], const IppiMorphStateL* pMorphSpec, Ipp8u* pBuffer);
IppStatus ippiDilate_8u_C4R_L(const Ipp8u* pSrc, IppSizeL srcStep, Ipp8u* pDst,
IppSizeL dstStep, IppiSizeL roiSize, IppiBorderType borderType, const Ipp8u
borderValue[4], const IppiMorphStateL* pMorphSpec, Ipp8u* pBuffer);

1037

1

Intel® Integrated Performance Primitives Developer Guide and Reference

IppStatus ippiDilate_32f_C3R_L(const Ipp32f* pSrc, IppSizeL srcStep, Ipp32f* pDst,
IppSizeL dstStep, IppiSizeL roiSize, IppiBorderType borderType, const Ipp32f
borderValue[3], const IppiMorphStateL* pMorphSpec, Ipp8u* pBuffer);
IppStatus ippiDilate_32f_C1R_L(const Ipp32f* pSrc, IppSizeL srcStep, Ipp32f* pDst,
IppSizeL dstStep, IppiSizeL roiSize, IppiBorderType borderType, const Ipp32f
borderValue[1], const IppiMorphStateL* pMorphSpec, Ipp8u* pBuffer);
IppStatus ippiDilate_32f_C4R_L(const Ipp32f* pSrc, IppSizeL srcStep, Ipp32f* pDst,
IppSizeL dstStep, IppiSizeL roiSize, IppiBorderType borderType, const Ipp32f
borderValue[4], const IppiMorphStateL* pMorphSpec, Ipp8u* pBuffer);
IppStatus ippiDilate_16u_C1R_L(const Ipp16u* pSrc, IppSizeL srcStep, Ipp16u* pDst,
IppSizeL dstStep, IppiSizeL roiSize, IppiBorderType borderType, const Ipp16u
borderValue[1], const IppiMorphStateL* pMorphSpec, Ipp8u* pBuffer);
IppStatus ippiDilate_16s_C1R_L(const Ipp16s* pSrc, IppSizeL srcStep, Ipp16s* pDst,
IppSizeL dstStep, IppiSizeL roiSize, IppiBorderType borderType, const Ipp16s
borderValue[1], const IppiMorphStateL* pMorphSpec, Ipp8u* pBuffer);
IppStatus ippiDilate_1u_C1R_L(const Ipp8u* pSrc, IppSizeL srcStep, int srcBitOffset,
Ipp8u* pDst, IppSizeL dstStep, int dstBitOffset, IppiSizeL roiSize, IppiBorderTypeborderType, const Ipp8u borderValue[1], const IppiMorphStateL* pMorphSpec, Ipp8u*
pBuffer);

Include Files
ippcv_l.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc
srcStep
pDst

Pointer to the source image ROI.
Distance, in bytes, between the starting points of consecutive
lines in the source image.
Pointer to the destination image ROI.

roiSize

Distance, in bytes, between the starting points of consecutive
lines in the destination image.
Size of the source and destination ROI, in pixels.

borderType

Type of the border; supported values:

dstStep1038

ippBorderDefault

The border is set to ippBorderConst withborderValue= MIN_VALUE, where
MIN_VALUE=IPP_MIN_8U/16U/16S/32F/1U

ippBorderRepl

Border is replicated from the edge pixels.

ippBorderMirror

Border pixels are mirrored from the source
image boundary pixels.

ippBorderConst

Values of all border pixels are set to a
constant.

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

ippBorderInMem

Border is obtained from the source image
pixels in memory.

Mixed borders are also supported. They can be obtained by the bitwise
operation OR between any of the ippBorderRepl, ippBorderConst,
or ippBorderMirror values and the ippBorderInMemTop,
ippBorderInMemBottom, ippBorderInMemLeft,
ippBorderInMemRight values.

borderValue

Pointer to the vector of values for the constant border type.

srcBitOffset

Offset in the first byte of the source image row.

dstBitOffset

Offset in the first byte of the destination image row.

pMorphSpec

Pointer to the morphology specification structure.

pBuffer

Pointer to the external work buffer.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function performs dilation of a rectangular ROI area inside a one-, three-, or four-channel 2D image
using a specified mask pMask of size maskSize and alignment anchor.
Source and destination images can be of different sizes, but the ROI size is the same for both images. The
output pixel is set to the maximum of the corresponding input pixel and its neighboring pixels that are pickedout by the nonzero mask values. In the four-channel image the alpha channel is not processed.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsStepErr
ippStsNotEvenStepErr
ippStsBadArgErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pSrc or pDst is NULL.
Indicates an error condition if roiSize has a field with a zero or
negative value.
Indicates an error condition if srcStep or dstStep has a zero or
negative value.
Indicates an error condition if srcStep or dstStep has a not
pixel multiple value.
Indicates an error condition if borderType has an incorrect
value.

DilateBorder
Performs dilation of an image.

SyntaxIppStatus ippiDilateBorder_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>*pDst, int dstStep, IppiSize roiSize, IppiBorderType borderType, Ipp<datatype>borderValue, const IppiMorphState* pSpec, Ipp8u* pBuffer);
Supported values for mod:8u_C1R 16u_C1R 16s_C1R 32f_C1R

1039

1

Intel® Integrated Performance Primitives Developer Guide and Reference

IppStatus ippiDilateBorder_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>*pDst, int dstStep, IppiSize roiSize, IppiBorderType borderType, const Ipp<datatype>borderValue[3], const IppiMorphState* pSpec, Ipp8u* pBuffer);
Supported values for mod:8u_C3R

32f_C3R

IppStatus ippiDilateBorder_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>*pDst, int dstStep, IppiSize roiSize, IppiBorderType borderType, const Ipp<datatype>borderValue[4], const IppiMorphState* pSpec, Ipp8u* pBuffer);
Supported values for mod:8u_C4R

32f_C4R

IppStatus ippiDilateBorder_1u_C1R(const Ipp8u* pSrc, int srcStep, int srcBitOffset,
Ipp8u* pDst, int dstStep, int dstBitOffset, IppiSize roiSize, IppiBorderTypeborderType, Ipp8u borderValue, const IppiMorphState* pSpec, Ipp8u* pBuffer);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc

Pointer to the source image ROI.

srcStep

Distance in bytes between the starting points of consecutive
lines in the source image.

srcBitOffset

Offset, in bits, from the first byte of the source image (for 1u_C1R
flavor).

pDst

Pointer to the destination image ROI.

dstStep

Distance, in bytes, between the starting points of consecutive
lines in the destination image.

dstBitOffset

Offset, in bits, from the first byte of the destination image (for 1u_C1R
flavor).

roiSize

Size of the source and destination image ROI.

borderType

Type of border. Possible values are:ippBorderRepl
ippBorderInMem

borderValue

pSpec

1040

Border is replicated from the edge
pixels.
Border is obtained from the source
image pixels in memory.

Constant value to assign to pixels of the constant border. Thisparameter is applicable only to the ippBorderConst border
type.
Pointer to the specification structure.

Developer Guide and Reference for Intel® Integrated Performance Primitives

pBuffer

1

Pointer to the external buffer required for dilation operations.

Description
This function operates with ROI.
This function expands a rectangular ROI area inside a one-channel two-dimensional image using a mask
specified in the specification structure pSpec. Before using this function, you need to initialize the structureusing the MorphologyBorderInit function.
The output pixel is set to the maximum of the corresponding input pixel and its neighboring pixels that are
picked out by the nonzero mask values.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error when:••

roiSize has a field with a zero or negative value
roiSize.width is more than the maximum ROI roiWidth passed
to the initialization function

ippStsStepErr
ippStsNotEvenStepErr
ippStsBorderErr

Indicates an error when srcStep or dstStep is less thanroiSize.width* < pixelSize>.
Indicates an error when one of the step values for 16-bit
integer images is not divisible by 2.
Indicates an error when borderType has an illegal value.

ippStsInplaceModeNotSupportedE Indicates an error when the pSrc pointer is equal to the pDst pointer.
rr

ExampleThe code example below demonstrates how to use the ippiMorphologyBorderGetSize_16u_C1R,
ippiMorphologyBorderInit_16u_C1R, and ippiDilateBorder_16u_C1R functions to perform dilation of
the source image.

IppStatus func_MorfDilateBorder(){IppiMorphState* pSpec = NULL;
Ipp8u* pBuffer = NULL;
IppiSize roiSize = {5, 5};
Ipp8u pMask[3*3] = {1, 1, 1,
1, 0, 1,
1, 1, 1};
IppiSize maskSize = {3, 3};
Ipp16u pSrc[5*5] = { 1, 2, 4, 1, 2,
5, 1, 2, 1, 2,
1, 2, 1, 2, 1,
1, 2, 1, 2, 1,
2, 1, 5, 1, 2};
Ipp16u pDst[5*5];
int srcStep = 5*sizeof(Ipp16u);
int dstStep = 5*sizeof(Ipp16u);
int dstSize = 5;
IppStatus status = ippStsNoErr;

1041

1

Intel® Integrated Performance Primitives Developer Guide and Reference

int specSize = 0, bufferSize = 0;
IppiBorderType borderType= ippBorderRepl;
Ipp16u borderValue = 0;
status = ippiMorphologyBorderGetSize_16u_C1R( roiSize, maskSize, &specSize, &bufferSize );if (status != ippStsNoErr) return status;
pSpec = (IppiMorphState*)ippsMalloc_8u(specSize);pBuffer = (Ipp8u*)ippsMalloc_8u(bufferSize);status = ippiMorphologyBorderInit_16u_C1R( roiSize, pMask, maskSize, pSpec, pBuffer );if (status != ippStsNoErr) {ippsFree(pBuffer);
ippsFree(pSpec);
return status;}
status = ippiDilateBorder_16u_C1R( pSrc, srcStep, pDst, dstStep, roiSize, borderType,borderValue, pSpec, pBuffer);
ippsFree(pBuffer);
ippsFree(pSpec);
return status;}
The result is as follows:

pDst->
5 5 4 4 2
5 5 4 4 2
5 5 2 2 2
2 5 5 5 2
2 5 5 5 2

See Also
Regions of Interest in Intel IPP
User-defined Border Types
MorphologyBorderInit Initializes the morphology specification structure for erosion or dilation
operations.
DilateGetBufferSize
Computes the size of the working buffer for the
Dilate function.

SyntaxIppStatus ippiDilateGetBufferSize_L(IppiSizeL roiSize, IppiSizeL maskSize, IppDataType
datatype, int numChannels, IppSizeL* pBufferSize);

Include Files
ippcv_l.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

1042

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Parameters
roiSize

Size of the source and destination image ROI, in pixels.

maskSize

Size of the structuring element.

dataType

Data type for the morphological function.

numChannels

Number of channels in the image.

pBufferSize

Pointer to the buffer size value for the morphologicalinitialization function.

Description
This function computes the size of the working buffer required for the ippiDilate functions with the _L
suffix.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error when one of the pointers is NULL.
Width of the image, or width or height of the structuring
element is less than, or equal to zero.

DilateGetSpecSize
Computes the size of the internal state or specification
structure for the Dilate function.

SyntaxIppStatus ippiDilateGetSpecSize_L(IppiSizeL roiSize, IppiSizeL maskSize, IppSizeL*
pSpecSize);

Include Files
ippcv_l.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
roiSize

Size of the source and destination image ROI, in pixels.

maskSize

Size of the structuring element.

pSpecSize

Pointer to the size of the specification structure.

Description
This function computes the size of the specification structure required for the ippiDilate functions with the_L suffix.

1043

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error when one of the pointers is NULL.
Width of the image, or width or height of the structuring
element is less than, or equal to zero.

DilateInit
Initializes the internal state or specification structure
for the Dilate function.

SyntaxIppStatus ippiDilateInit_L(IppiSizeL roiSize, const Ipp8u* pMask, IppiSizeL maskSize,
IppiMorphStateL* pMorphSpec);

Include Files
ippcv_l.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
roiSize

Size of the source and destination image ROI, in pixels.

pMask

Pointer to the structuring element (mask).

maskSize

Size of the structuring element.

pMorphSpec

Pointer to the morphology specification structure.

Description
This function initializes the internal state or specification structure for the ippiDilate functions with the _L
suffix.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsAnchorErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error when one of the pointers is NULL.
Width of the image, or width or height of the structuring
element is less than, or equal to zero.
Anchor point is outside the structuring element.

Erode3x3
Performs erosion of an image using a 3x3 mask.

1044

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

SyntaxIppStatus ippiErode3x3_64f_C1R(const Ipp64f* pSrc, int srcStep, Ipp64f* pDst, int
dstStep, IppiSize roiSize);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc
srcStep
pDst
dstStep
roiSize

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the destination image ROI.
Distance in bytes between starts of consecutive lines in thedestination image.
Size of the source and destination ROI in pixels.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function performs erosion of a rectangular ROI area inside a 2D image using a symmetric 3x3 mask.
Source and destination images can have different size, but the ROI size is the same for both images. The
output pixel is set to the minimum of the corresponding input pixel and its 8 neighboring pixels.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsStepErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pSrc or pDst is NULL.
Indicates an error condition if roiSize has a field with a zero or
negative value.
Indicates an error condition if srcStep or dstStep has a zero or
negative value.

Erode
Performs erosion of an image using a specified mask.

SyntaxIppStatus ippiErode_8u_C1R_L(const Ipp8u* pSrc, IppSizeL srcStep, Ipp8u* pDst, IppSizeL
dstStep, IppiSizeL roiSize, IppiBorderType borderType, const Ipp8u borderValue[1],const IppiMorphStateL* pMorphSpec, Ipp8u* pBuffer);
IppStatus ippiErode_8u_C3R_L(const Ipp8u* pSrc, IppSizeL srcStep, Ipp8u* pDst, IppSizeL
dstStep, IppiSizeL roiSize, IppiBorderType borderType, const Ipp8u borderValue[3],const IppiMorphStateL* pMorphSpec, Ipp8u* pBuffer);

1045

1

Intel® Integrated Performance Primitives Developer Guide and Reference

IppStatus ippiErode_8u_C4R_L(const Ipp8u* pSrc, IppSizeL srcStep, Ipp8u* pDst, IppSizeL
dstStep, IppiSizeL roiSize, IppiBorderType borderType, const Ipp8u borderValue[4],const IppiMorphStateL* pMorphSpec, Ipp8u* pBuffer);
IppStatus ippiErode_32f_C3R_L(const Ipp32f* pSrc, IppSizeL srcStep, Ipp32f* pDst,
IppSizeL dstStep, IppiSizeL roiSize, IppiBorderType borderType, const Ipp32f
borderValue[3], const IppiMorphStateL* pMorphSpec, Ipp8u* pBuffer);
IppStatus ippiErode_32f_C1R_L(const Ipp32f* pSrc, IppSizeL srcStep, Ipp32f* pDst,
IppSizeL dstStep, IppiSizeL roiSize, IppiBorderType borderType, const Ipp32f
borderValue[1], const IppiMorphStateL* pMorphSpec, Ipp8u* pBuffer);
IppStatus ippiErode_32f_C4R_L(const Ipp32f* pSrc, IppSizeL srcStep, Ipp32f* pDst,
IppSizeL dstStep, IppiSizeL roiSize, IppiBorderType borderType, const Ipp32f
borderValue[4], const IppiMorphStateL* pMorphSpec, Ipp8u* pBuffer);
IppStatus ippiErode_16u_C1R_L(const Ipp16u* pSrc, IppSizeL srcStep, Ipp16u* pDst,
IppSizeL dstStep, IppiSizeL roiSize, IppiBorderType borderType, const Ipp16u
borderValue[1], const IppiMorphStateL* pMorphSpec, Ipp8u* pBuffer);
IppStatus ippiErode_16s_C1R_L(const Ipp16s* pSrc, IppSizeL srcStep, Ipp16s* pDst,
IppSizeL dstStep, IppiSizeL roiSize, IppiBorderType borderType, const Ipp16s
borderValue[1], const IppiMorphStateL* pMorphSpec, Ipp8u* pBuffer);
IppStatus ippiErode_1u_C1R_L(const Ipp8u* pSrc, IppSizeL srcStep, int srcBitOffset,
Ipp8u* pDst, IppSizeL dstStep, int dstBitOffset, IppiSizeL roiSize, IppiBorderTypeborderType, const Ipp8u borderValue[1], const IppiMorphStateL* pMorphSpec, Ipp8u*
pBuffer);

Include Files
ippcv_l.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc
srcStep
pDst

Pointer to the source image ROI.
Distance, in bytes, between the starting points of consecutive
lines in the source image.
Pointer to the destination image ROI.

roiSize

Distance, in bytes, between the starting points of consecutive
lines in the destination image.
Size of the source and destination ROI, in pixels.

borderType

Type of the border; supported values:

dstStep1046

ippBorderDefault

The border is set to ippBorderConst withborderValue= MAX_VALUE, where
MAX_VALUE=IPP_MAX_8U/16U/16S/32F/1U

ippBorderRepl

Border is replicated from the edge pixels.

ippBorderMirror

Border pixels are mirrored from the source
image boundary pixels.

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

ippBorderConst

Values of all border pixels are set to a
constant.

ippBorderInMem

Border is obtained from the source image
pixels in memory.

Mixed borders are also supported. They can be obtained by the bitwise
operation OR between any of the ippBorderRepl, ippBorderConst,
or ippBorderMirror values and the ippBorderInMemTop,
ippBorderInMemBottom, ippBorderInMemLeft,
ippBorderInMemRight values.

borderValue

Pointer to the vector of values for the constant border type.

srcBitOffset

Offset in the first byte of the source image row.

dstBitOffset

Offset in the first byte of the destination image row.

pMorphSpec

Pointer to the morphology specification structure.

pBuffer

Pointer to the external work buffer.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function performs erosion of a rectangular ROI area inside a one-, three-, or four-channel 2D image
using a specified mask pMask of size maskSize and alignment anchor.
Source and destination images can be of different sizes, but the ROI size is the same for both images(dstRoiSize). The output pixel is set to the minimum of the corresponding input pixel and its neighboring
pixels that are picked out by the non-zero mask values. In the four-channel image the alpha channel is notprocessed.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsStepErr
ippStsNotEvenStepErr
ippStsBadArgErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pSrc or pDst is NULL.
Indicates an error condition if roiSize has a field with a zero or
negative value.
Indicates an error condition if srcStep or dstStep has a zero or
negative value.
Indicates an error condition if srcStep or dstStep has a not
pixel multiple value.
Indicates an error condition if borderType has an incorrect
value.

ErodeBorder
Performs erosion of an image.

1047

1

Intel® Integrated Performance Primitives Developer Guide and Reference

SyntaxIppStatus ippiErodeBorder_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>*pDst, int dstStep, IppiSize roiSize, IppiBorderType borderType, Ipp<datatype>borderValue, const IppiMorphState* pSpec, Ipp8u* pBuffer);
Supported values for mod:8u_C1R 16u_C1R 16s_C1R 32f_C1R
IppStatus ippiErodeBorder_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>*pDst, int dstStep, IppiSize roiSize, IppiBorderType borderType, const Ipp<datatype>borderValue[3], const IppiMorphState* pSpec, Ipp8u* pBuffer);
Supported values for mod:8u_C3R

32f_C3R

IppStatus ippiErodeBorder_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>*pDst, int dstStep, IppiSize roiSize, IppiBorderType borderType, const Ipp<datatype>borderValue[4], const IppiMorphState* pSpec, Ipp8u* pBuffer);
Supported values for mod:8u_C4R

32f_C4R

IppStatus ippiErodeBorder_1u_C1R(const Ipp8u* pSrc, int srcStep, int srcBitOffset,
Ipp8u* pDst, int dstStep, int dstBitOffset, IppiSize roiSize, IppiBorderTypeborderType, Ipp8u borderValue, const IppiMorphState* pSpec, Ipp8u* pBuffer);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc

Pointer to the source image ROI.

srcStep

Distance, in bytes, between the starting points of consecutive
lines in the source image.

srcBitOffset

Offset, in bits, from the first byte of the source image (for 1u_C1R
flavor).

pDst

Pointer to the destination image ROI.

dstStep

Distance, in bytes, between the starting points of consecutive
lines in the destination image.

dstBitOffset

Offset, in bits, from the first byte of the destination image (for 1u_C1R
flavor).

roiSize

Size of the source and destination image ROI.

borderType

Type of border. Possible values are:

1048

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

ippBorderRepl
ippBorderInMem

Border is replicated from the edge
pixels.
Border is obtained from the source
image pixels in memory.

pSpec

Constant value to assign to pixels of the constant border. Thisparameter is applicable only to the ippBorderConst border
type.
Pointer to the specification structure.

pBuffer

Pointer to the external buffer required for erosion operations.

borderValue

Description
This function operates with ROI.
This function performs erosion of a rectangular ROI area inside a one-channel 2D image using a mask
specified in the specification structure pSpec. Before using this function, you need to initialize the structureusing the MorphologyBorderInit function.
The output pixel is set to the maximum of the corresponding input pixel and its neighboring pixels that are
picked out by the nonzero mask values.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error when:••

roiSize has a field with a zero or negative value
roiSize.width is more than the maximum ROI roiWidth passed•

to the initialization function
srcBitOffset or dstBitOffset is less than zero

ippStsStepErr

Indicates an error when srcStep or dstStep is less thanroiSize.width* < pixelSize>.

ippStsNotEvenStepErr

Indicates an error when one of the step values for 16-bit
integer images is not divisible by 2.

ippStsBorderErr

Indicates an error when borderType has an illegal value.

ippStsInplaceModeNotSupportedE Indicates an error when the pSrc pointer is equal to the pDst pointer.
rr

See Also
Regions of Interest in Intel IPP
User-defined Border Types
MorphologyBorderInit Initializes the morphology specification structure for erosion or dilation
operations.
ErodeGetBufferSize
Computes the size of the working buffer for the Erodefunction.

1049

1

Intel® Integrated Performance Primitives Developer Guide and Reference

SyntaxIppStatus ippiErodeGetBufferSize_L(IppiSizeL roiSize, IppiSizeL maskSize, IppDataType
datatype, int numChannels, IppSizeL* pBufferSize);

Include Files
ippcv_l.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
roiSize

Size of the source and destination image ROI, in pixels.

maskSize

Size of the structuring element.

dataType

Data type for the morphological function.

numChannels

Number of channels in the image.

pBufferSize

Pointer to the buffer size value for the morphologicalinitialization function.

Description
This function computes the size of the working buffer required for the ippiErode functions with the _L
suffix.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error when one of the pointers is NULL.
Width of the image, or width or height of the structuring
element is less than, or equal to zero.

ErodeGetSpecSize
Computes the size of the internal state or specification
structure for the Erode function.

SyntaxIppStatus ippiErodeGetSpecSize_L(IppiSizeL roiSize, IppiSizeL maskSize, IppSizeL*
pSpecSize);

Include Files
ippcv_l.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

1050

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Parameters
roiSize

Size of the source and destination image ROI, in pixels.

maskSize

Size of the structuring element.

pSpecSize

Pointer to the size of the specification structure.

Description
This function computes the size of the specification structure required for the ippiErode functions with the_L suffix.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error when one of the pointers is NULL.
Width of the image, or width or height of the structuring
element is less than, or equal to zero.

ErodeInit
Initializes the internal state or specification structure
for the Erode function.

SyntaxIppStatus ippiErodeInit_L(IppiSizeL roiSize, const Ipp8u* pMask, IppiSizeL maskSize,
IppiMorphStateL* pMorphSpec);

Include Files
ippcv_l.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
roiSize

Size of the source and destination image ROI, in pixels.

pMask

Pointer to the structuring element (mask).

maskSize

Size of the structuring element.

pMorphSpec

Pointer to the morphology specification structure.

Description
This function initializes the internal state or specification structure for the ippiErode functions with the _L
suffix.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error or awarning.

1051

1Intel® Integrated Performance Primitives Developer Guide and ReferenceippStsNullPtrErr
ippStsSizeErr
ippStsAnchorErr

Indicates an error when one of the pointers is NULL.
Width of the image, or width or height of the structuring
element is less than, or equal to zero.
Anchor point is outside the structuring element.

GrayDilateBorder
Performs gray-kernel dilation of an image.

SyntaxIppStatus ippiGrayDilateBorder_8u_C1R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int
dstStep, IppiSize roiSize, IppiBorderType border, IppiMorphGrayState_8u* pState);
IppStatus ippiGrayDilateBorder_32f_C1R(const Ipp32f* pSrc, int srcStep, Ipp32f* pDst,
int dstStep, IppiSize roiSize, IppiBorderType border, IppiMorphGrayState_32f* pState);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc

Pointer to the source image ROI.

srcStep

Distance in bytes between starts of consecutive lines in the source
image.

pDst

Pointer to the destination image ROI.

dstStep

Distance in bytes between starts of consecutive lines in the destination
image.

roiSize

Size of the source and destination image ROI.

borderType of border; the possible value is ippBorderRepl, which meansthat a replicated border is used.

pStatePointer to the morphology state structure.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function performs gray-kernel dilation of a rectangular ROI area inside a one-channel 2D image using a
specified in the gray-kernel morphology state structure pState mask and the anchor cell. This structure
must be initialized by MorphGrayInit beforehand.

NOTE
The structure can be used to process images with ROI that does not exceed the specified
maximum width and height roiSize.

1052

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

ippStsStepErr
ippStsNotEvenStepErr
ippStsBorderErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointers is
NULL.
Indicates an error condition if roiSize has a field with a zero or
negative value, or if one of ROI width or height is greater thancorresponding size of ROI passed to the initialization functions.
Indicates an error condition if srcStep or dstStep is less thanroiSize.width * <pixelSize>.
Indicates an error condition if one of the step values is notdivisible by 4 for floating-point images.
Indicates an error condition if border has an illegal value.

GrayErodeBorder
Performs gray-kernel erosion of an image.

SyntaxIppStatus ippiGrayErodeBorder_8u_C1R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int
dstStep, IppiSize roiSize, IppiBorderType border, IppiMorphGrayState_8u* pState);
IppStatus ippiGrayErodeBorder_32f_C1R(const Ipp32f* pSrc, int srcStep, Ipp32f* pDst,
int dstStep, IppiSize roiSize, IppiBorderType border, IppiMorphGrayState_32f* pState);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pDst
dstStep
roiSizeborderpStatePointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the destination image ROI.
Distance in bytes between starts of consecutive lines in thedestination image.
Size of the source and destination image ROI.
Type of border; the possible value is ippBorderRepl, whichmeans that a replicated border is used.
Pointer to the morphology state structure.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).

1053

1

Intel® Integrated Performance Primitives Developer Guide and ReferenceThis function performs gray-kernel erosion of a rectangular ROI area inside a one-channel 2D image using a
specified in the gray-kernel morphology state structure pState mask and the anchor cell. This structure
must be initialized by MorphGrayInit beforehand.

NOTE
The structure can be used to process images with ROI that does not exceed the specified
maximum width and height roiSize.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

ippStsStepErr
ippStsNotEvenStepErr
ippStsBorderErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointers is
NULL.
Indicates an error condition if roiSize has a field with a zero or
negative value, or if one of ROI width or height is greater thancorresponding size of ROI passed to the initialization functions.
Indicates an error condition if srcStep or dstStep is less thanroiSize.width * <pixelSize>.
Indicates an error condition if one of the step values is notdivisible by 4 for floating-point images.
Indicates an error condition if border has an illegal value.

MorphAdvInit
Initializes the specification structure for advanced
morphological operations.

SyntaxIppStatus ippiMorphAdvInit_<mod>(IppiSize roiSize, const Ipp8u* pMask, IppiSize
maskSize, IppiMorphAdvState* pSpec, Ipp8u* pBuffer);
Supported values for mod:1u_C1R 8u_C1R 16u_C1R 16s_C1R 32f_C1R
8u_C3R

32f_C3R

8u_C4R

32f_C4R

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSpec

Pointer to the specification structure.

roiSize

Maximal size of the image ROI (in pixels) that can be processedusing the allocated structure.

1054

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

pMask

Pointer to the mask.

maskSize

Size of the mask in pixels.

pBuffer

Pointer to the external buffer for advanced morphologicaloperations.

Description
This function operates with ROI.
This function initializes the specification structure pSpec in the external buffer. This structure is used by theMorphOpenBorder and MorphCloseBorder functions that perform open and close morphological operations.
All advanced morphological operations are performed on the source image pixels corresponding to non-zerovalues of the structuring element (mask) pMask.

NOTE
This function required that the image ROI does not exceed the maximum width and heightroiSize specified by the initialization functions.
For an example on how to use this function, see the code example provided with the MorphCloseBorderfunction description.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error when maskSize has a field with a zero or
negative value, or if roiWidth is less than 1.

ippStsAnchorErr

Indicates an error when anchor is outside the mask.

See Also
Regions of Interest in Intel IPP
MorphAdvGetSize Computes the size of the specification structure for advanced morphologicaloperations.
MorphOpenBorder Opens an image.
MorphCloseBorder Closes an image.
MorphTophatBorder Performs top-hat operation on an image.
MorphBlackhatBorder Performs black-hat operation on an image.
MorphGradientBorder Calculates morphological gradient of an image.
MorphAdvGetSize
Computes the size of the specification structure foradvanced morphological operations.

1055

1

Intel® Integrated Performance Primitives Developer Guide and Reference

SyntaxCase 2: Computing the size of morphology specification structure
IppStatus ippiMorphAdvGetSize_<mod>(IppiSize roiSize, IppiSize maskSize, int*
pSpecSize, int* pBufferSize);
Supported values for mod:1u_C1R 8u_C1R 16u_C1R 16s_C1R 32f_C1R
8u_C3R

32f_C3R

8u_C4R

32f_C4R

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
roiSize

Maximal size of the image ROI (in pixels) that can be processed using
the allocated structure.

maskSize

Size of the mask, in pixels.

pSpecSize

Pointer to the size of the morphology specification structure.

pBufferSize

Pointer to the size of the external buffer required for advanced
morphological operations.

Description
This function operates with ROI.
This function computes the size of the specification structure and the size of the buffer required for advanced
morphological operations. Call this function before using the ippiMorphAdvInit function.
For an example on how to use this function, see the code example provided with theippiMorphCloseBorder function description.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error when maskSize or roiSize has a field with azero or negative value.

See Also
Regions of Interest in Intel IPP
MorphAdvInit Initializes the specification structure for advanced morphological operations.
MorphCloseBorder Closes an image.

1056

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

MorphGetBufferSize
Computes the size of the working buffer for advanced
morphological operations.

SyntaxIppStatus ippiMorphGetBufferSize_L (IppiSizeL roiSize, IppiSizeL maskSize, IppDataTypedataType, int numChannels, IppSizeL* pBufferSize);

Include Files
ippcv_l.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
roiSize

Maximum size of the image ROI, in pixels.

maskSize

Size of the structuring element.

dataType

Data type for the processing function.

numChannels

Number of channels in the image.

pBufferSize

Pointer to the buffer size value for the initialization function.

Description
This function computes the size of the working buffer required for advanced morphological operations.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error when one of the pointers is NULL.
Width of the image, or width or height of the structuring
element is less than, or equal to zero.

MorphGetSpecSize
Computes the size of the internal state or specification
structure for advanced morphological operations.

SyntaxippiMorphGetSpecSize_L(IppiSizeL roiSize, IppiSizeL maskSize, IppDataType dataType, int
numChannels, IppSizeL* pSpecSize);

Include Files
ippcv_l.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

1057

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Parameters
roiSize

Maximum size of the image ROI, in pixels.

maskSize

Size of the structuring element.

dataType

Data type for the processing function.

numChannels

Number of channels in the image.

pSpecSize

Pointer to the size of the specification structure.

Description
This function computes the size of the specification structure for advanced morphological operations.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error when one of the pointers is NULL.
Width of the image, or width or height of the structuring
element is less than, or equal to zero.

MorphInit
Initializes the internal state or specification structure
for advanced morphological operations.

SyntaxIppStatus ippiMorphInit_L( IppiSizeL roiSize, const Ipp8u* pMask, IppiSizeL maskSize,
IppDataType dataType, int numChannels, IppiMorphAdvStateL* pMorphSpec);

Include Files
ippcv_l.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
roiSize

Maximum size of the image ROI, in pixels.

pMask

Pointer to the structuring element (mask).

maskSize

Size of the structuring element.

dataType

Data type for the processing function.

numChannels

Number of channels in the image.

pMorphSpec

Pointer to the advanced morphology specification structure.

Description
This function initializes the internal state or specification structure for advanced morphological operations.

1058

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsAnchorErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error when one of the pointers is NULL.
Width of the image, or width or height of the structuring
element is less than, or equal to zero.
Anchor point is outside the structuring element.

MorphologyBorderGetSize
Computes the size of the morphology specification
structure.

SyntaxIppStatus ippiMorphologyBorderGetSize_<mod>(IppiSize roiSize, IppiSize maskSize, int*
pSpecSize, int* pBufferSize);
Supported values for mod:1u_C1R 8u_C1R 16u_C1R 16s_C1R 32f_C1R
8u_C3R

32f_C3R

8u_C4R

32f_C4R

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
roiSize

Size of the image ROI, in pixels.

maskSize

Size of the mask, in pixels.

pSpecSize

Pointer to the size of the morphology specification structure.

pBufferSize

Pointer to the size of the buffer required for dilation or erosion
operations.

Description
This function operates with ROI.
This function computes the size of the morphology specification structure pMorphSpec and the size of thebuffer required for dilation and erosion operations. Call this function before using theippiMorphologyBorderInit function.

Return Values
ippStsNoErr

Indicates no error.

1059

1

Intel® Integrated Performance Primitives Developer Guide and ReferenceippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error when maskSize has a field with a zero or
negative value, or if width or height of roiSize is less than 1.

See Also
Regions of Interest in Intel IPP
MorphologyBorderInit Initializes the morphology specification structure for erosion or dilation
operations.
MorphologyBorderInit
Initializes the morphology specification structure for
erosion or dilation operations.

SyntaxIppStatus ippiMorphologyBorderInit_<mod>(IppiSize roiSize, const Ipp8u* pMask, IppiSize
maskSize, IppiMorphState* pSpec, Ipp8u* pBuffer);
Supported values for mod:1u_C1R 8u_C1R 16u_C1R 16s_C1R 32f_C1R
8u_C3R

32f_C3R

8u_C4R

32f_C4R

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
roiSize

Size of the image ROI, in pixels.

pMask

Pointer to the mask.

maskSize

Size of the mask, in pixels.

pSpec

Pointer to the specification structure.

pBuffer

Pointer to the external buffer required for dilation or erosion
operations.

Description
This function operates with ROI.
This function initializes the specification structure pSpec in the external buffer. Before using this function, youneed to compute the size of the specification structure using the MorphologyBorderGetSize function. This
structure is used by the ippiDilateBorder and ippiErodeBorder functions that perform morphologicaloperations on the source image pixels corresponding to non-zero values of the structuring element (mask)
pMask.

1060

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error when maskSize has a field with a zero or
negative value, or if width or height of roiSize is less than 1.

See Also
Regions of Interest in Intel IPP
MorphologyBorderGetSize Computes the size of the morphology specification structure.
DilateBorder Performs dilation of an image.
ErodeBorder Performs erosion of an image.
MorphBlackhat
Performs top-hat operation on an image.

SyntaxIppStatus ippiMorphBlackhat_16u_C1R_L(const Ipp16u* pSrc, IppSizeL srcStep, Ipp16u*
pDst, IppSizeL dstStep, IppiSizeL roiSize, IppiBorderType borderType, const Ipp16u
borderValue[1], const IppiMorphAdvStateL* pMorthSpec, Ipp8u* pBuffer);
IppStatus ippiMorphBlackhat_16s_C1R_L(const Ipp16s* pSrc, IppSizeL srcStep, Ipp16s*
pDst, IppSizeL dstStep, IppiSizeL roiSize, IppiBorderType borderType, const Ipp16s
borderValue[1], const IppiMorphAdvStateL* pMorthSpec, Ipp8u* pBuffer);
IppStatus ippiMorphBlackhat_1u_C1R_L(const Ipp8u* pSrc, IppSizeL srcStep, int
srcBitOffset, Ipp8u* pDst, IppSizeL dstStep, int dstBitOffset, IppiSizeL roiSize,
IppiBorderType borderType, const Ipp8u borderValue[1], const IppiMorphAdvStateL*
pMorthSpec, Ipp8u* pBuffer);
IppStatus ippiMorphBlackhat_8u_C1R_L(const Ipp8u* pSrc, IppSizeL srcStep, Ipp8u* pDst,
IppSizeL dstStep, IppiSizeL roiSize, IppiBorderType borderType, const Ipp8u
borderValue[1], const IppiMorphAdvStateL* pMorthSpec, Ipp8u* pBuffer);
IppStatus ippiMorphBlackhat_8u_C3R_L(const Ipp8u* pSrc, IppSizeL srcStep, Ipp8u* pDst,
IppSizeL dstStep, IppiSizeL roiSize, IppiBorderType borderType, const Ipp8u
borderValue[3], const IppiMorphAdvStateL* pMorthSpec, Ipp8u* pBuffer);
IppStatus ippiMorphBlackhat_8u_C4R_L(const Ipp8u* pSrc, IppSizeL srcStep, Ipp8u* pDst,
IppSizeL dstStep, IppiSizeL roiSize, IppiBorderType borderType, const Ipp8u
borderValue[4], const IppiMorphAdvStateL* pMorthSpec, Ipp8u* pBuffer);
IppStatus ippiMorphBlackhat_32f_C1R_L(const Ipp32f* pSrc, IppSizeL srcStep, Ipp32f*
pDst, IppSizeL dstStep, IppiSizeL roiSize, IppiBorderType borderType, const Ipp32f
borderValue[1], const IppiMorphAdvStateL* pMorthSpec, Ipp8u* pBuffer);
IppStatus ippiMorphBlackhat_32f_C3R_L(const Ipp32f* pSrc, IppSizeL srcStep, Ipp32f*
pDst, IppSizeL dstStep, IppiSizeL roiSize, IppiBorderType borderType, const Ipp32f
borderValue[3], const IppiMorphAdvStateL* pMorthSpec, Ipp8u* pBuffer);
IppStatus ippiMorphBlackhat_32f_C4R_L(const Ipp32f* pSrc, IppSizeL srcStep, Ipp32f*
pDst, IppSizeL dstStep, IppiSizeL roiSize, IppiBorderType borderType, const Ipp32f
borderValue[4], const IppiMorphAdvStateL* pMorthSpec, Ipp8u* pBuffer);

Include Files
ippcv_l.h1061

1Intel® Integrated Performance Primitives Developer Guide and Reference

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc

Pointer to the source image ROI.

srcBitOffset

Distance, in bytes, between the starting points of consecutive
lines in the source image.
Offset, in bits, from the first byte of the source image row.

pDst

Pointer to the destination image ROI.

srcStep

dstBitOffset

Distance, in bytes, between the starting points of consecutive
lines in the destination image.
Offset, in bits, from the first byte of the destination image row.

roiSize

Size of the source and destination image ROI.

borderType

Type of border. Possible values are:dstStep

ippBorderDefault

The border is set to ippBorderConst withborderValue= MAX_VALUE, where
MAX_VALUE=IPP_MAX_8U/16U/16S/32F/1U

ippBorderRepl

Border is replicated from the edge pixels.

ippBorderMirror

Border pixels are mirrored from the source
image boundary pixels.

ippBorderConst

Values of all border pixels are set to a
constant.

ippBorderFirstStage You can use this border type together with
the ippBorderRepl, ippBorderMirror,
InMem
ippBorderConst, ippBorderDefault types
using the | operation. For the first stage,border pixels are obtained from the source
image pixels in memory. For the second
stage, the function uses the border typespecified with the | operation.
Mixed borders are also supported. They can be obtained by the bitwise
operation OR between any of the ippBorderRepl, ippBorderConst,
ippBorderDefault, or ippBorderMirror values and theippBorderInMemTop, ippBorderInMemBottom,
ippBorderInMemLeft, ippBorderInMemRight modifiers.

pMorphSpec

Constant value to assign to pixels of the constant border. Thisparameter is applicable only to the ippBorderConst border
type.
Pointer to the morphology specification structure.

pBuffer

Pointer to the external buffer.

borderValue, borderValue[3],borderValue[4]

1062

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Description
Before using this function, you need to initialize the morphology specification structure using theippiMorphInit function.
This function performs a black-hat operation on a rectangular ROI area inside a one-, three-, or four-channel
2D image using a specified in the advanced morphology state or specification structure mask and the anchorcell.
The result is equivalent to the subtraction of the initial source image from the closed source image.

NOTE
The function can only process a ROI that does not exceed the maximum width and heightroiSize specified by the initialization functions.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error condition when:••ippStsStepErr
ippStsNotEvenStepErr
ippStsBadArgErr

roiSize has a field with a zero or negative value
ROI width is more than ROI width passed to the initialization
function

Indicates an error condition when srcStep or dstStep is lessthan roiSize.width * <pixelSize>.
Indicates an error when one of the step values is not a multipleof an element size.
Indicates an error when borderType has an illegal value.

See Also
Regions of Interest in Intel IPP
User-defined Border Types
MorphInit Initializes the internal state or specification structure for advanced morphologicaloperations.
MorphBlackhatBorder
Performs black-hat operation on an image.

SyntaxIppStatus ippiMorphBlackhatBorder_<mod>(const Ipp<datatype>* pSrc, int srcStep,
Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, IppiBorderType borderType,Ipp<datatype> borderValue, const IppiMorphAdvState* pSpec, Ipp8u* pBuffer);
Supported values for mod:8u_C1R 16u_C1R 16s_C1R 32f_C1R

1063

1

Intel® Integrated Performance Primitives Developer Guide and Reference

IppStatus ippiMorphBlackhatBorder_<mod>(const Ipp<datatype>* pSrc, int srcStep,
Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, IppiBorderType borderType, const
Ipp<datatype> borderValue[3], const IppiMorphAdvState* pSpec, Ipp8u* pBuffer);
Supported values for mod:8u_C3R

32f_C3R

IppStatus ippiMorphBlackhatBorder_<mod>(const Ipp<datatype>* pSrc, int srcStep,
Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, IppiBorderType borderType, const
Ipp<datatype> borderValue[4], const IppiMorphAdvState* pSpec, Ipp8u* pBuffer);
Supported values for mod:8u_C4R

32f_C4R

IppStatus ippiMorphBlackhatBorder_1u_C1R(const Ipp8u* pSrc, int srcStep, int
srcBitOffset, Ipp8u* pDst, int dstStep, int dstBitOffset, IppiSize roiSize,
IppiBorderType borderType, Ipp8u borderValue, const IppiMorphAdvState* pSpec, Ipp8u*
pBuffer);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc

Pointer to the source image ROI.

srcStep

Distance, in bytes, between the starting points of consecutive
lines in the source image.

srcBitOffset

Offset, in bits, from the first byte of the source image (for the 1u_C1R
flavor).

pDst

Pointer to the destination image ROI.

dstStep

Distance, in bytes, between the starting points of consecutive
lines in the destination image.

dstBitOffset

Offset, in bits, from the first byte of the destination image (for the

1u_C1R flavor).

roiSize

Size of the source and destination image ROI.

borderType

Type of border. Possible values are:ippBorderRepl
ippBorderInMem

borderValue, borderValue[3],borderValue[4]1064Border is replicated from the edge
pixels.
Border is obtained from the source
image pixels in memory.

Constant value to assign to pixels of the constant border. Thisparameter is applicable only to the ippBorderConst bordertype.

Developer Guide and Reference for Intel® Integrated Performance Primitives

pSpec

Pointer to the specification structure.

pBuffer

Pointer to the external buffer.

1

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function performs black-hat operation on a rectangular ROI area inside a one-, three-, or four-channel
2D image using a specified in the advanced morphology specification structure mask and anchor cell. The
structure must be initialized by MorphAdvInit beforehand.
The result is equivalent to the subtraction of the initial source image from the closed source image.

NOTE
The function can process only images with ROI that does not exceed the maximum widthand height roiSize specified by the initialization functions.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

ippStsStepErr
ippStsNotEvenStepErr
ippStsBorderErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointers is
NULL.
Indicates an error condition if roiSize has a field with a zero or
negative value, or if one of ROI width or height is greater thancorresponding size of ROI passed to the initialization functions.
Indicates an error condition if srcStep or dstStep is less thanroiSize.width * <pixelSize>.
Indicates an error condition if one of the step values is notdivisible by 4 for floating-point images.
Indicates an error condition if borderType has an illegal value.

See Also
MorphAdvInit Initializes the specification structure for advanced morphological operations.
MorphClose
Closes an image.

SyntaxIppStatus ippiMorphClose_8u_C1R_L(const Ipp8u* pSrc, IppSizeL srcStep, Ipp8u* pDst,
IppSizeL dstStep, IppiSizeL roiSize, IppiBorderType borderType, const Ipp8u
borderValue[1], const IppiMorphAdvStateL* pMorphSpec, Ipp8u* pBuffer);
IppStatus ippiMorphClose_8u_C3R_L(const Ipp8u* pSrc, IppSizeL srcStep, Ipp8u* pDst,
IppSizeL dstStep, IppiSizeL roiSize, IppiBorderType borderType, const Ipp8u
borderValue[3], const IppiMorphAdvStateL* pMorphSpec, Ipp8u* pBuffer);
IppStatus ippiMorphClose_8u_C4R_L(const Ipp8u* pSrc, IppSizeL srcStep, Ipp8u* pDst,
IppSizeL dstStep, IppiSizeL roiSize, IppiBorderType borderType, const Ipp8u
borderValue[4], const IppiMorphAdvStateL* pMorphSpec, Ipp8u* pBuffer);

1065

1

Intel® Integrated Performance Primitives Developer Guide and Reference

IppStatus ippiMorphClose_16u_C1R_L(const Ipp16u* pSrc, IppSizeL srcStep, Ipp16u* pDst,
IppSizeL dstStep, IppiSizeL roiSize, IppiBorderType borderType, const Ipp16u
borderValue[1], const IppiMorphAdvStateL* pMorphSpec, Ipp8u* pBuffer);
IppStatus ippiMorphClose_16s_C1R_L(const Ipp16s* pSrc, IppSizeL srcStep, Ipp16s* pDst,
IppSizeL dstStep, IppiSizeL roiSize, IppiBorderType borderType, const Ipp16s
borderValue[1], const IppiMorphAdvStateL* pMorphSpec, Ipp8u* pBuffer);
IppStatus ippiMorphClose_1u_C1R_L(const Ipp8u* pSrc, IppSizeL srcStep, int
srcBitOffset, Ipp8u* pDst, IppSizeL dstStep, int dstBitOffset, IppiSizeL roiSize,
IppiBorderType borderType, const Ipp8u borderValue[1], const IppiMorphAdvStateL*
pMorphSpec, Ipp8u* pBuffer);
IppStatus ippiMorphClose_32f_C1R_L(const Ipp32f* pSrc, IppSizeL srcStep, Ipp32f* pDst,
IppSizeL dstStep, IppiSizeL roiSize, IppiBorderType borderType, const Ipp32f
borderValue[1], const IppiMorphAdvStateL* pMorphSpec, Ipp8u* pBuffer);
IppStatus ippiMorphClose_32f_C3R_L(const Ipp32f* pSrc, IppSizeL srcStep, Ipp32f* pDst,
IppSizeL dstStep, IppiSizeL roiSize, IppiBorderType borderType, const Ipp32f
borderValue[3], const IppiMorphAdvStateL* pMorphSpec, Ipp8u* pBuffer);
IppStatus ippiMorphClose_32f_C4R_L(const Ipp32f* pSrc, IppSizeL srcStep, Ipp32f* pDst,
IppSizeL dstStep, IppiSizeL roiSize, IppiBorderType borderType, const Ipp32f
borderValue[4], const IppiMorphAdvStateL* pMorphSpec, Ipp8u* pBuffer);

Include Files
ippcv_l.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc

Pointer to the source image ROI.

srcBitOffset

Distance, in bytes, between the starting points of consecutive
lines in the source image.
Offset, in bits, from the first byte of the source image row.

pDst

Pointer to the destination image ROI.

srcStep

dstBitOffset

Distance, in bytes, between the starting points of consecutive
lines in the destination image.
Offset, in bits, from the first byte of the destination image row.

roiSize

Size of the source and destination image ROI.

borderType

Type of border. Possible values are:dstStep1066

ippBorderDefault

The border is set to ippBorderConst withborderValue= MAX_VALUE, where
MAX_VALUE=IPP_MAX_8U/16U/16S/32F/1U

ippBorderRepl

Border is replicated from the edge pixels.

ippBorderMirror

Border pixels are mirrored from the source
image boundary pixels.

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

ippBorderConst

Values of all border pixels are set to a
constant.

ippBorderFirstStage You can use this border type together with
the ippBorderRepl, ippBorderMirror,
InMem
ippBorderConst, ippBorderDefault types
using the | operation. For the first stage,border pixels are obtained from the source
image pixels in memory. For the second
stage, the function uses the border typespecified with the | operation.
Mixed borders are also supported. They can be obtained by the bitwise
operation OR between any of the ippBorderRepl, ippBorderConst,
ippBorderDefault, or ippBorderMirror values and theippBorderInMemTop, ippBorderInMemBottom,
ippBorderInMemLeft, ippBorderInMemRight modifiers.

pMorphSpec

Constant value to assign to pixels of the constant border. Thisparameter is applicable only to the ippBorderConst border
type.
Pointer to the morphology specification structure.

pBuffer

Pointer to the external buffer.

borderValue, borderValue[3],borderValue[4]Description
Before using this function, you need to initialize the morphology specification structure using theippiMorphInit function.
This function operates with ROI.
This function performs closing of a rectangular ROI area inside a one-, three-, or four-channel 2D image
using the mask specified in the pMorphSpec structure.
The result is equivalent to successive dilation of the source image by the structured element (mask) anderosion by the reverted structured element.

NOTE
The function can only process a ROI that does not exceed the maximum width and heightroiSize specified by the initialization functions.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error condition when:••ippStsStepErr

roiSize has a field with a zero or negative value
ROI width is more than ROI width passed to the initialization
function

Indicates an error condition when srcStep or dstStep is lessthan roiSize.width * <pixelSize>.

1067

1

Intel® Integrated Performance Primitives Developer Guide and ReferenceippStsNotEvenStepErr
ippStsBadArgErr

Indicates an error when one of the step values is not a multipleof an element size.
Indicates an error when borderType has an illegal value.

See Also
Regions of Interest in Intel IPP
User-defined Border Types
MorphInit Initializes the internal state or specification structure for advanced morphologicaloperations.
MorphCloseBorder
Closes an image.

SyntaxIppStatus ippiMorphCloseBorder_<mod>(const Ipp<datatype>* pSrc, int srcStep,
Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, IppiBorderType borderType,Ipp<datatype> borderValue, const IppiMorphAdvState* pSpec, Ipp8u* pBuffer);
Supported values for mod:8u_C1R 16u_C1R 16s_C1R 32f_C1R
IppStatus ippiMorphCloseBorder_<mod>(const Ipp<datatype>* pSrc, int srcStep,
Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, IppiBorderType borderType, const
Ipp<datatype> borderValue[3], const IppiMorphAdvState* pSpec, Ipp8u* pBuffer);
Supported values for mod:8u_C3R

32f_C3R

IppStatus ippiMorphCloseBorder_<mod>(const Ipp<datatype>* pSrc, int srcStep,
Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, IppiBorderType borderType, const
Ipp<datatype> borderValue[4], const IppiMorphAdvState* pSpec, Ipp8u* pBuffer);
Supported values for mod:8u_C4R

32f_C4R

IppStatus ippiMorphCloseBorder_1u_C1R(const Ipp8u* pSrc, int srcStep, int srcBitOffset,
Ipp8u* pDst, int dstStep, int dstBitOffset, IppiSize roiSize, IppiBorderTypeborderType, Ipp8u borderValue, const IppiMorphAdvState* pSpec, Ipp8u* pBuffer);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc

Pointer to the source image ROI.

srcStep

Distance, in bytes, between the starting points of consecutive
lines in the source image.

1068

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

srcBitOffset

Offset, in bits, from the first byte of the source image (for 1u_C1R
flavor).

pDst

Pointer to the destination image ROI.

dstStep

Distance, in bytes, between the starting points of consecutive
lines in the destination image.

dstBitOffset

Offset, in bits, from the first byte of the destination image (for 1u_C1R
flavor).

roiSize

Size of the source and destination image ROI.

borderType

Type of border. Possible values are:ippBorderRepl
ippBorderInMem

Border is replicated from the edge
pixels.
Border is obtained from the source
image pixels in memory.

pSpec

Constant value to assign to pixels of the constant border. Thisparameter is applicable only to the ippBorderConst border
type.
Pointer to the specification structure.

pBuffer

Pointer to the external buffer required for dilation operations.

borderValue, borderValue[3],borderValue[4]Description
Before using this function, you need to initialize the morphology specification structure using theMorphAdvInit function.
This function operates with ROI.
This function performs closing of a rectangular ROI area inside a one-, three-, or four-channel 2D image
using the mask specified in the pSpec structure.
The result is equivalent to successive dilation of the source image by the structured element (mask) anderosion by the reverted structured element.

NOTE
This function requires that the image ROI does not exceed the maximum width and heightroiSize specified by the initialization functions.
Usage example of this function is similar to the example provided with the MorphOpenBorder function
description.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error condition when:•••

roiSize has a field with a zero or negative value
one of the ROI width or height is more than the corresponding sizeof ROI passed to the initialization functions
srcBitOffset or dstBitOffset is less than zero

1069

1

Intel® Integrated Performance Primitives Developer Guide and ReferenceippStsStepErr
ippStsNotEvenStepErr
ippStsBorderErr

Indicates an error condition if srcStep or dstStep is less thanroiSize.width * <pixelSize>.
Indicates an error condition if one of the step values for 16-bit
integer images is not divisible by 2.
Indicates an error condition if borderType has an illegal value.

ExampleThe code example below demonstrates how to use the ippiMorphAdvGetSize_16u_C1R,
ippiMorphAdvInit_16u_C1R, and ippiMorphCloseBorder_16u_C1R functions.

IppStatus func_MorfCloseBorder(){IppiMorphAdvState* pSpec = NULL;
Ipp8u* pBuffer = NULL;
IppiSize roiSize = {5, 5};
Ipp8u pMask[3*3] = {1, 1, 1,
1, 0, 1,
1, 1, 1};
IppiSize maskSize = {3, 3};
Ipp16u pSrc[5*5] = { 1, 2, 4, 1, 2,
5, 1, 2, 1, 2,
1, 2, 1, 2, 1,
2, 1, 5, 1, 2};
Ipp16u pDst[5*5];
int srcStep = 5*sizeof(Ipp16u);
int dstStep = 5*sizeof(Ipp16u);
int dstSize = 5;
IppStatus status = ippStsNoErr;
int specSize = 0, bufferSize = 0;
IppiBorderType borderType= ippBorderRepl;
Ipp16u borderValue = 0;
status = ippiMorphAdvGetSize_16u_C1R( roiSize, maskSize, &specSize, &bufferSize );if (status != ippStsNoErr) return status;
pSpec = (IppiMorphAdvState*)ippsMalloc_8u(specSize);pBuffer = (Ipp8u*)ippsMalloc_8u(bufferSize);status = ippiMorphAdvInit_16u_C1R( roiSize, pMask, maskSize, pSpec, pBuffer );if (status != ippStsNoErr) {ippsFree(pBuffer);
ippsFree(pSpec);
return status;}
status = ippiMorphCloseBorder_16u_C1R (pSrc, srcStep, pDst, dstStep, roiSize, borderType,borderValue, pSpec, pBuffer);
ippsFree(pBuffer);
ippsFree(pSpec);
return status;}

1070

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

The result is as follows:

pDst->
5 4 4 2 2
5 4 4 2 2
2 2 2 2 2
2 2 5 2 2
2 2 2 2 2

See Also
Regions of Interest in Intel IPP
User-defined Border Types
MorphAdvInit Initializes the specification structure for advanced morphological operations.
MorphGradientCalculates morphological gradient of an image.

SyntaxIppStatus ippiMorphGradient_16u_C1R_L(const Ipp16u* pSrc, IppSizeL srcStep, Ipp16u*
pDst, IppSizeL dstStep, IppiSizeL roiSize, IppiBorderType borderType, const Ipp16u
borderValue[1], const IppiMorphAdvStateL* pMorphSpec, Ipp8u* pBuffer);
IppStatus ippiMorphGradient_16s_C1R_L(const Ipp16s* pSrc, IppSizeL srcStep, Ipp16s*
pDst, IppSizeL dstStep, IppiSizeL roiSize, IppiBorderType borderType, const Ipp16s
borderValue[1], const IppiMorphAdvStateL* pMorphSpec, Ipp8u* pBuffer);
IppStatus ippiMorphGradient_1u_C1R_L(const Ipp8u* pSrc, IppSizeL srcStep, int
srcBitOffset, Ipp8u* pDst, IppSizeL dstStep, int dstBitOffset, IppiSizeL roiSize,
IppiBorderType borderType, const Ipp8u borderValue[1], const IppiMorphAdvStateL*
pMorphSpec, Ipp8u* pBuffer);
IppStatus ippiMorphGradient_8u_C1R_L(const Ipp8u* pSrc, IppSizeL srcStep, Ipp8u* pDst,
IppSizeL dstStep, IppiSizeL roiSize, IppiBorderType borderType, const Ipp8u
borderValue[1], const IppiMorphAdvStateL* pMorphSpec, Ipp8u* pBuffer);
IppStatus ippiMorphGradient_8u_C3R_L(const Ipp8u* pSrc, IppSizeL srcStep, Ipp8u* pDst,
IppSizeL dstStep, IppiSizeL roiSize, IppiBorderType borderType, const Ipp8u
borderValue[3], const IppiMorphAdvStateL* pMorphSpec, Ipp8u* pBuffer);
IppStatus ippiMorphGradient_8u_C4R_L(const Ipp8u* pSrc, IppSizeL srcStep, Ipp8u* pDst,
IppSizeL dstStep, IppiSizeL roiSize, IppiBorderType borderType, const Ipp8u
borderValue[4], const IppiMorphAdvStateL* pMorphSpec, Ipp8u* pBuffer);
IppStatus ippiMorphGradient_32f_C1R_L(const Ipp32f* pSrc, IppSizeL srcStep, Ipp32f*
pDst, IppSizeL dstStep, IppiSizeL roiSize, IppiBorderType borderType, const Ipp32f
borderValue[1], const IppiMorphAdvStateL* pMorphSpec, Ipp8u* pBuffer);
IppStatus ippiMorphGradient_32f_C3R_L(const Ipp32f* pSrc, IppSizeL srcStep, Ipp32f*
pDst, IppSizeL dstStep, IppiSizeL roiSize, IppiBorderType borderType, const Ipp32f
borderValue[3], const IppiMorphAdvStateL* pMorphSpec, Ipp8u* pBuffer);
IppStatus ippiMorphGradient_32f_C4R_L(const Ipp32f* pSrc, IppSizeL srcStep, Ipp32f*
pDst, IppSizeL dstStep, IppiSizeL roiSize, IppiBorderType borderType, const Ipp32f
borderValue[4], const IppiMorphAdvStateL* pMorphSpec, Ipp8u* pBuffer);

Include Files
ippcv_l.h

1071

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc

Pointer to the source image ROI.

srcBitOffset

Distance, in bytes, between the starting points of consecutive
lines in the source image.
Offset, in bits, from the first byte of the source image row.

pDst

Pointer to the destination image ROI.

srcStep

dstBitOffset

Distance, in bytes, between the starting points of consecutive
lines in the destination image.
Offset, in bits, from the first byte of the destination image row.

roiSize

Size of the source and destination image ROI.

borderType

Type of border. Possible values are:dstStep

ippBorderDefault

The border is set to ippBorderConst withborderValue= MAX_VALUE, where
MAX_VALUE=IPP_MAX_8U/16U/16S/32F/1U

ippBorderRepl

Border is replicated from the edge pixels.

ippBorderMirror

Border pixels are mirrored from the source
image boundary pixels.

ippBorderConst

Values of all border pixels are set to a
constant.

ippBorderFirstStage You can use this border type together with
the ippBorderRepl, ippBorderMirror,
InMem
ippBorderConst, ippBorderDefault types
using the | operation. For the first stage,border pixels are obtained from the source
image pixels in memory. For the second
stage, the function uses the border typespecified with the | operation.
Mixed borders are also supported. They can be obtained by the bitwise
operation OR between any of the ippBorderRepl, ippBorderConst,
ippBorderDefault, or ippBorderMirror values and theippBorderInMemTop, ippBorderInMemBottom,
ippBorderInMemLeft, ippBorderInMemRight modifiers.

pMorphSpec

Constant value to assign to pixels of the constant border. Thisparameter is applicable only to the ippBorderConst border
type.
Pointer to the morphology specification structure.

pBuffer

Pointer to the external buffer.

borderValue, borderValue[3],borderValue[4]

1072

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Description
Before using this function, you need to initialize the morphology specification structure using theippiMorphInit function.
This function calculates a morphological gradient of a rectangular ROI area inside a one-, three-, or fourchannel 2D image using a specified in the advanced morphology specification structure mask and anchor cell.
The result is equivalent to the subtraction of an opened source image from a closed source image.

NOTE
The function can only process a ROI that does not exceed the maximum width and heightroiSize specified by the initialization functions.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error condition when:••ippStsStepErr
ippStsNotEvenStepErr
ippStsBadArgErr

roiSize has a field with a zero or negative value
ROI width is more than ROI width passed to the initialization
function

Indicates an error condition when srcStep or dstStep is lessthan roiSize.width * <pixelSize>.
Indicates an error when one of the step values is not a multipleof an element size.
Indicates an error when borderType has an illegal value.

See Also
Regions of Interest in Intel IPP
User-defined Border Types
MorphInit Initializes the internal state or specification structure for advanced morphologicaloperations.
MorphGradientBorder
Calculates morphological gradient of an image.

IppStatus ippiMorphGradientBorder_<mod>(const Ipp<datatype>* pSrc, int srcStep,
Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, IppiBorderType borderType,Ipp<datatype> borderValue, const IppiMorphAdvState* pSpec, Ipp8u* pBuffer);
Supported values for mod:8u_C1R 16u_C1R 16s_C1R 32f_C1R
IppStatus ippiMorphGradientBorder_<mod>(const Ipp<datatype>* pSrc, int srcStep,
Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, IppiBorderType borderType, const
Ipp<datatype> borderValue[3], const IppiMorphAdvState* pSpec, Ipp8u* pBuffer);
Supported values for mod:8u_C3R

32f_C3R

1073

1Intel® Integrated Performance Primitives Developer Guide and Reference

IppStatus ippiMorphGradientBorder_<mod>(const Ipp<datatype>* pSrc, int srcStep,
Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, IppiBorderType borderType, const
Ipp<datatype> borderValue[4], const IppiMorphAdvState* pSpec, Ipp8u* pBuffer);
Supported values for mod:8u_C4R

32f_C4R

IppStatus ippiMorphGradientBorder_8u_C1R(const Ipp8u* pSrc, int srcStep, int
srcBitOffset, Ipp8u* pDst, int dstStep, int dstBitOffset, IppiSize roiSize,
IppiBorderType borderType, Ipp8u borderValue, const IppiMorphAdvState* pSpec, Ipp8u*
pBuffer);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc

Pointer to the source image ROI.

srcStep

Distance in bytes between starts of consecutive lines in the source
image.

pDst

Pointer to the destination image ROI.

dstStep

Distance in bytes between starts of consecutive lines in the destination
image.

roiSize

Size of the source and destination image ROI.

borderType

Type of border; the possible value is ippBorderRepl, which meansthat a replicated border is used.

srcBitOffset

Offset, in bits, from the first byte of the source image.

dstBitOffset

Offset, in bits, from the first byte of the destination image.

pSpec

Pointer to the specification structure.

pBuffer

Pointer to the external work buffer.

borderValue, borderValue[3],borderValue[4]Constant value to assign to pixels of the constant border. Thisparameter is applicable only to the ippBorderConst border type.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function calculates a morphological gradient of a rectangular ROI area inside a one-, three-, or fourchannel 2D image using a specified in the advanced morphology specification structure mask and anchor cell.
The structure must be initialized by MorphAdvInit beforehand.
The result is equivalent to the subtraction of an opened source image from a closed source image.

1074

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

NOTE
The function can process only images with ROI that does not exceed the maximum widthand height roiSize specified by the initialization functions.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

ippStsStepErr
ippStsNotEvenStepErr
ippStsBorderErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointers is
NULL.
Indicates an error condition if roiSize has a field with a zero or
negative value, or if one of ROI width or height is greater thancorresponding size of ROI passed to the initialization functions.
Indicates an error condition if srcStep or dstStep is less thanroiSize.width * <pixelSize>.
Indicates an error condition if one of the step values is notdivisible by 4 for floating-point images.
Indicates an error condition if borderType has an illegal value.

See Also
MorphAdvInit Initializes the specification structure for advanced morphological operations.
MorphOpen
Opens an image.

SyntaxIppStatus ippiMorphOpen_16u_C1R_L(const Ipp16u* pSrc, IppSizeL srcStep, Ipp16u* pDst,
IppSizeL dstStep, IppiSizeL roiSize, IppiBorderType borderType, const Ipp16u
borderValue[1], const IppiMorphAdvStateL* pMorphSpec, Ipp8u* pBuffer );IppStatus ippiMorphOpen_16s_C1R_L(const Ipp16s* pSrc, IppSizeL srcStep, Ipp16s* pDst,
IppSizeL dstStep, IppiSizeL roiSize, IppiBorderType borderType, const Ipp16s
borderValue[1], const IppiMorphAdvStateL* pMorphSpec, Ipp8u* pBuffer );IppStatus ippiMorphOpen_1u_C1R_L(const Ipp8u* pSrc, IppSizeL srcStep, int srcBitOffset,
Ipp8u* pDst, IppSizeL dstStep, int dstBitOffset, IppiSizeL roiSize, IppiBorderTypeborderType, const Ipp8u borderValue[1], const IppiMorphAdvStateL* pMorphSpec, Ipp8u*
pBuffer );IppStatus ippiMorphOpen_8u_C1R_L(const Ipp8u* pSrc, IppSizeL srcStep, Ipp8u* pDst,
IppSizeL dstStep, IppiSizeL roiSize, IppiBorderType borderType, const Ipp8u
borderValue[1], const IppiMorphAdvStateL* pMorphSpec, Ipp8u* pBuffer );IppStatus ippiMorphOpen_8u_C3R_L(const Ipp8u* pSrc, IppSizeL srcStep, Ipp8u* pDst,
IppSizeL dstStep, IppiSizeL roiSize, IppiBorderType borderType, const Ipp8u
borderValue[3], const IppiMorphAdvStateL* pMorphSpec, Ipp8u* pBuffer );IppStatus ippiMorphOpen_8u_C4R_L(const Ipp8u* pSrc, IppSizeL srcStep, Ipp8u* pDst,
IppSizeL dstStep, IppiSizeL roiSize, IppiBorderType borderType, const Ipp8u
borderValue[4], const IppiMorphAdvStateL* pMorphSpec, Ipp8u* pBuffer );IppStatus ippiMorphOpen_32f_C1R_L(const Ipp32f* pSrc, IppSizeL srcStep, Ipp32f* pDst,
IppSizeL dstStep, IppiSizeL roiSize, IppiBorderType borderType, const Ipp32f
borderValue[1], const IppiMorphAdvStateL* pMorphSpec, Ipp8u* pBuffer);

1075

1

Intel® Integrated Performance Primitives Developer Guide and Reference

IppStatus ippiMorphOpen_32f_C3R_L(const Ipp32f* pSrc, IppSizeL srcStep, Ipp32f* pDst,
IppSizeL dstStep, IppiSizeL roiSize, IppiBorderType borderType, const Ipp32f
borderValue[3], const IppiMorphAdvStateL* pMorphSpec, Ipp8u* pBuffer );IppStatus ippiMorphOpen_32f_C4R_L(const Ipp32f* pSrc, IppSizeL srcStep, Ipp32f* pDst,
IppSizeL dstStep, IppiSizeL roiSize, IppiBorderType borderType, const Ipp32f
borderValue[4], const IppiMorphAdvStateL* pMorphSpec, Ipp8u* pBuffer );Include Files
ippcv_l.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc

Pointer to the source image ROI.

srcBitOffset

Distance, in bytes, between the starting points of consecutive
lines in the source image.
Offset, in bits, from the first byte of the source image row.

pDst

Pointer to the destination image ROI.

srcStep

dstBitOffset

Distance, in bytes, between the starting points of consecutive
lines in the destination image.
Offset, in bits, from the first byte of the destination image row.

roiSize

Size of the source and destination image ROI.

borderType

Type of border. Possible values are:dstStep

ippBorderDefault

The border is set to ippBorderConst withborderValue= MAX_VALUE, where
MAX_VALUE=IPP_MAX_8U/16U/16S/32F/1U

ippBorderRepl

Border is replicated from the edge pixels.

ippBorderMirror

Border pixels are mirrored from the source
image boundary pixels.

ippBorderConst

Values of all border pixels are set to a
constant.

ippBorderFirstStage You can use this border type together with
the ippBorderRepl, ippBorderMirror,
InMem
ippBorderConst, ippBorderDefault types
using the | operation. For the first stage,border pixels are obtained from the source
image pixels in memory. For the second
stage, the function uses the border typespecified with the | operation.

1076

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Mixed borders are also supported. They can be obtained by the bitwise
operation OR between any of the ippBorderRepl, ippBorderConst,
ippBorderDefault, or ippBorderMirror values and theippBorderInMemTop, ippBorderInMemBottom,
ippBorderInMemLeft, ippBorderInMemRight modifiers.

pMorphSpec

Constant value to assign to pixels of the constant border. Thisparameter is applicable only to the ippBorderConst border
type.
Pointer to the morphology specification structure.

pBuffer

Pointer to the external buffer.

borderValue, borderValue[3],borderValue[4]Description
Before using this function, you need to initialize the morphology specification structure using theippiMorphInit function.
This function operates with ROI.
This function performs opening of a rectangular ROI area inside a one-, three-, or four-channel 2D image
using the mask specified in the pMorphSpec structure.
The result is equivalent to successive dilation of the source image by the structured element (mask) anderosion by the reverted structured element.

NOTE
The function can only process a ROI that does not exceed the maximum width and heightroiSize specified by the initialization functions.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error condition when:••ippStsStepErr
ippStsNotEvenStepErr
ippStsBadArgErr

roiSize has a field with a zero or negative value
ROI width is more than ROI width passed to the initialization
function

Indicates an error condition when srcStep or dstStep is lessthan roiSize.width * <pixelSize>.
Indicates an error when one of the step values is not a multipleof an element size.
Indicates an error when borderType has an illegal value.

See Also
Regions of Interest in Intel IPP
User-defined Border Types
MorphInit Initializes the internal state or specification structure for advanced morphologicaloperations.

1077

1

Intel® Integrated Performance Primitives Developer Guide and Reference

MorphOpenBorder
Opens an image.

SyntaxIppStatus ippiMorphOpenBorder_<mod>(const Ipp<datatype>* pSrc, int srcStep,
Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, IppiBorderType borderType,Ipp<datatype> borderValue, const IppiMorphAdvState* pSpec, Ipp8u* pBuffer);
Supported values for mod:8u_C1R 16u_C1R 16s_C1R 32f_C1R
IppStatus ippiMorphOpenBorder_<mod>(const Ipp<datatype>* pSrc, int srcStep,
Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, IppiBorderType borderType, const
Ipp<datatype> borderValue[3], const IppiMorphAdvState* pSpec, Ipp8u* pBuffer);
Supported values for mod:8u_C3R

32f_C3R

IppStatus ippiMorphOpenBorder_<mod>(const Ipp<datatype>* pSrc, int srcStep,
Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, IppiBorderType borderType, const
Ipp<datatype> borderValue[4], const IppiMorphAdvState* pSpec, Ipp8u* pBuffer);
Supported values for mod:8u_C4R

32f_C4R

IppStatus ippiMorphOpenBorder_1u_C1R(const Ipp8u* pSrc, int srcStep, int srcBitOffset,
Ipp8u* pDst, int dstStep, int dstBitOffset, IppiSize roiSize, IppiBorderTypeborderType, Ipp8u borderValue, const IppiMorphAdvState* pSpec, Ipp8u* pBuffer);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc

Pointer to the source image ROI.

srcStep

Distance, in bytes, between the starting points of consecutive
lines in the source image.

srcBitOffset

Offset, in bits, from the first byte of the source image (for the 1u_C1R
flavor).

pDst

Pointer to the destination image ROI.

dstStep

Distance, in bytes, between the starting points of consecutive
lines in the destination image.

dstBitOffset
roiSize

1078

Offset, in bits, from the first byte of the destination image (for the

1u_C1R flavor).

Size of the source and destination image ROI.

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

borderType

Type of border. Possible values are:ippBorderRepl
ippBorderInMem

Border is replicated from the edge
pixels.
Border is obtained from the source
image pixels in memory.

pSpec

Constant value to assign to pixels of the constant border. Thisparameter is applicable only to the ippBorderConst border
type.
Pointer to the specification structure.

pBuffer

Pointer to the external buffer required for dilation operations.

borderValue, borderValue[3],borderValue[4]Description
Before using this function, you need to initialize the morphology specification structure by using

MorphAdvInit function.
This function operates with ROI.
This function performs opening of a rectangular ROI area inside a one-, three-, or four-channel 2D image
using the mask specified in the pSpec structure.
The result is equivalent to successive dilation of the source image by the structured element (mask) anderosion by the reverted structured element.

NOTE
The function can only process a ROI that does not exceed the maximum width and heightroiSize specified by the initialization functions.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error condition when:•••ippStsStepErr
ippStsNotEvenStepErr
ippStsBorderErr

roiSize has a field with a zero or negative value
one of the ROI width or height is more than the corresponding sizeof ROI passed to the initialization functions
srcBitOffset or dstBitOffset is less than zero

Indicates an error condition if srcStep or dstStep is less thanroiSize.width * <pixelSize>.
Indicates an error condition if one of the step values for 16-bit
integer images is not divisible by 2.
Indicates an error condition if borderType has an illegal value.

See Also
Regions of Interest in Intel IPP
User-defined Border Types
MorphAdvInit Initializes the specification structure for advanced morphological operations.

1079

1

Intel® Integrated Performance Primitives Developer Guide and Reference

MorphTophat
Performs top-hat operation on an image.

SyntaxIppStatus ippiMorphTophat_16u_C1R_L(const Ipp16u* pSrc, IppSizeL srcStep, Ipp16u* pDst,
IppSizeL dstStep, IppiSizeL roiSize, IppiBorderType borderType, const Ipp16u
borderValue[1], const IppiMorphAdvStateL* pMorthSpec, Ipp8u* pBuffer);
IppStatus ippiMorphTophat_16s_C1R_L(const Ipp16s* pSrc, IppSizeL srcStep, Ipp16s* pDst,
IppSizeL dstStep, IppiSizeL roiSize, IppiBorderType borderType, const Ipp16s
borderValue[1], const IppiMorphAdvStateL* pMorthSpec, Ipp8u* pBuffer);
IppStatus ippiMorphTophat_1u_C1R_L(const Ipp8u* pSrc, IppSizeL srcStep, int
srcBitOffset, Ipp8u* pDst, IppSizeL dstStep, int dstBitOffset, IppiSizeL roiSize,
IppiBorderType borderType, const Ipp8u borderValue[1], const IppiMorphAdvStateL*
pMorthSpec, Ipp8u* pBuffer);
IppStatus ippiMorphTophat_8u_C1R_L(const Ipp8u* pSrc, IppSizeL srcStep, Ipp8u* pDst,
IppSizeL dstStep, IppiSizeL roiSize, IppiBorderType borderType, const Ipp8u
borderValue[1], const IppiMorphAdvStateL* pMorthSpec, Ipp8u* pBuffer);
IppStatus ippiMorphTophat_8u_C3R_L(const Ipp8u* pSrc, IppSizeL srcStep, Ipp8u* pDst,
IppSizeL dstStep, IppiSizeL roiSize, IppiBorderType borderType, const Ipp8u
borderValue[3], const IppiMorphAdvStateL* pMorthSpec, Ipp8u* pBuffer);
IppStatus ippiMorphTophat_8u_C4R_L(const Ipp8u* pSrc, IppSizeL srcStep, Ipp8u* pDst,
IppSizeL dstStep, IppiSizeL roiSize, IppiBorderType borderType, const Ipp8u
borderValue[4], const IppiMorphAdvStateL* pMorthSpec, Ipp8u* pBuffer);
IppStatus ippiMorphTophat_32f_C1R_L(const Ipp32f* pSrc, IppSizeL srcStep, Ipp32f* pDst,
IppSizeL dstStep, IppiSizeL roiSize, IppiBorderType borderType, const Ipp32f
borderValue[1], const IppiMorphAdvStateL* pMorthSpec, Ipp8u* pBuffer);
IppStatus ippiMorphTophat_32f_C3R_L(const Ipp32f* pSrc, IppSizeL srcStep, Ipp32f* pDst,
IppSizeL dstStep, IppiSizeL roiSize, IppiBorderType borderType, const Ipp32f
borderValue[3], const IppiMorphAdvStateL* pMorthSpec, Ipp8u* pBuffer);
IppStatus ippiMorphTophat_32f_C4R_L(const Ipp32f* pSrc, IppSizeL srcStep, Ipp32f* pDst,
IppSizeL dstStep, IppiSizeL roiSize, IppiBorderType borderType, const Ipp32f
borderValue[4], const IppiMorphAdvStateL* pMorthSpec, Ipp8u* pBuffer);

Include Files
ippcv_l.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc

Pointer to the source image ROI.

srcBitOffset

Distance, in bytes, between the starting points of consecutive
lines in the source image.
Offset, in bits, from the first byte of the source image row.

pDst

Pointer to the destination image ROI.

srcStep1080

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

dstBitOffset

Distance, in bytes, between the starting points of consecutive
lines in the destination image.
Offset, in bits, from the first byte of the destination image row.

roiSize

Size of the source and destination image ROI.

borderType

Type of border. Possible values are:dstStep

ippBorderDefault

The border is set to ippBorderConst withborderValue= MAX_VALUE, where
MAX_VALUE=IPP_MAX_8U/16U/16S/32F/1U

ippBorderRepl

Border is replicated from the edge pixels.

ippBorderMirror

Border pixels are mirrored from the source
image boundary pixels.

ippBorderConst

Values of all border pixels are set to a
constant.

ippBorderFirstStage You can use this border type together with
the ippBorderRepl, ippBorderMirror,
InMem
ippBorderConst, ippBorderDefault types
using the | operation. For the first stage,border pixels are obtained from the source
image pixels in memory. For the second
stage, the function uses the border typespecified with the | operation.
Mixed borders are also supported. They can be obtained by the bitwise
operation OR between any of the ippBorderRepl, ippBorderConst,
ippBorderDefault, or ippBorderMirror values and theippBorderInMemTop, ippBorderInMemBottom,
ippBorderInMemLeft, ippBorderInMemRight modifiers.

pMorphSpec

Constant value to assign to pixels of the constant border. Thisparameter is applicable only to the ippBorderConst border
type.
Pointer to the morphology specification structure.

pBuffer

Pointer to the external buffer.

borderValue, borderValue[3],borderValue[4]Description
Before using this function, you need to initialize the morphology specification structure using theippiMorphInit function.
This function performs a top-hat operation on a rectangular ROI area inside a one-, three-, or four-channel
2D image using a specified in the advanced morphology state or specification structure mask and the anchorcell.
The result is equivalent to the opening the source image and following subtraction from the initial source
image.

1081

1Intel® Integrated Performance Primitives Developer Guide and Reference

NOTE
The function can only process a ROI that does not exceed the maximum width and heightroiSize specified by the initialization functions.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error condition when:••ippStsStepErr
ippStsNotEvenStepErr
ippStsBadArgErr

roiSize has a field with a zero or negative value
ROI width is more than ROI width passed to the initialization
function

Indicates an error condition when srcStep or dstStep is lessthan roiSize.width * <pixelSize>.
Indicates an error when one of the step values is not a multipleof an element size.
Indicates an error when borderType has an illegal value.

See Also
Regions of Interest in Intel IPP
User-defined Border Types
MorphInit Initializes the internal state or specification structure for advanced morphologicaloperations.
MorphTophatBorder
Performs top-hat operation on an image.

SyntaxCase 1: Operating with morphology state structure
IppStatus ippiMorphTophatBorder_<mod>(const Ipp<datatype>* pSrc, int srcStep,
Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, IppiBorderType borderType,Ipp<datatype> borderValue, const IppiMorphAdvState* pSpec, Ipp8u* pBuffer);
Supported values for mod:8u_C1R

32f_C1R

IppStatus ippiMorphTophatBorder_<mod>(const Ipp<datatype>* pSrc, int srcStep,
Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, IppiBorderType borderType, const
Ipp<datatype> borderValue[3], const IppiMorphAdvState* pSpec, Ipp8u* pBuffer);
Supported values for mod:8u_C3R1082

32f_C3R

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

IppStatus ippiMorphTophatBorder_<mod>(const Ipp<datatype>* pSrc, int srcStep,
Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, IppiBorderType borderType, const
Ipp<datatype> borderValue[4], const IppiMorphAdvState* pSpec, Ipp8u* pBuffer);
Supported values for mod:8u_C4R

32f_C4R

Case 2: Operating with morphology specification structure
IppStatus ippiMorphTophatBorder_<mod>(const Ipp<datatype>* pSrc, int srcStep,
Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, IppiBorderType borderType,Ipp<datatype> borderValue, const IppiMorphAdvState* pSpec, Ipp8u* pBuffer);
Supported values for mod:16u_C1R

16s_C1R

IppStatus ippiMorphTophatBorder_1u_C1R(const Ipp8u* pSrc, int srcStep, int
srcBitOffset, Ipp8u* pDst, int dstStep, int dstBitOffset, IppiSize roiSize,
IppiBorderType borderType, Ipp8u borderValue, const IppiMorphAdvState* pSpec, Ipp8u*
pBuffer);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
srcBitOffset

Pointer to the source image ROI.
Distance, in bytes, between the starting points of consecutive
lines in the source image.
Offset, in bits, from the first byte of the source image (for the
1u_C1R flavor).

pDst

Pointer to the destination image ROI.

dstStep

Distance, in bytes, between the starting points of consecutive
lines in the destination image.

dstBitOffset

Offset, in bits, from the first byte of the destination image (for the

1u_C1R flavor).

roiSize

Size of the source and destination image ROI.

borderType

Type of border. Possible values are:ippBorderRepl
ippBorderInMem

borderValue, borderValue[3],borderValue[4]Border is replicated from the edge
pixels.
Border is obtained from the source
image pixels in memory.

Constant value to assign to pixels of the constant border. Thisparameter is applicable only to the ippBorderConst border
type.

1083

1

Intel® Integrated Performance Primitives Developer Guide and ReferencepSpec

Pointer to the specification structure.

pBuffer

Pointer to the external buffer.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function performs a top-hat operation on a rectangular ROI area inside a one-, three-, or four-channel
2D image using a specified in the advanced morphology state or specification structure mask and the anchor
cell. The structure must be initialized by MorphAdvInit beforehand.
The result is equivalent to the opening the source image and following subtraction from the initial source
image.

NOTE
The function can process only images with ROI that does not exceed the maximum widthand height roiSize specified by the initialization functions.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

ippStsStepErr
ippStsNotEvenStepErr
ippStsBorderErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointers is
NULL.
Indicates an error condition if roiSize has a field with a zero or
negative value, or if one of ROI width or height is greater thancorresponding size of ROI passed to the initialization functions.
Indicates an error condition if srcStep or dstStep is less thanroiSize.width * <pixelSize>.
Indicates an error condition if one of the step values is notdivisible by 4 for floating-point images.
Indicates an error condition if borderType has an illegal value.

See Also
MorphAdvInit Initializes the specification structure for advanced morphological operations.
MorphGrayInit
Initializes morphology state structure for gray-kernel
morphology operations.

SyntaxIppStatus ippiMorphGrayInit_8u_C1R(IppiMorphGrayState_8u* pState, IppiSize roiSize,const Ipp32s* pMask, IppiSize maskSize, IppiPoint anchor);
IppStatus ippiMorphGrayInit_32f_C1R(IppiMorphGrayState_32f* pState, IppiSize roiSize,const Ipp32f* pMask, IppiSize maskSize, IppiPoint anchor);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h1084

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pStatePointer to the gray-kernel morphology state structure.

roiSize

Maximal size of the image ROI in pixels, that can be processed using
the allocated structure.

pMask

Pointer to the mask.

maskSize

Size of the mask in pixels.

anchorCoordinates of the anchor cell.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function initializes the gray-kernel morphology state structure pState in the external buffer. Its size
should be computed by the function MorphGrayGetSize. It is used by the functions GrayDilateBorder and
GrayErodeBorder that perform gray-kernel dilation and erosion of the source image pixels corresponding to
the specified pMask of size maskSize. The anchor cell anchor is positioned in the arbitrary point in the mask
and is used for positioning the mask.

WARNING
The structure can be used to process images with ROI that does not exceed the specified
maximum width and height roiSize.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsAnchorErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error when one of the specified pointers is NULL.
Indicates an error condition if maskSize or if roiSize has a fieldwith a zero or negative value.
Indicates an error if anchor is outside the mask.

MorphGrayGetSize
Computes the size of the gray-kernel morphology
state structure.

SyntaxIppStatus ippiMorphGrayGetSize_8u_C1R(IppiSize roiSize, const Ipp32s* pMask, IppiSize
maskSize, int* pSize);
IppStatus ippiMorphGrayGetSize_32f_C1R(IppiSize roiSize, const Ipp32f* pMask, IppiSize
maskSize, int* pSize);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h

1085

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters

pMask

Maximal size of the image ROI in pixels, that can be processedusing the allocated structure.
Pointer to the mask.

maskSize

Size of the mask in pixels.

pSize

Pointer to the size of the advanced morphology state structure.

roiSize

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function computes the size of the morphology state structure pState for gray-kernel dilation anderosion. This function should be run prior to the function MorphGrayInit.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error when one of the specified pointers is NULL.
Indicates an error condition if maskSize or if roiSize has a fieldwith a zero or negative value.

MorphReconstructGetBufferSize
Computes the size of the buffer for morphologicalreconstruction operation.

IppStatus ippiMorphReconstructGetBufferSize(IppiSize roiSize, IppDataType dataType, int
numChannels, int* pBufSize);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
roiSize

Maximal size of the image ROI in pixels, that can be processed using
the buffer.

dataType

Data type of the image.

numChannels

Number of channels in the image.

pBufSize

Pointer to the size of the work buffer (in bytes), returned by theippiMorphReconstructGetBufferSize function.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).

1086

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

This function computes the size of the buffer for the morphological reconstruction of the source image. Thisbuffer can be used by the functions MorphReconstructDilate and MorphReconstructErode.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pSize is NULL.
Indicates an error condition if roiSize has a field with a zero or
negative value.

MorphReconstructDilate
Reconstructs an image by dilation.

SyntaxIppStatus ippiMorphReconstructDilate_<mod>(const Ipp<datatype>* pSrc, int srcStep,
Ipp<datatype>* pSrcDst, int srcDstStep, IppiSize roiSize, Ipp8u* pBuffer, IppiNorm
norm);
Supported values for mod:8u_C1IR 16u_C1IR 64f_C1IR
IppStatus ippiMorphReconstructDilate_32f_C1IR(const Ipp32f* pSrc, int srcStep, Ipp32f*
pSrcDst, int srcDstStep, IppiSize roiSize, Ipp32f* pBuffer, IppiNorm norm);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc

Pointer to the source image ROI.

srcStep

Distance in bytes between starts of consecutive lines in the source
image.

pSrcDstPointer to the descreased and reconstructed image ROI.

srcDstStep

Distance in bytes between starts of consecutive lines in the decreased
and reconstructed image.

roiSize

Size of the source and destination image ROI.

norm

Type of norm to form the mask for dilation; the following values are
possible:

ippiNormInf

Infinity norm (8-connectivity, 3x3
rectangular mask).

ippiNormL1

L1 norm (4-connectivity, 3x3 cross mask).

1087

1

Intel® Integrated Performance Primitives Developer Guide and Reference

pBuffer

Pointer to the buffer.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function performs morphological reconstruction of the decreased source image by dilation [Vincent93].
The operation is performed in the working buffer whose size should be computed using the function
MorphReconstructGetBufferSize beforehand.
This operation enables detection of the regional maximums that can be used as markers for successive
watershed segmentation.
Example below shows how the morphological reconstruction can be used to build markers of objects withdifferent brightness. Some value (cap size) is subtracted from the initial image and then the subtracted
image is reconstructed to the initial one. Thresholding and opening complete the building of markers. The
figure below shows the results of these operations.
Building Markers for Segmentation by the Morphological Reconstruction

Return Values
ippStsNoErr
ippStsNullPtrErr

1088

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointers is
NULL.

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

ippStsSizeErr
ippStsStepErr
ippStsNotEvenStepErr
ippStsBadArgErr

Indicates an error condition if roiSize has a field with a zero or
negative value.
Indicates an error condition if srcStep or srcDstStep is lessthan roiSize.width * <pixelSize>.
Indicates an error condition if one of the step values is notdivisible by 4 for floating-point images.
Indicates an error condition if norm has an illegal value.

ExampleMorphReconstructErode
Reconstructs an image by erosion.

SyntaxIppStatus ippiMorphReconstructErode_<mod>(const Ipp<datatype>* pSrc, int srcStep,
Ipp<datatype>* pSrcDst, int srcDstStep, IppiSize roiSize, Ipp8u* pBuf, IppiNorm norm);
Supported values for mod:8u_C1IR 16u_C1IR 64f_C1IR
IppStatus ippiMorphReconstructErode_32f_C1IR(const Ipp32f* pSrc, int srcStep, Ipp32f*
pSrcDst, int srcDstStep, IppiSize roiSize, Ipp32f* pBuf, IppiNorm norm);

Include Files
ippcv.h.

Parameters
pSrc

Pointer to the source image ROI.

srcStep

Distance in bytes between starts of consecutive lines in the source
image.

pSrcDstPointer to the decreased and reconstructed image ROI.

srcDstStep

Distance in bytes between starts of consecutive lines in the decreased
and reconstructed image.

roiSize

Size of the source and destination image ROI.

norm

Type of norm to form the mask for dilation; the following values are
possible:pBuf

ippiNormInf

Infinity norm (8-connectivity, 3x3
rectangular mask).

ippiNormL1

L1 norm (4-connectivity, 3x3 cross mask).

Pointer to the buffer.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).

1089

1

Intel® Integrated Performance Primitives Developer Guide and ReferenceThis function performs morphological reconstruction of the increased source image by erosion [Vincent93].
The operation is performed in the working buffer whose size should be computed using the function
MorphReconstructGetBufferSize beforehand.
This operation enables detection of the regional minimums that can be used as markers for successive
watershed segmentation.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsStepErr
ippStsNotEvenStepErr
ippStsBadArgErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointers is
NULL.
Indicates an error condition if roiSize has a field with a zero or
negative value.
Indicates an error condition if srcStep or srcDstStep is lessthan roiSize.width * <pixelSize>.
Indicates an error condition if one of the step values is notdivisible by 4 for floating-point images.
Indicates an error condition if norm has an illegal value.

MorphSetMode
Sets the mask processing mode for advanced
morphological operations.

SyntaxIppStatus ippiMorphSetMode(int mode, IppiMorphAdvState* pMorphSpec);
IppStatus ippiMorphSetMode_L(int mode, IppiMorphAdvStateL* pMorphSpec);

Include Files
ippcv.hippcv_l.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parametersmode

Mask processing mode; supported values:
IPP_MORPH_DEFAULT Invert the mask
IPP_MORPH_MASK_NO_FLIP Do not invert the mask; use the samemask for the first and second stage.

pMorphSpec

Pointer to the specification structure for advanced
morphological operations.

Description
This function sets the mask processing mode for the second stage of an advanced morphological operation.
Before using this function, initialize the specification structure using the ippiMorphInit function.

1090

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Return Values
ippStsNoErr

Indicates no error.

ippStsNotSupportedModeErr

Indicates an error when mode has an invalid value.

ippStsNullPtrErr

Indicates an error when pMorphSpec is NULL.

See Also
MorphInit Initializes the internal state or specification structure for advanced morphologicaloperations.

Filtering Functions
This section describes the Intel® IPP image processing functions that perform linear and non-linear filtering
operations on an image.
You can use filtering in image processing operations like edge detection, blurring, noise removal, and featuredetection.
Most filtering functions operate with regions of interest (ROI). The size of the source image ROI is equal tothe destination image ROI size dstRoiSize. Most functions use different source and destination image
buffers. These functions are not in-place.

See Also
Regions of Interest in Intel IPP
Borders in Neighborhood Operations
Filtering functions described in this section perform neighborhood operations. They operate on theassumption that for each pixel to be processed, all neighborhood pixels required for the operation are alsoavailable.
The neighborhood for each given pixel is defined by the filter kernel (or mask) size and anchor cell position.
For more information about anchors and how to define the anchor cell position refer to Neighborhood
Operations.
As the following figure illustrates, if the input pixel is near the horizontal or vertical edge of the image, theoverlaid kernel may refer to neighborhood pixels that do not exist within the source image and are locatedoutside the image area.

The set of all boundary source image pixels that require such non-existent pixels to complete theneighborhood operation for the given kernel and anchor is shaded yellow, while the collection of all scanned
external pixels (called border pixels) is shaded gray.
If you want to apply some filtering operation to the whole source image, you must figure out what additional
border pixels are required for the operation, and define these non-existent pixels. To do this, you can use theIntel IPP functions ippiCopyConstBorder, ippiCopyReplicateBorder, or ippiCopyWrapBorder, which
fill the border of the extended image with the pixel values that you define, or you can apply your own
extension method.

1091

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Note
If the required border pixels are not defined prior to the filtering function call, you may get memory
violation errors.
If you want to apply the filtering operation to the part of the source image, or ROI, then the necessity ofextending the image area with border pixels depends on the ROI size and position within the image. The
figure below shows that if ROI does not cover yellow (internal boundary) pixels, then no external pixels arescanned, and border extension is not required.

If boundary pixels are part of ROI, you still need to extend some area of the source image.
To provide valid results of filtering operations, the application must check the following:••

ROI parameters passed to the filtering function have such values
All required neighborhood pixels actually exist in the image and define the missing pixels when necessary.

See Also
Neighborhood Operations
Regions of Interest in Intel IPP
User-defined Border Types
CopyConstBorder
CopyReplicateBorder
CopyWrapBorder

User-defined Border Types
Some of the Intel® IPP image processing functions operate on user-defined border types. It means that thevalues of border pixels are assigned in accordance with the borderType (or border) and borderValueparameters.
Intel® IPP supports the following border types:
•
•
•
•
•
•

Constant border
Replicated border
Mirrored border
Mirrored border with replication
Border in memory
Mixed borders1092

Developer Guide and Reference for Intel® Integrated Performance Primitives

1Constant BorderThis type of border corresponds to the ippBorderConst value in the IppiBorderType enumerator. Whenusing a constant border, values for all border pixels are set to the constant value that you specify in theborderValue parameter. In the figure below, this constant value is marked as V. Squares marked in red
correspond to pixels copied from the source image ROI.

Replicated BorderThis type of border corresponds to the ippBorderRepl value in the IppiBorderType enumerator. Whenusing a replicated border, values for border pixels are obtained from the source image boundary pixels, as
shown in the figure below. Squares marked in red correspond to pixels copied from the source image ROI.
Squares with green values correspond to border pixels, which are replicated from the boundary pixels of thesource image.

1093

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Mirrored BorderThis type of border corresponds to the ippBorderMirror value in the IppiBorderType enumerator. Whenusing a mirrored border, values for border pixels are obtained from the source image boundary pixels, as
shown in the figure below. Squares marked in red correspond to pixels copied from the source image ROI.
Squares with green values correspond to border pixels, which are mirrored from the source image pixels.

Mirrored Border with Replication
This type of border corresponds to the ippBorderMirrorR value in the IppiBorderType enumerator. Whenusing a mirrored border with replication, values for border pixels are obtained from the source image
boundary pixels, as shown in the figure below. Squares marked in red correspond to pixels copied from thesource image ROI. Squares with green values correspond to border pixels, which are mirrored from thesource image pixels. The difference of this border type from the mirrored border is that the anchor cell value
is replicated to the border pixels.

1094

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Border in Memory
This type of border corresponds to the ippBorderInMem value and its flags combinations in the
IppiBorderType enumerator. Use this border type if the ROI does not cover internal border pixels of thesource image. In this case, values for border pixels are obtained from the source image pixels in memory. In
the figure below, squares marked in red correspond to pixels copied from the source image ROI. Squares
with black values correspond to source image pixels in memory.

Several Intel IPP filters operate in two or more stages. For example, the ippiMorphOpenBorder function
performs filtering by applying the Erode and Dilate filters sequentially. You should note the following whensetting borders for multistage filters:••

If you set the ippBorderInMem value or its flags combinations, the function tries to access pixels outsideof image borders to get border pixels for each filtering stage. For example, the ippiMorphOpenBorderfunction uses two stages and with 5x5 mask will access floor(5/2)*2=4 pixels in each direction acrossthe current ROI.
If you set ippBorderFirstStageInMem, the function tries to access floor(5/2)=2 pixels outside of theimage borders to get pixels for the first stage of filtering. The second filter will use one of the following
border types to reconstruct image borders: ippBorderRepl, ippBorderConst, ippBorderMirror, or
ippBorderMirrorR. To specify the border type for the second and next stages, use the bitwise OR
operation between one of the listed above border types and ippBorderFirstStageInMem.

Mixed Borders
You can use mixed borders by using a bitwise OR operation between one of the ippBorderRepl,
ippBorderConst, ippBorderMirror, or ippBorderMirrorR types and any of the following border types:
ippBorderInMemTop, ippBorderInMemBottom, ippBorderInMemLeft, ippBorderInMemRight, or
ippBorderFirstStageInMem. In this case, values for border pixels are obtained from the source image
pixels in memory in the direction specified by the flag.
The figure below demonstrates the use of the ippBorderConst with the ippBorderInMemTop andippBorderInMemRight borders. Squares marked in red correspond to pixels copied from the source image,that is the source image ROI. As you can see from the figure, top and right border pixels are obtained fromthe source image pixels in memory, while the rest of the border pixels are set to the constant value V.

1095

1

Intel® Integrated Performance Primitives Developer Guide and Reference

NOTE
The combination of ippBorderInMem and its flags always has priority over any other border flags ortypes. For example, if you specify ippBorderFirstStageInMem|ippBorderRepl|
ippBorderInMemLeft, the left border will use InMem mode for each stage and other borders will use
InMem for the first stage and replication for remaining stages.
The figure below demonstrates the use of the ippBorderConst with the ippBorderInMemTop,
ippBorderInMemRight, and ippBorderFirstStageInMem flags for two-stage filtering with one pixel borderfor both stages.
••

First stage: squares marked in red correspond to pixels copied from the source image, which is thesource image ROI, and squares marked in blue correspond to ROI assigned to the first stage filter. As you
can see from the figure, the first stage enlarges ROI for top and right sides to consume more memory andprovide valid pixels for the second stage memory border.
Second stage: red squares and blue pixels correspond to resulting pixels from the first stage filter. Blue
pixels lie outside of the ROI providing border values for the second stage in top and right directions. Leftand bottom border pixels use the constant value V in accordance with the border flags combination.

1096

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

See Also
Regions of Interest in Intel IPP
Borders in Neighborhood Operations
Filters with Borders
This section describes Intel® IPP filtering functions that automatically create a required border and define
appropriate pixel values.

See Also
Regions of Interest in Intel IPP
FilterBilateral
Performs bilateral filtering of an image.

1097

1

Intel® Integrated Performance Primitives Developer Guide and Reference

SyntaxCase 1: Operation on pixel-order data
IppStatus ippiFilterBilateral_<mod>(const Ipp<srcdatatype>* pSrc, int srcStep,
Ipp<dstdatatype>* pDst, int dstStep, IppiSize dstRoiSize, IppiBorderType borderType,const Ipp<datatype> pBorderValue[1], const IppiFilterBilateralSpec* pSpec, Ipp8u*
pBuffer);
Supported values for mod:8u_C1R

32f_C1R

64f_C1R

IppStatus ippiFilterBilateral_<mod>(const Ipp<srcdatatype>* pSrc, int srcStep,
Ipp<dstdatatype>* pDst, int dstStep, IppiSize dstRoiSize, IppiBorderType borderType,const Ipp<datatype> pBorderValue[3], const IppiFilterBilateralSpec* pSpec, Ipp8u*
pBuffer);
Supported values for mod:8u_C3R

32f_C3R

64f_C3R

Case 2: Operation on planar data
IppStatus ippiFilterBilateral_<mod>(const Ipp<srcdatatype>* pSrc[3], int srcStep[3],Ipp<dstdatatype>* pDst[3], int dstStep[3], IppiSize dstRoiSize, IppiBorderTypeborderType, const Ipp<datatype> pBorderValue[3], const IppiFilterBilateralSpec* pSpec,
Ipp8u* pBuffer);
Supported values for mod:8u_P3R

32f_P3R

64f_P3R

Case 3: Operation on pixel-order data with platform-aware functions
IppStatus ippiFilterBilateral_<mod>(const Ipp<srcdatatype>* pSrc, IppSizeL srcStep,
Ipp<dstdatatype>* pDst, IppSizeL dstStep, IppiSizeL dstRoiSize, IppiBorderTypeborderType, const Ipp<datatype> pBorderValue[1], const IppiFilterBilateralSpec* pSpec,
Ipp8u* pBuffer);
Supported values for mod:8u_C1R_L

32f_C1R_L

64f_C1R_L

IppStatus ippiFilterBilateral_<mod>(const Ipp<srcdatatype>* pSrc, IppSizeL srcStep,
Ipp<dstdatatype>* pDst, IppSizeL dstStep, IppiSizeL dstRoiSize, IppiBorderTypeborderType, const Ipp<datatype> pBorderValue[3], const IppiFilterBilateralSpec* pSpec,
Ipp8u* pBuffer);
Supported values for mod:8u_C3R_L

1098

32f_C3R_L

64f_C3R_L

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Case 4: Operation on planar data with platform-aware functions
IppStatus ippiFilterBilateral_<mod>(const Ipp<srcdatatype>* pSrc[3], IppSizeL
srcStep[3], Ipp<dstdatatype>* pDst[3], IppSizeL dstStep[3], IppiSizeL dstRoiSize,
IppiBorderType borderType, const Ipp<datatype> pBorderValue[3], const
IppiFilterBilateralSpec* pSpec, Ipp8u* pBuffer);
Supported values for mod:8u_P3R_L

32f_P3R_L

64f_P3R_L

Case 5: Operation on pixel-order data with Threading Layer (TL) functions based on the Platform Aware
API
IppStatus ippiFilterBilateral_<mod>(const Ipp<srcdatatype>* pSrc, IppSizeL srcStep,
Ipp<dstdatatype>* pDst, IppSizeL dstStep, IppiSizeL dstRoiSize, IppiBorderTypeborderType, const Ipp<datatype> pBorderValue[1], const IppiFilterBilateralSpec_LT*
pSpec, Ipp8u* pBuffer);
Supported values for mod:8u_C1R_LT

32f_C1R_LT

64f_C1R_LT

IppStatus ippiFilterBilateral_<mod>(const Ipp<srcdatatype>* pSrc, IppSizeL srcStep,
Ipp<dstdatatype>* pDst, IppSizeL dstStep, IppiSizeL dstRoiSize, IppiBorderTypeborderType, const Ipp<datatype> pBorderValue[3], const IppiFilterBilateralSpec_LT*
pSpec, Ipp8u* pBuffer);
Supported values for mod:8u_C3R_LT

32f_C3R_LT

64f_C3R_LT

Case 6: Operation on planar data with Threading Layer (TL) functions based on the Platform Aware API
IppStatus ippiFilterBilateral_<mod>(const Ipp<srcdatatype>* pSrc[3], IppSizeL
srcStep[3], Ipp<dstdatatype>* pDst[3], IppSizeL dstStep[3], IppiSizeL dstRoiSize,
IppiBorderType borderType, const Ipp<datatype> pBorderValue[3], const
IppiFilterBilateralSpec_LT* pSpec, Ipp8u* pBuffer);
Supported values for mod:8u_P3R_LT

32f_P3R_LT

64f_P3R_LT

Case 7: Operation on pixel-order data with Threading Layer (TL) functions based on the Classic API
IppStatus ippiFilterBilateral_<mod>(const Ipp<srcdatatype>* pSrc, int srcStep,
Ipp<dstdatatype>* pDst, int dstStep, IppiSize dstRoiSize, IppiBorderType borderType,const Ipp<datatype> pBorderValue[1], const IppiFilterBilateralSpec_T* pSpec, Ipp8u*
pBuffer);
Supported values for mod:8u_C1R_T

32f_C1R_T

64f_C1R_T

1099

1

Intel® Integrated Performance Primitives Developer Guide and Reference

IppStatus ippiFilterBilateral_<mod>(const Ipp<srcdatatype>* pSrc, int srcStep,
Ipp<dstdatatype>* pDst, int dstStep, IppiSize dstRoiSize, IppiBorderType borderType,const Ipp<datatype> pBorderValue[3], const IppiFilterBilateralSpec_T* pSpec, Ipp8u*
pBuffer);
Supported values for mod:8u_C3R_T

32f_C3R_T

64f_C3R_T

Case 8: Operation on planar data with Threading Layer (TL) functions based on the Classic API
IppStatus ippiFilterBilateral_<mod>(const Ipp<srcdatatype>* pSrc[3], int srcStep[3],Ipp<dstdatatype>* pDst[3], int dstStep[3], IppiSize dstRoiSize, IppiBorderTypeborderType, const Ipp<datatype> pBorderValue[3], const IppiFilterBilateralSpec_T*
pSpec, Ipp8u* pBuffer);
Supported values for mod:8u_P3R_T

32f_P3R_T

64f_P3R_T

Include Files
ippi.hippi_l.hippi_tl.h

Domain Dependencies
Flavors declared in ippi.h:
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source image ROI.

srcStep

Distance, in bytes, between the starting points ofconsecutive lines in the source image.

pDst

Pointer to the destination image ROI.

dstStep

Distance, in bytes, between the starting points ofconsecutive lines in the destination image.

dstRoiSize

Size of the source and destination ROI in pixels.

borderType

Type of border. Possible values are:ippBorderConst Values of all border pixels are

set to constant.
ippBorderRepl Border is replicated from theedge pixels.
ippBorderInMem Border is obtained from thesource image pixels inmemory.

1100

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Mixed borders are also supported. They can beobtained by the bitwise operation OR between
ippBorderRepl and ippBorderInMemTop,
ippBorderInMemBottom, ippBorderInMemLeft,
ippBorderInMemRight.

pBorderValue

Constant value to assign to pixels of the constantborder. This parameter is applicable only to theippBorderConst border type.

pSpec

Pointer to the bilateral context structure.

pBuffer

Pointer to the work buffer.

Description
This function applies the bilateral filter with a square kernel to the source image. The linear dimension of thekernel is defined in the initialization function FilterBilateralInit. The bilateral context structure contains
the parameters of filtering.
Before using the ippiFilterBilateral function, compute the size of the bilateral context structure and theexternal buffer using the FilterBilateralGetBufferSize function and initialize the structure using theFilterBilateralInit function.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrc, pDst, pSpec, or pBuffer is NULL.

ippStsSizeErr
ippStsContextMatchErr
ippStsNotEvenStepErr
ippStsBorderErr

Indicates an error when dstRoiSize has a field with a zero or
negative value.
Indicates an error when the pSpec structure does not match
the function.
Indicates an error when one of the step values is not divisibleby 4 for floating-point images.
Indicates an error when borderType has an illegal value.

See Also
Regions of Interest in Intel IPP
User-defined Border Types
FilterBilateralGetBufferSize Computes the size of the bilateral context structure and the size of
the work buffer for bilateral filtering with user-defined borders.
FilterBilateralInit Initializes the bilateral context structure.
FilterBilateralGetBufferSize
Computes the size of the bilateral context structure
and the size of the work buffer for bilateral filteringwith user-defined borders.

SyntaxIppStatus ippiFilterBilateralGetBufferSize(IppiFilterBilateralType filter, IppiSize
dstRoiSize, int kernelWidthHeight, IppDataType dataType, int numChannels,
IppiDistanceMethodType distMethodType, int* pSpecSize, int* pBufferSize);

1101

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Platform-aware function
IppStatus ippiFilterBilateralGetBufferSize_L(IppiFilterBilateralType filter, IppiSizeL
dstRoiSize, IppSizeL kernelWidthHeight, IppDataType dataType, int numChannels,
IppiDistanceMethodType distMethodType, IppSizeL* pSpecSize, IppSizeL* pBufferSize);

Threading Layer (TL) function based on the Platform Aware API
IppStatus ippiFilterBilateralGetBufferSize_LT(IppiFilterBilateralType filter, IppiSizeL
dstRoiSize, IppSizeL kernelWidthHeight, IppDataType dataType, int numChannels,
IppiDistanceMethodType distMethodType, IppSizeL* pSpecSize, IppSizeL* pBufferSize);

Threading Layer (TL) function based on the Classic API
IppStatus ippiFilterBilateralGetBufferSize_T(IppiFilterBilateralType filter, IppiSize
dstRoiSize, int kernelWidthHeight, IppDataType dataType, int numChannels,
IppiDistanceMethodType distMethodType, int* pSpecSize, int* pBufferSize);

Include Files
ippi.hippi_l.hippi_tl.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
filterdstRoiSize
kernelWidthHeightdataType
numChannels
distMethodType

Type of the bilateral filter. Possible value is

ippiFilterBilateralGauss - Gaussian bilateral filter.

Size of the destination ROI in pixels.
Linear dimension of the square kernel. The value 1 corresponds
to the distance between two adjacent pixels.
Data type of the source and destination images. Possible values
are ipp8u, ipp32f, and ipp64f.
Number of channels in the images.
Method of defining the differences in intensity between pixels.
Depending on the number of channels in the image, possible
value are:numChannels value

Possible distMethodType values

1

ippDistNormL1

3

ippDistNormL1, ippDistNormL2.
pSpecSize

Pointer to the computed size of the specification structure.

pBufferSize

Pointer to the computed size of the external buffer.

Description
This function computes the size of the bilateral context structure and external work buffer for theFilterBilateral function. The results are stored in pSpecSize and pBufferSize.

1102

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Use the computed pBufferSize and pSpecSize values to allocate the memory using the ippMalloc orippsMalloc functions. The allocated memory can be freed only by the ippFree or ippsFree functions,
respectively. For more information about the memory allocation functions, refer to the "Support Functions"section of the Intel IPP Developer Reference, vol. 1.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error when pSpecSize or pBufferSize is NULL.

ippStsSizeErr
ippStsMaskSizeErr
ippStsNotSupportedModeErr

Indicates an error when dstRoiSize has a field with a zero or
negative value.
Indicates an error when kernelWidthHeight is less than, or
equal to zero.
Indicates an error when the filter or distMethodType value is
not supported.

ippStsDataTypeErr

Indicates an error when dataType has an illegal value.

ippStsNumChannelsErr

Indicates an error when numChannels has an illegal value.

See Also
FIlterBilateral Performs bilateral filtering of an image.
FilterBilateralInit Initializes the bilateral context structure.
FilterBilateralInit
Initializes the bilateral context structure.

SyntaxIppStatus ippiFilterBilateralInit(IppiFilterBilateralType filter, IppiSize dstRoiSize,
int kernelWidthHeight, IppDataType dataType, int numChannels, IppiDistanceMethodType
distMethod, Ipp64f valSquareSigma, Ipp64f posSquareSigma, IppiFilterBilateralSpec*
pSpec);

Platform-aware function
IppStatus ippiFilterBilateralInit_L(IppiFilterBilateralType filter, IppiSizeL
dstRoiSize, IppSizeL kernelWidthHeight, IppDataType dataType, int numChannels,
IppiDistanceMethodType distMethod, Ipp64f valSquareSigma, Ipp64f posSquareSigma,
IppiFilterBilateralSpec* pSpec);

Threading Layer (TL) function based on the Platform Aware API
IppStatus ippiFilterBilateralInit_LT(IppiFilterBilateralType filter, IppiSizeL
dstRoiSize, IppSizeL kernelWidthHeight, IppDataType dataType, int numChannels,
IppiDistanceMethodType distMethod, Ipp64f valSquareSigma, Ipp64f posSquareSigma,
IppiFilterBilateralSpec_LT* pSpec);

Threading Layer (TL) function based on the Classic API
IppStatus ippiFilterBilateralInit_T(IppiFilterBilateralType filter, IppiSize
dstRoiSize, int kernelWidthHeight, IppDataType dataType, int numChannels,
IppiDistanceMethodType distMethod, Ipp64f valSquareSigma, Ipp64f posSquareSigma,
IppiFilterBilateralSpec_T* pSpec);

Include Files
ippi.h1103

1Intel® Integrated Performance Primitives Developer Guide and Referenceippi_l.hippi_tl.h

Domain Dependencies
Flavors declared in ippi.h:
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
filterdstRoiSize
kernelWidthHeightdataType
numChannels
distMethod

valSquareSigma
posSquareSigma
pSpec

Type of the bilateral filter. Possible value is

ippiFilterBilateralGauss - Gaussian bilateral filter.

Size of the destination ROI in pixels.
Linear dimension of the square kernel. The value 1 corresponds
to the distance between two adjacent pixels.
Data type of the source and destination images. Possible values
are ipp8u, ipp32f, and ipp64f.
Number of channels in the images.
Method of defining the differences in intensity between pixels.
Depending on the number of channels in the image, possible
value are:numChannels value

Possible distMethod values

1

ippDistNormL1

3

ippDistNormL1, ippDistNormL2

Square of the range parameter, which controls smoothing
based on the differences in intensity between pixels.
Square of the spatial parameter, which controls smoothing
based on the geometric distance between pixels.
Pointer to the bilateral context structure.

Description
This function initializes the bilateral context structure pSpecSize for bilateral filtering. Before using thisfunction, compute the size of the context structure using the FilterBilateralGetBufferSize function.
The kernelWidthHeight parameter specifies the linear dimension of the square filter kernel. The value 1
corresponds to the distance between the centers of two adjacent pixels.
Coefficients of the bilateral filter kernel depend on their positions in the kernel and on the intensity value ofthe source image pixels lying in the kernel.
The value of the output pixel d is computed by the following formula:1104

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

For all indices i and j that fit within the square kernel
where
•
•

vij is the value (or channel values) of a pixel in the kernel with coordinates i and j
w1ij=Fun(valSquareSigma, Intensity Distance(vij, v00))•

The distMethodType parameter specifies the method of defining the differences in intensity between
pixels. FilterBilateral functions support two methods: ippDistNormL1, which defines the difference inintensity as the L1-norm, and ippDistNormL2, which defines the difference in intensity as the L2-norm.
w2ij=Fun(posSquareSigma, Geometric Distance(vij, v00)=sqrt(i*i+j*j))

Fun(S, I)=exp(-I*I/2*S)
where
•
•

S is valSquareSigma or posSquareSigma
I is the difference between pixel values or position

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error when pSpec is NULL.

ippStsSizeErr
ippStsMaskSizeErr

Indicates an error when dstRoiSize has a field with a zero or
negative value.
Indicates an error whenkernelWidthHeight is less than, or
equal to zero.

ippStsNotSupportedModeErr

Indicates an error when the filter or distMethod value is notsupported.

ippStsBadArgErr

Indicates an error when valSquareSigma or posSquareSigma is lessthan, or equal to zero.

ippStsNumChannelsErr

Indicates an error when numChannels has an illegal value.

See Also
Structures and Enumerators for Platform-Aware Functions
FilterBilateralGetBufferSize Computes the size of the bilateral context structure and the size of
the work buffer for bilateral filtering with user-defined borders.
FIlterBilateral Performs bilateral filtering of an image.
FilterBilateralBorderGetBufferSize
Computes the size of the bilateral context structure
and the size of the work buffer for bilateral filteringwith user-defined borders.

Syntax
Processing images of 32-bit sizes
IppStatus ippiFilterBilateralBorderGetBufferSize(IppiFilterBilateralType filter,
IppiSize dstRoiSize, int radius, IppDataType dataType, int numChannels,
IppiDistanceMethodType distMethodType, int* pSpecSize, int* pBufferSize);

Platform-aware function
IppStatus ippiFilterBilateralBorderGetBufferSize_L(IppiFilterBilateralType filter,
IppiSizeL dstRoiSize, int radius, IppDataType dataType, int numChannels,
IppiDistanceMethodType distMethodType, IppSizeL* pSpecSize, IppSizeL* pBufferSize);
1105

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Threading layer function
IppStatus ippiFilterBilateralBorderGetBufferSize_LT(IppiFilterBilateralType filter,
IppiSizeL dstRoiSize, int radius, IppDataType dataType, int numChannels,
IppiDistanceMethodType distMethodType, IppSizeL* pSpecSize, IppSizeL* pBufferSize);

Include Files
ippi.h
Flavors with the _LT suffix: ippi_tl.h
Flavors with the _L suffix: ippi_l.h

Domain Dependencies
Flavors declared in ippi.h:
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib
Flavors declared in ippi_tl.h:
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib, ippcore_tl.lib, ippi_tl.lib

Parameters
filterType of the bilateral filter. Possible value is
ippiFilterBilateralGauss - Gaussian bilateral filter.

dstRoiSize

Size of the destination ROI in pixels.

radiusdataType

Radius of the round kernel. The radius value equal to 1
corresponds to distance between the closest pixels.
Data type of the source and destination images. Possible values
are ipp8u and ipp32f.

numChannels

Number of channels in the images.

distMethodType

Method of defining intensive distance between pixels. Possible
value is ippDistNormL1.

pSpecSize

Pointer to the computed size of the specification structure.

pBufferSize

Pointer to the computed size of the external buffer.

Description
This function computes the size of the bilateral context structure and external work buffer for theFilterBilateralBorder function. The results are stored in pSpecSize and pBufferSize.
Use the computed pBufferSize and pSpecSize values to allocate the memory using the ippMalloc orippsMalloc functions. The allocated memory can be freed only by the ippFree or ippsFree functions,
respectively. For more information about the memory allocation functions, refer to the "Support Functions"section of the Intel IPP Developer Reference, vol. 1.
For an example on how to use this function, refer to the example provided with theFilterBilateralBorder function description.

Return Values
ippStsNoErr

1106

Indicates no error. Any other value indicates an error.

Developer Guide and Reference for Intel® Integrated Performance Primitives

ippStsNullPtrErr
ippStsSizeErr
ippStsMaskSizeErr

1

Indicates an error when pSpecSize or pBufferSize is NULL.
Indicates an error when dstRoiSize has a field with a zero or
negative value.
Indicates an error when radius is less than, or equal to zero.

ippStsNotSupportedModeErr

Indicates an error when the filter or distMethodType value is
not supported.

ippStsDataTypeErr

Indicates an error when dataType has an illegal value.

ippStsNumChannelsErr

Indicates an error when numChannels has an illegal value.

See Also
FilterBilateralBorder Performs bilateral filtering of an image.
FilterBilateralBorderInit
Initializes the bilateral context structure.

SyntaxIppStatus ippiFilterBilateralBorderInit(IppiFilterBilateralType filter, IppiSize
dstRoiSize, int radius, IppDataType dataType, int numChannels, IppiDistanceMethodType
distMethod, Ipp32f valSquareSigma, Ipp32f posSquareSigma, IppiFilterBilateralSpec*
pSpec);

Platform-aware function
IppStatus ippiFilterBilateralBorderInit_L(IppiFilterBilateralType filter, IppiSizeL
dstRoiSize, int radius, IppDataType dataType, int numChannels, IppiDistanceMethodType
distMethod, Ipp32f valSquareSigma, Ipp32f posSquareSigma, IppiFilterBilateralSpec*
pSpec);

Threading layer function
IppStatus ippiFilterBilateralBorderInit_LT(IppiFilterBilateralType filter, IppiSizeL
dstRoiSize, int radius, IppDataType dataType, int numChannels, IppiDistanceMethodType
distMethod, Ipp32f valSquareSigma, Ipp32f posSquareSigma, IppiFilterBilateralSpec_LT*
pSpec);

Include Files
ippi.h
Flavors with the _LT suffix: ippi_tl.h
Flavors with the _L suffix: ippi_l.h

Domain Dependencies
Flavors declared in ippi.h:
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib
Flavors declared in ippi_tl.h:
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib, ippcore_tl.lib, ippi_tl.lib

1107

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Parameters
filterType of the bilateral filter. Possible value is
ippiFilterBilateralGauss - Gaussian bilateral filter.

dstRoiSize

Size of the destination ROI in pixels.

radiusdataType

Radius of the round kernel. The radius value equal to 1
corresponds to distance between the closest pixels.
Data type of the source and destination images. Possible values
are ipp8u and ipp32f.

numChannels

Number of channels in the images.

distMethod

Method of defining intensive distance between pixels. Possible
value is ippDistNormL1.

valSquareSigma

Square of the sigma for intensive distance between pixels.

posSquareSigma

Square of the sigma for geometric distance between pixels.

pSpec

Pointer to the bilateral context structure.

Description
This function initializes the bilateral context structure pSpecSize for bilateral filtering. Before using thisfunction, compute the size of the context structure using the FilterBilateralBorderGetBufferSize
function.
The radius parameter specifies the radius of the round filter kernel. The radius value equal to 1 corresponds
to the distance between centers of the closest pixels.
Coefficients of the bilateral filter kernel depend on their positions in the kernel and on the intensity value ofthe source image pixels lying in the kernel.
The value of the output pixel d is computed by the following formula:

For all i and j that i*i+j*j<=radius*radius (for central pixel of the kernel i=0, j=0)
where
•
•

vij is the value (or channel values) of a pixel in the kernel with coordinates i and j
w1ij=Fun(valSquareSigma, Intensity Distance(vij, v00))•

The distMethodType parameter specifies the method of defining the intensive distance between pixels.
Currently the only supported method is ippDistNormL1, which defines the intensive distance as norma
L1.
w2ij=Fun(posSquareSigma, Geometric Distance(vij, v00)=sqrt(i*i+j*j))

Fun(S, I)=exp(-I*I/2*S)
where
•
•

S is valSquareSigma or posSquareSigma
I is the difference between pixel values or position1108

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

For an example on how to use this function, refer to the example provided with theFilterBilateralBorder function description.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error when pSpec is NULL.

ippStsSizeErr
ippStsMaskSizeErr

Indicates an error when dstRoiSize has a field with a zero or
negative value.
Indicates an error whenradius is less than, or equal to zero.

ippStsNotSupportedModeErr

Indicates an error when the filter or distMethod value is notsupported.

ippStsBadArgErr

Indicates an error when valSquareSigma or posSquareSigma is lessthan, or equal to zero.

ippStsNumChannelsErr

Indicates an error when numChannels has an illegal value.

See Also
FilterBilateralBorderGetBufferSize Computes the size of the bilateral context structure and thesize of the work buffer for bilateral filtering with user-defined borders.
FilterBilateralBorder Performs bilateral filtering of an image.
FilterBilateralBorder
Performs bilateral filtering of an image.

Syntax
Processing images of 32-bit sizes
IppStatus ippiFilterBilateralBorder_<mod>(const Ipp<srcdatatype>* pSrc, int srcStep,
Ipp<dstdatatype>* pDst, int dstStep, IppiSize dstRoiSize, IppiBorderType borderType,Ipp<datatype>* pBorderValue, IppiFilterBilateralSpec* pSpec, Ipp8u* pBuffer);
Supported values for mod:8u_C1R

8u_C3R

32f_C1R

32f_C3R

Platform-aware functions
IppStatus ippiFilterBilateralBorder_<mod>(const Ipp<srcdatatype>* pSrc, IppSizeL
srcStep, Ipp<dstdatatype>* pDst, IppSizeL dstStep, IppiSizeL dstRoiSize, IppiBorderTypeborderType, Ipp<datatype>* pBorderValue, const IppiFilterBilateralSpec* pSpec, Ipp8u*
pBuffer);
Supported values for mod:8u_C1R_L

8u_C3R_L

1109

1Intel® Integrated Performance Primitives Developer Guide and Reference

Threading layer functions
IppStatus ippiFilterBilateralBorder_<mod>(const Ipp<srcdatatype>* pSrc, IppSizeL
srcStep, Ipp<dstdatatype>* pDst, IppSizeL dstStep, IppiSize dstRoiSize, IppiBorderTypeborderType, Ipp<datatype>* pBorderValue, IppiFilterBilateralSpec_LT* pSpec, Ipp8u*
pBuffer);
Supported values for mod:8u_C1R_L

8u_C3R_L

Include Files
ippi.h
Flavors with the _LT suffix: ippi_tl.h
Flavors with the _L suffix: ippi_l.h

Domain Dependencies
Flavors declared in ippi.h:
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib
Flavors declared in ippi_tl.h:
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib, ippcore_tl.lib, ippi_tl.lib

Parameters
pSrc

Pointer to the source image ROI.

srcStep

Distance, in bytes, between the starting points ofconsecutive lines in the source image.

pDst

Pointer to the destination image ROI.

dstStep

Distance, in bytes, between the starting points ofconsecutive lines in the destination image.

dstRoiSize

Size of the source and destination ROI in pixels.

borderType

Type of border. Possible values are:ippBorderConst Values of all border pixels are

set to constant.
ippBorderRepl Border is replicated from theedge pixels.
ippBorderInMem Border is obtained from thesource image pixels inmemory.
Mixed borders are also supported. They can beobtained by the bitwise operation OR between
ippBorderRepl and ippBorderInMemTop,
ippBorderInMemBottom, ippBorderInMemLeft,
ippBorderInMemRight.

1110

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

pBorderValue

Constant value to assign to pixels of the constantborder. This parameter is applicable only to theippBorderConst border type.

pSpec

Pointer to the bilateral context structure.

pBuffer

Pointer to the work buffer.

Description
This function applies the bilateral filter with the round kernel to the source image. The radius of the kernel isdefined in the corresponding initialization function FilterBilateralBorderInit. The bilateral context structure
contains the parameters of filtering.
Before using the ippiFilterBilateralBorder function, compute the size of the bilateral context structure
and the external buffer using the FilterBilateralBorderGetBufferSize function and initialize the structure using
the FilterBilateralBorderInit function.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrc, pDst, pSpec, or pBuffer is NULL.

ippStsSizeErr
ippStsContextMatchErr
ippStsNotEvenStepErr
ippStsBorderErr

Indicates an error when dstRoiSize has a field with a zero or
negative value.
Indicates an error when the pSpec structure does not match
the function.
Indicates an error when one of the step values is not divisibleby 4 for floating-point images.
Indicates an error when borderType has an illegal value.

ExampleSee Also
Regions of Interest in Intel IPP
User-defined Border Types
FilterBilateralBorderGetBufferSize Computes the size of the bilateral context structure and thesize of the work buffer for bilateral filtering with user-defined borders.
FilterBilateralBorderInit Initializes the bilateral context structure.
FilterBoxBorderGetBufferSize
Computes the size of the external buffer for theFilterBoxBorder function.

SyntaxIppStatus ippiFilterBoxBorderGetBufferSize (IppiSize roiSize, IppiSize maskSize,
IppDataType dataType, int numChannels, int* pBufferSize);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h

1111

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
roiSize

Maximum size of the destination image ROI.

maskSize

Size of the filter mask, in pixels.

dataType

Data type of the image. Possible values are ipp8u, ipp16u, ipp16s,
or ipp32f.

numChannels

Number of channels in the image. Possible values are 1, 3, or 4.

pBufferSize

Pointer to the size of the external work buffer.

Description
The ippiFilterBoxBorderGetBufferSize function computes the size, in bytes, of the external work buffer
needed for the ippiFilterBoxBorder function. The result is stored in the pBufferSize parameter.
For an example on how to use this function, see the code example provided with the ippiFilterBoxBorderfunction description.

Return Values
ippStsNoErr

Indicates no error.

ippStsSizeErr

Indicates an error when roiSize is negative, or equal to zero.

ippStsMaskSizeErr

Indicates an error when mask has an illegal value.

ippStsDataTypeErr

Indicates an error when dataType has an illegal value.

ippStsNumChannelsError

Indicates an error when numChannels has an illegal value.

See Also
FilterBoxBorder Blurs an image using a simple box filter.
FilterBoxBorder
Blurs an image using a simple box filter.

SyntaxIppStatus ippiFilterBoxBorder_<mod>(const Ipp<datatype>* pSrc, int srcStep,
Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, IppiSize maskSize, IppiBorderTypeborder, const Ipp<datatype>* borderValue, Ipp8u* pBuffer);
Supported values for mod:8u_C1R

16u_C1R

16s_C1R

32f_C1R

IppStatus ippiFilterBoxBorder_<mod>(const Ipp<datatype>* pSrc, int srcStep,
Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, IppiSize maskSize, IppiBorderTypeborder, const Ipp<datatype> borderValue[3], Ipp8u* pBuffer);
Supported values for mod:8u_C3R1112

16u_C3R

16s_C3R

16u_C4R

16s_C4R

16u_AC4R

16s_AC4R

32f_C3R

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

IppStatus ippiFilterBoxBorder_<mod>(const Ipp<datatype>* pSrc, int srcStep,
Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, IppiSize maskSize, IppiBorderTypeborder, const Ipp<datatype> borderValue[4], Ipp8u* pBuffer);
Supported values for mod:8u_C4R

32f_C4R

8u_AC4R

32f_AC4R

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source image.

srcStep

Distance, in bytes, between the starting points ofconsecutive lines in the source image.

pDst

Pointer to the destination image.

dstStep

Distance, in bytes, between the starting points ofconsecutive lines in the destination image.

roiSize

Size of the destination ROI in pixels.

maskSize

Size of the mask in pixels.

borderType of border. Possible values are:ippBorderConst Values of all border pixels are

set to constant.
Borderis replicated from theippBorderRepl
edge pixels.
ippBorderInMem Border is obtained from thesource image pixels inmemory.
ippBorderMirro Border pixels are mirroredfrom the source imagerboundary pixels.
Mixed borders are also supported. They can beobtained by the bitwise operation OR between
ippBorderRepl and ippBorderInMemTop,
ippBorderInMemBottom, ippBorderInMemLeft,
ippBorderInMemRight.

borderValue

Constant value to assign to pixels of the constantborder. This parameter is applicable only to theippBorderConst border type.

1113

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Pointer to the work buffer.

pBuffer

Description
Before using this function, you need to compute the size of the work buffer pBuffer using theippiFilterBoxBorderGetBufferSize function.
This function operates with ROI.
This function sets each pixel in the destination image as the average of all pixels of the source image in therectangular neighborhood of size maskSize with the anchor cell at that pixel. This has the effect ofsmoothing or blurring the input image. To ensure valid operation when image boundary pixels are processed,
the application must correctly define additional border pixels. If pSrc is equal to pDst,
ippiFilterBoxBorder operates as an in-place function.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrc or pDst is NULL.

ippStsMaskSizeErr

Indicates an error if roiSize has a field with zero or negativevalue.
Indicates an error if mask has an illegal value.

ippStsBorderErr

Indicates an error when border has an illegal value.

ippStsSizeErr

ExampleFilterBox
Blurs an image using a simple box filter.

SyntaxIppStatus ippiFilterBox_64f_C1R(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>*pDst, int dstStep, IppiSize dstRoiSize, IppiSize maskSize, IppiPoint anchor);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source image ROI.

srcStep

Distance in bytes between starts of consecutive lines in the source
image.

pDst

Pointer to the destination image ROI.

dstStep

Distance in bytes between starts of consecutive lines in the destination
image.

1114

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

dstRoiSize

Size of the destination ROI in pixels.

maskSize

Size of the mask in pixels.

anchorAnchor cell specifying the mask alignment with respect to the positionof the input pixel.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function sets each pixel in the destination image as the average of all the input image pixels in therectangular neighborhood of size maskSize with the anchor cell at that pixel. This has the effect ofsmoothing or blurring on the input image. To ensure valid operation when image boundary pixels areprocessed, the application must correctly define additional border pixels (see Borders in Neighborhood
Operations).

Return Values
ippStsNoErr
ippStsNullPtrErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error if pSrc, pDst, or pSrcDst is NULL.

ippStsAnchorErr

Indicates an error if dstRoiSize has a field with zero or
negative value.
Indicates an error if srcStep or dstStep has a zero or negativevalue.
Indicates an error if maskSize has a field with zero or negativevalue.
Indicates an error if anchor is outside the mask size.

ippStsMemAllocErr

Indicates a memory allocation error.

ippStsSizeErr
ippStsStepErr
ippStsMaskSizeErr

FilterGaussianBorder
Performs Gaussian filtering of an image with userdefined borders.

SyntaxIppStatus ippiFilterGaussianBorder_<mod>(const Ipp<datatype>* pSrc, int srcStep,
Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, Ipp<datatype> borderValue,
IppFilterGaussianSpec* pSpec, Ipp8u* pBuffer);
Supported values for mod:8u_C1R

16u_C1R

16s_C1R

32f_C1R

IppStatus ippiFilterGaussianBorder_<mod>(const Ipp<datatype>* pSrc, int srcStep,
Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, Ipp<datatype> borderValue[3],IppFilterGaussianSpec* pSpec, Ipp8u* pBuffer);
Supported values for mod:8u_C3R

16u_C3R

16s_C3R

32f_C3R

Include Files
ippcv.h1115

1Intel® Integrated Performance Primitives Developer Guide and Reference

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc

Pointer to the source image ROI.

srcStep

Distance, in bytes, between the starting points of consecutive lines inthe source image.

pDst

Pointer to the destination image ROI.

dstStep

Distance, in bytes, between the starting points of consecutive lines inthe destination image.

roiSize

Size of the source and destination image ROI in pixels.

borderValue

Constant value to assign to pixels of the constant border. Thisparameter is applicable only to the ippBorderConst border type.

pSpec

Pointer to the Gaussian specification structure.

pBuffer

Pointer to the work buffer.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function applies the Gaussian filter to the source image ROI pSrc. The kernel of the Gaussian filter isthe matrix of size kernelSizexkernelSize with the standard deviation sigma. The values of the Gaussian
kernel elements are computed by the FilterGaussianInit function. Elements of the kernel are normalized. The
anchor cell is the center of the kernel.
Before using the ippiFilterGaussianBorder function, compute the size of the Gaussian specification
structure and the external buffer using the FilterGaussianGetBufferSize function and initialize the structureusing the FilterGaussianInit function.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsSizeErr
ippStsStepErr

Indicates an error when roiSize has a field with a zero or
negative value.
Indicates an error when srcStep or dstStep is less thanroiSize.width*<pixelSize>.

ippStsNotEvenStepErr

Indicates an error when one of the step values is not divisibleby sizeof(Ipp<dataType>).

ippStsBorderErr

Indicates an error when borderType has an illegal value.

ippStsBadArgErr

Indicates an error when kernelSize is even, or less than 3.

ExampleSee Also
Regions of Interest in Intel IPP
1116

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

User-defined Border Types
FilterGaussianGetBufferSize Computes the size of the Gaussian specification structure and thesize of the external work buffer for Gaussian filtering with user-defined borders.
FilterGaussianInit Initializes the Gaussian context structure.
SumWindow
Sums pixel values in a rectangular area applied to an
image.

SyntaxIppStatus ippiSumWindow_8u32s_C1R(const Ipp8u* pSrc, int srcStep, Ipp32s* pDst, int
dstStep, IppiSize roiSize, IppiSize maskSize, IppiBorderType BorderType, const Ipp8u*
borderValue, Ipp8u* pBuffer);
IppStatus ippiSumWindow_8u32s_C3R(const Ipp8u* pSrc, int srcStep, Ipp32s* pDst, int
dstStep, IppiSize roiSize, IppiSize maskSize, IppiBorderType BorderType, const Ipp8u*
borderValue, Ipp8u* pBuffer);
IppStatus ippiSumWindow_8u32s_C4R(const Ipp8u* pSrc, int srcStep, Ipp32s* pDst, int
dstStep, IppiSize roiSize, IppiSize maskSize, IppiBorderType BorderType, const Ipp8u*
borderValue, Ipp8u* pBuffer);
IppStatus ippiSumWindow_8u32s_AC4R(const Ipp8u* pSrc, int srcStep, Ipp32s* pDst, int
dstStep, IppiSize roiSize, IppiSize maskSize, IppiBorderType BorderType, const Ipp8u*
borderValue, Ipp8u* pBuffer);
IppStatus ippiSumWindow_16s32f_C1R(const Ipp16s* pSrc, int srcStep, Ipp32f* pDst, int
dstStep, IppiSize roiSize, IppiSize maskSize, IppiBorderType BorderType, const Ipp16s*
borderValue, Ipp8u* pBuffer);
IppStatus ippiSumWindow_16s32f_C3R(const Ipp16s* pSrc, int srcStep, Ipp32f* pDst, int
dstStep, IppiSize roiSize, IppiSize maskSize, IppiBorderType BorderType, const Ipp16s*
borderValue, Ipp8u* pBuffer);
IppStatus ippiSumWindow_16s32f_C4R(const Ipp16s* pSrc, int srcStep, Ipp32f* pDst, int
dstStep, IppiSize roiSize, IppiSize maskSize, IppiBorderType BorderType, const Ipp16s*
borderValue, Ipp8u* pBuffer);
IppStatus ippiSumWindow_16s32f_AC4R(const Ipp16s* pSrc, int srcStep, Ipp32f* pDst, int
dstStep, IppiSize roiSize, IppiSize maskSize, IppiBorderType BorderType, const Ipp16s*
borderValue, Ipp8u* pBuffer);
IppStatus ippiSumWindow_16u32f_C1R(const Ipp16u* pSrc, int srcStep, Ipp32f* pDst, int
dstStep, IppiSize roiSize, IppiSize maskSize, IppiBorderType BorderType, const Ipp16u*
borderValue, Ipp8u* pBuffer);
IppStatus ippiSumWindow_16u32f_C3R(const Ipp16u* pSrc, int srcStep, Ipp32f* pDst, int
dstStep, IppiSize roiSize, IppiSize maskSize, IppiBorderType BorderType, const Ipp16u*
borderValue, Ipp8u* pBuffer);
IppStatus ippiSumWindow_16u32f_C4R(const Ipp16u* pSrc, int srcStep, Ipp32f* pDst, int
dstStep, IppiSize roiSize, IppiSize maskSize, IppiBorderType BorderType, const Ipp16u*
borderValue, Ipp8u* pBuffer);
IppStatus ippiSumWindow_16u32f_AC4R(const Ipp16u* pSrc, int srcStep, Ipp32f* pDst, int
dstStep, IppiSize roiSize, IppiSize maskSize, IppiBorderType BorderType, const Ipp16u*
borderValue, Ipp8u* pBuffer);

1117

1

Intel® Integrated Performance Primitives Developer Guide and Reference

IppStatus ippiSumWindow_32f_C1R(const Ipp32f* pSrc, int srcStep, Ipp32f* pDst, int
dstStep, IppiSize roiSize, IppiSize maskSize, IppiBorderType BorderType, const Ipp32f*
borderValue, Ipp8u* pBuffer);
IppStatus ippiSumWindow_32f_C3R(const Ipp32f* pSrc, int srcStep, Ipp32f* pDst, int
dstStep, IppiSize roiSize, IppiSize maskSize, IppiBorderType BorderType, const Ipp32f*
borderValue, Ipp8u* pBuffer);
IppStatus ippiSumWindow_32f_C4R(const Ipp32f* pSrc, int srcStep, Ipp32f* pDst, int
dstStep, IppiSize roiSize, IppiSize maskSize, IppiBorderType BorderType, const Ipp32f*
borderValue, Ipp8u* pBuffer);
IppStatus ippiSumWindow_32f_AC4R(const Ipp32f* pSrc, int srcStep, Ipp32f* pDst, int
dstStep, IppiSize roiSize, IppiSize maskSize, IppiBorderType BorderType, const Ipp32f*
borderValue, Ipp8u* pBuffer);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source image ROI.

srcStep

Distance in bytes between the starting points of consecutive lines inthe source image.

pDst

Pointer to the destination image ROI.

dstStep

Distance in bytes between the starting points of consecutive lines inthe destination image.

roiSize

Size of the destination ROI in pixels.

maskSize

Size of the mask in pixels.

BorderType

Type of border. Possible values are:ippBorderConst
ippBoderRepl
ippBorderInMem
ippBorderMirror

Values of all border pixels are set toconstant.
Border is replicated from the edge
pixels.
Border is obtained from the source
image pixels in memory.
Border pixels are mirrored from thesource image boundary pixels.

Mixed borders are also supported. They can be obtained by the bitwise
operation OR between any of the ippBorderRepl, ippBorderConst,
ippBorderMirror, and the ippBorderInMemTop,
ippBorderInMemBottom, ippBorderInMemLeft,
ippBorderInMemRight values.

1118

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

borderValue

Constant value to assign to border pixels. This parameter is applicable
only to the ippBorderConst border type.

pBuffer

Pointer to the work buffer.

Description
Before using this function, you need to compute the size of the work buffer pBuffer using the
SumWindowGetBufferSize function.
This function operates with ROI (see Regions of Interest in Intel IPP).
This function sets each pixel in the destination image ROI pDst to the sum of all the source image pixels in
the rectangular neighborhood of size maskSize with the anchor cell at the corresponding pixel in the source
image ROI pSrc. To ensure valid operation while processing the image boundary pixels, the application mustcorrectly define additional border pixels (see Borders in Neighborhood Operations).

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsMaskSizeErr
ippStsBorderErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error if pSrc or pDst is NULL.
Indicates an error if roiSize has a field with a zero or negativevalue.
Indicates an error if maskSize has a field with a zero or
negative value.
Indicates an error if BorderType has an illegal value.

SumWindowGetBufferSize
Computes the size of the external buffer for the
SumWindow function.

SyntaxIppStatus ippiSumWindowGetBufferSize(IppiSize roiSize, IppiSize maskSize, IppDataTypedataType, int numChannels, int* pBufferSize);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
roiSize

Maximum size of the destination ROI in pixels.

maskSize

Size of the filter mask in pixels.

dataType

Data type of the image. Possible values are: ipp8u, ipp16s, ipp16u,
and ipp32f

numChannels

Number of channels in the image. Possible values are 1, 3, and 4.

1119

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Pointer to the size, in bytes, of the external work buffer.

pBufferSize

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function computes the size, in bytes, of the external work buffer for the ippiSumWindow function. The
result is stored in the pBufferSize parameter.

Return Values
Indicates no error. Any other value indicates an error or awarning.
Indicates an error if roiSize has a field with a zero or negativevalue.

ippStsNoErr
ippStsSizeErr
ippStsMaskSizeErr

Indicates an error if maskSize has an illegal value.

ippStsDataTypeErr

Indicates an error if dataType has an illegal value.

ippStsNumChannelsError

Indicates an error if numChannels has an illegal value.

SumWindowRow
Sums pixel values in the row mask applied to theimage.

SyntaxIppStatus ippiSumWindowRow_<mod>(const Ipp<srcDatatype>* pSrc, int srcStep, Ipp32f*
pDst, int dstStep, IppiSize dstRoiSize, int maskSize, int anchor);
Supported values for mod:8u32f_C1R

16u32f_C1R

16s32f_C1R

8u32f_C3R

16u32f_C3R

16s32f_C3R

8u32f_C4R

16u32f_C4R

16s32f_C4R

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source image ROI.

srcStep

Distance in bytes between starts of consecutive lines in the source
image.

pDst

Pointer to the destination image ROI.

dstStep

Distance in bytes between starts of consecutive lines in the destination
image.

1120

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

dstRoiSize

Size of the destination ROI in pixels.

maskSize

Size of the horizontal row mask in pixels.

anchorAnchor cell specifying the row mask alignment with respect to theposition of the input pixel.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function sets each pixel in the destination image ROI pDst as the sum of all the source image pixels in
the horizontal row mask of size maskSize with the anchor cell anchor at the corresponding pixel in thesource image ROI pSrc. To ensure valid operation when image boundary pixels are processed, theapplication must correctly define additional border pixels (see Borders in Neighborhood Operations).

Return Values
ippStsNoErr
ippStsNullPtrErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error if pSrc, pDst is NULL.

ippStsAnchorErr

Indicates an error if dstRoiSize has a field with a zero or
negative value.
Indicates an error if maskSize has a field with a zero or
negative value.
Indicates an error if anchor is outside the mask size.

ippStsMemAllocErr

Indicates a memory allocation error.

ippStsSizeErr
ippStsMaskSizeErr

SumWindowColumn
Sums pixel values in the column mask applied to theimage.

SyntaxIppStatus ippiSumWindowColumn_<mod>(const Ipp<srcDatatype>* pSrc, int srcStep, Ipp32f*
pDst, int dstStep, IppiSize dstRoiSize, int maskSize, int anchor);
Supported values for mod:8u32f_C1R

16u32f_C1R

16s32f_C1R

8u32f_C3R

16u32f_C3R

16s32f_C3R

8u32f_C4R

16u32f_C4R

16s32f_C4R

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

1121

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Parameters
pSrc

Pointer to the source image ROI.

srcStep

Distance in bytes between starts of consecutive lines in the source
image.

pDst

Pointer to the destination image ROI.

dstStep

Distance in bytes between starts of consecutive lines in the destination
image.

dstRoiSize

Size of the destination ROI in pixels.

maskSize

Size of the vertical column mask in pixels.

anchorAnchor cell specifying the column mask alignment with respect to theposition of the input pixel.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function sets each pixel in the destination image ROI pDst as the sum of all the source image pixels inthe vertical column mask of size maskSize with the anchor cell anchor at the corresponding pixel in thesource image ROI pSrc. To ensure valid operation when image boundary pixels are processed, theapplication must correctly define additional border pixels (see Borders in Neighborhood Operations).

Return Values
ippStsNoErr
ippStsNullPtrErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error if pSrc, pDst is NULL.

ippStsAnchorErr

Indicates an error if dstRoiSize has a field with a zero or
negative value.
Indicates an error if maskSize has a field with a zero or
negative value.
Indicates an error if anchor is outside the mask size.

ippStsMemAllocErr

Indicates a memory allocation error.

ippStsSizeErr
ippStsMaskSizeErr

FilterMaxBorderGetBufferSize, FilterMinBorderGetBufferSize
Compute the size of the work buffer for the
maximum/minimum filter.

SyntaxIppStatus ippiFilterMaxBorderGetBufferSize(IppiSize dstRoiSize, IppiSize maskSize,
IppDataType dataType, int numChannels, int* pBufferSize);
IppStatus ippiFilterMinBorderGetBufferSize(IppiSize dstRoiSize, IppiSize maskSize,
IppDataType dataType, int numChannels, int* pBufferSize);

Include Files
ippi.h1122

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
dstRoiSize

Size of the destination ROI, in pixels.

maskSize

Size of the filter kernel.

dataType

Data type of the source and destination images.

numChannels

Number of channels in the image. Possible values are 1, 3, or4.

pBufferSize

Pointer to the size, in bytes, of the external buffer.

Description
The ippiFilterMaxBorderGetBufferSize and ippiFilterMinBorderGetBufferSize functions computethe size, in bytes, of the external work buffer for the ippiFilterMaxBorder and ippiFilterMinBorderfunctions, respectively. The result is stored in the pBufferSize parameter.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error when pBufferSize is NULL.

ippStsSizeErr
ippStsMaskSizeErr

Indicates an error when dstRoiSize has a field with a zero or
negative value.
Indicates an error when maskSize is less than, or e qual to
zero.

ippStsDataTypeErr

Indicates an error when dataType has an illegal value.

ippStsNumChannelErr

Indicates an error when numChannels has an illegal value.

See Also
FilterMaxBorder, FilterMinBorder Filter an image using the maximum/minimum filter.
FilterMaxBorder, FilterMinBorder
Filter an image using the maximum/minimum filter.

SyntaxCase 1: Operating on one-channel data
IppStatus ippiFilterMaxBorder_8u_C1R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int
dstStep, IppiSize dstRoiSize, IppiSize maskSize, IppiBorderType borderType, Ipp8u
borderValue, Ipp8u* pBuffer);
IppStatus ippiFilterMaxBorder_16s_C1R(const Ipp16s* pSrc, int srcStep, Ipp16s* pDst,
int dstStep, IppiSize dstRoiSize, IppiSize maskSize, IppiBorderType borderType, Ipp16s
borderValue, Ipp8u* pBuffer);
IppStatus ippiFilterMaxBorder_16u_C1R(const Ipp16u* pSrc, int srcStep, Ipp16u* pDst,
int dstStep, IppiSize dstRoiSize, IppiSize maskSize, IppiBorderType borderType, Ipp16u
borderValue, Ipp8u* pBuffer);

1123

1

Intel® Integrated Performance Primitives Developer Guide and Reference

IppStatus ippiFilterMaxBorder_32f_C1R(const Ipp32f* pSrc, int srcStep, Ipp32f* pDst,
int dstStep, IppiSize dstRoiSize, IppiSize maskSize, IppiBorderType borderType, Ipp32f
borderValue, Ipp8u* pBuffer);
IppStatus ippiFilterMinBorder_8u_C1R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int
dstStep, IppiSize dstRoiSize, IppiSize maskSize, IppiBorderType borderType, Ipp8u
borderValue, Ipp8u* pBuffer);
IppStatus ippiFilterMinBorder_16s_C1R(const Ipp16s* pSrc, int srcStep, Ipp16s* pDst,
int dstStep, IppiSize dstRoiSize, IppiSize maskSize, IppiBorderType borderType, Ipp16s
borderValue, Ipp8u* pBuffer);
IppStatus ippiFilterMinBorder_16u_C1R(const Ipp16u* pSrc, int srcStep, Ipp16u* pDst,
int dstStep, IppiSize dstRoiSize, IppiSize maskSize, IppiBorderType borderType, Ipp16u
borderValue, Ipp8u* pBuffer);
IppStatus ippiFilterMinBorder_32f_C1R(const Ipp32f* pSrc, int srcStep, Ipp32f* pDst,
int dstStep, IppiSize dstRoiSize, IppiSize maskSize, IppiBorderType borderType, Ipp32f
borderValue, Ipp8u* pBuffer);

Case 2: Operating on multi-channel data
IppStatus ippiFilterMaxBorder_8u_C3R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int
dstStep, IppiSize dstRoiSize, IppiSize maskSize, IppiBorderType borderType, const Ipp8u
pBorderValue[3], Ipp8u* pBuffer);
IppStatus ippiFilterMaxBorder_16s_C3R(const Ipp16s* pSrc, int srcStep, Ipp16s* pDst,
int dstStep, IppiSize dstRoiSize, IppiSize maskSize, IppiBorderType borderType, const
Ipp16s pBorderValue[3], Ipp8u* pBuffer);
IppStatus ippiFilterMaxBorder_16u_C3R(const Ipp16u* pSrc, int srcStep, Ipp16u* pDst,
int dstStep, IppiSize dstRoiSize, IppiSize maskSize, IppiBorderType borderType, const
Ipp16u pBorderValue[3], Ipp8u* pBuffer);
IppStatus ippiFilterMaxBorder_32f_C3R(const Ipp32f* pSrc, int srcStep, Ipp32f* pDst,
int dstStep, IppiSize dstRoiSize, IppiSize maskSize, IppiBorderType borderType, const
Ipp32f pBorderValue[3], Ipp8u* pBuffer);
IppStatus ippiFilterMaxBorder_8u_AC4R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int
dstStep, IppiSize dstRoiSize, IppiSize maskSize, IppiBorderType borderType, const Ipp8u
pBorderValue[3], Ipp8u* pBuffer);
IppStatus ippiFilterMaxBorder_16s_AC4R(const Ipp16s* pSrc, int srcStep, Ipp16s* pDst,
int dstStep, IppiSize dstRoiSize, IppiSize maskSize, IppiBorderType borderType, const
Ipp16s pBorderValue[3], Ipp8u* pBuffer);
IppStatus ippiFilterMaxBorder_16u_AC4R(const Ipp16u* pSrc, int srcStep, Ipp16u* pDst,
int dstStep, IppiSize dstRoiSize, IppiSize maskSize, IppiBorderType borderType, const
Ipp16u pBorderValue[3], Ipp8u* pBuffer);
IppStatus ippiFilterMaxBorder_32f_AC4R(const Ipp32f* pSrc, int srcStep, Ipp32f* pDst,
int dstStep, IppiSize dstRoiSize, IppiSize maskSize, IppiBorderType borderType, const
Ipp32f pBorderValue[3], Ipp8u* pBuffer);
IppStatus ippiFilterMaxBorder_8u_C4R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int
dstStep, IppiSize dstRoiSize, IppiSize maskSize, IppiBorderType borderType, const Ipp8u
pBorderValue[4], Ipp8u* pBuffer);
IppStatus ippiFilterMaxBorder_16s_C4R(const Ipp16s* pSrc, int srcStep, Ipp16s* pDst,
int dstStep, IppiSize dstRoiSize, IppiSize maskSize, IppiBorderType borderType, const
Ipp16s pBorderValue[4], Ipp8u* pBuffer);1124

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

IppStatus ippiFilterMaxBorder_16u_C4R(const Ipp16u* pSrc, int srcStep, Ipp16u* pDst,
int dstStep, IppiSize dstRoiSize, IppiSize maskSize, IppiBorderType borderType, const
Ipp16u pBorderValue[4], Ipp8u* pBuffer);
IppStatus ippiFilterMaxBorder_32f_C4R(const Ipp32f* pSrc, int srcStep, Ipp32f* pDst,
int dstStep, IppiSize dstRoiSize, IppiSize maskSize, IppiBorderType borderType, const
Ipp32f pBorderValue[4], Ipp8u* pBuffer);
IppStatus ippiFilterMinBorder_8u_C3R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int
dstStep, IppiSize dstRoiSize, IppiSize maskSize, IppiBorderType borderType, const Ipp8u
pBorderValue[3], Ipp8u* pBuffer);
IppStatus ippiFilterMinBorder_16s_C3R(const Ipp16s* pSrc, int srcStep, Ipp16s* pDst,
int dstStep, IppiSize dstRoiSize, IppiSize maskSize, IppiBorderType borderType, const
Ipp16s pBorderValue[3], Ipp8u* pBuffer);
IppStatus ippiFilterMinBorder_16u_C3R(const Ipp16u* pSrc, int srcStep, Ipp16u* pDst,
int dstStep, IppiSize dstRoiSize, IppiSize maskSize, IppiBorderType borderType, const
Ipp16u pBorderValue[3], Ipp8u* pBuffer);
IppStatus ippiFilterMinBorder_32f_C3R(const Ipp32f* pSrc, int srcStep, Ipp32f* pDst,
int dstStep, IppiSize dstRoiSize, IppiSize maskSize, IppiBorderType borderType, const
Ipp32f pBorderValue[3], Ipp8u* pBuffer);
IppStatus ippiFilterMinBorder_8u_AC4R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int
dstStep, IppiSize dstRoiSize, IppiSize maskSize, IppiBorderType borderType, const Ipp8u
pBorderValue[3], Ipp8u* pBuffer);
IppStatus ippiFilterMinBorder_16s_AC4R(const Ipp16s* pSrc, int srcStep, Ipp16s* pDst,
int dstStep, IppiSize dstRoiSize, IppiSize maskSize, IppiBorderType borderType, const
Ipp16s pBorderValue[3], Ipp8u* pBuffer);
IppStatus ippiFilterMinBorder_16u_AC4R(const Ipp16u* pSrc, int srcStep, Ipp16u* pDst,
int dstStep, IppiSize dstRoiSize, IppiSize maskSize, IppiBorderType borderType, const
Ipp16u pBorderValue[3], Ipp8u* pBuffer);
IppStatus ippiFilterMinBorder_32f_AC4R(const Ipp32f* pSrc, int srcStep, Ipp32f* pDst,
int dstStep, IppiSize dstRoiSize, IppiSize maskSize, IppiBorderType borderType, const
Ipp32f pBorderValue[3], Ipp8u* pBuffer);
IppStatus ippiFilterMinBorder_8u_C4R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int
dstStep, IppiSize dstRoiSize, IppiSize maskSize, IppiBorderType borderType, const Ipp8u
pBorderValue[4], Ipp8u* pBuffer);
IppStatus ippiFilterMinBorder_16s_C4R(const Ipp16s* pSrc, int srcStep, Ipp16s* pDst,
int dstStep, IppiSize dstRoiSize, IppiSize maskSize, IppiBorderType borderType, const
Ipp16s pBorderValue[4], Ipp8u* pBuffer);
IppStatus ippiFilterMinBorder_16u_C4R(const Ipp16u* pSrc, int srcStep, Ipp16u* pDst,
int dstStep, IppiSize dstRoiSize, IppiSize maskSize, IppiBorderType borderType, const
Ipp16u pBorderValue[4], Ipp8u* pBuffer);
IppStatus ippiFilterMinBorder_32f_C4R(const Ipp32f* pSrc, int srcStep, Ipp32f* pDst,
int dstStep, IppiSize dstRoiSize, IppiSize maskSize, IppiBorderType borderType, const
Ipp32f pBorderValue[4], Ipp8u* pBuffer);

Include Files
ippi.h1125

1Intel® Integrated Performance Primitives Developer Guide and Reference

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc
srcStep
pDst

Pointer to the source image ROI.
Distance, in bytes, between the starting pointsof consecutive lines in the source image.
Pointer to the destination image ROI.

dstRoiSize

Distance, in bytes, between the starting pointsof consecutive lines in the destination image.
Size of the source and destination ROI, in pixels.

maskSize

Size of the filter kernel.

borderType

Type of border. Possible values are:dstStep

ippBorderConst Values of all border pixels are

set to a constant.
ippBorderRepl Border is replicated from theedge pixels.
ippBorderInMem Border is obtained from thesource image pixels inmemory.

Mixed borders are also supported. They can beobtained by the bitwise operation OR between any of
the ippBorderRepl, ippBorderConst, or
ippBorderMirror values and theippBorderInMemTop, ippBorderInMemBottom,
ippBorderInMemLeft, ippBorderInMemRightvalues.

borderValuepBorderValue[3], pBorderValue[4]pBuffer

Constant value to assign to pixels of theconstant border. This parameter is applicable
only to the ippBorderConst border type.
Pointer to constant values to assign to pixels of
the constant border. This parameter is applicable
only to the ippBorderConst border type.
Pointer to the work buffer.

Description
Before using the ippiFilterMaxBorder and ippiFilterMinBorder functions, you need to compute thesize of the work buffer pBuffer using the ippiFilterMaxBorderGetBufferSize or
ippiFilterMinBorderGetBufferSize functions, respectively.
These functions operate with ROI (see Regions of Interest in Intel IPP).
The ippiFilterMaxBorder and ippiFilterMinBorder functions apply the maximum/minimum filters,
respectively, to the source image ROI. The size of the source image ROI is equal to the destination image
ROI size dstRoiSize. The values of border pixels are assigned in accordance with the borderType andborderValue parameters. The kernel size of the filter is arbitrary and depends on the mask value.

1126

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

The anchor cell is the center cell of the kernel, highlighted in red. The anchor cell is defined as:

x=(maskSize.width - 1)/2y=(maskSize.height - 1)/2
where(x, y) are cell coordinates.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsBorderErr

Indicates an error when dstRoiSize is negative, or equal tozero.
Indicates an error when mask is less than, or equal to zero.

ippStsBorderErr

Indicates an error when borderType has an illegal value.

ippStsSizeErr

See Also
Borders in Neighborhood Operations
Regions of Interest in Intel IPP
User-defined Border Types
FilterMaxBorderGetBufferSize, FilterMinBorderGetBufferSize Compute the size of the work buffer
for the maximum/minimum filter.
DecimateFilterRow, DecimateFilterColumn
Decimates an image by rows or by columns.

SyntaxIppStatus ippiDecimateFilterRow_8u_C1R(const Ipp8u* pSrc, int srcStep, IppiSize
srcRoiSize, Ipp8u* pDst, int dstStep, IppiFraction fraction);
IppStatus ippiDecimateFilterColumn_8u_C1R(const Ipp8u* pSrc, int srcStep, IppiSize
srcRoiSize, Ipp8u* pDst, int dstStep, IppiFraction fraction);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source image ROI.

srcRoiSize

Distance in bytes between starts of consecutive lines in thesource image.
Size of the source image ROI in pixels.

pDst

Pointer to the destination image.

srcStep1127

1Intel® Integrated Performance Primitives Developer Guide and Reference

dstStep
fraction

Distance in bytes between starts of consecutive lines in thedestination image.
Specifies how the decimating is performed. Possible values:
ippPolyphase_1_2,
ippPolyphase_3_5,
ippPolyphase_2_3,
ippPolyphase_7_10,
ippPolyphase_3_4.

Description
These functions operate with ROI (see Regions of Interest in Intel IPP).
Functions DecimateFilterRow and DecimateFilterColumn perform decimating of the source image byrows or by columns respectively. These functions use the set of special internal polyphase filters. The
parameter fraction specifies how the decimating is performed, for example, if the parameter is set to
ippPolyphase_3_5, then each 5 pixels in the row (or column) of the source image give 3 pixels to thedestination image, if the parameter is set to ippPolyphase_1_2, then each two pixels in the row (orcolumn) of the source image give 1 pixel to the destination image, an so on.
To ensure valid operation, the application must correctly define additional border pixels (see Borders in
Neighborhood Operations). For all fraction values the width of the border is four columns/rows all aroundthe source image ROI.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsStepErr
ippStsDecimateFractionErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error if one of the specified pointers is NULL.
Indicates an error if roiSize has a field with a zero or negativevalue.
Indicates an error if srcStep or dstStep is less than or equal tozero.
Indicates an error if fraction has an illegal value.

Median Filters
The median filter functions perform non-linear filtering of a source image data.
These functions use either an arbitrary rectangular mask, or the following predefined masks of the

IppiMaskSize type to filter an image:ippMskSize3x1

Horizontal mask of length 3

ippMskSize5x1

Horizontal mask of length 5

ippMskSize1x3

Vertical mask of length 3

ippMskSize3x3

Square mask of size 3

ippMskSize1x5

Vertical mask of length 5

ippMskSize5x5

Square mask of size 5

1128

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

The size of the neighborhood and coordinates of the anchor cell in the neighborhood depend on the maskmean value. Table “Median Filter Mask, Neighborhood, and Anchor Cell” lists the mask types with thecorresponding neighborhood sizes and anchor cell coordinates. Mask size in mask names is indicated in (XY)order. The anchor cell is specified by its coordinates anchor.x and anchor.y in the coordinate systemassociated with the upper left corner of the mask.
Median Filter Mask, Neighborhood, and Anchor Cell
Mask

Neighborhood Size

Anchor Cell

Columns

Rows

ippMskSize3x1

31[1, 0]

ippMskSize5x1

51[2, 0]

ippMskSize1x31

3[0, 1]

ippMskSize3x3

3

3[1, 1]

ippMskSize1x515[0, 2]

ippMskSize5x555[2, 2]Median filters have the effect of removing the isolated intensity spikes and can be used to reduce noise in animage.
For details on algorithms used in Intel IPP for median filtering, see [APMF].

FilterMedianBorderGetBufferSize
Computes the size of the work buffer for theFilterMedianBorder function.

SyntaxIppStatus ippiFilterMedianBorderGetBufferSize (IppiSize dstRoiSize, IppiSize maskSize,
IppDataType dataType, int numChannels, int* pBufferSize);
IppStatus ippiFilterMedianBorderGetBufferSize_T (IppiSize dstRoiSize, IppiSize
maskSize, IppDataType dataType, int numChannels, int* pBufferSize);

Include Files
ippi.hParameters
dstRoiSize

Size of the destination ROI, in pixels.

maskSize

Size of the filter mask, in pixels.

dataType

Data type of the source and destination images. Possible values are
ipp8u, ipp16u, ipp16s, or ipp32f.

numChannels

Number of channels in the image. Possible values are 1, 3, or 4.

pBufferSize

Pointer to the computed size of the external work buffer, in bytes.

Description
The ippiFilterMedianBorderGetBufferSize function computes the size, in bytes, of the external work
buffer needed for the ippiFilterMedianBorder function. The result is stored in the pBufferSize
parameter.

1129

1

Intel® Integrated Performance Primitives Developer Guide and Reference

For an example on how to use this function, see the code example provided with theippiFilterMedianBorder function description.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pBufferSize is NULL.
Indicates an error when one of the dstRoiSize fields has anegative or zero value.
Indicates an error when mask has a field with a negative, zero,or even value.

ippStsSizeErr
ippStsMaskSizeErr
ippStsDataTypeErr

Indicates an error when dataType has an illegal value.

ippStsNumChannelsError

Indicates an error when numChannels has an illegal value.

See Also
FilterMedianBorder Performs median filtering of an image.
FilterMedianBorder
Performs median filtering of an image.

SyntaxCase 1: Operating on one-channel data
IppStatus ippiFilterMedianBorder_<mod>(const Ipp<datatype>* pSrc, int srcStep,
Ipp<datatype>* pDst, int dstStep, IppiSize dstRoiSize, IppiSize maskSize,
IppiBorderType borderType, Ipp<datatype> borderValue, Ipp8u* pBuffer);
Supported values for mod:8u_C1R

16u_C1R

16s_C1R

32f_C1R

Case 2: Operating on multi-channel data
IppStatus ippiFilterMedianBorder_<mod>(const Ipp<datatype>* pSrc, int srcStep,
Ipp<datatype>* pDst, int dstStep, IppiSize dstRoiSize, IppiSize maskSize,
IppiBorderType borderType, const Ipp<datatype> pBorderValue[3], Ipp8u* pBuffer);
Supported values for mod:8u_C3R

16u_C3R

16s_C3R

8u_AC4R

16u_AC4R

16s_AC4R

IppStatus ippiFilterMedianBorder_<mod>(const Ipp<datatype>* pSrc, int srcStep,
Ipp<datatype>* pDst, int dstStep, IppiSize dstRoiSize, IppiSize maskSize,
IppiBorderType borderType, const Ipp<datatype> pBorderValue[4], Ipp8u* pBuffer);
Supported values for mod:8u_C4R1130

16u_C4R

16s_C4R

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Case 3: Operating on one-channel data with Threading Layer (TL) functions based on the Classic API
IppStatus ippiFilterMedianBorder_<mod>(const Ipp<datatype>* pSrc, int srcStep,
Ipp<datatype>* pDst, int dstStep, IppiSize dstRoiSize, IppiSize maskSize,
IppiBorderType borderType, Ipp<datatype> borderValue, Ipp8u* pBuffer);
Supported values for mod:8u_C1R_T

Case 4: Operating on multi-channel data with Threading Layer (TL) functions based on the Classic API
IppStatus ippiFilterMedianBorder_<mod>(const Ipp<datatype>* pSrc, int srcStep,
Ipp<datatype>* pDst, int dstStep, IppiSize dstRoiSize, IppiSize maskSize,
IppiBorderType borderType, const Ipp<datatype> pBorderValue[3], Ipp8u* pBuffer);
Supported values for mod:8u_C3R_T
8u_AC4R_T
IppStatus ippiFilterMedianBorder_<mod>(const Ipp<datatype>* pSrc, int srcStep,
Ipp<datatype>* pDst, int dstStep, IppiSize dstRoiSize, IppiSize maskSize,
IppiBorderType borderType, const Ipp<datatype> pBorderValue[4], Ipp8u* pBuffer);
Supported values for mod:8u_C4R_T

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source image.

srcStep

Distance, in bytes, between the starting points ofconsecutive lines in the source image.

pDst

Pointer to the destination image.

dstStep

Distance, in bytes, between the starting points ofconsecutive lines in the destination image.

dstRoiSize

Size of the destination ROI, in pixels.

maskSize

Size of the filter mask, in pixels.

borderType

Type of border. Possible values are:ippBorderConst Values of all border pixels are
ippBorderRepl

set to constant.
Border is replicated from theedge pixels.

1131

1

Intel® Integrated Performance Primitives Developer Guide and Reference

ippBorderInMem Border is obtained from thesource image pixels inmemory.

borderValue

Constant value to assign to pixels of the constantborder. This parameter is applicable only to theippBorderConst border type.

pBorderValue[3], pBorderValue[4]Pointer to the constant value to assign to pixels of theconstant border. This parameter is applicable only tothe ippBorderConst border type.

pBuffer

Pointer to the work buffer.

Description
This function operates with ROI.
Before using this function, you need to compute the size of the work buffer pBuffer using theippiFilterMedianBorderGetBufferSize function.
The ippiFilterMedianBorder function applies a median filter to an image ROI. The anchor cell is thecenter of the filter kernel. The size of the source image ROI is equal to the size of the destination image ROI
dstRoiSize.
This function sets each pixel in the destination buffer as the median value of all source pixels values from theneighborhood of the processed pixel.
This function removes noise and does not cut out signal brightness drops, as an averaging filter does.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrc, pDst, pBuffer is NULL.

ippStsSizeErr
ippStsMaskSizeErr
ippStsNotEvenStepErr
ippStsBorderErr

Indicates an error if dstRoiSize has a field with a zero or
negative value.
Indicates an error if maskSize has a field with a zero, negative,
or even value.
Indicates an error if one of the step values is not divisible by 4
for floating-point images, or by 2 for short-integer images.
Indicates an error when borderType has an illegal value.

ExampleSee Also
Regions of Interest in Intel IPP
User-defined Border Types
FilterMedianBorderGetBufferSize Computes the size of the work buffer for theFilterMedianBorder function.
FilterMedianGetBufferSize
Computes the size of the external buffer for
ippiFilterMedian function.

1132

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

SyntaxIppStatus ippiFilterMedianGetBufferSize_32f(IppiSize dstRoiSize, IppiSize maskSize,
Ipp32u nChannels, Ipp32u* pBufferSize);
IppStatus ippiFilterMedianGetBufferSize_64f(IppiSize dstRoiSize, IppiSize maskSize,
Ipp32u nChannels, Ipp32u* pBufferSize);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
dstRoiSize

Size of the destination ROI in pixels.

maskSize

Size of the mask in pixels.

nChannels

Number of channels in the image.

pBufferSize

Pointer to the computed value of the external buffer size.

Description
This function computes the size in bytes of an external memory buffer that is required for theippiFilterMedian function, and stores the result in the pBufferSize.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error if the pBufferSize pointer is NULL.

ippStsSizeErr
ippStsMaskSizeErr
ippStsNumChannelsErr

Indicates an error if one of the fields of dstRoiSize has a zeroor negative value.
Indicates an error if one of the fields of maskSize has a valueless than or equal to 1.
Indicates an error if nChannels is not equal to 1, 3, or 4.

FilterMedian
Filters an image using a median filter.

SyntaxIppStatus ippiFilterMedian_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>*pDst, int dstStep, IppiSize dstRoiSize, IppiSize maskSize, IppiPoint anchor, Ipp8u*
pBuffer);
Supported values for mod:32f_C3R
32f_C4R
64f_C1R

1133

1Intel® Integrated Performance Primitives Developer Guide and Reference

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source image ROI.

srcStep

Distance in bytes between starts of consecutive lines in the source
image.

pDst

Pointer to the destination image ROI.

dstStep

Distance in bytes between starts of consecutive lines in the destination
image.

dstRoiSize

Size of the source and destination ROI in pixels.

maskSize

Size of the mask in pixels.

anchorAnchor cell specifying the mask alignment with respect to the positionof the input pixel.

pBuffer

Pointer to the external work buffer.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function sets each pixel in the output buffer as the median value of all the input pixel values taken in theneighborhood of the processed pixel. To ensure valid operation when image boundary pixels are processed,
the application should correctly define additional border pixels (see Borders in Neighborhood Operations).
The anchor cell is specified by its coordinates anchor.x and anchor.y in the coordinate system associatedwith the top left corner of the kernel. The size of the source image ROI is equal to the size of the destination
image ROI dstRoiSize.
Some flavors of the function require the external buffer pBuffer. Prior to using this functions, compute thesize of the external buffer by using the function FilterMedianGetBufferSize.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsStepErr
ippStsMaskSizeErr

1134

Indicates no error. Any other value indicates an error or awarning.
Indicates an error if pSrc or pDst is NULL.
Indicates an error if dstRoiSize has a field with a zero or
negative value.
Indicates an error if srcStep or dstStep has a zero or negativevalue.
Indicates an error if maskSize has a field with zero, negative, oreven value.

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

ippStsAnchorErr

Indicates an error if anchor is outside the mask size.

FilterMedianCross
Filters an image using a cross median filter.

SyntaxIppStatus ippiFilterMedianCross_<mod>(const Ipp<datatype>* pSrc, int srcStep,
Ipp<datatype>* pDst, int dstStep, IppiSize dstRoiSize, IppiMaskSize mask);
Supported values for mod:8u_C1R

16u_C1R

16s_C1R

8u_C3R

16u_C3R

16s_C3R

8u_AC4R

16u_AC4R

16s_AC4R

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc
srcStep
pDst

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the destination image ROI.

dstRoiSize

Distance in bytes between starts of consecutive lines in thedestination image.
Size of the source and destination ROI in pixels.

mask

Predefined mask of the IppiMaskSize type.

dstStep

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function sets each pixel in the output buffer as the median value of all the input pixel values taken in theneighborhood of the processed pixel. The neighborhood is determined by the square mask of the predefinedsize, which can be either ippMskSize3x3 or ippMskSize5x5 (see Table “Median Filter Mask, Neighborhood,and Anchor Cell”). The function operates on the assumption that the pixels outside the source image ROI
exist along the distance equal to half of the mask size. It means that the application program should provide
appropriate values for the pSrc and dstRoiSize arguments, or define additional border pixels (see Borders
in Neighborhood Operations). The size of the source image ROI is equal to the size of the destination image
ROI dstRoiSize.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error or awarning.

1135

1Intel® Integrated Performance Primitives Developer Guide and ReferenceippStsNullPtrErr
ippStsSizeErr
ippStsStepErr
ippStsMaskSizeErr

Indicates an error if pSrc or pDst is NULL.
Indicates an error if dstRoiSize has a field with a zero or
negative value.
Indicates an error if srcStep or dstStep has a zero or negativevalue.
Indicates an error if mask has an illegal value.

FilterMedianWeightedCenter3x3
Filters an image using a median filter with a weighted
center pixel.

SyntaxIppStatus ippiFilterMedianWeightedCenter3x3_8u_C1R(const Ipp8u* pSrc, int srcStep,
Ipp8u* pDst, int dstStep, IppiSize dstRoiSize, int weight);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc
srcStep
pDst

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the destination image ROI.

dstRoiSize

Distance in bytes between starts of consecutive lines in thedestination image.
Size of the source and destination ROI in pixels.

weightWeight of the pixel, must be an odd number.

dstStep

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function sets each pixel in the destination image as the median value of all the input pixel values takenin the neighborhood of the processed pixel. The neighborhood is determined by the fixed square mask of the
3x3 size with the anchor cell as the center cell of the mask. The parameter weight specifies the weight ofthe processed pixel, that is how many times its value is included into calculations. The value of thisparameter should be odd. If it is even, the function changes its value to the nearest less odd number andreturns the warning message.
The function operates on the assumption that the pixels outside of the source image ROI exist along the
distance equal to half of the mask size. It means that the application program should provide appropriate
values for the pSrc and dstRoiSize arguments, or define additional border pixels (see Borders in
Neighborhood Operations). The size of the source image ROI is equal to the size of the destination image ROI
dstRoiSize.

1136

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Return Values
ippStsNoErr
ippStsNullPtrErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error if pSrc or pDst is NULL.

ippStsWeightErr

Indicates an error if dstRoiSize has a field with a zero or
negative value.
Indicates an error if srcStep or dstStep has a zero or negativevalue.
Indicates an error if weight is less than or equal to 0.

ippStsEvenMedianWeight

Indicates a warning if weight has an even value.

ippStsSizeErr
ippStsStepErr

FilterMedianColor
Filters an image using a color median filter.

SyntaxIppStatus ippiFilterMedianColor_<mod>(const Ipp<datatype>* pSrc, int srcStep,
Ipp<datatype>* pDst, int dstStep, IppiSize dstRoiSize, IppiMaskSize mask);
Supported values for mod:8u_C3R

16s_C3R

32f_C3R

8u_AC4R

16s_AC4R

32f_AC4R

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc
srcStep
pDst

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the destination image ROI.

dstRoiSize

Distance in bytes between starts of consecutive lines in thedestination image.
Size of the source and destination ROI in pixels.

mask

Predefined mask of the IppiMaskSize type.

dstStep

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
When applied to a color image, the previously described median filtering functions process color planes of animage separately, and as a result any correlation between color components is lost. If you want to preserve
this information, use the ippiFilterMedianColor function instead. For each input pixel, this function

1137

1

Intel® Integrated Performance Primitives Developer Guide and Referencecomputes differences between red (R), green (G), and blue (B) color components of pixels in the maskneighborhood and the input pixel. The distance between the input pixel i and the neighborhood pixel j isformed as the sum of absolute values:abs (R(i)-R(j)) + abs (G(i)-G(j)) + abs (B(i)-B(j))
After scanning the entire neighborhood, the function sets the output value for pixel i as the value of theneighborhood pixel with the smallest distance to i.
The function ippiFilterMedianColor supports square masks of size either ippMskSize3x3 orippMskSize5x5 and processes color images only. To ensure valid operation when image boundary pixels areprocessed, the application should correctly define additional border pixels (see Borders in Neighborhood
Operations).

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsStepErr
ippStsMaskSizeErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error if pSrc or pDst is NULL.
Indicates an error if dstRoiSize has a field with a zero or
negative value.
Indicates an error if srcStep or dstStep has a zero or negativevalue.
Indicates an error if mask has an illegal value.

General Linear Filters
These functions use a general rectangular kernel to filter an image. The kernel is a matrix of signed integers
or single-precision real values. For each input pixel, the kernel is placed on the image in such a way that the
fixed anchor cell within the kernel coincides with the input pixel. The anchor cell is usually a geometric centerof the kernel, but can be skewed with respect to the geometric center.
A pointer to an array of kernel values is passed to filtering functions. These values are read in row-major
order starting from the top left corner. This array must exactly have kernelSize.width *kernelSize.height entries. The anchor cell is specified by its coordinates anchor.x and anchor.y in thecoordinate system associated with the lower right corner of the kernel.
The output value is computed as a sum of neighbor pixels values, with kernel matrix elements used asweight factors. Summation formulas implement a convolution operation, which means that kernel coefficientsare used in direct order.
NOTE
In Intel IPP 8.2 and lower versions, kernel coefficients are used in inverse order.
Optionally, the output pixel values may be scaled. To ensure valid operation when image boundary pixels areprocessed, the application should correctly define additional border pixels (see Borders in Neighborhood
Operations).

FilterBorderGetSize
Computes the size of the filter specification structure
and the size of the work buffer.

SyntaxIppStatus ippiFilterBorderGetSize (IppiSize kernelSize, IppiSize dstRoiSize,
IppDataType dataType, IppDataType kernelType, int numChannels, int* pSpecSize, int*
pBufferSize);
1138

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
kernelSize

Size of the rectangular kernel in pixels.

dstRoiSize

Maximal size of the destination image ROI (in pixels).

dataType

Data type of the source image. Possible values are ipp8u, ipp16u,
ipp16s, ipp32f, or ipp64f.

kernelType

Data type of the filter kernel. Possible values are ipp16s, ipp32f, or
ipp64f.

numChannels

Number of channels in the image. Possible values are 1, 3, or 4.

pSpecSize

Pointer to the size of the filter specification structure.

pBufferSize

Pointer to the size of the work buffer required for filtering.

Description
This function operates with ROI.
This function computes the size of the filter specification structure pSpec and the size of the buffer required
for filtering operations. Call this function before using the ippiFilterBorderInit function.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error when kernelSize has a field with a zero or
negative value, or if dstRoiSize is less than 1.

ippStsDataTypeErr

Indicates an error when dataType or kernelType has an illegal
value.

ippStsChannelErr

Indicates an error when numChannels has an illegal value.

See Also
Regions of Interest in Intel IPP
FilterBorderInit Initializes the filter specification structure.
FilterBorder Filters an image using a rectangular filter.
FilterBorderInit
Initializes the filter specification structure.

1139

1

Intel® Integrated Performance Primitives Developer Guide and Reference

SyntaxIppStatus ippiFilterBorderInit_16s(const Ipp16s* pKernel, IppiSize kernelSize, int
divisor, IppDataType dataType, int numChannels, IppRoundMode roundMode,
IppiFilterBorderSpec* pSpec);
IppStatus ippiFilterBorderInit_32f(const Ipp32f* pKernel, IppiSize kernelSize,
IppDataType dataType, int numChannels, IppRoundMode roundMode, IppiFilterBorderSpec*
pSpec);
IppStatus ippiFilterBorderInit_64f(const Ipp64f* pKernel, IppiSize kernelSize,
IppDataType dataType, int numChannels, IppRoundMode roundMode, IppiFilterBorderSpec*
pSpec);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pKernelPointer to the kernel values.

kernelSize

Size of the rectangular kernel in pixels.

divisorInteger value by which the computed result is divided.

dataType

Data type of the source image. Possible values are ipp8u, ipp16u,
ipp16s, ipp32f, or ipp64f.

numChannels

Number of channels in the image. Possible values are 1, 3, or 4.

roundModeRounding mode, possible values:

ippRndZero

ippRndNear

ippRndFinancial

ippRndHintAccurate

Floating-point values are truncated tozero. This mode is not supported forippiFilterBorderInit_64f.
Floating-point values are rounded to thenearest even integer when the fractionalpart equals to 0.5; otherwise they arerounded to the nearest integer.
Floating-point values are rounded down
to the nearest integer when thefractional part is less than 0.5, orrounded up to the nearest integer if thefractional part is equal or greater than
0.5. This mode is not supported forippiFilterBorderInit_64f.
The result of calculations is accurate.
This mode is supported only when:• dataType is equal to 8u andnumChannels is equal to 1, 3, or 4

1140

1

Developer Guide and Reference for Intel® Integrated Performance Primitives• dataType is equal to 16s andnumChannels is equal to 1
pSpec

Pointer to the filter specification structure.

Description
This function initializes the filter specification structure pSpec in the external buffer. Before using thisfunction, you need to compute the size of the specification structure using the FilterBorderGetSize
function. This structure is used by the FilterBorder function that performs filtering operations on thesource image pixels.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error when kernelSize has a field with a zero or
negative value.

ippStsDataTypeErr

Indicates an error when dataType has an illegal value.

ippStsRoundModeNotSupportedErr Indicates an error when the specified rounding mode is not supported.
ippStsAccurateModeNotSupported Indicates a warning when the ippRndHintAccurate mode is notsupported.

See Also
FilterBorderGetSize Computes the size of the filter specification structure and the size of the work
buffer.
FilterBorder Filters an image using a rectangular filter.
FilterBorder
Filters an image using a rectangular filter.

SyntaxCase 1: Operation on one-channel data
IppStatus ippiFilterBorder_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>*pDst, int dstStep, IppiSize dstRoiSize, IppiBorderType border, const Ipp<datatype>borderValue[1], const IppiFilterBorderSpec* pSpec, Ipp8u* pBuffer);
Supported values for mod:8u_C1R
16u_C1R
16s_C1R
32f_C1R
64f_C1R

1141

1Intel® Integrated Performance Primitives Developer Guide and Reference

Case 2: Operation on multi-channel data
IppStatus ippiFilterBorder_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>*pDst, int dstStep, IppiSize dstRoiSize, IppiBorderType border, const Ipp<datatype>borderValue[3], const IppiFilterBorderSpec* pSpec, Ipp8u* pBuffer);
Supported values for mod:8u_C3R
16u_C3R
16s_C3R
32f_C3R
IppStatus ippiFilterBorder_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>*pDst, int dstStep, IppiSize dstRoiSize, IppiBorderType border, const Ipp<datatype>borderValue[4], const IppiFilterBorderSpec* pSpec, Ipp8u* pBuffer);
Supported values for mod:8u_C4R
16u_C4R
16s_C4R
32f_C4R

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source image ROI.

srcStep

Distance, in bytes, between the starting points ofconsecutive lines in the source image.

pDst

Pointer to the destination image ROI.

dstStep

Distance, in bytes, between starting points ofconsecutive lines in the destination image.

dstRoiSize

Size of the source and destination image ROI in
pixels.

borderType of border. Possible values are:ippBorderConst Values of all border pixels are

set to constant.
ippBorderRepl Border is replicated from theedge pixels.
Borderis obtained from theippBorderInMem
source image pixels inmemory.

1142

1Developer Guide and Reference for Intel® Integrated Performance Primitives

Mixed borders are also supported. They can beobtained by the bitwise operation OR between theippBorderRepl or ippBorderConst values andippBorderInMemTop, ippBorderInMemBottom,
ippBorderInMemLeft, ippBorderInMemRight.

borderValue

Constant value to assign to pixels of the constantborder. This parameter is applicable only to theippBorderConst border type.

pSpec

Pointer to the filter specification structure.

pBuffer

Pointer to the work buffer for filtering operations.

Description
Before using this function, you need to initialize the filter specification structure using theippiFilterBorderInit function.
This function operates with ROI.
This function performs filtering of a rectangular ROI inside a two-dimensional image using a specified
structure pSpec. Type of the image border is defined by the value of the border parameter.
To change the function behavior (add offset to the result or set the rounding mode), use
ippiFilterBorderSetMode after the ippiFilterBorderInit function.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsSizeErr

ippStsStepErr
ippStsBorderErr

Indicates an error when dstRoiSize has a field with a zero or
negative value, or if dstRoiSize.width is more than the
maximum ROI roiWidth passed to the initialization function.
Indicates an error when the srcStep value is less than, or
equal to zero.
Indicates an error when border has an illegal value.

ExampleSee Also
Regions of Interest in Intel IPP
User-defined Border Types
FilterBorderInit Initializes the filter specification structure.
FilterBorderSetMode Adds the offset value after filtering operation for ipp8u and ipp16u datatypes , and sets the rounding mode.
FilterBorderSetMode
Adds the offset value after filtering operation foripp8u and ipp16u data types , and sets the rounding

mode.

1143

1

Intel® Integrated Performance Primitives Developer Guide and Reference

SyntaxIppStatus ippiFilterBorderSetMode(IppHintAlgorithm hint, int offset,
IppiFilterBorderSpec* pSpec);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
hint

Suggests using specific code for rounding. Supported values:

ippAlgHintNone,
ippAlgHintFast

Default modes. The function performs
rounding in accordance with the roundModeparameter passed to the Init function, butfunction performance takes precedence overaccuracy and some output pixels can differ
by +-1 from the exact result.

ippAlgHintAccurate

All output pixels are exact; accuracy takes
precedence over performance.

offsetConstant that is added to the final signed result before converting it tounsigned for ipp8u and ipp16u data types.

pSpec

Pointer to the initialized filter specification structure.

Description
This function adds the offset value after filtering operation for ipp8u and ipp16u data types with theippiFilterBorder function:

pDst=(summ(src[i]*kern[i]))+offset
You can also use this function to set the rounding mode for the filtering result.
The 8u_C1R, 8u_C3R, 8u_C4R, and 16s_C1RFilterBorder function flavors initialized with the ipp16s
coefficients support ippAlgHintNone and ippAlgHintAccurate rounding modes.
Use this function after the ippiFilterBorderInit function and before calling ippiFilterBorder.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

The offset value is not supported (for ipp16s and ipp32f datatypes).
ippStsAccurateModeNotSupported The accurate mode is not supported for some data types. The
result of rounding may be not exact.

ippStsNotSupportedModeErr

Example1144

1Developer Guide and Reference for Intel® Integrated Performance Primitives

See Also
FilterBorder Filters an image using a rectangular filter.
FilterBorderInit Initializes the filter specification structure.
FilterGetBufSize
Computes the size of the work buffer.

SyntaxIppStatus ippiFilterGetBufSize_64f_C1R(IppiSize kernelSize, int roiWidth, int* pSize);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
kernelSize

Size of the rectangular kernel in pixels.

roiWidth

Width of the image ROI in pixels.

pSize

Pointer to the size of the work buffer.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function computes the size of the work buffer pSize that is required for the function ippiFilter (flavorthat operates on data of the Ipp64f type).

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error if pSize is NULL.

ippStsSizeErr

Indicates an error if kernelSize has a field with a zero or
negative value, or roiWidth is less than or equal to zero.

FilterFilters an image using a general rectangular kernel.

SyntaxIppStatus ippiFilter_64f_C1R(const Ipp64f* pSrc, int srcStep, Ipp64f* pDst, int
dstStep, IppiSize dstRoiSize, const Ipp64f* pKernel, IppiSize kernelSize, IppiPoint
anchor, Ipp8u* pBuffer);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h

1145

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc
srcStep
pDst

Pointer to the source image ROI.
Distance, in bytes, between the starting points of consecutive
lines in the source image.
Pointer to the destination image ROI.

dstRoiSize

Distance, in bytes, between the starting points of consecutive
lines in the destination image.
Size of the source and destination ROI in pixels.

pKernelPointer to the kernel values.

kernelSize

Size of the rectangular kernel in pixels.

dstStep

anchorpBuffer

Anchor cell specifying the rectangular kernel alignment withrespect to the position of the input pixel.
Pointer to the work buffer.

Description
This function operates with ROI.
The ippiFilter function uses the general rectangular kernel of kernelSize size to filter an image ROI.
This function sums the products of the kernel coefficients pKernel and pixel values taken over the source
pixel neighborhood defined by kernelSize and anchor. The anchor cell is specified by its coordinates
anchor.x and anchor.y in the coordinate system associated with the bottom right corner of the kernel.
Kernel coefficients are used in inverse order. The sum is written to the destination pixel.
To ensure valid operation when image boundary pixels are processed, the application should correctly define
additional border pixels (see Borders in Neighborhood Operations).
This function requires a temporary work buffer. Before using this function flavor, you need to compute thebuffer size using the ippiFilterGetBufSize function.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error when pSrc, pDst, or pKernel is NULL.

ippStsDivisorErr

Indicates an error when dstRoiSize or kernelSize has a fieldwith a zero or negative value.
Indicates an error when the divisor has a zero value.

ippStsStepErr

Indicates an error when:ippStsSizeErr• srcStep is less than (roiSize.width +kernelSize.width)*sizeof(Ipp64f)• dstStep is less than roiSize.width*sizeof(Ipp64f)

See Also
Regions of Interest in Intel IPP
Borders in Neighborhood Operations
FilterGetBufSize Computes the size of the work buffer.

1146

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Separable Filters
Separable filters use a spatial kernel consisting of a single column (as in the FilterColumn function) or asingle row (as in the FilterRow function) to filter the source image.

FilterRowBorderPipelineGetBufferSize, FilterRowBorderPipelineGetBufferSize_Low
Compute the size of working buffer for the strow filter.

SyntaxIppStatus ippiFilterRowBorderPipelineGetBufferSize_<mod>(IppiSize roiSize, int
kernelSize, int* pBufferSize);
Supported values for mod:8u16s_C1R

16s_C1R

16u_C1R

32f_C1R

8u16s_C3R

16s_C3R

16u_C3R

32f_C3R

IppStatus ippiFilterRowBorderPipelineGetBufferSize_Low_<mod>(IppiSize roiSize, int
kernelSize, int* pBufferSize);
Supported values for mod:16s_C1R
16s_C3R

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
roiSize

Maximum size of the source and destination image ROI.

kernelSize

Size of the kernel in pixels.

pBufferSize

Pointer to the computed size of the buffer.

Description
These functions operate with ROI (see Regions of Interest in Intel IPP).
These functions compute the size of the working buffer required for the functions
ippiFilterRowBorderPipeline and ippiFilterRowBorderPipeline_Low respectively. The buffer withthe length pBufferSize[0] can be used to filter images with width equal to or less than roiSize.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if the pointer pBufferSize is NULL.
Indicates an error condition if maskSize has a field with a zeroor negative value, or if roiWidth is less than 1.

1147

1

Intel® Integrated Performance Primitives Developer Guide and Reference

FilterRowBorderPipeline, FilterRowBorderPipeline_Low
Apply the filter with border to image rows.

SyntaxCase 1: Operation on one-channel integer data
IppStatus ippiFilterRowBorderPipeline_<mod>(const Ipp<srcDatatype>* pSrc, int srcStep,
Ipp<dstDatatype>** ppDst, IppiSize roiSize, const Ipp<dstDatatype>* pKernel, int
kernelSize, int xAnchor, IppiBorderType borderType, Ipp<srcDatatype> borderValue, int
divisor, Ipp8u* pBuffer);
Supported values for mod:8u16s_C1R 16s_C1R 16u_C1R
IppStatus ippiFilterRowBorderPipeline_Low_16s_C1R(const Ipp16s* pSrc, int srcStep,
Ipp16s** ppDst, IppiSize roiSize, const Ipp16s* pKernel, int kernelSize, int xAnchor,
IppiBorderType borderType, Ipp16s borderValue, int divisor, Ipp8u* pBuffer);

Case 2: Operation on one-channel floating point data
IppStatus ippiFilterRowBorderPipeline_32f_C1R(const Ipp32f* pSrc, int srcStep, Ipp32f**
ppDst, IppiSize roiSize, const Ipp32f* pKernel, int kernelSize, int xAnchor,
IppiBorderType borderType, Ipp32f borderValue, Ipp8u* pBuffer);

Case 3: Operation on three-channel integer data
IppStatus ippiFilterRowBorderPipeline_<mod>(const Ipp<srcDatatype>* pSrc, int srcStep,
Ipp<dstDatatype>** ppDst, IppiSize roiSize, const Ipp<dstDatatype>* pKernel, int
kernelSize, int xAnchor, IppiBorderType borderType, Ipp<srcDatatype> borderValue[3],int divisor, Ipp8u* pBuffer);
Supported values for mod:8u16s_C3R 16s_C3R 16u_C3R
IppStatus ippiFilterRowBorderPipeline_Low_16s_C3R(const Ipp16s* pSrc, int srcStep,
Ipp16s** ppDst, IppiSize roiSize, const Ipp16s* pKernel, int kernelSize, int xAnchor,
IppiBorderType borderType, Ipp16s borderValue[3], int divisor, Ipp8u* pBuffer);

Case 4: Operation on three-channel floating point data
IppStatus ippiFilterRowBorderPipeline_32f_C3R(const Ipp32f* pSrc, int srcStep, Ipp32f**
ppDst, IppiSize roiSize, const Ipp32f* pKernel, int kernelSize, int xAnchor,
IppiBorderType borderType, Ipp32f borderValue[3], Ipp8u* pBuffer);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc

Pointer to the source image ROI.

srcStep

Distance in bytes between starts of consecutive lines in the source
image.

1148

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

ppDst

Double pointer to the destination inage ROI.

roiSize

Size of the source and destination ROI in pixels.

pKernelPointer to the row kernel values.

kernelSize

Size of the kernel in pixels.

xAnchorAnchor value specifying the kernel row alignment with respect to thepositionof the input pixel.

borderType

Type of border (see Borders in Neighborhood Operations); following
values are possible:

ippBorderZero

Values of all border pixel are set to zero.

ippBorderConst

Values of all border pixels are set toconstant.

ippBorderRepl

Replicated border is used.

ippBorderWrap

Wrapped border is used

ippBorderMirror

Mirrored border is used

ippBorderMirrorR

Mirrored border with replication is usedborderValue

The constant value (constant vector in case of three-channel data) toassign to the pixels in the constant border (not applicable for otherborder's type).

divisorValue by which the computed result is divided (for operations on
integer data only).

pBuffer

Pointer to the working buffer.

Description
These functions operate with ROI (see Regions Regions of Interest in Intel IPP ).
The function ippiFilterRowBorderPipeline_Low performs calculation exclusively with the 16s-data, andthe input data must be in the range ensuring that the overflow does not occur during calculation and theresult can be represented by a 32-bit integer number.
These functions apply the horizontal row filter of the separable convolution kernel to the source image pSrc.
The filter coefficients are placed in the reversed order. For integer data:

and for floating point data:

Here j = 0, ... roiSize.width - 1, i = 0,... roiSize.height - 1. The values of pixels of thesource image that lies outside of the image ROI (that is, if for pixel pSrc[i,l] l ∉ [0,roiSize.width-1] are set in accordance with the specified parameters borderType and borderValue.

1149

1

Intel® Integrated Performance Primitives Developer Guide and ReferenceThis function can be used to organize the separable convolution as a step of the image processing pipeline.
The functions requires the external buffer pBuffer, its size should be previously computed by the functions
ippiFilterRowBorderPipelineGetBufferSize andippiFilterRowBorderPipelineGetBufferSize_Low respectively

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if one of the specified pointers is
NULL.

ippStsSizeErr
ippStsStepErr

Indicates an error condition if roiSize has a field with a zero or
negative value.
Indicates an error condition if srcStep or dstStep is less thanroiSize.width * <pixelSize>

ippStsAnchorErr

Indicates an error condition if one of the step values is notdivisible by 4 for floating-point images, or by 2 for shortinteger images.
Indicates an error condition if xAnchor has a wrong value.

ippStsBorderErr

Indicates an error condition if borderType has a wrong value.

ippStsBadArgErr

Indicates an error condition if divisor is equal to 0.

ippStsNotEvenStepErr

FilterColumnPipelineGetBufferSize, FilterColumnPipelineGetBufferSize_Low
Compute the size of working buffer for the column
filter.

SyntaxIppStatus ippiFilterColumnPipelineGetBufferSize_<mod>(IppiSize roiSize, int kernelSize,int* pBufferSize);
Supported values for mod:16s_C1R

16u_C1R

16s8u_C1R

16s8s_C1R

32f_C1R

16s_C3R

16u_C3R

16s8u_C3R

16s8s_C3R

32f_C3R

IppStatus ippiFilterColumnPipelineGetBufferSize_Low_<mod>(IppiSize roiSize, int
kernelSize, int* pBufferSize);
Supported values for mod:16s_C1R
16s_C3R

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

1150

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Parameters
roiSize

Maximum size of the source and destination image ROI.

kernelSize

Size of the kernel in pixels.

pBufferSize

Pointer to the computed size of the buffer.

Description
These functions operate with ROI (see Regions of Interest in Intel IPP).
These functions compute the size of the working buffer required for the functions
ippiFilterColumnPipeline and ippiFilterColumnPipeline_Low respectively. The buffer with thelength pBufferSize[0] can be used to filter images with width equal to or less than roiSize.

Return Values
Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if the pointer pBufferSize is NULL.

ippStsNoErr
ippStsNullPtrErr

Indicates an error condition if maskSize has a field with a zeroor negative value, or if roiWidth is less than 1.

ippStsSizeErr

FilterColumnPipeline, FilterColumnPipeline_Low
Apply the filter to image columns.

SyntaxCase 1: Operation on integer data
IppStatus ippiFilterColumnPipeline_<mod>(const Ipp<srcDatatype>** ppSrc,
Ipp<dstDatatype>* pDst, int dstStep, IppiSize roiSize, const Ipp<srcDatatype>* pKernel,
int kernelSize, int divisor, Ipp8u* pBuffer);
Supported values for mod:16s_C1R

16s8u_C1R

16s8s_C1R

16u_C1R

16s_C3R

16s8u_C3R

16s8s_C3R

16u_C3R

IppStatus ippiFilterColumnPipeline_Low_16s_C1R(const Ipp16s** ppSrc, Ipp16s* pDst, int
dstStep, IppiSize roiSize, const Ipp16s* pKernel, int kernelSize, int divisor, Ipp8u*
pBuffer);
IppStatus ippiFilterColumnPipeline_Low_16s_C3R(const Ipp16s** ppSrc, Ipp16s* pDst, int
dstStep, IppiSize roiSize, const Ipp16s* pKernel, int kernelSize, int divisor, Ipp8u*
pBuffer);

Case 2: Operation on floating-point data
IppStatus ippiFilterColumnPipeline_<mod>(const Ipp<datatype>** ppSrc, Ipp<datatype>*pDst, int dstStep, IppiSize roiSize, const Ipp<datatype>* pKernel, int kernelSize,Ipp8u* pBuffer);
Supported values for mod:32f_C1R
32f_C3R

1151

1Intel® Integrated Performance Primitives Developer Guide and Reference

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
ppSrc

Double pointer to the source image ROI.

pDst

Pointer to the destination image ROI.

roiSize

Distance in bytes between starts of consecutive lines in thedestination image.
Size of the destination ROI in pixels.

pKernelPointer to the strow kernel values.

kernelSize

Size of the kernel in pixels.

dstStep

divisorpBuffer

Value by which the computed result is divided (for operations
on integer data only).
Pointer to the working buffer.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
The function ippiFilterColumnPipeline_Low performs calculation exclusively with the 16s-data, and the
input data must be in the range ensuring that the overflow does not occur during calculation and the result
can be represented by a 32-bit integer number.
These functions apply the column filter of the separable convolution kernel to the source image pSrc. The
filter coefficients are placed in the reversed order. For integer data:

and for floating point data:

Here j = 0, ... roiSize.width-1, i=0,... roiSize.height-1.
The size of the source image is(roiSize.height + kernelSize - 1) * roiSize.width.
The functions requires the external buffer pBuffer, its size should be previously computed by the functions
ippiFilterColumnPipelineGetBufferSize and ippiFilterColumnPipelineGetBufferSize_Low
respectively.

1152

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if one of the specified pointers is
NULL.
Indicates an error condition if roiSize has a field with a zero or
negative value.
Indicates an error condition if srcStep or dstStep is less thanroiSize.width * <pixelSize>

ippStsSizeErr
ippStsStepErr

Indicates an error condition if one of the step values is notdivisible by 4 for floating-point images, or by 2 for shortinteger images.
Indicates an error condition if divisor is equal to 0.

ippStsNotEvenStepErr

ippStsBadArgErr

ExampleFilterSeparable
Apply the filter to an image.

SyntaxIppStatus ippiFilterSeparable_<mod>(const Ipp<datatype>* pSrc, int srcStep,
Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, IppiBorderType borderType,Ipp<datatype> borderValue, const IppiFilterSeparableSpec* pSpec, Ipp8u* pBuffer);
Supported values for mod:8u_C1R

16s_C1R

16u_C1R

32f_C1R

8u_C3R

16s_C3R

16u_C3R

32f_C3R

8u_C4R

16s_C4R

16u_C4R

32f_C4R

8u_C1R_T

16s_C1R_T

16u_C1R_T

32f_c1R_T

8u_C3R_T

16s_C3R_T

16u_C3R_T

32f_C3R_T

8u_C4R_T

16s_C4R_T

16u_C4R_T

32f_C4R_T

IppStatus ippiFilterSeparable_<mod>(const Ipp<srcdatatype>* pSrc, int srcStep,
Ipp<dstdatatype>* pDst, int dstStep, IppiSize roiSize, IppiBorderType borderType,Ipp<srcdatatype> borderValue, const IppiFilterSeparableSpec* pSpec, Ipp8u* pBuffer);
Supported values for mod:8u16s_C1R
8u16s_C3R
8u16s_C4R
8u16s_C1R_T
8u16s_C3R_T
8u16s_C4R_T

1153

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Platform-aware functions
IppStatus ippiFilterSeparable_<mod>(const Ipp<datatype>* pSrc, IppSizeL srcStep,
Ipp<datatype>* pDst, IppSizeL dstStep, IppiSizeL roiSize, IppiBorderType borderType,Ipp<datatype> borderValue, const IppiFilterSeparableSpec* pSpec, Ipp8u* pBuffer);
Supported values for mod:8u_C1R_L

16s_C1R_L

16u_C1R_L

32f_C1R_L

8u_C3R_L

16s_C3R_L

16u_C3R_L

32f_C3R_L

8u_C4R_L

16s_C4R_L

16u_C4R_L

32f_C4R_L

8u_C1R_LT 16s_C1R_LT 16u_C1R_LT 32f_C1R_LT
8u_C3R_LT 16s_C3R_LT 16u_C3R_LT 32f_C3R_LT
8u_C4R_LT 16s_C4R_LT 16u_C4R_LT 32f_C4R_LT
IppStatus ippiFilterSeparable_<mod>(const Ipp<srcdatatype>* pSrc, IppSizeL srcStep,
Ipp<dstdatatype>* pDst, IppSizeL dstStep, IppiSizeL roiSize, IppiBorderType borderType,Ipp<srcdatatype> borderValue, const IppiFilterSeparableSpec* pSpec, Ipp8u* pBuffer);
Supported values for mod:8u16s_C1R_L
8u16s_C3R_L
8u16s_C4R_L
8u16s_C1R_LT
8u16s_C3R_LT
8u16s_C4R_LT

Include Files
ippcv.hippcv_l.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pDst

Pointer to the source image ROI.
Distance in bytes between starts of consecuitve lines in thesource image.
Pointer to the destination image ROI.

roiSize

Distance in bytes between starts of consecutive lines in thedestination image.
Size of the source and destination ROI in pixels.

borderType

Type of border. Possible values are:dstStep

ippBorderConst
ippBorderRept

1154

Values of all border pixels are set toconstant.
Replicated border is used.

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

ippBorderWrap

Wrapped border is used.

ippBorderMirror

Mirrored border is used.

ippBorderMirrorR

Mirrored border with replication is used.

pSpec

Constant value (constant vector in case of three- or fourchannel data) to assign to the pixels in the ippBorderConst
border type (not applicable for other border types).
Pointer to the filter specification structure.

pBuffer

Pointer to the working buffer.

borderValue

Description
This function operates with ROI.
Before using this function, compute the size of the external buffer pBuffer using theippiFilterSeparableGetBufferSize function.
This function applies the horizontal row filter of the separable convolution kernel to the source image pSrc
and the column filter of the separable convolution kernel to the intermediate result.
For integer data:

and for floating point data:

Here j = 0, ... roiSize.width - 1, i = 0,... roiSize.height - 1. The values of pixels of thesource image that lies outside of the image ROI (that is, if for pixel pSrc[i,l] l ∉ [0,roiSize.width-1] are set in accordance with the specified parameters borderType and borderValue.
xAnchor = (rowKernelSize - 1) / 2.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

Indicates no error. Any other value indicates an error condition.
Indicates an error condition if one of the specified pointers is

NULL.

Indicates an error condition ifroiSize has a field with a zero or
negative value.

1155

1

Intel® Integrated Performance Primitives Developer Guide and ReferenceippStsStepErr
ippStsNotEvenStepErr

Indicates an error condition if the srcStep or dstStep value isless than roiSize.width* <pixelSize>.
Indicates an error condition if one of the step values is notdivisible by 4 for floating-point images, or by 2 for shortinteger images.

See Also
Regions of Interest in Intel IPP
User-defined Border Types
FilterSeparableInit Initializes the filter specification structure.
FilterSeparableGetBufferSize Computes the size of the work buffer.
FilterSeparableGetBufferSize
Computes the size of the work buffer.

SyntaxIppStatus ippiFilterSeparableGetBufferSize(IppiSize roiSize, IppiSize kernelSize,
IppDataType dataType, IppDataType kernelType, int numChannels, int* pBufferSize);
IppStatus ippiFilterSeparableGetBufferSize_L(IppiSizeL roiSize, IppiSize kernelSize,
IppDataType dataType, IppDataType kernelType, int numChannels, IppSizeL* pBufferSize);
IppStatus ippiFilterSeparableGetBufferSize_T(IppiSize roiSize, IppiSize kernelSize,
IppDataType dataType, IppDataType kernelType, int numChannels, int* pBufferSize);
IppStatus ippiFilterSeparableGetBufferSize_LT(IppiSizeL roiSize, IppiSize kernelSize,
IppDataType dataType, IppDataType kernelType, int numChannels, IppSizeL* pBufferSize);

Include Files
ippcv.hippcv_l.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
roiSize

Size of the image ROI in pixels.

kernelSize

Size of the rectangular kernel in pixels.

dataType

Data type of the source image. Possible values are Ipp8u,
Ipp16s, Ipp16u, Ipp32f.

kernelType

Data type of the filter kernel. Possible values are Ipp16s andIpp32f.

numChannels
pBufferSize

Number of channels in the image. Possible values are 1, 3, and4.
Pointer to the size of the work buffer required for filtering.

Description
This function computes the size of the buffer required for filtering operations. Call this function before using
the ippiFilterSeparable function.

1156

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if one of the specified pointers is
NULL.

ippStsSizeErr

Indicates an error condition if kernelSize has a field with azero or negative value.

ippStsDataTypeErr

Indicates an error condition if dataType has an illegal value.

ippStsChannelErr

Indicates an error condition if numChannels has an illegal value.

See Also
FilterSeparable Apply the filter to an image.
FilterSeparableGetSpecSize
Computes the size of the filter specification structure.

SyntaxIppStatus ippiFilterSeparableGetSpecSize(IppiSize kernelSize, IppDataType dataType, int
numChannels, int* pSpecSize);
IppStatus ippiFilterSeparableGetSpecSize_L(IppiSize kernelSize, IppDataType dataType,int numChannels, int* pSpecSize);
IppStatus ippiFilterSeparableGetSpecSize_T(IppiSize kernelSize,IppDataType dataType,int numChannels, int* pSpecSize);
IppStatus ippiFilterSeparableGetSpecSize_LT(IppiSize kernelSize,IppDataType dataType,int numChannels, int* pSpecSize);

Include Files
ippcv.hippcv_l.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
kernelSize

Size of the rectangular kernel in pixels.

dataType

Data type of the source image. Possible values are Ipp16s,
Ipp32f.

numChannels

Number of channels in the image. Possible values are 1, 3, and4.

pSpecSize

Pointer to the size of the filter specification structure.

Description
This function computes the size of the filter specification structure pSpec. Call this function before using theippiFilterSeparableInit function.

1157

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if one of the specified pointers is
NULL.

ippStsSizeErr

Indicates an error condition if kernelSize has a field with azero or negative value.

ippStsDataTypeErr

Indicates an error condition if dataType has an illegal value.

ippStsChannelErr

Indicates an error condition if numChannels has an illegal value.

See Also
FilterSeparableInit Initializes the filter specification structure.
FilterSeparableInit
Initializes the filter specification structure.

SyntaxIppStatus ippiFilterSeparableInit_16s(const Ipp16s* pRowKernel, const Ipp16s*
pColumnKernel, IppiSize kernelSize, int divisor, int scaleFactor, IppDataType dataType,int numChannels, IppiFilterSeparableSpec* pSpec);
IppStatus ippiFilterSeparableInit_32f(const Ipp32f* pRowKernel, const Ipp32f*
pColumnKernel, IppiSize kernelSize, IppDataType dataType, int numChannels,
IppiFilterSeparableSpec* pSpec);

Platform-aware functions
IppStatus ippiFilterSeparableInit_16s_L(const Ipp16s* pRowKernel, const Ipp16s*
pColumnKernel, IppiSize kernelSize, int divisor, int scaleFactor, IppDataType dataType,int numChannels, IppiFilterSeparableSpec* pSpec);
IppStatus ippiFilterSeparableInit_32f_L(const Ipp32f* pRowKernel, const Ipp32f*
pColumnKernel, IppiSize kernelSize, IppDataType dataType, int numChannels,
IppiFilterSeparableSpec* pSpec);
IppStatus ippiFilterSeparableInit_16s_T(const Ipp16s* pRowKernel, const Ipp16s*
pColumnKernel, IppiSize kernelSize, int divisor, int scaleFactor, IppDataType dataType,int numChannels, IppiFilterSeparableSpec* pSpec);
IppStatus ippiFilterSeparableInit_32f_T(const Ipp32f* pRowKernel, const Ipp32f*
pColumnKernel, IppiSize kernelSize, IppDataType dataType, int numChannels,
IppiFilterSeparableSpec* pSpec);
IppStatus ippiFilterSeparableInit_16s_LT(const Ipp16s* pRowKernel, const Ipp16s*
pColumnKernel, IppiSize kernelSize, int divisor, int scaleFactor, IppDataType dataType,int numChannels, IppiFilterSeparableSpec* pSpec);
IppStatus ippiFilterSeparableInit_32f_LT(const Ipp32f* pRowKernel, const Ipp32f*
pColumnKernel, IppiSize kernelSize, IppDataType dataType, int numChannels,
IppiFilterSeparableSpec* pSpec);

Include Files
ippcv.hippcv_l.h

1158

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pRowKernel, pColumnKernel

Pointer to the row and column kernel values.

kernelSize

Size of the rectangular kernel in pixels.

divisorInteger value by which the computed result is divided.

scaleFactor

Integer value by which the computed result is divided.

dataType

Data type of the source image. Possible values are Ipp8u,
Ipp16s, Ipp16u, Ipp32f.

numChannels
pSpec

Number of channels in the image. Possible values are 1, 3, and4.
Pointer to the filter specification structure.

Description
This function initializes the filter specification structure pSpec in the external buffer. Before using thisfunction, you need to compute the size of the specification structure using theFilterSeparableGetSpecSize function. This structure is used by the FilterSeparable function that
performs filtering operations on the source image pixels.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if one of the specified pointers is
NULL.

ippStsDataTypeErr

Indicates an error condition if kernelSize has a field with azero or negative value.
Indicates an error condition if dataType has an illegal value.

ippStsChannelErr

Indicates an error condition if numChannels has an illegal value.

ippStsDivisorErr

Indicates an error condition if divisor has a zero value.

ippStsSizeErr

See Also
FilterSeparable Apply the filter to an image.
FilterSeparableGetSpecSize Computes the size of the filter specification structure.
Smoothing Filters
Smoothing filters use edge-preserving real-time Iterative Least Squares algorithm for image processing. Thisalgorithm is described in the article "Real-time Image Smoothing via Iterative Least Squares. Wei Liu,
Pingping Zhang, Xiaolin Huang, Jie Yang, Chunhua Shen, Ian Reid". Link to the publication: https://
arxiv.org/abs/2003.07504.

FilterILSInit
Initializes the filter specification structure.

1159

1

Intel® Integrated Performance Primitives Developer Guide and Reference

SyntaxIppStatus ippiFilterILSInit (IppiFilterILSType filter, IppiSize dstRoiSize, IppDataTypedataType, int numChannels, Ipp64f lambda, Ipp64f eps, Ipp64f pow, Ipp64f gamma,
IppiFilterILSSpec* pSpec, Ipp8u* pBufInit);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
filterFilter type: Norm or Welsch.

dataType

Data type flavors.

dstRoiSize

Size of the source and destination ROI in pixels.

numChannels

Number of channels.

pSpecSize

Pointer to the size (in bytes) of the specification structure.

pBufInitSize

Pointer to the size (in bytes) of the init temp buffer.

pBufferSize

Pointer to the size (in bytes) of the work buffer.

lambdaLambda for Norm and Welsch.

eps

Eps for Norm.

pow

P for Norm.

gamma

Gamma for Welsch.

pSpec

Pointer to the specification structure.

pBufInit

Pointer to the buffer for init function.

Description
This function initializes the filter specification structure pSpec in the work buffer.
Before using this function, you need to compute the size of the specification structure using theippiFilterILSGetBufferSize function. This structure is used by the ippiFilterILS function that
performs edge-preserving image smoothing via Iterative Least Squares algorithm.
The ippiFilterILSInit function takes the following parameters: lambda, eps, p, gamma with values thatare described in the article "Real-time Image Smoothing via Iterative Least Squares. Wei Liu, Pingping
Zhang, Xiaolin Huang, Jie Yang, Chunhua Shen, Ian Reid". Link to the publication: https://arxiv.org/abs/
2003.07504.
Use the ippiFilterILSGetBufferSize function to allocate the work buffer pBuffer and pBufInit.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if any of the specified pointers is
NULL.

1160

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

ippStsStepErr
ippStsSizeErr

Indicates an error condition if one of the steps has a zero or
negative value.
Indicates an error condition if one of the fields of dstRoiSize
has a zero or negative value.

FilterILSGetBufferSize
Computes the size of the work buffer.

SyntaxIppStatus ippiFilterILSGetBufferSize (IppiFilterILSType filter, IppiSize dstRoiSize,
IppDataType dataType, int numChannels, int* pSpecSize, int* pBufInitSize, int*
pBufferSize);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
filterFilter type: Norm or Welsch.

dataType

Data type flavors.

dstRoiSize

Size of the source and destination ROI in pixels.

numChannels

Number of channels.

pSpecSize

Pointer to the size (in bytes) of the specification structure.

pBufInitSize

Pointer to the size (in bytes) of the init temp buffer.

pBufferSize

Pointer to the size (in bytes) of the work buffer.

Description
This function computes the size of the buffers required for filtering operations. Call this function before using
the ippiFilterILSInit and ippiFilterILS functions.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if any of the specified pointers is
NULL.

ippStsStepErr
ippStsSizeErr

Indicates an error condition if one of the steps has a zero or
negative value.
Indicates an error condition if one of the fields of dstRoiSize
has a zero or negative value.

FilterILS
Filters an image using smoothing algorithm.

1161

1

Intel® Integrated Performance Primitives Developer Guide and Reference

SyntaxIppStatus ippiFilterILS_<mod>(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int dstStep,
IppiSize dstRoiSize, int nIter, IppiFilterILSSpec* pSpec, Ipp8u* pBuffer);
Supported values for mod:8u_C1R
8u_C3R

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source image ROI.

srcStep

Step through the source image.

pDst

Pointer to the destination image ROI.

dstStep

Step in destination image.

dstRoiSize

Size of the source and destination ROI in pixels.

nIter

Number of iterations.

pSpec

Pointer to the internal data structure.

pBuffer

Pointer to the external work buffer.

Description
This function implements edge-preserving image smoothing via Iterative Least Squares algorithm.
This algorithm is described in the article "Real-time Image Smoothing via Iterative Least Squares. Wei Liu,
Pingping Zhang, Xiaolin Huang, Jie Yang, Chunhua Shen, Ian Reid". Link to the publication: https://
arxiv.org/abs/2003.07504.
The function ippiFilterILS uses the internal data structure pSpec and the work buffer pBuffer.
Therefore, the work buffer pBuffer must be allocated and the internal data structure pSpec must be
initialized before the function call.
Use the ippiFilterILSGetBufferSize function to allocate the work buffer pBuffer.
Use the ippiFilterILSInit function to initialize the internal data structure pSpec.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if any of the specified pointers is
NULL.

ippStsStepErr

Indicates an error condition if one of the steps has a zero or
negative value.

1162

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

ippStsSizeErr

Indicates an error condition if one of the fields of dstRoiSize
has a zero or negative value.

Wiener Filters
Intel IPP functions described in this section perform adaptive noise-removal filtering of an image using
Wiener filter [Lim90]. The adaptive filter is more selective than a comparable linear filter in preserving edges
and other high frequency parts of an image. Wiener filters are commonly used in image processing
applications to remove additive noise from degraded images, to restore a blurry image, and in similar
operations.
These functions use a pixel-wise adaptive Wiener method based on statistics estimated from a local
neighborhood (mask) of arbitrary size for each pixel.

FilterWienerGetBufferSize
Computes the size of the external buffer for
ippiFilterWiener function.

SyntaxIppStatus ippiFilterWienerGetBufferSize(IppiSize dstRoiSize, IppiSize maskSize, int
channels, int* pBufferSize);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
dstRoiSize

Size of the destination ROI in pixels.

maskSize

Size of the mask in pixels.

channels

Number of channels in the image.

pBufferSize

Pointer to the computed value of the external buffer size.

Description
This function computes the size in bytes of an external memory buffer that is required for the function
ippiFilterWiener, and stores the result in the pBufferSize.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if the pBufferSize pointer is NULL.

ippStsSizeErr
ippStsMaskSizeErr
ippStsNumChannelsErr

Indicates an error condition if one of the fields of dstRoiSize
has a zero or negative value.
Indicates an error condition if one of the fields of maskSize has
a value less than or equal to 1.
Indicates an error condition if channels is not 1, 3 or 4.

1163

1

Intel® Integrated Performance Primitives Developer Guide and Reference

FilterWiener
Filters an image using the Wiener algorithm.

SyntaxCase 1: Operation on one-channel images
IppStatus ippiFilterWiener_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>*pDst, int dstStep, IppiSize dstRoiSize, IppiSize maskSize, IppiPoint anchor, Ipp32f
noise[1], Ipp8u* pBuffer);
Supported values for mod:8u_C1R

16s_C1R

32f_C1R

Case 2: Operation on multi-channel images
IppStatus ippiFilterWiener_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>*pDst, int dstStep, IppiSize dstRoiSize, IppiSize maskSize, IppiPoint anchor, Ipp32f
noise[3], Ipp8u* pBuffer);
Supported values for mod:8u_C3R

16s_C3R

32f_C3R

8u_AC4R

16s_AC4R

32f_AC4R

IppStatus ippiFilterWiener_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>*pDst, int dstStep, IppiSize dstRoiSize, IppiSize maskSize, IppiPoint anchor, Ipp32f
noise[4], Ipp8u* pBuffer);
Supported values for mod:8u_C4R

16s_C4R

32f_C4R

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc
srcStep
pDst

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the destination image ROI.

dstRoiSize

Distance in bytes between starts of consecutive lines in thedestination image.
Size of the source and destination ROI in pixels.

maskSize

Size of the mask in pixels.

anchorAnchor cell specifying the mask alignment with respect to theposition of the input pixel.

dstStep1164

Developer Guide and Reference for Intel® Integrated Performance Primitives

noise
pBuffer1

Noise level value or array of the noise level values in case ofmulti-channel image. This value must be in the range [0,1].
Pointer to the external work buffer.

Description
This function operates with ROI (see Regions of Interest in Intel IPP). This function performs adaptive
filtering of the image degraded by constant power additive noise. For each pixel of the input image pSrc, thefunction estimates the local image mean μ and variance σ in the rectangular neighborhood (mask) of size
maskSize with the anchor cell anchor centered on the pixel. The anchor cell is specified by its coordinates
anchor.x and anchor.y in the coordinate system associated with the bottom right corner of the mask.
The following formulas are used in computations:

Here μi,j and σi,j stand for local mean and variance for pixel Xi,j, respectively, and H, W are the vertical andhorizontal sizes of the mask, respectively.
The corresponding value for the output pixel Yi,j is computed as:

and stored in the pDst. Here ν2 is the noise variance, specified for each channel by the noise level parameter
noise. If this parameter is not defined (noise = 0), then the function estimates the noise level by averaging
through the image of all local variances σi,j, and stores the corresponding values in the noise for further use.
The function ippiFilterWiener uses the external work buffer pBuffer, which must be allocated before thefunction call. To determine the required buffer size, the function ippiFilterWienerGetBufferSize can be
used.

1165

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Figure “Applying the function ippiFilterWiener” illustrates the result of using ippiFilterWiener_32f_C1Rfunction.
Applying the function ippiFilterWiener

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if one of the specified pointers is
NULL.

ippStsSizeErr
ippStsMaskSizeErr
ippStsNoiseRangeErr

Indicates an error condition if one of the fields of dstRoiSize
has a zero or negative value.
Indicates an error condition if one of the fields of maskSize has
a value less than or equal to 1.
Indicates an error condition if one of the noise values is lessthan 0 or greater than 1.

ExampleConvolution
Intel IPP functions described in this section perform two-dimensional finite linear convolution operation
between two source images and write the result into the destination image. Convolution is used to performmany common image processing operations including sharpening, blurring, noise reduction, embossing, andedge enhancement. For convenience, any digital image f is represented here as a matrix with Mf columns andNf rows that contains pixel values f[i,j], 0 ≤i < Mf, 0 ≤j < Nf.

ConvGetBufferSize
Computes the size of the work buffer for theippiConv function.

1166

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

SyntaxIppStatus ippiConvGetBufferSize (IppiSize src1Size, IppiSize src2Size, IppDataTypedataType, int numChannels, IppEnum algType, int* pBufferSize);

Include Files
ippi.hParameterssrc1Size, src2Size

Size, in pixels, of the source images.

dataType

Data type for convolution. Possible values are ipp32f, ipp16s, or
ipp8u.

numChannels

Number of image channels. Possible values are 1, 3, or 4.

algType

Bit-field mask for the algorithm type definition. Possible values are theresults of composition of the IppAlgType and IppiROIShape values.

pBufferSize

Pointer to the size of the work buffer.

Description
The ippiConvGetBufferSize function computes the size, in bytes, of the external work buffer needed forthe function that performs two-dimensional convolution. The result is stored in the pBufferSize parameter.

Return Values
ippStsNoErr
ippStsSizeErr
ippStsNullChannelsErr

Indicates no error.
Indicates an error when the src1Size or src2Size is negative,or equal to zero.
Indicates an error when the numChannels value differs from 1,
3, or 4.

ippStsDataTypeErr

Indicates an error when the dataType value differs from the ipp32f,
ipp16s, or ipp8u.

ippStsAlgTypeErr

Indicates an error when:•

the result of the bitwise AND operation between algType andippAlgMask differs from the ippAlgAuto, ippAlgDirect, or
ippAlgFFT values;• the result of the bitwise AND operation between algType andippiROIMask differs from the ippiROIFull or ippiROIValidvalues.

ippStsNullPtrErr

Indicates an error when the pBufferSize is NULL.

See Also
Structures and Enumerators
Conv Performs two-dimensional convolution of two images.
Conv
Performs two-dimensional convolution of two images.

1167

1

Intel® Integrated Performance Primitives Developer Guide and Reference

SyntaxCase 1: Operating on integer data
IppStatus ippiConv_<mod>(const Ipp<datatype>* pSrc1, int src1Step, IppiSize src1Size,const Ipp<datatype>* pSrc2, int src2Step, IppiSize src2Size, Ipp<datatype>* pDst, int
dstStep, int divisor, IppEnum algType, Ipp8u* pBuffer);
Supported values for mod

8u_C1R

16s_C1R

8u_C3R

16s_C3R

8u_C4R

16s_C4R

Case 2: Operating on floating-point data
IppStatus ippiConv_<mod>(const Ipp32f* pSrc1, int src1Step, IppiSize src1Size, const
Ipp32f* pSrc2, int src2Step, IppiSize src2Size, Ipp32f* pDst, int dstStep, IppEnum
algType, Ipp8u* pBuffer);
Supported values for mod

32f_C1R
32f_C3R
32f_C4R

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc1, pSrc2

Pointers to the source images ROI.

src1Step, src2Step
src1Size, src2SizeDistance, in bytes, between the starting points of consecutive
lines in the source images.
Size in pixels of the source images.

pDst

Pointer to the destination image ROI.

dstStep
divisoralgType

pBuffer

Distance, in bytes, between the starting points of consecutive
lines in the destination image.
The integer value by which the computed result is divided (foroperations on integer data only).
Bit-field mask for the algorithm type definition. Possible values
are the results of composition of the IppAlgType and
IppiROIShape values.
Pointer to the buffer for internal calculations.

Description
Before using this function, you need to compute the size of the work buffer using theippiConvGetBufferSize function.

1168

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

The ippiConv function operates with ROI. The type of convolution that function performs is defined by thevalue of the algType parameter:1.

If the ippiROIFull flag is set, the function performs full two-dimensional finite linear convolution
between two source images pointed by the pSrc1 and pSrc2 parameters. The resulting destination
image h[i, j] is computed by the following formula:

where
•

Mh = Mf + Mg - 1
where
•
•

Mf is the number of rows in the first source image matrix f
Mg is the number of rows in the second source image matrix g• Nh = Nf + Ng - 1
where

•
•

2.

• Nf is the number of columns in the first source image matrix f• Ng is the number of columns in the second source image matrix g
0 ≤i < Mh, 0 ≤i < Nh

If the ippiROIValid flag is set up, the function performs valid two-dimensional finite linear convolution
between two source images pointed by the pSrc1 and pSrc2 parameters. The destination image h[i,j] obtained as a result of the function operation is computed by the following formula:

where
•

Mh = | Mf - Mg| + 1
where
•
•

Mf is the number of rows in the first source image matrix f
Mg is the number of rows in the second source image matrix g• Nh = |Nf - Ng| + 1
where

1169

1

Intel® Integrated Performance Primitives Developer Guide and Reference• Nf is the number of columns in the first source image matrix f• Ng is the number of columns in the second source image matrix g
0 ≤i < Mh, 0 ≤i < Nh•

This case assumes that Mf≥Mg and Nf≥Ng. In case when Mf < Mg and Nf < Ng, the subscript index g in thisequation must be replaced with the index f. For any other combination of source image sizes, thefunction performs no operation.
NOTE
The above formula provides the same result as in the case with the ippiROIFull flag, but produces
only the part of the convolution image that is computed without zero-padded values.

Function flavors that accept input data of the Ipp32f type use the same summation formula, but without
scaling of the result (divisor = 1 is assumed).
The following examples illustrate the function operation. For the source images f, g of size 3 x 5 represented
aswith g = f:•

for the ippiROIFull case, the resulting convolution image h is of size 5 x 9 and contains the following
data:

•

for the ippiROIValid case, the resulting convolution image h is of size 1 x 1 and contains the followingdata:h = [11]1170

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error when any of the specified pointers is NULL.

ippStsDivisorErr

Indicates an error when src1Size or src2Size has a zero or
negative value.
Indicates an error when src1Step, src2Step, or dstStep has azero or negative value.
Indicates an error when divisor has a zero value.

ippStsAlgTypeErr

Indicates an error when:ippStsSizeErr
ippStsStepErr•

the result of the bitwise AND operation between the algType andippAlgMask differs from the ippAlgAuto, ippAlgDirect, or
ippAlgFFT values;• the result of the bitwise AND operation between the algType andippiROIMask differs from the ippiROIFull or ippiROIValidvalues.

ExampleSee Also
Regions of Interest in Intel IPP
Structures and Enumerators
ConvGetBufferSize Computes the size of the work buffer for the ippiConv function.
Deconvolution
Functions described in this section perform image deconvolution. They can be used for restoring thedegraded image, in particular image that was obtained by applying the convolution operation with known
kernel. The Intel IPP functions implement two methods: the Fourier deconvolution (noniterative method) [seefor example, [Puetter05]], and the Richardson-Lucy method (iterative method) [Ric72]. Border pixels of asource image are restored before deconvolution.

DeconvFFTGetSize
Computes the size of the state structure fordeconvolution with the fast Fourier transform (FFT).

SyntaxIppStatus ippiDeconvFFTGetSize_32f(int nChannels, int kernelSize, int FFTorder, int*
pSize);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

1171

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Parameters
nChannels

Number of channels in the image. Possible values are 1 or 3.

kernelSize

Size of the kernel.

FFTorderOrder of the created FFT state structure.

pSize

Pointer to the size of the IppiDeconvFFTState_32f_C1R or
IppiDeconvFFTState_32f_C3R structure, in bytes.

Description
This function computes the fast Fourier transform (FFT) deconvolution state structure size that is required toinitialize the structure with the ippiDeconvFFTInit function. This structure is used by the ippiDeconvFFT
function, which performs deconvolution of the source image using FFT.

Return Values

ippStsNullPtrErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error when any of the specified pointers is NULL.

ippStsNumChannelsErr

Indicates an error when nChannels has an illegal value.

ippStsSizeErr

Indicates an error when kernelSize is less than, or equal to 0;
or if kernelSize is greater than 2FFTorder.

ippStsNoErr

See Also
DeconvFFTInit Initializes the FFT deconvolution state structure.
DeconvFFT Performs FFT deconvolution of an image.
DeconvFFTInit
Initializes the FFT deconvolution state structure.

SyntaxIppStatus ippiDeconvFFTInit_32f_C1R(IppiDeconvFFTState_32f_C1R* pDeconvFFTState, const
Ipp32f* pKernel, int kernelSize, int FFTorder, Ipp32f threshold);
IppStatus ippiDeconvFFTInit_32f_C3R(IppiDeconvFFTState_32f_C3R* pDeconvFFTState, const
Ipp32f* pKernel, int kernelSize, int FFTorder, Ipp32f threshold);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pDeconvFFTState

Pointer to the FFT deconvolution state structure.

pKernelPointer to the kernel array.

kernelSize

Size of the kernel.

1172

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

FFTorderOrder of the created FFT state structure.

threshold

Value of the threshold level (to exclude dividing by zero).

Description
This function initializes the FFT deconvolution state structure that is used by the ippiDeconvFFT function to
perform deconvolution of the source image using FFT. Before using the ippiDeconvFFTInit function,
compute the size of the structure using the ippiDeconvFFTGetSize function.

Return Values
ippStsNoErr
ippStsNullPtrErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error when any of the specified pointers is NULL.

ippStsSizeErr

Indicates an error when kernelSize is less than, or equal to 0;
or if kernelSize is greater than 2FFTorder.

ippStsBadArgErr

Indicates an error when threshold is less than, or equal to 0.

See Also
DeconvFFTGetSize Computes the size of the state structure for deconvolution with the fast
Fourier transform (FFT).
DeconvFFT Performs FFT deconvolution of an image.
DeconvFFT
Performs FFT deconvolution of an image.

SyntaxIppStatus ippiDeconvFFT_32f_C1R(const Ipp32f* pSrc, int srcStep, Ipp32f* pDst, int
dstStep, IppiSize roiSize, IppiDeconvFFTState_32f_C1R* pDeconvFFTState);
IppStatus ippiDeconvFFT_32f_C3R(const Ipp32f* pSrc, int srcStep, Ipp32f* pDst, int
dstStep, IppiSize roiSize, IppiDeconvFFTState_32f_C3R* pDeconvFFTState);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc
srcStep
pDst
dstStep
roiSize

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the destination image ROI.
Distance in bytes between starts of consecutive lines in thedestination image.
Size of the source and destination image ROI.

1173

1

Intel® Integrated Performance Primitives Developer Guide and Reference

pDeconvFFTState

Pointer to the FFT deconvolution state structure.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function performs deconvolution of the source image pSrc using FFT with parameters specified in the
FFT deconvolution state structure pDeconvFFTState and stores results to the destination image pDst. The
FFT deconvolution state structure must be initialized by calling the function DeconvFFTInit beforehand.

Return Values
ippStsNoErr
ippStsNullPtrErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointers is
NULL.

DeconvLRGetSize
Computes the size of the state structure for LucyRichardson (LR) deconvolution.

SyntaxIppStatus ippiDeconvLRGetSize_32f(int numChannels, int kernelSize, IppiSize maxRoi,
int* pSize);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
numChannels

Number of channels in the image. Possible values are 1 or 3.

kernelSize

Size of the kernel.

maxRoiMaximum size of the image ROI, in pixels.

pSize

Pointer to the size of the IppiDeconvLRState_32f_C1R or
IppiDeconvLRState_32f_C3R structure, in bytes.

Description
This function computes the Lucy-Richardson (LR) deconvolution state structure size that is required toinitialize the structure with the ippiDeconvLRInit function. This structure is used by the ippiDeconvLR
function, which performs LR deconvolution of the source image.

Return Values
ippStsNoErr
ippStsNullPtrErr

1174

Indicates no error. Any other value indicates an error or awarning.
Indicates an error when any of the specified pointers is NULL.

1Developer Guide and Reference for Intel® Integrated Performance Primitives

ippStsSizeErr

Indicates an error when:• kernelSize is less than, or equal to 0
• kernelSize is greater than maxRoi.height or maxRoi.width• maxRoi.height or maxRoi.width is less than, or equal to zeroSee Also
DeconvLRInit Initializes the LR deconvolution state structure.
DeconvLR Performs LR deconvolution of an image.
DeconvLRInit
Initializes the LR deconvolution state structure.

SyntaxIppStatus ippiDeconvLRInit_32f_C1R(IppiDeconvLR_32f_C1R* pDeconvLR, const Ipp32f*
pKernel, int kernelSize, IppiSize maxRoi, Ipp32f threshold);
IppStatus ippiDeconvLRInit_32f_C3R(IppiDeconvLR_32f_C3R* pDeconvLR, const Ipp32f*
pKernel, int kernelSize, IppiSize maxRoi, Ipp32f threshold);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pDeconvLR

Pointer to the LR deconvolution state structure.

pKernelPointer to the kernel array.

kernelSize

Size of the kernel.

maxRoiMaximum size of the image ROI, in pixels.

threshold

Value of the threshold level (to exclude dividing by zero).

Description
This function initializes the LR deconvolution state structure that is used by the ippiDeconvLR function to
perform LR deconvolution of the source image. Before using the ippiDeconvLRInit function, compute thesize of the structure using the ippiDeconvLRGetSize function.

Return Values

ippStsNullPtrErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error when any of the specified pointers is NULL.

ippStsSizeErr

Indicates an error when:ippStsNoErr• kernelSize is less than, or equal to 0
• kernelSize is greater than maxRoi.height or maxRoi.width

1175

1

Intel® Integrated Performance Primitives Developer Guide and Reference• maxRoi.height or maxRoi.width is less than, or equal to zero
ippStsBadArgErr

Indicates an error when threshold is less than, or equal to 0.

See Also
DeconvLRGetSize Computes the size of the state structure for Lucy-Richardson (LR)deconvolution.
DeconvLR Performs LR deconvolution of an image.
DeconvLR
Performs LR deconvolution of an image.

SyntaxIppStatus ippiDeconvLR_32f_C1R(const Ipp32f* pSrc, int srcStep, Ipp32f* pDst, int
dstStep, IppiSize roiSize, int numIter, IppiDeconvLR_32f_C1R* pDeconvLR);
IppStatus ippiDeconvLR_32f_C3R(const Ipp32f* pSrc, int srcStep, Ipp32f* pDst, int
dstStep, IppiSize roiSize, int numIter, IppiDeconvLR_32f_C3R* pDeconvLR);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc
srcStep
pDst

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the destination image ROI.

roiSize

Distance in bytes between starts of consecutive lines in thedestination image.
Size of the source and destination image ROI.

numIterNumber of algorithm iterations.

pDeconvLR

Pointer to the LR deconvolution state structure.

dstStep

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function performs deconvolution of the source image pSrc using the Lucy-Richardson algorithm withparameters specified in the state structure pDeconvLR and stores results to the destination image pDst. The
Lucy-Richardson deconvolution state structure must be initialized by calling the function DeconvLRInit
beforehand.

Return Values
ippStsNoErr

1176

Indicates no error. Any other value indicates an error or awarning.

Developer Guide and Reference for Intel® Integrated Performance Primitives

ippStsNullPtrErr
ippStsSizeErr

ippStsStepErr
ippStsNotEvenStepErr
ippStsBadArgErr

1

Indicates an error condition if one of the specified pointers is

NULL.

Indicates an error condition if roi.width or roi.height is lessthan or equal to 0, or if roi.width is greater than(maxRoi.width - kernelSize), or roi.height is greater than(maxRoi.height - kernelSize).
Indicates an error condition if srcStep or dstStep is less thanroiSize.width * <pixelSize>.
Indicates an error condition if steps for floating-point images
are not divisible by 4.
Indicates an error condition if numIter is less than or equal to0.

Fixed Filters
The fixed filter functions perform linear filtering of a source image using one of the predefined convolution
kernels.
NOTE Kernels of fixed filters are in inverse order.
The supported fixed filters and their respective kernel sizes are listed in the following table:
Types of the Fixed Filter Functions
Fixed Filter Type

Kernel Size

Horizontal Prewitt operator

3x3
3x3
3x3
3x3
3x3 or 5x5
3x3 or 5x5
3x3 or 5x5
3x3 or 5x5
3x3 or 5x5
3x3
3x3
3x3 or 5x5
3x3 or 5x5
3x3 or 5x5
3x3 or 5x5
3x3

Vertical Prewitt operator
Horizontal Scharr operator
Vertical Scharr operator
Horizontal Sobel operator
Vertical Sobel operator
Second derivative horizontal Sobel operator
Second derivative vertical Sobel operator
Second cross derivative Sobel operator
Horizontal Roberts operator
Vertical Roberts operator
Laplacian highpass filter
Gaussian lowpass filter
Highpass filter
Lowpass filter
Sharpening filter

Using fixed filter functions with predefined kernels is more efficient as it eliminates the need to create theconvolution kernel in your application program.
NOTE
The anchor cell is the center cell of the kernel for all fixed filters.

1177

1

Intel® Integrated Performance Primitives Developer Guide and Reference

FilterGaussianGetBufferSize
Computes the size of the Gaussian specification
structure and the size of the external work buffer for
Gaussian filtering with user-defined borders.

SyntaxIppStatus ippiFilterGaussianGetBufferSize(IppiSize maxRoiSize, Ipp32u kernelSize,
IppDataType dataType, int numChannels, int* pSpecSize, int* pBufferSize);

Platform-aware functions
IppStatus ippiFilterGaussianGetBufferSize_L(IppiSizeL maxRoiSize, int kernelSize,
IppDataType dataType, IppiBorderType borderType, int numChannels, IppSizeL*
pBufferSize);

Include Files
ippcv.hFlavors with the _L suffix: ippcv_l.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
maxRoiSize

Maximal size of the image ROI in pixels.

dataType

Size of the Gaussian filter kernel. The value must be odd andgreater, or equal to 3.
Data type of the source and destination images.

borderType

One of border supported types.

numChannels

Number of channels in the images. Possible values are 1 and 3.

kernelSize

pSpecSizepBufferSize

Pointer to the computed size (in bytes) of the Gaussian
specification structure.
Pointer to the computed size (in bytes) of the external buffer.

Description
This function computes the size of the Gaussian context structure and external work buffer for theFilterGaussianBorder function or for the platform-aware function FilterGaussian. The results are
stored in pSpecSize and pBufferSize. The buffer with the length pBufferSize[0] can be used to filter animage with the width and height less than, or equal to the corresponding fields of maxRoiSize, and/or kernel
size that is less than, or equal to kernelSize.

NOTE
The platform-aware function FilterGaussianGetBufferSize_L computes only the size of theexternal work buffer for Gaussian filtering with user-defined borders. To compute the size of
the Gaussian specification structure, please use the platform-aware function
FilterGaussianGetSpecSize.

1178

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Use the computed pBufferSize and pSpecSize values to allocate the memory using the ippMalloc orippsMalloc functions. The allocated memory can be freed only by the ippFree or ippsFree functions,
respectively. For more information about the memory allocation functions, refer to the "Support Functions"section of the Intel IPP Developer Reference, vol. 1.
For an example on how to use this function, refer to the example provided with the FilterGaussianBorderfunction description.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsBadArgErr

Indicates an error when maxRoiSize has a field with a zero or
negative value.
Indicates an error when kernelSize is even, or less than 3.

ippStsDataTypeErr

Indicates an error when dataType has an illegal value.

ippStsNumChannelErr

Indicates an error when numChannels has an illegal value.

ippStsSizeErr

See Also
FilterGaussianBorder Performs Gaussian filtering of an image with user-defined borders.
FilterGaussianGetSpecSize
Computes the size of the Gaussian specification
structure.

SyntaxIppStatus ippiFilterGaussianGetSpecSize(int kernelSize, IppDataType dataType, int
numChannels, int* pSpecSize, int* pInitBufferSize);
IppStatus ippiFilterGaussianGetSpecSize_L(int kernelSize, IppDataType dataType, int
numChannels, IppSizeL* pSpecSize, IppSizeL* pInitBufferSize);

Include Files
ippcv.hippcv_l.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters

dataType

Size of the Gaussian filter kernel. The value must be odd andgreater, or equal to 3.
Data type of the source and destination images.

numChannels

Number of channels in the images. Possible values are 1 and 3.

kernelSize

pSpecSize
pInitBufferSize

Pointer to the computed size (in bytes) of the Gaussian
specification structure.
Pointer to the computed size (in bytes) of the external buffer.

1179

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Description
This function computes the size of the Gaussian context structure and the size of the initialization external
work buffer for the FilterGaussianBorder function or for the platform-aware functions
FilterGaussianInit and FilterGaussian. The results are stored in pSpecSize and pInitBufferSize.
The buffer with the length pInitBufferSize[0] can be used to initialize the specification structure for theGaussian filter.
Use the computed pInitBufferSize and pSpecSize values to allocate the memory using the ippMalloc orippsMalloc functions. The allocated memory can be freed only by the ippFree or ippsFree functions,
respectively. For more information about the memory allocation functions, refer to the "Support Functions"section of the Intel IPP Developer Reference, vol. 1.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsBadArgErr

Indicates an error when kernelSize is even, or less than 3.

ippStsDataTypeErr

Indicates an error when dataType has an illegal value.

ippStsNumChannelErr

Indicates an error when numChannels has an illegal value.

See Also
FilterGaussian Performs Gaussian filtering of an image with user-defined borders.
FilterGaussianInit
Initializes the Gaussian context structure.

SyntaxIppStatus ippiFilterGaussianInit(IppiSize roiSize, Ipp32u kernelSize, Ipp32f sigma,
IppiBorderType borderType, IppDataType dataType, int numChannels,
IppFilterGaussianSpec* pSpec, Ipp8u* pBuffer);

Platform-aware functions
IppStatus ippiFilterGaussianInit_L(IppiSizeL roiSize, int kernelSize, Ipp32f sigma,
IppiBorderType borderType, IppDataType dataType, int numChannels,
IppFilterGaussianSpec* pSpec, Ipp8u* pInitBuffer);

Include Files
ippcv.hFlavors with the _L suffix: ippcv_l.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
roiSize

Size of the image ROI in pixels.

kernelSize

Size of the Gaussian filter kernel. The value
must be odd and greater, or equal to 3.

1180

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

sigmaStandard deviation of the Gaussian kernel.

borderType

Type of border. Possible values are:ippBorderConst Values of all border pixels are

set to constant.
Borderis replicated from theippBorderRepl
edge pixels.
ippBorderInMem Border is obtained from theimage pixels in memory.
ippBorderMirro Border pixels are mirroredfrom the source imagerboundary pixels.
dataType

Data type of the source and destination images.

numChannels

Number of channels in the images. Possible
values are 1 and 3.

pSpec

Pointer to the Gaussian specification structure.

pBuffer, pInitBuffer

Pointer to the external buffer.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function initializes the Gaussian specification structure pSpec for the FilterGaussianBorder function
or for the platform-aware function FilterGaussian. Before using this function, compute the size of thespecification structure and the external buffer using the FilterGaussianGetBufferSize function andFilterGaussianGetSpecSize for the platform-aware function.
The roiSize and kernelSize values must be less than, or equal to the corresponding values specified in
the FilterGaussianGetBufferSize function.
The kernel of the Gaussian filter is the matrix of size kernelSizexkernelSize with the standard deviation
sigma. The values of the Gaussian kernel elements are calculated by the formula below and then normalized:

The anchor cell is the center of the kernel.
For an example on how to use this function, refer to the example provided with the FilterGaussianBorderfunction description.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error when roiSize has a field with a zero or
negative value.

ippStsBadArgErr

Indicates an error when kernelSize is even, or less than 3; or sigma
is less than, or equal to zero.

1181

1

Intel® Integrated Performance Primitives Developer Guide and ReferenceippStsDataTypeErr

Indicates an error when dataType has an illegal value.

ippStsChannelErr

Indicates an error when numChannels has an illegal value.

ippStsBorderErr

Indicates an error when borderType has an illegal value.

See Also
FilterGaussianGetBufferSize Computes the size of the Gaussian specification structure and thesize of the external work buffer for Gaussian filtering with user-defined borders.
FilterGaussianBorder Performs Gaussian filtering of an image with user-defined borders.
FilterGaussian
Performs Gaussian filtering of an image with userdefined borders.

SyntaxCase 1: Operating on one-channel data
IppStatus ippiFilterGaussian_<mod>(const Ipp<datatype>* pSrc, int srcStep,
Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, IppiBorderType borderType, const
Ipp<datatype> borderValue[1], IppFilterGaussianSpec* pSpec, Ipp8u* pBuffer);
Supported values for mod:8u_C1R

16u_C1R

16s_C1R

32f_C1R

Case 2: Operating on multi-channel data
IppStatus ippiFilterGaussian_<mod>(const Ipp<datatype>* pSrc, int srcStep,
Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, IppiBorderType borderType, const
Ipp<datatype> borderValue[3], IppFilterGaussianSpec* pSpec, Ipp8u* pBuffer);
Supported values for mod:8u_C3R

16u_C3R

16s_C3R

32f_C3R

Case 3: Operating on one-channel data with platform-aware functions
IppStatus ippiFilterGaussian_<mod>(const Ipp<datatype>* pSrc, IppSizeL srcStep,
Ipp<datatype>* pDst, IppSizeL dstStep, IppiSizeL roiSize, IppiBorderType borderType,const Ipp<datatype> borderValue[1], IppFilterGaussianSpec* pSpec, Ipp8u* pBuffer);
Supported values for mod:8u_C1R_L

16u_C1R_L

16s_C1R_L

32f_C1R_L

Case 4: Operating on multi-channel data with platform-aware functions
IppStatus ippiFilterGaussian_<mod>(const Ipp<datatype>* pSrc, IppSizeL srcStep,
Ipp<datatype>* pDst, IppSizeL dstStep, IppiSizeL roiSize, IppiBorderType borderType,const Ipp<datatype> borderValue[3], IppFilterGaussianSpec* pSpec, Ipp8u* pBuffer);
Supported values for mod:8u_C3R_L

Include Files
ippcv.hippcv_l.h1182

16u_C3R_L

16s_C3R_L

32f_C3R_L

1Developer Guide and Reference for Intel® Integrated Performance Primitives

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc

Pointer to the source image ROI.

srcStep

Distance, in bytes, between the starting points of consecutive lines inthe source image.

pDst

Pointer to the destination image ROI.

dstStep

Distance, in bytes, between the starting points of consecutive lines inthe destination image.

roiSize

Size of the source and destination image ROI, in pixels.

borderType

One of the supported border types.

borderValue

Constant value to assign to pixels of the constant border. Thisparameter is applicable only to the ippBorderConst border type.

pSpec

Pointer to the Gaussian specification structure.

pBuffer

Pointer to the work buffer.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
These functions apply the Gaussian filter to the source image ROI pSrc. The kernel of the Gaussian filter isthe matrix of size kernelSizexkernelSize with the standard deviation sigma. The values of the Gaussian
kernel elements are computed by the FilterGaussianInit function. Elements of the kernel are normalized.
The anchor cell is the center of the kernel.
Before using the ippiFilterGaussian function, compute the size of the Gaussian specification structureusing the FilterGaussianGetSpecSize function and the external buffer using theFilterGaussianGetBufferSize function and initialize the structure using the FilterGaussianInit
function.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsSizeErr
ippStsStepErr

Indicates an error when roiSize has a field with a zero or
negative value.
Indicates an error when srcStep or dstStep is less thanroiSize.width*<pixelSize>.

ippStsNotEvenStepErr

Indicates an error when one of the step values is not divisibleby sizeof(Ipp<dataType>).

ippStsBorderErr

Indicates an error when borderType has an illegal value.

ippStsBadArgErr

Indicates an error when kernelSize is even, or less than 3.

1183

1

Intel® Integrated Performance Primitives Developer Guide and Reference

ExampleSee Also
Regions of Interest in Intel IPP
User-defined Border Types
FilterGaussianGetSpecSize Computes the size of the Gaussian specification structure.
FilterGaussianGetBufferSize Computes the size of the Gaussian specification structure and thesize of the external work buffer for Gaussian filtering with user-defined borders.
FilterGaussianInit Initializes the Gaussian context structure.
FilterHipassBorderGetBufferSize
Computes the size of the work buffer for high-passfiltering with the ippiFilterHipassBorder function.

SyntaxIppStatus ippiFilterHipassBorderGetBufferSize(IppiSize dstRoiSize, IppiMaskSize mask,
IppDataType srcDataType, IppDataType dstDataType, int numChannels, int* pBufferSize);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
dstRoiSize

Size of the destination ROI, in pixels.

mask

Predefined mask of IppiMaskSize type. Possible values are:ippMskSize3x3 or ippMskSize5x5.

srcDataType

Data type of the source image.

dstDataType

Data type of the destination image.

numChannels
pBufferSize

Number of channels in the image. Possible values are 1, 3, or
4.
Pointer to the size, in bytes, of the external buffer.

Description
This function computes the size, in bytes, of the external work buffer for the ippiFilterHipassBorderfunction. The result is stored in the pBufferSize parameter.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error when pBufferSize is NULL.

ippStsSizeErr
ippStsMaskSizeErr

1184

Indicates an error when dstRoiSize has a field with a zero or
negative value.
Indicates an error when mask has an illegal value.

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

ippStsDataTypeErr

Indicates an error when srcDataType or dstDataType has an illegal
value.

ippStsNumChannelErr

Indicates an error when numChannels has an illegal value.

See Also
FilterHipassBorder Filters an image using a high-pass filter.
FilterHipassBorder
Filters an image using a high-pass filter.

SyntaxCase 1: Operating on one-channel data
IppStatus ippiFilterHipassBorder_8u_C1R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst,
int dstStep, IppiSize dstRoiSize, IppiMaskSize mask, IppiBorderType borderType, Ipp8u
borderValue, Ipp8u* pBuffer);
IppStatus ippiFilterHipassBorder_16s_C1R(const Ipp16s* pSrc, int srcStep, Ipp16s* pDst,
int dstStep, IppiSize dstRoiSize, IppiMaskSize mask, IppiBorderType borderType, Ipp16s
borderValue, Ipp8u* pBuffer);
IppStatus ippiFilterHipassBorder_32f_C1R(const Ipp32f* pSrc, int srcStep, Ipp32f* pDst,
int dstStep, IppiSize dstRoiSize, IppiMaskSize mask, IppiBorderType borderType, Ipp32f
borderValue, Ipp8u* pBuffer);

Case 2: Operating on multi-channel data
IppStatus ippiFilterHipassBorder_8u_C3R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst,
int dstStep, IppiSize dstRoiSize, IppiMaskSize mask, IppiBorderType borderType, const
Ipp8u pBorderValue[3], Ipp8u* pBuffer);
IppStatus ippiFilterHipassBorder_16s_C3R(const Ipp16s* pSrc, int srcStep, Ipp16s* pDst,
int dstStep, IppiSize dstRoiSize, IppiMaskSize mask, IppiBorderType borderType, const
Ipp16s pBorderValue[3], Ipp8u* pBuffer);
IppStatus ippiFilterHipassBorder_32f_C3R(const Ipp32f* pSrc, int srcStep, Ipp32f* pDst,
int dstStep, IppiSize dstRoiSize, IppiMaskSize mask, IppiBorderType borderType, const
Ipp32f pBorderValue[3], Ipp8u* pBuffer);
IppStatus ippiFilterHipassBorder_8u_AC4R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst,
int dstStep, IppiSize dstRoiSize, IppiMaskSize mask, IppiBorderType borderType, const
Ipp8u pBorderValue[3], Ipp8u* pBuffer);
IppStatus ippiFilterHipassBorder_16s_AC4R(const Ipp16s* pSrc, int srcStep, Ipp16s*
pDst, int dstStep, IppiSize dstRoiSize, IppiMaskSize mask, IppiBorderType borderType,const Ipp16s pBorderValue[3], Ipp8u* pBuffer);
IppStatus ippiFilterHipassBorder_32f_AC4R(const Ipp32f* pSrc, int srcStep, Ipp32f*
pDst, int dstStep, IppiSize dstRoiSize, IppiMaskSize mask, IppiBorderType borderType,const Ipp32f pBorderValue[3], Ipp8u* pBuffer);
IppStatus ippiFilterHipassBorder_8u_C4R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst,
int dstStep, IppiSize dstRoiSize, IppiMaskSize mask, IppiBorderType borderType, const
Ipp8u pBorderValue[4], Ipp8u* pBuffer);
IppStatus ippiFilterHipassBorder_16s_C4R(const Ipp16s* pSrc, int srcStep, Ipp16s* pDst,
int dstStep, IppiSize dstRoiSize, IppiMaskSize mask, IppiBorderType borderType, const
Ipp16s pBorderValue[4], Ipp8u* pBuffer);

1185

1

Intel® Integrated Performance Primitives Developer Guide and Reference

IppStatus ippiFilterHipassBorder_32f_C4R(const Ipp32f* pSrc, int srcStep, Ipp32f* pDst,
int dstStep, IppiSize dstRoiSize, IppiMaskSize mask, IppiBorderType borderType, const
Ipp32f pBorderValue[4], Ipp8u* pBuffer);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc
srcStep
pDst
dstStep
dstRoiSize

Pointer to the source image ROI.
Distance, in bytes, between the starting pointsof consecutive lines in the source image.
Pointer to the destination image ROI.
Distance, in bytes, between the starting pointsof consecutive lines in the destination image.
Size of the source and destination ROI, in pixels.

mask

Predefined mask of IppiMaskSize. Possible
values are ippMskSize3x3 or ippMskSize5x5.

borderType

Type of border. Possible values are:ippBorderConst Values of all border pixels are

set to constant.
ippBorderRepl Border is replicated from theedge pixels.
ippBorderInMem Border is obtained from thesource image pixels inmemory.

Mixed borders are also supported. They can beobtained by the bitwise operation OR between any of
the ippBorderRepl, ippBorderConst, or
ippBorderMirror values and theippBorderInMemTop, ippBorderInMemBottom,
ippBorderInMemLeft, ippBorderInMemRightvalues.

borderValuepBorderValue[3], pBorderValue[4]pBuffer

Constant value to assign to pixels of theconstant border. This parameter is applicable
only to the ippBorderConst border type.
Pointer to constant values to assign to pixels of
the constant border. This parameter is applicable
only to the ippBorderConst border type.
Pointer to the work buffer.

Description
Before using this function, you need to compute the size of the work buffer pBuffer using theippiFilterHipassBorderGetBufferSize function.

1186

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

This function operates with ROI (see Regions of Interest in Intel IPP).
This function applies a high-pass filter to the pSrc source image ROI. The size of the source image ROI isequal to the destination image ROI size dstRoiSize. The values of border pixels are assigned in accordancewith the borderType and borderValue parameters. The kernel of the filter is a matrix of 3x3 or 5x5 size
depending on the mask value. The kernels have the following values:

-1

-1

-1

-1

8

-1

-1

-1

-1

or

-1

-1

-1

-1

-1

-1

-1

-1

-1

-1

-1

-1

24

-1

-1

-1

-1

-1

-1

-1

-1

-1

-1

-1

-1

The anchor cell is the center cell of the kernel, highlighted in red.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsBorderErr

Indicates an error when dstRoiSize is negative, or equal tozero.
Indicates an error when mask has an illegal value.

ippStsBorderErr

Indicates an error when borderType has an illegal value.

ippStsSizeErr

See Also
Borders in Neighborhood Operations
Regions of Interest in Intel IPP
User-defined Border Types
FilterHipassBorderGetBufferSize Computes the size of the work buffer for high-pass filtering with
the ippiFilterHipassBorder function.
FilterLaplaceBorderGetBufferSize
Computes the size of the work buffer for Laplace
filtering.

SyntaxIppStatus ippiFilterLaplaceBorderGetBufferSize(IppiSize dstRoiSize, IppiMaskSize mask,
IppDataType srcDataType, IppDataType dstDataType, int numChannels, int* pBufferSize);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
dstRoiSize

Size of the destination ROI, in pixels.

1187

1

Intel® Integrated Performance Primitives Developer Guide and Referencemask

Predefined mask of IppiMaskSize type. Possible values are:ippMskSize3x3 or ippMskSize5x5.

srcDataType

Data type of the source image.

dstDataType

Data type of the destination image.

numChannels
pBufferSize

Number of channels in the image. Possible values are 1, 3, or
4.
Pointer to the size, in bytes, of the external buffer.

Description
This function computes the size, in bytes, of the external work buffer for the ippiFilterLaplaceBorderfunction. The result is stored in the pBufferSize parameter.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error when pBufferSize is NULL.

ippStsSizeErr
ippStsMaskSizeErr

Indicates an error when dstRoiSize has a field with a zero or
negative value.
Indicates an error when mask has an illegal value.

ippStsDataTypeErr

Indicates an error when srcDataType or dstDataType has an illegal
value.

ippStsNumChannelErr

Indicates an error when numChannels has an illegal value.

See Also
FilterLaplaceBorder Filters an image using a Laplace filter.
FilterLaplaceBorder
Filters an image using a Laplace filter.

SyntaxCase 1: Operating on one-channel data
IppStatus ippiFilterLaplaceBorder_8u_C1R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst,
int dstStep, IppiSize dstRoiSize, IppiMaskSize mask, IppiBorderType borderType, Ipp8u
borderValue, Ipp8u* pBuffer);
IppStatus ippiFilterLaplaceBorder_16s_C1R(const Ipp16s* pSrc, int srcStep, Ipp16s*
pDst, int dstStep, IppiSize dstRoiSize, IppiMaskSize mask, IppiBorderType borderType,Ipp16s borderValue, Ipp8u* pBuffer);
IppStatus ippiFilterLaplaceBorder_32f_C1R(const Ipp32f* pSrc, int srcStep, Ipp32f*
pDst, int dstStep, IppiSize dstRoiSize, IppiMaskSize mask, IppiBorderType borderType,Ipp32f borderValue, Ipp8u* pBuffer);

Case 2: Operating on multi-channel data
IppStatus ippiFilterLaplaceBorder_8u_C3R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst,
int dstStep, IppiSize dstRoiSize, IppiMaskSize mask, IppiBorderType borderType, const
Ipp8u pBorderValue[3], Ipp8u* pBuffer);1188

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

IppStatus ippiFilterLaplaceBorder_16s_C3R(const Ipp16s* pSrc, int srcStep, Ipp16s*
pDst, int dstStep, IppiSize dstRoiSize, IppiMaskSize mask, IppiBorderType borderType,const Ipp16s pBorderValue[3], Ipp8u* pBuffer);
IppStatus ippiFilterLaplaceBorder_32f_C3R(const Ipp32f* pSrc, int srcStep, Ipp32f*
pDst, int dstStep, IppiSize dstRoiSize, IppiMaskSize mask, IppiBorderType borderType,const Ipp32f pBorderValue[3], Ipp8u* pBuffer);
IppStatus ippiFilterLaplaceBorder_8u_AC4R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst,
int dstStep, IppiSize dstRoiSize, IppiMaskSize mask, IppiBorderType borderType, const
Ipp8u pBorderValue[3], Ipp8u* pBuffer);
IppStatus ippiFilterLaplaceBorder_16s_AC4R(const Ipp16s* pSrc, int srcStep, Ipp16s*
pDst, int dstStep, IppiSize dstRoiSize, IppiMaskSize mask, IppiBorderType borderType,const Ipp16s pBorderValue[3], Ipp8u* pBuffer);
IppStatus ippiFilterLaplaceBorder_32f_AC4R(const Ipp32f* pSrc, int srcStep, Ipp32f*
pDst, int dstStep, IppiSize dstRoiSize, IppiMaskSize mask, IppiBorderType borderType,const Ipp32f pBorderValue[3], Ipp8u* pBuffer);
IppStatus ippiFilterLaplaceBorder_8u_C4R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst,
int dstStep, IppiSize dstRoiSize, IppiMaskSize mask, IppiBorderType borderType, const
Ipp8u pBorderValue[4], Ipp8u* pBuffer);
IppStatus ippiFilterLaplaceBorder_16s_C4R(const Ipp16s* pSrc, int srcStep, Ipp16s*
pDst, int dstStep, IppiSize dstRoiSize, IppiMaskSize mask, IppiBorderType borderType,const Ipp16s pBorderValue[4], Ipp8u* pBuffer);
IppStatus ippiFilterLaplaceBorder_32f_C4R(const Ipp32f* pSrc, int srcStep, Ipp32f*
pDst, int dstStep, IppiSize dstRoiSize, IppiMaskSize mask, IppiBorderType borderType,const Ipp32f pBorderValue[4], Ipp8u* pBuffer);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc
srcStep
pDst
dstStep
dstRoiSize

Pointer to the source image ROI.
Distance, in bytes, between the starting pointsof consecutive lines in the source image.
Pointer to the destination image ROI.
Distance, in bytes, between the starting pointsof consecutive lines in the destination image.
Size of the source and destination ROI, in pixels.

mask

Predefined mask of IppiMaskSize. Possible
values are ippMskSize3x3 or ippMskSize5x5.

borderType

Type of border. Possible values are:ippBorderConst Values of all border pixels are

set to constant.

1189

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Border is replicated from theedge pixels.
ippBorderInMem Border is obtained from thesource image pixels inmemory.
ippBorderRepl

Mixed borders are also supported. They can beobtained by the bitwise operation OR between any of
the ippBorderRepl, ippBorderConst, or
ippBorderMirror values and theippBorderInMemTop, ippBorderInMemBottom,
ippBorderInMemLeft, ippBorderInMemRightvalues.

Constant value to assign to pixels of theconstant border. This parameter is applicable
only to the ippBorderConst border type.

borderValue

Pointer to constant values to assign to pixels of
the constant border. This parameter is applicable
only to the ippBorderConst border type.

pBorderValue[3], pBorderValue[4]Pointer to the work buffer.

pBuffer

Description
Before using this function, you need to compute the size of the work buffer pBuffer using theippiFilterLaplaceBorderGetBufferSize function.
This function operates with ROI (see Regions of Interest in Intel IPP).
This function applies a Laplace filter to the pSrc source image ROI. The size of the source image ROI is equal
to the destination image ROI size dstRoiSize. The values of border pixels are assigned in accordance withthe borderType and borderValue parameters. The kernel of the filter is a matrix of 3x3 or 5x5 size
depending on the mask value. The kernels have the following values:

-1

-1

-1

-1

8

-1

-1

-1

-1

or

-1

-3

-4

-3

-1

-3

0

6

0

-3

-4

6

20

6

-4

-3

0

6

0

-3

-1

-3

-4

-3

-1

The anchor cell is the center cell of the kernel, highlighted in red.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsBorderErr

Indicates an error when dstRoiSize is negative, or equal tozero.
Indicates an error when mask has an illegal value.

ippStsBorderErr

Indicates an error when borderType has an illegal value.

ippStsSizeErr

1190

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

See Also
Borders in Neighborhood Operations
Regions of Interest in Intel IPP
User-defined Border Types
FilterLaplaceBorder Filters an image using a Laplace filter.
FilterLaplacianGetBufferSize
Computes the size of the external buffer for the
Laplace filter with border.

SyntaxIppStatus ippiFilterLaplacianGetBufferSize_<mod>(IppiSize roiSize, IppiMaskSize mask,
int* pBufferSize);
Supported values for mod:8u16s_C1R

32f_C1R

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
roiSize

Maximum size of the source and destination image ROI.

mask

Predefined mask of IppiMaskSize type.

pBufferSize

Pointer to the buffer size.

Description
This function computes the size of the external buffer that is required for the filter function
ippiFilterLaplacianBorder. The kernel of the filter is the matrix of either 3x3 or 5x5 size that is
specified by the parameter mask (see Table “Types of the Fixed Filter Functions”). This buffer
pBufferSize[0] can be used to filter an image whose width and height are equal to or less thancorresponding fields of roiSize.

Return Values
ippStsNoErr
ippStsNullPtrErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if the pBufferSize pointer is NULL.

ippStsSizeErr

Indicates an error condition if roiSize has a field with a zero or
negative value.

ippStsMaskSizeErr

Indicates an error condition if mask has a wrong value.

FilterLaplacianBorder
Applies Laplacian filter with border.

1191

1

Intel® Integrated Performance Primitives Developer Guide and Reference

SyntaxIppStatus ippiFilterLaplacianBorder_<mod>(const Ipp<srcDatatype>* pSrc, int srcStep,
Ipp<dstDatatype>* pDst, int dstStep, IppiSize roiSize, IppiMaskSize mask,
IppiBorderType borderType, Ipp<srcDatatype> borderValue, Ipp8u* pBuffer);
Supported values for mod:8u16s_C1R

32f_C1R

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pDst

Pointer to the source image ROI.
Distance in bytes between starts of consecutive
lines in the source image.
Pointer to the destination image ROI.

roiSize

Distance in bytes between starts of consecutive
lines in the destination image.
Size of the source and destination image ROI.

mask

Type of the filter kernel.

borderType

Type of border (see Borders in Neighborhood
Operations); following values are possible:

dstStep

ippBorderConst Values of all border pixels are
ippBorderRepl

set to constant.
Replicated border is used.

ippBorderMirro Border pixels are mirroredfrom the source imagerboundary pixels.

borderValuepBuffer

The constant value to assign to the pixels in theconstant border (not applicable for otherborder's type).
Pointer to the working buffer.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).

1192

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

This function applies the laplacian filter to the source image pSrc and stores results to the destination imageof the same size pDst. Source image can be used as the destination image if they both have the same data
type. The values of border pixels are assigned in accordance with the borderType and borderValueparameters. The kernel of this filter is the matrix of either 3x3 or 5x5 size that is specified by the parametermask. The kernels have the following values with the anchor in the center cell (red):

2

0

2

0

-8

0

2

0

2

or

2

4

4

4

2

4

0

-8

0

4

4

-8

-24

-8

4

4

0

-8

0

4

2

4

4

4

2

The function requires the working buffer pBuffer whose size should be computed by the function
ippiFilterLaplacianGetBufferSize beforehand.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsStepErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointers is
NULL.
Indicates an error condition if roiSize has a field with a zero or
negative value.
Indicates an error condition if srcStep or dstStep is less thanroiSize.width * <pixelSize>

ippStsBadArgErr

Indicates an error condition if one of the step values is notdivisible by 4 for floating-point images, or by 2 for shortinteger images.
Indicates an error if borderType or divisor has a wrong value.

ippStsMaskErr

Indicates an error condition if mask has a wrong value.

ippStsNotEvenStepErr

FilterLowpassGetBufferSize
Computes the size of the external buffer for the
lowpass filter with border.

SyntaxIppStatus ippiFilterLowpassGetBufferSize_8u_C1R(IppiSize roiSize, IppiMaskSize mask,
int* pBufferSize);
IppStatus ippiFilterLowpassGetBufferSize_32f_C1R(IppiSize roiSize, IppiMaskSize mask,
int* pBufferSize);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

1193

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Parameters
roiSize

Maximum size of the source and destination image ROI.

mask

Predefined mask of IppiMaskSize type.

pBufferSize

Pointer to the buffer size.

Description
This function computes the size of the external buffer that is required for the filter function
ippiFilterLowpassBorder. The kernel of the filter is the matrix of either 3x3 or 5x5 size that is specified
by the parameter mask (see Table “Types of the Fixed Filter Functions”). This buffer pBufferSize[0] can beused to filter an image whose width and height are equal to or less than corresponding fields of roiSize.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsMaskSizeErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if the pBufferSize pointer is NULL.
Indicates an error condition if roiSize has a field with a zero or
negative value.
Indicates an error condition if mask has a wrong value.

FilterLowpassBorder
Applies lowpass filter with border.

SyntaxIppStatus ippiFilterLowpassBorder_8u_C1R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst,
int dstStep, IppiSize roiSize, IppiMaskSize mask, IppiBorderType borderType, Ipp8u
borderValue, Ipp8u* pBuffer);
IppStatus ippiFilterLowpassBorder_32f_C1R(const Ipp32f* pSrc, int srcStep, Ipp32f*
pDst, int dstStep, IppiSize roiSize, IppiMaskSize mask, IppiBorderType borderType,Ipp32f borderValue, Ipp8u* pBuffer);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pDst
dstStep

1194

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the destination image ROI.
Distance in bytes between starts of consecutive lines in thedestination image.

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

roiSize

Size of the source and destination image ROI.

mask

Type of the filter kernel.

borderType

Type of border (see Borders in Neighborhood Operations); thefollowing values are possible:
ippBorderConst
ippBorderRepl

Values of all border pixels are set toconstant.
Replicated border is used.

The constant value to assign to the pixels in the constantborder (not applicable for other border's type).
Pointer to the working buffer.

borderValuepBuffer

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function applies the lowpass filter (blur operation) to the source image pSrc and stores results to thedestination image of the same size pDst. Source image can be used as the destination image if they bothhave the same data type. The values of border pixels are assigned in accordance with the borderType andborderValue parameters. The kernel of this filter is the matrix of either 3x3 or 5x5 size that is specified by
the parameter mask. The anchor cell is the center cell (red) of the kernel.
The 3x3 filter uses the kernel with the following values:

1/9

1/9

1/9

1/9

1/9

1/9

1/9

1/9

1/9

The 5x5 filter uses the kernel with the following values:

1/25

1/25

1/25

1/25

1/25

1/25

1/25

1/25

1/25

1/25

1/25

1/25

1/25

1/25

1/25

1/25

1/25

1/25

1/25

1/25

1/25

1/25

1/25

1/25

1/25

The function requires the working buffer pBuffer whose size should be computed by the function
ippiFilterLowpassGetBufferSize beforehand.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsStepErr
ippStsNotEvenStepErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointers is
NULL.
Indicates an error condition if roiSize has a field with a zero or
negative value.
Indicates an error condition if srcStep or dstStep is less thanroiSize.width * <pixelSize>.
Indicates an error condition if one of the step values is notdivisible by 4 for floating-point images.

1195

1

Intel® Integrated Performance Primitives Developer Guide and ReferenceippStsBorderErr

Indicates an error condition if borderType has a wrong value.

ippStsMaskErr

Indicates an error condition if mask has a wrong value.

FilterPrewittHorizBorderGetBufferSize
Computes the size of the work buffer for the Prewitt
Horizontal filter.

SyntaxIppStatus ippiFilterPrewittHorizBorderGetBufferSize (IppiSize dstRoiSize, IppiMaskSize
mask, IppDataType srcDataType, IppDataType dstDataType, int numChannels, int*
pBufferSize);

Include Files
ippi.hParameters
dstRoiSize

Size of the destination ROI in pixels.

mask

Predefined mask of IppiMaskSize type. Possible value is
ippMskSize3x3.

srcDataType

Data type of the source image.

dstDataType

Data type of the destination image.

numChannels

Number of channels in the image. Possible value is 1.

pBufferSize

Pointer to the size of the external work buffer.

Description
The ippiFilterPrewittHorizBorderGetBufferSize function computes the size, in bytes, of the external
work buffer needed for the ippiFilterPrewittHorizBorder function. The result is stored in thepBufferSize parameter.
For an example on how to use this function, see the code example provided with theippiFilterPrewittHorizBorder function description.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pBufferSize is NULL.

ippStsSizeErr
ippStsMaskSizeErr

Indicates an error when dstRoiSize is negative, or equal tozero.
Indicates an error when mask has an illegal value.

ippStsDataTypeErr

Indicates an error when srcDataType or dstDataType has an illegal
value.

ippStsNumChannelsError

Indicates an error when numChannels has an illegal value.

See Also
FilterPrewittHorizBorder Filters and image using a horizontal Prewitt filter.
1196

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

FilterPrewittHorizBorder
Filters and image using a horizontal Prewitt filter.

SyntaxIppStatus ippiFilterPrewittHorizBorder_<mod>(const Ipp<srcDatatype>* pSrc, int srcStep,
Ipp<dstDatatype>* pDst, int dstStep, IppiSize dstRoiSize, IppiMaskSize mask,
IppiBorderType borderType, Ipp<srcDatatype> borderValue, Ipp8u* pBuffer);
Supported values for mod:8u16s_C1R 16s_C1R 32f_C1R

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc
srcStep
pDst
dstStep
dstRoiSize

Pointer to the source image ROI.
Distance, in bytes, between the starting pointsof consecutive lines in the source image.
Pointer to the destination image ROI.
Distance, in bytes, between the starting pointsof consecutive lines in the destination image.
Size of the source and destination ROI in pixels.

mask

Predefined mask of IppiMaskSize. Possible value
is ippMskSize3x3.

borderType

Type of border. Possible values are:ippBorderConst Values of all border pixels are

set to constant.

ippBorderRepl Border is replicated from theedge pixels.
ippBorderMirro Mirrored border is used.
r
ippBorderMirro Mirrored border withreplication is used.
rR
ippBorderInMem Border is obtained from thesource image pixels inmemory.

Mixed borders are also supported. They can beobtained by the bitwise operation OR between any of
the ippBorderRepl, ippBorderConst,
ippBorderMirror, or ippBorderMirrorR values,

1197

1

Intel® Integrated Performance Primitives Developer Guide and Reference

and the ippBorderInMemTop,
ippBorderInMemBottom, ippBorderInMemLeft,
ippBorderInMemRight values.

Constant value to assign to pixels of theconstant border. This parameter is applicable
only to the ippBorderConst border type.

borderValue

Pointer to the work buffer.

pBuffer

Description
Before using this function, you need to compute the size of the work buffer pBuffer using theFilterPrewittHorizBorderGetBufferSize function.
This function operates with ROI.
This function applies a horizontal Prewitt filter to the pSrc source image ROI. The size of the source image
ROI is equal to the destination image ROI size dstRoiSize. The values of border pixels are assigned inaccordance with the borderType and borderValue parameters. The kernel of the filter is a matrix of 3x3
size with the following values:

1

1

1

0

0

0

-1

-1

-1

The anchor cell is the center cell of the kernel, highlighted in red.
This filter enhances horizontal edges of an image.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsSizeErr
ippStsStepErr
ippStsNotEvenStepErr

ippStsBorderErr

Indicates an error when dstRoiSize is negative, or equal tozero.
Indicates an error when srcStep or dstStep is negative, or
equal to zero.
Indicates an error when one of the step values is not divisibleby 4 for floating-point images, or by 2 for short-integer
images.
Indicates an error when borderType has an illegal value.

ExampleFiltering convolution kernels:

FilterPrewittHorizBorder:

See Also
Borders in Neighborhood Operations
Regions of Interest in Intel IPP
User-defined Border Types
FilterPrewittHorizBorderGetBufferSize Computes the size of the work buffer for the Prewitt
Horizontal filter.
1198

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

FilterPrewittVertBorderGetBufferSize
Computes the size of the work buffer for the Prewitt
Vertical filter.

SyntaxIppStatus ippiFilterPrewittVertBorderGetBufferSize (IppiSize dstRoiSize, IppiMaskSize
mask, IppDataType srcDataType, IppDataType dstDataType, int numChannels, int*
pBufferSize);

Include Files
ippi.hParameters
dstRoiSize
mask

Size of the destination ROI in pixels.
Predefined mask of IppiMaskSize type. Possible value is

ippMskSize3x3.

srcDataType

Data type of the source image.

dstDataType

Data type of the destination image.

numChannels

Number of channels in the image. Possible value is 1.

pBufferSize

Pointer to the size of the external work buffer.

Description
The ippiFilterPrewittVertBorderGetBufferSize function computes the size, in bytes, of the external
work buffer needed for the ippiFilterPrewittVertBorder function. The result is stored in thepBufferSize parameter.
For an example on how to use this function, see the code example provided with theippiFilterPrewittVertBorder function description.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pBufferSize is NULL.

ippStsSizeErr
ippStsMaskSizeErr

Indicates an error when dstRoiSize is negative, or equal tozero.
Indicates an error when mask has an illegal value.

ippStsDataTypeErr

Indicates an error when srcDataType or dstDataType has an illegal
value.

ippStsNumChannelsError

Indicates an error when numChannels has an illegal value.

See Also
FilterPrewittVertBorder Filters and image using a vertical Prewitt kernel.
FilterPrewittVertBorder
Filters and image using a vertical Prewitt kernel.

1199

1

Intel® Integrated Performance Primitives Developer Guide and Reference

SyntaxIppStatus ippiFilterPrewittVertBorder_<mod>(const Ipp<srcDatatype>* pSrc, int srcStep,
Ipp<dstDatatype>* pDst, int dstStep, IppiSize dstRoiSize, IppiMaskSize mask,
IppiBorderType borderType, Ipp<srcDatatype> borderValue, Ipp8u* pBuffer);
Supported values for mod:8u16s_C1R 16s_C1R 32f_C1R

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc
srcStep
pDst
dstStep
dstRoiSize

Pointer to the source image ROI.
Distance, in bytes, between the starting pointsof consecutive lines in the source image.
Pointer to the destination image ROI.
Distance, in bytes, between the starting pointsof consecutive lines in the destination image.
Size of the source and destination ROI in pixels.

mask

Predefined mask of IppiMaskSize. Possible value
is ippMskSize3x3.

borderType

Type of border. Possible values are:ippBorderConst Values of all border pixels are

set to constant.
ippBorderRepl Border is replicated from theedge pixels.
Mirroredborder is used.
ippBorderMirror
ippBorderMirro Mirrored border withreplication is used.
rR
ippBorderInMem Border is obtained from thesource image pixels inmemory.

Mixed borders are also supported. They can beobtained by the bitwise operation OR between any of
the ippBorderRepl, ippBorderConst,
ippBorderMirror, or ippBorderMirrorR values
and the ippBorderInMemTop,
ippBorderInMemBottom, ippBorderInMemLeft,
ippBorderInMemRight values.

1200

Developer Guide and Reference for Intel® Integrated Performance Primitives

1Constant value to assign to pixels of theconstant border. This parameter is applicable
only to the ippBorderConst border type.

borderValue

Pointer to the work buffer.

pBuffer

Description
Before using this function, you need to compute the size of the work buffer pBuffer using theFilterPrewittVertBorderGetBufferSize function.
This function operates with ROI.
This function applies a vertical Prewitt filter to the pSrc source image ROI. The size of the source image ROI
is equal to the destination image ROI size dstRoiSize. The values of border pixels are assigned inaccordance with the borderType and borderValue parameters. The kernel of the filter is a matrix of 3x3
size with the following values:

-1

0

1

-1

0

1

-1

0

1

The anchor cell is the center cell of the kernel, highlighted in red.
This filter enhances vertical edges of an image.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsSizeErr
ippStsStepErr
ippStsNotEvenStepErr

ippStsBorderErr

Indicates an error when dstRoiSize is negative, or equal tozero.
Indicates an error when srcStep or dstStep is negative, or
equal to zero.
Indicates an error when one of the step values is not divisibleby 4 for floating-point images, or by 2 for short-integer
images.
Indicates an error when borderType has an illegal value.

ExampleSee Also
Borders in Neighborhood Operations
Regions of Interest in Intel IPP
User-defined Border Types
FilterPrewittVertBorderGetBufferSize Computes the size of the work buffer for the Prewitt Verticalfilter.
FilterRobertsUpBorderGetBufferSize
Computes the size of the work buffer for the vertical
Roberts edge filter.

1201

1

Intel® Integrated Performance Primitives Developer Guide and Reference

SyntaxIppStatus ippiFilterRobertsUpBorderGetBufferSize (IppiSize dstRoiSize, IppiMaskSize
mask, IppDataType srcDataType, IppDataType dstDataType, int numChannels, int*
pBufferSize);

Include Files
ippi.hParameters
dstRoiSize

Size of the destination ROI in pixels.

mask

Predefined mask of IppiMaskSize type. Possible value is
ippMskSize3x3.

srcDataType

Data type of the source image.

dstDataType

Data type of the destination image.

numChannels

Number of channels in the image. Possible value is 1.

pBufferSize

Pointer to the size of the external work buffer.

Description
The ippiFilterRobertsUpBorderGetBufferSize function computes the size, in bytes, of the external
work buffer needed for the ippiFilterRobertsUpBorder function. The result is stored in the pBufferSize
parameter.
For an example on how to use this function, see the code example provided with theippiFilterRobertsUpBorder function description.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pBufferSize is NULL.

ippStsSizeErr
ippStsMaskSizeErr

Indicates an error when dstRoiSize is negative, or equal tozero.
Indicates an error when mask has an illegal value.

ippStsDataTypeErr

Indicates an error when srcDataType or dstDataType has an illegal
value.

ippStsNumChannelsError

Indicates an error when numChannels has an illegal value.

See Also
FilterRobertsUpBorder Filters an image using a vertical Roberts edge filter.
FilterRobertsUpBorder
Filters an image using a vertical Roberts edge filter.

1202

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

SyntaxIppStatus ippiFilterRobertsUpBorder_<mod>(const Ipp<srcDatatype>* pSrc, int srcStep,
Ipp<dstDatatype>* pDst, int dstStep, IppiSize dstRoiSize, IppiMaskSize mask,
IppiBorderType borderType, Ipp<srcDatatype> borderValue, Ipp8u* pBuffer);
Supported values for mod:8u16s_C1R 16s_C1R 32f_C1R

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc
srcStep
pDst
dstStep
dstRoiSize

Pointer to the source image ROI.
Distance in bytes between starting points ofconsecutive lines in the source image.
Pointer to the destination image ROI.
Distance in bytes between starting points ofconsecutive lines in the destination image.
Size of the source and destination ROI in pixels.

mask

Predefined mask of IppiMaskSize. Possible value
is ippMskSize3x3.

borderType

Type of border. Possible values are:ippBorderConst Values of all border pixels are

set to constant.
ippBorderRepl Border is replicated from theedge pixels.
Mirroredborder is used.
ippBorderMirror
ippBorderMirro Mirrored border withreplication is used.
rR
ippBorderInMem Border is obtained from thesource image pixels inmemory.

Mixed borders are also supported. They can beobtained by the bitwise operation OR between any of
the ippBorderRepl, ippBorderConst,
ippBorderMirror, or ippBorderMirrorR values
and the ippBorderInMemTop,
ippBorderInMemBottom, ippBorderInMemLeft,
ippBorderInMemRight values.

1203

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Constant value to assign to pixels of theconstant border. This parameter is applicable
only to the ippBorderConst border type.

borderValue

Pointer to the work buffer.

pBuffer

Description
This function operates with ROI.
This function applies a vertical Roberts edge filter to the pSrc source image ROI. The size of the source
image ROI is equal to the destination image ROI size dstRoiSize. The values of border pixels are assignedin accordance with the borderType and borderValue parameters. The kernel of the filter is a matrix of 3x3
size with the following values:

0

0

0

0

1

0

-1

0

0

The anchor cell is the center cell of the kernel, highlighted in red.
This filter provides the gross approximation of the pixel values gradient in the vertical direction.
Before using this function, you need to compute the size of the work buffer pBuffer using theFilterRobertsUpBorderGetBufferSize function.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsSizeErr
ippStsStepErr
ippStsNotEvenStepErr

ippStsBorderErr

Indicates an error when dstRoiSize is negative, or equal tozero.
Indicates an error when srcStep or dstStep is negative, or
equal to zero.
Indicates an error when one of the step values is not divisibleby 4 for floating-point images, or by 2 for short-integer
images.
Indicates an error when borderType has an illegal value.

ExampleSee Also
Borders in Neighborhood Operations
Regions of Interest in Intel IPP
User-defined Border Types
FilterRobertsUpBorderGetBufferSize Computes the size of the work buffer for the vertical Roberts
edge filter.
FilterRobertsDownBorderGetBufferSize
Computes the size of the work buffer for thehorizontal Roberts edge filter.

1204

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

SyntaxIppStatus ippiFilterRobertsDownBorderGetBufferSize (IppiSize dstRoiSize, IppiMaskSize
mask, IppDataType srcDataType, IppDataType dstDataType, int numChannels, int*
pBufferSize);

Include Files
ippi.hParameters
dstRoiSize

Size of the destination ROI in pixels.

mask

Predefined mask of IppiMaskSize type. Possible value is
ippMskSize3x3.

srcDataType

Data type of the source image.

dstDataType

Data type of the destination image.

numChannels

Number of channels in the image. Possible value is 1.

pBufferSize

Pointer to the size of the external work buffer.

Description
The ippiFilterRobertsDownBorderGetBufferSize function computes the size, in bytes, of the external
work buffer needed for the ippiFilterRobertsDownBorder function. The result is stored in thepBufferSize parameter.
For an example on how to use this function, see the code example provided with theippiFilterRobertsDownBorder function description.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pBufferSize is NULL.

ippStsSizeErr
ippStsMaskSizeErr

Indicates an error when dstRoiSize is negative, or equal tozero.
Indicates an error when mask has an illegal value.

ippStsDataTypeErr

Indicates an error when srcDataType or dstDataType has an illegal
value.

ippStsNumChannelsError

Indicates an error when numChannels has an illegal value.

FilterRobertsDownBorder Filters an image using a horizontal Roberts edge filter.
FilterRobertsDownBorder
Filters an image using a horizontal Roberts edge filter.

1205

1

Intel® Integrated Performance Primitives Developer Guide and Reference

SyntaxIppStatus ippiFilterRobertsDownBorder_<mod>(const Ipp<srcDatatype>* pSrc, int srcStep,
Ipp<dstDatatype>* pDst, int dstStep, IppiSize dstRoiSize, IppiMaskSize mask,
IppiBorderType borderType, Ipp<srcDatatype> borderValue, Ipp8u* pBuffer);
Supported values for mod:8u16s_C1R 16s_C1R 32f_C1R

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc
srcStep
pDst
dstStep
dstRoiSize

Pointer to the source image ROI.
Distance, in bytes, between the starting pointsof consecutive lines in the source image.
Pointer to the destination image ROI.
Distance, in bytes, between the starting pointsof consecutive lines in the destination image.
Size of the source and destination ROI in pixels.

mask

Predefined mask of IppiMaskSize. Possible value
is ippMskSize3x3.

borderType

Type of border. Possible values are:ippBorderConst Values of all border pixels are

set to constant.
ippBorderRepl Border is replicated from theedge pixels.
Mirroredborder is used.
ippBorderMirror
ippBorderMirro Mirrored border withreplication is used.
rR
ippBorderInMem Border is obtained from thesource image pixels inmemory.

Mixed borders are also supported. They can beobtained by the bitwise operation OR between any of
the ippBorderRepl, ippBorderConst,
ippBorderMirror, or ippBorderMirrorR values,
and the ippBorderInMemTop,
ippBorderInMemBottom, ippBorderInMemLeft,
ippBorderInMemRight values.

1206

Developer Guide and Reference for Intel® Integrated Performance Primitives

1Constant value to assign to pixels of theconstant border. This parameter is applicable
only to the ippBorderConst border type.

borderValue

Pointer to the work buffer.

pBuffer

Description
Before using this function, you need to compute the size of the work buffer pBuffer using theFilterRobertsDownBorderGetBufferSize function.
This function operates with ROI.
This function applies a horizontal Roberts edge filter to the pSrc source image ROI. The size of the source
image ROI is equal to the destination image ROI size dstRoiSize. The values of border pixels are assignedin accordance with the borderType and borderValue parameters. The kernel of the filter is a matrix of 3x3
size with the following values:

0

0

0

0

1

0

0

0

-1

The anchor cell is the center cell of the kernel, highlighted in red.
This filter provides the gross approximation of the pixel values gradient in the horizontal direction.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsSizeErr
ippStsStepErr
ippStsNotEvenStepErr

ippStsBorderErr

Indicates an error when dstRoiSize is negative, or equal tozero.
Indicates an error when srcStep or dstStep is negative, or
equal to zero.
Indicates an error when one of the step values is not divisibleby 4 for floating-point images, or by 2 for short-integer
images.
Indicates an error when borderType has an illegal value.

ExampleSee Also
Borders in Neighborhood Operations
Regions of Interest in Intel IPP
User-defined Border Types
FilterRobertsDownBorderGetBufferSize Computes the size of the work buffer for the horizontal
Roberts edge filter.
FilterScharrHorizMaskBorderGetBufferSize
Computes the size of the work buffer for the Scharr
Horizontal filter.

1207

1

Intel® Integrated Performance Primitives Developer Guide and Reference

SyntaxIppStatus ippiFilterScharrHorizMaskBorderGetBufferSize (IppiSize dstRoiSize,
IppiMaskSize mask, IppDataType srcDataType, IppDataType dstDataType, int numChannels,
int* pBufferSize);

Include Files
ippi.hParameters
dstRoiSize

Size of the destination ROI in pixels.

mask

Predefined mask of IppiMaskSize type. Possible value is
ippMskSize3x3.

srcDataType

Data type of the source image.

dstDataType

Data type of the destination image.

numChannels

Number of channels in the image. Possible value is 1.

pBufferSize

Pointer to the size of the external work buffer.

Description
The ippiFilterScharrHorizMaskBorderGetBufferSize function computes the size, in bytes, of theexternal work buffer needed for the ippiFilterScharrHorizMaskBorder function. The result is stored in
the pBufferSize parameter.
For an example on how to use this function, see the code example provided with theippiFilterScharrHorizMaskBorder function description.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pBufferSize is NULL.

ippStsSizeErr
ippStsMaskSizeErr

Indicates an error when dstRoiSize is negative, or equal tozero.
Indicates an error when mask has an illegal value.

ippStsDataTypeErr

Indicates an error when srcDataType or dstDataType has an illegal
value.

ippStsNumChannelsError

Indicates an error when numChannels has an illegal value.

See Also
FilterScharrHorizMaskBorder Filters an image using a horizontal Scharr filter.
FilterScharrHorizMaskBorder
Filters an image using a horizontal Scharr filter.

1208

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

SyntaxIppStatus ippiFilterScharrHorizMaskBorder_<mod>(const Ipp<srcDatatype>* pSrc, int
srcStep, Ipp<dstDatatype>* pDst, int dstStep, IppiSize dstRoiSize, IppiMaskSize mask,
IppiBorderType borderType, Ipp<srcDatatype> borderValue, Ipp8u* pBuffer);
Supported values for mod:8u16s_C1R 16s_C1R 32f_C1R

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc
srcStep
pDst
dstStep
dstRoiSize

Pointer to the source image ROI.
Distance, in bytes, between the starting pointsof consecutive lines in the source image.
Pointer to the destination image ROI.
Distance, in bytes, between the starting pointsof consecutive lines in the destination image.
Size of the source and destination ROI in pixels.

mask

Predefined mask of IppiMaskSize. Possible value
is ippMskSize3x3.

borderType

Type of border. Possible values are:ippBorderConst Values of all border pixels are

set to constant.
ippBorderRepl Border is replicated from theedge pixels.
Mirroredborder is used.
ippBorderMirror
ippBorderMirro Mirrored border withreplication is used.
rR
ippBorderInMem Border is obtained from thesource image pixels inmemory.

Mixed borders are also supported. They can beobtained by the bitwise operation OR between any of
the ippBorderRepl, ippBorderConst,
ippBorderMirror, or ippBorderMirrorR values
and the ippBorderInMemTop,
ippBorderInMemBottom, ippBorderInMemLeft,
ippBorderInMemRight values.

1209

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Constant value to assign to pixels of theconstant border. This parameter is applicable
only to the ippBorderConst border type.

borderValue

Pointer to the work buffer.

pBuffer

Description
Before using this function, you need to compute the size of the work buffer pBuffer using theFilterScharrHorizMaskBorderGetBufferSize function.
This function operates with ROI.
This function applies a horizontal Scharr filter to the pSrc source image ROI. The size of the source image
ROI is equal to the destination image ROI size dstRoiSize. The values of border pixels are assigned inaccordance with the borderType and borderValue parameters. The kernel of the filter is a matrix of 3x3
size with the following values:

3

10

3

0

0

0

-3

-10

-3

The anchor cell is the center cell of the kernel, highlighted in red.
This filter enhances horizontal edges of an image.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsSizeErr
ippStsStepErr
ippStsNotEvenStepErr

ippStsBorderErr

Indicates an error when dstRoiSize is negative, or equal tozero.
Indicates an error when srcStep or dstStep is negative, or
equal to zero.
Indicates an error when one of the step values is not divisibleby 4 for floating-point images, or by 2 for short-integer
images.
Indicates an error when borderType has an illegal value.

ExampleSee Also
Borders in Neighborhood Operations
Regions of Interest in Intel IPP
User-defined Border Types
FilterPrewittHorizBorderGetBufferSize Computes the size of the work buffer for the Prewitt
Horizontal filter.
FilterScharrVertMaskBorderGetBufferSize
Computes the size of the work buffer for the Scharr
Vertical filter.

1210

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

SyntaxIppStatus ippiFilterScharrVertMaskBorderGetBufferSize (IppiSize dstRoiSize,
IppiMaskSize mask, IppDataType srcDataType, IppDataType dstDataType, int numChannels,
int* pBufferSize);

Include Files
ippi.hParameters
dstRoiSize

Size of the destination ROI in pixels.

mask

Predefined mask of IppiMaskSize type. Possible value is
ippMskSize3x3.

srcDataType

Data type of the source image.

dstDataType

Data type of the destination image.

numChannels

Number of channels in the image. Possible value is 1.

pBufferSize

Pointer to the size of the external work buffer.

Description
The ippiFilterScharrVertMaskBorderGetBufferSize function computes the size, in bytes, of theexternal work buffer needed for the ippiFilterScharrVertMaskBorder function. The result is stored in thepBufferSize parameter.
For an example on how to use this function, see the code example provided with theippiFilterScharrVertMaskBorder function description.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pBufferSize is NULL.

ippStsSizeErr
ippStsMaskSizeErr

Indicates an error when dstRoiSize is negative, or equal tozero.
Indicates an error when mask has an illegal value.

ippStsDataTypeErr

Indicates an error when srcDataType or dstDataType has an illegal
value.

ippStsNumChannelsError

Indicates an error when numChannels has an illegal value.

See Also
FilterScharrVertMaskBorder Filters an image using a vertical Scharr kernel.
FilterScharrVertMaskBorder
Filters an image using a vertical Scharr kernel.

1211

1

Intel® Integrated Performance Primitives Developer Guide and Reference

SyntaxIppStatus ippiFilterScharrVertMaskBorder_<mod>(const Ipp<srcDatatype>* pSrc, int
srcStep, Ipp<dstDatatype>* pDst, int dstStep, IppiSize dstRoiSize, IppiMaskSize mask,
IppiBorderType borderType, Ipp<srcDatatype> borderValue, Ipp8u* pBuffer);
Supported values for mod:8u16s_C1R 16s_C1R 32f_C1R

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc
srcStep
pDst
dstStep
dstRoiSize

Pointer to the source image ROI.
Distance, in bytes, between starting points ofconsecutive lines in the source image.
Pointer to the destination image ROI.
Distance, in bytes, between starting points ofconsecutive lines in the destination image.
Size of the source and destination ROI in pixels.

mask

Predefined mask of IppiMaskSize. Possible value
is ippMskSize3x3.

borderType

Type of border. Possible values are:ippBorderConst Values of all border pixels are

set to constant.
ippBorderRepl Border is replicated from theedge pixels.
Mirroredborder is used.
ippBorderMirror
ippBorderMirro Mirrored border withreplication is used.
rR
ippBorderInMem Border is obtained from thesource image pixels inmemory.

Mixed borders are also supported. They can beobtained by the bitwise operation OR between any of
the ippBorderRepl, ippBorderConst,
ippBorderMirror, or ippBorderMirrorR values
and the ippBorderInMemTop,
ippBorderInMemBottom, ippBorderInMemLeft,
ippBorderInMemRight values.

1212Developer Guide and Reference for Intel® Integrated Performance Primitives

1Constant value to assign to pixels of theconstant border. This parameter is applicable
only to the ippBorderConst border type.

borderValue

Pointer to the work buffer.

pBuffer

Description
This function operates with ROI.
This function applies a vertical Scharr filter to the pSrc source image ROI. The size of the source image ROI
is equal to the destination image ROI size dstRoiSize. The values of border pixels are assigned inaccordance with the borderType and borderValue parameters. The kernel of the filter is a matrix of 3x3
size with the following values:

-3

0

3

-10

0

10

-3

0

3

The anchor cell is the center cell of the kernel, highlighted in red.
This filter enhances horizontal edges of an image.
Before using this function, you need to compute the size of the work buffer pBuffer using theFilterScharrVertMaskBorderGetBufferSize function.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsSizeErr
ippStsStepErr
ippStsNotEvenStepErr

ippStsBorderErr

Indicates an error when dstRoiSize is negative, or equal tozero.
Indicates an error when srcStep or dstStep is negative, or
equal to zero.
Indicates an error when one of the step values is not divisibleby 4 for floating-point images, or by 2 for short-integer
images.
Indicates an error when borderType has an illegal value.

ExampleThe code example below demonstrates how to use the ippiFilterScharrVertMaskBorderGetBufferSize
and ippiFilterScharrVertMaskBorder_8u16s_C1R functions.

IppStatus fix_scharrvert_8u16( void ) {Ipp8u pSrc[9*8] ={0, 1, 2, 120, 121, 122, 50, 51, 52,
1, 2, 3, 121, 122, 123, 52, 52, 53,
3, 4, 5, 130, 131, 132, 63, 64, 65,
4, 5, 6, 131, 132, 133, 64, 65, 66,
5, 6, 7, 132, 133, 134, 65, 66, 67,
8, 7, 6, 134, 133, 132, 67, 66, 65,
7, 6, 5, 133, 132, 131, 66, 65, 64,
6, 5, 4, 132, 131, 130, 65, 64, 63
};

1213

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Ipp16s pDst[8*7];
Ipp8u*pBuffer;
IppiSize roiSize = {8, 7};
IppiBorderType borderType = ippBorderRepl | ippBorderInMemTop | ippBorderInMemRight;
int
srcStep = 9 * sizeof(Ipp8u);
int
dstStep = 8 * sizeof(Ipp16s);
int
bufferSize;
IppStatus status;
ippiFilterScharrVertMaskBorderGetBufferSize(roiSize, ippMskSize3x3, ipp8u, ipp16s, 1,&bufferSize);pBuffer = ippsMalloc_8u(bufferSize);status = ippiFilterScharrVertMaskBorder_8u16s_C1R(pSrc + srcStep, srcStep, pDst, dstStep,roiSize, ippMskSize3x3,
borderType, 0, pBuffer);
ippsFree(pBuffer);
return status;}
The result is as follows:

pDst -->
16 32 1925 1925 32 -1117 -1127 22
16 32 1995 1995 32 -1094 -1097 29
16 32 2016 2016 32 -1088 -1088 32
10 20 2019 2019 20 -1082 -1082 20-10 -20 2029 2029 -20 -1062 -1062 -20-16 -32 2032 2032 -32 -1056 -1056 -32-16 -32 2032 2032 -32 -1056 -1056 -32

See Also
Borders in Neighborhood Operations
Regions of Interest in Intel IPP
User-defined Border Types
FilterScharrVertMaskBorderGetBufferSize Computes the size of the work buffer for the Scharr
Vertical filter.
FilterSharpenBorderGetBufferSize
Computes the size of the work buffer for image
sharpening.

SyntaxIppStatus ippiFilterSharpenBorderGetBufferSize(IppiSize dstRoiSize, IppiMaskSize mask,
IppDataType srcDataType, IppDataType dstDataType, int numChannels, int* pBufferSize);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
dstRoiSize

1214

Size of the destination ROI, in pixels.

Developer Guide and Reference for Intel® Integrated Performance Primitives

mask

Predefined mask of IppiMaskSize type. Possible value is
ippMskSize3x3.

srcDataType

Data type of the source image.

dstDataType

Data type of the destination image.

numChannels
pBufferSize

1

Number of channels in the image. Possible values are 1, 3, or
4.
Pointer to the size, in bytes, of the external buffer.

Description
This function computes the size, in bytes, of the external work buffer for the ippiFilterSharpenBorderfunction. The result is stored in the pBufferSize parameter.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error when pBufferSize is NULL.

ippStsSizeErr
ippStsMaskSizeErr

Indicates an error when dstRoiSize has a field with a zero or
negative value.
Indicates an error when mask has an illegal value.

ippStsDataTypeErr

Indicates an error when srcDataType or dstDataType has an illegal
value.

ippStsNumChannelErr

Indicates an error when numChannels has an illegal value.

See Also
FilterSharpenBorder Performs image sharpening with a high-pass filter.
FilterSharpenBorder
Performs image sharpening with a high-pass filter.

SyntaxCase 1: Operating on one-channel data
IppStatus ippiFilterSharpenBorder_8u_C1R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst,
int dstStep, IppiSize dstRoiSize, IppiMaskSize mask, IppiBorderType borderType, Ipp8u
borderValue, Ipp8u* pBuffer);
IppStatus ippiFilterSharpenBorder_16s_C1R(const Ipp16s* pSrc, int srcStep, Ipp16s*
pDst, int dstStep, IppiSize dstRoiSize, IppiMaskSize mask, IppiBorderType borderType,Ipp16s borderValue, Ipp8u* pBuffer);
IppStatus ippiFilterSharpenBorder_32f_C1R(const Ipp32f* pSrc, int srcStep, Ipp32f*
pDst, int dstStep, IppiSize dstRoiSize, IppiMaskSize mask, IppiBorderType borderType,Ipp32f borderValue, Ipp8u* pBuffer);

Case 2: Operating on multi-channel data
IppStatus ippiFilterSharpenBorder_8u_C3R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst,
int dstStep, IppiSize dstRoiSize, IppiMaskSize mask, IppiBorderType borderType, const
Ipp8u pBorderValue[3], Ipp8u* pBuffer);

1215

1

Intel® Integrated Performance Primitives Developer Guide and Reference

IppStatus ippiFilterSharpenBorder_16s_C3R(const Ipp16s* pSrc, int srcStep, Ipp16s*
pDst, int dstStep, IppiSize dstRoiSize, IppiMaskSize mask, IppiBorderType borderType,const Ipp16s pBorderValue[3], Ipp8u* pBuffer);
IppStatus ippiFilterSharpenBorder_32f_C3R(const Ipp32f* pSrc, int srcStep, Ipp32f*
pDst, int dstStep, IppiSize dstRoiSize, IppiMaskSize mask, IppiBorderType borderType,const Ipp32f pBorderValue[3], Ipp8u* pBuffer);
IppStatus ippiFilterSharpenBorder_8u_AC4R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst,
int dstStep, IppiSize dstRoiSize, IppiMaskSize mask, IppiBorderType borderType, const
Ipp8u pBorderValue[3], Ipp8u* pBuffer);
IppStatus ippiFilterSharpenBorder_16s_AC4R(const Ipp16s* pSrc, int srcStep, Ipp16s*
pDst, int dstStep, IppiSize dstRoiSize, IppiMaskSize mask, IppiBorderType borderType,const Ipp16s pBorderValue[3], Ipp8u* pBuffer);
IppStatus ippiFilterSharpenBorder_32f_AC4R(const Ipp32f* pSrc, int srcStep, Ipp32f*
pDst, int dstStep, IppiSize dstRoiSize, IppiMaskSize mask, IppiBorderType borderType,const Ipp32f pBorderValue[3], Ipp8u* pBuffer);
IppStatus ippiFilterSharpenBorder_8u_C4R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst,
int dstStep, IppiSize dstRoiSize, IppiMaskSize mask, IppiBorderType borderType, const
Ipp8u pBorderValue[4], Ipp8u* pBuffer);
IppStatus ippiFilterSharpenBorder_16s_C4R(const Ipp16s* pSrc, int srcStep, Ipp16s*
pDst, int dstStep, IppiSize dstRoiSize, IppiMaskSize mask, IppiBorderType borderType,const Ipp16s pBorderValue[4], Ipp8u* pBuffer);
IppStatus ippiFilterSharpenBorder_32f_C4R(const Ipp32f* pSrc, int srcStep, Ipp32f*
pDst, int dstStep, IppiSize dstRoiSize, IppiMaskSize mask, IppiBorderType borderType,const Ipp32f pBorderValue[4], Ipp8u* pBuffer);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc
srcStep
pDst
dstStep
dstRoiSize

Pointer to the source image ROI.
Distance, in bytes, between the starting pointsof consecutive lines in the source image.
Pointer to the destination image ROI.
Distance, in bytes, between the starting pointsof consecutive lines in the destination image.
Size of the source and destination ROI, in pixels.

mask

Predefined mask of IppiMaskSize. Possible value
is ippMskSize3x3.

borderType

Type of border. Possible values are:ippBorderConst Values of all border pixels are

set to constant.

1216

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Border is replicated from theedge pixels.
ippBorderInMem Border is obtained from thesource image pixels inmemory.
ippBorderRepl

Mixed borders are also supported. They can beobtained by the bitwise operation OR between any of
the ippBorderRepl, ippBorderConst, or
ippBorderMirror values and theippBorderInMemTop, ippBorderInMemBottom,
ippBorderInMemLeft, ippBorderInMemRightvalues.

Constant value to assign to pixels of theconstant border. This parameter is applicable
only to the ippBorderConst border type.

borderValuepBorderValue[3], pBorderValue[4]Pointer to constant values to assign to pixels of
the constant border. This parameter is applicable
only to the ippBorderConst border type.
Pointer to the work buffer.

pBuffer

Description
Before using this function, you need to compute the size of the work buffer pBuffer using theippiFilterSharpenBorderGetBufferSize function.
This function operates with ROI (see Regions of Interest in Intel IPP).
This function applies a high-pass filter to the pSrc source image ROI. The size of the source image ROI isequal to the destination image ROI size dstRoiSize. The values of border pixels are assigned in accordancewith the borderType and borderValue parameters. The kernel of the filter is a matrix of 3x3 size. The
kernel has the following value:

-1/8

-1/8

-1/8

-1/8

16/8

-1/8

-1/8

-1/8

-1/8

The anchor cell is the center cell of the kernel, highlighted in red.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsBorderErr

Indicates an error when dstRoiSize is negative, or equal tozero.
Indicates an error when mask has an illegal value.

ippStsBorderErr

Indicates an error when borderType has an illegal value.

ippStsSizeErr

See Also
Borders in Neighborhood Operations
Regions of Interest in Intel IPP
User-defined Border Types
1217

1

Intel® Integrated Performance Primitives Developer Guide and Reference

FilterSharpenBorder Performs image sharpening with a high-pass filter.
FilterSobelGetBufferSize
Computes the size of the work buffer for the Sobel
filter.

SyntaxIppStatus ippiFilterSobelGetBufferSize (IppiSize dstRoiSize, IppiMaskSize mask,
IppNormType normType, IppDataType srcDataType, IppDataType dstDataType, int
numChannels, int* pBufferSize);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
dstRoiSize

Size of the destination ROI in pixels.

mask

Predefined mask of IppiMaskSize type. Possible values are
ippMskSize3x3 or ippMskSize5x5.

normType

Normalization mode of IppNormType type.

srcDataType

Data type of the source image.

dstDataType

Data type of the destination image.

numChannels

Number of channels in the image. Possible value is 1.

pBufferSize

Pointer to the size of the external work buffer.

Description
The ippiFilterSobelGetBufferSize function computes the size, in bytes, of the external work buffer
needed for the ippiFilterSobel function. The result is stored in the pBufferSize parameter.
For an example on how to use this functions, see the code example provided with the ippiFilterSobel
function description.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pBufferSize is NULL.

ippStsMaskSizeErr

Indicates an error when dstRoiSize is less than, or equal tozero.
Indicates an error when mask has an illegal value.

ippStsBadArgErr

Indicates an error when normType has an illegal value.

ippStsDataTypeErr

Indicates an error when srcDataType or dstDataType has an illegal
value.

ippStsSizeErr

1218

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

ippStsNumChannelsError

Indicates an error when numChannels has an illegal value.

See Also
FilterSobel Filters an image using a Sobel filter.
FilterSobelInit
Filters an image using a Sobel filter.

SyntaxIppStatus ippiFilterSobel_<mod>_T(IppiSize roiSize, IppiMaskSize maskId, IppNormTypenormType, IppDataType srcDataType, IppDataType dstDataType, int numChannels,
IppiFilterSobelSpec_T* pSpec);
Supported values for mod:8u16s_C1R

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
roiSize

Size of the destination ROI in pixels.

maskIdPredefined mask of the IppiMaskSize type.

normType

Normalization mode if the IppNormType type is specified.

srcDataType

Data type of the source image.

dstDataType

Data type of the destination image.

numChannels

Number of channels in the image.

pSpec

Pointer to the Filter Sobel specification structure.

Description
This function is used for initialization of the pSpec structure for the ippiFilterSobel function.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pBufferSize is NULL.

ippStsSizeErr

Indicates an error when roiSize is negative or equal to zero.

ippStsMaskSizeErr

Indicates an error when maskSize has a wrong value.

ippStsDataTypeErr

Indicates an error when srcDataType or dstDataType has anillegal value.

ippStsNumChannelsErr

Indicates an error when numChannels has an illegal value.

1219

1

Intel® Integrated Performance Primitives Developer Guide and Reference

See Also
Borders in Neighborhood Operations
Regions of Interest in Intel IPP
User-defined Border Types
FilterSobelGetBufferSize Computes the size of the work buffer for the Sobel filter.
FilterSobel
Filters an image using a Sobel filter.

SyntaxIppStatus ippiFilterSobel_<mod>(const Ipp<srcdatatype>* pSrc, int srcStep,
Ipp<dstdatatype>* pDst, int dstStep, IppiSize dstRoiSize, IppiMaskSize maskSize,
IppNormType normType, IppiBorderType borderType, Ipp<srcdatatype> borderValue, Ipp8u*
pBuffer);
Supported values for mod:8u16s_C1R 16s32f_C1R 16u32f_C1R 32f_C1R
IppStatus ippiFilterSobel_<mod>_T(const Ipp8u* pSrc, int srcStep, Ipp16s* pDst, int
dstStep, IppiBorderType border, const Ipp8u borderValue, IppiFilterSobelSpec_T* pSpec,
Ipp8u* pBuffer);
Supported values for mod:8u16s_C1R_T

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc
srcStep
pDst
dstStep
dstRoiSize
maskSize

Pointer to the source image ROI.
Distance, in bytes, between the starting pointsof consecutive lines in the source image.
Pointer to the destination image ROI.
Distance, in bytes, between the starting pointsof consecutive lines in the destination image.
Size of the source and destination ROI in pixels.
Size of the predefined mask. Possible values are

ippMskSize3x3 or ippMskSize5x5.

normType

Normalization mode of IppNormType.

borderType

Type of border. Possible values are:ippBorderConst Values of all border pixels are

set to constant.

1220

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Border is replicated from theedge pixels.
ippBorderInMem Border is obtained from thesource image pixels inmemory.
ippBorderRepl

Mixed borders are also supported. They can beobtained by the bitwise operation OR between any of
the ippBorderRepl or ippBorderConst values andthe ippBorderInMemTop, ippBorderInMemBottom,
ippBorderInMemLeft, ippBorderInMemRightvalues.

borderValuepBuffer

Constant value to assign to pixels of theconstant border. This parameter is applicable
only to the ippBorderConst border type.
Pointer to the work buffer.

Description
Before using this function, you need to compute the size of the work buffer pBuffer using theippiFilterSobelBufferSize function.
Call the ippiFilterSobelInit_T function before using the ippiFilterSobel*_T function.
This function applies a Sobel filter to the source image with the specified kernel size and normalization type.
The values of border pixels are assigned in accordance with the borderType and borderValue parameters.
The kernel of the filter is a matrix of 3x3 or 5x5 size depending on the maskSize value. The formulas below
describe the algorithm for the 3x3 and 5x5 Sobel operators.
3x3 Sobel operator:

5x5 Sobel operator:

where
•
•
•

A is the source image* is the 2D convolution operator
Gx and Gy are horizontal and vertical magnitude of the source image, respectively

1221

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Sobel filter output G, as overall gradient magnitude, is generated through L1 and L2 normalization of Gx andGy.
L1 normalization:

L2 normalization:

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsSizeErr
ippStsMaskSizeErr
ippStsStepErr
ippStsNotEvenStepErr

ippStsBorderErr

Indicates an error when dstRoiSize has a field with a zero or
negative value.
Indicates an error when maskSize has an illegal value.
Indicates an error when srcStep or dstStep is less than, or
equal to zero.
Indicates an error when one of the step values is not divisibleby 4 for floating-point images, or by 2 for short-integer
images.
Indicates an error when borderType has an illegal value.

ExampleThe code example below demonstrates how to use the ippiFilterSobelGetBufferSize andippiFilterSobel_8u16s_C1R functions.
IppStatus filter_sobel_8u16s_c1( void ) {Ipp8u pSrc[9*8] ={0, 1, 2, 120, 121, 122, 50, 51, 52,
1, 2, 3, 121, 122, 123, 52, 52, 53,
3, 4, 5, 130, 131, 132, 63, 64, 65,
4, 5, 6, 131, 132, 133, 64, 65, 66,
5, 6, 7, 132, 133, 134, 65, 66, 67,
8, 7, 6, 134, 133, 132, 67, 66, 65,
7, 6, 5, 133, 132, 131, 66, 65, 64,
6, 5, 4, 132, 131, 130, 65, 64, 63};
Ipp16spDst[8*7];
IppiSize roiSize = {8, 7};
IppiMaskSize mask = ippMskSize3x3;
IppiBorderType borderType = ippBorderConst | ippBorderInMemTop | ippBorderInMemRight;
int
srcStep = 9 * sizeof(Ipp8u);
int
dstStep = 8 * sizeof(Ipp16s);
int
bufferSize;
IppStatus status;
Ipp8u*pBuffer;
IppNormType normType = ippNormL1;

1222

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

ippiFilterSobelGetBufferSize(roiSize, mask, normType, ipp8u, ipp16s, 1, &bufferSize);pBuffer = ippsMalloc_8u(bufferSize);status = ippiFilterSobel_8u16s_C1R(pSrc+srcStep, srcStep, pDst, dstStep, roiSize, mask,
normType, borderType, 33, pBuffer);
ippsFree(pBuffer);
return status;}
The result is as follows:

pDst -->
132
126
118
118
110
114
162

20
20
16
12
4
16
114

502
516
512
510
510
516
398

516
530
512
512
508
516
652

48
48
16
8
8
16
402

322
316
280
272
272
272
526

330
322
280
276
268
272
394

58
58
16
8
8
16
134

See Also
Borders in Neighborhood Operations
Regions of Interest in Intel IPP
User-defined Border Types
FilterSobelGetBufferSize Computes the size of the work buffer for the Sobel filter.
FilterSobelHorizBorderGetBufferSize
Computes the size of the work buffer for the Sobel
Horizontal filter.

SyntaxIppStatus ippiFilterSobelHorizBorderGetBufferSize (IppiSize dstRoiSize, IppiMaskSize
mask, IppDataType srcDataType, IppDataType dstDataType, int numChannels, int*
pBufferSize);
IppStatus ippiFilterSobelHorizBorderGetBufferSize_T (IppiSize dstRoiSize, IppiMaskSize
mask, IppDataType srcDataType, IppDataType dstDataType, int numChannels, int*
pBufferSize);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
dstRoiSize

Size of the destination ROI in pixels.

mask

Predefined mask of IppiMaskSize type. Possible values are
ippMskSize3x3 or ippMskSize5x5.

srcDataType

Data type of the source image.

1223

1

Intel® Integrated Performance Primitives Developer Guide and Reference

dstDataType

Data type of the destination image.

numChannels

Number of channels in the image. Possible value is 1.

pBufferSize

Pointer to the size of the external work buffer.

Description
The ippiFilterSobelHorizBorderGetBufferSize function computes the size, in bytes, of the external
work buffer needed for the ippiFilterSobelHorizBorder function. The result is stored in thepBufferSize parameter.
For an example on how to use this functions, see the code example provided with theippiFilterSobelHorizBorder function description.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pBufferSize is NULL.

ippStsSizeErr
ippStsMaskSizeErr

Indicates an error when dstRoiSize is negative, or equal tozero.
Indicates an error when mask has an illegal value.

ippStsDataTypeErr

Indicates an error when srcDataType or dstDataType has an illegal
value.

ippStsNumChannelsError

Indicates an error when numChannels has an illegal value.

See Also
FilterSobelHorizBorder Filters an image using a horizontal Sobel filter.
FilterSobelHorizBorder
Filters an image using a horizontal Sobel filter.

SyntaxIppStatus ippiFilterSobelHorizBorder_<mod>(const Ipp<srcDatatype>* pSrc, int srcStep,
Ipp<dstDatatype>* pDst, int dstStep, IppiSize dstRoiSize, IppiMaskSize mask,
IppiBorderType borderType, Ipp<srcDatatype> borderValue, Ipp8u* pBuffer);
Supported values for mod:8u16s_C1R 16s_C1R 32f_C1R
IppStatus ippiFilterSobelHorizBorder_<mod>_T(const Ipp<srcDatatype>* pSrc, int srcStep,
Ipp<dstDatatype>* pDst, int dstStep, IppiSize dstRoiSize, IppiMaskSize mask,
IppiBorderType borderType, Ipp<srcDatatype> borderValue, Ipp8u* pBuffer);
Supported values for mod:8u16s_C1R_T

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h1224

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc
srcStep
pDst
dstStep
dstRoiSize

Pointer to the source image ROI.
Distance, in bytes, between the starting pointsof consecutive lines in the source image.
Pointer to the destination image ROI.
Distance, in bytes, between the starting pointsof consecutive lines in the destination image.
Size of the source and destination ROI in pixels.

mask

Predefined mask of IppiMaskSize. Possible
values are ippMskSize3x3 or ippMskSize5x5.

borderType

Type of border. Possible values are:ippBorderConst Values of all border pixels are

set to constant.
Borderis replicated from theippBorderRepl
edge pixels.
ippBorderMirro Mirrored border is used.
r
ippBorderMirro Mirrored border withreplication is used.
rR
ippBorderInMem Border is obtained from thesource image pixels inmemory.

Mixed borders are also supported. They can beobtained by the bitwise operation OR between any of
the ippBorderRepl, ippBorderConst,
ippBorderMirror, or ippBorderMirrorR values
and the ippBorderInMemTop,
ippBorderInMemBottom, ippBorderInMemLeft,
ippBorderInMemRight values.

borderValuepBuffer

Constant value to assign to pixels of theconstant border. This parameter is applicable
only to the ippBorderConst border type.
Pointer to the work buffer.

Description
Before using this function, you need to compute the size of the work buffer pBuffer using theFilterSobelHorizBorderGetBufferSize function.
This function operates with ROI.

1225

1

Intel® Integrated Performance Primitives Developer Guide and ReferenceThis function applies a horizontal Sobel filter to the pSrc source image ROI. The size of the source image ROI
is equal to the destination image ROI size dstRoiSize. The values of border pixels are assigned inaccordance with the borderType and borderValue parameters. The kernel of the filter is a matrix of 3x3 or
5x5 size depending on the mask value. The kernels have the following values:

1

2

1

0

0

0

-1

-2

-1

or

1

4

6

4

1

2

8

12

8

2

0

0

0

0

0

-2

-8

-12

-8

-2

-1

-4

-6

-4

-1

The anchor cell is the center cell of the kernel, highlighted in red.
This filter enhances horizontal edges of an image.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsSizeErr
ippStsStepErr
ippStsNotEvenStepErr

ippStsBorderErr

Indicates an error when dstRoiSize is negative, or equal tozero.
Indicates an error when srcStep or dstStep is negative, or
equal to zero.
Indicates an error when one of the step values is not divisibleby 4 for floating-point images, or by 2 for short-integer
images.
Indicates an error when borderType has an illegal value.

ExampleThe code example below demonstrates how to use the ippiFilterSobelHorizBorderGetBufferSize andippiFilterSobelHorizBorder_8u16s_C1R functions to filter an image with the Sobel horizontal kernel.

IppStatus fix_sobelhoriz_8u16( void ) {Ipp8u pSrc[9*8] ={0, 1, 2, 120, 121, 122, 50, 51, 52,
1, 2, 3, 121, 122, 123, 52, 52, 53,
3, 4, 5, 130, 131, 132, 63, 64, 65,
4, 5, 6, 131, 132, 133, 64, 65, 66,
5, 6, 7, 132, 133, 134, 65, 66, 67,
8, 7, 6, 134, 133, 132, 67, 66, 65,
7, 6, 5, 133, 132, 131, 66, 65, 64,
6, 5, 4, 132, 131, 130, 65, 64, 63};
Ipp16s pDst[8*7];
Ipp8u*pBuffer;
IppiSize roiSize = {8, 7};
IppiBorderType borderType = ippBorderRepl | ippBorderInMemTop | ippBorderInMemRight;
int
srcStep = 9 * sizeof(Ipp8u);
int
dstStep = 8 * sizeof(Ipp16s);
int
bufferSize;
IppStatus status;
ippiFilterSobelHorizBorderGetBufferSize(roiSize, ippMskSize3x3, ipp8u, ipp16s, 1,1226

Developer Guide and Reference for Intel® Integrated Performance Primitives

1&bufferSize);pBuffer = ippsMalloc_8u(bufferSize);status = ippiFilterSobelHorizBorder_8u16s_C1R(pSrc + srcStep, srcStep, pDst, dstStep,roiSize, ippMskSize3x3,
borderType, 0, pBuffer);
ippsFree(pBuffer);
return status;}
The result is as follows:

pDst -->
12 12 1912 12 19
8
8
8
14
8
5
6
0 -3
-8 -8 -8
-4 -4 -4

33
33
8
7
-1
-8
-4

40
40
8
4
-4
-8
-4

43
42
8
2
-6
-8
-4

49
47
8
6
-2
-8
-4

52
51
8
4
-4
-8
-4

See Also
Borders in Neighborhood Operations
Regions of Interest in Intel IPP
User-defined Border Types
FilterSobelHorizBorderGetBufferSize Computes the size of the work buffer for the Sobel
Horizontal filter.
FilterSobelHorizSecondBorderGetBufferSize
Computes the size of the work buffer for the Sobel
Horizontal (second derivative) filter.

SyntaxIppStatus ippiFilterSobelHorizSecondBorderGetBufferSize (IppiSize dstRoiSize,
IppiMaskSize mask, IppDataType srcDataType, IppDataType dstDataType, int numChannels,
int* pBufferSize);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
dstRoiSize

Size of the destination ROI in pixels.

mask

Predefined mask of IppiMaskSize type. Possible values are
ippMskSize3x3 or ippMskSize5x5.

srcDataType

Data type of the source image.

dstDataType

Data type of the destination image.

numChannels

Number of channels in the image. Possible value is 1.

1227

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Pointer to the size of the external work buffer.

pBufferSize

Description
The ippiFilterSobelHorizSecondBorderGetBufferSize function computes the size, in bytes, of theexternal work buffer needed for the ippiFilterSobelHorizSecondBorder function. The result is stored in
the pBufferSize parameter.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pBufferSize is NULL.

ippStsSizeErr
ippStsMaskSizeErr

Indicates an error when dstRoiSize is negative, or equal tozero.
Indicates an error when mask has an illegal value.

ippStsDataTypeErr

Indicates an error when srcDataType or dstDataType has an illegal
value.

ippStsNumChannelsError

Indicates an error when numChannels has an illegal value.

See Also
FilterSobelHorizSecondBorder Applies horizontal (second derivative) Sobel filter with border.
FilterSobelHorizSecondBorder
Applies horizontal (second derivative) Sobel filter withborder.

SyntaxIppStatus ippiFilterSobelHorizSecondBorder_<mod>(const Ipp<srcDatatype>* pSrc, int
srcStep, Ipp<dstDatatype>* pDst, int dstStep, IppiSize dstRoiSize, IppiMaskSize mask,
IppiBorderType borderType, Ipp<srcDatatype> borderValue, Ipp8u* pBuffer);
Supported values for mod:8u16s_C1R

32f_C1R

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc
srcStep
pDst

1228

Pointer to the source image ROI.
Distance in bytes between starts of consecutive
lines in the source image.
Pointer to the destination image ROI.

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

dstRoiSize

Distance in bytes between starts of consecutive
lines in the destination image.
Size of the source and destination image ROI.

mask

Type of the filter kernel.

borderType

Type of border (see Borders in Neighborhood
Operations); following values are possible:

dstStep

ippBorderConst Values of all border pixels are
ippBorderRepl

set to constant.
Replicated border is used.

ippBorderMirro Mirrored border is usedr
ippBorderMirro Mirrored border withreplication is usedrR

The constant value to assign to the pixels in theconstant border (not applicable for otherborder's type).
Pointer to the working buffer.

borderValuepBuffer

Description
This function operates with ROI (see Regions of Interest in Intel IPP). This function applies the second
derivative horizontal Sobel filter (y-derivative) to the source image pSrc and stores results to the destination
image of the same size pDst. Source image can be used as the destination image if they both have the samedata type. The values of border pixels are assigned in accordance with the borderType and borderValueparameters. The kernel of this filter is the matrix of either 3x3 or 5x5 size that is specified by the parametermask.The kernels have the following values with the anchor in the center cell (red):

1

2

1

-2

-4

-2

1

2

1

or

1

4

6

4

1

0

0

0

0

0

-2

-8 -12

-8

-2

0

0

0

0

0

1

4

6

4

1

The function requires the working buffer pBuffer which size should be computed by the function
ippiFilterSobelHorizSecondBorderGetBufferSize beforehand.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsStepErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointers is
NULL.
Indicates an error condition if roiSize has a field with a zero or
negative value.
Indicates an error condition if srcStep or dstStep is less thanroiSize.width * <pixelSize>

1229

1

Intel® Integrated Performance Primitives Developer Guide and ReferenceippStsBadArgErr

Indicates an error condition if one of the step values is notdivisible by 4 for floating-point images, or by 2 for shortinteger images.
Indicates an error if borderType or divisor has a wrong value.

ippStsMaskErr

Indicates an error condition if mask has a wrong value.

ippStsNotEvenStepErr

FilterSobelVertBorderGetBufferSize
Computes the size of the work buffer for the Sobel
Vertical filter.

SyntaxIppStatus ippiFilterSobelVertBorderGetBufferSize (IppiSize dstRoiSize, IppiMaskSize
mask, IppDataType srcDataType, IppDataType dstDataType, int numChannels, int*
pBufferSize);
IppStatus ippiFilterSobelVertBorderGetBufferSize_T (IppiSize dstRoiSize, IppiMaskSize
mask, IppDataType srcDataType, IppDataType dstDataType, int numChannels, int*
pBufferSize);

Include Files
ippi.hParameters
dstRoiSize

Size of the destination ROI in pixels.

mask

Predefined mask of IppiMaskSize type. Possible values are
ippMskSize3x3 or ippMskSize5x5.

srcDataType

Data type of the source image.

dstDataType

Data type of the destination image.

numChannels

Number of channels in the image. Possible value is 1.

pBufferSize

Pointer to the size of the external work buffer.

Description
The ippiFilterSobelVertBorderGetBufferSize function computes the size, in bytes, of the external
work buffer needed for the ippiFilterSobelVertBorder function. The result is stored in the pBufferSize
parameter.
For an example on how to use this function, see the code example provided with theippiFilterSobelVertBorder function description.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pBufferSize is NULL.

ippStsSizeErr
ippStsMaskSizeErr

1230

Indicates an error when dstRoiSize is negative, or equal tozero.
Indicates an error when mask has an illegal value.

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

ippStsDataTypeErr

Indicates an error when srcDataType or dstDataType has an illegal
value.

ippStsNumChannelsError

Indicates an error when numChannels has an illegal value.

See Also
FilterSobelVertBorder Filters an image using a vertical Sobel filter.
FilterSobelVertBorder
Filters an image using a vertical Sobel filter.

SyntaxIppStatus ippiFilterSobelVertBorder_<mod>(const Ipp<srcDatatype>* pSrc, int srcStep,
Ipp<dstDatatype>* pDst, int dstStep, IppiSize dstRoiSize, IppiMaskSize mask,
IppiBorderType borderType, Ipp<srcDatatype> borderValue, Ipp8u* pBuffer);
Supported values for mod:8u16s_C1R 16s_C1R 32f_C1R
IppStatus ippiFilterSobelVertBorder_<mod>_T(const Ipp<srcDatatype>* pSrc, int srcStep,
Ipp<dstDatatype>* pDst, int dstStep, IppiSize dstRoiSize, IppiMaskSize mask,
IppiBorderType borderType, Ipp<srcDatatype> borderValue, Ipp8u* pBuffer);
Supported values for mod:8u16s_C1R_T

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc
srcStep
pDst
dstStep
dstRoiSize

Pointer to the source image ROI.
Distance, in bytes, between the starting pointsof consecutive lines in the source image.
Pointer to the destination image ROI.
Distance, in bytes, between the starting pointsof consecutive lines in the destination image.
Size of the source and destination ROI in pixels.

mask

Predefined mask of IppiMaskSize. Possible
values are ippMskSize3x3 or ippMskSize5x5.

borderType

Type of border. Possible values are:ippBorderConst Values of all border pixels are
ippBorderRepl

set to constant.
Border is replicated from theedge pixels.

1231

1

Intel® Integrated Performance Primitives Developer Guide and Reference

ippBorderMirro Mirrored border is used.
r
ippBorderMirro Mirrored border withreplication is used.
rR
ippBorderInMem Border is obtained from thesource image pixels inmemory.

Mixed borders are also supported. They can beobtained by the bitwise operation OR between any of
the ippBorderRepl, ippBorderConst,
ippBorderMirror, or ippBorderMirrorR values
and the ippBorderInMemTop,
ippBorderInMemBottom, ippBorderInMemLeft,
ippBorderInMemRight values.

Constant value to assign to pixels of theconstant border. This parameter is applicable
only to the ippBorderConst border type.

borderValue

Pointer to the work buffer.

pBuffer

Description
Before using this function, you need to compute the size of the work buffer pBuffer using theFilterSobelVertBorderGetBufferSize function.
This function operates with ROI.
This function applies a vertical Sobel filter to the pSrc source image ROI. The size of the source image ROI isequal to the destination image ROI size dstRoiSize. The values of border pixels are assigned in accordancewith the borderType and borderValue parameters. The kernel of the filter is a matrix of 3x3 or 5x5 size
depending on the mask value. The kernels have the following values:

-1

0

1

-2

0

2

-1

0

1

or

-1

-2

0

2

1

-4

-8

0

8

4

-6

-12

0

12

-4

-8

0

8

4

-1

-2

0

2

1

6

The anchor cell is the center cell of the kernel, highlighted in red.
This filter enhances vertical edges of an image.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsSizeErr
ippStsStepErr

1232

Indicates an error when dstRoiSize is negative, or equal tozero.
Indicates an error when srcStep or dstStep is negative, or
equal to zero.

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Indicates an error when one of the step values is not divisibleby 4 for floating-point images, or by 2 for short-integer
images.
Indicates an error when borderType has an illegal value.

ippStsNotEvenStepErr

ippStsBorderErr

ExampleThe code example below demonstrates how to use the ippiFilterSobelVertBorderGetBufferSize andippiFilterSobelVertBorder functions.

IppStatus fix_sobel_8u16( void ) {Ipp8u pSrc[9*8] ={0, 1, 2, 120, 121, 122, 50, 51, 52,
1, 2, 3, 121, 122, 123, 52, 52, 53,
3, 4, 5, 130, 131, 132, 63, 64, 65,
4, 5, 6, 131, 132, 133, 64, 65, 66,
5, 6, 7, 132, 133, 134, 65, 66, 67,
8, 7, 6, 134, 133, 132, 67, 66, 65,
7, 6, 5, 133, 132, 131, 66, 65, 64,
6, 5, 4, 132, 131, 130, 65, 64, 63};
Ipp16s pDst[8*7];
Ipp8u*pBuffer;
IppiSize roiSize = {8, 7};
IppiBorderType borderType = ippBorderRepl | ippBorderInMemTop | ippBorderInMemRight;
int
srcStep = 9 * sizeof(Ipp8u);
int
dstStep = 8 * sizeof(Ipp16s);
int
bufferSize;
IppStatus status;
ippiFilterSobelVertBorderGetBufferSize(roiSize, ippMskSize3x3, ipp8u, ipp16s, 1,&bufferSize);pBuffer = ippsMalloc_8u(bufferSize);status = ippiFilterSobelVertBorder_8u16s_C1R(pSrc + srcStep, srcStep, pDst, dstStep,roiSize, ippMskSize3x3,
borderType, 0, pBuffer);
ippsFree(pBuffer);
return status;}
The result is as follows:

pDst ->-4 -8 -483 -483
-4 -8 -497 -497
-4 -8 -504 -504
-2 -4 -505 -505
24 -507 -507
4
8 -508 -508
4
8 -508 -508

-8 279 281-8 274 275-8 272 272-4 270 270
4 266 266
8 264 264
8 264 264

-6
-7
-8
-4
4
8
8

See Also
Borders in Neighborhood Operations
Regions of Interest in Intel IPP
User-defined Border Types
FilterSobelVertBorderGetBufferSize Computes the size of the work buffer for the Sobel Verticalfilter.

1233

1Intel® Integrated Performance Primitives Developer Guide and Reference

FilterSobelVertSecondBorderGetBufferSize
Computes the size of the work buffer for the Sobel
vertical (second derivative) filter.

SyntaxIppStatus ippiFilterSobelVertSecondBorderGetBufferSize (IppiSize dstRoiSize,
IppiMaskSize mask, IppDataType srcDataType, IppDataType dstDataType, int numChannels,
int* pBufferSize);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
dstRoiSize

Size of the destination ROI in pixels.

mask

Predefined mask of IppiMaskSize type. Possible values are
ippMskSize3x3 or ippMskSize5x5.

srcDataType

Data type of the source image.

dstDataType

Data type of the destination image.

numChannels

Number of channels in the image. Possible value is 1.

pBufferSize

Pointer to the size of the external work buffer.

Description
The ippiFilterSobelVertSecondBorderGetBufferSize function computes the size, in bytes, of theexternal work buffer needed for the ippiFilterSobelVertSecondBorder function. The result is stored in
the pBufferSize parameter.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pBufferSize is NULL.

ippStsSizeErr
ippStsMaskSizeErr

Indicates an error when dstRoiSize is negative, or equal tozero.
Indicates an error when mask has an illegal value.

ippStsDataTypeErr

Indicates an error when srcDataType or dstDataType has an illegal
value.

ippStsNumChannelsError

Indicates an error when numChannels has an illegal value.

See Also
FilterSobelVertSecondBorder Applies vertical (second derivative) Sobel filter with border.

1234

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

FilterSobelNegVertBorderGetBufferSize
Computes the size of the work buffer for the Sobel
vertical filter.

SyntaxIppStatus ippiFilterSobelNegVertBorderGetBufferSize (IppiSize dstRoiSize, IppiMaskSize
mask, IppDataType srcDataType, IppDataType dstDataType, int numChannels, int*
pBufferSize);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
dstRoiSize

Size of the destination ROI in pixels.

mask

Predefined mask of IppiMaskSize type. Possible values are
ippMskSize3x3 or ippMskSize5x5.

srcDataType

Data type of the source image.

dstDataType

Data type of the destination image.

numChannels

Number of channels in the image. Possible value is 1.

pBufferSize

Pointer to the size of the external work buffer.

Description
The ippiFilterSobelVertSecondBorderGetBufferSize function computes the size, in bytes, of theexternal work buffer needed for the ippiFilterSobelNegVertBorder function. The result is stored in thepBufferSize parameter.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pBufferSize is NULL.

ippStsSizeErr
ippStsMaskSizeErr

Indicates an error when dstRoiSize is negative, or equal tozero.
Indicates an error when mask has an illegal value.

ippStsDataTypeErr

Indicates an error when srcDataType or dstDataType has an illegal
value.

ippStsNumChannelsError

Indicates an error when numChannels has an illegal value.

See Also
FilterSobelNegVertSecondBorder Applies vertical Sobel filter with border.

1235

1

Intel® Integrated Performance Primitives Developer Guide and Reference

FilterSobelNegVertBorder
Applies vertical Sobel filter with border.

SyntaxIppStatus ippiFilterSobelNegVertBorder_<mod>(const Ipp<srcDatatype>* pSrc, int srcStep,
Ipp<dstDatatype>* pDst, int dstStep, IppiSize dstRoiSize, IppiMaskSize mask,
IppiBorderType borderType, Ipp<srcDatatype> borderValue, Ipp8u* pBuffer);
Supported values for mod:8u16s_C1R

32f_C1R

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc
srcStep
pDst

Pointer to the source image ROI.
Distance in bytes between starts of consecutive
lines in the source image.
Pointer to the destination image ROI.

dstRoiSize

Distance in bytes between starts of consecutive
lines in the destination image.
Size of the destination image ROI.

mask

Type of the filter kernel.

borderType

Type of border (see Borders in Neighborhood
Operations ); following values are possible:

dstStep

ippBorderConst Values of all border pixels are

set to constant.

ippBorderRepl

Replicated border is used.

ippBorderMirro Mirrored border is usedr
ippBorderMirro Mirrored border withreplication is usedrR
borderValuepBuffer

The constant value to assign to the pixels in theconstant border (not applicable for otherborder's type).
Pointer to the working buffer.

Description
These functions operate with ROI (see Regions of Interest in Intel IPP). These functions apply the verticalSobel filter (x-derivative) to the source image ROI pSrc and stores results to the destination image ROI of
the same size pDst. Source image can be used as the destination image if they have the same data type.

1236

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

The values of border pixels are assigned in accordance with the borderType and borderValue parameters.
The kernel of this filter is the matrix of either 3x3 or 5x5 size that is specified by the parameter mask. The
anchor cell is the center cell of the kernel (red).
The function ippiFilterSobelVertBorde uses the kernels with the following coefficients:

-1

0

1

-2

0

2

-1

0

1

or

-1

-2

0

2

1

-4

-8

0

8

4

-6

-12

0

12

6

-4

-8

0

8

4

-1

-2

0

2

1

The function ippiFilterSobelNegVertBoreder uses the kernels which coefficients are the same inmagnitude but opposite in sign:

1

0

-1

2

0

-2

1

0

-1

or

1

2

0

-2

-1

4

8

0

-8

-4

6

12

0 -12

-6

4

8

0

-8

-4

1

2

0

-2

-1

Before using this function, compute the size of the work buffer pBuffer using theFilterSobelNegVertBorderGetBufferSize function.
Example shows how the function ippiFilterSobelNegVertBorder_8u16s_C1R can be used for edge
detection.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsStepErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointers is
NULL.
Indicates an error condition if roiSize has a field with a zero or
negative value.
Indicates an error condition if srcStep or dstStep is less thanroiSize.width * <pixelSize>

ippStsBadArgErr

Indicates an error condition if one of the step values is notdivisible by 4 for floating-point images, or by 2 for shortinteger images.
Indicates an error if borderType or divisor has a wrong value.

ippStsMaskErr

Indicates an error condition if mask has a wrong value.

ippStsNotEvenStepErr

See Also
User-defined Border Types
FilterSobelVertSecondBorder
Applies vertical (second derivative) Sobel filter withborder.

1237

1Intel® Integrated Performance Primitives Developer Guide and Reference

SyntaxIppStatus ippiFilterSobelVertSecondBorder_<mod>(const Ipp<srcDatatype>* pSrc, int
srcStep, Ipp<dstDatatype>* pDst, int dstStep, IppiSize dstRoiSize, IppiMaskSize mask,
IppiBorderType borderType, Ipp<srcDatatype> borderValue, Ipp8u* pBuffer);
Supported values for mod:8u16s_C1R

32f_C1R

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc
srcStep
pDst

Pointer to the source image ROI.
Distance in bytes between starts of consecutive
lines in the source image.
Pointer to the destination image ROI.

dstRoiSize

Distance in bytes between starts of consecutive
lines in the destination image.
Size of the destination image ROI.

mask

Type of the filter kernel.

borderType

Type of border (see Borders in Neighborhood
Operations); following values are possible:

dstStep

ippBorderConst Values of all border pixels are
ippBorderRepl

set to constant.
Replicated border is used.

ippBorderMirro Mirrored border is usedr
ippBorderMirro Mirrored border withreplication is usedrR
borderValuepBuffer

The constant value to assign to the pixels in theconstant border (not applicable for otherborder's type).
Pointer to the working buffer.

Description
This function operates with ROI (see Regions of Interest in Intel IPP). This function applies the second
derivative vertical Sobel filter (x-derivative) to the source image pSrc and stores results to the destination
image of the same size pDst. Source image can be used as the destination image if they both have the same1238

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

data type. The values of border pixels are assigned in accordance with the borderType and borderValueparameters. The kernel of this filter is the matrix of either 3x3 or 5x5 size that is specified by the parametermask. The kernels have the following values with the anchor in the center cell (red):

1

-2

1

2

-4

2

1

-2

1

or

1

0

-2

0

1

4

0

-8

0

4

6

0 -12

0

6

4

0

-8

0

4

1

0

-2

0

1

The function requires the working buffer pBuffer which size should be computed by the function
ippiFilterSobelVertSecondBorderGetBufferSize beforehand.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsStepErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointers is
NULL.
Indicates an error condition if roiSize has a field with a zero or
negative value.
Indicates an error condition if srcStep or dstStep is less thanroiSize.width * <pixelSize>

ippStsBadArgErr

Indicates an error condition if one of the step values is notdivisible by 4 for floating-point images, or by 2 for shortinteger images.
Indicates an error if borderType or divisor has a wrong value.

ippStsMaskErr

Indicates an error condition if mask has a wrong value.

ippStsNotEvenStepErr

ExampleFilterSobelCrossGetBufferSize
Computes the size of the external buffer for the crossSobel filter with border.

SyntaxIppStatus ippiFilterSobelCrossGetBufferSize_<mod>(IppiSize roiSize, IppiMaskSize mask,
int* pBufferSize);
Supported values for mod:8u16s_C1R

32f_C1R

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

1239

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Parameters
roiSize

Maximum size of the source and destination image ROI.

mask

Predefined mask of IppiMaskSize type.

pBufferSize

Pointer to the buffer size.

Description
This function computes the size of the external buffer that is required for the filter function
ippiFilterSobelCrossBorder. The kernel of the filter is the matrix of either 3x3 or 5x5 size that is
specified by the parameter mask (see Table “Types of the Fixed Filter Functions”). This buffer
pBufferSize[0] can be used to filter an image whose width and height are equal to or less thancorresponding fields of roiSize.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsMaskSizeErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if the pBufferSize pointer is NULL.
Indicates an error condition if roiSize has a field with a zero or
negative value.
Indicates an error condition if mask has a wrong value.

FilterSobelCrossBorder
Applies second derivative cross Sobel filter withborder.

SyntaxIppStatus ippiFilterSobelCrossBorder_<mod>(const Ipp<srcDatatype>* pSrc, int srcStep,
Ipp<dstDatatype>* pDst, int dstStep, IppiSize roiSize, IppiMaskSize mask,
IppiBorderType borderType, Ipp<srcDatatype> borderValue, Ipp8u* pBuffer);
Supported values for mod:8u16s_C1R

32f_C1R

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pDst

1240

Pointer to the source image ROI.
Distance in bytes between starts of consecutive
lines in the source image.
Pointer to the destination image ROI.

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

roiSize

Distance in bytes between starts of consecutive
lines in the destination image.
Size of the source and destination image ROI.

mask

Type of the filter kernel.

borderType

Type of border (see Borders in Neighborhood
Operations); following values are possible:

dstStep

ippBorderConst Values of all border pixels are
ippBorderRepl

set to constant.
Replicated border is used.

The constant value to assign to the pixels in theconstant border (not applicable for otherborder's type).
Pointer to the working buffer.

borderValuepBuffer

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function applies the second derivative cross Sobel filter (xy-derivative) to the source image pSrc andstores results to the destination image of the same size pDst. Source image can be used as the destination
image if they both have the same data type. The values of border pixels are assigned in accordance with theborderType and borderValue parameters. The kernel of this filter is the matrix of either 3x3 or 5x5 sizethat is specified by the parameter mask. The kernels have the following values with the anchor in the center
cell (red):

-1

0

1

0

0

0

1

0

-1

or

-1

-2

0

2

1

-2

-4

0

4

2

0

0

0

0

0

2

4

0

-4

-2

1

2

0

-2

-1

The function requires the working buffer pBuffer whose size should be computed by the function
ippiFilterSobelCrossGetBufferSize beforehand.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsStepErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointers is
NULL.
Indicates an error condition if roiSize has a field with a zero or
negative value.
Indicates an error condition if srcStep or dstStep is less thanroiSize.width * <pixelSize>

ippStsBadArgErr

Indicates an error condition if one of the step values is notdivisible by 4 for floating-point images, or by 2 for shortinteger images.
Indicates an error if borderType or divisor has a wrong value.

ippStsMaskErr

Indicates an error condition if mask has a wrong value.

ippStsNotEvenStepErr

1241

1

Intel® Integrated Performance Primitives Developer Guide and Reference

GenSobelKernel
Computes kernel for the Sobel filter.

SyntaxIppStatus ippiGenSobelKernel_16s(Ipp16s* pDst, int kernelSize, int dx, int sign);
IppStatus ippiGenSobelKernel_32f(Ipp32f* pDst, int kernelSize, int dx, int sign);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pDst

Pointer to the destination vector.

kernelSize

Size of the Sobel kernel.

dx

Order of derivative.

sign

Specifies signs of kernel elements.

Description
This function computes the one-dimensional Sobel kernel. Kernel coefficients are equal to coefficients of thepolynomial

If the sign parameter is negative, then signs of kernel coefficients are changed. Kernel calculated by thisfunction can be used to filter images by a high order Sobel filter.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsBadArgErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if the pDst pointer is NULL.
Indicates an error condition if kernelSize is less than 3 or iseven.
Indicates an error condition if dx is equal to or less thankernelSize, or dx is negative.

Deinterlacing Filters
This section describes functions that perform image deinterlacing.

DeinterlaceFilterCAVT
Performs deinterlacing of two-field image.

1242

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

SyntaxIppStatus ippiDeinterlaceFilterCAVT_8u_C1R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst,
int dstStep, Ipp16u threshold, IppiSize roiSize);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source image ROI.

srcStep

Distance in bytes between starts of consecutive lines in the source
image.

pDst

Pointer to the destination image ROI.

dstStep

Distance in bytes between starts of consecutive lines in the destination
image.

thresholdThreshold level value.

roiSize

Size of the source and destination image ROI.

Description
This function operates with ROI (see Regions of Interest in Intel IPP). This function performs deinterlacing ofa two-field image, pointed to by pSrc, using content adaptive vertical temporal (CAVT) filtering.
The field pointed to by pSrc is copied to pDst, while the other field in the destination image, pointed to by
pDst+dstStep, is the interpolated one. Note that you can set the pointers to the bottom left corner of theimages and use negative steps to have the bottom field unchanged and the top one interpolated.
The threshold parameter is the edge detection threshold with the valid range [0-2041] regulating theprobability of temporal interpolation: 0 means that all the pixels are interpolated only spatially, from thevertically neighbouring pixels of the copied field, 2041 - that combined spatial-temporal interpolation,
involving the pixels from the modified field as well, is applied to all the pixels.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error condition if roiSize.width is less than or equal to0, or roiSize.height is odd or less than 8.

MedianCreates an image consisting of median values of threesource images.

1243

1

Intel® Integrated Performance Primitives Developer Guide and Reference

SyntaxIppStatus ippiMedian_8u_P3C1R(const Ipp8u* pSrc[3], int srcStep, Ipp8u* pDst, int
dstStep, IppiSize size);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Array of pointers to the ROI in each plane of the source image.

srcStep

Distance in bytes between starts of consecutive lines in each plane of
the source image.

pDst

Pointer to the destination image ROI.

dstStep

Distance in bytes between starts of consecutive lines in the destination
image.

size

Size of the source and destination image ROI.

Description
This function operates with ROI (see Regions of Interest in Intel IPP). This function sets each pixel in thedestination image ROI as the median value of correspondent pixels in the each plane of the source image.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error condition if size has a field with zero or negativevalue.

Image Linear Transforms
This chapter describes the Intel® IPP image processing functions that perform linear transform operations on
an image buffer.
These operations include Fast Fourier Transform (FFT), Discrete Fourier Transform (DFT), and Discrete Cosine
Transform (DCT).
To speed up performance, linear transform functions use precomputed auxiliary data that is needed forcomputation of the transforms (that is, tables of twiddle factors for FFT functions). This data is calculated by
the respective initialization functions and passed to the transform functions in context structures specific foreach type of transform.
Intel IPP linear transform functions can use external work buffers for storing data and intermediate results,
which eliminates the need to allocate and free internal memory buffers and thus helps to further increasefunction performance. To determine the required work buffer size, use one of the respective support
functions specific for each transform type. In case when no external buffer is specified, the transformfunctions handle memory allocation internally.
All Intel IPP linear transform functions except DCT of 8x8 size work on images with floating-point data only.

1244

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Fourier Transforms
Intel IPP functions that compute FFT and DFT can process both real and complex images. Function flavors
operating on real data are distinguished by R suffix present in function-specific modifier of their full name,whereas complex flavors' names include C suffix (see Function Naming).
The results of computing the Fourier transform can be normalized by specifying the appropriate value offlag argument for context initialization. This parameter sets up a pair of matched normalization factors to be
used in forward and inverse transforms as listed in the following table:
Normalization Factors for Fourier Transform Results
Normalization Factors

Value of flag Argument

IPP_FFT_DIV_FWD_BY_N
IPP_FFT_DIV_INV_BY_N
IPP_FFT_DIV_BY_SQRTN
IPP_FFT_NODIV_BY_ANY

Forward Transform

Inverse Transform

1/MN
1
1/sqrt(MN)
1

1
1/MN
1/sqrt(MN)
1

In this table, N and M denote the length of Fourier transform in the x- and y-directions, respectively (or,equivalently, the number of columns and rows in the 2D array being transformed).
For the FFT, these lengths must be integer powers of 2, that is N=2orderX, M=2orderY, where power
exponentsare known as order of FFT.
For the DFT, N and M can take on arbitrary integer non-negative values.

Real - Complex Packed (RCPack2D) Format
The forward Fourier transform of a real two-dimensional image data yields a matrix of complex results which
has conjugate-symmetric properties. Intel IPP functions use packed format RCPack2D for storing andretrieving data of this type. Accordingly, real flavors of the inverse Fourier transform functions convert
packed complex conjugate-symmetric data back to its real origin. The RCPack2D format exploits the complex
conjugate symmetry of the transformed data to store only a half of the resulting Fourier coefficients. For the
N by M transform, the respective FFT and DFT functions actually store real and imaginary parts of thecomplex Fourier coefficients A(i,j) for i = 0,...,M-1; j = 0,... N/2 in a single real array ofdimensions (N, M). The RCPack2D storage format is slightly different for odd and even M and is arranged inaccordance with the following tables:
RCPack2D Storage for Odd Number of Rows

Re A(0,0)Re A(0,1)

Im A(0,1)...

Re A(0,(N-1)/2)

Im A(0,(N-1)/2)

Re
A(0,N/2)

Re A(1,0)

Re A(1,1)

Im A(1,1)...

Im A(1,0)

Re A(2,1)

Im A(2,1)...

...
Re A(M/
2,0)
Im A(M/
2,0)

...
Re
A(M-2,1)
Re
A(M-1,1)...
Im
A(M-2,1)
Im
A(M-1,1)...
...

Re A(1,(N-1)/2)
Re A(2,(N-1)/2)...
Re A(M-2,(N-1)/2)
Re A(M-1,(N-1)/2)

Im A(1,(N-1)/2)
Im A(2,(N-1)/2)...
Im A(M-2,(N-1)/2)
Im A(M-1,(N-1)/2)

Re
A(1,N/2)
Im
A(1,N/2)...
Re
A(M/2,N/2)
Im
A(M/2,N/2)...

RCPack2D Storage for Even Number of Rows

Re A(0,0)Re A(0,1)

Im A(0,1)...

Re A(0,(N-1)/2)

Im A(0,(N-1)/2)

Re
A(0,N/2)

Re A(1,0)

Re A(1,1)

Im A(1,1)...

Im A(1,0)

Re A(2,1)

Im A(2,1)...

Re A(1,(N-1)/2)
Re A(2,(N-1)/2)

Im A(1,(N-1)/2)
Im A(2,(N-1)/2)

Re
A(1,N/2)
Im
A(1,N/2)1245

1Intel® Integrated Performance Primitives Developer Guide and Reference

Re A(0,0)Re A(0,1)

Im A(0,1)...

Re A(0,(N-1)/2)

Im A(0,(N-1)/2)

Re
A(0,N/2)...
Re A(M/
2-1,0)Im A(M/
2-1,0)Re A(M/
2,0)

...
Re
A(M-3,1)
Re
A(M-2,1)
Re
A(M-1,1)...
Im
A(M-3,1)
Im
A(M-2,1)
Im
A(M-1,1)

...
...

...
Re A(M-3,(N-1)/2)
Re A(M-2,(N-1)/2)
Re A(M-1,(N-1)/2)...
Im A(M-3,(N-1)/2)
Im A(M-2,(N-1)/2)
Im A(M-1,(N-1)/2)...
Re A(M/
2-1,N/2)
Im A(M/
2-1,N/2)
Re
A(M/2,N/2)

...
...

The shaded columns to the right side of the tables indicate values for even N only.
Note the above tables show the arrangement of coefficients for one channel. For multichannel images thechannel coefficients are clustered and stored consecutively, for example, for 3-channel image they are stored
in the following way: C1-ReA(0,0); C2-Re A(0,0); C3-ReA(0,0); C1-ReA(0,1); C2-ReA(0,1); C3ReA(0,1); C1-ImA(0,1); C2-ImA(0,1); ...
The remaining Fourier coefficients are obtained using the following relationships based on conjugatesymmetric properties:

A(i,j) = conj(A(M-i,N-j)), i = 1,..., M-1; j = 1,..., N-1
A(0,j) = conj(A(0,N-j)), j = 1,..., N-1
A(i,0) = conj(A(M-i,0)), i = 1,..., M-1

FFTGetSize
Computes the size of the FFT context structure andthe size of the work buffer.

SyntaxIppStatus ippiFFTGetSize_R_32f (int orderX, int orderY, int flag, IppHintAlgorithm
hint, int* pSizeSpec, int* pSizeInit, int* pSizeBuf);
IppStatus ippiFFTGetSize_C_32fc (int orderX, int orderY, int flag, IppHintAlgorithm
hint, int* pSizeSpec, int* pSizeInit, int* pSizeBuf);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

ParametersorderX, orderY

Order of the FFT in x- and y- directions, respectively.

flag

Flag to choose the option for results normalization.

hint

This parameter is deprecated. Set the value to ippAlgHintNone.

pSizeSpec

Pointer to the size of the FFT context structure.

pSizeInit

Pointer to the size of the buffer for the FFT initialization function.

pSizeBuf

Pointer to the size of the FFT external work buffer.

1246

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Description
This function computes the following:•••

Size of the FFT context structure. The result in bytes is stored in the pSpecSize parameter.
Size of the work buffer for the ippiFFTInit functions. The result in bytes is stored in the pSizeInit
parameter.
Size of the work buffer for the ippiFFTFwd and ippiFFTInv functions. The result in bytes is stored in thepSizeBuf parameter.

The suffix after the function name indicates the flavors of the FFT functions: ippiFFTGetSize_C is forcomplex flavors and ippiFFTGetSize_R is for real flavors.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsFftOrderErr

Indicates an error condition when the FFT order value is illegal.

ippStsFFTFlagErr

Indicates an error condition when the flag value is illegal.

See Also
Initializes the context structure for the image FFT functions.
FFTInv Applies an inverse FFT to complex source data and stores results in a destination image.
FFTFwd Applies forward Fast Fourier Transform to an image.

FFTInitFFTInit
Initializes the context structure for the image FFTfunctions.

SyntaxIppStatus ippiFFTInit_R_32f (int orderX, int orderY, int flag, IppHintAlgorithm hint,
IppiFFTSpec_R_32f* pFFTSpec, Ipp8u* pMemInit);
IppStatus ippiFFTInit_C_32fc (int orderX, int orderY, int flag, IppHintAlgorithm hint,
IppiFFTSpec_C_32fc* pFFTSpec, Ipp8u* pMemInit);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

ParametersorderX, orderY

Order of the FFT in x- and y- directions, respectively.

flag

Flag to choose the option for results normalization.

hint

This parameter is deprecated. Set the value to ippAlgHintNone.

pFFTSpec

Pointer to the FFT context structure.

pMemInit

Pointer to the temporary work buffer.

1247

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Description
This function initializes the pFFTSpec context structure needed to compute the forward and inverse FFT of a
two-dimensional image data.
Before calling this function, you need to allocate memory for the FFT context structure and temporary work
buffer (if it is required). To compute the size of the FFT context structure and temporary work buffer, use theippiFFTGetSize function.
The pMemInit parameter can be NULL only if the work buffer is not used. After initialization is done, you canfree the temporary work buffer.
The ippiFFTFwd and ippiFFTInv functions called with the pointer to the initialized pFFTSpec structure,compute the fast Fourier transform with the following characteristics:•••

length N=2orderX in x-direction by M=2orderYin y-direction
results normalization mode as set by flag (see Table “Normalization Factors for Fourier Transform
Results”)
computation algorithm indicated by hint.

The suffix after the function name indicates the type of the context structure to be initialized:

ippiFFTInit_C is for the complex FFT context structure and ippiFFTInit_R is for the real FFT context
structure.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsFftOrderErr

Indicates an error condition when the FFT order value is illegal.

ippStsFFTFlagErr

Indicates an error condition when the flag value is illegal.

ExampleThe code example below demonstrates how to use the ippiFFTGetSize and ippiFFTInit functions.

/// get sizes for required buffers
ippiFFTGetSize_R_32f( orderX, orderY, IPP_FFT_DIV_INV_BY_N, ippAlgHintNone, &sizeSpec,&sizeInit, &sizeBuffer );/// allocate memory for required buffers
pMemSpec = (IppiFFTSpec_R_32f*) ippMalloc ( sizeSpec );if ( sizeInit > 0 ){pMemInit = ippMalloc ( sizeInit );}if ( sizeBuffer > 0 ){pMemBuffer = ippMalloc ( sizeBuffer );}/// initialize FFT specification structureippiFFTInit_R_32f( orderX, orderY, IPP_FFT_DIV_INV_BY_N, ippAlgHintNone, pMemSpec,
pMemInit );/// free initialization bufferif ( sizeInit > 0 )1248

Developer Guide and Reference for Intel® Integrated Performance Primitives

1{
ippFree( pMemInit );}/// perform forward FFT to put source data to frequency domain
ippiFFTFwd_RToPack_32f_C1R( pSrc, srcStep, pDst, dstStep, pMemSpec, pMemBuffer );/// ...
/// free buffers
if ( sizeBuffer > 0 ){ippFree( pMemBuffer );}ippFree( pMemSpec );See Also
FFTGetSize Computes the size of the FFT context structure and the size of the work buffer.
FFTInv Applies an inverse FFT to complex source data and stores results in a destination image.
FFTFwd Applies forward Fast Fourier Transform to an image.

FFTFwdApplies forward Fast Fourier Transform to an image.

SyntaxCase 1: Not-in-place operation on floating-point data
IppStatus ippiFFTFwd_RToPack_<mod> (const Ipp32f* pSrc, int srcStep, Ipp32f* pDst, int
dstStep, const IppiFFTSpec_R_32f* pFFTSpec, Ipp8u* pBuffer);
Supported values for mod:32f_C1R
32f_C3R
32f_C4R
32f_AC4R

Case 2: Not-in-place operation on complex data
IppStatus ippiFFTFwd_CToC_32fc_C1R(const Ipp32fc* pSrc, int srcStep, Ipp32fc* pDst, int
dstStep, const IppiFFTSpec_C_32fc* pFFTSpec, Ipp8u* pBuffer);

Case 3: In-place operation on floating-point data
IppStatus ippiFFTFwd_RToPack_<mod>(Ipp32f* pSrcDst, int srcDstStep, const
IppiFFTSpec_R_32f* pFFTSpec, Ipp8u* pBuffer);
Supported values for mod:32f_C1IR
32f_C3IR
32f_C4IR

1249

1Intel® Integrated Performance Primitives Developer Guide and Reference

32f_AC4IR

Case 4: In-place operation on complex data
IppStatus ippiFFTFwd_CToC_32fc_C1IR(Ipp32fc* pSrcDst, int srcDstStep, const
IppiFFTSpec_C_32fc* pFFTSpec, Ipp8u* pBuffer);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc
srcStep
pDst

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the destination image ROI.

pFFTSpec

Distance in bytes between starts of consecutive lines in thedestination image.
Pointer to the source and destination image ROI for the inplace operation.
Distance in bytes between starts of consecutive lines in thesource and destination image for the in-place operation.
Pointer to the FFT specification structure.

pBuffer

Pointer to the external work buffer.

dstStep
pSrcDstsrcDstStep

Description
This function operates with ROI.
This function performs a forward FFT on each channel of the source image ROI pSrc (pSrcDst for in-placeflavors) and writes the Fourier coefficients into the corresponding channel of the destination buffer pDst
(pSrcDst for in-place flavors). The size of ROI is N x M, it is specified by the parameters orderX, orderY.
The function flavor ippiFFTFwd_RToPack that operates on images with real data takes advantage of thesymmetry property and stores the output data in RCPack2D format. It supports processing of the 1-, 3-, and4-channel images. Note that the functions with AC4 descriptor do not process alpha channel.
The function flavor ippiFFTFwd_CToC that operates on images with complex data does not perform any
packing of the transform results as no symmetry with respect to frequency domain data is observed in thiscase. Memory layout of images with complex data follows the same conventions as for real images provided
that each pixel value consists of two numbers: imaginary and real part.
Before using the forward FFT functions, you need to compute the size of the work buffer by ippiFFTGetSize
and initialize the context structure by the ippiFFTInit function. The forward FFT functions use thepFFTSpec context structure to set the mode of calculations and retrieve support data.

1250

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsStepErr
ippStsContextMatchErr
ippStsMemAllocErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pSrc, pDst, or pFFTSpec pointeris NULL.
Indicates an error condition if srcStep or dstStep value iszero or negative.
Indicates an error condition if a pointer to an invalid pFFTSpec
structure is passed.
Indicates an error condition if memory allocation fails.

ExampleFFTFwd_CToC:
FFTFwd_RToPack:

See Also
Regions of Interest in Intel IPP
FFTGetSize Computes the size of the FFT context structure and the size of the work buffer.
FFTInit Initializes the context structure for the image FFT functions.
FFTInv
Applies an inverse FFT to complex source data andstores results in a destination image.

SyntaxCase 1: Not-in-place operation on floating-point data
IppStatus ippiFFTInv_PackToR_<mod>(const Ipp32f* pSrc, int srcStep, Ipp32f* pDst, int
dstStep, const IppiFFTSpec_R_32f* pFFTSpec, Ipp8u* pBuffer);
Supported values for mod:32f_C1R
32f_C3R
32f_C4R
32f_AC4R

Case 2: Not-in-place operation on complex data
IppStatus ippiFFTInv_CToC_32fc_C1R(const Ipp32fc* pSrc, int srcStep, Ipp32fc* pDst, int
dstStep, const IppiFFTSpec_C_32fc* pFFTSpec, Ipp8u* pBuffer);

1251

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Case 3: In-place operation on floating-point data
IppStatus ippiFFTInv_PackToR_<mod>(Ipp32f* pSrcDst, int srcDstStep, const
IppiFFTSpec_R_32f* pFFTSpec, Ipp8u* pBuffer);
Supported values for mod:32f_C1IR
32f_C3IR
32f_C4IR
32f_AC4IR

Case 4: In-place operation on complex data
IppStatus ippiFFTInv_CToC_32fc_C1IR(Ipp32fc* pSrcDst, int srcDstStep, const
IppiFFTSpec_C_32fc* pFFTSpec, Ipp8u* pBuffer);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc
srcStep
pDst

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the destination image ROI.

pFFTSpec

Distance in bytes between starts of consecutive lines in thedestination image.
Pointer to the source and destination image ROI for the inplace operation.
Distance in bytes between starts of consecutive lines in thesource and destination image for the in-place operation.
Pointer to the previously initialized FFT context structure.

pBuffer

Pointer to the external work buffer.

dstStep
pSrcDstsrcDstStep

Description
This function operates with ROI.
This function performs an inverse FFT on each channel of the source image pSrc (pSrcDst for in-placeflavors) and writes the restored image data into the corresponding channel of the destination image buffer
pDst ( pSrcDst for in-place flavors). The size of ROI is N x M, it is specified by the parameters orderX,orderY.
For the ippiFFTInv_PackToR, function flavor, the input buffer must contain data in RCPack2D format.

1252

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Before using the inverse FFT functions, you need to compute the size of the work buffer by ippiFFTGetSize
and initialize the context structure by the ippiFFTInit function. The inverse FFT functions use thepFFTSpec context structure to set the mode of calculations and retrieve support data.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsStepErr
ippStsContextMatchErr
ippStsMemAllocErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pSrc, pDst, or pFFTSpec
pointer is NULL.
Indicates an error condition if srcStep or dstStep value iszero or negative.
Indicates an error condition if a pointer to an invalid pFFTSpec
structure is passed.
Indicates an error condition if memory allocation fails.

ExampleFFTInv_CToC:
FFTInv_RToPack:

See Also
Regions of Interest in Intel IPP
FFTGetSize Computes the size of the FFT context structure and the size of the work buffer.
FFTInit Initializes the context structure for the image FFT functions.
DFTGetSize
Computes the size of the FFT context structure andthe size of the work buffer.

SyntaxIppStatus ippiDFTGetSize_R_32f (IppiSize roiSize, int flag, IppHintAlgorithm hint, int*
pSizeSpec, int* pSizeInit, int* pSizeBuf);
IppStatus ippiDFTGetSize_C_32fc (IppiSize roiSize, int flag, IppHintAlgorithm hint,
int* pSizeSpec, int* pSizeInit, int* pSizeBuf);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
roiSize
flag

Size of the source and destination ROI in pixels.
Flag to choose the option for results normalization. For more
information, see Table "Normalization Factors for Fourier
Transform Results"

1253

1

Intel® Integrated Performance Primitives Developer Guide and Reference

hintThis parameter is deprecated. Set the value to ippAlgHintNone.

pSizeSpec

Pointer to the size of the DFT context structure.

pSizeInit

Pointer to the size of the buffer for the DFT initialization function.

pSizeBuf

Pointer to the size of the DFT external work buffer.

Description
This function computes the following:•••

Size of the DFT context structure. The result in bytes is stored in the pSpecSize parameter.
Size of the work buffer for the ippiDFTInit functions. The result, in bytes, is stored in the pSizeInit
parameter.
Size of the work buffer for the ippiDFTFwd and ippiDFTInv functions. The result, in bytes, is stored in
the pSizeBuf parameter.

The suffix after the function name indicates the flavors of the DFT functions: ippiDFTGetSize_C is forcomplex flavors and ippiDFTGetSize_R is for real flavors.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsFftFlagErr

Indicates an error condition when the flag value is illegal.

ippStsFftOrderErr

ippStsSizeErr

Indicates an error when the amount of memory needed tocompute the DFT for points in the ROI of size roiSize exceeds
the limit.
Indicates an error condition when the roiSize has a field witha zero or negative value.

See Also
DFTInit Initializes the context structure for the image DFT functions.
DFTInit
Initializes the context structure for the image DFT
functions.

SyntaxIppStatus ippiDFTInit_R_32f (IppiSize roiSize, int flag, IppHintAlgorithm hint,
IppiDFTSpec_R_32f* pDFTSpec, Ipp8u* pMemInit);
IppStatus ippiDFTInit_C_32fc (IppiSize roiSize, int flag, IppHintAlgorithm hint,
IppiDFTSpec_C_32fc* pDFTSpec, Ipp8u* pMemInit);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

1254

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Parameters
roiSize

Size of the source and destination ROI in pixels.

flag

Flag to choose the option for results normalization.

hint

This parameter is deprecated. Set the value to ippAlgHintNone.

pDFTSpec

Pointer to the DFT context structure.

pMemInit

Pointer to the temporary work buffer.

Description
This function initializes the pDFTSpec context structure needed to compute the forward and inverse DFT of a
two-dimensional image data.
Before calling this function, you need to allocate memory for the FFT context structure and temporary work
buffer (if it is required). To compute the size of the FFT context structure and temporary work buffer, use theippiDFTGetSize function.
The pMemInit parameter can be NULL only if the work buffer is not used. After initialization is done, you canfree the temporary work buffer.
The ippiDFTFwd and ippiDFTInv functions called with the pointer to the initialized pDFTSpec structure
compute the discrete Fourier transform with the following characteristics:•••

ROI of the roiSize size
results normalization mode set by flag (see Table “Normalization Factors for Fourier Transform Results”)
computation algorithm indicated by hint.

The suffix after the function name indicates the type of the context structure to be initialized:
ippiDFTInit_C is for the complex DFT context structure and ippiDFTInit_R is for the real DFT context
structure.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsFftFlagErr

Indicates an error condition when the flag value is illegal.

ippStsFftOrderErr

ippStsSizeErr

Indicates an error when the amount of memory needed tocompute the DFT for points in the ROI of size roiSize exceeds
the limit.
Indicates an error condition when the roiSize has a field witha zero or negative value.

ExampleThe code example below demonstrates how to use the ippiDFTGetSize and ippiDFTInit functions.

/// get sizes for required buffers
ippiDFTGetSize_R_32f( roiSize, IPP_FFT_DIV_INV_BY_N, ippAlgHintNone, &sizeSpec, &sizeInit,&sizeBuffer );/// allocate memory for required buffers
pMemSpec = (IppiDFTSpec_R_32f*) ippMalloc ( sizeSpec );if ( sizeInit > 0 )
{
1255

1

Intel® Integrated Performance Primitives Developer Guide and Reference

pMemInit = ippMalloc ( sizeInit );}if ( sizeBuffer > 0 ){pMemBuffer = ippMalloc ( sizeBuffer );}/// initialize DFT specification structure
ippiDFTInit_R_32f( roiSize, IPP_FFT_DIV_INV_BY_N, ippAlgHintNone, pMemSpec, pMemInit );/// free initialization bufferif ( sizeInit > 0 ){ippFree( pMemInit );}/// perform forward DFT to put source data to frequency domain
ippiDFTFwd_RToPack_32f_C1R( pSrc, srcStep, pDst, dstStep, pMemSpec, pMemBuffer );/// ...
/// free buffers
if ( sizeBuffer > 0 ){ippFree( pMemBuffer );}ippFree( pMemSpec );See Also
Regions of Interest in Intel IPP
DFTGetSize Computes the size of the FFT context structure and the size of the work buffer.
DFTFwd Applies forward discrete Fourier transform to an image.
DFTInv Applies an inverse DFT to complex source data and stores results in a destination image.
DFTFwdApplies forward discrete Fourier transform to an
image.

SyntaxCase 1: Not-in-place operation on floating-point data
IppStatus ippiDFTFwd_RToPack_<mod>(const Ipp32f* pSrc, int srcStep, Ipp32f* pDst, int
dstStep, const IppiDFTSpec_R_32f* pDFTSpec, Ipp8u* pBuffer);
Supported values for mod:32f_C1R
32f_C3R
32f_C4R
32f_AC4R

1256

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Case 2: Not-in-place operation on complex data
IppStatus ippiDFTFwd_CToC_32fc_C1R(const Ipp32fc* pSrc, int srcStep, Ipp32fc* pDst, int
dstStep, const IppiDFTSpec_C_32fc* pDFTSpec, Ipp8u* pBuffer);

Case 3: In-place operation on floating-point data
IppStatus ippiDFTFwd_RToPack_<mod>(Ipp32f* pSrcDst, int srcDstStep, const
IppiDFTSpec_R_32f* pDFTSpec, Ipp8u* pBuffer);
Supported values for mod:32f_C1IR
32f_C3IR
32f_C4IR
32f_AC4IR

Case 4: In-place operation on complex data
IppStatus ippiDFTFwd_CToC_32fc_C1IR(Ipp32fc* pSrcDst, int srcDstStep, const
IppiDFTSpec_C_32fc* pDFTSpec, Ipp8u* pBuffer);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc
srcStep
pDst

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the destination image ROI.

pDFTSpec

Distance in bytes between starts of consecutive lines in thedestination image.
Pointer to the source and destination image ROI for the inplace operation.
Distance in bytes between starts of consecutive lines in thesource and destination image for the in-place operation.
Pointer to the previously initialized DFT context structure.

pBuffer

Pointer to the external work buffer.

dstStep
pSrcDstsrcDstStep

Description
This function operates with ROI.
This function performs a forward DFT on each channel of the source image ROI pSrc (pSrcDst for in-placeflavors) and writes the Fourier coefficients into the corresponding channel of the destination buffer pDst
(pSrcDst for in-place flavors).

1257

1

Intel® Integrated Performance Primitives Developer Guide and Reference

The function flavor ippiDFTFwd_RToPack that operates on images with real data takes advantage of thesymmetry property and stores the output data in RCPack2D format. It supports processing of the 1-, 3-, and4-channel images. Note that the functions with AC4 descriptor do not process alpha channel.
The function flavor ippiDFTFwd_CToC that operates on images with complex data performs no packing of
the transform results as no symmetry with respect to frequency domain data is observed in this case.
Memory layout of images with complex data follows the same conventions as for real images provided thateach pixel value consists of two numbers: imaginary and real part.
Before using the forward DFT functions, you need to compute the size of the work buffer by

ippiDFTGetSize and initialize the context structure by the ippiDFTInit function. The forward DFT
functions use the pDFTSpec context structure to set the mode of calculations and retrieve support data.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsStepErr
ippStsContextMatchErr
ippStsMemAllocErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pSrc, pDst, or pDFTSpec
pointer is NULL.
Indicates an error condition if srcStep or dstStep value iszero or negative.
Indicates an error condition if a pointer to an invalid pDFTSpec
structure is passed.
Indicates an error condition if memory allocation fails.

See Also
Regions of Interest in Intel IPP
DFTGetSize Computes the size of the FFT context structure and the size of the work buffer.
DFTInit Initializes the context structure for the image DFT functions.
DFTInv
Applies an inverse DFT to complex source data andstores results in a destination image.

SyntaxCase 1: Not-in-place operation on floating-point data
IppStatus ippiDFTInv_PackToR_<mod>(const Ipp32f* pSrc, int srcStep, Ipp32f* pDst, int
dstStep, const IppiDFTSpec_R_32f* pDFTSpec, Ipp8u* pBuffer);
Supported values for mod:32f_C1R
32f_C3R
32f_C4R
32f_AC4R

Case 2: Not-in-place operation on complex data
IppStatus ippiDFTInv_CToC_32fc_C1R(const Ipp32fc* pSrc, int srcStep, Ipp32fc* pDst, int
dstStep, const IppiDFTSpec_C_32fc* pDFTSpec, Ipp8u* pBuffer);

1258

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Case 3: In-place operation on floating-point data
IppStatus ippiDFTInv_PackToR_<mod>(Ipp32f* pSrcDst, int srcDstStep, const
IppiDFTSpec_R_32f* pDFTSpec, Ipp8u* pBuffer);
Supported values for mod:32f_C1IR
32f_C3IR
32f_C4IR
32f_AC4IR

Case 5: In-place operation on complex data
IppStatus ippiDFTInv_CToC_32fc_C1IR(Ipp32fc* pSrcDst, int srcDstStep, const
IppiDFTSpec_C_32fc* pDFTSpec, Ipp8u* pBuffer);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc
srcStep
pDst

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the destination image ROI.

pDFTSpec

Distance in bytes between starts of consecutive lines in thedestination image.
Pointer to the source and destination image ROI for the inplace operation.
Distance in bytes between starts of consecutive lines in thesource and destination image for the in-place operation.
Pointer to the previously initialized DFT context structure.

pBuffer

Pointer to the external work buffer.

dstStep
pSrcDstsrcDstStep

Description
This function operates with ROI.
This function performs an inverse DFT on each channel of the input buffer pSrc (pSrcDst for in-placeflavors) and writes the restored image data into the corresponding channel of the output image buffer pDst
(pSrcDst for in-place flavors).
For function flavor ippiDFTInv_PackToR, the input buffer must contain data in RCPack2D format.

1259

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Before using the inverse DFT functions, you need to compute the size of the work buffer by ippiDFTGetSize
and initialize the context structure by the ippiDFTInit function. The inverse DFT functions use thepDFTSpec context structure to set the mode of calculations and retrieve support data.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsStepErr
ippStsContextMatchErr
ippStsMemAllocErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pSrc, pDst, or pDFTSpec
pointer is NULL.
Indicates an error condition if srcStep or dstStep value iszero or negative.
Indicates an error condition if a pointer to an invalid pDFTSpec
structure is passed.
Indicates an error condition if memory allocation fails.

See Also
Regions of Interest in Intel IPP
DFTGetSize Computes the size of the FFT context structure and the size of the work buffer.
DFTInit Initializes the context structure for the image DFT functions.
MulPack
Multiplies two source images in packed format.

SyntaxIppStatus ippiMulPack_<mod>(const Ipp32f* pSrc1, int src1Step, const Ipp32f* pSrc2, int
src2Step, Ipp32f* pDst, int dstStep, IppiSize roiSize);
Supported values for mod:32f_C1R
32f_C3R
32f_C4R
32f_AC4R
IppStatus ippiMulPack_<mod>(const Ipp32f* pSrc, int srcStep, Ipp32f* pSrcDst, int
srcDstStep, IppiSize roiSize);
Supported values for mod:32f_C1IR
32f_C3IR
32f_C4IR
32f_AC4IR

Include Files
ippi.h1260

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc1, pSrc2

Pointer to the ROI in the source images.

src1Step, src2Step

Distance in bytes between starts of consecutive lines in thesource images.
Pointer to the destination image ROI.

pDst
dstStep
pSrc

Distance in bytes between starts of consecutive lines in thedestination image.
Pointer to the first source image ROI for the in-place operation.

roiSize

Distance in bytes between starts of consecutive lines in the firstsource image for the in-place operation.
Pointer to the second source and destination image ROI for thein-place operation.
Distance in bytes between starts of consecutive lines in thesource and destination image for the in-place operation.
Size of the source and destination ROI in pixels.

scaleFactor

Scale factor (see Integer Result Scaling).

srcStep
pSrcDstsrcDstStep

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function multiplies corresponding pixel values of two source images, A and B represented in RCPack2D
format and stores the result into the destination image C in packed format also. The multiplying is performed
according to the following formulas:
ReC = ReA*ReB - ImA*ImB;ImC = ImA*ReB + ImB*ReA.
Not-in-place flavors multiply pixel values of ROI in the source images pSrc1 and pSrc2, and store result in
the pDst.
In-place flavors multiply pixel values of ROI in the source images pSrc and pSrcDst, and store result in thepSrcDst.
This function can be used in image filtering operations that include FFT transforms.

ExampleReturn Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if any of the specified pointers is
NULL.
Indicates an error condition if roiSize has a field with zero or
negative value.

1261

1

Intel® Integrated Performance Primitives Developer Guide and ReferenceippStsStepErr

Indicates an error condition if any of the specified buffer step
values is zero or negative.

MulPackConj
Multiplies a source image by the complex conjugate
image with data in packed format and stores theresult in the destination buffer in the packed format.

SyntaxCase 1: Not-in-place operation
IppStatus ippiMulPackConj_<mod>(const Ipp32f* pSrc1, int src1Step, const Ipp32f* pSrc2,
int src2Step,Ipp32f* pDst, int dstStep, IppiSize roiSize);
Supported values for mod:32f_C1R
32f_C3R
32f_C4R
32f_AC4R

Case 2: In-place operation
IppStatus ippiMulPackConj_<mod>(const Ipp32f* pSrc, int srcStep, Ipp32f* pSrcDst, int
srcDstStep, IppiSize roiSize);
Supported values for mod:32f_C1IR
32f_C3IR
32f_C4IR
32f_AC4IR

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc1, pSrc2

Pointer to the ROI in the source images.

src1Step, src2Step

Distance in bytes between starts of consecutive lines in thesource images.
Pointer to the destination image ROI.

pDst
dstStep

1262

Distance in bytes between starts of consecutive lines in thedestination image.

Developer Guide and Reference for Intel® Integrated Performance Primitives

pSrc
srcStep
pSrcDstsrcDstStep
roiSize

1

Pointer to the first source image ROI for the in-place operation.
Distance in bytes between starts of consecutive lines in the firstsource image for the in-place operation.
Pointer to the second source and destination image ROI for thein-place operation.
Distance in bytes between starts of consecutive lines in thesource and destination image for the in-place operation.
Size of the source and destination ROI in pixels.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This functionmultiplies pixel values of the source image A by the corresponding pixel values of the complex
conjugate image A*, represented in RCPack2D format. The result of the operation is written into thedestination buffer in packed format also.
Not-in-place flavors multiply pixel values of ROI in the source images pSrc1 and pSrc2, and store result in
the pDst.
In-place flavors multiply pixel values of ROI in the source images pSrc and pSrcDst, and store result in thepSrcDst.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsStepErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if any of the specified pointers is
NULL.
Indicates an error condition if roiSize has a field with zero or
negative value.
Indicates an error condition if any of the specified buffer step
values is zero or negative.

Magnitude
Computes magnitude of elements of a complex data
image.

SyntaxIppStatus ippiMagnitude_<mod>(const Ipp<srcDatatype>* pSrc, int srcStep,
Ipp<dstDatatype>* pDst, int dstStep, IppiSize roiSize);
Supported values for mod:32fc32f_C1R 32fc32f_C3R

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

1263

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Parameters
pSrc
srcStep
pDst
dstStep
roiSize

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the destination image ROI.
Distance in bytes between starts of consecutive lines in thedestination image.
Size of the source and destination ROI in pixels.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function computes magnitude of elements of the source image pSrc given in complex data format, andstores results in the destination image pDst.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsStepErr
ippStsSizeErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pSrc or pDst pointer is NULL.
Indicates an error condition if srcStep or dstStep value is zeroor negative.
Indicates an error condition if width or height of images is lessthan or equal to zero.

MagnitudePackGetBufferSize
Computes the size of the work buffer for theippiMagnitudePack function.

SyntaxIppStatus ippiMagnitudePackGetBufferSize_32f (int numChannels, IppiSize dstRoiSize,int* pSize);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
numChannels

Number of channels in the image. Possible values are 1 and 3.

dstRoiSize

Size, in pixels, of the destination image ROI.

pSize

Pointer to the computed size of the external work buffer, in bytes.

1264

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Description
The ippiMagnitudePackGetBufferSize function computes the size, in bytes, of the external work buffer
needed for the ippiMagnitudePack function. The result is stored in the pSize parameter.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSize is NULL.

ippStsSizeErr

Indicates an error when dstRoiSize has a field with a valueless than 1.

ippStsNumChannelsErr

Indicates an error when numChannels has an illegal value.

See Also
MagnitudePack MODIFIED API. Computes magnitude of elements of an image in packed format.
MagnitudePack
MODIFIED API. Computes magnitude of elements ofan image in packed format.

SyntaxIppStatus ippiMagnitudePack_<mod>(const Ipp<datatype>* pSrc, int srcStep,
Ipp<datatype>* pDst, int dstStep, IppiSize dstRoiSize, Ipp8u* pBuffer);
Supported values for mod:32f_C1R

32f_C3R

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc
srcStep
pDst
dstStep
dstRoiSize
pBuffer

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the destination image ROI.
Distance in bytes between starts of consecutive lines in thedestination image.
Size of the destination ROI in pixels.
Pointer to the work buffer. To compute the size of the buffer,
use the ippiMagnitudePackGetBufferSize function.

1265

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Description
Important The API of this function has been modified in Intel IPP 9.0 release.

This function operates with ROI (see Regions of Interest in Intel IPP).
This function computes magnitude of elements of the source image pSrc given in RCPack2D format andstores results in the destination image pDst.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsStepErr
ippStsSizeErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error when pSrc or pDst pointer is NULL.
Indicates an error when srcStep or dstStep value is zero or
negative.
Indicates an error when width or height of images is less than,or equal to zero.

See Also
MagnitudePackGetBufferSize Computes the size of the work buffer for the ippiMagnitudePackfunction.
Regions of Interest in Intel IPP
Real - Complex Packed (RCPack2D) Format
Phase
Computes the phase of elements of a complex data
image.

SyntaxIppStatus ippiPhase_<mod>(const Ipp<srcDatatype>* pSrc, int srcStep, Ipp<dstDatatype>*pDst, int dstStep, IppiSize roiSize);
Supported values for mod:32fc32f_C1R 32fc32f_C3R

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc
srcStep
pDst

1266

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the destination image ROI.

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

dstStep
roiSize

Distance in bytes between starts of consecutive lines in thedestination image.
Size of the source and destination ROI in pixels.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function computes the phase in radians of elements of a source image pSrc given in complex data
format, and stores results in the destination image pDst.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsStepErr
ippStsSizeErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pSrc or pDst pointer is NULL.
Indicates an error condition if srcStep or dstStep value is zeroor negative.
Indicates an error condition if width or height of images is lessthan or equal to zero.

PhasePackGetBufferSize
Computes the size of the work buffer for theippiPhasePack function.

SyntaxIppStatus ippiPhasePackGetBufferSize_32f (int numChannels, IppiSize dstRoiSize, int*
pSize);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
numChannels

Number of channels in the image. Possible values are 1 and 3.

dstRoiSize

Size, in pixels, of the destination image ROI.

pSize

Pointer to the computed size of the external work buffer, in bytes.

Description
The ippiPhasePackGetBufferSize function computes the size, in bytes, of the external work buffer
needed for the ippiPhasePack function. The result is stored in the pSize parameter.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSize is NULL.

1267

1

Intel® Integrated Performance Primitives Developer Guide and ReferenceippStsSizeErr

Indicates an error when dstRoiSize has a field with a valueless than 1.

ippStsNumChannelsErr

Indicates an error when numChannels has an illegal value.

See Also
PhasePack MODIFIED API. Computes the phase of elements of an image in packed format.
PhasePack
MODIFIED API. Computes the phase of elements of animage in packed format.

SyntaxIppStatus ippiPhasePack_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>*pDst, int dstStep, IppiSize dstRoiSize, Ipp8u* pBuffer);
Supported values for mod:32f_C1R

32f_C3R

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
Pointer to the source image ROI.

pSrc
srcStep
pDst
dstStep
dstRoiSize
pBuffer

Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the destination image ROI.
Distance in bytes between starts of consecutive lines in thedestination image.
Size of the destination ROI in pixels.
Pointer to the work buffer. To compute the size of the buffer,
use the PhasePackGetBufferSize function.

Description
Important The API of this function has been modified in Intel IPP 9.0 release.

This function operates with ROI (see Regions of Interest in Intel IPP).
This function computes the phase of elements of a source image pSrc given in RCPack2D format and storesthe results in the destination image pDst.

1268

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsStepErr
ippStsSizeErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error when pSrc or pDst pointer is NULL.
Indicates an error when srcStep or dstStep value is zero or
negative.
Indicates an error when width or height of images is less than,or equal to zero.

See Also
PhasePackGetBufferSize Computes the size of the work buffer for the ippiPhasePack function.
Regions of Interest in Intel IPP
Real - Complex Packed (RCPack2D) Format
PolarToCart
Converts an image in the polar coordinate form toCartesian coordinate form.

SyntaxIppStatus ippiPolarToCart_<mod>(const Ipp32f* pSrcMagn, const Ipp32f* pSrcPhase, int
srcStep, IppiSize roiSize, Ipp32fc* pDst, int dstStep);
Supported values for mod:32fc_C1R

32fc_C3R

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters

roiSize

Pointer to the buffer containing magnitudes of the source
image.
Pointer to the buffer containing phase values of the source
image.
Distance in bytes between starts of consecutive lines in thesource buffers.
Size of the source and destination image ROI.

pDst

Pointer to the destination image ROI.

dstStep

Distance in bytes between starts of consecutive lines in thedestination image buffer.

pSrcMagn
pSrcPhasesrcStep

Description
This function operates with ROI (see Regions of Interest in Intel IPP).

1269

1

Intel® Integrated Performance Primitives Developer Guide and ReferenceThis function converts the polar coordinate of the source image stored in the arrays of magnitudes pSrcMagnand phase values pSrcPhase to the destination image pDst in complex-data format (in Cartesian coordinateform).

Return Values
Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointers is
NULL.

ippStsNoErr
ippStsNullPtrErr

Indicates an error condition if srcStep or dstStep value iszero or negative.
Indicates an error condition if srcSize has a field with valueless than 1.

ippStsStepErr
ippStsSizeErr

ExampleThe code example below shows how to use the function ippiPolarToCart_32fc_C1R.

void func_polartocart() {Ipp32f pSrcMagn[2*2] = {1.0, 0.0, 2.1, 3.2};
Ipp32f pSrcPhase[2*2] = {0.0, 2.0, 1.6,-1.0};
Ipp32fc pDst[2*2] = {0};int srcStep = 2*sizeof(Ipp32f);
int dstStep = 2*sizeof(Ipp32fc);
IppiSize roiSize = {2, 2};
ippiPolarToCart_32fc_C1R(pSrcMagn, pSrcPhase, srcStep, roiSize, pDst, dstStep);}
Result:pDst - > (1.0, 0.0)

(0.0, 0.0)(-0.1, 2.1) (1.7, -2.7)

PackToCplxExtend
Converts an image in packed format to a complex
data image.

SyntaxIppStatus ippiPackToCplxExtend_32f32fc_C1R(const Ipp32f* pSrc, IppiSize srcSize, int
srcStep, Ipp32fc* pDst, int dstStep);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source image ROI.

srcSize

Size in pixels of the source image ROI.

1270

Developer Guide and Reference for Intel® Integrated Performance Primitives

srcStep
pDst
dstStep1

Distance in bytes between starts of consecutive lines in thesource buffer.
Pointer to the destination image buffer.
Distance in bytes between starts of consecutive lines in thedestination image buffer.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts the source image pSrc in RCPack2D format to complex data format and stores theresults in pDst, which is a matrix with complete set of the Fourier coefficients. Note that if the pSrc in
RCPack2D format is a real array of dimensions (NxM), then the pDst is a real array of dimensions (2xNxM).
This should be taken into account when allocating memory for the function operation.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsStepErr
ippStsSizeErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pSrc or pDst pointer is NULL.
Indicates an error condition if srcStep or dstStep value iszero or negative.
Indicates an error condition if srcSize has field with zero or
negative value.

CplxExtendToPack
Converts a complex data image to an image in packed
format.

SyntaxIppStatus ippiCplxExtendToPack_<mod>(const Ipp<srcDatatype>* pSrc, int srcStep,
IppiSize srcSize, Ipp<dstDatatype>* pDst, int dstStep);
Supported values for mod:32fc32f_C1R
32fc32f_C3R

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source image ROI.

srcSize

Size in pixels of the source image ROI.

1271

1

Intel® Integrated Performance Primitives Developer Guide and Reference

srcStep
pDst
dstStep

Distance in bytes between starts of consecutive lines in thesource buffer.
Pointer to the destination image buffer.
Distance in bytes between starts of consecutive lines in thedestination image buffer.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function converts the source image pSrc in complex data format to RCPack2D format and stores theresults in pDst, which is a real array of dimensions (NxM). The pSrc is a matrix with complete set of theFourier coefficients.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsStepErr
ippStsSizeErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pSrc or pDst pointer is NULL.
Indicates an error condition if srcStep or dstStep value iszero or negative.
Indicates an error condition if srcSize has field with zero or
negative value.

Windowing Functions
This section describes Intel IPP windowing functions used in image processing. A window is a mathematical
function by which pixel values are multiplied to prepare an image for the subsequent analysis. This procedure
is often called ‘windowing'. In fact, a window function approaches zero towards the edges of the image
avoiding strong distortions of spectral densities in the Fourier domain.
The Intel IPP provides two following types of window functions:••

Bartlett window function
Hamming window function

These functions generate the window samples and applied them to the specified image. To obtain the window
samples themselves, you should apply the desired function to the image with all pixel values set to 1.0. As
the windowing operation is very time consuming, it may be useful if you want to apply the same window to
the multiple images. In this case use one of the image multiplication functions (ippiMul) to multiply the
pixel values of the image by the window samples.

WinBartlettGetBufferSize, WinBartlettSepGetBufferSize,
Compute the size of the work buffer for theippiWinBartlett or ippiWinBartlettSep function.

SyntaxIppStatus ippiWinBartlettGetBufferSize (IppDataType dataType, IppiSize roiSize, int*
pSize);
IppStatus ippiWinBartlettSepGetBufferSize (IppDataType dataType, IppiSize roiSize, int*
pSize);

Include Files
ippi.h1272

1Developer Guide and Reference for Intel® Integrated Performance Primitives

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
Data type for the Bartlett window function. Possible values are:dataType

ipp8u, ipp16u, or ipp32f.

roiSizeSize, in pixels, of the image ROI.

pSize

Pointer to the computed size of the external work buffer, in bytes.

Description
The ippiWinBartlettGetBufferSize and ippiWinBartlettSepGetBufferSize functions compute thesize, in bytes, of the external work buffer needed for the ippiWinBartlett or ippiWinBartlettSep
function. The result is stored in the pSize parameter.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSize is NULL.

ippStsSizeErr

Indicates an error when roiSize has a field with a value lessthan 3.

ippStsNumChannelsErr

Indicates an error when dataType has an illegal value.

See Also
WinBartlett, WinBartlettSep MODIFIED API. Apply Bartlett window function to the image.
WinBartlett, WinBartlettSep
MODIFIED API. Apply Bartlett window function to theimage.

SyntaxCase 1: Not-in-place operation
IppStatus ippiWinBartlett_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>*pDst, int dstStep, IppiSize roiSize, Ipp8u* pBuffer);
Supported values for mod:8u_C1R

16u_C1R

32f_C1R

IppStatus ippiWinBartlettSep_<mod>(const Ipp<datatype>* pSrc, int srcStep,
Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, Ipp8u* pBuffer);
Supported values for mod:8u_C1R

16u_C1R

32f_C1R

1273

1Intel® Integrated Performance Primitives Developer Guide and Reference

Case 2: In-place operation
IppStatus ippiWinBartlett_<mod>(Ipp<datatype>* pSrcDst, int srcDstStep, IppiSize
roiSize, Ipp8u* pBuffer);
Supported values for mod:8u_C1IR

16u_C1IR

32f_C1IR

IppStatus ippiWinBartlettSep_<mod>(Ipp<datatype>* pSrcDst, int srcDstStep, IppiSize
roiSize, Ipp8u* pBuffer);
Supported values for mod:8u_C1IR

16u_C1IR

32f_C1IR

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc
srcStep
pDst
dstStep
pSrcDstsrcDstStep

roiSizepBuffer

Pointer to the source image ROI.
Distance, in bytes, between the starting points of consecutive
lines in the source image.
Pointer to the destination image ROI.
Distance, in bytes, between the starting points of consecutive
lines in the destination image.
Pointer to the source and destination image ROI for the inplace operation.
Distance, in bytes, between the starting points of consecutive
lines in the source and destination image for the in-place
operation.
Size of the source and destination ROI, in pixels.
Pointer to the work buffer. To compute the size of the buffer,
use the WinBartlettGetBufferSize WinBartlettSepGetBufferSize
or WinBartlettGetBufferSize WinBartlettSepGetBufferSize
function.

Description
These functions operate with ROI (see Regions of Interest in Intel IPP).
These functions compute the Bartlett (triangle) window samples, multiply pixel values of the source image
pSrc (pSrcDst for in-place flavors) with these samples, and store results in the destination image pDst
(pSrcDst for in-place flavors).
The Bartlett window function for one-dimensional case with M elements is defined as follows:

1274

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

The ippiWinBartlettSep flavor applies the window function successively to the rows and then to thecolumns of the image.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsStepErr
ippStsSizeErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error when pSrc or pDst pointer is NULL.
Indicates an error when srcStep or dstStep value is zero or
negative.
Indicates an error when width or height of images is less than,or equal to zero.

See Also
WinBartlettGetBufferSize, WinBartlettSepGetBufferSize Compute the size of the work buffer for
the ippiWinBartlett or ippiWinBartlettSep function.
Regions of Interest in Intel IPP
WinHammingGetBufferSize, WinHammingSepGetBufferSize,
Compute the size of the work buffer for theippiWinHamming or ippiWinHammingSep function.

SyntaxIppStatus ippiWinHammingGetBufferSize (IppDataType dataType, IppiSize roiSize, int*
pSize);
IppStatus ippiWinHammingSepGetBufferSize (IppDataType dataType, IppiSize roiSize, int*
pSize);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
dataType

Data type for the Bartlett window function. Possible values are:ipp8u, ipp16u, or ipp32f.

roiSizeSize, in pixels, of the image ROI.

pSize

Pointer to the computed size of the external work buffer, in bytes.

1275

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Description
The ippiWinHammingGetBufferSize and ippiWinHammingSepGetBufferSize functions compute the size,
in bytes, of the external work buffer needed for the ippiWinHamming or ippiWinHammingSep function. The
result is stored in the pSize parameter.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSize is NULL.

ippStsSizeErr

Indicates an error when roiSize has a field with a value lessthan 3.

ippStsNumChannelsErr

Indicates an error when dataType has an illegal value.

See Also
WinHamming, WinHammingSep MODIFIED API. Apply Hamming window function to the image.
WinHamming, WinHammingSep
MODIFIED API. Apply Hamming window function to
the image.

SyntaxCase 1: Not-in-place operation
IppStatus ippiWinHamming_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>*pDst, int dstStep, IppiSize roiSize, Ipp8u* pBuffer);
Supported values for mod:8u_C1R

16u_C1R

32f_C1R

IppStatus ippiWinHammingSep_<mod>(const Ipp<datatype>* pSrc, int srcStep,
Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, Ipp8u* pBuffer);
Supported values for mod:8u_C1R

16u_C1R

32f_C1R

Case 2: In-place operation
IppStatus ippiWinHamming_<mod>(Ipp<datatype>* pSrcDst, int srcDstStep, IppiSize
roiSize, Ipp8u* pBuffer);
Supported values for mod:8u_C1IR

16u_C1IR

32f_C1IR

IppStatus ippiWinHammingSep_<mod>(Ipp<datatype>* pSrcDst, int srcDstStep, IppiSize
roiSize, Ipp8u* pBuffer);
Supported values for mod:8u_C1IR

1276

16u_C1IR

32f_C1IR1Developer Guide and Reference for Intel® Integrated Performance Primitives

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc
srcStep
pDst
dstStep
pSrcDstsrcDstStep

roiSizepBuffer

Pointer to the source image ROI.
Distance, in bytes, between the starting points of consecutive
lines in the source image.
Pointer to the destination image ROI.
Distance, in bytes, between the starting points of consecutive
lines in the destination image.
Pointer to the source and destination image ROI for the inplace operation.
Distance, in bytes, between the starting points of consecutive
lines in the source and destination image for the in-place
operation.
Size of the source and destination ROI, in pixels.
Pointer to the work buffer. To compute the size of the buffer,
use the ippiWinHammingGetBufferSize or
ippiWinHammingSepGetBufferSize function.

Description
These functions operate with ROI (see Regions of Interest in Intel IPP).
These functions compute the Hamming (triangle) window samples, multiply pixel values of the source image
pSrc (pSrcDst for in-place flavors) with these samples, and store results in the destination image pDst
( pSrcDst for in-place flavors).
The Hamming window function for one-dimensional case with M elements is defined as follows:

The ippiWinHammingSep flavor applies the window function successively to the rows and then to thecolumns of the image.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsStepErr
ippStsSizeErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error when pSrc or pDst pointer is NULL.
Indicates an error when srcStep or dstStep value is zero or
negative.
Indicates an error when width or height of images is less than,or equal to zero.

1277

1

Intel® Integrated Performance Primitives Developer Guide and Reference

See Also
WinHammingGetBufferSize, WinHammingSepGetBufferSize Compute the size of the work buffer
for the ippiWinHamming or ippiWinHammingSep function.
Regions of Interest in Intel IPP
Discrete Cosine Transforms
Discrete Cosine Transform (DCT) of a real 2D image yields output results that are also real, which eliminates
the need to use packed format for storing the transformed data. However, forward and inverse DCT functions
ippiDCTFwd and ippiDCTInv need different context data structures to be initialized and filled in prior totheir use. Consequently, the required workspace buffer size is different for these functions. In case of using
an external buffer, its size must be determined by previously calling the respective support function. DCT
functions that use context structures implement the modified computation algorithm proposed in [Rao90].
The DCT functions ippiDCT8x8Fwd and ippiDCT8x8Inv working on a fixed 8x8 image buffer need nocontext data or external workspace buffers. Functions ippiDCT8x8Inv meet IEEE-1180 standard
requirements (see [IEEE]).
Intel IPP Discrete Cosine Transform functions working on a fixed 8x8 image buffer use Feig and Winograd
algorithm ([Feig92]) modified for taking advantage of SIMD instructions. For details on algorithms used in
DCT transforms and for more references, see [AP922].
Product and Performance Information
Performance varies by use, configuration and other factors. Learn more at www.Intel.com/
PerformanceIndex.
Notice revision #20201201

DCTFwdGetSize, DCTInvGetSize
Compute the size of the DCT context structure and thesize of the required work buffers.

SyntaxIppStatus ippiDCTFwdGetSize_32f (IppiSize roiSize, int* pSizeSpec, int* pSizeInit, int*
pSizeBuf);
IppStatus ippiDCTInvGetSize_32f (IppiSize roiSize, int* pSizeSpec, int* pSizeInit, int*
pSizeBuf);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
roiSize

Size of the source and destination ROI, in pixels.

pSizeSpec

Pointer to the size of the DCT context structure.

pSizeInit
pSizeBuf

1278

Pointer to the size of the buffer for the DCT initialization
function.
Pointer to the size of the DCT external work buffer.

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Description
These functions compute the following:
1.
2.
3.

Size of the DCT context structure. The result, in bytes, is stored in the pSizeSpec parameter.
Size of the work buffer for the ippiDCTFwdInit and ippiDCTInvInit functions. The result, in bytes,
is stored in the pSizeInit parameter.
Size of the work buffer for the ippiDCTFwd and ippiDCTInv functions. The result, in bytes, is stored in
the pSizeBuf parameter.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error when roiSize has a field with a zero or
negative value.

See Also
DCTFwdInit DCTInvInit Initialize the context structure for the forward or inverse DCT operation.
DCTFwd Applies a forward discrete cosine transform to an image.
DCTInv Applies an inverse discrete cosine transform to an image.
DCTFwdInit, DCTInvInit
Initialize the context structure for the forward or
inverse DCT operation.

SyntaxIppStatus ippiDCTFwdInit_32f (IppiDCTFwdSpec_32f* pDCTSpec, IppiSize roiSize, Ipp8u*
pMemInit);
IppStatus ippiDCTInvInit_32f (IppiDCTInvSpec_32f* pDCTSpec, IppiSize roiSize, Ipp8u*
pMemInit);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters

roiSize

Pointer to the forward or inverse DCT context structure for
initialization.
Size of the source and destination ROI, in pixels.

pMemInit

Pointer to the temporary work buffer.

pDCTSpec

Description
These functions initialize the pDCTSpec context structure to apply the forward or inverse DCT to twodimensional image data. The ippiDCTFwd and ippiDCTInv functions use the pointer to the initialized DCT
context structure as an argument to compute the forward or inverse DCT for points in the ROI of size
roiSize.

1279

1Intel® Integrated Performance Primitives Developer Guide and Reference

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error when roiSize has a field with a zero or
negative value.

See Also
DCTFwd Applies a forward discrete cosine transform to an image.
DCTInv Applies an inverse discrete cosine transform to an image.
DCTFwdApplies a forward discrete cosine transform to an
image.

SyntaxIppStatus ippiDCTFwd_<mod> (const Ipp32f* pSrc, int srcStep, Ipp32f* pDst, int dstStep,
const IppiDCTFwdSpec_32f* pDCTSpec, Ipp8u* pBuffer);
Supported values for mod:32f_C1R
32f_C3R
32f_C4R
32f_AC4R

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc
srcStep
pDst
dstStep
pDCTSpec
pBuffer

Pointer to the source image ROI.
Distance, in bytes, between the starting points of consecutive
lines in the source image.
Pointer to the destination image ROI.
Distance, in bytes, between the starting points of consecutive
lines in the destination image.
Pointer to the previously initialized forward DCT context
structure.
Pointer to the external work buffer.

Description
This function operates with ROI (see Regions of Interest in Intel IPP) of the size that is specified by theippiDFTInit function.

1280

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

This function performs a forward DCT on each channel of the source image pSrc and writes the result into
the corresponding channel of the destination image buffer pDst. Note that the function flavor with AC4
descriptor does not process alpha channel. This function uses the previously initialized pDCTSpec context
structure to set the mode of calculations and retrieve support data.
You can use this function with the external work buffer pBuffer to avoid memory allocation within thefunctions. Once the work buffer is allocated, it can be used for all following calls to the functions computing
DCT. As internal allocation of memory is too expensive operation and depends on operating system and/or
runtime libraries used - the use of an external buffer improves performance significantly, especially for thesmall size transforms.
Before using the forward DCT functions, you need to compute the size of the required buffers and theexternal work buffer using the ippiDCTFwdGetSize function.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsStepErr
ippStsContextMatchErr
ippStsMemAllocErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pSrc, pDst, orpDCTSpec pointeris NULL.
Indicates an error condition if srcStep or dstStep value iszero or negative.
Indicates an error condition if a pointer to an invalid pDCTSpec
structure is passed.
Indicates an error condition if memory allocation fails.

ExampleThe code example below demonstrates how to use the ippiDCTFwdGetSize, ippiDCTFwdInit, andippiDCTFwd functions.

void DCT_example( void ){Ipp32f Src[8*8] = {0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0,
0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0,
0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0,
0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0,
0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0,
0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0,
0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0,
0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0};
Ipp32f Dst[8*8];
IppiSize roiSize = {8, 8};
int srcStep;
int dstStep;
int sizeSpec;
int sizeInit;
int sizeBuffer;
IppiDCTFwdSpec_32f *pMemSpec;
Ipp8u *pMemInit = 0;
Ipp8u *pMemBuffer = 0;
srcStep = dstStep = 8 * sizeof(Ipp32f);

1281

1

Intel® Integrated Performance Primitives Developer Guide and Reference/// get sizes for required buffers
ippiDCTFwdGetSize_32f( roiSize, &sizeSpec, &sizeInit, &sizeBuffer );/// allocate memory for required buffers
pMemSpec = (IppiDCTFwdSpec_32f*) ippMalloc ( sizeSpec );if ( sizeInit > 0 ){pMemInit = (Ipp8u*) ippMalloc ( sizeInit );}if ( sizeBuffer > 0 ){pMemBuffer = (Ipp8u*) ippMalloc ( sizeBuffer );}/// initialize DCT specification structure
ippiDCTFwdInit_32f( pMemSpec, roiSize, pMemInit );/// free initialization bufferif ( sizeInit > 0 ){ippFree( pMemInit );}/// perform forward DCT
ippiDCTFwd_32f_C1R( Src, srcStep, Dst, dstStep, pMemSpec, pMemBuffer );/// ...
/// free buffers
if ( sizeBuffer > 0 ){ippFree( pMemBuffer );}ippFree( pMemSpec );}Result:Dst ->

28.0 -18.2 0.0 -1.9 0.0 -0.57
0.0 -0.14
0.0
0.0 0.0 0.0 0.0
0.0
0.0
0.0
0.0
0.0 0.0 0.0 0.0
0.0
0.0
0.0
0.0
0.0 0.0 0.0 0.0
0.0
0.0
0.0
0.0
0.0 0.0 0.0 0.0
0.0
0.0
0.0
0.0
0.0 0.0 0.0 0.0
0.0
0.0
0.0
0.0
0.0 0.0 0.0 0.0
0.0
0.0
0.0
0.0
0.0 0.0 0.0 0.0
0.0
0.0
0.0

DCTInv
Applies an inverse discrete cosine transform to an
image.

1282

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

SyntaxIppStatus ippiDCTInv_<mod> (const Ipp32f* pSrc, int srcStep, Ipp32f* pDst, int dstStep,
const IppiDCTInvSpec_32f* pDCTSpec, Ipp8u* pBuffer);
Supported values for mod :32f_C1R
32f_C3R
32f_C4R
32f_AC4R

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc
srcStep
pDst
dstStep
pDCTSpec
pBuffer

Pointer to the source image ROI.
Distance, in bytes, between the starting points of consecutive
lines in the source image.
Pointer to the destination image ROI.
Distance, in bytes, between the starting points of consecutive
lines in the destination image.
Pointer to the previously initialized inverse DCT context
structure.
Pointer to the external work buffer.

Description
This function operates with ROI (see Regions of Interest in Intel IPP) of the size that is specified by theippiDCTInvInit function.
This function performs an inverse DCT on each channel of the input image pSrc and writes the result into thecorresponding channel of the output image buffer pDst. Note that the function flavor with AC4 descriptor
does not process alpha channel. This function uses the previously initialized pDCTSpec context structure to
set the mode of calculations and retrieve support data.
The function may be used with the external work buffer pBuffer to avoid memory allocation within thefunctions. Once the work buffer is allocated, it can be used for all following calls to the functions computing
DCT. As internal allocation of memory is too expensive operation and depends on operating system and/or
runtime libraries used - the use of an external buffer improves performance significantly, especially for thesmall size transforms.
Before using the inverse DCT functions, you need to compute the size of the required buffers and theexternal work buffer using the ippiDCTInvGetSize function.

1283

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsStepErr
ippStsContextMatchErr
ippStsMemAllocErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pSrc, pDst, or pDCTSpec
pointer is NULL.
Indicates an error condition if srcStep or dstStep value iszero or negative.
Indicates an error condition if a pointer to an invalid pDCTSpec
structure is passed.
Indicates an error condition if memory allocation fails.

DCT8x8Fwd
Performs a forward DCT on a 2D buffer of 8x8 size.

SyntaxCase 1: Not-in-place operation
IppStatus ippiDCT8x8Fwd_<mod>(const Ipp<datatype>* pSrc, Ipp<datatype>* pDst);
Supported values for mod:16s_C1

32f_C1Case 2: Not-in-place operation with ROI
IppStatus ippiDCT8x8Fwd_<mod>(const Ipp<srcDatatype>* pSrc, int srcStep,
Ipp<dstDatatype>* pDst);
Supported values for mod:16s_C1R

8u16s_C1R

Case 3: In-place operation
IppStatus ippiDCT8x8Fwd_<mod>(Ipp<datatype>* pSrcDst);
Supported values for mod:16s_C1I

32f_C1I

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

1284

Pointer to the source image buffer.

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Distance in bytes between starts of consecutive lines in thesource image buffer for operations with ROI.
Pointer to the destination image buffer.

srcStep
pDst

Pointer to the source and destination image for in-place
operations.

pSrcDstDescription
Some flavors operate with ROI (see Regions of Interest in Intel IPP).
This function computes the forward discrete cosine transform of short integer or floating-point data in a 2D
buffer of 8x8 size. No prerequisites are needed to use this transform function.

Return Values
Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pSrc, pDst, or pSrcDst pointeris NULL.

ippStsNoErr
ippStsNullPtrErr

Indicates an error condition if srcStep value is zero or
negative.

ippStsStepErr

ExampleThe code example below illustrates the use of ippiDCT8x8Fwd function.

IppStatus dct16s( void ) {Ipp16s x[64] = {0};IppiSize roi = {8,8};
int i;
for( i=0; i<8; ++i ) {ippiSet_16s_C1R( (Ipp16s)i, x+8*i+i, 8*sizeof(Ipp16s), roi );--roi.width;--roi.height;}
return ippiDCT8x8Fwd_16s_C1I( x );}The destination image x contains:

18 -9 -2 -1 -1-9 7 0 0 0-2 0 2 0 0-1 0 0 1 0
0 0 0 0 1
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0

0
0
0
0
0
0
0
0

0
0
0
0
0
0
0
0

0
0
0
0
0
0
0
0

DCT8x8Inv, DCT8x8Inv_A10
Performs an inverse DCT on a 2D buffer of 8x8 size.

1285

1

Intel® Integrated Performance Primitives Developer Guide and Reference

SyntaxCase 1: Not-in-place operation
IppStatus ippiDCT8x8Inv_<mod>(const Ipp<datatype>* pSrc, Ipp<datatype>* pDst);
Supported values for mod:16s_C1

32f_C1

IppStatus ippiDCT8x8Inv_A10_16s_C1(const Ipp16s* pSrc, Ipp16s* pDst);

Case 2: Not-in-place operation with ROI
IppStatus ippiDCT8x8Inv_<mod>(const Ipp<srcDatatype>* pSrc, Ipp<dstDatatype>* pDst, int
dstStep);
Supported values for mod:16s_C1R

16s8u_C1R

Case 3: In-place operation
IppStatus ippiDCT8x8Inv_<mod>(Ipp<datatype>* pSrcDst);
Supported values for mod:16s_C1I

32f_C1I

IppStatus ippiDCT8x8Inv_A10_16s_C1I( Ipp16s* pSrcDst);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source image.

pDst

Pointer to the destination buffer.

dstStep
pSrcDstDistance in bytes between starts of consecutive lines in thedestination buffer for operations with ROI.
Pointer to the source and destination image for in-place
operations.

Description
Some flavors operate with ROI (see Regions of Interest in Intel IPP).
This function computes the inverse discrete cosine transform of data in a 2D buffer of 8x8 size. No
prerequisites are needed to use this transform function.

1286

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

CautionSource data for 16s functions must be the result of the forward discrete cosine transform ofdata from the range [-512, 511] for flavors with A10 modifier (ippiDCT8x8Inv_A10), andfrom the range [-256, 255] for flavors without A10 modifier (ippiDCT8x8Inv); they cannot
be arbitrary data from the range [-32768, 32767].

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsStepErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pSrc, pDst, or pSrcDst pointeris NULL.
Indicates an error condition if dstStep value is zero or
negative.

DCT8x8FwdLS
Performs a forward DCT on a 2D buffer of 8x8 sizewith prior data conversion and level shift.

SyntaxIppStatus ippiDCT8x8FwdLS_8u16s_C1R(const Ipp8u* pSrc, int srcStep, Ipp16s* pDst,
Ipp16s addVal);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source image buffer.

pDst

Pointer to the destination buffer.

srcStep
addValDistance in bytes between starts of consecutive lines in thesource image buffer.
The level shift value.

Description
This function operates with ROI (see Regions of Interest in Intel IPP) that is a 2D buffer of 8x8 size in thiscase, thus there is no need to specify its size.
This function first converts data in the buffer pSrc from unsigned Ipp8u type to the signed Ipp16s type andthen performs level shift operation by adding the constant value addVal to each sample. After that, thefunction performs the forward discrete cosine transform of the modified data. The result is stored in pDst.

1287

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsStepErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pSrc or pDst pointer is NULL.
Indicates an error condition if srcStep value is zero or
negative.

DCT8x8InvLSClip
Performs an inverse DCT on a 2D buffer of 8x8 sizewith further data conversion and level shift.

SyntaxIppStatus ippiDCT8x8InvLSClip_16s8u_C1R(const Ipp16s* pSrc, Ipp8u* pDst, int dstStep,
Ipp16s addVal, Ipp8u clipDown, Ipp8u clipUp);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source image buffer.

pDst

Pointer to the destination image buffer.

addValDistance in bytes between starts of consecutive lines in thedestination image buffer.
The level shift value.

clipDown

The lower bound for the range of output values.

clipUp

The upper bound for the range of output values.

dstStep

Description
This function operates with ROI (see Regions of Interest in Intel IPP) that is a 2D buffer of 8x8 size in thiscase, thus there is no need to specify its size.
This function performs the inverse discrete cosine transform of the buffer pSrc. After completing the DCT,
this function performs level shift operation by adding the constant value addVal to each sample. Finally, thefunction converts data from the signed Ipp16s type to the unsigned Ipp8u type. The output data are clippedto the range [clipDown..clipUp]. The result is stored in the destination buffer pDst.

CautionSource data for 16s flavors must be the result of the forward discrete cosine transform ofdata from the range [-256, 255], they cannot be arbitrary data from the range [-32768,
32767].

1288

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsStepErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pSrc or pDst pointer is NULL.
Indicates an error condition if dstStep value is zero or
negative.

DCT8x8Inv_2x2, DCT8x8Inv_4x4
Perform an inverse DCT on a top left quadrant of size
2x2 or 4x4 in the 2D buffer of size 8x8.

SyntaxIppStatus ippiDCT8x8Inv_2x2_16s_C1(const Ipp16s* pSrc, Ipp16s* pDst);
IppStatus ippiDCT8x8Inv_4x4_16s_C1(const Ipp16s* pSrc, Ipp16s* pDst);
IppStatus ippiDCT8x8Inv_2x2_16s_C1I(Ipp16s* pSrcDst);
IppStatus ippiDCT8x8Inv_4x4_16s_C1I(Ipp16s* pSrcDst);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source image.

pDst

Pointer to the destination buffer.

pSrcDstPointer to the source and destination buffer for in-place
operations.

Description
These functions compute the inverse discrete cosine transform of non-zero elements in the top left quadrantof size 2x2 or 4x4 in the 2D buffer of 8x8 size. No prerequisites are needed to use this transform function.

CautionSource data for 16s flavors must be the result of the forward discrete cosine transform ofdata from the range [-256, 255], they cannot be arbitrary data from the range [-32768,
32767].

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if one of the specified pointers is
NULL.

1289

1

Intel® Integrated Performance Primitives Developer Guide and Reference

DCT8x8To2x2Inv, DCT8x8To4x4Inv
Perform an inverse DCT on a 2D buffer of 8x8 sizewith further downsampling to 2x2 or 4x4 size.

SyntaxIppStatus ippiDCT8x8To2x2Inv_16s_C1(const Ipp16s* pSrc, Ipp16s* pDst);
IppStatus ippiDCT8x8To4x4Inv_16s_C1(const Ipp16s* pSrc, Ipp16s* pDst);
IppStatus ippiDCT8x8To2x2Inv_16s_C1I(Ipp16s* pSrcDst);
IppStatus ippiDCT8x8To4x4Inv_16s_C1I(Ipp16s* pSrcDst);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source image.

pDst

Pointer to the destination buffer.

pSrcDstPointer to the source and destination buffer for in-place
operations.

Description
These functions compute the inverse discrete cosine transform of the 2D buffer pSrc of 8x8 size. Then thefunctions perform downsampling of the result by averaging to the destination buffer pDst of size 2x2 or 4x4.
In-place flavors of the functions perform operations on the source and destination buffer pSrcDst.

CautionSource data for 16s flavors must be the result of the forward discrete cosine transform ofdata from the range [-256, 255], they cannot be arbitrary data from the range [-32768,
32767].

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if one of the specified pointers is
NULL.

Image Statistics Functions
This chapter describes the Intel® IPP image processing functions that can be used to compute the following
statistical parameters of an image:••••sum, integrals, mean and standard deviation of pixel values
intensity histogram of pixel values
minimum and maximum pixel values
spatial and central moments of order 0 to 31290

Developer Guide and Reference for Intel® Integrated Performance Primitives

•
•
•
•

1

the infinity, L1, and L2 norms of the image pixel values and of the differences between pixel values of two
imagesrelative error values for the infinity, L1, and L2 norms of differences between pixel values of two images
universal image quality index
proximity measures of an image and a template (another image).

Sum
Computes the sum of image pixel values.

SyntaxCase 1: Operation on one-channel integer data
IppStatus ippiSum_<mod>(const Ipp<datatype>* pSrc, int srcStep, IppiSize roiSize,
Ipp64f* pSum);
Supported values for mod:8u_C1R

16u_C1R

16s_C1R

Case 2: Operation on one-channel floating-point data
IppStatus ippiSum_32f_C1R(const Ipp32f* pSrc, int srcStep, IppiSize roiSize, Ipp64f*
pSum, IppHintAlgorithm hint);

Case 3: Operation on multi-channel integer data
IppStatus ippiSum_<mod>(const Ipp<datatype>* pSrc, int srcStep, IppiSize roiSize,
Ipp64f sum[3]);Supported values for mod:8u_C3R

16u_C3R

16s_C3R

IppStatus ippiSum_<mod>(const Ipp<datatype>* pSrc, int srcStep, IppiSize roiSize,
Ipp64f sum[4]);Supported values for mod:8u_C4R

16u_C4R

16s_C4R

Case 4: Operation on multi-channel floating-point data
IppStatus ippiSum_32f_C3R(const Ipp32f* pSrc, int srcStep, IppiSize roiSize, Ipp64f
sum[3], IppHintAlgorithm hint);
IppStatus ippiSum_32f_C4R(const Ipp32f* pSrc, int srcStep, IppiSize roiSize, Ipp64f
sum[4], IppHintAlgorithm hint);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

1291

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Parameters
pSrc

Pointer to the source image ROI.

roiSize

Distance in bytes between starts of consecutive lines in thesource image.
Size of the source ROI in pixels.

pSum

Pointer to the computed sum of pixel values.

srcStepsum
hint

Array containing computed sums of channel values of pixels inthe source buffer.
Option to select the algorithmic implementation of the function.

Description
This function operates with ROI (see Regions of Interest in Intel IPP). This function computes the sum of
pixel values pSum for the source image pSrc using algorithm indicated by the hint argument (see Table“Hint Arguments for Image Moment Functions”). In case of a multi-channel image, the sum is computed overeach channel and stored in the array sum.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if the pSrc or pSum pointer is NULL.
Indicates an error condition if roiSize has a field with zero or
negative value.

ExampleThe code example below demonstrates the use of ippiSum function:

IppStatus sum( void ) {Ipp64f sum;Ipp8u x[5*4];
IppiSize roi = {5,4};
ippiSet_8u_C1R( 1, x, 5, roi );return ippiSum_8u_C1R( x, 5, roi, &sum);}

IntegralTransforms an image to the integral representation.

SyntaxIppStatus ippiIntegral_8u32s_C1R(const Ipp8u* pSrc, int srcStep, Ipp32s* pDst, int
dstStep, IppiSize srcRoiSize, Ipp32s val);
IppStatus ippiIntegral_8u32f_C1R(const Ipp8u* pSrc, int srcStep, Ipp32f* pDst, int
dstStep, IppiSize srcRoiSize, Ipp32f val);1292

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

IppStatus ippiIntegral_32f_C1R(const Ipp32f* pSrc, int srcStep, Ipp32f* pDst, int
dstStep, IppiSize srcRoiSize);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pDst

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the ROI in the destination integral image.

srcRoiSize

Distance in bytes between starts of consecutive lines in thedestination image.
Size of source and destination image ROI in pixels.

val

The value to add to pDst image pixels.

dstStep

Description
This function operates with ROI (see Regions of Interest in Intel IPP). This function transforms a source
image pSrc to the integral image pDst. Pixel values of the destination image pDst are computed using pixel
values of the source image pSrc and the specified value val in accordance with the following formula:where i,j are coordinates of the destination image pixels (see Figure 11-1 ) varying in the range i = 1 ,...,
srcRoiSize.height, j = 0,..., srcRoiSize.width. Pixel values of zero row and column of pDst (i=0) is
set to val.
For the ippiIntegral_32f_C1 function flavor the value of val is considered to be equal to zero.
The size of the destination images is (srcRoiSize.width + 1) x (srcRoiSize.height + 1).
Figure “Operation of the Integral and TiltedIntegral functions” shows what pixels (red circles) of the source
image are used in computation new pixel values in the i,j coordinates.

1293

1

Intel® Integrated Performance Primitives Developer Guide and Reference

For large images the result of summation can exceed the upper bound of the output data type. Table“Maximum Image Size for Integral Functions” lists the maximum image size for different function flavors andvalues.
Operation of the Integral and TiltedIntegral functions

Maximum Image Size for Integral Functions
Function Flavor

Value val

Maximum Image Size

ippiIntegral_8u32s_C1R0(231-1)/255-231

232/2550224/255-224(225+1)/255

ippiIntegral_8u32f_C1R

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if pSrc or pDst is NULL.

ippStsSizeErr
ippStsStepErr

ippStsNotEvenStepErr

Indicates an error condition if srcRoiSize has a field with zeroor negative value.
Indicates an error condition if srcStep is less thansrcRoiSize.width * <pixelSize>, or dstStep is less than(srcRoiSize.width+1) * <pixelSize> .
Indicates an error condition if srcStep or dstStep is notdivisible by <pixelSize>.

ExampleThe code example below demonstrates how to use the ippiIntegral_8u32s_C1R function:

void func_integral_8u32s_C1R(){
Ipp8u pSrc[5*4];
Ipp32s pDst[6*5];
IppiSize ROI = {5,4};
ippiSet_8u_C1R(1,pSrc,5,ROI);
Ipp32s val = 1;
ippiIntegral_8u32s_C1R(pSrc, 5, pDst, 6*sizeof(Ipp32s), ROI, val);}1294

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Result:pSrc -> 1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1

pDst -> 1 1 1 1 1 1
1 2 3 4 5 6
1 3 5 7 9 11
1 4 7 10 13 16
1 5 9 13 17 21

The code example below demonstrates how to use the ippiIntegral_32f_C1R function:

void func_integral_32f_C1R(){
Ipp32f pSrc[5*4];
Ipp32f pDst[6*5];
IppiSize ROI = {5, 4};ippiSet_32f_C1R(1, pSrc, 5*sizeof(Ipp32f), ROI);
ippiIntegral_32f_C1R(pSrc, 5*sizeof(Ipp32f), pDst, 6*sizeof(Ipp32f), ROI);}
Result:pSrc -> 1.0 1.0 1.0 1.0 1.0
1.0 1.0 1.0 1.0 1.0
1.0 1.0 1.0 1.0 1.0
1.0 1.0 1.0 1.0 1.0

pDst -> 0.0 0.0 0.0 0.0 0.0 0.0
0.0 1.0 2.0 3.0 4.0 5.0
0.0 2.0 4.0 6.0 8.0 10.0
0.0 3.0 6.0 9.0 12.0 15.0
0.0 4.0 8.0 12.0 16.0 20.0

SqrIntegral
Transforms an image to integral and integral of pixel
squares representations.

SyntaxIppStatus ippiSqrIntegral_8u32s64f_C1R(const Ipp8u* pSrc, int srcStep, Ipp32s* pDst,
int dstStep, Ipp64f* pSqr, int sqrStep, IppiSize roiSize, Ipp32s val, Ipp64f valSqr);
IppStatus ippiSqrIntegral_8u32f64f_C1R(const Ipp8u* pSrc, int srcStep, Ipp32f* pDst,
int dstStep, Ipp64f* pSqr, int sqrStep, IppiSize roiSize, Ipp32f val, Ipp64f valSqr);
IppStatus ippiSqrIntegral_8u32s_C1R(const Ipp8u* pSrc, int srcStep, Ipp32s* pDst, int
dstStep, Ipp32s* pSqr, int sqrStep, IppiSize roiSize, Ipp32s val, Ipp32s valSqr);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pDst

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the ROI in the destination integral image.

1295

1

Intel® Integrated Performance Primitives Developer Guide and Reference

roiSize

Distance in bytes between starts of consecutive lines in thedestination image.
Pointer to the ROI of the destination integral image of pixel
squares.
Distance in bytes between starts of consecutive lines in thedestination integral image of pixel squares.
Size of source image ROI in pixels.

val

The value to add to pDst image pixels.

valSqr

The value to add to pSqr image pixels

dstStep
pSqr
sqrStep

Description
This function operates with ROI (see Regions of Interest in Intel IPP). This function builds two destination
images: integral image pDst and integral image of pixel squares pSqr. Pixel values of pDst are computed
using pixel values of the source image pSrc and the specified value val in accordance with the following
formula:Pixel values of pSqr are computed using pixel values of the source image pSrc and the specified value
valSqr in accordance with the following formula:where i,j are coordinates of the destination image pixels (see Figure “Operation of the Integral and
TiltedIntegral functions”) varying in the range i = 1, ..., roiSize.height, j = 0,..., roiSize.width. Pixel
values of zero row and column are set to val for pDst, and to valSqr for pSqr. The size of both destination
images is (roiSize.width + 1) x (roiSize.height + 1).
Figure “Operation of the Integral and TiltedIntegral functions” shows what pixels (red circles) of the source
image are used in computation new pixel values in the i,j coordinates.

Return Values
ippStsNoEr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the specified pointers is NULL.

ippStsSizeErr
ippStsStepErr

ippStsNotEvenStepErr

Indicates an error condition if roiSize has a field with zero or
negative value.
Indicates an error condition if srcStep is less thanroiSize.width * <pixelSize>, or dstStep or sqrStep is lessthan (roiSize.width+1) * <pixelSize> .
Indicates an error condition if dstStep is not divisible by 4, or

sqrStep is not divisible by 8.

TiltedIntegral
Transforms an image to the tilted integral
representation.

1296

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

SyntaxIppStatus ippiTiltedIntegral_8u32f_C1R(const Ipp8u* pSrc, int srcStep, Ipp32f* pDst,
int dstStep, IppiSize roiSize, Ipp32f val);
IppStatus ippiTiltedIntegral_8u32s_C1R(const Ipp8u* pSrc, int srcStep, Ipp32s* pDst,
int dstStep, IppiSize roiSize, Ipp32s val);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pDst

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the ROI in the destination integral image.

roiSize

Distance in bytes between starts of consecutive lines in thedestination image.
Size of source image ROI in pixels.

val

The value to add to pDst image pixels

dstStep

Description
This function operates with ROI (see Regions of Interest in Intel IPP). This function transforms a source
image pSrc to the tilted integral image pDst. Pixel values of the destination image pDst are computed using
pixel values of the source image pSrc and the specified value val in accordance with the following formula:where i,j are coordinates of the destination image pixels (see Figure “Operation of the Integral and
TiltedIntegral functions”)varying in the range i = 2 ,..., roiSize.height + 1, j = 0,..., roiSize.width +1. Pixel values of rows 0 and 1 of the destination image pDst ( i=0) is set to val.
The size of the destination images is (roiSize.width + 2) x (roiSize.height + 2).
Figure “Operation of the Integral and TiltedIntegral functions” shows what pixels (red circles) of the source
image are used in computation new pixel values in the i,j coordinates.

Return Values
ippStsNoEr

Indicates no error.

ippStsNullPtrErr

Indicates an error if pSrc or pDst is NULL.

ippStsSizeErr

Indicates an error condition if roiSize has a field with zero or
negative value.

1297

1

Intel® Integrated Performance Primitives Developer Guide and ReferenceippStsStepErr

ippStsNotEvenStepErr

Indicates an error condition if srcStep is less thanroiSize.width * <pixelSize>, or dstStep is less than(roiSize.width+2) * <pixelSize> .
Indicates an error condition if one dstStep is not divisible by 4.

TiltedSqrIntegral
Transforms an image to tilted integral and tilted
integral of pixel squares representations.

SyntaxIppStatus ippiTiltedSqrIntegral_8u32s_C1R(const Ipp8u* pSrc, int srcStep, Ipp32s* pDst,
int dstStep, Ipp32s* pSqr, int sqrStep, IppiSize roiSize, Ipp32s val, Ipp32s valSqr);
IppStatus ippiTiltedSqrIntegral_8u32s64f_C1R(const Ipp8u* pSrc, int srcStep, Ipp32s*
pDst, int dstStep, Ipp64f* pSqr, int sqrStep, IppiSize roiSize, Ipp32s val, Ipp64f
valSqr);IppStatus ippiTiltedSqrIntegral_8u32f64f_C1R(const Ipp8u* pSrc, int srcStep, Ipp32f*
pDst, int dstStep, Ipp64f* pSqr, int sqrStep, IppiSize roiSize, Ipp32f val, Ipp64f
valSqr);Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pDst

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the ROI in the destination integral image.

roiSize

Distance in bytes between starts of consecutive lines in thedestination image.
Pointer to the ROI of the destination integral image of pixel
squares.
Distance in bytes between starts of consecutive lines in thedestination integral image of pixel squares.
Size of source image ROI in pixels.

val

The value to add to pDst image pixels.

valSqr

The value to add to pSqr image pixels

dstStep
pSqr
sqrStep

Description
This function operates with ROI (see Regions of Interest in Intel IPP). This function builds two destination
image: tilted integral image pDst and tilted integral image of pixel squares pSqr.
Pixel values of pDst are computed using pixel values of the source image pSrc and the specified value val inaccordance with the following formula:

1298

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Pixel values of pSqr are computed using pixel values of the source image pSrc and the specified value
valSqr in accordance with the following formula:where i,j are coordinates of the destination image pixels (see Figure “Operation of the Integral and
TiltedIntegral functions”) varying in the range i = 2 ,..., roiSize.height, j = 0,..., roiSize.width. Pixel
values of zero and first rows (i=0,1) are set to val for pDst, and to valSqr for pSqr. The size of both
destination images is (roiSize.width + 2) x (roiSize.height + 2).
Figure “Operation of the Integral and TiltedIntegral functions” shows what pixels (red circles) of the source
image are used in computation new pixel values in the i,j coordinates.

Return Values
ippStsNoEr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the specified pointers is NULL.
Indicates an error condition if roiSize has a field with zero or
negative value.
Indicates an error condition if srcStep is less thanroiSize.width * <pixelSize>, or dstStep or sqrStep is lessthan (roiSize.width+2) * <pixelSize> .

ippStsSizeErr
ippStsStepErr

ippStsNotEvenStepErr

Indicates an error condition if dstStep is not divisible by 4, or

sqrStep is not divisible by 8.

Mean
Computes the mean of image pixel values.

SyntaxCase 1: Operation on one-channel integer data
IppStatus ippiMean_<mod>(const Ipp<datatype>* pSrc, int srcStep, IppiSize roiSize,
Ipp64f* pMean);Supported values for mod:8u_C1R

16u_C1R

16s_C1R

Case 2: Operation on one-channel floating-point data
IppStatus ippiMean_32f_C1R(const Ipp32f* pSrc, int srcStep, IppiSize roiSize, Ipp64f*
pMean, IppHintAlgorithm hint);

1299

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Case 3: Masked operation on one-channel data
IppStatus ippiMean_<mod>(const Ipp<datatype>* pSrc, int srcStep, const Ipp8u* pMask,
int maskStep, IppiSize roiSize, Ipp64f* pMean);Supported values for mod:8u_C1MR

16u_C1MR

32f_C1MR

Case 4: Operation on multi-channel integer data
IppStatus ippiMean_<mod>(const Ipp<datatype>* pSrc, int srcStep, IppiSize roiSize,
Ipp64f mean[3]);Supported values for mod:8u_C3R

16u_C3R

16s_C3R

IppStatus ippiMean_<mod>(const Ipp<datatype>* pSrc, int srcStep, IppiSize roiSize,
Ipp64f mean[4]);Supported values for mod:8u_C4R

16u_C4R

16s_C4R

Case 5: Operation on multi-channel floating-point data
IppStatus ippiMean_<mod>(const Ipp32f* pSrc, int srcStep, IppiSize roiSize, Ipp64f
mean[3], IppHintAlgorithm hint);
Supported values for mod:32f_C3R

IppStatus ippiMean_32f_C4R(const Ipp32f* pSrc, int srcStep, IppiSize roiSize, Ipp64f
mean[4], IppHintAlgorithm hint);

Case 6: Masked operation on multi-channel data
IppStatus ippiMean_<mod>(const Ipp<datatype>* pSrc, int srcStep, const Ipp8u* pMask,
int maskStep, IppiSize roiSize, int coi, Ipp64f* pMean);Supported values for mod:8u_C3CMR

16u_C3CMR

32f_C3CMR

Include Files
ippi.hippcv.h

Domain Dependencies
Flavors declared in ippi.h:
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

1300

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Flavors declared in ippcv.h:
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pMask

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the mask image.

roiSize

Distance in bytes between starts of consecutive lines in themask image.
Size of the source ROI in pixels.

coi

Channel of interest (for color images only); can be 1, 2, or 3.

pMean

Pointer to the computed mean of pixel values.

maskStep

mean
hint

Array containing computed mean values for each channel of amulti-channel image.
Option to select the algorithmic implementation of the function.

Description
The flavors of the function ippiMean that perform masked operations are declared in the ippcv.h file. Allother function flavors are declared in the ippi.h file. This function operates with ROI (see Regions ofInterest in Intel IPP). It computes the mean (average) of pixel values pMean for the source image pSrc.
Computation algorithm is specified by the hint argument (see Table “Hint Arguments for Image Moment
Functions”). For non-masked operations on a multi-channel image (Case 4, 5), the mean is computed overeach channel and stored in the array mean. In the mask multi-channel mode (Case 6), the mean is computed
for a single channel of interest specified by coi.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error or awarning.

ippStsNullPtrErr

Indicates an error when any of the specified pointers is NULL.

ippStsSizeErr
ippStsStepErr
ippStsNotEvenStepErr
ippStsCOIErr

Indicates an error condition if roiSize has a field with zero or
negative value.
Indicates an error condition in mask mode, if srcStep or
maskStep is less than roiSize.width * <pixelSize>.
Indicates an error condition in mask mode if steps for floatingpoint images cannot be divided by 4.
Indicates an error when coi is not 1, 2, or 3.

ExampleThe code example below shows how to use the ippiMean function.

IppStatus mean( void ) {Ipp64f mean;
Ipp8u x[5*4];

1301

1

Intel® Integrated Performance Primitives Developer Guide and Reference

IppiSize roi = {5,4};
ippiSet_8u_C1R( 3, x, 5, roi );return ippiMean_8u_C1R( x, 5, roi, &mean );}Mean_StdDev
Computes the mean and standard deviation of image
pixel values.

SyntaxCase 1: Operation on one-channel data
IppStatus ippiMean_StdDev_<mod>(const Ipp<datatype>* pSrc, int srcStep, IppiSize
roiSize, Ipp64f* pMean, Ipp64f* pStdDev);
Supported values for mod:8u_C1R

16u_C1R

32f_C1R

Case 2: Masked operation on one-channel data
IppStatus ippiMean_StdDev_<mod>(const Ipp<datatype>* pSrc, int srcStep, const Ipp8u*
pMask, int maskStep, IppiSize roiSize, Ipp64f* pMean, Ipp64f* pStdDev);
Supported values for mod:8u_C1MR

16u_C1MR

32f_C1MR

Case 3: Operation on multi-channel data
IppStatus ippiMean_StdDev_<mod>(const Ipp<datatype>* pSrc, int srcStep, IppiSize
roiSize, int coi, Ipp64f* pMean, Ipp64f* pStdDev);
Supported values for mod:8u_C3CR

16u_C3CR

32f_C3CR

Case 4: Masked operation on multi-channel data
IppStatus ippiMean_StdDev_<mod>(const Ipp<datatype>* pSrc, int srcStep, const Ipp8u*
pMask, int maskStep, IppiSize roiSize, int coi, Ipp64f* pMean, Ipp64f* pStdDev);
Supported values for mod:8u_C3CMR

16u_C3CMR

32f_C3CMR

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

1302

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Parameters
pSrc
srcStep
pMask

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the mask image.

roiSize

Distance in bytes between starts of consecutive lines in themask image.
Size of the source ROI in pixels

coi

Channel of interest (for color images only); can be 1, 2, or 3.

pMean

Pointer to the computed mean of pixel values.

pStdDev

Pointer to the computed standard deviation of pixel values in
the image.

maskStep

Description
This function operates with ROI (see Regions of Interest in Intel IPP). This function computes the mean andstandard deviation of pixel values in the ROI of the source image pSrc. In the mask mode, the computation
is done over pixels selected by nonzero mask values. In the multi-channel mode, the mean is computed for asingle channel of interest specified by coi. If any of the parameters pMean or pStdDev is not required, thezero pointer is to be passed to the corresponding parameter.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsStepErr
ippStsNotEvenStepErr
ippStsCOIErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error when pSrc or pMask pointer is NULL.
Indicates an error condition if roiSize has a field with zero or
negative value.
Indicates an error condition if srcStep or maskStep is less thanroiSize.width * <pixelSize>.
Indicates an error condition if steps for floating-point images
cannot be divided by 4.
Indicates an error when coi is not 1, 2, or 3.

RectStdDev
Computes the standard deviation of the integral
images.

SyntaxIppStatus ippiRectStdDev_32f_C1R(const Ipp32f* pSrc, int srcStep, const Ipp64f* pSqr,
int sqrStep, Ipp32f* pDst, int dstStep, IppiSize roiSize, IppiRect rect);
IppStatus ippiRectStdDev_32s32f_C1R(const Ipp32s* pSrc, int srcStep, const Ipp64f*
pSqr, int sqrStep, Ipp32f* pDst, int dstStep, IppiSize roiSize, IppiRect rect);
IppStatus ippiRectStdDev_32s_C1RSfs(const Ipp32s* pSrc, int srcStep, const Ipp32s*
pSqr, int sqrStep, Ipp32s* pDst, int dstStep, IppiSize roiSize, IppiRect rect, int
scaleFactor);

1303

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pSqr
sqrStep
pDst

Pointer to the ROI in the source integral image.
Distance in bytes between starts of consecutive lines in thesource integral image.
Pointer to the ROI in the source integral image of pixel squares.
Distance in bytes between starts of consecutive lines in thesource integral image of pixel squares.
Pointer to the destination image ROI.

roiSize

Distance in bytes between starts of consecutive lines in thedestination image.
Size of destination image ROI in pixels.

rect

Rectangular window.

scaleFactor

Scale factor (see Integer Result Scaling).

dstStep

Description
This function operates with ROI (see Regions of Interest in Intel IPP). This function computes the standard
deviation for each pixel in the rectangular window rect using the integral image pSrc and integral image of
pixel squares pSqr. The computations are performed in accordance with the following formulas:where i,j are coordinates of the destination image pixels varying in the range i = 0 ,..., roiSize.height 1, j = 0,..., roiSize.width - 1;

sum = pSrc[ i + rect.y + rect.height, j + rect.x + rect.width] - pSrc[i + rect.y, j + rect.x +rect.width] - pSrc[i + rect.y + rect.height, j + rect.x] + pSrc[i + rect.y, j + rect.x];
sumSqr = pSqr[ i + rect.y + rect.height, j + rect.x + rect.width] - pSqr[i + rect.y, j + rect.x+ rect.width] - pSqr[i + rect.y + rect.height, j + rect.x] + pSqr[i + rect.y, j + rect.x];
numPix = rect.height * rect.width.
The minimum size of each source images pSrc and pSqr should be (roiSize.width + rect.x +rect.width) x (roiSize.height + rect.y + rect.height).
The source images pSrc and pSqr can be obtained by using the functions ippiIntegral or ippiSqrIntegral.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the specified pointers is NULL.

1304

Developer Guide and Reference for Intel® Integrated Performance Primitives

ippStsSizeErr
ippStsSizeErr

ippStsStepErr

ippStsNotEvenStepErr

1

Indicates an error condition if roiSize has a field with zero or
negative value.
Indicates an error condition if rect.width or rect.height isless than or equal to zero, or if rect.x or rect.y is less thanzero.
Indicates an error condition if srcStep or sqrStep is less than(roiSize.width+rect.x+rect.width+1) * <pixelSize>, ordstStep is less than roiSize.width * <pixelSize>.
Indicates an error condition if sqrStep is not divisible by 8, or
one of pSrc and dstStep is not divisible by 4.

TiltedRectStdDev
Computes the standard deviation of the tilted integral
images.

SyntaxIppStatus ippiTiltedRectStdDev_32f_C1R(const Ipp32f* pSrc, int srcStep, const Ipp64f*
pSqr, int sqrStep, Ipp32f* pDst, int dstStep, IppiSize roiSize, IppiRect rect);
IppStatus ippiTiltedRectStdDev_32s_C1RSfs(const Ipp32s* pSrc, int srcStep, const
Ipp32s* pSqr, int sqrStep, Ipp32s* pDst, int dstStep, IppiSize roiSize, IppiRect rect,
int scaleFactor);
IppStatus ippiTiltedRectStdDev_32s32f_C1R(const Ipp32s* pSrc, int srcStep, const
Ipp64f* pSqr, int sqrStep, Ipp32f* pDst, int dstStep, IppiSize roiSize, IppiRect rect);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pSqr
sqrStep
pDst

Pointer to the ROI in the source integral image.
Distance in bytes between starts of consecutive lines in thesource integral image.
Pointer to the ROI in the source integral image of pixel squares.
Distance in bytes between starts of consecutive lines in thesource integral image of pixel squares.
Pointer to the destination image ROI.

roiSize

Distance in bytes between starts of consecutive lines in thedestination image.
Size of destination image ROI in pixels.

rect

Rectangular window.

scaleFactor

Scale factor (see Integer Result Scaling).

dstStep1305

1Intel® Integrated Performance Primitives Developer Guide and Reference

Description
This function operates with ROI (see Regions of Interest in Intel IPP). This function computes the standard
deviation for each pixel in the rectangular window rect using the tilted integral image pSrc and tilted
integral image of pixel squares pSqr. The computations are performed in accordance with the following
formulas:where i,j are coordinates of the destination image pixels varying in the range i = 0 ,..., roiSize.height 1, j = 0,..., roiSize.width - 1;

sum = pSrc[ i + rect.x - rect.y + rect.height + rect.width, j + rect.x + rect.y - rect.height+ rect.width] - pSrc[i + rect.x - rect.y + rect.width, j + rect.x + rect.y + rect.width] pSrc[i + rect.x - rect.y + rect.height, j + rect.x - rect.y - rect.height] + pSrc[i + rect.x rect.y, j + rect.x + rect.y];sumSqr = pSqr[ i + rect.x - rect.y + rect.height + rect.width, j + rect.x + rect.y rect.height + rect.width] - pSqr[i + rect.x - rect.y + rect.width, j + rect.x + rect.y +rect.width] - pSqr[i + rect.x - rect.y + rect.height, j + rect.x - rect.y - rect.height] +pSqr[i + rect.x - rect.y, j + rect.x + rect.y];numPix = 2 * rect.height * rect.width.
The minimum size of each source images pSrc and pSqr should be (roiSize.width + rect.height +rect.width - 2) x (roiSize.height + rect.x + rect.y + rect.height + rect.width - 2).
The source images pSrc and pSqr can be obtained by using the functions ippiTiltedIntegral or
ippiTiltedSqrIntegral.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the specified pointers is NULL.

ippStsSizeErr
ippStsSizeErr

ippStsStepErr

ippStsNotEvenStepErr

Indicates an error condition if roiSize has a field with zero or
negative value.
Indicates an error condition if rect.width or rect.height isless than or equal to zero, or if rect.x or rect.y is less thanzero.
Indicates an error condition if srcStep or sqrStep is less than(roiSize.width+rect.x+rect.width+1) * <pixelSize>, ordstStep is less than roiSize.width * <pixelSize>.
Indicates an error condition if sqrStep is not divisible by 8, or
one of pSrc and dstStep is not divisible by 4.

HistogramGetBufferSize
Computes the size of the specification structure andwork buffer for the ippiHistogram function.

SyntaxIppStatus ippiHistogramGetBufferSize(IppDataType dataType, IppiSize roiSize, const int
nLevels[], int numChannels, int uniform, int* pSpecSize, int* pBufferSize);

1306

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
dataType
roiSizenLevels
numChannels
uniformpSpecSizepBufferSize

Data type of the source image. Supported values are: ipp8u,

ipp16u, ipp16s, and ipp32f.

Size of the source image ROI, in pixels.
Number of level values. Each channel has a separate number oflevels.
Number of image channels. Supported values are: 1, 3, and 4.
Type of levels distribution: 0 - with random step, 1 - withuniform step.
Pointer to the computed value of the specification structure
size, in bytes.
Pointer to the computed value of the external buffer size.

Description
The ippiHistogramGetBufferSize function computes the size of the histogram specification structure andthe size of the external work buffer (in bytes) needed for the Histogram function.
For an example on how to use this function, refer to the example provided with the Histogram function
description.

Return Values

ippStsNullPtrErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error when one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error when roiSize is less than, or equal to zero.

ippStsHistoNofLevelsErr

Indicates an error when the number of levels is less than 2.

ippStsNoErr

ippStsNumChannelsErr
ippStsDataTypeErr

Indicates an error when the numChannels value differs from 1,
3, or 4.
Indicates an error when the dataType value differs from ipp8u,
ipp16u, ipp16s, or ipp32f.

See Also
Histogram Computes the intensity histogram of an image.
HistogramGetLevels
Returns the array with level values stored in thespecification structure.

SyntaxIppStatus ippiHistogramGetLevels(const IppiHistogramSpec* pSpec, Ipp32f* pLevels[]);
1307

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSpec

Pointer to the specification structure.

pLevels

Pointer to the array of pointers to the level values vectors foreach channel.

Description
The ippiHistogramGetLevels function returns the level values stored in the histogram specification
structure.
For an example on how to use this function, refer to the example provided with the Histogram function
description.

Return Values

ippStsNullPtrErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error when one of the specified pointers is NULL.

ippStsBadArgErr

Indicates an error when the pSpec object is not initialized.

ippStsNoErr

See Also
Histogram Computes the intensity histogram of an image.
HistogramInit, HistogramUniformInit
Initializes the specification structure for theippiHistogram function.

SyntaxIppStatus ippiHistogramInit(IppDataType dataType, const Ipp32f* pLevels[], int
nLevels[], int numChannels, IppiHistogramSpec* pSpec);
IppStatus ippiHistogramUniformInit(IppDataType dataType, Ipp32f lowerLevel[], Ipp32f
upperLevel[], int nLevels[], int numChannels, IppiHistogramSpec* pSpec);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

1308

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Parameters
Data type of the source image. Supported values are: ipp8u,
ipp16u, ipp16s, and ipp32f.

dataType

lowerLevel

Pointer to the array of pointers to the level values vectors foreach channel.
Lower levels for uniform histogram, separate for each channel.

upperLevel

Upper levels for uniform histogram, separate for each channel.

pLevels

numChannels

Number of level values. Each channel has a separate number oflevels.
Number of image channels. Supported values are: 1, 3, and 4.

pSpec

Pointer to the specification structure.

nLevels

Description
The ippiHistogramInit function initializes the specification structure for the Histogram function.
For an example on how to use these functions, refer to the example provided with the Histogram function
description.

Return Values

ippStsNullPtrErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error when one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error when roiSize is less than, or equal to zero.

ippStsHistoNofLevelsErr

Indicates an error when the number of levels is less than 2.

ippStsNoErr

ippStsNumChannelsErr
ippStsDataTypeErr

Indicates an error when the numChannels value differs from 1,
3, or 4.
Indicates an error when the dataType value differs from ipp8u,
ipp16u, ipp16s, or ipp32f.

See Also
Histogram Computes the intensity histogram of an image.
Histogram
Computes the intensity histogram of an image.

SyntaxCase 1: One-channel data
IppStatus ippiHistogram_<mod>(const Ipp<dataType>* pSrc, int srcStep, IppiSize roiSize,
Ipp32u* pHist, const IppiHistogramSpec* pSpec, Ipp8u* pBuffer);
Supported values for mod:8u_C1R

16u_C1R

16s_C1R

32f_C1R

1309

1Intel® Integrated Performance Primitives Developer Guide and Reference

Case 2: Three-channel data
IppStatus ippiHistogram_<mod>(const Ipp<dataType>* pSrc, int srcStep, IppiSize roiSize,
Ipp32u* pHist[3], const IppiHistogramSpec* pSpec, Ipp8u* pBuffer);
Supported values for mod:8u_C3R

16u_C3R

16s_C3R

32f_C3R

Case 3: Four-channel data
IppStatus ippiHistogram_<mod>(const Ipp<dataType>* pSrc, int srcStep, IppiSize roiSize,
Ipp32u* pHist[4], const IppiHistogramSpec* pSpec, Ipp8u* pBuffer);
Supported values for mod:8u_C4R

16u_C4R

16s_C4R

32f_C4R

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source image ROI.

srcStep

Distance, in bytes, between the starting points of consecutive
lines in the source image.

roiSize

Size of the source image ROI, in pixels.

pHist

Pointer to the computed histogram. In case of multi-channel data,
pHist is an array of pointers to the histogram for each channel.

pSpec

Pointer to the specification structure.

pBuffer

Pointer to the work buffer.

Description
The ippiHistogram function operates with ROI (see Regions of Interest in Intel IPP).
This function computes the intensity histogram for each channel of the source image and stores the result in
the pHist array.
Before calling this function, initialize the specification structure using the HistogramInit orHistogramUniformInit functions. The specification structure defines the following parameters forhistogram calculation:•••

Histogram type: with uniform or random levels step
Number of levels
Level values

Length of the pHist array is defined by the nLevels parameter passed to the HistogramInit orHistogramUniformInit function.

1310

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

As nLevels is the number of levels, the number of values in the pHist array, which is the number ofhistogram bins, is nLevels - 1. The meaning of the pHist and pLevels values can be illustrated by thefollowing example: pHist[k] is the number of the source image pixels pSrc(x, y) that satisfy thecondition pLevels[k]<=pSrc(x, y)<pLevels(k+1).

Return Values

ippStsNullPtrErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error when one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error when roiSize has a zero or negative value.

ippStsStepErr

Indicates an error when srcStep is less thanroiSize.width*sizeOf(*pSrc)*nChannels.

ippStsBadArgErr

Indicates an error when the pSpec object is not initialized.

ippStsNoErr

ExampleThe code example below demonstrates how to use the HistogramGetBufferSize,
HistogramUniformInit, HistogramGetLevels, and Histogram functions.

void HistogramExample(){const int HEIGHT = 8;
const int WIDTH = 8;
Ipp8u pImg[WIDTH*HEIGHT];
IppiSize roi = {WIDTH, HEIGHT};
int i;
IppStatus sts;{// fill image with random values in [0..255] range with uniform distribution.
IppsRandUniState_8u* pRndObj;
int sizeRndObj;// get spec size
ippsRandUniformGetSize_8u( &sizeRndObj );pRndObj = (IppsRandUniState_8u*)ippsMalloc_8u( sizeRndObj );// initialize rnd spec
ippsRandUniformInit_8u(pRndObj, 0/*low*/, 255/*high*/, 0/*seed*/ );// fill imagefor ( i=0; i<HEIGHT; i++ ) {sts = ippsRandUniform_8u(pImg + i*WIDTH,}

WIDTH, pRndObj);

ippsFree( pRndObj );}printf_8u_2D("pImg:", pImg, roi, WIDTH, sts);{
const int nBins = 5;
int nLevels[] = { nBins+1 };Ipp32f lowerLevel[] = {0};Ipp32f upperLevel[] = {256};
Ipp32f pLevels[nBins+1], *ppLevels[1];int sizeHistObj, sizeBuffer;

1311

1

Intel® Integrated Performance Primitives Developer Guide and Reference

IppiHistogramSpec* pHistObj;
Ipp8u* pBuffer;
Ipp32u pHistVec[nBins];// get sizes for spec and buffer
ippiHistogramGetBufferSize(ipp8u, roi, nLevels, 1/*nChan*/, 1/*uniform*/, &sizeHistObj,&sizeBuffer);
pHistObj = (IppiHistogramSpec*)ippsMalloc_8u( sizeHistObj );pBuffer = (Ipp8u*)ippsMalloc_8u( sizeBuffer );// initialize spec
ippiHistogramUniformInit( ipp8u, lowerLevel, upperLevel, nLevels, 1, pHistObj );// check levels of bins
ppLevels[0] = pLevels;
sts = ippiHistogramGetLevels( pHistObj, ppLevels );printf_32f( "pLevels:", pLevels, nBins+1, sts );// calculate histogram
sts = ippiHistogram_8u_C1R( pImg, WIDTH, roi, pHistVec, pHistObj, pBuffer );ippsFree( pHistObj );ippsFree( pBuffer );printf_32u( "Histogram:", pHistVec, nBins, sts );}}Output:pImg:
0 33 53 102 90 188 210 60
195 137 247 137 7 15 65 244
149 44 210 20 170 140 183 144
133 61 191 32 212 108 178 89
86 30 54 93 168 93 2 114
30 145 216 42 86 113 148 205
148 181 217 99 219 31 156 156
237 36 74 80 208 121 118 106
pLevels:
0.0 51.0 102.0 153.0 204.0 255.0
Histogram:
13 14 16 10 11

See Also
Regions of Interest in Intel IPP
Histogram Computes the intensity histogram of an image.
HistogramGetBufferSize Computes the size of the specification structure and work buffer for theippiHistogram function.
HistogramGetLevels Returns the array with level values stored in the specification structure.
HistogramInit, HistogramUniformInit Initializes the specification structure for the ippiHistogram
function.

1312

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

CountInRange
Computes the number of pixels within the given
intensity range.

SyntaxCase 1: Operation on one-channel data
IppStatus ippiCountInRange_<mod>(const Ipp<datatype>* pSrc, int srcStep, IppiSize
roiSize, int* counts, Ipp<datatype> lowerBound, Ipp<datatype> upperBound);Supported values for mod:8u_C1R

32f_C1R

Case 2: Operation on multi-channel data
IppStatus ippiCountInRange_<mod>(const Ipp<datatype>* pSrc, int srcStep, IppiSize
roiSize, int counts[3], Ipp<datatype> lowerBound[3], Ipp<datatype> upperBound[3]);Supported values for mod:8u_C3R

32f_C3R

8u_AC4R

32f_AC4R

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc
srcStep
roiSize

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
Size of the source ROI in pixels.

lowerBoundThe computed number of pixels within the given intensity
range. An array of 3 values in case of multi-channel data.
Lower limit of the intensity range.

upperBound

Upper limit of the intensity range.

countsDescription
This function operates with ROI (see Regions of Interest in Intel IPP). This function computes the number ofpixels in the image which have intensity values in the range between lowerBound and upperBound(inclusive).
In case of a multi-channel image, pixels are counted within intensity range for each color channel separately,
and the array counts of three resulting values is returned. The alpha channel values, if present, are notprocessed.

1313

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Return Values
Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pSrc pointer is NULL.

ippStsNoErr
ippStsNullPtrErr

Indicates an error condition if roiSize has a field with zero or
negative value.
Indicates an error condition if srcStep has a zero or negativevalue.
Indicates an error condition if lowerBound exceeds upperBound.

ippStsSizeErr
ippStsStepErr
ippStsRangeErr

BlockMinMax
Finds minimum and maximum values for blocks of animage.

SyntaxIppStatus ippiBlockMinMax_<dataType>_C1R(const Ipp<dataType>* pSrc, int srcStep,
IppiSize srcSize, Ipp<dataType>* pDstMin, int dstMinStep, Ipp<dataType>* pDstMax, int
dstMaxStep, IppiSize blockSize, Ipp<dataType>* pGlobalMin, Ipp<dataType>* pGlobalMax);
Supported values for dataType:

8u

16u

16s

32f

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source image ROI.

srcStep

Distance, in bytes, between the starting points of consecutive lines inthe source image.

srcSizeSize, in pixels, of the source image.

pDstMin

Pointer to the destination image to store minimum values per block.

dstMinStep

Distance, in bytes, between the starting points of consecutive lines in
the pDstMin image.

pDstMax

Pointer to the destination image to store maximum values per block.

dstMaxStep

Distance, in bytes, between the starting points of consecutive lines in
the pDstMax image.

blockSize

Size, in pixels, of the image block.

pGlobalMin

Destination pointer to the minimum value for the entire source image.

1314

Developer Guide and Reference for Intel® Integrated Performance Primitives

pGlobalMax

1

Destination pointer to the maximum value for the entire source image.

Description
This function operates with ROI.
This function finds minimum and maximum values for blocks of the source image, which are defined by theblockSize parameter. Minimum and maximum values for blocks are stored in the pDstMin and pDstMax
images, respectively. Minimum and maximum values for the entire image are stored in the pGlobalMin and
pGlobalMax pointers, respectively.
If pDstMin or pDstMax pointer is NULL, the corresponding component (minimum or maximum value) is not
calculated.
The size of the pDstMin and pDstMax images is calculated by the following formulae:•

if srcWidth is divisible by blockWidth, the destination width is equal to:

dstWidth=srcWidth/blockWidthotherwise:•

dstWidth=srcWidth/blockWidth+1
if srcHeight is divisible by blockHeight, the destination height is equal to:
dstHeight=srcHeight/blockHeight
otherwise:

dstHeight=srcHeight/blockHeight+1

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrc, pDstMin, and pDstMax pointers are
NULL.

ippStsStepErr

Indicates an error when:••ippStsSizeErr

srcStep is less than srcSize.width*<pixelSize>
dstMinStep or dstMaxStep is less than
dstSize.width*<pixelSize>

Indicates an error when srcSize or blockSize has a zero or
negative value.

See Also
Regions of Interest in Intel IPP
Min
Computes the minimum of image pixel values.

1315

1

Intel® Integrated Performance Primitives Developer Guide and Reference

SyntaxCase 1: Operation on one-channel data
IppStatus ippiMin_<mod>(const Ipp<datatype>* pSrc, int srcStep, IppiSize roiSize,Ipp<datatype>* pMin);
Supported values for mod:8u_C1R

16u_C1R

16s_C1R

32f_C1R

Case 2: Operation on multi-channel data
IppStatus ippiMin_<mod>(const Ipp<datatype>* pSrc, int srcStep, IppiSize roiSize,Ipp<datatype> min[3]);Supported values for mod:8u_C3R

16u_C3R

16s_C3R

32f_C3R

8u_AC4R

16u_AC4R

16s_AC4R

32f_AC4R

IppStatus ippiMin_<mod>(const Ipp<datatype>* pSrc, int srcStep, IppiSize roiSize,Ipp<datatype> min[4]);Supported values for mod:8u_C4R

16u_C4R

16s_C4R

32f_C4R

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source image ROI.

roiSize

Distance in bytes between starts of consecutive lines in thesource image.
Size of the source ROI in pixels.

pMin

Pointer to the minimum pixel value (for one-channel data).

min

Array containing minimum channel values of pixels in thesource buffer (for multi-channel data).

srcStep

Description
This function operates with ROI (see Regions of Interest in Intel IPP). This function computes the minimum
pixel value pMin for the source image pSrc. In case of a multi-channel image, the minimum is computed
over each channel and stored in the array min.

1316

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Return Values
ippStsNoErr
ippStsNullPtrErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pSrc or pMin pointer is NULL.
Indicates an error condition if roiSize has a field with zero or
negative value.

ippStsSizeErr

ExampleThe code example below demonstrates how to use the function ippiMin.

Ipp8u src[4*1] = { 40, 20, 60, 80 };IppiSize roiSize = { 4, 1 };Ipp8u min;ippiMin_8u_C1R ( src, 4, roiSize, &min );Result:min = 20MinIndx
Computes the minimum of image pixel values andretrieves the x and y coordinates of pixels withminimal intensity values.

SyntaxCase 1: Operation on one-channel data
IppStatus ippiMinIndx_<mod>(const Ipp<datatype>* pSrc, int srcStep, IppiSize roiSize,Ipp<datatype>* pMin, int* pIndexX, int* pIndexY);
Supported values for mod:8u_C1R

16u_C1R

16s_C1R

32f_C1R

Case 2: Operation on multi-channel data
IppStatus ippiMinIndx_<mod>(const Ipp<datatype>* pSrc, int srcStep, IppiSize roiSize,Ipp<datatype> min[3], int indexX[3], int indexY[3]);Supported values for mod:8u_C3R

16u_C3R

16s_C3R

32f_C3R

8u_AC4R

16u_AC4R

16s_AC4R

32f_AC4R

IppStatus ippiMinIndx_<mod>(const Ipp<datatype>* pSrc, int srcStep, IppiSize roiSize,Ipp<datatype> min[4], int indexX[4], int indexY[4]);Supported values for mod:8u_C4R

16u_C4R

16s_C4R

32f_C4R

Include Files
ippi.h1317

1Intel® Integrated Performance Primitives Developer Guide and Reference

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
Pointer to the source image ROI.

pSrc

roiSize

Distance in bytes between starts of consecutive lines in thesource image.
Size of the source ROI in pixels.

pMin

Pointer to the minimum pixel value (for one-channel data).

srcStepminpIndexX, pIndexY
indexX, indexY

Array containing minimum color channel values of pixels in thesource buffer (for multi-channel data).
Pointers to the x and y coordinates of the pixel with minimum
value.
Arrays containing the x and y coordinates of pixels withminimum channel values.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function computes the minimum pixel value pMin for the source image pSrc. In case of a multi-channel
image, the minimum is computed over each channel and stored in the array min. The function also retrieves
the x and y coordinates of pixels on which the minimum is reached. If several pixels have equal minimum
values, the coordinates of the first pixel from the start of the source buffer is returned. For multi-channel
data, indexX[k] and indexY[k] are the x and y coordinates of the pixel that has the minimal intensity
value of the k-th channel, k = 1,2,3,4.

Return Values
ippStsNoErr
ippStsNullPtrErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of pSrc,pMin, pIndexX, or
pIndexY pointers is NULL.
Indicates an error condition if roiSize has a field with zero or
negative value.

ippStsSizeErr

Max
Computes the maximum of image pixel values.

SyntaxCase 1: Operation on one-channel data
IppStatus ippiMax_<mod>(const Ipp<datatype>* pSrc, int srcStep, IppiSize roiSize,Ipp<datatype>* pMax);
Supported values for mod:8u_C1R

1318

16u_C1R

16s_C1R

32f_C1R

1Developer Guide and Reference for Intel® Integrated Performance Primitives

Case 2: Operation on multi-channel data
IppStatus ippiMax_<mod>(const Ipp<datatype>* pSrc, int srcStep, IppiSize roiSize,Ipp<datatype> max[3]);Supported values for mod:8u_C3R

16u_C3R

16s_C3R

32f_C3R

8u_AC4R

16u_AC4R

16s_AC4R

32f_AC4R

IppStatus ippiMax_<mod>(const Ipp<datatype>* pSrc, int srcStep, IppiSize roiSize,Ipp<datatype> max[4]);Supported values for mod:8u_C4R

16u_C4R

16s_C4R

32f_C4R

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source image ROI.

roiSize

Distance in bytes between starts of consecutive lines in thesource image.
Size of the source ROI in pixels

pMax

Pointer to the maximum pixel value (for one-channel data).

max

Array containing maximum channel values of pixels in thesource buffer (for multi-channel data).

srcStep

Description
This function operates with ROI (see Regions of Interest in Intel IPP). This function computes the maximum
pixel value pMax for the source image pSrc. In case of a multi-channel image, the maximum is computed
over each channel and stored in the array max.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error or awarning.

ippStsNullPtrErr

Indicates an error condition if pSrc or pMax pointer is NULL.

ippStsSizeErr

Indicates an error condition if roiSize has a field with zero or
negative value.

1319

1

Intel® Integrated Performance Primitives Developer Guide and Reference

MaxIndx
Computes the maximum of image pixel values andretrieves the x and y coordinates of pixels withmaximal intensity values.

SyntaxCase 1: Operation on one-channel data
IppStatus ippiMaxIndx_<mod>(const Ipp<datatype>* pSrc, int srcStep, IppiSize roiSize,Ipp<datatype>* pMax, int* pIndexX, int* pIndexY);
Supported values for mod:8u_C1R

16u_C1R

16s_C1R

32f_C1R

Case 2: Operation on multi-channel data
IppStatus ippiMaxIndx_<mod>(const Ipp<datatype>* pSrc, int srcStep, IppiSize roiSize,Ipp<datatype> max[3], int indexX[3], int indexY[3]);Supported values for mod:8u_C3R

16u_C3R

16s_C3R

32f_C3R

8u_AC4R

16u_AC4R

16s_AC4R

32f_AC4R

IppStatus ippiMaxIndx_<mod>(const Ipp<datatype>* pSrc, int srcStep, IppiSize roiSize,Ipp<datatype> max[4], int indexX[4], int indexY[4]);Supported values for mod:8u_C4R

16s_C4R

16u_C4R

32f_C4R

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source image ROI.

roiSize

Distance in bytes between starts of consecutive lines in thesource image.
Size of the source ROI in pixels.

pMax

Pointer to the maximum pixel value (for one-channel data).

srcStep

max
pIndexX, pIndexY

1320

Array containing maximum channel values of pixels in thesource buffer (for multi-channel data).
Pointers to the x and y coordinates of the pixel with maximum
value.

Developer Guide and Reference for Intel® Integrated Performance Primitives

indexX, indexY

1

Arrays containing the x and y coordinates of pixels withmaximum channel values.

Description
This function operates with ROI (see Regions of Interest in Intel IPP). This function computes the maximum
pixel value pMax for the source image pSrc. In case of a multi-channel image, the maximum is computed
over each channel and stored in the array max. The function also retrieves the x and y coordinates of pixels
on which the maximum is reached. If several pixels have equal maximum values, the coordinates of the firstpixel from the start of the source buffer is returned. For multi-channel data, indexX[k]and indexY[k]arethe x and y coordinates of the pixel that has the maximal intensity value of the k-th channel, k =1,2,3,4.

Return Values
ippStsNoErr
ippStsNullPtrErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if any of pSrc,pMax, pIndexX, or
pIndexY pointers is NULL.
Indicates an error condition if roiSize has a field with zero or
negative value.

ippStsSizeErr

ExampleThe code example below demonstrates how to use the function ippiMaxIndx.

Ipp8u src[4*1] = { 40, 20, 60, 80 };IppiSize roiSize = { 4, 1 };Ipp8u max;
int IndexX;
int IndexY;
ippiMaxIndx_8u_C1R ( src, 4, roiSize, &max, &IndexX, &IndexY );Output:max = 80

IndexX = 3 IndexY = 0

MinMaxComputes the minimum and maximum of image pixel
values.

SyntaxCase 1: Operation on one-channel data
IppStatus ippiMinMax_<mod>(const Ipp<datatype>* pSrc, int srcStep, IppiSize roiSize,Ipp<datatype>* pMin, Ipp<datatype>* pMax);
Supported values for mod:8u_C1R

16u_C1R

16s_C1R

32f_C1R

1321

1Intel® Integrated Performance Primitives Developer Guide and Reference

Case 2: Operation on multi-channel data
IppStatus ippiMinMax_<mod>(const Ipp<datatype>* pSrc, int srcStep, IppiSize roiSize,Ipp<datatype> min[3], Ipp<datatype> max[3]);Supported values for mod:8u_C3R

16u_C3R

16s_C3R

32f_C3R

8u_AC4R

16u_AC4R

16s_AC4R

32f_AC4R

IppStatus ippiMinMax_<mod>(const Ipp<datatype>* pSrc, int srcStep, IppiSize roiSize,Ipp<datatype> min[4], Ipp<datatype> max[4]);Supported values for mod:8u_C4R

16u_C4R

16s_C4R

32f_C4R

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc
srcStep
roiSizepMin, pMax
min, max

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
Size of the source ROI in pixels.
Pointers to the minimum and maximum pixel values (for onechannel data).
Arrays containing minimum and maximum channel values ofpixels in the source buffer (for multi-channel data).

Description
This function operates with ROI (see Regions of Interest in Intel IPP). This function computes the minimum
and maximum pixel values pMin and pMax for the source image pSrc. In case of a multi-channel image,the minimum and maximum is computed over each channel and stored in the arrays min and max.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

1322

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pSrc, pMin, or pMax pointer is

NULL.

Indicates an error condition if roiSize has a field with zero or
negative value.

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

MinMaxIndx
Calculates minimum and maximum pixel values andtheir indexes in selected image rectangle.

SyntaxCase 1: Operation on one-channel data
IppStatus ippiMinMaxIndx_<mod>(const Ipp<datatype>* pSrc, int srcStep, IppiSize
roiSize, Ipp32f* pMinVal, Ipp32f* pMaxVal, IppiPoint* pMinIndex, IppiPoint* pMaxIndex);
Supported values for mod:8u_C1R

16u_C1R

32f_C1R

Case 2: Masked operation on one-channel data
IppStatus ippiMinMaxIndx_<mod>(const Ipp<datatype>* pSrc, int srcStep, const Ipp8u*
pMask, int maskStep, IppiSize roiSize, Ipp32f* pMinVal, Ipp32f* pMaxVal, IppiPoint*
pMinIndex, IppiPoint* pMaxIndex);
Supported values for mod:8u_C1MR

16u_C1MR

32f_C1MR

Case 3: Operation on multi-channel data
IppStatus ippiMinMaxIndx_<mod>(const Ipp<datatype>* pSrc, int srcStep, IppiSize
roiSize, int coi, Ipp32f* pMinVal, Ipp32f* pMaxVal, IppiPoint* pMinIndex, IppiPoint*
pMaxIndex);
Supported values for mod:8u_C3CR

16u_C3CR

32f_C3CR

Case 4: Masked operation on multi-channel data
IppStatus ippiMinMaxIndx_<mod>(const Ipp<datatype>* pSrc, int srcStep, const Ipp8u*
pMask, int maskStep, IppiSize roiSize, int coi, Ipp32f* pMinVal, Ipp32f* pMaxVal,
IppiPoint* pMinIndex, IppiPoint* pMaxIndex);
Supported values for mod:8u_C3CMR

16u_C3CMR

32f_C3CMR

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc

Pointer to the source image ROI.

1323

1

Intel® Integrated Performance Primitives Developer Guide and Reference

srcSteppMask

Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the mask image.

roiSize

Distance in bytes between starts of consecutive lines in themask image.
Size of the image ROI in pixels.

coi

Channel of interest (for color images only); can be 1, 2, or 3.

maskSteppMinValpMaxValpMinIndex
pMaxIndex

Pointer to the variable that returns the value of the minimum
pixel.
Pointer to the variable that returns the value of the maximum
pixel.
Pointer to the variable that returns the index of the minimum
value found.
Pointer to the variable that returns the index of the maximum
value found.

Description
This function operates with ROI (see Regions of Interest in Intel IPP). This function finds minimum andmaximum pixel values and their indexes in an image ROI or in an arbitrary image region defined by nonzero
mask values. If there are several minima and maxima in the selected area, the function returns the top
leftmost positions. If the specified region in the mask mode is empty, that is, the mask image is filled withzeros, then the function returns {minIndex, maxIndex} = {0, 0}, minVal=maxVal= 0. If any of theparameters pMinVal, pMaxVal, pMinIndex,or pMaxIndex is not required, the zero pointer is to be passed
to the corresponding parameter.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsStepErr
ippStsNotEvenStepErr
ippStsCOIErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pSrc or pMask pointer is NULL.
Indicates an error condition if roiSize has a field with zero or
negative value.
Indicates an error for masked operations when srcStep or
maskStep is less than roiSize.width * <pixelSize> .
Indicates an error when steps for floating-point images cannot
be divided by 4.
Indicates an error when coi is not 1, 2, or 3.

MaxEveryComputes maximum value for each pair of pixels of
two images.

SyntaxCase 1: Not-in-place operation
IppStatus ippiMaxEvery_8u_C1R(const Ipp8u* pSrc1, int src1Step, const Ipp8u* pSrc2, int
src2Step, Ipp8u* pDst, int dstStep, IppiSize roiSize);
IppStatus ippiMaxEvery_16u_C1R(const Ipp16u* pSrc1, int src1Step, const Ipp16u* pSrc2,
int src2Step, Ipp16u* pDst, int dstStep, IppiSize roiSize);1324

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

IppStatus ippiMaxEvery_32f_C1R(const Ipp32f* pSrc1, int src1Step, const Ipp32f* pSrc2,
int src2Step, Ipp32f* pDst, int dstStep, IppiSize roiSize);

Case 2: In-place operation
IppStatus ippiMaxEvery_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>*pSrcDst, int srcDstStep, IppiSize roiSize);
Supported values for mod:8u_C1IR

16u_C1IR

16s_C1IR

32f_C1IR

8u_C3IR

16u_C3IR

16s_C3IR

32f_C3IR

8u_C4IR

16u_C4IR

16s_C4IR

32f_C4IR

8u_AC4IR

16u_AC4IR

16s_AC4IR

32f_AC4IR

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters

pDst

Pointer to the first and second source image, respectively (fornot-in-place operation).
Distance, in bytes, between the starting points of consecutive
lines in the first and second source image, respectively (fornot-in-place operation).
Pointer to the destination image (for not-in-place operation).

pSrc

Pointer to the first source image ROI (for in-place operation).

pSrc1, pSrc2
src1Step, src2Step

srcStep
dstStep
pSrcDstsrcDstStep

roiSize

Distance, in bytes, between the starting points of consecutive
lines in the first source image (for in-place operation).
Distance, in bytes, between the starting points of consecutive
lines in the destination image.
Pointer to the second source and destination image ROI (for inplace operation).
Distance, in bytes, between the starting points of consecutive
lines in the second source and destination image (for in-place
operation).
Size of the image ROI in pixels.

Description
This function operates with ROI (seeRegions of Interest in Intel IPP).
Not-in-place operation:
This function computes the maximum value for each pair of the corresponding pixels of two source images(pSrc1 and pSrc2 for not-in-place operation or pSrc and pSrcDst for in-place), and stores the result in
pDst.
In-place operation:

1325

1

Intel® Integrated Performance Primitives Developer Guide and ReferenceThis function computes the maximum value for each pair of the corresponding pixels of two source images
pSrc and pSrcDst, and stores the result in pSrcDst:

pSrcDst(i, j) = max(pSrc( i,j), pSrcDst(i, j)).

Return Values
ippStsNoErr
ippStsNullPtrErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointers is
NULL.
Indicates an error condition if roiSize has a field with zero or
negative value.
Indicates an error condition if srcStep, src1Step, src2Step or
srcDstStep is less than roiSize.width*<pixelSize>.

ippStsSizeErr
ippStsStepErr
ippStsNotEvenStepErr

Indicates an error condition if one of step values for floatingpoint images are not divisible by 4.

MinEveryComputes minimum value for each pair of pixels of
two images.

SyntaxCase 1: Not-in-place operation
IppStatus ippiMinEvery_8u_C1R(const Ipp8u* pSrc1, int src1Step, const Ipp8u* pSrc2, int
src2Step, Ipp8u* pDst, int dstStep, IppiSize roiSize);
IppStatus ippiMinEvery_16u_C1R(const Ipp16u* pSrc1, int src1Step, const Ipp16u* pSrc2,
int src2Step, Ipp16u* pDst, int dstStep, IppiSize roiSize);
IppStatus ippiMinEvery_32f_C1R(const Ipp32f* pSrc1, int src1Step, const Ipp32f* pSrc2,
int src2Step, Ipp32f* pDst, int dstStep, IppiSize roiSize);

Case 2: In-place operation
IppStatus ippiMinEvery_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>*pSrcDst, int srcDstStep, IppiSize roiSize);
Supported values for mod:8u_C1IR

16u_C1IR

16s_C1IR

32f_C1IR

8u_C3IR

16u_C3IR

16s_C3IR

32f_C3IR

8u_C4IR

16u_C4IR

16s_C4IR

32f_C4IR

8u_AC4IR

16u_AC4IR

16s_AC4IR

32f_AC4IR

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

1326Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Parameters

pDst

Pointer to the first and second source image, respectively (fornot-in-place operation).
Distance, in bytes, between the starting points of consecutive
lines in the first and second source image, respectively (fornot-in-place operation).
Pointer to the destination image (for not-in-place operation).

pSrc

Pointer to the first source image ROI (for in-place operation).

pSrc1, pSrc2
src1Step, src2Step

srcStep
pSrcDstdstStep
srcDstStep

roiSize

Distance, in bytes, between the starting points of consecutive
lines in the first source image (for in-place operation).
Pointer to the second source and destination image ROI (for inplace operation).
Distance, in bytes, between the starting points of consecutive
lines in the destination image.
Distance, in bytes, between the starting points of consecutive
lines in the second source and destination image (for in-place
operation).
Size of the image ROI in pixels.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
Not-in-place operation:
This function computes the minimum value for each pair of the corresponding pixels of two source images(pSrc1 and pSrc2 for not-in-place operation or pSrc and pSrcDst for in-place), and stores the result in
pDst.
In-place operation:
This function computes the minimum value for each pair of the corresponding pixels of two source images
pSrc and pSrcDst, and stores the result in pSrcDst:

pSrcDst(i, j) = min(pSrc( i,j), pSrcDst(i, j)).

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsStepErr
ippStsNotEvenStepErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointers is
NULL.
Indicates an error condition if roiSize has a field with zero or
negative value.
Indicates an error condition if srcStep, src1Step, src2Step or
srcDstStep is less than roiSize.width*<pixelSize>.
Indicates an error condition if one of step values for floatingpoint images are not divisible by 4.

FindPeaks3x3GetBufferSize
Computes the size of the working buffer for the peaksearch.

1327

1Intel® Integrated Performance Primitives Developer Guide and Reference

SyntaxIppStatus ippiFindPeaks3x3GetBufferSize_32s_C1R(int roiWidth, int* pBufferSize);
IppStatus ippiFindPeaks3x3GetBufferSize_32f_C1R(int roiWidth, int* pBufferSize);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
roiWidth

Maximum width of the image, in pixels.

pBufferSize

Pointer to the size of the working buffer.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function computes the size of the working buffer required for the function ippiFindPeaks3x3. The buffer
with the length pBufferSize[0] can be used to filter images with width that is less than or equal toroiWidth.
Example "Simplified Peak Search for Calculation of SIFT Features” shows how to use the function
ippiFindPeaks3x3GetBufferSize_32f_C1R.

Return Values

ippStsNullPtrErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if the pointer pBufferSize is NULL.

ippStsSizeErr

Indicates an error condition if roiWidth is less than 1.

ippStsNoErr

FindPeaks3x3
Finds coordinates of peaks (maximums or minimums)
with absolute value exceeding threshold value.

SyntaxIppStatus ippiFindPeaks3x3_32s_C1R(const Ipp32s* pSrc, int srcStep, IppiSize roiSize,
Ipp32s threshold, IppiPoint* pPeak, int maxPeakCount, int* pPeakCount, IppiNorm norm,
int border, Ipp8u* pBuffer);
IppStatus ippiFindPeaks3x3_32f_C1R(const Ipp32f* pSrc, int srcStep, IppiSize roiSize,
Ipp32f threshold, IppiPoint* pPeak, int maxPeakCount, int* pPeakCount, IppiNorm norm,
int border, Ipp8u* pBuffer);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h

1328

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc

Pointer to the first source image ROI.

roiSize

Distance in bytes between starts of consecutive lines in the firstsource image.
Size of the image ROI in pixels.

thresholdThreshold value.

pPeak

Pointer to the coorditanes peaks [maxPeakCount].

maxPeakCount

Maximum number of peaks.

pPeakCount

Pointer to the number of the detected peaks.

borderBorder value, only pixel with distance from the edge of theimage greater than border are processed.

norm

Specifies type of the norm to form the mask for extremum
search:srcStep

ippiNormInf
ippiNormL1

pBufferInfinity norm (8-connectivity, 3x3
rectangular mask);
L1 norm (4-connectivity, 3x3 crossmask).

Pointer to the working buffer.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function detects local maximum and minimum pixels in the source image:and stores their coordinates in the pPeak array pPeak[m].x = jm, pPeak[m].y = im, m = 0, ...
pPeakCount[0], pPeakCount[0] ≤maxPeakCountThe neighborhood O(i, j) for the extremum search is defined by the parameter norm. The number ofdetected extremums is returned in pPeakCount[0]. The operation is stopped when the maxPeakCount
extremums are found.
The function requires the working buffer pBuffer whose size should be computed by the function
ippiFindPeaks3x3GetBufferSize beforehand.

Return Values
ippStsNoErr
ippStsNullPtrErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointers is
NULL.

1329

1

Intel® Integrated Performance Primitives Developer Guide and ReferenceippStsSizeErr

ippStsStepErr
ippStsNotEvenStepErr

Indicates an error condition if roiSize has a field with zero or
negative value; or if maxPeakCount is less than or equal to 0; or
if border is less than 1 or greater than one of
0.5*roiSize.width or of 0.5*roiSize.height.
Indicates an error condition if srcStep is less thanroiSize.width*<pixelSize>.

Indicates an error condition if srcStep is not divisible by 4.

ExampleImage Moments
Spatial and central moments are important statistical properties of an image. The spatial moment MU (m,n) oforder (m,n) is defined as follows:

where the summation is performed for all rows and columns in the image; Pj,k are pixel values; xk and yj
are pixel coordinates; m and n are integer power exponents that define the moment order.
The central moment UU ( m,n) is the spatial moment computed relative to the “center of gravity” (x0, y0):where x0 = MU (1,0)/ MU(0,0) and y0 = MU(0,1)/ MU(0,0).
The normalized spatial moment M(m,n) and central moment U(m, n) are defined as follows:

The Intel IPP functions support moments of order (m, n) with 0 ≤ m + n ≤ 3. The computation of seveninvariant Hu moments derived from the second and third order moments is also supported. All computed
moments are stored in context structures of type IppiMomentState_64s (for integer versions)or
IppiMomentState_64f (for floating point versions).
Most Intel IPP functions for computing image moments have code branches that implement different
algorithms to compute the results. You can choose the desired code variety to be used by the given function
by setting the hint argument to one of the following values that are listed in Table “Hint Arguments for
Image Moment Functions”:
Hint Arguments for Image Moment Functions
Value

Description

ippAlgHintNone

The computation algorithm will be chosen by the internalfunction logic.
Fast algorithm must be used. The output results will beless accurate.

ippAlgHintFast

1330

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Value

Description

ippAlgHintAccurateHigh accuracy algorithm must be used. The function willneed more time to execute.

MomentGetStateSize
Computes the size of the external buffer for the
moment context structure.

SyntaxIppStatus ippiMomentGetStateSize_64f(IppHintAlgorithm hint, int* pSize);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSize

Pointer to the computed value of the buffer size.

hint

Option to select the algorithmic implementation of the function.

Description
Use this function to determine the size of the external work buffer for the moment context structure to be
initialized by the function ippiMomentInit. Computation algorithm is specified by hint argument (see Table“Hint Arguments for Image Moment Functions”).

Return Values
ippStsNoErr
ippStsNullPtrErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pSize pointer is NULL.

MomentInit
Initializes the moment context structure.

SyntaxIppStatus ippiMomentInit_64f(IppiMomentState_64f* pState, IppHintAlgorithm hint);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

1331

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Parameters
pStatePointer to the structure for storing moment values.

hint

Option to select the algorithmic implementation of the function.

Description
This function initializes the structure that is needed for the function ippiMoments to store the computed
image moments. Computation algorithm is specified by hint argument (see Table “Hint Arguments for
Image Moment Functions”).
The structure is allocated in the external buffer. The size of this buffer can be computed by the function
ippiMomentGetStateSize.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error or awarning.

ippStsNullPtrErr

Indicates an error condition if pState pointer is NULL.

Moments
Computes all image moments of order 0 to 3 and Hu
moment invariants.

SyntaxCase 1: Computation of floating-point results
IppStatus ippiMoments64f_<mod>(const Ipp<datatype>* pSrc, int srcStep, IppiSize
roiSize, IppiMomentState_64f* pCtx);
Supported values for mod:8u_C1R

16u_C1R

32f_C1R

8u_C3R

16u_C3R

32f_C3R

8u_AC4R

16u_AC4R

32f_AC4R

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source image ROI.

roiSize

Distance in bytes between starts of consecutive lines in thesource image.
Size of the source ROI in pixels.

pCtx

Pointer to the structure that stores image moments.

srcStep1332

1Developer Guide and Reference for Intel® Integrated Performance Primitives

Description
This function operates with ROI (see Regions of Interest in Intel IPP). This function computes all spatial andcentral moments of order 0 to 3 for the source image pSrc. The seven Hu moment invariants are also
computed. Different functions, ippiMoments64s and ippiMoments64f, are used to compute image
moments in integer and floating-point formats, respectively.
The ippiMoments function computes spatial moment values relative to the image point referred to by pSrc.
Note that this point is the ROI origin and may not coincide with the entire image origin. If you need to obtainspatial moment values relative to the actual image origin, use ippiGetSpatialMoment functions to recalculatethem.
The moments' values are stored in the pCtx structure. To retrieve a particular moment value, use one of thefunctions described in the sections that follow.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsStepErr
ippStsContextMatchErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pSrc or pCtxpointer is NULL.
Indicates an error condition if roiSize has a field with zero or
negative value.
Indicates an error condition if srcStep has a zero or negativevalue.
Indicates an error condition if a pointer to an invalid structure
is passed.

GetSpatialMoment
Retrieves image spatial moment of the specified order,
computed by ippiMoments.

SyntaxIppStatus ippiGetSpatialMoment_64f(const IppiMomentState_64f* pState, int mOrd, int
nOrd, int nChannel, IppiPoint roiOffset, Ipp64f* pValue);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pStatePointer to the structure that stores image moments.

mOrd, nOrd

Integer power exponents defining the moment order. Thesearguments must satisfy the condition 0 ≤mOrd+nOrd≤ 3.

nChannel

The channel for which the moment is returned.

roiOffset
pValueOffset in pixels of the ROI origin (top left corner) from theimage origin.
Pointer to the retrieved moment value.

1333

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Description
This function returns the pointer pValue to the spatial moment that was previously computed by theippiMoments function. All spatial moment values are computed by ippiMoments relative to the image ROI
origin. You may also obtain spatial moment values relative to different point in the image, using theappropriate roiOffset settings.
The moment order is specified by the integer exponents mOrd, nOrd.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsContextMatchErr
ippStsSizeErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pState or pValue pointer is NULL.
Indicates an error condition if a pointer to an invalid structure
is passed.
Indicates an error condition if mOrd + nOrd is greater than 3, or
nChannel has an illegal value.

GetCentralMoment
Retrieves image central moment computed byippiMoments.

SyntaxIppStatus ippiGetCentralMoment_64f(const IppiMomentState_64f* pState, int mOrd, int
nOrd, int nChannel, Ipp64f* pValue);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pStateThe structure that stores image moments.

mOrd, nOrd

Integer power exponents defining the moment order. Thesearguments must satisfy the condition 0 ≤mOrd+nOrd≤ 3.

nChannel

The channel for which the moment is returned.

pValuePointer to the returned moment value.

Description
This function returns the pointer pValue to the central moment previously computed by the ippiMomentsfunction. The moment order is specified by the integer exponents mOrd, nOrd.

Return Values
ippStsNoErr

1334

Indicates no error. Any other value indicates an error or awarning.

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

ippStsNullPtrErr
ippStsContextMatchErr
ippStsSizeErr

Indicates an error condition if pState or pValue pointer is NULL.
Indicates an error condition if a pointer to an invalid structure
is passed.
Indicates an error condition if mOrd + nOrd is greater than 3, or
nChannel has an illegal value.

GetNormalizedSpatialMoment
Retrieves the normalized value of the image spatial
moment computed by ippiMoments.

SyntaxIppStatus ippiGetNormalizedSpatialMoment_64f(const IppiMomentState_64f* pState, int
mOrd, int nOrd, int nChannel, IppiPoint roiOffset, Ipp64f* pValue);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pStateThe structure that stores image moments.

mOrd, nOrd

Integer power exponents defining the moment order. Thesearguments must satisfy the condition 0 ≤mOrd+nOrd≤ 3.

nChannel

The channel for which the moment is returned.

roiOffset
pValueOffset in pixels of the ROI origin (top left corner) from theimage origin.
Pointer to the returned normalized moment value.

Description
This function normalizes the spatial moment value that was previously computed by the ippiMomentsfunction, and returns the pointer pValue to the normalized moment. See Image Moments for details of
moments normalization. The moment order (mOrd, nOrd) is specified by integer power exponents. All
spatial moment values are computed by ippiMoments relative to the image ROI origin. You may also obtainnormalized spatial moment values relative to different point in the image, using the appropriate roiOffset
settings.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error or awarning.

ippStsNullPtrErr

Indicates an error condition if pState or pValue pointer is NULL.

ippStsContextMatchErr
ippStsMoment00ZeroErr

Indicates an error condition if a pointer to an invalid structure
is passed.
Indicates an error condition if M(0,0) value is close to zero.

1335

1

Intel® Integrated Performance Primitives Developer Guide and ReferenceippStsSizeErr

Indicates an error condition if mOrd + nOrd is greater than 3, or
nChannel has an illegal value.

GetNormalizedCentralMoment
Retrieves the normalized value of the image central
moment computed by ippiMoments.

SyntaxIppStatus ippiGetNormalizedCentralMoment_64f(const IppiMomentState_64f* pState, int
mOrd, int nOrd, int nChannel, Ipp64f* pValue);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pStateThe structure that stores image moments.

mOrd, nOrd

Integer power exponents defining the moment order. Thesearguments must satisfy the condition 0 ≤mOrd+nOrd≤ 3.

nChannel

The channel for which the moment is returned.

pValuePointer to the returned moment value.

Description
This function normalizes the central moment value that was previously computed by the ippiMomentsfunction, and returns the pointer pValue to the normalized moment. The moment order (mOrd, nOrd) is
specified by the integer power exponents. SeeImage Moments for details of moments normalization.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error or awarning.

ippStsNullPtrErr

Indicates an error condition if pState or pValue pointer is NULL.

ippStsContextMatchErr
ippStsMoment00ZeroErr

Indicates an error condition if a pointer to an invalid structure
is passed.
Indicates an error condition if M(0,0) value is close to zero.

GetHuMoments
Retrieves image Hu moment invariants computed byippiMoments function.

SyntaxIppStatus ippiGetHuMoments_64f(const IppiMomentState_64f* pState, int nChannel,
IppiHuMoment_64f pHm);

1336

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pStatePointer to the structure that stores image moments.

nChannel

The channel for which the moment is returned.

pHm

Pointer to the array containing the Hu moment invariants.

Description
This function returns the pointer pHm to the array of seven Hu moment invariants previously computed by
the ippiMoments function.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsContextMatchErr
ippStsMoment00ZeroErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pState or pHm pointer is NULL.
Indicates an error condition if a pointer to an invalid structure
is passed.
Indicates an error condition if M(0,0) value is close to zero.

ExampleImage Norms
The functions described in this section compute the following norms of the image pixel values:•••

Infinity norm (the largest absolute pixel value)
L1 norm (the sum of absolute pixel values)
L2 norm (the square root of the sum of squared pixel values).

Functions of this group also help you compute the norm of differences in pixel values of two input images aswell as the relative error for two input images.

Norm_Inf
Computes the infinity norm of image pixel values.

SyntaxCase 1: Operation on one-channel data
IppStatus ippiNorm_Inf_<mod>(const Ipp<datatype>* pSrc, int srcStep, IppiSize roiSize,
Ipp64f* pValue);
Supported values for mod:8u_C1R

16u_C1R

16s_C1R

32f_C1R

1337

1Intel® Integrated Performance Primitives Developer Guide and Reference

Case 2: Masked operation on one-channel data
IppStatus ippiNorm_Inf_<mod>(const Ipp<datatype>* pSrc, int srcStep, const Ipp8u*
pMask, int maskStep, IppiSize roiSize, Ipp64f* pNorm);
Supported values for mod:8u_C1MR

16u_C1MR

32f_C1MR

Case 3: Operation on multi-channel data
IppStatus ippiNorm_Inf_<mod>(const Ipp<datatype>* pSrc, int srcStep, IppiSize roiSize,
Ipp64f value[3]);Supported values for mod:8u_C3R

16u_C3R

16s_C3R

32f_C3R

IppStatus ippiNorm_Inf_<mod>(const Ipp<datatype>* pSrc, int srcStep, IppiSize roiSize,
Ipp64f value[4]);Supported values for mod:8u_C4R

16u_C4R

16s_C4R

32f_C4R

Case 4: Masked operation on multi-channel data
IppStatus ippiNorm_Inf_<mod>(const Ipp<datatype>* pSrc, int srcStep, const Ipp8u*
pMask, int maskStep, IppiSize roiSize, int coi, Ipp64f* pNorm);
Supported values for mod:8u_C3CMR

16u_C3CMR

32f_C3CMR

Include Files
ippcv.hippi.hDomain Dependencies
Flavors declared in ippcv.h:
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib
Flavors declared in ippi.h:
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source image ROI.

srcStep

Distance in bytes between starts of consecutive lines in thesource image.

1338

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Pointer to the mask image.

pMask

roiSize

Distance in bytes between starts of consecutive lines in themask image.
Size of the source ROI in pixels.

coi

Channel of interest (for color images only); can be 1, 2, or 3.

pValuePointer to the computed infinity norm of pixel values.

maskStep

An array containing the computed infinity norms of channel
values in case of multi-channel data.
Pointer to the computed norm value in the mask mode.

value
pNorm

Description
The flavors of the function ippiNorm_Inf that perform masked operation are declared in the ippcv.h file.
All other function flavors are declared in the ippi.h file. This function operates with ROI (see Regions ofInterest in Intel IPP) and computes the infinity norm pValue (pNorm for the mask mode) for the source
image pSrc. This norm is defined as the largest absolute pixel value in an image. In the mask mode, thecomputation is done over pixels selected by non-zero mask values.
For non-masked operations on a multi-channel image (Case 3), the norm is computed separately for eachchannel and stored in the array value .
In the mask multi-channel mode (Case 4), the norm is computed for a single channel of interest specified bycoi.

Return Values
ippStsNoErr
ippStsNullPtrErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error when any of the specified pointers is NULL.
Indicates an error condition if roiSize has a field with zero or
negative value.
Indicates an error condition in mask mode, if srcStep or
maskStep is less than roiSize.width * <pixelSize>.

ippStsSizeErr
ippStsStepErr
ippStsNotEvenStepErr
ippStsCOIErr

Indicates an error condition in mask mode if steps for floatingpoint images cannot be divided by 4.
Indicates an error when coi is not 1, 2, or 3.

Norm_L1
Computes the L1- norm of image pixel values.

SyntaxCase 1: Operation on one-channel integer data
IppStatus ippiNorm_L1_<mod>(const Ipp<datatype>* pSrc, int srcStep, IppiSize roiSize,
Ipp64f* pValue);
Supported values for mod:8u_C1R

16u_C1R

16s_C1R

1339

1Intel® Integrated Performance Primitives Developer Guide and Reference

Case 2: Operation on one-channel floating-point data
IppStatus ippiNorm_L1_32f_C1R(const Ipp32f* pSrc, int srcStep, IppiSize roiSize,
Ipp64f* pValue, IppHintAlgorithm hint);

Case 3: Masked operation on one-channel data
IppStatus ippiNorm_L1_<mod>(const Ipp<datatype>* pSrc, int srcStep, const Ipp8u* pMask,
int maskStep, IppiSize roiSize, Ipp64f* pNorm);
Supported values for mod:8u_C1MR

16u_C1MR

32f_C1MR

Case 4: Operation on multi-channel integer data
IppStatus ippiNorm_L1_<mod>(const Ipp<datatype>* pSrc, int srcStep, IppiSize roiSize,
Ipp64f value[3]);Supported values for mod:8u_C3R

16u_C3R

16s_C3R

IppStatus ippiNorm_L1_<mod>(const Ipp<datatype>* pSrc, int srcStep, IppiSize roiSize,
Ipp64f value[4]);Supported values for mod:8u_C4R

16u_C4R

16s_C4R

Case 5: Operation on multi-channel floating-point data
IppStatus ippiNorm_L1_32f_C3R(const Ipp32f* pSrc, int srcStep, IppiSize roiSize, Ipp64f
value[3], IppHintAlgorithm hint);
Supported values for mod:IppStatus ippiNorm_L1_32f_C4R(const Ipp32f* pSrc, int srcStep, IppiSize roiSize, Ipp64f
value[4], IppHintAlgorithm hint);

Case 6: Masked operation on multi-channel data
IppStatus ippiNorm_L1_<mod>(const Ipp<datatype>* pSrc, int srcStep, const Ipp8u* pMask,
int maskStep, IppiSize roiSize, int coi, Ipp64f* pNorm);
Supported values for mod:8u_C3CMR

16u_C3CMR

32f_C3CMR

Include Files
ippcv.hippi.hDomain Dependencies
Flavors declared in ippcv.h:
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

1340

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Flavors declared in ippi.h:
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc
srcStep
pMask

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the mask image.

roiSize

Distance in bytes between starts of consecutive lines in themask image.
Size of the source ROI in pixels.

coi

Channel of interest (for color images only); can be 1, 2, or 3.

pValuePointer to the computed L1- norm of pixel values.

maskSteppNorm

An array containing the computed L1- norms of channel values
in case of multi-channel data.
Pointer to the computed norm value in the mask mode.

hint

Option to select the algorithmic implementation of the function.

value

Description
The flavors of the function ippiNorm_L1 that perform masked operation are declared in the ippcv.h file. Allother function flavors are declared in the ippi.h file. The function operates with ROI (see Regions of Interest
in Intel IPP). It computes the L1- norm pValue (pNorm in mask mode) for the source image pSrc. This
norm is defined as the sum of absolute pixel values in an image. Computation algorithm is specified by thehint argument (see Table “Hint Arguments for Image Moment Functions”). In the mask mode, thecomputation is done over pixels selected by nonzero mask values.
For non-masked operations on a multi-channel image (Case 4, 5), the norm is computed separately foreach channel and stored in the array value .
In the mask multi-channel mode (Case 6), the norm is computed for a single channel of interest specified bycoi.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsStepErr
ippStsNotEvenStepErr
ippStsCOIErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error when any of the specified pointers is NULL.
Indicates an error condition if roiSize has a field with zero or
negative value.
Indicates an error condition in mask mode, if srcStep or
maskStep is less than roiSize.width * <pixelSize>.
Indicates an error condition in mask mode if steps for floatingpoint images cannot be divided by 4.
Indicates an error when coi is not 1, 2, or 3.

1341

1

Intel® Integrated Performance Primitives Developer Guide and Reference

ExampleThe code example below demonstrates how an image norm can be computed.

IppStatus norm( void ){Ipp64f sum, normL1;
Ipp8u x[5*4];
IppiSize roi = {5,4};
ippiSet_8u_C1R( 1, x, 5, roi );ippiSum_8u_C1R( x, 5, roi, &sum);
return ippiNorm_L1_8u_C1R( x, 5, roi, &normL1 );}Norm_L2
Computes the L2- norm of image pixel values.

SyntaxCase 1: Operation on one-channel integer data
IppStatus ippiNorm_L2_<mod>(const Ipp<datatype>* pSrc, int srcStep, IppiSize roiSize,
Ipp64f* pValue);
Supported values for mod:8u_C1R

16u_C1R

16s_C1R

Case 2: Operation on one-channel floating-point data
IppStatus ippiNorm_L2_32f_C1R(const Ipp32f* pSrc, int srcStep, IppiSize roiSize,
Ipp64f* pValue, IppHintAlgorithm hint);

Case 3: Masked operation on one-channel data
IppStatus ippiNorm_L2_<mod>(const Ipp<datatype>* pSrc, int srcStep, const Ipp8u* pMask,
int maskStep, IppiSize roiSize, Ipp64f* pNorm);
Supported values for mod:8u_C1MR

16u_C1MR

32f_C1MR

Case 4: Operation on multi-channel integer data
IppStatus ippiNorm_L2_<mod>(const Ipp<datatype>* pSrc, int srcStep, IppiSize roiSize,
Ipp64f value[3]);Supported values for mod:8u_C3R

16u_C3R

16s_C3R

IppStatus ippiNorm_L2_<mod>(const Ipp<datatype>* pSrc, int srcStep, IppiSize roiSize,
Ipp64f value[4]);Supported values for mod:8u_C4R

1342

16u_C4R

16s_C4R

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Case 5: Operation on multi-channel floating-point data
IppStatus ippiNorm_L2_32f_C3R(const Ipp32f* pSrc, int srcStep, IppiSize roiSize, Ipp64f
value[3], IppHintAlgorithm hint);
IppStatus ippiNorm_L2_32f_C4R(const Ipp32f* pSrc, int srcStep, IppiSize roiSize, Ipp64f
value[4], IppHintAlgorithm hint);

Case 6: Masked operation on multi-channel data
IppStatus ippiNorm_L2_<mod>(const Ipp<datatype>* pSrc, int srcStep, const Ipp8u* pMask,
int maskStep, IppiSize roiSize, int coi, Ipp64f* pNorm);
Supported values for mod:8u_C3CMR

16u_C3CMR

32f_C3CMR

Include Files
ippcv.hippi.hDomain Dependencies
Flavors declared in ippcv.h:
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib
Flavors declared in ippi.h:
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc
srcStep
pMask

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in thesource image.
Pointer to the mask image.

roiSize

Distance in bytes between starts of consecutive lines in themask image.
Size of the source ROI in pixels.

coi

Channel of interest (for color images only); can be 1, 2, or 3.

pValuePointer to the computed L2- norm of pixel values.

maskSteppNorm

An array containing the computed L2- norms of channel values
in case of multi-channel data.
Pointer to the computed norm value in the mask mode.

hint

Option to select the algorithmic implementation of the function.

value

Description
The flavors of the function ippiNorm_L2 that perform masked operation are declared in the ippcv.h file. Allother function flavors are declared in the ippi.h file. The function operates with ROI (see Regions of Interest
in Intel IPP). It computes the L2- norm pValue (pNorm in mask mode) for the source image pSrc. This

1343

1

Intel® Integrated Performance Primitives Developer Guide and Reference

norm is defined as the square root of the sum of squared pixel values in an image. Computation algorithm is
specified by the hint argument (see Table “Hint Arguments for Image Moment Functions”). In the maskmode, the computation is done over pixels selected by nonzero mask values.
For non-masked operations on a multi-channel image (Case 4,5), the norm is computed separately for eachchannel and stored in the array value.
In the mask multi-channel mode (Case 6), the norm is computed for a single channel of interest specified bycoi.

Return Values
Indicates no error. Any other value indicates an error or awarning.
Indicates an error when any of the specified pointers is NULL.

ippStsNoErr
ippStsNullPtrErr

Indicates an error condition if roiSize has a field with zero or
negative value.
Indicates an error condition in mask mode, if srcStep or
maskStep is less than roiSize.width * <pixelSize>.

ippStsSizeErr
ippStsStepErr
ippStsNotEvenStepErr
ippStsCOIErr

Indicates an error condition in mask mode if steps for floatingpoint images cannot be divided by 4.
Indicates an error when coi is not 1, 2, or 3.

NormDiff_Inf
Computes the infinity norm of differences between
pixel values of two images.

SyntaxCase 1: Operation on one-channel data
IppStatus ippiNormDiff_Inf_<mod>(const Ipp<datatype>* pSrc1, int src1Step, const
Ipp<datatype>* pSrc2, int src2Step, IppiSize roiSize, Ipp64f* pValue);
Supported values for mod:8u_C1R

16u_C1R

16s_C1R

32f_C1R

Case 2: Masked operation on one-channel data
IppStatus ippiNormDiff_Inf_<mod>(const Ipp<datatype>* pSrc1, int src1Step, const
Ipp<datatype>* pSrc2, int src2Step, const Ipp8u* pMask, int maskStep, IppiSize roiSize,
Ipp64f* pNorm);
Supported values for mod:8u_C1MR

16u_C1MR

32f_C1MR

Case 3: Operation on multi-channel data
IppStatus ippiNormDiff_Inf_<mod>(const Ipp<datatype>* pSrc1, int src1Step, const
Ipp<datatype>* pSrc2, int src2Step, IppiSize roiSize, Ipp64f value[3]);Supported values for mod:8u_C3R1344

16u_C3R

16s_C3R

32f_C3R

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

IppStatus ippiNormDiff_Inf_<mod>(const Ipp<datatype>* pSrc1, int src1Step, const
Ipp<datatype>* pSrc2, int src2Step, IppiSize roiSize, Ipp64f value[4]);Supported values for mod:8u_C4R

16u_C4R

16s_C4R

32f_C4R

Case 4: Masked operation on multi-channel data
IppStatus ippiNormDiff_Inf_<mod>(const Ipp<datatype>* pSrc1, int src1Step, const
Ipp<datatype>* pSrc2, int src2Step, const Ipp8u* pMask, int maskStep, IppiSize roiSize,
int coi, Ipp64f* pNorm);
Supported values for mod:8u_C3CMR

16u_C3CMR

32f_C3CMR

Include Files
ippcv.hippi.hDomain Dependencies
Flavors declared in ippcv.h:
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib
Flavors declared in ippi.h:
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc1, pSrc2
src1Step, src2Step
pMask
maskStep
roiSize

Pointers to the source images ROI.
Distance in bytes between starts of consecutive lines in thesource images.
Pointer to the mask image.
Distance in bytes between starts of consecutive lines in themask image.
Size of the source ROI in pixels.

coi

Pointer to the computed infinity norm of difference between
pixel values.
An array containing the computed infinity norms of difference
between corresponding channel values in case of multi-channel
data.
Channel of interest (for color images only); can be 1, 2, or 3.

pNorm

Pointer to the computed norm value in the mask mode.

pValue
value

1345

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Description
The flavors of the function ippiNormDiff_Inf that perform masked operation are declared in the ippcv.h
file. All other function flavors are declared in the ippi.h file. The function operates with ROI (see Regions ofInterest in Intel IPP). It computes the infinity norm pValue (pNorm in the mask mode) of differences
between pixel values of the two source images pSrc1 and pSrc2. This norm is defined as the largest
absolute value of differences:
norm = max |pSrc1-pSrc2|
In the mask mode, the computation is done over pixels selected by nonzero mask values.
For non-masked operations on multi-channel images (Case 3), the norm is computed separately for eachpair of corresponding channels and stored in the array value .
In the mask multi-channel mode (Case 4), the norm is computed for a single channel of interest specified bycoi.

Return Values
ippStsNoErr
ippStsNullPtrErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error when any of the specified pointers is NULL.
Indicates an error condition if roiSize has a field with zero or
negative value.
Indicates an error condition in mask mode, if src1Step,
src2Step, or maskStep is less than roiSize.width *<pixelSize>.

ippStsSizeErr
ippStsStepErr

ippStsNotEvenStepErr
ippStsCOIErr

Indicates an error condition in mask mode if steps for floatingpoint images cannot be divided by 4.
Indicates an error when coi is not 1, 2, or 3.

NormDiff_L1
Computes the L1- norm of differences between pixel
values of two images.

SyntaxCase 1: Operation on one-channel integer data
IppStatus ippiNormDiff_L1_<mod>(const Ipp<datatype>* pSrc1, int src1Step, const
Ipp<datatype>* pSrc2, int src2Step, IppiSize roiSize, Ipp64f* pValue);
Supported values for mod:8u_C1R

16u_C1R

16s_C1R

Case 2: Operation on one-channel floating-point data
IppStatus ippiNormDiff_L1_32f_C1R(const Ipp32f* pSrc1, int src1Step, const Ipp32f*
pSrc2, int src2Step, IppiSize roiSize, Ipp64f* pValue, IppHintAlgorithm hint);

1346

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Case 3: Masked operation on one-channel data
IppStatus ippiNormDiff_L1_<mod>(const Ipp<datatype>* pSrc1, int src1Step, const
Ipp<datatype>* pSrc2, int src2Step, const Ipp8u* pMask, int maskStep, IppiSize roiSize,
Ipp64f* pNorm);
Supported values for mod:8u_C1MR

16u_C1MR

32f_C1MR

Case 4: Operation on multi-channel integer data
IppStatus ippiNormDiff_L1_<mod>(const Ipp<datatype>* pSrc1, int src1Step, const
Ipp<datatype>* pSrc2, int src2Step, IppiSize roiSize, Ipp64f value[3]);Supported values for mod:8u_C3R

16u_C3R

16s_C3R

IppStatus ippiNormDiff_L1_<mod>(const Ipp<datatype>* pSrc1, int src1Step, const
Ipp<datatype>* pSrc2, int src2Step, IppiSize roiSize, Ipp64f value[4]);Supported values for mod:8u_C4R

16u_C4R

16s_C4R

Case 5: Operation on multi-channel floating-point data
IppStatus ippiNormDiff_L1_32f_C3R(const Ipp32f* pSrc1, int src1Step, const Ipp32f*
pSrc2, int src2Step, IppiSize roiSize, Ipp64f value[3], IppHintAlgorithm hint);
IppStatus ippiNormDiff_L1_32f_C4R(const Ipp32f* pSrc1, int src1Step, const Ipp32f*
pSrc2, int src2Step, IppiSize roiSize, Ipp64f value[4], IppHintAlgorithm hint);

Case 6: Masked operation on multi-channel data
IppStatus ippiNormDiff_L1_<mod>(const Ipp<datatype>* pSrc1, int src1Step, const Ipp32f*
pSrc2, int src2Step, const Ipp8u* pMask, int maskStep, IppiSize roiSize, int coi,
Ipp64f* pNorm);
Supported values for mod:8u_C3CMR

16u_C3CMR

32f_C3CMR

Include Files
ippcv.hippi.hDomain Dependencies
Flavors declared in ippcv.h:
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib
Flavors declared in ippi.h:
Headers: ippcore.h, ippvm.h, ipps.h

1347

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc1, pSrc2
src1Step, src2Step
pMask

Pointers to the source images ROI.
Distance in bytes between starts of consecutive lines in thesource images.
Pointer to the mask image.

roiSize

Distance in bytes between starts of consecutive lines in themask image.
Size of the source ROI in pixels.

coi

Channel of interest (for color images only); can be 1, 2, or 3.

maskStep

pNorm

Pointer to the computed L1- norm of difference between pixel
values.
An array containing the computed L1- norms of difference
between channel values in case of multi-channel data.
Pointer to the computed norm value in the mask mode.

hint

Option to select the algorithmic implementation of the function.

pValuevalue

Description
The flavors of the function ippiNormDiff_L1 that perform masked operation are declared in the ippcv.h
file. All other function flavors are declared in the ippi.h file. The function operates with ROI (see Regions ofInterest in Intel IPP). It computes the L1-norm pValue (pNorm in the mask mode) of differences between
pixel values of the two source image buffers pSrc1 and pSrc2. This norm is defined as the sum of absolutevalues of differences:
norm = Σ |pSrc1-pSrc2|
Computation algorithm is specified by the hint argument (see Table “Hint Arguments for Image Moment
Functions”). In the mask mode, the computation is done over pixels selected by nonzero mask values.
For non-masked operations on multi-channel images (Case 4,5), the norm is computed separately for eachpair of the corresponding channels and stored in the array value .
In the mask multi-channel mode (Case 6), the norm is computed for a single channel of interest specified bycoi.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsStepErr

ippStsNotEvenStepErr
ippStsCOIErr

1348

Indicates no error. Any other value indicates an error or awarning.
Indicates an error when any of the specified pointers is NULL.
Indicates an error condition if roiSize has a field with zero or
negative value.
Indicates an error condition in mask mode, if src1Step,
src2Step, or maskStep is less than roiSize.width *<pixelSize>.
Indicates an error condition in mask mode if steps for floatingpoint images cannot be divided by 4.
Indicates an error when coi is not 1, 2, or 3.

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

ExampleThe code example below shows how to use the function ippiNormDiff_L1_8u_C1R.

void func_normdiff_l1() {Ipp8u pSrc1[8*4];
Ipp8u pSrc2[8*4];
Ipp64f Value;
int src1Step = 8;
int src2Step = 8;
IppiSize roi = {8,4};
IppiSize roiSize = {5,4};
ippiSet_8u_C1R(1, pSrc1, src1Step, roi);ippiSet_8u_C1R(2, pSrc2, src2Step, roi);
ippiNormDiff_L1_8u_C1R( pSrc1, src1Step, pSrc2, src2Step, roiSize, &Value);}
Result:-> 20.0

NormDiff_L2
Computes the L2- norm of differences between pixel
values of two images.

SyntaxCase 1: Operation on one-channel integer data
IppStatus ippiNormDiff_L2_<mod>(const Ipp<datatype>* pSrc1, int src1Step, const
Ipp<datatype>* pSrc2, int src2Step, IppiSize roiSize, Ipp64f* pValue);
Supported values for mod:8u_C1R

16u_C1R

16s_C1R

Case 2: Operation on one-channel floating-point data
IppStatus ippiNormDiff_L2_32f_C1R(const Ipp32f* pSrc1, int src1Step, const Ipp32f*
pSrc2, int src2Step, IppiSize roiSize, Ipp64f* pValue, IppHintAlgorithm hint);

Case 3: Masked operation on one-channel data
IppStatus ippiNormDiff_L2_<mod>(const Ipp<datatype>* pSrc1, int src1Step, const
Ipp<datatype>* pSrc2, int src2Step, const Ipp8u* pMask, int maskStep, IppiSize roiSize,
Ipp64f* pNorm);
Supported values for mod:8u_C1MR

16u_C1MR

32f_C1MR

1349

1Intel® Integrated Performance Primitives Developer Guide and Reference

Case 4: Operation on multi-channel integer data
IppStatus ippiNormDiff_L2_<mod>(const Ipp<datatype>* pSrc1, int src1Step, const
Ipp<datatype>* pSrc2, int src2Step, IppiSize roiSize, Ipp64f value[3]);Supported values for mod:8u_C3R

16u_C3R

16s_C3R

IppStatus ippiNormDiff_L2_<mod>(const Ipp<datatype>* pSrc1, int src1Step, const
Ipp<datatype>* pSrc2, int src2Step, IppiSize roiSize, Ipp64f value[4]);Supported values for mod:8u_C4R

16u_C4R

16s_C4R

Case 5: Operation on multi-channel floating-point data
IppStatus ippiNormDiff_L2_32f_C3R(const Ipp32f* pSrc1, int src1Step, const
Ipp<datatype>* pSrc2, int src2Step, IppiSize roiSize, Ipp64f value[3], IppHintAlgorithmhint);
IppStatus ippiNormDiff_L2_32f_C4R(const Ipp32f* pSrc1, int src1Step, const
Ipp<datatype>* pSrc2, int src2Step, IppiSize roiSize, Ipp64f value[4], IppHintAlgorithmhint);

Case 6: Masked operation on multi-channel data
IppStatus ippiNormDiff_L2_<mod>(const Ipp<datatype>* pSrc1, int src1Step, const
Ipp<datatype>* pSrc2, int src2Step, const Ipp8u* pMask, int maskStep, IppiSize roiSize,
int coi, Ipp64f* pNorm);
Supported values for mod:8u_C3CMR

16u_C3CMR

32f_C3CMR

Include Files
ippcv.hippi.hDomain Dependencies
Flavors declared in ippcv.h:
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib
Flavors declared in ippi.h:
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc1, pSrc2

1350

Pointers to the source images ROI.

Developer Guide and Reference for Intel® Integrated Performance Primitives

src1Step, src2Step
pMask

1

Distance in bytes between starts of consecutive lines in thesource images.
Pointer to the mask image.

roiSize

Distance in bytes between starts of consecutive lines in themask image.
Size of the source ROI in pixels.

coi

Channel of interest (for color images only); can be 1, 2, or 3.

maskStep

pNorm

Pointer to the computed L2- norm of difference between pixel
values.
An array containing the computed L2- norms of difference
between channel values in case of multi-channel data.
Pointer to the computed norm value in the mask mode.

hint

Option to select the algorithmic implementation of the function.

pValuevalue

Description
The flavors of the function ippiNormDiff_L2 that perform masked operation are declared in the ippcv.h
file. All other function flavors are declared in the ippi.h file. The function operates with ROI (see Regions ofInterest in Intel IPP). It computes the L2-norm pValue (pNorm in the mask mode) of differences between
pixel values of the two source image buffers pSrc1 and pSrc2. This norm is defined as the square root of
the sum of squared differences:

Computation algorithm is specified by the hint argument (see Table “Hint Arguments for Image Moment
Functions”). In the mask mode, the computation is done over pixels selected by nonzero mask values.
For non-masked operations on multi-channel images (Case 4,5), the norm is computed separately for eachpair of the corresponding channels and stored in the array value .
In the mask multi-channel mode (Case 6), the norm is computed for a single channel of interest specified bycoi.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsStepErr

ippStsNotEvenStepErr
ippStsCOIErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error when any of the specified pointers is NULL.
Indicates an error condition if roiSize has a field with zero or
negative value.
Indicates an error condition in mask mode, if src1Step,
src2Step, or maskStep is less than roiSize.width *<pixelSize>.
Indicates an error condition in mask mode if steps for floatingpoint images cannot be divided by 4.
Indicates an error when coi is not 1, 2, or 3.

1351

1

Intel® Integrated Performance Primitives Developer Guide and Reference

NormRel_Inf
Computes the relative error for the infinity norm ofdifferences between pixel values of two images.

SyntaxCase 1: Operation on one-channel data
IppStatus ippiNormRel_Inf_<mod>(const Ipp<datatype>* pSrc1, int src1Step, const
Ipp<datatype>* pSrc2, int src2Step, IppiSize roiSize, Ipp64f* pValue);
Supported values for mod:8u_C1R

16u_C1R

16s_C1R

32f_C1R

Case 2: Masked operation on one-channel data
IppStatus ippiNormRel_Inf_<mod>(const Ipp<datatype>* pSrc1, int src1Step, const
Ipp<datatype>* pSrc2, int src2Step, const Ipp8u* pMask, int maskStep, IppiSize roiSize,
Ipp64f* pNorm);
Supported values for mod:8u_C1MR

16u_C1MR

32f_C1MR

Case 3: Operation on multi-channel data
IppStatus ippiNormRel_Inf_<mod>(const Ipp<datatype>* pSrc1, int src1Step, const
Ipp<datatype>* pSrc2, int src2Step, IppiSize roiSize, Ipp64f value[3]);Supported values for mod:8u_C3R

16u_C3R

16s_C3R

32f_C3R

IppStatus ippiNormRel_Inf_<mod>(const Ipp<datatype>* pSrc1, int src1Step, const
Ipp<datatype>* pSrc2, int src2Step, IppiSize roiSize, Ipp64f value[4]);Supported values for mod:8u_C4R

16u_C4R

16s_C4R

32f_C4R

Case 4: Masked operation on multi-channel data
IppStatus ippiNormRel_Inf_<mod>(const Ipp<datatype>* pSrc1, int src1Step, const
Ipp<datatype>* pSrc2, int src2Step, const Ipp8u* pMask, int maskStep, IppiSize roiSize,
int coi, Ipp64f* pNorm);
Supported values for mod:8u_C3CMR

Include Files
ippcv.hippi.hDomain Dependencies
Flavors declared in ippcv.h:1352

16u_C3CMR

32f_C3CMR

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib
Flavors declared in ippi.h:
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc1, pSrc2
src1Step, src2Step
pMask

Pointers to the source images ROI.
Distance in bytes between starts of consecutive lines in thesource images.
Pointer to the mask image.

maskStep

Distance in bytes between starts of consecutive lines in themask image.

roiSize

Size of the source ROI in pixels.

pValuePointer to the computed relative error value.

coi

An array containing the computed relative error values forseparate channels in case of multi-channel data.
Channel of interest (for color images only); can be 1, 2, or 3.

pNorm

Pointer to the computed relative norm value in the mask mode.

value

Description
The flavors of the function ippiNormRel_Inf that perform masked operation are declared in the ippcv.h
file. All other function flavors are declared in the ippi.h file. The function operates with ROI (see Regions ofInterest in Intel IPP). It computes the infinity norm of differences between pixel values of two source buffers
pSrc1 and pSrc2. This norm is defined as the largest absolute pixel value in an image. The output relative
error pValue (pNorm in the mask mode) is then formed by dividing the computed norm of differences by theinfinity norm of the second source image buffer pSrc2. In the mask mode, the computation is done overpixels selected by nonzero mask values.
For non-masked operations on multi-channel images (Case 3), the relative norm is computed separately foreach pair of corresponding channels and stored in the array value.
In the mask multi-channel mode (Case 4), the relative norm is computed for a single channel of interest
specified by coi.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsStepErr

ippStsNotEvenStepErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error when any of the specified pointers is NULL.
Indicates an error condition if roiSize has a field with zero or
negative value.
Indicates an error condition in mask mode, if src1Step,
src2Step, or maskStep is less than roiSize.width *<pixelSize>.
Indicates an error condition in mask mode if steps for floatingpoint images cannot be divided by 4.

1353

1

Intel® Integrated Performance Primitives Developer Guide and ReferenceippStsCOIErr

Indicates an error when coi is not 1, 2, or 3.

ippStsDivByZero

Indicates a warning when the infinity norm of pSrc2 has a zero
value.

NormRel_L1
Computes the relative error for the L1 norm ofdifferences between pixel values of two images.

SyntaxCase 1: Operation on one-channel integer data
IppStatus ippiNormRel_L1_<mod>(const Ipp<datatype>* pSrc1, int src1Step, const
Ipp<datatype>* pSrc2, int src2Step, IppiSize roiSize, Ipp64f* pValue);
Supported values for mod:8u_C1R

16u_C1R

16s_C1R

Case 2: Operation on one-channel floating-point data
IppStatus ippiNormRel_L1_32f_C1R(const Ipp32f* pSrc1, int src1Step, const
Ipp<datatype>* pSrc2, int src2Step, IppiSize roiSize, Ipp64f* pValue, IppHintAlgorithmhint);

Case 3: Masked operation on one-channel data
IppStatus ippiNormRel_L1_<mod>(const Ipp<datatype>* pSrc1, int src1Step, const
Ipp<datatype>* pSrc2, int src2Step, const Ipp8u* pMask, int maskStep, IppiSize roiSize,
Ipp64f* pNorm);
Supported values for mod:8u_C1MR

16u_C1MR

32f_C1MR

Case 4: Operation on multi-channel integer data
IppStatus ippiNormRel_L1_<mod>(const Ipp<datatype>* pSrc1, int src1Step, const
Ipp<datatype>* pSrc2, int src2Step, IppiSize roiSize, Ipp64f value[3]);Supported values for mod:8u_C3R

16u_C3R

16s_C3R

IppStatus ippiNormRel_L1_<mod>(const Ipp<datatype>* pSrc1, int src1Step, const
Ipp<datatype>* pSrc2, int src2Step, IppiSize roiSize, Ipp64f value[4]);Supported values for mod:8u_C4R

16u_C4R

16s_C4R

Case 5: Operation on multi-channel floating-point data
IppStatus ippiNormRel_L1_32f_C3R(const Ipp32f* pSrc1, int src1Step, const
Ipp<datatype>* pSrc2, int src2Step, IppiSize roiSize, Ipp64f value[3], IppHintAlgorithmhint);

1354

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

IppStatus ippiNormRel_L1_32f_C4R(const Ipp32f* pSrc1, int src1Step, const
Ipp<datatype>* pSrc2, int src2Step, IppiSize roiSize, Ipp64f value[4], IppHintAlgorithmhint);

Case 6: Masked operation on multi-channel data
IppStatus ippiNormRel_L1_<mod>(const Ipp<datatype>* pSrc1, int src1Step, const
Ipp<datatype>* pSrc2, int src2Step, const Ipp8u* pMask, int maskStep, IppiSize roiSize,
int coi, Ipp64f* pNorm);
Supported values for mod:8u_C3CMR

16u_C3CMR

32f_C3CMR

Include Files
ippcv.hippi.hDomain Dependencies
Flavors declared in ippcv.h:
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib
Flavors declared in ippi.h:
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc1, pSrc2
src1Step, src2Step
pMask

Pointers to the source images ROI.
Distance in bytes between starts of consecutive lines in thesource images.
Pointer to the mask image.

roiSize

Distance in bytes between starts of consecutive lines in themask image.
Size of the source ROI in pixels.

coi

Channel of interest (for color images only); can be 1, 2, or 3.

pValuePointer to the computed relative error value.

maskSteppNorm

An array containing the computed relative error values forseparate channels in case of multi-channel data.
Pointer to the computed relative norm value in the mask mode.

hint

Option to select the algorithmic implementation of the function.

value

Description
The flavors of the function ippiNormRel_L1 that perform masked operation are declared in the ippcv.h file.
All other function flavors are declared in the ippi.h file. The function operates with ROI (see Regions ofInterest in Intel IPP). It computes the L1- norm of differences between pixel values of two source buffers
pSrc1 and pSrc2. This norm is defined as the sum of absolute pixel values in an image. The output
relative error pValue (pNorm in the mask mode) is then formed by dividing the computed norm of

1355

1

Intel® Integrated Performance Primitives Developer Guide and Reference

differences by the L1- norm of the second source image buffer pSrc2. Computation algorithm is specified by
the hint argument (see Table “Hint Arguments for Image Moment Functions”).In the mask mode, thecomputation is done over pixels selected by nonzero mask values.
For non-masked operations on multi-channel images (Cases 4, 5), the relative norm is computed
separately for each pair of corresponding channels and stored in the array value.
In the mask multi-channel mode (Case 6), the relative norm is computed for a single channel of interest
specified by coi.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsStepErr

ippStsNotEvenStepErr
ippStsCOIErr
ippStsDivByZero

Indicates no error. Any other value indicates an error or awarning.
Indicates an error when any of the specified pointers is NULL.
Indicates an error condition if roiSize has a field with zero or
negative value.
Indicates an error condition in mask mode, if src1Step,
src2Step, or maskStep is less than roiSize.width *<pixelSize>.
Indicates an error condition in mask mode if steps for floatingpoint images cannot be divided by 4.
Indicates an error when coi is not 1, 2, or 3.
Indicates a warning when the L1 norm of pSrc2 has a zero
value.

ExampleThe code example below shows how to use the function ippiNormRel_L1_8u_C1R.

void func_normrel_l1() {Ipp8u pSrc1[8*4];
Ipp8u pSrc2[8*4];
Ipp64f Value;
int src1Step = 8;
int src2Step = 8;
IppiSize roi = {8,4};
IppiSize roiSize = {5,4};
ippiSet_8u_C1R(1, pSrc1, src1Step, roi);ippiSet_8u_C1R(2, pSrc2, src2Step, roi);
ippiNormRel_L1_8u_C1R( pSrc1, src1Step, pSrc2, src2Step, roiSize, &Value);}
Output:-> 0.5

NormRel_L2
Computes the relative error for the L2 norm ofdifferences between pixel values of two images.

1356

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

SyntaxCase 1: Operation on one-channel integer data
IppStatus ippiNormRel_L2_<mod>(const Ipp<datatype>* pSrc1, int src1Step, const
Ipp<datatype>* pSrc2, int src2Step, IppiSize roiSize, Ipp64f* pValue);
Supported values for mod:8u_C1R

16u_C1R

16s_C1R

Case 2: Operation on one-channel floating-point data
IppStatus ippiNormRel_L2_32f_C1R(const Ipp32f* pSrc1, int src1Step, const
Ipp<datatype>* pSrc2, int src2Step, IppiSize roiSize, Ipp64f* pValue, IppHintAlgorithmhint);

Case 3: Masked operation on one-channel data
IppStatus ippiNormRel_L2_<mod>(const Ipp<datatype>* pSrc1, int src1Step, const
Ipp<datatype>* pSrc2, int src2Step, const Ipp8u* pMask, int maskStep, IppiSize roiSize,
Ipp64f* pNorm);
Supported values for mod:8u_C1MR

16u_C1MR

32f_C1MR

Case 4: Operation on multi-channel integer data
IppStatus ippiNormRel_L2_<mod>(const Ipp<datatype>* pSrc1, int src1Step, const
Ipp<datatype>* pSrc2, int src2Step, IppiSize roiSize, Ipp64f value[3]);Supported values for mod:8u_C3R

16u_C3R

16s_C3R

IppStatus ippiNormRel_L2_<mod>(const Ipp<datatype>* pSrc1, int src1Step, const
Ipp<datatype>* pSrc2, int src2Step, IppiSize roiSize, Ipp64f value[4]);Supported values for mod:8u_C4R

16u_C4R

16s_C4R

Case 5: Operation on multi-channel floating-point data
IppStatus ippiNormRel_L2_32f_C3R(const Ipp32f* pSrc1, int src1Step, const
Ipp<datatype>* pSrc2, int src2Step, IppiSize roiSize, Ipp64f value[3], IppHintAlgorithmhint);
IppStatus ippiNormRel_L2_32f_C4R(const Ipp32f* pSrc1, int src1Step, const
Ipp<datatype>* pSrc2, int src2Step, IppiSize roiSize, Ipp64f value[4], IppHintAlgorithmhint);

1357

1Intel® Integrated Performance Primitives Developer Guide and Reference

Case 6: Masked operation on multi-channel data
IppStatus ippiNormRel_L2_<mod>(const Ipp<datatype>* pSrc1, int src1Step, const
Ipp<datatype>* pSrc2, int src2Step, const Ipp8u* pMask, int maskStep, IppiSize roiSize,
int coi, Ipp64f* pNorm);
Supported values for mod:8u_C3CMR

16u_C3CMR

32f_C3CMR

Include Files
ippcv.hippi.hDomain Dependencies
Flavors declared in ippcv.h:
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib
Flavors declared in ippi.h:
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc1, pSrc2
src1Step, src2Step
pMask

Pointers to the source images ROI.
Distance in bytes between starts of consecutive lines in thesource images.
Pointer to the mask image.

roiSize

Distance in bytes between starts of consecutive lines in themask image.
Size of the source ROI in pixels.

coi

Channel of interest (for color images only); can be 1, 2, or 3.

pValuePointer to the computed relative error value.

maskSteppNorm

An array containing the computed relative error values forseparate channels in case of multi-channel data.
Pointer to the computed relative norm value in the mask mode.

hint

Option to select the algorithmic implementation of the function.

value

Description
The flavors of the function ippiNormRel_L2 that perform masked operation are declared in the ippcv.h file.
All other function flavors are declared in the ippi.h file. The function operates with ROI (see Regions ofInterest in Intel IPP). It computes the L2- norm of differences between pixel values of two source buffers
pSrc1 and pSrc2. This norm is defined as the square root of the sum of squared pixel values in an image.
The output relative error pValue (pNorm in the mask mode) is then formed by dividing the computed normof differences by the L2- norm of the second source image buffer pSrc2. Computation algorithm is specified
by the hint argument (see Table “Hint Arguments for Image Moment Functions”).In the mask mode, thecomputation is done over pixels selected by nonzero mask values.

1358

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

For non-masked operations on multi-channel images (Cases 4, 5), the relative norm is computed
separately for each pair of corresponding channels and stored in the array value.
In the mask multi-channel mode (Case 6), the relative norm is computed for a single channel of interest
specified by coi.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsStepErr

ippStsNotEvenStepErr
ippStsCOIErr
ippStsDivByZero

Indicates no error. Any other value indicates an error or awarning.
Indicates an error when any of the specified pointers is NULL.
Indicates an error condition if roiSize has a field with zero or
negative value.
Indicates an error condition in mask mode, if src1Step,
src2Step, or maskStep is less than roiSize.width *<pixelSize>.
Indicates an error condition in mask mode if steps for floatingpoint images cannot be divided by 4.
Indicates an error when coi is not 1, 2, or 3.
Indicates a warning when the L2 norm of pSrc2 has a zero
value.

ExampleThe code example below shows how to use the function ippiNormRel_L2_8u_C1R.

void func_normrel_l1() {Ipp8u pSrc1[8*4];
Ipp8u pSrc2[8*4];
Ipp64f Value;
int src1Step = 8;
int src2Step = 8;
IppiSize roi = {8,4};
IppiSize roiSize = {5,4};
ippiSet_8u_C1R(1, pSrc1, src1Step, roi);ippiSet_8u_C1R(10, pSrc2, src2Step, roi);
ippiNormRel_L2_8u_C1R( pSrc1, src1Step, pSrc2, src2Step, roiSize, &Value);}
Result:-> 0.9Image Quality Index
Intel IPP functions described in this section compute the universal image quality index [Wang02] that may be
used as image and video quality distortion measure. It is mathematically defined by modeling the image
distortion relative to the reference image as a combination of three factors: loss of correlation, luminancedistortion, and contrast distortion.
If two images f and g are considered as a matrices with M column and N rows containing pixel values f[i,j],g[i,j], respectively (0 ≥ i > M, 0 ≥ j > N ), the universal image quality index Q may be calculated as a
product of three components:

1359

1

Intel® Integrated Performance Primitives Developer Guide and Reference

where

The first component is the correlation coefficient, which measures the degree of linear correlation between
images f and g. It varies in the range [-1, 1]. The best value 1 is obtained when f and g are linearly related,which means that g[i,j] =af[ i,j]+b for all possible values of i and j. The second component, with a value
range of [0, 1], measures how close the mean luminance is between images. Since σf and σg can beconsidered as estimates of the contrast of f and g, the third component measures how similar the contrastsof the images are. The value range for this component is also [0, 1].
The range of values for the index Q is [-1, 1]. The best value 1 is achieved if and only if the images are
identical.

QualityIndexGetBufferSize
Computes the size of the work buffer for theippiQualityIndex function.

SyntaxIppStatus ippiQualityIndexGetBufferSize(IppDataType srcType, IppChannels ippChan,
IppiSize roiSize, int* pBufferSize);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
srcTypeippChanData type of the source images. Possible values: ipp8u,
ipp16u, or ipp32f.
Number of channels in the source images. Possible values:

ippC1, ippC3, or ippAC4.

roiSizeSize, in pixels, of the source images.

pBufferSize

Pointer to the computed value of the buffer size, in bytes.

1360

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Description
The function computes the size of the work buffer, in bytes, for the ippiQualityIndex function and storesthe result in the pBufferSize parameter.

Return Values

ippStsNullPtrErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error when any of the specified pointers is NULL.

ippStsSizeErr

Indicates an error when roiSize is less than, or equal to zero.

ippStsDataTypeErr

Indicates an error when srcType has an illegal value.

ippStsChannelErr

Indicates an error when ippChan has an illegal value.

ippStsNoErr

See Also
QualityIndex Computes the universal image quality index.
QualityIndex
Computes the universal image quality index.

SyntaxCase 1: Operation on one-channel data
IppStatus ippiQualityIndex_<mod>(const Ipp<srcDatatype>* pSrc1, int src1Step, const
Ipp<srcDatatype>* pSrc2, int src2Step, IppiSize roiSize, Ipp<dstDatatype>
pQualityIndex[1], Ipp8u* pBuffer);
Supported values for mod:8u32f_C1R

16u32f_C1R

32f_C1R

Case 2: Operation on multi-channel data
IppStatus ippiQualityIndex_<mod>(const Ipp<srcDatatype>* pSrc1, int src1Step, const
Ipp<srcDatatype>* pSrc2, int src2Step, IppiSize roiSize, Ipp<dstDatatype>
pQualityIndex[3], Ipp8u* pBuffer);
Supported values for mod:8u32f_C3R

16u32f_C3R

32f_C3R

8u32f_AC4R

16u32f_AC4R

32f_AC4R

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

1361

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Parameters
pSrc1, pSrc2

Pointers to the source images ROI.

roiSize

Distance in bytes between starts of consecutive lines in thesource images.
Size of the source ROI in pixels.

pQualityIndex

Pointer to the computed quality index value.

pBuffer

Pointer to the buffer for internal calculations. To compute the size ofthe buffer, use the QualityIndexGetBufferSize function.

src1Step, src2Step

Description
This function operates with ROI (see Regions of Interest in Intel IPP). This function computes the universal
image quality index for two images pSrc1 and pSrc2 according to the formula in the introduction section
above. The computed value of the index is stored in pQualityIndex.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsStepErr
ippStsQualityIndexErr
ippStsMemAllocErr

Example1362

Indicates no error. Any other value indicates an error or awarning.
Indicates an error when any of the specified pointers is NULL.
Indicates an error condition if roiSize has a field with zero or
negative value.
Indicates an error condition if src1Step or src2Step has a zeroor negative value.
Indicates an error condition if pixel values of one of the images
are constant.
Indicates an error condition if memory allocation fails.

1Developer Guide and Reference for Intel® Integrated Performance Primitives

See Also
QualityIndexGetBufferSize Computes the size of the work buffer for the ippiQualityIndex
function.
Image Proximity Measures
The functions described in this section compute the proximity (similarity) measure between an image and atemplate (another image). These functions may be used as feature detection functions, as well as thecomponents of more sophisticated techniques.
There are several ways to compute the measure of similarity between two images. One way is to computethe Euclidean distance, or sum of the squared distances (SSD), of an image and a template. The smaller isthe value of SSD at a particular pixel, the more similarity exists between the template and the image in theneighborhood of that pixel.
The squared Euclidean distance Stx(r,c) between a template and an image for the pixel in row r andcolumn c is given by the equation:

where x(r,c) is the image pixel value in row r and column c, and t(j,i) is the template pixel value in row jand column i; template size is tplCols by tplRows and its center is positioned at (r,c).
The other similarity measure is the cross-correlation function: the higher is the cross-correlation at aparticular pixel, the more similarity exists between the template and the image in the neighborhood of thatpixel.
The cross-correlation Rtx(r,c) between a template and an image at the pixel in row r and column c iscomputed by the equation :

1363

1

Intel® Integrated Performance Primitives Developer Guide and Reference

The cross-correlation function is dependent on the brightness variation across the image. To avoid thisdependence, the correlation coefficient function is used instead. It is defined as:

where t with the overline is the mean of the template, and x with the overline is the mean of the image inthe region just under the template.
All Intel IPP proximity functions compute normalized values of SSD, cross-correlation and correlation
coefficient that are defined as follows:
normalized SSD: σtx(r,c)

normalized cross-correlation ρtx( r,c):Here Rxx and Rtt denote the autocorrelation of the image and the template, respectively:

Normalized correlation coefficient γtx(r,c):Here Gxx and Gtt denote the autocorrelations of the image and the template without constant brightness
component, respectively:

1364

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

SqrDistanceNormGetBufferSize
Computes the size of the work buffer for theippiSqrDistanceNorm function.

SyntaxIppStatus ippiSqrDistanceNormGetBufferSize (IppiSize srcRoiSize, IppiSize tplRoiSize,
IppEnum algType, int* pBufferSize);

Include Files
ippi.hParameters
srcRoiSize, tplRoiSize

Size of the source/template ROI in pixels.

algType

Bit-field mask for the algorithm type definition. Possible values are theresults of composition of the IppAlgType, IppiROIShape, andIppiNormOp values.

pBufferSize

Pointer to the size of the work buffer.

Description
The ippiSqrDistanceNormGetBufferSize function computes the size, in bytes, of the external work buffer
needed for the function that computes the Euclidean distance between an image and a template. The result
is stored in the pBufferSize parameter.

Return Values
ippStsNoErr

Indicates no error.

ippStsSizeErr

Indicates an error when:••srcRoiSize or tplRoiSize is negative, or equal to zerothe value of srcRoiSize is less than the corresponding value oftplRoiSize

ippStsAlgTypeErr

Indicates an error when:•

the result of the bitwise AND operation between the algType andippAlgMask values differs from the ippAlgAuto, ippAlgDirect,
or ippAlgFFT values.
• the result of the bitwise AND operation between the algType andippiROIMask values differs from the ippiROIFull, ippiROISame,or ippiROIValid values.
• the result of the bitwise AND operation between the algType andippiNormMask values differs from the ippiNormNone or ippiNorm
values.

ippStsNullErr

Indicates an error when the pBufferSize is NULL.

See Also
Structures and Enumerators
SqrDistanceNorm Computes Euclidean distance between an image and a template.

1365

1

Intel® Integrated Performance Primitives Developer Guide and Reference

SqrDistanceNorm
Computes Euclidean distance between an image and atemplate.

SyntaxCase 1: Operating with integer output
IppStatus ippiSqrDistanceNorm_8u_C1RSfs(const Ipp8u* pSrc, int srcStep, IppiSize
srcRoiSize, const Ipp8u* pTpl, int tplStep, IppiSize tplRoiSize, Ipp8u* pDst, int
dstStep, int scaleFactor, IppEnum algType, Ipp8u* pBuffer);

Case 2: Operating on data with floating-point output
IppStatus ippiSqrDistanceNorm_<mod>(const Ipp<srcDatatype>* pSrc, int srcStep, IppiSize
srcRoiSize, const Ipp<srcDatatype>* pTpl, int tplStep, IppiSize tplRoiSize, Ipp32f*
pDst, int dstStep, IppEnum algType, Ipp8u* pBuffer);
Supported values for mod:32f_C1R

8u32f_C1R

16u32f_C1R

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source image ROI.

srcRoiSize

Distance, in bytes, between the starting points of consecutive
lines in the source image.
Size of the source ROI in pixels.

pTpl

Pointer to the template image.

srcStep

tplRoiSize

Distance, in bytes, between the starting points of consecutive
lines in the template image.
Size of the template ROI in pixels.

pDst

Pointer to the destination image ROI.

tplStep

dstStep
scaleFactor

Distance, in bytes, between the starting points of consecutive
lines in the destination image.
Scale factor.

algType

Bit-field mask for the algorithm type definition. Possible values are theresults of composition of the IppAlgType, IppiROIShape, andIppiNormOp values.

pBuffer

Pointer to the work buffer.

Description
Before using this function, you need to compute the size of the work buffer using theippiSqrDistanceNormGetBufferSize function.

1366

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

This function operates with ROI.
Depending on the IppiNormOp value set to the algType parameter, the function calculates the following
results:

IppiNormOp Value

ResultippiNormNone

Squared Euclidean distances Stx(r,c)

ippiNorm

Normalized squared Euclidean distances σtx(r,c)

For more information on how each value is calculated, see Image Proximity Measures.
The size of the resulting matrix depends on the IppiROIShape value:

IppiROIShape Value

Matrix Size

ippiROIFull(Ws + Wt - 1) * (Hs + Ht - 1)

ippiROISame

Ws*Hs

ippiROIValid(Ws -Wt + 1) * (Hs -Ht +1)

where
•
•

Ws , Hs is the width and height of the source image
Wt , Ht is the width and height of the template image

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when any of the specified pointers is NULL.

ippStsStepErr

Indicates an error when the value of srcStep, tplStep, or dstStep
is negative, or equal to zero.

ippStsSizeErr

Indicates an error when:••ippStsAlgTypeErr

srcRoiSize or tplRoiSize is negative, or equal to zerothe value of srcRoiSize is less than the corresponding value oftplRoiSize

Indicates an error when:•••

the result of the bitwise AND operation between the algType andippAlgMask values differs from the ippAlgAuto, ippAlgDirect,
or ippAlgFFT values;
the result of the bitwise AND operation between the algType andippiROIMask values differs from the ippiROIFull, ippiROISame,or ippiROIValid values;
the result of the bitwise AND operation between the algType andippiNormMask values differs from the ippiNormNone or ippiNorm
values;1367

1Intel® Integrated Performance Primitives Developer Guide and Reference

ExampleThe code example below demonstrates how to use the ippiSqrDistanceNormGetBufferSize andippiSqrDistanceNorm functions.

#include "ipps.h"#include "ippi.h"#include <iostream>#include <iomanip>
void print_dst_2D_32f(Ipp32f* pDst, int dstStep, IppiSize roiSize) {std::cout << "pDst ->\n";std::cout.precision(2);for (int h = 0; h < roiSize.height; h++) {for (int w = 0; w < roiSize.width; w++) {std::cout << std::setw(6) << std::fixed << pDst[w];}pDst = (Ipp32f*)((Ipp8u*)pDst + dstStep);
std::cout << std::endl;}}
IppStatus main() {IppStatus status;
Ipp32f pSrc[5 * 4];
Ipp32f pTpl[5 * 4];
Ipp32f pDst[9 * 7];//(5+5-1) x (4+4-1)
IppiSize srcRoiSize = { 5,4 };IppiSize tplRoiSize = { 5,4 };IppiSize dstRoiSize = { 9,7 };int srcStep = 5 * sizeof(Ipp32f);
int tplStep = 5 * sizeof(Ipp32f);
int dstStep = 9 * sizeof(Ipp32f);
IppEnum funCfg = (IppEnum)(ippAlgAuto | ippiNorm | ippiROIFull);
Ipp8u* pBuffer;
int bufSize = 0;
ippiSet_32f_C1R(2.0, pSrc, srcStep, srcRoiSize);
ippiSet_32f_C1R(1.0, pTpl, tplStep, tplRoiSize);status = ippiSqrDistanceNormGetBufferSize(srcRoiSize, tplRoiSize, funCfg, &bufSize);if (status != ippStsNoErr) return status;
pBuffer = ippsMalloc_8u(bufSize);status = ippiSqrDistanceNorm_32f_C1R(pSrc, srcStep, srcRoiSize, pTpl, tplStep, tplRoiSize,pDst, dstStep, funCfg, pBuffer);
print_dst_2D_32f(pDst, dstStep, dstRoiSize);
ippsFree(pBuffer);
return status;}
The result is as follows:

pDst ->
2.24 1.58 1.29 1.12 1.00 1.12 1.29 1.58 2.24
1.58 1.12 0.91 0.79 0.71 0.79 0.91 1.12 1.58

1368

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

1.29 0.91 0.75 0.65 0.58 0.65 0.75 0.91 1.29
1.12 0.79 0.65 0.56 0.50 0.56 0.65 0.79 1.12
1.29 0.91 0.75 0.65 0.58 0.65 0.75 0.91 1.29
1.58 1.12 0.91 0.79 0.71 0.79 0.91 1.12 1.58
2.24 1.58 1.29 1.12 1.00 1.12 1.29 1.58 2.24

See Also
Integer Result Scaling
Image Proximity Measures
Regions of Interest in Intel IPP
Structures and Enumerators
SqrDistanceNormGetBufferSize Computes the size of the work buffer for theippiSqrDistanceNorm function.
CrossCorrNormGetBufferSize
Computes the size of the work buffer for theippiCrossCorrNorm function.

SyntaxIppStatus ippiCrossCorrNormGetBufferSize (IppiSize srcRoiSize, IppiSize tplRoiSize,
IppEnum algType, int* pBufferSize);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
srcRoiSize, tplRoiSize

Size of the source/template ROI in pixels.

algType

Bit-field mask for the algorithm type definition. Possible values are theresults of composition of the IppAlgType, IppiROIShape, andIppiNormOp values.

pBufferSize

Pointer to the size of the work buffer.

Description
The ippiCrossCorrNormGetBufferSize function computes the size, in bytes, of the external work buffer
needed for the function that performs two-dimensional cross-correlation. The result is stored in thepBufferSize parameter.

Return Values
ippStsNoErr

Indicates no error.

ippStsSizeErr

Indicates an error when:••srcRoiSize or tplRoiSize is negative, or equal to zerothe value of srcRoiSize is less than the corresponding value oftplRoiSize.

1369

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Indicates an error when:ippStsAlgTypeErr•

the result of the bitwise AND operation between the algType andippAlgMask differs from the ippAlgAuto, ippAlgDirect, or
ippAlgFFT values.
• the result of the bitwise AND operation between the algType andippiROIMask differs from the ippiROIFull, ippiROISame, or
ippiROIValid values.
• the result of the bitwise AND operation between the algType andippiNormMask differs from the ippiNormNone, ippiNorm, or
ippiNormCoefficient values.
Indicates an error when pBufferSize is NULL.

ippStsNullPtrErr

See Also
Structures and Enumerators
CrossCorrNorm Computes a normalized cross-correlation between an image and a template.
CrossCorrNorm
Computes a normalized cross-correlation between an
image and a template.

SyntaxCase 1: Operating on data with integer output
IppStatus ippiCrossCorrNorm_8u_C1RSfs(const Ipp8u* pSrc, int srcStep, IppiSize
srcRoiSize, const Ipp8u* pTpl, int tplStep, IppiSize tplRoiSize, Ipp8u* pDst, int
dstStep, int scaleFactor, IppEnum algType, Ipp8u* pBuffer);

Case 2: Operating on data with floating-point output
IppStatus ippiCrossCorrNorm_<mod>(const Ipp<srcDatatype>* pSrc, int srcStep, IppiSize
srcRoiSize, const Ipp<srcDatatype>* pTpl, int tplStep, IppiSize tplRoiSize, Ipp32f*
pDst, int dstStep, IppEnum algType, Ipp8u* pBuffer);
Supported values for mod:32f_C1R

8u32f_C1R

16u32f_C1R

Case 3: Operating on data with integer output with TL functions
IppStatus ippsCrossCorrNorm_ 8u_C1RSfs_T (const Ipp8u* pSrc, int srcStep,
IppiSizesrcRoiSize, const Ipp8u* pTpl, int tplStep, IppiSize tplRoiSize, Ipp8u* pDst,
int dstStep, int scaleFactor, IppEnum algType, Ipp8u* pBuffer);

Case 4: Operating on data with floating-point output with TL functions
IppStatus ippsCrossCorrNorm_ <mod>_T (const Ipp<srcDatatype>* pSrc, int srcStep,
IppiSizesrcRoiSize, const Ipp<srcDatatype>* pTpl, int tplStep, IppiSize tplRoiSize,
Ipp32f* pDst, int dstStep, IppEnum algType, Ipp8u* pBuffer);
Supported values for mod:32f_C1R

Include Files
ippi.h1370

8u32f_C1R

16u32f_C1RDeveloper Guide and Reference for Intel® Integrated Performance Primitives

1

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
Pointer to the source image ROI.

pSrc

srcRoiSize

Distance, in bytes, between the starting points of consecutive
lines in the source image.
Size of the source ROI in pixels.

pTpl

Pointer to the template image.

srcStep

tplRoiSize

Distance, in bytes, between the starting points of consecutive
lines in the template image.
Size of the template ROI in pixels.

pDst

Pointer to the destination image ROI.

tplStep

Distance, in bytes, between the starting points of consecutive
lines in the destination image.
Scale factor.

dstStep
scaleFactor
algType

Bit-field mask for the algorithm type definition. Possible values are theresults of composition of the IppAlgType, IppiROIShape, andIppiNormOp values.

pBuffer

Pointer to the work buffer.

Description
This function operates with ROI.
Depending on the IppiNormOp value set to the algType parameter, the function calculates the following
results:

IppiNormOp Value

ResultippiNormNone

Cross-correlation values Rtx(r,c)

ippiNorm

Normalized cross-correlation values ρtx(r,c)

ippiNormCoefficient

Normalized correlation coefficients γtx(r,c)

For more information about how each value is calculated, see Image Proximity Measures.
The size of the resulting matrix depends on the IppiROIShape value:

IppiROIShape Value

Matrix Size

ippiROIFull(Ws + Wt - 1) * (Hs + Ht - 1)

ippiROISame

Ws*Hs

ippiROIValid(Ws -Wt + 1) * (Hs -Ht +1)

where
•

Ws , Hs is the width and height of the source image

1371

1
•

Intel® Integrated Performance Primitives Developer Guide and Reference

Wt , Ht is the width and height of the template image

Before using this function, you need to compute the size of the work buffer using theippiCrossCorrNormGetBufferSize function.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when any of the specified pointers is NULL.

ippStsStepErr

Indicates an error when the value of srcStep, tplStep, or dstStep
is negative, or equal to zero.

ippStsSizeErr

Indicates an error when:••ippStsAlgTypeErr

the srcRoiSize or tplRoiSize is negative, or equal to zero.
the value of srcRoiSize is less than the corresponding value ofthe tplRoiSize.

Indicates an error when:•

the result of the bitwise AND operation between the algType andippAlgMask differs from the ippAlgAuto, ippAlgDirect, or
ippAlgFFT values.
• the result of the bitwise AND operation between the algType andippiROIMask differs from the ippiROIFull, ippiROISame, or
ippiROIValid values.
• the result of the bitwise AND operation between the algType andippiNormMask differs from the ippiNormNone, ippiNorm, or
ippiNormCoefficient values.

ExampleThe code example below demonstrates how to use the ippiCrossCorrNormGetBufferSize andippiCrossCorrNorm functions.
#include "ipps.h"#include "ippi.h"#include <iostream>#include <iomanip>
void print_dst_2D_32f(Ipp32f* pDst, int dstStep, IppiSize roiSize) {std::cout << "pDst ->\n";std::cout.precision(2);for (int h = 0; h < roiSize.height; h++) {for (int w = 0; w < roiSize.width; w++) {std::cout << std::setw(6) << std::fixed << pDst[w];}pDst = (Ipp32f*)((Ipp8u*)pDst + dstStep);
std::cout << std::endl;}}
IppStatus main() {IppStatus status;
IppiSize srcRoiSize = { 5,4 };IppiSize tplRoiSize = { 3,3 };IppiSize dstRoiSize = { 5,4 };// same as src

1372

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Ipp32f pSrc[5 * 4] = {1.0f, 2.0f, 1.5f, 4.1f, 3.6f,
0.2f, 3.2f, 2.5f, 1.5f, 10.0f,
5.0f, 6.8f, 0.5f, 4.1f, 1.1f,
7.1f, 4.2f, 2.2f, 8.7f, 10.0f };Ipp32f pTpl[3 * 3] = {2.1f, 3.5f, 7.7f,
0.4f, 2.3f, 5.5f,
1.4f, 2.8f, 3.1f };Ipp32f pDst[5 * 4];
int srcStep = 5 * sizeof(Ipp32f);
int tplStep = 3 * sizeof(Ipp32f);
int dstStep = 5 * sizeof(Ipp32f);
IppEnum funCfg = (IppEnum)(ippAlgAuto | ippiROISame | ippiNorm);
Ipp8u* pBuffer;
int bufSize;
status = ippiCrossCorrNormGetBufferSize(srcRoiSize, tplRoiSize, funCfg, &bufSize);if (status != ippStsNoErr) return status;
pBuffer = ippsMalloc_8u(bufSize);status = ippiCrossCorrNorm_32f_C1R(pSrc, srcStep, srcRoiSize, pTpl, tplStep, tplRoiSize,pDst, dstStep, funCfg, pBuffer);
print_dst_2D_32f(pDst, dstStep, dstRoiSize);
ippsFree(pBuffer);
return status;}
The result is as follows:

pDst ->
0.53 0.54 0.58 0.50 0.30
0.68 0.62 0.68 0.83 0.38
0.77 0.55 0.60 0.81 0.42
0.81 0.46 0.70 0.62 0.24

See Also
Integer Result Scaling
Regions of Interest in Intel IPP
Structures and Enumerators
Image Proximity Measures
SADGetBufferSize
Computes the size of the work buffer for the ippiSAD
function.

SyntaxIppStatus ippiSADGetBufferSize(IppiSize srcRoiSize, IppiSize tplRoiSize, IppDataTypedataType, int numChannels, IppiROIShape shape, int* pBufferSize);

Include Files
ippi.h1373

1Intel® Integrated Performance Primitives Developer Guide and Reference

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
srcRoiSize

Size of the source ROI in pixels.

tplRoiSize

Size of the template ROI in pixels.

dataType

Enumeration that defines the shape of the result of the SAD
operation (see Structures and Enumerators).
Type of the input data.

numChannels

Number of channels in the images.

pBufferSize

Pointer to the computed value of the external buffer size.

shape

Description
The ippiSADGetBufferSize function computes the size of the external work buffer (in bytes) needed forthe ippiSAD function and stores the result in the *pBufferSize parameter.

Return Values
Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if the pBufferSize pointer is NULL.

ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsNotSupportedModeErr

Indicates an error condition if srcRoiSize or tplRoiSize has afield with a zero or negative value.
Indicates an error condition if either shape does not equal
ippiROIValid or numChannels does not equal 1.

SAD
Computes sums of absolute differences (SAD) for atemplate image and different locations within a source
image where the template image can fit.

SyntaxIppStatus ippiSAD_<mod>(const Ipp<srcDatatype>* pSrc, int srcStep, IppiSize srcRoiSize,const Ipp<srcDatatype>* pTpl, int tplStep, IppiSize tplRoiSize, Ipp<dstDatatype>* pDst,
int dstStep, IppiROIShape shape, int scaleFactor, Ipp8u* pBuffer);
IppStatus ippiSAD_32f_C1R(const Ipp<srcDatatype>* pSrc, int srcStep, IppiSize
srcRoiSize, const Ipp<srcDatatype>* pTpl, int tplStep, IppiSize tplRoiSize,Ipp<dstDatatype>* pDst, int dstStep, IppiROIShape shape, Ipp8u* pBuffer);
Supported values for mod:8u32s_C1RSfs

Include Files
ippi.h1374

16u32s_C1RSfs

16s32s_C1RSfs

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source image ROI.

srcRoiSize

Distance, in bytes, between the starts of consecutive lines inthe source image.
Size of the source ROI in pixels.

pTpl

Pointer to the template image ROI.

srcStep

tplRoiSize

Distance, in bytes, between the starts of consecutive lines inthe template image.
Size of the template ROI in pixels.

pDst

Pointer to the destination image ROI.

tplStep

scaleFactor

Distance, in bytes, between the starts of consecutive lines inthe destination image.
Enumeration that defines the shape of the result of the SAD
operation (see Structures and Enumerators).
Scale factor (see Integer Result Scaling).

pBuffer

Pointer to the buffer for internal calculations.

dstStep
shape

Description
The ippiSAD function operates with ROI (see Regions of Interest in Intel IPP).
The function only supports the ippiROIValid value of shape, and so the sizes of the destination ROI are
different from the sizes of both the source ROI and template ROI and depend on those sizes as follows:
dstRoiSize.width = W =srcRoiSize.width - tplRoiSize.width + 1
dstRoiSize.height = H = srcRoiSize.height - tplRoiSize.height + 1
So there are exactly W*H unique locations within the source image where the template image can fit. The
top-left pixel determines each of these locations. For each location, the function computes absolutedifferences between corresponding pixel values of the source and template images, sums these differences tomake the SAD value of the top-left pixel, and assigns the SAD value to the appropriate pixel in thedestination buffer.
For integer flavors, the resulting values are also scaled by scaleFactor.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if the pSrc, pTpl, pDst, or pBuffer
pointer is NULL.
Indicates an error condition if srcRoiSize or tplRoiSize has afield with a zero or negative value or if srcRoiSize in any
direction is less than tplRoiSize.

1375

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Indicates an error condition if srcStep, tplStep, or dstStep
has a zero or negative value or is not a multiple of the image
data size (4 for floating-point images or 2 for short-integer
images)Indicates an error condition if scaleFactor <0.

ippStsStepErr

ippStsBadArgErr
ippStsNotSupportedModeErr

Indicates an error condition if intersection of the source anddestination ROI is detected or if shape differs from
ippiROIValid.

ExampleThe code example below shows how to use the ippiSAD_8u32s_C1RSfs function.

Ipp8u src[8*8] = {1, 2, 3, 4, 8, 8, 8, 8,
1, 2, 3, 4, 8, 8, 8, 8,
1, 2, 3, 4, 8, 8, 8, 8,
1, 2, 3, 4, 8, 8, 8, 8,
1, 2, 3, 4, 8, 8, 8, 8,
1, 2, 3, 4, 8, 8, 8, 8,
1, 2, 3, 4, 8, 8, 8, 8,
1, 2, 3, 4, 8, 8, 8, 8};
IppiSize srcRoi = { 7, 7 };Ipp8u template[3*3] = {10, 10, 10,
10, 10, 10,
10, 10, 10};
IppiSize tplRoi = { 3, 3 };Ipp32s dst[8*8] = {0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0};
IppiSize srcRoi = { 3, 3 };ippiSADGetBufferSize( srcRoi, tplRoi, ippiROIVaid , 1, &bufferSize);
Ipp8u* pBuffer = new Ipp8u [bufferSize];
ippiSAD_8u32s_C1RSfs(src, 8, srcRoi, template, 3, tplRoi, dst, 8, ippiROIVaid , 1, pBuffer);
Result:1 2 3 4 8 8 8 8
1 2 3 4 8 8 8 8 src
1 2 3 4 8 8 8 8
1 2 3 4 8 8 8 8
1 2 3 4 8 8 8 8
1 2 3 4 8 8 8 8
1 2 3 4 8 8 8 8
1 2 3 4 8 8 8 81376

10 10 1010 10 10 tpl
10 10 1036 32 22 15 9 0 0 036 32 22 15 9 0 0 0 dst
36 32 22 15 9 0 0 036 32 22 15 9 0 0 036 32 22 15 9 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0

1Developer Guide and Reference for Intel® Integrated Performance Primitives

Image Geometry Transforms
This chapter describes the Intel® IPP image processing functions that perform geometric operations ofresizing, rotating, warping and remapping an image.
Most functions performing geometric transform of an image use an interpolation algorithm to resample theimage. The type of interpolation method to be used is passed to the function in the interpolation
parameter for rotate, warp, and remap. For resize transform, the interpolation type is part of the function
name.
The following interpolation algorithms are used:
–
–
–
–
–
–
–

nearest neighborlinear interpolation
cubic convolution
supersamplinginterpolation using Lanczos window function
interpolation with two-parameter cubic filters
optional edge smoothing of the destination image.

The nearest neighbor algorithm is the fastest, while other methods yield higher quality results, but areslower.
Use one of the following constant identifiers for the applicable interpolation methods:

IPPI_INTER_NN/ippNearest

Nearest neighbor interpolation.

IPPI_INTER_LINEAR/ippLinear

Linear interpolation.

IPPI_INTER_CUBIC

Cubic interpolation.

IPPI_INTER_LANCZOS/ippLanczos

Interpolation using 3-lobed Lanczos window function.

IPPI_INTER_CUBIC2P_BSPLINEInterpolation using B-spline.

IPPI_INTER_CUBIC2P_CATMULLROM Interpolation using Catmull-Rom spline.
IPPI_INTER_CUBIC2P_B05C03

Interpolation using special cubic filter.

ippSuperSupersampling interpolation.

ippCubic

Interpolation with two-parameter cubic filters.

For certain functions, you can combine the above interpolation algorithms with additional smoothing(antialiasing) of edges to which the original image borders are transformed. To use this edge smoothing, set
the parameter interpolation to the bitwise OR of IPPI_SMOOTH_EDGE or IPPI_SUBPIXEL_EDGE and thedesired interpolation mode, or use the special function flags.
CautionYou can use interpolation with edge smoothing option only in those geometric transform functions
where this option is explicitly listed in the parameters definition section.

See appendix B “Interpolation in Image Geometric Transform Functions” for more information on theinterpolation algorithms that are used in the library.
Super Sampling mode of resize transform has several limitations. It can be used only:••

for reducing image sizefor full images resize, while other interpolation modes can be used for full and tiled images for better
speed/memory performance.

1377

1

Intel® Integrated Performance Primitives Developer Guide and Reference

ROI Processing in Geometric Transforms
All the transform functions described in this chapter operate in rectangular regions of interest (ROIs) that are
defined in both the source and destination images. The procedures for handling ROIs in geometric transformfunctions differ from those used in other functions (see Regions of Interest in Intel IPP). The main differenceis that operations take place in the intersection of the transformed source ROI and the destination ROI. Morespecifically, all geometric transform functions (except those which perform inverse warping operations)handle ROIs with the following sequence of operations (see figure below):•••transform the rectangular ROI of the source image to quadrangle in the destination image;find the intersection of this quadrangle and the rectangular ROI of the destination image;
update the destination image in the intersection area.

The coordinates in the source and destination images must have the same origin.
When using functions with ROI, every scan line of a source image has a stride. It is padded with zeroes foralignment, so the actual size of a scan line in bytes is often greater than the image width. The size of eachrow of image data in bytes is determined by the value of srcStep parameter, which gives distance in bytes
between the starts of consecutive lines of an image.
To fully describe a rectangular ROI, both its origin (coordinates of top left corner) and size must be
referenced. For geometrical transform functions, the source image ROI is specified by srcRoi parameter of
IppiRect type, meaning that all four values describing the rectangular ROI are given explicitly.
The destination image ROI for different functions can be specified either by dstRoi parameter of IppiRect
type, or dstRoiSize parameter of IppiSize type. In the latter case, only the destination ROI size ispassed, while its origin is referenced by pDst pointer.
The destination image origin ROI for different functions can be specified by dstOffset parameter of
IppiPoint type and dstSize parameter of IppiSize type. In this case, the processed destination image
coressponds to the processed ROI of the destination image origin.

Geometric Transform Functions
ResizeYCbCr422GetBufSize
Computes the size of the external buffer for the NV12
resize transform.

1378

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

SyntaxIppStatus ippiResizeYCbCr422GetBufSize(IppiRect srcROI, IppiSize dstRoiSize, intinterpolation, int* pSize);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
srcROI

Region of interest of the source image.

dstRoiSize

Region of interest of the destination image.

interpolation

Type of interpolation to apply to the source image:

IPP_INTER_NN

Nearest neighbor interpolation

IPP_INTER_LINEAR

Linear interpolation

IPP_INTER_CUBIC

Cubic interpolation

IPPI_INTER_CUBIC2P_ Catmull-Rom cubic filter
CATMULLROM
IPP_INTER_LANCZOS
pSize

Lanczos filter with size 6x6

Pointer to the size, in bytes, of the external buffer.

Description
This function computes the size of the external buffer for the YCbCr resize transform.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if pSize is NULL.

ippStsSizeErr

Indicates an error in the following cases:• width of either source or destination ROI is less than 2• height of either source or destination ROI is less than 1

ippStsDoubleSize
ippStsInterpolationErr

Indicates a warning if width of wither source or destination ROI
is not a multiple of 2.
Indicates an error if interpolation has an illegal value.

ResizeYCbCr422
Performs resizing of a 4:2:2 two-channel image.

1379

1

Intel® Integrated Performance Primitives Developer Guide and Reference

SyntaxIppStatus ippiResizeYCbCr422_8u_C2R(const Ipp8u* pSrc, IppiSize srcSize, int srcStep,
IppiRect srcROI, Ipp8u* pDst, int dstStep, IppiSize dstRoiSize, int interpolation,
Ipp8u* pBuffer);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source image.

srcSizeSize, in pixels, of the source image.

srcStep

Distance, in bytes, between the starting points of consecutive lines inthe source image buffer.

srcROI

Region of interest in the source image.

pDst

Pointer to the destination image ROI.

dstStep

Distance, in bytes, between the starting points of consecutive lines inthe destination image buffer.

dstRoiSize

Size of the destination ROI in pixels.

interpolation

Type of interpolation to apply to the source image:

IPP_INTER_NN

Nearest neighbor interpolation

IPP_INTER_LINEAR

Linear interpolation

IPP_INTER_CUBIC

Cubic interpolation

IPPI_INTER_CUBIC2P_ Catmull-Rom cubic filter
CATMULLROM
IPP_INTER_LANCZOS
pBuffer

Lanczos filter with size 6x6

Pointer to the external buffer.

Description
This function operates with ROI (see ROI Processing in Geometric Transforms).
This function resizes the source image ROI to the destination image ROI origin. The function performs
resampling of the result using the interpolation mode specified by the interpolation parameter, and storesit in the destination image ROI.
The source image is a two-channel image in the 4:2:2 sampling format in color spaces with decoupledluminance and chrominance components, for example, YUV422 or YCrCb422.

Return Values
ippStsNoErr

1380

Indicates no error.

Developer Guide and Reference for Intel® Integrated Performance Primitives

ippStsNullPtrErr

Indicates an error if pSrc, pDst, or pBuffer is NULL.

ippStsSizeErr

Indicates an error in the following cases:

1• width of either source or destination ROI is less than 2• height of either source or destination ROI is less than 1
ippStsDoubleSize
ippStsInterpolationErr
ippStsWrongIntersectROI

Indicates a warning if width of wither source or destination ROI
is not a multiple of 2.
Indicates an error if interpolation has an illegal value.
Indicates a warning if srcROI does not intersect with the source
image; no operation is required.

Resize Functions with Prior Initialization
This section describes the Intel® IPP resize functions that use the specification structure in operation. Before
using these functions, you need to initialize the structure.
Using Intel® IPP Resize Functions with Prior Initialization
You can use one of the following approaches to image resizing:•••

Resizing the whole image
Resizing a tiled image with one prior initialization
Resizing a tiled image with prior initialization for each tile

Interpolation algorithms of the Lanczos, Linear, and Cubic types use edge pixels of the source image that areout of the image origin. When calling the ippiResize<Filter> function with one of these interpolation
algorithms applied, you need to specify the appropriate border type. The following border types aresupported:•••

Replicated borders: border pixels are replicated from the source image boundary pixels;
Borders in memory: the source image border pixels are obtained from the source image pixels inmemory;Mixed borders: a combined approach is applied.
NOTE
If you want to resize an image with antialiasing, follow the same instructions as provided below, but
use ippiResizeAntialiasing<Filter>Init instead of ippiResize<Filter>Init for initialization,and ippiResizeAntialiasing<Filter> instead of ippiResize<Filter>, as a processing function.

Resizing the Whole Image
You can apply the approach described below to resize when source and destination images are fully
accessible in memory. However, this method only runs on a single thread.
To resize the whole image:
1.

2.

3.

Call the ippiResizeGetSize function with the appropriate interpolation type. This function uses sourceand destination image sizes to calculate how much memory must be allocated for the IppResizeSpec
structure and initialization work buffer.
Initialize the IppResizeSpec structure by calling the ippiResize<Filter>Init, where <Filter> cantake one of the following values: Nearest, Linear, Cubic, Lanczos, and Super. These prerequisite
steps allow resize to be called multiple times without recalculations.
Call the ippiResizeGetBufferSize function for the initialized IppResizeSpec structure. This functionuses the destination image size to calculate how much memory must be allocated for the resize work
buffer.

1381

1
4.
5.

6.

Intel® Integrated Performance Primitives Developer Guide and Reference

Call ippiResize<Filter> with the appropriate image type.
If you call the ippiResize<Filter> function with a ippBorderInMem border or any mixed border
type, the applied interpolation algorithm uses weighted values from edge pixels of the source image
when outside the image boundaries. To obtain the size of the border required for correct edge
calculation, call the ippiResizeGetBorderSize function for the appropriate flavor. In case of mixed
border type, out of image pixels are used only behind the non-replicated edge.
You can use mixed borders by using the bitwise OR operation between the ippBorderRepl type and thefollowing border types: ippBorderInMemTop, ippBorderInMemBottom, ippBorderInMemLeft,
ippBorderInMemRight.

Figure Simple Image Resize shows a simple image resizing example, in which image resolution is increasedby 1.5x.
Simple Image Resize

ExampleThe code example below demonstrates whole image resizing with the Lanczos interpolation method:

IppStatus resizeExample_C3R(Ipp8u* pSrc, IppiSize srcSize, Ipp32s srcStep, Ipp8u* pDst, IppiSize
dstSize, Ipp32s dstStep){
IppiResizeSpec_32f* pSpec = 0;
int specSize = 0, initSize = 0, bufSize = 0;
Ipp8u* pBuffer = 0;
Ipp8u* pInitBuf = 0;
Ipp32u numChannels = 3;
IppiPoint dstOffset = {0, 0};
IppStatus status = ippStsNoErr;
IppiBorderType border = ippBorderRepl;/* Spec and init buffer sizes */status = ippiResizeGetSize_8u(srcSize, dstSize, ippLanczos, 0, &specSize, &initSize);

1382

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

if (status != ippStsNoErr) return status;/* Memory allocation */pInitBuf = ippsMalloc_8u(initSize);pSpec= (IppiResizeSpec_32f*)ippsMalloc_8u(specSize);if (pInitBuf == NULL || pSpec == NULL){
ippsFree(pInitBuf);
ippsFree(pSpec);
return ippStsNoMemErr;}/* Filter initialization */status = ippiResizeLanczosInit_8u(srcSize, dstSize, 3, pSpec, pInitBuf);
ippsFree(pInitBuf);
if (status != ippStsNoErr){
ippsFree(pSpec);
return status;}/* work buffer size */status = ippiResizeGetBufferSize_8u(pSpec, dstSize, numChannels, &bufSize);if (status != ippStsNoErr){
ippsFree(pSpec);
return status;}
pBuffer = ippsMalloc_8u(bufSize);if (pBuffer == NULL){
ippsFree(pSpec);
return ippStsNoMemErr;}/* Resize processing */status = ippiResizeLanczos_8u_C3R(pSrc, srcStep, pDst, dstStep, dstOffset, dstSize, border,
0, pSpec, pBuffer);
ippsFree(pSpec);
ippsFree(pBuffer);
return status;}

Resizing a Tiled Image with One Prior Initialization
You can apply the approach described below to resize when source and destination images are not fully
accessible in memory, or to improve the performance of resizing by external threading.
The main difference between this approach and whole image resizing is that the processing is split into
sections of the image called tiles. Each call of the Resize<Filter> function works with the destination
image origin region of interest (ROI) that is defined by dstOffset and dstSize parameters. The destinationand source ROI must be fully accessible in memory.

1383

1

Intel® Integrated Performance Primitives Developer Guide and Reference

To resize an image with the tiled approach:
1.

2.
3.

4.

5.
6.
7.

8.
9.

Call the ippiResizeGetSize function with the appropriate interpolation type. This function uses thesource and destination image sizes to calculate how much memory must be allocated for the
IppResizeSpec structure and initialization work buffer.
Initialize the IppResizeSpec structure by calling ippiResize<Filter>Init, where <Filter> cantake one of the following values: Nearest, Cubic, Linear, and Lanczos.
Determine an appropriate partitioning scheme to divide the destination image into tiles. Tiles can besets of rows or a regular grid of subimages. A simple vertical subdivision into sets of lines is often
sufficient.
Obtain the source ROI for the defined destination tile by calling the ippiResizeGetSrcRoi function forthe corresponding flavor. The algorithm uses edge pixels that are out of the source ROI to calculateedge pixels of the destination ROI. These out of the source ROI edge pixels must be accessible inmemory.
If the source ROI is an interior field of the source image origin, obtain the border ROI size by calling theippiResizeGetBorderSize function for the corresponding flavor.
If the source ROI is an edge tile, the algorithm can interpolate pixels beyond the image boundary as in
the previous method.
If the source and destination images are fully accessible in memory, you can use the source ROI offset
for the pSrc calculation. To obtain the offset, call the ippiResizeGetSrcOffset function for thecorresponding flavor.
Call the ippiResizeGetBufferSize function to obtain the size of the resize work buffer required foreach tile processing. The dstSize parameter must be equal to the tile size.
Call ippiResize<Filter> for each tile (ROI). The dstOffset parameter must specify the image ROI
offset with respect to the destination image origin. The dstSize parameter must be equal to the ROI
size. Parameters pSrc and pDst must point to the beginning of the source and destination ROI in
memory respectively. The source and destination ROIs must be fully accessible in memory.
You can process tiles in any order. When using multitple threads you can process all tiles
simultaneously.
NOTE
If you resize a tiled image with the Super Sampling algorithm, and the source image width todestination image width ratio is m/n, you can reach better performance of resize operation if all
destination tiles have width that is a multiple of n.

1384

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Figure Tiling Image Resize shows the resize of the image divided into tiles.
Tiling Image Resize

ExampleThe code example below demonstrates a multithreading resize operation using OpenMP* with parallelization
only in the y direction:#define MAX_NUM_THREADS 16
IppStatus tileResizeExample_C3R(Ipp8u* pSrc, IppiSize srcSize, Ipp32s srcStep, Ipp8u* pDst,
IppiSize dstSize, Ipp32s dstStep){
IppiResizeSpec_32f* pSpec = 0;
int specSize = 0, initSize = 0, bufSize = 0;
Ipp8u* pBuffer = 0;
Ipp8u* pInitBuf = 0;
Ipp32u numChannels = 3;
IppiPoint dstOffset = {0, 0};
IppiPoint srcOffset = {0, 0};
IppStatus status = ippStsNoErr;
IppiBorderSize borderSize = {0, 0, 0, 0};
IppiBorderType border = ippBorderRepl;
int numThreads, slice, tail;int bufSize1, bufSize2;
IppiSize dstTileSize, dstLastTileSize;
IppStatus pStatus[MAX_NUM_THREADS];/* Spec and init buffer sizes */status = ippiResizeGetSize_8u(srcSize, dstSize, ippLinear, 0, &specSize, &initSize);if (status != ippStsNoErr) return status;

1385

1

Intel® Integrated Performance Primitives Developer Guide and Reference/* Memory allocation */pInitBuf = ippsMalloc_8u(initSize);pSpec= (IppiResizeSpec_32f*)ippsMalloc_8u(specSize);if (pInitBuf == NULL || pSpec == NULL){
ippsFree(pInitBuf);
ippsFree(pSpec);
return ippStsNoMemErr;}/* Filter initialization */status = ippiResizeLinearInit_8u(srcSize, dstSize, pSpec);
ippsFree(pInitBuf);
if (status != ippStsNoErr){
ippsFree(pSpec);
return status;}
status = ippiResizeGetBorderSize_8u(pSpec, &borderSize);if (status != ippStsNoErr){
ippsFree(pSpec);
return status;}/* General transform function *//* Parallelized only by Y-direction here */#pragma omp parallel num_threads(MAX_NUM_THREADS){#pragma omp master{
numThreads = omp_get_num_threads();
slice = dstSize.height / numThreads;
tail = dstSize.height % numThreads;
dstTileSize.width = dstLastTileSize.width = dstSize.width;
dstTileSize.height = slice;
dstLastTileSize.height = slice + tail;ippiResizeGetBufferSize_8u(pSpec, dstTileSize, ippC3, &bufSize1);
ippiResizeGetBufferSize_8u(pSpec, dstLastTileSize, ippC3, &bufSize2);
pBuffer = ippsMalloc_8u(bufSize1 * (numThreads - 1) + bufSize2);}#pragma omp barrier{if (pBuffer){
Ipp32u i;
Ipp8u *pSrcT, *pDstT;
Ipp8u *pOneBuf;
IppiPoint srcOffset = {0, 0};
IppiPoint dstOffset = {0, 0};
IppiSize srcSizeT = srcSize;

1386

Developer Guide and Reference for Intel® Integrated Performance Primitives

IppiSize

1

dstSizeT = dstTileSize;i = omp_get_thread_num();
dstSizeT.height = slice;
dstOffset.y += i * slice;
if (i == numThreads - 1) dstSizeT = dstLastTileSize;pStatus[i] = ippiResizeGetSrcRoi_8u(pSpec, dstOffset, dstSizeT, &srcOffset,&srcSizeT);
if (pStatus[i] == ippStsNoErr){
pSrcT = (Ipp8u*)((char*)pSrc + srcOffset.y * srcStep);
pDstT = (Ipp8u*)((char*)pDst + dstOffset.y * dstStep);
pOneBuf = pBuffer + i * bufSize1;
pStatus[i] = ippiResizeLinear_8u_C3R (pSrcT, srcStep, pDstT, dstStep,
dstOffset, dstSizeT, border, 0, pSpec, pOneBuf);}}}}
ippsFree(pSpec);
if (pBuffer == NULL) return ippStsNoMemErr;
ippsFree(pBuffer);for (Ipp32u i = 0; i < numThreads; ++i){/* Return bad status */if(pStatus[i] != ippStsNoErr) return pStatus[i];}return status;}

Resizing a Tiled Image with Prior Initialization for Each Tile
You can apply this approach only in cases when the destination image can be divided into tiles so that each
destination tile corresponds to a source image tile that starts with an integer pixel value origin. For example,
if the ratio of the source and destination images sizes is 2/3, the destination image can be divided into 3x3
tiles, each of which corresponds to the source image tile 2x2.
This approach is useful if there are restrictions on memory size when processing an image, or if the image
size is large and ippiResizeGetBufferSize function returns ippStsSizeErr error. The initialization data
for a tile is less than the same data for the whole image.
Each tile of the source image can be considered as an independent image that can be resized. For interior tile
processing, the border must be always of the ippBorderInMem type. If you need to replicate any borders of
the source image origin, you should combine the border type of the outer tiles so that interior tiles edges
have border in memory and external tile borders are of the specified border type. This approach enables theright linking order of tiles.

1387

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Figure Resize of the Image Divided into Subimages shows the approach, when the source image is divided
into several subimages that are resized independently.
Resize of the Image Divided into Subimages

ExampleThe code example below divides the source image into tiles and resizes each image independently:

IppStatus separateTileResizeExample_C3R(Ipp8u* pSrc, IppiSize srcTileSize, Ipp32s srcStep,
Ipp8u* pDst, IppiSize dstTileSize, Ipp32s dstStep, Ipp32s xNumTiles, Ipp32s yNumTiles){
IppiResizeSpec_32f* pSpec = 0;
int specSize = 0, initSize = 0, bufSize = 0;
Ipp8u* pBuffer = 0;
Ipp8u* pInitBuf = 0;
Ipp32u numChannels = 3;
IppStatus status = ippStsNoErr;/* tiles cicle */for (Ipp32s j = 0; j < xNumTiles; j ++){for (Ipp32s i = 0; i < yNumTiles; i ++){/* calculation of the destination image ROI offset */IppiPoint dstOffset = {j * dstTileSize.width, i * dstTileSize.height};
Ipp8u* pDstT = pDst + dstStep * dstOffset.y + dstOffset.x * numChannels *sizeof(Ipp8u);/* calculation of the source image ROI offset */IppiPoint srcOffset = {j * srcTileSize.width, i * srcTileSize.height};
Ipp8u* pSrcT = pSrc + srcStep * srcOffset.y + srcOffset.x * numChannels *sizeof(Ipp8u);
IppiBorderType borderT = ippBorderRepl;

1388

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

IppiPoint dstOffsetZero = {0, 0};/* correction of the border type for the tile processing */if (j > 0) /* the processed tile is not on the left image origin edge*/{
borderT = (IppiBorderType)((int)borderT | (int)ippBorderInMemLeft);}if (j < xNumTiles - 1) /* the processed tile is not on the right image origin edge*/{
borderT = (IppiBorderType)((int)borderT | (int)ippBorderInMemRight);}
if (i > 0) /* the processed tile is not on the top image origin edge*/{
borderT = (IppiBorderType)((int)borderT | (int)ippBorderInMemTop);}if (i < yNumTiles - 1) /* the processed tile is not on the bottom image origin edge*/{
borderT = (IppiBorderType)((int)borderT | (int)ippBorderInMemBottom);}/* Spec and init buffer sizes */status = ippiResizeGetSize_8u(srcTileSize, dstTileSize, ippLanczos, 0, &specSize,&initSize);if (status != ippStsNoErr) return status;/* Memory allocation */pInitBuf = ippsMalloc_8u(initSize);pSpec= (IppiResizeSpec_32f*)ippsMalloc_8u(specSize);if (pInitBuf == NULL || pSpec == NULL){
ippsFree(pInitBuf);
ippsFree(pSpec);
return ippStsNoMemErr;}/* Filter initialization */status = ippiResizeLanczosInit_8u(srcTileSize, dstTileSize, 3, pSpec, pInitBuf);
ippsFree(pInitBuf);
if (status != ippStsNoErr){
ippsFree(pSpec);
return status;}/* work buffer size */status = ippiResizeGetBufferSize_8u(pSpec, dstTileSize, numChannels, &bufSize);if (status != ippStsNoErr){
ippsFree(pSpec);
return status;}
pBuffer = ippsMalloc_8u(bufSize);if (pBuffer == NULL)
{

1389

1

Intel® Integrated Performance Primitives Developer Guide and Reference

ippsFree(pSpec);
return ippStsNoMemErr;}/* Resize processing */status = ippiResizeLanczos_8u_C3R(pSrcT, srcStep, pDstT, dstStep, dstOffsetZero,
dstTileSize, borderT, 0, pSpec, pBuffer);
ippsFree(pSpec);
ippsFree(pBuffer);
if (status != ippStsNoErr) return status;}}
return ippStsNoErr;}

See Also
User-defined Border Types
ResizeGetSize
Computes the size of the specification structure andthe size of the external temporary buffer for the resize
transform initialization.

SyntaxCase 1: Processing images of 32-bit sizes
IppStatus ippiResizeGetSize_<mod>(IppiSize srcSize, IppiSize dstSize,
IppiInterpolationType interpolation, Ipp32u antialiasing, int* pSpecSize, int*
pInitBufSize);
Supported values for mod:

8u

16u

32f

64f

IppStatus ippiResizeGetSize_16s(IppiSize srcSize, IppiSize dstSize,
IppiInterpolationType interpolation, Ipp32u antialiasing, int* pSpecSize, Ipp32s*
pInitBufSize);

Case 2: Processing images with platform-aware functions
IppStatus ippiResizeGetSize_L(IppiSizeL srcSize, IppiSizeL dstSize, IppDataTypedataType, IppiInterpolationType interpolation, Ipp32u antialiasing, IppSizeL*
pSpecSize, IppSizeL* pInitBufSize);

Case 3: Processing images with threading layer (TL) functions
IppStatus ippiResizeGetSize_LT(IppiSizeL srcSize, IppiSizeL dstSize, IppDataTypedataType, IppiInterpolationType interpolation, Ipp32u antialiasing, IppSizeL*
pSpecSize, IppSizeL* pInitBufSize);

Include Files
ippi.h
Flavors with the _LT suffix: ippi_tl.h
Flavors with the _L suffix: ippi_l.h

1390

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Domain Dependencies
Flavors declared in ippi.h:
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib
Flavors declared in ippi_tl.h:
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib, ippcore_tl.lib, ippi_tl.lib

Parameters
srcSizeSize, in pixels, of the source image.

dstSizeSize, in pixels, of the destination image.

interpolation

Interpolation method. Supported values: ippNearest,
ippLinear, ippCubic, ippLanczos, and ippSuper.

antialiasing
dataType

Supported values: 1- resizing with antialiasing, 0 - resizing
without antialiasing.
Data type of the image. Supported values: ipp8u, ipp16u,
ipp16s, ipp32f, ipp64f (only for linear interpolation).

pSpecSize

Pointer to the size, in bytes, of the specification structure.

pInitBufSize

Pointer to the size, in bytes, of the temporary buffer requiredfor initialization of the specification structure.

Description
This function computes the size of the specification structure and the size of the external buffer for thefollowing functions depending on the interpolation parameter value:•ippiResizeAntialiasingCubicInit, ippiResizeAntialiasingLanczosInit, or
ippiResizeAntialiasingLinearInit for resizing with antialiasing• ippiResizeNearestInit, ippiResizeLinearInit, ippiResizeCubicInit, ippiResizeLanczosInit,or ippiResizeSuperInit for resizing without antialiasing
Interpolation algorithms have the following filter sizes:
Nearest Neighbor

1x1

Linear

2x2

Cubic

4x4

2-lobed Lanczos

4x4

NOTE The ippiResizeGetSize function always returns non-zero value for the pInitBufSize
parameter, even if the temporary buffer is not required for the specification structure initialization. The
temporary buffer is only required when initializing the specification structure for the following
functions: ippiResizeAntialiasingCubic, ippiResizeAntialiasingLanczos,
ippiResizeAntialiasingLanczos, ippiResizeLanczos, and ippiResizeCubic.

1391

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the specified pointers is NULL.

ippStsResizeNoOperation
ippStsSizeErr

Indicates an error if width or height of the image is equal tozero.
Indicates an error in the following cases:• If the source image size is less than the filter size of the choseninterpolation method (except ippSuper).

• If one of the specified dimensions of the source image is less thanthe corresponding dimension of the destination image (forippSuper method only).

• If the width or height of the source or destination image isnegative.

Indicates an error in the following cases:

ippStsExceededSizeErr• If at least one of the computed values exceeds the maximum of
the data type positive value pointed by pSpecSize or
pInitBufSize correspondingly (the size of one of the processed
images is too large).
• If width or height of the destination image or the source image
exceeds 33554431 (0x1FFFFFF) (only for platform-aware and TL
functions).

ippStsInterpolationErr

Indicates an error if interpolation has an illegal value.

ippStsNotSupportedModeErr

Indicates a warning if the specified interpolation method does
not support antialiasing.
Indicates an error if the requested mode is not supported.

ippStsDataTypeErr

Indicates an error if dataType has an illegal value.

ippStsNoAntialising

ResizeGetBufferSize
Computes the size of the external buffer for image
resizing.

SyntaxCase 1: Single precision
IppStatus ippiResizeGetBufferSize_<mod>(const IppiResizeSpec_32f* pSpec, IppiSize
dstSize, Ipp32u numChannels, int* pBufSize);
Supported values for mod:

8u

16u

16s

32f

Case 2: Double precision
IppStatus ippiResizeGetBufferSize_64f(const IppiResizeSpec_64f* pSpec, IppiSize
dstSize, Ipp32u numChannels, int* pBufSize);

Case 3: Processing images with platform-aware functions
IppStatus ippiResizeGetBufferSize_L(const IppiResizeSpec* pSpec, IppiSizeL dstSize,
Ipp32u numChannels, IppSizeL* pBufSize);1392

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Case 4: Processing images with threading layer (TL) functions
IppStatus ippiResizeGetBufferSize_LT(const IppiResizeSpec_LT* pSpec, IppSizeL*
pBufSize);

Include Files
ippi.h
Flavors with the _LT suffix: ippi_tl.h
Flavors with the _L suffix: ippi_l.h

Domain Dependencies
Flavors declared in ippi.h:
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib
Flavors declared in ippi_tl.h:
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib, ippcore_tl.lib, ippi_tl.lib

Parameters
pSpec

Pointer to the spec structure for the resize filter.

dstSize

Size in pixels of the destination image.

numChannels

Number of channels, possible values: 1, 3, or 4.

pBufSize

Pointer to the size, in bytes, of the external buffer.

Description
This function computes the size of the external buffer for image resizing. The pSpec parameter defines theresize algorithm parameters. Prior to using the ippiResizeGetBufferSize function, you need to initialize
the pSpec parameter by calling one of the following functions: ippiResizeNearestInit,
ippiResizeLinearInit, ippiResizeCubicInit, ippiResizeLanczosInit, and ippiResizeSuperInit.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if pBufferSize pointer is NULL.

ippStsContextMatchErr

Indicates a warning if width or height of the destination image
is equal to zero.
Indicates an error if pointer to the spec structure is invalid.

ippStsNumChannelErr

Indicates an error if the value of numChannels is illegal.

ippStsSizeErr

Indicates an error condition If width or height of thedestination image is negative.

ippStsNoOperation

ippStsSizeWrn
ippStsExceededSizeErr

Indicates a warning if the destination image size is more thanthe destination image origin size.
Indicates an error If at least one of the computed values
exceeds maximum of IppSizeL type positive value (the size of
one of the processed images is too large).

ResizeGetBorderSize

1393

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Computes the size of possible borders for the resize
transform.

SyntaxCase 1: Interpolation with single precision
IppStatus ippiResizeGetBorderSize_<mod>(const IppiResizeSpec_32f* pSpec,
IppiBorderSize* borderSize);
Supported values for mod:

8u

16u

16s

32f

Case 2: Interpolation with double precision
IppStatus ippiResizeGetBorderSize_64f(const IppiResizeSpec_64f* pSpec, IppiBorderSize*borderSize);

Case 3: Processing images with platform-aware functions
IppStatus ippiResizeGetBorderSize_L(const IppiResizeSpec* pSpec, IppiBorderSize*borderSize);

Case 4: Processing images with threading layer (TL) functions
IppStatus ippiResizeGetBorderSize_LT(const IppiResizeSpec_LT* pSpec, IppiBorderSize*borderSize);

Include Files
ippi.h
Flavors with the _LT suffix: ippi_tl.h
Flavors with the _L suffix: ippi_l.h

Domain Dependencies
Flavors declared in ippi.h:
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib
Flavors declared in ippi_tl.h:
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib, ippcore_tl.lib, ippi_tl.lib

Parameters
pSpec

Pointer to the spec structure for the resize filter.

borderSize

Size in pixels of necessary borders.

Description
This function computes the size of the source image ROI that is used by the corresponding resize transformand is out of the processing boundaries. The pSpec parameter defines the resize algorithm parameters. Prior
to using the ippiResizeGetBorderSize function, you need to initialize the pSpec parameter by calling oneof the following functions: ippiResizeNearestInit, ippiResizeLinearInit, ippiResizeCubicInit,
ippiResizeLanczosInit, and ippiResizeSuperInit.

1394

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the specified pointers is NULL.

ippStsContextMatchErr

Indicates an error if pointer to the spec structure is invalid.

ippStsBorderErr

Indicates an error if border has an illegal value.

ResizeGetSrcOffset
Computes the offset of the source image for resizingby tile processing.

SyntaxSingle precision
IppStatus ippiResizeGetSrcOffset_<mod>(const IppiResizeSpec_32f* pSpec, IppiPoint
dstOffset, IppiPoint* srcOffset);
Supported values for mod:

8u

16u

16s

32f

Double precision
IppStatus ippiResizeGetSrcOffset_64f(const IppiResizeSpec_64f* pSpec, IppiPoint
dstOffset, IppiPoint* srcOffset);

Processing images with platform-aware functions
IppStatus ippiResizeGetSrcOffset_L(const IppiResizeSpec* pSpec, IppiPointL dstOffset,
IppiPointL* srcOffset);

Include Files
ippi.h
Flavors with the _L suffix: ippi_l.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSpec

Pointer to the spec structure for the resize filter.

dstOffset

Offset of the tiled destination image with respect to the destination
image origin.

srcOffset

Offset of the source image.

Description
This function computes the offset of the processed source image ROI using the offset of the processed
destination image ROI for the corresponding resize transform by tile processing. The pSpec parameter
defines the resize algorithm parameters. Prior to using the ippiResizeGetSrcOffset function, you need toinitialize the pSpec parameter by calling one of the following functions: ippiResizeNearestInit,
ippiResizeLinearInit, ippiResizeCubicInit, ippiResizeLanczosInit, or ippiResizeSuperInit.

1395

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the specified pointers is NULL.

ippStsContextMatchErr

Indicates an error if pointer to the spec structure is invalid.

ippStsOutOfRangeErr

Indicates an error if the destination image offset point is outside thedestination image origin.

ResizeGetSrcRoi
Computes the ROI of the source image for resizing by
tile processing.

SyntaxSingle precision
IppStatus ippiResizeGetSrcRoi_<mod>(const IppiResizeSpec_32f* pSpec, IppiPoint
dstRoiOffset, IppiSize dstRoiSize, IppiPoint* srcRoiOffset, IppiSize* srcRoiSize);
Supported values for mod:

8u

16u

16s

32f

Double precision
IppStatus ippiResizeGetSrcRoi_64f(const IppiResizeSpec_64f* pSpec, IppiPoint
dstRoiOffset, IppiSize dstRoiSize, IppiPoint* srcRoiOffset, IppiSize* srcRoiSize);

Processing images with platform-aware functions
IppStatus ippiResizeGetSrcRoi_L(const IppiResizeSpec* pSpec, IppiPointL dstRoiOffset,
IppiSizeL dstRoiSize, IppiPointL* srcRoiOffset, IppiSizeL* srcRoiSize);

Include Files
ippi.h
Flavors with the _L suffix: ippi_l.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSpec

Pointer to the spec structure for the resize filter.

dstRoiOffset

Offset of the tiled destination image ROI.

dstRoiSize

Size of the tiled destination image ROI.

srcRoiOffset

Offset of the source image ROI.

srcRoiSize

Pointer to the size of the source image ROI.

1396

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Description
This function computes the ROI of the processed source image using the processed ROI of the destination
image for the corresponding resize transform by tile processing. The pSpec parameter defines the resize
algorithm parameters. Prior to using the ippiResizeGetSrcRoi function, you need to initialize the pSpec
parameter by calling one of the following functions: ippiResizeNearestInit, ippiResizeLinearInit,
ippiResizeCubicInit, ippiResizeLanczosInit, or ippiResizeSuperInit.
NOTE
If the destination ROI size exceeds the image origin, the source ROI will be obtained for anintersection of the destination ROI and image origin.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the specified pointers is NULL.

ippStsContextMatchErr

Indicates an error if pointer to the spec structure is invalid.

ippStsOutOfRangeErr

Indicates an error if the destination image offset point is outside thedestination image origin.

ippStsSizeWrn

Indicates a warning if the destination ROI exceeds the destination
image origin.

ResizeSetMode
Sets the rounding mode for resize functions

SyntaxIppStatus ippiResizeSetMode(IppHintAlgorithm hint, IppiResizeSpec* pSpec

Include Files
ippi.hParameters
hint

pSpec

Rounding mode for processing Ipp8u data. Possible values are:ippAlgHintFast

Fast rounding mode (default).

ippAlgHintAccurate

Accurate rounding mode.

Pointer to the specification structure for the resize filter.

Description
This function sets the roundMode for the resize algorithm.
If you provide the hint parameter with the ippAlgHintFast value, a faster but less accurate mode will be
used. In this case, output pixel values can differ from the exact result by 1. If you choose
ippAlgHintAccurate, a more accurate but slower mode will be used and all output pixel values will be
exact.
Before using this function, initialize the specification structure using the initialization function for a required
interpolation method.

1397

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsAccurateModeNotSupported Indicates an error when the rounding mode is not supported

for the selected data type. The rounding result can be inexact.

ResizeNearestInit
Initializes the specification structure for image resizing
with the nearest neighbor interpolation method.

SyntaxIppStatus ippiResizeNearestInit_<mod>(IppiSize srcSize, IppiSize dstSize,
IppiResizeSpec_32f* pSpec);
Supported values for mod:

8u

16u

16s

32f

Platform-aware function
IppStatus ippiResizeNearestInit_L(IppiSizeL srcSize, IppiSizeL dstSize, IppDataTypedataType, IppiResizeSpec* pSpec);

Threading layer (TL) function
IppStatus ippiResizeNearestInit_LT(IppiSizeL srcSize, IppiSizeL dstSize, IppDataTypedataType, Ipp32u numChannels, IppiResizeSpec_LT* pSpec);

Include Files
ippi.h
Flavors with the _LT suffix: ippi_tl.h
Flavors with the _L suffix: ippi_l.h

Domain Dependencies
Flavors declared in ippi.h:
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib
Flavors declared in ippi_tl.h:
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib, ippcore_tl.lib, ippi_tl.lib

Parameters
srcSizeSize, in pixels, of the source image.

dstSizeSize, in pixels, of the destination image.

dataType

Data type of the image. Supported values: ipp8u, ipp16u,

ipp16s, ipp32f, ipp64f.

pSpec

Pointer to the specification structure for the resize filter.

numChannels

Number of channels. Possible values are 1, 3, and 4.

1398

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Description
This function initializes the specification structure for the resize algorithm with the nearest neighborinterpolation method. To calculate the size of the specification structure object, call the ippiResizeGetSize
function.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsNoOperation

Indicates a warning when width or height of the image is equal
to zero.

ippStsSizeErr

Indicates an error when width or height of the source or destination
image is negative.

ippStsDataTypeErr

Indicates an error if dataType has an illegal value.
Indicates an error If width or height of the source ordestination image exceeds 33554431 (0x1FFFFFF) (only for
platform-aware and TL functions).

ippStsExceededSizeErr

See Also
ResizeGetSize Computes the size of the specification structure and the size of the external
temporary buffer for the resize transform initialization.
ResizeNearest
Changes an image size using the nearest neighborinterpolation method.

SyntaxIppStatus ippiResizeNearest_<mod>(const Ipp<datatype>* pSrc, Ipp32s srcStep,
Ipp<datatype>* pDst, Ipp32s dstStep, IppiPoint dstOffset, IppiSize dstSize, const
IppiResizeSpec_32f* pSpec, Ipp8u* pBuffer);
Supported values for mod:8u_C1R

16u_C1R

16s_C1R

32f_C1R

8u_C3R

16u_C3R

16s_C3R

32f_C3R

8u_C4R

16u_C4R

16s_C4R

32f_C4R

Platform-aware functions
IppStatus ippiResizeNearest_<mod>_L(const Ipp<datatype>* pSrc, IppSizeL srcStep,
Ipp<datatype>* pDst, IppSizeL dstStep, IppiPointL dstOffset, IppiSizeL dstSize, const
IppiResizeSpec* pSpec, Ipp8u* pBuffer);
Supported values for mod:8u_C1R

16u_C1R

16s_C1R

32f_C1R

8u_C3R

16u_C3R

16s_C3R

32f_C3R

8u_C4R

16u_C4R

16s_C4R

32f_C4R

1399

1Intel® Integrated Performance Primitives Developer Guide and Reference

Threading layer (TL) functions
IppStatus ippiResizeNearest_<mod>_LT(const Ipp<datatype>* pSrc, IppSizeL srcStep,
Ipp<datatype>* pDst, IppSizeL dstStep, const IppiResizeSpec_LT* pSpec, Ipp8u* pBuffer);
Supported values for mod:8u_C1R

16u_C1R

16s_C1R

32f_C1R

8u_C3R

16u_C3R

16s_C3R

32f_C3R

8u_C4R

16u_C4R

16s_C4R

32f_C4R

Include Files
ippi.h
Flavors with the _LT suffix: ippi_tl.h
Flavors with the _L suffix: ippi_l.h

Domain Dependencies
Flavors declared in ippi.h:
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib
Flavors declared in ippi_tl.h:
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib, ippcore_tl.lib, ippi_tl.lib

Parameters
pSrc
srcStep
pDst

Pointer to the source image.
Distance, in bytes, between the starting points of consecutive
lines in the source image buffer.
Pointer to the destination image.

dstSize

Distance, in bytes, between the starting points of consecutive
lines in the destination image buffer.
Offset of the tiled destination image with respect to thedestination image origin.
Size of the destination image in pixels.

pSpec

Pointer to the specification structure for the resize filter.

pBuffer

Pointer to the work buffer.

dstStep
dstOffset

Description
This function changes an image size using the nearest neighbor interpolation method. The image size can beeither reduced or increased in each direction, depending on the destination image size.
This function operates with ROI. It resizes the source image ROI origin to the destination image ROI origin.
You need to define the destination image ROI origin by the following parameters: the offset of the tiled
destination image with respect to the destination image origin and the destination image size. The source
image ROI origin is defined automatically. To obtain the source image ROI, use the ippiResizeGetSrcRoifunction with the corresponding mod value. To obtain the source image ROI origin offset, call theippiResizeGetSrcOffset function with the corresponding mod value. Parameters pSrc and pDst must
point to the processed source and destination image ROI origins, respectively.

1400

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Function flavors operating on images of 64-bit sizes (with the L suffix) can process only whole images.
The interpolation algorithm applied uses only pixels of the source image origin that are inside of the image
boundaries.
Before using the ippiResizeNearest function, you need to initialize the resize specification structure using
the ippiResizeNearestInit function and compute the size of the external buffer pBuffer using theippiResizeGetBufferSize function for the corresponding flavor.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.
Indicates a warning when width or height of the destination
image is equal to zero.
Indicates an error when pointer to the spec structure is invalid.

ippStsNoOperation
ippStsContextMatchErr
ippStsSizeErr

Indicates an error when width or height of the source or destination
image is negative.

ippStsStepErr

Indicates an error when the step value is not data type multiple.

ippStsOutOfRangeErr

Indicates an error when the destination image offset point is outside
the destination image origin.

ippStsSizeWrn

Indicates a warning when the destination image size is morethan the destination image origin size.

See Also
ROI Processing in Geometric Transforms
ResizeGetSrcRoi Computes the ROI of the source image for resizing by tile processing.
ResizeGetSrcOffset Computes the offset of the source image for resizing by tile processing.
ResizeNearestInit Initializes the specification structure for image resizing with the nearest
neighbor interpolation method.
ResizeGetBufferSize Computes the size of the external buffer for image resizing.
ResizeLinearInit
Initializes the specification structure for image resizing
with the linear interpolation method.

SyntaxIppStatus ippiResizeLinearInit_<mod>(IppiSize srcSize, IppiSize dstSize,
IppiResizeSpec_32f* pSpec);
Supported values for mod:

8u

16u

16s

32f

IppStatus ippiResizeLinearInit_64f(IppiSize srcSize, IppiSize dstSize,
IppiResizeSpec_64f* pSpec);

Platform-aware function
IppStatus ippiResizeLinearInit_L(IppiSizeL srcSize, IppiSizeL dstSize, IppDataTypedataType, IppiResizeSpec* pSpec);
IppStatus ippiResizeLinearInit_8u_L(IppiSizeL srcSize, IppiSizeL dstSize,
IppHintAlgorithm hint, IppiResizeSpec* pSpec);
1401

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Threading layer (TL) function
IppStatus ippiResizeLinearInit_LT(IppiSizeL srcSize, IppiSizeL dstSize, IppDataTypedataType, Ipp32u numChannels, IppiResizeSpec_LT* pSpec);

Include Files
ippi.h
Flavors with the _LT suffix: ippi_tl.h
Flavors with the _L suffix: ippi_l.h

Domain Dependencies
Flavors declared in ippi.h:
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib
Flavors declared in ippi_tl.h:
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib, ippcore_tl.lib, ippi_tl.lib

Parameters
srcSizeSize, in pixels, of the source image.

dstSizeSize, in pixels, of the destination image.

dataType

Data type of the image. Supported values: ipp8u, ipp16u,

ipp16s, ipp32f, ipp64f.

Computation algorithm for processing Ipp8u data. Possible
values are:hint

ippAlgHintNone

The hint is absent. Equivalent
toippAlgHintFast.

ippAlgHintFast

A faster but less accurate algorithm.

ippAlgHintAccurate

A slower but more accurate algorithm.

pSpec

Pointer to the specification structure for the resize filter.

numChannels

Number of channels. Possible values are 1, 3, and 4.

Description
This function initializes the specification structure for the resize algorithm with the linear interpolation
method. To calculate the size of the specification structure, call the ippiResizeGetSize function.

NOTE
The function with the parameter hint allows users to choose between a faster but lessaccurate algorithm and a slower but more accurate one. Without the parameter hint thisfunction initializes the specification structure for the faster but less accurate algorithm for
Ipp8u data type.

Return Values
ippStsNoErr

1402

Indicates no error.

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Indicates an error when one of the specified pointers is NULL.

ippStsNullPtrErr

Indicates a warning when width or height of the image is equal
to zero.
Indicates an error if:

ippStsNoOperation
ippStsSizeErr• width or height of the source or destination image is negative• the source image size is less than the size of a 2x2 linear filter
Indicates an error if dataType has an illegal value.

ippStsDataTypeErr

Indicates an error If width or height of the source ordestination image exceeds 33554431 (0x1FFFFFF) (only for
platform-aware or TL functions).
Indicates an error if numChannel has an illegal value.

ippStsExceededSizeErr

ippStsNumChannelErr

See Also
ResizeGetSize Computes the size of the specification structure and the size of the external
temporary buffer for the resize transform initialization.
ResizeLinear
Changes an image size using the linear interpolation
method.

SyntaxCase 1: Single precision
IppStatus ippiResizeLinear_<mod>(const Ipp<datatype>* pSrc, Ipp32s srcStep,
Ipp<datatype>* pDst, Ipp32s dstStep, IppiPoint dstOffset, IppiSize dstSize,
IppiBorderType border, const Ipp<datatype>* pBorderValue, const IppiResizeSpec_32f*
pSpec, Ipp8u* pBuffer);
Supported values for mod:8u_C1R

16u_C1R

16s_C1R

8u_C3R

16u_C3R

16s_C3R

8u_C4R

16u_C4R

16s_C4R

32f_C1R

32f_C4R

IppStatus ippiResizeLinear_32f_C3R(const Ipp32f* pSrc, const Ipp32s srcStep, Ipp32f*
pDst, Ipp32s dstStep, IppiPoint dstOffset, IppiSize dstSize, IppiBorderType border,
const Ipp32f* pBorderValue, const IppiResizeSpec_32f* pSpec, Ipp8u* pBuffer);

Case 2: Double precision
IppStatus ippiResizeLinear_<mod>(const Ipp<datatype>* pSrc, Ipp32s srcStep,
Ipp<datatype>* pDst, Ipp32s dstStep, IppiPoint dstOffset, IppiSize dstSize,
IppiBorderType border, const Ipp<datatype>* pBorderValue, const IppiResizeSpec_64f*
pSpec, Ipp8u* pBuffer);
Supported values for mod:64f_C1R
64f_C3R
64f_C4R

1403

1Intel® Integrated Performance Primitives Developer Guide and Reference

Case 3: Platform-aware functions
IppStatus ippiResizeLinear_<mod>_L(const Ipp<datatype>* pSrc, IppSizeL srcStep,
Ipp<datatype>* pDst, IppSizeL dstStep, IppiPointL dstOffset, IppiSizeL dstSize,
IppiBorderType border, const Ipp<datatype>* pBorderValue, const IppiResizeSpec* pSpec,
Ipp8u* pBuffer);
Supported values for mod:8u_C1R

16u_C1R

16s_C1R

32f_C1R

64f_C1R

8u_C3R

16u_C3R

16s_C3R

32f_C3R

64f_C3R

8u_C4R

16u_C4R

16s_C4R

32f_C4R

64f_C4R

Case 3: Threading layer (TL) functions
IppStatus ippiResizeLinear_<mod>_LT(const Ipp<datatype>* pSrc, IppSizeL srcStep,
Ipp<datatype>* pDst, IppSizeL dstStep, IppiBorderType border, const Ipp8u*
pBorderValue, const IppiResizeSpec_LT* pSpec, Ipp8u* pBuffer);
Supported values for mod:8u_C1R

16u_C1R

16s_C1R

32f_C1R

64f_C1R

8u_C3R

16u_C3R

16s_C3R

32f_C3R

64f_C3R

8u_C4R

16u_C4R

16s_C4R

32f_C4R

64f_C4R

Include Files
ippi.h
Flavors with the _LT suffix: ippi_tl.h
Flavors with the _L suffix: ippi_l.h

Domain Dependencies
Flavors declared in ippi.h:
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib
Flavors declared in ippi_tl.h:
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib, ippcore_tl.lib, ippi_tl.lib

Parameters
pSrc
srcStep
pDst
dstStep
dstOffset

1404

Pointer to the source image.
Distance, in bytes, between the starting points of consecutive
lines in the source image buffer.
Pointer to the destination image.
Distance, in bytes, between the starting points of consecutive
lines in the destination image buffer.
Offset of the tiled destination image with respect to thedestination image origin.

Developer Guide and Reference for Intel® Integrated Performance Primitives

dstSize

Size of the destination image in pixels.

borderType of border. Possible values are:ippBorderRepl
ippBorderInMem
ippBorderMirror

ippBorderMirrorR

1

Border is replicated from the edge
pixels.
Border is obtained from the source
image pixels in memory.
Border is obtained from the source
image boundary pixels. Value can be
specified via ippiResizeLinear* andippiResizeLinear*_LT.
Border is obtained from the source
image boundary pixels. The anchor cellvalue is replicated to the border pixels.
Value can be specified via
ippiResizeLinear* andippiResizeLinear*_LT.

Mixed borders are also supported. They can be obtained by the bitwise
operation OR between the ippBorderRepl type and theippBorderInMemTop, ippBorderInMemBottom,
ippBorderInMemLeft, ippBorderInMemRight types.

pBorderValue

Pointer to the constant value to assign to pixels of the constantborder. This parameter is applicable only to the ippBorderConst
border type.

pSpec

Pointer to the specification structure for the resize filter.

pBuffer

Pointer to the work buffer.

Description
This function changes the size of an image using the linear interpolation method. The image size can beeither reduced or increased in each direction, depending on the destination image size.
This function operates with ROI. It resizes the source image ROI origin to the destination image ROI origin.
You need to define the destination image ROI origin by the following parameters: the offset of the tiled
destination image with respect to the destination image origin and the destination image size. The source
image ROI origin is defined automatically. To obtain the source image ROI, use the ippiResizeGetSrcRoifunction with the corresponding mod value. To obtain the source image ROI origin offset, call theippiResizeGetSrcOffset function with the corresponding mod value. Parameters pSrc and pDst must
point to the processed source and destination image ROI origins, respectively.
The interpolation algorithm applied uses edge pixels of the source image that are out of the image origin.
The function ippiResizeLinear uses in calculation the weighted values of these outer pixels. To obtain thesize of the out of the source image origin, call the ippiResizeGetBorderSize function for thecorresponding flavor.
If the border type is equal to ippBorderRepl, the source image edge pixels are replicated out of the image
origin. If the border type is equal to ippBorderInMem, the outer pixels are obtained from the out of thesource image origin space. For the mixed border types, the combined approach is applied.
Before using the ippiResizeLinear function, you need to initialize the specification structure using theippiResizeLinearInit function and compute the size of the external buffer pBuffer using theippiResizeGetBufferSize function for the corresponding flavor.

1405

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.
Indicates a warning when width or height of the destination
image is equal to zero.
Indicates an error when the border value is illegal.

ippStsNoOperation
ippStsBorderErr
ippStsContextMatchErr
ippStsNotSupportedModeErr

Indicates an error when pointer to the specification structure isinvalid.
Indicates an error when the requested mode is not supported.

ippStsSizeErr

Indicates an error when width or height of the source or destination
image is negative.

ippStsStepErr

Indicates an error when the step value is not a multiple of data type.

ippStsOutOfRangeErr

Indicates an error when the destination image offset point is outside
the destination image origin.

ippStsSizeWrn

Indicates a warning when the destination image size is morethan the destination image origin size.

See Also
ROI Processing in Geometric Transforms
ResizeGetSrcRoi Computes the ROI of the source image for resizing by tile processing.
ResizeGetSrcOffset Computes the offset of the source image for resizing by tile processing.
User-defined Border Types
ResizeGetBorderSize Computes the size of possible borders for the resize transform.
ResizeLinearInit Initializes the specification structure for image resizing with the linear
interpolation method.
ResizeGetBufferSize Computes the size of the external buffer for image resizing.
ResizeCubicInit
Initializes the specification structure for image resizing
using interpolation with two-parameter cubic filters.

SyntaxIppStatus ippiResizeCubicInit_<mod>(IppiSize srcSize, IppiSize dstSize, Ipp32f valueB,
Ipp32f valueC, IppiResizeSpec_32f* pSpec, Ipp8u* pInitBuf);
Supported values for mod:

8u

16u

16s

32f

Platform-aware functions
IppStatus ippiResizeCubicInit_L(IppiSizeL srcSize, IppiSizeL dstSize, IppDataTypedataType, Ipp32f valueB, Ipp32f valueC, IppiResizeSpec* pSpec, Ipp8u* pInitBuf);
IppStatus ippiResizeCubicInit_8u_L(IppiSizeL srcSize, IppiSizeL dstSize, Ipp32f valueB,
Ipp32f valueC, IppHintAlgorithm hint, IppiResizeSpec* pSpec, Ipp8u* pInitBuf);

1406

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Threading layer (TL) functions
IppStatus ippiResizeCubicInit_LT(IppiSizeL srcSize, IppiSizeL dstSize, IppDataTypedataType, Ipp32u numChannels, Ipp32f valueB, Ipp32f valueC, IppiResizeSpec_LT* pSpec,
Ipp8u* pInitBuf);

Include Files
ippi.h
Flavors with the _LT suffix: ippi_tl.h
Flavors with the _L suffix: ippi_l.h

Domain Dependencies
Flavors declared in ippi.h:
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib
Flavors declared in ippi_tl.h:
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib, ippcore_tl.lib, ippi_tl.lib

Parameters
srcSizeSize, in pixels, of the source image.

dstSizeSize, in pixels, of the destination image.

dataTypehint

Data type of the image. Supported values: ipp8u, ipp16u,

ipp16s, ipp32f, ipp64f.

Computation algorithm for processing Ipp8u data. Possible
values are:ippAlgHintNone

The hint is absent. Equivalent
toippAlgHintFast.

ippAlgHintFast

A faster but less accurate algorithm.

ippAlgHintAccurate

A slower but more accurate algorithm.

numChannels

Number of channels, possible values: 1, 3, or 4.

valueBThe first parameter for cubic filters.

valueCThe second parameter for cubic filters.

pSpec

Pointer to the specification structure for the resize filter.

pInitBuf

Pointer to the temporary buffer for the cubic filter initialization.

Description
This function initializes the specification structure for the resize algorithm with interpolation with twoparameter cubic filters. To calculate the size of the specification structure, call the ippiResizeGetSize
function.
Before using this function, you need to calculate the size of the specification structure and the external buffer
pInitBuf using the ippiResizeGetSize function for the corresponding flavor.

1407

1

Intel® Integrated Performance Primitives Developer Guide and Reference

NOTE
The function with the parameter hint allows users to choose between a faster but lessaccurate algorithm and a slower but more accurate one. Without the parameter hint thisfunction initializes the specification structure for the faster but less accurate algorithm for
Ipp8u data type.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.
Indicates a warning when width or height of the image is equal
to zero.
Indicates an error if:

ippStsNoOperation
ippStsSizeErr• width or height of the source or destination image is negative• the source image size is less than the size of a 2x2 linear filter
Indicates an error if dataType has an illegal value.

ippStsDataTypeErr

Indicates an error If width or height of the source ordestination image exceeds 33554431 (0x1FFFFFF) (only for
platform-aware and TL functions).
Indicates an error if numChannel has an illegal value.

ippStsExceededSizeErr

ippStsNumChannelErr

See Also
ResizeGetSize Computes the size of the specification structure and the size of the external
temporary buffer for the resize transform initialization.
ResizeCubic
Changes an image size using interpolation with twoparameter cubic filters.

SyntaxIppStatus ippiResizeCubic_<mod>(const Ipp<datatype>* pSrc, Ipp32s srcStep,
Ipp<datatype>* pDst, Ipp32s dstStep, IppiPoint dstOffset, IppiSize dstSize,
IppiBorderType border, const Ipp<datatype>* pBorderValue, const IppiResizeSpec_32f*
pSpec, Ipp8u* pBuffer);
Supported values for mod:8u_C1R

16u_C1R

16s_C1R

32f_C1R

8u_C3R

16u_C3R

16s_C3R

32f_C3R

8u_C4R

16u_C4R

16s_C4R

32f_C4R

1408

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Platform-aware functions
IppStatus ippiResizeCubic_<mod>_L(const Ipp<datatype>* pSrc, IppSizeL srcStep,
Ipp<datatype>* pDst, IppSizeL dstStep, IppiPointL dstOffset, IppiSizeL dstSize,
IppiBorderType border, const Ipp<datatype>* pBorderValue, const IppiResizeSpec* pSpec,
Ipp8u* pBuffer);
Supported values for mod:8u_C1R

16u_C1R

16s_C1R

32f_C1R

8u_C3R

16u_C3R

16s_C3R

32f_C3R

8u_C4R

16u_C4R

16s_C4R

32f_C4R

Threading layer (TL) functions
IppStatus ippiResizeCubic_<mod>_LT(const Ipp<datatype>* pSrc, IppSizeL srcStep,
Ipp<datatype>* pDst, IppSizeL dstStep, IppiBorderType border, const Ipp<datatype>*
pBorderValue, const IppiResizeSpec_LT* pSpec, Ipp8u* pBuffer);
Supported values for mod:8u_C1R

16u_C1R

16s_C1R

32f_C1R

8u_C3R

16u_C3R

16s_C3R

32f_C3R

8u_C4R

16u_C4R

16s_C4R

32f_C4R

Include Files
ippi.h
Flavors with the _LT suffix: ippi_tl.h
Flavors with the _L suffix: ippi_l.h

Domain Dependencies
Flavors declared in ippi.h:
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib
Flavors declared in ippi_tl.h:
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib, ippcore_tl.lib, ippi_tl.lib

Parameters
pSrc
srcStep
pDst

Pointer to the source image.
Distance, in bytes, between the starting points of consecutive
lines in the source image buffer.
Pointer to the destination image.

dstStep

Distance, in bytes, between the startings of consecutive lines inthe destination image buffer.

dstOffset

Offset of the tiled destination image with respect to the destination
image origin.

1409

1

Intel® Integrated Performance Primitives Developer Guide and Reference

dstSize

Size of the destination image in pixels.

borderType of border. Possible values are:ippBorderRepl
ippBorderInMem
ippBorderMirror

ippBorderMirrorR

Border is replicated from the edge
pixels.
Border is obtained from the source
image pixels in memory.
Border is obtained from the source
image boundary pixels. Value can be
specified via ippiResizeCubic* andippiResizeCubic*_LT.
Border is obtained from the source
image boundary pixels. The anchor cellvalue is replicated to the border pixels.
Value can be specified via
ippiResizeCubic* andippiResizeCubic*_LT.

Mixed borders are also supported. They can be obtained by the bitwise
operation OR between the ippBorderRepl type and theippBorderInMemTop, ippBorderInMemBottom,
ippBorderInMemLeft, ippBorderInMemRight types.

pBorderValue

Pointer to the constant value to assign to pixels of the constantborder. This parameter is applicable only to the ippBorderConst
border type.

pSpec

Pointer to the spec structure for the resize filter.

pBuffer

Pointer to the work buffer.

Description
This function changes an image size using interpolation with two-parameter cubic filters. The image size canbe either reduced or increased in each direction, depending on the destination image size.
This function operates with ROI. It resizes the source image ROI origin to the destination image ROI origin.
You need to define the destination image ROI origin by the following parameters: the offset of the tiled
destination image with respect to the destination image origin and the destination image size. The source
image ROI origin is defined automatically. To obtain the source image ROI, use the ippiResizeGetSrcRoifunction with the corresponding mod value. To obtain the source image ROI origin offset, call theippiResizeGetSrcOffset function with the corresponding mod value. Parameters pSrc and pDst must
point to the processed source and destination image ROI origins, respectively.
The interpolation algorithm applied uses edge pixels of the source image that are out of the image origin.
The function ippiResizeCubic uses in calculation the weighted values of these outer pixels. To obtain thesize of the out of the source image origin, call the ippiResizeGetBorderSize function for thecorresponding flavor.
If the border type is equal to ippBorderRepl, the source image edge pixels are replicated out of the image
origin. If the border type is equal to ippBorderInMem, the outer pixels are obtained from the out of thesource image origin space. For the mixed border types, the combined approach is applied.
Before using the ippiResizeLinear function, you need to initialize the specification structure using theippiResizeCubicInit function and compute the size of the external buffer pBuffer using theippiResizeGetBufferSize function for the corresponding flavor.

1410

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsBorderErr

Indicates a warning when width or height of the destination
image is equal to zero.
Indicates an error when the border value is illegal.

ippStsContextMatchErr

Indicates an error when pointer to the spec structure is invalid.

ippStsNotSupportedModeErr

Indicates an error when the requested mode is not supported.

ippStsSizeErr

Indicates an error when width or height of the source or destination
image is negative.

ippStsStepErr

Indicates an error when the step value is not data type multiple.

ippStsOutOfRangeErr

Indicates an error when the destination image offset point is outside
the destination image origin.

ippStsSizeWrn

Indicates a warning when the destination image size is morethan the destination image origin size.

ippStsNoOperation

See Also
ROI Processing in Geometric Transforms
ResizeGetSrcRoi Computes the ROI of the source image for resizing by tile processing.
ResizeGetSrcOffset Computes the offset of the source image for resizing by tile processing.
User-defined Border Types
ResizeGetBorderSize Computes the size of possible borders for the resize transform.
ResizeCubicInit Initializes the specification structure for image resizing using interpolation with
two-parameter cubic filters.
ResizeGetBufferSize Computes the size of the external buffer for image resizing.
ResizeLanczosInit
Initializes the specification structure for image resizing
with the Lanczos interpolation method.

SyntaxIppStatus ippiResizeLanczosInit_<mod>(IppiSize srcSize, IppiSize dstSize, Ipp32u
numLobes, IppiResizeSpec_32f* pSpec, Ipp8u* pInitBuf);
Supported values for mod:

8u

16u

16s

32f

Platform-aware functions
IppStatus ippiResizeLanczosInit_L(IppiSizeL srcSize, IppiSizeL dstSize, IppDataTypedataType, Ipp32u numLobes, IppiResizeSpec* pSpec, Ipp8u* pInitBuf);
IppStatus ippiResizeLanczosInit_8u_L(IppiSizeL srcSize, IppiSizeL dstSize, Ipp32u
numLobes, IppHintAlgorithm hint, IppiResizeSpec* pSpec, Ipp8u* pInitBuf);

1411

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Threading layer (TL) functions
IppStatus ippiResizeLanczosInit_LT(IppiSizeL srcSize, IppiSizeL dstSize, IppDataTypedataType, Ipp32u numChannels, Ipp32u numLobes, IppiResizeSpec_LT* pSpec, Ipp8u*
pInitBuf);

Include Files
ippi.h
Flavors with the _LT suffix: ippi_tl.h
Flavors with the _L suffix: ippi_l.h

Domain Dependencies
Flavors declared in ippi.h:
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib
Flavors declared in ippi_tl.h:
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib, ippcore_tl.lib, ippi_tl.lib

Parameters
srcSizeSize, in pixels, of the source image.

dstSizeSize, in pixels, of the destination image.

dataTypehint

Data type of the image. Supported values: ipp8u, ipp16u,

ipp16s, ipp32f, ipp64f.

Computation algorithm for processing Ipp8u data. Possible
values are:ippAlgHintNone

The hint is absent. Equivalent
toippAlgHintFast.

ippAlgHintFast

A faster but less accurate algorithm.

ippAlgHintAccurate

A slower but more accurate algorithm.

numChannels

Number of image channels. Possible values are 1, 3, or 4.

numLobes

Parameter for Lanczos filters. Possible values are 2 or 3.

pSpec

Pointer to the specification structure for the resize filter.

pInitBuf

Pointer to the temporary buffer for the cubic filter initialization.

Description
This function initializes the specification structure for the resize algorithm with the Lanczos filter interpolation
method. This method is based on the 2-lobed or 3-lobed Lanczos window function as an interpolation
function, depending on the value of the numLobes parameter.
Before using this function, you need to calculate the size of the specification structure and the external buffer
pInitBuf using the ippiResizeGetSize function for the corresponding flavor.

1412

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

NOTE
The function with the parameter hint allows users to choose between a faster but lessaccurate algorithm and a slower but more accurate one. Without the parameter hint thisfunction initializes the specification structure for the faster but less accurate algorithm for
Ipp8u data type.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsNotSupportedModeErr

Indicates an error when width or height of the image is equal
to zero.
Indicates an error when the requested mode is not supported.

ippStsDataTypeErr

Indicates an error if dataType has an illegal value.

ippStsResizeNoOperation

Indicates an error If width or height of the source ordestination image exceeds 33554431 (0x1FFFFFF) (only for
platform-aware and TL functions).

ippStsExceededSizeErr

Indicates an error in the following cases:

ippStsSizeErr••

If width or height of the source or destination image is negative,
If the source image size is less than the Lanczos interpolation filter
size: 4x4 for the 2-lobed Lanczos function, or 6x6 for the 3-lobed
Lanczos function.

See Also
ResizeGetSize Computes the size of the specification structure and the size of the external
temporary buffer for the resize transform initialization.
ResizeLanczos
Changes an image size using interpolation with the
Lanczos filter.

SyntaxIppStatus ippiResizeLanczos_<mod>(const Ipp<datatype>* pSrc, Ipp32s srcStep,
Ipp<datatype>* pDst, Ipp32s dstStep, IppiPoint dstOffset, IppiSize dstSize,
IppiBorderType border, const Ipp<datatype>* pBorderValue, const IppiResizeSpec_32f*
pSpec, Ipp8u* pBuffer);
Supported values for mod:8u_C1R

16u_C1R

16s_C1R

32f_C1R

8u_C3R

16u_C3R

16s_C3R

32f_C3R

8u_C4R

16u_C4R

16s_C4R

32f_C4R

1413

1Intel® Integrated Performance Primitives Developer Guide and Reference

Platform-aware functions
IppStatus ippiResizeLanczos_<mod>_L(const Ipp<datatype>* pSrc, IppSizeL srcStep,
Ipp<datatype>* pDst, IppSizeL dstStep, IppiPointL dstOffset, IppiSizeL dstSize,
IppiBorderType border, const Ipp<datatype>* pBorderValue, const IppiResizeSpec* pSpec,
Ipp8u* pBuffer);
Supported values for mod:8u_C1R

16u_C1R

16s_C1R

32f_C1R

8u_C3R

16u_C3R

16s_C3R

32f_C3R

8u_C4R

16u_C4R

16s_C4R

32f_C4R

Threading layer (TL) functions
IppStatus ippiResizeLanczos_<mod>_LT(const Ipp<datatype>* pSrc, IppSizeL srcStep,
Ipp<datatype>* pDst, IppSizeL dstStep, IppiBorderType border, const Ipp<datatype>*
pBorderValue, const IppiResizeSpec_LT* pSpec, Ipp8u* pBuffer);
Supported values for mod:8u_C1R

16u_C1R

16s_C1R

32f_C1R

8u_C3R

16u_C3R

16s_C3R

32f_C3R

8u_C4R

16u_C4R

16s_C4R

32f_C4R

Include Files
ippi.h
Flavors with the _LT suffix: ippi_tl.h
Flavors with the _L suffix: ippi_l.h

Domain Dependencies
Flavors declared in ippi.h:
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib
Flavors declared in ippi_tl.h:
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib, ippcore_tl.lib, ippi_tl.lib

Parameters
pSrc
srcStep
pDst

Pointer to the source image.
Distance, in bytes, between the starting points of consecutive
lines in the source image buffer.
Pointer to the destination image.

dstStep

Distance, in bytes, between the starting points of consecutive
lines in the destination image buffer.

dstOffset

Offset of the tiled destination image with respect to the destination
image origin.

1414

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

dstSize

Size of the destination image in pixels.

borderType of border. Possible values are:ippBorderRepl
ippBorderInMem

Border is replicated from the edge
pixels.
Border is obtained from the source
image pixels in memory.

Mixed borders are also supported. They can be obtained by the bitwise
operation OR between the ippBorderRepl type and theippBorderInMemTop, ippBorderInMemBottom,
ippBorderInMemLeft, ippBorderInMemRight types.

pSpec

Pointer to the constant value to assign to pixels of the constantborder. This parameter is applicable only to the ippBorderConst
border type.
Pointer to the specification structure for the resize filter.

pBuffer

Pointer to the work buffer.

pBorderValue

Description
This function changes an image size using interpolation with the Lanczos filter. The image size can be either
reduced or increased in each direction, depending on the destination image size.
This function operates with ROI. It resizes the source image ROI origin to the destination image ROI origin.
You need to define the destination image ROI origin by the following parameters: the offset of the tiled
destination image with respect to the destination image origin and the destination image size. The source
image ROI origin is defined automatically. To obtain the source image ROI, use the ippiResizeGetSrcRoifunction with the corresponding mod value. To obtain the source image ROI origin offset, call theippiResizeGetSrcOffset function with the corresponding mod value. Parameters pSrc and pDst must
point to the processed source and destination image ROI origins, respectively.
The interpolation algorithm applied uses edge pixels of the source image that are out of the image origin.
The function ippiResizeLanczos uses in calculation the weighted values of these outer pixels. To obtain thesize of the out of the source image origin, call the ippiResizeGetBorderSize function for thecorresponding flavor.
If the border type is equal to ippBorderRepl, the source image edge pixels are replicated out of the image
origin. If the border type is equal to ippBorderInMem, the outer pixels are obtained from the out of thesource image origin space. For the mixed border types, a combined approach is applied.
Before using the ippiResizeLanczos function, you need to initialize the specification structure using theippiResizeLanczosInit function and compute the size of the external buffer pBuffer using theippiResizeGetBufferSize function for the corresponding flavor.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsNoOperation
ippStsBorderErr
ippStsContextMatchErr

Indicates a warning when width or height of the destination
image is equal to zero.
Indicates an error when the border value is illegal.
Indicates an error when pointer to the specification structure isinvalid.

1415

1Intel® Integrated Performance Primitives Developer Guide and ReferenceippStsNotSupportedModeErr

Indicates an error when the requested mode is not supported.

ippStsSizeErr

Indicates an error when width or height of the destination image isnegative.

ippStsStepErr

Indicates an error when the step value is not data type multiple.

ippStsOutOfRangeErr

Indicates an error when the destination image offset point is outside
the destination image origin.

ippStsSizeWrn

Indicates a warning when the destination image size is morethan the destination image origin size.

See Also
ROI Processing in Geometric Transforms
ResizeGetSrcRoi Computes the ROI of the source image for resizing by tile processing.
ResizeGetSrcOffset Computes the offset of the source image for resizing by tile processing.
User-defined Border Types
ResizeGetBorderSize Computes the size of possible borders for the resize transform.
ResizeLanczosInit Initializes the specification structure for image resizing with the Lanczos
interpolation method.
ResizeGetBufferSize Computes the size of the external buffer for image resizing.
ResizeSuperShiftInit
Initializes the specification structure for image resizing
with the super sampling interpolation method andfloating point shifts.

SyntaxIppStatus ippiResizeSuperInit_<mod>(IppiSize srcSize, IppiSize dstSize, Ipp64f xShift,
Ipp64f yShift, IppiBorderType borderType, const Ipp8u * borderVal, int smoothEdge, int
numChannels, IppiResizeSpec_32f* pSpec);
Supported values for mod:

8u

16u

16s

32f

Include Files
ippi.hDomain Dependencies
Flavors declared in ippi.h:
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
srcSizeSize, in pixels, of the source image.

dstSizeSize, in pixels, of the destination image.

xShiftShift value in the x direction.

yShiftShift value in the y direction.

1416

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

borderType

Type of border. Supported values: ippBorderTransp. Outerpixels are not processed.

borderVal

Not used. This parameter is applicable only to theippBorderConst border type.

smoothEdge

Flag for edge smoothing. Supported values:
0 - transformation without edge smoothing.
1 - transformation with edge smoothing.

pSpec

Pointer to the specification structure for the resize filter.

numChannels

Number of channels. Possible values are 1, 3, and 4.

Description
This function initializes the specification structure for the resize algorithm with the super samplinginterpolation method. To calculate the size of the specification structure, call the ippiResizeGetSize
function.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the specified pointers is NULL.

ippStsNoOperation

Indicates a warning if:- width or height of the destination image is equal to zero.
- smoothing edge is on and width or height of the destination image isequal to one.

ippStsSizeErr

Indicates an error in the following cases:• Indicates that one of the specified dimensions of the source imageis less than the corresponding dimension of the destination image,or that the width or height of the source or destination image isnegative.
• If the width or height of the source or destination image isnegative.

ippStsDataTypeErr

Indicates an error If width or height of the source ordestination image exceeds 33554431 (0x1FFFFFF) (only for
platform-aware and TL functions).
Indicates an error if dataType has an illegal value.

ippStsNumChannelsErr

Indicates an error if the number of channels is not supported.

ippStsBorderErr

Indicates an error if specified borderType is not supported.

ippStsExceededSizeErr

See Also
ResizeGetSize Computes the size of the specification structure and the size of the external
temporary buffer for the resize transform initialization.

See Also
ResizeGetBufferSize Computes the size of the external buffer for image resizing.
ResizeSuperInit

1417

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Initializes the specification structure for image resizing
with the super sampling interpolation method.

SyntaxIppStatus ippiResizeSuperInit_<mod>(IppiSize srcSize, IppiSize dstSize,
IppiResizeSpec_32f* pSpec);
Supported values for mod:

8u

16u

16s

32f

Platform-aware function
IppStatus ippiResizeSuperInit_L(IppiSizeL srcSize, IppiSizeL dstSize, IppDataTypedataType, IppiResizeSpec* pSpec);

Threading layer (TL) function
IppStatus ippiResizeSuperInit_LT(IppiSizeL srcSize, IppiSizeL dstSize, IppDataTypedataType, Ipp32u numChannels, IppiResizeSpec_LT* pSpec);

Include Files
ippi.h
Flavors with the _LT suffix: ippi_tl.h
Flavors with the _L suffix: ippi_l.h

Domain Dependencies
Flavors declared in ippi.h:
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib
Flavors declared in ippi_tl.h:
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib, ippcore_tl.lib, ippi_tl.lib

Parameters
srcSizeSize, in pixels, of the source image.

dstSizeSize, in pixels, of the destination image.

dataType

Data type of the image. Supported values: ipp8u, ipp16u,

ipp16s, ipp32f, ipp64f.

pSpec

Pointer to the specification structure for the resize filter.

numChannels

Number of channels. Possible values are 1, 3, and 4.

Description
This function initializes the specification structure for the resize algorithm with the super samplinginterpolation method. To calculate the size of the specification structure, call the ippiResizeGetSize
function.

Return Values
ippStsNoErr

1418

Indicates no error.

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Indicates an error if one of the specified pointers is NULL.

ippStsNullPtrErr

Indicates a warning if width or height of the image is equal tozero.
Indicates an error in the following cases:

ippStsNoOperation
ippStsSizeErr• Indicates that one of the specified dimensions of the source imageis less than the corresponding dimension of the destination image,or that the width or height of the source or destination image isnegative.
• If the width or height of the source or destination image isnegative.

Indicates an error If width or height of the source ordestination image exceeds 33554431 (0x1FFFFFF) (only for
platform-aware and TL functions).
Indicates an error if dataType has an illegal value.

ippStsExceededSizeErr

ippStsDataTypeErr

See Also
ResizeGetSize Computes the size of the specification structure and the size of the external
temporary buffer for the resize transform initialization.
ResizeSuper
Changes an image size using the super samplinginterpolation method.

SyntaxIppStatus ippiResizeSuper_<mod>(const Ipp<datatype>* pSrc, Ipp32s srcStep,
Ipp<datatype>* pDst, Ipp32s dstStep, IppiPoint dstOffset, IppiSize dstSize, const
IppiResizeSpec_32f* pSpec, Ipp8u* pBuffer);
Supported values for mod:8u_C1R

16u_C1R

16s_C1R

32f_C1R

8u_C3R

16u_C3R

16s_C3R

32f_C3R

8u_C4R

16u_C4R

16s_C4R

32f_C4R

Platform-aware functions
IppStatus ippiResizeSuper_<mod>_L(const Ipp<datatype>* pSrc, IppSizeL srcStep,
Ipp<datatype>* pDst, IppSizeL dstStep, IppiPointL dstOffset, IppiSizeL dstSize, const
IppiResizeSpec* pSpec, Ipp8u* pBuffer);
Supported values for mod:8u_C1R

16u_C1R

16s_C1R

32f_C1R

8u_C3R

16u_C3R

16s_C3R

32f_C3R

8u_C4R

16u_C4R

16s_C4R

32f_C4R

1419

1Intel® Integrated Performance Primitives Developer Guide and Reference

Threading layer (TL) functions
IppStatus ippiResizeSuper_<mod>_LT(const Ipp<datatype>* pSrc, IppSizeL srcStep,
Ipp<datatype>* pDst, IppSizeL dstStep, const IppiResizeSpec_LT* pSpec, Ipp8u* pBuffer);
Supported values for mod:8u_C1R

16u_C1R

16s_C1R

32f_C1R

8u_C3R

16u_C3R

16s_C3R

32f_C3R

8u_C4R

16u_C4R

16s_C4R

32f_C4R

Include Files
ippi.h
Flavors with the _LT suffix: ippi_tl.h
Flavors with the _L suffix: ippi_l.h

Domain Dependencies
Flavors declared in ippi.h:
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib
Flavors declared in ippi_tl.h:
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib, ippcore_tl.lib, ippi_tl.lib

Parameters
pSrc
srcStep
pDst

Pointer to the source image.
Distance, in bytes, between the starting points of consecutive
lines in the source image buffer.
Pointer to the destination image.

dstSize

Distance, in bytes, between the starting points of consecutive
lines in the destination image buffer.
Offset of the tiled destination image with respect to thedestination image origin.
Size of the destination image in pixels.

pSpec

Pointer to the specification structure for the resize filter.

pBuffer

Pointer to the work buffer.

dstStep
dstOffset

Description
This function changes an image size using the super sampling interpolation method. This method only
reduces the image size.
This function operates with ROI. It resizes the source image ROI origin to the destination image ROI origin.
You need to define the destination image ROI origin by the following parameters: the offset of the tiled
destination image with respect to the destination image origin and the destination image size. The source
image ROI origin is defined automatically. To obtain the source image ROI, use the ippiResizeGetSrcRoifunction with the corresponding mod value. To obtain the source image ROI origin offset, call theippiResizeGetSrcOffset function with the corresponding mod value. Parameters pSrc and pDst must
point to the processed source and destination image ROI origins, respectively.

1420

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

The interpolation algorithm applied uses only pixels of the source image origin that are inside of the image
boundaries.
Before using the ippiResizeLinear function, you need to initialize the resize structure using theippiResizeSuperInit function and compute the size of the external buffer pBuffer using theippiResizeGetBufferSize function for the corresponding flavor.
NOTE
You can get better performance if you use the following scaling factors along the x and y axes: 1/2,
2/3, 3/4, 4/5, 5/6, 8/9, 1/3, 2/5, 3/5, 3/7, 4/9, 7/10, 1/4, 2/7, 3/8, 1/8.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsContextMatchErr

Indicates a warning when width or height of the destination
image is equal to zero.
Indicates an error when pointer to the spec structure is invalid.

ippStsStepErr

Indicates an error when the step value is not data type multiple.

ippStsOutOfRangeErr

Indicates an error when the destination image offset point is outside
the destination image origin.

ippStsSizeWrn

Indicates a warning when the destination image size is more that thedestination image origin size.

ippStsNoOperation

See Also
ROI Processing in Geometric Transforms
ResizeGetSrcRoi Computes the ROI of the source image for resizing by tile processing.
ResizeGetSrcOffset Computes the offset of the source image for resizing by tile processing.
ResizeSuperInit Initializes the specification structure for image resizing with the super samplinginterpolation method.
ResizeGetBufferSize Computes the size of the external buffer for image resizing.
ResizeAntialiasingLinearInit
Initializes the specification structure for image resizing
with antialiasing using linear interpolation.

SyntaxIppStatus ippiResizeAntialiasingLinearInit(IppiSize srcSize, IppiSize dstSize,
IppiResizeSpec_32f* pSpec, Ipp8u* pInitBuf);

64f equivalent function
IppStatus ippiResizeAntialiasingLinearInit_64f(IppiSize srcSize, IppiSize dstSize,
IppiResizeSpec_64f* pSpec, Ipp8u* pInitBuf);

Platform-aware function
IppStatus ippiResizeAntialiasingLinearInit_L(IppiSizeL srcSize, IppiSizeL dstSize,
IppDataType dataType, IppiResizeSpec* pSpec, Ipp8u* pInitBuf);

1421

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Threading layer (TL) function
IppStatus ippiResizeAntialiasingLinearInit_LT(IppiSizeL srcSize, IppiSizeL dstSize,
IppDataType dataType, Ipp32u numChannels, IppiResizeSpec_LT* pSpec, Ipp8u* pInitBuf);

Include Files
ippi.h
Flavors with the _LT suffix: ippi_tl.h
Flavors with the _L suffix: ippi_l.h

Domain Dependencies
Flavors declared in ippi.h:
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib
Flavors declared in ippi_tl.h:
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib, ippcore_tl.lib, ippi_tl.lib

Parameters
srcSize

Size of the source image, in pixels.

dstSize

Size of the destination image, in pixels.

dataType

Data type of the image. Supported values: ipp8u, ipp16u,

ipp16s, ipp32f, ipp64f.

numChannels

Number of image channels. Possible values: 1, 3, or 4.

pSpec

Pointer to the specification structure for the resize filter.

pInitBuf

Pointer to the temporary buffer for initialization of the linear
filter.

Description
This function initializes the IppiResizeSpec_32f structure for the resize operation with antialiasing using
the linear interpolation method. Note, that ippiResizeAntialiasingLinearInit_64f will initialize the
IppiResizeSpec_64f structure.
Before using these functions, calculate the size of the temporary buffer and specification structure using theippiResizeGetSize function with the antialiasing parameter equal to 1.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsNoOperation

Indicates a warning when width or height of the image is equal
to zero.

ippStsSizeErr

Indicates an error if width or height of the source or destination image
is negative.

ippStsExceededSizeErr
ippStsDataTypeErr

1422

Indicates an error If width or height of the source ordestination image exceeds 33554431 (0x1FFFFFF).
Indicates an error if dataType has an illegal value.

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

See Also
ResizeGetSize Computes the size of the specification structure and the size of the external
temporary buffer for the resize transform initialization.
Linear Interpolation
ResizeAntialiasingCubicInit
Initializes the specification structure for image resizing
with antialiasing using interpolation with the twoparameter cubic filters.

SyntaxIppStatus ippiResizeAntialiasingCubicInit(IppiSize srcSize, IppiSize dstSize, Ipp32f
valueB, Ipp32f valueC, IppiResizeSpec_32f* pSpec, Ipp8u* pInitBuf);

64f equivalent function
IppStatus ippiResizeAntialiasingCubicInit_64f(IppiSize srcSize, IppiSize dstSize,
Ipp64f valueB, Ipp64f valueC, IppiResizeSpec_64f* pSpec, Ipp8u* pInitBuf);

Platform-aware function
IppStatus ippiResizeAntialiasingCubicInit_L(IppiSizeL srcSize, IppiSizeL dstSize,
IppDataType dataType, Ipp32f valueB, Ipp32f valueC, IppiResizeSpec* pSpec, Ipp8u*
pInitBuf);

Threading layer (TL) function
IppStatus ippiResizeAntialiasingCubicInit_LT(IppiSizeL srcSize, IppiSizeL dstSize,
IppDataType dataType, Ipp32u numChannels, Ipp32f valueB, Ipp32f valueC,
IppiResizeSpec_LT* pSpec, Ipp8u* pInitBuf);

Include Files
ippi.h
Flavors with the _LT suffix: ippi_tl.h
Flavors with the _L suffix: ippi_l.h

Domain Dependencies
Flavors declared in ippi.h:
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib
Flavors declared in ippi_tl.h:
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib, ippcore_tl.lib, ippi_tl.lib

Parameters
srcSize

Size of the source image, in pixels.

dstSize

Size of the destination image, in pixels.

valueBThe first parameter for cubic filters.

valueCThe second parameter for cubic filters.

numChannels

Number of image channels. Possible values: 1, 3, or 4.

1423

1

Intel® Integrated Performance Primitives Developer Guide and Reference

dataType

Data type of the image. Supported values: ipp8u, ipp16u,

ipp16s, ipp32f, ipp64f.

pSpec

Pointer to the specification structure for the resize filter.

pInitBuf

Pointer to the temporary buffer for initialization of the cubic
filter.

Description
This function initializes the IppiResizeSpec_32f structure for the resize operation with antialiasing using
interpolation with the two-parameter cubic filters. Note, that ippiResizeAntialiasingCubicInit_64f will
initialize the IppiResizeSpec_64f structure.
Before using these functions, calculate the size of the temporary buffer and specification structure using theippiResizeGetSize function with the antialiasing parameter equal to 1.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsNoOperation

Indicates a warning when width or height of the image is equal
to zero.

ippStsSizeErr

Indicates an error if width or height of the source or destination image
is negative.

ippStsExceededSizeErr

ippStsDataTypeErr

Indicates an error If width or height of the source ordestination image exceeds 33554431 (0x1FFFFFF) (only for
platform-aware and TL functions).
Indicates an error if dataType has an illegal value.

See Also
ResizeGetSize Computes the size of the specification structure and the size of the external
temporary buffer for the resize transform initialization.
Cubic Interpolation
ResizeAntialiasingLanczosInit
Initializes the specification structure for image resizing
with antialiasing using interpolation with the Lanczos
filter.

SyntaxIppStatus ippiResizeAntialiasingLanczosInit(IppiSize srcSize, IppiSize dstSize, Ipp32u
numLobes, IppiResizeSpec_32f* pSpec, Ipp8u* pInitBuf);

64f equivalent function
IppStatus ippiResizeAntialiasingLanczosInit_64f(IppiSize srcSize, IppiSize dstSize,
Ipp32u numLobes, IppiResizeSpec_64f* pSpec, Ipp8u* pInitBuf);

Platform-aware function
IppStatus ippiResizeAntialiasingLanczosInit_L(IppiSizeL srcSize, IppiSizeL dstSize,
IppDataType dataType, Ipp32u numLobes, IppiResizeSpec* pSpec, Ipp8u* pInitBuf);

1424

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Threading layer (TL) function
IppStatus ippiResizeAntialiasingLanczosInit_LT(IppiSizeL srcSize, IppiSizeL dstSize,
IppDataType dataType, Ipp32u numChannels, Ipp32u numLobes, IppiResizeSpec_LT* pSpec,
Ipp8u* pInitBuf);

Include Files
ippi.h
Flavors with the _LT suffix: ippi_tl.h
Flavors with the _L suffix: ippi_l.h

Domain Dependencies
Flavors declared in ippi.h:
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib
Flavors declared in ippi_tl.h:
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib, ippcore_tl.lib, ippi_tl.lib

Parameters
srcSize

Size of the source image, in pixels.

dstSize

Size of the destination image, in pixels.

numLobes
numChannels
dataType

Number of lobes for the Lanczos window. Possible values: 2 or
3.
Number of image channels. Possible values: 1, 3, or 4.
Data type of the image. Supported values: ipp8u, ipp16u,

ipp16s, ipp32f, ipp64f.

pSpec

Pointer to the specification structure for the resize filter.

pInitBuf

Pointer to the temporary buffer for initialization of the cubic
filter.

Description
This function initializes the IppiResizeSpec_32f structure for the resize operation with antialiasing using
interpolation with the Lanczos filter. The Lanczos interpolation method is based on the 2-lobed or 3-lobed
Lanczos window function as an interpolation function depending on the value of the numLobes parameter.
Note, that ippiResizeAntialiasingLanczosInit_64f will initialize the IppiResizeSpec_64f structure.
Before using these functions, calculate the size of the temporary buffer and specification structure using theippiResizeGetSize function with the antialiasing parameter equal to 1.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsNoOperation

Indicates a warning when width or height of the image is equal
to zero.

1425

1Intel® Integrated Performance Primitives Developer Guide and Reference

Indicates an error if width or height of the source or destination image
is negative.

ippStsSizeErr

Indicates an error If width or height of the source ordestination image exceeds 33554431 (0x1FFFFFF) (only for
platform-aware and TL functions).

ippStsExceededSizeErr

Indicates an error if dataType has an illegal value.

ippStsDataTypeErr

See Also
ResizeGetSize Computes the size of the specification structure and the size of the external
temporary buffer for the resize transform initialization.
Lanczos Interpolation
ResizeAntialiasing
Changes an image size using the chosen interpolation
method with antialiasing.

SyntaxIppStatus ippiResizeAntialiasing_<data_type>_<chan>(const Ipp<data_type>* pSrc, Ipp32s
srcStep, Ipp<data_type>* pDst, Ipp32s dstStep, IppiPoint dstOffset, IppiSize dstSize,
IppiBorderType border, const Ipp<data_type>* pBorderValue, const IppiResizeSpec_32f*
pSpec, Ipp8u* pBuffer);
Supported values for data_type:

8u

16u

16s

32f

Supported values for chan:

C1R

C3R

C4R

Also supported 64f_C1R mode:

IppStatus ippiResizeAntialiasing_64f_C1R(const Ipp64f* pSrc, Ipp32s srcStep, Ipp64f*
pDst, Ipp32s dstStep, IppiPoint dstOffset, IppiSize dstSize, IppiBorderType border,
const Ipp64f* pBorderValue, const IppiResizeSpec_64f* pSpec, Ipp8u* pBuffer);

Platform-aware functions
IppStatus ippiResizeAntialiasing_<data_type>_<chan>_L(const Ipp<data_type>* pSrc,
IppSizeL srcStep, Ipp<data_type>* pDst, IppSizeL dstStep, IppiPointL dstOffset,
IppiSizeL dstSize, IppiBorderType border, const Ipp<data_type>* pBorderValue, const
IppiResizeSpec* pSpec, Ipp8u* pBuffer);
Supported values for data_type:

8u

16u

16s

32f

Supported values for chan:

C1R

1426

C3R

C4R

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Threading layer (TL) functions
IppStatus ippiResizeAntialiasing_<data_type>_<chan>_LT(const Ipp<data_type>* pSrc,
IppSizeL srcStep, Ipp<data_type>* pDst, IppSizeL dstStep, IppiBorderType border, const
Ipp<data_type>* pBorderValue, const IppiResizeSpec_LT* pSpec, Ipp8u* pBuffer);
Supported values for data_type:

8u

16u

16s

32f

Supported values for chan:

C1R

C3R

C4R

Include Files
ippi.h
Flavors with the _LT suffix: ippi_tl.h
Flavors with the _L suffix: ippi_l.h

Domain Dependencies
Flavors declared in ippi.h:
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib
Flavors declared in ippi_tl.h:
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib, ippcore_tl.lib, ippi_tl.lib

Parameters
pSrc
srcStep
pDst

Pointer to the source image.
Distance, in bytes, between the starting points of consecutive
lines in the source image buffer.
Pointer to the destination image.

dstStep

Distance, in bytes, between the starting points of consecutive
lines in the destination image buffer.

dstOffset

Offset of the tiled destination image with respect to the destination
image origin.

dstSize

Size of the destination image, in pixels.

borderType of border. Possible values are:ippBorderRepl
ippBorderConst
ippBorderInMem

Border is replicated from the edge
pixels.
Border pixels are set to constants.
Border is obtained from the source
image pixels in memory.

1427

1

Intel® Integrated Performance Primitives Developer Guide and Reference

ippBorderMirror

ippBorderMirrorR

Border is obtained from the source
image boundary pixels. Value can be
specified via ippiResizeAntialiasing*and ippiResizeAntialiasing*_L.
Border is obtained from the source
image boundary pixels. The anchor cellvalue is replicated to the border pixels.
Value can be specified via
ippiResizeAntialiasing* andippiResizeAntialiasing*_L.

Mixed borders are also supported. They can be obtained by the bitwise
operation OR between the ippBorderRepl type and theippBorderInMemTop, ippBorderInMemBottom,
ippBorderInMemLeft, ippBorderInMemRight types.

pBorderValue

Pointer to the constant value to assign to pixels of the constantborder. This parameter is applicable only to the ippBorderConst
border type.

pSpec

Pointer to the specification structure for the resize filter.

pBuffer

Pointer to the external buffer.

Description
The ippiResizeAntialiasing function changes the size of an image using the chosen interpolation methodwith antialiasing. The interpolation method to be applied is defined by the function that you use for the resize
filter initialization. Use this function to reduce the image size with minimization of moire artifacts. For more
information about the implemented algorithm, refer to [SCHU92].
If you use ippiResizeAntialiasing to increase the image size, the function applies the same algorithm as
one of the following resize functions, depending on the interpolation type chosen at the initialization stage:ippiResizeLinear, ippiResizeCubic, or ippiResizeLanczos.
This function operates with ROI. It resizes the source image ROI origin to the destination image ROI origin.
Define the destination image ROI origin by the following parameters: the offset of the tiled destination image
with respect to the destination image origin and the destination image size. The source image ROI origin isdefined automatically. To obtain the source image ROI, use the corresponding flavor of theippiResizeGetSrcRoi function. To obtain the source image ROI origin offset, call the corresponding flavorof the ippiResizeGetSrcOffset function. Parameters pSrc and pDst must point to the processed sourceand destination image ROI origins, respectively.
The interpolation algorithm applied uses edge pixels of the source image that are out of the image origin.
The ippiResizeAntialiasing function uses the weighted values of these outer pixels. To obtain the size ofthe out of the source image origin, call the corresponding flavor of the ippiResizeGetBorderSize function.
Before using the ippiResizeAntialiasing function, you need to initialize the IppiResizeSpec_32f
structure using one of the following functions, depending on the interpolation method to be applied:ippiResizeAntialiasingLinearInit, ippiResizeAntialiasingCubicInit, or
ippiResizeAntialiasingLanczosInit, and compute the size of the external buffer pBuffer using thecorresponding flavor of the ippiResizeGetBufferSize function. The same instructions work for
ippiResizeAntialiasing_64f, but with 64f equivalent init functions.
For more information about the supported border types, see User-defined Border Types.

1428

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsNoOperation
ippStsBorderErr
ippStsContextMatchErr
ippStsNotSupportedModeErr

Indicates a warning when width or height of the destination
image is equal to zero.
Indicates an error when the border value is illegal.
Indicates an error when a pointer to the specification structure
is invalid.
Indicates an error when the requested mode is not supported.

ippStsSizeErr

Indicates an error when width or height of the destination image isnegative.

ippStsStepErr

Indicates an error when the step value is not data type multiple.

ippStsOutOfRangeErr

Indicates an error when the destination image offset point is outside
the destination image origin.

ippStsSizeWrn

Indicates a warning when the destination image size is morethan the destination image origin size.

ExampleThe figure below demonstrates the results of reducing a 1751x1044 image by five times with antialiasing (a)and without (b).

See Also
ROI Processing in Geometric Transforms
User-defined Border Types
ResizeGetSrcRoi Computes the ROI of the source image for resizing by tile processing.
ResizeGetSrcOffset Computes the offset of the source image for resizing by tile processing.
ResizeGetBorderSize Computes the size of possible borders for the resize transform.
ResizeGetBufferSize Computes the size of the external buffer for image resizing.
ResizeAntialiasingLinearInit Initializes the specification structure for image resizing withantialiasing using linear interpolation.
ResizeAntialiasingCubicInit Initializes the specification structure for image resizing withantialiasing using interpolation with the two-parameter cubic filters.
ResizeAntialiasingLanczosInit Initializes the specification structure for image resizing withantialiasing using interpolation with the Lanczos filter.
ResizeFilterGetSize
Calculates the size of the state structure for resizing
filter.

SyntaxIppStatus ippiResizeFilterGetSize_8u_C1R(IppiSize srcRoiSize, IppiSize dstRoiSize,
IppiResizeFilterType filter, Ipp32u* pSize);

1429

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
srcRoiSize

Size of the source image ROI in pixels.

dstRoiSize

Size of the destination image ROI in pixels.

filterType of filter used in resizing; possible values:
ippResizeFilterHann, ippResizeFilterLanczos.

pSize

Pointer to the size (in bytes) of the state structure.

Description
This function operates with ROI (see ROI Processing in Geometric Transforms).
This function calculates the size pSize of the state structure required for the function ippiResizeFilter.
The type of filter is specified by the parameter filter.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if the pSize pointer is NULL.

ippStsSizeErr
ippStsNotSupportedModeErr

Indicates an error condition if srcRoiSize or dstRoiSize has afield with zero or negative value.
Indicates an error condition if filter has an invalid value.

ResizeFilterInit
Initializes the state structure for the resize filter.

SyntaxIppStatus ippiResizeFilterInit_8u_C1R(IppiResizeFilterState* pState, IppiSize
srcRoiSize, IppiSize dstRoiSize, IppiResizeFilterType filter);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pStatePointer to the state structure for resize filter.

srcRoiSize

Size of the source image ROI in pixels.

1430

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

dstRoiSize
filterSize of the destination image ROI in pixels.
Type of filter used in resizing; possible values:

ippResizeFilterHann, ippResizeFilterLanczos

Description
This function operates with ROI (see ROI Processing in Geometric Transforms).
This function initializes the state structure pState for the resizing filter used by the function
ippiResizeFilter. The size of the structure must be computed by the function
ippiResizeFilterGetSize beforehand. The type of filter is specified by the parameter filter and it must
be the same as in the function ippiResizeFilterGetSize.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if the pState pointer is NULL.

ippStsSizeErr
ippStsNotSupportedModeErr

Indicates an error condition if srcRoiSize or dstRoiSize has afield with zero or negative value.
Indicates an error condition if filter has an invalid value.

ResizeFilter
Changes the size of an image using a generic filter.

SyntaxIppStatus ippiResizeFilter_8u_C1R(const Ipp8u* pSrc, int srcStep, IppiSize srcRoiSize,Ipp8u* pDst, int dstStep, IppiSize dstRoiSize, IppiResizeFilterState* pState);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source image ROI.

srcRoiSize

Distance in bytes between starts of consecutive lines in thesource image buffer.
Size of the source image ROI in pixels.

pDst

Pointer to the destination image ROI.

srcStep

dstRoiSize

Distance in bytes between starts of consecutive lines in thedestination image buffer.
Size of the destination image ROI in pixels.

pStatePointer to the state structure for the resize filter.

dstStep

Description
This function operates with ROI (see ROI Processing in Geometric Transforms).

1431

1

Intel® Integrated Performance Primitives Developer Guide and ReferenceThis function resizes the source image pSrc using the special generic filters. The state structure pState
contains the parameters of filtering and must be initialized by the function ippiResizeFilterInit
beforehand.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if one of the specified pointers is
NULL.

ippStsStepErr
ippStsSizeErr
ippStsContextMatchErr

Indicates an error condition if srcStep or dstStep has a zero or
negative value.
Indicates an error condition if srcRoiSize or dstRoiSize has afield with zero or negative value.
Indicates an error condition if a pointer to an invalid state
structure is passed.

ResizeYUV420GetSize
Computes sizes of the spec structure and the externalbuffer for the NV12 resize transform initialization.

SyntaxIppStatus ippiResizeYUV420GetSize(IppiSize srcSize, IppiSize dstSize,
IppiInterpolationType interpolation, Ipp32u antialiasing, Ipp32s* pSpecSize, Ipp32s*
pInitBufSize);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
srcSize

Size of the source image in pixels.

dstSize

Size of the destination image in pixels.

interpolation

Interpolation method. Supported values are ippLanczos andippSuper.

antialiasing

Antialiasing method.

pSpecSize

Pointer to the size in bytes of the spec structure.

pInitBufSize

Pointer to the size in bytes of the temporal buffer.

Description
This function computes sizes of the spec structure and the external buffer that are required for one of thefollowing functions depending on the interpolation method parameter: ResizeYUV420LanczosInit andResizeYUV420SuperInit.
The size of the 2-Lobed Lanczos filter is 8x8.

1432

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

NOTE
Antialising is currently not supported. The value for the antialiasing parameter must be equal tozero.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if one of the specified pointers is
NULL.

ippStsNoOperation
ippStsSizeErr

Indicates a warning if width or height of the image is equal tozero.
Indicates an error in the following cases:• if width or height of the image is equal to 1,• if the source image size is less than a filter size of the choseninterpolation method (except ippSuper),• if one of the specified dimensions of the source image is less thanthe corresponding dimension of the destination image (forippSuper method only),• if width or height of the source or destination image is negative,• if one of the calculated sizes exceeds maximum 32 bit signed
integer positive value (the size of the one of the processed images
is too large).

if width or height of the source or destination image isnegative.
ippStsSizeWrn

Indicates a warning if width or height of the image is odd.

ippStsInterpolationErr

Indicates an error if interpolation has an illegal value.

ippStsNoAntialiasing
ippStsNotSupportedModeErr

Indicates a warning if the specified interpolation method does
not support antialiasing.
Indicates an error if the requested mode is currently notsupported.

ResizeYUV420GetSrcRoi
Computes the ROI of the source image for NV12
resizing by tile processing.

SyntaxSingle precision
IppStatus ippiResizeYUV420GetSrcRoi(const IppiResizeYUV420Spec* pSpec, IppiPoint
dstRoiOffset, IppiSize dstRoiSize, IppiPoint* srcRoiOffset, IppiSize* srcRoiSize);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

1433

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Parameters
pSpec

Pointer to the spec structure for the resize filter.

dstRoiOffset

Offset of the tiled destination image ROI.

dstRoiSize

Size of the tiled destination image ROI.

srcRoiOffset

Offset of the source image ROI.

srcRoiSize

Pointer to the size of the source image ROI.

Description
This function computes the ROI of the processed source image using the processed ROI of the destination
image for the corresponding resize transform by tile processing. The pSpec parameter defines the resize
algorithm parameters. Prior to using the ippiResizeYUV420GetSrcRoi function, you need to initialize thepSpec parameter by calling one of the following functions: ippiResizeYUV420LanczosInit or
ippiResizeYUV420SuperInit functions.
NOTE
If the destination ROI size exceeds the image origin, the source ROI will be obtained for anintersection of the destination ROI and image origin.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the specified pointers is NULL.

ippStsContextMatchErr

Indicates an error if pointer to the spec structure is invalid.

ippStsOutOfRangeErr

Indicates an error if the destination image offset point is outside thedestination image origin.

ippStsMisalignedOffsetErr
ippStsSizeErr
ippStsSizeWrn

Indicates an error if one of the fields of the dstRoiOffset
parameter is odd.
Indicates an error if one of the fields of the dstRoiSize is lessthan 2.
Indicates a warning if the destination ROI exceeds the destination
image origin or contains odd values.

ResizeYUV420LanczosInit
Initializes the spec structure for the NV12 resize
transform by interpolation with the Lanczos filter.

SyntaxIppStatus ippiResizeYUV420LanczosInit(IppiSize srcSize, IppiSize dstSize, Ipp32u
numLobes, IppiResizeYUV420Spec* pSpec, Ipp8u* pInitBuf);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h

1434

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
srcSize

Size in pixels of the source image.

dstSize

Size in pixels of the destination image.

numLobes

Parameter for Lanczos filters. Possible values are 2 or 3.

pSpec

Pointer to the spec structure for the resize filter.

pInitBuf

Pointer to the temporal buffer for the cubic filter initialization.

Description
This function initializes the IppiResizeYUV420Spec structure for the resize algorithm with the Lanczos filter
interpolation method. This method is based on the 2-lobed or 3-lobed Lanzos window function as aninterpolation function depending on the value of the numLobes parameter.
To calculate the size of the spec structure object, call the ippiResizeYUV420GetSize function.
The function ippiResizeYUV420LanczosInit requires the external buffer pInitBuf. Prior to using thisfunction, you need to call ippiResizeYUV420GetSize for the corresponding flavors to compute the size ofthe buffer.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the specified pointers is NULL.

ippStsSizeWrn

Indicates an error if width or height of the image is equal tozero.
Indicates a warning if width or height of the image is odd.

ippStsSizeErr

Indicates an error in the following cases:

ippStsResizeNoOperation•••

ippStsNotSupportedModeErr

if width or height of the source or destination image is equal to 1,
if width or height of the source or destination image is negative,
if the source image size is less than the Lanczos interpolation filter
size: 8x8 for 2-lobed Lanczos function, or 12x12 for 3-lobed
Lanczos function.

Indicates an error if the requested mode is not supported.

ResizeYUV420SuperInit
Initializes the spec structure for the NV12 resize
transform by interpolation with the super samplingalgorithm.

SyntaxIppStatus ippiResizeYUV420SuperInit(IppiSize srcSize, IppiSize dstSize,
IppiResizeYUV420Spec* pSpec);

Include Files
ippi.h1435

1Intel® Integrated Performance Primitives Developer Guide and Reference

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
srcSize

Size in pixels of the source image.

dstSize

Size in pixels of the destination image.

pSpec

Pointer to the spec structure for the resize filter.

Description
This function initializes the IppiResizeYUV420Spec structure for the resize algorithm using interpolation
with the super sampling algorithm.
To calculate the size of the spec structure object, call the ippiResizeYUV420GetSize function.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the specified pointers is NULL.

ippStsSizeWrn

Indicates an error if width or height of the image is equal tozero.
Indicates a warning if width or height of the image is odd.

ippStsSizeErr

Indicates an error in the following cases:

ippStsResizeNoOperation• if width or height of the image is equal to 1,• if one of the specified dimensions of the source image is less thanthe corresponding dimension of the destination image,• if width or height of the source or destination image is negative.

ResizeYUV420GetBorderSize
Computes the size of possible borders for the NV12
resize transform.

SyntaxIppStatus ippiResizeYUV420GetBorderSize(const IppiResizeYUV420Spec* pSpec,
IppiBorderSize* borderSize);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSpec

1436

Pointer to the spec structure for the resize filter.

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

borderSize

Size in pixels of necessary borders.

Description
This function computes the size of the source image ROI that is used by the corresponding resize transformand is out of the processing boundaries for Luma and Chroma planes. The pSpec parameter defines theresize algorithm parameters. Prior to using the ippiResizeYUV420GetBorderSize function, you need toinitialize the pSpec parameter by calling one of the following functions: ippiResizeYUV420LanczosInit or
ippiResizeYUV420SuperInit.
NOTE
The returned border size is in Luma/Chroma plane pixels. This means that the chosen resize algorithm
uses the returned outer size of the source image ROI for each plane.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the specified pointers is NULL.

ippStsContextMatchErr

Indicates an error if pointer to the spec structure is invalid.

ResizeYUV420GetSrcOffset
Computes the offset of the source image for the NV12
resize transform by tile processing.

SyntaxIppStatus ippiResizeYUV420GetSrcOffset(const IppiResizeYUV420Spec* pSpec, IppiPoint
dstOffset, IppiPoint* srcOffset);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSpec

Pointer to the spec structure for the resize filter.

dstOffset

Offset of the tiled destination image with respect to the destination
image origin.

srcOffset

Offset of the source image.

Description
This function computes the offset of the processed source image ROI using the offset of the processed
destination image ROI for the corresponding resize transform by tile processing. The pSpec parameter
defines the resize algorithm parameters. Prior to using the ippiResizeGetSrcOffset function, you need toinitialize the pSpec parameter by calling one of the following functions: ippiResizeYUV420LanczosInit
and ippiResizeYUV420SuperInit.

1437

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the specified pointers is NULL.

ippStsContextMatchErr

Indicates an error if pointer to the spec structure is invalid.

ippStsOutOfRangeErr

Indicates an error if the destination image offset point is outside thedestination image origin.

ippStsMisalignedOffsetErr

Indicates an error if one of the fields of the dstOffset parameter is
odd.

ResizeYUV420GetBufferSize
Computes the size of the external buffer for the NV12
resize transform.

SyntaxIppStatus ippiResizeYUV420GetBufferSize(const IppiResizeYUV420Spec* pSpec, IppiSize
dstSize, Ipp32s* pBufSize);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSpec

Pointer to the spec structure for the resize filter.

dstSize

Size in pixels of the destination image.

pBufSize

Pointer to the size in bytes of the external buffer.

Description
This function computes the size of the external buffer for the NV12 resize transform. The pSpec parameter
defines the resize algorithm parameters. Prior to using the ippiResizeYUV420GetBufferSize function, youneed to initialize the pSpec parameter by calling one of the following functions:
ippiResizeYUV420LanczosInit and ippiResizeYUV420SuperInit.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if pBufferSize pointer is NULL.

ippStsContextMatchErr

Indicates a warning if width or height of the destination image
is equal to zero.
Indicates an error if pointer to the spec structure is invalid.

ippStsSizeWrn

Indicates a warning in the following cases:

ippStsNoOperation

1438

Developer Guide and Reference for Intel® Integrated Performance Primitives

1• if width or height of the image is odd,
• if the destination image size is more than the destination image
origin size.

ippStsSizeErr

Indicates an error in the following cases:• if width or height of the image is equal to 1,• if width or height of the destination image is negative,• if the calculated buffer size exceeds maximum 32 bit signed integer
positive value (the processed image size is too large).

ResizeYUV420Lanczos
Changes the size of the NV12 image by interpolation
with the Lanczos filter.

SyntaxIppStatus ippiResizeYUV420Lanczos_8u_P2R(const Ipp8u* pSrcY, Ipp32s srcYStep, const
Ipp8u* pSrcUV, Ipp32s srcUVStep, Ipp8u* pDstY, Ipp32s dstYStep, Ipp8u* pDstUV, Ipp32s
dstUVStep, IppiPoint dstOffset, IppiSize dstSize, IppiBorderType border, const Ipp8u*
pBorderValue, const IppiResizeYUV420Spec* pSpec, Ipp8u* pBuffer);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrcY

Pointer to the source image Y plane.

srcYStep

Distance in bytes between starts of consecutive lines in thesource image Y plane.

pSrcUV

Pointer to the source image UV plane.

srcUVStepDistance in bytes between starts of consecutive lines in the source
image UV plane.

pDstY

Pointer to the destination image Y plane.

dstYStep
pDstUV

Distance in bytes between starts of consecutive lines in thedestination image Y plane.
Pointer to the destination image UV plane.

dstUVStepDistance in bytes between starts of consecutive lines in thedestination image UV plane.

dstOffset

Offset of the tiled destination image with respect to the destination
image origin.

dstSize

Size of the destination image in pixels.

borderType of the border.

1439

1

Intel® Integrated Performance Primitives Developer Guide and ReferencepSpec

Pointer to the constant value to assign to pixels of the constantborder. This parameter is applicable only to the ippBorderConst
border type.
Pointer to the spec structure for the resize filter.

pBuffer

Pointer to the work buffer.

pBorderValue

Description
This function changes an image size using interpolation with the Lanczos filter. The image size can be either
reduced or increased in each direction, depending on the destination image size.
This function operates with ROI (see ROI Processing in Geometric Transforms). It resizes the source image
ROI origin to the destination image ROI origin. The destination image ROI origin must be defined by thefollowing parameters: the offset of the tiled destination image with respect to the destination image origin
and the destination image size. The source image ROI origin is defined automatically. To obtain the source
image ROI origin offset, call the ippiResizeYUV420GetSrcOffset function. Parameters pSrcY, pSrcUV andpDstY, pDstUV must point to the processed source and destination image ROI origins respectively.
The source and destination images are in the 4:2:0 two-plane image format (NV12): all Y samples (pSrcY)
are found first in memory as an array of unsigned chars with an even number of lines memory alignment,
followed by an array (pSrcY) of unsigned chars containing interleaved U and V samples. Supported values
for border are ippBorderRepl and ippBorderInMem.
Applied interpolation algorithm uses edge pixels of the source image that are out of the image origin. The
function ippiResizeYUV420Lanczos uses in calculation the weighted values of these outer pixels. To obtainthe size of the out of the source image origin, call the function ippiResizeYUV420GetBorderSize for thecorresponding flavor.
If the border type is equal to ippBorderRepl, the source image edge pixels are replicated out of the image
origin. If the border type is equal to ippBorderInMem, the outer pixels are obtained from the out of thesource image origin space. For the mixed border types, the combined approach is applied.
Prior to using the ippiResizeLinear function, initialize the IppiResizeYUV420Spec structure by calling theippiResizeYUV420LanczosInit and compute the size of the external buffer pBuffer by calling theippiResizeYUV420GetBufferSize for the corresponding flavor.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the specified pointers is NULL.

ippStsBorderErr

Indicates a warning if width or height of the destination image
is equal to zero.
Indicates an error if the border value is illegal.

ippStsContextMatchErr

Indicates an error if pointer to the spec structure is invalid.

ippStsMisalignedOffsetErr

Indicates an error if one of the fields of the dstOffset parameter is
odd.

ippStsSizeWrn

Indicates a warning in the following cases:

ippStsNoOperation• if width of the image is odd,
• if the destination image size is more than the destination image
origin.

1440

1Developer Guide and Reference for Intel® Integrated Performance Primitives

ippStsSizeErr

Indicates an error if width of the destination image is equal to1, or if width or height of the source or destination image isnegative.

ippStsOutOfRangeErr

Indicates an error if the destination image offset point is outside thedestination image origin.

ippStsNotSupportedModeErr

Indicates an error if the requested mode is not supported.

ResizeYUV420Super
Changes the size of the NV12 image by the supersampling interpolation method.

SyntaxIppStatus ippiResizeYUV420Super_8u_P2R(const Ipp8u* pSrcY, Ipp32s srcYStep, const
Ipp8u* pSrcUV, Ipp32s srcUVStep, Ipp8u* pDstY, Ipp32s dstYStep, Ipp8u* pDstUV, Ipp32s
dstUVStep, IppiPoint dstOffset, IppiSize dstSize, const IppiResizeYUV420Spec* pSpec,
Ipp8u* pBuffer);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrcY

Pointer to the source image Y plane.

srcYStep

Distance in bytes between starts of consecutive lines in thesource image Y plane.

pSrcUV

Pointer to the source image UV plane.

srcUVStepDistance in bytes between starts of consecutive lines in the source
image UV plane.

pDstY

Pointer to the destination image Y plane.

dstYStep
pDstUV

Distance in bytes between starts of consecutive lines in thedestination image Y plane.
Pointer to the destination image UV plane.

dstUVStepDistance in bytes between starts of consecutive lines in thedestination image UV plane.

dstOffset

Offset of the tiled destination image with respect to the destination
image origin.

dstSize

Size of the destination image in pixels.

pSpec

Pointer to the spec structure for the resize filter.

pBuffer

Pointer to the work buffer.

1441

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Description
This function changes an image size using interpolation with the super sampling algorithm. The image size
can be either reduced or increased in each direction, depending on the destination image size.
This function operates with ROI (see ROI Processing in Geometric Transforms). It resizes the source image
ROI origin to the destination image ROI origin. The destination image ROI origin must be defined by thefollowing parameters: the offset of the tiled destination image with respect to the destination image origin
and the destination image size. The source image ROI origin is defined automatically. To obtain the source
image ROI origin offset, call the ippiResizeYUV420GetSrcOffset function. Parameters pSrcY, pSrcUV andpDstY, pDstUV must point to the processed source and destination image ROI origins respectively.
The interpolation algorithm applied uses only pixels of the source image origin that are inside of the image
boundaries.
The source and destination images are in the 4:2:0 two-plane image format (NV12): all Y samples (pSrcY)
are found first in memory as an array of unsigned chars with an even number of lines memory alignment,
followed by an array (pSrcY) of unsigned chars containing interleaved U and V samples.
Prior to using the ippiResizeLinear function, initialize the IppiResizeYUV420Spec structure by calling theippiResizeYUV420LanczosInit and compute the size of the external buffer pBuffer by calling theippiResizeYUV420GetBufferSize for the corresponding flavor.

NOTE
This function provides optimized code paths for the following scaling factors along the x andy axes: 1/2, 2/3, 3/4, 4/5, 5/6, 8/9, 1/3, 2/5, 3/5, 3/7, 4/9, 7/10, 1/4, 2/7, 3/8, 1/8.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the specified pointers is NULL.

ippStsBorderErr

Indicates a warning if width or height of the destination image
is equal to zero.
Indicates an error if the border value is illegal.

ippStsContextMatchErr

Indicates an error if pointer to the spec structure is invalid.

ippStsSizeWrn

Indicates a warning in the following cases:

ippStsNoOperation• if width of the image is odd,
• if the destination image size is more than the destination image
origin.

ippStsSizeErr

Indicates an error if width or height of the destination image isequal to 1; or if width or height of the source or destination
image is negative.

ippStsMisalignedOffsetErr

Indicates an error if one of the fields of the dstOffset parameter is
odd.

ippStsOutOfRangeErr

Indicates an error if the destination image offset point is outside thedestination image origin.

ResizeYUV422GetSize

1442

Developer Guide and Reference for Intel® Integrated Performance Primitives

1Computes sizes of the spec structure and the externalbuffer for YUY2 resize transform initialization.

SyntaxIppStatus ippiResizeYUV422GetSize(IppiSize srcSize, IppiSize dstSize,
IppiInterpolationType interpolation, Ipp32u antialiasing, Ipp32s* pSpecSize, Ipp32s*
pInitBufSize);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
srcSize

Size of the source image in pixels.

dstSize

Size of the destination image in pixels.

interpolation

Interpolation method. Supported values are ippNearest andippLinear.

antialiasing

Antialiasing method.

pSpecSize

Pointer to the size in bytes of the spec structure.

pInitBufSize

Pointer to the size in bytes of the temporal buffer.

Description
This function computes sizes of the spec structure and the external buffer that are required for one of thefollowing functions depending on the interpolation method parameter: ResizeYUV422NearestInit andResizeYUV422LinearInit.
The filter sizes of the Nearest Neighbor and Linear interpolation algorithms are 2x1 and 4x2 respectively.
NOTE
Antialiasing is currently not supported. The value for the antialiasing parameter must be equal tozero.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if one of the specified pointers is
NULL.

ippStsNoOperation
ippStsSizeErr

Indicates a warning if width or height of the image is equal tozero.
Indicates an error in the following cases:• if the source image size is less than the filter size for the choseninterpolation method,

1443

1

Intel® Integrated Performance Primitives Developer Guide and Reference• if one of the calculated sizes exceeds maximum 32 bit signed
integer positive value (the size of one of the processed images is
too large).

ippStsSizeWrn

Indicates a warning if width of the image is odd.

ippStsInterpolationErr

Indicates an error if interpolation has an illegal value.

ippStsNoAntialiasing
ippStsNotSupportedModeErr

Indicates a warning if the specified interpolation method does
not support antialiasing.
Indicates an error if the requested mode is currently notsupported.

ResizeYUV422GetBorderSize
Computes the size of possible borders for the YUY2
resize transform.

SyntaxIppStatus ippiResizeYUV422GetBorderSize(const IppiResizeYUV422Spec* pSpec,
IppiBorderSize* borderSize);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSpec

Pointer to the spec structure for the resize filter.

borderSize

Size in pixels of necessary borders.

Description
This function computes the size of the source image ROI that is used by the corresponding resize transformand is out of the processing boundaries. The pSpec parameter defines the resize algorithm parameters. Prior
to using the ippiResizeYUV422GetBorderSize function, you need to initialize the pSpec parameter bycalling one of the following functions: ippiResizeYUV422NearestInit, andippiResizeYUV422LinearInit.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the specified pointers is NULL.

ippStsContextMatchErr

Indicates an error if pointer to the spec structure is invalid.

ResizeYUV422GetSrcOffset
Computes the offset of the source image for the YUY2
resize transform by tile processing.

1444

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

SyntaxIppStatus ippiResizeYUV422GetSrcOffset(const IppiResizeYUV422Spec* pSpec, IppiPoint
dstOffset, IppiPoint* srcOffset);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSpec

Pointer to the spec structure for the resize filter.

dstOffset

Offset of the tiled destination image with respect to the destination
image origin.

srcOffset

Offset of the source image.

Description
This function computes the offset of the processed source image ROI using the offset of the processed
destination image ROI for the corresponding resize transform by tile processing. The pSpec parameter
defines the resize algorithm parameters. Prior to using the ippiResizeYUV422GetSrcOffset function, youneed to initialize the pSpec parameter by calling one of the following functions:
ippiResizeYUV422NearestInit and ippiResizeYUV422LinearInit.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the specified pointers is NULL.

ippStsMisalignedOffsetErr

Indicates an error if the x field of the dstOffset parameter is odd.

ippStsOutOfRangeErr

Indicates an error if the destination image offset point is outside thedestination image origin.

ippStsContextMatchErr

Indicates an error if pointer to the spec structure is invalid.

ResizeYUV422GetBufSize
Computes the size of the external buffer for the NV12
resize transform.

SyntaxIppStatus ippiResizeYUV422GetBufSize(const IppiResizeYUV422Spec* pSpec, IppiSize
dstSize, Ipp32s* pBufSize);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h

1445

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSpec

Pointer to the spec structure for the resize filter.

dstSize

Size in pixels of the destination image.

pBufSize

Pointer to the size in bytes of the external buffer.

Description
This function computes the size of the external buffer for the YUY2 resize transform. The pSpec parameter
defines the resize algorithm parameters. Prior to using the ippiResizeYUV420GetBufferSize function, youneed to initialize the pSpec parameter by calling one of the following functions:
ippiResizeYUV422NearestInit and ippiResizeYUV422LinearInit.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the specified pointers is NULL.

ippStsContextMatchErr

Indicates a warning if width or height of the destination image
is equal to zero.
Indicates an error if pointer to the spec structure is invalid.

ippStsSizeWrn

Indicates a warning in the following cases:

ippStsNoOperation• if width of the image is odd,
• if the destination image size is more than the destination image
origin size.

ippStsSizeErr

Indicates an error in the following cases:• if width of the image is equal to 1,• if width or height of the destination image is negative,• if the calculated buffer size exceeds maximum 32 bit signed integer
positive value (the processed image size is too large).

ResizeYUV422GetSrcRoi
Computes the ROI of the source image for YUV422
resizing by tile processing.

SyntaxIppStatus ippiResizeYUV422GetSrcRoi(const IppiResizeYUV422Spec* pSpec, IppiPoint
dstRoiOffset, IppiSize dstRoiSize, IppiPoint* srcRoiOffset, IppiSize* srcRoiSize);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

1446

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Parameters
pSpec

Pointer to the spec structure for the resize filter.

dstRoiOffset

Offset of the tiled destination image ROI.

dstRoiSize

Size of the tiled destination image ROI.

srcRoiOffset

Offset of the source image ROI.

srcRoiSize

Pointer to the size of the source image ROI.

Description
This function computes the ROI of the processed source image using the processed ROI of the destination
image for the corresponding resize transform by tile processing. The pSpec parameter defines the resize
algorithm parameters. Prior to using the ippiResizeYUV422GetSrcRoi function, you need to initialize thepSpec parameter by calling one of the following functions: ippiResizeYUV422NearestInit or
ippiResizeYUV422LinearInit.
NOTE
If the destination ROI size exceeds the image origin, the source ROI will be obtained for anintersection of the destination ROI and image origin.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the specified pointers is NULL.

ippStsContextMatchErr

Indicates an error if pointer to the specification structure isinvalid.

ippStsOutOfRangeErr

Indicates an error if the destination image offset point is outside thedestination image origin.

ippStsMisalignedOffsetErr
ippStsSizeErr

Indicates an error if x-value of the parameter dstRoiOffset is
odd.
Indicates an error in the following cases:• If the height of the destination ROI is zero or negative.
• If the width of the destination ROI is less than 2.

ippStsSizeWrn

Indicates a warning in the following cases:••

If the width of the destination ROI is odd.
If the destination ROI exceeds the destination image origin.

ResizeYUV422NearestInit
Initializes the spec structure for the YUY2 resize
transform by the nearest neighbor interpolation
method.

SyntaxIppStatus ippiResizeYUV422NearestInit(IppiSize srcSize, IppiSize dstSize,
IppiResizeYUV422Spec* pSpec);

1447

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
srcSize

Size in pixels of the source image.

dstSize

Size in pixels of the destination image.

pSpec

Pointer to the spec structure for the resize filter.

Description
This function initializes the IppiResizeYUV422Spec structure for the resize algorithm with the nearest
neighbor interpolation method. To calculate the size of the spec structure object, call theippiResizeYUV422GetSize function.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the specified pointers is NULL.

ippStsNoOperation
ippStsSizeWrn
ippStsSizeErr

Indicates a warning if width or height of the image is equal tozero.
Indicates a warning if width of the image is odd.
Indicates an error if width of the image is equal to 1, or if
width or height of the source or destination image is negative.

ResizeYUV422LinearInit
Initializes the spec structure for the YUY2 resize
transform by the linear interpolation method.

SyntaxIppStatus ippiResizeYUV422LinearInit(IppiSize srcSize, IppiSize dstSize,
IppiResizeYUV422Spec* pSpec);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
srcSize

Size in pixels of the source image.

dstSize

Size in pixels of the destination image.

1448

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

pSpec

Pointer to the spec structure for the resize filter.

Description
This function initializes the IppiResizeYUV422Spec structure for the resize algorithm with the linear
interpolation method. To calculate the size of the spec structure object, call the ippiResizeYUV422GetSize
function.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the specified pointers is NULL.

ippStsSizeWrn

Indicates a warning if width or height of the image is equal tozero.
Indicates a warning if width of the image is odd.

ippStsSizeErr

Indicates an error in the following cases:

ippStsNoOperation• if width of the image is equal to 1,• if width or height of the source or destination image is negative,• if the source image size is less than the linear filter size 4x2.

ResizeYUV422Nearest
Changes an YUY2 image size by the nearest neighborinterpolation method.

SyntaxIppStatus ippiResizeYUV422Nearest_8u_C2R(const Ipp8u* pSrc, Ipp32s srcStep, Ipp8u*
pDst, Ipp32s dstStep, IppiPoint dstOffset, IppiSize dstSize, const
IppiResizeYUV422Spec* pSpec, Ipp8u* pBuffer);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc
srcStep
pDst

Pointer to the source image.
Distance in bytes between starts of consecutive lines in thesource image buffer.
Pointer to the destination image.

dstStep

Distance in bytes between starts of consecutive lines in thedestination image buffer.

dstOffset

Offset of the tiled destination image with respect to the destination
image origin.

dstSize

Size of the destination image in pixels.

1449

1

Intel® Integrated Performance Primitives Developer Guide and ReferencepSpec

Pointer to the spec structure for the resize filter.

pBuffer

Pointer to the work buffer.

Description
This function changes an image size using the nearest neighbor interpolation method. The image size can beeither reduced or increased in each direction, depending on the destination image size.
This function operates with ROI (see ROI Processing in Geometric Transforms). It resizes the source image
ROI origin to the destination image ROI origin. The destination image ROI origin must be defined by thefollowing parameters: the offset of the tiled destination image with respect to the destination image origin
and the destination image size. The source image ROI origin is defined automatically. To obtain the source
image ROI origin offset, call the ippiResizeYUV422GetSrcOffset function. Parameters pSrc and pDst
must point to the processed source and destination image ROI origins respectively.
The source and destination images are in the YUY2 pixel format ( Y0U0Y1V0,Y2U1Y3V1,.. or
Y0Cb0Y1Cr0,Y2Cb1Y3Cr1,..).
The interpolation algorithm applied uses only pixels of the source image origin that are inside of the image
boundaries.
Prior to using the ippiResizeYUV422Nearest function, initialize the IppiResizeYUV422Spec structure bycalling the ippiResizeYUV422NearestInit and compute the size of the external buffer pBuffer by callingthe ippiResizeYUV422GetBufSize for the corresponding flavor.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the specified pointers is NULL.

ippStsContextMatchErr

Indicates a warning if width or height of the destination image
is equal to zero.
Indicates an error if pointer to the spec structure is invalid.

ippStsSizeWrn

Indicates a warning in the following cases:

ippStsNoOperation• if width of the image is odd,
• if the destination image size is more than the destination image
origin.

ippStsMisalignedOffsetErr
ippStsSizeErr

ippStsOutOfRangeErr

Indicates an error if the x field of the dstOffset parameter is odd.

Indicates an error if width of the destination image is equal to1, or if width or height of the source or destination image isnegative.
Indicates an error if the destination image offset point is outside thedestination image origin.

ResizeYUV422Linear
Changes an YUY2 image size by the linear
interpolation method.

SyntaxIppStatus ippiResizeYUV422Linear_8u_C2R(const Ipp8u* pSrc, Ipp32s srcStep, Ipp8u* pDst,
Ipp32s dstStep, IppiPoint dstOffset, IppiSize dstSize, IppiBorderType border, const
Ipp8u* pBorderValue, const IppiResizeYUV422Spec* pSpec, Ipp8u* pBuffer);

1450

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc
srcStep
pDst

Pointer to the source image.
Distance in bytes between starts of consecutive lines in thesource image buffer.
Pointer to the destination image.

dstStep

Distance in bytes between starts of consecutive lines in thedestination image buffer.

dstOffset

Offset of the tiled destination image with respect to the destination
image origin.

dstSize

Size of the destination image in pixels.

borderType of the border.

pBorderValue

Pointer to the constant value to assign to pixels of the constantborder. This parameter is applicable only to the ippBorderConst
border type.

pSpec

Pointer to the spec structure for the resize filter.

pBuffer

Pointer to the work buffer.

Description
This function changes an image size using the linear interpolation method. The image size can be either
reduced or increased in each direction, depending on the destination image size.
This function operates with ROI (see ROI Processing in Geometric Transforms). It resizes the source image
ROI origin to the destination image ROI origin. The destination image ROI origin must be defined by thefollowing parameters: the offset of the tiled destination image with respect to the destination image origin
and the destination image size. The source image ROI origin is defined automatically. To obtain the source
image ROI origin offset, call the ippiResizeYUV422GetSrcOffset function. The source and destination
images are in the YUY2 pixel format (Y0U0Y1V0,Y2U1Y3V1,.. or Y0Cb0Y1Cr0,Y2Cb1Y3Cr1,..).
Supported values for border are ippBorderRepl and ippBorderInMem.
The interpolation algorithm applied uses edge pixels of the source image that are out of the ROI. The
function ippiResizeYUV422Linear uses the weighted values of these outer pixels in calculation. To obtainthe size of the out of the ROI source image, call the function ippiResizeYUV422GetBorderSize .
If the border type is equal to ippBorderRepl, the source image edge pixels are replicated out of the ROI. If
the border type is equal to ippBorderInMem, the outer pixels are obtained from the out of the ROI image
space.
Prior to using the ippiResizeYUV422Linear function, initialize the IppiResizeYUV422Spec structure bycalling the ippiResizeYUV422LinearInit and compute the size of the external buffer pBuffer by callingthe ippiResizeYUV422GetBufSize for the corresponding flavor.

1451

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the specified pointers is NULL.

ippStsBorderErr

Indicates a warning if width or height of the destination image
is equal to zero.
Indicates an error if the border value is illegal.

ippStsContextMatchErr

Indicates an error if pointer to the spec structure is invalid.

ippStsSizeWrn

Indicates a warning in the following cases:

ippStsNoOperation• if width of the destination image is odd,
• if the destination image size is more than the destination image
origin.

ippStsMisalignedOffsetErr
ippStsSizeErr

ippStsOutOfRangeErr

Indicates an error if the x field of the dstOffset parameter is odd.

Indicates an error if width of the destination image is equal to1, or if width or height of the source or destination image isnegative.
Indicates an error if the destination image offset point is outside thedestination image origin.

Warp Functions with Prior Initialization
This section describes the Intel® IPP warping functions that use the specification structure in operation.
Before using these functions, you need to initialize the structure.
Using Intel® IPP Warp Affine Functions with Prior Initialization
You can use one of the following approaches to image warping:••

Warping the whole image
Warping a tiled image with one prior initialization

Interpolation algorithms of the Nearest Neighbor, Linear, and Cubic types can use edge pixels of the source
image that are out of the image origin. When calling the ippiWarpAffine<Filter> function with one ofthese interpolation algorithms applied, you need to specify the appropriate border type. The following bordertypes are supported:
•
•
•
•
•

Replicated borders: border pixels are replicated from the source image boundary pixels
Constant border: values of all border pixels are set to a constantTransparent borders: destination pixels that have inverse transformed location out of the source image
are not processed
Borders in memory: the source image border pixels are obtained from the source image pixels in memory
Mixed borders: combination of transparent borders and borders in memory is applied

Warping the Whole Image
You can follow the approach described below to apply affine transformation when source and destination
images are fully accessible in memory. However, this method only runs on a single thread.
To transform the whole image:1.

Call the WarpAffineGetSize function with the appropriate interpolation type. This function uses sourceand destination image sizes to calculate how much memory must be allocated for the IppWarpSpec
structure and work buffer.

1452

Developer Guide and Reference for Intel® Integrated Performance Primitives

2.

3.
4.
5.

1

Initialize the IppWarpSpec structure by calling the ippiWarp<Filter>Init, where <Filter> can takeone of the following values: Nearest, Linear, and Cubic. These prerequisite steps enable calling thewarp functions multiple times without recalculations.
Call the WarpGetBufferSize function for the initialized IppWarpSpec structure. This function uses thedestination image size to calculate how much memory must be allocated for the warp work buffer.
Call ippiWarpAffine<Filter> with the appropriate image type.
Specify the algorithm for borders processing by setting the borderType and pBorderValueparameters when initializing the IppiWarpSpec structure. The data type of pBorderValue is
automatically converted from Ipp64f to the data type of the processed images. The function supports
the following algorithms for borders processing:
•
•
•

•

•

If the border type is equal to ippBorderRepl, the source image outer pixels are replicated from theedge pixels.
If the border type is equal to ippBorderConst, the outer pixels are set to the constant value
specified in pBorderValue.
If the border type is equal to ippBorderTransp, destination image pixels mapped to the outersource image pixels are not changed. The outer pixels are replicated from the edge pixels, if they
are required by interpolation algorithm.
If the border type is equal to ippBorderInMem, destination image pixels mapped to the outer source
image pixels are not changed. The outer pixels are obtained from the out of of the source image
origin space, if they are required by interpolation algorithm.
The mixed border types can be obtained by the bitwise operation OR between ippBorderTransp
and the ippBorderInMemTop, ippBorderInMemBottom, ippBorderInMemLeft,
ippBorderInMemRight values.

Figure Whole Image Warping shows a simple image affine transformation example. Transformation
coefficients are {{1.0, 0.5, 0.0}, {0.5, 1.0, 0.0}}, border type is ippBorderConst, pBorderValue is awhite color pixel. The size of the destination image is 1.2x of the source image size.
Whole Image Warping

1453

1

Intel® Integrated Performance Primitives Developer Guide and Reference

ExampleThe code example below demonstrates affine transformation of the whole image with the linear interpolation
method:IppStatus warpAffineExample_8u_C3R(Ipp8u* pSrc, IppiSize srcSize, Ipp32s srcStep, Ipp8u* pDst,
IppiSize dstSize,
Ipp32s dstStep, const double coeffs[2][3]){IppiWarpSpec* pSpec = 0;
int specSize = 0, initSize = 0, bufSize = 0; Ipp8u* pBuffer = 0;
const Ipp32u numChannels = 3;
IppiPoint dstOffset = {0, 0};
IppStatus status = ippStsNoErr;
IppiBorderType borderType = ippBorderConst;
IppiWarpDirection direction = ippWarpForward;
Ipp64f pBorderValue[numChannels];for (int i = 0; i < numChannels; ++i) pBorderValue[i] = 255.0;/* Spec and init buffer sizes */status = ippiWarpAffineGetSize(srcSize, dstSize, ipp8u, coeffs, ippLinear, direction,
borderType, &specSize, &initSize);if (status != ippStsNoErr) return status;/* Memory allocation */pSpec = (IppiWarpSpec*)ippsMalloc_8u(specSize);if (pSpec == NULL){
return ippStsNoMemErr;}/* Filter initialization */status = ippiWarpAffineLinearInit(srcSize, dstSize, ipp8u, coeffs, direction, numChannels,borderType, pBorderValue, 0, pSpec);
if (status != ippStsNoErr){
ippsFree(pSpec);
return status;}/* work buffer size */status = ippiWarpGetBufferSize(pSpec, dstSize, &bufSize);if (status != ippStsNoErr){
ippsFree(pSpec);
return status;}
pBuffer = ippsMalloc_8u(bufSize);if (pBuffer == NULL){
ippsFree(pSpec);
return ippStsNoMemErr;}

1454

Developer Guide and Reference for Intel® Integrated Performance Primitives

1/* Resize processing */status = ippiWarpAffineLinear_8u_C3R(pSrc, srcStep, pDst, dstStep, dstOffset, dstSize,pSpec, pBuffer);
ippsFree(pSpec);
ippsFree(pBuffer);
return status;}

Warping a Tiled Image with One Prior Initialization
You can follow the approach described below to apply affine transformation when the source image is fully
accessible in memory and destination image is not fully accessible in memory, or to improve performance of
warping by external threading.
The main difference between this approach and whole image warping is that the image is split into sections
called tiles. Each call of the WarpAffine<Filter> function works with the destination image origin region ofinterest (ROI) that is defined by dstRoiOffset and dstRoiSize parameters. The destination ROI must be
fully accessible in memory.
To resize an image with the tiled approach:
1.

2.
3.

4.
5.

Call the WarpAffineGetSize function with the appropriate interpolation type. This function uses the sizeof the source and destination images and transformation parameters to calculate how much memory
must be allocated for the IppWarpSpec structure and initialization work buffer.
Initialize the IppWarpSpec structure by calling ippiWarpAffine<Filter>Init, where <Filter> cantake one of the following values: Nearest, Linear, and Cubic.
Determine an appropriate partitioning scheme to divide the destination image into tiles. Tiles can besets of rows or a regular grid of subimages. A simple vertical subdivision into sets of lines is sufficient inmost cases.
Call the WarpGetBufferSize function to obtain the size of the work buffer required for each tile
processing. The dstRoiSize parameter must be equal to the tile size.
Call ippiWarpAffine<Filter> for each tile (ROI). The dstRoiOffset parameter must specify theimage ROI offset with respect to the destination image origin. The dstRoiSize parameter must be
equal to the ROI size. The pDst parameter must point to the beginning of the destination ROI in
memory. The source and destination ROIs must be fully accessible in memory.
You can process tiles in any order. When using multiple threads you can process all tiles simultaneously.

1455

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Figure Tiled Image Warping shows the affine transformation of the image divided into tiles. Transformation
coefficients are {{1.0, 0.5, 0.0}, {0.5, 1.0, 0.0}}, applied border type is ippBorderConst, pBorderValue isa white color pixel. The size of the destination image is 1.2x of the source image size.
Tiled Image Warping

ExampleThe code example below demonstrates a multithreading affine transformation using OpenMP* withparallelization only in y direction:

IppStatus tileWarpAffineExample_C3R(Ipp8u* pSrc, IppiSize srcSize, Ipp32s srcStep, Ipp8u* pDst,
IppiSize dstSize, Ipp32s dstStep, const double coeffs[2][3]){IppiWarpSpec* pSpec = 0;
int specSize = 0, initSize = 0, bufSize = 0; Ipp8u* pBuffer = 0;
Ipp8u* pInitBuf = 0;
const Ipp32u numChannels = 3;
IppiPoint dstOffset = {0, 0};
IppiPoint srcOffset = {0, 0};
IppStatus status = ippStsNoErr;
IppiBorderType borderType = ippBorderConst;
IppiWarpDirection direction = ippWarpForward;
int numThreads, slice, tail;int bufSize1, bufSize2;
IppiSize dstTileSize, dstLastTileSize; IppStatus pStatus[MAX_NUM_THREADS];
Ipp64f pBorderValue[numChannels];for (int i = 0; i < numChannels; ++i) pBorderValue[i] = 255.0;/* Spec and init buffer sizes */status = ippiWarpAffineGetSize(srcSize, dstSize, ipp8u, coeffs, ippLinear, direction,
borderType, &specSize, &initSize);if (status != ippStsNoErr) return status;/* Memory allocation */pSpec = (IppiWarpSpec*)ippsMalloc_8u(specSize);if (pSpec == NULL){
return ippStsNoMemErr;
1456

Developer Guide and Reference for Intel® Integrated Performance Primitives

1}/* Filter initialization */status = ippiWarpAffineLinearInit(srcSize, dstSize, ipp8u, coeffs, direction, numChannels,borderType, pBorderValue, 0, pSpec);
if (status != ippStsNoErr){
ippsFree(pSpec);
return status;}/* General transform function *//* Parallelized only by Y-direction here */#pragma omp parallel num_threads(MAX_NUM_THREADS){#pragma omp master{
numThreads = omp_get_num_threads();
slice = dstSize.height / numThreads; tail= dstSize.height % numThreads;

dstTileSize.width = dstLastTileSize.width = dstSize.width;
dstTileSize.height = slice;
dstLastTileSize.height = slice + tail;ippiWarpGetBufferSize(pSpec, dstTileSize, &bufSize1);
ippiWarpGetBufferSize(pSpec, dstLastTileSize, &bufSize2);
pBuffer = ippsMalloc_8u(bufSize1 * (numThreads - 1) + bufSize2);}#pragma omp barrier{if (pBuffer){
Ipp32u i;
Ipp8u *pDstT; Ipp8u *pOneBuf;
IppiPoint srcOffset = {0, 0};
IppiPoint dstOffset = {0, 0};
IppiSize srcSizeT = srcSize; IppiSize

dstSizeT = dstTileSize;i = omp_get_thread_num();
dstSizeT.height = slice; dstOffset.y += i * slice;
if (i == numThreads - 1) dstSizeT = dstLastTileSize;
pDstT = (Ipp8u*)((char*)pDst + dstOffset.y * dstStep);
pOneBuf = pBuffer + i * bufSize1;
pStatus[i] = ippiWarpAffineLinear_8u_C3R (pSrc, srcStep, pDstT, dstStep,
dstOffset, dstSizeT, pSpec, pOneBuf);
}
}
}

1457

1

Intel® Integrated Performance Primitives Developer Guide and Reference

ippsFree(pSpec);
if (pBuffer == NULL) return ippStsNoMemErr;
ippsFree(pBuffer);for (Ipp32u i = 0; i < numThreads; ++i){/* Return bad status */if(pStatus[i] != ippStsNoErr) return pStatus[i];}return status;}

See Also
User-defined Border Types
WarpAffineGetSize Computes the size of the specification structure and the size of the external
work buffer for the warp affine transform.
WarpGetBufferSize Computes the size of the work buffer for the warp transform.
Edge Smoothing
The Smooth Edge feature is an artificial method to reduce aliasing artifacts at the transformed source image
edges. Aliasing artifacts may appear because the transformation algorithms skip a destination pixel if its
source origin is out of the source image ROI. Thus, borders of the transformed source image can look
stepped:If the smoothEdge flag is set, destination pixels that are closest to the transformed source image edges are
mixed with sampled source pixels by the following formula:

dstRes=srcSampled*(1-a)+dstExist*a
where
•
•
•

srcSampled is the intensity of the source pixel after transformation.
dstExist is the intensity of the destination pixel before transformation.
a is the weight of the outer pixel; set by the function.

1458

Developer Guide and Reference for Intel® Integrated Performance Primitives•

1

dstRes is the intensity of the resulting destination pixel.

The edge smoothing method is not universal: in some cases it can improve the image, but in other cases it
can be inefficient. For example, edge smoothing does not increase the quality of images with high contrast
borders, and it is not recommended to apply edge smoothing to such images.
NOTE
Edge smoothing is a post-processing operation: it is performed after transformation. When warping atiled image, artifacts may appear on tile borders. In this case, edges are not smoothed.

GetAffineQuad
Computes vertex coordinates of the quadrangle, towhich the source ROI rectangle is mapped by theaffine transform.

SyntaxIppStatus ippiGetAffineQuad (IppiRect srcRoi, double quad[4][2], const double coeffs[2][3]);IppStatus ippiGetAffineQuad_L(IppiRectL srcRoi , double quad[4][2], const double
coeffs[2][3]);Include Files
ippi.h
Flavors with the _L suffix: ippi_l.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
srcRoiquad

coeffsRegion of interest in the source image (of the IppiRect type).
Output array. Contains vertex coordinates of the quadrangle, towhich the source ROI is mapped by the affine transformfunction.
The given affine transform coefficients.

Description
This function operates with ROI (see ROI Processing in Geometric Transforms).
This function is used as a support function for WarpAffineNearest, WarpAffineLinear, and WarpAffineCubic
functions. It computes vertex coordinates of the quadrangle, to which the source rectangular ROI is mappedby the affine transform function using the given coefficients coeffs.
The first dimension [4] of the array quad[4][2] is equal to the number of vertices, and the second
dimension [2] means x and y coordinates of the vertex. Quadrangle vertices have the following meaning:

quad[0] corresponds to the transformed top-left corner of the source ROI,
quad[1] corresponds to the transformed top-right corner of the source ROI,
quad[2] corresponds to the transformed bottom-right corner of the source ROI,
quad[3] corresponds to the transformed bottom-left corner of the source ROI.
1459

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsCoeffErr

Indicates an error condition if c00*c11 - c01*c10 = 0.

ippStsSizeErr

Indicates an error condition if srcRoi has a size field with zeroor negative value.

GetAffineBound
Computes the bounding rectangle for the source ROI
transformed by the ippiWarpAffine function.

SyntaxIppStatus ippiGetAffineBound (IppiRect srcRoi, double bound[2][2], const double
coeffs[2][3]);Include Files
ippi.h
Flavors with the _L suffix: ippi_l.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
srcRoiboundcoeffsRegion of interest in the source image (of the IppiRect type).
Output array. Contains vertex coordinates of the bounding
rectangle for the transformed source ROI.
The given affine transform coefficients.

Description
This functionis used as a support function for WarpAffineNearest, WarpAffineLinear, and WarpAffineCubic
functions. It computes vertex coordinates of the smallest bounding rectangle for the quadrangle quad, towhich the source ROI is mapped by the affine transform function using coefficientscoeffs.

bound[0] specifies x, y coordinates of the top-left corner, bound[1] specifies x, y coordinates of thebottom-right corner.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error or awarning.

ippStsCoeffErr

Indicates an error condition if c00*c11 - c01*c10 = 0.

ippStsSizeErr

Indicates an error condition if srcRoi has a size field with zeroor negative value.

GetAffineSrcRoi
Computes ROI of an image for affine transform.

1460

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

SyntaxIppStatus ippiGetAffineSrcRoi (IppiSize srcSize, const double coeffs[2][3],IppiWarpDirection direction, IppiPoint dstRoiOffset, IppiSize dstRoiSize, IppiRect*srcRoi);

Include Files
ippi.h
Flavors with the _L suffix: ippi_l.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
srcSize

Size of the source image, in pixels.

coeffsCoefficients for affine transform.

direction

Transformation direction. Supported values:
ippWarpForward

Forward transformation.

ippWarpBackward

Backward transformation.

dstRoiSize

Size of the ROI of destination image.

dstRoiOffset

Offset of the destination image ROI.

srcRoi

Pointer to the computed region of interest in the source image.

Description
This function operates with ROI (see ROI Processing in Geometric Transforms).
This function is used as a support function for the ippiWarpAffineLinear, WarpAffineNearest, and
WarpAffineCubic functions. It computes ROI of the source image to perform affine transformation for a given
destination ROI. To process the given destination ROI, the computed source ROI with borders must beaccessible in memory. If the source ROI outside pixels are out of the source image origin, the border pixels
are processed according to the border flag that is passed to the ippiWarpAffineLinear,
WarpAffineNearest, and WarpAffineCubic functions.

Return Values
ippStsNoErr
ippStsRectErr
ippStsOutOfRangeErr
ippStsSizeErr
ippStsWrongIntersetQuad

Indicates no error. Any other value indicates an error or
warning.
Indicates an error condition if width or height of the srcRoi isless than or equal to 1.
Indicates an error if the destination image offset has a fieldwith a negative value.
Indicates an error condition if width or height of the source ordestination image is less than, or equal to zero.
Indicates a warning that no operation is performed because thetransformed source image has no intersection with thedestination ROI.

1461

1

Intel® Integrated Performance Primitives Developer Guide and ReferenceippStsNullPtrErr

Indicates an error if one of the specified pointers is NULL.

ippStsWarpDirectionErr

Indicates an error when the direction value is illegal.

ippStsCoefErr

Indicates an error condition, if affine transformation is singular.

GetAffineTransform
Computes affine transform coefficients to map thesource ROI to the quadrangle with the specified vertex
coordinates

SyntaxIppStatus ippiGetAffineTransform (IppiRect srcRoi, const double quad[4][2], double
coeffs[2][3]);Include Files
ippi.h
Flavors with the _L suffix: ippi_l.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
srcRoiquad
coeffsRegion of interest in the source image (of the IppiRect type).
Vertex coordinates of the quadrangle, to which the source ROI
is mapped by the affine transform function.
Output array. Contains the target affine transform coefficients.

Description
This function operates with ROI (see ROI Processing in Geometric Transforms).
This function is used as a support function for the ippiWarpAffineLinear, WarpAffineNearest, and
WarpAffineCubic functions. It computes the coefficients coeffs of the affine transform that must be used by
the warping function to map the source rectangular ROI to the quadrangle with the specified vertex
coordinates quad. The first dimension [4] of the array quad[4][2] is equal to the number of vertices, and thesecond dimension [2] means x and y coordinates of the vertex. Quadrangle vertices have the following
meaning:quad[0] corresponds to the transformed top-left corner of the source ROI, quad[1] corresponds to thetransformed top-right corner of the source ROI, quad[2] corresponds to the transformed bottom-right cornerof the source ROI, quad[3] corresponds to the transformed bottom-left corner of the source ROI.
The function computes the coordinates of the 4th vertex of the destination quadrangle that uniquely depends
on the three other vertices. If the computed coordinates are not equal to the ones specified in quad, thefunction returns the warning message and continues operation with the computed values.

Return Values
ippStsNoErr

1462

Indicates no error. Any other value indicates an error or
warning.

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

ippStsRectErr
ippStsCoeffErr
ippStsSizeErr
ippStsAffineQuadChanged

Indicates an error condition if width or height of the srcRoi isless than or equal to 1.
Indicates an error condition if c00*c11 - c01*c10 = 0.
Indicates an error condition if srcRoi has a size field with zeroor negative value.
Indicates a warning that coordinates of the 4th vertex of thespecified quadrangle quad are not correct.

GetRotateTransform
Computes the affine coefficients for the rotationtransform.

SyntaxIppStatus ippiGetRotateTransform(double angle, double xShift, double yShift, double
coeffs[2][3]);Include Files
ippi.h
Flavors with the _L suffix: ippi_l.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
angle
xShift, yShiftcoeffsAngle of rotation, in degrees. The source image is rotatedcounterclockwise around the origin (0, 0).
Shift along horizontal (x) or vertical (y) axis that is performed
after rotation.
Computed affine transform coefficients for the given rotation
parameters.

Description
This function computes the coefficients for the affine transform that rotates an image by the specified angle
around the origin (0, 0) and shifts the image after rotation. The result is stored in the coeffs parameter.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsSizeErr

Indicates an error when one of the coeffs values is NULL.

ippStsOutOfRangeErr

Indicates an error when angle is not-a-number (NaN) or
infinity.

ExampleGetRotateShift

1463

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Computes shift values for rotation of an image aroundthe specified center.

SyntaxIppStatus ippiGetRotateShift (double xCenter, double yCenter, double angle, double*
xShift, double* yShift);

Include Files
ippi.h
Flavors with the _L suffix: ippi_l.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
xCenter, yCenter

Coordinates of the required center of rotation.

angle

The angle in degrees to rotate the image clockwise around thepoint with coordinates (xCenter, yCenter).

xShift, yShift

Pointers to computed shift values along horizontal and verticalaxes. These shift values should be passed to ippiRotate
function to bring about the desired rotation around (xCenter,
yCenter).

Description
Use this function if you need to rotate an image about an arbitrary center (xCenter, yCenter) rather thanthe origin (0,0). The function helps compute shift values xShift, yShift that should be passed to thewarping function for the rotation around (xCenter, yCenter) to take place.
Example shows how to use the function ippiGetRotateShift.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if xShift or yShift pointer is NULL.

WarpAffineGetSize
Computes the size of the specification structure andthe size of the external work buffer for the warp affine
transform.

SyntaxIppStatus ippiWarpAffineGetSize(IppiSize srcSize, IppiSize dstSize, IppDataTypedataType, const double coeffs[2][3], IppiInterpolationType interpolation,
IppiWarpDirection direction, IppiBorderType borderType, int* pSpecSize, int*
pInitBufSize);

Include Files
ippi.h
Flavors with the _L suffix: ippi_l.h1464

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
srcSize

Size of the source image, in pixels.

dstSize

Size of the destination image, in pixels.

dataTypecoeffsinterpolation
direction

Data type of the source and destination images.
Supported values: ipp8u, ipp16u, ipp16s,
ipp32f, and ipp64f.
Coefficients for the affine transform.
Interpolation method. Supported values:

ippNearest, ippLinear, andippCubic.

Transformation direction. Supported values:
ippWarpForward Forward transformation
ippWarpBackwar Backward transformationdborderType

Type of border. Possible values are:ippBorderConst Values of all border pixels are

set to constant.
ippBorderRepl Border is replicated from theedge pixels.
Outer
pixels are not
ippBorderTransprocessed.
pippBorderInMem Border is obtained from thesource image pixels inmemory.

Mixed borders are also supported. They can beobtained by the bitwise operation OR between
ippBorderTransp and the ippBorderInMemTop,
ippBorderInMemBottom, ippBorderInMemLeft,
ippBorderInMemRight values.

pSpecSize
pInitBufSize

Pointer to the size, in bytes, of the specification
structure.
Pointer to the size, in bytes, of the temporary
buffer.

Description
This function computes the size of the specification structure and the external work buffer for the following
functions, depending on the interpolation parameter: WarpAffineNearestInit, WarpAffineLinearInit, or
WarpAffineCubicInit.

Return Values
ippStsNoErr

Indicates no error.

1465

1

Intel® Integrated Performance Primitives Developer Guide and ReferenceippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsNoOperation

Indicates a warning if width or height of any image is zero.

ippStsDataTypeErr

Indicates an error If the width or height of the source ordestination image is less than, or equal to one.
Indicates an error when dataType has an illegal value.

ippStsWarpDirectionErr

Indicates an error when direction has an illegal value.

ippStsInterpolationErr

Indicates an error when interpolation has an illegal value.

ippStsNotSupportedModeErr

Indicates an error if the requested mode is not supported.

ippStsCoeffErr

Indicates an error when affine transformation is singular.

ippStsBorderErr

Indicates an error when borderType has an illegal value.

ippStsSizeErr

ippStsWrongIntersectQuad

ippStsExceededSizeErr

Indicates a warning that no operation is performed if thetransformed source image extended with borders has nointersection with the destination image.
Indicates an error in the following cases:• If one of the calculated sizes exceeds maximum of the pSpecSize
variable data type positive value (the size of one of the processed
images is too large).
• If width or height of the destination image or the source image
exceeds 33554431 (0x1FFFFFF) .

See Also
WarpAffineNearestInit Initializes the specification structure for image affine warping with thenearest neighbor interpolation method.
WarpAffineLinearInit Initializes the specification structure for image affine warping with the linear
interpolation method.
WarpAffineCubicInit Initializes the specification structure for image affine warping with the cubic
interpolation method.
WarpQuadGetSize
Computes the size of the specification structure andthe size of the temporary buffer for warping an
arbitrary quadrangle in the source image to thequadrangle in the destination image.

SyntaxIppStatus ippiWarpQuadGetSize(IppiSize srcSize, const double srcQuad[4][2], IppiSize
dstSize, const double dstQuad[4][2], IppiWarpTransformType transform, IppDataTypedataType, IppiInterpolationType interpolation, IppiBorderType borderType, int*
pSpecSize, int* pInitBufSize);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

1466

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Parameters
srcSize

Size of the source image, in pixels.

srcQuadQuadrangle in the source image.

dstSize

Size of the destination image, in pixels.

dstQuadQuadrangle in the destination image.

transform

Type of the warp tranform. Supported values:

dataTypeinterpolation
borderType

ippWarpAffine

Affine warping

ippWarpPerspective

Perspective warping

Data type of the source and destination images. Supported
values: ipp8u, ipp16u, ipp16s, and ipp32f.
Interpolation method. Supported values: ippNearest,

ippLinear, andippCubic.

Type of border. Supported values:
ippBorderTransp

Outer pixels are not processed.

ippBorderInMem

Border is obtained from the source
image pixels in memory.

pSpecSize

Pointer to the size, in bytes, of the specification structure.

pInitBufSize

Pointer to the size, in bytes, of the temporary buffer.

Description
This function computes the size of the specification structure and the temporary buffer for the following
functions, depending on the interpolation parameter: ippiWarpQuadNearestInit,
ippiWarpQuadLinearInit, or ippiWarpQuadCubicInit.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error in the following cases:• If the width or height of the source or destination image is lessthan, or equal to one.

• If one of the calculated sizes exceeds the maximum positive 32-bit
signed integer value. The size of the one of the processed images
is too large.

ippStsDataTypeErr

Indicates an error when dataType has an illegal value.

ippStsWarpTransformErr

Indicates an error when transform has an illegal value.

ippStsInterpolationErr

Indicates an error when interpolation has an illegal value.

ippStsQuadErr
ippStsWrongIntersectQuad

Indicates an error when any of the given quadrangles is nonconvex or degenerates into a triangle, line, or point.
Indicates a warning that no operation is performed if thetransformed source image extended with borders has nointersection with the destination image.

1467

1

Intel® Integrated Performance Primitives Developer Guide and ReferenceippStsAffineQuadChanged

ippStsBorderErr

Indicates a warning when coordinates of the fourth vertex of
dstQuad are changed by the function, if transform is set to
ippWarpAffine.
Indicates an error when borderType has an illegal value.

See Also
WarpQuadNearestInit Initializes the specification structure for warping an arbitrary quadrangle inthe source image to the quadrangle in the destination image with the nearest neighborinterpolation method.
WarpQuadLinearInit Initializes the specification structure for warping an arbitrary quadrangle inthe source image to the quadrangle in the destination image with the linear interpolation method.
WarpQuadCubicInit Initializes the specification structure for warping an arbitrary quadrangle inthe source image to the quadrangle in the destination image with the cubic interpolation method.
WarpGetBufferSize
Computes the size of the work buffer for the warp
transform.

SyntaxIppStatus ippiWarpGetBufferSize(const IppiWarpSpec* pSpec, IppiSize dstRoiSize, int*
pBufSize);

Include Files
ippi.h
Flavors with the _L suffix: ippi_l.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSpec

Pointer to the specification structure for the warp operation.

dstRoiSize

Size of the processed destination image ROI, in pixels.

pBufSize

Pointer to the size of the external buffer, in bytes.

Description
This function computes the size of the external buffer for the warp transform. The specification structure
pointed by pSpec defines the warp algorithm parameters.
Before using this function, you need to initialize the specification structure using one of the following
functions: WarpAffineNearestInit, WarpAffineLinearInit, or WarpAffineCubicInit.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsContextMatchErr

Indicates an error when the specification structure is invalid.

ippStsSizeErr

Indicates an error in the following cases:

1468

Developer Guide and Reference for Intel® Integrated Performance Primitives

1• If width or height of the destination image is negative, or equal tozero.

• If the calculated buffer size exceeds the maximum positive
pBufSize data type. The size of the processed image ROI is toolarge.

ippStsSizeWrn

Indicates a warning when the size of the destination image ismore than the size of the destination image origin.

See Also
WarpAffineNearestInit Initializes the specification structure for image affine warping with thenearest neighbor interpolation method.
WarpAffineLinearInit Initializes the specification structure for image affine warping with the linear
interpolation method.
WarpAffineCubicInit Initializes the specification structure for image affine warping with the cubic
interpolation method.
WarpAffineNearestInit
Initializes the specification structure for image affine
warping with the nearest neighbor interpolation
method.

SyntaxIppStatus ippiWarpAffineNearestInit(IppiSize srcSize, IppiSize dstSize, IppDataTypedataType, const double coeffs[2][3], IppiWarpDirection direction, int numChannels,
IppiBorderType borderType, const Ipp64f* pBorderValue, int smoothEdge, IppiWarpSpec*
pSpec);

Include Files
ippi.h
Flavors with the _L suffix: ippi_l.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
srcSize

Size of the source image, in pixels.

dstSize

Size of the destination image, in pixels.

dataType

Data type of the source and destination images.
Supported values: ipp8u, ipp16u, ipp16s,
ipp32f, and ipp64f.

coeffsCoefficients for the affine transform.

direction

Transformation direction. Supported values:
ippWarpForward Forward transformation
ippWarpBackwar Backward transformation
d

1469

1

Intel® Integrated Performance Primitives Developer Guide and Reference

numChannels
borderType

Number of channels in the image. Supported
values: 1, 3, or 4.
Type of border. Supported values:
ippBorderConst Values of all border pixels are

set to a constant.
Borderis replicated from theippBorderRepl
edge pixels.
ippBorderTrans Outer pixels are notprocessed.
pippBorderInMem Border is obtained from thesource image pixels inmemory.

Mixed borders are also supported. They can beobtained by the bitwise operation OR between
ippBorderTransp and the ippBorderInMemTop,
ippBorderInMemBottom, ippBorderInMemLeft,
ippBorderInMemRight values.

pBorderValuesmoothEdge

Pointer to the constant value to assign to pixels of theconstant border. This parameter is applicable only tothe ippBorderConst border type.

Flag for edge smoothing. Supported values:• 0 - transformation without edge smoothing.
• 1 - transformation with edge smoothing. Thisfeature is supported only for theippBorderTransp and ippBorderInMem bordertypes.

pSpec

Pointer to the specification structure.

Description
This function initializes the IppiWarpSpec structure for the ippiWarpAffineNearest function that performs
warp affine transformation with the nearest neighbor interpolation method. To compute the size of thespecification structure, use the WarpAffineGetSize function.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when:• one of the specified pointers is NULL, excepting pBorderValue• pBorderValue is NULL when border type is set to
ippBorderConst

ippStsNoOperation

Indicates a warning if width or height of any image is zero.

ippStsDataTypeErr

Indicates an error when width or height of the source ordestination image is less than, or equal to one.
Indicates an error when dataType has an illegal value.

ippStsWarpDirectionErr

Indicates an error when direction has an illegal value.

ippStsSizeErr

1470

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

ippStsCoeffErr
ippStsWrongIntersectQuad

Indicates an error when affine transformation is singular.
Indicates a warning that no operation is performed if thetransformed source image extended with borders has nointersection with the destination image. The edge smoothing
feature is not supported for the ippBorderRepl andippBorderConst border types.

ippStsNotSupportedModeErr

Indicates an error when the requested mode is not supported.

ippStsBorderErr

Indicates an error when borderType has an illegal value.

ippStsNumChannelsErr

Indicates an error when numChannels has an illegal value.

ippStsExceededSizeErr

Indicates an error if width or height of the destination image or
the source image exceeds 33554431 (0x1FFFFFF).

See Also
WarpAffineGetSize Computes the size of the specification structure and the size of the external
work buffer for the warp affine transform.
WarpQuadNearestInit
Initializes the specification structure for warping an
arbitrary quadrangle in the source image to thequadrangle in the destination image with the nearest
neighbor interpolation method.

SyntaxIppStatus ippiWarpQuadNearestInit(IppiSize srcSize, const double srcQuad[4][2],IppiSize dstSize, const double dstQuad[4][2], IppiWarpTransformType transform,
IppDataType dataType, int numChannels, IppiBorderType borderType, const Ipp64f*
pBorderValue, int smoothEdge, IppiWarpSpec* pSpec);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
srcSize

Size of the source image, in pixels.

srcQuadQuadrangle in the source image.

dstSize

Size of the destination image, in pixels.

dstQuadQuadrangle in the destination image.

transform

Type of the warp tranform. Supported values:

dataType

ippWarpAffine

Affine warping

ippWarpPerspective

Perspective warping

Data type of the source and destination images. Supported
values: ipp8u, ipp16u, ipp16s, and ipp32f.

1471

1

Intel® Integrated Performance Primitives Developer Guide and Reference

numChannels

Number of channels in the image. Supported values: 1, 3, or 4.

borderType

Type of border. Supported values:
ippBorderTransp

Outer pixels are not processed.

ippBorderInMem

Border is obtained from the source
image pixels in memory.

pBorderValue

Pointer to the constant value to assign to pixels of the constant border.
This parameter is applicable only to the ippBorderConst border type.

smoothEdge

Flag for edge smoothing. Supported values:• 0 - transformation without edge smoothing.
• 1 - transformation with edge smoothing.

pSpec

Pointer to the specification structure.

Description
This function initializes the IppiWarpSpec structure for warping an arbitrary quadrangle in the source image
to quadrangle in the destination image with the nearest neighbor interpolation method. To compute the sizeof the specification structure, use the WarpQuadGetSize function.
Transformation coefficients are computed internally, based on the mapping of the source quadrangle to thespecified destination quadrangle dstQuad and transform type transform. In case of affine transform, thefunction computes the coordinates of the fourth vertex of the destination quadrangle that uniquely depends
on the three other vertices. If the computed coordinates are not equal to the corresponding values specified
in dstQuad, the function returns the warning message and continues initialization with the computed values.
The first dimension [4] of the array specifying the quadrangle srcQuad[4][2] or dstQuad[4][2] is equal to
the number of vertices, and the second dimension [2] contains the x and y coordinates of the vertex.
You can apply the edge smoothing feature only if the source quadrangle entirely lies in the source image.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when:• One of the specified pointers is NULL, excepting pBorderValue• The value of pBorderValue is NULL when the border type is set to
ippBorderConst

ippStsDataTypeErr

Indicates an error when width or height of the source ordestination image is less than, or equal to one.
Indicates an error when dataType has an illegal value.

ippStsWarpTransformErr

Indicates an error when transform has an illegal value.

ippStsSizeErr

ippStsQuadErr
ippStsWrongIntersectQuad

ippStsAffineQuadChanged

1472

Indicates an error when any of the given quadrangles is nonconvex or degenerates into a triangle, line, or point.
Indicates a warning that no operation is performed if thetransformed source image extended with borders has nointersection with the destination image.
Indicates a warning when coordinates of the fourth vertex of
dstQuad are changed by the function, if transform is set to
ippWarpAffine.

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

ippStsBorderErr

Indicates an error when borderType has an illegal value.

ippStsNumChannelsErr

Indicates an error when numChannels has an illegal value.

ExampleSee Also
WarpQuadGetSize Computes the size of the specification structure and the size of the temporary
buffer for warping an arbitrary quadrangle in the source image to the quadrangle in thedestination image.
WarpAffineNearest
Performs warp affine transformation of an image using
the nearest neighbor interpolation method.

SyntaxIppStatus ippiWarpAffineNearest_<mod>(const Ipp<datatype>* pSrc, int srcStep,
Ipp<datatype> pDst, int dstStep, IppiPoint dstRoiOffset, IppiSize dstRoiSize, const
IppiWarpSpec* pSpec, Ipp8u* pBuffer);
Supported values for mod:8u_C1R

16u_C1R

16s_C1R

32f_C1R

64f_C1R

8u_C3R

16u_C3R

16s_C3R

32f_C3R

64f_C3R

8u_C4R

16u_C4R

16s_C4R

32f_C4R

64f_C4R

Include Files
ippi.h
Flavors with the _L suffix: ippi_l.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc
srcStep
pDst

Pointer to the source image.
Distance, in bytes, between the starting points of consecutive
lines in the source image buffer.
Pointer to the destination image ROI.

dstRoiSize

Distance, in bytes, between the starting points of consecutive
lines in the destination image buffer.
Offset of the destination image ROI with respect to thedestination image origin.
Size of the destination image ROI, in pixels.

pSpec

Pointer to the specification structure for the warp operation.

dstStep
dstRoiOffset

1473

1

Intel® Integrated Performance Primitives Developer Guide and Reference

pBuffer

Pointer to the work buffer.

Description
This function transforms the source image pixel coordinates (x, y) according to the following formulas:x' = c00*x + c01*y + c02
y' = c10*x + c11*y + c12
where
•
•

x' and y' are the pixel coordinates in the transformed image
cij are the affine transform coefficients passed to the coeffs array during initialization

The affine warping is a general linear transform that incorporates such elementary transformations as
scaling, rotation, translation, stretching, and shearing. It always transforms parallel lines into parallel lines
and preserves equal distances between points on a line.
The WarpAffineNearest function operates with ROI. The transformed part of the image is resampled with
the nearest neighbor interpolation method and stored in the destination image ROI. You need to define thedestination image ROI origin by the following parameters: the offset of the destination ROI with respect tothe destination image origin and the destination image ROI size. The parameter pSrc must point to thesource image origin. The parameter pDst must point to the processed destination image ROI.
If you initialize the specification structure using the WarpQuadNearestInit function, the operations take place
only inside the specified source quadrangle srcQuad that is set in WarpQuadNearestInit.
To specify the algorithm for borders processing, set the borderType and pBorderValue parameters when
initializing the IppiWarpSpec structure. The data type of pBorderValue is automatically converted from
Ipp64f to the data type of the processed images. The function supports the following algorithms for borders
processing:•••If the border type is equal to ippBorderRepl, the source image outer pixels are replicated from the edge
pixels.
If the border type is equal to ippBorderConst, the outer pixels are set to the constant value specified in
pBorderValue.
If the border type is equal to ippBorderTransp or ippBorderInMem, destination image pixels mapped tothe outer source image pixels are not changed.

Before using the WarpAffineNearest function, you need to initialize the IppiWarpSpec structure using the
WarpAffineNearestInit function and compute the size of the external buffer pBuffer using the
WarpGetBufferSize function.
To compute the affine transform parameters, use the GetAffineQuad, GetAffineBound, and
GetAffineTransform functions.
For an example on how to use this function, refer to the WarpQuadNearestInit function description.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsBorderErr

Indicates a warning when width or height of the destination
image is equal to zero.
Indicates an error if border type has an illegal value.

ippStsContextMatchErr

Indicates an error when context data is invalid.

ippStsNotSupportedModeErr

Indicates an error when the requested mode is not supported.

ippStsNoOperation

1474

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

ippStsSizeErr

Indicates an error when width or height of the source or destination
image ROI is negative.

ippStsStepErr

Indicates an error when the step value is not a multiple of data type.

ippStsOutOfRangeErr

Indicates an error when the destination image offset point is outside
the destination image origin.

ippStsSizeWrn
ippStsWrongIntersectQuad

Indicates a warning when the destination image ROI size ismore than the destination image origin size.
Indicates a warning that no operation is performed if thedestination ROI has no intersection with the transformed
source image origin.

See Also
ROI Processing in Geometric Transforms
WarpAffineNearestInit Initializes the specification structure for image affine warping with thenearest neighbor interpolation method.
WarpQuadNearestInit Initializes the specification structure for warping an arbitrary quadrangle inthe source image to the quadrangle in the destination image with the nearest neighborinterpolation method.
WarpGetBufferSize Computes the size of the work buffer for the warp transform.
GetAffineBound Computes the bounding rectangle for the source ROI transformed by theippiWarpAffine function.
GetAffineQuad Computes vertex coordinates of the quadrangle, to which the source ROI
rectangle is mapped by the affine transform.
GetAffineTransform Computes affine transform coefficients to map the source ROI to thequadrangle with the specified vertex coordinates
WarpAffineLinearInit
Initializes the specification structure for image affine
warping with the linear interpolation method.

SyntaxIppStatus ippiWarpAffineLinearInit(IppiSize srcSize, IppiSize dstSize, IppDataTypedataType, const double coeffs[2][3], IppiWarpDirection direction, int numChannels,
IppiBorderType borderType, const Ipp64f* pBorderValue, int smoothEdge, IppiWarpSpec*
pSpec);

Include Files
ippi.h
Flavors with the _L suffix: ippi_l.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
srcSize

Size of the source image, in pixels.

dstSize

Size of the destination image, in pixels.

1475

1

Intel® Integrated Performance Primitives Developer Guide and Reference

dataType

Data type of the source and destination images.
Supported values: ipp8u, ipp16u, ipp16s,
ipp32f, and ipp64f.

coeffsCoefficients for the affine transform.

direction

Transformation direction. Supported values:
ippWarpForward Forward transformation
ippWarpBackwar Backward transformationdnumChannels
borderType

Number of channels in the image. Supported
values: 1, 3, or 4.
Type of border. Supported values:
ippBorderConst The outer pixels of the source

image are set to the constantvalue specified in
pBorderValue.

Border is replicated from theedge pixels.
ippBorderTrans Outer pixels are notprocessed.
pippBorderRepl

ippBorderInMem Border is obtained from thesource image pixels inmemory.

Mixed borders are also supported. They can beobtained by the bitwise operation OR between
ippBorderTransp and the ippBorderInMemTop,
ippBorderInMemBottom, ippBorderInMemLeft,
ippBorderInMemRight values.

pBorderValuesmoothEdge

Pointer to the constant value to assign to pixels of theconstant border. This parameter is applicable only tothe ippBorderConst border type.

Flag for edge smoothing. Supported values:• 0 - transformation without edge smoothing.
• 1 - transformation with edge smoothing. Thisfeature is supported only for theippBorderTransp and ippBorderInMem bordertypes.

pSpec

Pointer to the specification structure.

Description
This function initializes the IppiWarpSpec structure for the ippiWarpAffineLinear function that performs
warp affine transformation with the linear interpolation method. To compute the size of the specification
structure, use the WarpAffineGetSize function.

Return Values
ippStsNoErr

1476

Indicates no error.

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

ippStsNullPtrErr

Indicates an error when:• one of the specified pointers is NULL, excepting pBorderValue• pBorderValue is NULL when border type is set to
ippBorderConst

ippStsNoOperation

Indicates a warning if width or height of any image is zero.

ippStsDataTypeErr

Indicates an error when width or height of the source ordestination image is less than, or equal to one.
Indicates an error when dataType has an illegal value.

ippStsWarpDirectionErr

Indicates an error when direction has an illegal value.

ippStsCoeffErr

Indicates an error when affine transformation is singular.

ippStsSizeErr

ippStsWrongIntersectQuad

ippStsNotSupportedModeErr

Indicates a warning that no operation is performed if thetransformed source image extended with borders has nointersection with the destination image.
Indicates an error when the requested mode is not supported.
The edge smoothing feature is not supported for theippBorderRepl and ippBorderConst border types.

ippStsBorderErr

Indicates an error when borderType has an illegal value.

ippStsNumChannelsErr

Indicates an error when numChannels has an illegal value.

ippStsExceededSizeErr

Indicates an error if width or height of the destination image or
the source image exceeds 33554431 (0x1FFFFFF).

See Also
WarpAffineGetSize Computes the size of the specification structure and the size of the external
work buffer for the warp affine transform.
WarpQuadLinearInit
Initializes the specification structure for warping an
arbitrary quadrangle in the source image to thequadrangle in the destination image with the linear
interpolation method.

SyntaxIppStatus ippiWarpQuadLinearInit(IppiSize srcSize, const double srcQuad[4][2], IppiSize
dstSize, const double dstQuad[4][2], IppiWarpTransformType transform, IppDataTypedataType, int numChannels, IppiBorderType borderType, const Ipp64f* pBorderValue, intsmoothEdge, IppiWarpSpec* pSpec);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
srcSize

Size of the source image, in pixels.

1477

1

Intel® Integrated Performance Primitives Developer Guide and Reference

srcQuadQuadrangle in the source image.

dstSize

Size of the destination image, in pixels.

dstQuadQuadrangle in the destination image.

transform

Type of the warp tranform. Supported values:
ippWarpAffine

Affine warping

ippWarpPerspective

Perspective warping

dataType

Data type of the source and destination images. Supported
values: ipp8u, ipp16u, ipp16s, and ipp32f.

numChannels

Number of channels in the image. Supported values: 1, 3, or 4.

borderType

Type of border. Supported values:
ippBorderTransp

Outer pixels are not processed.

ippBorderInMem

Border is obtained from the source
image pixels in memory.

pBorderValue

Pointer to the constant value to assign to pixels of the constant border.
This parameter is applicable only to the ippBorderConst border type.

smoothEdge

Flag for edge smoothing. Supported values:• 0 - transformation without edge smoothing.
• 1 - transformation with edge smoothing.

pSpec

Pointer to the specification structure.

Description
This function initializes the IppiWarpSpec structure for warping an arbitrary quadrangle in the source image
to quadrangle in the destination image with the linear interpolation method. To compute the size of thespecification structure, use the WarpQuadGetSize function.
Transformation coefficients are computed internally, based on the mapping of the source quadrangle to thespecified destination quadrangle dstQuad and transform type transform. In case of affine transform, thefunction computes the coordinates of the fourth vertex of the destination quadrangle that uniquely depends
on the three other vertices. If the computed coordinates are not equal to the corresponding values specified
in dstQuad, the function returns the warning message and continues initialization with the computed values.
The first dimension [4] of the array specifying the quadrangle srcQuad[4][2] or dstQuad[4][2] is equal to
the number of vertices, and the second dimension [2] contains the x and y coordinates of the vertex.
For an example on how to use this function, refer to the example provided with the WarpQuadNearestInit
function description.
You can apply the edge smoothing feature only if the source quadrangle entirely lies in the source image.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when:• One of the specified pointers is NULL, excepting pBorderValue• The value of pBorderValue is NULL when the border type is set to
ippBorderConst

1478

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

ippStsDataTypeErr

Indicates an error when width or height of the source ordestination image is less than, or equal to one.
Indicates an error when dataType has an illegal value.

ippStsWarpTransformErr

Indicates an error when transform has an illegal value.

ippStsSizeErr

Indicates an error when any of the given quadrangles is nonconvex or degenerates into a triangle, line, or point.
Indicates a warning that no operation is performed if thetransformed source image extended with borders has nointersection with the destination image.
Indicates a warning when coordinates of the fourth vertex of
dstQuad are changed by the function, if transform is set to
ippWarpAffine.

ippStsQuadErr
ippStsWrongIntersectQuad

ippStsAffineQuadChanged

ippStsBorderErr

Indicates an error when borderType has an illegal value.

ippStsNumChannelsErr

Indicates an error when numChannels has an illegal value.

See Also
WarpQuadGetSize Computes the size of the specification structure and the size of the temporary
buffer for warping an arbitrary quadrangle in the source image to the quadrangle in thedestination image.
WarpQuadNearestInit Initializes the specification structure for warping an arbitrary quadrangle inthe source image to the quadrangle in the destination image with the nearest neighborinterpolation method.
WarpAffineLinear
Performs warp affine transformation of an image using
the linear interpolation method.

SyntaxIppStatus ippiWarpAffineLinear_<mod>(const Ipp<datatype>* pSrc, int srcStep,
Ipp<datatype>* pDst, int dstStep, IppiPoint dstRoiOffset, IppiSize dstRoiSize, const
IppiWarpSpec* pSpec, Ipp8u* pBuffer);
Supported values for mod:8u_C1R

16u_C1R

16s_C1R

32f_C1R

64f_C1R

8u_C3R

16u_C3R

16s_C3R

32f_C3R

64f_C3R

8u_C4R

16u_C4R

16s_C4R

32f_C4R

64f_C4R

Include Files
ippi.h
Flavors with the _L suffix: ippi_l.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

1479

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Parameters
pSrc
srcStep
pDst

Pointer to the source image.
Distance, in bytes, between the starting points of consecutive
lines in the source image buffer.
Pointer to the destination image ROI.

dstRoiSize

Distance, in bytes, between the starting points of consecutive
lines in the destination image buffer.
Offset of the destination image ROI with respect to thedestination image origin.
Size of the destination image ROI, in pixels.

pSpec

Pointer to the specification structure for the warp operation.

pBuffer

Pointer to the work buffer.

dstStep
dstRoiOffset

Description
This function transforms the source image pixel coordinates (x, y) according to the following formulas:x' = c00*x + c01*y + c02
y' = c10*x + c11*y + c12
where
•
•

x' and y' are the pixel coordinates in the transformed image
cij are the affine transform coefficients passed to the coeffs array during initialization

The affine warping is a general linear transform that incorporates such elementary transformations as
scaling, rotation, translation, stretching, and shearing. It always transforms parallel lines into parallel lines
and preserves equal distances between points on a line.
The WarpAffineLinear function operates with ROI. The transformed part of the image is resampled withthe linear interpolation method and stored in the destination image ROI. You need to define the destination
image ROI origin by the following parameters: the offset of the destination ROI with respect to thedestination image origin and the destination image ROI size. The parameter pSrc must point to the source
image origin. The parameter pDst must point to the processed destination image ROI.
If you initialize the specification structure using the ippiWarpQuadLinearInit function, the operations takeplace only inside the specified source quadrangle srcQuad that is set in ippiWarpQuadLinearInit.
To specify the algorithm for borders processing, set the borderType and pBorderValue parameters when
initializing the IppiWarpSpec structure. The data type of pBorderValue is automatically converted from
Ipp64f to the data type of the processed images. The function supports the following algorithms for borders
processing:•••If the border type is equal to ippBorderRepl, the source image outer pixels are replicated from the edge
pixels.
If the border type is equal to ippBorderConst, the outer pixels are set to the constant value specified in
pBorderValue.
If the border type is equal to ippBorderTransp or ippBorderInMem, destination image pixels mapped tothe outer source image pixels are not changed.

Before using the ippiWarpAffineLinear function, you need to initialize the IppiWarpSpec structure using
the ippiWarpAffineLinearInit function and compute the size of the external buffer pBuffer using the
WarpGetBufferSize function.

1480

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

To compute the affine transform parameters, use the GetAffineQuad, GetAffineBound, and
GetAffineTransform functions.
For an example on how to use this function, refer to the WarpQuadNearestInit function description.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsBorderErr

Indicates a warning when width or height of the destination
image is equal to zero.
Indicates an error if border type has an illegal value.

ippStsContextMatchErr

Indicates an error when context data is invalid.

ippStsNotSupportedModeErr

Indicates an error when the requested mode is not supported.

ippStsSizeErr

Indicates an error when width or height of the source or destination
image ROI is negative.

ippStsStepErr

Indicates an error when the step value is not a multiple of data type.

ippStsOutOfRangeErr

Indicates an error when the destination image offset point is outside
the destination image origin.

ippStsNoOperation

ippStsSizeWrn
ippStsWrongIntersectQuad

Indicates a warning when the destination image ROI size ismore than the destination image origin size.
Indicates a warning that no operation is performed if thedestination ROI has no intersection with the transformed
source image origin.

See Also
ROI Processing in Geometric Transforms
WarpAffineLinearInit Initializes the specification structure for image affine warping with the linear
interpolation method.
WarpQuadLinearInit Initializes the specification structure for warping an arbitrary quadrangle inthe source image to the quadrangle in the destination image with the linear interpolation method.
WarpGetBufferSize Computes the size of the work buffer for the warp transform.
GetAffineBound Computes the bounding rectangle for the source ROI transformed by theippiWarpAffine function.
GetAffineQuad Computes vertex coordinates of the quadrangle, to which the source ROI
rectangle is mapped by the affine transform.
GetAffineTransform Computes affine transform coefficients to map the source ROI to thequadrangle with the specified vertex coordinates
WarpQuadNearestInit Initializes the specification structure for warping an arbitrary quadrangle inthe source image to the quadrangle in the destination image with the nearest neighborinterpolation method.
WarpAffineCubicInit
Initializes the specification structure for image affine
warping with the cubic interpolation method.

1481

1

Intel® Integrated Performance Primitives Developer Guide and Reference

SyntaxIppStatus ippiWarpAffineCubicInit(IppiSize srcSize, IppiSize dstSize, IppDataTypedataType, const double coeffs[2][3], IppiWarpDirection direction, int numChannels,
Ipp64f valueB, Ipp64f valueC, IppiBorderType borderType, const Ipp64f* pBorderValue,
int smoothEdge, IppiWarpSpec* pSpec, Ipp8u* pInitBuf);

Include Files
ippi.h
Flavors with the _L suffix: ippi_l.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
srcSize

Size of the source image, in pixels.

dstSize

Size of the destination image, in pixels.

dataType

Data type of the source and destination images.
Supported values: ipp8u, ipp16u, ipp16s,
ipp32f, and ipp64f.

coeffsCoefficients for the affine transform.

direction

Transformation direction. Supported values:
ippWarpForward Forward transformation
ippWarpBackwar Backward transformationdnumChannels

Number of channels in the image. Supported
values: 1, 3, or 4.

valueB, valueC

The first (B) and second (C) parameter for the cubic
filter.

borderType

Type of border. Supported values:
ippBorderConst Values of all border pixels are

set to a constant.
ippBorderRepl Border is replicated from theedge pixels.
Outer
pixels are not
ippBorderTransprocessed.
pippBorderInMem Border is obtained from thesource image pixels inmemory.

Mixed borders are also supported. They can beobtained by the bitwise operation OR between
ippBorderTransp and the ippBorderInMemTop,
ippBorderInMemBottom, ippBorderInMemLeft,
ippBorderInMemRight values.

1482

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

pBorderValuesmoothEdge

pSpec
pInitBuf

Pointer to the constant value to assign to pixels of theconstant border. This parameter is applicable only tothe ippBorderConst border type.

The smooth edge flag. The following values aresupported: 0 - transform without edgesmoothing, 1 - transform with edge smoothing.
This feature is supported only for theippBorderTransp and ippBorderInMem bordertypes.
Pointer to the specification structure.
Pointer to the temporary buffer for the cubic
filter initialization.

Description
This function initializes the IppiWarpSpec structure for the ippiWarpAffineCubic function that performs
warp affine transformation with the cubic interpolation method. Before using this function, compute the sizeof the specification structure and the size of the external buffer pInitBuf using the WarpAffineGetSize
function.

Application Notes
Intel IPP warping functions do not support the IPPI_INTER_CUBIC mode. You can use interpolation with
two-parameter cubic filters instead. This approach provides the interpolation quality that is comparable with
IPPI_INTER_CUBIC. For interpolation formulas refer to Interpolation with Two-Parameter Cubic Filters. You
can vary B and C values to get a result that fits the required task.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when:• one of the specified pointers is NULL, excepting pBorderValue• pBorderValue is NULL when border type is set to
ippBorderConst

ippStsNoOperationndicates a warning if width or height of any image is zero.

ippStsDataTypeErr

Indicates an error when width or height of the source ordestination image is less than, or equal to one.
Indicates an error when dataType has an illegal value.

ippStsWarpDirectionErr

Indicates an error when direction has an illegal value.

ippStsCoeffErr

Indicates an error when affine transformation is singular.

ippStsSizeErr

ippStsWrongIntersectQuad

ippStsNotSupportedModeErr

Indicates a warning that no operation is performed if thetransformed source image extended with borders has nointersection with the destination image.
Indicates an error when the requested mode is not supported.
The edge smoothing feature is not supported for theippBorderRepl and ippBorderConst border types.

ippStsBorderErr

Indicates an error when borderType has an illegal value.

ippStsNumChannelsErr

Indicates an error when numChannels has an illegal value.

1483

1

Intel® Integrated Performance Primitives Developer Guide and ReferenceippStsExceededSizeErr

Indicates an error if width or height of the destination image or
the source image exceeds 33554431 (0x1FFFFFF).

See Also
WarpAffineGetSize Computes the size of the specification structure and the size of the external
work buffer for the warp affine transform.
Interpolation with Two-Parameter Cubic Filters
WarpQuadCubicInit
Initializes the specification structure for warping an
arbitrary quadrangle in the source image to thequadrangle in the destination image with the cubic
interpolation method.

SyntaxIppStatus ippiWarpQuadCubicInit(IppiSize srcSize, const double srcQuad[4][2], IppiSize
dstSize, const double dstQuad[4][2], IppiWarpTransformType transform, IppDataTypedataType, int numChannels, Ipp64f valueB, Ipp64f valueC, IppiBorderType borderType,const Ipp64f* pBorderValue, int smoothEdge, IppiWarpSpec* pSpec, Ipp8u* pInitBuf);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
srcSize

Size of the source image, in pixels.

srcQuadQuadrangle in the source image.

dstSize

Size of the destination image, in pixels.

dstQuadQuadrangle in the destination image.

transform

Type of the warp tranform. Supported values:
ippWarpAffine

Affine warping

ippWarpPerspective

Perspective warping

dataType

Data type of the source and destination images. Supported
values: ipp8u, ipp16u, ipp16s, and ipp32f.

numChannels

Number of channels in the image. Supported values: 1, 3, or 4.

valueB, valueC

The first (B) and second (C) parameter for the cubic filter.

borderType

Type of border. Supported values:1484

ippBorderTransp

Outer pixels are not processed.

ippBorderInMem

Border is obtained from the source
image pixels in memory.

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

pBorderValue

Pointer to the constant value to assign to pixels of the constant border.
This parameter is applicable only to the ippBorderConst border type.

smoothEdge

Flag for edge smoothing. Supported values:• 0 - transformation without edge smoothing.
• 1 - transformation with edge smoothing.

pSpec

Pointer to the specification structure.

pInitBuf

Pointer to the temporary buffer for the cubic filter initialization.

Description
This function initializes the IppiWarpSpec structure for warping an arbitrary quadrangle in the source image
to quadrangle in the destination image with the cubic interpolation method. Before using this function,
compute the size of the specification structure and the size of the external buffer pInitBuf using the
WarpQuadGetSize function.
Transformation coefficients are computed internally, based on the mapping of the source quadrangle to thespecified destination quadrangle dstQuad and transform type transform. In case of affine transform, thefunction computes the coordinates of the fourth vertex of the destination quadrangle that uniquely depends
on the three other vertices. If the computed coordinates are not equal to the corresponding values specified
in dstQuad, the function returns the warning message and continues initialization with the computed values.
The first dimension [4] of the array specifying the quadrangle srcQuad[4][2] or dstQuad[4][2] is equal to
the number of vertices, and the second dimension [2] contains the x and y coordinates of the vertex.
For an example on how to use this function, refer to the example provided with the WarpQuadNearestInit
function description.
You can apply the edge smoothing feature only if the source quadrangle entirely lies in the source image.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when:• One of the specified pointers is NULL, excepting pBorderValue• The value of pBorderValue is NULL when the border type is set to
ippBorderConst

ippStsDataTypeErr

Indicates an error when width or height of the source ordestination image is less than, or equal to one.
Indicates an error when dataType has an illegal value.

ippStsWarpTransformErr

Indicates an error when transform has an illegal value.

ippStsSizeErr

ippStsQuadErr
ippStsWrongIntersectQuad

ippStsAffineQuadChanged

ippStsBorderErr

Indicates an error when any of the given quadrangles is nonconvex or degenerates into a triangle, line, or point.
Indicates a warning that no operation is performed if thetransformed source image extended with borders has nointersection with the destination image.
Indicates a warning when coordinates of the fourth vertex of
dstQuad are changed by the function, if transform is set to
ippWarpAffine.
Indicates an error when borderType has an illegal value.

1485

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Indicates an error when numChannels has an illegal value.

ippStsNumChannelsErr

See Also
WarpQuadGetSize Computes the size of the specification structure and the size of the temporary
buffer for warping an arbitrary quadrangle in the source image to the quadrangle in thedestination image.
WarpQuadNearestInit Initializes the specification structure for warping an arbitrary quadrangle inthe source image to the quadrangle in the destination image with the nearest neighborinterpolation method.
WarpAffineCubic
Performs warp affine transformation of an image using
the cubic interpolation method.

SyntaxIppStatus ippiWarpAffineCubic_<mod>(const Ipp<datatype>* pSrc, int srcStep,
Ipp<datatype>* pDst, int dstStep, IppiPoint dstRoiOffset, IppiSize dstRoiSize, const
IppiWarpSpec* pSpec, Ipp8u* pBuffer);
Supported values for mod:8u_C1R

16u_C1R

16s_C1R

32f_C1R

64f_C1R

8u_C3R

16u_C3R

16s_C3R

32f_C3R

64f_C3R

8u_C4R

16u_C4R

16s_C4R

32f_C4R

64f_C4R

Include Files
ippi.h
Flavors with the _L suffix: ippi_l.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc
srcStep
pDst

Pointer to the source image.
Distance, in bytes, between the starting points of consecutive
lines in the source image buffer.
Pointer to the destination image ROI.

dstRoiSize

Distance, in bytes, between the starting points of consecutive
lines in the destination image buffer.
Offset of the destination image ROI with respect to thedestination image origin.
Size of the destination image ROI, in pixels.

pSpec

Pointer to the specification structure for the warp operation.

pBuffer

Pointer to the work buffer.

dstStep
dstRoiOffset

1486

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Description
This function transforms the source image pixel coordinates (x, y) according to the following formulas:x' = c00*x + c01*y + c02
y' = c10*x + c11*y + c12
where
•
•

x' and y' are the pixel coordinates in the transformed image
cij are the affine transform coefficients passed to the coeffs array during initialization

The affine warping is a general linear transform that incorporates such elementary transformations as
scaling, rotation, translation, stretching, and shearing. It always transforms parallel lines into parallel lines
and preserves equal distances between points on a line.
The WarpAffineCubic function operates with ROI. The transformed part of the image is resampled with the
cubic interpolation method and stored in the destination image ROI. You need to define the destination image
ROI origin by the following parameters: the offset of the destination ROI with respect to the destination
image origin and the destination image ROI size. The parameter pSrc must point to the source image origin.
The parameter pDst must point to the processed destination image ROI.
If you initialize the specification structure using the ippiWarpQuadCubicInit function, the operations takeplace only inside the specified source quadrangle srcQuad that is set in ippiWarpQuadCubicInit.
To specify the algorithm for borders processing, set the borderType and pBorderValue parameters when
initializing the IppiWarpSpec structure. The data type of pBorderValue is automatically converted from
Ipp64f to the data type of the processed images. The function supports the following algorithms for borders
processing:
•
•
•

•

•

If the border type is equal to ippBorderRepl, the source image outer pixels are replicated from the edge
pixels.
If the border type is equal to ippBorderConst, the outer pixels are set to the constant value specified in
pBorderValue.
If the border type is equal to ippBorderTransp, destination image pixels mapped to the outer source
image pixels are not changed. The outer pixels required for cubic interpolation are replicated from theedge pixels.
If the border type is equal to ippBorderInMem, destination image pixels mapped to the outer source
image pixels are not changed. The outer pixels required for cubic interpolation are obtained from the outof the source image origin space. Cubic interpolation requires additional one-pixel edge from each source
image side.
The mixed border types can be obtained by the bitwise operation OR between ippBorderTransp and theippBorderInMemTop, ippBorderInMemBottom, ippBorderInMemLeft, ippBorderInMemRight values

Before using the ippiWarpAffineCubic function, you need to initialize the IppiWarpSpec structure using
the ippiWarpAffineCubicInit function and compute the size of the external buffer pBuffer using the
WarpGetBufferSize function.
To compute the affine transform parameters, use the GetAffineQuad, GetAffineBound, and
GetAffineTransform functions.
For an example on how to use this function, refer to the WarpQuadNearestInit function description.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

1487

1

Intel® Integrated Performance Primitives Developer Guide and ReferenceippStsBorderErr

Indicates a warning when width or height of the destination
image is equal to zero.
Indicates an error if border type has an illegal value.

ippStsContextMatchErr

Indicates an error when context data is invalid.

ippStsNotSupportedModeErr

Indicates an error when the requested mode is not supported.

ippStsSizeErr

Indicates an error when width or height of the source or destination
image ROI is negative.

ippStsStepErr

Indicates an error when the step value is not a multiple of data type.

ippStsOutOfRangeErr

Indicates an error when the destination image offset point is outside
the destination image origin.

ippStsNoOperation

ippStsSizeWrn
ippStsWrongIntersectQuad

Indicates a warning when the destination image ROI size ismore than the destination image origin size.
Indicates a warning that no operation is performed, if thetransformed source image has no intersection with thedestination image.

See Also
ROI Processing in Geometric Transforms
WarpAffineCubicInit Initializes the specification structure for image affine warping with the cubic
interpolation method.
WarpQuadCubicInit Initializes the specification structure for warping an arbitrary quadrangle inthe source image to the quadrangle in the destination image with the cubic interpolation method.
WarpGetBufferSize Computes the size of the work buffer for the warp transform.
GetAffineBound Computes the bounding rectangle for the source ROI transformed by theippiWarpAffine function.
GetAffineQuad Computes vertex coordinates of the quadrangle, to which the source ROI
rectangle is mapped by the affine transform.
GetAffineTransform Computes affine transform coefficients to map the source ROI to thequadrangle with the specified vertex coordinates
WarpQuadNearestInit Initializes the specification structure for warping an arbitrary quadrangle inthe source image to the quadrangle in the destination image with the nearest neighborinterpolation method.
GetPerspectiveQuad
Computes vertex coordinates of the quadrangle, towhich the source ROI rectangle is mapped by theperspective transform.

SyntaxIppStatus ippiGetPerspectiveQuad(IppiRect srcRoi, double quad[4][2], const double
coeffs[3][3]);Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

1488

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Parameters
srcRoiquad

coeffsRegion of interest in the source image (of the IppiRect type).
Output array. Contains vertex coordinates of the quadrangle, towhich the source ROI is mapped by the perspective transformfunction.
The given perspective transform coefficients.

Description
This function operates with ROI (see ROI Processing in Geometric Transforms).
This function is used as a support function for the WarpPerspectiveNearest, WarpPerspectiveLinear, and
WarpPerspectiveCubic functions. It computes vertex coordinates of the quadrangle, to which the source
rectangular ROI is mapped by the perspective transform function using the given coefficients coeffs.
The first dimension [4] of the array quad[4][2] is equal to the number of vertices, and the second dimension[2] means x and y coordinates of the vertex. Quadrangle vertices have the following meaning:

quad[0] corresponds to the transformed top-left corner of the source ROI,
quad[1] corresponds to the transformed top-right corner of the source ROI,
quad[2] corresponds to the transformed bottom-right corner of the source ROI,
quad[3] corresponds to the transformed bottom-left corner of the source ROI.

Return Values
ippStsNoErr
ippStsSizeErr
ippStsCoeffErr

Indicates no error. Any other value indicates an error.
Indicates an error condition if srcRoi has a size field with zeroor negative value.
Indicates an error condition if coefficient values are invalid.

GetPerspectiveBound
Computes the bounding rectangle for the source ROI
transformed by the ippiWarpPerspective function.

SyntaxIppStatus ippiGetPerspectiveBound(IppiRect srcRoi, double bound[2][2], const double
coeffs[3][3]);Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
srcRoiRegion of interest in the source image (of the IppiRect type).

bound

Output array. Contains vertex coordinates of the bounding
rectangle for the transformed source ROI.

1489

1

Intel® Integrated Performance Primitives Developer Guide and Reference

coeffsThe given perspective transform coefficients.

Description
This function operates with ROI (see ROI Processing in Geometric Transforms).
This function is used as a support function for the WarpPerspectiveNearest, WarpPerspectiveLinear, and
WarpPerspectiveCubic functions. It computes vertex coordinates of the smallest bounding rectangle for thequadrangle quad, to which the source ROI is mapped by the perspective transform function using the given
coefficients coeffs.

bound[0] specifies x, y coordinates of the top-left corner, bound[1] specifies x, y coordinates of the bottomright corner.

Return Values
ippStsNoErr
ippStsSizeErr
ippStsCoeffErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if srcRoi has a size field with zeroor negative value.
Indicates an error condition if coefficient values are invalid.

GetPerspectiveTransform
Computes the perspective transform coefficients to
map the source ROI to the quadrangle with thespecified vertex coordinates.

SyntaxIppStatus ippiGetPerspectiveTransform(IppiRect srcRoi, const double quad[4][2], double
coeffs[3][3]);Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
srcRoiquad
coeffsRegion of interest in the source image (of the IppiRect type).
Vertex coordinates of the quadrangle, to which the source ROI
is mapped by the perspective transform function.
Output array. Contains the target perspective transform
coefficients.

Description
This function operates with ROI (see ROI Processing in Geometric Transforms).
This function is used as a support function for the WarpPerspectiveNearest, WarpPerspectiveLinear, and
WarpPerspectiveCubic functions. It computes the coefficientscoeffs that should be used by the function to
map the source rectangular ROI to the quadrangle with the given vertex coordinates quad.

1490

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

The first dimension [4] of the array quad[4][2] is equal to the number of vertices, and the second dimension[2] means x and y coordinates of the vertex. Quadrangle vertices have the following meaning:

quad[0] corresponds to the transformed top-left corner of the source ROI,
quad[1] corresponds to the transformed top-right corner of the source ROI,
quad[2] corresponds to the transformed bottom-right corner of the source ROI,
quad[3] corresponds to the transformed bottom-left corner of the source ROI.

Return Values
ippStsNoErr
ippStsSizeErr
ippStsCoeffErr
ippStsRectErr

Indicates no error. Any other value indicates an error.
Indicates an error condition if srcRoi has a size field with zeroor negative value.
Indicates an error condition if coefficient values are invalid.
Indicates an error condition if width or height of the srcRoi isless than or equal to 1.

ExampleWarpGetRectInfinite
Returns an infinite rectangle.

SyntaxIppiRect ippiWarpGetRectInfinite(void);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Description
The function returns a constant rectangle that is considered as an infinite rectangle by Intel IPP
WarpPerspective functions. Use this rectangle in the following functions: WarpPerspectiveGetSize,
WarpPerspectiveInitNearest, WarpPerspectiveInitLinear, and WarpPerspectiveCubic.

NOTE
The macro definition is: #define ippRectInfinite ippiWarpGetRectInfinite().

WarpPerspectiveGetSize
Computes the size of the specification structure andthe size of the external work buffer for the warp
perspective transform.

1491

1

Intel® Integrated Performance Primitives Developer Guide and Reference

SyntaxIppStatus ippiWarpPerspectiveGetSize(IppiSize srcSize, IppiRect srcRoi, IppiSize
dstSize, IppDataType dataType, const double coeffs[3][3], IppiInterpolationTypeinterpolation, IppiWarpDirection direction, IppiBorderType borderType, int* pSpecSize,int* pInitBufSize);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
srcSize

Size of the source image, in pixels.

srcRoi

Source image ROI (of the IppiRect type).

dstSize

Size of the destination image, in pixels.

dataTypecoeffsinterpolation
direction

Data type of the source and destination images.
Supported values: ipp8u, ipp16u, ipp16s, andipp32f.
Coefficients for the perspective transform.
Interpolation method. Supported values:

ippNearest, ippLinear, andippCubic.

Transformation direction. Supported values:
ippWarpForward Forward transformation
ippWarpBackwar Backward transformationdborderType

Type of border. Supported values:
ippBorderConst Values of all border pixels are

set to a constant.
ippBorderRepl Border is replicated from theedge pixels.
ippBorderTrans Outer pixels are notprocessed.
pippBorderInMem Border is obtained from thesource image pixels inmemory.

Mixed borders are also supported. They can beobtained by the bitwise operation OR between
ippBorderTransp and the ippBorderInMemTop,
ippBorderInMemBottom, ippBorderInMemLeft,
ippBorderInMemRight values.

pSpecSize

1492

Pointer to the size, in bytes, of the specification
structure.

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Pointer to the size, in bytes, of the temporary
buffer.

pInitBufSize

Description
This function computes the size of the specification structure and the external work buffer for the following
functions, depending on the interpolation parameter: ippiWarpPerspectiveNearestInit,
ippiWarpPerspectiveLinearInit, or ippiWarpPerspectiveCubicInit.
You can set the value of the srcRoi parameter to ippRectInfinite, which means that the ROI is not
specified.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error in the following cases:• If the width or height of the source or destination image is lessthan, or equal to one.

• If one of the calculated sizes exceeds the maximum positive 32-bit
signed integer value. The size of the one of the processed images
is too large.

ippStsRectErr

Indicates an error in the following cases, if the source image
ROI is not ippRectInfinite:• If the source image ROI has no intersection with the image.
• Either x or y component of the source image ROI is negative.
• Width or height of the source image ROI is less than, or equal to
zero.

ippStsDataTypeErr

Indicates an error when dataType has an illegal value.

ippStsWarpDirectionErr

Indicates an error when direction has an illegal value.

ippStsInterpolationErr

Indicates an error when interpolation has an illegal value.

ippStsCoeffErr

Indicates an error when perspective transformation is singular.

ippStsBorderErr

Indicates a warning that no operation is performed if thetransformed source image extended with borders has nointersection with the destination image.
Indicates an error when borderType has an illegal value.

ippStsSizeWrn

Indicates a warning when srcRoi exceeds the source image.

ippStsWrongIntersectQuad

See Also
WarpPerspectiveNearestInit Initializes the specification structure for image perspective warpingwith the nearest neighbor interpolation method.
WarpPerspectiveLinearInit Initializes the specification structure for image perspective warpingwith the linear interpolation method.
WarpPerspectiveCubicInit Initializes the specification structure for image perspective warping withthe cubic interpolation method.
WarpPerspectiveNearestInit

1493

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Initializes the specification structure for image
perspective warping with the nearest neighborinterpolation method.

SyntaxIppStatus ippiWarpPerspectiveNearestInit(IppiSize srcSize, IppiRect srcRoi, IppiSize
dstSize, IppDataType dataType, const double coeffs[3][3], IppiWarpDirection direction,
int numChannels, IppiBorderType borderType, const Ipp64f* pBorderValue, int smoothEdge,
IppiWarpSpec* pSpec);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
srcSize

Size of the source image, in pixels.

srcRoi

Source image ROI (of the IppiRect type).

dstSize

Size of the destination image, in pixels.

dataType

Data type of the source and destination images.
Supported values: ipp8u, ipp16u, ipp16s, andipp32f.

coeffsCoefficients for the perspective transform.

direction

Transformation direction. Supported values:
ippWarpForward Forward transformation
ippWarpBackwar Backward transformationdnumChannels

Number of channels in the image. Supported
values: 1, 3, or 4.

borderType

Type of border. Supported values:
ippBorderConst Values of all border pixels are

set to a constant.
ippBorderRepl Border is replicated from theedge pixels.
ippBorderTrans Outer pixels are notprocessed.
pippBorderInMem Border is obtained from thesource image pixels inmemory.

1494

1Developer Guide and Reference for Intel® Integrated Performance Primitives

Mixed borders are also supported. They can beobtained by the bitwise operation OR between
ippBorderTransp and the ippBorderInMemTop,
ippBorderInMemBottom, ippBorderInMemLeft,
ippBorderInMemRight values.
Pointer to the constant value to assign to pixels of theconstant border. This parameter is applicable only tothe ippBorderConst border type.

pBorderValue

Flag for edge smoothing. Supported values:smoothEdge• 0 - transformation without edge smoothing.
• 1 - transformation with edge smoothing. Thisfeature is supported only for theippBorderTransp and ippBorderInMem bordertypes.

Pointer to the specification structure.

pSpec

Description
This function initializes the IppiWarpSpec structure for the WarpPerspectiveNearest function that performs
warp perspective transformation with the nearest neighbor interpolation method. To compute the size of thespecification structure, use the WarpPerspectiveGetSize function.
You can set the value of the srcRoi parameter to ippRectInfinite, which means that the ROI is not
specified.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when:• pSpec is NULL
• pBorderValue is NULL when the border type is set to
ippBorderConst

ippStsSizeErr

Indicates an error when width or height of the source ordestination image is less than, or equal to one.

ippStsRectErr

Indicates an error in the following cases, if the source image
ROI is not ippRectInfinite:• If the source image ROI has no intersection with the image.
• Either x or y component of the source image ROI is negative.
• Width or height of the source image ROI is less than, or equal to
zero.

ippStsDataTypeErr

Indicates an error when dataType has an illegal value.

ippStsWarpDirectionErr

Indicates an error when direction has an illegal value.

ippStsCoeffErr

Indicates an error when perspective transformation is singular.

ippStsWrongIntersectQuad

Indicates a warning that no operation is performed if thetransformed source image extended with borders has nointersection with the destination image.

1495

1

Intel® Integrated Performance Primitives Developer Guide and ReferenceippStsNotSupportedModeErr

Indicates an error when the requested mode is not supported.
The edge smoothing feature is not supported for theippBorderRepl and ippBorderConst border types.

ippStsBorderErr

Indicates an error when borderType has an illegal value.

ippStsNumChannelsErr

Indicates an error when numChannels has an illegal value.

ippStsSizeWrn

Indicates a warning when srcRoi exceeds the source image.

See Also
WarpPerspectiveGetSize Computes the size of the specification structure and the size of theexternal work buffer for the warp perspective transform.
WarpPerspectiveNearest Performs warp perspective transformation of an image using the nearest
neighbor interpolation method.
WarpPerspectiveNearest
Performs warp perspective transformation of an image
using the nearest neighbor interpolation method.

SyntaxIppStatus ippiWarpPerspectiveNearest_<mod>(const Ipp<datatype>* pSrc, int srcStep,
Ipp<datatype> pDst, int dstStep, IppiPoint dstRoiOffset, IppiSize dstRoiSize, const
IppiWarpSpec* pSpec, Ipp8u* pBuffer);
Supported values for mod:8u_C1R

16u_C1R

16s_C1R

32f_C1R

8u_C3R

16u_C3R

16s_C3R

32f_C3R

8u_C4R

16u_C4R

16s_C4R

32f_C4R

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc
srcStep
pDst
dstStep
dstRoiOffset
dstRoiSize

1496

Pointer to the source image.
Distance, in bytes, between the starting points of consecutive
lines in the source image buffer.
Pointer to the destination image ROI.
Distance, in bytes, between the starting points of consecutive
lines in the destination image buffer.
Offset of the destination image ROI with respect to thedestination image origin.
Size of the destination image ROI, in pixels.

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

pSpec

Pointer to the specification structure for the warp operation.

pBuffer

Pointer to the work buffer.

Description
This function transforms the source image pixel coordinates (x, y) according to the following formulas:x' = (c00*x + c01*y + c02)/ (c20*x + c21*y + c22)y' = (c10*x + c11*y + c12)/(c20*x + c21*y + c22)
where
•
•

x' and y' are the pixel coordinates in the transformed image
cij are the affine transform coefficients passed to the coeffs array during initialization

The ippiWarpPerspectiveNearest function operates with ROI (see Regions of Interest in Intel IPP). The
transformed part of the source image is resampled with the nearest neighbor interpolation method andstored in the destination image ROI. You need to define the destination image ROI origin by the following
parameters: the offset of the destination ROI with respect to the destination image origin and the destination
image ROI size. The parameter pDst must point to the processed destination image ROI.
If you initialize the warp specification structure using the WarpPerspectiveNearestInit function, you canspecify the source image ROI in the following ways:••

Set the srcRoi value to ippRectInfinite, which means that the ROI is not specified. In this case, pSrc
must point to the processed source image. Pixels that are outside the source image boundaries arecomputed according to the specified border type.
Set the srcRoi value to the part of the processed source image. In this case, pSrc must point to theprocessed source image ROI. The operations take place only inside the specified region of interest
srcRoi. It means that the destination image pixels mapped to the outer pixels of the specified source
image region are not changed.

If you initialize the warp specification structure using the WarpQuadNearestInit function, set the pSrc value
to the processed source image. The operations take place only inside the source quadrangle srcQuad that is
specified in the WarpQuadNearestInit function.
To specify the algorithm for borders processing, set the borderType and pBorderValue parameters when
initializing the IppiWarpSpec structure. The data type of borderValue is automatically converted from
Ipp64f to the data type of the processed images. The function supports the following algorithms for borders
processing:•••If the border type is equal to ippBorderRepl, the source image outer pixels are replicated from the edge
pixels.
If the border type is equal to ippBorderConst, the outer pixels are set to the constant value specified in
pBorderValue.
If the border type is equal to ippBorderTransp or ippBorderInMem, destination image pixels mapped tothe outer source image pixels are not changed.

Before using the ippiWarpPerspectiveNearest function, you need to initialize the IppiWarpSpec
structure using the WarpPerspectiveNearestInit function and compute the size of the external buffer pBufferusing the WarpGetBufferSize function.
To compute the perspective transform parameters, use the GetPerspectiveQuad, GetPerspectiveBound, and
GetPerspectiveTransform functions.

Return Values
ippStsNoErr

Indicates no error.

1497

1

Intel® Integrated Performance Primitives Developer Guide and ReferenceippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsContextMatchErr

Indicates a warning when width or height of the destination
image is equal to zero.
Indicates an error when context data is invalid.

ippStsNotSupportedModeErr

Indicates an error when the requested mode is not supported.

ippStsSizeErr

Indicates an error when width or height of the source or destination
image ROI is negative.

ippStsStepErr

Indicates an error when the step value is not a multiple of data type.

ippStsOutOfRangeErr

Indicates an error when the destination image offset point is outside
the destination image origin.

ippStsNoOperation

ippStsSizeWrn
ippStsWrongIntersectQuad

Indicates a warning when the destination image ROI size ismore than the destination image origin size.
Indicates a warning that no operation is performed if thetransformed source image extended with borders has nointersection with the destination image.

ExampleSee Also
ROI Processing in Geometric Transforms
WarpPerspectiveNearestInit Initializes the specification structure for image perspective warpingwith the nearest neighbor interpolation method.
WarpQuadNearestInit Initializes the specification structure for warping an arbitrary quadrangle inthe source image to the quadrangle in the destination image with the nearest neighborinterpolation method.
WarpGetBufferSize Computes the size of the work buffer for the warp transform.
GetPerspectiveBound Computes the bounding rectangle for the source ROI transformed by theippiWarpPerspective function.
GetPerspectiveQuad Computes vertex coordinates of the quadrangle, to which the source ROI
rectangle is mapped by the perspective transform.
GetPerspectiveTransform Computes the perspective transform coefficients to map the source ROI
to the quadrangle with the specified vertex coordinates.
WarpPerspectiveLinearInit
Initializes the specification structure for image
perspective warping with the linear interpolation
method.

SyntaxIppStatus ippiWarpPerspectiveLinearInit(IppiSize srcSize, IppiRect srcRoi, IppiSize
dstSize, IppDataType dataType, const double coeffs[3][3], IppiWarpDirection direction,
int numChannels, IppiBorderType borderType, const Ipp64f* pBorderValue, int smoothEdge,
IppiWarpSpec* pSpec);

Include Files
ippi.h1498

1Developer Guide and Reference for Intel® Integrated Performance Primitives

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
srcSize

Size of the source image, in pixels.

srcRoi

Source image ROI (of the IppiRect type).

dstSize

Size of the destination image, in pixels.

dataType

Data type of the source and destination images.
Supported values: ipp8u, ipp16u, ipp16s, andipp32f.

coeffsCoefficients for the perspective transform.

direction

Transformation direction. Supported values:
ippWarpForward Forward transformation
ippWarpBackwar Backward transformationdnumChannels
borderType

Number of channels in the image. Supported
values: 1, 3, or 4.
Type of border. Supported values:
ippBorderConst Values of all border pixels are

set to a constant.
ippBorderRepl Border is replicated from theedge pixels.
ippBorderTrans Outer pixels are notprocessed.
pippBorderInMem Border is obtained from thesource image pixels inmemory.

Mixed borders are also supported. They can beobtained by the bitwise operation OR between
ippBorderTransp and the ippBorderInMemTop,
ippBorderInMemBottom, ippBorderInMemLeft,
ippBorderInMemRight values.

pBorderValuesmoothEdge

Pointer to the constant value to assign to pixels of theconstant border. This parameter is applicable only tothe ippBorderConst border type.

Flag for edge smoothing. Supported values:• 0 - transformation without edge smoothing.
• 1 - transformation with edge smoothing. Thisfeature is supported only for theippBorderTransp and ippBorderInMem bordertypes.

pSpec

Pointer to the specification structure.

1499

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Description
This function initializes the IppiWarpSpec structure for the ippiWarpPerspectiveLinear function that
performs warp perspective transformation with the linear interpolation method. To compute the size of thespecification structure, use the WarpPerspectiveGetSize function.
You can set the value of the srcRoi parameter to ippRectInfinite, which means that the ROI is not
specified.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when:• pSpec is NULL
• pBorderValue is NULL when the border type is set to
ippBorderConst

ippStsSizeErr
ippStsRectErr

Indicates an error when width or height of the source ordestination image is less than, or equal to one.
Indicates an error in the following cases, if the source image
ROI is not ippRectInfinite:• If the source image ROI has no intersection with the image.
• Either x or y component of the source image ROI is negative.
• Width or height of the source image ROI is less than, or equal to
zero.

ippStsDataTypeErr

Indicates an error when dataType has an illegal value.

ippStsWarpDirectionErr

Indicates an error when direction has an illegal value.

ippStsCoeffErr

Indicates an error when perspective transformation is singular.

ippStsWrongIntersectQuad

ippStsNotSupportedModeErr

Indicates a warning that no operation is performed if thetransformed source image extended with borders has nointersection with the destination image.
Indicates an error when the requested mode is not supported.
The edge smoothing feature is not supported for theippBorderRepl and ippBorderConst border types.

ippStsBorderErr

Indicates an error when borderType has an illegal value.

ippStsNumChannelsErr

Indicates an error when numChannels has an illegal value.

ippStsSizeWrn

Indicates a warning when srcRoi exceeds the source image.

See Also
WarpPerspectiveGetSize Computes the size of the specification structure and the size of theexternal work buffer for the warp perspective transform.
WarpPerspectiveLinear Performs warp perspective transformation of an image using the linear
interpolation method.
WarpPerspectiveLinear
Performs warp perspective transformation of an image
using the linear interpolation method.

1500

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

SyntaxIppStatus ippiWarpPerspectiveLinear_<mod>(const Ipp<datatype>* pSrc, int srcStep,
Ipp<datatype> pDst, int dstStep, IppiPoint dstRoiOffset, IppiSize dstRoiSize, const
IppiWarpSpec* pSpec, Ipp8u* pBuffer);
Supported values for mod:8u_C1R

16u_C1R

16s_C1R

32f_C1R

8u_C3R

16u_C3R

16s_C3R

32f_C3R

8u_C4R

16u_C4R

16s_C4R

32f_C4R

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc
srcStep
pDst

Pointer to the source image.
Distance, in bytes, between the starting points of consecutive
lines in the source image buffer.
Pointer to the destination image ROI.

dstRoiSize

Distance, in bytes, between the starting points of consecutive
lines in the destination image buffer.
Offset of the destination image ROI with respect to thedestination image origin.
Size of the destination image ROI, in pixels.

pSpec

Pointer to the specification structure for the warp operation.

pBuffer

Pointer to the work buffer.

dstStep
dstRoiOffset

Description
This function transforms the source image pixel coordinates (x, y) according to the following formulas:x' = (c00*x + c01*y + c02)/ (c20*x + c21*y + c22)y' = (c10*x + c11*y + c12)/(c20*x + c21*y + c22)
where
•
•

x' and y' are the pixel coordinates in the transformed image
cij are the affine transform coefficients passed to the coeffs array during initialization

The ippiWarpPerspectiveLinear function operates with ROI (see Regions of Interest in Intel IPP). The
transformed part of the source image is resampled with the linear interpolation method and stored in thedestination image ROI. You need to define the destination image ROI origin by the following parameters: theoffset of the destination ROI with respect to the destination image origin and the destination image ROI size.
The parameter pDst must point to the processed destination image ROI.

1501

1

Intel® Integrated Performance Primitives Developer Guide and Reference

If you initialize the warp specification structure using the ippiWarpPerspectiveLinearInit function, you
can specify the source image ROI in the following ways:••

Set the srcRoi value to ippRectInfinite, which means that the ROI is not specified. In this case, pSrc
must point to the processed source image. Pixels that are outside the source image boundaries arecomputed according to the specified border type.
Set the srcRoi value to the part of the processed source image. In this case, pSrc must point to theprocessed source image ROI. The operations take place only inside the specified region of interest
srcRoi. It means that the destination image pixels mapped to the outer pixels of the specified source
image region are not changed.

If you initialize the warp specification structure using the ippiWarpQuadLinearInit function, set the pSrc
value to the processed source image. The operations take place only inside the source quadrangle srcQuad
that is specified in the ippiWarpQuadLinearInit function.
To specify the algorithm for borders processing, set the borderType and pBorderValue parameters when
initializing the IppiWarpSpec structure. The data type of pBorderValue is automatically converted from
Ipp64f to the data type of the processed images. The function supports the following algorithms for borders
processing:•••If the border type is equal to ippBorderRepl, the source image outer pixels are replicated from the edge
pixels.
If the border type is equal to ippBorderConst, the outer pixels are set to the constant value specified in
pBorderValue.
If the border type is equal to ippBorderTransp or ippBorderInMem, destination image pixels mapped tothe outer source image pixels are not changed.

Before using the ippiWarpPerspectiveLinear function, you need to initialize the IppiWarpSpec structureusing the ippiWarpPerspectiveLinearInit function and compute the size of the external buffer pBufferusing the ippiWarpGetBufferSize function.
To compute the perspective transform parameters, use the ippiGetPerspectiveQuad,
ippiGetPerspectiveBound, and ippiGetPerspectiveTransform functions.
For an example on how to use this functionality, refer to the example provided with theippiWarpPerspectiveNearest function description.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsContextMatchErr

Indicates a warning when width or height of the destination
image is equal to zero.
Indicates an error when context data is invalid.

ippStsNotSupportedModeErr

Indicates an error when the requested mode is not supported.

ippStsSizeErr

Indicates an error when width or height of the source or destination
image ROI is negative.

ippStsStepErr

Indicates an error when the step value is not a multiple of data type.

ippStsOutOfRangeErr

Indicates an error when the destination image offset point is outside
the destination image origin.

ippStsSizeWrn

Indicates a warning when the destination image ROI size ismore than the destination image origin size.

ippStsNoOperation

1502

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

ippStsWrongIntersectQuad

Indicates a warning that no operation is performed if thetransformed source image extended with borders has nointersection with the destination image.

See Also
ROI Processing in Geometric Transforms
WarpPerspectiveLinearInit Initializes the specification structure for image perspective warpingwith the linear interpolation method.
WarpQuadLinearInit Initializes the specification structure for warping an arbitrary quadrangle inthe source image to the quadrangle in the destination image with the linear interpolation method.
WarpGetBufferSize Computes the size of the work buffer for the warp transform.
GetPerspectiveBound Computes the bounding rectangle for the source ROI transformed by theippiWarpPerspective function.
GetPerspectiveQuad Computes vertex coordinates of the quadrangle, to which the source ROI
rectangle is mapped by the perspective transform.
GetPerspectiveTransform Computes the perspective transform coefficients to map the source ROI
to the quadrangle with the specified vertex coordinates.
WarpPerspectiveNearest Performs warp perspective transformation of an image using the nearest
neighbor interpolation method.
WarpPerspectiveCubicInit
Initializes the specification structure for image
perspective warping with the cubic interpolation
method.

SyntaxIppStatus ippiWarpPerspectiveCubicInit(IppiSize srcSize, IppiRect srcRoi, IppiSize
dstSize, IppDataType dataType, const double coeffs[3][3], IppiWarpDirection direction,
int numChannels, Ipp64f valueB, Ipp64f valueC, IppiBorderType borderType, const Ipp64f*
pBorderValue, int smoothEdge, IppiWarpSpec* pSpec, Ipp8u* pInitBuf);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
srcSize

Size of the source image, in pixels.

srcRoi

Source image ROI (of the IppiRect type).

dstSize

Size of the destination image, in pixels.

dataType

Data type of the source and destination images.
Supported values: ipp8u, ipp16u, ipp16s, andipp32f.

coeffsCoefficients for the perspective transform.

direction

Transformation direction. Supported values:

1503

1

Intel® Integrated Performance Primitives Developer Guide and Reference

ippWarpForward Forward transformation
ippWarpBackwar Backward transformationdnumChannels
valueB, valueC
borderType

Number of channels in the image. Supported
values: 1, 3, or 4.
The first (B) and second (C) parameter for the
cubic filter.
Type of border. Supported values:
ippBorderConst Values of all border pixels are

set to a constant.
ippBorderRepl Border is replicated from theedge pixels.
ippBorderTrans Outer pixels are notprocessed.
pippBorderInMem Border is obtained from thesource image pixels inmemory.

Mixed borders are also supported. They can beobtained by the bitwise operation OR between
ippBorderTransp and the ippBorderInMemTop,
ippBorderInMemBottom, ippBorderInMemLeft,
ippBorderInMemRight values.

pBorderValue

Pointer to the constant value to assign to pixels of theconstant border. This parameter is applicable only tothe ippBorderConst border type.

smoothEdge

Flag to enable/disable edge smoothing. Possible
values: 0 - transform without edge smoothing, 1 transform with edge smoothing. This feature is
supported only for the ippBorderTransp andippBorderInMem border types.

pSpec

Pointer to the specification structure.

pInitBuf

Pointer to the temporary buffer for the cubic
filter initialization.

Description
This function initializes the IppiWarpSpec structure for the ippiWarpPerspectiveCubic function that
performs that performs warp perspective transformation with the cubic interpolation method. Before using
this function, compute the size of the specification structure and the size of the external buffer pInitBuf
using the WarpPerspectiveGetSize function.
You can set the value of the srcRoi parameter to ippRectInfinite, which means that the ROI is not
specified.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when:

1504

1

Developer Guide and Reference for Intel® Integrated Performance Primitives• pSpec is NULL
• pBorderValue is NULL when the border type is set to
ippBorderConst

Indicates an error when width or height of the source ordestination image is less than, or equal to one.
Indicates an error in the following cases, if the source image
ROI is not ippRectInfinite:

ippStsSizeErr
ippStsRectErr• If the source image ROI has no intersection with the image.
• Either x or y component of the source image ROI is negative.
• Width or height of the source image ROI is less than, or equal to
zero.

ippStsDataTypeErr

Indicates an error when dataType has an illegal value.

ippStsWarpDirectionErr

Indicates an error when direction has an illegal value.

ippStsCoeffErr

Indicates an error when perspective transformation is singular.

ippStsWrongIntersectQuad

ippStsNotSupportedModeErr

Indicates a warning that no operation is performed if thetransformed source image extended with borders has nointersection with the destination image.
Indicates an error when the requested mode is not supported.
The edge smoothing feature is not supported for theippBorderRepl and ippBorderConst border types.

ippStsBorderErr

Indicates an error when borderType has an illegal value.

ippStsNumChannelsErr

Indicates an error when numChannels has an illegal value.

ippStsSizeWrn

Indicates a warning when srcRoi exceeds the source image.

See Also
WarpPerspectiveGetSize Computes the size of the specification structure and the size of theexternal work buffer for the warp perspective transform.
WarpPerspectiveCubic Performs warp perspective transformation of an image using the cubic
interpolation method.
WarpPerspectiveCubic
Performs warp perspective transformation of an image
using the cubic interpolation method.

SyntaxIppStatus ippiWarpPerspectiveCubic_<mod>(const Ipp<datatype>* pSrc, int srcStep,
Ipp<datatype> pDst, int dstStep, IppiPoint dstRoiOffset, IppiSize dstRoiSize, const
IppiWarpSpec* pSpec, Ipp8u* pBuffer);
Supported values for mod:8u_C1R

16u_C1R

16s_C1R

32f_C1R

8u_C3R

16u_C3R

16s_C3R

32f_C3R

8u_C4R

16u_C4R

16s_C4R

32f_C4R

1505

1Intel® Integrated Performance Primitives Developer Guide and Reference

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc
srcStep
pDst

Pointer to the source image.
Distance, in bytes, between the starting points of consecutive
lines in the source image buffer.
Pointer to the destination image ROI.

dstRoiSize

Distance, in bytes, between the starting points of consecutive
lines in the destination image buffer.
Offset of the destination image ROI with respect to thedestination image origin.
Size of the destination image ROI, in pixels.

pSpec

Pointer to the specification structure for the warp operation.

pBuffer

Pointer to the work buffer.

dstStep
dstRoiOffset

Description
This function transforms the source image pixel coordinates (x, y) according to the following formulas:x' = (c00*x + c01*y + c02)/ (c20*x + c21*y + c22)y' = (c10*x + c11*y + c12)/(c20*x + c21*y + c22)
where
•
•

x' and y' are the pixel coordinates in the transformed image
cij are the affine transform coefficients passed to the coeffs array during initialization

The ippiWarpPerspectiveCubic function operates with ROI (see Regions of Interest in Intel IPP). The
transformed part of the source image is resampled with the cubic interpolation method and stored in thedestination image ROI. You need to define the destination image ROI origin by the following parameters: theoffset of the destination ROI with respect to the destination image origin and the destination image ROI size.
The parameter pDst must point to the processed destination image ROI.
If you initialize the warp specification structure using the ippiWarpPerspectiveCubicInit function, you
can specify the source image ROI in the following ways:••

Set the srcRoi value to ippRectInfinite, which means that the ROI is not specified. In this case, pSrc
must point to the processed source image. Pixels that are outside the source image boundaries arecomputed according to the specified border type.
Set the srcRoi value to the part of the processed source image. In this case, pSrc must point to theprocessed source image ROI. The operations take place only inside the specified region of interest
srcRoi. It means that the destination image pixels mapped to the outer pixels of the specified source
image region are not changed.

If you initialize the warp specification structure using the ippiWarpQuadCubicInit function, set the pSrc
value to the processed source image. The operations take place only inside the source quadrangle srcQuad
that is specified in the ippiWarpQuadCubicInit function.

1506

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

To specify the algorithm for borders processing, set the borderType and pBorderValue parameters when
initializing the IppiWarpSpec structure. The data type of pBorderValue is automatically converted from
Ipp64f to the data type of the processed images. The function supports the following algorithms for borders
processing:
•
•
•

•

•

If the border type is equal to ippBorderRepl, the source image outer pixels are replicated from the edge
pixels.
If the border type is equal to ippBorderConst, the outer pixels are set to the constant value specified in
pBorderValue.
If the border type is equal to ippBorderTransp, destination image pixels mapped to the outer source
image pixels are not changed. The outer pixels required for cubic interpolation are replicated from theedge pixels.
If the border type is equal to ippBorderInMem, destination image pixels mapped to the outer source
image pixels are not changed. The outer pixels required for cubic interpolation are obtained from the outof the source image origin space. Cubic interpolation requires additional one-pixel edge from each source
image side.
The mixed border types can be obtained by the bitwise operation OR between ippBorderTransp and theippBorderInMemTop, ippBorderInMemBottom, ippBorderInMemLeft, ippBorderInMemRight values

Before using the ippiWarpPerspectiveCubic function, you need to initialize the IppiWarpSpec structureusing the ippiWarpPerspectiveCubicInit function and compute the size of the external buffer pBufferusing the ippiWarpGetBufferSize function.
To compute the perspective transform parameters, use the ippiGetPerspectiveQuad,
ippiGetPerspectiveBound, and ippiGetPerspectiveTransform functions.
For an example on how to use this functionality, refer to the example provided with theippiWarpPerspectiveNearest function description.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsContextMatchErr

Indicates a warning when width or height of the destination
image is equal to zero.
Indicates an error when context data is invalid.

ippStsNotSupportedModeErr

Indicates an error when the requested mode is not supported.

ippStsSizeErr

Indicates an error when width or height of the source or destination
image ROI is negative.

ippStsStepErr

Indicates an error when the step value is not a multiple of data type.

ippStsOutOfRangeErr

Indicates an error when the destination image offset point is outside
the destination image origin.

ippStsNoOperation

ippStsSizeWrn
ippStsWrongIntersectQuad

Indicates a warning when the destination image ROI size ismore than the destination image origin size.
Indicates a warning that no operation is performed if thetransformed source image extended with borders has nointersection with the destination image.

See Also
ROI Processing in Geometric Transforms
WarpPerspectiveCubicInit Initializes the specification structure for image perspective warping withthe cubic interpolation method.
1507

1

Intel® Integrated Performance Primitives Developer Guide and Reference

WarpQuadCubicInit Initializes the specification structure for warping an arbitrary quadrangle inthe source image to the quadrangle in the destination image with the cubic interpolation method.
WarpGetBufferSize Computes the size of the work buffer for the warp transform.
GetPerspectiveBound Computes the bounding rectangle for the source ROI transformed by theippiWarpPerspective function.
GetPerspectiveQuad Computes vertex coordinates of the quadrangle, to which the source ROI
rectangle is mapped by the perspective transform.
GetPerspectiveTransform Computes the perspective transform coefficients to map the source ROI
to the quadrangle with the specified vertex coordinates.
WarpPerspectiveNearest Performs warp perspective transformation of an image using the nearest
neighbor interpolation method.
GetBilinearQuad
Computes the vertex coordinates of the quadrangle,
to which the source rectangular ROI is mapped by thebilinear transform.

SyntaxIppStatus ippiGetBilinearQuad(IppiRect srcRoi, double quad[4][2], const double
coeffs[2][4]);Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
srcRoiquad

coeffsRegion of interest in the source image (of the IppiRect type).
Output array. Contains vertex coordinates of the quadrangle, towhich the source ROI is mapped by the bilinear transformfunction.
The given bilinear transform coefficients.

Description
This function operates with ROI (see ROI Processing in Geometric Transforms).
This function is used as a support function for ippiWarpBilinear. It computes vertex coordinates of thequadrangle, to which the source rectangular ROI is mapped by the bilinear transform function
ippiWarpBilinear using coefficients coeffs.
The first dimension [4] of the array quad[4][2] is equal to the number of vertices, and the second dimension[2] means x and y coordinates of the vertex. Quadrangle vertices have the following meaning:

quad[0] corresponds to the transformed top-left corner of the source ROI,
quad[1] corresponds to the transformed top-right corner of the source ROI,
quad[2] corresponds to the transformed bottom-right corner of the source ROI,
quad[3] corresponds to the transformed bottom-left corner of the source ROI.

1508

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Return Values
ippStsNoErr
ippStsSizeErr
ippStsCoeffErr

Indicates no error. Any other value indicates an error.
Indicates an error condition if srcRoi has a size field with zeroor negative value.
Indicates an error condition if coefficient values are invalid.

GetBilinearBound
Computes the bounding rectangle for the source ROI
transformed by the ippiWarpBilinear function.

SyntaxIppStatus ippiGetBilinearBound(IppiRect srcRoi, double bound[2][2], const double
coeffs[2][4]);Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
srcRoiboundcoeffsRegion of interest in the source image (of the IppiRect type).
Output array. Contains vertex coordinates of the bounding
rectangle for the transformed source ROI.
The given bilinear transform coefficients.

Description
This function operates with ROI (see ROI Processing in Geometric Transforms).
This functionis used as a support function for ippiWarpBilinear. It computes vertex coordinates of thesmallest bounding rectangle for the quadrangle quad, to which the source ROI is mapped by the bilinear
transform function ippiWarpBilinear using coefficientscoeffs.

bound[0] specifies x, y coordinates of the top-left corner, bound[1] specifies x, y coordinates of the bottomright corner.

Return Values
ippStsNoErr
ippStsSizeErr
ippStsCoeffErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if srcRoi has a size field with zeroor negative value.
Indicates an error condition if coefficient values are invalid.

1509

1

Intel® Integrated Performance Primitives Developer Guide and Reference

GetBilinearTransform
Computes bilinear transform coefficients to map thesource ROI to the quadrangle with the specified vertex
coordinates.

SyntaxIppStatus ippiGetBilinearTransform(IppiRect srcRoi, const double quad[4][2], double
coeffs[2][4]);Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
srcRoiquad
coeffsRegion of interest in the source image (of the IppiRect type).
Vertex coordinates of the quadrangle, to which the source ROI
is mapped by the bilinear transform function.
Output array. Contains the target bilinear transform
coefficients.

Description
This function operates with ROI (see ROI Processing in Geometric Transforms).
This function is used as a support function for ippiWarpBilinear. It computes the coefficientscoeffs ofthebilinear transform that maps the source rectangular ROI to the quadrangle with the specified vertex
coordinates quad.
The first dimension [4] of the array quad[4][2] is equal to the number of vertices, and the second dimension[2] means x and y coordinates of the vertex. Quadrangle vertices have the following meaning:

quad[0] corresponds to the transformed top-left corner of the source ROI,
quad[1] corresponds to the transformed top-right corner of the source ROI,
quad[2] corresponds to the transformed bottom-right corner of the source ROI,
quad[3] corresponds to the transformed bottom-left corner of the source ROI.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsSizeErr

Indicates an error condition if srcRoi has a size field with zeroor negative value.

ippStsCoeffErr

Indicates an error condition if coefficient values are invalid.

ippStsRectErr

Indicates an error condition if width or height of the srcRoi isless than or equal to 1.

Example1510

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

WarpBilinearGetBufferSize
Computes the size of the work buffer for bilinear
warping.

SyntaxIppStatus ippiWarpBilinearGetBufferSize(IppiSize srcSize, IppiRect srcRoi, IppiRect
dstRoi, IppiWarpDirection direction, const double coeffs[2][4], int interpolation, int*
pBufSize);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
srcSize

Size of the source image, in pixels.

srcRoi

Source image ROI (of the IppiRect type).

dstRoi

Destination image ROI (of the IppiRect type).

direction

Transformation direction. Supported values:
ippWarpForward

Forward transformation

ippWarpBackward

Backward transformation

coeffsCoefficients for the perspective transform.

interpolation

Interpolation mode. Supported values:

pBufSize

IPPI_INTER_NN

Nearest neighbor interpolation

IPPI_INTER_LINEAR

Linear interpolation

IPPI_INTER_CUBIC

Cubic interpolation

IPPI_INTER_EDGE

Use edge smoothing in addition to one of theabove modes

Pointer to the size, in bytes, of the external buffer.

Description
This function computes the size of the external work buffer required for bilinear warping of the source image
ROI. The result is stored in the pBufSize parameter.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pBufSize is NULL.

ippStsSizeErr
ippStsWarpDirectionErr

Indicates an error when one of the image dimensions is lessthan, or equal to zero.
Indicates an error when direction has an illegal value.

1511

1

Intel® Integrated Performance Primitives Developer Guide and ReferenceippStsCoeffErr

Indicates an error when bilinear transformation is singular.

ippStsInterpolationErr

Indicates an error when interpolation has an illegal value.

ippStsWrongIntersectQuad

Indicates a warning that no operation is performed if thetransformed source image extended with borders has nointersection with the destination image.

See Also
WarpBilinear MODIFIED API. Performs bilinear warping of the source image using the specified
transform coefficients.
WarpBilinear
MODIFIED API. Performs bilinear warping of thesource image using the specified transform
coefficients.

SyntaxIppStatus ippiWarpBilinear_<mod>(const Ipp<datatype>* pSrc, IppiSize srcSize, int
srcStep, IppiRect srcRoi, Ipp<datatype>* pDst, int dstStep, IppiRect dstRoi, const
double coeffs[2][4], int interpolation, Ipp8u* pBuffer);
Supported values for mod:8u_C1R

16u_C1R

32f_C1R

8u_C3R

16u_C3R

32f_C3R

8u_C4R

16u_C4R

32f_C4R

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

srcSizesrcStep
srcRoi
pDst

1512

Pointer to the source image origin.An array ofseparate pointers to each plane in case of data
in planar format.
Size in pixels of the source image.
Distance in bytes between starts of consecutive
lines in the source image buffer.
Region of interest in the source image (of the
IppiRect type).
Pointer to the destination image origin. An arrayof separate pointers to each plane in case ofdata in planar format.

Developer Guide and Reference for Intel® Integrated Performance Primitives

dstStep
dstRoi1

Distance in bytes between starts of consecutive
lines in the destination image buffer.
Region of interest in the destination image (ofthe IppiRect type).

coeffsThe bilinear transform coefficients.

interpolation

Specifies the interpolation mode. Use one of thefollowing values:
IPPI_INTER_NN

Nearest neighbor interpolation

IPPI_INTER_LIN Linear interpolation
EAR
IPPI_INTER_CUB Cubic interpolationIC
IPPI_SMOOTH_ED Use edge smoothing in
addition to one of the aboveGEmodes.

pBuffer

Pointer to the external work buffer.

Description
Important The API of this function has been modified in Intel IPP 9.0 release.

This function operates with ROI (see ROI Processing in Geometric Transforms).
This bilinear warp function transforms the source image pixel coordinates (x,y) according to the following
formulas:x' = c00* x*y + c01* x + c02* y + c03
y' = c10* x*y + c11* x + c12* y + c13
where x' and y' denote the pixel coordinates in the transformed image, and cij are the bilinear transform
coefficients passed in the array coeffs.
The bilinear transform preserves equal distances between points on a line.
The transformed part of the source image is resampled using the interpolation mode specified by theinterpolation parameter, and written to the destination image ROI.
Figure “Bilinear Transform of an Image” gives an example of applying the bilinear warping function
ippiWarpBilinear to a sample image.
Bilinear Transform of an Image

1513

1

Intel® Integrated Performance Primitives Developer Guide and Reference

To estimate how the source image ROI will be transformed by the ippiWarpBilinear function, use functions
ippiWarpBilinearQuad and ippiGetBilinearBound. To calculate coefficients of the bilinear transformwhich maps source ROI to a given quadrangle, use ippiGetBilinearTransformfunction.
Before using this function, compute the size of the external work buffer pBuffer using the
WarpBilinearGetBufferSize function.
Example shows how to use the ippiWarpBilinear_32f_C1R function.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsStepErr
ippStsInterpolationErr
ippStsRectErr

ippStsCoeffErr
ippStsWrongIntersectROIErr
ippStsWrongIntersectQuad

Indicates no error.
Indicates an error condition if one of the specified pointers is

NULL.

Indicates an error condition if any image dimension has zero or
negative value.
Indicates an error condition if srcStep or dstStep has a zeroor negative value.
Indicates an error condition if interpolation has an illegal
value.
Indicates an error condition if width or height of theintersection of the srcRoi and source image is less than orequal to 1.
Indicates an error condition if coefficient values are invalid.
Indicates an error condition if srcRoi has no intersection withthe source image.
Indicates a warning that no operation is performed if thetransformed source ROI has no intersection with thedestination ROI.

See Also
Regions of Interest in Intel IPP
WarpBilinearQuad MODIFIED API. Performs bilinear warping of the source image that transforms
the given source quadrangle to the specified destination quadrangle.
GetBilinearBound Computes the bounding rectangle for the source ROI transformed by theippiWarpBilinear function.
GetBilinearTransform Computes bilinear transform coefficients to map the source ROI to thequadrangle with the specified vertex coordinates.
WarpBilinearGetBufferSize Computes the size of the work buffer for bilinear warping.
WarpBilinearBack
MODIFIED API. Performs an inverse bilinear warpingof the source image.

1514

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

SyntaxIppStatus ippiWarpBilinearBack_<mod>(const Ipp<datatype>* pSrc, IppiSize srcSize, int
srcStep, IppiRect srcRoi, Ipp<datatype>* pDst, int dstStep, IppiRect dstRoi, const
double coeffs[2][4], int interpolation, Ipp8u* pBuffer);
Supported values for mod:8u_C1R

16u_C1R

32f_C1R

8u_C3R

16u_C3R

32f_C3R

8u_C4R

16u_C4R

32f_C4R

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

srcSizesrcStep
srcRoipDst

dstStep
dstRoi

Pointer to the source image origin.An array ofseparate pointers to each plane in case of data
in planar format.
Size in pixels of the source image.
Distance in bytes between starts of consecutive
lines in the source image buffer.
Region of interest in the source image (of the
IppiRect type).
Pointer to the destination image origin. An arrayof separate pointers to each plane in case ofdata in planar format.
Distance in bytes between starts of consecutive
lines in the destination image buffer.
Region of interest in the destination image (ofthe IppiRect type).

coeffsThe bilinear transform coefficients.

interpolation

Specifies the interpolation mode. Use one of thefollowing values:
IPPI_INTER_NN

Nearest neighbor interpolation

IPPI_INTER_LIN Linear interpolation
EAR
IPPI_INTER_CUB Cubic interpolation.
IC
pBuffer

Pointer to the external work buffer.

1515

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Description
Important The API of this function has been modified in Intel IPP 9.0 release.

This function operates with ROI (see ROI Processing in Geometric Transforms).
This function performs the inverse transform to that defined by ippiWarpBilinear function. Pixelcoordinates x' and y' in the transformed image are obtained from the following equations

c00* x'*y' + c01* x' + c02* y' + c03 = x
c10* x'*y' + c11* x' + c12* y' + c13 = ywhere x and y denote the pixel coordinates in the source image, and coefficients cij are given in the arraycoeffs. Thus, you do not need to invert transform coefficients in your application program before calling
ippiWarpBilinearBack.
Note that inverse transform functions handle source and destination ROI in a different way than othergeometric transform functions. The implementation of the inverse transform functions has the following logic:••

Backward transform is applied to coordinates of each pixel in the destination ROI. The result iscoordinates of some pixel in the source image.
If the obtained source pixel is inside the source ROI, the corresponding pixel in the destination ROI is
modified accordingly; otherwise, no changes are made.

Before using this function, compute the size of the external work buffer pBuffer using the
WarpBilinearGetBufferSize function.
Example shows how to use the function ippiWarpBilinearBack_32f_C1R.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsStepErr
ippStsInterpolationErr
ippStsCoeffErr
ippStsWrongIntersectROIErr
ippStsWrongIntersectQuad

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointers is
NULL.
Indicates an error condition if any image dimension has zero or
negative value.
Indicates an error condition if srcStep or dstStep has a zeroor negative value.
Indicates an error condition if interpolation has an illegal
value.
Indicates an error condition if coefficient values are invalid.
Indicates an error condition if srcRoi has no intersection withthe source image.
Indicates a warning that no operation is performed if thetransformed source ROI has no intersection with thedestination ROI.

See Also
Regions of Interest in Intel IPP
WarpBilinear MODIFIED API. Performs bilinear warping of the source image using the specified
transform coefficients.
WarpBilinearGetBufferSize Computes the size of the work buffer for bilinear warping.

1516

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

WarpBilinearQuadGetBufferSize
Computes the size of the work buffer for bilinear
warping of an arbitrary quadrangle in the source
image ROI to the quadrangle in the destination image.

SyntaxIppStatus ippiWarpBilinearQuadGetBufferSize(IppiSize srcSize, IppiRect srcRoi, const
double srcQuad[4][2], IppiRect dstRoi, const double dstQuad[4][2], int interpolation,
int* pBufSize);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
srcSize

Size of the source image, in pixels.

srcRoi

Source image ROI (of the IppiRect type).

srcQuadQuadrangle in the source image.

dstRoi

Destination image ROI (of the IppiRect type).

dstQuadQuadrangle in the destination image.

interpolation

Interpolation mode. Supported values:

pBufSize

IPPI_INTER_NN

Nearest neighbor interpolation

IPPI_INTER_LINEAR

Linear interpolation

IPPI_INTER_CUBIC

Cubic interpolation

IPPI_INTER_EDGE

Use edge smoothing in addition to one of theabove modes

Pointer to the size, in bytes, of the external buffer.

Description
This function computes the size of the external work buffer required for bilinear warping of an arbitrary
quadrangle in the source image ROI to the quadrangle in the destination image. The result is stored in the
pBufSize parameter.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pBufSize is NULL.

ippStsSizeErr

Indicates an error:• If one of the ROI coordinates has a negative value.
• If one of the ROI dimensions is less than, or equal to zero.

1517

1

Intel® Integrated Performance Primitives Developer Guide and ReferenceippStsCoeffErr

Indicates an error when bilinear transformation is singular.

ippStsInterpolationErr

Indicates an error when interpolation has an illegal value.

See Also
WarpBilinearQuad MODIFIED API. Performs bilinear warping of the source image that transforms
the given source quadrangle to the specified destination quadrangle.
WarpBilinearQuad
MODIFIED API. Performs bilinear warping of thesource image that transforms the given source
quadrangle to the specified destination quadrangle.

SyntaxIppStatus ippiWarpBilinearQuad_<mod>(const Ipp<datatype>* pSrc, IppiSize srcSize, int
srcStep, IppiRect srcRoi, const double srcQuad[4][2], Ipp<datatype>* pDst, int dstStep,
IppiRect dstRoi, const double dstQuad[4][2], int interpolation, Ipp8u* pBuffer);
Supported values for mod:8u_C1R

16u_C1R

32f_C1R

8u_C3R

16u_C3R

32f_C3R

8u_C4R

16u_C4R

32f_C4R

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

srcSizesrcStep
srcRoisrcQuadpDst

dstStep

1518

Pointer to the source image origin. An array ofseparate pointers to each plane in case of data
in planar format.
Size in pixels of the source image.
Distance in bytes between starts of consecutive
lines in the source image buffer.
Region of interest in the source image (of the
IppiRect type).
A given quadrangle in the source image.
Pointer to the destination image origin. An arrayof separate pointers to each plane in case ofdata in planar format.
Distance in bytes between starts of consecutive
lines in the destination image buffer.

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

dstRoiRegion of interest in the destination image (ofthe IppiRect type).

dstQuadA given quadrangle in the destination image.

interpolation

Specifies the interpolation mode. Use one of thefollowing values:
IPPI_INTER_NN

Nearest neighbor interpolation

IPPI_INTER_LIN Linear interpolation
EAR
IPPI_INTER_CUB Cubic interpolationIC
IPPI_SMOOTH_ED Use edge smoothing in
addition to one of the aboveGEmodes.

pBuffer

Pointer to the external work buffer.

Description
Important The API of this function has been modified in Intel IPP 9.0 release.

This function operates with ROI (see ROI Processing in Geometric Transforms).
This functionapplies a bilinear transform to an arbitrary quadrangle srcQuad in the source image pSrc.
Theoperations take place only in the intersection of the source image ROI srcRoi and the source quadrangle
srcQuad. The function ippiWarpBilinearQuad uses the same formulas for pixel mapping as in the case of
the ippiWarpBilinear function. Transform coefficients are computed internally, based on the mapping of
the source quadrangle to the quadrangle dstQuad specified in the destination image pDst. The dstQuad
should have a non-empty intersection with the destination image ROI dstRoi.
The first dimension [4] of the array specifying the quadrangle srcQuad[4][2] or dstQuad[4][2] is equal to
the number of vertices, and the second dimension [2] holds x and y coordinates of the vertex.
Edge smoothing interpolation is applicable only if the source quadrangle lies in the source image ROI.
Before using this function, compute the size of the external work buffer pBuffer using the
WarpBilinearGetBufferSize function.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsStepErr
ippStsInterpolationErr
ippStsQuadErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointers is
NULL.
Indicates an error condition if any image dimension has zero or
negative value.
Indicates an error condition if srcStep or dstStep has a zeroor negative value.
Indicates an error condition if interpolation has an illegal
value.
Indicates an error condition if srcQuad or dstQuad degenerates
into triangle.

1519

1

Intel® Integrated Performance Primitives Developer Guide and ReferenceippStsWrongIntersectROIErr
ippStsWrongIntersectQuad

Indicates an error condition if srcRoi has no intersection withthe source image.
Indicates a warning that no operation is performed if thesrcRoi has no intersection with the srcQuad, or dstRoi has nointersection with the dstQuad.

See Also
Regions of Interest in Intel IPP
WarpBilinear MODIFIED API. Performs bilinear warping of the source image using the specified
transform coefficients.
WarpBilinearGetBufferSize Computes the size of the work buffer for bilinear warping.
MirrorMirrors an image about the specified axis (axes).

SyntaxCase 1: Not-in-place operation
IppStatus ippiMirror_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>* pDst,
int dstStep, IppiSize roiSize, IppiAxis flip);
Supported values for mod:8u_C1R

16u_C1R

16s_C1R

32s_C1R

32f_C1R

8u_C3R

16u_C3R

16s_C3R

32s_C3R

32f_C3R

8u_C4R

16u_C4R

16s_C4R

32s_C4R

32f_C4R

8u_AC4R

16u_AC4R

16s_AC4R

32s_AC4R

32f_AC4R

Case 2: In-place operation
IppStatus ippiMirror_<mod>(Ipp<datatype>* pSrcDst, int srcDstStep, IppiSize roiSize,
IppiAxis flip);
Supported values for mod:8u_C1IR

16u_C1IR

16s_C1IR

32s_C1IR

32f_C1IR

8u_C3IR

16u_C3IR

16s_C3IR

32s_C3IR

32f_C3IR

8u_C4IR

16u_C4IR

16s_C4IR

32s_C4IR

32f_C4IR

8u_AC4IR

16u_AC4IR

16s_AC4IR

32s_AC4IR

32f_AC4IR

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

1520

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Parameters
Pointer to the source buffer.

pSrc

Distance, in bytes, between the starting pointsof consecutive lines in the source image buffer.
Pointer to the destination buffer.

srcStep
pDst

Distance, in bytes, between the starting pointsof consecutive lines in the destination image
buffer.
Pointer to the source and destination buffer for
the in-place operation.
Distance, in bytes, between the starting pointsof consecutive lines in the source anddestination image buffer for the in-place
operation.
Size of the destination ROI in pixels.

dstStep

pSrcDstsrcDstStep

roiSize

Specifies the axis to mirror the image about.
Use the following values to specify the axes:

flip

ippAxsHorizont for the horizontal axis.
alippAxsVertical for the vertical axis.
ippAxsBoth
ippAxs45
ippAxs135

for both horizontal and verticalaxes.
for the 45-degree rotated axis.
for the 135-degree rotatedaxis.

Description
The ippiMirror function operates with ROI (see Regions of Interest in Intel IPP). This function mirrors thesource image pSrc about the axis (axes) specified by the value of the flip parameter and writes the result
to the destination image pDst. Each function flavor can mirror an image about the horizontal or vertical axis
or both.
The ippiMirror_8u_C1R, ippiMirror_16u_C1R, ippiMirror_16s_C1R, and ippiMirror_32f_C1Rfunction flavors can also use the ippAxs45 or ippAxs135 value of the flip parameter to mirror the source
image about an axis rotated counterclockwise by 45 degrees or 135 degrees, respectively. For mirroring witheach of these values of the flip parameter, the sizes of the source and destination ROI are different, androiSize.height = srcRoiSize.width
roiSize.width = srcRoiSize.height

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointers is

NULL.

Indicates an error condition if roiSize has a field with zero or
negative value, or when one of the dimensions is equal to 1.

1521

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Indicates an error condition if flip has an illegal value.

ippStsMirrorFlipErr
ippStsNotSupportedModeErr
ippStsStepErr

Indicates an error condition if intersection of the source anddestination ROI is detected.
Indicates an error condition if srcStep or dstStep has a zero or
negative value or is not a multiple of the image data size (4 forfloating-point images or 2 for short-integer images)

ExamplesMirror1:
Mirror2:

Remap
Performs the look-up coordinate mapping of pixels of
the source image.

SyntaxCase 1: Operation on pixel-order data
IppStatus ippiRemap_<mod>(const Ipp<datatype>* pSrc, IppiSize srcSize, int srcStep,
IppiRect srcRoi, const Ipp32f* pxMap, int xMapStep, const Ipp32f* pyMap, int yMapStep,
Ipp<datatype>* pDst, int dstStep, IppiSize dstRoiSize, int interpolation);
Supported values for mod:8u_C1R

16u_C1R

16s_C1R

32f_C1R

8u_C3R

16u_C3R

16s_C3R

32f_C3R

8u_C4R

16u_C4R

16s_C4R

32f_C4R

16u_AC4R

16s_AC4R

32f_AC4R

IppStatus ippiRemap_<mod>(const Ipp<datatype>* pSrc, IppiSize srcSize, int srcStep,
IppiRect srcRoi, const Ipp64f* pxMap, int xMapStep, const Ipp64f* pyMap, int yMapStep,
Ipp<datatype>* pDst, int dstStep, IppiSize dstRoiSize, int interpolation);
Supported values for mod:64f_C1R
64f_C3R
64f_C4R
64f_AC4R
IppStatus ippiRemap_8u_AC4R(const Ipp<datatype>* pSrc, IppiSize srcSize, int srcStep,
IppiRect srcRoi, const Ipp32f* pxMap, int xMapStep, const Ipp32f* pyMap, int yMapStep,
Ipp<datatype>* pDst, int dstStep, IppiSize dstRoiSize, int interpolation);

Include Files
ippi.h1522

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source image origin. An array of separate pointers toeach plane in case of data in planar format.

srcSizeSize, in pixels, of the source image.

srcStep

Distance, in bytes, between the starting points of consecutive lines inthe source image buffer.

srcRoiRegion of interest in the source image (of the IppiRect type).

pxMap, pyMap

Pointers to the starts of 2D buffers, containing tables of the x- and ycoordinates.

xMapStep, yMapStep

Steps, in bytes, through the buffers containing tables of the x- and ycoordinates.

pDst

Pointer to the destination image ROI. An array of separate pointers to
ROI in each plane for planar image.

dstStep

Distance, in bytes, between the starting points of consecutive lines inthe destination image buffer.

dstRoiSize

Size of the destination ROI in pixels.

interpolation

Specifies the interpolation mode. Possible values are:

IPPI_INTER_NN - nearest neighbor interpolation
IPPI_INTER_LINEAR - linear interpolation
IPPI_INTER_CUBIC - cubic interpolation
IPPI_INTER_LANCZOS - interpolation with Lanczos window
IPPI_INTER_CUBIC2P_CATMULLROM - Catmull-Rom spline
the following flag is used additionally to the above modes:

IPPI_SMOOTH_EDGE - edge smoothing

Description
This function operates with ROI (see ROI Processing in Geometric Transforms).
This function transforms the source image by remapping its pixels. Pixel remapping is performed using
pxMap and pyMap buffers to look-up the coordinates of the source image pixel that is written to the target
destination image pixel. The application has to supply these look-up tables. The remapping of the source
pixels to the destination pixels is made according to the following formula:

dst_pixel[i, j]=src_pixel[pxMap[i, j], pyMap[i, j]]where i,j are the x- and y-coordinates of the target destination image pixel dst_pixel;

1523

1

Intel® Integrated Performance Primitives Developer Guide and Reference

pxMap[i, j] contains the x- coordinates of the source image pixels src_pixel that are written to
dst_pixel;
pyMap[i, j] contains the y- coordinates of the source image pixels src_pixel that are written to
dst_pixel.
If the referenced coordinates correspond to a pixel outside of the source ROI, and the flag

IPPI_SMOOTH_EDGE is not set, then no mapping of the source pixel is performed.
Figure “Remapping the Sample Image” gives an example of applying the function ippiRemap to a sample
image that is a square grid of alternating blue, red, and green lines.
Remapping the Sample Image

The transformed part of the image is resampled using the interpolation method specified by theinterpolation parameter, and is written to the destination image ROI. The function can be used with orwithout edge smoothing. The pseudo code below shows how it works.
The function works without edge smoothing - the flag IPPI_SMOOTH_EDGE is not set:if ( xMap < srcRoi . x || xMap > srcRoi . x + srcRoi . width -1 || yMap < srcRoi . y ||yMap > srcRoi . y + srcRoi . height -1)
not fill dst
else

1524

/* do not remap */Developer Guide and Reference for Intel® Integrated Performance Primitives

fill dst with Interpolate(Src, xMap, yMap)

1/* remap */The function works with edge smoothing - the flag IPPI_SMOOTH_EDGE is set:if (xMap < srcRoi.x - 1 || xMap > srcRoi.x+srcRoi.width || yMap < srcRoi.y - 1 || yMap
> srcRoi.y+srcRoi.height)
not fill dst/* do not remap */else if (xMap < srcRoi.x || xMap > srcRoi.x+srcRoi.width-1 || yMap < srcRoi.y || yMap >srcRoi.y+srcRoi.height-1)
fill dst with Interpolate(Src, fillvalue, xMap, yMap)/* smoothing */elsefill dst with Interpolate(Src, xMap, yMap)/* remap */If the width or height of the input image pSrc is insufficient for the interpolation method specified by theparameter interpolation, the function uses interpolation with a smaller number of pixels for both widthand height dimensions. See the following pseudocode:

if (width < 6 || height < 6) {inter== lanczos ? inter = cubic;
if ( (width < 4 || height < 4) && ( inter == cubic || inter == catmullrom) )inter = linear;
if (width == 1 || height == 1)
inter = nearest;}

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsStepErr
ippStsInterpolationErr
ippStsWrongIntersectROIErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointers is
NULL.
Indicates an error condition if srcSize or dstRoiSize has afield with zero or negative value.
Indicates an error condition if one of the srcStep, dstStep,xMapStep, or yMapStep has a zero or negative value.
Indicates an error condition if interpolation has an illegal
value.
Indicates an error condition if srcRoi has no intersection withthe source image.

ExampleMiscellaneous Image Transforms
This section describes the Intel® IPP image processing functions that perform adaptive thresholding of theimage ROI.

ThresholdAdaptiveBoxGetBufferSize
Computes the size of the work buffer for adaptive
thresholding with the Box method.

1525

1

Intel® Integrated Performance Primitives Developer Guide and Reference

SyntaxIppStatus ippiThresholdAdaptiveBoxGetBufferSize(IppiSize roiSize, IppiSize maskSize,
IppDataType dataType, int numChannels, int* pBufferSize);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
roiSize

Size of the destination image ROI, in pixels.

maskSize

Size of the kernel that is used to calculate a threshold level. Width andheight of maskSize must be equal and odd.

dataType

Data type of the source and destination images. Possible value is ipp8u.

numChannels

Number of channels in the images. Possible value is 1.

pBufferSize

Pointer to the size, in bytes, of the external work buffer.

Description
This function computes the size, in bytes, of the external work buffer needed for theThresholdAdaptiveBox function. The result is stored in pBufferSize.
For an example on how to use this function, refer to the example provided with the ThresholdAdaptiveBox
function description.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error when pBufferSize is NULL.

ippStsSizeErr
ippStsMaskSizeErr

Indicates an error when roiSize has a field with a zero or negativevalue.
Indicates an error when maskSize has a field with a zero or negativevalue, or fields of maskSize are not equal.

ippStsDataTypeErr

Indicates an error when dataType has an illegal value.

ippStsNumChannelsErr

Indicates an error when numChannels has an illegal value.

See Also
ThresholdAdaptiveBox Performs adaptive thresholding with the Box method.
ThresholdAdaptiveBox
Performs adaptive thresholding with the Box method.

SyntaxIppStatus ippiThresholdAdaptiveBox_8u_C1R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst,
int dstStep, IppiSize roiSize, IppiSize maskSize, Ipp32f delta, Ipp8u valGT, Ipp8u
valLE, IppiBorderType borderType, Ipp8u borderValue, Ipp8u* pBuffer);
1526

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

IppStatus ippiThresholdAdaptiveBox_8u_C1IR(Ipp8u* pSrcDst, int srcDstStep, IppiSize
roiSize, IppiSize maskSize, Ipp32f delta, Ipp8u valGT, Ipp8u valLE, IppiBorderTypeborderType, Ipp8u borderValue, Ipp8u* pBuffer);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc
srcStep
pDst
dstStep
pSrcDstsrcDstStep
roiSize

Pointer to the source image ROI.
Distance, in bytes, between the starting points of consecutive lines
in the source image.
Pointer to the destination image ROI.
Distance, in bytes, between the starting points of consecutive lines
in the destination image.
Pointer to the source and destination image ROI (for the in-place
function).
Distance, in bytes, between the starting points of consecutive lines
in the source and destination image (for the in-place function).
Size of the destination image ROI, in pixels.

maskSize

Size of the kernel that is used to calculate a threshold level. Width andheight of maskSize must be equal and odd.

delta

Value for threshold calculation.

valGT

Output pixel if the source pixel value is more than threshold.

valLE

Output pixel if the source pixel value is less than, or equal tothreshold.

borderType

Type of border. Possible values are:ippBorderConst
ippBorderRepl
ippBorderInMem

Values of all border pixels are set to a
constant.
Border is replicated from the edge pixels.
Border is obtained from the source image
pixels in memory.

Mixed borders are also supported. They can be obtained by the bitwise
operation OR between ippBorderRepl or ippBorderConst and thefollowing flags:••••

ippBorderInMemTop
ippBorderInMemBottom
ippBorderInMemLeft
ippBorderInMemRight

Each of these flags means that for the corresponding border the outside
pixels of the source image are in memory.

1527

1

Intel® Integrated Performance Primitives Developer Guide and Reference

borderValue

Constant value(s) to assign to pixels of the constant border. This parameter
is applicable only to the ippBorderConst border type.

pBuffer

Pointer to the work buffer. To calculate the size of the temporary
buffer, use the ThresholdAdaptiveBoxGetBufferSize function.

Description
This function performs adaptive thresholding of the source image ROI using the Box method. Output pixels
are calculated according to the following formulas:pDst(x,y) = valGT, if pSrc(x,y) > T(x,y)
pDst(x,y) = valLE, if pSrc(x,y) <= T(x,y)
where
T(x,y) is a mean of the maskSize.width*maskSize.height neighborhood of a (x, y) pixel minus delta.
Before using this function, compute the size of the external work buffer using theThresholdAdaptiveBoxGetBufferSize function.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrc, pDst, pSrcDst, or pBuffer is
NULL.

ippStsSizeErr
ippStsMaskSizeErr
ippStsBorderErr

Indicates an error when roiSize has a field with a zero or
negative value.
Indicates an error when maskSize has a field with a zero or
negative value, or fields of maskSize are not equal.
Indicates an error when borderType has an illegal value.

ExampleThe code example below demonstrates how to use the ippiThresholdAdaptiveBox_8u_C1R andThresholdAdaptiveBoxGetBufferSize functions.

IppStatus threshold_adaptive_box_8u_c1( void ) {Ipp8u pSrc[8*8] ={0, 255,
1, 254,2, 253,3, 252,251,
4, 250,5, 249,6, 248,7,
8, 247,
9, 246, 10, 245, 11, 244,
243, 12 , 242, 13, 241, 14, 240, 15,
16, 239, 17, 238, 18, 237, 19, 236,
235, 20, 234, 21, 233, 22, 232, 23,
24, 231, 25, 230, 26, 229, 26, 228,
227, 27, 226, 28, 225, 29, 224, 30};
Ipp8u
pDst[8*8];
IppiSize roiSize = {8, 8};
IppiSize maskSize = {3, 3};
IppiBorderType borderType = ippBorderConst;
int
srcStep = 8 * sizeof(Ipp8u);
int
dstStep = 8 * sizeof(Ipp8u);
int
bufferSize;
IppStatus status;
Ipp32f delta = 0.5f;
1528

Developer Guide and Reference for Intel® Integrated Performance Primitives

Ipp8u
Ipp8u
Ipp8u

1

valGT = 254;
valLE = 1;
*pBuffer;

ippiThresholdAdaptiveBoxGetBufferSize(roiSize, maskSize, ipp8u, 1, &bufferSize);pBuffer = ippsMalloc_8u(bufferSize);
ippiThresholdAdaptiveBox_8u_C1R(pSrc, srcStep, pDst, dstStep, roiSize, maskSize, delta,
valGT, valLE, borderType, 33, pBuffer);
ippsFree(pBuffer);
return status;}
pDst after function execution:
1 254
1 254
1 254
1 254
254
1 254
1 254
1 254
1
1 254
1 254
1 254
1 254
254
1 254
1 254
1 254
1
1 254
1 254
1 254
1 254
254
1 254
1 254
1 254
1
1 254
1 254
1 254
1 254
254
1 254
1 254
1 254
1

See Also
ThresholdAdaptiveBoxGetBufferSize Computes the size of the work buffer for adaptive
thresholding with the Box method.
ThresholdAdaptiveGaussGetBufferSize
Computes the size of the adaptive thresholdspecification structure and the size of the work buffer
for adaptive thresholding with the Gaussian method.

SyntaxIppStatus ippiThresholdAdaptiveGaussGetBufferSize(IppiSize roiSize, IppiSize maskSize,
IppDataType dataType, int numChannels, int* pSpecSize, int* pBufferSize);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
roiSize

Size of the destination image ROI, in pixels.

maskSize

Size of the kernel that is used to calculate a threshold level. Width andheight of maskSize must be equal and odd.

dataType

Data type of the source and destination images. Possible value is ipp8u.

numChannels

Number of channels in the images. Possible value is 1.

pSpecSize

Pointer to the size of the adaptive threshold specification structure.

1529

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Pointer to the size (in bytes) of the external work buffer.

pBufferSize

Description
This function computes the size, in bytes, of the adaptive threshold specification structure and the size of theexternal work buffer needed for the ThresholdAdaptiveGauss function. The results are stored in
pSpecSize and pBufferSize.
For an example on how to use this function, refer to the example provided with theThresholdAdaptiveGauss function description.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error when pSpecSize or pBufferSize is NULL.

ippStsSizeErr
ippStsMaskSizeErr

Indicates an error when roiSize has a field with a zero or negativevalue.
Indicates an error when maskSize has a field with a zero or negativevalue, or fields of maskSize are not equal.

ippStsDataTypeErr

Indicates an error when dataType has an illegal value.

ippStsNumChannelsErr

Indicates an error when numChannels has an illegal value.

See Also
ThresholdAdaptiveGauss Performs adaptive thresholding with the Gaussian method.
ThresholdAdaptiveGaussInit
Initializes the threshold adaptive specification
structure for adaptive thresholding with the Gaussian
method.

SyntaxIppStatus ippiThresholdAdaptiveGaussInit(IppiSize roiSize, IppiSize maskSize,
IppDataType dataType, int numChannels, Ipp32f sigma, IppiThresholdAdaptiveSpec* pSpec);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
roiSize

Size of the destination image ROI, in pixels.

maskSize

Size of the kernel that is used to calculate a threshold value. Width andheight of maskSize must be equal and odd.

dataType

Data type of the source and destination images. Possible value is ipp8u.

numChannels

Number of channels in the images. Possible value is 1.

1530

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

sigma

Value of sigma that is used to calculate a threshold value for the Gaussian
method. If sigma value is less than, or equal to zero, sigma is set
automatically in compliance with the kernel size.

pSpec

Pointer to the adaptive threshold specification structure.

Description
This function initializes the adaptive threshold specification structure pSpec for adaptive thresholding with
the Gaussian method. Before using this function, compute the size of the specification structure using theThresholdAdaptiveGaussGetBufferSize function.
If sigma is less than, or equal to zero, it is set according to the following formula:sigma=0.3*((maskSize.width - 1)*0.5 - 1) + 0.8
For an example on how to use this function, refer to the example provided with theThresholdAdaptiveGauss function description.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error when pSpecSize is NULL.

ippStsSizeErr
ippStsMaskSizeErr

Indicates an error when dstRoiSize has a field with a zero or negativevalue.
Indicates an error when maskSize has a field with a zero or negativevalue, or fields of maskSize are not equal.

ippStsDataTypeErr

Indicates an error when dataType has an illegal value.

ippStsNumChannelsErr

Indicates an error when numChannels has an illegal value.

See Also
ThresholdAdaptiveGaussGetBufferSize Computes the size of the adaptive threshold specification
structure and the size of the work buffer for adaptive thresholding with the Gaussian method.
ThresholdAdaptiveGauss Performs adaptive thresholding with the Gaussian method.
ThresholdAdaptiveGauss
Performs adaptive thresholding with the Gaussian
method.

SyntaxIppStatus ippiThresholdAdaptiveGauss_8u_C1R(const Ipp8u* pSrc, int srcStep, Ipp8u*
pDst, int dstStep, IppiSize roiSize, Ipp32f delta, Ipp8u valGT, Ipp8u valLE,
IppiBorderType borderType, Ipp8u borderValue, IppiThresholdAdaptiveSpec* pSpec, Ipp8u*
pBuffer);
IppStatus ippiThresholdAdaptiveGauss_8u_C1IR(Ipp8u* pSrcDst, int srcDstStep, IppiSize
roiSize, Ipp32f delta, Ipp8u valGT, Ipp8u valLE, IppiBorderType borderType, Ipp8u
borderValue, IppiThresholdAdaptiveSpec* pSpec, Ipp8u* pBuffer);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h

1531

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc
srcStep
pDst

Pointer to the source image ROI.
Distance, in bytes, between the starting points of consecutive lines
in the source image.
Pointer to the destination image ROI.

roiSize

Distance, in bytes, between the starting points of consecutive lines
in the destination image.
Pointer to the source and destination image ROI (for the in-place
function).
Distance, in bytes, between the starting points of consecutive lines
in the source and destination image (for the in-place function).
Size of the destination image ROI, in pixels.

delta

Value for threshold calculation.

valGT

Output pixel if the source pixel value is more than threshold.

valLE

Output pixel if the source pixel value is less than, or equal tothreshold.

borderType

Type of border. Possible values are:dstStep
pSrcDstsrcDstStep

ippBorderConst
ippBorderRepl
ippBorderInMem

Values of all border pixels are set to a
constant.
Border is replicated from the edge pixels.
Border is obtained from the source image
pixels in memory.

Mixed borders are also supported. They can be obtained by the bitwise
operation OR between ippBorderRepl or ippBorderConst and thefollowing flags:••••

ippBorderInMemTop
ippBorderInMemBottom
ippBorderInMemLeft
ippBorderInMemRight

Each of these flags means that for the corresponding border the outside
pixels of the source image are in memory.

borderValue

Constant value(s) to assign to pixels of the constant border. This parameter
is applicable only to the ippBorderConst border type.

pSpec

Pointer to the adaptive threshold specification structure.

pBuffer

Pointer to the work buffer. To calculate the size of the temporary
buffer, use the ThresholdAdaptiveGaussGetBufferSize function.

Description
This function performs adaptive thresholding of the source image ROI using the Gaussian method. Output
pixels are calculated according to the following formulas:pDst(x,y) = valGT if pSrc(x,y) > T(x,y)

1532

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

pDst(x,y) = valLE if pSrc(x,y) <= T(x,y)
where
T(x,y) is a weighted sum (cross-correlation with a Gaussian window) of themaskSize.width*maskSize.height neighborhood of a (x, y) pixel minus delta.
The function uses a separable Gaussian filter. Filter coefficients are computed according to the following
formula:Gi = A * exp( - (i-(maskSize.width-1)/2)2)/(0.5 * sigma2)
where
A is a scale factor for ∑iGi = 1 (i = 0, ..., maskSize.width-1)
Before using this function, compute the size of the external work buffer and specification structure using theThresholdAdaptiveGaussGetBufferSize function, and initialize the structure using theThresholdAdaptiveGaussInit function.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrc, pDst, pSrcDst, pSpec, or pBuffer
is NULL.

ippStsContextMatchErr

Indicates an error when roiSize has a field with a zero or
negative value.
Indicates an error when pSpec does not match.

ippStsBorderErr

Indicates an error when borderType has an illegal value.

ippStsSizeErr

ExampleThe code example below demonstrates how to use the ippiThresholdAdaptiveGauss_8u_C1R,
ThresholdAdaptiveGaussGetBufferSize, and ThresholdAdaptiveGaussInit functions.

IppStatus threshold_adaptive_gauss_8u_c1( void ) {Ipp8u pSrc[8*8] ={0, 255,
1, 254,2, 253,3, 252,251,
4, 250,5, 249,6, 248,7,
8, 247,
9, 246, 10, 245, 11, 244,
243, 12 , 242, 13, 241, 14, 240, 15,
16, 239, 17, 238, 18, 237, 19, 236,
235, 20, 234, 21, 233, 22, 232, 23,
24, 231, 25, 230, 26, 229, 26, 228,
227, 27, 226, 28, 225, 29, 224, 30};
Ipp8u
pDst[8*8];
IppiSize roiSize = {8, 8};
IppiSize maskSize = {3, 3};
IppiBorderType borderType = ippBorderConst;
int
srcStep = 8 * sizeof(Ipp8u);
int
dstStep = 8 * sizeof(Ipp8u);
int
bufferSize;
int
specSize;
IppStatus status;
Ipp32f sigma = 10.0f;
Ipp32f delta = 0.5f;
Ipp8u
valGT = 254;

1533

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Ipp8u
valLE = 1;
IppiThresholdAdaptiveSpec *pSpec;
Ipp8u*pBuffer;
ippiThresholdAdaptiveGaussGetBufferSize(roiSize, maskSize, ipp8u, 1, &specSize, &bufferSize);
pSpec = (IppiThresholdAdaptiveSpec *)ippsMalloc_8u(specSize);pBuffer = ippsMalloc_8u(bufferSize);
ippiThresholdAdaptiveGaussInit(roiSize, maskSize, ipp8u, 1, sigma, pSpec);
ippiThresholdAdaptiveGauss_8u_C1R(pSrc, srcStep, pDst, dstStep, roiSize, delta, valGT,
valLE, borderType, 33, pSpec, pBuffer);
ippsFree(pBuffer);
ippsFree(pSpec);
return status;}
pDst after function execution:
1 254
1 254
1 254
1 254
254
1 254
1 254
1 254
1
1 254
1 254
1 254
1 254
254
1 254
1 254
1 254
1
1 254
1 254
1 254
1 254
254
1 254
1 254
1 254
1
1 254
1 254
1 254
1 254
254
1 254
1 254
1 254
1

See Also
ThresholdAdaptiveGaussGetBufferSize Computes the size of the adaptive threshold specification
structure and the size of the work buffer for adaptive thresholding with the Gaussian method.
ThresholdAdaptiveGaussInit Initializes the threshold adaptive specification structure for adaptive
thresholding with the Gaussian method.

Wavelet Transforms
Intel® IPP implements image processing functions that perform two-dimensional discrete wavelet transform(DWT).
In many applications the multiresolution analysis by discrete wavelet transforms is a better alternative towindowing and discrete Fourier analysis techniques. On the one hand, the forward two-dimensional wavelet
transform may be considered as a decomposition of an image on the base of functions bounded or localizedin space; and on the other, the wavelet transforms are related to subband filtering and resampling.
Intel IPP for image processing contains one-level discrete wavelet decomposition and reconstruction
functions. It also provides the necessary interface for initialization and deallocation of the transform context
structure.
The wavelet transform type can be set by specifying the appropriate filter taps in the initialization function.
Note that Intel IPP supports only one-dimensional finite impulse response filters for separable convolution.

1534

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

The Intel IPP functions for wavelet decomposition and reconstruction use fast polyphase algorithm, which isequivalent to traditional application of separable convolution and dyadic resampling in different order. Figure“Equivalent Scheme of Wavelet Decomposition Algorithm” shows the equivalent algorithm of wavelet-based
image decomposition:
Equivalent Scheme of Wavelet Decomposition Algorithm

Decomposition operation applied to a source image produces four output images of equal size: approximation
image, horizontal detail image, vertical detail image, and diagonal detail image.
These decomposition components have the following meaning:••••

The ‘approximation' image is obtained by vertical and horizontal lowpass filtering.
The ‘horizontal detail' image is obtained by vertical highpass and horizontal lowpass filtering.
The ‘vertical detail' image is obtained by vertical lowpass and horizontal highpass filtering.
The ‘diagonal detail' image is obtained by vertical and horizontal highpass filtering.

The above image names are used in this document for identification convenience only.
The wavelet-based image reconstruction can be represented by a sequence of separate convolution anddyadic upsampling.
The reconstruction function uses four input images that are the same as those resulting from thedecomposition operation.
Figure “Equivalent Scheme of Wavelet Reconstruction Algorithm” shows the equivalent algorithm of wavelet
reconstruction of an image.

1535

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Wavelet transform functions support regions of interest (ROI, see Regions of Interest in Intel IPP) in theimages. However, these functions do not perform internally any border extensions of image ROI data. It
means that source images must already contain all border data that are necessary for convolution
operations. See descriptions of the functions ippiWTFwd and ippiWTInv for detailed information on how to
calculate extended image border sizes.
Equivalent Scheme of Wavelet Reconstruction Algorithm

WTFwdGetSize
Calculates the size of the specification structure andwork buffer for a forward wavelet transform.

SyntaxIppStatus ippiWTFwdGetSize_32f(int numChannels, int lenLow, int anchorLow, int lenHigh,int anchorHigh, int* pSpecSize, int* pBufSize);
1536

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
numChannels

Number of channels in the image. Possible values are 1 or 3.

lenLow

Length of the lowpass filter.

anchorLow

Anchor position of the lowpass filter.

lenHighLength of the highpass filter.

anchorHigh

Anchor position of the highpass filter.

pSpecSizepBufSize

Pointer to the computed size of the ippiWTFwd specification
structure, in bytes.
Pointer to the computed size of the work buffer, in bytes.

Description
This function computes the size, in bytes, of the specification structure and work buffer required for theforward wavelet transform function ippiWTFwd.
For an example on how to use this function, refer to the example provided with the ippiWTInv function
description.

Return Values

ippStsNullPtrErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error when any of the specified pointers is NULL.

ippStsNumChannlesErr

Indicates an error when numChannels has an illegal value.

ippStsNumChannlesErr

Indicates an error when lenLow or lenHigh is less than 2.

ippStsAnchorErr

Indicates an error when anchorLow or anchorHigh is less thanzero.

ippStsNoErr

See Also
WTFwd Performs one-level wavelet decomposition of an image.
WTInv Performs one-level wavelet reconstruction of an image.
WTFwdInit
Initializes the forward wavelet transform context
structure.

SyntaxIppStatus ippiWTFwdInit_32f_C1R(IppiWTFwdSpec_32f_C1R* pSpec, const Ipp32f* pTapsLow,
int lenLow, int anchorLow, const Ipp32f* pTapsHigh, int lenHigh, int anchorHigh);
IppStatus ippiWTFwdInit_32f_C3R(IppiWTFwdSpec_32f_C3R* pSpec, const Ipp32f* pTapsLow,
int lenLow, int anchorLow, const Ipp32f* pTapsHigh, int lenHigh, int anchorHigh);
1537

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters

pTapsLow

Double pointer to the forward wavelet transform specification
structure.
Pointer to lowpass filter taps.

lenLow

Length of the lowpass filter.

anchorLow

Anchor position of the lowpass filter.

pTapsHigh

Pointer to highpass filter taps.

lenHighLength of the highpass filter.

anchorHigh

Anchor position of the highpass filter.

pSpec

Description
This function initializes the specification structure pSpec for a one-level wavelet decomposition.
The forward wavelet transform specification structure contains parameters of a wavelet filter bank used forimage decomposition. The filter bank consists of two analysis filters and includes the lowpass decomposition
filter (or coarse filter) and the highpass decomposition filter (or detail filter).
The parameters pTapsLow and pTapsHigh specify coefficients, and anchorLow and anchorHigh - anchor
positions for two synthesis filters. The anchor value sets the initial leftmost filter position relative to image
row or column as shown in the figure below:
Anchor Value and Initial Filter Position for Wavelet Decomposition

Here a stands for anchor value, N is filter length, x0 is the starting pixel of the processed row or column, andx-1, x-2 ,... are the additional border pixels that are needed for calculations. The anchor value and filter
length completely determine right, left, top, and bottom border sizes for the source image used indecomposition. The corresponding C-language expressions to calculate border sizes are given in thedescription of ippiWTFwd function.
For an example on how to use this function, refer to the example provided with the ippiWTInv function
description.

1538

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Return Values

ippStsNullPtrErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error when any of the specified pointers is NULL.

ippStsNumChannelsErr

Indicates an error when numChannels has an illegal value.

ippStsNoErr

ippStsSizeErr
ippStsAnchorErr

Indicates an error when filter length lenLow or lenHigh is lessthan 2.
Indicates an error when anchor position anchorLow oranchorHigh is less than zero.

See Also
WTFwdGetSize Calculates the size of the specification structure and work buffer for a forward
wavelet transform.
WTFwd Performs one-level wavelet decomposition of an image.
WTInv Performs one-level wavelet reconstruction of an image.
WTFwd
Performs one-level wavelet decomposition of animage.

SyntaxIppStatus ippiWTFwd_32f_C1R (const Ipp32f* pSrc, int srcStep, Ipp32f* pApproxDst, int
approxStep, Ipp32f* pDetailXDst, int detailXStep, Ipp32f* pDetailYDst, int detailYStep,
Ipp32f* pDetailXYDst, int detailXYStep, IppiSize dstRoiSize, const
IppiWTFwdSpec_32f_C1R* pSpec, Ipp8u* pBuffer);
IppStatus ippiWTFwd_32f_C3R (const Ipp32f* pSrc, int srcStep, Ipp32f* pApproxDst, int
approxStep, Ipp32f* pDetailXDst, int detailXStep, Ipp32f* pDetailYDst, int detailYStep,
Ipp32f* pDetailXYDst, int detailXYStep, IppiSize dstRoiSize, const
IppiWTFwdSpec_32f_C3R* pSpec, Ipp8u* pBuffer);

Include Files
ippi.hParameters
pSrc
srcStep
pApproxDst
approxStep
pDetailXDst
detailXStep
pDetailYDst
detailYStep

Pointer to the source image ROI.
Distance, in bytes, between the starting points of consecutive lines
in the source image buffer.
Pointer to ROI of the destination approximation image.
Distance, in bytes, between the starting points of consecutive lines
in the approximation image buffer.
Pointer to ROI of the destination horizontal detail image.
Distance, in bytes, between the starting points of consecutive lines
in the horizontal detail image buffer.
Pointer to ROI of the destination vertical detail image.
Distance, in bytes, between the starting points of consecutive lines
in the vertical detail image buffer.

1539

1

Intel® Integrated Performance Primitives Developer Guide and Reference

pDetailXYDst
detailXYStep
dstRoiSize
pSpec
pBuffer

Pointer to ROI of the destination diagonal detail image.
Distance, in bytes, between the starting points of consecutive lines
in the diagonal detail image buffer.
Size of the ROI in pixels for all destination images.
Pointer to the allocated and initialized forward DWT specification
structure.
Pointer to the allocated buffer for intermediate operations

Description
This function operates with ROI (see Regions of Interest in Intel IPP). This function performs one-level
wavelet decomposition of a source image pointed to by pSrc into four destination subimages pointed to bypApproxDst, pDetailXDst, pDetailYDst, and pDetailXYDst. See Figure “Equivalent Scheme of
Wavelet Decomposition Algorithm” for the equivalent algorithm of ippiWTFwd function operation.
Wavelet parameters are contained in the forward transform specification structure pSpec. Before using thisfunction, compute the size of the structure and work buffer using the WTFwdGetSize function and initialize
the structure using WTFwdInit.
Product and Performance Information
Performance varies by use, configuration and other factors. Learn more at www.Intel.com/
PerformanceIndex.
Notice revision #20201201
The pointer pSrc points to memory location of the source image rectangular ROI of size srcWidth bysrcHeight which is uniquely determined by the size of destination ROI as:
srcWidth = 2 * dstRoiSize.width
srcHeight = 2 * dstRoiSize.heightThe source image ROI size always has even dimensions, as it is computed from the dstRoiSize parameteras follows:
srcRoiSize.width = 2 * dstRoiSize.width
srcRoiSize.height = 2 * dstRoiSize.height
To use this function for images with uneven width or height, you should truncate the last column/row or
extend an image to even dimensions.

NOTE
The source image ROI does not include border pixels necessary to compute somedestination pixels. It means that prior to using ippiWTFwd function the application program
must apply some border extension model (symmetrical, wraparound or another) to thesource image ROI through filling of neighboring memory locations. As a result, the size ofmemory block allocated for the source image must be extended to accommodate for added
border pixels outside ROI formal boundaries.

1540

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Figure “Extended Source Image for Wavelet Decomposition” schematically shows the source image ROI and
extended image area.
Extended Source Image for Wavelet Decomposition

Use the following C-language expressions to calculate extended image border sizes:

int leftBorderLow= lenLow- 1 - anchorLow;
int leftBorderHigh = lenHigh - 1 - anchorHigh;int rightBorderLow = anchorLow;
int rightBorderHigh = anchorHigh;int leftTopBorder= IPP_MAX(leftBorderLow, leftBorderHigh);
int rightBottomBorder = IPP_MAX(rightBorderLow, rightBorderHigh);
See the description of the function WTFwdInit for the explanation of the parameters.
Note that the left and top borders have equal size. The same holds for the right and bottom borders whichhave equal size too.
The size of the source image area extended by border pixels can be defined as

srcWidthWithBorders = srcWidth + leftTopBorder + rightBottomBorder;
srcHeightWithBorders = srcHeight + leftTopBorder + rightBottomBorder;
All destination images have equal size specified by the parameter dstRoiSize.
Conversely, to perform a wavelet reconstruction of the full size source image from the component images
obtained by decomposition, use extended component images for the reconstruction pass. See the descriptionof the function ippiWTInv for more details.
The ROI concept used in wavelet transform functions can be applied to processing large images by blocks, or‘tiles'. To accomplish this, the source image should be subdivided into overlapping blocks in the followingway:• Main part (ROI) of each block is adjacent to neighboring blocks and has no intersection with neighbor's
ROIs;• Extended borders of each block overlap with ROIs of neighboring blocks.

1541

1

Intel® Integrated Performance Primitives Developer Guide and ReferenceThis subdivision scheme is illustrated in Figure “Image Division into Blocks with Overlapping Borders” .
Image Division into Blocks with Overlapping Borders

For an example on how to use this function, refer to the example provided with the WTInv function
description.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsStepErr
ippStsContextMatchErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if any of the specified pointers is
NULL.
Indicates an error condition if dstRoiSize has a field with zeroor negative value.
Indicates an error condition if step through any buffer is lessthan or equal to zero.
Indicates an error condition if a pointer to an invalid
specification structure is passed.

See Also
WTFwdGetSize Calculates the size of the specification structure and work buffer for a forward
wavelet transform.
WTFwdInit Initializes the forward wavelet transform context structure.
WTInv Performs one-level wavelet reconstruction of an image.
WTFwdGetSize
Calculates the size of the specification structure andwork buffer for an inverse wavelet transform.

SyntaxIppStatus ippiWTInvGetSize_32f(int numChannels, int lenLow, int anchorLow, int lenHigh,int anchorHigh, int* pSpecSize, int* pBufSize);

Include Files
ippi.h1542

1Developer Guide and Reference for Intel® Integrated Performance Primitives

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
numChannels

Number of channels in the image. Possible values are 1 or 3.

lenLow

Length of the lowpass filter.

anchorLow

Anchor position of the lowpass filter.

lenHighLength of the highpass filter.

anchorHigh

Anchor position of the highpass filter.

pSpecSizepBufSize

Pointer to the computed size of the ippiWTInv specification
structure, in bytes.
Pointer to the computed size of the work buffer, in bytes.

Description
This function computes the size, in bytes, of the specification structure and work buffer required for the
inverse wavelet transform function ippiWTInv.
For an example on how to use this function, refer to the example provided with the ippiWTInv function
description.

Return Values

ippStsNullPtrErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error when any of the specified pointers is NULL.

ippStsNumChannlesErr

Indicates an error when numChannels has an illegal value.

ippStsNumChannlesErr

Indicates an error when lenLow or lenHigh is less than 2.

ippStsAnchorErr

Indicates an error when anchorLow or anchorHigh is less thanzero.

ippStsNoErr

See Also
WTInv Performs one-level wavelet reconstruction of an image.
WTInvInit
Initializes the inverse wavelet transform specification
structure.

SyntaxIppStatus ippiWTInvInit_32f_C1R (IppiWTInvSpec_32f_C1R* pSpec,const Ipp32f* pTapsLow,
int lenLow, int anchorLow,const Ipp32f* pTapsHigh, int lenHigh, int anchorHigh);
IppStatus ippiWTInvInit_32f_C3R (IppiWTInvSpec_32f_C3R* pSpec,const Ipp32f* pTapsLow,
int lenLow, int anchorLow,const Ipp32f* pTapsHigh, int lenHigh, int anchorHigh);

Include Files
ippi.h1543

1Intel® Integrated Performance Primitives Developer Guide and Reference

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters

pTapsLow

Double pointer to a new allocated and initialized inverse DWTcontext structure.
Pointer to lowpass filter taps.

lenLow

Length of the lowpass filter.

anchorLow

Anchor position of the lowpass filter.

pTapsHigh

Pointer to highpass filter taps.

lenHighLength of the highpass filter.

anchorHigh

Anchor position of the highpass filter.

pSpec

Description
This function initializes the specification structure pSpec for a one-level wavelet reconstruction.
The inverse wavelet transform specification structure contains parameters of a wavelet filter bank used forimage reconstruction. The filter bank consists of two synthesis filters and includes the lowpass reconstruction
filter (or coarse filter) and the highpass reconstruction filter (or detail filter).
The parameters pTapsLow and pTapsHigh specify coefficients, and anchorLow and anchorHigh - anchor
positions for two synthesis filters. The anchor value sets the initial leftmost filter position relative to image
row or column as shown in the figure below:
Anchor Value and Initial Filter Position for Wavelet Reconstruction

Here a stands for anchor value, N is filter length, x0 is the starting pixel of the processed row or column, andx-1, x-2 ,... are the additional border pixels that are needed for calculations. As seen from this figure,anchor position is specified relative to upsampled source data. The anchor value and filter length completely
determine right, left, top, and bottom border sizes for source images used in reconstruction. The
corresponding C-language expressions to calculate border sizes are given in the description of the ippWTInv
function.
For an example on how to use this function, refer to the example provided with the ippiWTInv function
description.

1544

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Return Values

ippStsNullPtrErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error when any of the specified pointers is NULL.

ippStsNumChannelsErr

Indicates an error when numChannels has an illegal value.

ippStsNoErr

ippStsSizeErr
ippStsAnchorErr

Indicates an error when filter length lenLow or lenHigh is lessthan 2.
Indicates an error when anchor position anchorLow oranchorHigh is less than zero.

See Also
WTInvGetSize Calculates the size of the specification structure and work buffer for an inverse
wavelet transform.
WTInv Performs one-level wavelet reconstruction of an image.
WTInv
Performs one-level wavelet reconstruction of animage.

SyntaxIppStatus ippiWTInv_32f_C1R(const Ipp32f* pApproxSrc, int approxStep, const Ipp32f*
pDetailXSrc, int detailXStep, const Ipp32f* pDetailYSrc, int detailYStep, const Ipp32f*
pDetailXYSrc, int detailXYStep, IppiSize srcRoiSize, Ipp32f* pDst, int dstStep, const
IppiWTInvSpec_32f_C1R* pSpec,Ipp8u* pBuffer);
IppStatus ippiWTInv_32f_C3R(const Ipp32f* pApproxSrc, int approxStep, const Ipp32f*
pDetailXSrc, int detailXStep, const Ipp32f* pDetailYSrc, int detailYStep, const Ipp32f*
pDetailXYSrc, int detailXYStep, IppiSize srcRoiSize, Ipp32f* pDst, int dstStep, const
IppiWTInvSpec_32f_C3R* pSpec,Ipp8u* pBuffer);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pApproxSrc
approxStep
pDetailXSrc
detailXStep
pDetailYSrc
detailYStep

Pointer to ROI of the source approximation image.
Distance, in bytes, between the starting points of consecutive lines
in the approximation image buffer.
Pointer to ROI of the source horizontal detail image.
Distance, in bytes, between the starting points of consecutive lines
in the horizontal detail image buffer.
Pointer to ROI of the source vertical detail image.
Distance, in bytes, between the starting points of consecutive lines
in the vertical detail image buffer.

1545

1

Intel® Integrated Performance Primitives Developer Guide and Reference

pDetailXYSrc

Pointer to ROI of the source diagonal detail image.

srcRoiSize

Distance, in bytes, between the starting points of consecutive lines
in the diagonal detail image buffer.
Size of ROI in pixels for all source images.

pDst

Pointer to the destination image ROI.

detailXYStep

dstStep
pSpec
pBuffer

Distance, in bytes, between the starting points of consecutive lines
in the destination image buffer.
Pointer to the allocated and initialized inverse DWT specification
structure.
Pointer to the allocated buffer for intermediate operations.

Description
This function operates with ROI (see Regions of Interest in Intel IPP ). This function performs wavelet
reconstruction of the output image pDst from the four component images. See Figure “Image Division into
Blocks with Overlapping Borders” for the equivalent algorithm of ippiWTInv function operation. Wavelet
parameters are contained in the inverse transform specification structure pSpec. Before using this function,
compute the size of the structure and work buffer using the ippiWTInvGetSize function and initialize thestructure using ippiWTInvInit.
Product and Performance Information
Performance varies by use, configuration and other factors. Learn more at www.Intel.com/
PerformanceIndex.
Notice revision #20201201
The pointers pApproxSrc, pDetailXSrc, pDetailYSrc, and pDetailXYSrc point to ROIs of source
images excluding borders. All source ROIs have the same size srcRoiSize, while the destination image size
is uniquely determined from the following relations:

dstWidth = 2 * srcRoiSize.width; dstHeight = 2 * srcRoiSize.height;
As source ROIs do not include border pixels required to computations, the application program have to apply
a border extension model (symmetrical, wraparound or another) to ROIs of all source images filling theneighboring memory locations. Note the border sizes may be different for different source images. The
following C-language expressions can be used to calculate extended image border sizes:

int leftBorderLow= (lenLow - 1 - anchorLow) / 2;
int leftBorderHigh= (lenHigh - 1 - anchorHigh) / 2;
int rightBorderLow= (anchorLow + 1) / 2;
int rightBorderHigh = (anchorHigh + 1) / 2;
int apprLeftBorder= leftBorderLow;
int apprRightBorder = rightBorderLow;
int apprTopBorder= leftBorderLow;
int apprBottomBorder = rightBorderLow;
int detxLeftBorder= leftBorderLow;
int detxRightBorder = rightBorderLow;
int detxTopBorder= leftBorderHigh;int detxBottomBorder = rightBorderHigh;int detyLeftBorder= leftBorderHigh;int detyRightBorder = rightBorderHigh;int detyTopBorder= leftBorderLow;
int detyBottomBorder = rightBorderLow;
int detxyLeftBorder= leftBorderHigh;1546

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

int detxyRightBorder = rightBorderHigh;int detxyTopBorder= leftBorderHigh;int detxyBottomBorder = rightBorderHigh;See the description of the function ippiWTInvInit for the explanation of the used parameters.
The above relations show that left and top borders always have equal size only for approximation anddiagonal detail images. Right and bottom borders also have equal size only for approximation and diagonal
detail images. Thus, the size of memory block allocated for each source image must be extended toaccommodate for added border pixels outside ROI.
Figure “Extended Horizontal Detail Source Image for Wavelet Reconstruction” shows ROI and extended image
area for the horizontal detail source image.
Extended Horizontal Detail Source Image for Wavelet Reconstruction

Sizes of source images extended by border pixels can be calculated as follows:

apprWidthWithBorders = srcWidth + apprLeftBorder + apprRightBorder;
apprHeightWithBorders = srcHeight + apprTopBorder + apprBottomBorder;
detxWidthWithBorders = srcWidth + detxLeftBorder + detxRightBorder;
detxHeightWithBorders = srcHeight + detxTopBorder + detxBottomBorder;
detyWidthWithBorders = srcWidth + detyLeftBorder + detyRightBorder;
detyHeightWithBorders = srcHeight + detyTopBorder + detyBottomBorder;
detxyWidthWithBorders = srcWidth + detxyLeftBorder + detxyRightBorder;
detxyHeightWithBorders = srcHeight + detxyTopBorder + detxyBottomBorder;
The ROI concept can be used to reconstruct large images by blocks or ‘tiles'.
To accomplish this, each the source images into blocks with overlapping borders, similar to what is
considered in the description of the function ippiWTFwd. Each component must be subdivided into the same
pattern of rectangular blocks.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if any of the specified pointers is
NULL.
Indicates an error condition if srcRoiSize has a field with zeroor negative value.

1547

1

Intel® Integrated Performance Primitives Developer Guide and ReferenceippStsStepErr
ippStsContextMatchErr

Indicates an error condition if step through any buffer is lessthan or equal to zero.
Indicates an error condition if a pointer to an invalid
specification structure is passed.

ExampleThe example below shows how to use the function ippiWTInv_32f_C1R.

void func_wavelet(){
IppiWTFwdSpec_32f_C1R* pSpecFwd;
IppiWTInvSpec_32f_C1R* pSpecInv;
int specSizeFwd, specSizeInv;
Ipp32f pTapsLow[3] = {0.25, 0.5, 0.25};
int lenLow = 3;
int anchorLow = 1;
Ipp32f pTapsHigh[3] = { 0.75, -0.25, -0.125};
int lenHigh = 3;
int anchorHigh = 1;
Ipp32f pSrc[8*8] = { 0.0, 0.0, 0.0, 11.1, 11.1, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 11.1, 11.1, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 11.1, 11.1, 0.0, 0.0, 0.0,
11.1, 11.1, 11.1, 11.1, 11.1, 11.1, 11.1, 11.1,
11.1, 11.1, 11.1, 11.1, 11.1, 11.1, 11.1, 11.1,
0.0, 0.0, 0.0, 11.1, 11.1, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 11.1, 11.1, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 11.1, 11.1, 0.0, 0.0, 0.0};
Ipp32f pSrcB[9*9];
int srcStepB = 9*sizeof(Ipp32f);
IppiSize roiSizeB = {9, 9};
int srcStep = 8*sizeof(Ipp32f);
IppiSize roiSize = {8, 8};
Ipp32f pDetailXDst[4*4];
Ipp32f pDetailYDst[4*4];
Ipp32f pDetailXYDst[4*4];
Ipp32f pApproxDst[4*4];
IppiSize dstRoiSize = {4, 4};
int bufSizeFwd, bufSizeInv;
Ipp8u* pBufferFwd;
Ipp8u* pBufferInv;
Ipp32f pDstInv[8*8];
Ipp32f pAppB[5*5];
Ipp32f pXB[5*5];
Ipp32f pYB[5*5];
Ipp32f pXYB[5*5];
int StepB = 5*sizeof(Ipp32f);
IppiSize roiInvSize = {4, 4};
IppiSize roiInvSizeB = {5, 5};
int stepDstInv = 8*sizeof(Ipp32f);
int approxStep, detailXStep, detailYStep, detailXYStep;
approxStep = detailXStep = detailYStep = detailXYStep = 4*sizeof(Ipp32f);//adds border to the source image
ippiCopyWrapBorder_32s_C1R((Ipp32s*)pSrc, srcStep, roiSize, (Ipp32s*)pSrcB, srcStepB,
roiSizeB, 1, 1);//performs forward wavelet transform
ippiWTFwdGetSize_32f(1, lenLow, anchorLow, lenHigh, anchorHigh, &specSizeFwd, &bufSizeFwd);
pSpecFwd = (IppiWTFwdSpec_32f_C1R*)ippMalloc(specSizeFwd);

1548

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

pBufferFwd = (Ipp8u*)ippMalloc(bufSizeFwd);
ippiWTFwdInit_32f_C1R( pSpecFwd, pTapsLow, lenLow, anchorLow, pTapsHigh, lenHigh,anchorHigh);
ippiWTFwd_32f_C1R (pSrcB + roiSizeB.width + 1, srcStepB, pApproxDst, approxStep,pDetailXDst, detailXStep, pDetailYDst, detailYStep, pDetailXYDst, detailXYStep,
dstRoiSize, pSpecFwd, pBufferFwd);
printf_32f_2D("After WTFwd ->\n pApproxDst", pApproxDst, dstRoiSize, approxStep,
ippStsNoErr);
printf_32f_2D("pDetailXDst", pDetailXDst, dstRoiSize, detailXStep, ippStsNoErr);
printf_32f_2D("pDetailYDst", pDetailYDst, dstRoiSize, detailYStep, ippStsNoErr);
printf_32f_2D("pDetailXYDst", pDetailXYDst, dstRoiSize, detailXYStep, ippStsNoErr);//-----------------------------------ippiWTInvGetSize_32f(1, lenLow, anchorLow, lenHigh, anchorHigh, &specSizeInv, &bufSizeInv);
pSpecInv = (IppiWTInvSpec_32f_C1R*)ippMalloc(specSizeInv);
pBufferInv = (Ipp8u*)ippMalloc(bufSizeInv);
ippiWTInvInit_32f_C1R(pSpecInv, pTapsLow, lenLow, anchorLow, pTapsHigh, lenHigh, anchorHigh);//adds border to four images obtained after ippiWTFwd
ippiCopyWrapBorder_32s_C1R((Ipp32s*)pApproxDst, approxStep, dstRoiSize, (Ipp32s*)pAppB,
StepB, roiInvSizeB, 0, 0);
ippiCopyWrapBorder_32s_C1R((Ipp32s*)pDetailXDst, detailXStep, dstRoiSize, (Ipp32s*)pXB,
StepB, roiInvSizeB, 0, 0);
ippiCopyWrapBorder_32s_C1R((Ipp32s*)pDetailYDst, detailYStep, dstRoiSize, (Ipp32s*)pYB,
StepB, roiInvSizeB, 0, 0);
ippiCopyWrapBorder_32s_C1R((Ipp32s*)pDetailXYDst, detailXYStep, dstRoiSize, (Ipp32s*)pXYB,
StepB, roiInvSizeB, 0, 0);//performs inverse wavelet transform
ippiWTInv_32f_C1R( pAppB, StepB, pXB, StepB, pYB, StepB, pXYB, StepB, roiInvSize, pDstInv,
stepDstInv, pSpecInv, pBufferInv);
printf_32f_2D("After WTFinv ->\n pDstInv", pDstInv, roiSize, stepDstInv, ippStsNoErr);
ippFree(pSpecFwd);
ippFree(pSpecInv);
ippFree(pBufferFwd);
ippFree(pBufferInv);}
Result:After WTFwd ->pApproxDst
0.0 2.8
8.3 0.0
2.8 4.9
9.0 2.8
8.3 9.0 10.4 8.3
0.0 2.8
8.3 0.0
pDetailXDst
0.0
1.0 3.1
0.0
8.3
7.3 5.2
8.3-4.2 -2.1 2.1 -4.2
0.0
1.0 3.1
0.0
pDetailYDst
0.0
8.3
-4.2
0.0
1.0
7.3
-2.1
1.0
3.1
5.2
2.1
3.1
0.0
8.3
-4.2
0.0
pDetailXYDst
0.0
3.1
-1.6
0.0

1549

1

Intel® Integrated Performance Primitives Developer Guide and Reference

3.1
0.0
4.7
3.1
-1.6
4.7
-4.7 -1.6
0.0
3.1
-1.6
0.0
After WTFinv ->pDstInv
0.0
2.8
-0.3
-0.6
2.8
5.9
2.7
4.9
-0.3
2.7
-0.6
-1.2
-0.6
4.9
-1.2
-2.2
2.1
3.4
2.2
3.9
1.1
5.4
0.7
1.2
0.0
2.8
-0.3
-0.6
0.0
5.1
-0.5
-1.0

2.1
3.4
2.2
3.9
1.8
3.7
2.1
3.8

1.1
5.4
0.7
1.2
3.7
3.2
1.1
1.9

0.0
2.8
-0.3
-0.6
2.1
1.1
0.0
0.0

0.0
5.1
-0.5
-1.0
3.8
1.9
0.0
0.0

See Also
WTInvGetSize Calculates the size of the specification structure and work buffer for an inverse
wavelet transform.
WTInvInit Initializes the inverse wavelet transform specification structure.
WTFwd Performs one-level wavelet decomposition of an image.

Computer VisionThis chapter provides some background for the computer vision concepts used in the Intel® IPP library as well
as detailed descriptions of the Intel IPP image processing functions for computer vision. These functions are
combined in groups by their functionality.

Using ippiAdd for Background Differencing
This section describes functions that help build a statistical model of a background. This model can be used
to subtract the background from an image.
Here, the term “background” stands for a set of motionless image pixels - that is, pixels that do not belong
to any object, moving in front of the camera. The definition of background can vary if considered in othertechniques of object extraction. For example, if the depth map of the scene can be obtained, for example,
with the help of stereo, background can be determined as static parts of the scene that are located far
enough from the camera.
The simplest background model assumes that every background pixel brightness varies independently,
according to normal distribution. To calculate the characteristics of the background, several dozens of frames,
as well as their squares, can be accumulated. That is, for every pixel location we find the sum of pixel values
in this location S(x, y), using the function ippiAdd, and the sum of squares of the values Sq(x, y), using
the function ippiAddSquare. Then mean is calculated aswhere N is the number of collected frames, and standard deviation as1550

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

After that, the pixel in a certain pixel location within a certain frame is considered as belonging to a moving
object, if the condition abs(p(x, y) - m(x, . y)) < C * stddev(x, y), where C is a constant, is met.
If C is equal to 3, it satisfies the “three sigmas” rule. To obtain such background model, objects should be put
away from the camera for a few seconds, so that the whole image from the camera represents thesubsequent background observation.
Adapting the background differencing model to changes in lighting conditions and background scenes, forexample, when the camera moves or an object passes behind the front object, can improve the described
technique.
The mean brightness can be calculated through replacing the simple average with the running average foundby using the function ippiAddWeighted. Also, several techniques can be used to identify moving scene partsand exclude them while accumulating background information. These techniques include change detection(see the functions ippiAbsDiff and ippiThreshold), optical flow, and some other operations.
Relevant addition functions used for background differencing include:

Add_8u32f_C1IR, Add_8s32f_C1IR, Add_32f_C1IR,
Add_8u32f_C1IMR, Add_8s32f_C1IMR, Add_32f_C1IMR (see Add),and also all flavors of AddSquare, AddProduct, and AddWeighted.

Feature Detection Functions
This section describes feature detection functions.
The set of the Sobel derivative filters is generally used to find edges, ridges, and blobs, especially in case ofscale-space images, for example, pyramids.
The following naming conventions are used in the equations described below:
•
•
•
•
•

Dx and Dy are the first x and y derivatives, respectively.
Dxx are Dyy are the second x and y derivatives, respectively.
Dxy is the partial x and y derivative.
Dxxx and Dyyy are the third x and y derivatives, respectively.
Dxxy and Dxyy are the third partial x and y derivatives.

Corner Detection
The Sobel and Scharr first derivative operators are to be used to take the x and y derivatives of an image.
Then a small region of interest (ROI) is to be defined to detect corners in.
A 2x2 matrix of sums of the x and y derivatives is created as follows:

Solving

where λ is a column vector of the eigen values and I is the identity matrix, gives the eigen values. For the
2x2 matrix of the equation above, the solutions may be written in a closed form:

1551

1

Intel® Integrated Performance Primitives Developer Guide and ReferenceIf λ1, λ2 > t, where t is some threshold, then a corner is considered to be found at that location. This can bevery useful for object or shape recognition.

FastNGetSize
Computes the size of the FastN context structure.

SyntaxIppStatus ippiFastNGetSize(IppiSize srcSize, int circleRadius, int N, intorientationBins, int option, IppDataType dataType, int numChannels, int* pSpecSize);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
srcSize

Size of the source ROI, in pixels.

circleRadius

Radius of the pixel circle. The radius value equal to 1 corresponds to the
distance between the closest pixels from common row or column.
Supported values are 1, 2, 3, 5, 7, 9.

N

Critical number of serial pixels on circle for defining a corner. The ranges
are as follows:

circleRadius

N

1

5≤N≤8

2

7 ≤ N ≤ 123

9 ≤ N ≤ 165

15 ≤ N ≤ 287

21 ≤ N ≤ 40

927 ≤ N ≤ 52

orientationBins

The number of bins to define direction. Supported values are from 2 to 64.

optionMode of processing. Supported values:••••

IPP_FASTN_CIRCLE(IPP_FASTN_CIRCLE | IPP_FASTN_ORIENTATION)(IPP_FASTN_CIRCLE | IPP_FASTN_SCORE_MODE0)(IPP_FASTN_CIRCLE | IPP_FASTN_ORIENTATION |IPP_FASTN_SCORE_MODE0)• (IPP_FASTN_CIRCLE | IPP_FASTN_SCORE_MODE0 | IPP_FASTN_NMS)• (IPP_FASTN_CIRCLE | IPP_FASTN_ORIENTATION |IPP_FASTN_SCORE_MODE0 | IPP_FASTN_NMS)

dataType

Data type of the source and destination images. Supported value is ipp8u.

numChannels

Number of channels in the images. Supported value is 1.

pSpecSize

Pointer to the computed size of the specification structure.

1552

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Description
This function computes the size of the FastN context structure for the FastN function. The result is stored in
pSpecSize.
Use the computed pSpecSize value to allocate memory using the ippMalloc or ippsMalloc functions. The
allocated memory can be freed only by the ippFree or ippsFree functions, respectively. For more
information about the memory allocation functions, refer to the Support Functions section of the Intel IPP
Developer Reference, vol. 1.
For an example on how to use this function, refer to the example provided with the FastN function
description.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error when pSpecSize is NULL.

ippStsSizeErr

Indicates an error when srcSize is less than, or equal to zero.

ippDataTypeErr

Indicates an error when dataType has an illegal value.

ippNumChannelsErr

Indicates an error when numChannels has an illegal value.

ippOutOfRangeErr

Indicates an error when orientationBins or N has an illegal value.

ippBadArgErr

Indicates an error when option or circleRadius has an illegal value.

See Also
FastN Detects corners in an image using the FastN algorithm.
FastNGetBufferSize
Computes the size of the work buffer for the FastN
function.

SyntaxIppStatus ippiFastNGetBufferSize(IppiFastNSpec* pSpec, IppiSize dstRoiSize, int*
pBufSize);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSpec

Pointer to the FastN specification structure.

dstRoiSize

Size of the destination ROI, in pixels.

pBufSize

Pointer to the computed size of the work buffer.

Description
This function computes the size of the work buffer for the FastN function. The result is stored in pBufSize.

1553

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Use the computed pBufSize value to allocate memory using the ippMalloc or ippsMalloc functions. The
allocated memory can be freed only by the ippFree or ippsFree functions, respectively. For more
information about the memory allocation functions, refer to the Support Functions section of the Intel IPP
Developer Reference, vol. 1.
For an example on how to use this function, refer to the example provided with the FastN function
description.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error when pSpecSize or pBufSize is NULL.

ippStsSizeErr

Indicates an error when dstRoiSize is less than, or equal to zero.

See Also
FastN Detects corners in an image using the FastN algorithm.
FastNInit
Initializes the FastN context structure.

SyntaxIppStatus ippiFastNInit(IppiSize srcSize, int circleRadius, int N, int orientationBins,
int option, Ipp32f threshold, IppDataType dataType, int numChannels, IppiFastNSpec*
pSpec);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
srcSize

Size of the source ROI, in pixels.

circleRadius

Radius of the pixel circle. The radius value equal to 1 corresponds to the
distance between the closest pixels from common row or column.
Supported values are 1, 2, 3, 5, 7, 9.

N

Critical number of serial pixels on circle for defining a corner. The ranges
are as follows:orientationBins

1554

circleRadius

N

1

5≤N≤8

2

7 ≤ N ≤ 123

9 ≤ N ≤ 165

15 ≤ N ≤ 287

21 ≤ N ≤ 40

927 ≤ N ≤ 52

The number of bins to define direction. Supported values are from 2 to 64.

Developer Guide and Reference for Intel® Integrated Performance Primitives

option1Mode of processing. Supported values:••••

IPP_FASTN_CIRCLE(IPP_FASTN_CIRCLE | IPP_FASTN_ORIENTATION)(IPP_FASTN_CIRCLE | IPP_FASTN_SCORE_MODE0)(IPP_FASTN_CIRCLE | IPP_FASTN_ORIENTATION |IPP_FASTN_SCORE_MODE0)• (IPP_FASTN_CIRCLE | IPP_FASTN_SCORE_MODE0 | IPP_FASTN_NMS)• (IPP_FASTN_CIRCLE | IPP_FASTN_ORIENTATION |IPP_FASTN_SCORE_MODE0 | IPP_FASTN_NMS)

thresholdThreshold value to detect critical pixels. The value must be more than, or
equal to zero.

dataType

Data type of the source and destination images. Supported value is ipp8u.

numChannels

Number of channels in the images. Supported value is 1.

pSpec

Pointer to the specification structure.

Description
This function initializes the FastN context structure for the FastN function.
For an example on how to use this function, refer to the example provided with the FastN function
description.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error when pSpec is NULL.

ippStsSizeErr

Indicates an error when srcSize is less than, or equal to zero.

ippDataTypeErr

Indicates an error when dataType has an illegal value.

ippNumChannelsErr

Indicates an error when numChannels has an illegal value.

ippOutOfRangeErr

Indicates an error when orientationBins or N has an illegal value.

ippBadArgErr

Indicates an error when option or circleRadius has an illegal value.

ippThresholdErr

Indicates an error when threshold is negative.

See Also
FastN Detects corners in an image using the FastN algorithm.
FastN
Detects corners in an image using the FastN
algorithm.

SyntaxIppStatus ippiFastN_8u_C1R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDstCorner, int
dstCornerStep, Ipp8u* pDstScore, int dstScoreStep, int* pNumCorner, IppiPoint
srcRoiOffset, IppiSize dstRoiSize, IppiFastNSpec* pSpec, Ipp8u* pBuffer);

Include Files
ippcv.h1555

1Intel® Integrated Performance Primitives Developer Guide and Reference

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc

Pointer to the source image.

srcStep

Distance, in bytes, between the starting points of consecutive lines in thesource image.

pDstCorner

Pointer to the destination image with corners.

dstCornerStep

Distance, in bytes, between the starting points of consecutive lines in thedestination image with corners.

pDstScore

Pointer to the destination image with scores.

dstScoreStep

Distance, in bytes, between the starting points of consecutive lines in thedestination image with scores.

pNumCorner

Pointer to the calculated number of corners.

srcRoiOffset

Offset in the source image.

dstRoiSize

Size of the destination ROI, in pixels.

pSpec

Pointer to the specification structure.

pBuffer

Pointer to the work buffer.

Description
The ippiFastN function implements the FastN corner detection algorithm. This function detects corners inthe source image, calculates orientation and score of corners.
The figures below show pixels location for different radius values.
Radius = 1

Radius = 2

1556

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Radius = 3

1557

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Radius = 5

Radius = 7

1558

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Radius = 9

The function defines a pixel as a corner if the value of N consecutive pixels located on the circle with thecenter at the current pixel is greater (less) than the value of the current - central pixel. Differences between
the values of pixels on the circle and the central pixel value must be greater than the threshold value. In
this case, the corresponding pixel of the pDstCorner image is set to the following values in binary format:••

If greater - 01xxxxxx
If less - 10xxxxxx

If the IPP_FASTN_ORIENTATION mode is not set, xxxxxx = 000000, otherwise, xxxxxx = the number ofsector (bin) to which the corner directs. The orientationBin parameter defines the number of sectors thatis computed from the bottom clockwise. If the source pixel is not a corner, the corresponding pixel of
pDstCorner is set to zero.

1559

1

Intel® Integrated Performance Primitives Developer Guide and Reference

If the IPP_FASTN_SCORE_MODE0 mode is set, the corresponding pixel of pDstCorner is set to the cornerscore. Score is a maximum among minimal differences with threshold calculated for every N consecutive
pixels. If the source pixel is not a corner, the corresponding pixel of pDstScore is set to zero.
If the IPP_FASTN_NMS mode is set, the corners that have a corner with the greater score among neighboring
pixels are cancelled.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error when:• pSrc, pDstCorner, pNumCorner, pSpec, or pBuffer is NULL
• pDstScore is NULL if option is not equal to IPP_FASTN_SCORE_MODE0

ippStsSizeErr

Indicates an error when dstRoiSize is less than, or equal to zero.

ippDataTypeErr

Indicates an error when dataType has an illegal value.

ippNumChannelsErr

Indicates an error when numChannels has an illegal value.

ippOutOfRangeErr

Indicates an error when orientationBins or N has an illegal value.

ippBadArgsErr

Indicates an error when option or circleRadius has an illegal value.

ippThresholdErr

Indicates an error when threshold is negative.

ExampleSee Also
FastNGetSize Computes the size of the FastN context structure.
FastNInit Initializes the FastN context structure.
FastNGetBufferSize Computes the size of the work buffer for the FastN function.
FastN2DToVec Converts corners from two-dimensional image to an array of structures.
FastN2DToVec
Converts corners from two-dimensional image to anarray of structures.

SyntaxIppStatus ippiFastN2DToVec_8u(const Ipp8u* pSrcCorner, int srcCornerStep, const Ipp8u*
pSrcScore, int srcScoreStep, IppiCornerFastN* pDst, IppiSize srcRoiSize, int maxLen,
int* pNumCorners, IppiFastNSpec* pSpec);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrcCorner

1560

Pointer to the source image with corners.

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

srcCornerStep

Distance, in bytes, between the starting points of consecutive lines in thesource image with corners.

pSrcScore

Pointer to the source image with scores.

srcScoreStep

Distance, in bytes, between the starting points of consecutive lines in thesource image with score.

pDst

Pointer to the destination vector of structures.

srcRoiSize

Size of the source ROI, in pixels.

maxLenLength of the array of structures.

pNumCorners

Pointer to the number of corners in the source image.

pSpec

Pointer to the specification structure.

Description
This function converts two-dimensional image with corners to an array of structures. The result is stored in
pDst.
For an example on how to use this function, refer to the example provided with the FastN function
description.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error when:• pSrcCorner, pDst, pNumCorners, or pSpec is NULL
• pSrcScore is NULL if option is not equal to IPP_FASTN_SCORE_MODE0

ippStsSizeErr

Indicates an error when srcRoiSize is less than, or equal to zero.

ippDataTypeErr

Indicates an error when the specification structure does not match theoperation.
Indicates an error when dataType has an illegal value.

ippNumChannelsErr

Indicates an error when numChannels has an illegal value.

ippOutOfRangeErr

Indicates an error when orientationBins or N has an illegal value.

ippBadArgsErr

Indicates an error when option or circleRadius has an illegal value.

ippThresholdErr

Indicates an error when threshold is negative.

ippContextMatchErr

See Also
FastN Detects corners in an image using the FastN algorithm.
HarrisCornerGetBufferSize
Calculates the size of the temporary buffer for theippiHarrisCorner function.

SyntaxIppStatus ippiHarrisCornerGetBufferSize(IppiSize roiSize, IppiMaskSize filterMask,
Ipp32u avgWndSize, IppDataType dataType, int numChannels, int* pBufferSize);

1561

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
roiSize

Size of the source and destination image ROI in pixels.

filterMask

Size of the derivative filter aperture. Possible values are ippMskSize3x3
and ippMskSize5x5.

avgWndSize

Linear size of a neighborhood block for averaging.

dataType

Data type of the source image. Possible values are ipp8u and ipp32f.

numChannels

Number of channels in the images. Possible value is 1.

pBufferSize

Pointer to the size (in bytes) of the external work buffer.

Description
This function calculates the size of the temporary buffer needed for the HarrisCorner function.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error or a warning.

ippStsNullPtrErr

Indicates an error when pBufferSize is NULL.

ippStsSizeErr

Indicates an error in the following cases:• when roiSize is less than, or equal to zero
• when avgWndSize is equal to zero

ippStsMaskSizeErr

Indicates an error when filterMask has an illegal value.

ippStsDataTypeErr

Indicates an error when dataType has an illegal value.

ippStsNumChannelsErr

Indicates an error when numChannels has an illegal value.

See Also
HarrisCorner Implements Harris corner detection algorithm.
HarrisCorner
Implements Harris corner detection algorithm.

SyntaxIppStatus ippiHarrisCorner_8u32f_C1R(const Ipp8u* pSrc, int srcStep, Ipp32f* pDst, int
dstStep, IppiSize roiSize, IppiDifferentialKernel filterType, IppiMaskSize filterMask,
Ipp32u avgWndSize, float k, float scale, IppiBorderType borderType, Ipp8u borderValue,
Ipp8u* pBuffer);

1562

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

IppStatus ippiHarrisCorner_32f_C1R(const Ipp32f* pSrc, int srcStep, Ipp32f* pDst, int
dstStep, IppiSize roiSize, IppiDifferentialKernel filterType, IppiMaskSize filterMask,
Ipp32u avgWndSize, float k, float scale, IppiBorderType borderType, Ipp32f borderValue,
Ipp8u* pBuffer);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pDst

Pointer to the source image.
Distance, in bytes, between the starting points of consecutive lines
in the source image.
Pointer to the destination image.

roiSize

Distance, in bytes, between the starting points of consecutive lines
in the destination image.
Size of the source and destination image ROI in pixels.

filterType

Type of the derivative operator. Possible values are:dstStep

ippKernelSobel

Sobel filter

ippKernelScharr

Scharr filter

ippKernelCentralDiff Central differences operator
filterMask

Size of the derivative filter aperture. The list of possible values
depends on the filterType value:
Filter Type

Filter Mask

ippKernelSobel

ippMskSize3x3, ippMskSize5x5

ippKernelScharr

ippMskSize3x3

ippKernelCentralDiff

ippMskSize3x3

avgWndSize

Linear size of a neighborhood block for averaging.

k

Harris detector free coefficient.

scale

Destination image scale factor.

borderType

Type of border. Possible values are:ippBorderConst
ippBorderRepl
ippBorderInMem
ippBorderMirror

Values of all border pixels are set toconstant.
Border is replicated from the edge pixels.
Border is obtained from the source image
pixels in memory.
Border pixels are mirrored from the source
image boundary pixels.

1563

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Mixed borders are also supported. They can be obtained by the bitwise
operation OR between ippBorderRepl or ippBorderConst and thefollowing flags:••••

ippBorderInMemTop
ippBorderInMemBottom
ippBorderInMemLeft
ippBorderInMemRight

Each of these flags means that for the corresponding border the outside
pixels of the source image are in memory.

borderValuepBuffer

Constant value(s) to assign to pixels of the constant border. This parameter
is applicable only to the ippBorderConst border type. The
ippiHarrisCorner function uses the specified constant value only at thefirst stage of the algorithm. At the third stage, the function uses zero
constant border.

Pointer to the pre-allocated temporary buffer. To calculate the size ofthe temporary buffer, use the HarrisCornerGetBufferSize function.

Description
This function goes through the following stages to implement the Harris corner detection algorithm:
1.
2.

Computes I(x, y)x and I(x, y)y gradients for each (x, y) pixel of the image. The function computes
gradients using the derivative operator specified by the filterType and filterMask parameters.
Computes products of the gradients at each (x, y) pixel of the image:3.

Performs averaging of the products of gradients over a rectangular neighborhood block at each pixel ofthe image. The block size is specified by the avgWndSize value.

4.

Defines 2x2 gradient covariance matrix H(x , ) over a rectangular neighborhood block for each (x, y)
pixel of the image.

5.

Computes the corner response at each pixel of the image:

y

where
k is the Harris detector free parameter

1564

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

The first and third stages of the function algorithm are filtering operations; they use border processing
approach that is specified by the borderType parameter.
The scale parameter is applied to the output image.
Before using this function, compute the size of the temporary work buffer using theHarrisCornerGetBufferSize function.

Return Values

ippStsNullPtrErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error when pSrc, pDst, or pBufferSize is NULL.

ippStsSizeErr

Indicates an error in the following cases:

ippStsNoErr• when roiSize is less than, or equal to zero
• when avgWndSize is equal to zero

ippStsFilterTypeErr

Indicates an error when one of the step values is not divisibleby 4 for floating point images.
Indicates an error when filterType has an illegal value.

ippStsMaskSizeErr

Indicates an error when filterMask has an illegal value.

ippStsBorderErr

Indicates an error when borderType has an illegal value.

ippStsStepErr

Indicates an error when srcStep or dstStep has a negativevalue.

ippStsNotEvenStepErr

ippStsInplaceModeNotSupportedE Indicates an error when pSrc and pDst point to the sameimage.
rr

ExampleThe code example below demonstrates how to use the ippiHarrisCorner_8u32f_C1R and
ippiHarrisCornerGetBufferSize functions.

...
int
bufSize = 0;
Ipp8u* pBuffer = 0;
Ipp32u numChannels = 1;
IppStatus status = ippStsNoErr;
IppiBorderType borderType = ippBorderRepl;
IppiDifferentialKernel filterType = ippFilterSobel;
IppiMaskSize filterMask = ippMskSize5x5;
Ipp32u avgWndSize = 3;
Ipp32f scale = 1.0f;/* Computes the temporary work buffer size */status = ippiHarrisCornerGetBufferSize(roiSize, filterMask, avgWndSize, ipp8u, numChannels,&bufSize);/* Memory allocation */if (status != ippStsNoErr) pBuffer = ippsMalloc_8u(bufSize);if (pBuffer != NULL){/* Harris Corner processing */status = ippiHarrisCorner_8u32f_C1R(pSrc, srcStep, pDst, dstStep, roiSize, filterType,filterMask, avgWndSize, 0.04f,

1565

1

Intel® Integrated Performance Primitives Developer Guide and Reference

scale, borderType, 0, pBuffer);
ippsFree(pBuffer);}...

See Also
HarrisCornerGetBufferSize Calculates the size of the temporary buffer for the ippiHarrisCorner
function.
Canny Edge Detector
This subsection describes a classic edge detector proposed by J.Canny, see [Canny86 ]. The detector uses agrayscale image as an input and outputs a black-and-white image, where non-zero pixels mark detectededges. The algorithm consists of three stages described below.

Stage 1: Differentiation
The image data is differentiated in x and y directions. From the computed x and y gradient components,
Canny edge detector functions calculate the magnitude and angle of the gradient vector.
NOTE
The ippiSobel functions perform the first stage and Canny edge detector functions use their output.

Stage 2: Non-Maximum Suppression
With the rate of intensity change found at each point in the image, edges must be placed at the points ofmaximum values of gradient magnitude. It is preferable to suppress non-maximum points that areperpendicular to the edge direction, rather than parallel to the edge direction, as the edge is strong along an
extended contour.

1566

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

The algorithm starts off with sorting the direction of gradient to one of four sectors shown in the figure
below.
Gradient Sectors

The algorithm passes a 3x3 neighborhood across the magnitude array. At each point, the center element of
the neighborhood is compared with its two neighbors along the line of the gradient given by the sector value.
If the central value is not greater than the neighbors, it is suppressed.

Stage 3: Edge Thresholding
The Canny operator uses the so-called “hysteresis” thresholding. Most thresholders use a single threshold
limit, which means that if the edge values fluctuate above and below this value, the line appears broken. Thisphenomenon is commonly referred to as “streaking”. Hysteresis counters streaking by setting an upper andlower edge value limit. Considering a line segment, if a value lies above the upper threshold limit, it isimmediately accepted. If the value lies below the low threshold, it is rejected. Points which lie between the
two limits are accepted if they are connected to pixels which are also accepted. The likelihood of streaking issmall, since the line segment points must fluctuate above the upper limit and below the lower limit for
streaking to occur.
J.Canny recommends the ratio of high to low limit be in the range two or three to one, based on predictedsignal-to-noise ratios.

1567

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Example shows how to use the Intel IPP functions for the Canny edge detector.
CannyBorderGetSize
Calculates the size of the temporary buffer for theippiCannyBorder function.

SyntaxIppStatus ippiCannyBorderGetSize(IppiSize roiSize, IppiDifferentialKernel filterType,IppiMaskSize mask, IppDataType dataType, int* pBufferSize);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
roiSize

Size of the image ROI in pixels.

filterType

Type of the filter to be applied. Possible values are ippFilterSobel andippFilterScharr.

mask

The size of the mask. Possible values are ippMskSize3x3 andippMskSize5x5.

dataType

Data type of the image. Possible value is ipp8u.

pBufferSize

Pointer to the variable that returns the size of the temporary buffer.

Description
This function calculates the size of the temporary buffer needed for the CannyBorder function.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error or a warning.

ippStsNullPtrErr

Indicates an error when the pBufferSize pointer is NULL.

ippStsMaskSizeErr

Indicates an error when mask has an illegal value.

ippStsDataTypeErr

Indicates an error when dataType has an illegal value.

ippStsSizeErr

Indicates an error when roiSize has a field with a zero or negativevalue.

See Also
CannyBorder Implements Canny algorithm for edge detection.
CannyBorder
Implements Canny algorithm for edge detection.

1568

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

SyntaxIppStatus ippiCannyBorder_8u_C1R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int
dstStep, IppiSize roiSize, IppiDifferentialKernel filterType, IppiMaskSize mask,
IppiBorderType borderType, Ipp8u borderValue, Ipp32f lowThresh, Ipp32f highThresh,
IppNormType norm, Ipp8u* pBuffer);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pDst
dstStep
roiSizefilterTypemaskborderType

Pointer to the source image.
Distance, in bytes, between the starting points of consecutive lines
in the source image.
Pointer to the destination image.
Distance, in bytes, between the starting points of consecutive lines
in the destination image.
Size of the source image ROI in pixels.
Type of the filter to be applied. Possible values are ippFilterSobel
and ippFilterScharr.
The size of the mask. Possible values are ippMskSize3x3 andippMskSize5x5 for ippFilterSobel, and ippMskSize3x3 forippFilterScharr.
Type of border. Possible values are:ippBorderConst
ippBorderRepl
ippBorderInMem

Values of all border pixels are set toconstant.
Border is replicated from the edge pixels.
Border is obtained from the source image
pixels in memory.

Mixed borders are also supported. They can be obtained by the bitwise
operation OR between ippBorderRepl and ippBorderInMemTop,
ippBorderInMemBottom, ippBorderInMemLeft, ippBorderInMemRight.

borderValue

Constant value to assign to pixels of the constant border. This parameter isapplicable only to the ippBorderConst border type.

lowThresh

Lower threshold for edges detection.

highThresh

Upper threshold for edges detection.

norm

Normalization mode. Possible values are ippNormL1 and ippNormL2.

pBuffer

Pointer to the pre-allocated temporary buffer. To calculate the size ofthe temporary buffer, use the CannyBorderGetSize function.

1569

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Description
This function operates with ROI (see Regions of Interest in Intel IPP). This function finds edges in the ROI of
the source image with the user-defined border types using the Canny edge detector algorithm. The output
image is stored in pDst.
Before using this function, compute the size of the temporary work buffer using the CannyBorderGetSize
function.

Return Values

ippStsNullPtrErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error when one of the specified pointers is NULL.

ippStsMaskSizeErr

Indicates an error when mask has an illegal value.

ippStsNoErr

Indicates an error when roiSize has a field with a zero or
negative value.
Indicates an error when srcStep or dstStep is less thanippStsSizeErr
ippStsStepErrroi.width*<pixelSize>.

ippStsBadArgErr

Indicates an error when lowThresh is negative, or highThreshis less than lowThresh.

ippStsNotEvenStepErr

Indicates an error when one of the step values is not divisibleby 2 for 16s images, and by 4 for 32f images.

ExampleSee Also
CannyBorderGetSize Calculates the size of the temporary buffer for the ippiCannyBorderfunction.
CannyGetSize
Calculates size of temporary buffer for the ippiCannyfunction.

SyntaxIppStatus ippiCannyGetSize(IppiSize roiSize, int* pBufferSize);
IppStatus ippiCannyGetSize_L(IppiSizeL roi, IppSizeL* bufferSize);

Include Files
ippcv.hFlavors with the _L suffix: ippcv_l.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
roiSize, roi

Size of the image ROI, in pixels.

pBufferSize, bufferSize

Pointer to the computed size of the temporary buffer.

1570

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Description
This function calculates the size of a temporary buffer for the ippiCanny function.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error or a warning.

ippStsNullPtrErr

Indicates an error condition if pBufferSize pointer is NULL.

ippStsSizeErr

Indicates an error condition if pRoiSize has a field with zero or negativevalue.

Canny
Implements Canny algorithm for edge detection.

SyntaxIppStatus ippiCanny_16s8u_C1R(Ipp16s* pSrcDx, int srcDxStep, Ipp16s* pSrcDy, int
srcDyStep, Ipp8u* pDstEdges, int dstEdgeStep, IppiSize roiSize, Ipp32f lowThreshold,
Ipp32f highThreshold, Ipp8u* pBuffer);
IppStatus ippiCanny_32f8u_C1R(Ipp32f* pSrcDx, int srcDxStep, Ipp32f* pSrcDy, int
srcDyStep, Ipp8u* pDstEdges, int dstEdgeStep, IppiSize roiSize, Ipp32f lowThreshold,
Ipp32f highThreshold, Ipp8u* pBuffer);

Platform-aware functions
IppStatus ippiCanny_16s8u_C1R_L(Ipp16s* pSrcDx, IppSizeL srcDxStep, Ipp16s* pSrcDy,
IppSizeL srcDyStep, Ipp8u* pDstEdges, IppSizeL dstEdgeStep, IppiSizeL roiSize, Ipp32f
lowThreshold, Ipp32f highThreshold, IppNormType norm, Ipp8u* pBuffer);
IppStatus ippiCanny_32f8u_C1R_L(Ipp32f* pSrcDx, IppSizeL srcDxStep, Ipp32f* pSrcDy,
IppSizeL srcDyStep, Ipp8u* pDstEdges, IppSizeL dstEdgeStep, IppiSizeL roiSize, Ipp32f
lowThreshold, Ipp32f highThreshold, IppNormType norm, Ipp8u* pBuffer);

Include Files
ippcv.hFlavors with the _L suffix: ippcv_l.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrcDx

Pointer to the source image ROI x-derivative.

srcDxStepDistance in bytes between starts of consecutive lines in the source
image pSrcDx.

pSrcDyPointer to the source image ROI y-derivative.

srcDyStepDistance, in bytes, between the starting points of consecutive lines
in the source image pSrcDy.

pDstEdges

Pointer to the output array of the detected edges.

1571

1

Intel® Integrated Performance Primitives Developer Guide and Reference

roiSize

Distance, in bytes, between the starting points of consecutive lines
in the output image.
Size of the source image ROI in pixels.

lowThreshold

Lower threshold for edges detection.

highThreshold

Upper threshold for edges detection.

norm

Normalization type; supported values: ippNormL1 and ippNormL2.

pBuffer

Pointer to the pre-allocated temporary buffer.

dstEdgeStep

Description
This function operates with ROI (see Regions of Interest in Intel IPP). This function finds edges in the source
image ROI and stores them into the output image pDstEdges using the Canny algorithm. The function
requires a temporary working buffer; its size should be computed previously by calling the function
ippiCannyGetSize.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsStepErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointers is
NULL.
Indicates an error condition if pRoiSize has a field with zero or
negative value.
Indicates an error condition if srcDxStep, srcDyStep or
dstEdgeStep is less than roi.width*<pixelSize>.

ippStsBadArgErr

Indicates an error when lowThresh is negative or highThresh isless than lowThresh.

ippStsNotEvenStepErr

Indicates an error condition if one of the step values is notdivisible by 2 for 16s images, and by 4 for 32f images.

ExampleEigenValsVecsGetBufferSize
Calculates size of temporary buffer for the function
ippiEigenValsVecs.

SyntaxIppStatus ippiEigenValsVecsGetBufferSize_32f_C1R(IppiSize roiSize,int apertureSize, int
avgWindow, int* pBufferSize);
IppStatus ippiEigenValsVecsGetBufferSize_8u32f_C1R(IppiSize roiSize, int apertureSize,
int avgWindow, int* pBufferSize);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

1572

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Parameters
roiSize

Size of the source image ROI in pixels.

avgWindow

Size (pixels) of the derivative operator used by the function,
possible values are 3 or 5.
Size of the blurring window in pixels, possible values are 3 or 5.

pBufferSize

Pointer to the variable that returns the size of the temporary buffer.

apertureSize

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function calculates the size of a temporary buffer to be used by the function ippiEigenValsVecs.

CautionThe parameters apertureSize and avgWindow must be the same for both functions
ippiEigenValsVecsGetBufferSize and ippiEigenValsVecs.
Example “Using the function ippiEigenValsVecs” shows how to use the function
ippiEigenValsVecsGetBufferSizee.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointers is
NULL.
Indicates an error condition if roiWidth has zero or negativevalue, or if apertureSize or avgWindow has an illegal value.

EigenValsVecsBorder
Calculates eigen values and eigen vectors of image
blocks for corner detection.

SyntaxIppStatus ippiEigenValsVecsBorder_8u32f_C1R(const Ipp8u* pSrc, int srcStep, Ipp32f*
pEigenVV, int eigStep, IppiSize roiSize, IppiKernelType kernType, int apertureSize, int
avgWindow, IppiBorderType borderType, Ipp8u borderValue, Ipp8u* pBuffer);
IppStatus ippiEigenValsVecsBorder_32f_C1R(const Ipp32f* pSrc, int srcStep, Ipp32f*
pEigenVV, int eigStep, IppiSize roiSize, IppiKernelType kernType, int apertureSize, int
avgWindow, IppiBorderType borderType, Ipp32f borderValue, Ipp8u* pBuffer);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

1573

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Parameters
Pointer to the source image ROI.

pSrc
srcStep
pEigenVV
eigStep
roiSizekernType

Distance, in bytes, between the starting points of consecutive lines
in the source image.
Image to store the results.
Distance, in bytes, between the starting points of consecutive lines
in the output image.
Size of the source image ROI, in pixels.
Specifies the type of kernel used to compute derivatives, possible
values are:ippKernelSobel

Sobel kernel 3x3 or 5x5

ippKernelSobelNeg

Negative Sobel kernel 3x3 or 5x5

ippKernelScharr

Scharr kernel 3x3

apertureSize

Size of the derivative operator in pixels, possible values are 3 or 5.

borderType of image border. Possible values:
ippBorderConst

Values of all border pixels are set to a constant.

ippBorderRepl

Border is replicated from the edge pixels.

borderValue

Constant value to assign to pixels of the constant border. This parameter isapplicable only to the ippBorderConst border type.

avgWindow

Size of the blurring window in pixels, possible values are 3 or 5.

pBuffer

Pointer to the temporary buffer.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function takes a block around the pixel and computes the first derivatives Dx and D y. This operation is
performed for every pixel of the image using either Sobel or Scharr kernel in accordance with the kernTypeparameter. The apertureSize parameter specifies the size of the Sobel kernel. If this parameter is set to 3,
the function used 3x3 kernel, if it is set to 5, the function uses 5x5 kernel. Only 3x3 size is available for the
Scharr kernel, therefore the parameter apertureSize must be set to 3 if the Scharr kernel is used.

CautionIf the parameter apertureSize is set to 5 for operation with the Scharr kernel, the function
returns error status.
The function computes eigen values and vectors of the following matrix:

1574

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

The summation is performed over the full block with averaging over the blurring window with size

avgWindow.
The image eigenVV has the following format. For every pixel of the source image it contains six floatingpoint values - λ1, λ2 , x1, y1, x2, y2. These values are defined as follows:
λ1, λ2

Eigen values of the above matrix (λ1 ≥λ2 ≥ 0).

x1, y1

Coordinates of the normalized eigen vector corresponding to
λ1.

x2, y2

Coordinates of the normalized eigen vector corresponding to
λ2.

In case of a singular matrix or when one eigen value is much smaller than the second one, all these six
values are set to 0.
The function requires a temporary work buffer. Before using this function, compute the size of the bufferusing the ippiEigenValsVecsGetBufferSize function.

CautionThe parameters apertureSize and avgWindow must be the same for both functions
ippiEigenValsVecsGetBufferSize and ippiEigenValsVecsBorder.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

ippStsStepErr

ippStsNotEvenStepErr
ippStsBorderErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointers is
NULL.
Indicates an error condition if pRoiSize has a field with zero or
negative value, or if apertureSize or avgWindow has an illegal
value; or if kernType has a wrong value.
Indicates an error condition if srcStep is less thanroiSize.width*<pixelSize>, or eigStep is less thanroiSize.width*sizeof(Ipp32f)*6.
Indicates an error condition if steps for floating-point images
are not divisible by 4.
Indicates an error if borderType has an illegal value.

1575

1

Intel® Integrated Performance Primitives Developer Guide and Reference

See Also
Regions of Interest in Intel IPP
EigenValsVecsGetBufferSize Calculates size of temporary buffer for the function
ippiEigenValsVecs.
EigenValsVecs
Calculates eigen values and eigen vectors of image
blocks for corner detection.

SyntaxIppStatus ippiEigenValsVecs_8u32f_C1R(const Ipp8u* pSrc, int srcStep, Ipp32f* pEigenVV,
int eigStep, IppiSize roiSize, IppiKernelType kernType, int apertureSize, int
avgWindow, Ipp8u* pBuffer);
IppStatus ippiEigenValsVecs_32f_C1R(const Ipp32f* pSrc, int srcStep, Ipp32f* pEigenVV,
int eigStep, IppiSize roiSize, IppiKernelType kernType, int apertureSize, int
avgWindow, Ipp8u* pBuffer);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pEigenVV
eigStep
roiSizekernType

Pointer to the source image ROI.
Distance, in bytes, between the starting points of consecutive lines
in the source image.
Image to store the results.
Distance, in bytes, between the starting points of consecutive lines
in the output image.
Size of the source image ROI, in pixels.
Specifies the type of kernel used to compute derivatives, possible
values are:ippKernelSobel

Sobel kernel 3x3 or 5x5

ippKernelSobelNeg

Negative Sobel kernel 3x3 or 5x5

ippKernelScharr

Scharr kernel 3x3

apertureSize

Size of the derivative operator in pixels, possible values are 3 or 5.

avgWindow

Size of the blurring window in pixels, possible values are 3 or 5.

pBuffer

Pointer to the temporary buffer.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).

1576

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

This function takes a block around the pixel and computes the first derivatives Dx and D y. This operation is
performed for every pixel of the image using either Sobel or Scharr kernel in accordance with the kernTypeparameter. The apertureSize parameter specifies the size of the Sobel kernel. If this parameter is set to 3,
the function used 3x3 kernel, if it is set to 5, the function uses 5x5 kernel. Only 3x3 size is available for the
Scharr kernel, therefore the parameter apertureSize must be set to 3 if the Scharr kernel is used.

CautionIf the parameter apertureSize is set to 5 for operation with the Scharr kernel, the function
returns error status.
The function computes eigen values and vectors of the following matrix:

The summation is performed over the full block with averaging over the blurring window with size

avgWindow.
The image eigenVV has the following format. For every pixel of the source image it contains six floatingpoint values - λ1, λ2 , x1, y1, x2, y2. These values are defined as follows:
λ1, λ2

Eigen values of the above matrix (λ1 ≥λ2 ≥ 0).

x1, y1

Coordinates of the normalized eigen vector corresponding to
λ1.

x2, y2

Coordinates of the normalized eigen vector corresponding to
λ2.

In case of a singular matrix or when one eigen value is much smaller than the second one, all these six
values are set to 0.
The function requires a temporary working buffer; its size should be computed previously by calling thefunction ippiEigenValsVecsGetBufferSize.

CautionThe parameters apertureSize and avgWindow must be the same for both functions
ippiEigenValsVecsGetBufferSize and ippiEigenValsVecs.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error or awarning.

1577

1Intel® Integrated Performance Primitives Developer Guide and ReferenceippStsNullPtrErr
ippStsSizeErr

ippStsStepErr

ippStsNotEvenStepErr

Indicates an error condition if one of the specified pointers is

NULL.

Indicates an error condition if pRoiSize has a field with zero or
negative value, or if apertureSize or avgWindow has an illegal
value; or if kernType has wrong value.
Indicates an error condition if srcStep is less thanroiSize.width*<pixelSize>, or eigStep is less thanroiSize.width*sizeof(Ipp32f)*6.
Indicates an error condition if steps for floating-point images
are not divisible by 4.

ExampleMinEigenValGetBufferSize
Calculates size of temporary buffer for the function
ippiMinEigenVal.

SyntaxIppStatus ippiMinEigenValGetBufferSize_32f_C1R(IppiSize roiSize, int apertureSize, int
avgWindow, int* pBufferSize);
IppStatus ippiMinEigenValGetBufferSize_8u32f_C1R(IppiSize roiSize, int apertureSize,
int avgWindow, int* pBufferSize);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
roiSize

Size of the source image ROI in pixels.

avgWindow

Size (in pixels) of the derivative operator used by the function,
possible values are 3 or 5.
Size of the blurring window in pixels, possible values are 3 or 5.

pBufferSize

Pointer to the variable that returns the size of the temporary buffer.

apertureSize

Description
This function operates with ROI (see Regions of Interest in Intel IPP). This function calculates the size of atemporary buffer to be used by the function ippiMinEigenVal.

CautionThe parameters apertureSize and avgWindow must be the same for both functions
ippiMinEigenValGetBufferSize and ippiMinEigenVal.

1578

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointers is
NULL.
Indicates an error condition if roiWidth has a zero or negativevalue, or if apertureSize or avgWindow has an illegal value.

MinEigenValBorder
Calculates the minimal eigen value of image blocks forcorner detection.

SyntaxIppStatus ippiMinEigenValBorder_8u32f_C1R(const Ipp8u* pSrc, int srcStep, Ipp32f*
pMinEigenVal, int minValStep, IppiSize roiSize, IppiKernelType kernType, int
apertureSize, int avgWindow, IppiBorderType borderType, Ipp8u borderValue, Ipp8u*
pBuffer);
IppStatus ippiMinEigenValBorder_32f_C1R(const Ipp32f* pSrc, int srcStep, Ipp32f*
pMinEigenVal, int minValStep, IppiSize roiSize, IppiKernelType kernType, int
apertureSize, int avgWindow, IppiBorderType borderType, Ipp32f borderValue, Ipp8u*
pBuffer);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pMinEigenVal
minValStep
roiSizekernType

Pointer to the source image ROI.
Distance, in bytes, between the starting points of consecutive lines
in the source image.
Pointer to the image that is filled with the minimal eigen values.
Distance, in bytes, between the starting points of consecutive lines
in the output image.
Size of the source image ROI in pixels.
Specifies the type of kernel used to compute derivatives, possible
values are:ippKernelSobel

Sobel kernel 3x3 or 5x5

ippKernelSobelNeg

Negative Sobel kernel 3x3 or 5x5

ippKernelScharr

Scharr kernel 3x3

apertureSize

Size of the derivative operator, in pixels; possible values are 3 or 5.

avgWindow

Size of the averaging window, in pixels; possible values are 3 or 5.

1579

1

Intel® Integrated Performance Primitives Developer Guide and Reference

borderType

Type of image border. Possible values:
ippBorderConst

Values of all border pixels are set to a constant.

ippBorderRepl

Border is replicated from the edge pixels.

ippBorderMirror

Border pixels are mirrored from the source
image boundary pixels.

borderValue

Constant value to assign to pixels of the constant border. This parameter isapplicable only to the ippBorderConst border type.

pBuffer

Pointer to the temporary buffer.

Description
This function operates with ROI (see Regions of Interest in Intel IPP). This function takes a block around the
pixel and computes the first derivatives Dx and Dy. This operation is performed for every pixel of the image
using either Sobel or Scharr kernel in accordance with the kernType parameter. The apertureSize
parameter specifies the size of the Sobel kernel. If apertureSize is set to 3, the function uses 3x3 kernel, if
it is set to 5, the function uses 5x5 kernel. Only 3x3 size is available for the Scharr kernel, therefore theparameter apertureSize must be set to 3 if the Scharr kernel is used.

CautionIf the parameter apertureSize is set to 5 for operation with the Scharr kernel, the function
returns error status.
The function computes the minimal eigen value λ (λ≥ 0) of the following matrix:

The summation is performed over the full block with averaging over the blurring window with size

avgWindow.
The function requires a temporary work buffer. Before using this function, compute the size of the work
buffer using the ippiMinEigenValGetBufferSize function.

CautionThe parameters apertureSize and avgWindow must be the same for both functions
ippiMinEigenValGetBufferSize and ippiMinEigenValBorder.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

1580

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointers is
NULL.
Indicates an error condition if pRoiSize has a field with zero or
negative value, or if apertureSize or avgWindow has an illegal
value; or if kernType has wrong value.

Developer Guide and Reference for Intel® Integrated Performance Primitives

ippStsStepErr

1

Indicates an error condition if srcStep is less thanroiSize.width*<pixelSize>, or eigenvvStep is less thanroiSize.width*sizeof(Ipp32f).

ippStsNotEvenStepErr

Indicates an error condition if steps for floating-point images
are not divisible by 4.

ippStsBorderErr

Indicates an error if borderType has an illegal value.

See Also
Regions of Interest in Intel IPP
MinEigenValGetBufferSize Calculates size of temporary buffer for the function ippiMinEigenVal.
MinEigenVal
Calculates the minimal eigen value of image blocks forcorner detection.

SyntaxIppStatus ippiMinEigenVal_8u32f_C1R(const Ipp8u* pSrc, int srcStep, Ipp32f*
pMinEigenVal, int minValStep, IppiSize roiSize, IppiKernelType kernType, int
apertureSize, int avgWindow, Ipp8u* pBuffer);
IppStatus ippiMinEigenVal_32f_C1R(const Ipp32f* pSrc, int srcStep, Ipp32f*
pMinEigenVal, int minValStep, IppiSize roiSize, IppiKernelType kernType, int
apertureSize, int avgWindow, Ipp8u* pBuffer);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pMinEigenVal
minValStep
roiSizekernType

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in the source
image.
Pointer to the image that is filled with the minimal eigen values.
Distance in bytes between starts of consecutive lines in the output
image.
Size of the source image ROI in pixels.
Specifies the type of kernel used to compute derivatives, possible
values are:ippKernelSobel

Sobel kernel 3x3 or 5x5

ippKernelSobelNeg

Negative Sobel kernel 3x3 or 5x5

ippKernelScharr

Scharr kernel 3x3

apertureSize

Size of the derivative operator in pixels, possible values are 3 or 5.

avgWindow

Size of the averaging window in pixels, possible values are 3 or 5.

1581

1

Intel® Integrated Performance Primitives Developer Guide and Reference

pBuffer

Pointer to the temporary buffer.

Description
This function operates with ROI (see Regions of Interest in Intel IPP). This function takes a block around the
pixel and computes the first derivatives Dx and Dy. When using the MinEigenVal function, you need to verify
that the processing pixels beyond the ROI are available in memory. This operation is performed for every
pixel of the image using either Sobel or Scharr kernel in accordance with the kernType parameter. The sizeof the Sobel kernel may be specified the parameter apertureSize. If this parameter is set to 3, the functionused 3x3 kernel, if it is set to 5, the function uses 5x5 kernel. Only 3x3 size is available for the Scharr kernel,
therefore the parameter apertureSize must be set to 3 if the Scharr kernel is used.

CautionIf the parameter apertureSize is set to 5 for operation with the Scharr kernel, the function
returns error status.
Then, the function computes the minimal eigen value λ (λ≥ 0) of the following matrix:

The summation is performed over the full block with averaging over the blurring window with size

avgWindow.
The function requires a temporary working buffer; its size should be computed previously by calling thefunction ippiMinEigenValGetBufferSize.

CautionThe parameters apertureSize and avgWindow must be the same for both functions
ippiMinEigenValGetBufferSize and ippiMinEigenVal.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

ippStsStepErr

ippStsNotEvenStepErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointers is
NULL.
Indicates an error condition if pRoiSize has a field with zero or
negative value, or if apertureSize or avgWindow has an illegal
value; or if kernType has wrong value.
Indicates an error condition if srcStep is less thanroiSize.width*<pixelSize>, or eigenvvStep is less thanroiSize.width*sizeof(Ipp32f).
Indicates an error condition if steps for floating-point images
are not divisible by 4.

Histogram of Oriented Gradients (HOG) Descriptor
Histogram of oriented gradients (HOG) is a feature descriptor used to detect objects in computer vision andimage processing. The HOG descriptor technique counts occurrences of gradient orientation in localized
portions of an image - detection window, or region of interest (ROI).

1582

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Implementation of the HOG descriptor algorithm is as follows:
1.
2.
3.
4.
5.

Divide the image into small connected regions called cells, and for each cell compute a histogram ofgradient directions or edge orientations for the pixels within the cell.
Discretize each cell into angular bins according to the gradient orientation.
Each cell's pixel contributes weighted gradient to its corresponding angular bin.
Groups of adjacent cells are considered as spatial regions called blocks. The grouping of cells into a
block is the basis for grouping and normalization of histograms.
Normalized group of histograms represents the block histogram. The set of these block histograms
represents the descriptor.

The following figure demonstrates the algorithm implementation scheme:

Computation of the HOG descriptor requires the following basic configuration parameters:••••

Masks to compute derivatives and gradients
Geometry of splitting an image into cells and grouping cells into a block
Block overlapping
Normalization parameters

According to [Dalal05] the recommended values for the HOG parameters are:••••1D centered derivative mask [-1, 0, +1]
Detection window size is 64x128
Cell size is 8x8
Block size is 16x16 (2x2 cells)

Intel® IPP implementation does not assume any default fixed set of parameters values. The IppiHOGConfig
structure defines HOG parameters used in Intel IPP functions.
There are some limitations to the values of basic configuration parameters:#define IPP_HOG_MAX_CELL#define IPP_HOG_MAX_BLOCK#define IPP_HOG_MAX_BINS

(16)
(64)
(16)

/* max size of cell *//* max size of block *//* max number of bins */

1583

1

Intel® Integrated Performance Primitives Developer Guide and Reference

See Also
Structures and Enumerators
HOGGetSize
Computes the size of the HOG context structure.

SyntaxIppStatus ippiHOGGetSize(const IppiHOGConfig* pConfig, int* pHOGSpecSize);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pConfig

Pointer to the HOG context structure.

pHOGSpecSize

Pointer to the size of the HOG context structure, in bytes.

Description
This function checks the parameters of the HOG configuration and computes the size, in bytes, of the HOG
context structure pHOGSpecSize.
For an example on how to use this function, refer to the example provided with the HOG function description.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

Indicates an error when one of the winSize fields in the pConfig
parameter has a zero or negative value.
ippStsNotSupportedMod Indicates an error in HOG configuration:
ippStsSizeErr

eErr• cellSize is less than 2, or more than IPP_HOG_MAX_CELL• cellSize is more than blockSize, or blockSize is more than
•
•
•
•
•
•

IPP_HOG_MAX_BLOCK
blockSize is not a multiple of cellSize
Block does not have 2x2 cell geometry

blockStride is not a multiple of cellSize
Detection window size is not a multiple of blockStride
nbins is less than 2, or more than IPP_HOG_MAX_BINS
sigma or threshold value is less than, or equal to zeroSee Also
HOG Computes the HOG descriptor.
HOGInit
Initializes the HOG context structure.

1584

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

SyntaxIppStatus ippiHOGInit(const IppiHOGConfig* pConfig, IppiHOGSpec* pHOGSpec);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pConfig

Pointer to the HOG context structure.

pHOGSpec

Pointer to the HOG context structure.

Description
This function checks the parameters of the HOG configuration and initializes the HOG context structure.
For an example on how to use this function, refer to the example provided with the HOG function description.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error or a warning.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

Indicates an error when one of the winSize fields in the pConfig
parameter has a zero or negative value.
Indicates
an error in HOG configuration:
ippStsNotSupportedMod

ippStsSizeErr

eErr• cellSize is less than 2, or more than IPP_HOG_MAX_CELL• cellSize is more than blockSize, or blockSize is more than
IPP_HOG_MAX_BLOCK• blockSize is not a multiple of cellSize

•
•
•
•
•

Block does not have 2x2 cell geometry

blockStride is not a multiple of cellSize
Detection window size is not a multiple of blockStride
nbins is less than 2, or more than IPP_HOG_MAX_BINS
sigma or threshold value is less than, or equal to zeroSee Also
HOG Computes the HOG descriptor.
HOGGetBufferSize
Computes the size of the work buffer for the ippiHOG
function.

SyntaxIppStatus ippiHOGGetBufferSize(const IppiHOGSpec* pHOGSpec, IppiSize roiSize, int*
pBufferSize);

Include Files
ippi.h1585

1Intel® Integrated Performance Primitives Developer Guide and Reference

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pHOGSpec

Pointer to the HOG context structure.

roiSize

Maximum size of the source image ROI, in pixels.

pBufferSize

Pointer to the size of the work buffer, in bytes.

Description
This function computes the size of the work buffer for the HOG function.
For an example on how to use this function, refer to the example provided with the HOG function description.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsContextmatchErr Indicates an error when the context parameter does not match theoperation.

See Also
HOG Computes the HOG descriptor.
HOGGetDescriptorSize
Computes the size of the HOG descriptor.

SyntaxIppStatus ippiHOGGetDescriptorSize(const IppiHOGSpec* pHOGSpec, int*
pWinDescriptorSize);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pHOGSpec

Pointer to the HOG context structure.

pWinDescriptorSize

Pointer to the size of the descriptor window, in bytes.

Description
This function computes the size of the buffer for a single detection window. If the subsequent call(s) of the
HOG function target processing of multiple detection windows, the size of the buffer must be increased
proportionally.
For an example on how to use this function, refer to the example provided with the HOG function description.

1586

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsContextmatchErr Indicates an error when the context parameter does not match theoperation.

See Also
HOG Computes the HOG descriptor.
HOG
Computes the HOG descriptor.

SyntaxIppStatus ippiHOG_<mod>(const Ipp<srcDatatype>* pSrc, int srcStep, IppiSize roiSize,const IppiPoint* pLocation, int nLocations, Ipp32f* pDst, const IppiHOGSpec* pHOGSpec,
IppiBorderType borderID, Ipp<srcDatatype> borderValue, Ipp8u* pBuffer);
Supported values for mod:8u32f_C1R

16u32f_C1R

16s32f_C1R

32f_C1R

IppStatus ippiHOG_<mod>(const Ipp<srcDatatype>* pSrc, int srcStep, IppiSize roiSize,const IppiPoint* pLocation, int nLocations, Ipp32f* pDst, const IppiHOGSpec* pHOGCtx,
IppiBorderType borderID, Ipp<srcDatatype> borderValue[3], Ipp8u* pBuffer);
Supported values for mod:8u32f_C3R

16u32f_C3R

16s32f_C3R

32f_C3R

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source image ROI.

roiSize

Distance, in bytes, between the starting points of consecutive lines
in the source image.
Size of the source image ROI, in pixels.

pLocation

Pointer to the array with detection window locations.

nLocations

Number of locations.

pDst

Pointer to the HOG descriptor.

pHOGCtx, pHOGSpec

Pointer to the HOG context/specification structure.

borderID

Type of border. Possible values are:srcStep1587

1Intel® Integrated Performance Primitives Developer Guide and Reference

ippBorderConst
ippBorderRepl
ippBorderInMem
ippBorderMirror

Values of all border pixels are set to a
constant.
Border is replicated from the edge pixels.
Border is obtained from the source image
pixels in memory.
Border pixels are mirrored from the source
image boundary pixels.

Mixed borders are also supported. They can be obtained by the bitwise
operation OR between ippBorderRepl and ippBorderInMemTop,
ippBorderInMemBottom, ippBorderInMemLeft, ippBorderInMemRight.

borderValue

Constant value to assign to pixels of the constant border. This parameter isapplicable only to the ippBorderConst border type.

pBuffer

Pointer to the work buffer.

Description
This function computes the HOG descriptor over defined locations of the detection window. Flavors with theC1 suffix operate on one-channel (gray) images, and C3 flavors operate on color images.
Before using this function, compute the size of the context structure, work buffer, and descriptor using the
HOGGetSize, HOGGetBufferSize, and HOGGetDescriptorSize functions, respectively. To initialize the HOG
context structure, use the HOGInit function.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsContextmatchErr
ippStsStepErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error when one of the specified pointers is NULL.
Indicates an error when the context parameter does not matchthe operation.
Indicates an error when srcStep is less than, or equal to zero.

ippStsBorderErr

Indicates an error when srcStep is not divisible by input data
type size.
Indicates an error when borderID has an illegal value.

ippStsSizeErr

Indicates an error when roiSize is less than, or equal to zero.

ippStsNotEvenStepErr

ExampleSee Also
HOGGetSize Computes the size of the HOG context structure.
HOGGetBufferSize Computes the size of the work buffer for the ippiHOG function.
HOGGetDescriptorSize Computes the size of the HOG descriptor.
HOGInit Initializes the HOG context structure.
Hough Transform
The Hough transform is a general technique that allows to detect the flat curves in binary images [Gon93].
The current version of Intel IPP implements the following:•

Detection of the straight lines that are defined by the parametric equation:

1588

1

Developer Guide and Reference for Intel® Integrated Performance Primitives•r = x*cos(Θ) + y*sin(Θ), where r and Θ are the length and angle from the origin of a normal to theline, respectively.
Detection of lines using the probabilistic Hough transform algorithm [Matas00].

HoughLineGetSize
Computes the size of the working buffer for thestraight lines detection.

SyntaxIppStatus ippiHoughLineGetSize_8u_C1R(IppiSize roiSize, IppPointPolar delta, int
maxLineCount, int* pBufSize);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
roiSize

Size of the source image ROI, in pixels.

delta

Step of discretization (delta.rho - radial increment, delta.theta angular increment).

maxLineCount

Number of elements of the destination buffer.

pBufSize

Pointer to the size of the working buffer.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function computes the size of the temporary working buffer that is required for the function
ippiHoughLine.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if pBufSize is NULL.

ippStsSizeErr

Indicates an error condition if roiSize or delta has a field withzero or negative value.

HoughLine
Detects straight lines in the source image.

SyntaxIppStatus ippiHoughLine_8u32f_C1R(const Ipp8u* pSrc, int srcStep, IppiSize roiSize,
IppPointPolar delta, int threshold, IppPointPolar* pLine, int maxLineCount, int*
pLineCount, Ipp8u* pBuffer);

1589

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc

Pointer to the source image ROI.

srcStep

Distance in bytes between starts of consecutive lines in the source image.

roiSize

Size of source image ROI in pixels.

delta

Step of discretization ( delta.rho - radial increment, delta.theta angular increment).

thresholdMinimum number of points that are required to detect the line.

pLine

Pointer to the destination buffer for lines.

pLineCount

Number of detected lines. If the value is more than maxLineCount, thefunction returns the ippStsDstSizeLessExpected status.

maxLineCount

Number of elements of the destination buffer.

pBuffer

Pointer to the working buffer.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
In the binarised source image pSrc, the function performs detection of the straight line defined by theequation given at the beginning of section Hough Transform. The level of discretization delta is specified as
the input parameters. The performance and effectiveness of the function is strongly depends on thisparameter. The function requires the external working buffer pBuffer, which size should be computed
previously using the function ippiHoughLineGetSize.

CautionThe value of the parameter delta must not be greater than the value of the parameterdelta set when the size of the working buffer is computed.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error condition if roiSize has a field with zero or
negative value; or if maxLineCount is less than or equal to 0.

ippStsStepErr

Indicates an error condition if srcStep has an illegal value.

1590

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

ippStsBadArgErr

ippStsDstSizeLessExpected

Indicates an error condition if threshold is less than or equal
to 0; or delta.rho is less than 0, or greater than sum of thewidth and height of the ROI; or delta.theta is less than 0, or
greater than p.
Indicates a warning if number of the detected lines is greaterthan the size of the destination buffer maxLineCount.

HoughLine_Region
Detects straight lines with the specified range ofparameters in the source image.

SyntaxIppStatus ippiHoughLine_Region_8u32f_C1R(const Ipp8u* pSrc, int srcStep, IppiSize
roiSize, IppPointPolar* pLine, IppPointPolar dstRoi[2], int maxLineCount, int*
pLineCount, IppPointPolar delta, int threshold, Ipp8u* pBuffer);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc

Pointer to the source image ROI.

srcStep

Distance in bytes between starts of consecutive lines in the source image.

roiSize

Size of source image ROI, in pixels.

pLine

Pointer to the destination array of detected lines.

dstRoi

Specifies the range of parameters of straight lines to be detected.

pLineCount

Pointer to the number of detected lines.

delta

Step of discretization (delta.rho - radial increment, delta.theta angular increment).

thresholdMinimum number of points that are required to detect the line.

maxLineCount

Maximum number of lines in the destination buffer.

pBuffer

Pointer to the working buffer.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
In the binary source image pSrc, this function performs detection of the straight line defined by the equation
given at the beginning of section Hough Transform. Only lines line[n] with the parameters satisfying thefollowing conditions are detected:

dstRoi[0].rho≤line[n].rho≤dstRoi[1].rho;
dstRoi[0].theta≤line[n].theta≤dstRoi[1].theta;

1591

1

Intel® Integrated Performance Primitives Developer Guide and Reference

where n = 0. pLineCount.
The level of discretization delta is specified as the input parameters. The performance and effectiveness ofthe function is strongly depends on this parameter. The function requires the external working buffer
pBuffer, which size should be computed previously using the function ippiHoughLineGetSize.

CautionThe value of the parameter delta must not be greater than the value of the parameterdelta set when the size of the working buffer is computed.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error condition if roiSize has a field with zero or
negative value; or if maxLineCount is less than or equal to 0.

ippStsStepErr

Indicates an error condition if srcStep has an illegal value.

ippStsBadArgErr

ippStsDstSizeLessExpected

Indicates an error condition if threshold is less than or equal
to 0; or delta.rho is less than 0, or greater than sum of thewidth and height of the ROI; or delta.theta is less than 0, or
greater than p; or some filed of dstRoi[0] is greater than thecorresponding filed of dstRoi[1].
Indicates a warning if number of the detected lines is greaterthan the size of the destination buffer maxLineCount.

HoughProbLineGetSize
Computes the size of the working buffer and spec
structure for line detection with the probabilistic
Hough transform algorithm.

SyntaxIppStatus ippiHoughProbLineGetSize_8u_C1R(IppiSize roiSize, IppPointPolar delta, int*
pSpecSize, int* pBufSize);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
roiSize

Size of the source image ROI, in pixels.

delta

Step of discretization (delta.rho - radial increment, delta.theta angular increment).

pSpecSize

Size of the IppiHoughProbSpec structure.

1592

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

pBufSize

Pointer to the size of the working buffer.

Description
This function operates with ROI.
This function computes the size of the temporary working buffer and the IppiHoughProbSpec specification
structure for the ippiHoughProbLine function.
For an example on how to use this function, see the example provided with the ippiHoughProbLine
function description.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if pBufSize is NULL.

ippStsSizeErr

Indicates an error condition if roiSize or delta has a field witha zero or negative value.

See Also
Regions of Interest in Intel IPP
HoughProbLine Detects lines in the source image using the probabilistic Hough transform.
HoughProbLineInit
Initializes the specification structure for line detection
with the probabilistic Hough transform algorithm.

SyntaxIppStatus ippiHoughProbLineInit_8u32f_C1R(IppiSize roiSize, IppPointPolar delta,
IppHintAlgorithm hint, IppiHoughProbSpec* pSpec);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
roiSize

Size of the source image ROI, in pixels.

delta

Step of discretization (delta.rho - radial increment, delta.theta angular increment).

hint

Suggests using specific code for calculations.

pSpec

Pointer to the IppiHoughProbSpec structure.

Description
This function operates with ROI.
This function initializes the IppiHoughProbSpec specification structure that is required for theippiHoughProbLine function.

1593

1

Intel® Integrated Performance Primitives Developer Guide and Reference

For an example on how to use this function, see the example provided with the ippiHoughProbLine
function description.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if pBufSize is NULL.

ippStsSizeErr

Indicates an error condition if roiSize or delta has a field withzero or negative value.

See Also
Regions of Interest in Intel IPP
HoughProbLine Detects lines in the source image using the probabilistic Hough transform.
HoughProbLine
Detects lines in the source image using theprobabilistic Hough transform.

SyntaxIppStatus ippiHoughProbLine_8u32f_C1R(const Ipp8u* pSrc, int srcStep, IppiSize roiSize,
int threshold, int lineLength, int lineGap, IppiPoint* pLine, int maxLineCount, int*
pLineCount, Ipp8u* pBuffer, const IppiHoughProbSpec* pSpec);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc

Pointer to the source image ROI.

srcStep

Distance, in bytes, between the starting points of consecutive lines in thesource image.

roiSize

Size of the source image ROI in pixels.

thresholdMinimum number of points that are required to detect the line.

lineLength

Minimum length of the line.

lineGap

Maximum length of the gap between lines.

pLine

Pointer to the detected line: pLine[2*n] indicates beginning of the line,
pLine[2*n+1] indicates end of the line.

pLineCount

Number of detected lines.

maxLineCount

Number of elements in the destination buffer.

pBuffer

Pointer to the working buffer.

pSpec

Pointer to the specification structure.

1594

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Description
This function operates with ROI.
This function detects line segments of the binary pSrc image using the probabilistic Hough transform. Before
using this function, compute the size of the working buffer and specification structure using theippiHoughProbGetSize function and initialize the structure using the ippiHoughProbLineInit function.
This function implements the probabilistic Hough transform algorithm for line detection, described in[Matas00].

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error condition if roiSize has a field with zero or
negative value; or if maxLineCount is less than or equal to 0.

ippStsStepErr

Indicates an error condition if srcStep has an illegal value.

ippStsBadArgErr
ippStsDstSizeLessExpected

Indicates an error condition if threshold is less than or equal
to 0.
Indicates a warning if number of the detected lines is greaterthan the size of the destination buffer maxLineCount.

ExampleSee Also
Regions of Interest in Intel IPP
HoughProbLineGetSize Computes the size of the working buffer and spec structure for line
detection with the probabilistic Hough transform algorithm.
HoughProbLineInit Initializes the specification structure for line detection with the probabilistic
Hough transform algorithm.
LineSuppressionGetBufferSize
Computes the size of the external buffer for theippiLineSuppression function.

SyntaxIppStatus ippiLineSuppressionGetBufferSize(IppiSize roiSize, IppiMaskSize filterMask,
Ipp32u avgWndSize, IppDataType dataType, int numChannels, int* pBufferSize);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
roiSize

Size of the source and destination image ROI, in pixels.

1595

1

Intel® Integrated Performance Primitives Developer Guide and Reference

filterMask

Size of the derivative filter aperture. Possible values are ippMskSize3x3
and ippMskSize5x5.

avgWndSize

Linear size of a neighborhood block for averaging.

dataType

Data type of the source image.

numChannels

Number of channels in the images. Possible value is 1.

pBufferSize

Pointer to the size, in bytes, of the external work buffer.

Description
This function calculates the size of the temporary buffer for the ippiLineSuppression function.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error or a warning.

ippStsNullPtrErr

Indicates an error when pBufferSize is NULL.

ippStsSizeErr

Indicates an error in the following cases:• when roiSize is less than, or equal to zero
• when avgWndSize is equal to zero

ippStsMaskSizeErr

Indicates an error when filterMask has an illegal value.

ippStsDataTypeErr

Indicates an error when dataType has an illegal value.

ippStsNumChannelsErr

Indicates an error when numChannels has an illegal value.

See Also
LineSuppression Implements the line suppression algorithm.
LineSuppression
Implements the line suppression algorithm.

SyntaxIppStatus ippiLineSuppression_8u_C1R(const Ipp8u* pSrc, int srcStep, const Ipp8u*
pFeature, int featureStep, Ipp8u* pDst, int dstStep, IppiSize roiSize,
IppiDifferentialKernel filterType, IppiMaskSize filterMask, Ipp32u avgWndSize, float
threshold, IppiBorderType borderType, Ipp8u borderValue, Ipp8u* pBuffer);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc

Pointer to the source image.

srcStep

Distance, in bytes, between the starting points of consecutive lines
in the source image.

1596

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

pFeaturefeatureStep
pDst

Pointer to the feature points image.
Distance, in bytes, between the starting points of consecutive lines
in the feature points image.
Pointer to the destination image.

roiSize

Distance, in bytes, between the starting points of consecutive lines
in the destination image.
Size of the source and destination image ROI, in pixels.

filterType

Type of the derivative operator. Possible values are:dstStep

ippKernelSobel

Sobel filter

ippKernelScharr

Scharr filter

ippKernelCentralDiff Central differences operator
filterMask

Size of the derivative filter aperture. The list of possible values
depends on the filterType value:
Filter Type

Filter Mask

ippKernelSobel

ippMskSize3x3, ippMskSize5x5

ippKernelScharr

ippMskSize3x3

ippKernelCentralDiff

ippMskSize3x3

avgWndSize

Linear size of a neighborhood block for averaging.

thresholdLine suppression threshold.

borderType

Type of border. Possible values are:ippBorderConst
ippBorderRepl
ippBorderInMem

Values of all border pixels are set to a
constant.
Border is replicated from the edge pixels.
Border is obtained from the source image
pixels in memory.

Mixed borders are also supported. They can be obtained by the bitwise
operation OR between ippBorderRepl or ippBorderConst and thefollowing flags:••••

ippBorderInMemTop
ippBorderInMemBottom
ippBorderInMemLeft
ippBorderInMemRight

Each of these flags means that for the corresponding border the outside
pixels of the source image are in memory.

borderValue

Constant value(s) to assign to pixels of the constant border. This parameter
is applicable only to the ippBorderConst border type.

pBuffer

Pointer to the work buffer. To calculate the size of the temporary
buffer, use the LineSuppressionGetBufferSize function.

1597

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Description
The ippiLineSuppression function implements the line suppression algorithm. This function uses two input
images: the original image and feature points image containing the lines (edges) and corners. This function
performs the following steps:
1.
2.

Computes I(x, y)x and I(x, y)y gradients for each (x, y) pixel of the image. The function computes
gradients using the derivative operator specified by the filterType and filterMask parameters.
Computes products of the gradients at each (x, y) pixel of the image:3.

Performs averaging of the products of gradients over a rectangular neighborhood block at each pixel ofthe image. The block size is specified by the avgWndSize value.

4.

Defines 2x2 gradient covariance matrix H(x , y) over a rectangular neighborhood block for each (x, y)
pixel of the image.

5.

For each (x, y) pixel of the image checks the condition below. If the condition is true, the considered
point is not a feature point.

where
•
•

threshold is the line suppression threshold value passed to the functiony
λ1*λ2 are eigenvalues of the matrix H(x , ). If both eigenvalues have large positive values, the point
belongs to a corner. If λ1 is much bigger than λ2, the function clears out the candidate point.

The first and third stages of the function algorithm are filtering operations; they use border processing
approach that is specified by the borderType parameter.
Before using this function, compute the size of the external work buffer using the
LineSuppressionGetBufferSize function.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrc, pFeature, pDst, or pBufferSize
is NULL.

ippStsSizeErr

Indicates an error in the following cases:• when roiSize is less than, or equal to zero

1598

1

Developer Guide and Reference for Intel® Integrated Performance Primitives• when avgWndSize is equal to zero

ippStsFilterTypeErr

Indicates an error when one of the step values is not divisibleby 4 for floating point images.
Indicates an error when filterType has an illegal value.

ippStsMaskSizeErr

Indicates an error when filterMask has an illegal value.

ippStsBorderErr

Indicates an error when borderType has an illegal value.

ippStsNotEvenStepErr

Indicates an error when srcStep or dstStep has a negativevalue.
ippStsInplaceModeNotSupportedE Indicates an error when pFeature and pDst point to the sameimage.
rr

ippStsStepErr

ExampleSee Also
LineSuppressionGetBufferSize Computes the size of the external buffer for theippiLineSuppression function.

Distance Transform Functions
This section describes the distance transform functions.
Distance transform is used for calculating the distance to an object. The input is an image with feature andnon-feature pixels. The function labels every non-feature pixel in the output image with a distance to theclosest feature pixel. Feature pixels are marked with zero.
Distance transform is used for a wide variety of subjects including skeleton finding and shape analysis.

DistanceTransform
Calculates distance to the closest zero pixel for all
non-zero pixels of source image.

SyntaxCase 1: Not-in-place operations
IppStatus ippiDistanceTransform_3x3_<mod>(const Ipp8u* pSrc, int srcStep,
Ipp<dstDatatype>* pDst, int dstStep, IppiSize roiSize, Ipp32s* pMetrics);
IppStatus ippiDistanceTransform_5x5_<mod>(const Ipp8u* pSrc, int srcStep,
Ipp<dstDatatype>* pDst, int dstStep, IppiSize roiSize, Ipp32s* pMetrics);
Supported values for mod:8u_C1R

8u16u_C1R

IppStatus ippiDistanceTransform_3x3_8u32f_C1R(const Ipp8u* pSrc, int srcStep, Ipp32f*
pDst, int dstStep, IppiSize roiSize, Ipp32f* pMetrics);
IppStatus ippiDistanceTransform_5x5_8u32f_C1R(const Ipp8u* pSrc, int srcStep, Ipp32f*
pDst, int dstStep, IppiSize roiSize, Ipp32f* pMetrics);

Case 2: In-place operations
IppStatus ippiDistanceTransform_3x3_8u_C1IR(Ipp8u* pSrcDst, int srcDstStep, IppiSize
roiSize, Ipp32s* pMetrics);

1599

1

Intel® Integrated Performance Primitives Developer Guide and Reference

IppStatus ippiDistanceTransform_5x5_8u_C1IR(Ipp8u* pSrcDst, int srcDstStep, IppiSize
roiSize, Ipp32s* pMetrics);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
Pointer to the source image ROI.

pSrc

Distance in bytes between starts of consecutive lines in the source
image.
Pointer to the ROI in the destination distance image.

srcStep
pDst

roiSize

Distance in bytes between starts of consecutive lines in thedestination image.
Pointer to the source and destination image ROI for in-place
operation.
Distance in bytes between starts of consecutive lines in the sourceand destination image for in-place operation.
Size of the image ROI in pixels.

pMetrics

Pointer to the array that specifies used metrics.

dstStep
pSrcDstsrcDstStep

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function approximates the actual distance from the closest zero pixel to each certain pixel with the sumof atomic distances from the fixed set. The set consists of two values for a 3x3 mask and three values for a
5x5 mask.
Figure “3x3 Mask” shows the result of the distance transform of a 7x7 image with zero point in the center.
This example corresponds to a 3x3 mask. Two numbers specify metrics in case of the 3x3 mask:• distance between two pixels that share an edge,• distance between the pixels that share a corner.
In this case the values are 1 and 1.5 correspondingly.
3x3 Mask
4.5

4

3.5

3

3.5

4

4.5

4

3

2.5

2

2.5

3

4

3.5

2.5

1.5

1

1.5

2.5

3.5

3

2

1

0

1

2

3

3.5

2.5

1.5

1

1.5

2.5

3.5

4

3

2.5

2

2.5

3

4

4.5

4

3.5

3

3.5

4

4.5

Figure “5x5 Mask” shows the distance transform for the same image, but for a 5x5 mask.
For this mask yet another number is added to specify metrics - the additional distance, i.e., the distance
between pixels corresponding to the chess knight move.

1600

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

In this example, the additional distance is equal to 2.
5x5 Mask
4

3.5

3

3

3

3.5

4

3.5

3

2

2

2

3

3.5

3

2

1.5

1

1.5

2

3

3

2

1

0

1

2

3

3

2

1.5

1

1.5

2

3

3.5

3

2

2

2

3

3.5

4

3.5

3

3

3

3.5

4

Return Values
ippStsNoErr
ippStsNullPtrErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointers is
NULL.
Indicates an error condition if roiSize has a field with zero or
negative value.

ippStsSizeErr

Indicates an error condition if srcStep or dstStep is less thanippStsStepErr

roiSize.width*<pixelSize>.

ippStsNotEvenStepErr

Indicates an error condition if step value is not divisible by 2
for 16u images, and by 4 for 32f images.

ippStsCoeffErr

Indicates an error condition if at least one element of pMetrics
array has zero or negative value.

ExampleResult:1 2 3 4 5 6 7
1 0 3 4 5 6 7
1 2 3 4 5 6 7
1 2 3 0 5 6 7
1 2 3 4 5 6 7
1 2 3 4 5 0 7
1 2 3 4 5 6 7

src

2 2 2 4 6 6 62 0 2 4 4 4 6
2 2 2 2 2 4 6
4 4 2 0 2 4 4
6 4 2 2 2 2 2
6 4 4 4 2 0 2
6 6 6 4 2 2 2

dst

GetDistanceTransformMask
Returns an optimal mask for a given type of metrics
and given mask size.

1601

1

Intel® Integrated Performance Primitives Developer Guide and Reference

SyntaxIppStatus ippiGetDistanceTransformMask_<mod>(int kerSize, IppiNorm norm, Ipp<datatype>*
pMetrics);
Supported values for mod:

32s

32f

IppStatus ippiGetDistanceTransformMask(int maskType, Ipp32f* pMetrics);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
kerSize

Specifies the mask size as follows: 3 for 3x3 mask, 5 for 5x5 mask.

norm

Specifies the type of metrics. Possible values are:ippiNormInf(0)L∞, Δ = max(|x1 - x2|, |y1 - y2|),ippiNormL1(1)L1, Δ = |x1 - x2| + |y1 - y2|,ippiNormL2(2)L2, Δ = sqrt((x1 - x2)2 + (y1 - y2)2)

maskType

Distance type.

pMetrics

Pointer to the output array to store metrics parameters. The array
contains the following number of elements:2

for 3x3 mask,3

for 5x5 mask.

Description
This function fills up the output array with metrics parameters for the given type of metrics and size of mask.
The function returns the following results:(1, 1)

L∞, 3x3 mask,(1, 2)

L1, 3x3 mask,(2, 3)

L2, 3x3 mask, 32s data type,(0.955, 1.3693)

L2, 3x3 mask, 32f data type,(1, 1, 2)

L∞, 5x5 mask,(1, 2, 3)

L1, 5x5 mask,(4, 6, 9)

L2, 5x5 mask, 32s data type,(1.0, 1.4, 2.1969)

L2, 5x5 mask, 32f data type.

For more information, see [Bor86].

1602

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

NOTE
For compatibility with the previous versions of the library the earlier function
ippiGetDistanceTransformMask replaced by the function
ippiGetDistanceTransformMask_32f in the current version is also supported.

Return Values

ippStsNullPtrErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pMetrics pointer is NULL.

ippStsSizeErr

Indicates an error condition if kerSize has a wrong value.

ippStsBadArgErr

Indicates an error condition if kerSize or norm has a wrong
value.

ippStsNoErr

FastMarchingGetBufferSize
Computes the size of the working buffer for the peaksearch.

SyntaxIppStatus ippiFastMarchingGetBufferSize_8u32f_C1R(IppiSize roiSize, int* pBufferSize);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
roiSize

Maximum image size (in pixels).

pBufferSize

Pointer to the computed size of the buffer.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function computes the size of the working buffer required for the ippiFastMarching function. The buffer
with the length pBufferSize[0] can be used to filter images with width that is equal to or less than theparameter roiSize specified for the function ippiFastMarching.

Return Values

ippStsNullPtrErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pBufferSize pointer is NULL.

ippStsSizeErr

Indicates an error condition if roiSize is lessthan 1.

ippStsNoErr

1603

1

Intel® Integrated Performance Primitives Developer Guide and Reference

FastMarching
Calculates distance transform to closest zero pixel for
all non-zero pixels of source image using fast
marching method.

SyntaxIppStatus ippiFastMarching_8u32f_C1R(const Ipp8u* pSrc, int srcStep, Ipp32f* pDst, int
dstStep, IppiSize roiSize, Ipp32f radius, Ipp8u* pBuffer);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pDst

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in the source
image.
Pointer to the destination image ROI.

roiSize

Distance in bytes between starts of consecutive lines in thedestination image.
Size of the source and destination image ROI.

radiusRadius of the neighborhood of the marked area.

pBuffer

Pointer to the working buffer.

dstStep

Description
This function operates with ROI (see Regions of Interest in Intel IPP ).
This function computes the distance from the closest zero pixel to each image pixel according to the Fast
Marching Method (FMM) [ Telea04 ]. The FMM distance for area Ω with the border ∂Ω is a solution of theequations:

The resulting distance complies with the equation

1604

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Here {u1, v1} and {u2, v2} are coordinates for pair of pixels adjacent to the pixel with {x, y} coordinates.
The area Ω is defined by the non-zero pixel of the image pSrc. If raduis is positive, then the FMM distancewith the negative sign is calculated in Euclidean raduis-neighborhood of Ω.
The function requires the working buffer pBuffer whose size should be computed by the function
FastMarchingGetBufferSize beforehand.
Figure “Result of the FFM Method shows the result of the fast marching method for the 7x9 image withcentered 3x5 non-zero mask and raduis=1.
Result of the FFM Method

0.00000.0000-1.0000-1.0000-1.0000
0.00000.00000.0000-1.0000-1.0000-1.0000-1.0000-1.0000
0.00000.00000.7071-1.e-10-1.e-10-1.e-10-1.e-10-1.e-100.7071-1.0000-1.e-100.70710.96590.99940.96590.7071-1.e-10-1.0000-1.e-100.96591.67301.95791.67300.9659-1.e-10-1.0000-1.e-100.70710.96590.99940.96590.7071-1.e-10-1.0000
0.7071-1.e-10-1.e-10-1.e-10-1.e-10-1.e-100.7071-1.0000-1.0000-1.0000-1.0000-1.0000-1.0000-1.0000-1.0000
0.0000Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsStepErr
ippStsNotEvenStepErr
ippStsBadArgErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointers is
NULL.
Indicates an error condition if roiSize has a field with zero or
negative value.
Indicates an error condition if srcStep or dstStep is less thanroiSize.width * < pixelSize>.
Indicates an error condition if the step value is not divisible by
4 for floating-point images.
Indicates an error condition if raduis is negative.

TrueDistanceTransformGetBufSize
Calculates the size of the temporary working buffer for
the function ippiTrueDistanceTransform.

SyntaxIppStatus ippiTrueDistanceTransformGetBufferSize_8u32f_C1R(IppiSize roiSize, int*
pBufferSize);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

1605

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Parameters
roiSize

Size of the image ROI in pixels.

pBufferSize

Pointer to the computed size of the buffer.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function calculates the size of the work buffer required for the TrueDistanceTransform function.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsStepErr
ippStsNotEvenStepErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointers is
NULL.
Indicates an error condition if roiSize has a field with zero or
negative value.
Indicates an error condition if srcStep or dstStep is less thanroiSize.width*<pixelSize>.
Indicates an error condition if step value is not divisible by 2
for 16u images, and by 4 for 32f images.

TrueDistanceTransform
Calculates the Eucledian distance to the closest zero
pixel for all non-zero pixels of the source image.

SyntaxIppStatus ippiTrueDistanceTransform_8u32f_C1R(const Ipp8u* pSrc, int srcStep, Ipp32f*
pDst, int dstStep, IppiSize roiSize, Ipp8u* pBuffer);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pDst

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in the source
image.
Pointer to the ROI in the destination distance image.

roiSize

Distance in bytes between starts of consecutive lines in thedestination image.
Size of the image ROI in pixels.

pBuffer

Pointer to the temporary working buffer.

dstStep1606

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function calculates the Eucledian distance to the closest zero pixel for all non-zero pixels of the source
image [Felz04].
The figure below shows the result of the integer version of the true distance transform of a 7x7 image withzero point in the center and with the scale factor -5.
136

115

101

96

101

115

136

115

91

72

64

72

91

115

101

72

45

36

45

72

101

96

64

36

0

36

64

96

101

72

45

36

45

72

101

115

91

72

64

72

91

115

136

115

101

96

101

115

136

Return Values
ippStsNoErr
ippStsNullPtrErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointers is
NULL.
Indicates an error condition if roiSize has a field with zero or
negative value.
Indicates an error condition if srcStep or dstStep is less thanroiSize.width*<pixelSize>.

ippStsSizeErr
ippStsStepErr
ippStsNotEvenStepErr

Indicates an error condition if step value is not divisible by 2
for 16u images, and by 4 for 32f images.

Image Gradients
GradientColorToGray
Converts a color gradient image to grayscale.

SyntaxIppStatus ippiGradientColorToGray_<mod>(const Ipp<datatype>* pSrc, int srcStep,
Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, IppiNorm norm);
Supported values for mod:8u_C3C1R

16u_C3C1R

32f_C3C1R

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

1607

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Parameters
pSrc
srcStep
pDst
dstStep
roiSize
norm

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines inthe source image.
Pointer to the destination image ROI.
Distance in bytes between starts of consecutive lines inthe destination image.
Size of the source and destination image ROI.
Type of norm to form the mask for dilation; following
values are possible:
ippiNormInf

Infinity norm.

ippiNormL1

L1 norm.

ippiNormL2

L2 norm.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function creates the grayscale gradient image pDst from the source three-channel gradient image pSrc.
The type of norm is specified by the parameter. Pixel values for destination image are computed for different
type of norm in accordance with the following formula:

For integer flavors the result is scaled to the full range of the destination data type.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsStepErr
ippStsNotEvenStepErr

ippStsBadArgErr

1608

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointers is
NULL.
Indicates an error condition if roiSize has a field with zero or
negative value.
Indicates an error condition if srcStep or dstStep is less thanroiSize.width * < pixelSize>.
Indicates an error condition if one of the step values is notdivisible by 2 for integer images, or by 4 for floating-point
images.
Indicates an error condition if norm has an illegal value.

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

GradientVectorGetBufferSize
Computes the size of the work buffer for theippiGradientVector{Sobel|Scharr|Prewitt}
functions.

SyntaxIppStatus ippiGradientVectorGetBufferSize (IppiSize roiSize, IppiMaskSize mask,
IppDataType dataType, int numChannels, int* pBufferSize);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
roiSize

Size of the destination ROI in pixels.

mask

Predefined mask of IppiMaskSize type.

dataType

Data type of the source image.

numChannels

Number of channels in the image.

pBufferSize

Pointer to the computed size of the external work buffer.

Description
The ippiGradientVectorGetBufferSize function computes the size (in bytes) of the external work buffer
needed for the ippiGradientVector{Sobel|Scharr|Prewitt} functions and stores the result in thepBufferSize parameter.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pBufferSize is NULL.

ippStsMaskSizeErr

Indicates an error when one of the fields of roiSize has a zeroor negative value.
Indicates an error when mask has an illegal value.

ippStsDataTypeErr

Indicates an error when dataType has an illegal value.

ippStsNumChannelsErr

Indicates an error when numChannels has an illegal value.

ippStsSizeErr

See Also
Structures and Enumerators
GradientVectorPrewitt Computes gradient vectors of an image using the Prewitt operator.
GradientVectorScharr Computes gradient vectors of an image using the Scharr operator.
GradientVectorSobel Computes gradient vectors of an image using the Sobel operator.

1609

1

Intel® Integrated Performance Primitives Developer Guide and Reference

GradientVectorPrewitt
Computes gradient vectors of an image using thePrewitt operator.

SyntaxIppStatus ippiGradientVectorPrewitt_<mod> (const Ipp<srcDatatype>* pSrc, int srcStep,
Ipp<dstDatatype>* pGx, int gxStep, Ipp<dstDatatype>* pGy, int gyStep, Ipp<dstDatatype>*pMag, int magStep, Ipp32f* pAngle, int angleStep, IppiSize dstRoiSize, IppiMaskSize
maskSize, IppNormType normType, IppiBorderType borderType, Ipp<srcDatatype>borderValue, Ipp8u* pBuffer);
Supported values for mod:8u16s_C1R 16s32f_C1R 16u32f_C1R 32f_C1R
IppStatus ippiGradientVectorPrewitt_<mod> (const Ipp<srcDatatype>* pSrc, int srcStep,
Ipp<dstDatatype>* pGx, int gxStep, Ipp<dstDatatype>* pGy, int gyStep, Ipp<dstDatatype>*pMag, int magStep, Ipp32f* pAngle, int angleStep, IppiSize dstRoiSize, IppiMaskSize
maskSize, IppNormType normType, IppiBorderType borderType, const Ipp<srcDatatype>borderValue[3], Ipp8u* pBuffer);
Supported values for mod:8u16s_C3C1R 16s32f_C3C1R 16u32f_C3C1R 32f_C3C1R

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source image ROI.

srcStep

Distance, in bytes, between the starting points ofconsecutive lines in the source image.

pGx

Pointer to the destination image ROI for the X
component of the gradient vector (in Cartesian form).

gxStepDistance, in bytes, between the starting points ofconsecutive lines in the X-component destination
image.

pGy

Pointer to the destination image ROI for the Y
component of the gradient vector (in Cartesian form).

gyStepDistance, in bytes, between the starting points ofconsecutive lines in the Y-component destination
image.

pMag

Pointer to the magnitude of the gradient destination
image ROI (in polar gradient form).

1610

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

magStep

Distance, in bytes, between the starting points ofconsecutive lines in the magnitude of the gradientdestination image.

pAnglePointer to the destination image ROI for the angle (inpolar gradient form).

angleStepDistance, in bytes, between the starting points ofconsecutive lines in the angle destination image.

dstRoiSize

Size of the source and destination image ROI in
pixels.

maskSize

Predefined mask of IppiMaskSize type.

normType

Normalization mode of IppNormType type.

borderType

Type of border. Possible values are:ippBorderConst Values of all border pixels are

set to constant.
ippBorderRepl Border is replicated from theedge pixels.
ippBorderInMem Border is obtained from thesource image pixels inmemory.
ippBorderMirro Border pixels are mirroredfrom the source imagerboundary pixels.
borderValue

Constant value to assign to pixels in the constantborder (not applicable for other border types).

pBuffer

Pointer to the work buffer.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
Before using this function, compute the size of the work buffer using theippiGradientVectorGetBufferSize function.
NOTE
Any of the pGx, pGy, pMag, and pAngle output parameters can be NULL. This means that theparameter(s) is not requested.

This function operates on "gray" single-channel (C1 flavors) and color (C3 flavors) images.
Single-channel image (C1) input :If input is a single-channel image, the ippiGradientVectorPrewitt function computes the gradient vector
at each pixel of the source image ROI and stores the result either in Cartesian (pGx and pGy) and/or polar(pMag and pAngle) form, or any combination of these possible outputs.
Cartesian projections Gx and Gy are stored in the pGx and pGy buffers, respectively. The formulas below
describe the algorithm for the 3x3 Prewitt operator:

1611

1

Intel® Integrated Performance Primitives Developer Guide and Reference

where
•
•
•

A is the source image* means two-dimensional convolution
Gx and Gy are X and Y components of the gradient

The magnitude of the gradient is computed according to the normType value by the following formulas:
L1 normalization:

L2 normalization:

The value of angle between Gx and Gy is computed by the formula:

Color image (C3) input :If input is a color image, the ippiGradientVectorPrewitt function computes the spatial image derivatives
Gx and Gy for each channel of the image using the specified differential operator. For each pixel (x, y) thisfunction chooses the derivatives for which L2(Gx, Gy) is the maximal value and stores them in the pGx andpGy output arrays. In other words, for each pixel of a color image the function returns the derivatives
composing the largest gradient across all channels.
The examples of using this function are similar to the examples provided with the GradientVectorSobel
function description.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrc or pBuffer is NULL.

ippStsMaskSizeErr

Indicates an error when one of the fields of dstRoiSize has azero or negative value.
Indicates an error when maskSize has an illegal value.

ippStsStepErr

Indicates an error when:ippStsSizeErr•

srcStep, gxStep, gySstep, magStep, or angleStep has a zero or
negative value

1612

1

Developer Guide and Reference for Intel® Integrated Performance Primitives•

srcStep, gxStep, gyStep, magStep, or angleStep is not a
multiple of the image data size (4 for floating-point images or 2 forshort integer images)

ippStsBadArgErr

Indicates an error when normType has an illegal value.

ippStsBorderErr

Indicates an error when borderType has an incorrect value.

See Also
Structures and Enumerators
Regions of Interest in Intel IPP
GradientVectorGetBufferSize Computes the size of the work buffer for theippiGradientVector{Sobel|Scharr|Prewitt} functions.
GradientVectorScharr
Computes gradient vectors of an image using theScharr operator.

SyntaxIppStatus ippiGradientVectorScharr_<mod> (const Ipp<srcDatatype>* pSrc, int srcStep,
Ipp<dstDatatype>* pGx, int gxStep, Ipp<dstDatatype>* pGy, int gyStep, Ipp<dstDatatype>*pMag, int magStep, Ipp32f* pAngle, int angleStep, IppiSize dstRoiSize, IppiMaskSize
maskSize, IppNormType normType, IppiBorderType borderType, Ipp<srcDatatype>borderValue, Ipp8u* pBuffer);
Supported values for mod:8u16s_C1R 16s32f_C1R 16u32f_C1R 32f_C1R
IppStatus ippiGradientVectorScharr_<mod> (const Ipp<srcDatatype>* pSrc, int srcStep,
Ipp<dstDatatype>* pGx, int gxStep, Ipp<dstDatatype>* pGy, int gyStep, Ipp<dstDatatype>*pMag, int magStep, Ipp32f* pAngle, int angleStep, IppiSize dstRoiSize, IppiMaskSize
maskSize, IppNormType normType, IppiBorderType borderType, const Ipp<srcDatatype>borderValue[3], Ipp8u* pBuffer);
Supported values for mod:8u16s_C3C1R 16s32f_C3C1R 16u32f_C3C1R 32f_C3C1R

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source image ROI.

srcStep

Distance, in bytes, between the starting points ofconsecutive lines in the source image.

1613

1

Intel® Integrated Performance Primitives Developer Guide and Reference

pGx

Pointer to the destination image ROI for the X
component of the gradient vector (in Cartesian form).

gxStepDistance, in bytes, between the starting points ofconsecutive lines in the X-component destination
image.

pGy

Pointer to the destination image ROI for the Y
component of the gradient vector (in Cartesian form).

gyStepDistance, in bytes, between the starting points ofconsecutive lines in the Y-component destination
image.

pMag

Pointer to the magnitude of the gradient destination
image ROI (in polar gradient form).

magStep

Distance, in bytes, between the starting points ofconsecutive lines in the magnitude of the gradientdestination image.

pAnglePointer to the destination image ROI for the angle (inpolar gradient form).

angleStepDistance, in bytes, between the starting points ofconsecutive lines in the angle destination image.

dstRoiSize

Size of the source and destination image ROI in
pixels.

maskSize

Predefined mask of IppiMaskSize type.

normType

Normalization mode of IppNormType type.

borderType

Type of border. Possible values are:ippBorderConst Values of all border pixels are

set to constant.
ippBorderRepl Border is replicated from theedge pixels.
ippBorderInMem Border is obtained from thesource image pixels inmemory.
ippBorderMirro Border pixels are mirroredfrom the source imagerboundary pixels.
borderValue

Constant value to assign to pixels in the constantborder (not applicable for other border types).

pBuffer

Pointer to the work buffer.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
Before using this function, compute the size of the work buffer using theippiGradientVectorGetBufferSize function.

1614

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

NOTE
Any of the pGx, pGy, pMag, and pAngle output parameters can be NULL. This means that theparameter(s) is not requested.
This function operates on "gray" single-channel (C1 flavors) and color (C3 flavors) images.
Single-channel image (C1) input :If input is a single-channel image, the ippiGradientVectorScharr function computes the gradient vector
at each pixel of the source image ROI and stores the result either in Cartesian (pGx and pGy) and/or polar(pMag and pAngle) form, or any combination of these possible outputs.
Cartesian projections Gx and Gy are stored in the pGx and pGy buffers, respectively. The formulas below
describe the algorithm for the 3x3 Scharr operator:

where
•
•
•

A is the source image* means two-dimensional convolution
Gx and Gy are X and Y components of the gradient

The magnitude of the gradient is computed according to the normType value by the following formulas:
L1 normalization:

L2 normalization:

The value of angle between Gx and Gy is computed by the formula:

Color image (C3) input :If input is a color image, the ippiGradientVectorScharr function computes the spatial image derivatives
Gx and Gy for each channel of the image using the specified differential operator. For each pixel (x, y) thisfunction chooses the derivatives for which L2(Gx, Gy) is the maximal value and stores them in the pGx andpGy output arrays. In other words, for each pixel of a color image the function returns the derivatives
composing the largest gradient across all channels.

1615

1

Intel® Integrated Performance Primitives Developer Guide and Reference

The examples of using this function are similar to the examples provided with the GradientVectorSobel
function description.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrc or pBuffer is NULL.

ippStsMaskSizeErr

Indicates an error when one of the fields of dstRoiSize has azero or negative value.
Indicates an error when maskSize has an illegal value.

ippStsStepErr

Indicates an error when:ippStsSizeErr••

srcStep, gxStep, gyStep, magStep, or angleStep has a zero or
negative value
srcStep, gxStep, gyStep, magStep, or angleStep is not a
multiple of the image data size (4 for floating-point images or 2 forshort integer images)

ippStsBadArgErr

Indicates an error when normType has an illegal value.

ippStsBorderErr

Indicates an error when borderType has an incorrect value.

See Also
Structures and Enumerators
Regions of Interest in Intel IPP
GradientVectorGetBufferSize Computes the size of the work buffer for theippiGradientVector{Sobel|Scharr|Prewitt} functions.
GradientVectorSobel
Computes gradient vectors of an image using theSobel operator.

SyntaxIppStatus ippiGradientVectorSobel_<mod> (const Ipp<srcDatatype>* pSrc, int srcStep,
Ipp<dstDatatype>* pGx, int gxStep, Ipp<dstDatatype>* pGy, int gyStep, Ipp<dstDatatype>*pMag, int magStep, Ipp32f* pAngle, int angleStep, IppiSize dstRoiSize, IppiMaskSize
maskSize, IppNormType normType, IppiBorderType borderType, Ipp<srcDatatype>borderValue, Ipp8u* pBuffer);
Supported values for mod:8u16s_C1R 16s32f_C1R 16u32f_C1R 32f_C1R
IppStatus ippiGradientVectorSobel_<mod> (const Ipp<srcDatatype>* pSrc, int srcStep,
Ipp<dstDatatype>* pGx, int gxStep, Ipp<dstDatatype>* pGy, int gyStep, Ipp<dstDatatype>*pMag, int magStep, Ipp32f* pAngle, int angleStep, IppiSize dstRoiSize, IppiMaskSize
maskSize, IppNormType normType, IppiBorderType borderType, const Ipp<srcDatatype>borderValue[3], Ipp8u* pBuffer);
Supported values for mod:8u16s_C3C1R 16s32f_C3C1R 16u32f_C3C1R 32f_C3C1R

1616

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source image ROI.

srcStep

Distance, in bytes, between the starting points ofconsecutive lines in the source image.

pGx

Pointer to the destination image ROI for the X
component of the gradient vector (in Cartesian form).

gxStepDistance, in bytes, between the starting points ofconsecutive lines in the X-component destination
image.

pGy

Pointer to the destination image ROI for the Y
component of the gradient vector (in Cartesian form).

gyStepDistance, in bytes, between the starting points ofconsecutive lines in the Y-component destination
image.

pMag

Pointer to the magnitude of the gradient destination
image ROI (in polar gradient form).

magStep

Distance, in bytes, between the starting points ofconsecutive lines in the magnitude of the gradientdestination image.

pAnglePointer to the destination image ROI for the angle (inpolar gradient form).

angleStepDistance, in bytes, between the starting points ofconsecutive lines in the angle destination image.

dstRoiSize

Size of the source and destination image ROI in
pixels.

maskSize

Predefined mask of IppiMaskSize type.

normType

Normalization mode of IppNormType type.

borderType

Type of border. Possible values are:ippBorderConst Values of all border pixels are

set to constant.
Borderis replicated from theippBorderRepl
edge pixels.
ippBorderInMem Border is obtained from thesource image pixels inmemory.

1617

1Intel® Integrated Performance Primitives Developer Guide and Reference

ippBorderMirro Border pixels are mirroredfrom the source imagerboundary pixels.

borderValue

Constant value to assign to pixels in the constantborder (not applicable for other border types).

pBuffer

Pointer to the work buffer.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
Before using this function, compute the size of the work buffer using the GradientVectorGetBufferSize
function.

NOTE
Any of the pGx, pGy, pMag, and pAngle output parameters can be NULL. This means that theparameter(s) is not requested.
This function operates on "gray" single-channel (C1 flavors) and color (C3 flavors) images.
Single-channel image (C1) input :If input is a single-channel image, the ippiGradientVectorSobel function computes the gradient vector ateach pixel of the source image ROI and stores the result either in Cartesian (pGx and pGy) and/or polar(pMag and pAngle) form, or any combination of these possible outputs.
Cartesian projections Gx and Gy are stored in the pGx and pGy buffers, respectively. The formulas below
describe the algorithm for the 3x3 Sobel operator:

for the 5x5 Sobel operator:

where
•
•

A is the source image* means two-dimensional convolution

1618

1

Developer Guide and Reference for Intel® Integrated Performance Primitives•

Gx and Gy are X and Y components of the gradient

The magnitude of the gradient is computed according to the normType value by the following formulas:
L1 normalization:

L2 normalization:

The value of angle between Gx and Gy is computed by the formula:

Color image (C3) input :If input is a color image, the ippiGradientVectorSobel function computes the spatial image derivatives Gx
and Gy for each channel of the image using the specified differential operator. For each pixel (x, y) thisfunction chooses the derivatives for which L2(Gx, Gy) is the maximal value and stores them in the pGx andpGy output arrays. In other words, for each pixel of a color image the function returns the derivatives
composing the largest gradient across all channels.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrc or pBuffer is NULL.

ippStsMaskSizeErr

Indicates an error when one of the fields of dstRoiSize has azero or negative value.
Indicates an error when maskSize has an illegal value.

ippStsStepErr

Indicates an error when:ippStsSizeErr••

srcStep, gxStep, gyStep, magStep, or angleStep has a zero or
negative value
srcStep, gxStep, gyStep, magStep, or angleStep is not a
multiple of the image data size (4 for floating-point images or 2 forshort integer images)

ippStsBadArgErr

Indicates an error when normType has an illegal value.

ippStsBorderErr

Indicates an error when borderType has an incorrect value.

ExampleGradientVectorSobel1:
GradientVectorSobel2:

1619

1

Intel® Integrated Performance Primitives Developer Guide and Reference

See Also
Structures and Enumerators
Regions of Interest in Intel IPP
GradientVectorGetBufferSize Computes the size of the work buffer for theippiGradientVector{Sobel|Scharr|Prewitt} functions.
Flood Fill Functions
This section describes functions performing flood filling of connected areas. Flood filling means that a groupof connected pixels with close values is filled with, or is set to, a certain value. The flood filling process starts
with a specified point (“seed”) and continues until it reaches the image ROIboundary or cannot find any new
pixels to fill due to a large difference in pixel values. For every pixel filled, the functions analyze neighborpixels:••

4 neighbors (except diagonal neighbors); this kind of connectivity is called 4-connectivity and thecorresponding function name includes 4Con, or
8 neighbors (diagonal neighbors included); this kind of connectivity is called 8-connectivity and thecorresponding function name includes 8Con.

Pixels Connectivity Patterns

These functions can be used for:••segmenting a grayscale image into a set of uni-color areas,
marking each connected component with individual color for bi-level images.

FloodFillGetSize
Calculates size of temporary buffer for flood filling
operation.

SyntaxIppStatus ippiFloodFillGetSize(IppiSize roiSize, int* pBufSize);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
roiSize

1620

Size of the source image ROI in pixels.

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

pBufSize

Pointer to the variable that returns the size of the temporary buffer.

Description
This function calculates the size of the temporary buffer to be used by the function ippiFloodFill.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pBufSize pointer is NULL.
Indicates an error condition if roiSize has a field with zero or
negative value.

FloodFillGetSize_Grad
Calculates size of temporary buffer for the gradient
flood filling.

SyntaxIppStatus ippiFloodFillGetSize_Grad(IppiSize roiSize, int* pBufSize);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
roiSize

Size of the source image ROI in pixels.

pBufSize

Pointer to the variable that returns the size of the temporary buffer.

Description
This function calculates the size of the temporary buffer to be used by the function ippiFloodFill_Grad.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if pBufSize pointer is NULL.
Indicates an error condition if roiSize has a field with zero or
negative value.

FloodFill
Performs flood filling of connected area.

1621

1

Intel® Integrated Performance Primitives Developer Guide and Reference

SyntaxCase 1: Operations on one-channel data
IppStatus ippiFloodFill_4Con_<mod>(Ipp<datatype>* pImage, int imageStep, IppiSize
roiSize, IppiPoint seed, Ipp<datatype> newVal, IppiConnectedComp* pRegion, Ipp8u*
pBuffer);
IppStatus ippiFloodFill_8Con_<mod>(Ipp<DataType>* pImage, int imageStep, IppiSize
roiSize, IppiPoint seed, Ipp<datatype> newVal, IppiConnectedComp* pRegion, Ipp8u*
pBuffer);
Supported values for mod:8u_C1IR

16u_C1IR

32s_C1IR

32f_C1IR

Case 2: Operations on three-channel data
IppStatus ippiFloodFill_4Con_<mod>(Ipp<datatype>* pImage, int imageStep, IppiSize
roiSize, IppiPoint seed, Ipp<datatype>* pNewVal, IppiConnectedComp* pRegion, Ipp8u*
pBuffer);
IppStatus ippiFloodFill_8Con_<mod>(Ipp<DataType>* pImage, int imageStep, IppiSize
roiSize, IppiPoint seed, Ipp<datatype>* pNewVal, IppiConnectedComp* pRegion, Ipp8u*
pBuffer);
Supported values for mod:8u_C3IR

16u_C3IR

32f_C3IR

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters

roiSize

Pointer to the ROI in the source and destination image (for the inplace operation).
Distance in bytes between starts of consecutive lines in the image
buffer.
Size of the image ROI in pixels.

seed

Initial point.

newValValue to fill with for one-channel data.

pImageimageSteppNewValpRegionpBuffer

1622

Pointer to the vector containing values to fill with for three-channel
data.
Pointer to the connected components structure that storesinformation about the refilled area.
Pointer to the temporary buffer.

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function performs flood filling of the group of connected pixels whose pixel values are equal to the value
in the seed point. Values of these pixel is set to the newVal value.
The function requires a temporary buffer whose size should be computed with the function
ippiFloodFillGetSize beforehand.
The functions with the “_4con” suffixes check 4-connected neighborhood of each pixel, that is, side
neighbors. The functions with the “_8con” suffixes check 8-connected neighborhood of each pixel, that is,side and corner neighbors. See Figure Pixels Connectivity Patterns”.

Return Values
ippStsNoErr
ippStsNullPtrErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointers is
NULL.

ippStsSizeErr

Indicates an error condition if roiSize has a field with zero or
negative value.

ippStsStepErr

Indicates an error condition if imageStep is less thanpRoiSize.width*<pixelSize>.

ippStsNotEvenStepErr

ippStsOutOfRangeErr

Indicates an error condition if steps for floating-point images
are not divisible by 4, or steps for 16-bit integer images are
not divisible by 2.
Indicates an error condition if the seed point is out of ROI.

ExampleFloodFill_Grad
Performs gradient flood filling of connected area on animage.

SyntaxCase 1: Operations on one-channel data
IppStatus ippiFloodFill_Grad4Con_<mod>(Ipp<DataType>* pImage, int imageStep, IppiSize
roiSize, IppiPoint seed, Ipp<datatype> newVal, Ipp<datatype> minDelta, Ipp<datatype>
maxDelta, IppiConnectedComp* pRegion, Ipp8u* pBuffer);
IppStatus ippiFloodFill_Grad8Con_<mod>(Ipp<DataType>* pImage, int imageStep, IppiSize
roiSize, IppiPoint seed, Ipp<datatype> newVal, Ipp<datatype> minDelta, Ipp<datatype>
maxDelta, IppiConnectedComp* pRegion, Ipp8u* pBuffer);
Supported values for mod:8u_C1IR

16u_C1IR

32f_C1IR

Case 2: Operations on three-channel data
IppStatus ippiFloodFill_Grad4Con_<mod>(Ipp<DataType>* pImage, int imageStep, IppiSize
roiSize, IppiPoint seed, Ipp<datatype>* pNewVal, Ipp<datatype>* pMinDelta,
Ipp<datatype>* pMaxDelta, IppiConnectedComp* pRegion, Ipp8u* pBuffer);

1623

1

Intel® Integrated Performance Primitives Developer Guide and Reference

IppStatus ippiFloodFill_Grad8Con_<mod>(Ipp<DataType>* pImage, int imageStep, IppiSize
roiSize, IppiPoint seed, Ipp<datatype>* pNewVal, Ipp<datatype>* pMinDelta,
Ipp<datatype>* pMaxDelta, IppiConnectedComp* pRegion, Ipp8u* pBuffer);
Supported values for mod:8u_C3IR

16u_C3IR

32f_C3IR

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters

roiSize

Pointer to the ROI in the source and destination image (in-place
operation).
Distance in bytes between starts of consecutive lines in the image
buffer.
Size of the image ROI in pixels.

seed

Initial point.

minDelta

Minimum difference between neighbor pixels for one-channel data.

maxDelta

Maximum difference between neighbor pixels for one-channel data.

newValValue to fill with for one-channel data.

pImageimageStep

pMinDelta
pMaxDelta
pNewValpRegionpBuffer

Pointer to the minimum differences between neighbor pixels forthree-channel images.
Pointer to the maximum differences between neighbor pixels forthree-channel images.
Pointer to the vector containing values to fill with for three-channel
data.
Pointer to the connected components structure that storesinformation about the refilled area.
Pointer to the temporary buffer.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function performs flood filling of the group of connected pixels in the seed pixel neighborhoods whose
pixel values v satisfy the following conditions:where v0 is the value of at least one of the current pixel neighbors, which already belongs to the refilled area,and dlw, dup are minDelta, maxDelta, respectively. Values of these pixels are set to the newVal value.

1624

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

The function requires a temporary buffer whose size should be computed with the function

ippiFloodFillGetSize_Grad beforehand.
The functions with the “_4con” suffixes check 4-connected neighborhood of each pixel, i.e., side neighbors.
The functions with the “_8con” suffixes check 8-connected neighborhood of each pixel, i.e., side and cornerneighbors. See Figure Pixels Connectivity Patterns”.

Return Values
ippStsNoErr
ippStsNullPtrErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointers is
NULL.
Indicates an error condition if roiSize has a field with zero or
negative value.
Indicates an error condition if imageStep is less thanpRoiSize.width*<pixelSize>.

ippStsSizeErr
ippStsStepErr
ippStsNotEvenStepErr

ippStsOutOfRangeErr

Indicates an error condition if steps for floating-point images
are not divisible by 4, or steps for 16-bit integer images are
not divisible by 2.
Indicates an error condition if the seed point is out of ROI.

ExampleFloodFill_Range
Performs flood filling of pixels with values in thespecified range in the connected area on an image.

SyntaxCase 1: Operations on one-channel data
IppStatus ippiFloodFill_Range4Con_<mod>(Ipp<DataType>* pImage, int imageStep, IppiSize
roiSize, IppiPoint seed, Ipp<datatype> newVal, Ipp<datatype> minDelta, Ipp<datatype>
maxDelta, IppiConnectedComp* pRegion, Ipp8u* pBuffer);
IppStatus ippiFloodFill_Range8Con_<mod>(Ipp<DataType>* pImage, int imageStep, IppiSize
roiSize, IppiPoint seed, Ipp<datatype> newVal, Ipp<datatype> minDelta, Ipp<datatype>
maxDelta, IppiConnectedComp* pRegion, Ipp8u* pBuffer);
Supported values for mod:8u_C1IR

16u_C1IR

32f_C1IR

Case 2: Operations on three-channel data
IppStatus ippiFloodFill_Range4Con_<mod>(Ipp<DataType>* pImage, int imageStep, IppiSize
roiSize, IppiPoint seed, Ipp<datatype>* pNewVal, Ipp<datatype>* pMinDelta,
Ipp<datatype>* pMaxDelta, IppiConnectedComp* pRegion, Ipp8u* pBuffer);

1625

1

Intel® Integrated Performance Primitives Developer Guide and Reference

IppStatus ippiFloodFill_Range8Con_<mod>(Ipp<DataType>* pImage, int imageStep, IppiSize
roiSize, IppiPoint seed, Ipp<datatype>* pNewVal, Ipp<datatype>* pMinDelta,
Ipp<datatype>* pMaxDelta, IppiConnectedComp* pRegion, Ipp8u* pBuffer);
Supported values for mod:8u_C3IR

16u_C3IR

32f_C3IR

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters

roiSize

Pointer to the ROI in the source and destination image (in-place
operation).
Distance in bytes between starts of consecutive lines in the image
buffer.
Size of the image ROI in pixels.

seed

Initial point.

minDelta

Minimum difference between neighbor pixels for one-channel data.

maxDelta

Maximum difference between neighbor pixels for one-channel data.

newValValue to fill with for one-channel data.

pImageimageStep

pMinDelta
pMaxDelta
pNewValpRegionpBuffer

Pointer to the minimum differences between neighbor pixels forthree-channel images.
Pointer to the maximum differences between neighbor pixels forthree-channel images.
Pointer to the vector containing values to fill with for three-channel
data.
Pointer to the connected components structure that storesinformation about the refilled area.
Pointer to the temporary buffer.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function performs flood filling of the group of connected pixels in the seed pixel neighborhoods whose
pixel values v satisfy the following conditions:where v0 is the pixel value of the seed point, and dlw, dup are minDelta, maxDelta, respectively. Values ofthese pixels are set to the newVal value.

1626

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

The function requires a temporary buffer whose size should be computed with the function

ippiFloodFillGetSize_Grad beforehand.
The functions with the “_4con” suffixes check 4-connected neighborhood of each pixel, i.e., side neighbors.
The functions with the “_8con” suffixes check 8-connected neighborhood of each pixel, i.e., side and cornerneighbors. See Figure Pixels Connectivity Patterns”.

Return Values
Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointers is
NULL.

ippStsNoErr
ippStsNullPtrErr

Indicates an error condition if roiSize has a field with zero or
negative value.
Indicates an error condition if imageStep is less thanpRoiSize.width*<pixelSize>.

ippStsSizeErr
ippStsStepErr

Indicates an error condition if steps for floating-point images
are not divisible by 4, or steps for 16-bit integer images are
not divisible by 2.
Indicates an error condition if the seed point is out of ROI.

ippStsNotEvenStepErr

ippStsOutOfRangeErr

Motion Analysis and Object Tracking
FGMMGetBufferSize
Computes the size of the state structure for theGaussian mixture model foreground/backgroundsubtraction.

SyntaxIppStatus ippiFGMMGetBufferSize_8u_C3R(IppiSize roi, int maxNGauss, int* pSpecSize);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

ParametersroiSize of the source image ROI, in pixels.

maxNGauss

Maximal size of the Gaussian mixture components.

pSpecSize

Pointer to the size of the IppFGMMSpec_8u_C3R structure.

Description
This function operates with ROI.
This function computes the size of the IppFGMMSpec_8u_C3R structure for the FGMMForeground and
FGMMBackground functions.

1627

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSpecSize is NULL.

ippStsSizeErr

Indicates an error when roi is less than, or equal to zero.

ippStsBadArgErr

Indicates an error when maxNumGauss is less than, or equal tozero.

See Also
Regions of Interest in Intel IPP
FGMMForeground Performs the Gaussian mixture model foreground subtraction.
FGMMBackground Returns the updated background image.
FGMMInit
Initializes the state structure for the Gaussian mixture
model foreground/background subtraction.

SyntaxIppStatus ippiFGMMInit_8u_C3R(IppiSize roi, int maxNGauss, IppFGMModel* pModel,
IppFGMMState_8u_C3R* pState);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

ParametersroiSize of the source image ROI, in pixels.

maxNGauss

Maximal size of the Gaussian mixture components.

pModelPointer to the IppFGMModel structure containing parameters for themodel. If pModel is NULL, the default parameters are applied.

pStatePointer to the IppFGMMState_8u_C3R state structure.

Description
This function operates with ROI.
This function initializes the IppFGMMState_8u_C3R state structure for the FGMMForeground and
FGMMBackground functions.
Before using this function, you need to compute the size of the state structure using the

FGMMGetBufferSize function.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pModel or pState is NULL.

1628

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

ippStsSizeErr

Indicates an error when roi is less than, or equal to zero.

ippStsBadArgErr

Indicates an error when maxNGauss is less than, or equal tozero.

See Also
Regions of Interest in Intel IPP
FGMMForeground Performs the Gaussian mixture model foreground subtraction.
FGMMBackground Returns the updated background image.
FGMMGetBufferSize Computes the size of the state structure for the Gaussian mixture model
foreground/background subtraction.
FGMMForeground
Performs the Gaussian mixture model foregroundsubtraction.

SyntaxIppStatus ippiFGMMForeground_8u_C3R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int
dstStep, IppiSize roi, IppFGMMState_8u_C3R* pState, IppFGMModel* pModel, double
learning_rate);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pDst

Pointer to the source image.
Distance, in bytes, between the starting points of consecutive lines
in the source image.
Pointer to the one-channel Ipp8u mask of foreground.

roi

Distance, in bytes, between the starting points of consecutive lines
in the destination image.
Size of the source image ROI, in pixels.

learning_rate

Speed of algorithm learning.

pStatePointer to the IppFGMMState_8u_C3R state structure.

dstStep

pModelPointer to the IppFGMModel structure containing parameters for themodel. If pModel is NULL, the parameters are the same as in aprevious call.

Description
This function operates with ROI.
This function implements the Gaussian mixture model foreground subtraction described in [ZIVKOVIC04].
The foreground mask is stored in pDst.
Before using this function, you need to compute the size of the IppFGMMState_8u_C3R state structure andinitialize the structure using the FGMMGetBufferSize and FGMMInit functions, respectively.

1629

1

Intel® Integrated Performance Primitives Developer Guide and Reference

For an example on how to use this function, refer to the example provided with the FGMMBackground
function description.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrc, pDst, pModel, or pState is NULL.

ippStsSizeErr

Indicates an error when roi is less than, or equal to zero.

ippStsStepErr

Indicates an error when srcStep or dstStep is less than, or
equal to zero.

See Also
Regions of Interest in Intel IPP
FGMMGetBufferSize Computes the size of the state structure for the Gaussian mixture model
foreground/background subtraction.
FGMMInit Initializes the state structure for the Gaussian mixture model foreground/backgroundsubtraction.
FGMMBackground Returns the updated background image.
FGMMBackground
Returns the updated background image.

SyntaxIppStatus ippiFGMMBackground_8u_C3R(Ipp8u* pDst, int dstStep, IppiSize roi,
IppFGMMState_8u_C3R* pState);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pDst

Pointer to the three-channel background image.

roi

Distance, in bytes, between the starting points of consecutive lines
in the destination image.
Size of the source image ROI, in pixels.

pStatePointer to the IppFGMMState_8u_C3R state structure.

dstStep

Description
This function implements the Gaussian mixture model background subtraction described in [ZIVKOVIC04].
The function returns the three-channel Ipp8u background image.
Before using this function, you need to compute the size of the IppFGMMState_8u_C3R state structure andinitialize the structure using the FGMMGetBufferSize and FGMMInit functions, respectively.

1630

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pDst or pState is NULL.

ippStsSizeErr

Indicates an error when roi is less than, or equal to zero.

ippStsStepErr

Indicates an error when dstStep is less than, or equal to zero.

ExampleSee Also
Regions of Interest in Intel IPP
FGMMGetBufferSize Computes the size of the state structure for the Gaussian mixture model
foreground/background subtraction.
FGMMInit Initializes the state structure for the Gaussian mixture model foreground/backgroundsubtraction.
Motion Template Functions
This section describes a motion templates function. This function generates motion templates images torapidly determine where, how, and in which direction the motion occurred. The algorithms are based on[ Davis97], and [Davis99]. The function operates on images that are the output of frame or backgrounddifferencing, or other image segmentation operations. Thus, the input and output image types are all
grayscale, that is, one color channel. The pixel types can be 8u, 8s, or 32f.
Motion Representation
Figure Motion Image History” (a) shows capturing a foreground silhouette of the moving object or person. As
the person or object moves, copying the most recent foreground silhouette as the highest values in the
motion history image creates a “layered history” of the resulting motion. Typically, this “highest value” is justa floating-point timestamp of time since the code has been running in milliseconds. Figure Motion Image
History” (b) shows the result that may be called the Motion History Image (MHI). The MHI in Figure
Motion Image History” represents how the motion took place. A pixel level or a time delta threshold, as
appropriate, is set such that pixel values in the MHI that fall below that threshold are set to zero.
Motion Image History

1631

1

Intel® Integrated Performance Primitives Developer Guide and Reference

The most recent motion has the highest value, earlier motions have decreasing values subject to a threshold
below which the value is set to zero.

Updating MHI Images
Generally, floating point images are used because system time differences, that is, time elapsing since theapplication was launched, are read in milliseconds to be further converted into a floating point number whichis the value of the most recent silhouette. Then follows writing this current silhouette over the pastsilhouettes with subsequent thresholding away pixels that are too old to create the MHI.
UpdateMotionHistory
Updates motion history image using motion silhouetteat given timestamp.

SyntaxIppStatus ippiUpdateMotionHistory_<mod>(const Ipp<srcDatatype>* pSilhouette, int
silhStep, Ipp32f* pMhi, int mhiStep, IppiSize roiSize, Ipp32f timeStamp, Ipp32f
mhiDuration);
Supported values for mod:8u32f_C1IR

16u32f_C1IR

32f_C1IR

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSilhouette
roiSize
silhSteppMhimhiStep
timeStamp
mhiDuration

Pointer to the silhouette image ROI that has non-zero values for
those pixels where the motion occurs.
Size of the image ROI in pixels.
Distance in bytes between starts of consecutive lines in thesilhouette image.
Pointer to the motion history image which is both an input andoutput parameter.
Distance in bytes between starts of consecutive lines in the motion
history image.
Timestamp in milliseconds.
Threshold for MHI pixels. MHI motions older than this threshold aredeleted.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function updates the motion history image. It sets MHI pixels to the current timestamp value, if theirvalues are non-zero.

1632

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

The function deletes MHI pixels, if their values are less than the mhiDuration timestamp, that is, the pixels
are “old.”

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsStepErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointers is
NULL.
Indicates an error condition if roiSize has a field with zero or
negative value.
Indicates an error condition if mhiStep or silhStep is less thanroiSize.width * <pixelSize>.

ippStsNotEvenStepErr

Indicates an error condition if the step value is not divisible by
2 for 16u images, and by 4 for 32f images.

ippStsOutOfRangeErr

Indicates an error when mhiDuration is negative.

Optical Flow
This section describes the functions that calculate the optical flow using the pyramidal Lucas-Kanadealgorithm [ Bou99].
The optical flow between two images is generally defined as an apparent motion of image brightness. LetI(x, y, t) be the image brightness that changes in time to provide an image sequence.
Optical flow coordinates

can be found from so called optical flow constraint equation:

The Lucas-Kanade algorithm assumes that the group of adjacent pixels has the same velocity and founds theapproximate solution of the above equation using the least square method.
OpticalFlowPyrLKGetSize

1633

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Computes the size of the pyramidal optical flow state
structure.

SyntaxIppStatus ippiOpticalFlowPyrLKGetSize(int winSize, IppiSize roiSize, IppDataTypedataType, IppHintAlgorithm hint, int* pStateSize);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
winSize
roiSize
dataType
hint
pStateSize

Size of the search window of each pyramid level.

Maximal size of the source image (zero level of the pyramid) ROI, in
pixels.
Data type of the image. Possible values: ipp8u, ipp16u, or ipp32f.
Option to select the algorithmic implementation of the transformfunction.
Pointer to the size of the state struture.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function computes the size of the pState structure that is required to calculate the optical flow between
two images in the centered window of size winSize*winSize using the pyramidal Lucas-Kanade [Bou99]
algorithm. The hint argument specifies the computation algorithm. The pState structure is used by theippiOpticalFlowPyrLK function and can be applied to process images with size not greater than roiSize.

Return Values

ippStsNullPtrErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error when pStateSize is NULL.

ippStsDataTypeErr

Indicates an error when dataType has an illegal value.

ippStsSizeErr

Indicates an error when roiSize has a field with a zero or
negative value; or when winSize is less than, or equal to zero.

ippStsNoErr

See Also
Regions of Interest in Intel IPP
OpticalFlowPyrLK Calculates optical flow for the set of feature points using the pyramidal LucasKanade algorithm.
OpticalFlowPyrLKInit Initializes the state structure for optical flow calculation.
OpticalFlowPyrLKInit
Initializes the state structure for optical flow
calculation.

1634

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

SyntaxIppStatus ippiOpticalFlowPyrLKInit_<mod>(IppiOptFlowPyrLK_<mod>** ppState, IppiSize
roiSize, int winSize, IppHintAlgorithm hint, Ipp8u* pStateBuf);
Supported values for mod:8u_C1R

16u_C1R

32f_C1R

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
ppStateroiSize
winSizehint
pStateBuf

Double pointer to the optical flow state structure to be initialized.

Maximal size of the source image (zero level of the pyramid) ROI, in
pixels.
Size of the search window of each pyramid level.
Option to select the algorithmic implementation of the transformfunction.
Pointer to the work buffer for the state structure.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function initializes the ppState structure that is required to calculate the optical flow between two
images in the centered window of size winSize*winSize using the pyramidal Lucas-Kanade [Bou99]
algorithm. The hint argument specifies the computation algorithm. The ppState structure is used by theippiOpticalFlowPyrLK function and can be applied to process images with size not greater than roiSize.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error when ppState is NULL.
Indicates an error when roiSize has a field with a zero or
negative value; or when winSize is less than, or equal to zero.

See Also
Regions of Interest in Intel IPP
OpticalFlowPyrLK Calculates optical flow for the set of feature points using the pyramidal LucasKanade algorithm.
OpticalFlowPyrLKGetSize Computes the size of the pyramidal optical flow state structure.
OpticalFlowPyrLK
Calculates optical flow for the set of feature points
using the pyramidal Lucas-Kanade algorithm.

1635

1

Intel® Integrated Performance Primitives Developer Guide and Reference

SyntaxIppStatus ippiOpticalFlowPyrLK_<mod>(IppiPyramid* pPyr1, IppiPyramid* pPyr2, const
IppiPoint_32f* pPrev, IppiPoint_32f* pNext, Ipp8s* pStatus, Ipp32f* pError, int
numFeat, int winSize, int maxLev, int maxIter, Ipp32f threshold,
IppiOptFlowPyrLK_<mod>* pState);
Supported values for mod:8u_C1R

16u_C1R

32f_C1R

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pPyr1

Pointer to the ROI in the first image pyramid structure.

pPyr2

Pointer to the ROI in the second image pyramid structure.

pPrev

Pointer to the array of initial coordinates of the feature points.

pNext

Pointer to the array of new coordinates of feature point; as input it contains
hints for new coordinates.

pStatus

Pointer to the array of result indicators.

pErrorPointer to the array of differences between neighborhoods of old and new
point positions.

numFeatNumber of feature points.

winSize

Size of the search window of each pyramid level.

maxLev

Pyramid level to start the operation.

maxIterMaximum number of algorithm iterations for each pyramid level.

thresholdThreshold value.

pStatePointer to the pyramidal optical flow structure.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function implements the iterative version of the Lucas-Kanade algorithms [Bou99]. It computes with
sub-pixel accuracy new coordinates of the numFeat feature points of two images at time t and t+dt. Theirinitial coordinates are places in the pPrev array. Computed values of new coordinates of the feature points
are stored in the array pNext, that initially contains estimations of them (or hints), for example, based on
the flow values for the previous image in sequence. If there are not such hints, the pNext array contains thesame initial coordinates as the pPrev array.

pStatus and pError are arrays of size numFeat with the respective data type.

1636

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

The images are presented by the pyramid structures pPyr1 and pPyr2 respectively (see description of the
PyramidGetSize and ippiPyramidInit functions for more details). These structures should be initialized bycalling the function PyramidGetSize and ippiPyramidInit functions beforehand. The function uses the
pyramidal optical flow structure pState that also should be previously initialized using
OpticalFlowPyrLKGetSize and OpticalFlowPyrLKInit.
The function starts operation on the highest pyramid level (smallest image) that is specified by the maxLev
parameter in the centered search window which size winSize could not exceed the corresponding value
winSize that is specified in OpticalFlowPyrLKGetSize and OpticalFlowPyrLKInit. The operation for i-thfeature point on the given pyramid level finishes if:• New position of the point is found:• Specified number of iteration maxIter is performed• Intersection between the pyramid layer and the search window became empty
In first two cases for non-zero levels the new position coordinates are scaled to the next pyramid level andthe operation continues on the next level. For zero level or for third case the operation stops, the number ofthe corresponding level is written to the pStatus[i] element, the new coordinates are scaled to zero level
and are written to pNext[i]. The square root of the average squared difference between neighborhoods ofold and new positions is written to pError[i].

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsBadArgErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error if one of the specified pointer is NULL.
Indicates an error condition if numFeat or winSize has zero or
negative value.
Indicates an error condition if maxLev or threshold has
negative value, or maxIter has zero or negative value.

ExampleUniversal Pyramids
The functions described in this section operate with universal image pyramids. These pyramids use separable
symmetric kernel (not only Gaussian type) and downsampling/upsampling with arbitrary factor (not only 2).
The next pyramid layer can be built for an image of an arbitrary size. These pyramids are used in somecomputer vision algorithms, for example, in optical flow calculations.
NOTE
All universal pyramid functions use the mirrored border.
Example shows how to build pyramids and calculate the optical flow for two images.

1637

1

Intel® Integrated Performance Primitives Developer Guide and Reference

PyramidGetSize
Computes the size of the pyramid structure and thesize of the temporary buffer for the ippiPyramidInit
function.

SyntaxIppStatus ippiPyramidGetSize(int* pPyrSize, int* pBufSize, int level, IppiSize roiSize,
Ipp32f rate);

Platform-aware functions
IppStatus ippiPyramidGetSize_L(IppSizeL* pPyrSize, IppSizeL* pBufSize, int level,
IppiSizeL roiSize, Ipp32f rate);

Include Files
ippcv.hFlavors with the _L suffix: ippcv_l.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pPyrSize

Pointer to the size of the pyramid structure.

level

Pointer to the size of the external work buffer for pyramid
processing.
Maximum value for the pyramid level.

roiSize

Size of zero level image ROI, in pixels.

rate

Ratio between neighbouring levels (1 < rate≤ 10).

pBufSize

Description
This function computes the size of the pyramid structure and the size of the temporary buffer, in bytes, for
the ippiPyramidInit function. For an example on how to use this function, refer to the example provided
with the ippiPyramidLayerDown function description.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when any of the specified pointers is NULL.

ippStsSizeErr
ippStsBadArgErr

Indicates an error when roiSize has a field with a zero or
negative value.
Indicates an error when level is equal to or less than 0, or
when rate is out of the range.

See Also
PyramidInit Initializes the pyramid structure and calculates the ROI size for pyramid layers.
PyramidLayerDown Creates a lower pyramid layer.

1638

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

PyramidInit
Initializes the pyramid structure and calculates the
ROI size for pyramid layers.

SyntaxIppStatus ippiPyramidInit(IppiPyramid** pPyr, int level, IppiSize roiSize, Ipp32f rate,
Ipp8u* pPyrBuffer, Ipp8u* pBuffer);

Platform-aware functions
IppStatus ippiPyramidInit_L(IppiPyramidL** pPyr, int level, IppiSizeL roiSize, Ipp32f
rate, Ipp8u* pPyrBuffer, Ipp8u* pBuffer);

Include Files
ippcv.hFlavors with the -L suffix: ippcv_l.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pPyr

Pointer to the pointer to the pyramid structure.

level

Maximum value for the pyramid level.

roiSize

Size of zero level image ROI, in pixels.

rate

Ratio between neighbouring levels (1 < rate≤ 10).

pPyrBuffer

Pointer to the buffer for the pyramid structure initialization.

pBuffer

Pointer to the work buffer.

Description
This function initializes the structure for pyramid with (level+1) levels. This structure is used by theippiOpticalFlowPyrLK function for optical flow calculation. The IppiPyramid structure contains thefollowing fields:

pImagePointer to the array of (level+1) layer images.

pStep

Pointer to the array of (level+1) image row step values.

pRoi

Pointer to the array of (level+1) layer image ROIs.

pRate

Pointer to the array of (level+1) ratios of i-th levels to the zerolevel (rate-i).

pStatePointer to the structure to compute the next pyramid layer.

level

Number of levels in the pyramid.

Analogue for IppiPyramid structure for L-functions is IppiPyramidL structure.
The ippiPyramidInit function fills the pRoi and pRate arrays and the level field. The value of the level
field is equal to the minimum of the input value of the level parameter and the maximum possible numberof layers of the pyramid with given rate and zero level size.

1639

1

Intel® Integrated Performance Primitives Developer Guide and Reference

You need to specify other fields. To initialize the pyramid layer structure pState, use theippiPyramidLayerDownInit or ippiPyramidLayerUpInit functions. To obtain the pyramid layer images,
you can use the ippiPyramidLayerDown and ippiPyramidLayerUp functions.
For an example on how to use this function, refer to the example provided with the ippiPyramidLayerDown
function description.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when at least one of the pointers is NULL.
Indicates an error when roiSize has a field with a zero or
negative value.
Indicates an error when level is equal to or less than 0, or
when rate is out of the range.

ippStsSizeErr
ippStsBadArgErr

See Also
OpticalFlowPyrLK Calculates optical flow for the set of feature points using the pyramidal LucasKanade algorithm.
PyramidLayerDownInit Initializes the structure for creating a lower pyramid layer.
PyramidLayerUpInit Initializes the structure for creating an upper pyramid layer.
PyramidLayerDown Creates a lower pyramid layer.
PyramidLayerUp Creates an upper pyramid layer.
GetPyramidDownROI
Computes the size of the lower pyramid layer.

SyntaxIppStatus ippiGetPyramidDownROI(IppiSize srcRoi, IppiSize* pDstRoi, Ipp32f rate);

Platform-aware functions
IppStatus ippiGetPyramidDownROI_L(IppiSizeL srcRoi, IppiSizeL *pDstRoi, Ipp32f rate);

Include Files
ippcv.hFlavors with the _L suffix: ippcv_l.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
srcRoiSize
pDstRoiSize
rate

Size of the source pyramid layer ROI in pixels.
Pointer to the size of the destination (lower) pyramid layer ROI in
pixels.
Ratio between source and destination layers (1 < rate≤ 10).

Description
This function operates with ROI (see Regions of Interest in Intel IPP).

1640

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

This function computes the size of the lower pyramid layer pDstRoiSize for a source layer of a given size
srcRoiSize and specified size ratio rate between them in accordance with the following formulas:

NOTE
Since for the non-integer rate results depend on the computational precision, it is strongly
recommended to use this function in computations.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if pDstRoiSize pointer is NULL.
Indicates an error condition if srcRoiSize has a field with zeroor negative value.
Indicates an error condition if rate is out of the range.

ippStsSizeErr
ippStsBadArgErr

GetPyramidUpROI
Computes the size of the upper pyramid layer.

SyntaxIppStatus ippiGetPyramidUpROI(IppiSize srcRoi, IppiSize* pDstRoiMin, IppiSize*
pDstRoiMax, Ipp32f rate);

Platform-aware functions
IppStatus ippiGetPyramidUpROI_L(IppiSizeL srcRoi, IppiSizeL *pDstRoiMin, IppiSizeL*pDstRoiMax, Ipp32f rate);

Include Files
ippcv.hFlavors with the _L suffix: ippcv_l.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
srcRoiSize
pDstRoiSizeMin
pDstRoiSizeMax
rate

Size of the source pyramid layer ROI in pixels.
Pointer to the minimal size of the destination (upper) pyramid layer
ROI in pixels.
Pointer to the maximal size of the destination (upper) pyramid layer
ROI in pixels.
Ratio between source and destination layers (1 < rate≤ 10).

Description
This function operates with ROI (see Regions of Interest in Intel IPP).

1641

1

Intel® Integrated Performance Primitives Developer Guide and ReferenceThis function computes possible sizes of the upper pyramid layer pDstRoiSizeMin and pDstRoiSizeMax fora source layer of a given size srcRoiSize and specified size ratio rate between them in accordance with thefollowing formulas:maximum size pDstRoiSizeMax:

minimum size pDstRoiSizeMin:
if the width and height of the source layer ROI is greater than 1,

if the width and height of the source layer ROI is equal to 1,

NOTE
Since for the non-integer rate results depend on the computational precision, it is strongly
recommended to use this function in computations.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the specified pointers is NULL.

ippStsSizeErr
ippStsBadArgErr

Indicates an error condition if srcRoiSize has a field with zeroor negative value.
Indicates an error condition if rate is out of the range.

PyramidLayerDownGetSize
Computes the size of the structure for creating a lower
pyramid layer and the size of the temporary buffer.

SyntaxIppStatus ippiPyramidLayerDownGetSize_8u_C1R(IppiSize srcRoi, Ipp32f rate, int kerSize,int* pStateSize, int* pBufSize);
IppStatus ippiPyramidLayerDownGetSize_8u_C3R(IppiSize srcRoi, Ipp32f rate, int kerSize,int* pStateSize, int* pBufSize);
IppStatus ippiPyramidLayerDownGetSize_16u_C1R(IppiSize srcRoi, Ipp32f rate, int
kerSize, int* pStateSize, int* pBufSize);
IppStatus ippiPyramidLayerDownGetSize_16u_C3R(IppiSize srcRoi, Ipp32f rate, int
kerSize, int* pStateSize, int* pBufSize);
1642

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

IppStatus ippiPyramidLayerDownGetSize_32f_C1R(IppiSize srcRoi, Ipp32f rate, int
kerSize, int* pStateSize, int* pBufSize);
IppStatus ippiPyramidLayerDownGetSize_32f_C3R(IppiSize srcRoi, Ipp32f rate, int
kerSize, int* pStateSize, int* pBufSize);

Platform-aware functions
IppStatus ippiPyramidLayerDownGetSize_32f_C1R_L(IppiSizeL srcRoi, Ipp32f rate, int
kerSize, IppSizeL* pStateSize, IppSizeL* pBufSize);

Include Files
ippcv.hFlavors with the _L suffix: ippcv_l.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
srcRoiSize of the source image ROI.

rate

Ratio between neighbouring levels (1 < rate≤ 10).

kerSize

Size of the kernel.

pStateSize

Pointer to the size of the pyramid layer state structure.

pBufSize

Pointer to the size of the external work buffer.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function computes the size of the pState structure to build a lower pyramid layer and the size of thetemporary buffer, in bytes. This structure is used by the ippiPyramidLayerDown function and can beapplied to process images with size not greater than srcRoi. For an example on how to use this function,refer to the example provided with the ippiPyramidLayerDown function description.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when at least one of the pointers is NULL.

ippStsSizeErr
ippStsBadArgErr

Indicates an error when the width or height of images is lessthan, or equal to zero.
Indicates an error when kerSize is even, or equal to or lessthan 0; or when rate is out of the range.

See Also
Regions of Interest in Intel IPP
PyramidLayerDown Creates a lower pyramid layer.
PyramidLayerDownInit
Initializes the structure for creating a lower pyramid
layer.

1643

1Intel® Integrated Performance Primitives Developer Guide and Reference

SyntaxCase 1: Operating on integer data
IppStatus ippiPyramidLayerDownInit_8u_C1R(IppiPyramidDownState_8u_C1R** ppState,
IppiSize srcRoi, Ipp32f rate, Ipp16s* pKernel, int kerSize, int mode, Ipp8u* pStateBuf,
Ipp8u* pBuffer);
IppStatus ippiPyramidLayerDownInit_8u_C3R(IppiPyramidDownState_8u_C3R** ppState,
IppiSize srcRoi, Ipp32f rate, Ipp16s* pKernel, int kerSize, int mode, Ipp8u* pStateBuf,
Ipp8u* pBuffer);
IppStatus ippiPyramidLayerDownInit_16u_C1R(IppiPyramidDownState_16u_C1R** ppState,
IppiSize srcRoi, Ipp32f rate, Ipp16s* pKernel, int kerSize, int mode, Ipp8u* pStateBuf,
Ipp8u* pBuffer);
IppStatus ippiPyramidLayerDownInit_16u_C3R(IppiPyramidDownState_16u_C3R** ppState,
IppiSize srcRoi, Ipp32f rate, Ipp16s* pKernel, int kerSize, int mode, Ipp8u* pStateBuf,
Ipp8u* pBuffer);

Case 2: Operating on floating point data
IppStatus ippiPyramidLayerDownInit_32f_C1R(IppiPyramidDownState_32f_C1R** ppState,
IppiSize srcRoi, Ipp32f rate, Ipp32f* pKernel, int kerSize, int mode, Ipp8u* pStateBuf,
Ipp8u* pBuffer);
IppStatus ippiPyramidLayerDownInit_32f_C3R(IppiPyramidDownState_32f_C3R** ppState,
IppiSize srcRoi, Ipp32f rate, Ipp32f* pKernel, int kerSize, int mode, Ipp8u* pStateBuf,
Ipp8u* pBuffer);

Platform-aware functions
IppStatus ippiPyramidLayerDownInit_32f_C1R_L(IppiPyramidDownState_32f_C1R_L** pState,
IppiSizeL srcRoi, Ipp32f rate, const Ipp32f* pKernel, int kerSize, int mode, Ipp8u*
StateBuf, Ipp8u* Buffer);

Include Files
ippcv.hFlavors with the _L suffix: ippcv_l.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
ppStatePointer to the pointer to the initialized pyramid layer state structure.

srcRoiSize of the source image ROI.

rate

Ratio between neighbouring levels (1 < rate≤ 10).

pKernelSeparable symmetric kernel of odd length.

kerSize

Size of the kernel.

modeInterpolation method, possible value is:
IPPI_INTER_LINEAR

pStateBuf

1644

Bilinear interpolation.

Pointer to the buffer to initialize the pyramid layer state structure.

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Pointer to the external buffer.

pBuffer

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function initializes the pState structure to build a lower pyramid layer. This structure is used by theippiPyramidLayerDown function and can be applied to process images with size not greater than dstRoi.
The specified kernel pKernel should be symmetric. If it is not symmetric, the function builds the symmetrickernel using the first part of the specified kernel and returns a warning. The symmetric separable kernel canbe not Gaussian. If the sum of kernel elements is not equal to zero, the kernel is normalized.
For integer rates, the function performs downsampling by discarding rows and columns that are not multiplesof the rate value. For non-integer rates, the function uses bilinear interpolation (see Linear Interpolation for
more information).
For an example on how to use this function, refer to the example provided with the ippiPyramidLayerDown
function description.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when at least one of the pointers is NULL.

ippStsSizeErr
ippStsBadArgErr

Indicates an error when the width or height of images is lessthan, or equal to zero.
Indicates an error when kerSize is even, or equal to or lessthan 0; or when rate is out of the range.

See Also
Regions of Interest in Intel IPP
PyramidLayerDown Creates a lower pyramid layer.
Linear Interpolation
PyramidLayerDown
Creates a lower pyramid layer.

SyntaxIppStatus ippiPyramidLayerDown_<mod>(const Ipp<datatype>* pSrc, int srcStep, IppiSize
srcRoiSize, Ipp<datatype>* pDst, int dstStep, IppiSize dstRoiSize,
IppiPyramidDownState_<mod>* pState);
Supported values for mod:8u_C1R

16u_C1R

32f_C1R

8u_C3R

16u_C3R

32f_C3R

Platform-aware functions
IppStatus ippiPyramidLayerDown_32f_C1R_L(const Ipp32f* pSrc, IppiSizeL srcStep,
IppiSizeL srcRoiSize, Ipp32f* pDst, IppiSizeL dstStep, IppiSizeL dstRoiSize,
IppiPyramidDownState_32f_C1R_L* pState);

Include Files
ippcv.h1645

1Intel® Integrated Performance Primitives Developer Guide and Reference

Flavors with the _L suffix: ippcv_l.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
Pointer to the source image ROI.

pSrc

srcRoiSize

Distance, in bytes, between the starting points of consecutive lines
in the source image.
Size of the source image ROI, in pixels.

pDst

Pointer to the destination image ROI.

srcStep

dstRoiSize

Distance, in bytes, between the starting points of consecutive lines
in the destination image.
Size of the destination image ROI, in pixels.

pStatePointer to the pyramid layer structure.

dstStep

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function creates a lower pyramid layer pDst from the source image pSrc. The function applies the
convolution kernel to the source image using the mirror border and then performs downsampling. Before
calling ippiPyramidLayerDown, compute the size of the pState structure and work buffer using the
PyramidLayerDownGetSize function and initialize the structure using the PyramidLayerDownInit function. The
function can process images with srcRoiSize not greater than the srcRoi parameter specified in the
PyramidLayerDownInit function.

NOTE
This function uses the mirrored border.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the specified pointers is NULL.

ippStsSizeErr
ippStsStepErr

ippStsNotEvenStepErr

ippStsBadArgErr

Example1646

Indicates an error condition if srcRoiSize or dstRoiSize has afield with zero or negative value.
Indicates an error condition if srcStep is less thansrcRoiSize.width * <pixelSize> , or dstStep is less thandstRoiSize.width * <pixelSize>.
Indicates an error condition if one of the step values is notdivisible by 4 for floating-point images, or by 2 for shortinteger images.
Indicates an error condition if pState->rate has wrong value.

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

See Also
Regions of Interest in Intel IPP
PyramidLayerDownGetSize Computes the size of the structure for creating a lower pyramid layer
and the size of the temporary buffer.
PyramidLayerDownInit Initializes the structure for creating a lower pyramid layer.
PyramidLayerUpGetSize
Computes the size of the structure for creating an
upper pyramid layer and the size of the temporary
buffer.

SyntaxIppStatus ippiPyramidLayerUpGetSize_8u_C1R(IppiSize dstRoi, Ipp32f rate, int kerSize,int* pStateSize);
IppStatus ippiPyramidLayerUpGetSize_8u_C3R(IppiSize dstRoi, Ipp32f rate, int kerSize,int* pStateSize);
IppStatus ippiPyramidLayerUpGetSize_16u_C1R(IppiSize dstRoi, Ipp32f rate, int kerSize,int* pStateSize);
IppStatus ippiPyramidLayerUpGetSize_16u_C3R(IppiSize dstRoi, Ipp32f rate, int kerSize,int* pStateSize);
IppStatus ippiPyramidLayerUpGetSize_32f_C1R(IppiSize dstRoi, Ipp32f rate, int kerSize,int* pStateSize);
IppStatus ippiPyramidLayerUpGetSize_32f_C3R(IppiSize dstRoi, Ipp32f rate, int kerSize,int* pStateSize);

Platform-aware functions
IppStatus ippiPyramidLayerUpGetSize_32f_C1R_L(IppiSizeL dstRoi, Ipp32f rate, int
kerSize, IppSizeL* pStateSize);

Include Files
ippcv.hFlavors with the _L suffix: ippcv_l.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
dstRoiSize of the destination image ROI.

rate

Ratio between neighbouring levels (1 < rate≤ 10).

kerSize

Size of the kernel.

pStateSize

Pointer to the size of the pyramid layer state structure.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).

1647

1

Intel® Integrated Performance Primitives Developer Guide and ReferenceThis function computes the size of the pState structure to build an upper pyramid layer and the size of thetemporary buffer, in bytes. This structure is used by the ippiPyramidLayerUp function and can be applied
to process images with size not greater than dstRoi. For an example on how to use this function, refer tothe example provided with the ippiPyramidLayerDown function description.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when at least one of the pointers is NULL.

ippStsSizeErr
ippStsBadArgErr

Indicates an error when the width or height of images is lessthan, or equal to zero.
Indicates an error when kerSize is even, or equal to or lessthan 0; or when rate is out of the range.

See Also
Regions of Interest in Intel IPP
PyramidLayerUp Creates an upper pyramid layer.
PyramidLayerDown Creates a lower pyramid layer.
PyramidLayerUpInit
Initializes the structure for creating an upper pyramid
layer.

SyntaxCase 1: Operating on integer data
IppStatus ippiPyramidLayerUpInit_8u_C1R(IppiPyramidUpState_8u_C1R** ppState, IppiSize
dstRoi, Ipp32f rate, Ipp16s* pKernel, int kerSize, int mode, Ipp8u* pStateBuf);
IppStatus ippiPyramidLayerUpInit_8u_C3R(IppiPyramidUpState_8u_C3R** ppState, IppiSize
dstRoi, Ipp32f rate, Ipp16s* pKernel, int kerSize, int mode, Ipp8u* pStateBuf);
IppStatus ippiPyramidLayerUpInit_16u_C1R(IppiPyramidUpState_16u_C1R** ppState, IppiSize
dstRoi, Ipp32f rate, Ipp16s* pKernel, int kerSize, int mode, Ipp8u* pStateBuf);
IppStatus ippiPyramidLayerUpInit_16u_C3R(IppiPyramidUpState_16u_C3R** ppState, IppiSize
dstRoi, Ipp32f rate, Ipp16s* pKernel, int kerSize, int mode, Ipp8u* pStateBuf);

Case 2: Operating on floating point data
IppStatus ippiPyramidLayerUpInit_32f_C1R(IppiPyramidUpState_32f_C1R** ppState, IppiSize
dstRoi, Ipp32f rate, Ipp32f* pKernel, int kerSize, int mode, Ipp8u* pStateBuf, Ipp8u*
pBuffer);
IppStatus ippiPyramidLayerUpInit_32f_C3R(IppiPyramidDownState_32f_C3R** ppState,
IppiSize dstRoi, Ipp32f rate, Ipp32f* pKernel, int kerSize, int mode, Ipp8u* pStateBuf,
Ipp8u* pBuffer);

Platform-aware functions
IppStatus ippiPyramidLayerUpInit_32f_C1R_L(IppiPyramidUpState_32f_C1R_L** ppState,
IppiSizeL dstRoi, Ipp32f rate, const Ipp32f* pKernel, int kerSize, int mode, Ipp8u*
StateBuf);

Include Files
ippcv.hFlavors with the _L suffix: ippcv_l.h

1648

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
ppStatePointer to the pointer to the initialized pyramid state structure.

dstRoiSize of the destination image ROI.

rate

Ratio between neighbouring levels (1 < rate≤ 10).

pKernelSeparable symmetric kernel of odd length.

kerSize

Size of the kernel.

modeInterpolation method, possible value is:
IPPI_INTER_LINEAR

pStateBuf

Bilinear interpolation.

Pointer to the buffer to initialize the pyramid layer state structure.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function allocates memory and initializes the pState structure to build an upper pyramid layer. This
structure is used by the ippiPyramidLayerUp function and can be applied to process images with size notgreater than dstRoi.
The specified kernel pKernel should be symmetric. If it is not symmetric, the function builds the symmetrickernel using the first part of the specified kernel and returns a warning. The symmetric separable kernel canbe not Gaussian. If the sum of kernel elements is not equal to zero, the kernel is normalized.
For integer rates, the function performs upsampling by inserting zero rows and columns that are notmultiples of the rate value. For non-integer rates, the function uses bilinear interpolation (see Linear
Interpolation for more information) to calculate kernel coefficients for pixels with non-integer coordinates.
For an example on how to use this function, refer to the example provided with the ippiPyramidLayerDown
function description.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when at least one of the pointers is NULL.

ippStsSizeErr
ippStsBadArgErr

Indicates an error when the width or height of images is lessthan, or equal to zero.
Indicates an error when kerSize is even, or equal to or lessthan 0; or when rate is out of the range.

See Also
Regions of Interest in Intel IPP
PyramidLayerUp Creates an upper pyramid layer.
PyramidLayerDown Creates a lower pyramid layer.
Linear Interpolation

1649

1

Intel® Integrated Performance Primitives Developer Guide and Reference

PyramidLayerUp
Creates an upper pyramid layer.

SyntaxIppStatus ippiPyramidLayerUp_<mod>(const Ipp<datatype>* pSrc, int srcStep, IppiSize
srcRoiSize, Ipp<datatype>* pDst, int dstStep, IppiSize dstRoiSize,
IppiPyramidUpState_<mod>* pState);
Supported values for mod:8u_C1R

16u_C1R

32f_C1R

8u_C3R

16u_C3R

32f_C3R

Platform-aware functions
IppStatus ippiPyramidLayerUp_32f_C1R_L(const Ipp32f* pSrc, IppiSizeL srcStep, IppiSizeL
srcRoiSize, Ipp32f* pDst, IppiSizeL dstStep, IppiSizeL dstRoiSize,
IppiPyramidUpState_32f_C1R_L* pState);

Include Files
ippcv.hFlavors with the _L suffix: ippcv_l.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc

Pointer to the source image ROI.

srcRoiSize

Distance, in bytes, between the starting points of consecutive lines
in the source image.
Size of source image ROI, in pixels.

pDst

Pointer to the destination image ROI.

srcStep

dstRoiSize

Distance, in bytes, between the starting points of consecutive lines
in the destination image.
Size of destination image ROI, in pixels.

pStateThe pointer to the pyramid layer structure.

dstStep

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function creates an upper pyramid layer pDst from the source image pSrc. The function performs
upsampling of the source image and then applies the convolution kernel using the mirror border. Before
calling the ippiPyramidLayerUp function, compute the size of the pyramid layer structure pState using the
PyramidLayerUpGetSize function and initialize the structure using the PyramidLayerUpInit function. The
function can process images with srcRoiSize not greater than the roiSize parameter specified in the
PyramidLayerUpInit function.

1650

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

NOTE
This function uses the mirrored border.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the specified pointers is NULL.

ippStsSizeErr
ippStsStepErr

ippStsNotEvenStepErr

ippStsBadArgErr

Indicates an error condition if srcRoiSize or dstRoiSize has afield with zero or negative value.
Indicates an error condition if srcStep is less thansrcRoiSize.width * <pixelSize> , or dstStep is less thandstRoiSize.width * <pixelSize>.
Indicates an error condition if one of the step values is notdivisible by 4 for floating-point images, or by 2 for shortinteger images.
Indicates an error condition if pState->rate has wrong value.

See Also
Regions of Interest in Intel IPP
PyramidLayerDownGetSize Computes the size of the structure for creating a lower pyramid layer
and the size of the temporary buffer.
PyramidLayerDownInit Initializes the structure for creating a lower pyramid layer.
Example of Using General Pyramid Functions
Refer to the following example to understand how different general pyramids functions can be used to create
the Gaussian and Laplacian pyramids:

Pyramid.c

Image Inpainting
The functions described in this section allows to restore the unknown image portions. They could be used to
repair damaged parts of images and to remove some objects from images. Fast direct methods of inpaintingthat allow for run-time correcting of video frames are supported.

InpaintGetSize
Computes the size of the state structure and work
buffer for image inpainting.

SyntaxIppStatus ippiInpaintGetSize(const Ipp8u* pMask, int maskStep, IppiSize roiSize, Ipp32f
radius, IppiInpaintFlag flags, int channels, int* pStateSize, int* pBufSize);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

1651

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Parameters
pMask

Pointer to the mask image ROI.

roiSize

Distance, in bytes, between the starting points of consecutive lines
in the mask image.
Size of the image ROI, in pixels.

radiusRadius of the neghborhood used for inpainting.

flags

Specifies algorithm for image inpainting. Possible values:

maskStep

IPP_INPAINT_TELEA

Telea algorithm

IPP_INPAINT_NS

Navier-Stokes equation

channels

Number of channels in the image.

pStateSize

Pointer to the size of the state structure.

pBufSize

Pointer to the size of the external work buffer.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function computes the size of the state structure for direct methods of image inpainting and the size ofthe external work buffer. Call this function before using ippiInpaintInit. For an example on how to use
this function, refer to the example provided with the ippiInpaint function description.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsStepErr
ippStsBadArgErr
ippStsNumChannelsErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error when one of the specified pointers is NULL.
Indicates an error when width or height of the image is lessthan, or equal to zero.
Indicates an error when the step in the mask image is too
small.
Indicates an error when radius is less than 1, or flags has anillegal value.
Indicates an error when the specified number of image
channels is invalid or not supported.

See Also
Regions of Interest in Intel IPP
Inpaint MODIFIED API. Restores unknown image pixels.
InpaintInit Initializes the state structure for image inpainting.
InpaintInit
Initializes the state structure for image inpainting.

SyntaxIppStatus ippiInpaintInit_8u_C1R(IppiInpaintState_8u_C1R** ppState, const Ipp32f*
pDist, int distStep, const Ipp8u* pMask, int maskStep, IppiSize roiSize, Ipp32f radius,
IppiInpaintFlag flags, Ipp8u* pStateBuf, Ipp8u* pBuf);

1652

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

IppStatus ippiInpaintInit_8u_C3R(IppiInpaintState_8u_C3R** ppState, const Ipp32f*
pDist, int distStep, const Ipp8u* pMask, int maskStep, IppiSize roiSize, Ipp32f radius,
IppiInpaintFlag flags, Ipp8u* pStateBuf, Ipp8u* pBuf);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
ppStateDouble pointer to the state structure for image inpaiting.

pDist

Pointer to the ROI of the image of distances.

distSteppMask
maskStep
roiSizeradiusflags

Distance, in bytes, between the starting points of consecutive lines
in the image of distances.
Pointer to the mask image ROI.
Distance, in bytes, between the starting points of consecutive lines
in the mask image.
Size of the image ROI, in pixels.
Radius of the neghborhood used for inpainting (dist≤radius pixels
are processed).
Specifies algorithm for image inpainting. Possible values:
IPP_INPAINT_TELEA

Telea algorithm

IPP_INPAINT_NS

Navier-Stokes equation

pStateBuf

Pointer to the buffer for the state structure initialization.

pBuf

Pointer to the external work buffer.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function initializes the ppState structure for direct methods of image inpainting. This structure is usedby the ippiInpaint function and can be applied to process images of the same size roiSize.
Zero pixels of the pMask image correspond to the known image pixels, non-zero pixels - to the unknown
image pixels that should be restored. The distance image pDist specifies the order of pixel inpainting. Valuesof unknown pixels are restored in ascending order depending on their distances. The radius parameter
specifies the radius of the circular neighborhood that affects the restoration of the central pixel. The flagparameter specifies the method of direct inpainting. Two methods are supported: Telea algorithm [Telea04]
and Navier-Stokes equation [Bert01].
For an example on how to use this function, refer to the example provided with the ippiInpaint function
description.
NOTE The image ROI must not exceed the maximum width and height of roiSize specified in theinitialization function.

1653

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsStepErr
ippStsNotEvenStepErr
ippStsBadArgErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error when one of the specified pointers is NULL.
Indicates an error when width or height of the image is lessthan, or equal to zero.
Indicates an error when the step of the mask or distance image
ROI is too small.
Indicates an error when the step value is not divisible by the
pDist element.
Indicates an error when radius is less than 1, or flags has anillegal value.

See Also
Regions of Interest in Intel IPP
Inpaint MODIFIED API. Restores unknown image pixels.
InpaintGetSize Computes the size of the state structure and work buffer for image inpainting.
Inpaint
MODIFIED API. Restores unknown image pixels.

SyntaxIppStatus ippiInpaint_8u_C1R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int dstStep,
IppiSize roiSize, IppiInpaintState_8u_C1R* pState, Ipp8u* pBuffer);
IppStatus ippiInpaint_8u_C3R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int dstStep,
IppiSize roiSize, IppiInpaintState_8u_C1R* pState, Ipp8u* pBuffer);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pDst

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in the source
image.
Pointer to the destination image ROI.

roiSize

Distance in bytes between starts of consecutive lines in thedestination image.
Size of the image ROI in pixels.

pStateThe pointer to the inpainting structure.

pBuffer

Pointer to the work buffer.

dstStep1654

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Description
Important The API of this function has been modified in Intel IPP 9.0 release.

Before using this function, compute the size of the state structure and work buffer using InpaintGetSize andinitialize the structure using InpaintInit.
This function operates with ROI (see Regions of Interest in Intel IPP).
This function reconstructs damaged part of the image, or removes a selected object (see Figure “Image
Inpainting”). The image part to restore is defined by the mask that is created when the inpainting structure
pState is initialized by the InpaintInit function. Different distant transforms can be used, but the Fast
Marching method (ippiFastMarching) provides the best results. The order of pixel restoration is defined by
the distance through the initialization the inpainting structure pState by the InpaintInit function. Pixels arerestored in according to the growing of their distance value. When a pixel is inpainted, it is treated as the
known one.
Two algorithms of direct inpainting are supported (controlled by the parameter flags of the InpaintInit
function):• image restoration of the unknown pixel by the weighted sum of approximations by known pixels in theneighborhood (flags = IPP_INPAINT_TELEA) [Telea04],• image restoration based on the Navier-Stokes equations (flags = IPP_INPAINT_NS) [Bert01].
The inpainting structure pState can be used to perform restoration of several different images of the same
size roiSize.
Image Inpainting

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error when one of the specified pointers is NULL.
Indicates an error when roiSize has a field with zero or
negative value, or if differs from the corresponding parameterthat is specified when the inpainting structure is initialized by
InpaintInit.

1655

1

Intel® Integrated Performance Primitives Developer Guide and ReferenceippStsStepErr

Indicates an error condition if srcStep or dstStep is less thanroiSize.width * < pixelSize>.

ExampleSee Also
InpaintGetSize Computes the size of the state structure and work buffer for image inpainting.
InpaintInit Initializes the state structure for image inpainting.
Image Segmentation
THis section describes the functions that perform image segmentation using different techniques. These
functions allow to extract parts of the image that can be associated with objects of the real world. Watershed
and gradient segmentation are region-based methods to split image into the distinctive areas.
Background/foreground segmentation allows for distinguishing between moving objects and stable areas of
the background.

LabelMarkersGetBufferSize
Computes the size of the working buffer for themarker labeling.

SyntaxIppStatus ippiLabelMarkersGetBufferSize_8u_C1R(IppiSize roiSize, int* pBufSize);
IppStatus ippiLabelMarkersGetBufferSize_8u32s_C1R(IppiSize roiSize, int* pBufSize);
IppStatus ippiLabelMarkersGetBufferSize_16u_C1R(IppiSize roiSize, int* pBufSize);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
roiSize

Size of the source image ROI in pixels.

pBufSize

Pointer to the computed size of the working buffer.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function computes the size of the working buffer required for the ippiLabelMarkers function. The
buffer with the length pBufSize[0] can be used to segment images with width and/or height that is equal toor less than the corresponding field of the parameter roiSize.

Return Values
ippStsNoErr
ippStsNullPtrErr

1656

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if the pointer pBufSize is NULL.

Developer Guide and Reference for Intel® Integrated Performance Primitives

ippStsSizeErr

1

Indicates an error condition if roiSize has a field with zero or
negative value.

LabelMarkers
Labels markers in image with different values.

SyntaxIppStatus ippiLabelMarkers_8u_C1IR(Ipp8u* pMarker, int markerStep, IppiSize roiSize,
int minLabel, int maxLabel, IppiNorm norm, int* pNumber, Ipp8u* pBuffer);
IppStatus ippiLabelMarkers_8u32s_C1R(Ipp8u* pSrcMarker, int srcMarkerStep, Ipp32s*
pDstMarker, int dstMarkerStep, IppiSize roiSize, int minLabel, int maxLabel, IppiNorm
norm, int* pNumber, Ipp8u* pBuffer);
IppStatus ippiLabelMarkers_16u_C1IR(Ipp16u* pMarker, int markerStep, IppiSize roiSize,
int minLabel, int maxLabel, IppiNorm norm, int* pNumber, Ipp8u* pBuffer);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

ParameterspMarkermarkerStep

Pointer to the source and destination image ROI (for in-placeflavors).
Distance in bytes between starts of consecutive lines in the sourceand destination image.

pSrcMarker

Pointer to the source image ROI (for not-in-place flavors).

srcMarkerStep

Distance, in bytes, between the starting points of consecutive lines in thesource image (for not-in-place flavors).

pDstMarker

Pointer to the source and destination image ROI (for not-in-place flavors).

dstMarkerStep

Distance, in bytes, between the starting points of consecutive lines in thedestination image (for not-in-place flavors).

minLabel

Minimal value of the marker label (0 <minLabel≤maxLabel).

maxLabel

Maximal value of the marker label (minLabel≤maxLabel< 255 for 8bit markers, and minLabel≤maxLabel< 65535 for 16-bit markers,
and minLabel≤maxLabel< (231-1) for 32-bit markers).

roiSize

Size of the source and destination image ROI in pixels.

norm

Specifies type of the norm to form the mask for marker
propagation:

pNumber

ippiNormInf

Infinity norm (8-connectivity);

ippiNormL1

L1 norm (4-connectivity).

Pointer to the number of markers.

1657

1

Intel® Integrated Performance Primitives Developer Guide and Reference

pBuffer

Pointer to the working buffer.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function labels markers in the destination image with different integer values. Each connected set of
non-zero image pixels is treated as the separate marker. 4- or 8-connectivity can be used depending on thenorm type. All pixels belonging to the same marker are set to the same value from the interval [minLabel,
maxLabel]. Two markers can be labeled with the same value if the number of connected components
exceeds minLabel-maxLabel+1. The image with labeled markers can be used as the seed image forsegmentation by functions ippiSegmentWatershed or ippiSegmentGradient functions.
The function requires the working buffer pBuffer whose size should be computed by the function
ippiLabelMarkersGetBufferSize beforehand.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsStepErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointers is
NULL.
Indicates an error condition if roiSize has a field with zero or
negative value.
Indicates an error condition if markerStep is less thanroiSize.width * < pixelSize>.

ippStsNotEvenStepErr

Indicates an error condition if markerStep, srcMarkerStep, or
dstMarkerStep is not divisible by respective <pixelSize>.

ippStsBadArgErr

Indicates an error condition if one of the minLabel, maxLabel,and norm has an illegal value.

ExampleMarkSpecklesGetBufferSize
Computes the size of the external work buffer for
speckle marking.

SyntaxIppStatus ippiMarkSpecklesGetBufferSize(IppiSize roiSize, IppDataType dataType, int
numChannels, int* pBufferSize);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
roiSize

1658

Size of the source and destination image ROI in pixels.

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

dataType

Data type of the source and destination image.

numChannels

Number of channels in the image. Possible value is 1.

pBufferSize

Pointer to the computed size (in bytes) of the external work
buffer.

Description
This function computes the size of the external work buffer for the MarkSpeckles function.
For an example on how to use this function, refer to the example provided with the MarkSpeckles function
description.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error when pBufferSize is NULL.

ippStsSizeErr

Indicates an error when roiSize has a field with a zero or
negative value.

ippStsDataTypeErr

Indicates an error when dataType has an illegal value.

ippStsNumChannelErr

Indicates an error when numChannels has an illegal value.

See Also
MarkSpeckles Marks small noise blobs (speckles) in an image.
MarkSpeckles
Marks small noise blobs (speckles) in an image.

SyntaxIppStatus ippiMarkSpeckles_<mod>(Ipp<datatype>* pSrcDst, int srcDstStep, IppiSize
roiSize, Ipp<datatype> speckleVal, int maxSpeckleSize, Ipp<datatype> maxPixDiff,
IppiNorm norm, Ipp8u* pBuffer);
Supported values for mod:8u_C1IR

16u_C1IR

16s_C1IR

32f_C1IR

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrcDstPointer to the source and destination image.

srcDstStep

Distance, in bytes, between the starting points of consecutive lines inthe source and destination image.

roiSize

Size of the source and destination image ROI in pixels.

1659

1

Intel® Integrated Performance Primitives Developer Guide and Reference

speckleVal

Value to set to the speckles.

maxSpeckleSize

Maximum size of the image component to consider it as a speckle.

maxPixDiff

Maximum difference between neighboring disparity pixels to put theminto the same component.

normType of the norm to form the mask for marker propagation. Possible
value is:ippiNormL1
pBuffer

L1 norm (4-connectivity)

Pointer to the work buffer.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function marks small noise blobs (speckles) in the source image.
The pSrcDst parameter points to the processed source and destination image ROI.
The function finds small connected components and set them to the speckleVal value. This function marks
only components with size that is less than, or equal to maxSpeckleSize. Pixels of the image belong to thesame connected component if the difference between adjacent pixels (considering 4-connected adjacency) is
less than, or equal to the maxSpeckleSize value.
NOTE
This release does not support 8-connectivity.

The function does not process the pixels of the image that already have the speckleVal value.
Before using the ippiMarkSpeckles function, compute the size of the external buffer using the
MarkSpecklesGetBufferSize function.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when pSrcDst or pBufferSize is NULL.

ippStsSizeErr
ippStsNotEvenStepErr

ippStsNormErr

Indicates an error when roiSize has a field with a zero or
negative value.
Indicates an error when one of the step values is not divisibleby 4 for floating-point images, or by 2 for short-integer
images.
Indicates an error when norm has an incorrect or not supported
value.

ExampleSee Also
Regions of Interest in Intel IPP
User-defined Border Types
FilterGaussianGetBufferSize Computes the size of the Gaussian specification structure and thesize of the external work buffer for Gaussian filtering with user-defined borders.
FilterGaussianInit Initializes the Gaussian context structure.
1660

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

SegmentWatershedGetBufferSize
Computes the size of the working buffer for thewatershed segmentation.

SyntaxIppStatus ippiSegmentWatershedGetBufferSize_8u_C1R(IppiSize roiSize, int* pBufSize);
IppStatus ippiSegmentWatershedGetBufferSize_8u16u_C1R(IppiSize roiSize, int* pBufSize);
IppStatus ippiSegmentWatershedGetBufferSize_32f16u_C1R(IppiSize roiSize, int*
pBufSize);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
roiSize

Size of the source image ROI in pixels.

pBufSize

Pointer to the computed size of the working buffer.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function computes the size of the working buffer required for the ippiSegmentWatershed function. The
buffer with the length pBufSize[0] can be used to segment images with width and/or height that is equal toor less than the corresponding field of the parameter roiSize.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if the pointer pBufSize is NULL.
Indicates an error condition if roiSize has a field with zero or
negative value.

SegmentWatershed
Performs marker-controlled watershed segmentationof an image.

SyntaxIppStatus ippiSegmentWatershed_8u_C1IR(const Ipp8u* pSrc, int srcStep, Ipp8u* pMarker,
int markerStep, IppiSize roiSize, IppiNorm norm, int flag, Ipp8u* pBuffer);
IppStatus ippiSegmentWatershed_8u16u_C1IR(const Ipp8u* pSrc, int srcStep, Ipp16u*
pMarker, int markerStep, IppiSize roiSize, IppiNorm norm, int flag, Ipp8u* pBuffer);
IppStatus ippiSegmentWatershed_32f16u_C1IR(const Ipp32f* pSrc, int srcStep, Ipp16u*
pMarker, int markerStep, IppiSize roiSize, IppiNorm norm, int flag, Ipp8u* pBuffer);

1661

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pMarkermarkerStep
roiSize
norm

Pointer to the source image ROI.
Distance, in bytes, between the starting points of consecutive lines
in the source image.
Pointer to the ROI of the source and destination image of markers.
Distance, in bytes, between the starting points of consecutive lines
in the image with markers.
Size of the source and destination image ROI, in pixels.
Specifies the type of the norm to form the mask for marker
propagation:
ippiNormInf
ippiNormL1
ippiNormL2
ippiNormFM

flag

Infinity norm (8-connectivity, 3x3
rectangular mask)
L1 norm (4-connectivity, 3x3 cross mask)
Approximation of L2 norm (8-connectivity,
3x3 mask) [Bor86]
Fast marching distance [Telea04]

Specifies the algorithm of segmentation. The value is a logical sumof the following mandatory values:
Priority queue is used to define the order ofpixel processing.
IPP_SEGMENT_DISTANCE Distance transform algorithm is used forsegmentation.

IPP_SEGMENT_QUEUE

and the following optional values:
IPP_SEGMENT_BORDER_4 Pixels of the 4-connectivity border between

image segments are marked with the

IPP_MAX_8U (255) value.

IPP_SEGMENT_BORDER_8 Pixels of the 8-connectivity border between

image segments are marked with the
IPP_MAX_8U (255) value.

pBuffer

Pointer to the working buffer.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function performs marker-controlled watershed segmentation of the source image. Non-zero pixels of
the pMarker image belong to water source markers. Marker values propagate through the whole image
according to the watershed algorithm. Image segments are formed by groups of connected pMarker pixels
with the same value. The parameter norm controls marker propagation connectivity. Watershed segmentation

1662

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

is preferable for images with local minimums, for example, gradient images. Image markers generally
correspond to these local minimums and can be created, for example, manually or using morphologicalreconstruction.
The parameter flag specifies how watershed segmentation is performed. This parameter is a logical sum of
two values among the following supported values:• Mandatory values specifying the algorithm of segmentation:
IPP_SEGMENT_QUEUEClassic watershed segmentation scheme with the priority queue[Vincent91]

IPP_SEGMENT_DISTANCE

Watershed segmentation by calculating the topographic distance foreach pixel [Lotufo00], [Meyer94]• Optional additional values of the flag: IPP_SEGMENT_BORDER_4 and IPP_SEGMENT_BORDER_8 specify theborder of the segments. All pixels adjacent to the differently marked pixels are considered as border
pixels, and their values are set to IPP_MAX_8U (255) for 8-bit markers, or IPP_MAX_16U (65535) for 16bit markers. In this case, the value IPP_MAX_8U (IPP_MAX_16U) should not be used to mark segments. If
these optional values are not specified, segments are formed without borders.
The function requires the working buffer pBuffer, which size should be computed by the function
ippiSegmentWatershedGetBufferSize beforehand.
Figure “Watershed Segmentation with Different Norms” shows the plateau filling through the watershedsegmentation with different values of the norm parameters. Initial image (a) has the labeled with markers
upper and lower fourths with low pixel value, the central plateau between them, the ridge between the

1663

1

Intel® Integrated Performance Primitives Developer Guide and Reference

plateau and the lower forth with one pixel hole in the center of it. The following pictures are segmentation
results: b) - for L1 norm (block distance), c)- Linf norm (chessboard distance), d) - approximate L2(Euclidian) norm [Bor86], e) Fast Marching distance.
Watershed Segmentation with Different Norms

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsStepErr
ippNotEvenStsStepErr
ippStsBadArgErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointers is
NULL.
Indicates an error condition if roiSize has a field with zero or
negative value.
Indicates an error condition if one of the srcStep or markerStep
is less than roiSize.width * < pixelSize>.
Indicates an error condition if one of the srcStep or markerStep
for 16-bit integer images is not divisible by 2.
Indicates an error condition if norm has an illegal value.

SegmentGradientGetBufferSize
Computes the size of the working buffer for thegradient segmentation.

1664

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

SyntaxIppStatus ippiSegmentGradientGetBufferSize_8u_C1R(IppiSize roiSize, int* pBufferSize);
IppStatus ippiSegmentGradientGetBufferSize_8u_C3R(IppiSize roiSize, int* pBufSize);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
roiSize

Size of the source image ROI in pixels.

pBufSize, pBufferSize

Pointer to the computed size of the working buffer.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function computes the size of the working buffer required for the ippiSegmentGradient function. The
buffer with the length pBufSize[0] can be used to segment images with width and/or height that is equal toor less than the corresponding field of the parameter roiSize.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if the pointer pBufSize is NULL.
Indicates an error condition if roiSize has a field with zero or
negative value.

SegmentGradient
Performs image segmentation by region growing to
the least gradient direction.

SyntaxIppStatus ippiSegmentGradient_8u_C1IR(const Ipp8u* pSrc, int srcStep, Ipp8u* pMarker,
int markerStep, IppiSize roiSize, IppiNorm norm, int flags, Ipp8u* pBuffer);
IppStatus ippiSegmentGradient_8u_C3IR(const Ipp8u* pSrc, int srcStep, Ipp8u* pMarker,
int markerStep, IppiSize roiSize, IppiNorm norm, int flags, Ipp8u* pBuffer);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

1665

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Parameters
pSrc
srcStep
pMarkermarkerStep
roiSize
norm

Pointer to the source image ROI.
Distance in bytes between starts of consecutive lines in the source
image.
Pointer to the ROI of the source and destination image of markers.
Distance in bytes between starts of consecutive lines in the image ofmarkers.
Size of the source and destination image ROI in pixels.
Specifies type of the norm to form the mask for marker
propagation:
ippiNormInf
ippiNormL1

flags

Infinity norm (8-connectivity, 3x3
rectangular mask);
L1 norm (4-connectivity, 3x3 cross mask);

optional flag:
IPP_SEGMENT_BORDER_4 pixels of the 4-connectivity border between

image segments are marked with value(IPP_MAX_8U)-1 (254).

IPP_SEGMENT_BORDER_8 pixels of the 8-connectivity border between

image segments are marked with value(IPP_MAX_8U)-1 (254).
pBuffer

Pointer to the working buffer.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function performs image segmentation by region growing with markers. Non-zero pixels of pMarker
image belong to initial image regions. Marker values propagate through the whole image in the direction of
the least value of the absolute value of the image gradient. For 3-channel image the gradient is calculated as
the maximum of channel gradients. Image segments are formed by groups of connected pMarker pixels withthe same value. The parameter norm controls marker propagation connectivity. Gradient segmentation is
generally done for an image without explicit calculation of the image gradient. [Meyer92]
If IPP_SEGMENT_BORDER flag is defined, then the pixels adjacent to differently marked pixels are assumed to
be border pixels and are set to a special value (254). This value must not be used to mark segments in thiscase.
Another special value (255) is used inside the function and can not be used to mark segment inany case.
The function requires the working buffer pBuffer whose size should be computed by the function
ippiSegmentGradientGetBufferSize beforehand.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

1666

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointers is
NULL.
Indicates an error condition if roiSize has a field with zero or
negative value.

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

ippStsStepErr

Indicates an error condition if one of the srcStep or markerStep
is less than roiSize.width * < pixelSize>.

ippStsBadArgErr

Indicates an error condition if norm has an illegal value.

BoundSegments
Marks pixels belonging to segment boundaries.

SyntaxIppStatus ippiBoundSegments_8u_C1IR(Ipp8u* pMarker, int markerStep, IppiSize roiSize,Ipp8u val, IppiNorm norm);
IppStatus ippiBoundSegments_16u_C1IR(Ipp16u* pMarker, int markerStep, IppiSize roiSize,Ipp16u val, IppiNorm norm);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

ParameterspMarker

Pointer to the ROI of the source and destination image of markers.

roiSize

Distance in bytes between starts of consecutive lines in the image ofmarkers.
Size of the source and destination image ROI in pixels.

val

Value of the boundary pixel.

norm

Specifies type of the norm gor pixel neighborhood:markerStep

ippiNormInf

Infinity norm (8-connectivity);

ippiNormL1

L1 norm (4-connectivity.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function detects segment boundaries in the pMarker image and sets border pixels to the value val. A
segment is the set of connected pixels of the pMarker image with the same value not equal to val. Afterboundaries are marked, the pMarker image does not contain any pair of adjacent in norm pixels with thesame value that not equal to val.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error condition if one of the specified pointers is
NULL.
Indicates an error condition if roiSize has a field with zero or
negative value.

1667

1

Intel® Integrated Performance Primitives Developer Guide and ReferenceippStsStepErr
ippNotEvenStsStepErr
ippStsBadArgErr

Pattern Recognition

1668

Indicates an error condition if markerStep is less thanroiSize.width * < pixelSize>.
Indicates an error condition if markerStep for 16-bit integer
images is not divisible by 2.
Indicates an error condition if norm has an illegal value.

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Object Detection Using Haar-like Features
The object detector described in [ Viola01] and [ Lein02] is based on Haar classifiers. Each classifier uses k
rectangular areas (Haar features) to make decision if the region of the image looks like the predefined image
or not. Figure “Types of Haar Features” shows different types of Haar features.
Types of Haar Features

1669

1

Intel® Integrated Performance Primitives Developer Guide and Reference

In the Intel IPP Haar features are represented using IppRect structure. Figure “Representing Haar Features”
shows how it can be done for common and tilted features.
Representing Haar Features

When the classifier Kt is applied to the pixel (i, j) of the image A, it yields the value val1(t) if

and val2(t) otherwise.
Here wl is a feature weight, norm(i, j) is the norm factor (generally the standard deviation on therectangle containing all features), threshold(t), val1(t) and val2(t) are parameters of the classifier. For
fast computation the integral representation of an image is used. Haar classifiers are organized in sequences
called stages (classification stages). The stage value is the sum of its classifier values. During featuredetecting stages are consequently applied to the region of the image until the stage value becomes less than
the threshold value or all stages are passed.
HaarClassifierGetSize
Computes the size of the structure for standard Haarclassifiers.

SyntaxIppStatus ippiHaarClassifierGetSize(IppDataType dataType, IppiSize roiSize, const int*
pNum, int length, int* pSize);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h1670

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
dataType

Data type of the source image. Possible values: ipp32f, ipp32s.

roiSize

Maximal size of the source image ROI, in pixels.

pNum

Pointer to the array of Haar classifier lengths.

lengthNumber of classifiers in the stage.

pSize

Pointer to the size of Haar classifier structure.

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function computes the size of the pState structure that is required to calculate the sequence of Haarclassifiers - classification stage. The i-th classifier in the stage has pNum[i] rectangular features.
The length of the pThreshold, pVal1, and pVal2 vectors used in the ippiHaarClassifierInit function isequal to length.
The length of the pFeature and pWeight vectors is equal to:

Return Values

ippStsNullPtrErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error when any of the specified pointers is NULL.

ippStsSizeErr

Indicates an error when:ippStsNoErr• length or one of the pNum[i] values is less than, or equal to zero• roiSize has a field with a zero or negative value
ippStsBadArgErr
ippStsDataTypeErr

Indicates an error when one of the features is definedincorrectly.
Indicates an error when dataType has an illegal value.

See Also
Regions of Interest in Intel IPP
HaarClassifierInit Initializes the structure for standard Haar classifiers.
ApplyHaarClassifier Applies a Haar classifier to an image.
HaarClassifierInit
Initializes the structure for standard Haar classifiers.

1671

1

Intel® Integrated Performance Primitives Developer Guide and Reference

SyntaxIppStatus ippiHaarClassifierInit_32f(IppiHaarClassifier_32f** ppState, const IppiRect*
pFeature, const Ipp32f* pWeight, const Ipp32f* pThreshold, const Ipp32f* pVal1, const
Ipp32f* pVal2, const int* pNum, int length);
IppStatus ippiHaarClassifierInit_32s(IppiHaarClassifier_32s** ppState, const IppiRect*
pFeature, const Ipp32s* pWeight, const Ipp32s* pThreshold, const Ipp32s* pVal1, const
Ipp32s* pVal2, const int* pNum, int length);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
ppStateDouble pointer to the Haar classifier structure.

pFeature

Pointer to the array of features.

pWeight

Pointer to the array of feature weights.

pThreshold

Pointer to the array of classifier threshold values.

pVal1, pVal2

Pointers to the arrays of classifier result values.

pNum

Pointer to the array of Haar classifier lengths.

lengthNumber of classifiers in the stage.

Description
This function initializes the state structure that is required to calculate the sequence of Haar classifiers classification stage. The i-th classifier in the stage has pNum[i] rectangular features. Each feature is definedby a certain rectangle with horizontal and vertical sides. The length of the pThreshold, pVal1, and pVal2
vectors is equal to length. The length of pFeature and pWeight is equal to:

Result of applying classifiers to the image is computed using the formula in "Object Detection Using Haar-like
Features".
All features of the classifier initialized by the ippiHaarClassifierInit function have vertical and horizontal
sides (left part of Figure “Representing Haar Features”). Some of these features then can be tilted using theippiTiltHaarFeatures function.

1672

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Return Values
Indicates no error. Any other value indicates an error or awarning.
Indicates an error when any of the specified pointers is NULL.

ippStsNoErr
ippStsNullPtrErr

Indicates an error when length or one of the pNum[i] values isless than, or equal to zero.
Indicates an error when one of the features is definedincorrectly.

ippStsSizeErr
ippStsBadArgErr

See Also
HaarClassifierGetSize Computes the size of the structure for standard Haar classifiers.
ApplyHaarClassifier Applies a Haar classifier to an image.
Object Detection Using Haar-like Features
TiltHaarFeatures Modifies a Haar classifier by tilting specified features.
GetHaarClassifierSize
Returns the size of the Haar classifier.

SyntaxIppStatus ippiGetHaarClassifierSize_32f(IppiHaarClassifier_32f* pState, IppiSize*
pSize);
IppStatus ippiGetHaarClassifierSize_32s(IppiHaarClassifier_32s* pState, IppiSize*
pSize);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pStatePointer to the Haar classifier structure.

pSize

Pointer to the size of Haar classifier structure.

Description
This function computes the minimum size of the window containing all features of the Haar classifier
described by the pState.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error condition if the pState pointer is NULL.

TiltedHaarClassifierInit
Initializes the structure for tilted Haar classifiers.

1673

1

Intel® Integrated Performance Primitives Developer Guide and Reference

SyntaxIppStatus ippiTiltedHaarClassifierInit_32f(IppiHaarClassifier_32f* pState, const
IppiRect* pFeature, const Ipp32f* pWeight, const Ipp32f* pThreshold, const Ipp32f*
pVal1, const Ipp32f* pVal2, const int* pNum, int length);
IppStatus ippiTiltedHaarClassifierInit_32s(IppiHaarClassifier_32s* pState, const
IppiRect* pFeature, const Ipp32s* pWeight, const Ipp32s* pThreshold, const Ipp32s*
pVal1, const Ipp32s* pVal2, const int* pNum, int length);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pStateDouble pointer to the Haar classifier structure.

pFeature

Pointer to the array of features.

pWeight

Pointer to the array of feature weights.

pThreshold

Pointer to the array of classifier threshold values.

pVal1, pVal2

Pointers to the arrays of classifier result values.

pNum

Pointer to the array of Haar classifier lengths.

lengthNumber of classifiers in the stage.

Description
This function initializes the state structure that is required to calculate the sequence of Haar classifiers classification stage. The i-th classifier in the stage has pNum[i] rectangular features. Each feature is definedby a certain rectangle with sides tilted by 45 degrees. You should specify the points with minimum andmaximum row numbers. The length of the pFeature, pFeature, pWeight, pVal1, and pVal2 vectors isequal to:Result of applying classifiers to the image is computed using the formula in "Object Detection Using Haar-like
Features".
All features of the classifier initialized by the ippiTiltedHaarClassifierInit function have tilted sides(right part of Figure “Representing Haar Features”).

1674

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Return Values

ippStsNullPtrErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error when any of the specified pointers is NULL.

ippStsSizeErr

Indicates an error when:ippStsNoErr• length or one of the pNum[i] values is less than, or equal to zero
• Sum of all elements of pNum is not equal to length
Indicates an error when one of the features is definedincorrectly.

ippStsBadArgErr

See Also
ApplyHaarClassifier Applies a Haar classifier to an image.
Object Detection Using Haar-like Features
TiltHaarFeatures Modifies a Haar classifier by tilting specified features.
TiltHaarFeatures
Modifies a Haar classifier by tilting specified features.

SyntaxIppStatus ippiTiltHaarFeatures_32f(const Ipp8u* pMask, int flag,
IppiHaarClassifier_32f* pState);
IppStatus ippiTiltHaarFeatures_32s(const Ipp8u* pMask, int flag,
IppiHaarClassifier_32s* pState);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pMask

Pointer to the mask vector.

flag

Flag to choose the direction of feature tilting.

pStatePointer to the Haar classifier structure.

Description
This function tilts specified features of the Haar classifier. Before using this function, compute the size of theHaar classifier state structure using HaarClassifierGetSize and initialize the structure using
TiltedHaarClassifierInit. Non-zero elements of previously prepared vector pMask indicates the features thatare tilted. The flag parameter specifies how the features are tilted:••

if flag is equal to 0, the feature is tilted around the left top corner clockwise
if flag is equal to 1, the feature is tilted around the bottom left corner counter-clockwise

This mixed classifier containing both common and tilted features can be used by the function

ippiApplyMixedHaarClassifier.

1675

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsBadArgErr

Indicates an error when the classifier is tilted already.

See Also
HaarClassifierGetSize Computes the size of the structure for standard Haar classifiers.
TiltedHaarClassifierInit Initializes the structure for tilted Haar classifiers.
ApplyHaarClassifier
Applies a Haar classifier to an image.

SyntaxIppStatus ippiApplyHaarClassifier_32f_C1R(const Ipp32f* pSrc, int srcStep, const
Ipp32f* pNorm, int normStep, Ipp8u* pMask, int maskStep, IppiSize roiSize, int*
pPositive, Ipp32f threshold, IppiHaarClassifier_32f* pState);
IppStatus ippiApplyHaarClassifier_32s32f_C1R(const Ipp32s* pSrc, int srcStep, const
Ipp32f* pNorm, int normStep, Ipp8u* pMask, int maskStep, IppiSize roiSize, int*
pPositive, Ipp32f threshold, IppiHaarClassifier_32f* pState);
IppStatus ippiApplyHaarClassifier_32s_C1RSfs(const Ipp32s* pSrc, int srcStep, const
Ipp32s* pNorm, int normStep, Ipp8u* pMask, int maskStep, IppiSize roiSize, int*
pPositive, Ipp32s threshold, IppiHaarClassifier_32s* pState, int scaleFactor);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pNorm

Pointer to the ROI in the source image of integrals.
Distance, in bytes, between the starting points of consecutive lines
in the source image.
Pointer to the ROI in the source image of norm factors.

pPositive

Distance, in bytes, between the starting points of consecutive lines
in the image of the norm factors.
Pointer to the source and destination image of classification
decisions.
Distance, in bytes, between the starting points of consecutive lines
in the image of classification decisions.
Pointer to the number of positive decisions.

roiSize

Size of the source and destination images ROI in pixels.

thresholdStage threshold value.

normSteppMask
maskStep

1676

Developer Guide and Reference for Intel® Integrated Performance Primitives

pStatePointer to the Haar classifier structure.

scaleFactor

Scale factor (see Integer Result Scaling).

1

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function applies the Haar classifier to pixels of the source image ROI pSrc. The source image should bein the integral representation, it can be obtained by calling one of the integral functions beforehand. The sumof pixels on feature rectangles is computed as:Here (yl, xl) and (Yl, Xl) are coordinates of top left and right bottom pixels of l-th rectangle of the feature,
and wl is the feature weight. For i = 0. roiSize.height - 1, j = 0. roiSize.width - 1 all pixels referred in
the above formula should be allocated in memory.
The input value of pPositive[0] is used as a hint to choose the calculation algorithm. If it is greater than orequal to roiSize.width*roiSize.height, the value of the classifier is calculated in accordance with theabove formula for all pixels of the input image. Otherwise the value of the classifier is calculated for all nonzero pixels of pMask image. If the sum is less than threshold than the negative decision is made and thevalue of the corresponding pixel of the pMask image is set to zero. The number of positive decisions is
assigned to the pPositive[0].
Before using this function, you need to compute the size of the state structure using HaarClassifierGetSize
and initialize the structure using HaarClassifierInit or TiltedHaarClassifierInit.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsSizeErr
ippStsStepErr
ippStsNorEvenStepErr

Indicates an error when roiSize has a field with a zero or
negative value.
Indicates an error when one of the image step values is lessthan roiSize.width*<pixelSize>.
Indicates an error when one of the image step values is notdivisible by 4 for 32-bit images.

See Also
HaarClassifierGetSize Computes the size of the structure for standard Haar classifiers.
HaarClassifierInit Initializes the structure for standard Haar classifiers.
TiltedHaarClassifierInit Initializes the structure for tilted Haar classifiers.
ApplyMixedHaarClassifier
Applies a mixed Haar classifier to an image.

SyntaxIppStatus ippiApplyMixedHaarClassifier_32f_C1R(const Ipp32f* pSrc, int srcStep, const
Ipp32f* pTilt, int tiltStep, const Ipp32f* pNorm, int normStep, Ipp8u* pMask, int
maskStep, IppiSize roiSize, int* pPositive, Ipp32f threshold, IppiHaarClassifier_32f*
pState);1677

1Intel® Integrated Performance Primitives Developer Guide and Reference

IppStatus ippiApplyMixedHaarClassifier_32s32f_C1R(const Ipp32s* pSrc, int srcStep,
const Ipp32s* pTilt, int tiltStep, const Ipp32f* pNorm, int normStep, Ipp8u* pMask, int
maskStep, IppiSize roiSize, int* pPositive, Ipp32f threshold, IppiHaarClassifier_32f*
pState);IppStatus ippiApplyMixedHaarClassifier_32s_C1RSfs(const Ipp32s* pSrc, int srcStep,
const Ipp32s* pTilt, int tiltStep, const Ipp32s* pNorm, int normStep, Ipp8u* pMask, int
maskStep, IppiSize roiSize, int* pPositive, Ipp32s threshold, IppiHaarClassifier_32s*
pState, int scaleFactor);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pTilt
tiltStep
pNorm

Pointer to the ROI in the source image of integrals.
Distance, in bytes, between the starting points of consecutive lines
in the source image of integrals.
Pointer to the ROI in the source image of tilted integrals.
Distance, in bytes, between the starting points of consecutive lines
in the source image of tilted integrals.
Pointer to the ROI in the source image of norm factors.

pPositive

Distance, in bytes, between the starting points of consecutive lines
in the image of the norm factors.
Pointer to the source and destination image of classification
decisions.
Distance, in bytes, between the starting points of consecutive lines
in the image of classification decisions.
Pointer to the number of positive decisions.

roiSize

Size of the source and destination images ROI in pixels.

thresholdStage threshold value.

pStatePointer to the mixed Haar classifier structure.

scaleFactor

Scale factor (see Integer Integer Result Scaling).

normSteppMask
maskStep

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function applies the mixed Haar classifier pState to the ROI of the source images pSrc and pTilt. The
mixed Haar classifier is a classifier initialized by HaarClassifierInit and then modified by the TiltHaarFeatures
function. The source images must be in the integral representation, they can be obtained by calling one of
the integral functions beforehand. Common features are applied to the pSrc image, and tilted features areapplied to the pTilt image. The sum of pixels on feature rectangles is computed as:1678

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Here (yl, xl) and (Yl, Xl) are coordinates of top left and right bottom pixels of l-th rectangle of the feature ,and wl is the feature weight. For i = 0. roiSize.height - 1, j = 0. roiSize.width - 1 all pixels referred in
the above formula should be allocated in memory.
The input value of pPositive[0] is used as a hint to choose the calculation algorithm. If it is greater than orequal to roiSize.width*roiSize.height the value of the classifier is calculated in accordance with theabove formula for all pixels of the input image. Otherwise the value of the classifier is calculated for all nonzero pixels of pMask image. If the sum is less than threshold than the negative decision is made and thevalue of the corresponding pixel of the pMask image is set to zero. The number of positive decisions is
assigned to the pPositive[0].

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsSizeErr
ippStsStepErr
ippStsNorEvenStepErr

Indicates an error when roiSize has a field with a zero or
negative value.
Indicates an error when one of the image step values is lessthan roiSize.width*<pixelSize>.
Indicates an error when one of the image step values is notdivisible by 4 for 32-bit images.

See Also
Regions of Interest in Intel IPP
HaarClassifierInit Initializes the structure for standard Haar classifiers.
TiltHaarFeatures Modifies a Haar classifier by tilting specified features.
Local Binary Pattern (LBP) Operator
The local binary pattern (LBP) operator transforms an image into an array, or to an image with integer labels.
Integer labels describe small-scale view of the image. For grayscale images, these labels represent a texture
descriptor of the image. Integer labels statistics are used for image analysis. Changes of the monotonic graylevel do not affect the LBP operator.
Intel® IPP functions described in this section use LBP operators with mask size 3x3 and 5x5.
The LBPImageMode functions support four modes of LBP calculation set by the mode parameter. The
LBPImage functions compute LBP similar to the LBPImageMode functions with the mode value equal to 1.
The LBP operator with 3x3 mask uses neighborhood consisting of eight pixels, as shown in the figures below.

mode=0:1679

1Intel® Integrated Performance Primitives Developer Guide and Reference

mode=1:

mode=2:1680

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

mode=3:1681

1Intel® Integrated Performance Primitives Developer Guide and Reference

The LBP operator with 5x5 mask uses neighborhood consisting of 16 pixels, as shown in the figures below.

mode=0:1682

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

mode=1:1683

1Intel® Integrated Performance Primitives Developer Guide and Reference

mode=2:1684

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

mode=3:1685

1Intel® Integrated Performance Primitives Developer Guide and Reference

In the above figures:••

Numbers indicate the position of the corresponding bit in a resulting label
The A letter indicates the anchor point position.

The LBP operator does the following when processing an image:••Compares each pixel neighboring to the anchor with the anchor pixel in accordance with the neighboring
pixel order. If the neighboring pixel value is more than, or equal to the anchor point value, the result is 1.
If the neighboring pixel value is less than the anchor point value, the result is 0.
Puts the result of comparison to the corresponding bit of the resulting label, as shown in the figure below.

LBPImageMode

1686

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Calculates LBP of the image according to the specified
mode.

SyntaxIppStatus ippiLBPImageMode3x3_<mod>(const Ipp<srcDatatype>* pSrc, int srcStep,
Ipp<dstDatatype>* pDst, int dstStep, IppiSize dstRoiSize, int mode, IppiBorderTypeborderType, const Ipp<srcDatatype>* borderValue);
Supported values for mod:8u_C1R

32f8u_C1R

IppStatus ippiLBPImageMode5x5_<mod>(const Ipp<srcDatatype>* pSrc, int srcStep,
Ipp<dstDatatype>* pDst, int dstStep, IppiSize dstRoiSize, int mode, IppiBorderTypeborderType, const Ipp<srcDatatype>* borderValue);
8u_C1R

8u16u_C1R

32f8u_C1R

32f16u_C1R

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Pointer to the source image ROI.

srcStep

Distance, in bytes, between the starting points of consecutive lines inthe source image.

pDst

Pointer to the destination image ROI.

dstStep

Distance, in bytes, between the starting points of consecutive lines inthe destination image.

dstRoiSize

Size of the destination ROI, in pixels.

mode

Mode for LBP calculation. Supported values are 0, 1, 2, 3.

borderType

Type of border. Possible values are:ippBorderRepl
ippBorderInMem

Border is replicated from the edge
pixels.
Border is obtained from the source
image pixels in memory.

Mixed borders are also supported. They can be obtained by the bitwise
operation OR between ippBorderRepl and ippBorderInMemTop,
ippBorderInMemBottom, ippBorderInMemLeft,
ippBorderInMemRight.

borderValue

Constant value to assign to pixels of the constant border. Thisparameter is applicable only to the ippBorderConst border type.

1687

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Description
These functions operate with ROI (see Regions of Interest in Intel IPP).
The ippiLBPImageMode3x3 and ippiLBPImageMode5x5 functions calculate LBP of the pSrc image ROI
according to the mode value. The result is stored in the pDst destination image.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsSizeErr
ippStsBadArgErr

Indicates an error if dstRoiSize has a field with a zero or
negative value.
Indicates an error when border has an illegal value.

ExampleSee Also
Regions of Interest in Intel IPP
LBPImageHorizCorr
Calculates a correlation between two LBPs.

SyntaxIppStatus ippiLBPImageHorizCorr_<mod>(const Ipp<datatype>* pSrc1, int src1Step, const
Ipp<datatype>* pSrc2, int src2Step, Ipp<datatype>* pDst, int dstStep, IppiSize
dstRoiSize, int horShift, IppiBorderType borderType, const Ipp<datatype>* borderValue);
Supported values for mod:8u_C1R

16u_C1R

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc1, pSrc2

Pointers to the source image ROI.

src1Step, src2Step

Distance, in bytes, between the starting points of consecutive lines inthe source image.

pDst

Pointer to the destination image ROI.

dstStep

Distance, in bytes, between the starting points of consecutive lines inthe destination image.

dstRoiSize

Size of the destination ROI in pixels.

horShift

Horizontal shift of the pSrc2 image.

1688

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

borderType

Type of border. Possible values are:ippBorderRepl
ippBorderInMem

Border is replicated from the edge
pixels.
Border is obtained from the source
image pixels in memory.

Mixed borders are also supported. They can be obtained by the bitwise
operation OR between ippBorderRepl and ippBorderInMemTop,
ippBorderInMemBottom, ippBorderInMemLeft,
ippBorderInMemRight.

borderValue

Constant value to assign to pixels of the constant border. Thisparameter is applicable only to the ippBorderConst border type.

Description
This function operates with ROI.
This function calculates the difference between two LBP images. The result is stored in the pDst destination
image.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsSizeErr
ippStsBadArgErr

Indicates an error if dstRoiSize has a field with zero or
negative value.
Indicates an error when border has an illegal value.

ExampleSee Also
Regions of Interest in Intel IPP
Borders in Neighborhood Operations
User-defined Border Types
Camera Calibration and 3D Reconstruction
Correction of Camera Lens Distortion
Digital camera usually introduces significant distortion caused by the camera and lens. These distortions
cause errors in any analysis of the image. The functions described in this section correct these distortion
using intrinsic camera parameters and distortion coefficients. These intrinsic camera parameters are focal
lengths fx, fy, and principal point coordinates cx, cy. The distortion is characterized by two coefficients ofradial distortions k1, k2 and two coefficients of tangential distortions p1, p2.
The undistorted coordinates xu and yu of point with coordinates (xd, yd) are computed in accordance withthe following formulas:

1689

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Here r2 = xd2 + yd2, xd = (j-cx)/fx, yd = (i-cy)/fy; i and j are row and columns numbers of the pixel. The
pixel value is computed using bilinear interpolation of four nearest pixel of the source image. If undistorted
coordinates are outside the image, then the destination pixel is not changed.
UndistortGetSize
Computes the size of the external buffer.

SyntaxIppStatus ippiUndistortGetSize(IppiSize roiSize, int* pBufferSize);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
roiSize

Size of source and destination images ROI in pixels.

pBufferSize

Pointer to the computed value of the buffer size.

Description
This function computes the size of the temporary external buffer that is used by the functions
ippiUndistortRadial. The buffer of the computed size can be used to process smaller images as well.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if pBufferSize is NULL.

ippStsSizeErr

Indicates an error condition if roiSize has a field with zero or
negative value.

UndistortRadial
Corrects radial distortions of the single image.

SyntaxIppStatus ippiUndistortRadial_<mod>(const Ipp<datatype>* pSrc, int srcStep,
Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, Ipp32f fx, Ipp32f fy, Ipp32f cx,
Ipp32f cy, Ipp32f k1, Ipp32f k2, Ipp8u* pBuffer);
Supported values for mod:8u_C1R

16u_C1R

32f_C1R

8u_C3R

16u_C3R

32f_C3R

Include Files
ippcv.h1690

1Developer Guide and Reference for Intel® Integrated Performance Primitives

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pSrc
srcStep
pDst

Pointer to the ROI in the source distorted image.
Distance in bytes between starts of consecutive lines in the source
image.
Pointer to the ROI in the destination corrected image.

roiSize

Distance in bytes between starts of consecutive lines in thedestination image.
Size of source and destination images ROI in pixels.

fx

Focal lengths along the x axis.

fy

Focal lengths along the y axis.

cx

x-coordinate of the principal point.

cy

y-coordinate of the principal point.

k1

First coefficient of radial distortion.

k2

Second coefficient of radial distortion.

pBuffer

Pointer to the external buffer.

dstStep

Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function corrects radial distortions of the single source image pSrc and stores corrected image in the
pDst. Correction is performed accounting camera parameters fx, fy, cx, cy and radial distortion parameters
k1, k2. The function can also pass the pointer to the external buffer pBuffer whose size should be computed
previously using the function ippiUndistortGetSize. If a null pointer is passed, slower computations
without an external buffer will be performed.

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if pSrc or pDst is NULL.

ippStsSizeErr
ippStsStepErr

ippStsNotEvenStepErr

ippStsBadArgErr

Indicates an error condition if roiSize has a field with zero or
negative value.
Indicates an error condition if srcStep is less thanroiSize.width * <pixelSize> , or dstStep is less thanroiSize.width * <pixelSize>.
Indicates an error condition if one of the step values is notdivisible by 4 for floating-point images, or by 2 for shortinteger images.
Indicates an error if fx or fy is equal to 0.

CreateMapCameraUndistort

1691

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Creates look-up tables of coordinates of corrected
image.

SyntaxIppStatus ippiCreateMapCameraUndistort_32f_C1R(Ipp32f* pxMap, int xStep, Ipp32f* pyMap,
int yStep, IppiSize roiSize, Ipp32f fx, Ipp32f fy, Ipp32f cx, Ipp32f cy, Ipp32f k1,
Ipp32f k2, Ipp32f p1, Ipp32f p2, Ipp8u* pBuffer);

Include Files
ippcv.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters
pxMap
xStep
pyMap

Pointer to the destination x coordinate look-up buffer.
Distance in bytes between starts of consecutive lines in the pxMap
image.
Pointer to the destination y coordinate look-up buffer.

yStep

Distance in bytes between starts of consecutive lines in the pyMap
image.

roiSize

Size of source and destination images ROI in pixels.

fx

Focal lengths along the x axis.

fy

Focal lengths along the y axis.

cx

x-coordinate of the principal point.

cy

y-coordinate of the principal point.

k1

First coefficient of radial distortion.

k2

Second coefficient of radial distortion.

p1

First coefficient of tangential distortion.

p2

Second coefficient of tangential distortion.

pBuffer

Pointer to the external buffer.

Description
This function operates with ROI (see Regions of Interest in Intel IPP ).
This function creates the look-up tables of x- and y-coordinates pxMap and pyMap respectively. These
coordinates are computed in accordance with camera parameters fx, fy, cx, cy, and distortion parameters
k1, k2, p1, p2. The created tables can be used by the Intel IPP function ippiRemap to remap the distorted
source image and get the corrected image.
To accelerate the computations the function can pass the pointer to the external buffer pBuffer whose size
should be computed previously using the function ippiUndistortGetSize. If a null pointer is passed,
slower computations without an external buffer will be performed.

1692

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Return Values
ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if pxMap or pyMap is NULL.

ippStsSizeErr
ippStsStepErr

ippStsNotEvenStepErr
ippStsBadArgErr

Indicates an error condition if roiSize has a field with zero or
negative value.
Indicates an error condition if : xStep is less thanroiSize.width * <pixelSize> , or yStep is less thanroiSize.width * <pixelSize>.
Indicates an error condition if one of the step values is notdivisible by 4 for floating-point images.
Indicates an error when fx or fy is equal to 0.

Example3D Data Processing Functions
This section describes the Intel® Integrated Performance Primitives (Intel® IPP) functions that perform 3D
data transforms - resizing, affine transform, and remapping, as well as functions for 3D data linear filtering.

CopyConstBorder
Copies pixel values between two 3D images and adds
border pixels with a constant value.

SyntaxIppStatus ipprCopyConstBorder_8u_C1V(const Ipp8u* pSrc, int srcPlaneStep, int srcStep,
IpprVolume srcRoiVolume, Ipp8u* pDst, int dstPlaneStep, int dstStep, IpprVolume
dstRoiVolume, int topBorderHeight, int leftBorderWidth, int forwardBorderDepth, const
Ipp8u* value);
IppStatus ipprCopyConstBorder_16u_C1V(const Ipp16u* pSrc, int srcPlaneStep, int
srcStep, IpprVolume srcRoiVolume, Ipp16u* pDst, int dstPlaneStep, int dstStep,
IpprVolume dstRoiVolume, int topBorderHeight, int leftBorderWidth, int
forwardBorderDepth, const Ipp16u* value);
IppStatus ipprCopyConstBorder_16s_C1V(const Ipp16s* pSrc, int srcPlaneStep, int
srcStep, IpprVolume srcRoiVolume, Ipp16s* pDst, int dstPlaneStep, int dstStep,
IpprVolume dstRoiVolume, int topBorderHeight, int leftBorderWidth, int
forwardBorderDepth, const Ipp16s* value);
IppStatus ipprCopyConstBorder_32f_C1V(const Ipp32f* pSrc, int srcPlaneStep, int
srcStep, IpprVolume srcRoiVolume, Ipp32f* pDst, int dstPlaneStep, int dstStep,
IpprVolume dstRoiVolume, int topBorderHeight, int leftBorderWidth, int
forwardBorderDepth, const Ipp32f* value);
IppStatus ipprCopyConstBorder_64f_C1V(const Ipp64f* pSrc, int srcPlaneStep, int
srcStep, IpprVolume srcRoiVolume, Ipp64f* pDst, int dstPlaneStep, int dstStep,
IpprVolume dstRoiVolume, int topBorderHeight, int leftBorderWidth, int
forwardBorderDepth, const Ipp64f* value);

1693

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Platform-aware functions
IppStatus ipprCopyConstBorder_8u_C1V_L(const Ipp8u* pSrc, IppSizeL srcPlaneStep,
IppSizeL srcStep, IpprVolumeL srcRoiVolume, Ipp8u* pDst, IppSizeL dstPlaneStep,
IppSizeL dstStep, IpprVolumeL dstRoiVolume, IppSizeL topBorderHeight, IppSizeL
leftBorderWidth, IppSizeL forwardBorderDepth, const Ipp8u* value);
IppStatus ipprCopyConstBorder_16u_C1V_L(const Ipp16u* pSrc, IppSizeL srcPlaneStep,
IppSizeL srcStep, IpprVolumeL srcRoiVolume, Ipp16u* pDst, IppSizeL dstPlaneStep,
IppSizeL dstStep, IpprVolumeL dstRoiVolume, IppSizeL topBorderHeight, IppSizeL
leftBorderWidth, IppSizeL forwardBorderDepth, const Ipp16u* value);
IppStatus ipprCopyConstBorder_16s_C1V_L(const Ipp16s* pSrc, IppSizeL srcPlaneStep,
IppSizeL srcStep, IpprVolumeL srcRoiVolume, Ipp16s* pDst, IppSizeL dstPlaneStep,
IppSizeL dstStep, IpprVolumeL dstRoiVolume, IppSizeL topBorderHeight, IppSizeL
leftBorderWidth, IppSizeL forwardBorderDepth, const Ipp16s* value);
IppStatus ipprCopyConstBorder_32f_C1V_L(const Ipp32f* pSrc, IppSizeL srcPlaneStep,
IppSizeL srcStep, IpprVolumeL srcRoiVolume, Ipp32f* pDst, IppSizeL dstPlaneStep,
IppSizeL dstStep, IpprVolumeL dstRoiVolume, IppSizeL topBorderHeight, IppSizeL
leftBorderWidth, IppSizeL forwardBorderDepth, const Ipp32f* value);
IppStatus ipprCopyConstBorder_64f_C1V_L(const Ipp64f* pSrc, IppSizeL srcPlaneStep,
IppSizeL srcStep, IpprVolumeL srcRoiVolume, Ipp64f* pDst, IppSizeL dstPlaneStep,
IppSizeL dstStep, IpprVolumeL dstRoiVolume, IppSizeL topBorderHeight, IppSizeL
leftBorderWidth, IppSizeL forwardBorderDepth, const Ipp64f* value);

Include Files
ippi.hippi_l.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Array of pointers to the planes in the source volume.

srcRoiVolume

Distance, in bytes, between the starting points of consecutive
lines in each plane of the source volume.
Distance, in bytes, between the starting points of consecutive
images in every plane of the source volume.
Volume of the source ROI in pixels.

pDst

Array of pointers to the planes in the destination volume.

srcStep
srcPlaneStep

dstRoiVolume

Distance, in bytes, between the starting points of consecutive
lines in each plane of the destination volume.
Distance, in bytes, between the starting points of consecutive
images in every plane of the source volume.
Volume of the destination ROI in pixels.

topBorderHeight

Height of the top border in pixels.

leftBorderWidth

Width of the left border in pixels.

dstStep
dstPlaneStep

1694

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

forwardBorderDepth

Depth of the forward border in pixels.

value

Constant value to assign to the border pixels.

Description
This function operates with VOI. This function copies the source image pSrc with the volume srcRoiVolume
to the destination image pDst with the volume dstRoiVolume and creates a border outside the copied area.
The function sets pixel values of the border to the specified constant value that is passed by the value
argument.
The image below shows the mapping of the parameters topBorderHeight, leftBorderWidth, andforwardBorderDeprh onto the dimensions of the three-dimensional space.

Return Values
ippStsNullPtrErr

Indicates an error condition if pSrc, pDst, or value pointer is
NULL.

ippStsStepErr

Indicates an error condition if srcPlaneStep, srcStep,
dstPlaneStep, or dstStep has a field with negative value.

ippStsSizeErr

Indicates an error condition if leftBorderWidth,
topBorderHeight, or forwardBorderDepth has a field withnegative value.

See Also
CopyReplicateBorder Copies pixel values between two 3D images and adds replicated border
pixels.
Structures and Enumerators for Platform-Aware Functions
CopyReplicateBorder
Copies pixel values between two 3D images and adds
replicated border pixels.

SyntaxIppStatus ipprCopyReplicateBorder_8u_C1V(const Ipp8u* pSrc, int srcPlaneStep, int
srcStep, IpprVolume srcRoiVolume, Ipp8u* pDst, int dstPlaneStep, int dstStep,
IpprVolume dstRoiVolume, int topBorderHeight, int leftBorderWidth, int
forwardBorderDepth);

1695

1

Intel® Integrated Performance Primitives Developer Guide and Reference

IppStatus ipprCopyReplicateBorder_16u_C1V(const Ipp16u* pSrc, int srcPlaneStep, int
srcStep, IpprVolume srcRoiVolume, Ipp16u* pDst, int dstPlaneStep, int dstStep,
IpprVolume dstRoiVolume, int topBorderHeight, int leftBorderWidth, int
forwardBorderDepth);
IppStatus ipprCopyReplicateBorder_16s_C1V(const Ipp16s* pSrc, int srcPlaneStep, int
srcStep, IpprVolume srcRoiVolume, Ipp16s* pDst, int dstPlaneStep, int dstStep,
IpprVolume dstRoiVolume, int topBorderHeight, int leftBorderWidth, int
forwardBorderDepth);
IppStatus ipprCopyReplicateBorder_32f_C1V(const Ipp32f* pSrc, int srcPlaneStep, int
srcStep, IpprVolume srcRoiVolume, Ipp32f* pDst, int dstPlaneStep, int dstStep,
IpprVolume dstRoiVolume, int topBorderHeight, int leftBorderWidth, int
forwardBorderDepth);
IppStatus ipprCopyReplicateBorder_64f_C1V(const Ipp64f* pSrc, int srcPlaneStep, int
srcStep, IpprVolume srcRoiVolume, Ipp64f* pDst, int dstPlaneStep, int dstStep,
IpprVolume dstRoiVolume, int topBorderHeight, int leftBorderWidth, int
forwardBorderDepth);

Platform-aware functions
IppStatus ipprCopyReplicateBorder_8u_C1V_L(const Ipp8u* pSrc, IppSizeL srcPlaneStep,
IppSizeL srcStep, IpprVolumeL srcRoiVolume, Ipp8u* pDst, IppSizeL dstPlaneStep,
IppSizeL dstStep, IpprVolumeL dstRoiVolume, IppSizeL topBorderHeight, IppSizeL
leftBorderWidth, IppSizeL forwardBorderDepth);
IppStatus ipprCopyReplicateBorder_16u_C1V_L(const Ipp16u* pSrc, IppSizeL srcPlaneStep,
IppSizeL srcStep, IpprVolumeL srcRoiVolume, Ipp16u* pDst, IppSizeL dstPlaneStep,
IppSizeL dstStep, IpprVolumeL dstRoiVolume, IppSizeL topBorderHeight, IppSizeL
leftBorderWidth, IppSizeL forwardBorderDepth);
IppStatus ipprCopyReplicateBorder_16s_C1V_L(const Ipp16s* pSrc, IppSizeL srcPlaneStep,
IppSizeL srcStep, IpprVolumeL srcRoiVolume, Ipp16s* pDst, IppSizeL dstPlaneStep,
IppSizeL dstStep, IpprVolumeL dstRoiVolume, IppSizeL topBorderHeight, IppSizeL
leftBorderWidth, IppSizeL forwardBorderDepth);
IppStatus ipprCopyReplicateBorder_32f_C1V_L(const Ipp32f* pSrc, IppSizeL srcPlaneStep,
IppSizeL srcStep, IpprVolumeL srcRoiVolume, Ipp32f* pDst, IppSizeL dstPlaneStep,
IppSizeL dstStep, IpprVolumeL DstRoiVolume, IppSizeL topBorderHeight, IppSizeL
leftBorderWidth, IppSizeL forwardBorderDepth);
IppStatus ipprCopyReplicateBorder_64f_C1V_L(const Ipp64f* pSrc, IppSizeL srcPlaneStep,
IppSizeL srcStep, IpprVolumeL srcRoiVolume, Ipp64f* pDst, IppSizeL dstPlaneStep,
IppSizeL dstStep, IpprVolumeL dstRoiVolume, IppSizeL topBorderHeight, IppSizeL
leftBorderWidth, IppSizeL forwardBorderDepth);

Include Files
ippi.hippi_l.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

1696

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Parameters
pSrc

Array of pointers to the planes in the source volume.

srcRoiVolume

Distance, in bytes, between the starting points of consecutive
lines in each plane of the source volume.
Distance, in bytes, between the starting points of consecutive
images in every plane of the source volume.
Volume of the source ROI in pixels.

pDst

Array of pointers to the planes in the destination volume.

srcStep
srcPlaneStep

dstRoiVolume

Distance, in bytes, between the starting points of consecutive
lines in each plane of the destination volume.
Distance, in bytes, between the starting points of consecutive
images in every plane of the source volume.
Volume of the destination ROI in pixels.

topBorderHeight

Height of the top border in pixels.

leftBorderWidth

Width of the left border in pixels.

forwardBorderDepth

Depth of the forward border in pixels.

dstStep
dstPlaneStep

Description
This function operates with VOI. This function copies the source image pSrc with the volume srcRoiVolume
to the destination image pDst with the volume dstRoiVolume. The function fills pixels ('border') outside thecopied area in the destination image with the values of the source image pixels.
The image below shows the mapping of the parameters topBorderHeight, leftBorderWidth, andforwardBorderWidth onto the dimensions of the three-dimensional space.

Return Values
ippStsNullPtrErr
ippStsStepErr

Indicates an error condition if pSrc or pDst pointer is NULL.
Indicates an error condition if srcPlaneStep value is less thansrcStep value or if dstPlaneStep value is less than dstStep
value.

1697

1Intel® Integrated Performance Primitives Developer Guide and ReferenceippStsSizeErr

Indicates an error condition if leftBorderWidth,
topBorderHeight or forwardBorderDepth has a field withnegative value.

See Also
CopyConstBorder Copies pixel values between two 3D images and adds border pixels with aconstant value.
Structures and Enumerators for Platform-Aware Functions
FilterFilters a volume using a general cuboidal kernel.

SyntaxIppStatus ipprFilter_16s_C1PV(const Ipp16s* const pSrc[], int srcStep, const Ipp16s*
pDst[], int dstStep, IpprVolume dstVolume, const Ipp32s* pKernel, IpprVolume
kernelVolume, IpprPoint anchor, int divisor, Ipp8u* pBuffer);
IppStatus ipprFilter_16s_C1V(const Ipp16s* pSrc, int srcStep, int srcPlaneStep, Ipp16s*
pDst, int dstStep, int dstPlaneStep, IpprVolume dstVolume, const Ipp32s* pKernel,
IpprVolume kernelVolume, IpprPoint anchor, int divisor, Ipp8u* pBuffer);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc
srcStep
srcPlaneStep

pDst

Array of pointers to the planes in the source volume.
Distance, in bytes, between the starting points of consecutive
lines in each plane of the source volume.
Distance, in bytes, between the starting points of consecutive
lines in every plane of the source volume (for the 16s_C1V
flavor).
Array of pointers to the planes in the destination volume.

dstVolume

Distance, in bytes, between the starting points of consecutive
lines in each plane of the destination volume.
Distance, in bytes, between the starting points of consecutive
lines in every plane of the destination volume (for the 16s_C1V
flavor).
Size of the processed volume.

pKernelPointers to the kernel values.

kernelVolume

Size of the kernel volume.

dstStep
dstPlaneStepanchordivisor

1698

Anchor 3d-cell specifying the cuboidal kernel alignment withrespect to the position of the input voxel.
The integer value by which the computed result is divided.

Developer Guide and Reference for Intel® Integrated Performance Primitives

pBuffer

1

Pointer to the external buffer.

Description
This function operates with VOI. This function uses the general cuboidal kernel of size kernelVolume to filter
a volume VOI. This function sums the products between the kernel coefficients pKernel and voxel values
taken over the source voxel neighborhood defined by kernelVolume and anchor. The anchor 3d-cell is
specified by its coordinates anchor.x, anchor.y and anchor.z in the coordinate system associated with theright bottom back corner of the kernel. Note the kernel coefficients are used in inverse order. The sum iswritten to the destination voxel. To ensure valid operation when volume boundary voxels are processed, theapplication must correctly define additional border voxels.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if pSrc, pDst, pKernel or pBuffer
pointer is NULL.

ippStsSizeErr

Indicates an error condition if dstVolume or kernelVolume has afield with zero or negative value.

ippStsDivisorErr

Indicates an error condition if the divisor value is zero.

FilterGetBufSize
Calculates the size of the working buffer.

SyntaxIppStatus ipprFilterGetBufSize(IpprVolume dstVolume, IpprVolume kernelVolume, int
nChannel, int* pSize);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
dstVolume

Size of the processed volume.

kernelVolume

Size of the kernel volume.

nChannelNumber of channels or planes, possible value is one.

pSize

Pointer to the size of the external buffer.

Description
This function operates with VOI. This function computes the size of the working buffer pSize that is required
for the function ipprFilter.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

1699

1

Intel® Integrated Performance Primitives Developer Guide and ReferenceippStsNullPtrErr

Indicates an error condition if pSize pointer is NULL.

ippStsNumChannelErr

Indicates an error condition if nChannel has an illegal value.

ippStsSizeErr

Indicates an error condition if dstVolume or kernelVolume has afield with zero or negative value.

FilterBorder
Filters a 3D image using a rectangular filter.

SyntaxIppStatus ipprFilterBorder_8u_C1V(const Ipp8u* pSrc, int srcPlaneStep, int srcStep,
Ipp8u* pDst, int dstPlaneStep, int dstStep, IpprVolume dstRoiVolume, IpprBorderTypeborderType, const Ipp8u borderValue[1], const IpprFilterBorderSpec* pSpec, Ipp8u*
pBuffer);
IppStatus ipprFilterBorder_16s_C1V(const Ipp16s* pSrc, int srcPlaneStep, int srcStep,
Ipp16s* pDst, int dstPlaneStep, int dstStep, IpprVolume dstRoiVolume, IpprBorderTypeborderType, const Ipp16s borderValue[1], const IpprFilterBorderSpec* pSpec, Ipp8u*
pBuffer);
IppStatus ipprFilterBorder_16u_C1V(const Ipp16u* pSrc, int srcPlaneStep, int srcStep,
Ipp16u* pDst, int dstPlaneStep, int dstStep, IpprVolume dstRoiVolume, IpprBorderTypeborderType, const Ipp16u borderValue[1], const IpprFilterBorderSpec* pSpec, Ipp8u*
pBuffer);
IppStatus ipprFilterBorder_32f_C1V(const Ipp32f* pSrc, int srcPlaneStep, int srcStep,
Ipp32f* pDst, int dstPlaneStep, int dstStep, IpprVolume dstRoiVolume, IpprBorderTypeborderType, const Ipp32f borderValue[1], const IpprFilterBorderSpec* pSpec, Ipp8u*
pBuffer);
IppStatus ipprFilterBorder_64f_C1V(const Ipp64f* pSrc, int srcPlaneStep, int srcStep,
Ipp64f* pDst, int dstPlaneStep, int dstStep, IpprVolume dstRoiVolume, IpprBorderTypeborderType, const Ipp64f borderValue[1], const IpprFilterBorderSpec* pSpec, Ipp8u*
pBuffer);

Platform-aware functions
IppStatus ipprFilterBorder_8u_C1V_L(const Ipp8u* pSrc, IppSizeL srcPlaneStep, IppSizeL
srcStep, Ipp8u* pDst, IppSizeL dstPlaneStep, IppSizeL dstStep, IpprVolumeL
dstRoiVolume, IpprBorderType borderType, const Ipp8u borderValue[1], const
IpprFilterBorderSpec* pSpec, Ipp8u* pBuffer);
IppStatus ipprFilterBorder_16s_C1V_L(const Ipp16s* pSrc, IppSizeL srcPlaneStep,
IppSizeL srcStep, Ipp16s* pDst, IppSizeL dstPlaneStep, IppSizeL dstStep, IpprVolumeL
dstRoiVolume, IpprBorderType borderType, const Ipp16s borderValue[1], const
IpprFilterBorderSpec* pSpec, Ipp8u* pBuffer);
IppStatus ipprFilterBorder_16u_C1V_L(const Ipp16u* pSrc, IppSizeL srcPlaneStep,
IppSizeL srcStep, Ipp16u* pDst, IppSizeL dstPlaneStep, IppSizeL dstStep, IpprVolumeL
dstRoiVolume, IpprBorderType borderType, const Ipp16u borderValue[1], const
IpprFilterBorderSpec* pSpec, Ipp8u* pBuffer);
IppStatus ipprFilterBorder_32f_C1V_L(const Ipp32f* pSrc, IppSizeL srcPlaneStep,
IppSizeL srcStep, Ipp32f* pDst, IppSizeL dstPlaneStep, IppSizeL dstStep, IpprVolumeL
dstRoiVolume, IpprBorderType borderType, const Ipp32f borderValue[1], const
IpprFilterBorderSpec* pSpec, Ipp8u* pBuffer);

1700

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

IppStatus ipprFilterBorder_64f_C1V_L(const Ipp64f* pSrc, IppSizeL srcPlaneStep,
IppSizeL srcStep, Ipp64f* pDst, IppSizeL dstPlaneStep, IppSizeL dstStep, IpprVolumeL
dstRoiVolume, IpprBorderType borderType, const Ipp64f borderValue[1], const
IpprFilterBorderSpec* pSpec, Ipp8u* pBuffer);

Threading Layer (TL) functions based on the Platform Aware API
IppStatus ipprFilterBorder_8u_C1V_LT(const Ipp8u* pSrc, IppSizeL srcPlaneStep, IppSizeL
srcStep, Ipp8u* pDst, IppSizeL dstPlaneStep, IppSizeL dstStep, IpprVolumeL
dstRoiVolume, IpprBorderType borderType, const Ipp8u borderValue[1], const
IpprFilterBorderSpec_LT* pSpec, Ipp8u* pBuffer);
IppStatus ipprFilterBorder_16s_C1V_LT(const Ipp16s* pSrc, IppSizeL srcPlaneStep,
IppSizeL srcStep, Ipp16s* pDst, IppSizeL dstPlaneStep, IppSizeL dstStep, IpprVolumeL
dstRoiVolume, IpprBorderType borderType, const Ipp16s borderValue[1], const
IpprFilterBorderSpec_LT* pSpec, Ipp8u* pBuffer);
IppStatus ipprFilterBorder_16u_C1V_LT(const Ipp16u* pSrc, IppSizeL srcPlaneStep,
IppSizeL srcStep, Ipp16u* pDst, IppSizeL dstPlaneStep, IppSizeL dstStep, IpprVolumeL
dstRoiVolume, IpprBorderType borderType, const Ipp16u borderValue[1], const
IpprFilterBorderSpec_LT* pSpec, Ipp8u* pBuffer);
IppStatus ipprFilterBorder_32f_C1V_LT(const Ipp32f* pSrc, IppSizeL srcPlaneStep,
IppSizeL srcStep, Ipp32f* pDst, IppSizeL dstPlaneStep, IppSizeL dstStep, IpprVolumeL
dstRoiVolume, IpprBorderType borderType, const Ipp32f borderValue[1], const
IpprFilterBorderSpec_LT* pSpec, Ipp8u* pBuffer);
IppStatus ipprFilterBorder_64f_C1V_LT(const Ipp64f* pSrc, IppSizeL srcPlaneStep,
IppSizeL srcStep, Ipp64f* pDst, IppSizeL dstPlaneStep, IppSizeL dstStep, IpprVolumeL
dstRoiVolume, IpprBorderType borderType, const Ipp64f borderValue[1], const
IpprFilterBorderSpec_LT* pSpec, Ipp8u* pBuffer);

Threading Layer (TL) functions based on the Classic API
IppStatus ipprFilterBorder_8u_C1V_T(const Ipp8u* pSrc, int srcPlaneStep, int srcStep,
Ipp8u* pDst, int dstPlaneStep, int dstStep, IpprVolume dstRoiVolume, IpprBorderTypeborderType, const Ipp8u borderValue[1], const IpprFilterBorderSpec_T* pSpec, Ipp8u*
pBuffer);
IppStatus ipprFilterBorder_16s_C1V_T(const Ipp16s* pSrc, int srcPlaneStep, int srcStep,
Ipp16s* pDst, int dstPlaneStep, int dstStep, IpprVolume dstRoiVolume, IpprBorderTypeborderType, const Ipp16s borderValue[1], const IpprFilterBorderSpec_T* pSpec, Ipp8u*
pBuffer);
IppStatus ipprFilterBorder_16u_C1V_T(const Ipp16u* pSrc, int srcPlaneStep, int srcStep,
Ipp16u* pDst, int dstPlaneStep, int dstStep, IpprVolume dstRoiVolume, IpprBorderTypeborderType, const Ipp16u borderValue[1], const IpprFilterBorderSpec_T* pSpec, Ipp8u*
pBuffer);
IppStatus ipprFilterBorder_32f_C1V_T(const Ipp32f* pSrc, int srcPlaneStep, int srcStep,
Ipp32f* pDst, int dstPlaneStep, int dstStep, IpprVolume dstRoiVolume, IpprBorderTypeborderType, const Ipp32f borderValue[1], const IpprFilterBorderSpec_T* pSpec, Ipp8u*
pBuffer);
IppStatus ipprFilterBorder_64f_C1V_T(const Ipp64f* pSrc, int srcPlaneStep, int srcStep,
Ipp64f* pDst, int dstPlaneStep, int dstStep, IpprVolume dstRoiVolume, IpprBorderTypeborderType, const Ipp64f borderValue[1], const IpprFilterBorderSpec_T* pSpec, Ipp8u*
pBuffer);

1701

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Include Files
ippi.hippi_l.hippi_tl.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Array of pointers to the planes in the source volume.

srcStep

Distance, in bytes, between the starting points of consecutive lines ineach plane of the source volume.

srcPlaneStep

Distance, in bytes, between the starting points of consecutive images
in every plane of the source volume.

pDst

Array of pointers to the planes in the destination volume.

dstStep

Distance, in bytes, between the starting points of consecutive lines ineach plane of the destination volume.

dstPlaneStep

Distance, in bytes, between the starting points of consecutive images
in every plane of the source volume.

dstRoiVolume

Volume of the destination ROI in pixels.

borderType

Type of the border. Possible values are:ipprBorderInMem

Border is obtained from the source image
pixels in memory.

ipprBorderRepl

Border is replicated from the edge pixels.

ipprBorderConst

Border is replicated from the edge pixels.

borderValue

Constant value to assign to pixels of the constant border.

pSpec

Pointer to the filter specification structure.

pBuffer

Pointer to the work buffer for filtering operations.

Description
Before using this function, you need to initialize the filter specification structure for 3D image processing
using the ipprFilterBorderInit function.
This function operates with VOI. This function performs linear filtering on a source image with the volume.
Type of the image border is defined by the value of the border parameter.

Return Values
ippStsNoErr
ippStsStepErr

1702

Indicates no error condition. Any other value indicates an error
condition.
Indicates an error condition if srcPlaneStep, srcStep,
dstPlaneStep, or dstStep has a field with negative value.

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

ippStsNullPtrErr

Indicates an error condition if the pSrc, pDst, pSpec, or pBuffer
pointer is NULL.

ippStsSizeErr

Indicates an error condition if dstRoiVolume has a field withzero or negative value.

ExampleSee Also
FilterBorderInit Initializes the filter specification structure for 3D image processing.
FilterBorderGetSize Computes the size of the filter specification structure and the size of the work
buffer for 3D image processing.
Structures and Enumerators
Structures and Enumerators for Platform-Aware Functions
FilterBorderInit
Initializes the filter specification structure for 3D
image processing.

SyntaxIppStatus ipprFilterBorderInit_16s(const Ipp16s* pKernel, IpprVolume kernelVolume, int
divisor, IppDataType dataType, int numChannels, IpprFilterBorderSpec* pSpec);
IppStatus ipprFilterBorderInit_32f(const Ipp32f* pKernel, IpprVolume kernelVolume,
IppDataType dataType, int numChannels, IpprFilterBorderSpec* pSpec);
IppStatus ipprFilterBorderInit_64f(const Ipp64f* pKernel, IpprVolume kernelVolume,
IppDataType dataType, int numChannels, IpprFilterBorderSpec* pSpec);

Platform-aware functions
IppStatus ipprFilterBorderInit_16s_L(const Ipp16s* pKernel, IpprVolumeL kernelVolume,
int divisor, IppDataType dataType, int numChannels, IpprFilterBorderSpec* pSpec);
IppStatus ipprFilterBorderInit_32f_L(const Ipp32f* pKernel, IpprVolumeL kernelVolume,
IppDataType dataType, int numChannels, IpprFilterBorderSpec* pSpec);
IppStatus ipprFilterBorderInit_64f_L(const Ipp64f* pKernel, IpprVolumeL kernelVolume,
IppDataType dataType, int numChannels, IpprFilterBorderSpec* pSpec);

Threading Layer (TL) functions based on the Platform Aware API
IppStatus ipprFilterBorderInit_16s_LT(const Ipp16s* pKernel, IpprVolumeL kernelVolume,
int divisor, IppDataType dataType, int numChannels, IpprFilterBorderSpec_LT* pSpec);
IppStatus ipprFilterBorderInit_32f_LT(const Ipp32f* pKernel, IpprVolumeL kernelVolume,
IppDataType dataType, int numChannels, IpprFilterBorderSpec_LT* pSpec);
IppStatus ipprFilterBorderInit_64f_LT(const Ipp64f* pKernel, IpprVolumeL kernelVolume,
IppDataType dataType, int numChannels, IpprFilterBorderSpec_LT* pSpec);

Threading Layer (TL) functions based on the Classic API
IppStatus ipprFilterBorderInit_16s_T(const Ipp16s* pKernel, IpprVolume kernelVolume,
int divisor, IppDataType dataType, int numChannels, IpprFilterBorderSpec_T* pSpec);
IppStatus ipprFilterBorderInit_32f_T(const Ipp32f* pKernel, IpprVolume kernelVolume,
IppDataType dataType, int numChannels, IpprFilterBorderSpec_T* pSpec);
IppStatus ipprFilterBorderInit_64f_T(const Ipp64f* pKernel, IpprVolume kernelVolume,
IppDataType dataType, int numChannels, IpprFilterBorderSpec_T* pSpec);
1703

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Include Files
ippi.hippi_l.hippi_tl.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
kernelVolume

Size of the kernel volume.

pKernelPointers to the kernel values.

dataType

Data type of the source image. Possible values are ipp8u,

ipp16u, ipp16s, ipp32f, and ipp64f.

divisor

The integer value by which the computed result is divided.

numChannels

Number of channels in the image. Possible value is 1.

pSpec

Pointer to the filter specification structure.

Description
This function operates with VOI. This function initializes the filter specification structure pSpec. Before using
this function, you need to compute the size of the specification structure for 3D image processing using theipprFilterBorderGetSize function.

Return Values
ippStsNoErr
ippStsNullPtrErr

Indicates no error condition. Any other value indicates an error
condition.
Indicates an error condition if the pSpec or pKernel pointer is
NULL.

ippStsChannelErr

Indicates an error condition if kernelVolume has a field withzero or negative value.
Indicates an error condition if numChannels has an illegal value.

ippStsDataTypeErr

Indicates an error condition if dataType has an illegal value.

ippStsDivisorErr

Indicates an error condition if the divisor value is zero.

ippStsSizeErr

See Also
FilterBorder Filters a 3D image using a rectangular filter.
FilterBorderGetSize Computes the size of the filter specification structure and the size of the work
buffer for 3D image processing.
Structures and Enumerators for Platform-Aware Functions
FilterBorderGetSize
Computes the size of the filter specification structure
and the size of the work buffer for 3D image
processing.

1704

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

SyntaxIppStatus ipprFilterBorderGetSize(IpprVolume kernelVolume, IpprVolume dstRoiVolume,
IppDataType dataType, IppDataType kernelType, int numChannels, int* pSpecSize, int*
pBufferSize);

Platform-aware function
IppStatus ipprFilterBorderGetSize_L(IpprVolumeL kernelVolume, IpprVolumeL dstRoiVolume,
IppDataType dataType, IppDataType kernelType, int numChannels, IppSizeL* pSpecSize,
IppSizeL* pBufferSize);

Threading Layer (TL) function based on the Platform Aware API
IppStatus ipprFilterBorderGetSize_LT(IpprVolumeL kernelVolume, IpprVolumeL
dstRoiVolume, IppDataType dataType, IppDataType kernelType, int numChannels, IppSizeL*
pSpecSize, IppSizeL* pBufferSize);

Threading Layer (TL) function based on the Classic API
IppStatus ipprFilterBorderGetSize_T(IpprVolume kernelVolume, IpprVolume dstRoiVolume,
IppDataType dataType, IppDataType kernelType, int numChannels, int* pSpecSize, int*
pBufferSize);

Include Files
ippi.hippi_l.hippi_tl.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
kernelVolume

Size of the kernel volume.

dstRoiVolume

Maximal size of the destination image ROI (in pixels).

dataType

Data type of the source image. Possible values are ipp8u,
ipp16u, ipp16s, ipp32f, and ipp64f.

kernelType

Data type of the filter kernel. Possible values are ipp16s,

ipp32f, and ipp64f.

numChannels

Number of channels in the image. Possible value is 1.

pSpecSize

Pointer to the size of the filter specification structure.

pBufferSize

Pointer to the size of the work buffer required for filtering.

Description
This function operates with VOI. This function computes the size of the filter specification structure pSpec
and the size of the buffer required for 3D image filtering operations. Call this function before using theipprFilterBorderInit function.

1705

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsChannelErr
ippStsDataTypeErr

Indicates no error condition. Any other value indicates an error
condition.
Indicates an error condition if the pSpecSize or pBufferSize
pointer is NULL.
Indicates an error condition if dstRoiVolume or kernelVolume
has a field with zero or negative value.
Indicates an error condition if numChannels has an illegal value.
Indicates an error condition if the combination of kernelTypeand dataType has an illegal value.

See Also
FilterBorder Filters a 3D image using a rectangular filter.
FilterBorderInit Initializes the filter specification structure for 3D image processing.
Structures and Enumerators for Platform-Aware Functions
FilterMedian
Filters a 3D image using a median filter.

SyntaxIppStatus ipprFilterMedian_8u_C1V(const Ipp8u* pSrc, int srcPlaneStep, int srcStep,
Ipp8u* pDst, int dstPlaneStep, int dstStep, IpprVolume dstRoiVolume, IpprBorderTypeborderType, const Ipp8u* pBorderValue, const IpprFilterMedianSpec* pSpec, Ipp8u*
pBuffer);
IppStatus ipprFilterMedian_16u_C1V(const Ipp16u* pSrc, int srcPlaneStep, int srcStep,
Ipp16u* pDst, int dstPlaneStep, int dstStep, IpprVolume dstRoiVolume, IpprBorderTypeborderType, const Ipp16u* pBorderValue, const IpprFilterMedianSpec* pSpec, Ipp8u*
pBuffer);
IppStatus ipprFilterMedian_16s_C1V(const Ipp16s* pSrc, int srcPlaneStep, int srcStep,
Ipp16s* pDst, int dstPlaneStep, int dstStep, IpprVolume dstRoiVolume, IpprBorderTypeborderType, const Ipp16s* pBorderValue, const IpprFilterMedianSpec* pSpec, Ipp8u*
pBuffer);
IppStatus ipprFilterMedian_32f_C1V(const Ipp32f* pSrc, int srcPlaneStep, int srcStep,
Ipp32f* pDst, int dstPlaneStep, int dstStep, IpprVolume dstRoiVolume, IpprBorderTypeborderType, const Ipp32f* pBorderValue, const IpprFilterMedianSpec* pSpec, Ipp8u*
pBuffer);
IppStatus ipprFilterMedian_64f_C1V(const Ipp64f* pSrc, int srcPlaneStep, int srcStep,
Ipp64f* pDst, int dstPlaneStep, int dstStep, IpprVolume dstRoiVolume, IpprBorderTypeborderType, const Ipp64f* pBorderValue, const IpprFilterMedianSpec* pSpec, Ipp8u*
pBuffer);Threading Layer (TL) functions
IppStatus ipprFilterMedian_8u_C1V_T(const Ipp8u* pSrc, int srcPlaneStep, int srcStep,
Ipp8u* pDst, int dstPlaneStep, int dstStep, IpprVolume dstRoiVolume, IpprBorderTypeborderType, const Ipp8u* pBorderValue, const IpprFilterMedianSpec_T* pSpec, Ipp8u*
pBuffer);1706

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

IppStatus ipprFilterMedian_16u_C1V_T(const Ipp16u* pSrc, int srcPlaneStep, int srcStep,
Ipp16u* pDst, int dstPlaneStep, int dstStep, IpprVolume dstRoiVolume, IpprBorderTypeborderType, const Ipp16u* pBorderValue, const IpprFilterMedianSpec_T* pSpec, Ipp8u*
pBuffer);
IppStatus ipprFilterMedian_16s_C1V_T(const Ipp16s* pSrc, int srcPlaneStep, int srcStep,
Ipp16s* pDst, int dstPlaneStep, int dstStep, IpprVolume dstRoiVolume, IpprBorderTypeborderType, const Ipp16s* pBorderValue, const IpprFilterMedianSpec_T* pSpec, Ipp8u*
pBuffer);
IppStatus ipprFilterMedian_32f_C1V_T(const Ipp32f* pSrc, int srcPlaneStep, int srcStep,
Ipp32f* pDst, int dstPlaneStep, int dstStep, IpprVolume dstRoiVolume, IpprBorderTypeborderType, const Ipp32f* pBorderValue, const IpprFilterMedianSpec_T* pSpec, Ipp8u*
pBuffer);
IppStatus ipprFilterMedian_64f_C1V_T(const Ipp64f* pSrc, int srcPlaneStep, int srcStep,
Ipp64f* pDst, int dstPlaneStep, int dstStep, IpprVolume dstRoiVolume, IpprBorderTypeborderType, const Ipp64f* pBorderValue, const IpprFilterMedianSpec_T* pSpec, Ipp8u*
pBuffer);

Include Files
ippi.hippi_tl.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Array of pointers to the planes in the source volume.

srcStep

Distance, in bytes, between the starting points of consecutive lines ineach plane of the source volume.

srcPlaneStep

Distance, in bytes, between the starting points of consecutive images
in every plane of the source volume.

pDst

Array of pointers to the planes in the destination volume.

dstStep

Distance, in bytes, between the starting points of consecutive lines ineach plane of the destination volume.

dstPlaneStep

Distance, in bytes, between the starting points of consecutive images
in every plane of the source volume.

dstRoiVolume

Volume of the destination ROI in pixels.

borderType

Type of the border. Possible values are:pBorderValue

ipprBorderInMem

Border is obtained from the source image
pixels in memory.

ipprBorderRepl

Border is replicated from the edge pixels.

ipprBorderConst

Border is replicated from the edge pixels.

Pointer to the constant value to assign to pixels of the constant border.

1707

1

Intel® Integrated Performance Primitives Developer Guide and ReferencepSpec

Pointer to the filter specification structure.

pBuffer

Pointer to the work buffer for filtering operations.

Description
Before using this function, you need to initialize the filter specification structure for 3D image processing
using the ipprFilterMedianInit function.
This function operates with VOI. This function performs median filtering on a source image with the volume.
Type of the image border is defined by the value of the border parameter.

Return Values
ippStsNoErr
ippStsStepErr

Indicates no error condition. Any other value indicates an error
condition.
Indicates an error condition if srcPlaneStep, srcStep,
dstPlaneStep, or dstStep has a field with negative value.

ippStsNullPtrErr

Indicates an error condition if the pSrc, pDst, pSpec,
pBorderValue, or pBuffer pointer is NULL.

ippStsSizeErr

Indicates an error condition if dstRoiVolume has a field withzero or negative value.

See Also
FilterMedianInit Initializes the filter specification structure for 3D image processing with a medianfilter.
FilterMedianGetSize Computes the size of the filter specification structure and the size of thework buffer for 3D image processing with a median filter.
Structures and Enumerators
FilterMedianInit
Initializes the filter specification structure for 3D
image processing with a median filter.

SyntaxIppStatus ipprFilterMedianInit(IpprVolume maskVolume, IppDataType dataType, int
numChannels, IpprFilterMedianSpec* pSpec);

Threading Layer (TL) function
IppStatus ipprFilterMedianInit_T(IpprVolume maskVolume, IppDataType dataType, int
numChannels, IpprFilterMedianSpec_T* pSpec);

Include Files
ippi.hippi_tl.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
maskVolume

1708

Size of the mask volume.

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

dataType

Data type of the source image. Possible values are ipp8u,
ipp16u, ipp16s, ipp32f, and ipp64f.

numChannels

Number of channels in the image. Possible value is 1.

pSpec

Pointer to the filter specification structure.

Description
This function operates with VOI. This function initializes the filter specification structure pSpec for 3D image
processing with a median filter. Before using this function, you need to compute the size of the corresponding
specification structure using the ipprFilterMedianGetSize function.

Return Values
ippStsNoErr

Indicates no error condition. Any other value indicates an error
condition.

ippStsNullPtrErr

Indicates an error condition if the pSpec pointer is NULL.

ippStsChannelErr

Indicates an error condition if maskVolume has a field with zeroor negative value.
Indicates an error condition if numChannels has an illegal value.

ippStsDataTypeErr

Indicates an error condition if dataType has an illegal value.

ippStsSizeErr

See Also
FilterMedianGetSize Computes the size of the filter specification structure and the size of thework buffer for 3D image processing with a median filter.
FilterMedian Filters a 3D image using a median filter.
FilterMedianGetSize
Computes the size of the filter specification structure
and the size of the work buffer for 3D image
processing with a median filter.

SyntaxIppStatus ipprFilterMedianGetSize(IpprVolume maskVolume, IpprVolume dstRoiVolume,
IppDataType dataType, int numChannels, int* pSpecSize, int* pBufferSize);

Threading Layer (TL) function
IppStatus ipprFilterMedianGetSize_T(IpprVolume maskVolume, IpprVolume dstRoiVolume,
IppDataType dataType, int numChannels, int* pSpecSize, int* pBufferSize);

Include Files
ippi.hippi_tl.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
maskVolume

Size of the mask volume.

1709

1

Intel® Integrated Performance Primitives Developer Guide and Reference

dstRoiVolume

Maximal size of the destination image ROI (in pixels).

dataType

Data type of the source image. Possible values are ipp8u,
ipp16u, ipp16s, ipp32f, and ipp64f.

numChannels

Number of channels in the image. Possible value is 1.

pSpecSize

Pointer to the size of the filter specification structure.

pBufferSize

Pointer to the size of the work buffer required for filtering.

Description
This function operates with VOI. This function computes the size of the filter specification structure pSpec
and the size of the buffer required for 3D image filtering operations with a median filter. Call this function
before using the ipprFilterMedianInit function.

Return Values
ippStsNoErr
ippStsNullPtrErr

Indicates no error condition. Any other value indicates an error
condition.
Indicates an error condition if the pSpecSize or pBufferSize
pointer is NULL.

ippStsChannelErr

Indicates an error condition if dstRoiVolume or maskVolume hasa field with zero or negative value.
Indicates an error condition if numChannels has an illegal value.

ippStsDataTypeErr

Indicates an error condition if dataType has an illegal value.

ippStsSizeErr

See Also
FilterMedianInit Initializes the filter specification structure for 3D image processing with a medianfilter.
FIlterMedian Filters a 3D image using a median filter.
ResizeGetBufSize
Calculates the size of the external work buffer for thefunction ipprResize.

SyntaxIppStatus ipprResizeGetBufSize(IpprCuboid srcVoi, IpprCuboid dstVoi, int nChannel, intinterpolation, int* pSize);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
srcVoi

Volume of interest in the source volume.

dstVoi

Volume of interest in the destination volume.

1710

Developer Guide and Reference for Intel® Integrated Performance Primitives

nChannelNumber of channels, possible value: 1.

interpolation

Type of interpolation, the following values are possible:

1

IPPI_INTER_NN- nearest neighbor interpolation,
IPPI_INTER_LINEAR- trilinear interpolation,
IPPI_INTER_CUBIC- tricubic interpolation,
IPPI_INTER_CUBIC2P_BSPLINE- B-spline,
IPPI_INTER_CUBIC2P_CATMULLROM- Catmull-Rom spline,
IPPI_INTER_CUBIC2P_B05C03- special two-parameters filter (1/2,
3/10).

pSize

Pointer to the size of the external buffer.

Description
This function calculates the size of the external buffer required for the ipprResize function.

Return Values
ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error when the pSize pointer is NULL.

ippStsSizeErr

Indicates an error when width, or height, or depth of the srcVoi or

dstVoi is less than, or equal to 0.

ippStsNumChannelErr

Indicates an error when nChannel is not equal to 1.

ippStsInterpolationErr

Indicates an error when interpolation has an illegal value.

See Also
Resize Resizes the source volume.
GetResizeCuboid
Computes coordinates of the destination cuboid.

SyntaxIppStatus ipprGetResizeCuboid(IpprCuboid srcVoi, IpprCuboid* pDstCuboid, double
xFactor, double yFactor, double zFactor, double xShift, double yShift, double zShift,
int interpolation);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
srcVoi

Volume of interest of the source volume.

pDstCuboid

Pointer to the destination cuboid.

1711

1

Intel® Integrated Performance Primitives Developer Guide and Referencex-, y-, zFactor

Factors by which the x, y, z dimensions of the source VOI arechanged.

x-, y-, zShift

Shift values in the x, y, and z directions respectively.

interpolation

Type of interpolation, the following values are possible:

IPPI_INTER_NN- nearest neighbor interpolation,
IPPI_INTER_LINEAR- trilinear interpolation,
IPPI_INTER_CUBIC- tricubic interpolation,
IPPI_INTER_CUBIC2P_BSPLINE- B-spline,
IPPI_INTER_CUBIC2P_CATMULLROM- Catmull-Rom spline,
IPPI_INTER_CUBIC2P_B05C03- special two-parameters filter (1/2,
3/10).

Description
This function operates with volume of interest (VOI).
This function computes the coordinates of the resultant cuboid which is obtained if the source volume srcVoi
is resized with the specified parameters. The resize operation is not performed.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsResizeFactorErr
ippStsInterpolationErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error when pDstCuboid is NULL.
Indicates an error when width, or height, or depth of thesource and destination volumes is less than, or equal to 0.
Indicates an error when one of the xFactor, yFactor, zFactor
values is less than, or equal to 0.
Indicates an error when interpolation has an illegal value.

ResizeResizes the source volume.

SyntaxIppStatus ipprResize_8u_C1V(const Ipp8u* pSrc, IpprVolume srcVolume, int srcStep, int
srcPlaneStep, IpprCuboid srcVoi, Ipp8u* pDst, int dstStep, int dstPlaneStep, IpprCuboid
dstVoi, double xFactor, double yFactor, double zFactor, double xShift, double yShift,double zShift, int interpolation, Ipp8u* pBuffer);
IppStatus ipprResize_16u_C1V(const Ipp16u* pSrc, IpprVolume srcVolume, int srcStep, int
srcPlaneStep, IpprCuboid srcVoi, Ipp16u* pDst, int dstStep, int dstPlaneStep,
IpprCuboid dstVoi, double xFactor, double yFactor, double zFactor, double xShift,double yShift, double zShift, int interpolation, Ipp8u* pBuffer);
IppStatus ipprResize_16s_C1V(const Ipp16s* pSrc, IpprVolume srcVolume, int srcStep, int
srcPlaneStep, IpprCuboid srcVoi, Ipp16s* pDst, int dstStep, int dstPlaneStep,
IpprCuboid dstVoi, double xFactor, double yFactor, double zFactor, double xShift,double yShift, double zShift, int interpolation, Ipp8u* pBuffer);
IppStatus ipprResize_8u_C1PV(const Ipp8u* const pSrc[], IpprVolume srcVolume, int
srcStep, IpprCuboid srcVoi, Ipp8u* const pDst[], int dstStep, IpprCuboid dstVoi, double
xFactor, double yFactor, double zFactor, double xShift, double yShift, double zShift,
int interpolation, Ipp8u* pBuffer);
1712

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

IppStatus ipprResize_16u_C1PV(const Ipp16u* const pSrc[], IpprVolume srcVolume, int
srcStep, IpprCuboid srcVoi, Ipp16u* const pDst[], int dstStep, IpprCuboid dstVoi,
double xFactor, double yFactor, double zFactor, double xShift, double yShift, double
zShift, int interpolation, Ipp8u* pBuffer);
IppStatus ipprResize_16s_C1PV(const Ipp16s* const pSrc[], IpprVolume srcVolume, int
srcStep, IpprCuboid srcVoi, Ipp16s* const pDst[], int dstStep, IpprCuboid dstVoi,
double xFactor, double yFactor, double zFactor, double xShift, double yShift, double
zShift, int interpolation, Ipp8u* pBuffer);
IppStatus ipprResize_32f_C1PV(const Ipp32f* const pSrc[], IpprVolume srcVolume, int
srcStep, IpprCuboid srcVoi, Ipp32f* const pDst[], int dstStep, IpprCuboid dstVoi,
double xFactor, double yFactor, double zFactor, double xShift, double yShift, double
zShift, int interpolation, Ipp8u* pBuffer);
IppStatus ipprResize_32f_C1V(const Ipp32f* pSrc, IpprVolume srcVolume, int srcStep, int
srcPlaneStep, IpprCuboid srcVoi, Ipp32f* pDst, int dstStep, int dstPlaneStep,
IpprCuboid dstVoi, double xFactor, double yFactor, double zFactor, double xShift,double yShift, double zShift, int interpolation, Ipp8u* pBuffer);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc
srcVolume
srcStep
srcPlaneStep
srcVoipDst
dstStep
dstPlaneStep
dstVoi

Pointer to the source volume origin. An array of pointers to thesource planes for non-contiguous volume.
Size of the source volume.
Distance, in bytes, between the starting points of consecutive
lines in each plane of the source volume.
Distance, in bytes, between the planes of the source
contiguous volume.
Volume of interest of the source volume.
Pointer to the destination volume origin. An array of pointers to
the destination planes for non-contiguous volume.
Distance, in bytes, between the starting points of consecutive
lines in each plane of the the destination volume.
Distance, in bytes, between the planes of the destination
contiguous volume.
Volume of interest of the destination volume.

x-, y-, zShift

Factors by which the x, y, z dimensions of the source VOI arechanged.
Shift values in the x, y, and z directions respectively.

interpolation

Type of interpolation, the following values are possible:

x-, y-, zFactor

IPPI_INTER_NN- nearest neighbor interpolation,

1713

1

Intel® Integrated Performance Primitives Developer Guide and Reference

IPPI_INTER_LINEAR- trilinear interpolation,
IPPI_INTER_CUBIC- tricubic interpolation,
IPPI_INTER_CUBIC2P_BSPLINE- B-spline,
IPPI_INTER_CUBIC2P_CATMULLROM- Catmull-Rom spline,
IPPI_INTER_CUBIC2P_B05C03- special two-parameters filter (1/2,
3/10).

pBuffer

Pointer to the external buffer.

Description
This function operates with volume of interest (VOI).
This function resizes the source volume srcVoi by xFactor in the x direction, yFactor in the y direction
and zFactor in the z direction. The volume size can be reduced or increased in each direction, depending on
the values of xFactor, yFactor, zFactor. If the value of the certain factor is greater than 1, the volume
size is increased, and if it is less than 1, the volume size is reduced in the corresponding direction. The result
is resampled using the interpolation method specified by the interpolation parameter, and written to thedestination volumeVOI.
Coordinates x', y', and z' in the resized volume are obtained from the equations:x' = xFactor* x + xShifty' = yFactor* y + yShiftz' = zFactor* z + zShiftwhere x, y, and z denote the coordinates of the element in the source volume. The right coordinate system(RCS) is used here.
Descriptor PV means working with non-contiguous volume data, where the location of the planes is passed to
the function using pointers on the plane. In functions with descriptor V, the location of the planes isdetermined by the distance in bytes between the starting points of successive lines in each plane of theoriginal volume (contiguous volume data).
In case of resize:• In IppStatus ipprResize_8u_C1V function V means:const Ipp8u* pSrc - Pointer to the source volume origin. srcPlaneStep - Distance, in bytes, between theplanes of the source contiguous volume.
• In IppStatus ipprResize_8u_C1PV function PV means:const Ipp8u* const pSrc[] - An array of pointers to the source planes for non-contiguous volume.
Before using this function, compute the size of the external buffer pBuffer using ipprResizeGetBufSize.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsResizeFactorErr
ippStsInterpolationErr

1714

Indicates no error. Any other value indicates an error or awarning.
Indicates an error when one of the specified pointers is NULL.
Indicates an error when width, or height, or depth of thesource and destination volumes is less than or equal to 0.
Indicates an error when one of the xFactor, yFactor, zFactor
pointers is less than, or equal to 0.
Indicates an error when interpolation has an illegal value.

Developer Guide and Reference for Intel® Integrated Performance Primitives

ippStsWrongIntersectVOI

1

Indicates a warning when srcVoi has no intersection with thesource volume, operation is not performed.

See Also
ResizeGetBufSize Calculates the size of the external work buffer for the function ipprResize.
Remap
Performs the look-up coordinate mapping of theelements of the source volume.

SyntaxCase 1: Operation on non-contiguous volume data
IppStatus ipprRemap_8u_C1PV(const Ipp8u* pSrc[], IpprVolume srcVolume, int srcStep,
IpprCuboid srcVoi, const Ipp32f* pxMap[], const Ipp32f* pyMap[], const Ipp32f* pzMap[],
int mapStep, Ipp8u* pDst[], int dstStep, IpprVolume dstVolume, int interpolation);
IppStatus ipprRemap_16u_C1PV(const Ipp16u* pSrc[], IpprVolume srcVolume, int srcStep,
IpprCuboid srcVoi, const Ipp32f* pxMap[], const Ipp32f* pyMap[], const Ipp32f* pzMap[],
int mapStep, Ipp16u* pDst[], int dstStep, IpprVolume dstVolume, int interpolation);
IppStatus ipprRemap_32f_C1PV(const Ipp32f* pSrc[], IpprVolume srcVolume, int srcStep,
IpprCuboid srcVoi, const Ipp32f* pxMap[], const Ipp32f* pyMap[], const Ipp32f* pzMap[],
int mapStep, Ipp32f* pDst[], int dstStep, IpprVolume dstVolume, int interpolation);

Case 2: Operation on contiguous volume data
IppStatus ipprRemap_8u_C1V(const Ipp8u* pSrc, IpprVolume srcVolume, int srcStep, int
srcPlaneStep, IpprCuboid srcVoi, const Ipp32f* pxMap, const Ipp32f* pyMap, const
Ipp32f* pzMap, int mapStep, int mapPlaneStep, Ipp8u* pDst, int dstStep, int
dstPlaneStep, IpprVolume dstVolume, int interpolation);
IppStatus ipprRemap_16u_C1V(const Ipp16u* pSrc, IpprVolume srcVolume, int srcStep, int
srcPlaneStep, IpprCuboid srcVoi, const Ipp32f* pxMap, const Ipp32f* pyMap, const
Ipp32f* pzMap, int mapStep, int mapPlaneStep, Ipp16u* pDst, int dstStep, int
dstPlaneStep, IpprVolume dstVolume, int interpolation);
IppStatus ipprRemap_32f_C1V(const Ipp32f* pSrc, IpprVolume srcVolume, int srcStep, int
srcPlaneStep, IpprCuboid srcVoi, const Ipp32f* pxMap, const Ipp32f* pyMap, const
Ipp32f* pzMap, int mapStep, int mapPlaneStep, Ipp32f* pDst, int dstStep, int
dstPlaneStep, IpprVolume dstVolume, int interpolation);

Include Files
ippi.hDomain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Array of pointers to the planes in the source volume.

srcVolume

Size of the source volume.

srcStep

Distance, in bytes, between the starting points of consecutive
lines in every plane of the source volume.

1715

1

Intel® Integrated Performance Primitives Developer Guide and Reference

srcPlaneStep

srcVoipxMap, pyMap, pzMap

mapStep
mapPlaneStep

pDst
dstStep
dstPlaneStep

Distance, in bytes, between the starting points of consecutive
lines in every plane of the source volume (for 8u_C1V, 16u_C1V,
and 32f_C1V flavors).
Region of interest in the source volume.
Arrays of pointers to the starts of the 2D buffers, containing
tables of the x-, y- and z-coordinates. If the referenced
coordinates correspond to a voxel outside of the source VOI, no
mapping of the source pixel is done.
Step, in bytes, through the buffers containing tables of the x-,
y- and z-coordinates.
Distance, in bytes, between the starting points of consecutive
lines in every plane of the buffers containing tables (for 8u_C1V,
16u_C1V, and 32f_C1V flavors).
Array of the pointers to the planes in the destination volume.
Distance, in bytes, between the starting points of consecutive
lines in every plane of the destination volume.
Distance, in bytes, between the starting points of consecutive
lines in every plane of the destination volume (for 8u_C1V,
16u_C1V, and 32f_C1V flavors).

dstVolume

Size of the destination volume.

interpolation

The type of interpolation, the following values are possible:

IPPI_INTER_NN- nearest neighbor interpolation,
IPPI_INTER_LINEAR- trilinear interpolation,
IPPI_INTER_CUBIC- tricubic interpolation,
IPPI_INTER_CUBIC2P_BSPLINE- B-spline,
IPPI_INTER_CUBIC2P_CATMULLROM- Catmull-Rom spline,
IPPI_INTER_CUBIC2P_B05C03- special two-parameters filter (1/2,
3/10).

Description
This function operates with volume of interest (VOI).
This function transforms the source volume by remapping its voxels. Voxel remapping is performed using
pxMap, pyMap and pzMap buffers to look-up the coordinates of the source volume voxel that is written to thetarget destination volume voxel. The application has to supply these look-up tables.
The remapping of the source voxels to the destination voxels is made according to the following formulas:

dst_voxel[i, j, k] = src_voxel[ pxMap[i, j, k], pyMap[i, j,k], pzMap [i , j,k]]where i, j, k are the x-, y- and z-coordinates of the target destination volume voxel dst_voxel;

pxMap[i, j, k] contains the x-coordinates of the source volume voxels src_voxel that are written to
dst_voxel.
pyMap[i, j, k] contains the y-coordinates of the source volume voxels src_voxel that are written to
dst_voxel.
pzMap[i, j, k] contains the z-coordinates of the source volume voxels src_voxel that are written to
dst_voxel.

1716

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsInterpolationErr
ippStsWrongIntersectVOIIndicates no error. Any other value indicates an error or awarning.
Indicates an error when one of the specified pointers is NULL.
Indicates an error when width, or height, or depth of thesource and destination volumes has zero or negative value.
Indicates an error when interpolation has an illegal value.
Indicates a warning when srcVoi has no intersection with thesource volume, operation is not performed.

WarpAffineGetBufSize
Calculates the size of the external buffer for the affine
transform.

SyntaxIppStatus ipprWarpAffineGetBufSize(IpprVolume srcVolume, IpprCuboid srcVoi, IpprCuboid
dstVoi, const double coeffs[3][4], int nChannel, int interpolation, int* pSize);

Threading Layer (TL) function
IppStatus ipprWarpAffineGetBufSize_T (IpprVolume srcVolume, IpprCuboid srcVoi,
IpprCuboid dstVoi, const double coeffs[3][4], int nChannel, int interpolation, int*
pSize);

Include Files
ippi.hippi_tl.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
srcVolume

Size of the source volume.

srcVoiRegion of interest of the source volume.

dstVoiRegion of interest of the destination volume.

coeffsAffine transform matrix.

nChannelNumber of channel or planes, possible value is 1.

interpolation

Type of interpolation, the following values are possible:

IPPI_INTER_NN- nearest neighbor interpolation,
IPPI_INTER_LINEAR- trilinear interpolation,
IPPI_INTER_CUBIC- tricubic interpolation,
IPPI_INTER_CUBIC2P_BSPLINE- B-spline,
IPPI_INTER_CUBIC2P_CATMULLROM- Catmull-Rom spline,

1717

1

Intel® Integrated Performance Primitives Developer Guide and Reference

IPPI_INTER_CUBIC2P_B05C03- special two-parameters filter (1/2,
3/10).

pSize

Pointer to the size of the external buffer.

Description
This function calculates the size (in bytes) of the external buffer that is required for the ipprWarpAffine
function. (In some cases the function returns zero size of the buffer).

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error when pSizeor coeffsis NULL.
Indicates an error if width, or height, or depth of the srcVoi or

dstVoi is less than, or equal to zero.

ippStsNumChannelErr

Indicates an error when nChannel has an illegal value.

ippStsInterpolationErr

Indicates an error when interpolation has an illegal value.

See Also
WarpAffine Performs the general affine transform of the source volume.
WarpAffine
Performs the general affine transform of the source
volume.

SyntaxIppStatus ipprWarpAffine_8u_C1PV(const Ipp8u* const pSrc[], IpprVolume srcVolume, int
srcStep, IpprCuboid srcVoi, Ipp8u* const pDst[], int dstStep, IpprCuboid dstVoi, const
double coeffs[3][4], int interpolation, Ipp8u* pBuffer);
IppStatus ipprWarpAffine_16u_C1PV(const Ipp16u* const pSrc[], IpprVolume srcVolume, int
srcStep, IpprCuboid srcVoi, Ipp16u* const pDst[], int dstStep, IpprCuboid dstVoi, const
double coeffs[3][4], int interpolation, Ipp8u* pBuffer);
IppStatus ipprWarpAffine_32f_C1PV(const Ipp32f* const pSrc[], IpprVolume srcVolume, int
srcStep, IpprCuboid srcVoi, Ipp32f* const pDst[], int dstStep, IpprCuboid dstVoi, const
double coeffs[3][4], int interpolation, Ipp8u* pBuffer);
IppStatus ipprWarpAffine_8u_C1V(const Ipp8u* pSrc, IpprVolume srcVolume, int srcStep,
int srcPlaneStep, IpprCuboid srcVoi, Ipp8u* pDst, int dstStep, int dstPlaneStep,
IpprCuboid dstVoi, const double coeffs[3][4], int interpolation, Ipp8u* pBuffer);
IppStatus ipprWarpAffine_16u_C1V(const Ipp16u* pSrc, IpprVolume srcVolume, int srcStep,
int srcPlaneStep, IpprCuboid srcVoi, Ipp16u* pDst, int dstStep, int dstPlaneStep,
IpprCuboid dstVoi, const double coeffs[3][4], int interpolation, Ipp8u* pBuffer);
IppStatus ipprWarpAffine_32f_C1V(const Ipp32f* pSrc, IpprVolume srcVolume, int srcStep,
int srcPlaneStep, IpprCuboid srcVoi, Ipp32f* pDst, int dstStep, int dstPlaneStep,
IpprCuboid dstVoi, const double coeffs[3][4], int interpolation, Ipp8u* pBuffer);

1718

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Threading Layer (TL) functions
IppStatus ipprWarpAffine_8u_C1PV_T(const Ipp8u* const pSrc[], IpprVolume srcVolume, int
srcStep, IpprCuboid srcVoi, Ipp8u* const pDst[], int dstStep, IpprCuboid dstVoi, const
double coeffs[3][4], int interpolation, Ipp8u* pBuffer);
IppStatus ipprWarpAffine_16u_C1PV_T(const Ipp16u* const pSrc[], IpprVolume srcVolume,
int srcStep, IpprCuboid srcVoi, Ipp16u* const pDst[], int dstStep, IpprCuboid dstVoi,
const double coeffs[3][4], int interpolation, Ipp8u* pBuffer);
IppStatus ipprWarpAffine_32f_C1PV_T(const Ipp32f* const pSrc[], IpprVolume srcVolume,
int srcStep, IpprCuboid srcVoi, Ipp32f* const pDst[], int dstStep, IpprCuboid dstVoi,
const double coeffs[3][4], int interpolation, Ipp8u* pBuffer);
IppStatus ipprWarpAffine_8u_C1V_T(const Ipp8u* pSrc, IpprVolume srcVolume, int srcStep,
int srcPlaneStep, IpprCuboid srcVoi, Ipp8u* pDst, int dstStep, int dstPlaneStep,
IpprCuboid dstVoi, const double coeffs[3][4], int interpolation, Ipp8u* pBuffer);
IppStatus ipprWarpAffine_16u_C1V_T(const Ipp16u* pSrc, IpprVolume srcVolume, int
srcStep, int srcPlaneStep, IpprCuboid srcVoi, Ipp16u* pDst, int dstStep, int
dstPlaneStep, IpprCuboid dstVoi, const double coeffs[3][4], int interpolation, Ipp8u*
pBuffer);
IppStatus ipprWarpAffine_16u_C1V_T(const Ipp16u* pSrc, IpprVolume srcVolume, int
srcStep, int srcPlaneStep, IpprCuboid srcVoi, Ipp16u* pDst, int dstStep, int
dstPlaneStep, IpprCuboid dstVoi, const double coeffs[3][4], int interpolation, Ipp8u*
pBuffer);

Include Files
ippi.hippi_tl.h

Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters
pSrc

Array of pointers to the planes in the source volume.

srcVolume

Size, in pixels, of the source volume.

srcStep
srcPlaneStep

Distance, in bytes, between the starting points of consecutive
lines in each plane of the source volume.
Distance, in bytes, between the starting points of consecutive
lines in every plane of the source volume (for 8u_C1V, 16u_C1V,
and 32f_C1V flavors).

srcVoiDistance, in bytes, between the starting points of consecutive
lines in each plane of the destination volume.
Volume of interest of the source volume.

pDst

Array of pointers to the planes in the destination volume.

dstVoi

Volume of interest of the destination volume.

dstStep

Distance, in bytes, between the starting points of consecutive
lines in every plane of the destination volume.

dstStep1719

1Intel® Integrated Performance Primitives Developer Guide and Reference

dstPlaneStep

Distance, in bytes, between the starting points of consecutive
lines in every plane of the destination volume (for 8u_C1V,
16u_C1V, and 32f_C1V flavors).

coeffsCoefficients of the affine transform.

interpolation

Type of interpolation, the following values are possible:

IPPI_INTER_NN- nearest neighbor interpolation,
IPPI_INTER_LINEAR- trilinear interpolation,
IPPI_INTER_CUBIC- tricubic interpolation,
IPPI_INTER_CUBIC2P_BSPLINE- B-spline,
IPPI_INTER_CUBIC2P_CATMULLROM- Catmull-Rom spline,
IPPI_INTER_CUBIC2P_B05C03- special two-parameters filter (1/2,
3/10).

pBuffer

Pointer to the external buffer.

Description
This function operates with volume of interest (VOI).
This affine warp function transforms the coordinates (x,y,z) of the source volume voxels according to thefollowing formulas:x' = c00*x + c01*y + c02*z+ c03

y' = c10*x + c11*y + c12*z+ c13
z' = c20*x + c21*y + c22*z+ c23
where x', y' and z' denote the voxel coordinates in the transformed volume, and cij are the affine
transform coefficients stored in the array coeffs.
Before calling this function, compute the size of the external buffer pBuffer using theipprWarpAffineGetBufSize function.

Return Values
ippStsNoErr
ippStsNullPtrErr
ippStsSizeErr
ippStsCoeffErr

Indicates no error. Any other value indicates an error or awarning.
Indicates an error when one of the specified pointers is NULL.
Indicates an error when width, or height, or depth of thesource and destination volumes is less than, or equal to zero.
Indicates an error when determinant of the transform matrix
cij is equal to zero.

ippStsInterpolationErr

Indicates an error when interpolation has an illegal value.

ippStsWrongIntersectVOIIndicates a warning when srcVoi has no intersection with thesource volume, operation is not performed.

See Also
WarpAffineGetBufSize Calculates the size of the external buffer for the affine transform.

Appendix A: Handling of Special Cases
Some mathematical functions implemented in Intel IPP are not defined for all possible argument values. Thisappendix describes how the corresponding Intel IPP image processing functions handle situations when their
input arguments fall outside the range of function definition or may lead to ambiguously determined output
results.

1720

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Table Special Cases for Intel IPP Image Processing Functions below summarizes these special cases fordifferent functions and lists result values together with status codes returned by the functions. The status
codes ending with Err (except for the ippStsNoErr status) indicate an error. When an error occurs, thefunction execution is interrupted. All other status codes indicate that the input argument is outside the range,
but the function execution is continued with the corresponding result value.
Special Cases for Intel IPP Image Processing Functions
Function BaseName

Data Type

Case Description

Result Value

Status CodeippiSqrt

16s

Sqrt (x <0)0ippStsSqrtNegArg

32f

Sqrt (x <0)

NAN_32F

ippStsSqrtNegArg

8u

Div (0/0)

0ippStsDivByZero

Div (x/0)

IPP_MAX_8U

ippStsDivByZero

Div (0/0)

0ippStsDivByZero

Div (x/0), x>0

IPP_MAX_16S

ippStsDivByZero

Div (x/0), x<0

IPP_MIN_16S

ippStsDivByZero

Div (0/0)

NAN_32F

ippStsDivByZero

Div (x/0), x>0

INF_32F

ippStsDivByZero

Div (x/0), x<0

INF_NEG_32F

ippStsDivByZero

Div (0/0)

0ippStsDivByZero

Div (x/0),

0ippStsDivByZero

Div (0/0)

0ippStsDivByZero

Div (x/0), x>0

IPP_MAX_32S

ippStsDivByZero

Div (x/0), x<0

IPP_MIN_32S

ippStsDivByZero

Div (0/0)

NAN_32F

Div (x/0), x>0

INF_32F

Div (x/0), x<0

INF_NEG_32F

ippiDiv

16s

32f

16sc

32sc

32fc

ippiDivC

all

Div(x/const),
const=0-

ippStsDivByZeroErr

ippiLn8u

Ln (0)

0ippStsLnZeroArg

16s

Ln (0)

IPP_MIN_16S

ippStsLnZeroArg

Ln (x<0)

IPP_MIN_16S

ippStsLnNegArg

Ln (x<0)

NAN_32F

ippStsLnNegArg

Ln(x<IPP_MINABS_3
2F)

INF_NEG_32F

ippStsLnZeroArg

32f

1721

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Function BaseName

Data Type

Case Description

Result Value

Status CodeippiExp

8u

overflow

IPP_MAX_8U

ippStsNoErr

16s

overflow

IPP_MAX_16S

ippStsNoErr

32f

overflow

INF_32F

ippStsNoErr

Here x denotes an input value. For the definition of the constants used, see Image Data Types and Ranges inIntel® Integrated Performance Primitives Concepts.
Note that flavors of the same math function operating on different data types may produce diferent results
for the equal argument values. However, for a given function and a fixed data type, handling of special cases
is the same for all function flavors that have different descriptors in their names. For example, logarithm
function ippiLn operating on 16s data treats zero argument values in the same way for all its flavors
ippiLn_16s_C1RSfs, ippiLn_16s_C3RSfs, ippiLn_16s_C1IRSfs, and ippiLn_16s_C3IRSfs.

Appendix B: Interpolation in Image Geometric Transform Functions
This appendix describes the interpolation algorithms used in the geometric transformation functions of Intel
IPP. For more information about each of the geometric transform functions, see Image Geometry Transforms.

Overview of Interpolation Modes
In geometric transformations, the grid of input image pixels is not necessarily mapped onto the grid of pixels
in the output image. Therefore, to compute the pixel intensities in the output image, the geometric transformfunctions need to interpolate the intensity values of several input pixels that are mapped to a certain
neighborhood of the output pixel.
Geometric transformations can use various interpolation algorithms. The library supports the followinginterpolation modes depending on how the type of interpolation algorithm is specified:•Type 1: Application code specifies the interpolation mode by passing the interpolation parameter of
int type to a processing function. The following interpolation modes are supported:
–
–
–
–
–

•

Nearest neighbor interpolation (interpolation = IPPI_INTER_NN)
Linear interpolation (interpolation = IPPI_INTER_LINEAR)
Cubic interpolation (interpolation = IPPI_INTER_CUBIC)Interpolation with Lanczos window function (interpolation = IPPI_INTER_LANCZOS)Interpolation with two-parameter cubic filters with the fixed coefficients (interpolation can be set tothe following:• IPPI_INTER_CUBIC2P_BSPLINE (B=1; C=0)
• IPPI_INTER_CUBIC2P_CATMULLROM (B=0; C=0.5)• IPPI_INTER_CUBIC2P_ B05C03 (B=0.5; C=0.3)
Type 2: Interpolation mode is specified explicitly in a function name suffix:– Nearest neighbor interpolation (pass interpolation = ippNearest to GetSize functions, use thefunctions with the Nearest suffix, for example, ResizeNearestInit or ResizeNearest)– Linear interpolation (pass interpolation = ippLinear to GetSize functions, use the functions with
the Linear suffix, for example, ResizeLinearInit or ResizeLinear)– Interpolation with two-parameter cubic filters (pass interpolation = ippCubic to GetSize
functions, use the functions with the Cubic suffix, for example, ResizeCubicInit or ResizeCubic)– Supersampling (pass interpolation = ippSuper to GetSize functions, use the functions with theSuper suffix, for example, ResizeSuperInit or ResizeSuper)– Interpolation with Lanczos window function (pass interpolation = ippLanczos to GetSize
functions, use the functions with the Lanczos suffix, for example, ResizeLanczosInit or
ResizeLanczos)

1722

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

For certain functions of type 1, the specified interpolation modes can be combined with additional smoothingof edges to which the borders of the original image are transformed. To use this option, for theinterpolation parameter, specify the edge smoothing flag and the desired interpolation mode using the
bitwise OR operation. For example, in order to rotate an image with cubic interpolation and smooth therotated image edges, pass the following value to ippiRotate():interpolation = IPPI_INTER_CUBIC | IPPI_SMOOTH_EDGE.
To enable edge smoothing for functions of type 2, pass the special flag to the Init function (if it exists), forexample, you can pass this flag to Init functions for WarpAffine and WarpPerspective function groups.
Interpolation with edge smoothing option can be used only in those geometric transform functions where thisoption is explicitly listed in the parameters definition section.
Table Interpolation Modes Supported by Image Geometric Transform Functions lists the supported
interpolation modes for the main geometric transform functions that use interpolation.
Interpolation Modes Supported by Image Geometric Transform Functions
Function Base
Name

NN

Lin

ResizeCubic
ResizeLanczos
ResizeLinearx
ResizeNearest
ResizeSuper
WarpAffineCubic
WarpAffineLinear
WarpAffineNearest x
WarpPerspectiveCubic
WarpPerspectiveLinearx
WarpPerspectiveNearest
x
Remap
x
WarpBilinear
WarpBilinearBack x
WarpBilinearQuad x

Cub2P

Cub

x

CR

La2

La3

x

x

SS

AA

ES

x *)

x
x
x

x *)

x

x *)

x

x
x

x

n/a

n/a

x

x

x

x

x

n/a

n/a

x

x

x

n/a

n/a

x

x

n/a

n/a

x

*) The function ippiResizeCubic supports the interpolation with two-parameter cubic filters, whereparameters B and C can be specified explicitly.
Here NN - nearest neighbor interpolation, Lin - linear interpolation, Cub2P - interpolation with twoparameter cubic filters, Cub - cubic interpolation, CR - Catmull-Rom spline, La2, La3 - interpolation with the
Lanczos window, SS - super sampling interpolation, AA - antialiasing, ES - edge smoothing.
The sections that follow provide more details on each interpolation mode.

Mathematical Notation
In this appendix the following notation is used:(xD,yD)

pixel coordinates in the destination image (integer values);(xS,yS)the computed coordinates of a point in the source image that is mapped exactlyto (xD, yD);

S(x,y)

pixel value (intensity) in the source image;D(x,y)

pixel value (intensity) in the destination image.

1723

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Nearest Neighbor Interpolation
This is the fastest and least accurate interpolation mode. The pixel value in the destination image is set tothe value of the source image pixel closest to the point(xS,yS):D(xD,yD) = S(round(xS), round(yS)).
To use the nearest neighbor interpolation, set the interpolation parameter to IPPI_INTER_NN or use thefunctions with the Nearest suffix (pass interpolation=ippNearest to GetSize functions).

Linear Interpolation
The linear interpolation is slower but more accurate than the nearest neighbor interpolation. On the other
hand, it is faster but less accurate than cubic interpolation. The linear interpolation algorithm uses source
image intensities at the four pixels (xS0, yS0), (xS1, yS0), (xS0, yS1), (xS1, yS1) that are closest to (xS, yS) in
the source image:
xS0 = int(xS), xS1 = xS0 + 1, yS0 = int(yS), yS1 = yS0 + 1.
First, the intensity values are interpolated along the x-axis to produce two intermediate results I0 and I1 (seeFigure Linear Interpolation):I0 = S(xS, yS0) = S(xS0, yS0)*(xS1 - xS) + S(xS1, yS0)*(xS - xS0)
I1 = S(xS, yS1) = S(xS0, yS1)*(xS1 - xS) + S(xS1, yS1)*(xS - xS0).
Then, the sought-for intensity D(xD, yD) is computed by interpolating the intermediate values I0 and I1 along
the y-axis:
D(xD, yD) = I0*(yS1 - yS) + I1*(yS - yS0).

1724

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

To use the linear interpolation, set the interpolation parameter to IPPI_INTER_LINEAR or use thefunctions with the Linear suffix (pass interpolation=ippLinear to GetSize functions). For images with
8-bit unsigned color channels, the ippiWarpAffine and ippiResizeLinear functions compute thecoordinates (xS, yS) with the accuracy 2-16 = 1/65536. For images with 16-bit unsigned color channels, thesefunctions compute the coordinates with floating-point precision.
Linear Interpolation

Cubic Interpolation
The cubic interpolation algorithm (see Figure Cubic Interpolation) uses source image intensities at sixteen
pixels in the neighborhood of the point (xS, yS) in the source image:
xS0 = int(xS) - 1; xS1 = xS0 + 1; xS2 = xS0 + 2; xS3 = xS0 + 3;
yS0 = int(yS) - 1; yS1 = yS0 + 1; yS2 = yS0 + 2;yS3 = yS0 + 3.
First, for each ySk the algorithm determines four cubic polynomials F0(x), F1( x), F2( x), and F3( x):Fk( x) = akx3 + bkx2 + ckx + dk, 0 ≤ k ≤ 3such thatFk( xS0) = S(xS0, ySk); Fk(xS1) = S(xS1, ySk),
Fk( xS2) = S(xS2, ySk); Fk( xS3) = S(xS3, ySk).
In Figure Cubic Interpolation , these polynomials are shown by solid curves.
Then, the algorithm determines a cubic polynomial Fy(y) such that
Fy(yS0) = F0( xS), Fy(yS1) = F1(xS), Fy(yS2) = F2(xS), Fy( yS3) = F3( xS).
The polynomial Fy(y) is represented by the dashed curve in Figure Cubic Interpolation.
Finally, the sought intensity D(xD, yD) is set to the value Fy(yS).

1725

1

Intel® Integrated Performance Primitives Developer Guide and Reference

To use the cubic interpolation, set the interpolation parameter to IPPI_INTER_CUBIC.
Cubic Interpolation

Super Sampling
If the destination image is much smaller than the source image, the other interpolation algorithms may skip
some pixels in the source image (that is, these algorithms not necessarily use all source pixels when
computing intensity of the destination pixels).
The super-sampling algorithm is as follows:
1.
2.

3.

Divide the source image rectangular ROI (or the whole image, if there is no ROI) into equal rectangles,
each rectangle corresponding to some pixel in the destination image. Note that each source pixel isrepresented by a 1x1 square.
Compute a weighted sum of source pixel values for all pixels that are in the rectangle or have a nonzero intersection with the rectangle. If a source pixel is fully contained in the rectangle, the value ofthat pixel is taken with weight 1. If the rectangle and the square of the source pixel have anintersection of area a < 1, that pixel's value is taken with weight a.
Figure Supersampling Weights shows the corresponding weight value for each source pixel intersectingwith the rectangle.
To compute the pixel value in the destination image, divide this weighted sum by the ratio of the sourceand destination rectangle areas SSrc/ SDst = 1/xFactor*yFactor.
Here xFactor, and yFactor are the parameters of the functions that specify the factors by which the x
and y dimensions of the source image ROI are changed.

Note that supersampling interpolation can be used only for xFactor<1, and yFactor<1.

1726

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

To use the supersampling interpolation, use the functions with the Super suffix (passinterpolation=ippSuper to GetSize functions).
Supersampling Weights

Lanczos Interpolation
This method is based on the 2-lobed or 3-lobed Lanczos window function as the interpolation function.

Interpolation with the 2-lobed Lanczos Window Function
The interpolation algorithm uses source image intensities at 16 pixels in the neighborhood of the point (xS,yS) in the source image:
xS0 = int(xS) - 1; xS1 = xS0 + 1; xS2 = xS0 + 2; xS3 = xS0 + 3;
yS0 = int(yS) - 1; yS1 = yS0 + 1; yS2 = yS0 + 2; yS3 = yS0 + 3;
First, the intensity values are interpolated along the x-axis to produce four intermediate results I0, I1, I2, I3:

Then the intensity D( xD, yD) is computed by interpolating the intermediate values Ik along the y-axis:

1727

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Here ai and bk are the coefficients defined asai = L(xS- xSi), bk = L(yS- ySi),
where L(x) is the Lanczos windowed sinc function:

To use this interpolation, use the ippiResizeLanczos function.

Interpolation with the 3-lobed Lanczos Window Function
The interpolation algorithm uses source image intensities at 36 pixels in the neighborhood of the point (xS,yS) in the source image:
xS0 = int(xS) - 2; xS1 = xS0 + 1; xS2 = xS0 + 2; xS3 = xS0 + 3; xS3 = xS0 + 4; xS3 = xS0 + 5;
yS0 = int(yS) - 2; yS1 = yS0 + 1; yS2 = yS0 + 2; yS3 = yS0 + 3; yS2 = yS0 + 4; yS2 = yS0 + 5;
First, the intensity values are interpolated along the x-axis to produce six intermediate results I0, I1, ... I5:Then the intensity D( xD, yD) is computed by interpolating the intermediate values Ik along the y-axis:

Here ai and bk are the coefficients defined asai = L(xS- xSi), bk = L(yS- ySi),
where L(x) is the Lanczos windowed sinc function:

1728

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

To use this interpolation, set the interpolation parameter to IPPI_INTER_LANCZOS, or use the functions
with the Lanczos suffix (pass interpolation=ippLanczos to GetSize functions).

Tricubic Interpolation
Short Description
The tricubic interpolation algorithm uses source image intensities at 64 pixels in the neighborhood of thepoint (xs, ys, zs) in the source image:First, for each zsk the algorithm determines 16 cubic polynomials Fnm(z), 0 ≤ m, n ≤ 15 :Fnm(z) = amnz3 + bnmz2 + cnmz + dnm
For fixed values zs , the function Fnm(zsnm) is equal to:

1729

1

Intel® Integrated Performance Primitives Developer Guide and Reference

There are sixteen points with fixed zs F00(z), F01(z), F02(z), F03(z), F10(z), F11(z), F12(z), F13(z), F20(z),F21(z), F22(z), F23(z), F30(z), F31(z), F32(z), F33(z). The need is to fix ys and xs. This situation is described in
the Cubic Interpolation, refer to this page to visualize the operation of the algorithm as well.

1730

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

To use the cubic interpolation, set the interpolation parameter to IPPI_INTER_CUBIC.

Trilinear Interpolation
The trilinear interpolation is slower but more accurate than the 3D neighbor interpolation. It is also faster but
less accurate than the tricubic interpolation. The trilinear interpolation algorithm uses source image
intensities at the eight pixels: (xs0, ys0, zs0), (xs0, ys0, zs1), (xs0, ys1, zs0), (xs0, ys1, zs1), (xs1, ys0, zs0), (xs1,ys0, zs1), (xs1, ys1, zs0), (xs1, ys1, zs1) that are the closest to (xs, ys, zs) in the source image:

1731

1

Intel® Integrated Performance Primitives Developer Guide and Reference

also with the conditions:First, the intensity values are interpolated along the x-axis to produce four intermediate results I0, I1, I2, I3 :Second, the intensity values are interpolated along the y-axis using the intermediate value I0, I1, I2, I3:

Then, the sought-for intensity D(xD, yD, zD) = T0 (zs1-zs) + T1(zs-zs0)
To use the linear interpolation, set theinterpolation parameter to IPPI_INTER_LINEARor use thefunctions with the Linear suffix (passinterpolation = ippLinear to GetSize functions).
To visualize the operation of the algorithm, look at the Linear interpolation page .

Interpolation with Two-Parameter Cubic Filters
The two-parameter family of cubic filters have kernels of the form:

1732

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

where B and C are two parameters; their variations give different approximation.
These interpolation methods additionally filter the output to improve quality of an image.
To get more information about how B and C values affect the result, refer to [Mitchell88].
Interpolation with two parameter cubic filters is presented as following functions:•••

B-spline
Catmull-Rom spline
Special two parameters filter

B-spline
B-spline is a more general type of curve than Bezier curves. This spline function has the smallest support fora given degree, order of smoothness, and domain partitioning.
ParametersBand C are equal to 1 and 0 respectively.

To use the interpolation with two-parameter cubic filters, set the interpolation parameter to

IPPI_INTER_CUBIC2P_BSPLINE.
To learn more about B-splines, refer to ScrewBender

Catmull-Rom Spline
The Catmull-Rom spline is a kind of cubic Hermite spline. Its peculiarity is that the interpolated function is
given not only by its values at points but also by its first derivatives .
Parameters B and C are equal to 0 and 0.5 respectively.

These interpolation methods additionally filter the output to improve the quality of an image.
To use the interpolation with two-parameter cubic filters, set the interpolation parameter
IPPI_INTER_CUBIC2P_CATMULLROM.

1733

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Special Two-Parameters Filter
Parameters B and C are equal to 0.5 and 0.3 respectively.

To use the interpolation with two-parameter cubic filters, set the interpolation parameter
IPPI_INTER_CUBIC2P_ B05C03 .

Appendix C: Removed Functions for Image and Video Processing
This appendix contains tables that list the functions removed from Intel IPP 9.0. If an application createdwith the previous versions calls a function listed here, then the source code must be modified. The tables
specify the corresponding Intel IPP 9.0 functions or workaround to replace the removed functions:
•
•
•
•
•

ippcc.hippcv.hippi.hippj.h - the whole domain is removed
ippvc.h - the whole domain is removed
NOTE
To get information on possible alternatives to the removed functions that do not have substitution or
workaround in Intel IPP , refer to https://software.intel.com/en-us/articles/the-alternatives-for-intelipp-legacy-domains-and-functions or file a support request at Online Service Center.

ippcc.h:Removed from 9.0

Substitution or WorkaroundippiBGR555ToYCbCr411_16u8u_C3P3R

N/A

ippiBGR555ToYCbCr420_16u8u_C3P3R

N/A

ippiBGR555ToYCbCr422_16u8u_C3C2R

N/A

ippiBGR555ToYCbCr422_16u8u_C3P3R

N/A

ippiBGR555ToYCrCb420_16u8u_C3P3R

N/A

ippiBGR555ToYUV420_16u8u_C3P3R

N/A

ippiBGR565ToBGR_16u8u_C3R

N/A

ippiBGR565ToYCbCr411_16u8u_C3P3R

N/A

ippiBGR565ToYCbCr420_16u8u_C3P3R

N/A

ippiBGR565ToYCbCr422_16u8u_C3C2R

N/A

ippiBGR565ToYCbCr422_16u8u_C3P3R

N/A

1734

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Removed from 9.0

Substitution or WorkaroundippiBGR565ToYCrCb420_16u8u_C3P3R

N/A

ippiBGR565ToYUV420_16u8u_C3P3R

N/A

ippiBGRToBGR565_8u16u_C3R

N/A

ippiColorTwist32f_8s_AC4IR

8s is not supported anymore, use another data typeippiColorTwist32f_8s_AC4R

8s is not supported anymore, use another data typeippiColorTwist32f_8s_C3IR

8s is not supported anymore, use another data typeippiColorTwist32f_8s_C3R

8s is not supported anymore, use another data typeippiColorTwist32f_8s_IP3R

8s is not supported anymore, use another data typeippiColorTwist32f_8s_P3R

8s is not supported anymore, use another data typeippiRGB565ToRGB_16u8u_C3R

N/A

ippiRGB565ToYUV420_16u8u_C3P3R

N/A

ippiRGB565ToYUV422_16u8u_C3P3R

N/A

ippiRGBToRGB565_8u16u_C3R

N/A

ippiYCbCr411ToBGR555_8u16u_P3C3R

N/A

ippiYCbCr411ToBGR565_8u16u_P3C3R

N/A

ippiYCbCr420ToBGR444Dither_8u16u_P3C3R

N/A

ippiYCbCr420ToBGR444_8u16u_P3C3R

N/A

ippiYCbCr420ToBGR555Dither_8u16u_P3C3R

N/A

ippiYCbCr420ToBGR555_8u16u_P3C3R

N/A

ippiYCbCr420ToBGR565Dither_8u16u_P3C3R

N/A

ippiYCbCr420ToBGR565_8u16u_P3C3R

N/A

ippiYCbCr420ToRGB444Dither_8u16u_P3C3R

N/A

ippiYCbCr420ToRGB444_8u16u_P3C3R

N/A

ippiYCbCr420ToRGB555Dither_8u16u_P3C3R

N/A

ippiYCbCr420ToRGB555_8u16u_P3C3R

N/A

ippiYCbCr420ToRGB565Dither_8u16u_P3C3R

N/A

ippiYCbCr420ToRGB565_8u16u_P3C3R

N/A

ippiYCbCr422ToBGR444Dither_8u16u_C2C3R

N/A

ippiYCbCr422ToBGR444Dither_8u16u_P3C3R

N/A

ippiYCbCr422ToBGR444_8u16u_C2C3R

N/A

ippiYCbCr422ToBGR444_8u16u_P3C3R

N/A

1735

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippiYCbCr422ToBGR555Dither_8u16u_C2C3R

N/A

ippiYCbCr422ToBGR555Dither_8u16u_P3C3R

N/A

ippiYCbCr422ToBGR555_8u16u_C2C3R

N/A

ippiYCbCr422ToBGR555_8u16u_P3C3R

N/A

ippiYCbCr422ToBGR565Dither_8u16u_C2C3R

N/A

ippiYCbCr422ToBGR565Dither_8u16u_P3C3R

N/A

ippiYCbCr422ToBGR565_8u16u_C2C3R

N/A

ippiYCbCr422ToBGR565_8u16u_P3C3R

N/A

ippiYCbCr422ToRGB444Dither_8u16u_C2C3R

N/A

ippiYCbCr422ToRGB444Dither_8u16u_P3C3R

N/A

ippiYCbCr422ToRGB444_8u16u_C2C3R

N/A

ippiYCbCr422ToRGB444_8u16u_P3C3R

N/A

ippiYCbCr422ToRGB555Dither_8u16u_C2C3R

N/A

ippiYCbCr422ToRGB555Dither_8u16u_P3C3R

N/A

ippiYCbCr422ToRGB555_8u16u_C2C3R

N/A

ippiYCbCr422ToRGB555_8u16u_P3C3R

N/A

ippiYCbCr422ToRGB565Dither_8u16u_C2C3R

N/A

ippiYCbCr422ToRGB565Dither_8u16u_P3C3R

N/A

ippiYCbCr422ToRGB565_8u16u_C2C3R

N/A

ippiYCbCr422ToRGB565_8u16u_P3C3R

N/A

ippiYCbCrToBGR444Dither_8u16u_C3R

N/A

ippiYCbCrToBGR444Dither_8u16u_P3C3R

N/A

ippiYCbCrToBGR444_8u16u_C3R

N/A

ippiYCbCrToBGR444_8u16u_P3C3R

N/A

ippiYCbCrToBGR555Dither_8u16u_C3R

N/A

ippiYCbCrToBGR555Dither_8u16u_P3C3R

N/A

ippiYCbCrToBGR555_8u16u_C3R

N/A

ippiYCbCrToBGR555_8u16u_P3C3R

N/A

ippiYCbCrToBGR565Dither_8u16u_C3R

N/A

ippiYCbCrToBGR565Dither_8u16u_P3C3R

N/A

ippiYCbCrToBGR565_8u16u_C3R

N/A

1736

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippiYCbCrToBGR565_8u16u_P3C3R

N/A

ippiYCbCrToRGB444Dither_8u16u_C3R

N/A

ippiYCbCrToRGB444Dither_8u16u_P3C3R

N/A

ippiYCbCrToRGB444_8u16u_C3R

N/A

ippiYCbCrToRGB444_8u16u_P3C3R

N/A

ippiYCbCrToRGB555Dither_8u16u_C3R

N/A

ippiYCbCrToRGB555Dither_8u16u_P3C3R

N/A

ippiYCbCrToRGB555_8u16u_C3R

N/A

ippiYCbCrToRGB555_8u16u_P3C3R

N/A

ippiYCbCrToRGB565Dither_8u16u_C3R

N/A

ippiYCbCrToRGB565Dither_8u16u_P3C3R

N/A

ippiYCbCrToRGB565_8u16u_C3R

N/A

ippiYCbCrToRGB565_8u16u_P3C3R

N/A

ippiYUV420ToBGR444Dither_8u16u_P3C3R

N/A

ippiYUV420ToBGR444_8u16u_P3C3R

N/A

ippiYUV420ToBGR555Dither_8u16u_P3C3R

N/A

ippiYUV420ToBGR555_8u16u_P3C3R

N/A

ippiYUV420ToBGR565Dither_8u16u_P3C3R

N/A

ippiYUV420ToBGR565_8u16u_P3C3R

N/A

ippiYUV420ToRGB444Dither_8u16u_P3C3R

N/A

ippiYUV420ToRGB444_8u16u_P3C3R

N/A

ippiYUV420ToRGB555Dither_8u16u_P3C3R

N/A

ippiYUV420ToRGB555_8u16u_P3C3R

N/A

ippiYUV420ToRGB565Dither_8u16u_P3C3R

N/A

ippiYUV420ToRGB565_8u16u_P3C3R

N/A

1

ippcv.h:Removed from 9.0

Substitution or WorkaroundippiAddProduct_8s32f_C1IMR

8s is not supported anymore, use another data typeippiAddProduct_8s32f_C1IR

8s is not supported anymore, use another data typeippiAddSquare_8s32f_C1IMR

8s is not supported anymore, use another data type

1737

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippiAddSquare_8s32f_C1IR

8s is not supported anymore, use another data typeippiAddWeighted_8s32f_C1IMR

8s is not supported anymore, use another data typeippiAddWeighted_8s32f_C1IR

8s is not supported anymore, use another data typeippiAdd_8s32f_C1IMR

8s is not supported anymore, use another data typeippiAdd_8s32f_C1IR

8s is not supported anymore, use another data typeippiDilateBorderReplicate_32f_C1R

ippiDilateBorder_32f_C1R

ippiDilateBorderReplicate_32f_C3R

ippiDilateBorder_32f_C3R

ippiDilateBorderReplicate_32f_C4R

ippiDilateBorder_32f_C4R

ippiDilateBorderReplicate_8u_C1R

ippiDilateBorder_8u_C1R

ippiDilateBorderReplicate_8u_C3R

ippiDilateBorder_8u_C3R

ippiDilateBorderReplicate_8u_C4R

ippiDilateBorder_8u_C4R

ippiErodeBorderReplicate_32f_C1R

ippiErodeBorder_32f_C1R

ippiErodeBorderReplicate_32f_C3R

ippiErodeBorder_32f_C3R

ippiErodeBorderReplicate_32f_C4R

ippiErodeBorder_32f_C4R

ippiErodeBorderReplicate_8u_C1R

ippiErodeBorder_8u_C1R

ippiErodeBorderReplicate_8u_C3R

ippiErodeBorder_8u_C3R

ippiErodeBorderReplicate_8u_C4R

ippiErodeBorder_8u_C4R

ippiFilterGaussBorder_32f_C1R

ippiFilterGaussianBorder_32f_C1R

ippiFilterGaussGetBufferSize_32f_C1R

ippiFilterGaussianGetBufferSize

ippiFilterLaplacianBorder_8u8s_C1R

8s data type is not supported anymore - use
another data typeippiFilterLaplacianGetBufferSize_8u8s_C1R

8s data type is not supported anymore - use
another data typeippiFilterMaxBorderReplicate_32f_C1R

ippiFilterMaxBorder_32f_C1R

ippiFilterMaxBorderReplicate_32f_C3R

ippiFilterMaxBorder_32f_C3R

ippiFilterMaxBorderReplicate_32f_C4R

ippiFilterMaxBorder_32f_C4R

ippiFilterMaxBorderReplicate_8u_C1R

ippiFilterMaxBorder_8u_C1R

ippiFilterMaxBorderReplicate_8u_C3R

ippiFilterMaxBorder_8u_C3R

ippiFilterMaxBorderReplicate_8u_C4R

ippiFilterMaxBorder_8u_C4R

ippiFilterMaxGetBufferSize_32f_C1R

ippiFilterMaxBorderGetBufferSize with
dataType=32f and numChannels=1

1738

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

ippiFilterMaxGetBufferSize_32f_C3R

1

Substitution or WorkaroundippiFilterMaxBorderGetBufferSize with
dataType=32f and numChannels=3

ippiFilterMaxGetBufferSize_32f_C4R

ippiFilterMaxBorderGetBufferSize with
dataType=32f and numChannels=4

ippiFilterMaxGetBufferSize_8u_C1R

ippiFilterMaxBorderGetBufferSize with
dataType=8u and numChannels=1

ippiFilterMaxGetBufferSize_8u_C3R

ippiFilterMaxBorderGetBufferSize with
dataType=8u and numChannels=3

ippiFilterMaxGetBufferSize_8u_C4R

ippiFilterMaxBorderGetBufferSize with
dataType=8u and numChannels=4

ippiFilterMinBorderReplicate_32f_C1R

ippiFilterMinBorder_32f_C1R

ippiFilterMinBorderReplicate_32f_C3R

ippiFilterMinBorder_32f_C3R

ippiFilterMinBorderReplicate_32f_C4R

ippiFilterMinBorder_32f_C4R

ippiFilterMinBorderReplicate_8u_C1R

ippiFilterMinBorder_8u_C1R

ippiFilterMinBorderReplicate_8u_C3R

ippiFilterMinBorder_8u_C3R

ippiFilterMinBorderReplicate_8u_C4R

ippiFilterMinBorder_8u_C4R

ippiFilterMinGetBufferSize_32f_C1R

ippiFilterMinBorderGetBufferSize with
dataType=32f and numChannels=1

ippiFilterMinGetBufferSize_32f_C3R

ippiFilterMinBorderGetBufferSize with
dataType=32f and numChannels=3

ippiFilterMinGetBufferSize_32f_C4R

ippiFilterMinBorderGetBufferSize with
dataType=32f and numChannels=4

ippiFilterMinGetBufferSize_8u_C1R

ippiFilterMinBorderGetBufferSize with
dataType=8u and numChannels=1

ippiFilterMinGetBufferSize_8u_C3R

ippiFilterMinBorderGetBufferSize with
dataType=8u and numChannels=3

ippiFilterMinGetBufferSize_8u_C4R

ippiFilterMinBorderGetBufferSize with
dataType=8u and numChannels=4

ippiFilterScharrHorizBorder_32f_C1R

ippiFilterScharrHorizMaskBorder_32f_C1R
from the ippIP domain

ippiFilterScharrHorizBorder_8u16s_C1R

ippiFilterScharrHorizMaskBorderGetBufferSize
from the ippIP domain

ippiFilterScharrHorizBorder_8u8s_C1R

8s data type is not supported anymore - use
another data typeippiFilterScharrHorizGetBufferSize_32f_C1R ippiFilterScharrHorizMaskBorderGetBufferSize
from the ippIP domain

1739

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippiFilterScharrHorizGetBufferSize_8u16s_C1RippiFilterScharrHorizMaskBorderGetBufferSize
from the ippIP domain
ippiFilterScharrHorizGetBufferSize_8u8s_C1R 8s data type is not supported anymore - use
another data typeippiFilterScharrVertBorder_32f_C1R

ippiFilterScharrVertMaskBorder_32f_C1R
from the ippIP domain

ippiFilterScharrVertBorder_8u16s_C1R

ippiFilterScharrVertMaskBorderGetBufferSize
from the ippIP domain

ippiFilterScharrVertBorder_8u8s_C1R

8s data type is not supported anymore - use
another data typeippiFilterScharrVertGetBufferSize_32f_C1R

ippiFilterScharrVertMaskBorderGetBufferSize
from the ippIP domain

ippiFilterScharrVertGetBufferSize_8u16s_C1R ippiFilterScharrVertMaskBorderGetBufferSize
from the ippIP domain

ippiFilterScharrVertGetBufferSize_8u8s_C1R 8s data type is not supported anymore - use
another data typeippiFilterSobelCrossBorder_8u8s_C1R

8s data type is not supported anymore - use
another data typeippiFilterSobelCrossGetBufferSize_8u8s_C1R 8s data type is not supported anymore - use
another data typeippiFilterSobelHorizBorder_8u8s_C1R

8s data type is not supported anymore - use
another data typeippiFilterSobelHorizGetBufferSize_8u8s_C1R 8s data type is not supported anymore - use
another data typeippiFilterSobelHorizSecondBorder_32f_C1R

ippiFilterSobelHorizSecondBorder_32f_C1R
from the ippIP domain

ippiFilterSobelHorizSecondBorder_8u16s_C1R ippiFilterSobelHorizSecondBorderGetBufferSize
from the ippIP domain
ippiFilterSobelHorizSecondBorder_8u8s_C1R

8s data type is not supported anymore - use
another data typeippiFilterSobelHorizSecondGetBufferSize_32f_C1R
ippiFilterSobelHorizSecondBorderGetBufferSize
from the ippIP domain
ippiFilterSobelHorizSecondGetBufferSize_8u16s_C1R
ippiFilterSobelHorizSecondBorderGetBufferSize
ippiFilterSobelHorizSecondGetBufferSize_8u8s_C1R
8s data type is not supported anymore - use
another data typeippiFilterSobelNegVertBorder_32f_C1R

1740

ippiFilterSobelNegVertBorder_32f_C1R fromthe ippIP domain

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

ippiFilterSobelNegVertBorder_8u16s_C1R1

Substitution or WorkaroundippiFilterSobelNegVertBorderGetBufferSize
from the ippIP domain

ippiFilterSobelNegVertBorder_8u8s_C1R

8s data type is not supported anymore - use
another data typeippiFilterSobelNegVertGetBufferSize_32f_C1R ippiFilterSobelNegVertBorderGetBufferSize
from the ippIP domain

ippiFilterSobelNegVertGetBufferSize_8u16s_C1R
ippiFilterSobelNegVertBorderGetBufferSize
from the ippIP domain
ippiFilterSobelNegVertGetBufferSize_8u8s_C1R8s data type is not supported anymore - use
another data typeippiFilterSobelVertBorder_8u8s_C1R

8s data type is not supported anymore - use
another data typeippiFilterSobelVertGetBufferSize_8u8s_C1R

8s data type is not supported anymore - use
another data typeippiFilterSobelVertSecondBorder_32f_C1R

ippiFilterSobelVertSecondBorder_32f_C1R
from the ippIP domain

ippiFilterSobelVertSecondBorder_8u16s_C1R

ippiFilterSobelVertSecondBorderGetBufferSize
from the ippIP domain

ippiFilterSobelVertSecondBorder_8u8s_C1R

8s data type is not supported anymore - use
another data typeippiFilterSobelVertSecondGetBufferSize_32f_C1R
ippiFilterSobelVertSecondBorderGetBufferSize
from the ippIP domain
ippiFilterSobelVertSecondGetBufferSize_8u16s_C1R
ippiFilterSobelVertSecondBorderGetBufferSize
ippiFilterSobelVertSecondGetBufferSize_8u8s_C1R
8s data type is not supported anymore - use
another data typeippiForegroundGaussianFree_8u_C1R

N/A

ippiForegroundGaussianFree_8u_C3R

N/A

ippiForegroundGaussianInitAlloc_8u_C1R

N/A

ippiForegroundGaussianInitAlloc_8u_C3R

N/A

ippiForegroundGaussian_8u_C1R

N/A

ippiForegroundGaussian_8u_C3R

N/A

ippiForegroundHistogramFree_8u_C1R

N/A

ippiForegroundHistogramFree_8u_C3R

N/A

ippiForegroundHistogramInitAlloc_8u_C1R

N/A

ippiForegroundHistogramInitAlloc_8u_C3R

N/A

1741

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippiForegroundHistogramUpdate_8u_C1R

N/A

ippiForegroundHistogramUpdate_8u_C3R

N/A

ippiForegroundHistogram_8u_C1R

N/A

ippiForegroundHistogram_8u_C3R

N/A

ippiHaarClassifierFree_32f

ippFreeippiHaarClassifierFree_32s

ippFreeippiHaarClassifierInitAlloc_32f

ippiHaarClassifierGetSize+ippMalloc+ippiHaarClassifierInit_32f

ippiHaarClassifierInitAlloc_32s

ippiHaarClassifierGetSize+ippMalloc+ippiHaarClassifierInit_32s

ippiInpaintFree_8u_C1R

ippFreeippiInpaintFree_8u_C3R

ippFreeippiInpaintInitAlloc_8u_C1R

ippiInpaintGetSize+ippMalloc+ippiInpaintInit_8u_C1R

ippiInpaintInitAlloc_8u_C3R

ippiInpaintGetSize+ippMalloc+ippiInpaintInit_8u_C3R

ippiMean_8s_C1MR

8s data type is not supported anymore - use
another data typeippiMean_8s_C3CMR

8s data type is not supported anymore - use
another data typeippiMean_StdDev_8s_C1MR

8s data type is not supported anymore - use
another data typeippiMean_StdDev_8s_C1R

8s data type is not supported anymore - use
another data typeippiMean_StdDev_8s_C3CMR

8s data type is not supported anymore - use
another data typeippiMean_StdDev_8s_C3CR

8s data type is not supported anymore - use
another data typeippiMinMaxIndx_8s_C1MR

8s data type is not supported anymore - use
another data typeippiMinMaxIndx_8s_C1R

8s data type is not supported anymore - use
another data typeippiMinMaxIndx_8s_C3CMR

8s data type is not supported anymore - use
another data typeippiMinMaxIndx_8s_C3CR

8s data type is not supported anymore - use
another data type

1742

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippiMorphAdvFree

ippFreeippiMorphAdvInitAlloc_32f_C1R

ippiMorphAdvGetSize_32f_C1R+ippMalloc+ippiMorphAdvInit_32f_C1R

ippiMorphAdvInitAlloc_32f_C3R

ippiMorphAdvGetSize_32f_C3R+ippMalloc+ippiMorphAdvInit_32f_C3R

ippiMorphAdvInitAlloc_32f_C4R

ippiMorphAdvGetSize_32f_C4R+ippMalloc+ippiMorphAdvInit_32f_C4R

ippiMorphAdvInitAlloc_8u_C1R

ippiMorphAdvGetSize_8u_C1R+ippMalloc+ippiMorphAdvInit_8u_C1R

ippiMorphAdvInitAlloc_8u_C3R

ippiMorphAdvGetSize_8u_C3R+ippMalloc+ippiMorphAdvInit_8u_C3R

ippiMorphAdvInitAlloc_8u_C4R

ippiMorphAdvGetSize_8u_C4R+ippMalloc+ippiMorphAdvInit_8u_C4R

ippiMorphGrayFree_32f_C1R

ippFreeippiMorphGrayFree_8u_C1R

ippFreeippiMorphGrayInitAlloc_32f_C1R

ippiMorphGrayGetSize_32f_C1R+ippMalloc+ippiMorphGrayInit_32f_C1R

ippiMorphGrayInitAlloc_8u_C1R

ippiMorphGrayGetSize_8u_C1R+ippMalloc+ippiMorphGrayInit_8u_C1R

ippiMorphReconstructGetBufferSize_16u_C1

Use new ippiMorphReconstructGetBufferSize

ippiMorphReconstructGetBufferSize_32f_C1

Use new ippiMorphReconstructGetBufferSize

ippiMorphReconstructGetBufferSize_64f_C1

Use new ippiMorphReconstructGetBufferSize

ippiMorphReconstructGetBufferSize_8u_C1

Use new ippiMorphReconstructGetBufferSize

ippiMorphologyFree

ippFreeippiMorphologyGetSize_32f_C1R

ippiMorphologyBorderGetSize_32f_C1R

ippiMorphologyGetSize_32f_C3R

ippiMorphologyBorderGetSize_32f_C3R

ippiMorphologyGetSize_32f_C4R

ippiMorphologyBorderGetSize_32f_C4R

ippiMorphologyGetSize_8u_C1R

ippiMorphologyBorderGetSize_8u_C1R

ippiMorphologyGetSize_8u_C3R

ippiMorphologyBorderGetSize_8u_C3R

ippiMorphologyGetSize_8u_C4R

ippiMorphologyBorderGetSize_8u_C4R

ippiMorphologyInitAlloc_32f_C1R

ippiMorphologyBorderGetSize_32f_C1R+ippMalloc_8u+ippiMorphologyBorderInit_32f_C1R

1743

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

ippiMorphologyInitAlloc_32f_C3R

Substitution or WorkaroundippiMorphologyBorderGetSize_32f_C3R+ippMalloc_8u+ippiMorphologyBorderInit_32f_C3R

ippiMorphologyInitAlloc_32f_C4R

ippiMorphologyBorderGetSize_32f_C4R+ippMalloc_8u+ippiMorphologyBorderInit_32f_C4R

ippiMorphologyInitAlloc_8u_C1R

ippiMorphologyBorderGetSize_8u_C1R+ippMalloc_8u+ippiMorphologyBorderInit_8u_C1R

ippiMorphologyInitAlloc_8u_C3R

ippiMorphologyBorderGetSize_8u_C3R+ippMalloc_8u+ippiMorphologyBorderInit_8u_C3R

ippiMorphologyInitAlloc_8u_C4R

ippiMorphologyBorderGetSize_8u_C4R+ippMalloc_8u+ippiMorphologyBorderInit_8u_C4R

ippiMorphologyInit_32f_C1R

ippiMorphologyBorderInit_32f_C1R

ippiMorphologyInit_32f_C3R

ippiMorphologyBorderInit_32f_C3R

ippiMorphologyInit_32f_C4R

ippiMorphologyBorderInit_32f_C4R

ippiMorphologyInit_8u_C1R

ippiMorphologyBorderInit_8u_C1R

ippiMorphologyInit_8u_C3R

ippiMorphologyBorderInit_8u_C3R

ippiMorphologyInit_8u_C4R

ippiMorphologyBorderInit_8u_C4R

ippiNormDiff_Inf_8s_C1MR

8s data type is not supported anymore - use
another data typeippiNormDiff_Inf_8s_C3CMR

8s data type is not supported anymore - use
another data typeippiNormDiff_L1_8s_C1MR

8s data type is not supported anymore - use
another data typeippiNormDiff_L1_8s_C3CMR

8s data type is not supported anymore - use
another data typeippiNormDiff_L2_8s_C1MR

8s data type is not supported anymore - use
another data typeippiNormDiff_L2_8s_C3CMR

8s data type is not supported anymore - use
another data typeippiNormRel_Inf_8s_C1MR

8s data type is not supported anymore - use
another data typeippiNormRel_Inf_8s_C3CMR

8s data type is not supported anymore - use
another data type1744

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippiNormRel_L1_8s_C1MR

8s data type is not supported anymore - use
another data typeippiNormRel_L1_8s_C3CMR

8s data type is not supported anymore - use
another data typeippiNormRel_L2_8s_C1MR

8s data type is not supported anymore - use
another data typeippiNormRel_L2_8s_C3CMR

8s data type is not supported anymore - use
another data typeippiNorm_Inf_8s_C1MR

8s data type is not supported anymore - use
another data typeippiNorm_Inf_8s_C3CMR

8s data type is not supported anymore - use
another data typeippiNorm_L1_8s_C1MR

8s data type is not supported anymore - use
another data typeippiNorm_L1_8s_C3CMR

8s data type is not supported anymore - use
another data typeippiNorm_L2_8s_C1MR

8s data type is not supported anymore - use
another data typeippiNorm_L2_8s_C3CMR

8s data type is not supported anymore - use
another data typeippiOpticalFlowPyrLKFree_16u_C1R

ippFreeippiOpticalFlowPyrLKFree_32f_C1R

ippFreeippiOpticalFlowPyrLKFree_8u_C1R

ippFreeippiOpticalFlowPyrLKInitAlloc_16u_C1R

ippiOpticalFlowPyrLKGetSize (with 16u
dataType)+ippMalloc+ippiOpticalFlowPyrLKInit_16u_C1R

ippiOpticalFlowPyrLKInitAlloc_32f_C1R

ippiOpticalFlowPyrLKGetSize (with 32f
dataType)+ippMalloc+ippiOpticalFlowPyrLKInit_32f_C1R

ippiOpticalFlowPyrLKInitAlloc_8u_C1R

ippiOpticalFlowPyrLKGetSize (with 8u
dataType)+ippMalloc+ippiOpticalFlowPyrLKInit_8u_C1R

ippiPyrDownGetBufSize_Gauss5x5

ippiPyramidLayerDownGetSize_8u_C1R

ippiPyrDown_Gauss5x5_32f_C1R

ippiPyramidLayerDown_32f_C1R

ippiPyrDown_Gauss5x5_32f_C3R

ippiPyramidLayerDown_32f_C3R

ippiPyrDown_Gauss5x5_8s_C1R

8s data type is not supported anymore - use
another data type

1

1745

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippiPyrDown_Gauss5x5_8s_C3R

8s data type is not supported anymore - use
another data typeippiPyrDown_Gauss5x5_8u_C1R

ippiPyramidLayerDown_8u_C1R

ippiPyrDown_Gauss5x5_8u_C3R

ippiPyramidLayerDown_8u_C3R

ippiPyrUpGetBufSize_Gauss5x5

ippiPyramidLayerUpGetSize_8u_C1R

ippiPyrUp_Gauss5x5_32f_C1R

ippiPyramidLayerUp_32f_C1R

ippiPyrUp_Gauss5x5_32f_C3R

ippiPyramidLayerUp_32f_C3R

ippiPyrUp_Gauss5x5_8s_C1R

8s data type is not supported anymore - use
another data typeippiPyrUp_Gauss5x5_8s_C3R

8s data type is not supported anymore - use
another data typeippiPyrUp_Gauss5x5_8u_C1R

ippiPyramidLayerUp_8u_C1R

ippiPyrUp_Gauss5x5_8u_C3R

ippiPyramidLayerUp_8u_C3R

ippiPyramidFree

ippFreeippiPyramidInitAlloc

ippiPyramidGetSize+ippiPyramidInit

ippiPyramidLayerDownFree_16u_C1R

ippFreeippiPyramidLayerDownFree_16u_C3R

ippFreeippiPyramidLayerDownFree_32f_C1R

ippFreeippiPyramidLayerDownFree_32f_C3R

ippFreeippiPyramidLayerDownFree_8u_C1R

ippFreeippiPyramidLayerDownFree_8u_C3R

ippFreeippiPyramidLayerDownInitAlloc_16u_C1R

ippiPyramidLayerDownGetSize_16u_C1R+ippMalloc+ippiPyramidLayerDownInit_16u_C1R

ippiPyramidLayerDownInitAlloc_16u_C3R

ippiPyramidLayerDownGetSize_16u_C3R+ippMalloc+ippiPyramidLayerDownInit_16u_C3R

ippiPyramidLayerDownInitAlloc_32f_C1R

ippiPyramidLayerDownGetSize_32f_C1R+ippMalloc+ippiPyramidLayerDownInit_32u_C1R

ippiPyramidLayerDownInitAlloc_32f_C3R

ippiPyramidLayerDownGetSize_32f_C3R+ippMalloc+ippiPyramidLayerDownInit_32f_C3R

1746

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

ippiPyramidLayerDownInitAlloc_8u_C1R1

Substitution or WorkaroundippiPyramidLayerDownGetSize_8u_C1R+ippMalloc+ippiPyramidLayerDownInit_8u_C1R

ippiPyramidLayerDownInitAlloc_8u_C3R

ippiPyramidLayerDownGetSize_8u_C3R+ippMalloc+ippiPyramidLayerDownInit_8u_C3R

ippiPyramidLayerUpFree_16u_C1R

ippFreeippiPyramidLayerUpFree_16u_C3R

ippFreeippiPyramidLayerUpFree_32f_C1R

ippFreeippiPyramidLayerUpFree_32f_C3R

ippFreeippiPyramidLayerUpFree_8u_C1R

ippFreeippiPyramidLayerUpFree_8u_C3R

ippFreeippiPyramidLayerUpInitAlloc_16u_C1R

ippiPyramidLayerUpGetSize_16u_C1R+ippMalloc+ippiPyramidLayerUpInit_16u_C1R

ippiPyramidLayerUpInitAlloc_16u_C3R

ippiPyramidLayerUpGetSize_16u_C3R+ippMalloc+ippiPyramidLayerUpInit_16u_C3R

ippiPyramidLayerUpInitAlloc_32f_C1R

ippiPyramidLayerUpGetSize_32f_C1R+ippMalloc+ippiPyramidLayerUpInit_32u_C1R

ippiPyramidLayerUpInitAlloc_32f_C3R

ippiPyramidLayerUpGetSize_32f_C3R+ippMalloc+ippiPyramidLayerUpInit_32f_C3R

ippiPyramidLayerUpInitAlloc_8u_C1R

ippiPyramidLayerUpGetSize_8u_C1R+ippMalloc+ippiPyramidLayerUpInit_8u_C1R

ippiPyramidLayerUpInitAlloc_8u_C3R

ippiPyramidLayerUpGetSize_8u_C3R+ippMalloc+ippiPyramidLayerUpInit_8u_C3R

ippiSRHNCalcResidual_PSF2x2_16u32f_C1R

N/A

ippiSRHNCalcResidual_PSF2x2_8u32f_C1R

N/A

ippiSRHNCalcResidual_PSF3x3_16u32f_C1R

N/A

ippiSRHNCalcResidual_PSF3x3_8u32f_C1R

N/A

ippiSRHNFree_PSF2x2

N/A

ippiSRHNFree_PSF3x3

N/A

ippiSRHNInitAlloc_PSF2x2

N/A

1747

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippiSRHNInitAlloc_PSF3x3

N/A

ippiSRHNUpdateGradient_PSF2x2_32f_C1R

N/A

ippiSRHNUpdateGradient_PSF3x3_32f_C1R

N/A

ippiTiltedHaarClassifierInitAlloc_32f

ippiHaarClassifierGetSize+ippMalloc+ippiTiltedHaarClassifierInit_32f

ippiTiltedHaarClassifierInitAlloc_32s

ippiHaarClassifierGetSize+ippMalloc+ippiTiltedHaarClassifierInit_32s

ippibFastArctan_32f

ippsAtan_32f_A11

ippi.h:Removed from 9.0

Substitution or WorkaroundippiAddC_16sc_AC4IRSfs

N/A

ippiAddC_16sc_AC4RSfs

N/A

ippiAddC_16sc_C1IRSfs

N/A

ippiAddC_16sc_C1RSfs

N/A

ippiAddC_16sc_C3IRSfs

N/A

ippiAddC_16sc_C3RSfs

N/A

ippiAddC_32fc_AC4IR

N/A

ippiAddC_32fc_AC4R

N/A

ippiAddC_32fc_C1IR

N/A

ippiAddC_32fc_C1R

N/A

ippiAddC_32fc_C3IR

N/A

ippiAddC_32fc_C3R

N/A

ippiAddC_32sc_AC4IRSfs

N/A

ippiAddC_32sc_AC4RSfs

N/A

ippiAddC_32sc_C1IRSfs

N/A

ippiAddC_32sc_C1RSfs

N/A

ippiAddC_32sc_C3IRSfs

N/A

ippiAddC_32sc_C3RSfs

N/A

ippiAddRandGauss_Direct_16s_AC4IR

ippiAddRandGauss_16s_AC4IR

ippiAddRandGauss_Direct_16s_C1IR

ippiAddRandGauss_16s_C1IR

ippiAddRandGauss_Direct_16s_C3IR

ippiAddRandGauss_16s_C3IR

1748

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippiAddRandGauss_Direct_16s_C4IR

ippiAddRandGauss_16s_C4IR

ippiAddRandGauss_Direct_16u_AC4IR

ippiAddRandGauss_16u_AC4IR

ippiAddRandGauss_Direct_16u_C1IR

ippiAddRandGauss_16u_C1IR

ippiAddRandGauss_Direct_16u_C3IR

ippiAddRandGauss_16u_C3IR

ippiAddRandGauss_Direct_16u_C4IR

ippiAddRandGauss_16u_C4IR

ippiAddRandGauss_Direct_32f_AC4IR

ippiAddRandGauss_32f_AC4IR

ippiAddRandGauss_Direct_32f_C1IR

ippiAddRandGauss_32f_C1IR

ippiAddRandGauss_Direct_32f_C3IR

ippiAddRandGauss_32f_C3IR

ippiAddRandGauss_Direct_32f_C4IR

ippiAddRandGauss_32f_C4IR

ippiAddRandGauss_Direct_8u_AC4IR

ippiAddRandGauss_8u_AC4IR

ippiAddRandGauss_Direct_8u_C1IR

ippiAddRandGauss_8u_C1IR

ippiAddRandGauss_Direct_8u_C3IR

ippiAddRandGauss_8u_C3IR

ippiAddRandGauss_Direct_8u_C4IR

ippiAddRandGauss_8u_C4IR

ippiAddRandUniform_Direct_16s_AC4IR

ippiAddRandUniform_16s_AC4IR

ippiAddRandUniform_Direct_16s_C1IR

ippiAddRandUniform_16s_C1IR

ippiAddRandUniform_Direct_16s_C3IR

ippiAddRandUniform_16s_C3IR

ippiAddRandUniform_Direct_16s_C4IR

ippiAddRandUniform_16s_C4IR

ippiAddRandUniform_Direct_16u_AC4IR

ippiAddRandUniform_16u_AC4IR

ippiAddRandUniform_Direct_16u_C1IR

ippiAddRandUniform_16u_C1IR

ippiAddRandUniform_Direct_16u_C3IR

ippiAddRandUniform_16u_C3IR

ippiAddRandUniform_Direct_16u_C4IR

ippiAddRandUniform_16u_C4IR

ippiAddRandUniform_Direct_32f_AC4IR

ippiAddRandUniform_32f_AC4IR

ippiAddRandUniform_Direct_32f_C1IR

ippiAddRandUniform_32f_C1IR

ippiAddRandUniform_Direct_32f_C3IR

ippiAddRandUniform_32f_C3IR

ippiAddRandUniform_Direct_32f_C4IR

ippiAddRandUniform_32f_C4IR

ippiAddRandUniform_Direct_8u_AC4IR

ippiAddRandUniform_8u_AC4IR

ippiAddRandUniform_Direct_8u_C1IR

ippiAddRandUniform_8u_C1IR

ippiAddRandUniform_Direct_8u_C3IR

ippiAddRandUniform_8u_C3IR

ippiAddRandUniform_Direct_8u_C4IR

ippiAddRandUniform_8u_C4IR

ippiAddRotateShift

N/A

1

1749

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippiAdd_16sc_AC4IRSfs

N/A

ippiAdd_16sc_AC4RSfs

N/A

ippiAdd_16sc_C1IRSfs

N/A

ippiAdd_16sc_C1RSfs

N/A

ippiAdd_16sc_C3IRSfs

N/A

ippiAdd_16sc_C3RSfs

N/A

ippiAdd_32fc_AC4IR

N/A

ippiAdd_32fc_AC4R

N/A

ippiAdd_32fc_C1IR

N/A

ippiAdd_32fc_C1R

N/A

ippiAdd_32fc_C3IR

N/A

ippiAdd_32fc_C3R

N/A

ippiAdd_32sc_AC4IRSfs

N/A

ippiAdd_32sc_AC4RSfs

N/A

ippiAdd_32sc_C1IRSfs

N/A

ippiAdd_32sc_C1RSfs

N/A

ippiAdd_32sc_C3IRSfs

N/A

ippiAdd_32sc_C3RSfs

N/A

ippiAlphaCompC_8s_C1R

ippiConvert_8s16s+ippiAlphaCompC_16s

ippiAlphaComp_8s_AC1R

ippiConvert_8s16s+ippiAlphaComp_16s

ippiAlphaComp_8s_AC4R

ippiConvert_8s16s+ippiAlphaComp_16s

ippiComplement_32s_C1IR

N/A

ippiConvFull_16s_AC4R

ippiConv_16s_C4R (with algType=ippiROIFull)

ippiConvFull_16s_C1R

ippiConv_16s_C1R (with algType=ippiROIFull)

ippiConvFull_16s_C3R

ippiConv_16s_C3R (with algType=ippiROIFull)

ippiConvFull_32f_AC4R

ippiConv_32f_C4R (with algType=ippiROIFull)

ippiConvFull_32f_C1R

ippiConv_32f_C1R (with algType=ippiROIFull)

ippiConvFull_32f_C3R

ippiConv_32f_C3R (with algType=ippiROIFull)

ippiConvFull_8u_AC4R

ippiConv_8u_C4R (with algType=ippiROIFull)

ippiConvFull_8u_C1R

ippiConv_8u_C1R (with algType=ippiROIFull)

1750

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Removed from 9.0

Substitution or WorkaroundippiConvFull_8u_C3R

ippiConv_8u_C3R (with algType=ippiROIFull)

ippiConvValid_16s_AC4R

ippiConv16s_C4R (with algType=ippiROIValid)

ippiConvValid_16s_C1R

ippiConv16s_C1R (with algType=ippiROIValid)

ippiConvValid_16s_C3R

ippiConv16s_C3R (with algType=ippiROIValid)

ippiConvValid_32f_AC4R

ippiConv32f_C4R (with algType=ippiROIValid)

ippiConvValid_32f_C1R

ippiConv32f_C1R (with algType=ippiROIValid)

ippiConvValid_32f_C3R

ippiConv32f_C3R (with algType=ippiROIValid)

ippiConvValid_8u_AC4R

ippiConv8u_C4R (with algType=ippiROIValid)

ippiConvValid_8u_C1R

ippiConv8u_C1R (with algType=ippiROIValid)

ippiConvValid_8u_C3R

ippiConv8u_C3R (with algType=ippiROIValid)

ippiConvert_1u8u_C1R

ippiBinToGray_1u8u_C1R

ippiCplxExtendToPack_16sc16s_C1R

ippiConvert_16s32f+ippiCplxExtendToPack_32f

ippiCplxExtendToPack_16sc16s_C3R

ippiConvert_16s32f+ippiCplxExtendToPack_32f

ippiCplxExtendToPack_32sc32s_C1R

ippiConvert_32s32f+ippCplxExtendToPack_32f

ippiCplxExtendToPack_32sc32s_C3R

ippiConvert_32s32f+ippCplxExtendToPack_32f

ippiCrossCorrFull_NormLevel_16u32f_AC4R

ippiCopy_16u_C4C1R+ippiCrossCorrNorm_16u32f_C1R+algType=ippiROIFull|ippiNormCoefficient

ippiCrossCorrFull_NormLevel_16u32f_C1R

ippiCrossCorrNorm_16u32f_C1R+algType=ippiROIFull|ippiNormCoefficient

ippiCrossCorrFull_NormLevel_16u32f_C3R

ippiCopy_16u_C3C1R+ippiCrossCorrNorm_16u32f_C1R+algType=ippiROIFull|ippiNormCoefficient

ippiCrossCorrFull_NormLevel_16u32f_C4R

ippiCopy_16u_C4C1R+ippiCrossCorrNorm_16u32f_C1R+algType=ippiROIFull|ippiNormCoefficient

ippiCrossCorrFull_NormLevel_32f_AC4R

ippiCopy_32f_C4C1R+ippiCrossCorrNorm_32f_C1R+algType=ippiROIFull|ippiNormCoefficient

ippiCrossCorrFull_NormLevel_32f_C1R

ippiCrossCorrNorm_32f_C1R+algType=ippiROIFull|ippiNormCoefficient

1751

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippiCrossCorrFull_NormLevel_32f_C3R

ippiCopy_32f_C3C1R+ippiCrossCorrNorm_32f_C1R+algType=ippiROIFull|ippiNormCoefficient

ippiCrossCorrFull_NormLevel_32f_C4R

ippiCopy_32f_C4C1R+ippiCrossCorrNorm_32f_C1R+algType=ippiROIFull|ippiNormCoefficient

ippiCrossCorrFull_NormLevel_64f_C1R

N/A

ippiCrossCorrFull_NormLevel_8s32f_AC4R

ippiConvert_8s32f+ippiCopy_32f_C4C1R+ippiCrossCorrNorm_32f_C1R+algType=ippiROIFull|ippiNormCoefficient

ippiCrossCorrFull_NormLevel_8s32f_C1R

ippiConvert_8s32f+ippiCrossCorrNorm_32f_C1R+algType=ippiROIFull|ippiNormCoefficient

ippiCrossCorrFull_NormLevel_8s32f_C3R

ippiConvert_8s32f+ippiCopy_32f_C3C1R+ippiCrossCorrNorm_32f_C1R+algType=ippiROIFull|ippiNormCoefficient

ippiCrossCorrFull_NormLevel_8s32f_C4R

ippiConvert_8s32f+ippiCopy_32f_C4C1R+ippiCrossCorrNorm_32f_C1R+algType=ippiROIFull|ippiNormCoefficient

ippiCrossCorrFull_NormLevel_8u32f_AC4R

ippiCopy_8u_C4C1R+ippiCrossCorrNorm_8u32f_C1R+algType=ippiROIFull|ippiNormCoefficient

ippiCrossCorrFull_NormLevel_8u32f_C1R

ippiCrossCorrNorm_8u32f_C1R+algType=ippiROIFull|ippiNormCoefficient

ippiCrossCorrFull_NormLevel_8u32f_C3R

ippiCopy_8u_C3C1R+ippiCrossCorrNorm_8u32f_C1R+algType=ippiROIFull|ippiNormCoefficient

ippiCrossCorrFull_NormLevel_8u32f_C4R

ippiCopy_8u_C4C1R+ippiCrossCorrNorm_8u32f_C1R+algType=ippiROIFull|ippiNormCoefficient

ippiCrossCorrFull_NormLevel_8u_AC4RSfs

ippiCopy_8u_C4C1R+ippiCrossCorrNorm_8u_C1RSfs+algType=ippiROIFull|ippiNormCoefficient

ippiCrossCorrFull_NormLevel_8u_C1RSfs

ippiCrossCorrNorm_8u_C1RSfs+algType=ippiROIFull|ippiNormCoefficient

ippiCrossCorrFull_NormLevel_8u_C3RSfs

ippiCopy_8u_C3C1R+ippiCrossCorrNorm_8u_C1RSfs+algType=ippiROIFull|ippiNormCoefficient1752

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

ippiCrossCorrFull_NormLevel_8u_C4RSfs

1

Substitution or WorkaroundippiCopy_8u_C4C1R+ippiCrossCorrNorm_8u_C1RSfs+algType=ippiROIFull|ippiNormCoefficient

ippiCrossCorrFull_Norm_16u32f_AC4R

ippiCopy_16u_C4C1R+ippiCrossCorrNorm_16u32f_C1R+algType=ippiROIFull|ippiNorm

ippiCrossCorrFull_Norm_16u32f_C1R

ippiCrossCorrNorm_16u32f_C1R+algType=ippiROIFull|ippiNorm

ippiCrossCorrFull_Norm_16u32f_C3R

ippiCopy_16u_C3C1R+ippiCrossCorrNorm_16u32f_C1R+algType=ippiROIFull|ippiNorm

ippiCrossCorrFull_Norm_16u32f_C4R

ippiCopy_16u_C4C1R+ippiCrossCorrNorm_16u32f_C1R+algType=ippiROIFull|ippiNorm

ippiCrossCorrFull_Norm_32f_AC4R

ippiCopy_32f_C4C1R+ippiCrossCorrNorm_32f_C1R+algType=ippiROIFull|ippiNorm

ippiCrossCorrFull_Norm_32f_C1R

ippiCrossCorrNorm_32f_C1R+algType=ippiROIFull|ippiNorm

ippiCrossCorrFull_Norm_32f_C3R

ippiCopy_32f_C3C1R+ippiCrossCorrNorm_32f_C1R+algType=ippiROIFull|ippiNorm

ippiCrossCorrFull_Norm_32f_C4R

ippiCopy_32f_C4C1R+ippiCrossCorrNorm_32f_C1R+algType=ippiROIFull|ippiNorm

ippiCrossCorrFull_Norm_8s32f_AC4R

ippiConvert_8s32f+ippiCopy_32f_C4C1R+ippiCrossCorrNorm_32f_C1R+algType=ippiROIFull|ippiNorm

ippiCrossCorrFull_Norm_8s32f_C1R

ippiConvert_8s32f+ippiCrossCorrNorm_32f_C1R+algType=ippiROIFull|ippiNorm

ippiCrossCorrFull_Norm_8s32f_C3R

ippiConvert_8s32f+ippiCopy_32f_C3C1R+ippiCrossCorrNorm_32f_C1R+algType=ippiROIFull|ippiNorm

ippiCrossCorrFull_Norm_8s32f_C4R

ippiConvert_8s32f+ippiCopy_32f_C4C1R+ippiCrossCorrNorm_32f_C1R+algType=ippiROIFull|ippiNorm

ippiCrossCorrFull_Norm_8u32f_AC4R

ippiCopy_8u_C4C1R+ippiCrossCorrNorm_8u32f_C1R+algType=ippiROIFull|ippiNorm

1753

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippiCrossCorrFull_Norm_8u32f_C1R

ippiCrossCorrNorm_8u32f_C1R+algType=ippiROIFull|ippiNorm

ippiCrossCorrFull_Norm_8u32f_C3R

ippiCopy_8u_C3C1R+ippiCrossCorrNorm_8u32f_C1R+algType=ippiROIFull|ippiNorm

ippiCrossCorrFull_Norm_8u32f_C4R

ippiCopy_8u_C4C1R+ippiCrossCorrNorm_8u32f_C1R+algType=ippiROIFull|ippiNorm

ippiCrossCorrFull_Norm_8u_AC4RSfs

ippiCopy_8u_C4C1R+ippiCrossCorrNorm_8u_C1RSfs+algType=ippiROIFull|ippiNorm

ippiCrossCorrFull_Norm_8u_C1RSfs
ippiCrossCorrFull_Norm_8u_C3RSfs

ippiCrossCorrNorm_8u_C1RSfs+algType=ippiROIFull|ippiNorm
ippiCopy_8u_C3C1R+ippiCrossCorrNorm_8u_C1RSfs+algType=ippiROIFull|ippiNorm

ippiCrossCorrFull_Norm_8u_C4RSfs

ippiCopy_8u_C4C1R+ippiCrossCorrNorm_8u_C1RSfs+algType=ippiROIFull|ippiNorm

ippiCrossCorrSame_NormLevel_16u32f_AC4R

ippiCopy_16u_C4C1R+ippiCrossCorrNorm_16u32f_C1R+algType=ippiROISame|ippiNormCoefficient

ippiCrossCorrSame_NormLevel_16u32f_C1R

ippiCrossCorrNorm_16u32f_C1R+algType=ippiROISame|ippiNormCoefficient

ippiCrossCorrSame_NormLevel_16u32f_C3R

ippiCopy_16u_C3C1R+ippiCrossCorrNorm_16u32f_C1R+algType=ippiROISame|ippiNormCoefficient

ippiCrossCorrSame_NormLevel_16u32f_C4R

ippiCopy_16u_C4C1R+ippiCrossCorrNorm_16u32f_C1R+algType=ippiROISame|ippiNormCoefficient

ippiCrossCorrSame_NormLevel_32f_AC4R

ippiCopy_32f_C4C1R+ippiCrossCorrNorm_32f_C1R+algType=ippiROISame|ippiNormCoefficient

ippiCrossCorrSame_NormLevel_32f_C1R

ippiCrossCorrNorm_32f_C1R+algType=ippiROISame|ippiNormCoefficient

ippiCrossCorrSame_NormLevel_32f_C3R

ippiCopy_32f_C3C1R+ippiCrossCorrNorm_32f_C1R+algType=ippiROISame|ippiNormCoefficient1754

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Removed from 9.0

Substitution or WorkaroundippiCrossCorrSame_NormLevel_32f_C4R

ippiCopy_32f_C4C1R+ippiCrossCorrNorm_32f_C1R+algType=ippiROISame|ippiNormCoefficient

ippiCrossCorrSame_NormLevel_8s32f_AC4R

ippiConvert_8s32f+ippiCopy_32f_C4C1R+ippiCrossCorrNorm_32f_C1R+algType=ippiROISame|ippiNormCoefficient

ippiCrossCorrSame_NormLevel_8s32f_C1R

ippiConvert_8s32f+ippiCrossCorrNorm_32f_C1R+algType=ippiROISame|ippiNormCoefficient

ippiCrossCorrSame_NormLevel_8s32f_C3R

ippiConvert_8s32f+ippiCopy_32f_C3C1R+ippiCrossCorrNorm_32f_C1R+algType=ippiROISame|ippiNormCoefficient

ippiCrossCorrSame_NormLevel_8s32f_C4R

ippiConvert_8s32f+ippiCopy_32f_C4C1R+ippiCrossCorrNorm_32f_C1R+algType=ippiROISame|ippiNormCoefficient

ippiCrossCorrSame_NormLevel_8u32f_AC4R

ippiCopy_8u_C4C1R+ippiCrossCorrNorm_8u32f_C1R+algType=ippiROISame|ippiNormCoefficient

ippiCrossCorrSame_NormLevel_8u32f_C1R
ippiCrossCorrSame_NormLevel_8u32f_C3R

ippiCrossCorrNorm_8u32f_C1R+algType=ippiROISame|ippiNormCoefficient
ippiCopy_8u_C3C1R+ippiCrossCorrNorm_8u32f_C1R+algType=ippiROISame|ippiNormCoefficient

ippiCrossCorrSame_NormLevel_8u32f_C4R

ippiCopy_8u_C4C1R+ippiCrossCorrNorm_8u32f_C1R+algType=ippiROISame|ippiNormCoefficient

ippiCrossCorrSame_NormLevel_8u_AC4RSfs

ippiCopy_8u_C4C1R+ippiCrossCorrNorm_8u_C1RSfs+algType=ippiROISame|ippiNormCoefficient

ippiCrossCorrSame_NormLevel_8u_C1RSfs

ippiCrossCorrNorm_8u_C1RSfs+algType=ippiROISame|ippiNormCoefficient

ippiCrossCorrSame_NormLevel_8u_C3RSfs

ippiCopy_8u_C3C1R+ippiCrossCorrNorm_8u_C1RSfs+algType=ippiROISame|ippiNormCoefficient

ippiCrossCorrSame_NormLevel_8u_C4RSfs

ippiCopy_8u_C4C1R+ippiCrossCorrNorm_8u_C1RSfs+algType=ippiROISame|ippiNormCoefficient

ippiCrossCorrSame_Norm_16u32f_AC4R

ippiCopy_16u_C4C1R+ippiCrossCorrNorm_16u32f_C1R+algType=ippiROISame|ippiNorm

1755

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

ippiCrossCorrSame_Norm_16u32f_C1R

Substitution or WorkaroundippiCrossCorrNorm_16u32f_C1R+algType=ippiROISame|ippiNorm

ippiCrossCorrSame_Norm_16u32f_C3R

ippiCopy_16u_C3C1R+ippiCrossCorrNorm_16u32f_C1R+algType=ippiROISame|ippiNorm

ippiCrossCorrSame_Norm_16u32f_C4R

ippiCopy_16u_C4C1R+ippiCrossCorrNorm_16u32f_C1R+algType=ippiROISame|ippiNorm

ippiCrossCorrSame_Norm_32f_AC4R

ippiCopy_32f_C4C1R+ippiCrossCorrNorm_32f_C1R+algType=ippiROISame|ippiNorm

ippiCrossCorrSame_Norm_32f_C1R

ippiCrossCorrNorm_32f_C1R+algType=ippiROISame|ippiNorm

ippiCrossCorrSame_Norm_32f_C3R

ippiCopy_32f_C3C1R+ippiCrossCorrNorm_32f_C1R+algType=ippiROISame|ippiNorm

ippiCrossCorrSame_Norm_32f_C4R

ippiCopy_32f_C4C1R+ippiCrossCorrNorm_32f_C1R+algType=ippiROISame|ippiNorm

ippiCrossCorrSame_Norm_8s32f_AC4R

ippiConvert_8s32f+ippiCopy_32f_C4C1R+ippiCrossCorrNorm_32f_C1R+algType=ippiROISame|ippiNorm

ippiCrossCorrSame_Norm_8s32f_C1R

ippiConvert_8s32f+ippiCrossCorrNorm_32f_C1R+algType=ippiROISame|ippiNorm

ippiCrossCorrSame_Norm_8s32f_C3R

ippiConvert_8s32f+ippiCopy_32f_C3C1R+ippiCrossCorrNorm_32f_C1R+algType=ippiROISame|ippiNorm

ippiCrossCorrSame_Norm_8s32f_C4R

ippiConvert_8s32f+ippiCopy_32f_C4C1R+ippiCrossCorrNorm_32f_C1R+algType=ippiROISame|ippiNorm

ippiCrossCorrSame_Norm_8u32f_AC4R

ippiCopy_8u_C4C1R+ippiCrossCorrNorm_8u32f_C1R+algType=ippiROISame|ippiNorm

ippiCrossCorrSame_Norm_8u32f_C1R

ippiCrossCorrNorm_8u32f_C1R+algType=ippiROISame|ippiNorm

ippiCrossCorrSame_Norm_8u32f_C3R

ippiCopy_8u_C3C1R+ippiCrossCorrNorm_8u32f_C1R+algType=ippiROISame|ippiNorm

1756

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

ippiCrossCorrSame_Norm_8u32f_C4R

1

Substitution or WorkaroundippiCopy_8u_C4C1R+ippiCrossCorrNorm_8u32f_C1R+algType=ippiROISame|ippiNorm

ippiCrossCorrSame_Norm_8u_AC4RSfs

ippiCopy_8u_C4C1R+ippiCrossCorrNorm_8u_C1RSfs+algType=ippiROISame|ippiNorm

ippiCrossCorrSame_Norm_8u_C1RSfs

ippiCrossCorrNorm_8u_C1RSfs+algType=ippiROISame|ippiNorm

ippiCrossCorrSame_Norm_8u_C3RSfs

ippiCopy_8u_C3C1R+ippiCrossCorrNorm_8u_C1RSfs+algType=ippiROISame|ippiNorm

ippiCrossCorrSame_Norm_8u_C4RSfs

ippiCopy_8u_C4C1R+ippiCrossCorrNorm_8u_C1RSfs+algType=ippiROISame|ippiNorm

ippiCrossCorrValid_16u32f_C1R

ippiCrossCorrNorm_16u32f_C1R+algType=ippiROIValid|ippiNormNone

ippiCrossCorrValid_32f_C1R

ippiCrossCorrNorm_32f_C1R+algType=ippiROIValid|ippiNormNone

ippiCrossCorrValid_8s32f_C1R

ippiConvert_8s32f+ippiCrossCorrNorm_32f_C1R+algType=ippiROIValid|ippiNormNone

ippiCrossCorrValid_8u32f_C1R

ippiCrossCorrNorm_8u32f_C1R+algType=ippiROIValid|ippiNormNone

ippiCrossCorrValid_NormLevel_16u32f_AC4R

ippiCopy_16u_C4C1R+ippiCrossCorrNorm_16u32f_C1R+algType=ippiROIValid|ippiNormCoefficient

ippiCrossCorrValid_NormLevel_16u32f_C1R

ippiCrossCorrNorm_16u32f_C1R+algType=ippiROIValid|ippiNormCoefficient

ippiCrossCorrValid_NormLevel_16u32f_C3R

ippiCopy_16u_C3C1R+ippiCrossCorrNorm_16u32f_C1R+algType=ippiROIValid|ippiNormCoefficient

ippiCrossCorrValid_NormLevel_16u32f_C4R

ippiCopy_16u_C4C1R+ippiCrossCorrNorm_16u32f_C1R+algType=ippiROIValid|ippiNormCoefficient

ippiCrossCorrValid_NormLevel_32f_AC4R

ippiCopy_32f_C4C1R+ippiCrossCorrNorm_32f_C1R+algType=ippiROIValid|ippiNormCoefficient

ippiCrossCorrValid_NormLevel_32f_C1R

ippiCrossCorrNorm_32f_C1R+algType=ippiROIValid|ippiNormCoefficient

1757

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippiCrossCorrValid_NormLevel_32f_C3R

ippiCopy_32f_C3C1R+ippiCrossCorrNorm_32f_C1R+algType=ippiROIValid|ippiNormCoefficient

ippiCrossCorrValid_NormLevel_32f_C4R

ippiCopy_32f_C4C1R+ippiCrossCorrNorm_32f_C1R+algType=ippiROIValid|ippiNormCoefficient

ippiCrossCorrValid_NormLevel_64f_C1R

N/A

ippiCrossCorrValid_NormLevel_8s32f_AC4R

ippiConvert_8s32f+ippiCopy_32f_C4C1R+ippiCrossCorrNorm_32f_C1R+algType=ippiROIValid|ippiNormCoefficient

ippiCrossCorrValid_NormLevel_8s32f_C1R

ippiConvert_8s32f+ippiCrossCorrNorm_32f_C1R+algType=ippiROIValid|ippiNormCoefficient

ippiCrossCorrValid_NormLevel_8s32f_C3R

ippiConvert_8s32f+ippiCopy_32f_C3C1R+ippiCrossCorrNorm_32f_C1R+algType=ippiROIValid|ippiNormCoefficient

ippiCrossCorrValid_NormLevel_8s32f_C4R

ippiConvert_8s32f+ippiCopy_32f_C4C1R+ippiCrossCorrNorm_32f_C1R+algType=ippiROIValid|ippiNormCoefficient

ippiCrossCorrValid_NormLevel_8u32f_AC4R

ippiCopy_8u_C4C1R+ippiCrossCorrNorm_8u32f_C1R+algType=ippiROIValid|ippiNormCoefficient

ippiCrossCorrValid_NormLevel_8u32f_C1R

ippiCrossCorrNorm_8u32f_C1R+algType=ippiROIValid|ippiNormCoefficient

ippiCrossCorrValid_NormLevel_8u32f_C3R

ippiCopy_8u_C3C1R+ippiCrossCorrNorm_8u32f_C1R+algType=ippiROIValid|ippiNormCoefficient

ippiCrossCorrValid_NormLevel_8u32f_C4R

ippiCopy_8u_C4C1R+ippiCrossCorrNorm_8u32f_C1R+algType=ippiROIValid|ippiNormCoefficient

ippiCrossCorrValid_NormLevel_8u_AC4RSfs

ippiCopy_8u_C4C1R+ippiCrossCorrNorm_8u_C1RSfs+algType=ippiROIValid|ippiNormCoefficient

ippiCrossCorrValid_NormLevel_8u_C1RSfs

ippiCrossCorrNorm_8u_C1RSfs+algType=ippiROIValid|ippiNormCoefficient

ippiCrossCorrValid_NormLevel_8u_C3RSfs

1758

ippiCopy_8u_C3C1R+ippiCrossCorrNorm_8u_C1RSfs+algType=ippiROIValid|ippiNormCoefficientDeveloper Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

ippiCrossCorrValid_NormLevel_8u_C4RSfs

1

Substitution or WorkaroundippiCopy_8u_C4C1R+ippiCrossCorrNorm_8u_C1RSfs+algType=ippiROIValid|ippiNormCoefficient

ippiCrossCorrValid_Norm_16u32f_AC4R

ippiCopy_16u_C4C1R+ippiCrossCorrNorm_16u32f_C1R+algType=ippiROIValid|ippiNorm

ippiCrossCorrValid_Norm_16u32f_C1R

ippiCrossCorrNorm_16u32f_C1R+algType=ippiROIValid|ippiNorm

ippiCrossCorrValid_Norm_16u32f_C3R

ippiCopy_16u_C3C1R+ippiCrossCorrNorm_16u32f_C1R+algType=ippiROIValid|ippiNorm

ippiCrossCorrValid_Norm_16u32f_C4R

ippiCopy_16u_C4C1R+ippiCrossCorrNorm_16u32f_C1R+algType=ippiROIValid|ippiNorm

ippiCrossCorrValid_Norm_32f_AC4R

ippiCopy_32f_C4C1R+ippiCrossCorrNorm_32f_C1R+algType=ippiROIValid|ippiNorm

ippiCrossCorrValid_Norm_32f_C1R

ippiCrossCorrNorm_32f_C1R+algType=ippiROIValid|ippiNorm

ippiCrossCorrValid_Norm_32f_C3R

ippiCopy_32f_C3C1R+ippiCrossCorrNorm_32f_C1R+algType=ippiROIValid|ippiNorm

ippiCrossCorrValid_Norm_32f_C4R

ippiCopy_32f_C4C1R+ippiCrossCorrNorm_32f_C1R+algType=ippiROIValid|ippiNorm

ippiCrossCorrValid_Norm_8s32f_AC4R

ippiConvert_8s32f+ippiCopy_32f_C4C1R+ippiCrossCorrNorm_32f_C1R+algType=ippiROIValid|ippiNorm

ippiCrossCorrValid_Norm_8s32f_C1R

ippiConvert_8s32f+ippiCrossCorrNorm_32f_C1R+algType=ippiROIValid|ippiNorm

ippiCrossCorrValid_Norm_8s32f_C3R

ippiConvert_8s32f+ippiCopy_32f_C3C1R+ippiCrossCorrNorm_32f_C1R+algType=ippiROIValid|ippiNorm

ippiCrossCorrValid_Norm_8s32f_C4R

ippiConvert_8s32f+ippiCopy_32f_C4C1R+ippiCrossCorrNorm_32f_C1R+algType=ippiROIValid|ippiNorm

ippiCrossCorrValid_Norm_8u32f_AC4R

ippiCopy_8u_C4C1R+ippiCrossCorrNorm_8u32f_C1R+algType=ippiROIValid|ippiNorm

1759

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippiCrossCorrValid_Norm_8u32f_C1R

ippiCrossCorrNorm_8u32f_C1R+algType=ippiROIValid|ippiNorm

ippiCrossCorrValid_Norm_8u32f_C3R

ippiCopy_8u_C3C1R+ippiCrossCorrNorm_8u32f_C1R+algType=ippiROIValid|ippiNorm

ippiCrossCorrValid_Norm_8u32f_C4R

ippiCopy_8u_C4C1R+ippiCrossCorrNorm_8u32f_C1R+algType=ippiROIValid|ippiNorm

ippiCrossCorrValid_Norm_8u_AC4RSfs

ippiCopy_8u_C4C1R+ippiCrossCorrNorm_8u_C1RSfs+algType=ippiROIValid|ippiNorm

ippiCrossCorrValid_Norm_8u_C1RSfs
ippiCrossCorrValid_Norm_8u_C3RSfs

ippiCrossCorrNorm_8u_C1RSfs+algType=ippiROIValid|ippiNorm
ippiCopy_8u_C3C1R+ippiCrossCorrNorm_8u_C1RSfs+algType=ippiROIValid|ippiNorm

ippiCrossCorrValid_Norm_8u_C4RSfs

ippiCopy_8u_C4C1R+ippiCrossCorrNorm_8u_C1RSfs+algType=ippiROIValid|ippiNorm

ippiDCTFwdFree_32f

ippiFreeippiDCTFwdGetBufSize_32f

N/A

ippiDCTFwdInitAlloc_32f

ippiDCTGetSize+ippiMalloc+ippiDCTInit

ippiDCTInvFree_32f

ippiFreeippiDCTInvGetBufSize_32f

N/A

ippiDCTInvInitAlloc_32f

ippiDCTGetSize+ippiMalloc+ippiDCTInit

ippiDFTFree_C_32fc

ippiFreeippiDFTFree_R_32f

ippiFreeippiDFTFree_R_32s

ippiFreeippiDFTFwd_RToPack_8u32s_AC4RSfs

ippiConvert_8u32f+ippiDFTFwd_RToPack_32f

ippiDFTFwd_RToPack_8u32s_C1RSfs

ippiConvert_8u32f+ippiDFTFwd_RToPack_32f

ippiDFTFwd_RToPack_8u32s_C3RSfs

ippiConvert_8u32f+ippiDFTFwd_RToPack_32f

ippiDFTFwd_RToPack_8u32s_C4RSfs

ippiConvert_8u32f+ippiDFTFwd_RToPack_32f

ippiDFTGetBufSize_C_32fc

N/A

ippiDFTGetBufSize_R_32f

N/A

ippiDFTGetBufSize_R_32s

N/A

1760

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippiDFTInitAlloc_C_32fc

ippiDFTGetSize+ippiMalloc+ippiDFTInit

ippiDFTInitAlloc_R_32f

ippiDFTGetSize+ippiMalloc+ippiDFTInit

ippiDFTInitAlloc_R_32s

ippiConvert_32s32f(or to 64f)
+ippiDFTGetSize+ippiMalloc+ippiDFTInit

ippiDFTInv_PackToR_32s8u_AC4RSfs

ippiDFTFwd_PackToR_32f+ippiConvert_32f8u

ippiDFTInv_PackToR_32s8u_C1RSfs

ippiDFTFwd_PackToR_32f+ippiConvert_32f8u

ippiDFTInv_PackToR_32s8u_C3RSfs

ippiDFTFwd_PackToR_32f+ippiConvert_32f8u

ippiDFTInv_PackToR_32s8u_C4RSfs

ippiDFTFwd_PackToR_32f+ippiConvert_32f8u

ippiDeconvFFTFree_32f_C1R

ippFreeippiDeconvFFTFree_32f_C3R

ippFreeippiDeconvFFTInitAlloc_32f_C1R

ippiDeconvFFTGetSize_32f+ippMalloc_8u+ippiDeconvFFTInit_32f_C1R

ippiDeconvFFTInitAlloc_32f_C3R

ippiDeconvFFTGetSize_32f+ippMalloc_8u+ippiDeconvFFTInit_32f_C3R

ippiDeconvLRFree_32f_C1R

ippFreeippiDeconvLRFree_32f_C3R

ippFreeippiDeconvLRInitAlloc_32f_C1R

ippiDeconvLRGetSize_32f+ippMalloc_8u+ippiDeconvLRInit_32f_C1R

ippiDeconvLRInitAlloc_32f_C3R

ippiDeconvLRGetSize_32f+ippMalloc_8u+ippiDeconvLRInit_32f_C3R

ippiDilate3x3_16u_AC4IR

Use not-in-place flavor

ippiDilate3x3_16u_AC4R

ippiDilateBorder_16u_C4R with 3x3 mask

ippiDilate3x3_16u_C1IR

Use not-in-place flavor

ippiDilate3x3_16u_C1R

ippiDilateBorder_16u_C1R with 3x3 mask

ippiDilate3x3_16u_C3IR

Use not-in-place flavor

ippiDilate3x3_16u_C3R

ippiDilateBorder_16u_C3R with 3x3 mask

ippiDilate3x3_16u_C4IR

Use not-in-place flavor

ippiDilate3x3_16u_C4R

ippiDilateBorder_16u_C4R with 3x3 mask

ippiDilate3x3_32f_AC4IR

Use not-in-place flavor

ippiDilate3x3_32f_AC4R

ippiDilateBorder_32f_C4R with 3x3 mask

ippiDilate3x3_32f_C1IR

Use not-in-place flavor

ippiDilate3x3_32f_C1R

ippiDilateBorder_32f_C1R with 3x3 mask

1761

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippiDilate3x3_32f_C3IR

Use not-in-place flavor

ippiDilate3x3_32f_C3R

ippiDilateBorder_32f_C3R with 3x3 mask

ippiDilate3x3_32f_C4IR

Use not-in-place flavor

ippiDilate3x3_32f_C4R

ippiDilateBorder_32f_C4R with 3x3 mask

ippiDilate3x3_8u_AC4IR

Use not-in-place flavor

ippiDilate3x3_8u_AC4R

ippiDilateBorder_8u_C4R with 3x3 mask

ippiDilate3x3_8u_C1IR

Use not-in-place flavor

ippiDilate3x3_8u_C1R

ippiDilateBorder_8u_C1R with 3x3 mask

ippiDilate3x3_8u_C3IR

Use not-in-place flavor

ippiDilate3x3_8u_C3R

ippiDilateBorder_8u_C3R with 3x3 mask

ippiDilate3x3_8u_C4IR

Use not-in-place flavor

ippiDilate3x3_8u_C4R

ippiDilateBorder_8u_C4R with 3x3 mask

ippiDilate_16u_AC4IR

Use not-in-place flavor

ippiDilate_16u_AC4R

ippiDilateBorder_16u_C4R

ippiDilate_16u_C1IR

Use not-in-place flavor

ippiDilate_16u_C1R

ippiDilateBorder_16u_C1R

ippiDilate_16u_C3IR

Use not-in-place flavor

ippiDilate_16u_C3R

ippiDilateBorder_16u_C3R

ippiDilate_16u_C4R

ippiDilateBorder_16u_C4R

ippiDilate_32f_AC4IR

Use not-in-place flavor

ippiDilate_32f_AC4R

ippiDilateBorder_32f_C4R

ippiDilate_32f_C1IR

Use not-in-place flavor

ippiDilate_32f_C1R

ippiDilateBorder_32f_C1R

ippiDilate_32f_C3IR

Use not-in-place flavor

ippiDilate_32f_C3R

ippiDilateBorder_32f_C3R

ippiDilate_32f_C4R

ippiDilateBorder_32f_C4R

ippiDilate_8u_AC4IR

Use not-in-place flavor

ippiDilate_8u_AC4R

ippiDilateBorder_8u_C4R

ippiDilate_8u_C1IR

Use not-in-place flavor

ippiDilate_8u_C1R

ippiDilateBorder_8u_C1R

1762

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippiDilate_8u_C3IR

Use not-in-place flavor

ippiDilate_8u_C3R

ippiDilateBorder_8u_C3R

ippiDilate_8u_C4R

ippiDilateBorder_8u_C4R

ippiDivC_16sc_AC4IRSfs

N/A

ippiDivC_16sc_AC4RSfs

N/A

ippiDivC_16sc_C1IRSfs

N/A

ippiDivC_16sc_C1RSfs

N/A

ippiDivC_16sc_C3IRSfs

N/A

ippiDivC_16sc_C3RSfs

N/A

ippiDivC_32fc_AC4IR

N/A

ippiDivC_32fc_AC4R

N/A

ippiDivC_32fc_C1IR

N/A

ippiDivC_32fc_C1R

N/A

ippiDivC_32fc_C3IR

N/A

ippiDivC_32fc_C3R

N/A

ippiDivC_32sc_AC4IRSfs

N/A

ippiDivC_32sc_AC4RSfs

N/A

ippiDivC_32sc_C1IRSfs

N/A

ippiDivC_32sc_C1RSfs

N/A

ippiDivC_32sc_C3IRSfs

N/A

ippiDivC_32sc_C3RSfs

N/A

ippiDiv_16sc_AC4IRSfs

N/A

ippiDiv_16sc_AC4RSfs

N/A

ippiDiv_16sc_C1IRSfs

N/A

ippiDiv_16sc_C1RSfs

N/A

ippiDiv_16sc_C3IRSfs

N/A

ippiDiv_16sc_C3RSfs

N/A

ippiDiv_32fc_AC4IR

N/A

ippiDiv_32fc_AC4R

N/A

ippiDiv_32fc_C1IR

N/A

ippiDiv_32fc_C1R

N/A

1

1763

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippiDiv_32fc_C3IR

N/A

ippiDiv_32fc_C3R

N/A

ippiDiv_32sc_AC4IRSfs

N/A

ippiDiv_32sc_AC4RSfs

N/A

ippiDiv_32sc_C1IRSfs

N/A

ippiDiv_32sc_C1RSfs

N/A

ippiDiv_32sc_C3IRSfs

N/A

ippiDiv_32sc_C3RSfs

N/A

ippiDotProd_8s64f_AC4R

ippiConvert_8s16s+ippiDotProd_16s64f

ippiDotProd_8s64f_C1R

ippiConvert_8s16s+ippiDotProd_16s64f

ippiDotProd_8s64f_C3R

ippiConvert_8s16s+ippiDotProd_16s64f

ippiDotProd_8s64f_C4R

ippiConvert_8s16s+ippiDotProd_16s64f

ippiErode3x3_16u_AC4IR

Use not-in-place flavor

ippiErode3x3_16u_AC4R

ippiErodeBorder_16u_C4R with 3x3 mask

ippiErode3x3_16u_C1IR

Use not-in-place flavor

ippiErode3x3_16u_C1R

ippiErodeBorder_16u_C1R with 3x3 mask

ippiErode3x3_16u_C3IR

Use not-in-place flavor

ippiErode3x3_16u_C3R

ippiErodeBorder_16u_C3R with 3x3 mask

ippiErode3x3_16u_C4IR

Use not-in-place flavor

ippiErode3x3_16u_C4R

ippiErodeBorder_16u_C4R with 3x3 mask

ippiErode3x3_32f_AC4IR

Use not-in-place flavor

ippiErode3x3_32f_AC4R

ippiErodeBorder_32f_C4R with 3x3 mask

ippiErode3x3_32f_C1IR

Use not-in-place flavor

ippiErode3x3_32f_C1R

ippiErodeBorder_32f_C1R with 3x3 mask

ippiErode3x3_32f_C3IR

Use not-in-place flavor

ippiErode3x3_32f_C3R

ippiErodeBorder_32f_C3R with 3x3 mask

ippiErode3x3_32f_C4IR

Use not-in-place flavor

ippiErode3x3_32f_C4R

ippiErodeBorder_32f_C4R with 3x3 mask

ippiErode3x3_8u_AC4IR

Use not-in-place flavor

ippiErode3x3_8u_AC4R

ippiErodeBorder_8u_C4R with 3x3 mask

1764

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippiErode3x3_8u_C1IR

Use not-in-place flavor

ippiErode3x3_8u_C1R

ippiErodeBorder_8u_C1R with 3x3 mask

ippiErode3x3_8u_C3IR

Use not-in-place flavor

ippiErode3x3_8u_C3R

ippiErodeBorder_8u_C3R with 3x3 mask

ippiErode3x3_8u_C4IR

Use not-in-place flavor

ippiErode3x3_8u_C4R

ippiErodeBorder_8u_C4R with 3x3 mask

ippiErode_16u_AC4IR

Use not-in-place flavor

ippiErode_16u_AC4R

ippiErodeBorder_16u_C4R

ippiErode_16u_C1IR

Use not-in-place flavor

ippiErode_16u_C1R

ippiErodeBorder_16u_C1R

ippiErode_16u_C3IR

Use not-in-place flavor

ippiErode_16u_C3R

ippiErodeBorder_16u_C3R

ippiErode_16u_C4R

ippiErodeBorder_16u_C4R

ippiErode_32f_AC4IR

Use not-in-place flavor

ippiErode_32f_AC4R

ippiErodeBorder_32f_C4R

ippiErode_32f_C1IR

Use not-in-place flavor

ippiErode_32f_C1R

ippiErodeBorder_32f_C1R

ippiErode_32f_C3IR

Use not-in-place flavor

ippiErode_32f_C3R

ippiErodeBorder_32f_C3R

ippiErode_32f_C4R

ippiErodeBorder_32f_C4R

ippiErode_8u_AC4IR

Use not-in-place flavor

ippiErode_8u_AC4R

ippiErodeBorder_8u_C4R

ippiErode_8u_C1IR

Use not-in-place flavor

ippiErode_8u_C1R

ippiErodeBorder_8u_C1R

ippiErode_8u_C3IR

Use not-in-place flavor

ippiErode_8u_C3R

ippiErodeBorder_8u_C3R

ippiErode_8u_C4R

ippiErodeBorder_8u_C4R

ippiFFTFree_C_32fc

ippiFreeippiFFTFree_R_32f

ippiFreeippiFFTFree_R_32s

ippiFree

1

1765

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippiFFTFwd_RToPack_8u32s_AC4RSfs

ippiConvert_8u32f+ippiFFTFwd_RToPack_32f

ippiFFTFwd_RToPack_8u32s_C1RSfs

ippiConvert_8u32f+ippiFFTFwd_RToPack_32f

ippiFFTFwd_RToPack_8u32s_C3RSfs

ippiConvert_8u32f+ippiFFTFwd_RToPack_32f

ippiFFTFwd_RToPack_8u32s_C4RSfs

ippiConvert_8u32f+ippiFFTFwd_RToPack_32f

ippiFFTGetBufSize_C_32fc

N/A

ippiFFTGetBufSize_R_32f

N/A

ippiFFTGetBufSize_R_32s

N/A

ippiFFTInitAlloc_C_32fc

ippiFFTGetSize+ippiMalloc+ippiFFTInit

ippiFFTInitAlloc_R_32f

ippiFFTGetSize+ippiMalloc+ippiFFTInit

ippiFFTInitAlloc_R_32s

ippiConvert_32s32f(or to 64f)
+ippiFFTGetSize+ippiMalloc+ippiFFTInit

ippiFFTInv_PackToR_32s8u_AC4RSfs

ippiFFTFwd_PackToR_32f+ippiConvert_32f8u

ippiFFTInv_PackToR_32s8u_C1RSfs

ippiFFTFwd_PackToR_32f+ippiConvert_32f8u

ippiFFTInv_PackToR_32s8u_C3RSfs

ippiFFTFwd_PackToR_32f+ippiConvert_32f8u

ippiFFTInv_PackToR_32s8u_C4RSfs

ippiFFTFwd_PackToR_32f+ippiConvert_32f8u

ippiFilter32f_16s_AC4R

ippiFilterBorderInit_32f+ippiFilterBorder_16s_C4R
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilter32f_16s_C1R

ippiFilterBorderInit_32f+ippiFilterBorder_16s_C1RNOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilter32f_16s_C3R

1766

ippiFilterBorderInit_32f+ippiFilterBorder_16s_C3R

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

1

Substitution or Workaround
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilter32f_16s_C4R

ippiFilterBorderInit_32f+ippiFilterBorder_16s_C4R
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilter32f_16u_AC4R

ippiFilterBorderInit_32f+ippiFilterBorder_16u_C4R
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilter32f_16u_C1R

ippiFilterBorderInit_32f+ippiFilterBorder_16u_C1R
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilter32f_16u_C3R

ippiFilterBorderInit_32f+ippiFilterBorder_16u_C3R

1767

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or Workaround
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilter32f_16u_C4R

ippiFilterBorderInit_32f+ippiFilterBorder_16u_C4R
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilter32f_32s_C1R

ippiFilterBorderInit_32f+ippiConvert_32s32f+ippiFilterBorder_32f_C1RNOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilter32f_32s_C3R

ippiFilterBorderInit_32f+ippiConvert_32s32f+ippiFilterBorder_32f_C3R
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilter32f_32s_C4R

1768

ippiFilterBorderInit_32f+ippiConvert_32s32f+ippiFilterBorder_32f_C4R

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

1

Substitution or Workaround
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilter32f_8s16s_C1R

ippiFilterBorderInit_32f+ippiConvert_8s16s+ippiFilterBorder_16s_C1RNOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilter32f_8s16s_C3R

ippiFilterBorderInit_32f+ippiConvert_8s16s+ippiFilterBorder_16s_C3R
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilter32f_8s16s_C4R

ippiFilterBorderInit_32f+ippiConvert_8s16s+ippiFilterBorder_16s_C4R
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilter32f_8s_C1R

ippiFilterBorderInit_32f+ippiConvert_8s16s+ippiFilterBorder_16s_C1R

1769

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or Workaround
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilter32f_8s_C3R

ippiFilterBorderInit_32f+ippiConvert_8s16s+ippiFilterBorder_16s_C3R
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilter32f_8s_C4R

ippiFilterBorderInit_32f+ippiConvert_8s16s+ippiFilterBorder_16s_C4R
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilter32f_8u16s_C1R

ippiFilterBorderInit_32f+ippiConvert_8u16s+ippiFilterBorder_16s_C1RNOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilter32f_8u16s_C3R

1770

ippiFilterBorderInit_32f+ippiConvert_8u16s+ippiFilterBorder_16s_C3R

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

1

Substitution or Workaround
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilter32f_8u16s_C4R

ippiFilterBorderInit_32f+ippiConvert_8u16s+ippiFilterBorder_16s_C4R
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilter32f_8u_AC4R

ippiFilterBorderInit_32f+ippiFilterBorder_8u_C4R
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilter32f_8u_C1R

ippiFilterBorderInit_32f+ippiFilterBorder_8u_C1R
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilter32f_8u_C3R

ippiFilterBorderInit_32f+ippiFilterBorder_8u_C3R

1771

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or Workaround
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilter32f_8u_C4R

ippiFilterBorderInit_32f+ippiFilterBorder_8u_C4R
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilterBilateralGetBufSize_8u_C1R

ippiFilterBilateralBorderGetBufferSize

ippiFilterBilateralInit_8u_C1R

ippiFilterBilateralBorderInit

ippiFilterBilateral_8u_C1R

ippiFilterBilateralBorder_8u_C1R

ippiFilterBox_16s_AC4IR

Use ippiFilterBoxBorder

ippiFilterBox_16s_AC4R

Use ippiFilterBoxBorder

ippiFilterBox_16s_C1IR

Use ippiFilterBoxBorder

ippiFilterBox_16s_C1R

Use ippiFilterBoxBorder

ippiFilterBox_16s_C3IR

Use ippiFilterBoxBorder

ippiFilterBox_16s_C3R

Use ippiFilterBoxBorder

ippiFilterBox_16s_C4IR

Use ippiFilterBoxBorder

ippiFilterBox_16s_C4R

Use ippiFilterBoxBorder

ippiFilterBox_16u_AC4IR

Use ippiFilterBoxBorder

ippiFilterBox_16u_AC4R

Use ippiFilterBoxBorder

ippiFilterBox_16u_C1IR

Use ippiFilterBoxBorder

ippiFilterBox_16u_C1R

Use ippiFilterBoxBorder

ippiFilterBox_16u_C3IR

Use ippiFilterBoxBorder

ippiFilterBox_16u_C3R

Use ippiFilterBoxBorder

ippiFilterBox_16u_C4IR

Use ippiFilterBoxBorder

1772

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippiFilterBox_16u_C4R

Use ippiFilterBoxBorder

ippiFilterBox_32f_AC4IR

Use ippiFilterBoxBorder

ippiFilterBox_32f_AC4R

Use ippiFilterBoxBorder

ippiFilterBox_32f_C1IR

Use ippiFilterBoxBorder

ippiFilterBox_32f_C1R

Use ippiFilterBoxBorder

ippiFilterBox_32f_C3IR

Use ippiFilterBoxBorder

ippiFilterBox_32f_C3R

Use ippiFilterBoxBorder

ippiFilterBox_32f_C4IR

Use ippiFilterBoxBorder

ippiFilterBox_32f_C4R

Use ippiFilterBoxBorder

ippiFilterBox_8u_AC4IR

Use ippiFilterBoxBorder

ippiFilterBox_8u_AC4R

Use ippiFilterBoxBorder

ippiFilterBox_8u_C1IR

Use ippiFilterBoxBorder

ippiFilterBox_8u_C1R

Use ippiFilterBoxBorder

ippiFilterBox_8u_C3IR

Use ippiFilterBoxBorder

ippiFilterBox_8u_C3R

Use ippiFilterBoxBorder

ippiFilterBox_8u_C4IR

Use ippiFilterBoxBorder

ippiFilterBox_8u_C4R

Use ippiFilterBoxBorder

ippiFilterColumn_64f_C1R

Use ippiFilter_64f_C1R

ippiFilterColumn32f_16s_AC4R

ippiFilterBorderInit_32f+ippiFilterBorder_16s_C4R (with1filter.width=1)
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilterColumn32f_16s_C1R

ippiFilterBorderInit_32f+ippiFilterBorder_16s_C1R (withfilter.width=1)

1773

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or Workaround
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilterColumn32f_16s_C3R

ippiFilterBorderInit_32f+ippiFilterBorder_16s_C3R (withfilter.width=1)
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilterColumn32f_16s_C4R

ippiFilterBorderInit_32f+ippiFilterBorder_16s_C4R (withfilter.width=1)
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilterColumn32f_16u_AC4R

ippiFilterBorderInit_32f+ippiFilterBorder_16u_C4R (withfilter.width=1)
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilterColumn32f_16u_C1R

ippiFilterBorderInit_32f+ippiFilterBorder_16u_C1R (withfilter.width=1)

1774

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

1

Substitution or Workaround
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilterColumn32f_16u_C3R

ippiFilterBorderInit_32f+ippiFilterBorder_16u_C3R (withfilter.width=1)
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilterColumn32f_16u_C4R

ippiFilterBorderInit_32f+ippiFilterBorder_16u_C4R (withfilter.width=1)
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilterColumn32f_8u_AC4R

ippiFilterBorderInit_32f+ippiFilterBorder_8u_C4R (with filter.width=1)
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilterColumn32f_8u_C1R

ippiFilterBorderInit_32f+ippiFilterBorder_8u_C1R (with filter.width=1)

1775

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or Workaround
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilterColumn32f_8u_C3R

ippiFilterBorderInit_32f+ippiFilterBorder_8u_C3R (with filter.width=1)
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilterColumn32f_8u_C4R

ippiFilterBorderInit_32f+ippiFilterBorder_8u_C4R (with filter.width=1)
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilterColumn_16s_AC4R

ippiFilterBorderInit_16s+ippiFilterBorder_16s_C4R (withfilter.width=1)
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilterColumn_16s_C1R

ippiFilterBorderInit_16s+ippiFilterBorder_16s_C1R (withfilter.width=1)

1776

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

1

Substitution or Workaround
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilterColumn_16s_C3R

ippiFilterBorderInit_16s+ippiFilterBorder_16s_C3R (withfilter.width=1)
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilterColumn_16s_C4R

ippiFilterBorderInit_16s+ippiFilterBorder_16s_C4R (withfilter.width=1)
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilterColumn_16u_AC4R

ippiFilterBorderInit_16s+ippiFilterBorder_16u_C4R (withfilter.width=1)
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilterColumn_16u_C1R

ippiFilterBorderInit_16s+ippiFilterBorder_16u_C1R (withfilter.width=1)

1777

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or Workaround
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilterColumn_16u_C3R

ippiFilterBorderInit_16s+ippiFilterBorder_16u_C3R (withfilter.width=1)
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilterColumn_16u_C4R

ippiFilterBorderInit_16s+ippiFilterBorder_16u_C4R (withfilter.width=1)
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilterColumn_32f_AC4R

ippiFilterBorderInit_32f+ippiFilterBorder_32f_C4R (withfilter.width=1)
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilterColumn_32f_C1R

ippiFilterBorderInit_32f+ippiFilterBorder_32f_C1R (withfilter.width=1)

1778

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

1

Substitution or Workaround
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilterColumn_32f_C3R

ippiFilterBorderInit_32f+ippiFilterBorder_32f_C3R (withfilter.width=1)
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilterColumn_32f_C4R

ippiFilterBorderInit_32f+ippiFilterBorder_32f_C4R (withfilter.width=1)
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilterColumn_8u_AC4R

ippiFilterBorderInit_16s+ippiFilterBorder_8u_C4R (with filter.width=1)
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilterColumn_8u_C1R

ippiFilterBorderInit_16s+ippiFilterBorder_8u_C1R (with filter.width=1)

1779

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or Workaround
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilterColumn_8u_C3R

ippiFilterBorderInit_16s+ippiFilterBorder_8u_C3R (with filter.width=1)
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilterColumn_8u_C4R

ippiFilterBorderInit_16s+ippiFilterBorder_8u_C4R (with filter.width=1)
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilterGauss_16s_AC4R

ippiCopy_C4C1R+ippiFilterGaussianBorder_16s_C1R

ippiFilterGauss_16s_C1R

ippiFilterGaussianBorder_16s_C1R

ippiFilterGauss_16s_C3R

ippiFilterGaussianBorder_16s_C3R

ippiFilterGauss_16s_C4R

ippiCopy_C4C1R+ippiFilterGaussianBorder_16s_C1R

ippiFilterGauss_16u_AC4R

ippiCopy_C4C1R+ippiFilterGaussianBorder_16u_C1R

ippiFilterGauss_16u_C1R

ippiFilterGaussianBorder_16u_C1R

ippiFilterGauss_16u_C3R

ippiFilterGaussianBorder_16u_C3R

ippiFilterGauss_16u_C4R

ippiCopy_C4C1R+ippiFilterGaussianBorder_16u_C1R

1780

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

ippiFilterGauss_32f_AC4R

1

Substitution or WorkaroundippiCopy_C4C1R+ippiFilterGaussianBorder_32f_C1R

ippiFilterGauss_32f_C1R

ippiFilterGaussianBorder_32f_C1R

ippiFilterGauss_32f_C3R

ippiFilterGaussianBorder_32f_C3R

ippiFilterGauss_32f_C4R

ippiCopy_C4C1R+ippiFilterGaussianBorder_32f_C1R

ippiFilterGauss_8u_AC4R

ippiCopy_C4C1R+ippiFilterGaussianBorder_8u_C1R

ippiFilterGauss_8u_C1R

ippiFilterGaussianBorder_8u_C1R

ippiFilterGauss_8u_C3R

ippiFilterGaussianBorder_8u_C3R

ippiFilterGauss_8u_C4R

ippiCopy_C4C1R+ippiFilterGaussianBorder_8u_C1R

ippiFilterHipass_16s_AC4R

ippiFilterHipassBorder_16s_AC4R

ippiFilterHipass_16s_C1R

ippiFilterHipassBorder_16s_C1R

ippiFilterHipass_16s_C3R

ippiFilterHipassBorder_16s_C3R

ippiFilterHipass_16s_C4R

ippiFilterHipassBorder_16s_C4R

ippiFilterHipass_32f_AC4R

ippiFilterHipassBorder_32f_AC4R

ippiFilterHipass_32f_C1R

ippiFilterHipassBorder_32f_C1R

ippiFilterHipass_32f_C3R

ippiFilterHipassBorder_32f_C3R

ippiFilterHipass_32f_C4R

ippiFilterHipassBorder_32f_C4R

ippiFilterHipass_8u_AC4R

ippiFilterHipassBorder_8u_AC4R

ippiFilterHipass_8u_C1R

ippiFilterHipassBorder_8u_C1R

ippiFilterHipass_8u_C3R

ippiFilterHipassBorder_8u_C3R

ippiFilterHipass_8u_C4R

ippiFilterHipassBorder_8u_C4R

ippiFilterLaplace_16s_AC4R

ippiFilterLaplaceBorder_16s_AC4R

ippiFilterLaplace_16s_C1R

ippiFilterLaplaceBorder_16s_C1R

ippiFilterLaplace_16s_C3R

ippiFilterLaplaceBorder_16s_C3R

ippiFilterLaplace_16s_C4R

ippiFilterLaplaceBorder_16s_C4R

ippiFilterLaplace_32f_AC4R

ippiFilterLaplaceBorder_32f_AC4R

ippiFilterLaplace_32f_C1R

ippiFilterLaplaceBorder_32f_C1R

ippiFilterLaplace_32f_C3R

ippiFilterLaplaceBorder_32f_C3R

1781

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippiFilterLaplace_32f_C4R

ippiFilterLaplaceBorder_32f_C4R

ippiFilterLaplace_8s16s_C1R

ippiConvert_8s16s+ippiFilterLaplaceBorder_16s

ippiFilterLaplace_8u16s_C1R

ippiConvert_8u16s+ippiFilterLaplaceBorder_16s

ippiFilterLaplace_8u_AC4R

ippiFilterLaplaceBorder_8u_AC4R

ippiFilterLaplace_8u_C1R

ippiFilterLaplaceBorder_8u_C1R

ippiFilterLaplace_8u_C3R

ippiFilterLaplaceBorder_8u_C3R

ippiFilterLaplace_8u_C4R

ippiFilterLaplaceBorder_8u_C4R

ippiFilterLowpass_16s_AC4R

ippiFilterBoxBorder_16s_AC4R

ippiFilterLowpass_16s_C1R

ippiFilterBoxBorder_16s_C1R

ippiFilterLowpass_16s_C3R

ippiFilterBoxBorder_16s_C3R

ippiFilterLowpass_16u_AC4R

ippiFilterBoxBorder_16u_AC4R

ippiFilterLowpass_16u_C1R

ippiFilterBoxBorder_16u_C1R

ippiFilterLowpass_16u_C3R

ippiFilterBoxBorder_16u_C3R

ippiFilterLowpass_32f_AC4R

ippiFilterBoxBorder_32f_AC4R

ippiFilterLowpass_32f_C1R

ippiFilterBoxBorder_32f_C1R

ippiFilterLowpass_32f_C3R

ippiFilterBoxBorder_32f_C3R

ippiFilterLowpass_8u_AC4R

ippiFilterBoxBorder_8u_AC4R

ippiFilterLowpass_8u_C1R

ippiFilterBoxBorder_8u_C1R

ippiFilterLowpass_8u_C3R

ippiFilterBoxBorder_8u_C3R

ippiFilterMax_16s_AC4R

Use ippiFilterMaxBorder

ippiFilterMax_16s_C1R

Use ippiFilterMaxBorder

ippiFilterMax_16s_C3R

Use ippiFilterMaxBorder

ippiFilterMax_16s_C4R

Use ippiFilterMaxBorder

ippiFilterMax_16u_AC4R

Use ippiFilterMaxBorder

ippiFilterMax_16u_C1R

Use ippiFilterMaxBorder

ippiFilterMax_16u_C3R

Use ippiFilterMaxBorder

ippiFilterMax_16u_C4R

Use ippiFilterMaxBorder

ippiFilterMax_32f_AC4R

Use ippiFilterMaxBorder

1782

Developer Guide and Reference for Intel® Integrated Performance Primitives

1

Removed from 9.0

Substitution or WorkaroundippiFilterMax_32f_C1R

Use ippiFilterMaxBorder

ippiFilterMax_32f_C3R

Use ippiFilterMaxBorder

ippiFilterMax_32f_C4R

Use ippiFilterMaxBorder

ippiFilterMax_8u_AC4R

Use ippiFilterMaxBorder

ippiFilterMax_8u_C1R

Use ippiFilterMaxBorder

ippiFilterMax_8u_C3R

Use ippiFilterMaxBorder

ippiFilterMax_8u_C4R

Use ippiFilterMaxBorder

ippiFilterMedianHoriz_16s_AC4R

Use ippiFilterMedianBorder with horiz mask
(mask.height=1)

ippiFilterMedianHoriz_16s_C1R

Use ippiFilterMedianBorder with horiz mask
(mask.height=1)

ippiFilterMedianHoriz_16s_C3R

Use ippiFilterMedianBorder with horiz mask
(mask.height=1)

ippiFilterMedianHoriz_16s_C4R

Use ippiFilterMedianBorder with horiz mask
(mask.height=1)

ippiFilterMedianHoriz_16u_AC4R

Use ippiFilterMedianBorder with horiz mask
(mask.height=1)

ippiFilterMedianHoriz_16u_C1R

Use ippiFilterMedianBorder with horiz mask
(mask.height=1)

ippiFilterMedianHoriz_16u_C3R

Use ippiFilterMedianBorder with horiz mask
(mask.height=1)

ippiFilterMedianHoriz_16u_C4R

Use ippiFilterMedianBorder with horiz mask
(mask.height=1)

ippiFilterMedianHoriz_8u_AC4R

Use ippiFilterMedianBorder with horiz mask
(mask.height=1)

ippiFilterMedianHoriz_8u_C1R

Use ippiFilterMedianBorder with horiz mask
(mask.height=1)

ippiFilterMedianHoriz_8u_C3R

Use ippiFilterMedianBorder with horiz mask
(mask.height=1)

ippiFilterMedianHoriz_8u_C4R

Use ippiFilterMedianBorder with horiz mask
(mask.height=1)

ippiFilterMedianVert_16s_AC4R

Use ippiFilterMedianBorder with vertical mask
(mask.width=1)

ippiFilterMedianVert_16s_C1R

Use ippiFilterMedianBorder with vertical mask
(mask.width=1)

1783

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippiFilterMedianVert_16s_C3R

Use ippiFilterMedianBorder with vertical mask
(mask.width=1)

ippiFilterMedianVert_16s_C4R

Use ippiFilterMedianBorder with vertical mask
(mask.width=1)

ippiFilterMedianVert_16u_AC4R

Use ippiFilterMedianBorder with vertical mask
(mask.width=1)

ippiFilterMedianVert_16u_C1R

Use ippiFilterMedianBorder with vertical mask
(mask.width=1)

ippiFilterMedianVert_16u_C3R

Use ippiFilterMedianBorder with vertical mask
(mask.width=1)

ippiFilterMedianVert_16u_C4R

Use ippiFilterMedianBorder with vertical mask
(mask.width=1)

ippiFilterMedianVert_8u_AC4R

Use ippiFilterMedianBorder with vertical mask
(mask.width=1)

ippiFilterMedianVert_8u_C1R

Use ippiFilterMedianBorder with vertical mask
(mask.width=1)

ippiFilterMedianVert_8u_C3R

Use ippiFilterMedianBorder with vertical mask
(mask.width=1)

ippiFilterMedianVert_8u_C4R

Use ippiFilterMedianBorder with vertical mask
(mask.width=1)

ippiFilterMedian_16s_AC4R

Use ippiFilterMedianBorder

ippiFilterMedian_16s_C1R

Use ippiFilterMedianBorder

ippiFilterMedian_16s_C3R

Use ippiFilterMedianBorder

ippiFilterMedian_16s_C4R

Use ippiFilterMedianBorder

ippiFilterMedian_16u_AC4R

Use ippiFilterMedianBorder

ippiFilterMedian_16u_C1R

Use ippiFilterMedianBorder

ippiFilterMedian_16u_C3R

Use ippiFilterMedianBorder

ippiFilterMedian_16u_C4R

Use ippiFilterMedianBorder

ippiFilterMedian_32f_C1R

Use ippiFilterMedianBorder

ippiFilterMedian_8u_AC4R

Use ippiFilterMedianBorder

ippiFilterMedian_8u_C1R

Use ippiFilterMedianBorder

ippiFilterMedian_8u_C3R

Use ippiFilterMedianBorder

ippiFilterMedian_8u_C4R

Use ippiFilterMedianBorder

ippiFilterMin_16s_AC4R

Use ippiFilterMinBorder

1784

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippiFilterMin_16s_C1R

Use ippiFilterMinBorder

ippiFilterMin_16s_C3R

Use ippiFilterMinBorder

ippiFilterMin_16s_C4R

Use ippiFilterMinBorder

ippiFilterMin_16u_AC4R

Use ippiFilterMinBorder

ippiFilterMin_16u_C1R

Use ippiFilterMinBorder

ippiFilterMin_16u_C3R

Use ippiFilterMinBorder

ippiFilterMin_16u_C4R

Use ippiFilterMinBorder

ippiFilterMin_32f_AC4R

Use ippiFilterMinBorder

ippiFilterMin_32f_C1R

Use ippiFilterMinBorder

ippiFilterMin_32f_C3R

Use ippiFilterMinBorder

ippiFilterMin_32f_C4R

Use ippiFilterMinBorder

ippiFilterMin_8u_AC4R

Use ippiFilterMinBorder

ippiFilterMin_8u_C1R

Use ippiFilterMinBorder

ippiFilterMin_8u_C3R

Use ippiFilterMinBorder

ippiFilterMin_8u_C4R

Use ippiFilterMinBorder

ippiFilterPrewittHoriz_16s_AC4R

Use ippiCopy_16s_C4C1R+ippiFilterPrewittHorizBorder_16s_C1R

ippiFilterPrewittHoriz_16s_C1R

ippiFilterPrewittHorizBorder_16s_C1R

ippiFilterPrewittHoriz_16s_C3R

Use ippiCopy_16s_C3C1R+ippiFilterPrewittHorizBorder_16s_C1R

ippiFilterPrewittHoriz_16s_C4R

Use ippiCopy_16s_C4C1R+ippiFilterPrewittHorizBorder_16s_C1R

ippiFilterPrewittHoriz_32f_AC4R

Use ippiCopy_32f_C4C1R+ippiFilterPrewittHorizBorder_32f_C1R

ippiFilterPrewittHoriz_32f_C1R

ippiFilterPrewittHorizBorder_32f_C1R

ippiFilterPrewittHoriz_32f_C3R

Use ippiCopy_32f_C3C1R+ippiFilterPrewittHorizBorder_32f_C1R

ippiFilterPrewittHoriz_32f_C4R

Use ippiCopy_32f_C4C1R+ippiFilterPrewittHorizBorder_32f_C1R

ippiFilterPrewittHoriz_8u_AC4R

Use ippiCopy_8u_C4C1R+ippiFilterPrewittHorizBorder_8u16s_C1R

ippiFilterPrewittHoriz_8u_C1R

ippiFilterPrewittHorizBorder_8u16s_C1R

1785

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippiFilterPrewittHoriz_8u_C3R

Use ippiCopy_8u_C3C1R+ippiFilterPrewittHorizBorder_8u16s_C1R

ippiFilterPrewittHoriz_8u_C4R

Use ippiCopy_8u_C4C1R+ippiFilterPrewittHorizBorder_8u16s_C1R

ippiFilterPrewittVert_16s_AC4R

Use ippiCopy_16s_C4C1R+ippiFilterPrewittVertBorder_16s_C1R

ippiFilterPrewittVert_16s_C1R

ippiFilterPrewittVertBorder_16s_C1R

ippiFilterPrewittVert_16s_C3R

Use ippiCopy_16s_C3C1R+ippiFilterPrewittVertBorder_16s_C1R

ippiFilterPrewittVert_16s_C4R

Use ippiCopy_16s_C4C1R+ippiFilterPrewittVertBorder_16s_C1R

ippiFilterPrewittVert_32f_AC4R

Use ippiCopy_32f_C4C1R+ippiFilterPrewittVertBorder_32f_C1R

ippiFilterPrewittVert_32f_C1R

ippiFilterPrewittVertBorder_32f_C1R

ippiFilterPrewittVert_32f_C3R

Use ippiCopy_32f_C3C1R+ippiFilterPrewittVertBorder_32f_C1R

ippiFilterPrewittVert_32f_C4R

Use ippiCopy_32f_C4C1R+ippiFilterPrewittVertBorder_32f_C1R

ippiFilterPrewittVert_8u_AC4R

Use ippiCopy_8u_C4C1R+ippiFilterPrewittVertBorder_8u16s_C1R

ippiFilterPrewittVert_8u_C1R

ippiFilterPrewittVertBorder_8u16s_C1R

ippiFilterPrewittVert_8u_C3R

Use ippiCopy_8u_C3C1R+ippiFilterPrewittVertBorder_8u16s_C1R

ippiFilterPrewittVert_8u_C4R

Use ippiCopy_8u_C4C1R+ippiFilterPrewittVertBorder_8u16s_C1R

ippiFilterRobertsDown_16s_AC4R

Use ippiCopy_16s_C4C1R+ippiFilterRobertsDownBorder_16s_C1R

ippiFilterRobertsDown_16s_C1R

ippiFilterRobertsDownBorder_16s_C1R

ippiFilterRobertsDown_16s_C3R

Use ippiCopy_16s_C3C1R+ippiFilterRobertsDownBorder_16s_C1R

ippiFilterRobertsDown_32f_AC4R

Use ippiCopy_32f_C4C1R+ippiFilterRobertsDownBorder_32f_C1R

ippiFilterRobertsDown_32f_C1R

ippiFilterRobertsDownBorder_32f_C1R

ippiFilterRobertsDown_32f_C3R

Use ippiCopy_32f_C3C1R+ippiFilterRobertsDownBorder_32f_C1R

1786

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippiFilterRobertsDown_8u_AC4R

Use ippiCopy_8u_C4C1R+ippiFilterRobertsDownBorder_8u16s_C1R

ippiFilterRobertsDown_8u_C1R

ippiFilterRobertsDownBorder_8u16s_C1R

ippiFilterRobertsDown_8u_C3R

Use ippiCopy_8u_C3C1R+ippiFilterRobertsDownBorder_8u16s_C1R

ippiFilterRobertsUp_16s_AC4R

Use ippiCopy_16s_C4C1R+ippiFilterRobertsUpBorder_16s_C1R

ippiFilterRobertsUp_16s_C1R

ippiFilterRobertsUpBorder_16s_C1R

ippiFilterRobertsUp_16s_C3R

Use ippiCopy_16s_C3C1R+ippiFilterRobertsUpBorder_16s_C1R

ippiFilterRobertsUp_32f_AC4R

Use ippiCopy_32f_C4C1R+ippiFilterRobertsUpBorder_32f_C1R

ippiFilterRobertsUp_32f_C1R

ippiFilterRobertsUpBorder_32f_C1R

ippiFilterRobertsUp_32f_C3R

Use ippiCopy_32f_C3C1R+ippiFilterRobertsUpBorder_32f_C1R

ippiFilterRobertsUp_8u_AC4R

Use ippiCopy_8u_C4C1R+ippiFilterRobertsUpBorder_8u16s_C1R

ippiFilterRobertsUp_8u_C1R

ippiFilterRobertsUpBorder_8u16s_C1R

ippiFilterRobertsUp_8u_C3R

Use ippiCopy_8u_C3C1R+ippiFilterRobertsUpBorder_8u16s_C1R

ippiFilterRoundGetBufSize16s_8u_AC4R

ippiFilterBorderGetSize

ippiFilterRoundGetBufSize16s_8u_C1R

ippiFilterBorderGetSize

ippiFilterRoundGetBufSize16s_8u_C3R

ippiFilterBorderGetSize

ippiFilterRoundGetBufSize16s_8u_C4R

ippiFilterBorderGetSize

ippiFilterRoundGetBufSize32f_16s_AC4R

ippiFilterBorderGetSize

ippiFilterRoundGetBufSize32f_16s_C1R

ippiFilterBorderGetSize

ippiFilterRoundGetBufSize32f_16s_C3R

ippiFilterBorderGetSize

ippiFilterRoundGetBufSize32f_16s_C4R

ippiFilterBorderGetSize

ippiFilterRoundGetBufSize32f_16u_AC4R

ippiFilterBorderGetSize

ippiFilterRoundGetBufSize32f_16u_C1R

ippiFilterBorderGetSize

ippiFilterRoundGetBufSize32f_16u_C3R

ippiFilterBorderGetSize

ippiFilterRoundGetBufSize32f_16u_C4R

ippiFilterBorderGetSize

ippiFilterRoundGetBufSize32f_8u_AC4R

ippiFilterBorderGetSize

1787

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippiFilterRoundGetBufSize32f_8u_C1R

ippiFilterBorderGetSize

ippiFilterRoundGetBufSize32f_8u_C3R

ippiFilterBorderGetSize

ippiFilterRoundGetBufSize32f_8u_C4R

ippiFilterBorderGetSize

ippiFilterRoundGetBufSize32s_16s_AC4R

ippiFilterBorderGetSize

ippiFilterRoundGetBufSize32s_16s_C1R

ippiFilterBorderGetSize

ippiFilterRoundGetBufSize32s_16s_C3R

ippiFilterBorderGetSize

ippiFilterRoundGetBufSize32s_16s_C4R

ippiFilterBorderGetSize

ippiFilterRoundGetBufSize32s_16u_AC4R

ippiFilterBorderGetSize

ippiFilterRoundGetBufSize32s_16u_C1R

ippiFilterBorderGetSize

ippiFilterRoundGetBufSize32s_16u_C3R

ippiFilterBorderGetSize

ippiFilterRoundGetBufSize32s_16u_C4R

ippiFilterBorderGetSize

ippiFilterRow_64f_C1R

ippiFilter_64f_C1R

ippiFilterRow32f_16s_AC4R

ippiFilterBorderInit_32f+ippiFilterBorder_16s_C4R (withfilter.height=1)
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilterRow32f_16s_C1R

ippiFilterBorderInit_32f+ippiFilterBorder_16s_C1R (withfilter.height=1)
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilterRow32f_16s_C3R

ippiFilterBorderInit_32f+ippiFilterBorder_16s_C3R (withfilter.height=1)

1788

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

1

Substitution or Workaround
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilterRow32f_16s_C4R

ippiFilterBorderInit_32f+ippiFilterBorder_16s_C4R (withfilter.height=1)
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilterRow32f_16u_AC4R

ippiFilterBorderInit_32f+ippiFilterBorder_16u_C4R (withfilter.height=1)
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilterRow32f_16u_C1R

ippiFilterBorderInit_32f+ippiFilterBorder_16u_C1R (withfilter.height=1)
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilterRow32f_16u_C3R

ippiFilterBorderInit_32f+ippiFilterBorder_16u_C3R (withfilter.height=1)

1789

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or Workaround
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilterRow32f_16u_C4R

ippiFilterBorderInit_32f+ippiFilterBorder_16u_C4R (withfilter.height=1)
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilterRow32f_8u_AC4R

ippiFilterBorderInit_32f+ippiFilterBorder_8u_C4R (with filter.height=1)
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilterRow32f_8u_C1R

ippiFilterBorderInit_32f+ippiFilterBorder_8u_C1R (with filter.height=1)
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilterRow32f_8u_C3R

1790

ippiFilterBorderInit_32f+ippiFilterBorder_8u_C3R (with filter.height=1)

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

1

Substitution or Workaround
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilterRow32f_8u_C4R

ippiFilterBorderInit_32f+ippiFilterBorder_8u_C4R (with filter.height=1)
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilterRow_16s_AC4R

ippiFilterBorderInit_16s+ippiFilterBorder_16s_C4R (withfilter.height=1)
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilterRow_16s_C1R

ippiFilterBorderInit_16s+ippiFilterBorder_16s_C1R (withfilter.height=1)
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilterRow_16s_C3R

ippiFilterBorderInit_16s+ippiFilterBorder_16s_C3R (withfilter.height=1)

1791

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or Workaround
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilterRow_16s_C4R

ippiFilterBorderInit_16s+ippiFilterBorder_16s_C4R (withfilter.height=1)
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilterRow_16u_AC4R

ippiFilterBorderInit_16s+ippiFilterBorder_16u_C4R (withfilter.height=1)
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilterRow_16u_C1R

ippiFilterBorderInit_16s+ippiFilterBorder_16u_C1R (withfilter.height=1)
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilterRow_16u_C3R

ippiFilterBorderInit_16s+ippiFilterBorder_16u_C3R (withfilter.height=1)

1792

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

1

Substitution or Workaround
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilterRow_16u_C4R

ippiFilterBorderInit_16s+ippiFilterBorder_16u_C4R (withfilter.height=1)
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilterRow_32f_AC4R

ippiFilterBorderInit_32f+ippiFilterBorder_32f_C4R (withfilter.height=1)
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilterRow_32f_C1R

ippiFilterBorderInit_32f+ippiFilterBorder_32f_C1R (withfilter.height=1)
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilterRow_32f_C3R

ippiFilterBorderInit_32f+ippiFilterBorder_32f_C3R (withfilter.height=1)

1793

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or Workaround
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilterRow_32f_C4R

ippiFilterBorderInit_32f+ippiFilterBorder_32f_C4R (withfilter.height=1)
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilterRow_8u_AC4R

ippiFilterBorderInit_16s+ippiFilterBorder_8u_C4R (with filter.height=1)
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilterRow_8u_C1R

ippiFilterBorderInit_16s+ippiFilterBorder_8u_C1R (with filter.height=1)
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilterRow_8u_C3R

1794

ippiFilterBorderInit_16s+ippiFilterBorder_8u_C3R (with filter.height=1)

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

1

Substitution or Workaround
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilterRow_8u_C4R

ippiFilterBorderInit_16s+ippiFilterBorder_8u_C4R (with filter.height=1)
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilterScharrHoriz_32f_C1R
ippiFilterScharrHoriz_8s16s_C1R

ippiFilterScharrHorizMaskBorder_32f_C1R
ippiConvert_8s16s+ippiFilterScharrHorizMaskBorder_16s_C1R

ippiFilterScharrHoriz_8u16s_C1R

ippiFilterScharrHorizMaskBorder_8u16s_C1R

ippiFilterScharrVert_32f_C1R

ippiFilterScharrVertMaskBorder_32f_C1R

ippiFilterScharrVert_8s16s_C1R

ippiConvert_8s16s+ippiFilterScharrVertMaskBorder_16s_C1R

ippiFilterScharrVert_8u16s_C1R

ippiFilterScharrVertMaskBorder_8u16s_C1R

ippiFilterSharpen_16s_AC4R

ippiFilterSharpenBorder_16s_AC4R

ippiFilterSharpen_16s_C1R

ippiFilterSharpenBorder_16s_C1R

ippiFilterSharpen_16s_C3R

ippiFilterSharpenBorder_16s_C3R

ippiFilterSharpen_16s_C4R

ippiFilterSharpenBorder_16s_C4R

ippiFilterSharpen_32f_AC4R

ippiFilterSharpenBorder_32f_AC4R

ippiFilterSharpen_32f_C1R

ippiFilterSharpenBorder_32f_C1R

ippiFilterSharpen_32f_C3R

ippiFilterSharpenBorder_32f_C3R

ippiFilterSharpen_32f_C4R

ippiFilterSharpenBorder_32f_C4R

ippiFilterSharpen_8u_AC4R

ippiFilterSharpenBorder_8u_AC4R

ippiFilterSharpen_8u_C1R

ippiFilterSharpenBorder_8u_C1R

ippiFilterSharpen_8u_C3R

ippiFilterSharpenBorder_8u_C3R

1795

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippiFilterSharpen_8u_C4R

ippiFilterSharpenBorder_8u_C4R

ippiFilterSobelCross_32f_C1R

ippiFilterSobelCrossBorder_32f_C1R

ippiFilterSobelCross_8s16s_C1R

ippiConvert_8s32f+ippiFilterSobelCrossBorder_32f_C1R

ippiFilterSobelCross_8u16s_C1R

ippiFilterSobelCrossBorder_8u16s_C1R

ippiFilterSobelHorizGetBufferSize_32f_C1R

ippiFilterSobelHorizBorderGetBufferSize

ippiFilterSobelHorizGetBufferSize_8u16s_C1R ippiFilterSobelHorizBorderGetBufferSize
ippiFilterSobelHorizMask_32f_C1R

ippiFilterSobelHorizBorder_32f_C1R

ippiFilterSobelHorizSecond_32f_C1R

ippiFilterSobelHorizSecondBorder_32f_C1R

ippiFilterSobelHorizSecond_8s16s_C1R

ippiConvert_8s32f+ippiFilterSobelHorizSecondBorder_32f_C1R

ippiFilterSobelHorizSecond_8u16s_C1R

ippiFilterSobelHorizSecondBorder_8u16s_C1R

ippiFilterSobelHoriz_16s_AC4R

Use ippiCopy_16s_C4C1R+ippiFilterSobelHorizBorder_16s_C1R

ippiFilterSobelHoriz_16s_C1R

ippiFilterSobelHorizBorder_16s_C1R

ippiFilterSobelHoriz_16s_C3R

Use ippiCopy_16s_C3C1R+ippiFilterSobelHorizBorder_16s_C1R

ippiFilterSobelHoriz_16s_C4R

Use ippiCopy_16s_C4C1R+ippiFilterSobelHorizBorder_16s_C1R

ippiFilterSobelHoriz_32f_AC4R

Use ippiCopy_32f_C4C1R+ippiFilterSobelHorizBorder_32f_C1R

ippiFilterSobelHoriz_32f_C1R

ippiFilterSobelHorizBorder_32f_C1R

ippiFilterSobelHoriz_32f_C3R

Use ippiCopy_32f_C3C1R+ippiFilterSobelHorizBorder_32f_C1R

ippiFilterSobelHoriz_32f_C4R

Use ippiCopy_32f_C4C1R+ippiFilterSobelHorizBorder_32f_C1R

ippiFilterSobelHoriz_8s16s_C1R

ippiConvert_8s16s+ippiFilterSobelHorizBorder_16s_C1R

ippiFilterSobelHoriz_8u16s_C1R

ippiFilterSobelHorizBorder_8u16s_C1R

ippiFilterSobelHoriz_8u_AC4R

Use ippiCopy_8u_C4C1R+ippiFilterSobelHorizBorder_8u16s_C1R

ippiFilterSobelHoriz_8u_C1R

ippiFilterSobelHorizBorder_8u16s_C1R

ippiFilterSobelHoriz_8u_C3R

Use ippiCopy_8u_C3C1R+ippiFilterSobelHorizBorder_8u16s_C1R

1796

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippiFilterSobelHoriz_8u_C4R

Use ippiCopy_8u_C4C1R+ippiFilterSobelHorizBorder_8u16s_C1R

ippiFilterSobelVertGetBufferSize_32f_C1R

ippiFilterSobelVertBorderGetBufferSize

ippiFilterSobelVertGetBufferSize_8u16s_C1R ippiFilterSobelVertBorderGetBufferSize
ippiFilterSobelVertMask_32f_C1R

ippiFilterSobelVertBorder_32f_C1R

ippiFilterSobelVertSecond_32f_C1R

ippiFilterSobelVertSecondBorder_32f_C1R

ippiFilterSobelVertSecond_8s16s_C1R

ippiConvert_8s32f+ippiFilterSobelVertSecondBorder_32f_C1R

ippiFilterSobelVertSecond_8u16s_C1R

ippiFilterSobelVertSecondBorder_8u16s_C1R

ippiFilterSobelVert_16s_AC4R

Use ippiCopy_16s_C4C1R+ippiFilterSobelVertBorder_16s_C1R

ippiFilterSobelVert_16s_C1R

ippiFilterSobelVertBorder_16s_C1R

ippiFilterSobelVert_16s_C3R

Use ippiCopy_16s_C3C1R+ippiFilterSobelVertBorder_16s_C1R

ippiFilterSobelVert_16s_C4R

Use ippiCopy_16s_C4C1R+ippiFilterSobelVertBorder_16s_C1R

ippiFilterSobelVert_32f_AC4R

Use ippiCopy_32f_C4C1R+ippiFilterSobelVertBorder_32f_C1R

ippiFilterSobelVert_32f_C1R

ippiFilterSobelVertBorder_32f_C1R

ippiFilterSobelVert_32f_C3R

Use ippiCopy_32f_C3C1R+ippiFilterSobelVertBorder_32f_C1R

ippiFilterSobelVert_32f_C4R

Use ippiCopy_32f_C4C1R+ippiFilterSobelVertBorder_32f_C1R

ippiFilterSobelVert_8s16s_C1R

ippiConvert_8s16s+ippiFilterSobelVertBorder_16s_C1R

ippiFilterSobelVert_8u16s_C1R

ippiFilterSobelVertBorder_8u16s_C1R

ippiFilterSobelVert_8u_AC4R

Use ippiCopy_8u_C4C1R+ippiFilterSobelVertBorder_8u16s_C1R

ippiFilterSobelVert_8u_C1R

ippiFilterSobelVertBorder_8u16s_C1R

ippiFilterSobelVert_8u_C3R

Use ippiCopy_8u_C3C1R+ippiFilterSobelVertBorder_8u16s_C1R

ippiFilterSobelVert_8u_C4R

Use ippiCopy_8u_C4C1R+ippiFilterSobelVertBorder_8u16s_C1R

ippiFilter_16s_AC4R

ippiFilterBorderInit_16s+ippiFilterBorder_16s_C4R

1797

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or Workaround
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilter_16s_C1R

ippiFilterBorderInit_16s+ippiFilterBorder_16s_C1RNOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilter_16s_C3R

ippiFilterBorderInit_16s+ippiFilterBorder_16s_C3R
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilter_16s_C4R

ippiFilterBorderInit_16s+ippiFilterBorder_16s_C4R
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilter_16u_AC4R

1798

ippiFilterBorderInit_16s+ippiFilterBorder_16u_C4R

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

1

Substitution or Workaround
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilter_16u_C1R

ippiFilterBorderInit_16s+ippiFilterBorder_16u_C1R
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilter_16u_C3R

ippiFilterBorderInit_16s+ippiFilterBorder_16u_C3R
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilter_16u_C4R

ippiFilterBorderInit_16s+ippiFilterBorder_16u_C4R
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilter_32f_AC4R

ippiFilterBorderInit_32f+ippiFilterBorder_32f_C4R

1799

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or Workaround
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilter_32f_C1R

ippiFilterBorderInit_32f+ippiFilterBorder_32f_C1RNOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilter_32f_C3R

ippiFilterBorderInit_32f+ippiFilterBorder_32f_C3R
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilter_32f_C4R

ippiFilterBorderInit_32f+ippiFilterBorder_32f_C4R
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilter_8u_AC4R

1800

ippiFilterBorderInit_16s+ippiFilterBorder_8u_C4R

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

1

Substitution or Workaround
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilter_8u_C1R

ippiFilterBorderInit_16s+ippiFilterBorder_8u_C1R
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilter_8u_C3R

ippiFilterBorderInit_16s+ippiFilterBorder_8u_C3R
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilter_8u_C4R

ippiFilterBorderInit_16s+ippiFilterBorder_8u_C4R
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilter_Round16s_8u_AC4R

ippiFilterBorderInit_16s+ippiFilterBorder_8u_C4R

1801

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or Workaround
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilter_Round16s_8u_C1R

ippiFilterBorderInit_16s+ippiFilterBorder_8u_C1R
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilter_Round16s_8u_C3R

ippiFilterBorderInit_16s+ippiFilterBorder_8u_C3R
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilter_Round16s_8u_C4R

ippiFilterBorderInit_16s+ippiFilterBorder_8u_C4R
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilter_Round32f_16s_AC4R

1802

ippiFilterBorderInit_32f+ippiFilterBorder_16s_C4R

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

1

Substitution or Workaround
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilter_Round32f_16s_C1R

ippiFilterBorderInit_32f+ippiFilterBorder_16s_C1RNOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilter_Round32f_16s_C3R

ippiFilterBorderInit_32f+ippiFilterBorder_16s_C3R
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilter_Round32f_16s_C4R

ippiFilterBorderInit_32f+ippiFilterBorder_16s_C4R
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilter_Round32f_16u_AC4R

ippiFilterBorderInit_32f+ippiFilterBorder_16u_C4R

1803

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or Workaround
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilter_Round32f_16u_C1R

ippiFilterBorderInit_32f+ippiFilterBorder_16u_C1R
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilter_Round32f_16u_C3R

ippiFilterBorderInit_32f+ippiFilterBorder_16u_C3R
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilter_Round32f_16u_C4R

ippiFilterBorderInit_32f+ippiFilterBorder_16u_C4R
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilter_Round32f_8u_AC4R

1804

ippiFilterBorderInit_32f+ippiFilterBorder_8u_C4R

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

1

Substitution or Workaround
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilter_Round32f_8u_C1R

ippiFilterBorderInit_32f+ippiFilterBorder_8u_C1R
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilter_Round32f_8u_C3R

ippiFilterBorderInit_32f+ippiFilterBorder_8u_C3R
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilter_Round32f_8u_C4R

ippiFilterBorderInit_32f+ippiFilterBorder_8u_C4R
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilter_Round32s_16s_AC4R

ippiFilterBorderInit_16s+ippiFilterBorder_16s_C4R

1805

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or Workaround
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilter_Round32s_16s_C1R

ippiFilterBorderInit_16s+ippiFilterBorder_16s_C1RNOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilter_Round32s_16s_C3R

ippiFilterBorderInit_16s+ippiFilterBorder_16s_C3R
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilter_Round32s_16s_C4R

ippiFilterBorderInit_16s+ippiFilterBorder_16s_C4R
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilter_Round32s_16u_AC4R

1806

ippiFilterBorderInit_16s+ippiFilterBorder_16u_C4R

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

1

Substitution or Workaround
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilter_Round32s_16u_C1R

ippiFilterBorderInit_16s+ippiFilterBorder_16u_C1R
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilter_Round32s_16u_C3R

ippiFilterBorderInit_16s+ippiFilterBorder_16u_C3R
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiFilter_Round32s_16u_C4R

ippiFilterBorderInit_16s+ippiFilterBorder_16u_C4R
NOTE Starting from Intel IPP 9.0, kernel
coefficients in the ippiFilterBorder functions
are used in direct order, as opposed to theinverse order used in lower versions. Make sure
to change the filter order when replacing
removed functions with ippiFilterBorder.

ippiGetCentralMoment_64s

Use Moments_64f

ippiGetHuMoments_64s

Use Moments_64f

ippiGetNormalizedCentralMoment_64s

Use Moments_64f

ippiGetNormalizedSpatialMoment_64s

Use Moments_64f

ippiGetRotateBound

N/A

1807

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippiGetRotateQuad

N/A

ippiGetShearBound

N/A

ippiGetShearQuad

N/A

ippiGetSpatialMoment_64s

Use Moments_64f

ippiHistogramEven_16s_AC4R

ippiHistogram_16s_C4R

ippiHistogramEven_16s_C1R

ippiHistogram_16s_C1R

ippiHistogramEven_16s_C3R

ippiHistogram_16s_C3R

ippiHistogramEven_16s_C4R

ippiHistogram_16s_C4R

ippiHistogramEven_16u_AC4R

ippiHistogram_16u_C4R

ippiHistogramEven_16u_C1R

ippiHistogram_16u_C1R

ippiHistogramEven_16u_C3R

ippiHistogram_16u_C3R

ippiHistogramEven_16u_C4R

ippiHistogram_16u_C4R

ippiHistogramEven_8u_AC4R

ippiHistogram_8u_C4R

ippiHistogramEven_8u_C1R

ippiHistogram_8u_C1R

ippiHistogramEven_8u_C3R

ippiHistogram_8u_C3R

ippiHistogramEven_8u_C4R

ippiHistogram_8u_C4R

ippiHistogramRange_16s_AC4R

ippiHistogram_16s_C4R

ippiHistogramRange_16s_C1R

ippiHistogram_16s_C1R

ippiHistogramRange_16s_C3R

ippiHistogram_16s_C3R

ippiHistogramRange_16s_C4R

ippiHistogram_16s_C4R

ippiHistogramRange_16u_AC4R

ippiHistogram_16u_C4R

ippiHistogramRange_16u_C1R

ippiHistogram_16u_C1R

ippiHistogramRange_16u_C3R

ippiHistogram_16u_C3R

ippiHistogramRange_16u_C4R

ippiHistogram_16u_C4R

ippiHistogramRange_32f_AC4R

ippiHistogram_32f_C4R

ippiHistogramRange_32f_C1R

ippiHistogram_32f_C1R

ippiHistogramRange_32f_C3R

ippiHistogram_32f_C3R

ippiHistogramRange_32f_C4R

ippiHistogram_32f_C4R

ippiHistogramRange_8u_AC4R

ippiHistogram_8u_C4R

ippiHistogramRange_8u_C1R

ippiHistogram_8u_C1R

1808

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippiHistogramRange_8u_C3R

ippiHistogram_8u_C3R

ippiHistogramRange_8u_C4R

ippiHistogram_8u_C4R

ippiImageJaehne_32s_AC4R

1

ippiImageJaehne_32f_C1R+ippiConvert_32f32s

ippiImageJaehne_32s_C1R

ippiImageJaehne_32f_C1R+ippiConvert_32f32s

ippiImageJaehne_32s_C3R
ippiImageJaehne_32s_C4R

ippiImageJaehne_32f_C3R+ippiConvert_32f32s
ippiImageJaehne_32f_C4R+ippiConvert_32f32s

ippiImageJaehne_8s_AC4R

ippiImageJaehne_16s_C4R+ippiConvert_16s8s

ippiImageJaehne_8s_C1R

ippiImageJaehne_16s_C1R+ippiConvert_16s8s

ippiImageJaehne_8s_C3R

ippiImageJaehne_16s_C3R+ippiConvert_16s8s

ippiImageJaehne_8s_C4R

ippiImageJaehne_16s_C4R+ippiConvert_16s8s

ippiImageRamp_32s_AC4R

ippiImageRamp_32f_C1R+ippiConvert_32f32s

ippiImageRamp_32s_C1R

ippiImageJaehne_32f_C1R+ippiConvert_32f32s

ippiImageRamp_32s_C3R
ippiImageRamp_32s_C4R

ippiImageJaehne_32f_C3R+ippiConvert_32f32s
ippiImageJaehne_32f_C4R+ippiConvert_32f32s

ippiImageRamp_8s_AC4R

ippiImageRamp_16s_C4R+ippiConvert_16s8s

ippiImageRamp_8s_C1R

ippiImageRamp_16s_C1R+ippiConvert_16s8s

ippiImageRamp_8s_C3R

ippiImageRamp_16s_C3R+ippiConvert_16s8s

ippiImageRamp_8s_C4R

ippiImageJaehne_16s_C4R+ippiConvert_16s8s

ippiLBPImage3x3_32f8u_C1R

ippiLBPImageMode3x3_32f8u_C1R

ippiLBPImage3x3_8u_C1R

ippiLBPImageMode3x3_8u_C1R

ippiLBPImage5x5_32f16u_C1R

ippiLBPImageMode5x5_32f16u_C1R

ippiLBPImage5x5_32f8u_C1R

ippiLBPImageMode5x5_32f8u_C1R

ippiLBPImage5x5_8u16u_C1R

ippiLBPImageMode5x5_8u16u_C1R

ippiLBPImage5x5_8u_C1R

ippiLBPImageMode5x5_8u_C1R

ippiLUTPaletteSwap_16u_C3A0C4R

N/A

1809

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippiLUTPaletteSwap_8u_C3A0C4R

N/A

ippiLUTPalette_16u_C3A0C4R

N/A

ippiLUTPalette_8u_C3A0C4R

N/A

ippiLUT_Cubic

Use ippiLUT

ippiLUT_Linear

Use ippiLUT

ippiMagnitudePack_16s_C1RSfs

ippiConvert_16s32f+ippiMagnitudePack_32f

ippiMagnitudePack_16s_C3RSfs

ippiConvert_16s32f+ippiMagnitudePack_32f

ippiMagnitudePack_32s_C1RSfs

ippiConvert_32s32f+ippiMagnitudePack_32f

ippiMagnitudePack_32s_C3RSfs

ippiConvert_32s32f+ippiMagnitudePack_32f

ippiMagnitude_16sc16s_C1RSfs

ippiConvert_16s32f+ippiMagnitude_32f

ippiMagnitude_16sc16s_C3RSfs

ippiConvert_16s32f+ippiMagnitude_32f

ippiMagnitude_16uc16u_C1RSfs

ippiConvert_16u32f+ippiMagnitude_32f

ippiMagnitude_16uc16u_C3RSfs

ippiConvert_16u32f+ippiMagnitude_32f

ippiMagnitude_32sc32s_C1RSfs

ippiConvert_32s32f+ippiMagnitude_32f

ippiMagnitude_32sc32s_C3RSfs

ippiConvert_32s32f+ippiMagnitude_32f

ippiMean_16s_AC4R

ippiMean_16s_C4R

ippiMean_16u_AC4R

ippiMean_16u_C4R

ippiMean_32f_AC4R

ippiMean_32f_C4R

ippiMean_8u_AC4R

ippiMean_8u_C4R

ippiMomentFree_64f

ippiFreeippiMomentFree_64s

Use Moments_64f

ippiMomentGetStateSize_64s

Use Moments_64f

ippiMomentInitAlloc_64f

ippiMomentsGetSize+ippiMalloc+ippiMomentsInit

ippiMomentInitAlloc_64s

Use Moments_64f

ippiMomentInit_64s

Use Moments_64f

ippiMoments64s_16u_AC4R

Use Moments_64f

ippiMoments64s_16u_C1R

Use Moments_64f

ippiMoments64s_16u_C3R

Use Moments_64f

ippiMoments64s_8u_AC4R

Use Moments_64f

1810

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippiMoments64s_8u_C1R

Use Moments_64f

ippiMoments64s_8u_C3R

Use Moments_64f

ippiMulC_16sc_AC4IRSfs

N/A

ippiMulC_16sc_AC4RSfs

N/A

ippiMulC_16sc_C1IRSfs

N/A

ippiMulC_16sc_C1RSfs

N/A

ippiMulC_16sc_C3IRSfs

N/A

ippiMulC_16sc_C3RSfs

N/A

ippiMulC_32fc_AC4IR

N/A

ippiMulC_32fc_AC4R

N/A

ippiMulC_32fc_C1IR

N/A

ippiMulC_32fc_C1R

N/A

ippiMulC_32fc_C3IR

N/A

ippiMulC_32fc_C3R

N/A

ippiMulC_32sc_AC4IRSfs

N/A

ippiMulC_32sc_AC4RSfs

N/A

ippiMulC_32sc_C1IRSfs

N/A

ippiMulC_32sc_C1RSfs

N/A

ippiMulC_32sc_C3IRSfs

N/A

ippiMulC_32sc_C3RSfs

N/A

ippiMulPack_16s_AC4IRSfs

ippiConvert_16s32f+ippiMulPack_32f

ippiMulPack_16s_AC4RSfs

ippiConvert_16s32f+ippiMulPack_32f

ippiMulPack_16s_C1IRSfs

ippiConvert_16s32f+ippiMulPack_32f

ippiMulPack_16s_C1RSfs

ippiConvert_16s32f+ippiMulPack_32f

ippiMulPack_16s_C3IRSfs

ippiConvert_16s32f+ippiMulPack_32f

ippiMulPack_16s_C3RSfs

ippiConvert_16s32f+ippiMulPack_32f

ippiMulPack_16s_C4IRSfs

ippiConvert_16s32f+ippiMulPack_32f

ippiMulPack_16s_C4RSfs

ippiConvert_16s32f+ippiMulPack_32f

ippiMulPack_32s_AC4IRSfs

ippiConvert_16s32f+ippiMulPack_32f

ippiMulPack_32s_AC4RSfs

ippiConvert_16s32f+ippiMulPack_32f

1

1811

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippiMulPack_32s_C1IRSfs

ippiConvert_16s32f+ippiMulPack_32f

ippiMulPack_32s_C1RSfs

ippiConvert_16s32f+ippiMulPack_32f

ippiMulPack_32s_C3IRSfs

ippiConvert_16s32f+ippiMulPack_32f

ippiMulPack_32s_C3RSfs

ippiConvert_16s32f+ippiMulPack_32f

ippiMulPack_32s_C4IRSfs

ippiConvert_16s32f+ippiMulPack_32f

ippiMulPack_32s_C4RSfs

ippiConvert_16s32f+ippiMulPack_32f

ippiMul_16sc_AC4IRSfs

N/A

ippiMul_16sc_AC4RSfs

N/A

ippiMul_16sc_C1IRSfs

N/A

ippiMul_16sc_C1RSfs

N/A

ippiMul_16sc_C3IRSfs

N/A

ippiMul_16sc_C3RSfs

N/A

ippiMul_32fc_AC4IR

N/A

ippiMul_32fc_AC4R

N/A

ippiMul_32fc_C1IR

N/A

ippiMul_32fc_C1R

N/A

ippiMul_32fc_C3IR

N/A

ippiMul_32fc_C3R

N/A

ippiMul_32sc_AC4IRSfs

N/A

ippiMul_32sc_AC4RSfs

N/A

ippiMul_32sc_C1IRSfs

N/A

ippiMul_32sc_C1RSfs

N/A

ippiMul_32sc_C3IRSfs

N/A

ippiMul_32sc_C3RSfs

N/A

ippiNormDiff_Inf_16s_AC4R

ippiNormDiff_Inf_16s_C4R

ippiNormDiff_Inf_16u_AC4R

ippiNormDiff_Inf_16u_C4R

ippiNormDiff_Inf_32f_AC4R

ippiNormDiff_Inf_32f_C4R

ippiNormDiff_Inf_8u_AC4R

ippiNormDiff_Inf_8u_C4R

ippiNormDiff_L1_16s_AC4R

ippiNormDiff_L1_16s_C4R

ippiNormDiff_L1_16u_AC4R

ippiNormDiff_L1_16u_C4R

1812

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippiNormDiff_L1_32f_AC4R

ippiNormDiff_L1_32f_C4R

ippiNormDiff_L1_8u_AC4R

ippiNormDiff_L1_8u_C4R

ippiNormDiff_L2_16s_AC4R

ippiNormDiff_L2_16s_C4R

ippiNormDiff_L2_16u_AC4R

ippiNormDiff_L2_16u_C4R

ippiNormDiff_L2_32f_AC4R

ippiNormDiff_L2_32f_C4R

ippiNormDiff_L2_8u_AC4R

ippiNormDiff_L2_8u_C4R

ippiNormRel_Inf_16s_AC4R

ippiNormRel_Inf_16s_C4R

ippiNormRel_Inf_16u_AC4R

ippiNormRel_Inf_16u_C4R

ippiNormRel_Inf_32f_AC4R

ippiNormRel_Inf_32f_C4R

ippiNormRel_Inf_8u_AC4R

ippiNormRel_Inf_8u_C4R

ippiNormRel_L1_16s_AC4R

ippiNormRel_L1_16s_C4R

ippiNormRel_L1_16u_AC4R

ippiNormRel_L1_16u_C4R

ippiNormRel_L1_32f_AC4R

ippiNormRel_L1_32f_C4R

ippiNormRel_L1_8u_AC4R

ippiNormRel_L1_8u_C4R

ippiNormRel_L2_16s_AC4R

ippiNormRel_L2_16s_C4R

ippiNormRel_L2_16u_AC4R

ippiNormRel_L2_16u_C4R

ippiNormRel_L2_32f_AC4R

ippiNormRel_L2_32f_C4R

ippiNormRel_L2_8u_AC4R

ippiNormRel_L2_8u_C4R

ippiNorm_Inf_16s_AC4R

ippiNorm_Inf_16s_C4R

ippiNorm_Inf_16u_AC4R

ippiNorm_Inf_16u_C4R

ippiNorm_Inf_32f_AC4R

ippiNorm_Inf_32f_C4R

ippiNorm_Inf_32s_C1R

ippiConvert_32s32f+ippiNorm_Inf_32f

ippiNorm_Inf_8u_AC4R

ippiNorm_Inf_8u_C4R

ippiNorm_L1_16s_AC4R

ippiNorm_L1_16s_C4R

ippiNorm_L1_16u_AC4R

ippiNorm_L1_16u_C4R

ippiNorm_L1_32f_AC4R

ippiNorm_L1_32f_C4R

ippiNorm_L1_8u_AC4R

ippiNorm_L1_8u_C4R

ippiNorm_L2_16s_AC4R

ippiNorm_L2_16s_C4R

ippiNorm_L2_16u_AC4R

ippiNorm_L2_16u_C4R

ippiNorm_L2_32f_AC4R

ippiNorm_L2_32f_C4R

1

1813

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippiNorm_L2_8u_AC4R

ippiNorm_L2_8u_C4R

ippiPackToCplxExtend_32s32sc_C1R

ippiConvert_32s32f+ippiPackToCplxExtend_32f

ippiPhasePack_16s_C1RSfs

ippiConvert_16s32f+ippiPhasePack_32f

ippiPhasePack_16s_C3RSfs

ippiConvert_16s32f+ippiPhasePack_32f

ippiPhasePack_32s_C1RSfs

ippiConvert_32s32f+ippiPhasePack_32f

ippiPhasePack_32s_C3RSfs

ippiConvert_32s32f+ippiPhasePack_32f

ippiPhase_16sc16s_C1RSfs

ippiConvert_16s32f+ippiPhase_32f

ippiPhase_16sc16s_C3RSfs

ippiConvert_16s32f+ippiPhase_32f

ippiPhase_16uc16u_C1RSfs

ippiConvert_16u32f+ippiPhase_32f

ippiPhase_16uc16u_C3RSfs

ippiConvert_16u32f+ippiPhase_32f

ippiPhase_32sc32s_C1RSfs

ippiConvert_32s32f+ippiPhase_32f

ippiPhase_32sc32s_C3RSfs

ippiConvert_32s32f+ippiPhase_32f

ippiPolarToCart_16sc_C1R

ippiConvert_16s32f+ippiPolarToCart_32fc_C1R

ippiPolarToCart_16sc_C3R

ippiConvert_16s32f+ippiPolarToCart_32fc_C3R

ippiPolarToCart_32f32fc_P2C1R

Use ippsCplxToReal_32fc+ippsPolarToCart_32fc with loop by row

ippiPolarToCart_32sc_C1R

ippiConvert_32s32f+ippiPolarToCart_32fc_C1R

ippiPolarToCart_32sc_C3R

ippiConvert_32s32f+ippiPolarToCart_32fc_C3R

ippiRShiftC_8s_AC4IR

Convert to other data typeippiRShiftC_8s_AC4R

Convert to other data typeippiRShiftC_8s_C1IR

Convert to other data typeippiRShiftC_8s_C1RConvert to other data typeippiRShiftC_8s_C3IR

Convert to other data typeippiRShiftC_8s_C3R

Convert to other data typeippiRShiftC_8s_C4IR

Convert to other data typeippiRShiftC_8s_C4R

Convert to other data typeippiRemap_16s_P3R

Use ippiRemap_XX_C1R for each plane

1814

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippiRemap_16s_P4R

Use ippiRemap_XX_C1R for each plane

ippiRemap_16u_P3R

Use ippiRemap_XX_C1R for each plane

ippiRemap_16u_P4R

Use ippiRemap_XX_C1R for each plane

ippiRemap_32f_P3R

Use ippiRemap_XX_C1R for each plane

ippiRemap_32f_P4R

Use ippiRemap_XX_C1R for each plane

ippiRemap_64f_P3R

Use ippiRemap_XX_C1R for each plane

ippiRemap_64f_P4R

Use ippiRemap_XX_C1R for each plane

ippiRemap_8u_P3R

Use ippiRemap_XX_C1R for each plane

ippiRemap_8u_P4R

Use ippiRemap_XX_C1R for each plane

ippiResampleRowGetBorderWidth_32f

N/A

ippiResampleRowGetSize_32f

N/A

ippiResampleRowInit_32f

N/A

ippiResampleRowReplicateBorder_32f_C1R

N/A

ippiResampleRow_32f_C1

N/A

ippiResizeGetBufSize

N/A

ippiResizeGetBufSize_64f

N/A

ippiResizeSqrPixel_16s_AC4R

N/A

ippiResizeSqrPixel_16s_C1R

N/A

ippiResizeSqrPixel_16s_C3R

N/A

ippiResizeSqrPixel_16s_C4R

N/A

ippiResizeSqrPixel_16s_P3R

Use C1R flavor for each plane

ippiResizeSqrPixel_16s_P4R

Use C1R flavor for each plane

ippiResizeSqrPixel_16u_AC4R

N/A

ippiResizeSqrPixel_16u_C1R

N/A

ippiResizeSqrPixel_16u_C3R

N/A

ippiResizeSqrPixel_16u_C4R

N/A

ippiResizeSqrPixel_16u_P3R

Use C1R flavor for each plane

ippiResizeSqrPixel_16u_P4R

Use C1R flavor for each plane

ippiResizeSqrPixel_32f_AC4R

N/A

ippiResizeSqrPixel_32f_C1R

N/A

1

1815

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippiResizeSqrPixel_32f_C3R

N/A

ippiResizeSqrPixel_32f_C4R

N/A

ippiResizeSqrPixel_32f_P3R

Use C1R flavor for each plane

ippiResizeSqrPixel_32f_P4R

Use C1R flavor for each plane

ippiResizeSqrPixel_64f_AC4R

N/A

ippiResizeSqrPixel_64f_C1R

N/A

ippiResizeSqrPixel_64f_C3R

N/A

ippiResizeSqrPixel_64f_C4R

N/A

ippiResizeSqrPixel_64f_P3R

Use C1R flavor for each plane

ippiResizeSqrPixel_64f_P4R

Use C1R flavor for each plane

ippiResizeSqrPixel_8u_AC4R

N/A

ippiResizeSqrPixel_8u_C1R

N/A

ippiResizeSqrPixel_8u_C3R

N/A

ippiResizeSqrPixel_8u_C4R

N/A

ippiResizeSqrPixel_8u_P3R

Use C1R flavor for each plane

ippiResizeSqrPixel_8u_P4R

Use C1R flavor for each plane

ippiResizeYUV420GetBufSize

N/A

ippiResizeYUV420_8u_P2R

N/A

ippiResizeYUV422_8u_C2R

N/A

ippiRotateCenter_16u_AC4R

See the RotateCenter.c example.

ippiRotateCenter_16u_C1R
ippiRotateCenter_16u_C3R
ippiRotateCenter_16u_C4R
ippiRotateCenter_16u_P3R
ippiRotateCenter_16u_P4R
ippiRotateCenter_32f_AC4R
ippiRotateCenter_32f_C1R
ippiRotateCenter_32f_C3R
ippiRotateCenter_32f_C4R
ippiRotateCenter_32f_P3R
ippiRotateCenter_32f_P4R
ippiRotateCenter_64f_AC4R
ippiRotateCenter_64f_C1R
ippiRotateCenter_64f_C3R
ippiRotateCenter_64f_C4R

1816

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

1

Substitution or WorkaroundippiRotateCenter_64f_P3R
ippiRotateCenter_64f_P4R
ippiRotateCenter_8u_AC4R
ippiRotateCenter_8u_C1R
ippiRotateCenter_8u_C3R
ippiRotateCenter_8u_C4R
ippiRotateCenter_8u_P3R
ippiRotateCenter_8u_P4R
ippiRotate_16u_AC4R

See the Rotate.c example.

ippiRotate_16u_C1R
ippiRotate_16u_C3R
ippiRotate_16u_C4R
ippiRotate_16u_P3R
ippiRotate_16u_P4R
ippiRotate_32f_AC4R
ippiRotate_32f_C1R
ippiRotate_32f_C3R
ippiRotate_32f_C4R
ippiRotate_32f_P3R
ippiRotate_32f_P4R
ippiRotate_64f_AC4R
ippiRotate_64f_C1R
ippiRotate_64f_C3R
ippiRotate_64f_C4R
ippiRotate_64f_P3R
ippiRotate_64f_P4R
ippiRotate_8u_AC4R
ippiRotate_8u_C1R
ippiRotate_8u_C3R
ippiRotate_8u_C4R
ippiRotate_8u_P3R
ippiRotate_8u_P4R
ippiSSIM_32f_C1R

N/A

ippiShear_16u_AC4R

N/A

ippiShear_16u_C1R

N/A

ippiShear_16u_C3R

N/A

ippiShear_16u_C4R

N/A

ippiShear_16u_P3R

Use C1R flavor for each plane

ippiShear_16u_P4R

Use C1R flavor for each plane

1817

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippiShear_32f_AC4R

N/A

ippiShear_32f_C1R

N/A

ippiShear_32f_C3R

N/A

ippiShear_32f_C4R

N/A

ippiShear_32f_P3R

Use C1R flavor for each plane

ippiShear_32f_P4R

Use C1R flavor for each plane

ippiShear_64f_AC4R

N/A

ippiShear_64f_C1R

N/A

ippiShear_64f_C3R

N/A

ippiShear_64f_C4R

N/A

ippiShear_64f_P3R

Use C1R flavor for each plane

ippiShear_64f_P4R

Use C1R flavor for each plane

ippiShear_8u_AC4R

N/A

ippiShear_8u_C1R

N/A

ippiShear_8u_C3R

N/A

ippiShear_8u_C4R

N/A

ippiShear_8u_P3R

Use C1R flavor for each plane

ippiShear_8u_P4R

Use C1R flavor for each plane

ippiSqrDistanceFull_Norm_16u32f_AC4R

ippiCopy_16u_C4C1R+ippiSqrDistanceNorm_16u32f_C1R+algType=ippiROIValid|ippiNorm

ippiSqrDistanceFull_Norm_16u32f_C1R

ippiSqrDistanceNorm_16u32f_C1R+algType=ippiROIValid|ippiNorm

ippiSqrDistanceFull_Norm_16u32f_C3R

ippiCopy_16u_C3C1R+ippiSqrDistanceNorm_16u32f_C1R+algType=ippiROIValid|ippiNorm

ippiSqrDistanceFull_Norm_16u32f_C4R

ippiCopy_16u_C4C1R+ippiSqrDistanceNorm_16u32f_C1R+algType=ippiROIValid|ippiNorm

ippiSqrDistanceFull_Norm_32f_AC4R

ippiCopy_32f_C4C1R+ippiSqrDistanceNorm_32f_C1R+algType=ippiROIFull|ippiNorm

ippiSqrDistanceFull_Norm_32f_C1R

ippiSqrDistanceNorm_32f_C1R+algType=ippiROIFull|ippiNorm

1818

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippiSqrDistanceFull_Norm_32f_C3R

ippiCopy_32f_C3C1R+ippiSqrDistanceNorm_32f_C1R+algType=ippiROIFull|ippiNorm

ippiSqrDistanceFull_Norm_32f_C4R

ippiCopy_32f_C4C1R+ippiSqrDistanceNorm_32f_C1R+algType=ippiROIFull|ippiNorm

ippiSqrDistanceFull_Norm_8s32f_AC4R

ippiConvert_8s32f+ippiCopy_32f_C4C1R+ippiSqrDistanceNorm_32f_C1R+algType=ippiROIFull|ippiNorm

ippiSqrDistanceFull_Norm_8s32f_C1R

ippiConvert_8s32f+ippiSqrDistanceNorm_32f_C1R+algType=ippiROIFull|ippiNorm

ippiSqrDistanceFull_Norm_8s32f_C3R

ippiConvert_8s32f+ippiCopy_32f_C3C1R+ippiSqrDistanceNorm_32f_C1R+algType=ippiROIFull|ippiNorm

ippiSqrDistanceFull_Norm_8s32f_C4R

ippiConvert_8s32f+ippiCopy_32f_C4C1R+ippiSqrDistanceNorm_32f_C1R+algType=ippiROIFull|ippiNorm

ippiSqrDistanceFull_Norm_8u32f_AC4R

ippiCopy_8u_C4C1R+ippiSqrDistanceNorm_8u32f_C1R+algType=ippiROIFull|ippiNorm

ippiSqrDistanceFull_Norm_8u32f_C1R

1

ippiSqrDistanceNorm_8u32f_C1R+algType=ippiROIFull|ippiNorm

ippiSqrDistanceFull_Norm_8u32f_C3R

ippiCopy_8u_C3C1R+ippiSqrDistanceNorm_8u32f_C1R+algType=ippiROIFull|ippiNorm

ippiSqrDistanceFull_Norm_8u32f_C4R

ippiSqrDistanceFull_Norm_8u_AC4RSfs

ippiCopy_8u_C4C1R+ippiSqrDistanceNorm_8u32f_C1R+algType=ippiROISame|ippiNorm
ippiCopy_8u_C4C1R+ippiSqrDistanceNorm_8u_C1RSfs+algType=ippiROIFull|ippiNorm

ippiSqrDistanceFull_Norm_8u_C1RSfs
ippiSqrDistanceFull_Norm_8u_C3RSfs

ippiSqrDistanceNorm_8u_C1RSfs+algType=ippiROIFull|ippiNorm
ippiCopy_8u_C3C1R+ippiSqrDistanceNorm_8u_C1RSfs+algType=ippiROIFull|ippiNorm

ippiSqrDistanceFull_Norm_8u_C4RSfs

ippiCopy_8u_C4C1R+ippiSqrDistanceNorm_8u_C1RSfs+algType=ippiROIValid|ippiNorm

1819

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippiSqrDistanceSame_Norm_16u32f_AC4R

ippiCopy_16u_C4C1R+ippiSqrDistanceNorm_16u32f_C1R+algType=ippiROISame|ippiNorm

ippiSqrDistanceSame_Norm_16u32f_C1R

ippiSqrDistanceNorm_16u32f_C1R+algType=ippiROISame|ippiNorm

ippiSqrDistanceSame_Norm_16u32f_C3R

ippiCopy_16u_C3C1R+ippiSqrDistanceNorm_16u32f_C1R+algType=ippiROISame|ippiNorm

ippiSqrDistanceSame_Norm_16u32f_C4R

ippiCopy_16u_C4C1R+ippiSqrDistanceNorm_16u32f_C1R+algType=ippiROISame|ippiNorm

ippiSqrDistanceSame_Norm_32f_AC4R

ippiCopy_32f_C4C1R+ippiSqrDistanceNorm_32f_C1R+algType=ippiROISame|ippiNorm

ippiSqrDistanceSame_Norm_32f_C1R

ippiSqrDistanceNorm_32f_C1R+algType=ippiROISame|ippiNorm

ippiSqrDistanceSame_Norm_32f_C3R

ippiCopy_32f_C3C1R+ippiSqrDistanceNorm_32f_C1R+algType=ippiROISame|ippiNorm

ippiSqrDistanceSame_Norm_32f_C4R

ippiCopy_32f_C4C1R+ippiSqrDistanceNorm_32f_C1R+algType=ippiROISame|ippiNorm

ippiSqrDistanceSame_Norm_8s32f_AC4R

ippiConvert_8s32f+ippiCopy_32f_C4C1R+ippiSqrDistanceNorm_32f_C1R+algType=ippiROISame|ippiNorm

ippiSqrDistanceSame_Norm_8s32f_C1R

ippiConvert_8s32f+ippiSqrDistanceNorm_32f_C1R+algType=ippiROISame|ippiNorm

ippiSqrDistanceSame_Norm_8s32f_C3R

ippiConvert_8s32f+ippiCopy_32f_C3C1R+ippiSqrDistanceNorm_32f_C1R+algType=ippiROISame|ippiNorm

ippiSqrDistanceSame_Norm_8s32f_C4R

ippiConvert_8s32f+ippiCopy_32f_C4C1R+ippiSqrDistanceNorm_32f_C1R+algType=ippiROISame|ippiNorm

ippiSqrDistanceSame_Norm_8u32f_AC4R

ippiCopy_8u_C4C1R+ippiSqrDistanceNorm_8u32f_C1R+algType=ippiROISame|ippiNorm

ippiSqrDistanceSame_Norm_8u32f_C1R

ippiSqrDistanceNorm_8u32f_C1R+algType=ippiROISame|ippiNorm

1820

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

ippiSqrDistanceSame_Norm_8u32f_C3R

1

Substitution or WorkaroundippiCopy_8u_C3C1R+ippiSqrDistanceNorm_8u32f_C1R+algType=ippiROISame|ippiNorm

ippiSqrDistanceSame_Norm_8u32f_C4R

ippiCopy_8u_C4C1R+ippiSqrDistanceNorm_8u32f_C1R+algType=ippiROISame|ippiNorm

ippiSqrDistanceSame_Norm_8u_AC4RSfs

ippiSqrDistanceSame_Norm_8u_C1RSfs

ippiCopy_8u_C4C1R+ippiSqrDistanceNorm_8u_C1RSfs+algType=ippiROISame|ippiNorm
ippiSqrDistanceNorm_8u_C1RSfs+algType=ippiROISame|ippiNorm

ippiSqrDistanceSame_Norm_8u_C3RSfs

ippiCopy_8u_C3C1R+ippiSqrDistanceNorm_8u_C1RSfs+algType=ippiROISame|ippiNorm

ippiSqrDistanceSame_Norm_8u_C4RSfs

ippiCopy_8u_C4C1R+ippiSqrDistanceNorm_8u_C1RSfs+algType=ippiROISame|ippiNorm

ippiSqrDistanceValid_Norm_16u32f_AC4R

ippiCopy_16u_C4C1R+ippiSqrDistanceNorm_16u32f_C1R+algType=ippiROIValid|ippiNorm

ippiSqrDistanceValid_Norm_16u32f_C1R

ippiSqrDistanceNorm_16u32f_C1R+algType=ippiROIValid|ippiNorm

ippiSqrDistanceValid_Norm_16u32f_C3R

ippiCopy_16u_C3C1R+ippiSqrDistanceNorm_16u32f_C1R+algType=ippiROIValid|ippiNorm

ippiSqrDistanceValid_Norm_16u32f_C4R

ippiCopy_16u_C4C1R+ippiSqrDistanceNorm_16u32f_C1R+algType=ippiROIValid|ippiNorm

ippiSqrDistanceValid_Norm_32f_AC4R

ippiCopy_32f_C4C1R+ippiSqrDistanceNorm_32f_C1R+algType=ippiROIValid|ippiNorm

ippiSqrDistanceValid_Norm_32f_C1R

ippiSqrDistanceNorm_32f_C1R+algType=ippiROIValid|ippiNorm

ippiSqrDistanceValid_Norm_32f_C3R

ippiCopy_32f_C3C1R+ippiSqrDistanceNorm_32f_C1R+algType=ippiROIValid|ippiNorm

ippiSqrDistanceValid_Norm_32f_C4R

ippiCopy_32f_C4C1R+ippiSqrDistanceNorm_32f_C1R+algType=ippiROIValid|ippiNorm

1821

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippiSqrDistanceValid_Norm_8s32f_AC4R

ippiConvert_8s32f+ippiCopy_32f_C4C1R+ippiSqrDistanceNorm_32f_C1R+algType=ippiROIValid|ippiNorm

ippiSqrDistanceValid_Norm_8s32f_C1R

ippiConvert_8s32f+ippiSqrDistanceNorm_32f_C1R+algType=ippiROIValid|ippiNorm

ippiSqrDistanceValid_Norm_8s32f_C3R

ippiConvert_8s32f+ippiCopy_32f_C3C1R+ippiSqrDistanceNorm_32f_C1R+algType=ippiROIValid|ippiNorm

ippiSqrDistanceValid_Norm_8s32f_C4R

ippiConvert_8s32f+ippiCopy_32f_C4C1R+ippiSqrDistanceNorm_32f_C1R+algType=ippiROIValid|ippiNorm

ippiSqrDistanceValid_Norm_8u32f_AC4R

ippiCopy_8u_C4C1R+ippiSqrDistanceNorm_8u32f_C1R+algType=ippiROIValid|ippiNorm

ippiSqrDistanceValid_Norm_8u32f_C1R

ippiSqrDistanceNorm_8u32f_C1R+algType=ippiROIValid|ippiNorm

ippiSqrDistanceValid_Norm_8u32f_C3R

ippiCopy_8u_C3C1R+ippiSqrDistanceNorm_8u32f_C1R+algType=ippiROIValid|ippiNorm

ippiSqrDistanceValid_Norm_8u32f_C4R

ippiCopy_8u_C4C1R+ippiSqrDistanceNorm_8u32f_C1R+algType=ippiROISame|ippiNorm

ippiSqrDistanceValid_Norm_8u_AC4RSfs

ippiCopy_8u_C4C1R+ippiSqrDistanceNorm_8u_C1RSfs+algType=ippiROIValid|ippiNorm

ippiSqrDistanceValid_Norm_8u_C1RSfs

ippiSqrDistanceNorm_8u_C1RSfs+algType=ippiROIValid|ippiNorm

ippiSqrDistanceValid_Norm_8u_C3RSfs

ippiCopy_8u_C3C1R+ippiSqrDistanceNorm_8u_C1RSfs+algType=ippiROIValid|ippiNorm

ippiSqrDistanceValid_Norm_8u_C4RSfs

ippiCopy_8u_C4C1R+ippiSqrDistanceNorm_8u_C1RSfs+algType=ippiROIValid|ippiNorm

ippiSubC_16sc_AC4IRSfs

N/A

ippiSubC_16sc_AC4RSfs

N/A

ippiSubC_16sc_C1IRSfs

N/A

ippiSubC_16sc_C1RSfs

N/A

ippiSubC_16sc_C3IRSfs

N/A

1822

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippiSubC_16sc_C3RSfs

N/A

ippiSubC_32fc_AC4IR

N/A

ippiSubC_32fc_AC4R

N/A

ippiSubC_32fc_C1IR

N/A

ippiSubC_32fc_C1R

N/A

ippiSubC_32fc_C3IR

N/A

ippiSubC_32fc_C3R

N/A

ippiSubC_32sc_AC4IRSfs

N/A

ippiSubC_32sc_AC4RSfs

N/A

ippiSubC_32sc_C1IRSfs

N/A

ippiSubC_32sc_C1RSfs

N/A

ippiSubC_32sc_C3IRSfs

N/A

ippiSubC_32sc_C3RSfs

N/A

ippiSub_16sc_AC4IRSfs

N/A

ippiSub_16sc_AC4RSfs

N/A

ippiSub_16sc_C1IRSfs

N/A

ippiSub_16sc_C1RSfs

N/A

ippiSub_16sc_C3IRSfs

N/A

ippiSub_16sc_C3RSfs

N/A

ippiSub_32fc_AC4IR

N/A

ippiSub_32fc_AC4R

N/A

ippiSub_32fc_C1IR

N/A

ippiSub_32fc_C1R

N/A

ippiSub_32fc_C3IR

N/A

ippiSub_32fc_C3R

N/A

ippiSub_32sc_AC4IRSfs

N/A

ippiSub_32sc_AC4RSfs

N/A

ippiSub_32sc_C1IRSfs

N/A

ippiSub_32sc_C1RSfs

N/A

ippiSub_32sc_C3IRSfs

N/A

ippiSub_32sc_C3RSfs

N/A

1

1823

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippiSum_16s_AC4R

ippiSum_16s_C4R

ippiSum_16u_AC4R

ippiSum_16u_C4R

ippiSum_32f_AC4R

ippiSum_32f_C4R

ippiSum_8u_AC4R

ippiSum_8u_C4R

ippiSuperSamplingGetBufSize

N/A

ippiSuperSampling_16s_AC4R

N/A

ippiSuperSampling_16s_C1R

N/A

ippiSuperSampling_16s_C3R

N/A

ippiSuperSampling_16s_C4R

N/A

ippiSuperSampling_16s_P3R

Use C1R flavor for each plane

ippiSuperSampling_16s_P4R

Use C1R flavor for each plane

ippiSuperSampling_16u_AC4R

N/A

ippiSuperSampling_16u_C1R

N/A

ippiSuperSampling_16u_C3R

N/A

ippiSuperSampling_16u_C4R

N/A

ippiSuperSampling_16u_P3R

Use C1R flavor for each plane

ippiSuperSampling_16u_P4R

Use C1R flavor for each plane

ippiSuperSampling_32f_AC4R

N/A

ippiSuperSampling_32f_C1R

N/A

ippiSuperSampling_32f_C3R

N/A

ippiSuperSampling_32f_C4R

N/A

ippiSuperSampling_32f_P3R

Use C1R flavor for each plane

ippiSuperSampling_32f_P4R

Use C1R flavor for each plane

ippiSuperSampling_8u_AC4R

N/A

ippiSuperSampling_8u_C1R

N/A

ippiSuperSampling_8u_C3R

N/A

ippiSuperSampling_8u_C4R

N/A

ippiSuperSampling_8u_P3R

Use C1R flavor for each plane

ippiSuperSampling_8u_P4R

Use C1R flavor for each plane

ippiWTFwdFree_32f_C1R

ippiFreeippiWTFwdFree_32f_C3R

ippiFree1824

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippiWTFwdGetBufSize_C1R

N/A

ippiWTFwdGetBufSize_C3R

N/A

ippiWTFwdInitAlloc_32f_C1R1

ippiWTFwdGetSize+ippiMalloc+ippiWTFwdInit

ippiWTFwdInitAlloc_32f_C3R

ippiWTFwdGetSize+ippiMalloc+ippiWTFwdInit

ippiWTInvFree_32f_C1R

ippiFreeippiWTInvFree_32f_C3R

ippiFreeippiWTInvGetBufSize_C1R

N/A

ippiWTInvGetBufSize_C3R

N/A

ippiWTInvInitAlloc_32f_C1R

ippiWTInvGetSize+ippiMalloc+ippiWTInvInit

ippiWTInvInitAlloc_32f_C3R

ippiWTInvGetSize+ippiMalloc+ippiWTInvInit

ippiWarpAffineBack_16u_AC4R

Use new WarpAffine functions.

ippiWarpAffineBack_16u_C1R

Use new WarpAffine functions.

ippiWarpAffineBack_16u_C3R

Use new WarpAffine functions.

ippiWarpAffineBack_16u_C4R

Use new WarpAffine functions.

ippiWarpAffineBack_16u_P3R

Use new WarpAffine functions.

ippiWarpAffineBack_16u_P4R

Use new WarpAffine functions.

ippiWarpAffineBack_32f_AC4R

Use new WarpAffine functions.

ippiWarpAffineBack_32f_C1R

Use new WarpAffine functions.

ippiWarpAffineBack_32f_C3R

Use new WarpAffine functions.

ippiWarpAffineBack_32f_C4R

Use new WarpAffine functions.

ippiWarpAffineBack_32f_P3R

Use new WarpAffine functions.

ippiWarpAffineBack_32f_P4R

Use new WarpAffine functions.

ippiWarpAffineBack_8u_AC4R

Use new WarpAffine functions.

ippiWarpAffineBack_8u_C1R

Use new WarpAffine functions.

ippiWarpAffineBack_8u_C3R

Use new WarpAffine functions.

ippiWarpAffineBack_8u_C4R

Use new WarpAffine functions.

ippiWarpAffineBack_8u_P3R

Use new WarpAffine functions.

1825

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippiWarpAffineBack_8u_P4R

Use new WarpAffine functions.

ippiWarpAffineQuad_16u_AC4R

Use new WarpQuad functions.

ippiWarpAffineQuad_16u_C1R

Use new WarpQuad functions.

ippiWarpAffineQuad_16u_C3R

Use new WarpQuad functions.

ippiWarpAffineQuad_16u_C4R

Use new WarpQuad functions.

ippiWarpAffineQuad_16u_P3R

Use new WarpQuad functions.

ippiWarpAffineQuad_16u_P4R

Use new WarpQuad functions.

ippiWarpAffineQuad_32f_AC4R

Use new WarpQuad functions.

ippiWarpAffineQuad_32f_C1R

Use new WarpQuad functions.

ippiWarpAffineQuad_32f_C3R

Use new WarpQuad functions.

ippiWarpAffineQuad_32f_C4R

Use new WarpQuad functions.

ippiWarpAffineQuad_32f_P3R

Use new WarpQuad functions.

ippiWarpAffineQuad_32f_P4R

Use new WarpQuad functions.

ippiWarpAffineQuad_8u_AC4R

Use new WarpQuad functions.

ippiWarpAffineQuad_8u_C1R

Use new WarpQuad functions.

ippiWarpAffineQuad_8u_C3R

Use new WarpQuad functions.

ippiWarpAffineQuad_8u_C4R

Use new WarpQuad functions.

ippiWarpAffineQuad_8u_P3R

Use new WarpQuad functions.

ippiWarpAffineQuad_8u_P4R

Use new WarpQuad functions.

ippiWarpAffine_16u_AC4R

Use new WarpAffine functions.

ippiWarpAffine_16u_C1R

Use new WarpAffine functions.

ippiWarpAffine_16u_C3R

Use new WarpAffine functions.

ippiWarpAffine_16u_C4R

Use new WarpAffine functions.

ippiWarpAffine_16u_P3R

Use new WarpAffine functions.

ippiWarpAffine_16u_P4R

Use new WarpAffine functions.

ippiWarpAffine_32f_AC4R

Use new WarpAffine functions.

ippiWarpAffine_32f_C1R

Use new WarpAffine functions.

ippiWarpAffine_32f_C3R

Use new WarpAffine functions.

ippiWarpAffine_32f_C4R

Use new WarpAffine functions.

ippiWarpAffine_32f_P3R

Use new WarpAffine functions.

1826

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippiWarpAffine_32f_P4R

Use new WarpAffine functions.

ippiWarpAffine_64f_AC4R

Use new WarpAffine functions.

ippiWarpAffine_64f_C1R

Use new WarpAffine functions.

ippiWarpAffine_64f_C3R

Use new WarpAffine functions.

ippiWarpAffine_64f_C4R

Use new WarpAffine functions.

ippiWarpAffine_64f_P3R

Use new WarpAffine functions.

ippiWarpAffine_64f_P4R

Use new WarpAffine functions.

ippiWarpAffine_8u_AC4R

Use new WarpAffine functions.

ippiWarpAffine_8u_C1R

Use new WarpAffine functions.

ippiWarpAffine_8u_C3R

Use new WarpAffine functions.

ippiWarpAffine_8u_C4R

Use new WarpAffine functions.

ippiWarpAffine_8u_P3R

Use new WarpAffine functions.

ippiWarpAffine_8u_P4R

Use new WarpAffine functions.

ippiWarpBilinearBack_16u_AC4R

N/A

ippiWarpBilinearBack_16u_P3R

Use C1R flavor for each plane

ippiWarpBilinearBack_16u_P4R

Use C1R flavor for each plane

ippiWarpBilinearBack_32f_AC4R

N/A

ippiWarpBilinearBack_32f_P3R

Use C1R flavor for each plane

ippiWarpBilinearBack_32f_P4R

Use C1R flavor for each plane

ippiWarpBilinearBack_8u_AC4R

N/A

ippiWarpBilinearBack_8u_P3R

Use C1R flavor for each planeN/A

ippiWarpBilinearBack_8u_P4R

Use C1R flavor for each plane

ippiWarpBilinearQuad_16u_AC4R

Use new WarpQuad functions.

ippiWarpBilinearQuad_16u_P3R

Use new WarpQuad functions.

ippiWarpBilinearQuad_16u_P4R

Use new WarpQuad functions.

ippiWarpBilinearQuad_32f_AC4R

Use new WarpQuad functions.

ippiWarpBilinearQuad_32f_P3R

Use new WarpQuad functions.

ippiWarpBilinearQuad_32f_P4R

Use new WarpQuad functions.

ippiWarpBilinearQuad_8u_AC4R

Use new WarpQuad functions.

ippiWarpBilinearQuad_8u_P3R

Use new WarpQuad functions.

1

1827

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippiWarpBilinearQuad_8u_P4R

Use new WarpQuad functions.

ippiWarpBilinear_16u_AC4R

N/A

ippiWarpBilinear_16u_P3R

Use C1R flavor for each plane

ippiWarpBilinear_16u_P4R

Use C1R flavor for each plane

ippiWarpBilinear_32f_AC4R

N/A

ippiWarpBilinear_32f_P3R

Use C1R flavor for each plane

ippiWarpBilinear_32f_P4R

Use C1R flavor for each plane

ippiWarpBilinear_8u_AC4R

N/A

ippiWarpBilinear_8u_P3R

Use C1R flavor for each plane

ippiWarpBilinear_8u_P4R

Use C1R flavor for each plane

ippiWarpPerspectiveBack_16u_AC4R

N/A

ippiWarpPerspectiveBack_16u_C1R

N/A

ippiWarpPerspectiveBack_16u_C3R

N/A

ippiWarpPerspectiveBack_16u_C4R

N/A

ippiWarpPerspectiveBack_16u_P3R

Use C1R flavor for each plane

ippiWarpPerspectiveBack_16u_P4R

Use C1R flavor for each plane

ippiWarpPerspectiveBack_32f_AC4R

N/A

ippiWarpPerspectiveBack_32f_C1R

N/A

ippiWarpPerspectiveBack_32f_C3R

N/A

ippiWarpPerspectiveBack_32f_C4R

N/A

ippiWarpPerspectiveBack_32f_P3R

Use C1R flavor for each plane

ippiWarpPerspectiveBack_32f_P4R

Use C1R flavor for each plane

ippiWarpPerspectiveBack_8u_AC4R

N/A

ippiWarpPerspectiveBack_8u_C1R

N/A

ippiWarpPerspectiveBack_8u_C3R

N/A

ippiWarpPerspectiveBack_8u_C4R

N/A

ippiWarpPerspectiveBack_8u_P3R

Use C1R flavor for each plane

ippiWarpPerspectiveBack_8u_P4R

Use C1R flavor for each plane

ippiWarpPerspectiveQuad_16u_AC4R

Use new WarpQuad functions.

ippiWarpPerspectiveQuad_16u_C1R

Use new WarpQuad functions.

ippiWarpPerspectiveQuad_16u_C3R

Use new WarpQuad functions.

1828

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippiWarpPerspectiveQuad_16u_C4R

Use new WarpQuad functions.

ippiWarpPerspectiveQuad_16u_P3R

Use new WarpQuad functions.

ippiWarpPerspectiveQuad_16u_P4R

Use new WarpQuad functions.

ippiWarpPerspectiveQuad_32f_AC4R

Use new WarpQuad functions.

ippiWarpPerspectiveQuad_32f_C1R

Use new WarpQuad functions.

ippiWarpPerspectiveQuad_32f_C3R

Use new WarpQuad functions.

ippiWarpPerspectiveQuad_32f_C4R

Use new WarpQuad functions.

ippiWarpPerspectiveQuad_32f_P3R

Use new WarpQuad functions.

ippiWarpPerspectiveQuad_32f_P4R

Use new WarpQuad functions.

ippiWarpPerspectiveQuad_8u_AC4R

Use new WarpQuad functions.

ippiWarpPerspectiveQuad_8u_C1R

Use new WarpQuad functions.

ippiWarpPerspectiveQuad_8u_C3R

Use new WarpQuad functions.

ippiWarpPerspectiveQuad_8u_C4R

Use new WarpQuad functions.

ippiWarpPerspectiveQuad_8u_P3R

Use new WarpQuad functions.

ippiWarpPerspectiveQuad_8u_P4R

Use new WarpQuad functions.

ippiWarpPerspective_16u_AC4R

Use new WarpPerspective functions.

ippiWarpPerspective_16u_C1R

Use new WarpPerspective functions.

ippiWarpPerspective_16u_C3R

Use new WarpPerspective functions.

ippiWarpPerspective_16u_C4R

Use new WarpPerspective functions.

ippiWarpPerspective_16u_P3R

Use new WarpPerspective functions.

ippiWarpPerspective_16u_P4R

Use new WarpPerspective functions.

ippiWarpPerspective_32f_AC4R

Use new WarpPerspective functions.

ippiWarpPerspective_32f_C1R

Use new WarpPerspective functions.

ippiWarpPerspective_32f_C3R

Use new WarpPerspective functions.

ippiWarpPerspective_32f_C4R

Use new WarpPerspective functions.

ippiWarpPerspective_32f_P3R

Use new WarpPerspective functions.

ippiWarpPerspective_32f_P4R

Use new WarpPerspective functions.

ippiWarpPerspective_8u_AC4R

Use new WarpPerspective functions.

ippiWarpPerspective_8u_C1R

Use new WarpPerspective functions.

ippiWarpPerspective_8u_C3R

Use new WarpPerspective functions.

1

1829

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippiWarpPerspective_8u_C4R

Use new WarpPerspective functions.

ippiWarpPerspective_8u_P3R

Use new WarpPerspective functions.

ippiWarpPerspective_8u_P4R

Use new WarpPerspective functions.

ippj.h:Removed from 9.0

Substitution or WorkaroundippiAdd128_JPEG_16s8u_C1R

N/A

ippiBGR555ToYCbCr411LS_MCU_16u16s_C3P3R

N/A

ippiBGR555ToYCbCr422LS_MCU_16u16s_C3P3R

N/A

ippiBGR555ToYCbCr444LS_MCU_16u16s_C3P3R

N/A

ippiBGR555ToYCbCr_JPEG_16u8u_C3P3R

N/A

ippiBGR565ToYCbCr411LS_MCU_16u16s_C3P3R

N/A

ippiBGR565ToYCbCr422LS_MCU_16u16s_C3P3R

N/A

ippiBGR565ToYCbCr444LS_MCU_16u16s_C3P3R

N/A

ippiBGR565ToYCbCr_JPEG_16u8u_C3P3R

N/A

ippiBGRToYCbCr411LS_MCU_8u16s_C3P3R

N/A

ippiBGRToYCbCr411_JPEG_8u_C3P3R

N/A

ippiBGRToYCbCr411_JPEG_8u_C4P3R

N/A

ippiBGRToYCbCr422LS_MCU_8u16s_C3P3R

N/A

ippiBGRToYCbCr422_JPEG_8u_C3P3R

N/A

ippiBGRToYCbCr422_JPEG_8u_C4P3R

N/A

ippiBGRToYCbCr444LS_MCU_8u16s_C3P3R

N/A

ippiBGRToYCbCr_JPEG_8u_C3P3R

N/A

ippiBGRToYCbCr_JPEG_8u_C4P3R

N/A

ippiBGRToY_JPEG_8u_C3C1R

N/A

ippiCMYKToYCCK411LS_MCU_8u16s_C4P4R

N/A

ippiCMYKToYCCK422LS_MCU_8u16s_C4P4R

N/A

ippiCMYKToYCCK444LS_MCU_8u16s_C4P4R

N/A

ippiCMYKToYCCK_JPEG_8u_C4P4R

N/A

ippiCMYKToYCCK_JPEG_8u_P4R

N/A

ippiDCTQuantFwd8x8LS_JPEG_16u16s_C1R

N/A

1830

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippiDCTQuantFwd8x8LS_JPEG_8u16s_C1R

N/A

ippiDCTQuantFwd8x8_JPEG_16s_C1

N/A

ippiDCTQuantFwd8x8_JPEG_16s_C1I

N/A

ippiDCTQuantInv8x8LS_1x1_JPEG_16s8u_C1R

N/A

ippiDCTQuantInv8x8LS_2x2_JPEG_16s8u_C1R

N/A

ippiDCTQuantInv8x8LS_4x4_JPEG_16s8u_C1R

N/A

ippiDCTQuantInv8x8LS_JPEG_16s16u_C1R

N/A

ippiDCTQuantInv8x8LS_JPEG_16s8u_C1R

N/A

ippiDCTQuantInv8x8To2x2LS_JPEG_16s8u_C1R

N/A

ippiDCTQuantInv8x8To4x4LS_JPEG_16s8u_C1R

N/A

ippiDCTQuantInv8x8_JPEG_16s_C1

N/A

ippiDCTQuantInv8x8_JPEG_16s_C1I

N/A

ippiDecodeCBProgrAttach_JPEG2K_32s_C1R

N/A

ippiDecodeCBProgrFree_JPEG2K

N/A

ippiDecodeCBProgrGetCurBitPlaneNum_JPEG2K

N/A

ippiDecodeCBProgrGetPassCounter_JPEG2K

N/A

ippiDecodeCBProgrGetStateSize_JPEG2K

N/A

ippiDecodeCBProgrInitAlloc_JPEG2K

N/A

ippiDecodeCBProgrInit_JPEG2K

N/A

ippiDecodeCBProgrSetPassCounter_JPEG2K

N/A

ippiDecodeCBProgrStep_JPEG2K

N/A

ippiDecodeCodeBlock_JPEG2K_1u32s_C1R

N/A

ippiDecodeGetBufSize_JPEG2K

N/A

1

ippiDecodeHuffman8x8_ACFirst_JPEG_1u16s_C1 N/A
ippiDecodeHuffman8x8_ACRefine_JPEG_1u16s_C1 N/A
ippiDecodeHuffman8x8_DCFirst_JPEG_1u16s_C1 N/A
ippiDecodeHuffman8x8_DCRefine_JPEG_1u16s_C1 N/A
ippiDecodeHuffman8x8_Direct_JPEG_1u16s_C1

N/A

ippiDecodeHuffman8x8_JPEG_1u16s_C1

N/A

ippiDecodeHuffmanOne_JPEG_1u16s_C1

N/A

ippiDecodeHuffmanRow_JPEG_1u16s_C1P4

N/A

1831

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippiDecodeHuffmanSpecFree_JPEG_8u

N/A

ippiDecodeHuffmanSpecGetBufSize_JPEG_8u

N/A

ippiDecodeHuffmanSpecInitAlloc_JPEG_8u

N/A

ippiDecodeHuffmanSpecInit_JPEG_8u

N/A

ippiDecodeHuffmanStateFree_JPEG_8u

N/A

ippiDecodeHuffmanStateGetBufSize_JPEG_8u

N/A

ippiDecodeHuffmanStateInitAlloc_JPEG_8u

N/A

ippiDecodeHuffmanStateInit_JPEG_8u

N/A

ippiDiffPredFirstRow_JPEG_16s_C1

N/A

ippiDiffPredRow_JPEG_16s_C1

N/A

ippiEncodeFree_JPEG2K

N/A

ippiEncodeGetDist_JPEG2K

N/A

ippiEncodeGetRate_JPEG2K

N/A

ippiEncodeGetTermPassLen_JPEG2K

N/A

ippiEncodeHuffman8x8_ACFirst_JPEG_16s1u_C1 N/A
ippiEncodeHuffman8x8_ACRefine_JPEG_16s1u_C1 N/A
ippiEncodeHuffman8x8_DCFirst_JPEG_16s1u_C1 N/A
ippiEncodeHuffman8x8_DCRefine_JPEG_16s1u_C1 N/A
ippiEncodeHuffman8x8_Direct_JPEG_16s1u_C1

N/A

ippiEncodeHuffman8x8_JPEG_16s1u_C1

N/A

ippiEncodeHuffmanOne_JPEG_16s1u_C1

N/A

ippiEncodeHuffmanRawTableInit_JPEG_8u

N/A

ippiEncodeHuffmanRow_JPEG_16s1u_P4C1

N/A

ippiEncodeHuffmanSpecFree_JPEG_8u

N/A

ippiEncodeHuffmanSpecGetBufSize_JPEG_8u

N/A

ippiEncodeHuffmanSpecInitAlloc_JPEG_8u

N/A

ippiEncodeHuffmanSpecInit_JPEG_8u

N/A

ippiEncodeHuffmanStateFree_JPEG_8u

N/A

ippiEncodeHuffmanStateGetBufSize_JPEG_8u

N/A

ippiEncodeHuffmanStateInitAlloc_JPEG_8u

N/A

ippiEncodeHuffmanStateInit_JPEG_8u

N/A

1832

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippiEncodeInitAlloc_JPEG2K

N/A

ippiEncodeLoadCodeBlock_JPEG2K_32s_C1R

N/A

ippiEncodeStoreBits_JPEG2K_1u

N/A

ippiFLCDecode4x4_JPEGXR_1u16s_C1IR

N/A

ippiFLCDecode4x4_JPEGXR_1u32s_C1IR

N/A

ippiFLCEncode4x4_JPEGXR_16s1u_C1R

N/A

ippiFLCEncode4x4_JPEGXR_32s1u_C1R

N/A

1ippiGetHuffmanStatistics8x8_ACFirst_JPEG_16s_C1
N/A
ippiGetHuffmanStatistics8x8_ACRefine_JPEG_16s_C1
N/A
ippiGetHuffmanStatistics8x8_DCFirst_JPEG_16s_C1
N/A
ippiGetHuffmanStatistics8x8_JPEG_16s_C1

N/A

ippiGetHuffmanStatisticsOne_JPEG_16s_C1

N/A

ippiICTFwd_JPEG2K_16s_P3IR

N/A

ippiICTFwd_JPEG2K_32f_C3P3R

N/A

ippiICTFwd_JPEG2K_32f_P3IR

N/A

ippiICTFwd_JPEG2K_32s_P3IR

N/A

ippiICTInv_JPEG2K_16s_P3IR

N/A

ippiICTInv_JPEG2K_32f_P3C3R

N/A

ippiICTInv_JPEG2K_32f_P3IR

N/A

ippiICTInv_JPEG2K_32s_P3IR

N/A

ippiJoin422LS_MCU_16s8u_P3C2R

N/A

ippiJoinRow_TIFF_8u16u_C1

N/A

ippiPCTFwd16x16_JPEGXR_16s_C1IR

N/A

ippiPCTFwd16x16_JPEGXR_32f_C1IR

N/A

ippiPCTFwd16x16_JPEGXR_32s_C1IR

N/A

ippiPCTFwd8x16_JPEGXR_16s_C1IR

N/A

ippiPCTFwd8x16_JPEGXR_32f_C1IR

N/A

ippiPCTFwd8x16_JPEGXR_32s_C1IR

N/A

ippiPCTFwd8x8_JPEGXR_16s_C1IR

N/A

ippiPCTFwd8x8_JPEGXR_32f_C1IR

N/A

ippiPCTFwd8x8_JPEGXR_32s_C1IR

N/A

1833

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippiPCTFwd_JPEGXR_16s_C1IR

N/A

ippiPCTFwd_JPEGXR_32f_C1IR

N/A

ippiPCTFwd_JPEGXR_32s_C1IR

N/A

ippiPCTInv16x16_JPEGXR_16s_C1IR

N/A

ippiPCTInv16x16_JPEGXR_32f_C1IR

N/A

ippiPCTInv16x16_JPEGXR_32s_C1IR

N/A

ippiPCTInv8x16_JPEGXR_16s_C1IR

N/A

ippiPCTInv8x16_JPEGXR_32f_C1IR

N/A

ippiPCTInv8x16_JPEGXR_32s_C1IR

N/A

ippiPCTInv8x8_JPEGXR_16s_C1IR

N/A

ippiPCTInv8x8_JPEGXR_32f_C1IR

N/A

ippiPCTInv8x8_JPEGXR_32s_C1IR

N/A

ippiPCTInv_JPEGXR_16s_C1IR

N/A

ippiPCTInv_JPEGXR_32f_C1IR

N/A

ippiPCTInv_JPEGXR_32s_C1IR

N/A

ippiPackBitsRow_TIFF_8u_C1

N/A

ippiQuantFwd8x8_JPEG_16s_C1I

N/A

ippiQuantFwdRawTableInit_JPEG_8u

N/A

ippiQuantFwdTableInit_JPEG_8u16u

N/A

ippiQuantInv8x8_JPEG_16s_C1I

N/A

ippiQuantInvTableInit_JPEG_8u16u

N/A

ippiRCTFwd_JPEG2K_16s_C3P3R

N/A

ippiRCTFwd_JPEG2K_16s_P3IR

N/A

ippiRCTFwd_JPEG2K_32s_C3P3R

N/A

ippiRCTFwd_JPEG2K_32s_P3IR

N/A

ippiRCTInv_JPEG2K_16s_P3C3R

N/A

ippiRCTInv_JPEG2K_16s_P3IR

N/A

ippiRCTInv_JPEG2K_32s_P3C3R

N/A

ippiRCTInv_JPEG2K_32s_P3IR

N/A

ippiRGB555ToYCbCr_JPEG_16u8u_C3P3R

N/A

ippiRGB565ToYCbCr_JPEG_16u8u_C3P3R

N/A

1834

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippiRGBToYCbCr411LS_MCU_8u16s_C3P3R

N/A

ippiRGBToYCbCr411_JPEG_8u_C3P3R

N/A

ippiRGBToYCbCr411_JPEG_8u_C4P3R

N/A

ippiRGBToYCbCr422LS_MCU_8u16s_C3P3R

N/A

ippiRGBToYCbCr422_JPEG_8u_C3P3R

N/A

ippiRGBToYCbCr422_JPEG_8u_C4P3R

N/A

ippiRGBToYCbCr444LS_MCU_8u16s_C3P3R

N/A

ippiRGBToYCbCr_JPEG_8u_C3P3R

N/A

ippiRGBToYCbCr_JPEG_8u_C4P3R

N/A

ippiRGBToYCbCr_JPEG_8u_P3R

N/A

ippiRGBToY_JPEG_8u_C3C1R

N/A

ippiRGBToY_JPEG_8u_P3C1R

N/A

ippiReconstructPredFirstRow_JPEG_16s_C1

N/A

ippiReconstructPredRow_JPEG_16s_C1

N/A

ippiSampleDown411LS_MCU_8u16s_C3P3R

N/A

ippiSampleDown422LS_MCU_8u16s_C3P3R

N/A

ippiSampleDown444LS_MCU_8u16s_C3P3R

N/A

ippiSampleDownH2V1_JPEG_8u_C1R

N/A

ippiSampleDownH2V2_JPEG_8u_C1R

N/A

ippiSampleDownRowH2V1_Box_JPEG_8u_C1

N/A

ippiSampleDownRowH2V2_Box_JPEG_8u_C1

N/A

ippiSampleUp411LS_MCU_16s8u_P3C3R

N/A

ippiSampleUp422LS_MCU_16s8u_P3C3R

N/A

ippiSampleUp444LS_MCU_16s8u_P3C3R

N/A

ippiSampleUpH2V1_JPEG_8u_C1R

N/A

ippiSampleUpH2V2_JPEG_8u_C1R

N/A

ippiSampleUpRowH2V1_Triangle_JPEG_8u_C1

N/A

ippiSampleUpRowH2V2_Triangle_JPEG_8u_C1

N/A

ippiSplit422LS_MCU_8u16s_C2P3R

N/A

ippiSplitRow_TIFF_16u8u_C1

N/A

ippiSub128_JPEG_8u16s_C1R

N/A

1

1835

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippiUnpackBitsRow_TIFF_8u_C1

N/A

ippiVLCAdapt_JPEGXR

N/A

ippiVLCDecode4x4_JPEGXR_1u16s_C1R

N/A

ippiVLCDecode4x4_JPEGXR_1u32s_C1R

N/A

ippiVLCDecodeDC420_JPEGXR_1u32s

N/A

ippiVLCDecodeDC422_JPEGXR_1u32s

N/A

ippiVLCDecodeDC444_JPEGXR_1u32s

N/A

ippiVLCEncode4x4Flex_JPEGXR_16s1u_C1R

N/A

ippiVLCEncode4x4Flex_JPEGXR_32s1u_C1R

N/A

ippiVLCEncode4x4_JPEGXR_16s1u_C1R

N/A

ippiVLCEncode4x4_JPEGXR_32s1u_C1R

N/A

ippiVLCEncodeDC420_JPEGXR_32s1u

N/A

ippiVLCEncodeDC422_JPEGXR_32s1u

N/A

ippiVLCEncodeDC444_JPEGXR_32s1u

N/A

ippiVLCGetStateSize_JPEGXR

N/A

ippiVLCInit_JPEGXR

N/A

ippiVLCScan4x4DC_JPEGXR_32s

N/A

ippiVLCScanReset_JPEGXR

N/A

ippiVLCScanSet_JPEGXR

N/A

ippiWTFwdColLift_B53_JPEG2K_16s_C1

N/A

ippiWTFwdColLift_B53_JPEG2K_32s_C1

N/A

ippiWTFwdColLift_D97_JPEG2K_16s_C1

N/A

ippiWTFwdColLift_D97_JPEG2K_32f_C1

N/A

ippiWTFwdColLift_D97_JPEG2K_32s_C1

N/A

ippiWTFwdCol_B53_JPEG2K_16s_C1R

N/A

ippiWTFwdCol_B53_JPEG2K_32s_C1R

N/A

ippiWTFwdCol_D97_JPEG2K_32f_C1R

N/A

ippiWTFwdRow_B53_JPEG2K_16s_C1R

N/A

ippiWTFwdRow_B53_JPEG2K_32s_C1R

N/A

ippiWTFwdRow_D97_JPEG2K_16s_C1R

N/A

ippiWTFwdRow_D97_JPEG2K_32f_C1R

N/A

1836

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippiWTFwdRow_D97_JPEG2K_32s_C1R

N/A

ippiWTFwd_B53_JPEG2K_16s_C1IR

N/A

ippiWTFwd_B53_JPEG2K_16s_C1R

N/A

ippiWTFwd_B53_JPEG2K_32s_C1IR

N/A

ippiWTFwd_B53_JPEG2K_32s_C1R

N/A

ippiWTFwd_D97_JPEG2K_16s_C1IR

N/A

ippiWTFwd_D97_JPEG2K_16s_C1R

N/A

ippiWTFwd_D97_JPEG2K_32s_C1IR

N/A

ippiWTFwd_D97_JPEG2K_32s_C1R

N/A

ippiWTGetBufSize_B53_JPEG2K_16s_C1IR

N/A

ippiWTGetBufSize_B53_JPEG2K_16s_C1R

N/A

ippiWTGetBufSize_B53_JPEG2K_32s_C1IR

N/A

ippiWTGetBufSize_B53_JPEG2K_32s_C1R

N/A

ippiWTGetBufSize_D97_JPEG2K_16s_C1IR

N/A

ippiWTGetBufSize_D97_JPEG2K_16s_C1R

N/A

ippiWTGetBufSize_D97_JPEG2K_32s_C1IR

N/A

ippiWTGetBufSize_D97_JPEG2K_32s_C1R

N/A

ippiWTInvColLift_B53_JPEG2K_16s_C1

N/A

ippiWTInvColLift_B53_JPEG2K_32s_C1

N/A

ippiWTInvColLift_D97_JPEG2K_16s_C1

N/A

ippiWTInvColLift_D97_JPEG2K_32f_C1

N/A

ippiWTInvColLift_D97_JPEG2K_32s_C1

N/A

ippiWTInvCol_B53_JPEG2K_16s_C1R

N/A

ippiWTInvCol_B53_JPEG2K_32s_C1R

N/A

ippiWTInvCol_D97_JPEG2K_32f_C1R

N/A

ippiWTInvRow_B53_JPEG2K_16s_C1R

N/A

ippiWTInvRow_B53_JPEG2K_32s_C1R

N/A

ippiWTInvRow_D97_JPEG2K_16s_C1R

N/A

ippiWTInvRow_D97_JPEG2K_32f_C1R

N/A

ippiWTInvRow_D97_JPEG2K_32s_C1R

N/A

ippiWTInv_B53_JPEG2K_16s_C1IR

N/A

1

1837

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippiWTInv_B53_JPEG2K_16s_C1R

N/A

ippiWTInv_B53_JPEG2K_32s_C1IR

N/A

ippiWTInv_B53_JPEG2K_32s_C1R

N/A

ippiWTInv_D97_JPEG2K_16s_C1IR

N/A

ippiWTInv_D97_JPEG2K_16s_C1R

N/A

ippiWTInv_D97_JPEG2K_32s_C1IR

N/A

ippiWTInv_D97_JPEG2K_32s_C1R

N/A

ippiYCCK411ToCMYKLS_MCU_16s8u_P4C4R

N/A

ippiYCCK422ToCMYKLS_MCU_16s8u_P4C4R

N/A

ippiYCCK444ToCMYKLS_MCU_16s8u_P4C4R

N/A

ippiYCCKToCMYK_JPEG_8u_P4C4R

N/A

ippiYCCKToCMYK_JPEG_8u_P4R

N/A

ippiYCbCr411ToBGR555LS_MCU_16s16u_P3C3R

N/A

ippiYCbCr411ToBGR565LS_MCU_16s16u_P3C3R

N/A

ippiYCbCr411ToBGRLS_MCU_16s8u_P3C3R

N/A

ippiYCbCr411ToBGR_JPEG_8u_P3C3R

N/A

ippiYCbCr411ToBGR_JPEG_8u_P3C4R

N/A

ippiYCbCr411ToRGBLS_MCU_16s8u_P3C3R

N/A

ippiYCbCr411ToRGB_JPEG_8u_P3C3R

N/A

ippiYCbCr411ToRGB_JPEG_8u_P3C4R

N/A

ippiYCbCr422ToBGR555LS_MCU_16s16u_P3C3R

N/A

ippiYCbCr422ToBGR565LS_MCU_16s16u_P3C3R

N/A

ippiYCbCr422ToBGRLS_MCU_16s8u_P3C3R

N/A

ippiYCbCr422ToBGR_JPEG_8u_P3C3R

N/A

ippiYCbCr422ToBGR_JPEG_8u_P3C4R

N/A

ippiYCbCr422ToRGBLS_MCU_16s8u_P3C3R

N/A

ippiYCbCr422ToRGB_JPEG_8u_C2C3R

N/A

ippiYCbCr422ToRGB_JPEG_8u_P3C3R

N/A

ippiYCbCr422ToRGB_JPEG_8u_P3C4R

N/A

ippiYCbCr444ToBGR555LS_MCU_16s16u_P3C3R

N/A

ippiYCbCr444ToBGR565LS_MCU_16s16u_P3C3R

N/A

1838

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippiYCbCr444ToBGRLS_MCU_16s8u_P3C3R

N/A

ippiYCbCr444ToRGBLS_MCU_16s8u_P3C3R

N/A

ippiYCbCrToBGR555_JPEG_8u16u_P3C3R

N/A

ippiYCbCrToBGR565_JPEG_8u16u_P3C3R

N/A

ippiYCbCrToBGR_JPEG_8u_P3C3R

N/A

ippiYCbCrToBGR_JPEG_8u_P3C4R

N/A

ippiYCbCrToRGB555_JPEG_8u16u_P3C3R

N/A

ippiYCbCrToRGB565_JPEG_8u16u_P3C3R

N/A

ippiYCbCrToRGB_JPEG_8u_P3C3R

N/A

ippiYCbCrToRGB_JPEG_8u_P3C4R

N/A

ippiYCbCrToRGB_JPEG_8u_P3R

N/A

ippjGetLibVersion

N/A

1

ippvc.h:Removed from 9.0

Substitution or WorkaroundippiAdd8x8HP_16s8u_C1RS

N/A

ippiAdd8x8_16s8u_C1IRS

N/A

ippiAddBackPredPB_H263_8u_C1R

N/A

ippiAddC8x8_16s8u_C1IR

N/A

ippiAverage16x16_8u_C1IR

N/A

ippiAverage16x16_8u_C1R

N/A

ippiAverage8x8_8u_C1IR

N/A

ippiAverage8x8_8u_C1R

N/A

ippiBiDirWeightBlockImplicit_H264_8u_P2P1R N/A
ippiBiDirWeightBlockImplicit_H264_8u_P3P1R N/A
ippiBiDirWeightBlock_H264_8u_C2R

N/A

ippiBiDirWeightBlock_H264_8u_P2P1R

N/A

ippiBiDirWeightBlock_H264_8u_P3P1R

N/A

ippiBidirWeightImplicit_H264_16u_P2P1R

N/A

ippiBidirWeight_H264_16u_P2P1R

N/A

ippiBidir_H264_16u_P2P1R

N/A

1839

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippiCABACEncodeBinBypass_H264

N/A

ippiCABACEncodeBin_H264

N/A

ippiCABACEncodeResidualBlock_H264_16s

N/A

ippiCABACEncodeResidualBlock_H264_32s

N/A

ippiCABACFree_H264

N/A

ippiCABACGetContexts_H264

N/A

ippiCABACGetSize_H264

N/A

ippiCABACGetStreamSize_H264

N/A

ippiCABACInitAlloc_H264

N/A

ippiCABACInit_H264

N/A

ippiCABACSetStream_H264

N/A

ippiCABACTerminateSlice_H264

N/A

ippiCalcGlobalMV_MPEG4

N/A

ippiCbYCr422ToYCbCr420_Rotate_8u_C2P3R

N/A

ippiCbYCr422ToYCbCr420_Rotate_8u_P3R

N/A

ippiChangeSpriteBrightness_MPEG4_8u_C1IR

N/A

ippiCopy16x16HP_8u_C1R

N/A

ippiCopy16x16QP_MPEG4_8u_C1R

N/A

ippiCopy16x16_8u_C1R

N/A

ippiCopy16x8HP_8u_C1R

N/A

ippiCopy16x8QP_MPEG4_8u_C1R

N/A

ippiCopy8x4HP_8u_C1R

N/A

ippiCopy8x8HP_8u_C1R

N/A

ippiCopy8x8QP_MPEG4_8u_C1R

N/A

ippiCopy8x8_8u_C1R

N/A

ippiCountZeros8x8_16s_C1

N/A

ippiCreateRLEncodeTable

N/A

ippiDCT2x4x8Frw_16s_C1I

N/A

ippiDCT2x4x8Inv_16s_C1I

N/A

ippiDCT8x4x2To4x4Inv_DV_16s_C1I

N/A

ippiDCT8x8Fwd_8u16s_C2P2

N/A

1840

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippiDCT8x8InvOrSet_16s8u_P2C2

N/A

ippiDCT8x8Inv_AANTransposed_16s8u_C1R

N/A

ippiDCT8x8Inv_AANTransposed_16s8u_P2C2R

N/A

ippiDCT8x8Inv_AANTransposed_16s_C1R

N/A

ippiDCT8x8Inv_AANTransposed_16s_P2C2R

N/A

1ippiDecodeCAVLCChroma422DcCoeffs_H264_1u16s N/A
ippiDecodeCAVLCChroma422DcCoeffs_H264_1u32s N/A
ippiDecodeCAVLCChromaDcCoeffs_H264_1u16s

N/A

ippiDecodeCAVLCChromaDcCoeffs_H264_1u32s

N/A

ippiDecodeCAVLCCoeffsIdxs_H264_1u16s

N/A

ippiDecodeCAVLCCoeffs_H264_1u16s

N/A

ippiDecodeCAVLCCoeffs_H264_1u32s

N/A

ippiDecodeChromaBlock_AVS_1u16s

N/A

ippiDecodeCoeffsInterRVLCBack_MPEG4_1u16s

N/A

ippiDecodeCoeffsInter_H261_1u16s

N/A

ippiDecodeCoeffsInter_H263_1u16s

N/A

ippiDecodeCoeffsInter_MPEG4_1u16s

N/A

ippiDecodeCoeffsIntraRVLCBack_MPEG4_1u16s

N/A

ippiDecodeCoeffsIntra_H261_1u16s

N/A

ippiDecodeCoeffsIntra_H263_1u16s

N/A

ippiDecodeCoeffsIntra_MPEG4_1u16s

N/A

ippiDecodeDCIntra_H263_1u16s

N/A

ippiDecodeDCIntra_MPEG4_1u16s

N/A

ippiDecodeExpGolombOne_H264_1u16s

N/A

ippiDecodeExpGolombOne_H264_1u32s

N/A

ippiDecodeHuffmanOne_1u32s

N/A

ippiDecodeHuffmanPair_1u16s

N/A

ippiDecodeLumaBlockInter_AVS_1u16s

N/A

ippiDecodeLumaBlockIntra_AVS_1u16s

N/A

ippiDeinterlaceBlendFree_8u_C1

N/A

ippiDeinterlaceBlendFree_8u_C2

N/A

1841

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippiDeinterlaceBlendGetSize_8u_C1

N/A

ippiDeinterlaceBlendGetSize_8u_C2

N/A

ippiDeinterlaceBlendInitAlloc_8u_C1

N/A

ippiDeinterlaceBlendInitAlloc_8u_C2

N/A

ippiDeinterlaceBlendInit_8u_C1

N/A

ippiDeinterlaceBlendInit_8u_C2

N/A

ippiDeinterlaceBlend_8u_C1

N/A

ippiDeinterlaceBlend_8u_C2

N/A

ippiDeinterlaceEdgeDetect_8u_C1R

N/A

ippiDeinterlaceFilterTriangle_8u_C1R

N/A

ippiDeinterlaceFilterTriangle_8u_C2R

N/A

ippiDeinterlaceMedianThreshold_8u_C1R

N/A

ippiDeinterlaceMotionAdaptive_8u_C1

N/A

ippiDequantTransformResidualAndAdd_H264_16s_C1I
N/A
ippiDequantTransformResidual_H264_16s_C1I

N/A

ippiDequantTransformResidual_SISP_H264_16s_C1I
N/A
ippiDisassembleChroma420Intra_AVS_16s8u_C1R N/A
ippiDisassembleLumaIntra_AVS_16s8u_C1R

N/A

ippiDownsampleFour16x16_H263_16s_C1R

N/A

ippiDownsampleFour_H263_8u_C1R

N/A

ippiEdgesDetect16x16_16u_C1R

N/A

ippiEdgesDetect16x16_8u_C1R

N/A

ippiEncodeChromaDcCoeffsCAVLC_H264_16s

N/A

ippiEncodeCoeffsCAVLCChromaDC2x2_H264_32s

N/A

ippiEncodeCoeffsCAVLCChromaDC2x4_H264_16s

N/A

ippiEncodeCoeffsCAVLCChromaDC2x4_H264_32s

N/A

ippiEncodeCoeffsCAVLC_H264_16s

N/A

ippiEncodeCoeffsCAVLC_H264_32s

N/A

ippiEncodeCoeffsInter_H261_16s1u

N/A

ippiEncodeCoeffsInter_H263_16s1u

N/A

ippiEncodeCoeffsInter_MPEG4_16s1u

N/A

1842

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippiEncodeCoeffsIntra_H261_16s1u

N/A

ippiEncodeCoeffsIntra_H263_16s1u

N/A

ippiEncodeCoeffsIntra_MPEG4_16s1u

N/A

ippiEncodeDCIntra_H263_16s1u

N/A

ippiEncodeDCIntra_MPEG4_16s1u

N/A

ippiExpandPlane_H264_8u_C1R

N/A

ippiFilter8x8_H261_8u_C1R

N/A

1ippiFilterBlockBoundaryHorEdge_H263_8u_C1IR N/AippiFilterBlockBoundaryVerEdge_H263_8u_C1IR N/AippiFilterDeblocking16x16HorEdge_H263_8u_C1IR
N/A
ippiFilterDeblocking16x16VerEdge_H263_8u_C1IR
N/A
ippiFilterDeblocking8x8HorEdge_H263_8u_C1IR N/AippiFilterDeblocking8x8HorEdge_MPEG4_8u_C1IRN/A
ippiFilterDeblocking8x8VerEdge_H263_8u_C1IR N/AippiFilterDeblocking8x8VerEdge_MPEG4_8u_C1IRN/A
ippiFilterDeblockingChroma422HorEdge_H264_16u_C1IR
N/A
ippiFilterDeblockingChroma422HorEdge_H264_8u_C1IR
N/A
ippiFilterDeblockingChroma422VerEdge_H264_16u_C1IR
N/A
ippiFilterDeblockingChroma422VerEdge_H264_8u_C1IR
N/A
ippiFilterDeblockingChromaHorEdge_H264_16u_C1IR
N/A
ippiFilterDeblockingChromaVerEdgeMBAFF_H264_16u_C1IR
N/A
ippiFilterDeblockingChromaVerEdge_H264_16u_C1IR
N/A
ippiFilterDeblockingChroma_HorEdge_AVS_8u_C1IR
N/A
ippiFilterDeblockingChroma_HorEdge_H264_8u_C1IR
N/A
ippiFilterDeblockingChroma_HorEdge_H264_8u_C2I
N/A
ippiFilterDeblockingChroma_HorEdge_H264_8u_C2IR
N/A
ippiFilterDeblockingChroma_HorEdge_VC1_8u_C1IR
N/A
ippiFilterDeblockingChroma_HorEdge_VC1_8u_C2IR
N/A
ippiFilterDeblockingChroma_VerEdge_AVS_8u_C1IR
N/A
ippiFilterDeblockingChroma_VerEdge_H264_8u_C1IR
N/A
ippiFilterDeblockingChroma_VerEdge_H264_8u_C2I
N/A

1843

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippiFilterDeblockingChroma_VerEdge_H264_8u_C2IR
N/A
ippiFilterDeblockingChroma_VerEdge_MBAFF_H264_8u_C1IR
N/A
ippiFilterDeblockingChroma_VerEdge_VC1_8u_C1IR
N/A
ippiFilterDeblockingChroma_VerEdge_VC1_8u_C2IR
N/A
ippiFilterDeblockingLumaHorEdge_H264_16u_C1IR
N/A
ippiFilterDeblockingLumaVerEdgeMBAFF_H264_16u_C1IR
N/A
ippiFilterDeblockingLumaVerEdge_H264_16u_C1IR
N/A
ippiFilterDeblockingLuma_HorEdge_AVS_8u_C1IRN/A
ippiFilterDeblockingLuma_HorEdge_H264_8u_C1IR
N/A
ippiFilterDeblockingLuma_HorEdge_VC1_8u_C1IRN/A
ippiFilterDeblockingLuma_VerEdge_AVS_8u_C1IRN/A
ippiFilterDeblockingLuma_VerEdge_H264_8u_C1IR
N/A
ippiFilterDeblockingLuma_VerEdge_MBAFF_H264_8u_C1IR
N/A
ippiFilterDeblockingLuma_VerEdge_VC1_8u_C1IRN/A
ippiFilterDenoiseAdaptiveFree_8u_C1

N/A

ippiFilterDenoiseAdaptiveInitAlloc_8u_C1

N/A

ippiFilterDenoiseAdaptive_8u_C1R

N/A

ippiFilterDenoiseCASTInit

N/A

ippiFilterDenoiseCASTYUV422_8u_C2R

N/A

ippiFilterDenoiseCAST_8u_C1R

N/A

ippiFilterDenoiseMosquitoFree_8u_C1

N/A

ippiFilterDenoiseMosquitoInitAlloc_8u_C1

N/A

ippiFilterDenoiseMosquito_8u_C1R

N/A

ippiFilterDenoiseSmooth_8u_C1R

N/A

ippiFilterDeringingSmooth8x8_MPEG4_8u_C1R

N/A

ippiFilterDeringingThreshold_MPEG4_8u_P3R

N/A

ippiFrameFieldSAD16x16_16s32s_C1R

N/A

ippiFrameFieldSAD16x16_8u32s_C1R

N/A

ippiFreeHuffmanTable_DV_32u

N/A

ippiGenScaleLevel4x4_H264_8u16s_C1

N/A

ippiGenScaleLevel8x8_H264_8u16s_D2

N/A

1844

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippiGetDiff16x16B_8u16s_C1

N/A

ippiGetDiff16x16_8u16s_C1

N/A

ippiGetDiff16x8B_8u16s_C1

N/A

ippiGetDiff16x8_8u16s_C1

N/A

ippiGetDiff8x16B_8u16s_C1

N/A

ippiGetDiff8x16_8u16s_C1

N/A

ippiGetDiff8x4B_8u16s_C1

N/A

ippiGetDiff8x4B_8u16s_C2P2

N/A

ippiGetDiff8x4_8u16s_C1

N/A

ippiGetDiff8x4_8u16s_C2P2

N/A

ippiGetDiff8x8B_8u16s_C1

N/A

ippiGetDiff8x8B_8u16s_C2P2

N/A

ippiGetDiff8x8_8u16s_C1

N/A

ippiGetDiff8x8_8u16s_C2P2

N/A

ippiHadamard8x8Sum_VC1_16s

N/A

ippiHadamard8x8Sum_VC1_8u16s

N/A

ippiHuffmanDecodeSegmentOnePass_DV_8u16s

N/A

ippiHuffmanDecodeSegment_DV100_8u16s

N/A

ippiHuffmanDecodeSegment_DV_8u16s

N/A

ippiHuffmanRunLevelTableInitAlloc_32s

N/A

ippiHuffmanTableFree_32s

N/A

ippiHuffmanTableInitAlloc_32s

N/A

ippiInitAllocHuffmanTable_DV_32u

N/AippiInterpolateAverage16x16_8u_C1IR

N/A

ippiInterpolateAverage16x8_8u_C1IR

N/A

ippiInterpolateAverage8x4_8u_C1IR

N/A

ippiInterpolateAverage8x8_8u_C1IR

N/A

ippiInterpolateBlock_H264_8u_P2P1R

N/A

ippiInterpolateBlock_H264_8u_P3P1R

N/A

ippiInterpolateChromaBlock_H264_16u_P2R

N/A

ippiInterpolateChromaBlock_H264_8u_C2C2R

N/A

1

1845

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippiInterpolateChromaBlock_H264_8u_C2P2R

N/A

ippiInterpolateChromaBlock_H264_8u_P2R

N/A

ippiInterpolateChromaBottom_H264_16u_C1R

N/A

ippiInterpolateChromaBottom_H264_8u_C1R

N/A

ippiInterpolateChromaTop_H264_16u_C1R

N/A

ippiInterpolateChromaTop_H264_8u_C1R

N/A

ippiInterpolateChroma_H264_16u_C1R

N/A

ippiInterpolateChroma_H264_8u_C1R

N/A

ippiInterpolateChroma_H264_8u_C2P2R

N/A

ippiInterpolateICBicubicBlock_VC1_8u_C1R

N/A

ippiInterpolateICBilinearBlock_VC1_8u_C1R

N/A

ippiInterpolateICBilinearBlock_VC1_8u_C2R

N/A

ippiInterpolateLumaBlock_AVS_8u_P1R

N/A

ippiInterpolateLumaBlock_H264_16u_P1R

N/A

ippiInterpolateLumaBlock_H264_8u_P1R

N/A

ippiInterpolateLumaBottom_H264_16u_C1R

N/A

ippiInterpolateLumaBottom_H264_8u_C1R

N/A

ippiInterpolateLumaTop_H264_16u_C1R

N/A

ippiInterpolateLumaTop_H264_8u_C1R

N/A

ippiInterpolateLuma_H264_16u_C1R

N/A

ippiInterpolateLuma_H264_8u_C1R

N/A

ippiInterpolateQPBicubic_VC1_8u_C1R

N/A

ippiInterpolateQPBilinear_VC1_8u_C1R

N/A

ippiInterpolateQPBilinear_VC1_8u_C2R

N/A

ippiMC16x16B_8u_C1

N/A

ippiMC16x16_8u_C1

N/A

ippiMC16x4B_8u_C1

N/A

ippiMC16x4_8u_C1

N/A

ippiMC16x8BUV_8u_C1

N/A

ippiMC16x8B_8u_C1

N/A

ippiMC16x8UV_8u_C1

N/A

1846

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippiMC16x8_8u_C1

N/A

ippiMC2x2B_8u_C1

N/A

ippiMC2x2_8u_C1

N/A

ippiMC2x4B_8u_C1

N/A

ippiMC2x4_8u_C1

N/A

ippiMC4x2B_8u_C1

N/A

ippiMC4x2_8u_C1

N/A

ippiMC4x4B_8u_C1

N/A

ippiMC4x4_8u_C1

N/A

ippiMC4x8B_8u_C1

N/A

ippiMC4x8_8u_C1

N/A

ippiMC8x16B_8u_C1

N/A

ippiMC8x16_8u_C1

N/A

ippiMC8x4B_16s8u_P2C2R

N/A

ippiMC8x4B_8u_C1

N/A

ippiMC8x4_16s8u_P2C2R

N/A

ippiMC8x4_8u_C1

N/A

ippiMC8x8B_16s8u_P2C2R

N/A

ippiMC8x8B_8u_C1

N/A

ippiMC8x8_16s8u_P2C2R

N/A

ippiMC8x8_8u_C1

N/A

ippiMeanAbsDev16x16_8u32s_C1R

N/A

ippiMeanAbsDev8x8_8u32s_C1R

N/A

ippiOBMC16x16HP_MPEG4_8u_C1R

N/A

ippiOBMC8x8HP_MPEG4_8u_C1R

N/A

ippiOBMC8x8QP_MPEG4_8u_C1R

N/A

ippiPredictIntraChroma8x8_H264_8u_C1IR

N/A

ippiPredictIntra_16x16_H264_8u_C1IR

N/A

ippiPredictIntra_4x4_H264_8u_C1IR

N/A

ippiPutIntraBlock

N/A

ippiQuantInterGetSize_MPEG4

N/A

1

1847

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippiQuantInterInit_MPEG4

N/A

ippiQuantInterNonuniform_VC1_16s_C1IR

N/A

ippiQuantInterUniform_VC1_16s_C1IR

N/A

ippiQuantInter_H263_16s_C1I

N/A

ippiQuantInter_MPEG4_16s_C1I

N/A

ippiQuantIntraGetSize_MPEG4

N/A

ippiQuantIntraInit_MPEG4

N/A

ippiQuantIntraNonuniform_VC1_16s_C1IR

N/A

ippiQuantIntraUniform_VC1_16s_C1IR

N/A

ippiQuantIntra_H263_16s_C1I

N/A

ippiQuantIntra_MPEG2_16s_C1I

N/A

ippiQuantIntra_MPEG4_16s_C1I

N/A

ippiQuantInvInterGetSize_MPEG4

N/A

ippiQuantInvInterInit_MPEG4

N/A

ippiQuantInvInterNonuniform_VC1_16s_C1IR

N/A

ippiQuantInvInterNonuniform_VC1_16s_C1R

N/A

ippiQuantInvInterUniform_VC1_16s_C1IR

N/A

ippiQuantInvInterUniform_VC1_16s_C1R

N/A

ippiQuantInvInter_H263_16s_C1I

N/A

ippiQuantInvInter_MPEG4_16s_C1I

N/A

ippiQuantInvIntraGetSize_MPEG4

N/A

ippiQuantInvIntraInit_MPEG4

N/A

ippiQuantInvIntraNonuniform_VC1_16s_C1IR

N/A

ippiQuantInvIntraNonuniform_VC1_16s_C1R

N/A

ippiQuantInvIntraUniform_VC1_16s_C1IR

N/A

ippiQuantInvIntraUniform_VC1_16s_C1R

N/A

ippiQuantInvIntra_H263_16s_C1I

N/A

ippiQuantInvIntra_MPEG2_16s_C1I

N/A

ippiQuantInvIntra_MPEG4_16s_C1I

N/A

ippiQuantInvLuma8x8_H264_32s_C1I

N/A

ippiQuantInv_DV_16s_C1I

N/A

1848

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippiQuantInv_MPEG2_16s_C1I

N/A

ippiQuantLuma8x8Inv_H264_16s_C1I

N/A

ippiQuantLuma8x8_H264_16s_C1

N/A

ippiQuantLuma8x8_H264_32s_C1

N/A

ippiQuantWeightBlockInv_DV100_16s_C1I

N/A

ippiQuantWeightBlockInv_DV_16s_C1I

N/A

ippiQuant_MPEG2_16s_C1I

N/A

ippiQuantizeResidual4x4Fwd_H264_16s32s_C1

N/A

ippiQuantizeResidual4x4Fwd_H264_16s_C1

N/A

ippiQuantizeResidual4x4Fwd_H264_32s_C1

N/A

ippiRangeMapping_VC1_8u_C1R

N/A

1ippiReconstructChroma422Inter4x4_H264High_16s8u_IP2R
N/A
ippiReconstructChroma422Inter4x4_H264High_32s16u_IP2R
N/A
ippiReconstructChroma422Intra4x4_H264High_16s8u_IP2R
N/A
ippiReconstructChroma422Intra4x4_H264High_32s16u_IP2R
N/A
ippiReconstructChroma422IntraHalf4x4_H264High_16s8u_IP2R
N/A
ippiReconstructChroma422IntraHalf4x4_H264High_32s16u_IP2R
N/A
ippiReconstructChromaInter4x4MB_H264_16s8u_C2R
N/A
ippiReconstructChromaInter4x4MB_H264_16s8u_P2R
N/A
ippiReconstructChromaInter4x4_H264High_32s16u_IP2R
N/A
ippiReconstructChromaInterMB_H264_16s8u_C2R N/AippiReconstructChromaInterMB_H264_16s8u_P2R N/AippiReconstructChromaInter_AVS_16s8u_C1R

N/A

ippiReconstructChromaIntra4x4MB_H264_16s8u_C2R
N/A
ippiReconstructChromaIntra4x4MB_H264_16s8u_P2R
N/A
ippiReconstructChromaIntra4x4_H264High_32s16u_IP2R
N/A
ippiReconstructChromaIntraHalf4x4_H264High_32s16u_IP2R
N/A
ippiReconstructChromaIntraHalfs4x4MB_H264_16s8u_P2R
N/A
ippiReconstructChromaIntraHalfsMB_H264_16s8u_P2R
N/A
ippiReconstructChromaIntraHalves4x4MB_H264_16s8u_P2R
N/A
ippiReconstructChromaIntraHalvesMB_H264_16s8u_C2R
N/A

1849

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippiReconstructChromaIntraHalvesMB_H264_16s8u_P2R
N/A
ippiReconstructChromaIntraMB_H264_16s8u_C2R N/AippiReconstructChromaIntraMB_H264_16s8u_P2R N/AippiReconstructChromaIntra_AVS_16s8u_C1R

N/A

ippiReconstructCoeffsInter_H261_1u16s

N/A

ippiReconstructCoeffsInter_H263_1u16s

N/A

ippiReconstructCoeffsInter_MPEG4_1u16s

N/A

ippiReconstructCoeffsIntra_H261_1u16s

N/A

ippiReconstructCoeffsIntra_H263_1u16s

N/A

ippiReconstructDCTBlockIntra_MPEG1_32s

N/A

ippiReconstructDCTBlockIntra_MPEG2_32s

N/A

ippiReconstructDCTBlock_MPEG1_32s

N/A

ippiReconstructDCTBlock_MPEG2_32s

N/A

ippiReconstructLumaInter4x4MB_H264_16s8u_C1RN/A
ippiReconstructLumaInter4x4_H264High_32s16u_IP1R
N/A
ippiReconstructLumaInter8x8MB_H264_16s8u_C1RN/A
ippiReconstructLumaInter8x8_H264High_32s16u_IP1R
N/A
ippiReconstructLumaInterMB_H264_16s8u_C1R

N/A

ippiReconstructLumaInter_AVS_16s8u_C1R

N/A

ippiReconstructLumaIntra16x16MB_H264_16s8u_C1R
N/A
ippiReconstructLumaIntra16x16_H264High_32s16u_IP1R
N/A
ippiReconstructLumaIntra4x4MB_H264_16s8u_C1RN/A
ippiReconstructLumaIntra4x4_H264High_32s16u_IP1R
N/A
ippiReconstructLumaIntra8x8MB_H264_16s8u_C1RN/A
ippiReconstructLumaIntra8x8_H264High_32s16u_IP1R
N/A
ippiReconstructLumaIntraHalf4x4MB_H264_16s8u_C1R
N/A
ippiReconstructLumaIntraHalf4x4_H264High_32s16u_IP1R
N/A
ippiReconstructLumaIntraHalf8x8MB_H264_16s8u_C1R
N/A
ippiReconstructLumaIntraHalf8x8_H264High_32s16u_IP1R
N/A
ippiReconstructLumaIntraHalfMB_H264_16s8u_C1R
N/A
ippiReconstructLumaIntraMB_H264_16s8u_C1R

1850

N/A

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

1

Substitution or WorkaroundippiReconstructLumaIntra_16x16MB_H264_16s8u_C1R
N/A
ippiReconstructLumaIntra_AVS_16s8u_C1R

N/A

ippiResample_H263_8u_P3R

N/A

ippiResizeCCRotate_8u_C2R

N/A

ippiSAD16x16Blocks4x4_16u32u_C1R

N/A

ippiSAD16x16Blocks4x4_8u16u

N/A

ippiSAD16x16Blocks8x8_16u32u_C1R

N/A

ippiSAD16x16Blocks8x8_8u16u

N/A

ippiSAD16x16_16u32s_C1R

N/A

ippiSAD16x16_8u32s

N/A

ippiSAD16x16xNI_8u16u_C1R

N/A

ippiSAD16x16xN_8u16u_C1R

N/A

ippiSAD16x8_8u32s_C1R

N/A

ippiSAD2x2xN_8u16u_C1R

N/A

ippiSAD4x4_16u32s_C1R

N/A

ippiSAD4x4_8u32s

N/A

ippiSAD4x4xNI_8u16u_C1R

N/A

ippiSAD4x4xN_8u16u_C1R

N/A

ippiSAD4x8_8u32s_C1R

N/A

ippiSAD8x16_8u32s_C1R

N/A

ippiSAD8x4_8u32s_C1R

N/A

ippiSAD8x8_16u32s_C1R

N/A

ippiSAD8x8_8u32s_C1R

N/A

ippiSAD8x8_8u32s_C2R

N/A

ippiSAD8x8xNI_8u16u_C1R

N/A

ippiSAD8x8xN_8u16u_C1R

N/A

ippiSAT8x8D_16u32s_C1R

N/A

ippiSAT8x8D_8u32s_C1R

N/A

ippiSATD16x16_8u32s_C1R

N/A

ippiSATD16x8_8u32s_C1R

N/A

ippiSATD4x4_8u32s_C1R

N/A

1851

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippiSATD4x8_8u32s_C1R

N/A

ippiSATD8x16_8u32s_C1R

N/A

ippiSATD8x4_8u32s_C1R

N/A

ippiSATD8x8_8u32s_C1R

N/A

ippiSSD4x4_8u32s_C1R

N/A

ippiSSD8x8_8u32s_C1R

N/A

ippiScanFwd_16s_C1

N/A

ippiScanInv_16s_C1

N/A

ippiSmoothingChroma_HorEdge_VC1_16s8u_C1R

N/A

ippiSmoothingChroma_HorEdge_VC1_16s8u_P2C2R N/AippiSmoothingChroma_VerEdge_VC1_16s8u_C1R

N/A

ippiSmoothingChroma_VerEdge_VC1_16s8u_P2C2R N/AippiSmoothingLuma_HorEdge_VC1_16s8u_C1R

N/A

ippiSmoothingLuma_VerEdge_VC1_16s8u_C1R

N/A

ippiSpatialInterpolation_H263_8u_C1R

N/A

ippiSqrDiff16x16B_8u32s

N/A

ippiSqrDiff16x16_8u32s

N/A

ippiSub16x16_8u16s_C1R

N/A

ippiSub4x4_16u16s_C1R

N/A

ippiSub4x4_8u16s_C1R

N/A

ippiSub8x8_16u16s_C1R

N/A

ippiSub8x8_8u16s_C1R

N/A

ippiSubSAD8x8_8u16s_C1R

N/A

ippiSumsDiff16x16Blocks4x4_16u32s_C1R

N/A

ippiSumsDiff16x16Blocks4x4_8u16s_C1

N/A

ippiSumsDiff8x8Blocks4x4_16u32s_C1R

N/A

ippiSumsDiff8x8Blocks4x4_8u16s_C1

N/A

ippiSumsDiff8x8Blocks4x4_8u16s_C2P2

N/A

ippiTransform4x4Fwd_VC1_16s_C1IR

N/A

ippiTransform4x4Fwd_VC1_16s_C1R

N/A

ippiTransform4x4Inv_VC1_16s_C1IR

N/A

1852

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippiTransform4x4Inv_VC1_16s_C1R

N/A

ippiTransform4x8Fwd_VC1_16s_C1IR

N/A

ippiTransform4x8Fwd_VC1_16s_C1R

N/A

ippiTransform4x8Inv_VC1_16s_C1IR

N/A

ippiTransform4x8Inv_VC1_16s_C1R

N/A

ippiTransform8x4Fwd_VC1_16s_C1IR

N/A

ippiTransform8x4Fwd_VC1_16s_C1R

N/A

ippiTransform8x4Inv_VC1_16s_C1IR

N/A

ippiTransform8x4Inv_VC1_16s_C1R

N/A

ippiTransform8x8Fwd_VC1_16s_C1IR

N/A

ippiTransform8x8Fwd_VC1_16s_C1R

N/A

ippiTransform8x8Inv_VC1_16s_C1IR

N/A

ippiTransform8x8Inv_VC1_16s_C1R

N/A

ippiTransformDequantChromaDC_H264_16s_C1I

N/A

1ippiTransformDequantChromaDC_SISP_H264_16s_C1I
N/A
ippiTransformDequantLumaDC_H264_16s_C1I

N/A

ippiTransformFwdLuma8x8_H264_16s32s_C1

N/A

ippiTransformFwdLuma8x8_H264_16s_C1

N/A

ippiTransformInvAddPredLuma8x8_H264_32s16u_C1R
N/A
ippiTransformLuma8x8Fwd_H264_16s_C1I

N/A

ippiTransformLuma8x8InvAddPred_H264_16s8u_C1R
N/A
ippiTransformPrediction_H264_8u16s_C1

N/A

ippiTransformQuant8x8Fwd_AVS_16s_C1

N/A

ippiTransformQuantChromaDC_H264_16s_C1I

N/A

ippiTransformQuantFwd4x4_H264_16s32s_C1

N/A

ippiTransformQuantFwd4x4_H264_16s_C1

N/A

ippiTransformQuantFwdChromaDC2x2_H264_16s_C1I
N/A
ippiTransformQuantFwdChromaDC2x2_H264_32s_C1I
N/A
ippiTransformQuantFwdChromaDC2x4_H264_16s_C1I
N/A
ippiTransformQuantFwdChromaDC2x4_H264_32s_C1I
N/A
ippiTransformQuantFwdLumaDC4x4_H264_16s_C1I N/A

1853

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Removed from 9.0

Substitution or WorkaroundippiTransformQuantFwdLumaDC4x4_H264_32s_C1I N/A
ippiTransformQuantInvAddPred4x4_H264_16s_C1IR
N/A
ippiTransformQuantInvAddPred4x4_H264_32s_C1IR
N/A
ippiTransformQuantInvChromaDC2x2_H264_16s_C1I
N/A
ippiTransformQuantInvChromaDC2x2_H264_32s_C1I
N/A
ippiTransformQuantInvChromaDC2x4_H264_16s_C1I
N/A
ippiTransformQuantInvChromaDC2x4_H264_32s_C1I
N/A
ippiTransformQuantInvLumaDC4x4_H264_16s_C1I N/A
ippiTransformQuantInvLumaDC4x4_H264_32s_C1I N/A
ippiTransformQuantLumaDC_H264_16s_C1I

N/A

ippiTransformQuantResidual_H264_16s_C1I

N/A

ippiTransformResidual4x4Fwd_H264_16s_C1

N/A

ippiTransformResidual4x4Fwd_H264_32s_C1

N/A

ippiTransformResidual4x4Inv_H264_16s_C1

N/A

ippiTransformResidual4x4Inv_H264_32s_C1

N/A

ippiUniDirWeightBlock_H264_8u_C1IR

N/A

ippiUniDirWeightBlock_H264_8u_C1R

N/A

ippiUniDirWeightBlock_H264_8u_C2R

N/A

ippiUnidirWeight_H264_16u_IP2P1R

N/A

ippiUpsampleFour8x8_H263_16s_C1R

N/A

ippiUpsampleFour_H263_8u_C1R

N/A

ippiVarMean8x8_16s32s_C1R

N/A

ippiVarMean8x8_8u32s_C1R

N/A

ippiVarMeanDiff16x16_8u32s_C1R

N/A

ippiVarMeanDiff16x8_8u32s_C1R

N/A

ippiVarSum8x8_16s32s_C1R

N/A

ippiVarSum8x8_8u32s_C1R

N/A

ippiVariance16x16_8u32s

N/A

ippiWarpChroma_MPEG4_8u_P2R

N/A

ippiWarpGetSize_MPEG4

N/A

ippiWarpInit_MPEG4

N/A

1854

Developer Guide and Reference for Intel® Integrated Performance Primitives

Removed from 9.0

Substitution or WorkaroundippiWarpLuma_MPEG4_8u_C1R

N/A

ippiWeightPrediction_AVS_8u_C1R

N/A

ippiWeightedAverage_H264_8u_C1IR

N/A

1ippiYCrCb411ToYCbCr422_16x4x5MB_DV_16s8u_P3C2R
N/A
ippiYCrCb411ToYCbCr422_5MBDV_16s8u_P3C2R

N/A

ippiYCrCb411ToYCbCr422_8x8MB_DV_16s8u_P3C2R N/A
ippiYCrCb411ToYCbCr422_EdgeDV_16s8u_P3C2R

N/A

ippiYCrCb411ToYCbCr422_ZoomOut2_5MBDV_16s8u_P3C2R
N/A
ippiYCrCb411ToYCbCr422_ZoomOut2_EdgeDV_16s8u_P3C2R
N/A
ippiYCrCb411ToYCbCr422_ZoomOut4_5MBDV_16s8u_P3C2R
N/A
ippiYCrCb411ToYCbCr422_ZoomOut4_EdgeDV_16s8u_P3C2R
N/A
ippiYCrCb411ToYCbCr422_ZoomOut8_5MBDV_16s8u_P3C2R
N/A
ippiYCrCb411ToYCbCr422_ZoomOut8_EdgeDV_16s8u_P3C2R
N/A
ippiYCrCb420ToYCbCr422_5MBDV_16s8u_P3C2R

N/A

ippiYCrCb420ToYCbCr422_8x8x5MB_DV_16s8u_P3C2R
N/A
ippiYCrCb420ToYCbCr422_ZoomOut2_5MBDV_16s8u_P3C2R
N/A
ippiYCrCb420ToYCbCr422_ZoomOut4_5MBDV_16s8u_P3C2R
N/A
ippiYCrCb420ToYCbCr422_ZoomOut8_5MBDV_16s8u_P3C2R
N/A
ippiYCrCb422ToYCbCr422_10HalvesMB16x8_DV100_16s8u_P3C2R
N/A
ippiYCrCb422ToYCbCr422_5MBDV_16s8u_P3C2R

N/A

ippiYCrCb422ToYCbCr422_8x4x5MB_DV_16s8u_P3C2R
N/A
ippiYCrCb422ToYCbCr422_ZoomOut2_5MBDV_16s8u_P3C2R
N/A
ippiYCrCb422ToYCbCr422_ZoomOut4_5MBDV_16s8u_P3C2R
N/A
ippiYCrCb422ToYCbCr422_ZoomOut8_5MBDV_16s8u_P3C2R
N/A
ippvcGetLibVersion

N/A

Sample Code
Rotate.cRotateCenter.c

1855

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Bibliography for Image Processing
This bibliography provides a list of publications that might be helpful to you in using the image processing
subset of Intel IPP. This list is not complete; it serves only as a starting point. The books [Rog85], [Rog90],
and [Foley90] are good resources of information on image processing and computer graphics, withmathematical formulas and code examples.
[Aka96]

A.Akansu, M.Smith (editors). Subband and Wavelet transform. Design andApplications, Kluwer Academic Publishers, 1996.

[AP922]

A Fast Precise Implementation of 8x8 Discrete Cosine Transform Using the Intel®
Streaming SIMD Extensions and MMX™ Instructions, Application Note AP922,
Intel Corp. Order number 742474, 1999.

[APMF]

Fast Algorithms for Median Filtering, Application Note, Intel Corp. Document
number 79835, 2001.

[AVS]

GB/T 200090.2-2006. China Standard. Information Technology. Coding of AudioVisual Objects - Part 2: Visual (02/2006).

[Bert01]

M.Bertalmio, A.L.Bertozzi, G.Sapiro. Navier-Stokes, Fluid Dynamics, and Imageand Video Inpainting. Proc. ICCV 2001, pp.1335-1362, 2001.

[Bor86]

G.Borgefors. Distance Transformations in Digital Images. Computer Vision,
Graphics, and Image Processing 34, 1986.

[Bou99]J-Y.Bouguet. Pyramidal Implementation of the Lucas-Kanade Feature Tracker.
OpenCV Documentation, Microprocessor Research Lab, Intel Corporation, 1999.

[Canny86]

J. Canny. A Computational Approach to Edge Detection, IEEE Trans. on PatternAnalysis and Machine Intelligence 8(6), 1986.

[Davis97]

J.Davis and Bobick. The Representation and Recognition of Action Using
Temporal Templates. MIT Media Lab Technical Report 402, 1997.

[Davis99]

J.Davis and G.Bradski. Real-Time Motion Template Gradients Using Intel(R)Computer Vision Library. IEEE ICCV'99 FRAME-RATE WORKSHOP, 1999.

[Dalal05]

N. Dalal and B. Triggs. Histograms of Oriented Gradients for Human Detection.
INRIA, 2005.

[DICOM]

Digital Imaging and Communications in Medicine (DICOM), published by National
Electrical Manufacturers Association, 2003.

[Feig92]

E. Feig and S. Winograd. Fast Algorithms for the Discrete Cosine Transform, IEEE
Trans. Signal Processing, vol. 40, no. 9, pp. 2174-2193, Sep. 1992.

[Felz04]

P. Felzenszwalb, D. Hattenlocher. Distance Transforms of Sampled Functions.
Cornell Computing and Information Science Technical Report TR2004-1963,
September 2004.

[Foley90]

James D. Foley, Andries van Dam, Steven K. Feiner, and John F. Hughes.
Computer Graphics — Principles and Practice, Second Edition. Addison Wesley,1990.

[Gon93]

R.C. Gonzalez and R.E.Wood. Digital Image Processing. Prentice Hall, 1993.

[Hir05]

K. Hirakawa, T.W. Parks, Adaptive Homogeneity-Directed Demosaicing Algorithm,
IEEE Trans. Image Processing, March, 2005.

[IEC61834]

IEC 61834. International Electrochemical Commission. Specifications ofConsumer-Use Digital VCRs using 6.3 mm magnetic tape (the "Blue Book" DV
specification).

1856

1

Developer Guide and Reference for Intel® Integrated Performance Primitives[IEEE]IEEE Standard Specifications for the Implementations of 8X8 Inverse Discrete
Cosine Transform, IEEE #1180 (1997).

[IPL]

Intel Image Processing Library Reference Manual. Intel Corp. Order number
663791, 1999.

[ISO11172]

ISOCD 11172. Information Technology. Coding of Moving Pictures and Associated
Audio for Digital Storage Media at up to about 1.5 Mbit/s (1993).

[ISO13818]

ISO/IEC 13818. Information Technology. Coding of Moving Pictures andAssociated Audio Information, (11/94).

[ISO14496]

International Standard ISO/IEC 14496-2. Information Technology. Coding of
Audio-Visual Objects - Part 2: Visual.

[ISO14496A]

ISO/IEC 14496-2:1999/Amd.1:2000(E) . Information Technology. Coding of
Audio-Visual Objects. Part2:Visual. Amendment 1: Visual Extensions (01/00).

[ISO10918]

International Standard ISO/IEC 10918-1, Digital Compression and Coding ofContinuous Tone Still Images, Appendix A - Requirements and guidelines.

[ISO15444]

International Standard ISO/IEC 15444-1, JPEG 2000 Image coding system, part
1: Core coding system.

[ISO29199]

International Standard ISO/IEC 29199-2, JPEG XR Image coding system, part 2:
Image coding specification. (2009-08-15)[ITUH261]

ITU-T Recommendation H.261. Line transmission of non-telephone signals. Video
codec for audiovisual services at p x 64 kbits (03/93).

[ITUH263]

ITU-T Recommendation H.263. Series H: AUDIOVISUAL AND MULTIMEDIASYSTEMS. Infrastructure of audiovisual services - Coding of moving video. Video
coding for low bit rate communication (02/98).

[ITUH264]

ITU-T Recommendation H.264. Series H: AUDIOVISUAL AND MULTIMEDIASYSTEMS. Infrastructure of audiovisual services - Coding of moving video.
Advanced video coding for generic audiovisual services. (ITU-T Rec. H.264 |ISO/IEC 14496-10:2005)(03/05).

[ITUH264_07]

ITU-T Recommendation H.264. Series H: AUDIOVISUAL AND MULTIMEDIASYSTEMS. Infrastructure of audiovisual services - Coding of moving video.
Advanced video coding for generic audiovisual services. (ITU-T Rec. H.264 |ISO/IEC 14496-10:2008)(11/07).

[ITU709]

ITU-R Recommendation BT.709, Basic Parameter Values for the HDTV Standard
for the Studio and International Programme Exchange [formerly CCIR Rec.709]
ITU, Geneva, Switzerland, 1990.

[Jae95]Jaehne, Bernd. Digital Image Processing, 3rd Edition, Springer-Verlag, Berlin,
1995.

[Jae97]Jaehne, Bernd. Practical Handbook on Image Processing for Scientific
Applications, CRC Press, New York, 1997.

[Jack01]

Jack, Keith. Video Demystified: a Handbook for the Digital Engineer, LLH
Technology Publishing, 3rd Edition, 2001.

[JVTG050]

JVT-G050. ITU-T Recommendation and Final Draft International Standard of Joint
Video Specification (ITU-T Rec. H.264 | ISO/IEC 14496-10 AVC) (03/03).

[Kadew01]

P.KadewTraKuPong, R.Bowden. An Improved Adaptive Background Mixture Modelfor Real-Time Tracking with Shadow Detection. Proc. 2nd European Workshop on
Advanced Video-Based Surveilolance Systems, 2001.

1857

1

Intel® Integrated Performance Primitives Developer Guide and Reference[Lein02]

R.Leinhart, J.Maydt. An Extended Set of Haar-like Features for Rapid Object
Detection. IEEE ICIP, vol.1, pp. 900-903, Sep. 2002.

[Li03]

L.Li, W.Huang, I.Gu, Q.Tian. Foreground Object Detection from Videos Containing
Complex Background. Proc.ACM Multimedia Conference, Berkley, 2003.

[Lim90]Jae S.Lim. Two-Dimensional Signal and Image Processing, Prentice Hall,Englewood Cliffs, NJ, 1990.

[Lotufo00]

R.Lotufo, A.Falcao. The Ordered Queue and the Optimality of the Watershed
Algorithm. Mathematical Morphology and its Applications to Image and Signal
Processing, vol.18, pp.341-350. Kluwer Academic Publishers. Palo Alto, USA,
June 2000.

[Lowe04]

D.G.Lowe. Distinctive Image Features from Scale-Invariant Keypoints.
International Journal of Computer Vision, vol.60, No.2, pp. 91-110, 2004.

[Malvar03]

H.S.Malvar, G.J.Sullivan. Transform, Scaling & Color Space Impact of Professional
Extensions, ISO/IEC JTC/SC29/WG11 and ITU-T SG16 Q.6 Document JVT-H031,
Geneva, May 2003.

[Matas00]

J.Matas, C.Galambos, J.V.Kittler. Robust Detection of Lines Using the Progressive
Probabilistic Hough Transform, CVIU 78 1, pp. 119-137, 2000.

[Malvar03-1]

H.S.Malvar, G.J.Sullivan. YCoCg-R: A Color Space with RGB Reversibility and Low
Dynamic Range, Joint Video Team (JVT) of ISO/IEC MPEG & ITU-T VCEG,
Document No.JVT-1014r3, July 2003.

[Meyer92]

F.Meyer. Color Image Segmentation, 4th International Conference on Image
Processing and its Applications, p.4, Maastricht, April 1993.

[Meyer94]

F.Meyer. Topographic Distance and Watershed Lines. Signal Processing, No.38,
pp.113-125, 1994.

[Mitchell88]

Don P. Mitchell, Arun N. Netravali. Reconstruction Filters in Computer Graphics.
Computer Graphics, Volume 22, Number 4, AT&T Bell Laboratories, Murray Hill,
New Jersey, August 1988.

[Myler93]

H.Myler, A.Weeks. Computer Imaging Recipes in C, Prentice Hall, 1993.

[Otsu79]

N. Otsu. A Threshold Selection Method From Gray Level Histograms. IEEE
Transactions on Systems, Man, and Cybernetics, vol.9, No.1, January 1979, pp.
62-66.

[Puetter05]

R.C.Puetter, T.R.Gosnell, and Amos Yahil. Digital Image Recosntuction: Deblurringand Denoising, Annual Review of Astronomy and Astrophysics, 2005.

[Randy97]

Randy Crane. A Simplified Approach to Image Processing, Prentice Hall PTR,
1997.

[Rao90]]K.R. Rao and P. Yip. Discrete Cosine Transform. Algorithms, Advantages,
Applications. Academic Press, Inc, London, 1990.

[Ric72]

W.Richardson. Bayesian-Based Iterative Method of Image Reconstruction. Journalof the Optical Society of America, vol.62, No.1, January 1972.

[Ritter96]

G.Ritter, J.Wilson. Computer Vision. Algorithms in Image Algebra. CRC Press,
1996.

[Rog85]David Rogers. Procedural Elements for Computer Graphics. McGraw-Hill, 1985.

[Rog90]David Rogers and J.Alan Adams. Mathematical Elements for Computer Graphics.
McGraw-Hill, 1990.

[S3TC]

S3 Texture Compression. http://en.wikipedia.org/wiki/S3TC

1858

Developer Guide and Reference for Intel® Integrated Performance Primitives

1[Sak98]

T. Sakamoto, C. Nakanishi, and T. Hase, Software pixel interpolation for digitalstill cameras suitable for a 32-bit MCU, IEEE Trans. Consumer Electronics, vol.
44, No. 4, November 1998.

[ScrewBender]

A. Powell, J. Rossignac,
ScrewBender: Polyscrew Subdivision for Smoothing Interpolating Motions , IEEE
Computer Graphics and Applications, vol.28, No. 1, January 2008

[Serra82]

J.Serra. Image Analysis and Mathematical Morphology. Academic Press, London,
1982.

[Schu92]

Dale A. Schumacher. General Filtered Image Rescaling, Graphic Gems III,
Academic Press, 1992.

[Schu94]

Dale A. Schumacher. A comparison of digital halftoning techniques, Graphic Gems
III, Academic Press, 1994, pp. 57-71.

[Sha98]Tom Shanley. Pentium Pro and Pentium II System Architecture. Addison-Wesley,
1998.

[SMPTE314M]

SMPTE 314M-2005 for Television - Data Structure for DV-Based Audio, Data andCompressed Video - 25 and 50 Mb/s. The Society of Motion Picture and Television
Engineers (09/05).

[SMPTE370M]

SMPTE 370M-2002 for Television - Data Structure for DV-Based Audio, Data andCompressed Video at 100 Mb/s, 1080/60i, 1080/50i, 720/60p. The Society of
Motion Picture and Television Engineers (07/02).

[SMPTE370M-06]

SMPTE 370M-2006 for Television - Data Structure for DV-Based Audio, Data andCompressed Video at 100 Mb/s, 1080/60i, 1080/50i, 720/60p, 720/50p. The
Society of Motion Picture and Television Engineers (04/06).

[SMPTE421M]

SMPTE 421M. Final Draft SMPTE Standard - VC-1 Compressed Video Bitstream
Format and Decoding Process (01/06).

[Telea04]

A.Telea. An Image Inprinting Technique Based on the Fast Marching Method.
Journal of Graphic Tools, vol.9, No.1, ACM Press, 2004.

[Tho91]

Spencer W. Thomas and Rod G. Bogart. Color dithering, Graphic Gems II,
Academic Press, 1991, pp. 72-77.

[Ulichney93]

R.Ulichney. Digital halftoning. MIT press, 1993.

[Vincent91]

L.Vincent, P.Soille. Watershed in Digital Spaces: An Efficient Algorithm Based on
Immersion Simulation. IEEE Transactions of Pattern Analysis and MachineIntelligence, vol.3, No.6, June 1991, pp.583-598.

[Vincent93]

L.Vincent. Morphological Gray Scale Reconstruction in Image Analysis:
Applications and Efficient Algorithms. IEEE Transactions on Image Processing,vol.2, No.2, April 1993.

[Viola01]

P.Viola, M.J.Jones. Rapid Object Detection using a Boosted Cascade of Simple
Features. Proceedings IEEE Conf. on Computer Vision and Pattern Recognition(CVPR 2001), 2001.

[Wang02]

Z.Wang, A.C.Bovik. A Universal Image Quality Index. IEEE Signal Processing
Letters, vol.9, No.3, March 2002, pp.81-84.

[Wolberg96]

G.Wolberg. Digital Image Warping. IEEE Computer Society Press, 1996.

[Zivkovic04]

Z.Zivkovic. Improved Adaptive Gaussian Mixture Model for Background
Subtraction. International Conference Pattern Recognition, UK, August, 2004.

1859

1

Intel® Integrated Performance Primitives Developer Guide and Reference

Glossary
absolute colors

Colors specified by each pixel's coordinates in a color space. Intel
Integrated Performance Primitives for image processing use images
with absolute colors.

alpha channel

A color channel, also known as the opacity channel, that can be usedin color models; for example, the RGBA model.

arithmetic operation

An operation that adds, subtracts, multiplies, divides, or squares theimage pixel values.

color-twist matrix

A matrix used to multiply the pixel components in one color space fordetermining the components in another color space.

DCT

Acronym for the discrete cosine transform. SeeDiscrete Cosine
Transforms in “Image Linear Transforms”.

dilation

A morphological operation that sets each output pixel to the minimumof the corresponding input pixel and its 8 neighbors.

dyadic operation

An operation that has two input images. It can have other input
parameters as well.

element-wise operation

An element-wise operation performs the same operation on eachelement of a vector, or uses the elements of the same position in
multiple vectors as inputs to the operation.

erosionA morphological operation that sets each output pixel to the maximumof the corresponding input pixel and its 8 neighbors.

four-channel model

A color model that uses four color channels; for example, the RGBA
color model.

gray scale image

An image characterized by a single intensity channel so that eachintensity value corresponds to a certain shade of gray.

in-place operation

An operation whose output image is one of the input images.

linear filtering

In this document, 2D convolution operations.

linear image transforms

In this document, the discrete cosine transform (DCT).

MMX™ technology

An enhancement to the Intel® architecture aimed at better
performance in multimedia and communications applications. The
technology uses four additional data types, eight 64-bit MMX
registers, and 57 additional instructions implementing the SIMD
(single instruction, multiple data) technique.

monadic operation

An operation that has a single input image. It can have other input
parameters as well.

morphological operation

An erosion, dilation, or their combinations.

not-in-place operation

An operation whose output is an image other than the input image(s).
See in-place operation.

pixel depth

The number of bits determining each channel intensity for a single
pixel in the image.

pixel-oriented ordering

Storing the image information in such an order that the values of allcolor channels for each pixel are clustered; for example, RGBRGB... .

1860

1

Developer Guide and Reference for Intel® Integrated Performance Primitives

planar-oriented ordering

Storing the image information so that all data of one color channel
follow all data of another channel, thus forming a separate “plane” foreach channel; for example, RRRRRGGGGGBBBBB....

region of interest

A rectangular image region on which an operation acts (or processing
occurs).

RGB

Red-green-blue. A three-channel color model that uses red, green,
and blue color channels.

RGBA

Red-green-blue-alpha. A four-channel color model that uses red,green, blue, and alpha (or opacity) channels.

ROI

See identity matrix.

row-major order

The default storage method for arrays in C. Memory representation issuch that the rows of an array are stored contiguously. For example,
for the array a[3][4], the element a[1][0] immediately follows
a[0][3].

saturation

Using saturation arithmetic, when a number exceeds the data-range
limit for its data type, it saturates to the upper data-range limit. For
example, a signed word greater than 7FFFh saturates to 7FFFh. Whena number is less than the lower data-range limit, it saturates to thelower data-range. For example, a signed word less than 8000h
saturates to 8000h.

Intel® Streaming SIMD Extensions

The enhancement to the Intel architecture instruction set for the next
generation processors. It incorporates a group of general-purpose
floating-point instructions operating on packed data, additional packed
integer instructions, together with cacheability control and state
management instructions. These instructions significantly improve
performance of applications using compute-intensive processing offloating-point and integer data.

three-channel model

A color model that uses three color channels; for example, the RGB
color model.

Notices and DisclaimersIntel technologies may require enabled hardware, software or service activation.
No product or component can be absolutely secure.
Your costs and results may vary.
© Intel Corporation. Intel, the Intel logo, and other Intel marks are trademarks of Intel Corporation or its

subsidiaries. Other names and brands may be claimed as the property of others.
No license (express or implied, by estoppel or otherwise) to any intellectual property rights is granted by thisdocument.
The products described may contain design defects or errors known as errata which may cause the productto deviate from published specifications. Current characterized errata are available on request.
Intel disclaims all express and implied warranties, including without limitation, the implied warranties ofmerchantability, fitness for a particular purpose, and non-infringement, as well as any warranty arising fromcourse of performance, course of dealing, or usage in trade.

1861

1

Intel® Integrated Performance Primitives Developer Guide and Reference

MPEG-1, MPEG-2, MPEG-4, H.261, H.263, H.264, MP3, DV, VC-1, MJPEG, AC3, AAC, G.711, G.722, G.722.1,
G.722.2, AMRWB, Extended AMRWB (AMRWB+), G.167, G.168, G.169, G.723.1, G.726, G.728, G.729,
G.729.1, GSM AMR, GSM FR are international standards promoted by ISO, IEC, ITU, ETSI, 3GPP and otherorganizations. Implementations of these standards, or the standard enabled platforms may require licenses
from various entities, including Intel Corporation.
Java is a registered trademark of Oracle and/or its affiliates.
Microsoft, Windows, and the Windows logo are trademarks, or registered trademarks of Microsoft Corporationin the United States and/or other countries.

Third Party
Intel® Integrated Performance Primitives (Intel® IPP) includes content from several 3rd party sources thatwas originally governed by the licenses referenced below:•

zlib library:zlib.h -- interface of the 'zlib' general purpose compression library version 1.2.8, April 28th, 2013
Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler
This software is provided 'as-is', without any express or implied warranty. In no event will the authors beheld liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose, including commercial applications,and to alter it and redistribute it freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original
software. If you use this software in a product, an acknowledgment in the product documentation
would be appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being theoriginal software.
3. This notice may not be removed or altered from any source distribution.
Jean-loup Gailly Mark Adler•

jloup@gzip.org madler@alumni.caltech.edu
bzip2:
Copyright © 1996 - 2015 julian@bzip.org

1862