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.

The alpha blending calculation formula is as follows:
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.

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.
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 sources
Rotation
XOR operation
Alpha Blending
PPE supports up to 3-layer alpha blending. It also supports an internal background layer within PPE.

The alpha blending calculation formula is as follows:
Scaling
PPE uses a bilinear interpolation algorithm to achieve good scaling effects, with up to 16x magnification or reduction.
Note
Only the first and second input layers support the scaling feature.
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.

Color Keying
When a pixel in the output window matches the set value, that pixel will output a value of 0. Color keying supports both outer and inner keying modes.
For inner color keying, pixels meeting the following conditions will output 0:
For outer color keying, pixels meeting the following conditions will output 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 Sources
The input address can be either internal pixel values set by PPE or memory.
Rotation
Supports rotation by 90, 180, and 270 degrees.
Note
Only the first layer supports the rotation feature.
XOR Operation
Supports XOR operations on 2 or 3 layers of data, i.e.:
Note
When using the XOR feature, other features cannot be used.
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:
raw_ppe_as_dma demonstrates how to use PPE as DMA to transfer data or display to QSPI.
raw_ppe_3_layer_alpha_blending demonstrates how to use 3-layer alpha blending.
raw_ppe_scale demonstrates how to use the scale functionality.
raw_ppe_autoload demonstrates how to use the autoload feature to process multiple frames at once.
raw_ppe_linklist demonstrates how to use the linklist feature to process multiple frames at once.