VDEC Functions and Restrictions

For the Ascend 310 AI Processor, this function is reserved and is not supported currently.

For the Ascend 910 AI Processor, this function is reserved and is not supported currently.

Function Description

Video Decoder (VDEC) decodes videos.

Resolution Restrictions

Restrictions on Stream/Image Formats, Width and Height Alignment, and Buffers

In terms of the VDEC function, the input/output buffer lifetime is managed by the user.

For details about the definition of the output image format, see hi_pixel_format. For details about the concepts such as width stride and height stride, see Terminology.

Table 1 Restrictions on the stream/image format, width and height alignment, and buffer size

Input Format

Output Format

Output Width and Height

Output Width Stride, Height Stride, and Buffer Size

  • H.264 BP/MP/HP level 5.1 YUV420 streams (Annex-B raw video streams only)
  • H.265 8-/10-bit level 5.1 YUV420 streams (Annex-B raw video streams only)

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 minimum value is 32 and the maximum value is 16384.

Height stride: Round up the height to the nearest multiple of 2. The minimum value is 6 and the maximum value is 16384.

Buffer size (in bytes) ≥ Width stride x Height stride x 3/2

YUV420SP NV21 8-bit

RGB888

No alignment requirement.

Width stride: Round up the width to the nearest multiple of 16 and multiply the result by 3. The minimum value is 48 and the maximum value is 16384.

Height stride: No alignment requirement. The minimum value is 6 and the maximum value is 16384.

Buffer size (in bytes) ≥ Width stride x Height stride

BGR888

Other Restrictions