CN114359020A - Image processing method, image processing device, storage medium and electronic equipment - Google Patents

Image processing method, image processing device, storage medium and electronic equipment Download PDF

Info

Publication number
CN114359020A
CN114359020A CN202111654785.0A CN202111654785A CN114359020A CN 114359020 A CN114359020 A CN 114359020A CN 202111654785 A CN202111654785 A CN 202111654785A CN 114359020 A CN114359020 A CN 114359020A
Authority
CN
China
Prior art keywords
desktop image
target thread
gpu
desktop
new
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.)
Pending
Application number
CN202111654785.0A
Other languages
Chinese (zh)
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.)
Shanghai Jingxiang Microelectronics Co ltd
Original Assignee
Shanghai Jingxiang Microelectronics 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 Shanghai Jingxiang Microelectronics Co ltd filed Critical Shanghai Jingxiang Microelectronics Co ltd
Priority to CN202111654785.0A priority Critical patent/CN114359020A/en
Publication of CN114359020A publication Critical patent/CN114359020A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The disclosure provides an image processing method, an image processing device, a storage medium and electronic equipment, relates to the field of image processing, and can solve the problem that when a desktop image of one screen is synchronously collected and desktop images of other screens are coded in a GPU, a picture is blocked. The specific technical scheme is as follows: when at least two threads in the N threads to be executed request to write operation on a GPU (graphics processing unit), adding a mutual exclusion lock to the GPU, wherein N is an integer greater than or equal to 2; if the target thread robs the mutual exclusion lock, executing the target thread, wherein the target thread is any one of the at least two threads; and releasing the mutual exclusion lock after the target thread is executed.

Description

Image processing method, image processing device, storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of image processing, and in particular, to an image processing method and apparatus, a storage medium, and an electronic device.
Background
With the wider application of the cloud desktop, the cloud desktop or the cloud game appears in a scene with two screens or even multiple screens, that is, a cloud desktop image of one main screen and one or more extended screens of the source end or a game picture running on the cloud desktop is remotely displayed on the receiving end. When the source end has two or more cloud desktop images for remote display, the source end collects the desktop images of each screen in the GPU respectively and then encodes the desktop images. In the prior art, when a desktop image of one screen is synchronously acquired and desktop images of other screens are coded in a Graphics Processing Unit (GPU), the acquisition of the desktop image of one screen and the coding of the desktop images of other screens are both write operations on the GPU, and meanwhile, when the two write operations on the GPU are performed, the acquisition of the desktop image of one screen and the coding of the desktop images of other screens, there is a conflict of uncertain time, which causes a phenomenon of screen blocking when the desktop image of a source end is displayed on a receiving end.
Disclosure of Invention
The embodiment of the disclosure provides an image processing method and device, a storage medium and an electronic device, which can solve the problem in the prior art that a picture is jammed when a desktop image of a source end is displayed on a receiving end due to the conflict of uncertain time when a desktop image of one screen is synchronously acquired in a GPU and desktop images of other screens are coded. The technical scheme is as follows:
according to a first aspect of embodiments of the present disclosure, there is provided an image processing method, including:
when at least two threads in the N threads to be executed request to write operation on a GPU (graphics processing unit), adding a mutual exclusion lock to the GPU, wherein N is an integer greater than or equal to 2;
if the target thread robs the mutual exclusion lock, executing the target thread, wherein the target thread is any one of the at least two threads;
and releasing the mutual exclusion lock after the target thread is executed.
According to the image processing method provided by the embodiment of the disclosure, when at least two threads in N threads to be executed request to write on a GPU (graphics processing unit), a mutual exclusion lock is added on the GPU, wherein N is an integer greater than or equal to 2; if the target thread robs the mutual exclusion lock, executing the target thread, wherein the target thread is any one of the at least two threads; after the target thread is executed, the mutual exclusion lock is released, the phenomenon that the picture is blocked when the receiving end displays the desktop image of the source end due to the conflict of uncertain time when the desktop image of one screen is synchronously collected and the desktop image of the other screen is coded in the GPU is avoided, and the user experience is improved.
In one embodiment, the writing to the GPU includes capturing and/or encoding a desktop image displayed on a screen.
In one embodiment, if the target thread requests to capture a desktop image displayed on a target screen, the executing the target thread includes: creating a rapid three-dimensional device D3 Ddevice;
obtaining a rapid three-dimensional replication D3 Dcopy interface according to the D3 Ddevice;
and acquiring the desktop image through the D3D duplicate interface.
In one embodiment, if the target thread requests encoding of a desktop image displayed on a target screen, the executing the target thread includes:
storing the acquired desktop image into a first buffer;
converting the desktop image format in the first buffer and copying the desktop image format to a second buffer;
mapping the desktop image from the second buffer to a hardcore encoding region;
and coding the desktop image in the hardcore coding area to generate a picture displayed on a coded target screen.
In one embodiment, the method further comprises:
and if the D3D duplicate interface does not acquire the new desktop image within a preset time, determining that the desktop image is overtime in acquisition.
In one embodiment, the method further comprises:
if the desktop image is switched, resetting the D3D duplicate object, and generating a new D3D duplicate interface;
and acquiring the desktop image through the new D3D duplicate interface.
In one embodiment, the method further comprises:
if the resolution of the desktop image changes, a new D3Ddevice is created;
obtaining a new D3D duplicate interface according to the new D3D device;
and acquiring a new desktop image through the new D3D duplicate interface, wherein the new desktop image is the desktop image with the changed resolution.
According to a second aspect of the embodiments of the present disclosure, there is provided an image processing apparatus including:
the GPU adds the exclusive lock module, is used for when at least two threads in N waiting to carry out the thread request to carry on the write operation to the GPU of the figure processor, add the exclusive lock to the said GPU, N is an integer greater than or equal to 2;
the target thread executing module is used for executing the target thread if the target thread robs the mutex, wherein the target thread is any one of the at least two threads;
and the mutual exclusive lock releasing module is used for releasing the mutual exclusive lock after the target thread is executed.
In one embodiment, the writing to the GPU includes capturing and/or encoding a desktop image displayed on a screen.
In one embodiment, if the target thread requests to capture a desktop image displayed on a target screen, the executing the target thread includes:
creating D3Ddevice and D3 Dcontext;
obtaining a D3 Dduplification interface according to the D3Ddevice and the D3D11 context;
and acquiring the desktop image through the D3D duplicate interface.
In one embodiment, if the target thread requests encoding of a desktop image displayed on a target screen, the target thread execution module is configured to:
storing the acquired desktop image into a first buffer;
converting the desktop image format in the first buffer and copying the desktop image format to a second buffer;
mapping the desktop image from the second buffer to a hardcore encoding region;
and coding the desktop image in the hardcore coding area to generate a picture displayed on a coded target screen.
In one embodiment, the apparatus further comprises: an acquisition timeout determining module to:
and if the D3D duplicate interface does not acquire the new desktop image within a preset time, determining that the desktop image is overtime in acquisition.
In one embodiment, the apparatus further comprises: a D3D duplicate reset module to:
if the desktop image is switched, resetting the D3D duplicate object, and generating a new D3D duplicate interface;
and acquiring the desktop image through the new D3D duplicate interface.
In one embodiment, the apparatus further comprises: a desktop image acquisition module to:
if the resolution of the desktop image changes, a new D3Ddevice is created;
obtaining a new D3D duplicate interface according to the new D3D device;
and acquiring a new desktop image through the new D3D duplicate interface, wherein the new desktop image is the desktop image with the changed resolution.
According to a third aspect of embodiments of the present disclosure, there is provided an electronic device, comprising a processor and a memory, wherein at least one computer instruction is stored in the memory, and the instruction is loaded and executed by the processor to implement the steps performed in the image processing method according to any one of the first aspect.
According to a fourth aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium having stored therein at least one computer instruction, which is loaded and executed by a processor to implement the steps performed in the image processing method according to any one of the first aspect.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a flowchart of an image processing method provided by an embodiment of the present disclosure;
fig. 2 is a schematic diagram of a logical layer structure of an image processing apparatus according to an embodiment of the present disclosure;
fig. 3 is a mileage graph two of an image processing method provided by the embodiment of the present disclosure;
fig. 4 is a first structural diagram of an image processing apparatus according to an embodiment of the disclosure;
fig. 5 is a second structural diagram of an image processing apparatus according to an embodiment of the present disclosure;
fig. 6 is a block diagram of an electronic device provided in an embodiment of the present disclosure.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
Fig. 1 is a first flowchart of an image processing method according to an embodiment of the present disclosure. As shown in fig. 1, the method includes:
s101, when at least two threads in the N threads to be executed request to write operation on a GPU, a mutual exclusion lock is added to the GPU, wherein N is an integer larger than or equal to 2.
Illustratively, in this embodiment, writing to the GPU includes capturing and/or encoding desktop images displayed on the screen. When at least two threads of the N threads to be executed request to write on the GPU, two situations of writing operation on the GPU can occur, wherein one thread requests to collect the desktop image of the screen and the other threads request to encode the desktop image of the screen, and the two writing operations on the GPU have conflict of uncertain time, so that the phenomenon of picture deadlocking can occur when the desktop image of a source end is displayed on a receiving end.
S102, if the target thread preempts the mutual exclusion lock, executing the target thread, wherein the target thread is any one of the at least two threads.
The following describes how to execute a target thread when the target thread requests to capture a desktop image displayed on a target screen.
Creating a fast three-dimensional (D3 dimension, D3D) device (device); obtaining a D3D replication (replication) interface according to the D3 Ddevice; and acquiring the desktop image through the D3D duplicate interface.
Illustratively, if the operating system of the source terminal is a Windows operating system, a fast screen capture (DXGI) technique is used to capture the desktop image. Specifically, a D3D11device and a D3D11context (context) are created, and a D3D duration is obtained through the D3D11device and the D3D11 context; and calling a Next Frame (acquisition Next Frame) acquiring function through the D3D duplicate interface to Acquire the desktop image. In this embodiment, the acquisition of the desktop image is realized by calling an Acquire Next Frame function to copy the desktop image of the GPU rendering area through the D3D duplicate interface.
In this embodiment, since the GPU has strong computing power, and the coding speed of the GPU is faster than that of a Central Processing Unit (CPU), that is, the coding frame rate of the GPU per second is higher than that of the CPU, in order to make the picture of the cloud game more smooth and appropriate, the collected desktop image, that is, the game picture, is coded in the GPU, that is, the game picture is coded by the hardcore coding region of the GPU.
The following describes how a target thread is executed when the target thread requests encoding of a desktop image displayed on a target screen.
Storing the acquired desktop image into a first buffer; converting the desktop image format in the first buffer and copying the desktop image format to a second buffer; then mapping the desktop image from the second buffer to a hardcore encoding region; and coding the desktop image in the hardcore coding area to generate a coded desktop image.
Exemplarily, in this embodiment, if the operating system of the source end is a Windows operating system, the acquired desktop image is stored in the first fast three-dimensional feature buffer D3D11Texture2D buffer; converting the data format of the desktop image in the first D3D11Texture2D buffer from red-green-blue-opaque (RGBA) to YUV420 and copying to a new second D3D11Texture2D buffer; mapping the desktop image from the second buffer to a hardcore encoding region; and calling preset coding parameters in the hardcore coding area to code the desktop image and generate a code stream of H265/H264, namely the coded desktop image.
Since the copying of the desktop image of the GPU rendering area and the mapping of the desktop image from the second buffer to the hard core coding area for encoding are both operations performed on the GPU, and the two operations performed on the GPU at the same time cause time conflicts, so that the GPU cannot normally operate, when the target thread robs the mutual exclusion lock, the target thread is executed, and further, the time conflicts caused by the simultaneous writing operations on the GPU when the at least two threads are executed are avoided.
In this embodiment, all functions related to write operations to the GPU may be listed in advance, and each function has its corresponding function information. And further detecting function information corresponding to the current operation, and if the function information corresponding to the current operation is the function information of the function corresponding to the writing operation of the GPU, determining that the current operation is the writing operation of the GPU. Specifically, when the N threads to be executed are executed, it is determined that at least two threads of the N threads to be executed request to perform write operation on the GPU according to the function information of each thread of the N threads to be executed, and then when the target thread robs the mutex lock, the target thread is executed, where the target thread is any one of the at least two threads. It should be noted here that each of the at least two threads respectively requests to capture or encode a desktop image displayed on each of the at least 2 screens, and the function of capturing or encoding the desktop image is a function of writing to the GPU.
S103, after the target thread is executed, releasing the mutual exclusion lock.
Illustratively, the method further comprises:
and if the D3D duplicate interface does not acquire the new desktop image within a preset time, determining that the desktop image is overtime in acquisition.
Illustratively, the method further comprises:
if the desktop image is switched, resetting the D3D duplicate object, and generating a new D3D duplicate interface;
and calling an Acquire Next Frame function through a new D3D duplicate interface to Acquire the desktop image.
Illustratively, the method further comprises:
if the resolution of the desktop image changes, a new D3Ddevice is created;
obtaining a new D3D duplicate interface according to the new D3D device;
and calling an Acquire Next Frame function through the new D3D duplicate interface to Acquire a new desktop image, wherein the new desktop image is the desktop image with the changed resolution.
Further, after a new desktop image is acquired by calling an Acquire Next Frame function through the new D3D duplicate interface, an indication message that the resolution of the desktop image changes may be sent to the receiving end, where the indication message includes the changed resolution.
According to the image processing method provided by the embodiment of the disclosure, when at least two threads in N threads to be executed request to write on a GPU (graphics processing unit), a mutual exclusion lock is added on the GPU, wherein N is an integer greater than or equal to 2; if the target thread robs the mutual exclusion lock, executing the target thread, wherein the target thread is any one of the at least two threads; after the target thread is executed, the mutual exclusion lock is released, the phenomenon that the picture is blocked when the receiving end displays the desktop image of the source end due to the conflict of uncertain time when the desktop image of one screen is synchronously collected and the desktop image of the other screen is coded in the GPU is avoided, and the user experience is improved.
The following describes the image processing method provided by the embodiment of the present disclosure in further detail with reference to the embodiments of fig. 2 and 3. Fig. 2 is a schematic diagram of a logical layer structure of an image processing apparatus according to an embodiment of the present disclosure. As shown in fig. 2, the image processing apparatus includes: the system comprises a scheduling master control module, an acquisition module 1, an acquisition module 2, a yuv420 coding module 1 and a yuv420 coding module 2. Fig. 3 is a flowchart ii of an image processing method according to an embodiment of the present disclosure. The process of image processing by the image processing apparatus shown in fig. 2 is shown in fig. 3:
s301: and creating a master control console for starting the process (starting the acquisition module and the default coding module), stopping the process, resetting the process and the like.
S302: an initialization acquisition module: and creating a D3D11device and a D3D11context by using the DXGI technology, and obtaining D3 Dduplex for acquiring the desktop through the D3D11device and the D3D11 context.
S303: an initialization coding module:
yuv420 encoding module, which is hard-coded, i.e. encoded at the GPU.
Because the GPU has strong computing power, the GPU coding speed is higher than the CPU coding speed, the frame rate of coding in each second is higher than that of the CPU coding, and therefore the cloud game scene is suitable for hardcore GPU coding.
S304: and starting an acquisition flow, calling an AcquireNextFrame through a D3D11 duplicate interface to acquire a desktop image, and processing the conditions of acquisition timeout, desktop switching (full-screen game, screen locking and the like), resolution modification, frame rate modification and the like.
1) And (3) collecting overtime processing: and calling the acquisition interface again.
AcquireNextFrame has a built-in timeout, and if a new picture (changed) is not acquired within the set timeout, the acquisition is returned to the timeout.
2) Desktop switching processing: the desktop needs to be switched to the current desktop, the duplicate object is reset, and the new duplicate object is used for calling and collecting.
3) Resolution modification processing: the whole process needs to be reset, and the D3D11Device, D3D11Context, D3D11 duplicate, and all encoders are created again, and the acquisition process is restarted.
4) Frame rate modification processing: this case operates with the same resolution modification, but when modified, the resolution is unchanged and a different frame rate is selected, but the processing case does not need to reset all the flows.
S305: and starting a corresponding scene coding process.
Storing the collected image into a D3D11Texture2D Buffer, converting RGBA into yuv420, copying resources to a new D3D11Texture2D Buffer, mapping the Buffer map to a hardcore coding area, compiling into an H264/H265 code stream by calling the set encoder parameters, and transmitting.
Note that: because the invention solves the problem that the dual-screen (multi-screen) synchronous acquisition code is blocked when the scene is switched, the logic of the decoding end and other modules after transmission is not described in detail.
S306: the deadlock problem occurs when D3D has a write (no read) operation on the GPU and the encoder also has a write operation on the GPU, in which case the deadlock occurs, which causes the flow to be unable to proceed, and the display at the receiving end is that the frame is blocked in one frame. The reasons for this conflict are: D3D needs to collect and copy the picture (desktop image) rendered to the GPU, the encoder needs to copy (convert the collected image into YUV420) to the designated hard core coding region for H264/H265 code stream compression, and the two operations on the GPU generate conflict, so that the process cannot be continued.
When the single screen collects the code, the situation can not happen, and the single thread (linear sequential operation) performs coding (H265/H264) after the D3D picture collection is executed, but when the double screens (multiple screens) run synchronously, the probability occurs, one screen collects the code, and the phenomenon of blocking occurs when other screens are coding.
The solution is as follows: before all the operations (such as AcquireNextFrame (), CopyResource ()) written into the GPU by the D3D and before the operations (such as map, copy and the like) written into the GPU by the encoder, mutex is locked by mutual exclusion, although some performance is lost, the problem that the codes cannot be acquired simultaneously by double screens (multiple screens) is solved. The specific implementation mode is as follows: firstly, detecting whether a function corresponding to current operation is a target function for writing in the GPU (each function has a function description corresponding to the function, all functions related to GPU writing actions can be listed in advance, and then judging whether the function is the function for writing in the GPU according to function information when the operation comes in); when the flow executes the target function, the lock is required to be preempted, the flow which preempts the lock can be continuously executed, the lock is released after the execution is finished, and the flow which does not preempt the lock needs to be executed after other flows release the lock.
Compared with the prior art, the embodiment provided by the disclosure solves the problem that the prior art cannot support the zooming-out of the double-screen (multi-screen) picture, and solves the problem that a user with a requirement on double-screen (multi-screen) is also satisfied.
Based on the image processing method described in the embodiment corresponding to fig. 1, the following is an embodiment of the apparatus of the present disclosure, which can be used to execute an embodiment of the method of the present disclosure.
Fig. 4 is a block diagram of image processing provided by an embodiment of the present disclosure. As shown in fig. 4, the apparatus 40 includes:
a GPU add mutex lock module 401, configured to add a mutex lock to a GPU when at least two threads of N threads to be executed request to perform a write operation on the GPU, where N is an integer greater than or equal to 2;
a target thread executing module 402, configured to execute a target thread if the target thread preempts the mutex, where the target thread is any one of the at least two threads;
a mutex lock releasing module 403, configured to release the mutex lock after the target thread is executed.
In one embodiment, the writing to the GPU includes capturing and/or encoding a desktop image displayed on a screen.
In one embodiment, if the target thread requests to capture a desktop image displayed on a target screen, the target thread execution module 402 is configured to:
creating D3Ddevice and D3 Dcontext;
obtaining a D3 Dduplification interface according to the D3Ddevice and the D3D11 context;
and acquiring the desktop image through the D3D duplicate interface.
In one embodiment, if the target thread requests to encode a desktop image displayed on a target screen, the target thread execution module 402 is configured to:
storing the acquired desktop image into a first buffer;
converting the desktop image format in the first buffer and copying the desktop image format to a second buffer;
mapping the desktop image from the second buffer to a hardcore encoding region;
and coding the desktop image in the hardcore coding area to generate a picture displayed on a coded target screen.
In one embodiment, as illustrated in fig. 5, the apparatus 40 further comprises: an acquisition timeout determining module 404 configured to:
and if the D3D duplicate interface does not acquire the new desktop image within a preset time, determining that the desktop image is overtime in acquisition.
In one embodiment, the apparatus 40 further comprises: D3D duplicate reset module 405 to:
if the desktop image is switched, resetting the D3D duplicate object, and generating a new D3D duplicate interface;
and acquiring the desktop image through the new D3D duplicate interface.
In one embodiment, the apparatus 40 further comprises: a desktop image acquisition module 406 to:
if the resolution of the desktop image changes, a new D3Ddevice is created;
obtaining a new D3D duplicate interface according to the new D3D device;
and acquiring a new desktop image through the new D3D duplicate interface, wherein the new desktop image is the desktop image with the changed resolution.
The image processing apparatus provided in the embodiment of the present disclosure may refer to the embodiment of fig. 1, and details thereof are not repeated herein.
Fig. 6 is a block diagram of an electronic device according to an embodiment of the present disclosure. As shown in fig. 6, the electronic device 60 includes:
a processor 601 and a memory 602, wherein the memory 602 stores at least one computer instruction, and the instruction is loaded and executed by the processor 601 to implement the image processing method described in the above method embodiment.
Based on the image processing method described in the embodiment corresponding to fig. 1, an embodiment of the present disclosure further provides a computer-readable storage medium, for example, the non-transitory computer-readable storage medium may be a Read Only Memory (ROM), a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like. The storage medium stores computer instructions for executing the image processing method described in the embodiment corresponding to fig. 1, which is not described herein again.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

Claims (10)

1. An image processing method, comprising:
when at least two threads in the N threads to be executed request to write operation on a GPU (graphics processing unit), adding a mutual exclusion lock to the GPU, wherein N is an integer greater than or equal to 2;
if the target thread robs the mutual exclusion lock, executing the target thread, wherein the target thread is any one of the at least two threads;
and releasing the mutual exclusion lock after the target thread is executed.
2. The method of claim 1, wherein writing to the GPU comprises capturing and/or encoding desktop images displayed on a screen.
3. The method of claim 2, wherein if the target thread requests collection of a desktop image displayed on a target screen, the executing the target thread comprises:
creating a rapid three-dimensional device D3 Ddevice;
obtaining a rapid three-dimensional replication D3 Dcopy interface according to the D3 Ddevice;
and acquiring the desktop image through the D3D duplicate interface.
4. The method of claim 2, wherein if the target thread requests encoding of a desktop image displayed on a target screen, the executing the target thread comprises:
storing the acquired desktop image into a first buffer;
converting the desktop image format in the first buffer and copying the desktop image format to a second buffer;
mapping the desktop image from the second buffer to a hardcore encoding region;
and coding the desktop image in the hardcore coding area to generate a picture displayed on a coded target screen.
5. The method of claim 3, further comprising:
and if the D3D duplicate interface does not acquire the new desktop image within a preset time, determining that the desktop image is overtime in acquisition.
6. The method of claim 3, further comprising:
if the desktop image is switched, resetting the D3D duplicate object, and generating a new D3D duplicate interface;
and acquiring the desktop image through the new D3D duplicate interface.
7. The method of claim 3, further comprising:
if the resolution of the desktop image changes, a new D3Ddevice is created;
obtaining a new D3D duplicate interface according to the new D3D device;
and acquiring a new desktop image through the new D3D duplicate interface, wherein the new desktop image is the desktop image with the changed resolution.
8. An image processing apparatus characterized by comprising:
the GPU adds the exclusive lock module, is used for when at least two threads in N waiting to carry out the thread request to carry on the write operation to the GPU of the figure processor, add the exclusive lock to the said GPU, N is an integer greater than or equal to 2;
the target thread executing module is used for executing the target thread if the target thread robs the mutex, wherein the target thread is any one of the at least two threads;
and the mutual exclusive lock releasing module is used for releasing the mutual exclusive lock after the target thread is executed.
9. An electronic device, comprising a processor and a memory, wherein at least one computer instruction is stored in the memory, and wherein the instruction is loaded and executed by the processor to implement the steps performed in the image processing method according to any one of claims 1 to 7.
10. A computer-readable storage medium having stored thereon at least one computer instruction, which is loaded and executed by a processor to implement the steps performed in the image processing method of any one of claims 1 to 7.
CN202111654785.0A 2021-12-30 2021-12-30 Image processing method, image processing device, storage medium and electronic equipment Pending CN114359020A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111654785.0A CN114359020A (en) 2021-12-30 2021-12-30 Image processing method, image processing device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111654785.0A CN114359020A (en) 2021-12-30 2021-12-30 Image processing method, image processing device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN114359020A true CN114359020A (en) 2022-04-15

Family

ID=81102449

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111654785.0A Pending CN114359020A (en) 2021-12-30 2021-12-30 Image processing method, image processing device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN114359020A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116934572A (en) * 2023-09-18 2023-10-24 荣耀终端有限公司 Image processing method and apparatus

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116934572A (en) * 2023-09-18 2023-10-24 荣耀终端有限公司 Image processing method and apparatus
CN116934572B (en) * 2023-09-18 2024-03-01 荣耀终端有限公司 Image processing method and apparatus

Similar Documents

Publication Publication Date Title
JP7191240B2 (en) Video stream decoding method, device, terminal equipment and program
CN113457160B (en) Data processing method, device, electronic equipment and computer readable storage medium
CN102447901B (en) Adaptive grid generation for improved caching and image classification
CN111432262B (en) Page video rendering method and device
CN108650460B (en) Server, panoramic video storage and transmission method and computer storage medium
CN109640180B (en) Method, device, equipment, terminal, server and storage medium for 3D display of video
CN111026493B (en) Interface rendering processing method and device
CN111669577A (en) Hardware decoding detection method and device, electronic equipment and storage medium
KR20060108741A (en) Visual and graphical data processing using a multi-threaded architecture
CN113032080A (en) Page implementation method, application program, electronic device and storage medium
CN112843676A (en) Data processing method, device, terminal, server and storage medium
CN114359020A (en) Image processing method, image processing device, storage medium and electronic equipment
CN112422868A (en) Data processing method, terminal device and server
US10237563B2 (en) System and method for controlling video encoding using content information
CN113473226B (en) Method and device for improving video rendering efficiency, computer equipment and storage medium
CN115955590A (en) Video processing method, video processing device, computer equipment and medium
CN114339412A (en) Video quality enhancement method, mobile terminal, storage medium and device
CN116546228A (en) Plug flow method, device, equipment and storage medium for virtual scene
CN116302549A (en) Hardware resource acquisition method, device, equipment and medium of AI video accelerator
CN116880937A (en) Desktop screen capturing data processing method, device, equipment and medium for interactive classroom
CN114237916B (en) Data processing method and related equipment
CN110971958A (en) Live broadcast gift banner frame-by-frame animation display method, storage medium, equipment and system
CN111654702B (en) Data transmission method and system
CN115904745A (en) Inter-process communication method and related equipment
CN114938408A (en) Data transmission method, system, equipment and medium of cloud mobile phone

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication