Table 1 describes the functions of media data processing V2.
Function |
Description |
|---|---|
Vision Preprocessing Core (VPC) |
Manipulates image processing, including image resizing, cropping, pyramid, and color space conversion (CSC). For details, see Restrictions. |
JPEG Decoder (JPEGD) |
Decodes images. For details, see JPEGD Functions and Restrictions. |
JPEG Encoder (JPEGE) |
Encodes images. For details, see JPEGE Functions and Restrictions. |
Video Decoder (VDEC) |
Decodes videos. For details, see VDEC Functions and Restrictions. |
Video Encoder (VENC) |
Encodes videos. For details, see VENC Functions and Restrictions. |
PNG Decoder (PNGD) |
Decodes PNG images. For details, see Functions and Restrictions. |
Table 2 describes the functions of media data processing V2 supported by Ascend AI Processors.
When using the APIs described in this chapter, pay attention to the following points:
Media data processing can access a maximum of 16 GB address space in each process.
Before implementing each function of media data processing, you must call APIs to create corresponding channels. See the channel creation and destruction APIs in VPC, VDEC/JPEGD, VENC/JPEGE, and PNGD to learn about the API descriptions and the maximum number of channels.
Channel creation and destruction involve resource allocation and release. Repeated channel creation and destruction, however, affect service performance. Therefore, you are advised to manage channels based on your actual scenario. For example, to process VPC images continuously, create VPC channels, wait until all VPC functions are called, and then destroy the VPC channels.
A too large number of channels would affect the CPU usage and memory usage of the device. For details about the number of channels, see the performance specifications in the corresponding function sections.
The reserved fields in the structs and enumerations contain a _BUTT suffix, for example, HI_COMPRESS_MODE_BUTT.