Supported Chips

Overview

PPE (Pixel Processing Engine) is a lightweight 2D image processing engine that provides basic image processing capabilities. It is specifically designed for scenarios with strict resource and cost requirements, such as embedded systems.

PPE supports common pixel-level operations, including color conversion, scaling, alpha blending, and color keying. It can efficiently complete common 2D image processing tasks but does not possess complex 3D rendering capabilities.

Features

PPE has 3 input layers and 1 output layer. It offers the following features:

  • Alpha blending

  • Scaling

  • Window configuration

  • Color keying

  • Pixel conversion

  • Multiple input and output sources

Note

  • Alpha blending and scaling functions are parallel features and cannot be used simultaneously.

  • When using alpha blending or scaling, other feature characteristics can be used concurrently.

Alpha Blending

PPE supports up to 3-layer alpha blending.

../../../_images/ppe_alpha_blending_dplus.jpg

The alpha blending calculation formula is as follows:

\[C_R = \frac{C_{FG} \cdot A_{FG} + C_{BG} \cdot (255 - A_{FG})}{255}\]

Scaling

PPE uses a bilinear interpolation algorithm to achieve good scaling effects, with up to 16x magnification or reduction.

Note

  • When using scaling, variable pixel start positions are not supported.

  • Only the first layer supports scaling.

Window Configuration

PPE’s window configuration feature has the following characteristics:

  • Variable pixel start position: Control the position of the input window in the output window.

  • Variable window size: Configure the size of input and output windows.

  • Variable line width: Implement cropping for the input window and picture-in-picture functionality for the output window.

../../../_images/ppe_window.jpg

Color Keying

When a pixel in the output window matches the set value, that pixel will output a value of 0.

Pixel Conversion

Input and output support multiple pixel formats, including ARGB8888, RGB888, RGB565, and various other common formats.

For all supported formats, refer to the PPE_PIXEL_FORMAT in the ameba_ppe.h file. In some formats like XRGB8888, X represents the inverted alpha value, meaning the X value will be inverted during actual calculations.

Multiple Input and Output Sources

The input address can be either internal pixel values set by PPE or memory.

The output address can be memory or QSPI. Through QSPI, the output can be directly displayed on an external screen.

API Reference

For detailed information on using the related APIs, please refer to {SDK}\component\soc\amebaxxxx\fwlib\include\ameba_ppe.h.

Application Examples

The SDK provides functional examples to help developers understand and use PPE:

Raw Examples

  • Path: {SDK}\component\example\peripheral\raw\Display\PPE\{demo}

Here’s a brief description of the raw example functionalities: