Functions and Restrictions
Function Description
Video Decoder (VDEC) decodes videos. After internal VPC processing, VDEC outputs images in specified formats. For details, see Restrictions on Stream/Image Formats, Width and Height Alignment, and Buffers.
Resolution Restrictions
- Input resolution range:
Version
Resolution Range
Atlas 200/300/500 Inference Product
Atlas Training Series Product
128 x 128 to 4096 x 4096
- Output resolution range:
Version
Resolution Range
Atlas 200/300/500 Inference Product
Atlas Training Series Product
10 x 6 to 4096 x 4096
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.
- Input buffer
Call acl.media.dvpp_malloc/acl.media.dvpp_free or acl.rt.malloc/acl.rt.free to allocate or free the buffer. The buffer size is the size of space occupied by actual input streams.
The buffer allocated by calling acl.media.dvpp_malloc is dedicated for processing media data. However, the address space of the dedicated buffer is limited. If buffer planning is considered or resources are limited, you are advised to call acl.rt.malloc for allocation when using the VDEC function.
- Output buffer
Call acl.media.dvpp_malloc or acl.media.dvpp_free to allocate or free the buffer. For details about the buffer size, see the formula in the following table.
For details about the definition of the output image format, see acldvppPixelFormat. For details about the concepts such as width stride and height stride, see Terminology.
- 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)
The following table describes the requirements on the output image format and alignment of width and height during VDEC video decoding.
Version |
Output Format |
Output Width and Height |
Output Width Stride, Height Stride, and Buffer Size Atlas 200/300/500 Inference Product Atlas Training Series Product |
|---|---|---|---|
General format, supported by all versions |
YUV420SP NV12 8bit |
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. If the configured width of the output image is less than 16, the minimum width stride must be at least 32. Height stride: Round up the height to the nearest multiple of 2. Buffer size (in bytes) ≥ Width stride x Height stride x 3/2 |
YUV420SP NV21 8bit |
Other Restrictions
- VDEC decodes input streams frame by frame.
- Bad frames or frame loss in the streams may cause VDEC frame loss.
- VDEC decodes only the H.264 8-bit streams encoded in interlaced mode.