Rate This Document
Findability
Accuracy
Completeness
Readability

Introduction to the HMPP

Hyper Media Performance Primitives (HMPP) is an acceleration library developed by Huawei based on the Kunpeng processor hardware platform. It provides high-performance acceleration functional interfaces for signal and image processing through NEON instructions supported by the Kunpeng processor. This document describes the structures, operations, and main functions of the HMPP, and provides the installation guide, interface definitions, and interface calling examples to help you quickly get familiar with this library.

The HMPP provides functions for allocating and releasing vector buffers, vector initialization, vector mathematical operations, vector statistics operations, vector sampling, and vector conversion, filtering functions, as well as transform (such as fast Fourier transform) functions. These functions can be used on the Kunpeng platform only. To ensure the optimal performance, the HMPP interfaces do not verify all input parameters. The validity and reasonableness of the input parameters are ensured by the services that call the interfaces.

HMPP Interface Functions

Module

Description

Basic functions

This module enables 63 basic functions, including functions for byte alignment, memory allocation, memory release, multi-thread setting, obtaining status code description, thread information, CPU cache, time frequency and CPU timestamp, and HMPP version, obtaining and setting instruction information, and enabling and disabling the FlushToZero mode.

Signal library (HMPPS)

This module implements the following functions:

  • Basic vector operations: logical shift operation, vector conversion, vector statistics, sampling function, and initialization function
  • Signal conversion: fast Fourier transform (FFT), chirp Z-transform (CZT), power spectrum, Hilbert transform, and wavelet transform (WT)
  • Filtering: convolution, finite impulse response (FIR) filtering, infinite impulse response (IIR) filtering, resampling, median filtering, and autocorrelation
  • Window functions: Blackman, Hann, Kaiser, Hamming, and Bartlett
  • Mathematical operations: arithmetic operation, triangle operation, and power, root, and exponential operations

Image library (HMPPI)

This module implements functions such as image color model conversion, thresholding, arithmetic logic operation, and image geometric transformation.

Audio library (HMPPA)

This module encodes and decodes audio data streams. The protocols include amrnb, amrwb, evrc, gsmefr, gsmfr, gsmhr, g726, g729a, silk, wav, and evs.

HMPP Interface Declaration

Table 1 describes HMPP header files.
Table 1 Description of HMPP header files

File

Description

hmpp.h

Defines the version of the function library.

hmpp_core.h

Defines the public byte alignment, memory allocation, and memory release functions of the function library.

hmpps.h

Declaration file of the signal library

hmppi.h

Declaration file of the image library

hmppa.h

Declaration file of the audio library

hmpp_type.h

Defines the structure, enumeration type, and error code used by the function library.

hmpp_typebase.h

Defines the basic data types of the function library.

Application Scenarios

HMPP involves image processing, color conversion, filtering, transformation, and geometry. It provides abundant functional interfaces and ultimate performance optimization for vision computing, vector computing, statistics, signal filtering, signal conversion, and fixed-precision operation. HMPP can be applied to the following fields:

  • Digital media
  • Data communication
  • Biomedicine
  • Aeronautics and astronautics