Method and device for copying GPU video memory textures to system memories and electronic equipment

A system memory and texture technology, applied in the computer field, can solve problems such as reduced video frames, unsmooth, idle time, etc., to achieve the effect of improving fluency and efficiency

Active Publication Date: 2018-09-07
WUHAN DOUYU NETWORK TECH CO LTD
View PDF4 Cites 8 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, since it takes time to copy the image data stored in the GPU memory texture to a CPU texture stored in the system memory, the process is not completed instantly. Therefore, when the corresponding function function is called, it does not mean that The image data stored on the GPU memory texture has been completely copied to the CPU texture in the system memory. If the corresponding function function (the function used to realize the copy function) is called after completion, another function function will be called immediately to copy it to the system memory. If the texture is mapped to a specific memory address, the system CPU will wait until the image data stored in the GPU memory texture has been completely copied to the CPU texture in the system memory, and then the address mapping operation will be executed. Synchronous events, obviously, the CPU is not fully utilized, there is idle time
Therefore, the execution efficiency of the current thread is seriously affected, which in turn reduces the number of times that image frames can be copied within one second, which in turn reduces the number of encoded video frames within one second, and finally causes the entire live video stream to be stuck and not smooth.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and device for copying GPU video memory textures to system memories and electronic equipment
  • Method and device for copying GPU video memory textures to system memories and electronic equipment
  • Method and device for copying GPU video memory textures to system memories and electronic equipment

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0046] figure 1 It is a schematic flowchart of a method for copying GPU memory textures to system memory provided by Embodiment 1 of the present invention. The method for copying GPU memory textures to system memory in this embodiment can be performed by a device for copying GPU memory textures to system memory, wherein the device can be implemented by software and / or hardware, and is generally integrated in a computer. For details, see figure 1 As shown, the method may include the following steps:

[0047] 110. Copy the image data frames stored in the GPU video memory texture to different target textures stored in the system memory in sequence.

[0048] Specifically, for example, in DirectX11's Direct3D11, the image data frames stored in the GPU memory texture can be sequentially copied to different target textures stored in the system memory by calling the CopyResource function function of the ID3D11DeviceContext interface. A frame of image data stored in the GPU memory t...

Embodiment 2

[0081] image 3 A schematic structural diagram of a device for copying GPU memory textures to system memory provided in Embodiment 2 of the present invention; see image 3 As shown, the device includes: a copy module 310 and a mapping module 320 .

[0082]Wherein, the copy module 310 is used to copy the image data frames stored in the GPU video memory texture to different target textures stored in the system memory in sequence; the mapping module 320 is used to copy at least one frame of image data based on The sequential relationship of copying time performs address mapping on the image data frames copied to the different target textures stored in the system memory in sequence.

[0083] Optionally, copy module 310, including:

[0084] The first copy unit is used to judge whether the frame index identification number can be divisible by 2, if so, copy a frame of image data corresponding to the frame index identification number stored in the GPU video memory texture to the fi...

Embodiment 3

[0097] Figure 4 It is a schematic structural diagram of an electronic device provided by Embodiment 5 of the present invention. Such as Figure 4 As shown, the electronic device includes: a first processor 670, a first memory 671, and a computer program stored on the first memory 671 and operable on the first processor 670; wherein, the number of the first processors 670 can be is one or more, Figure 4 A first processor 670 is used as an example; when the first processor 670 executes the computer program, the method for copying the GPU texture to the system memory as described in the first embodiment above is implemented. Such as Figure 4 As shown, the electronic device may further include a first input device 672 and a first output device 673 . The first processor 670, the first memory 671, the first input device 672 and the first output device 673 may be connected via a bus or in other ways, Figure 4 Take connection via bus as an example.

[0098] As a computer-rea...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

Embodiments of the invention disclose a method and device for copying GPU video memory textures to system memories and electronic equipment. The method comprises the following steps of: copying imagedata stored in a GPU video memory texture into different target textures stored in a system memory in sequence; and when the copy of at least one frame of image data is completed, carrying out addressmapping on image data frames copied into the different target textures stored in the system memory in sequence on the basis of an order relationship of the copy times. By adoption of the method, theefficiency of copying image resources stored in GPU video memory textures to system memories can be improved, so that the video encoding frame rate and video live streaming fluency are improved.

Description

technical field [0001] The embodiments of the present invention relate to the field of computers, and in particular to a method, device and electronic equipment for copying GPU memory textures to system memory. Background technique [0002] In the process of applying a graphics software interface (such as DirectX11), in some application scenarios, it is usually necessary to copy the image data in the graphics memory texture of the GPU (Graphics Processing Unit, graphics processing unit) to the system memory for use. For example, in a live broadcast tool, after the drawing of all video source images is completed, the pixel value of the corresponding frame image needs to be obtained from the video memory texture, so as to perform video encoding on the image. [0003] In the traditional solution, after the image of the current frame is drawn on the target texture, the relevant method is called to copy the image pixels of the current frame from the GPU memory texture to the syst...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/50G06F12/06
CPCG06F9/5016G06F12/063
Inventor 杨亮张文明陈少杰
Owner WUHAN DOUYU NETWORK TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products