Using Frame Skipping of VDEC to Reduce Buffer Allocation
Background
In the event of VDEC+model inference cascading, if the video has a large number of frames but not every frame requires inference, you are advised to disable the display of decoding outputs of the frames that do not require inference when calling hi_mpi_vdec_send_stream.
Principles
Video decoding requires continuous data and needs to output YUV data. Therefore, after each frame of data is decoded, VDEC needs to decompress and resize data and convert its format by using VPC.
If you do not need the decoding result of a frame, you can disable the display of the result when calling hi_mpi_vdec_send_stream. In this case, you do not need to allocate the output buffer, and VPC is not used for decompression, resizing, and format conversion in VDEC. This reduces buffer allocation and VPC workload to improve performance.