Drive Multimedia and Data-Processing Performance with Multi-Domain Primitives

Get the Latest on All Things CODE

author-image

By

20+ Years of Trust and Performance

Launched in April 2002, Intel® Integrated Performance Primitives (Intel® IPP) now embody more than two decades of reliable, highly optimized functions across key domains and cover the core functionality required for image processing, data transformation, signal processing, and cryptography.

This article focuses on the provided function primitives, their calling convention and usage models, and Intel IPP’s place in the oneAPI family of performance libraries. Additionally, it emphasizes the long history of the library and its benefits for time-to-market in a world where ever more diverse hardware and software coexist.

Speed up your multimedia and data-processing performance with high-quality, low-level building blocks for vision, signal, security, and storage applications.

What is Intel® IPP?

It’s a multi-threaded software library of functions for multimedia and data-processing applications; the primitives provide a common interface for thousands of commonly used algorithms, enabling you to automatically tune your application for many generations of processors without changes in the application.

Its collection of frequently used primitives functions is divided into four major processing groups:

  1. Signal Processing and Data Processing (with linear array or vector data)
  2. Data Compression
  3. Image Processing (with 2D arrays for typical color spaces)
  4. Cryptography

Let us dive a bit deeper into the function domains. The Intel IPP is a software library that provides a comprehensive set of application domain-specific highly optimized functions for signal, data, and image processing:

1. Signal and Data Processing

The signal and data processing capabilities comprise 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.

2. Data Compression

One key aspect of data processing is data compression, where Intel IPP covers a wide range of common compression standards:

  • Huffman/Variable Length Coding (VLC)
  • Lempel-Ziv-Storer-Syzmanski (LZSS) PKzip
  • Lempel-Ziv (lz77) Zlib,gzip
  • Lempel-Ziv-Oberhumer (LZO) lzop
  • Burrows-Wheeler Transform (BWT) bzip2
  • LZ4/ZFP

3. Image Processing

Intel IPP image processing comprises 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.

A common image processing framework that has been shown to greatly benefit from acceleration through Intel IPP is OpenCV*. (Figure 1).

Figure 1. OpenCV* Acceleration using Intel® IPP

4. Cryptography

Intel® IPP Cryptography contains a comprehensive set of routines and building blocks commonly used for cryptographic operations. This includes:

  • Symmetric Cryptography Primitive Functions:
  • One-Way Hash Primitives:
  • Data Authentication Primitive Functions:
  • Public Key Cryptography Functions:
  • Multi-buffer RSA, ECDSA, SM3, x25519
  • Finite Field Arithmetic Functions
  • Big Number Integer Arithmetic Functions
  • PRNG/TRNG and Prime Numbers Generation

Figure 2. Intel® IPP Domains

As it targets a large array of use cases, IPP needs to have a type-passing convention that supports a similarly large set of data types. These include 8u (8-bit unsigned), 8s (8-bit signed), 16s, 32f (32-bit floating-point), and 64f. Typically an application developer works with only one dominant data type for most processing functions, converting between input and output formats at the end points.

Where Are These Primitives Used?

With its rich feature set, Intel IPP helps you improve performance of multimedia, enterprise data, embedded, communications, and scientific/technical applications.

It’s no wonder that developers use IPP in a wide range of use cases and industries such as:

  • Cloud and Server Applications
  • Medical Imaging
  • Print Imaging
  • Storage
  • Digital Surveillance
  • Signal Processing
  • Machine Vision
  • In-Vehicle / In-Flight Infotainment
  • Biometric Identification
  • Visual Search
  • Communication
  • Digital Media

To name just a few.

The coverage in the image-processing domain (Figure 3) gives you a sense of how to use IPP in your comprehensive approach to various domains … and why they’re so appealing.

Figure 3. Image Processing

Similarly, in the cryptography domain the primitives’ functionality covers the entire data-security journey from edge devices and end users to the cloud and data center. Thus, as you can see in Figure 4, Intel IPP enables end-to-end use of one consistent set of function interfaces and APIs thoughout. 

Figure 4. Cryptography Local and Cloud

How Is IPP Used?

To demonstrate the power of using Intel IPP, let us focus on the specific example highlighted in an article about boosting FlexRAN™ 5G signal processing in wireless access systems.

It showcases how straightforward it can be to implement fast Fourier transform and discrete Fourier transform data-structure manipulations at the heart of 5G signal processing in a radio-access network.

Check out the code sample below:

int main(void)
{
  int i;
  IppStatus status = ippStsNoErr;
  /* Pointers to source/destination */
  Ipp32f pSrc[8], pDst[10];
  /* Pointer to FFT pSpec structure */
  IppsFFTSpec_C_32f* pSpec = NULL;
  /* Pointer to the work buffers */
  Ipp8u *pMemInit = NULL, *pBuffer = NULL, *pSpecMem = NULL;
  /* size of FFT pSpec structure, Init and work buffers */
  int sizeSpec = 0, sizeInit = 0, sizeBuf = 0;
  /* Initialize input */
  for (i = 0; i< 8 ; ++i)
  {
    pSrc[i] = (float)cos(IPP_2PI * i * 16.0/64);
  }
  /* step 1: Compute the sizes of the specification structure for length 8 complex FFT */
  status = ippsFFTGetSize_C_32f(3, IPP_FFT_DIV_INV_BY_N, ippAlgHintNone, &sizeSpec, &sizeInit, &sizeBuf);
  /* memory allocation with the sizes of the specification structure */
  pSpecMem = (Ipp8u*) ippMalloc( sizeSpec );
  pBuffer = (Ipp8u*) ippMalloc( sizeBuf );
  pMemInit = (Ipp8u*) ippMalloc( sizeInit );
  /* step 2: Initialize the specification structure which contains such data as tables of twiddle 
  factors */
  status = ippsFFTInit_C_32f(&pSpec, 3, IPP_FFT_DIV_INV_BY_N, ippAlgHintNone, pSpecMem, pMemInit);
  /* step 3: Performs the length 8 complex FFT */
  status = ippsFFTFwd_CToCCS_32f(pSrc, pDst, pSpec, NULL);
  /* Free memory */
  ippFree( pMemInit );
  ippFree( pSpec );
  ippFree( pBuffer );
  printf("Exit status %d (%s)\n", (int)status, ippGetStatusString(status));
  return (int)status;
}

You will notice that the whole process of memory initialization, performing the Fourier transform and freeing the memory again, can be reduced to 5 simple steps. The Fourier transform itself is just a single function call. (Figure 5)

Figure 5. FFT Example

This very capability is at the heart of Intel IPP usage in Intel’s FlexRAN™ Reference Architecture for Wireless Access.

There are many examples like this, where using this set of primitive functions simplifies your life as a developer and helps you complete your project faster and with a more resilient and future-proof code base.

Check it out today!

Additional Resources

Explore this library and get detailed function descriptions, including calling syntax, via the following:

Next Steps and Your Feedback

Please also let us know any feature requests or suggestions you may have on our community forum or through Priority Support.

Try it for yourself today by downloading and installing the Intel® oneAPI Base Toolkit.

Alternatively, you can also find standalone distributions at the following locations:

Detailed documentation is also available online.