Choosing a Proper Output Format for VPC to Reduce Buffer Allocation

Background

The VPC function does not support YUV400 output images (grayscale images) on the Ascend 310 AI Processor. If grayscale images are input for model inference, you need to use the VPC function to output YUV420 images and then use the AIPP function to convert the YUV420 format to the grayscale format.

On the Ascend 310P AI Processor, the VPC function supports YUV400 output images (grayscale images). If grayscale images are input for model inference, you can use the VPC function directly, with no need for AIPP CSC.

Principles

On the Ascend 310P AI Processor, the VPC function can be used to output YUV400 images (grayscale images). In this way, the AIPP CSC function is not required, reducing the load of the AI Core unit and improving performance.

Instructions

For details, see "YUV400 image processing" in Optimization Suggestions.

For details about the sample code of VPC functions, see Typical Functions of VPC.