The application provides a video rendering method and
system based on a computing
shader and Xpixmap, compared with an
opengl display and a
graphics pipeline mode, the computing
shader can fully call general computing resources of a GPU, as long as the computing resources are sufficient,
high resolution and
high frame rate video rendering can be supported, and the
processing capacity is greatly improved compared with the
graphics pipeline mode. Compared with the
opengl display mode, the use of the Xpixmap display mode reduces the multiple
copying of the video frame, and further improves the efficiency of the video rendering and display. The scheme fully calls the computing resources of the GPU, renders YUV into RGBA and directly stores in the buffer area corresponding to the Xpixmap, and then uses the X function to submit the display, compared with the
opengl display and the
graphics pipeline mode, the scheme has higher efficiency, stronger
processing capacity and adaptability, and is especially suitable for a graphics
processing pipeline with insufficient capacity but powerful general computing capacity.