Image processing method and device, equipment and storage medium
By overlaying layers through the display processor and outputting write-back and display media data, the problem of inconsistent display effects in image processing is solved and the power consumption of terminal devices is reduced.
Patent Information
- Application Number
- CN202510984256.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-16
- Publication Date
- 2025-10-14
AI Technical Summary
During image processing, the formats of the written-back media data and the displayed media data are inconsistent, resulting in different display effects. In addition, the use of different processors in the prior art leads to high power consumption.
Multiple layers are overlaid through the display processor, and the write-back media data and display media data are output through the same output terminal to ensure that the display effects of the two are similar, and the hardware processing structure is used to reduce power consumption.
This achieves consistency in display effects between writing back media data and displaying media data, and reduces power consumption of terminal devices.
Smart Images

Figure CN120786002A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to image display storage technology, and relate to but are not limited to an image processing method and device, equipment and storage medium. BACKGROUND
[0002] In the process of image processing, the obtained image usually needs to be sent to display and written back after layer superposition, wherein the sending to display is for displaying the image, and the writing back is for storing the image.
[0003] In the related art, in the process of sending to display and writing back of the image, there is a case that the format of the writing back media data is inconsistent with the format of the display media data, which leads to different display effects of the writing back media data and the display media data. SUMMARY
[0004] Therefore, the image processing method and device, equipment and storage medium provided by the embodiments of the present application can realize the writing back of the specified number of layers after superposition and the sending to display of the image through the display processor, so as to ensure that the display effects of the writing back media data and the display media data are similar, and also reduce the power consumption of the equipment. The image processing method and device, equipment and storage medium provided by the embodiments of the present application are implemented in the following manner:
[0005] In an aspect of the embodiments of the present application, an image processing method is provided, which is applied to a terminal device, the terminal device includes a display processor, a display screen and a memory, the display processor includes a plurality of output terminals, a first output terminal in the plurality of output terminals is connected with the display screen, and a second output terminal in the plurality of output terminals is connected with the memory. The method includes the following steps:
[0006] In response to detecting a target operation on a current display screen of the terminal device, the current display screen includes a plurality of layers, performing superposition processing on the plurality of layers by the display processor, outputting writing back media data to the memory through the second output terminal, and outputting display media data to the display screen through the first output terminal, the number of layers participating in the superposition to form the writing back media data includes at least part of the plurality of layers.
[0007] The target operation is an operation of image storage or video recording processing on the current display screen of the terminal device.
[0008] In another aspect of the embodiments of the present application, an image processing device is also provided, which is applied to a terminal device, the terminal device includes a display processor, a display screen and a memory, the display processor includes a plurality of output terminals, a first output terminal in the plurality of output terminals is connected with the display screen, and a second output terminal in the plurality of output terminals is connected with the memory. The device includes a processing module and an output module.
[0009] The processing module is configured to, in response to detecting a target operation on a current display screen of the terminal device, perform superimposition processing on a plurality of layers by using a display processor, the current display screen comprising the plurality of layers; and the output module is configured to output the write-back media data to the storage through the second output end, and output the display media data to the display screen through the first output end, the number of layers participating in superimposition to form the write-back media data comprising at least part of the plurality of layers.
[0010] The target operation is an operation of image storage or video recording processing on the current display screen of the terminal device.
[0011] The computer device provided by the embodiments of the present application comprises a memory and a processor, the memory stores a computer program capable of running on the processor, and the processor implements the method of the embodiments of the present application when executing the program.
[0012] The computer readable storage medium provided by the embodiments of the present application stores a computer program, and the computer program is executed by a processor to implement the method provided by the embodiments of the present application.
[0013] In the image processing method and device, the equipment and the storage medium provided by the embodiments of the present application, in response to detecting a target operation on a current display screen of the terminal device, performing superimposition processing on a plurality of layers by using a display processor, the current display screen comprising the plurality of layers, outputting write-back media data to a storage through a second output end, and outputting display media data to a display screen through a first output end; and the target operation is an operation of image storage or video recording processing on the current display screen of the terminal device. Since the terminal device comprises a display processor, a display screen and a storage, the display processor comprises a plurality of output ends, the first output end of the plurality of output ends is connected with the display screen, the second output end of the plurality of output ends is connected with the storage, the display processing of the media data can be realized through the first output end of the display processor, the write-back processing of the media data can be realized through the second output end of the display processor, the display effects of the write-back media data and the display media data are similar because both of them are obtained by the display processor, in addition, for the write-back media data, the number of layers participating in superimposition to form the write-back media data comprises at least part of the plurality of layers, that is, the specified part of the layers can be superimposed to obtain the write-back media data generated by superimposition of the part of the plurality of layers, in the scene of image storage or video recording, the part of the layers can be selected to be superimposed to obtain the write-back media data and store, thereby improving the applicability of image write-back; in addition, since the display processor is a hardware processing structure, it does not need to consume much computing resource, therefore, obtaining the write-back media data and the display media data based on the display processor can also reduce the power consumption of the terminal device. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0015] Figure 1 A schematic diagram of the relationship between the image processing method implemented in the related technology provided in the embodiments of this application;
[0016] Figure 2 A schematic diagram of a scene of the image processing method provided in an embodiment of the present application;
[0017] Figure 3 A schematic diagram of the structure of a display processor provided in an embodiment of the present application;
[0018] Figure 4 A schematic diagram of the relationship between the image processing method provided in the embodiments of the present application;
[0019] Figure 5 A schematic diagram of the flow of the image processing method provided in the embodiments of the present application;
[0020] Figure 6 This is another flowchart of the image processing method provided in an embodiment of the present application;
[0021] Figure 7 This is another structural diagram of the display processor provided in an embodiment of the present application;
[0022] Figure 8 This is a schematic diagram of the process of outputting and writing back media data provided in an embodiment of the present application;
[0023] Figure 9 A schematic diagram of a process for outputting and displaying media data provided in an embodiment of the present application;
[0024] Figure 10 This is another structural diagram of the display processor provided in an embodiment of the present application;
[0025] Figure 11 This is a schematic diagram of the changes in the interface display content provided in the embodiment of the present application;
[0026] Figure 12 This is a schematic diagram of the effect of superimposing specified layers provided in an embodiment of the present application;
[0027] Figure 13 A schematic diagram of the structure of an image processing device provided in an embodiment of the present application;
[0028] Figure 14 The following is a structural schematic diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0029] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the following will further describe the specific technical solutions of the present application with reference to the drawings in the embodiments of the present application. The following embodiments are used to illustrate the present application, but are not used to limit the scope of the present application.
[0030] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the present application belongs. The terms used herein are only for the purpose of describing the embodiments of the present application, and are not intended to limit the present application.
[0031] In the following description, “some embodiments” are related to a subset of all possible embodiments, but it can be understood that “some embodiments” can be the same subset or different subsets of all possible embodiments, and can be combined with each other without conflict.
[0032] It should be noted that the terms “first\second\third” used in the embodiments of the present application are used to distinguish similar or different objects, and do not represent a specific order of the objects. It can be understood that “first\second\third” can be interchanged in a specific order or sequence as allowed, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0033] In the process of image processing, it is usually necessary to respectively send and write back the obtained image after layer superposition.
[0034] Among them, sending refers to the process of transmitting the image after layer superposition to a display device, such as a display screen, for display. Through the way of layer superposition, the image effect of the media data to be displayed can be displayed on the display screen.
[0035] For example, during the process of screenshot or recording, the corresponding screenshot result or recording result can be displayed on the display interface of the terminal device.
[0036] Write back refers to the process of writing back the image after layer superposition to the system memory or other storage space of the terminal device. This process is mainly to realize the storage of these data.
[0037] For example, after screenshot or recording, the image obtained by screenshot or the video obtained by recording can be stored in the system memory or other storage space in the terminal device.
[0038] The terminal device provided in the embodiments of the present application can include, but is not limited to, a mobile phone, a wearable device (such as a smart watch, a smart bracelet, smart glasses, etc.), a tablet computer, a notebook computer, a vehicle-mounted terminal, a PC (Personal Computer), and the like. The functions implemented by the method can be implemented by calling program codes by a processor in the terminal device, and of course, the program codes can be stored in a computer storage medium. Therefore, the terminal device at least includes a processor and a storage medium.
[0039] In order to more clearly explain the image processing method provided in the embodiments of the present application, first, the image processing method provided in the related art will be explained.
[0040] Figure 1 For the relationship diagram of the image processing method implemented in the related art provided in the embodiments of the present application, please refer to Figure 1 In this scenario, it can include a display processor 110 (DPU, Display Processing Unit) and a graphics processor 120 (GPU, Graphic Processing Unit). The layers that need to be superimposed can be respectively input to the display processor 110 and the graphics processor 120. The display processor 110 performs display processing to obtain display media data, and the graphics processor 120 performs write-back processing to obtain write-back media data.
[0041] However, the image results obtained by different types of processors can be different, resulting in different display effects. In addition, the graphics processor 120 needs higher power consumption in the processing process because it is a software level processing.
[0042] It should be noted that, since different processors involve different architectures, the results of the obtained media data can be different. Taking the difference between the images generated by the DPU and the GPU as an example:
[0043] The GPU is focused on large-scale parallel computing (such as graphics rendering, AI inference, etc.) optimization, supports high-precision floating-point operations and complex mathematical operations (such as convolution, matrix multiplication, etc.). The DPU is focused on data path acceleration (such as network, storage, security offload), and its computing unit can only support low-precision integer operations or fixed-function logic, which can sacrifice precision to exchange for energy efficiency and throughput. Therefore, in the process of generating media data using different processors, the results obtained are not the same. In the process of use by users, there will be obvious differences in vision, which can be reflected in aspects such as illumination, brightness, and contrast.
[0044] The image generated by the same processor does not have the above problems, and thus, the user cannot visually distinguish the image generated by the same processor.
[0045] To solve the above problems in the related art, an image processing method is provided in the embodiments of the present application, and the application scenario of the image processing method is explained as follows.
[0046] Figure 2 For the scenario of the image processing method provided in the embodiments of the present application, refer to Figure 2 The terminal device includes a display processor 110, a display screen 210, and a memory 220.
[0047] The multiple layers that need to be superimposed can be input into the display processor 110, the display processor 110 performs superimposition processing on the layers, and the obtained result can be output to the display screen 210 and the memory 220.
[0048] It should be noted that the display processor 110 in the scenario can be a display processor with a specific hardware structure, can have multiple output ends, and the output ends are respectively connected to the display screen 210 and the memory 220, so as to realize the display and write-back processes.
[0049] In an embodiment, the display screen 210 can be a screen for displaying content, for example, a screen of a mobile phone, a display of a computer, etc., which is not limited specifically herein.
[0050] The memory 220 can be a storage space for storing data, can be a system memory of the terminal device itself, for example, a storage space of a mobile phone, a storage space of a computer, etc., or can be a storage space of other devices connected externally, for example, a U disk, a mobile hard disk, etc., which is not limited specifically herein and can be set according to actual needs.
[0051] The display screen 210 can display the display media data obtained through the display process, and the memory 220 can store the write-back media data obtained through the write-back process.
[0052] The feasible hardware structure of the display processor provided in the embodiments of the present application is explained as follows.
[0053] Figure 3 For the structure of the display processor provided in the embodiments of the present application, refer to Figure 3 The display processor 110 includes multiple output ends, a first output end O1 in the multiple output ends is connected to the display screen 210, and a second output end O2 in the multiple output ends is connected to the memory 220.
[0054] It should be noted that the display processor 110 can have multiple outputs, if two outputs, it can include a first output O1 and a second output O2; if multiple outputs, it can include a first output O1 and multiple second outputs O2. Figure 3 In the actual implementation process, it can also include multiple.
[0055] Among them, the display media data can be output through the first output O1 and transmitted to the display screen; the write-back media data can also be output through the second output O2 and stored in the storage 220.
[0056] Based on the above hardware structure of the display processor 110, the relationship between each device in the image processing method provided in the embodiment of the application can be obtained.
[0057] It should be noted that the display processor and the display screen can be a display link, and the image write-back process of the specified layer can be realized based on the display link.
[0058] Figure 4 For the relationship diagram of the image processing method provided in the embodiment of the application, please refer to Figure 4 The multiple layers can be input into the display processor 110, and the layer superposition processing is performed by the display processor, and then the write-back and display are performed respectively, wherein the write-back is the result of part of the layer superposition, Figure 4 The result of the superposition of layer 1 and layer 2 is shown in Figure 4 The superposition result of layer 1-layer 6 is shown in
[0059] Among them, the display media data after the superposition of layer 1-layer 6 can be displayed; the write-back media data after the superposition of layer 1 and layer 2 can be written back.
[0060] Among them, the process of obtaining the write-back media data and the process of obtaining the display media data can be realized based on the same superposition process, for example: after the superposition of layer 1 and layer 2 is completed, the write-back media data can be output, then layer 3, layer 4, layer 5 and layer 6 can be further superimposed on the basis of the superposition of layer 1 and layer 2, and after all the superimposable layers are superimposed, the display media data can be output.
[0061] After obtaining the display media data, the display media data can be transmitted to the display screen 210 for display; after obtaining the write-back media data, the write-back media data can be transmitted to the storage 220 for storage.
[0062] The following is a flow chart of the image processing method provided in the embodiment of the present application, based on the above-mentioned structural and logical relationships between the terminal device and the display processor.
[0063] Figure 5 This is a flow chart of the image processing method provided in the embodiment of the present application, please refer to Figure 5 , the method comprising:
[0064] S510: In response to detecting a target operation on a current display screen of a terminal device, a display processor performs overlay processing on multiple layers.
[0065] Optionally, the executor of the method may be the above-mentioned terminal device, wherein the terminal device includes a display processor, a display screen, and a memory, the display processor includes at least two output terminals, a first output terminal of the at least two output terminals is connected to the display screen, and a second output terminal of the at least two output terminals other than the first output terminal is connected to the memory.
[0066] The current display screen includes multiple layers, and the target operation is to perform image storage or video recording processing on the current display screen of the terminal device.
[0067] It should be noted that the current display screen may be an image displayed in the display interface of the terminal device, for example, it may be the desktop of the terminal device or the interface of any application in the terminal device, etc., and no specific limitation is made here.
[0068] In one embodiment, when a user uses a terminal device, he or she may need to perform operations such as image storage or video recording on part or all of the content in the current interface. These processing processes require layer overlay processing based on the current display screen, so as to obtain display media data for display and write-back media data for writing back.
[0069] Among them, image storage can be a process of saving the content of a certain area in the current picture, or taking a screenshot of the current picture; video recording can be a process of recording the current picture for a period of time.
[0070] Optionally, the display media data may be, for example, a display image or a display video composed of multiple display images; the write-back media data may be, for example, a write-back image or a write-back video composed of multiple write-back images, etc., which is not specifically limited here.
[0071] Optionally, the current display screen may include multiple layers, for example, a background layer, a control layer located above the background layer, etc. Based on the different current display screens, the corresponding number of layers may also be different.
[0072] It should be noted that the target operation may be, for example, an operation triggered by a user through a gesture, a control, or the like to start an image storage or video recording function.
[0073] For example, the user can click a corresponding screenshot control or recording control in the interface to trigger the target operation; or, the target operation can also be triggered by a preset gesture, such as a multi-finger sliding operation, a continuous clicking operation, and the like, without specific limitation here.
[0074] S520: output the write-back media data to the storage through the second output end, and output the display media data to the display screen through the first output end.
[0075] The number of layers participating in the superposition to form the write-back media data includes at least part of the plurality of layers.
[0076] It should be noted that after determining that the target operation is triggered, the plurality of layers can be superimposed by the display processor in response to the target operation, where the superimposition processing may be, for example, a result obtained after superimposing the plurality of layers in a certain order, and in this way, an image can be obtained according to the plurality of layers.
[0077] In the process of layer superposition, the plurality of layers can be sequentially superimposed in order from the bottom layer to the top layer, so as to obtain a superimposition result.
[0078] It should be noted that part of the layers can be superimposed to obtain the write-back media data, and then the write-back media data can be output to the storage through the second output end; all of the layers can be superimposed to obtain the display media data, and then the display media data can be output to the display screen through the first output end.
[0079] The foregoing has explained that the display processor can include a plurality of output ends, and different output ends can be used to output images after superimposition of different numbers of layers, where the second output end outputs an image after superimposition of part of the layers, and the first output end outputs an image after superimposition of all of the layers.
[0080] In an embodiment, the number of layers participating in the superposition to form the write-back media data can include at least part of the plurality of layers, and the number of layers participating in the superposition to form the display media data can be all of the plurality of layers, for example, the number of layers participating in the superposition to form the write-back media data can be less than the number of layers participating in the superposition to form the display media data.
[0081] For example, the current display screen includes a total of 6 layers, the write-back media data can be a result after superimposition of layer 1 and layer 2, and the display media data can be a result after superimposition of layer 1-layer 6.
[0082] In one embodiment, the specific number of layers for overlaying the write-back media data and the specific number of layers for overlaying the display media data are not limited and can be set according to actual needs.
[0083] In the image processing method provided in the embodiment of the present application, in response to detecting a target operation on the current display screen of the terminal device, the current display screen includes multiple layers, the multiple layers are overlaid by the display processor, and the write-back media data is output to the memory through the second output end, and the display media data is output to the display screen through the first output end; the target operation is an operation of image storage or video recording processing on the current display screen of the terminal device. Among them, since the terminal device includes a display processor, a display screen, and a memory, the display processor includes multiple output terminals, a first output terminal of the multiple output terminals is connected to the display screen, and a second output terminal of the multiple output terminals is connected to the memory. The first output terminal of the display processor can be used to send media data for display processing, and the second output terminal of the display processor can be used to write back media data. Since both the write-back media data and the display media data are obtained by the display processor, the display effects of the two are similar. In addition, for the write-back media data, the number of layers involved in the superposition to form the write-back media data includes at least a portion of the multiple layers. That is, by specifying a portion of the layers involved in the superposition to form the write-back media data, the specified portion of the layers can be superimposed, thereby obtaining write-back media data generated by superimposing a portion of the multiple layers. In the scenario of image storage or video recording, the write-back media data can be obtained and stored after the selected portion of the layers are superimposed according to actual needs, thereby improving the applicability of image write-back. In addition, since the display processor is a hardware processing structure and does not require a large amount of computing resources, obtaining the write-back media data and the display media data separately based on the display processor can also reduce the power consumption of the terminal device.
[0084] The following explains the implementation process of outputting write-back media data and outputting display media data in the image processing method provided in the embodiment of the present application.
[0085] Figure 6 This is another flowchart of the image processing method provided in the embodiment of the present application, please refer to Figure 6 , overlaying multiple layers through a display processor, outputting write-back media data to a memory through a second output terminal, and outputting display media data to a display screen through a first output terminal, including:
[0086] S610: Superimposing the plurality of layers in a preset order by the display processor, and outputting the write-back media data to the storage through the second output end in a case where a quantity of the superimposed layers reaches a target quantity.
[0087] Optionally, the preset order can be an order from a bottom layer to a top layer, for example: the order of the bottom layer to the top layer of the layers is layer 1-layer 6 in sequence, and the preset order can be an order of layer 1, layer 2, layer 3, layer 4, layer 5 and layer 6.
[0088] It should be noted that the target quantity can be determined before the layer superimposition processing, for example: it can be a fixed quantity, or it can also be a variable quantity.
[0089] If it is a fixed quantity, it can be a fixed quantity set when the display processor is manufactured; if it is a variable quantity, the quantity can be determined according to the current use scenario of the terminal device, or the corresponding quantity can be determined based on the user's setting, which is not limited here.
[0090] In the embodiments of the present application, the target quantity can be a variable quantity.
[0091] In the process of layer superimposition, if the target quantity of layers is superimposed, the write-back media data can be output to the storage through the second output end.
[0092] S620: After completing the superimposition processing of all layers in the plurality of layers, outputting the display media data to the display screen through the first output end.
[0093] It should be noted that after the write-back media data is output, the layer superimposition can continue, for example: taking the write-back media data superimposed with layer 1 and layer 2 as an example, layer 3 can be continuously superimposed while the write-back media data is output, and the display media data can be obtained after all layers in the plurality of layers are superimposed.
[0094] Optionally, if the total number of the plurality of layers is superimposed, the display media data can be output to the display screen through the first output end.
[0095] The target quantity is less than the total number of the plurality of layers. For example: the target quantity is 2 layers, and the total number of the plurality of layers is 6 layers.
[0096] In the image processing method provided in the embodiments of the present application, the display processor can perform superimposition processing on multiple layers in a preset order, and output the write-back media data to the storage through the second output end when the number of superimposed layers reaches a target number; and output the display media data to the display screen through the first output end after the superimposition processing on all the layers in the multiple layers is completed. By setting the target number, the write-back of a specified number of layers after superimposition can be realized, and the display of all the layers after superimposition can be realized, so that the display processor can realize the display and the write-back of the specified layers, the applicability of image write-back is increased, and since the display processor is a hardware processing structure, it does not need much calculation consumption, so obtaining the write-back media data and the display media data based on the display processor can also reduce the power consumption of the terminal device.
[0097] To more clearly explain the display processor provided in the embodiments of the present application, another possible structure of the display processor is explained as follows.
[0098] Figure 7 Another structure diagram of the display processor provided in the embodiments of the present application is shown in FIG. 11. Figure 7 The display processor 110 further includes a counting module 111, which is configured to count the number of layers superimposed by the display processor.
[0099] It should be noted that the counting module 111 can be a counter, for example. After initialization, the value of the counter can be set to 1, and the count is increased by 1 after each layer is superimposed, that is, the count is increased by 1 after layer 1 and layer 2 are superimposed, and the corresponding counter value is 2. The value of the counter can represent the total number of layers superimposed by the display processor.
[0100] During the layer superimposition process, the number of times of layer superimposition can be determined according to the counting result of the counter, so that whether the target number is reached can be determined.
[0101] The following explains one possible implementation process of obtaining the write-back media data by the terminal device provided in the embodiments of the present application based on the structure of the display processor.
[0102] Figure 8 The flowchart of outputting the write-back media data provided in the embodiments of the present application is shown in FIG. 12. Figure 8 When the number of superimposed layers reaches the target number, the write-back media data is output to the storage through the second output end, including:
[0103] S810: Obtain the counting result of the counting module.
[0104] Optionally, the display processor can obtain the counting result in the counting module, which can be obtained once every certain period of time, or can be obtained once every time the counting result is refreshed, or can be obtained in real time, without specific limitation here.
[0105] The counting result can be a specific number, which is used to represent the number of superimposed layers. For example, if the counting result is 2, it means that layer 1 and layer 2 have been superimposed; if the counting result is 4, it means that layer 1, layer 2, layer 3 and layer 4 have been superimposed.
[0106] S820: In the case where the counting result is equal to the target number, output the write-back media data to the storage through the second output end.
[0107] It should be noted that after obtaining the counting result, it can be determined whether the counting result is equal to the target number. If not, the counting result of the counting module can be continuously obtained. If it is equal to the target number, it can be determined that the current condition for outputting the write-back media data is met, and the write-back media data can be output to the storage through the second output end.
[0108] In the image processing method provided by the embodiments of the present application, the counting result of the counting module can be obtained. In the case where the counting result is equal to the target number, the write-back media data is output to the storage through the second output end. The output of the write-back media data can be quickly and accurately realized based on whether the counting result reaches the target number, and the accuracy of outputting the write-back media data can be improved.
[0109] It should be noted that the target number can be a variable number, which can be set in the display processor after it is manufactured. The following explains one of the feasible implementation manners for determining the target number provided in the embodiments of the present application.
[0110] In one embodiment, before the display processor superimposes the plurality of layers in the preset order, the method further comprises: determining the target number according to the current running scene of the terminal device, or determining the target number according to the number of target layers in the plurality of layers included in the current display picture, the target layer including a background layer.
[0111] It should be noted that the current running scene can be a program currently running by the terminal device, for example, if the terminal device is currently running a game application, the current running scene can be a game scene, and if the terminal device is currently running a social application, the current running scene can be a chat scene. Correspondingly, for different applications, the corresponding current running scene can be different, and different running scenes can correspond to different target quantities. The target quantity corresponding to different running scenes can be determined by setting a mapping relationship, so that the target quantity can be determined.
[0112] In an embodiment, the current running scene is determined according to a target application corresponding to a current display screen, and the target quantity is determined according to the current running scene of the terminal device, including: determining the target quantity according to a mapping relationship between a preset identifier and the target quantity, and a target identifier of the target application.
[0113] It should be noted that the target application can be an application currently running by the terminal device, for example, a game application, a chat application, etc. Each application can be configured with a corresponding identifier, and the identifier corresponding to the target application is the target identifier.
[0114] The mapping relationship can record the relationship between the preset identifier and the target quantity. After the target identifier of the target application is determined, the corresponding target quantity can be found through the mapping relationship, wherein the mapping relationship can be represented in the following table:
[0115] Pre-set identification Target number Identification A 2 Identification B 3 Identification C 2
[0116] Table 1
[0117] The mapping relationship between the preset identifier and the target quantity shown in Table 1 is that the target quantity corresponding to identifier A can be 2, the target quantity corresponding to identifier B can be 3, and the target quantity corresponding to identifier C can also be 2.
[0118] It should be noted that the target layer can be a specific type of layer, wherein the plurality of layers can be layers output by a graphics processor or a central processing unit. These layers can be set with corresponding types, and different layers can correspond to different layer types. The target layer can be a certain specific type of layer, for example, a background layer.
[0119] The target quantity can be determined according to the number of target layers in the plurality of layers, for example, if the plurality of layers includes 2 background layers, the target quantity can be determined as 2, and if the plurality of layers includes 3 background layers, the target quantity can be determined as 3.
[0120] Optionally, the target quantity can be equal to the number of target layers in the plurality of layers.
[0121] It should be noted that the background layer is only one example, and other types of layers can also be included in actual applications, for example: some types of layers are usually located at the top or near the top, such as layers corresponding to controls, layers corresponding to pop-up windows, etc.; some types of layers are usually located at the bottom or near the bottom, including the above-mentioned background layer and solid color layer, etc., which are not limited here, and in actual implementation, in addition to the background layer as the target layer, other layers that can be located at the bottom or near the bottom can also be used as the target layer.
[0122] In an embodiment, each of the plurality of layers further includes a type identifier, and the target quantity is determined according to a quantity of target layers in the plurality of layers included in the current display screen, including: identifying a quantity of layers in the plurality of layers whose type identifiers are target type identifiers, the quantity of layers whose type identifiers are target type identifiers being the target quantity, and the target type identifier being a type identifier corresponding to a background layer.
[0123] It should be noted that each layer can be configured with a corresponding type identifier, which can indicate the type of the layer, and the display processor can determine the type of a layer by identifying the type identifier, so as to determine whether the layer is a target layer.
[0124] The target layer can be a layer whose type identifier is a target type identifier, and the target type identifier can be a type identifier corresponding to a background layer, for example, and the quantity of layers having the target type identifier can be used as the target quantity.
[0125] For example, if the plurality of layers includes 2 layers having the target type identifier and 4 layers having other type identifiers, the target quantity can be determined as 2; if the plurality of layers includes 3 layers having the target type identifier and 5 layers having other type identifiers, the target quantity can be determined as 3.
[0126] In the image processing method provided by the embodiments of the present application, the target quantity can be determined according to a mapping relationship between a preset identifier and the target quantity, and a target identifier of a target application program; or, the quantity of layers in the plurality of layers whose type identifiers are target type identifiers is identified, the quantity of layers whose type identifiers are target type identifiers being the target quantity, and the target type identifier being a type identifier corresponding to a background layer. The target quantity can be determined by the target identifier of the target application program in the current running scenario, or the target quantity can be determined according to the quantity of layers having the target type identifier, and the target quantity can be quickly and accurately determined in a variety of different ways, so as to improve the accuracy of outputting and writing back media data.
[0127] The following explains one of the possible implementation processes of obtaining display media data by a terminal device provided in the embodiments of the present application.
[0128] Figure 9 For the flowchart of outputting display media data provided in the embodiments of the present application, please refer to Figure 9 Before the display processor performs superimposition processing on the plurality of layers in the preset order, the method further includes:
[0129] S910: obtaining, by the display processor, the total number of layers of the current display picture.
[0130] It should be noted that the display processor can obtain the total number of layers of the current display picture, which can be sent to the display processor by the graphics processor or the central processing unit that generates the plurality of layers, or can be determined by the display processor itself, which is not specifically limited here.
[0131] In one embodiment, the display processor can be preset with a plurality of input terminals, and each layer can use one of the input terminals during inputting of the plurality of layers. The display processor can determine the total number of layers of the current display picture according to the number of used input terminals.
[0132] For example, if the display processor has 10 input terminals and 6 input terminals input layers, the total number of layers of the current display picture can be determined as 6.
[0133] Correspondingly, after the superimposition processing on all the layers in the plurality of layers is completed, the display media data is output to the display screen through the first output terminal, including:
[0134] S920: in the case that the counting result is equal to the total number of layers of the current display picture, outputting the display media data to the display screen through the first output terminal.
[0135] It should be noted that the counting module can continuously count, and after the counting result reaches the target number, the counting can continue until the counting result reaches the total number of layers of the current display picture.
[0136] In the case that the counting result is equal to the total number of layers of the current display picture, it can be determined that all the layers in the display processor have been superimposed, and then the display media data after superimposition of all the layers can be output through the first output terminal, and the display media data can be output to the display screen.
[0137] In one embodiment, if the total number of layers of the current display picture is 6, the display media data can be output to the display screen through the first output terminal in the case that the counting result is equal to 6.
[0138] In the image processing method provided by the embodiment, the total number of layers of a current display picture can be acquired by the display processor; and in a case where the counting result is equal to the total number of layers of the current display picture, display media data can be output to the display screen through the first output end. In this way, the timing when all the layers are superimposed by the display processor can be determined in a timely and accurate manner, so that the display media data can be output to the display screen in a timely and accurate manner through the first output end.
[0139] The following explains another possible hardware structure of the display processor provided by the embodiment.
[0140] Figure 10 For another structural schematic diagram of the display processor provided by the embodiment, please refer to Figure 10 The display processor can include multiple output ends, wherein the first output end O1 can include one, and the second output end O2 can include multiple, Figure 10 In the case of including two second output ends O2 as an example, in actual implementation, three or more second output ends O2 can also be included, which is not specifically limited here.
[0141] In one embodiment, the display processor superimposes multiple layers and outputs the write-back media data to the memory through the second output end, including: the display processor superimposes a first target number of multiple layers to obtain first write-back media data, and outputs the first write-back media data through one of the second output ends; the display processor superimposes a second target number of multiple layers to obtain second write-back media data, and outputs the second write-back media data through another of the second output ends, wherein the second target number is greater than the first target number.
[0142] It should be noted that multiple second output ends can be provided, and each second output end can output one write-back media data, and the number of layers superimposed by the write-back media data output by different output ends is different, wherein for one of the second output ends, the first target number of multiple layers can be superimposed to obtain the first write-back media data, and the first write-back media data can be output; and for another of the second output ends, the second target number of multiple images can be superimposed to obtain the second write-back media data, and the second write-back media data can be output.
[0143] Optionally, the number of layers superimposed by the first write-back media data can be less than the number of layers superimposed by the second write-back media data.
[0144] It should be noted that the above is explained by taking two second output ends as an example, in actual implementation, if there are three or more second output ends, there can also be a corresponding number of write-back media data, for example: third write-back media data, and the number of layers superimposed by the third write-back media data is more.
[0145] For example, as shown in the two second output ends, the first target number can be 2, the second target number can be 3, the first write-back media data can be the write-back media data obtained after superimposing 2 layers, and the second write-back media data can be the write-back media data obtained after superimposing 3 layers. Figure 10 For example, as shown in the three output ends, a third target number can be set, the third target number can be 5, and correspondingly, the third write-back media data can be the write-back media data obtained after superimposing 5 layers.
[0146] Optionally, in the case where there are multiple second output ends, the same layer superimposition step can be used, for example: assuming that there are a total of 6 layers, the first write-back media data needs to superimpose 2 layers, the second write-back media data needs to superimpose 3 layers, and the third write-back media data needs to superimpose 5 layers, then in the specific superimposition process, after superimposing layer 1 and layer 2, the first write-back media data can be output, then layer 3 can be continued to be superimposed, after layer 3 is superimposed, the second write-back media data can be output, then layer 4 and layer 5 can be continued to be superimposed, after layer 4 and layer 5 are superimposed, the third write-back media data can be output, and then superimposition can be continued until the display media data can be output.
[0147] It should be noted that in actual implementation, a corresponding number of second output ends can be selected and set according to the demand for write-back media data with different superimposed layer numbers, so that write-back media data with different numbers of superimposed layers can be output.
[0148] In an embodiment, after obtaining a plurality of write-back media data with different numbers of superimposed layers, the write-back media data can be stored in a memory. It should be noted that in order to distinguish different superimposed layer numbers, write-back media data superimposed with different layer numbers can be stored in different positions of the same memory, or stored in different memories, which is not limited here.
[0149]
[0150] In the image processing method provided in the embodiment of the present application, a display processor can perform overlay processing on a first target number of multiple layers to obtain first write-back media data, and output the first write-back media data through one of the second output terminals. Furthermore, a display processor can perform overlay processing on a second target number of multiple layers to obtain second write-back media data, and output the second write-back media data through another of the second output terminals. By providing multiple second output terminals, multiple write-back media data with different overlay layers can be output, thereby enabling different write-back media data to be output according to actual needs, thereby increasing the applicability of image write-back.
[0151] One feasible implementation process of the display process for displaying media data is explained below.
[0152] Figure 11 This is a schematic diagram of the changes in the interface display content provided in the embodiment of this application. Please refer to Figure 11 , Figure 11 The left sub-image is the interface for users to perform screenshot operations. Taking the terminal device as a mobile phone as an example, the user can pull down the menu bar and click the screenshot control or recording control to trigger the target operation. Then, the user can perform the following operations: Figure 5 The process steps shown in the figure are to obtain the display media data. After obtaining the display media data, the corresponding screenshot content can be displayed in the display interface, that is, Figure 11 The content shown in the right sub-image may be an image obtained by superimposing multiple layers of the current display screen in the left sub-image.
[0153] It should be noted that Figure 11 What is shown is the process displayed through screenshots. In the actual implementation process, if the recording method is adopted, for example, the recording operation corresponding to the recording control in the left sub-image is adopted, the corresponding screenshot content in the right sub-image can be changed to the recorded video content.
[0154] In one embodiment, the user executes Figure 11 After the operation of the left sub-image, the terminal device can display Figure 11 Results for the right subplot.
[0155] The following explains one feasible implementation process of the write-back process for writing back media data.
[0156] Figure 12 This is a schematic diagram of the effect of the specified layer superposition provided in the embodiment of this application. Please refer to Figure 12 , Figure 12 The upper sub-image is the current display screen when the user takes a screenshot through a game application. The target operation can be triggered by taking a screenshot, and then the following operations can be performed: Figure 5The process steps shown are to obtain the write-back media data. After obtaining the write-back media data, the corresponding write-back media data can be stored.
[0157] It should be noted that after storing and writing back media data, the stored images can be viewed through tools such as media browsers, that is, Figure 12 The interface is shown in the sub-image below.
[0158] in, Figure 12 The upper sub-image can be a screenshot of the game interface, the middle can be a character in the game background, and the surrounding rectangular and circular icons can be game controls in the game interface.
[0159] During the user's game, if a screenshot operation is required, there may be a corresponding demand, for example: there is no need to screenshot the corresponding game controls. In this case, the image processing method provided in the embodiment of the present application can be used to obtain the write-back media data of partial layer overlays, and these write-back media data can be stored. Figure 12 The lower sub-image may be the content displayed on the write-back media data when the write-back media data is viewed.
[0160] in, Figure 12 The lower sub-image does not contain any game controls, only characters in the game background. This image is the write-back media data.
[0161] In one embodiment, the write-back process provided in the embodiment of the present application can be synchronous write-back or asynchronous write-back, which is not specifically limited here. The embodiment of the present application is explained using synchronous write-back as an example.
[0162] It should be understood that, although the steps in the above-mentioned flowcharts are shown in sequence according to the instructions of the arrows, these steps are not necessarily performed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be performed in other orders. Moreover, at least a portion of the steps in the above-mentioned flowcharts may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these sub-steps or stages is not necessarily to be performed in sequence, but can be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
[0163] Based on the foregoing embodiments, the embodiments of the present application provide an image processing apparatus, which comprises the modules included and the units included in the modules, and can be implemented by a processor; of course, it can also be implemented by a specific logic circuit; in the implementation process, the processor can be a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP), or a field programmable gate array (FPGA), etc.
[0164] Figure 13 For the structural schematic diagram of the image processing apparatus provided in the embodiments of the present application, please refer to Figure 13 , the image processing apparatus,
[0165] Another aspect of the embodiments of the present application also provides an image processing apparatus applied to a terminal device, the terminal device comprising a display processor, a display screen and a memory, the display processor comprising a plurality of output terminals, a first output terminal in the plurality of output terminals being connected with the display screen, and a second output terminal in the plurality of output terminals being connected with the memory, the apparatus comprising: a processing module 1310 and an output module 1320.
[0166] The processing module 1310 is configured to respond to detection of a target operation on a current display screen of the terminal device, the current display screen comprising a plurality of layers, and perform superimposition processing on the plurality of layers by the display processor; and the output module 1320 is configured to output write-back media data to the memory through the second output terminal, and output display media data to the display screen through the first output terminal, the number of layers participating in superimposition to form the write-back media data comprising at least part of the plurality of layers.
[0167] The target operation is an operation of image storage or video recording processing on the current display screen of the terminal device.
[0168] In an embodiment, the processing module 1310 is specifically configured to perform superimposition processing on the plurality of layers by the display processor in a preset order, and output the write-back media data to the memory through the second output terminal in a case where the number of superimposed layers reaches a target number; and output the display media data to the display screen through the first output terminal after completing the superimposition processing on all the layers in the plurality of layers, the target number being less than the total number of the plurality of layers.
[0169] In an embodiment, the display processor further comprises a counting module configured to count the number of layers superimposed by the display processor; the processing module 1310 is specifically configured to acquire a counting result of the counting module; and output the write-back media data to the memory through the second output terminal in a case where the counting result is equal to the target number.
[0170] In an embodiment, the processing module 1310 is further configured to determine the target number according to a current running scenario of the terminal device, or determine the target number according to a number of target layers in a plurality of layers included in the current display screen, the target layers including a background layer.
[0171] In an embodiment, the current running scenario is determined according to a target application corresponding to the current display screen, and the processing module 1310 is specifically configured to determine the target number according to a mapping relationship between a preset identifier and the target number, and a target identifier of the target application.
[0172] In an embodiment, each layer in the plurality of layers further includes a type identifier, and the processing module 1310 is specifically configured to identify a number of layers in the plurality of layers whose type identifiers are target type identifiers, the number of layers whose type identifiers are the target type identifiers being the target number, the target type identifier being a type identifier corresponding to the background layer.
[0173] In an embodiment, the processing module 1310 is further configured to acquire, by the display processor, a total number of layers of the current display screen, and output, by the first output end, the display media data to the display screen in a case where the counting result is equal to the total number of layers of the current display screen.
[0174] In an embodiment, the second output end includes a plurality of output ends, and the processing module 1310 is specifically configured to perform, by the display processor, superimposition processing on a plurality of layers of the first target number to obtain first write-back media data, and output, by one of the second output ends, the first write-back media data; perform, by the display processor, superimposition processing on a plurality of layers of the second target number to obtain second write-back media data, and output, by another of the second output ends, the second write-back media data, wherein the second target number is greater than the first target number.
[0175] In the image processing device provided in the embodiment of the present application, in response to detecting a target operation on the current display screen of the terminal device, the current display screen includes multiple layers, the multiple layers are overlaid by the display processor, and the media data is written back to the memory through the second output end, and the display media data is output to the display screen through the first output end; the target operation is an operation of image storage or video recording processing on the current display screen of the terminal device. Among them, since the terminal device includes a display processor, a display screen, and a memory, the display processor includes multiple output terminals, a first output terminal of the multiple output terminals is connected to the display screen, and a second output terminal of the multiple output terminals is connected to the memory. The first output terminal of the display processor can be used to send media data for display processing, and the second output terminal of the display processor can be used to write back media data. Since both the write-back media data and the display media data are obtained by the display processor, the display effects of the two are similar. In addition, for the write-back media data, the number of layers involved in the superposition to form the write-back media data includes at least a portion of the multiple layers. That is, by specifying a portion of the layers involved in the superposition to form the write-back media data, the specified portion of the layers can be superimposed, thereby obtaining write-back media data generated by superimposing a portion of the multiple layers. In the scenario of image storage or video recording, the write-back media data can be obtained and stored after the selected portion of the layers are superimposed according to actual needs, thereby improving the applicability of image write-back. In addition, since the display processor is a hardware processing structure and does not require a large amount of computing resources, obtaining the write-back media data and the display media data separately based on the display processor can also reduce the power consumption of the terminal device.
[0176] The description of the above device embodiment is similar to the description of the above method embodiment and has similar beneficial effects as the method embodiment. For technical details not disclosed in the device embodiment of this application, please refer to the description of the method embodiment of this application for understanding.
[0177] It should be noted that in the embodiments of this application Figure 13 The division of modules in the image processing device shown is schematic and is only a logical functional division. In actual implementation, other division methods may be used. In addition, the functional units in the various embodiments of the present application can be integrated into a processing unit, or can exist physically separately, or two or more units can be integrated into a single unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units. It can also be implemented in the form of a combination of software and hardware.
[0178] It should be noted that, in the embodiments of the present application, if the above-mentioned method is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the embodiments of the present application can be embodied in the form of a software product in essence or the part that contributes to the related art, and the computer software product is stored in a storage medium, including a number of instructions to make an electronic device execute all or part of the method described in the embodiments of the present application. The storage medium mentioned above includes: a U disk, a mobile hard disk, a read-only memory (ROM), a magnetic disk or an optical disk, and various media that can store program codes. Thus, the embodiments of the present application are not limited to any specific hardware and software combination.
[0179] Figure 14 For the structural schematic diagram of the computer device provided in the embodiments of the present application, please refer to Figure 14 The computer device provided in the embodiments of the present application can be the terminal device described above, for example, can be a mobile phone, a computer, a tablet computer and the like, which are not specifically limited here, and the schematic diagram in the embodiments of the present application is explained by taking a mobile phone interface schematic diagram as an example, but is not limited thereto, and can also be other types of electronic devices, the internal structure diagram of which can be as shown in Figure 14 The computer device includes a processor 1420, a memory and a network interface 1440 connected through a system bus 1410. The processor 1420 of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium 1431 and an internal memory 1432. The non-volatile storage medium 1431 stores an operating system, a computer program and a database. The internal memory 1432 provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium 1431. The database of the computer device is used to store data. The network interface 1440 of the computer device is used to communicate with external terminals through network connection. The computer program is executed by the processor 1420 to implement the above-mentioned method.
[0180] The computer device provided in the embodiments of the present application can execute the following steps: in response to detecting a target operation on a current display screen of a terminal device, the current display screen comprising a plurality of layers, performing superposition processing on the plurality of layers by a display processor, and outputting backwriting media data to a memory through a second output end of the display processor, and outputting display media data to a display screen through a first output end of the display processor; the target operation is an operation of image storage or video recording processing on the current display screen of the terminal device. The terminal device comprises the display processor, the display screen and the memory, the display processor comprises a plurality of output ends, the first output end of the plurality of output ends is connected to the display screen, the second output end of the plurality of output ends is connected to the memory, the display processing of the media data can be realized through the first output end of the display processor, the backwriting processing of the media data can be realized through the second output end of the display processor, the display effects of the backwriting media data and the display media data are similar because the backwriting media data and the display media data are both obtained by the display processor, in addition, the number of layers participating in superposition to form the backwriting media data includes at least part of the plurality of layers, that is, the specified part of the layers can be superimposed to obtain the backwriting media data generated by superimposing the part of the plurality of layers, in the scene of image storage or video recording, the part of the layers can be selected according to actual needs to obtain the backwriting media data after superimposition and storage, thereby improving the applicability of image backwriting; in addition, the display processor is a hardware processing structure, and does not need to consume more computing resources, therefore, obtaining the backwriting media data and the display media data based on the display processor can also reduce the power consumption of the terminal device.
[0181] The embodiments of the present application provide a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the steps in the method provided in the above embodiments.
[0182] The computer-readable storage medium provided in an embodiment of the present application can perform the following steps when the computer program stored thereon is executed by a processor: in response to detecting a target operation on the current display screen of the terminal device, the current display screen includes multiple layers, the multiple layers are superimposed by the display processor, and the media data is output to the memory through the second output end, and the display media data is output to the display screen through the first output end; the target operation is an operation of image storage or video recording processing on the current display screen of the terminal device. Among them, since the terminal device includes a display processor, a display screen, and a memory, the display processor includes multiple output terminals, a first output terminal of the multiple output terminals is connected to the display screen, and a second output terminal of the multiple output terminals is connected to the memory. The first output terminal of the display processor can be used to send media data for display processing, and the second output terminal of the display processor can be used to write back media data. Since both the write-back media data and the display media data are obtained by the display processor, the display effects of the two are similar. In addition, for the write-back media data, the number of layers involved in the superposition to form the write-back media data includes at least a portion of the multiple layers. That is, by specifying a portion of the layers involved in the superposition to form the write-back media data, the specified portion of the layers can be superimposed, thereby obtaining write-back media data generated by superimposing a portion of the multiple layers. In the scenario of image storage or video recording, the write-back media data can be obtained and stored after the selected portion of the layers are superimposed according to actual needs, thereby improving the applicability of image write-back. In addition, since the display processor is a hardware processing structure and does not require a large amount of computing resources, obtaining the write-back media data and the display media data separately based on the display processor can also reduce the power consumption of the terminal device.
[0183] An embodiment of the present application provides a computer program product containing instructions, which, when executed on a computer, enables the computer to execute the steps of the method provided in the above method embodiment.
[0184] Those skilled in the art will understand that Figure 14 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0185] In one embodiment, the image processing apparatus provided by the present application can be implemented in the form of a computer program. The computer program can be used in Figure 14The computer program product includes a computer program and a storage medium. The storage medium stores the computer program. The computer program is used for executing the method of the embodiments of the present application. The computer program is installed in the computer device and executed on the computer device. The memory of the computer device can store various program modules constituting the above device. The computer program constituted by various program modules makes the processor execute the steps in the method of various embodiments of the present application described in the specification.
[0186] It should be noted that the description of the above storage medium and device embodiments is similar to the description of the above method embodiments, and has similar beneficial effects as the method embodiments. For technical details not disclosed in the storage medium, storage medium and device embodiments of the present application, please refer to the description of the method embodiments of the present application for understanding.
[0187] It should be understood that the "one embodiment" or "an embodiment" or "some embodiments" mentioned throughout the specification means that the specific features, structures or characteristics related to the embodiments are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" or "in some embodiments" appearing throughout the specification does not necessarily mean the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present application, the size of the sequence number of the above processes does not mean the order of execution, and the execution order of the processes should be determined according to its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application. The sequence number of the above embodiments of the present application is only for description, not representing the advantages and disadvantages of the embodiments. The above description of various embodiments tends to emphasize the differences between various embodiments, and the same or similar parts can be referred to each other. For the sake of brevity, this paper will not be repeated here.
[0188] The term "and / or" in this paper is only a description of the association relationship of the associated objects, which means that there can be three kinds of relationships, for example, object A and / or object B, which can represent three cases of the existence of object A, the existence of object A and object B, and the existence of object B.
[0189] It should be noted that in this paper, the term "include", "contain" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or includes elements inherent to such process, method, article or device. Without more limitations, the element defined by the sentence "including a…" does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0190] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other manners. The embodiments described above are merely exemplary, for example, the division of the modules is only a logical function division, and there can be another division manner for the actual implementation, for example, a plurality of modules or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the various components shown or discussed can be indirect coupling or communication connection through some interfaces, devices or modules, and can be electrical, mechanical or other forms.
[0191] The modules described above as separate components may or may not be physically separate, and the components shown as modules may or may not be physical modules; they can be located in one place, or distributed on multiple network units; and some or all of the modules can be selected according to actual needs to achieve the purpose of the embodiments.
[0192] In addition, each functional module in each embodiment of the present application can be integrated into one processing unit, or each module can be a separate unit, or two or more modules can be integrated into one unit; the integrated module can be realized in the form of hardware or hardware plus software functional unit.
[0193] Those of ordinary skill in the art can understand that all or part of the steps of the above-mentioned method embodiments can be completed by a program instructing related hardware, and the aforementioned program can be stored in a computer readable storage medium, and when the program is executed, the steps of the method embodiments are executed; and the aforementioned storage medium includes mobile storage devices, read-only memories (ROM), magnetic discs or optical discs, and various media that can store program codes.
[0194] Alternatively, the integrated units of the present application, if implemented in the form of software functional modules and sold or used as independent products, can also be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the embodiments of the present application can be embodied in the form of a software product, and the computer software product is stored in a storage medium, and includes a plurality of instructions for causing an electronic device to execute all or part of the methods described in the embodiments of the present application. The aforementioned storage medium includes mobile storage devices, ROM, magnetic discs or optical discs, and various media that can store program codes.
[0195] The methods disclosed in the several method embodiments provided in the present application can be combined arbitrarily without conflict, to obtain new method embodiments.
[0196] The features disclosed in several product embodiments provided by the present application can be arbitrarily combined, without conflict, to obtain new product embodiments.
[0197] The features disclosed in several method or device embodiments provided by the present application can be arbitrarily combined, without conflict, to obtain new method embodiments or device embodiments.
[0198] The above description is merely illustrative of the application, and the scope of the application is not limited thereto. Any variations and modifications of the application, which would occur to those skilled in the art, are to be considered within the scope of the application. The scope of the application is to be limited only by the claims.
Claims
1. An image processing method, characterized in that: Applied to a terminal device, the terminal device includes a display processor, a display screen, and a memory, the display processor includes multiple output terminals, a first output terminal of the multiple output terminals is connected to the display screen, and a second output terminal of the multiple output terminals is connected to the memory, the method comprising: In response to detecting a target operation directed to a current display screen of the terminal device, the current display screen includes a plurality of layers, performing overlay processing on the plurality of layers by the display processor, outputting write-back media data to the memory via the second output terminal, and outputting display media data to the display screen via the first output terminal, wherein the number of layers overlaid to form the write-back media data includes at least a portion of the plurality of layers; The target operation is an operation of performing image storage or video recording processing on the current display screen of the terminal device.
2. The method according to claim 1, characterized in that The overlaying process of the multiple layers by the display processor, outputting the write-back media data to the memory through the second output terminal, and outputting the display media data to the display screen through the first output terminal includes: performing, by the display processor, an overlay process on the plurality of layers in a preset order, and outputting the write-back media data to the memory through the second output terminal when the number of the overlaid layers reaches a target number; and After completing the overlay processing of all the layers in the multiple layers, the display media data is output to the display screen through the first output end, and the target number is less than the total number of the multiple layers.
3. The method according to claim 2, characterized in that The display processor further includes: a counting module, the counting module being configured to count the number of layers superimposed by the display processor; and outputting the write-back media data to the memory through the second output terminal when the number of superimposed layers reaches a target number, comprising: Obtaining a counting result of the counting module; When the counting result is equal to the target number, the write-back media data is output to the memory through the second output terminal.
4. The method according to claim 2 or 3, characterized in that Before the display processor performs the overlay processing on the multiple layers in a preset order, the method further includes: determining the target quantity according to the current operating scenario of the terminal device; or The target number is determined according to the number of target layers in a plurality of layers included in the current display screen, where the target layers include a background layer.
5. The method according to claim 4, characterized in that The current running scene is determined according to a target application corresponding to the currently displayed screen, and the determining of the target quantity according to the current running scene of the terminal device includes: The target quantity is determined according to a mapping relationship between a preset identifier and a target quantity and a target identifier of the target application.
6. The method according to claim 4, characterized in that Each of the multiple layers further includes a type identifier, and determining the target number according to the number of target layers in the multiple layers included in the current display screen includes: The number of layers whose type identifier is a target type identifier among the multiple layers is identified, where the number of layers with the target type identifier is the target number, and the target type identifier is the type identifier corresponding to the background layer.
7. The method according to claim 3, characterized in that Before the display processor performs the overlay processing on the multiple layers in a preset order, the method further includes: Acquire the total number of layers of the current display screen through the display processor; After completing the superposition processing of all layers in the multiple layers, outputting the display media data to the display screen through the first output end includes: When the counting result is equal to the total number of layers of the current display picture, the display media data is output to the display screen through the first output end.
8. The method according to claim 1, characterized in that The second output terminal includes a plurality of layers, and the display processor performs overlay processing on the plurality of layers and outputs the write-back media data to the memory through the second output terminal, including: Performing a superposition process on the first target number of the plurality of layers by the display processor to obtain first write-back media data, and outputting the first write-back media data through one of the second output terminals; The display processor performs overlay processing on the plurality of layers of a second target number to obtain second write-back media data, and outputs the second write-back media data through another second output terminal, wherein the second target number is greater than the first target number.
9. An image processing device, characterized in that: Applied to a terminal device, the terminal device includes a display processor, a display screen, and a memory, the display processor includes multiple output terminals, a first output terminal of the multiple output terminals is connected to the display screen, and a second output terminal of the multiple output terminals is connected to the memory, the device includes: a processing module and an output module; The processing module is configured to, in response to detecting a target operation directed to a current display screen of the terminal device, the current display screen including a plurality of layers, perform overlay processing on the plurality of layers via the display processor; the output module is configured to output the write-back media data to the memory via the second output terminal, and output the display media data to the display screen via the first output terminal, wherein the number of layers overlaid to form the write-back media data includes at least a portion of the plurality of layers; The target operation is an operation of performing image storage or video recording processing on the current display screen of the terminal device.
10. A computer device comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, wherein: When the processor executes the program, the steps of the method according to any one of claims 1 to 8 are implemented.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.