Functions and Restrictions
Function Support
The following table describes the supported functions of media data processing V2
|
Product |
VPC |
JPEGD |
JPEGE |
PNGD |
VDEC |
VENC |
|---|---|---|---|---|---|---|
|
Atlas 350 Accelerator Card |
√ |
√ |
√ |
√ |
x |
x |
|
|
x |
x |
x |
x |
x |
x |
|
|
√ |
√ |
√ |
√ |
√ |
√ |
|
|
√ |
√ |
√ |
√ |
√ |
√ |
|
|
√ |
√ |
√ |
√ |
√ |
x |
|
|
√ |
√ |
√ |
√ |
√ |
x |
Restrictions
When using the APIs described in this chapter, pay attention to the following points:
- About memory allocation and deallocation
- If memory is needed to store the input or output data before implementing the VPC, JPEGD, and JPEGE functions for media data processing, call dvpp_malloc to allocate memory and dvpp_free to free up memory.
- The memory allocated by calling 1 can meet the requirements of media data processing and can be used in other tasks. For example, the output of media data processing can be used as the input of model inference to implement memory reuse.
- Because the address space accessed by media data processing is limited, you are advised to call the acl.rt.malloc, acl.rt.malloc_host, or acl.rt.malloc_cached APIs described in section Memory Management to allocate memory for other functions (for example, model loading) to ensure sufficient memory during media data processing.
- About channel requirements
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 APIs, VENC/JPEGE APIs, and PNGD APIs 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.
Too many 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.