CN114567784B - VPU video decoding output method and system for Feiteng display card - Google Patents

VPU video decoding output method and system for Feiteng display card Download PDF

Info

Publication number
CN114567784B
CN114567784B CN202210449772.8A CN202210449772A CN114567784B CN 114567784 B CN114567784 B CN 114567784B CN 202210449772 A CN202210449772 A CN 202210449772A CN 114567784 B CN114567784 B CN 114567784B
Authority
CN
China
Prior art keywords
display
vpu
feiteng
buffer
file descriptor
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210449772.8A
Other languages
Chinese (zh)
Other versions
CN114567784A (en
Inventor
刘意虎
宾泽民
周磊
王勇军
张铎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Galaxy Qilin Software Changsha Co ltd
Original Assignee
Galaxy Qilin Software Changsha Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Galaxy Qilin Software Changsha Co ltd filed Critical Galaxy Qilin Software Changsha Co ltd
Priority to CN202210449772.8A priority Critical patent/CN114567784B/en
Publication of CN114567784A publication Critical patent/CN114567784A/en
Application granted granted Critical
Publication of CN114567784B publication Critical patent/CN114567784B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
    • H04N19/423Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation characterised by memory arrangements

Abstract

The invention discloses a VPU video decoding output method and a system for a Feiteng display card, wherein the method comprises the steps of obtaining display equipment, completing the link with the display equipment of the Feiteng display card, creating a buffer management equipment GBM, creating a DMABUF buffer zone and obtaining a corresponding file descriptor fd; and using an fd import function of an open multimedia acceleration layer OMX to import the fd of each DMABUF buffer into a video coding and decoding unit (VPU) in a GPU for use, locking the decoded fd by the OMX by using a callback function, adding the locked fd into a display output queue, enabling the GPU to acquire the fd from the display output queue and perform rendering output, and informing the OMX to release the fd after the GPU uses the fd. The invention can realize the optimization of VPU video decoding output of the Feiteng graphics card, so as to reduce the CPU occupancy rate of the VPU of the Feiteng graphics card during decoding output, improve the performance and efficiency of the system and prevent the tearing of the picture.

Description

VPU video decoding output method and system for Feiteng display card
Technical Field
The invention relates to a computer video playing technology, in particular to a VPU video decoding output method and a VPU video decoding output system for a Feiteng display card.
Background
The Feiteng X100 video card is a domestic GPU developed by Feiteng information technology company Limited. Includes a graphics display module and a VPU (Video Processing Unit). The Feiteng X100 video card integrated VPU is a high performance multi-standard video IP that can perform the following decoding: H.264/AVC BP/MP/HP, VC-1 SP/MP/AP, MPEG-1/2, MPEG4 SP/ASP, DivX/XVID, AVS, RV-8/9/10, VP8 and Theora video.
The VPU video output of the current Feiteng X100 video card is only displayed by software output, and the video output capability is limited by the processing capability of a CPU to a great extent. As shown in fig. 1, the current output method of the decoded video of the totem X100 graphics card VPU includes:
step S101: a decoding environment is established in the MPV player, and a video memory is applied;
step S102: preparing data of a frame;
step S103: starting decoding by utilizing an open multimedia acceleration layer OMX (OpenMax) back-end decoding framework;
step S104: carrying out rgb conversion on the decoded yuv data and copying the yuv data to a display process;
step S105: data display is performed by an X11 mode.
Therefore, although hardware decoding is adopted in the Feiteng X100 video card VPU decoding, if the decoded data needs to be output in a GPU mode, the decoded data needs to be copied once, and the currently output mode is a software mode, so that the CPU occupancy rate is high when the Feiteng X100 video card VPU is used for video decoding. When a plurality of videos are played, the method can be used for processing each time when one video is played because the resource condition of the graphics card GPU is not considered in the existing scheme. The method has the defects that the CPU occupancy rate is rapidly increased in the playing process, the problems that a video played at the back is dragged and clamped by a window, a picture is blocked, the picture of a video frame is seriously delayed, even the picture is completely blocked, and the like often occur, and the system bumping can be caused seriously. The conventional VPU video decoding output method of the Feiteng X100 video card brings great consumption to the whole system resources, and if a user performs other operations during video playing, such as daily computer work, the phenomena that the system CPU resources are insufficient and other applications cannot obtain timely response occur, so that very poor experience is brought to the user for playing the video. Therefore, when a user plays a plurality of videos, the efficiency is low, the delay and pause are large, and the user experience is seriously influenced. Therefore, how to improve the CPU occupancy rate, user experience, and performance during video playing is an important issue facing the present.
Disclosure of Invention
The technical problem to be solved by the invention is as follows: the invention aims to realize the optimization of VPU video decoding output of the Feiteng display card so as to reduce the CPU occupancy rate of the VPU of the Feiteng display card during decoding output, improve the performance and efficiency of the system and prevent the tearing of pictures.
In order to solve the technical problems, the invention adopts the technical scheme that:
a VPU video decoding output method for a Feiteng display card comprises the following steps:
1) the method comprises the steps of obtaining display equipment, completing the link with Feiteng display card display equipment, obtaining the Feiteng display card display equipment, and establishing a buffer management equipment GBM for the Feiteng display card display equipment;
2) creating a plurality of DMABUF buffers based on a GBM (buffer management device), and respectively obtaining a file descriptor fd of each DMABUF buffer;
3) the file descriptor fd of each DMABUF buffer area is imported to a video coding and decoding unit (VPU) in a GPU for use by using a file descriptor fd import function of an open multimedia acceleration layer (OMX), so that the video coding and decoding unit (VPU) in the GPU directly uses a video memory of the GPU;
4) the open multimedia acceleration layer OMX locks the decoded file descriptor fd by using a callback function and then adds the file descriptor fd into a display output queue, so that the GPU obtains the file descriptor fd from the display output queue and performs rendering output to avoid frame tearing caused by the simultaneous occurrence of partial frames of adjacent frames on a screen, and a video coding and decoding unit VPU in the GPU only fills decoded data into a DMABUF buffer area corresponding to the unlocked file descriptor fd; and after the GPU finishes using the file descriptor fd, the open multimedia acceleration layer OMX is informed to release the used file descriptor fd, so that the file descriptor fd is used by a video coding and decoding unit VPU in the GPU again.
Optionally, step 1) comprises: communicating with an X server through an X display interface to obtain a display device and obtain the current Feiteng display card display device; and calling the interface to complete the link with the server of the Feiteng display card display equipment, acquiring the Feiteng display card display equipment, and creating a buffer management device GBM for the Feiteng display card display equipment.
Optionally, when a plurality of DMABUF buffers are created based on the buffer management device GBM in step 2), determining the number of buffers in the DMABUF buffers and the size of each buffer.
Optionally, step 3) comprises: calling a file descriptor fd import function interface of the open multimedia acceleration layer OMX to transfer a file descriptor fd of the DMABUF buffer, which is stored in a DMABUF buffer pointer variable dmaabuf _ ptr of a video decoding context structure of the player, so as to enable the open multimedia acceleration layer OMX to access the DMABUF buffer, so that a video codec unit VPU in the GPU directly uses the display memory of the GPU.
Optionally, the step 4) of enabling the GPU to obtain the file descriptor fd from the display output queue and perform rendering output includes: and for each frame obtained by VPU decoding, assigning the decoded data corresponding to the decoded data in the DMABUF buffer area to a file descriptor fd in a display output queue so that the player can obtain the decoded data of each frame, and then calling an OpenGL/ES interface by the player to convert the decoded data into the texture required by display and perform display output.
Optionally, the invoking an OpenGL/ES interface to convert the decoded data into a texture required for display and perform rendering output includes: and converting the decoded data into an image, converting the image into a texture mapping, and finally converting the texture mapping into the frame buffer content of the Feiteng display card and displaying and outputting the frame buffer content.
Alternatively, the converting the decoded data into the image refers to converting the decoded data into the image using a createmagekhr interface, and the converting the image into the texture map refers to converting the image into the texture map using an EGLImageTargetTexture2DOES interface.
Optionally, after the step 4), a step of destroying the corresponding resource after finishing the video decoding output of the video coding and decoding unit VPU is further included, and the destroying the corresponding resource includes: destroying the DMABUF buffer area, canceling the mapping from the image to the texture mapping, emptying a buffer queue for managing the DMABUF buffer area and buffer resources corresponding to the file descriptor fd, and closing the buffer management equipment GBM.
In addition, the invention also provides a VPU video decoding output system for the Feiteng graphics card, which comprises a microprocessor and a memory which are connected with each other, wherein the microprocessor is also connected with the Feiteng graphics card and is programmed or configured to execute the steps of the VPU video decoding output method for the Feiteng graphics card.
Furthermore, the present invention also provides a computer-readable storage medium, in which a computer program is stored, and the computer program is used for being executed by a computer device to implement the steps of the VPU video decoding output method for the fijim video card.
Compared with the prior art, the invention mainly has the following advantages:
1. the VPU video decoding output method for the Feiteng display card is based on the technical characteristics of OpenGL and DMABUF buffer areas, combines the hardware characteristics of the VPU of the Feiteng display card, combines the basic framework of a gStreamer plug-in, realizes a video output realization method with low CPU occupancy rate by utilizing the mode of sharing a file descriptor fd by the DMABUF buffer area, fully utilizes the methods of OpenGL, DRI3, XCB and the like to realize data buffer sharing between two independent processes to optimize video decoding output, effectively improves the condition of high CPU occupancy rate during video output in the current system, reduces the CPU occupancy rate during decoding output of the VPU of the Feiteng display card, and improves the performance and efficiency of the system.
2. The method has obvious optimization effect, improves the mode that the system only uses software output before optimization into the mode that the hardware output is used, reduces the CPU occupancy rate to the maximum extent, more efficiently utilizes the limited hardware resource of the display card, improves the performance and the efficiency of playing multi-channel videos, and improves the experience of users for playing the multi-channel videos.
3. The method adopts the display output queue, locks the decoded file descriptor fd by using a callback function through the open multimedia acceleration layer OMX, and then adds the file descriptor fd into the display output queue, and informs the open multimedia acceleration layer OMX to release the used file descriptor fd after the GPU uses the file descriptor fd, so that when the GPU obtains the file descriptor fd from the display output queue and performs rendering output, the method can effectively avoid the picture tearing caused by the fact that partial pictures of adjacent frames appear on a screen at the same time when the video is played, and ensure the picture quality.
Drawings
Fig. 1 is a VPU decoding flowchart of a soar X100 graphics card in the prior art.
FIG. 2 is a schematic diagram of a basic flow of a method according to an embodiment of the present invention.
Fig. 3 is a flowchart illustrating a video decoding process of the soar graphics card according to an embodiment of the present disclosure.
Fig. 4 is a general block diagram of a VPU video decoding output method of the FT graphics card according to an embodiment of the present invention.
Detailed Description
The following will take a totem X100 graphics card as an example, and refer to the accompanying drawings to describe in detail embodiments of the VPU video decoding output method and system for the totem graphics card of the present invention, and details and functions that are not necessary for the present invention are omitted in the description process to avoid obscuring the understanding of the present invention. It should be noted that the VPU video decoding output method and system for the soar graphic card of the present invention are applicable to all soar graphic cards in the same working manner, and are not limited to the soar graphic card of the special type, the soar X100 graphic card. In addition, the operating system environment related to the embodiment is the kylin V10 SP1, but the VPU video decoding output method and system for the soar graphics card of the present invention are applicable to other operating systems working in the same way, and are not limited to the operating system of the specific version of the kylin V10 SP 1.
As shown in fig. 2, the VPU video decoding output method for the totem graphic card of the present embodiment includes:
1) the method comprises the steps of obtaining display equipment, completing the link with Feiteng display card display equipment, obtaining the Feiteng display card display equipment, and establishing a buffer management equipment GBM for the Feiteng display card display equipment;
2) creating a plurality of DMABUF buffers based on a GBM (buffer management device), and respectively obtaining a file descriptor fd of each DMABUF buffer;
3) the file descriptor fd of each DMABUF buffer area is imported to a video coding and decoding unit (VPU) in a GPU for use by using a file descriptor fd import function of an open multimedia acceleration layer (OMX), so that the video coding and decoding unit (VPU) in the GPU directly uses a video memory of the GPU;
4) the open multimedia acceleration layer OMX locks the decoded file descriptor fd by using a callback function and then adds the file descriptor fd into a display output queue, so that the GPU obtains the file descriptor fd from the display output queue and performs rendering output to avoid frame tearing caused by the simultaneous occurrence of partial frames of adjacent frames on a screen, and a video coding and decoding unit VPU in the GPU only fills decoded data into a DMABUF buffer area corresponding to the unlocked file descriptor fd; and after the GPU finishes using the file descriptor fd, the open multimedia acceleration layer OMX is informed to release the used file descriptor fd, so that the file descriptor fd is used by a video coding and decoding unit VPU in the GPU again.
Step 1) is used to create a display environment, which is specifically implemented by a back end of a player, where the player in this embodiment is specifically an MPV player. In this embodiment, step 1) includes: communicating with an X server through an X display interface to obtain a display device and obtain the current Feiteng display card display device; and calling the interface to complete the link with the server of the Feiteng display card display equipment, acquiring the Feiteng display card display equipment, and creating a buffer management device GBM for the Feiteng display card display equipment. Generally, creating an XCB Display environment requires calling an Xlib library, and communicating with an X server (Xserver) through an X Display interface (xoopendisplay) to obtain a Display device (Display device) and obtain a current Display device of a fly Display card. After the display device is acquired, a dri3 interface of the XCB needs to be called to complete the link with the server of the display device of the fiver display card and acquire the current display device of the fiver display card. In the Linux operating system, everything is abstracted into files.
In this embodiment, when a buffer is applied in the DMABUF buffer, a corresponding buffer structure is created, and then the private pointer in the DMABUF buffer points to the applied buffer, and at the same time, the buffer is bound to the node inode of the operating system, so as to obtain a file. The file and the DMABUF buffer area are bound together in the mode, so that the aim of buffer association is fulfilled; a free file descriptor fd is allocated in the process needing to use the buffer and the file descriptor fd is bound with the file, so that the process context can find the corresponding DMABUF buffer through the file descriptor fd. The file is unique in the system, and is irrelevant to a specific process, and each process can maintain a file descriptor fd list of the process, so that the file descriptor fd is independent for the process, and the buffer can be shared only by ensuring that the file descriptor fd is bound with the same file during cross-process transmission.
In this embodiment, when creating a plurality of DMABUF buffers based on the buffer management device GBM in step 2), determining the number of buffers in the DMABUF buffers and the size of each buffer. The GBM may be implemented by a GBM interface, which is an API for GPU buffer management, and may create a GBM _ device (create buffer management device GBM) based on the file descriptor fd obtained by the dri3 interface of the XCB, and then create the DMABUF buffer based on the create buffer management device GBM. The number of buffers and the size of each buffer can be specified as desired, e.g., some yuv-formatted data require a single buffer, and some yuv-formatted data require two buffers (y one buffer, uv one buffer).
In this embodiment, step 3) includes: the file descriptor fd import function interface of the open multimedia acceleration layer OMX is called to transfer the file descriptor fd of the DMABUF buffer, which is stored in the DMA buffer pointer variable dmaabuf _ ptr of the player's video decoding context structure (avcodeccoxt) to enable the open multimedia acceleration layer OMX to access the DMABUF buffer so that the video codec unit VPU in the GPU directly uses the display memory of the GPU. Specifically, the decoding data filling in the open multimedia acceleration layer OMX is realized by an interface function of the open multimedia acceleration layer OMX, and the purpose of the decoding data filling can be realized only by transferring the file descriptor fd.
The buffer management device GBM can realize the functions of applying, creating, releasing and the like for the buffer in the DMABUF buffer area, and realize the management of the display output queue. For the DMABUF buffer management, in each frame, the decoded data needs to be transmitted to the MPV player for display, so that the data content corresponding to the decoded buffer is assigned to the file descriptor fd, and the upper layer player can only take the decoded data corresponding to the buffer. In this process, since synchronization of the decoding speed and the display speed is involved, a plurality of DMABUF buffers need to be created for processing, and thus a plurality of file descriptors fd need to be processed. For the management of the display output queue, in this embodiment, the file descriptor fd is managed in a first-in first-out queue FIFO manner, and the specific functions mainly include queue initialization, enqueuing, dequeuing, and destruction.
In this embodiment, the step 4) of enabling the GPU to obtain the file descriptor fd from the display output queue and perform rendering output includes: and for each frame obtained by decoding by the video coding and decoding unit VPU, assigning decoded data corresponding to the decoded frame in the DMABUF buffer area to a file descriptor fd in a display output queue, so that the player obtains the decoded data of each frame, and then the player calls an OpenGL/ES interface to convert the decoded data into textures required by display and performs display output.
In this embodiment, the invoking an OpenGL/ES interface to convert the decoded data into a texture required for display and perform rendering output includes: and converting the decoded data into an image, converting the image into a texture map, and finally converting the texture map into the frame buffer content of the Feiteng display card and displaying and outputting the frame buffer content. And converting the decoded picture into a texture required by display, and calling an OpenGL/ES interface for rendering. Finally, the decoded data needs to be displayed, which involves OpenGL (or OpenES) drawing at the application end, and how the application transfers the decoded data buffer content to the display server end for display. Since the MPV player and the display belong to different processes, based on the foregoing, it is implemented that the decoded data is texture mapped by using OpenGL method and finally rendered into the frame buffer. In this embodiment, the converting the decoded data into the image refers to converting the decoded data into the image using a createmagekhr interface, and the converting the image into the texture map refers to converting the image into the texture map using an EGLImageTargetTexture2DOES interface.
In this embodiment, step 4) further includes a step of destroying the corresponding resource after completing the VPU video decoding output, and destroying the corresponding resource includes: destroying the DMABUF buffer area, canceling the mapping from the image to the texture mapping, emptying a buffer queue for managing the DMABUF buffer area and buffer resources corresponding to the file descriptor fd, and closing the buffer management equipment GBM.
Fig. 3 is a flowchart illustrating a video decoding process of the totem graphic card in the present embodiment. As can be seen from fig. 3, before decoding, similar to fig. 1, both a video memory request and data preparation are required. Then, it is completely different from the method shown in fig. 1: firstly, creating a buffer management device GBM and a DMABUF buffer area, and acquiring a file descriptor fd of a Feiteng display card display device; then, based on the GBM, the buffer queue management of the DMABUF buffer is realized, and frame-by-frame decoding display is carried out: for each frame of data, transferring a file descriptor fd, filling the yuv format data obtained by decoding into a buffer of a DMABUF buffer area, performing texture conversion on the decoded data in the buffer, and performing rendering display output through an OpenGL/ES interface; and finally, performing resource destruction, including file descriptors fd, a DMABUF buffer and a buffer thereof, a buffer management device GBM and the like, and completing video decoding. Fig. 4 is a general block diagram of the VPU video decoding output method of the soar graphics card in this embodiment, and as can be seen from fig. 4, an open multimedia encapsulation layer and an open multimedia acceleration layer OMX rear-end related interface used by a VPU of a video coding and decoding unit of the soar X100 graphics card are added at the rear end of an MPV player (media player); in the aspect of image display, the method mainly comprises the steps of performing texture conversion on data from a DMABUF buffer area decoded by a 3D graphics acceleration library by adopting a display output queue mode based on the back end of a player of an MPV player, and finally calling an OpenGL interface for display. Compared with the VPU video decoding display output of the current Feiteng X100 display card, the method of the embodiment realizes the zero copy method of the data of the application and display service output two processes by the DMABUF buffer mode, thereby achieving the purposes of reducing the CPU occupancy rate and improving the low CPU occupancy rate when a plurality of paths of videos are decoded and output simultaneously, moreover, a display output queue is adopted, the decoded file descriptor fd is locked by using a callback function through an open multimedia acceleration layer OMX and then is added into the display output queue, after the GPU finishes using the file descriptor fd, the open multimedia acceleration layer OMX is notified to release the used file descriptor fd, so that when the GPU obtains the file descriptor fd from the display output queue and performs rendering output, and the method can effectively avoid the picture tearing caused by the simultaneous appearance of partial pictures of adjacent frames on the screen when the video is played, and ensure the picture quality. The foregoing related terms are explained as follows: the GBM is an API for GPU buffer management. XCB is the underlying library that encapsulates the X protocol. DMABUF is a shared buffer framework. And more particularly, to a file descriptor for interactive access to the DMABUF by passing the file descriptor between different processes. OpenGL/ES is a cross-programming language, cross-platform professional 3D programming API interface, and is a powerful, convenient-to-call bottom layer 3D graphics library.
In addition, the embodiment also provides a VPU video decoding output system for a soar graphics card, which comprises a microprocessor and a memory which are connected with each other, wherein the microprocessor is also connected with the soar graphics card, and the microprocessor is programmed or configured to execute the steps of the VPU video decoding output method for the soar graphics card.
In addition, the present embodiment also provides a computer readable storage medium, in which a computer program is stored, and the computer program is used for being executed by a computer device to implement the foregoing steps of the VPU video decoding output method for the fijim video card.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-readable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein. The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks. These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks. These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiments, and all technical solutions belonging to the idea of the present invention belong to the protection scope of the present invention. It should be noted that modifications and embellishments within the scope of the invention may occur to those skilled in the art without departing from the principle of the invention, and are considered to be within the scope of the invention.

Claims (10)

1. A VPU video decoding output method for a Feiteng display card is characterized by comprising the following steps:
1) the method comprises the steps of obtaining display equipment, completing the link with Feiteng display card display equipment, obtaining the Feiteng display card display equipment, and establishing a buffer management equipment GBM for the Feiteng display card display equipment;
2) creating a plurality of DMABUF buffers based on the GBM, and respectively obtaining a file descriptor fd of each DMABUF buffer;
3) the file descriptor fd of each DMABUF buffer area is imported to a video coding and decoding unit (VPU) in a GPU for use by using a file descriptor fd import function of an open multimedia acceleration layer (OMX), so that the video coding and decoding unit (VPU) in the GPU directly uses a video memory of the GPU;
4) the open multimedia acceleration layer OMX locks the decoded file descriptor fd by using a callback function and then adds the file descriptor fd into a display output queue, so that the GPU obtains the file descriptor fd from the display output queue and performs rendering output to avoid frame tearing caused by simultaneous occurrence of partial frames of adjacent frames on a screen, and a video coding and decoding unit VPU in the GPU only fills decoded data into a DMABUF buffer corresponding to the unlocked file descriptor fd; and after the GPU finishes using the file descriptor fd, the open multimedia acceleration layer OMX is informed to release the used file descriptor fd, so that the file descriptor fd is used by a video coding and decoding unit VPU in the GPU again, and the display output queue manages the file descriptor fd in a first-in first-out (FIFO) mode.
2. The VPU video decoding output method for the Feiteng graphics card according to claim 1, wherein the step 1) comprises: communicating with an X server through an X display interface to obtain a display device and obtain the current Feiteng display card display device; and calling an interface to complete the link with the server side of the Feiteng display card display equipment, acquiring the Feiteng display card display equipment, and creating a buffer management equipment GBM for the Feiteng display card display equipment.
3. The VPU video decoding output method for a FT graphics card according to claim 2, wherein creating a plurality of DMABUF buffers based on the buffer management device GBM in step 2) further comprises determining the number of buffers in the DMABUF buffers and the size of each buffer.
4. The VPU video decoding output method for the Feiteng graphics card according to claim 3, wherein the step 3) comprises: calling a file descriptor fd import function interface of an open multimedia acceleration layer OMX to transfer a file descriptor fd of a DMABUF buffer, wherein the file descriptor fd of the DMABUF buffer is stored in a DMABUF buffer pointer variable dmaabuf _ ptr of a video decoding context structure of a player, so that the open multimedia acceleration layer OMX can access the DMABUF buffer to enable a video coding and decoding unit VPU in the GPU to directly use a video memory of the GPU.
5. The VPU video decoding output method for the Feiteng graphics card according to claim 4, wherein the step 4) of enabling the GPU to obtain the file descriptor fd from the display output queue and perform rendering output comprises the following steps: and for each frame obtained by VPU decoding, assigning the decoded data corresponding to the decoded data in the DMABUF buffer area to a file descriptor fd in a display output queue so that the player can obtain the decoded data of each frame, and then calling an OpenGL/ES interface by the player to convert the decoded data into the texture required by display and perform display output.
6. The VPU video decoding output method for the Feiteng graphics card of claim 5, wherein the invoking an OpenGL/ES interface to convert the decoded data into a texture required for display and perform rendering output comprises: and converting the decoded data into an image, converting the image into a texture map, and finally converting the texture map into the frame buffer content of the Feiteng display card and displaying and outputting the frame buffer content.
7. The VPU video decoding output method for the Feiteng graphics card of claim 6, wherein the converting the decoded data into the image is converting the decoded data into the image using a CreateImageKHR interface, and the converting the image into the texture map is converting the image into the texture map using an EGLImageTargetTexture2DOES interface.
8. The VPU video decoding output method for the Feiteng graphics card according to claim 7, wherein step 4) is followed by a step of destroying the corresponding resource after completing the VPU video decoding output of the video coding and decoding unit, and the destroying the corresponding resource comprises: destroying the DMABUF buffer area, canceling the mapping from the image to the texture mapping, emptying a buffer queue for managing the DMABUF buffer area and buffer resources corresponding to the file descriptor fd, and closing the buffer management equipment GBM.
9. A VPU video decoding output system for a FT graphic card, comprising a microprocessor and a memory which are connected with each other, wherein the microprocessor is further connected with the FT graphic card, and the microprocessor is programmed or configured to execute the steps of the VPU video decoding output method for the FT graphic card according to any one of claims 1 to 8.
10. A computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, and the computer program is used for being executed by a computer device to implement the steps of the VPU video decoding output method for the fijim video card according to any one of claims 1 to 8.
CN202210449772.8A 2022-04-24 2022-04-24 VPU video decoding output method and system for Feiteng display card Active CN114567784B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210449772.8A CN114567784B (en) 2022-04-24 2022-04-24 VPU video decoding output method and system for Feiteng display card

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210449772.8A CN114567784B (en) 2022-04-24 2022-04-24 VPU video decoding output method and system for Feiteng display card

Publications (2)

Publication Number Publication Date
CN114567784A CN114567784A (en) 2022-05-31
CN114567784B true CN114567784B (en) 2022-08-16

Family

ID=81720779

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210449772.8A Active CN114567784B (en) 2022-04-24 2022-04-24 VPU video decoding output method and system for Feiteng display card

Country Status (1)

Country Link
CN (1) CN114567784B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115941967A (en) * 2023-03-13 2023-04-07 南京感动科技有限公司 Video coding and decoding acceleration method based on full code stream
CN117593172B (en) * 2024-01-16 2024-04-23 北京趋动智能科技有限公司 Process management method, device, medium and equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101441271A (en) * 2008-12-05 2009-05-27 航天恒星科技有限公司 SAR real time imaging processing device based on GPU
CN103984529A (en) * 2014-05-15 2014-08-13 中国人民解放军国防科学技术大学 X graphics system parallel acceleration method based on FT processor
CN108206937A (en) * 2016-12-20 2018-06-26 浙江宇视科技有限公司 A kind of method and apparatus for promoting intellectual analysis performance
CN108549548A (en) * 2018-03-30 2018-09-18 天津麒麟信息技术有限公司 A kind of implementation method, device, equipment and storage medium shown in advance based on the platform AMD video card systems LOGO that soars
CN114095778A (en) * 2020-08-25 2022-02-25 海信视像科技股份有限公司 Audio hard decoding method of application-level player and display equipment

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018119712A1 (en) * 2016-12-27 2018-07-05 深圳前海达闼云端智能科技有限公司 Video display method, device, electronic apparatus, and computer program product
US11132326B1 (en) * 2020-03-11 2021-09-28 Nvidia Corporation Techniques to transfer data among hardware devices
CN112988103B (en) * 2021-05-13 2021-08-20 统信软件技术有限公司 Data display method and computing device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101441271A (en) * 2008-12-05 2009-05-27 航天恒星科技有限公司 SAR real time imaging processing device based on GPU
CN103984529A (en) * 2014-05-15 2014-08-13 中国人民解放军国防科学技术大学 X graphics system parallel acceleration method based on FT processor
CN108206937A (en) * 2016-12-20 2018-06-26 浙江宇视科技有限公司 A kind of method and apparatus for promoting intellectual analysis performance
CN108549548A (en) * 2018-03-30 2018-09-18 天津麒麟信息技术有限公司 A kind of implementation method, device, equipment and storage medium shown in advance based on the platform AMD video card systems LOGO that soars
CN114095778A (en) * 2020-08-25 2022-02-25 海信视像科技股份有限公司 Audio hard decoding method of application-level player and display equipment

Also Published As

Publication number Publication date
CN114567784A (en) 2022-05-31

Similar Documents

Publication Publication Date Title
CN114567784B (en) VPU video decoding output method and system for Feiteng display card
CN108206937B (en) Method and device for improving intelligent analysis performance
EP3264370B1 (en) Media content rendering method, user equipment, and system
US7916956B1 (en) Methods and apparatus for encoding a shared drawing memory
TWI451355B (en) Multi-shader system and processing method thereof
US7076735B2 (en) System and method for network transmission of graphical data through a distributed application
WO2022048097A1 (en) Single-frame picture real-time rendering method based on multiple graphics cards
US20110141133A1 (en) Real-Time Compression With GPU/CPU
CN105917382B (en) Method and system for interactive graphics streaming
KR19990006296A (en) Method and device for MPEG image decompression
CN103631634A (en) Graphics processor virtualization achieving method and device
WO2017107911A1 (en) Method and device for playing video with cloud video platform
CN108881916A (en) The video optimized processing method and processing device of remote desktop
KR20080070849A (en) Multi-user terminal services accelerator
US9235452B2 (en) Graphics remoting using augmentation data
WO2021057097A1 (en) Image rendering and encoding method, and related apparatus
WO2008118065A1 (en) Graphics rendering system
JP2005045357A (en) Remote display protocol, video display system, and terminal
CN108762934B (en) Remote graphic transmission system and method and cloud server
CN113515396A (en) Graph rendering method and device, electronic equipment and storage medium
CN114968152B (en) Method for reducing VIRTIO-GPU extra performance loss
WO2023040825A1 (en) Media information transmission method, computing device and storage medium
WO2023011033A1 (en) Image processing method and apparatus, computer device and storage medium
US20120218292A1 (en) System and method for multistage optimized jpeg output
CN114257867A (en) Video image display method and apparatus, computing device and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant