For the Ascend 310 AI Processor, this function is reserved and is not supported currently.
The Ascend 910 AI Processor does not support this function.
Video Encoder (VENC) encodes YUV420SP NV12/NV21 8-bit images into H.264/H.265 video streams.
The width and height range from 128 to 4096 for the Ascend 310P AI Processor. For H.264 streams, the maximum resolution must not exceed 4096 x 2304.
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.
To implement the VENC function:
Call hi_mpi_dvpp_malloc or hi_mpi_dvpp_free to allocate or free the input buffer on the device. The buffer lifetime is managed by the user. For details about the buffer size, see the formula in the following table.
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.
Input Format |
Input Width and Height |
Input Width Stride, Height Stride, and Buffer Size |
Output Format |
|---|---|---|---|
YUV420SP NV12 8-bit |
Width: Must be a multiple of 2. Height: Must be a multiple of 2. |
Width stride: Round up the width to the nearest multiple of 16. The height stride does not need to be configured. Buffer size (in bytes) = Width stride x Height x 3/2 |
|
YUV420SP NV21 8-bit |