VENC Functions and Restrictions
The
For the
For the
Description
Video Encoder (VENC) encodes YUV420SP NV12/NV21 8-bit images into H.264/H.265 video streams.
Resolution Restrictions
- Input image resolution range
Version
Resolution Range
Atlas inference product The width and height range from 128 to 4096. For H.264 streams, the maximum resolution must not exceed 4096 x 2304.
Atlas 200I/500 A2 inference product 114 x 114 to 8192 x 8192
- Output stream resolution:
VENC only encodes images and does not change the image resolution. Therefore, the resolution of the output image is the same as that of the input image.
Restrictions on Buffer Allocation and Freeing APIs
For details about the input memory size, see the calculation formula in Table 1. The output memory does not need to be managed by users but is managed by the system.
|
Version |
Buffer Allocation/Freeing API |
|---|---|
|
|
During VENC video encoding, allocate or free the input buffer on the device by calling acl.himpi.dvpp_malloc/acl.himpi.dvpp_free. The buffer lifetime is managed by the user. |
|
|
During VENC video encoding, the following two types of buffer allocation/freeing APIs are supported:
The memory allocated by calling the acl.himpi.dvpp_malloc API is the dedicated memory for media data processing. However, the address space of the dedicated memory is limited. If memory planning is concerned or memory resources are limited, you are advised to call the acl.rt.malloc API to allocate memory. |
|
|
In the VENC scenario, the following two types of buffer allocation/freeing APIs are supported for storing input image data:
When using VENC, if non-input image data (such as the QpMap table information) is stored, only acl.himpi.dvpp_malloc/acl.himpi.dvpp_free can be called to allocate and free the input buffer on the device. The buffer lifetime is managed by the user. Note: The memory allocated by calling the acl.himpi.dvpp_malloc API is dedicated for media data processing. However, the address space of the dedicated memory is limited. If memory planning is concerned or memory resources are limited, you are advised to call the acl.rt.malloc API to allocate memory. |
Restrictions on Stream/Image Formats, Width and Height Alignment, and Buffers
For details about the definition of the input image format, see hi_pixel_format. For details about the concepts such as width stride and height stride, see Terminology.