Image processing method, device and equipment and computer readable storage medium

By obtaining and comparing the tile data in the image frame, the cache parameters of the tiles to be updated are determined, and fine-grained local updates are realized, which solves the high power consumption problem of the coarse-grained update method in high-resolution scenes, significantly saving bandwidth and power consumption.

CN118567762APending Publication Date: 2024-08-30GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202310191690.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-02-28
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

As the resolution of terminal devices increases, the coarse-grained local update method still consumes high power in scenarios where the object to be updated is irregular content, and there is a waste of bandwidth and power consumption.

Method used

By obtaining the tile data in the current frame image and the previous frame image, calculating the hash value of the tile, and determining the cache parameters of the tile to be updated, fine-grained local updates are implemented, and only the changed tiles are updated, reducing the power consumption.

Benefits of technology

It effectively saves bandwidth and power consumption, improves the efficiency of image processing, and significantly reduces power consumption in high-resolution and irregular content scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118567762A
    Figure CN118567762A
Patent Text Reader

Abstract

The embodiment of the invention discloses an image processing method and device, equipment and a computer readable storage medium. The method comprises the following steps: acquiring current image data of each image block in a current frame of image and historical image data of each image block in a previous frame of image of the current frame; according to the current image data and the historical image data of each image block, determining a cache parameter of the to-be-updated image block; and updating and displaying the image content corresponding to the current frame image according to the cache parameter of the to-be-updated image block and the current image data of the to-be-updated image block in the current frame image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to an image processing method, apparatus, device and computer-readable storage medium. Background Art

[0002] As the resolution and refresh rate of terminal devices (such as mobile phones and tablets) become larger and larger, the bandwidth and power consumption of rendering and displaying image content are also increasing. Most applications on terminal devices, such as games, news browsing, video playback, etc., have data overlap and gradual transition between frames. The purpose of saving bandwidth can be achieved through local rendering and local display.

[0003] In the related art, the graphics processing unit (GPU) sets a partial update area when rendering. The area represents a rectangular box surrounded by the upper left and lower right points of the rendering primitive. The area parameters are passed to the display processing unit (DPU), and the DPU only performs the update of the partial area, thereby realizing the refresh of only the partial update area without refreshing the entire frame image, thereby saving bandwidth and reducing power consumption.

[0004] However, as the resolution of the terminal device increases, this coarse-grained local update method still consumes high power for scenarios where the object to be updated has irregular content. Summary of the invention

[0005] The embodiments of the present application provide an image processing method, apparatus, device and computer-readable storage medium, which reduce power consumption.

[0006] The technical solution of the embodiment of the present application is implemented as follows:

[0007] In a first aspect, an embodiment of the present application provides an image processing method, the method comprising: obtaining current image data of each block in a current frame image, and historical image data of each block in a previous frame image of the current frame; determining cache parameters of the blocks to be updated based on the current image data and historical image data of each block; updating and displaying image content corresponding to the current frame image based on the cache parameters of the blocks to be updated and the current image data of the blocks to be updated in the current frame image.

[0008] In a second aspect, an embodiment of the present application provides an image processing device, comprising: an acquisition module, used to acquire current image data of each block in a current frame image, and historical image data of each block in a previous frame image of the current frame; a determination module, used to determine cache parameters of the blocks to be updated based on the current image data and historical image data of each block; an update module, used to update and display the image content corresponding to the current frame image based on the cache parameters of the blocks to be updated and the current image data of the blocks to be updated in the current frame image.

[0009] In a third aspect, an embodiment of the present application provides an image processing device, comprising: a memory for storing an executable computer program; and a processor for implementing the image processing method described in the first aspect when executing the executable computer program stored in the memory.

[0010] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium storing a computer program for implementing the image processing method described in the first aspect when executed by a processor.

[0011] The embodiments of the present application provide an image processing method, apparatus, device and computer-readable storage medium. According to the scheme provided by the embodiments of the present application, the method includes: obtaining the current image data of each block in the current frame image, and the historical image data of each block in the previous frame image of the current frame image; determining the cache parameters of the blocks to be updated according to the current image data and the historical image data of each block. By comparing the image data difference of the image data of the same block in the previous frame image and the current frame image, the block to be updated in the current frame image (i.e., the block to be updated) is determined. Compared with the local update scheme of the rectangular frame area, the block to be updated in this scheme is the outline of the object that has changed, and the rectangular frame area is the circumscribed rectangle of the object that has changed. Therefore, the block to be updated is a fine-grained local update method, which saves bandwidth. According to the cache parameters of the block to be updated and the current image data of the block to be updated in the current frame image, the image content corresponding to the current frame image is updated and displayed. According to the cache parameters of the tiles to be updated, we know which tiles need to be updated. Combined with the current image data of the tiles to be updated, we can only update the tiles to be updated in the previous frame image to display the image content corresponding to the current frame image. For other tiles, there is no need to update them, which reduces power consumption. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1 An exemplary schematic diagram of an image refresh process provided in an embodiment of the present application;

[0013] Figure 2 A flowchart of optional steps of an image processing method provided in an embodiment of the present application;

[0014] Figure 3 A flowchart of optional steps of another image processing method provided in an embodiment of the present application;

[0015] Figure 4 A flowchart of optional steps of another image processing method provided in an embodiment of the present application;

[0016] Figure 5 An exemplary schematic diagram of a tile update list provided in an embodiment of the present application;

[0017] Figure 6 An exemplary schematic diagram of a rectangular frame to be updated provided in an embodiment of the present application;

[0018] Figure 7 An exemplary schematic diagram of an area to be updated provided in an embodiment of the present application;

[0019] Figure 8 An optional structural diagram of an image processing device provided in an embodiment of the present application;

[0020] Fig. 9 A schematic diagram of the structure of an image processing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0021] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. It should be understood that some of the embodiments described here are only used to explain the technical solutions of the present application and are not used to limit the technical scope of the present application.

[0022] In order to better understand the image processing method provided in the embodiment of the present application, the relevant technology is first explained before introducing the technical solution of the embodiment of the present application.

[0023] Related technologies such as Figure 1 As shown, Figure 1 An exemplary schematic diagram of an image refresh process provided in an embodiment of the present application is provided, and an interface protocol and an extended protocol of an application programming interface (Application Programming Interface, API) related to graphics are pre-formulated for review, wherein the interface includes Figure 1The rendering software API and the display software API in the Rendering Software API. The technical solution of partial update through the rectangular frame is similar to the extension of EGL_KHR_partial_update to achieve the optimization of rendering and display. In order to coordinate the hardware settings of the two software interfaces, the GPU will set the partial update area (Partial Update) when partially rendering (Partial Render), that is, Figure 1 The buffer shown in the dotted box in the buffer, Partial Update is to save power consumption and bandwidth, only partial update is performed, that is, the part of the current frame image that is different from the previous frame image is updated. This area represents the rectangular box surrounded by the upper left point and the lower right point based on the rendering primitive (which can also be understood as the object to be updated); the area parameters are passed to the DPU, and the DPU only performs the update of the local area (Partial Refresh), and then displays it on the panel of the terminal device. In this way, only the local update area is refreshed, and there is no need to refresh the entire frame image, thereby saving bandwidth and reducing power consumption.

[0024] It should be noted that for Figure 1 , the first frame image only has the background ( Figure 1 (not shown in the figure), the second frame image adds an object (teapot), that is, the teapot is the object that appears later and is the object to be updated. Figure 1 The image shown in the figure is the second frame image. For multiple frame images arranged in time sequence, for example, frame A, frame B and frame C, at the same time, when the GPU is rendering frame C, the DPU is displaying frame A, that is, at the same time, the GPU and DPU are processing different frame images respectively. For the same frame image, it needs to be rendered by the GPU first, and then displayed by the DPU. Figure 1 When local rendering is performed on each frame of the image, the horizontal image is processed, and when it is displayed, the image is displayed vertically. The local rendered image and the vertically displayed image are the same image, and the only difference is the processing method and the display method.

[0025] The above-mentioned local update method has been widely used, but as the resolution of terminal devices (such as mobile phones) increases, this coarse-grained local update method needs to be further improved. Figure 1 In the example, there is still a large part of the area inside the rectangular area of ​​Partial Update that does not actually need to be updated, and there is room for further optimization.

[0026] The present application embodiment provides an image processing method, such as Figure 2As shown, Figure 2 A flowchart of an image processing method provided in an embodiment of the present application, the image processing method comprises the following steps:

[0027] S101, obtaining current image data of each picture block in a current frame image and historical image data of each picture block in a previous frame image of the current frame.

[0028] The image processing method provided in the embodiment of the present application can be executed by a terminal device, and the terminal device can be a mobile phone, a tablet computer, a wearable device, a personal digital assistant (PDA), a handheld device with a wireless communication function, etc., as long as the terminal device is a mobile terminal based on a tile based rendering (Tile based Rendering, TBR) architecture or a tile based delayed rendering (Tile base deffered Rendering, TBDR). The TBR architecture is a GPU rendering architecture based on block processing, which is common in mobile GPU designs. TBR is not based on direct full-screen drawing, but divides the screen into tiles (Tiles) one by one. The GPU can draw based on each Tile, and after drawing, the drawing result is written to the frame buffer (Frame Buffer) of the double data rate synchronous dynamic random access memory (Double Data Rate, DDR). That is, the GPU in the terminal device blocks the screen. For example, the size of a Tile can be 8×8 (that is, a combination of 64 pixels is called a Tile), or it can be 16×16, or it can be 32×32.

[0029] In an embodiment of the present application, for each frame of the image, the GPU in the terminal device is based on the TBR architecture and performs block processing, and each frame of the image includes multiple tiles. Taking the terminal device as a mobile phone and the screen resolution of the mobile phone as 1080×1920 as an example, if each tile is 64×64, then 1920 / 64=30, 1080 / 64=17 (rounded up), there are a total of 30×17=510 tiles. The GPU with TBR architecture divides the screen into a tile-based grid, and then renders each tile one by one. The output of each frame of the GPU typically includes color buffer storage (Color buffer) and depth buffer storage (Depth Stencil buffer). As a hardware device, the GPU is connected to a rendering software API, which may be an open graphics library (OpenGL). The GPU obtains image data of each tile in each frame of an image through the interface. The image data includes, but is not limited to, color buffer data and depth buffer data. The image data of each tile includes image data of multiple pixels (for example, 64 pixels, 256 pixels).

[0030] In an embodiment of the present application, since the GPU needs to compare the current frame image with the previous frame image of the current frame to determine the blocks to be updated, the GPU needs to obtain the current image data of each block in the current frame image and the historical image data of each block in the previous frame image from the rendering software interface.

[0031] In an embodiment of the present application, the color buffer storage (Color buffer) is a color buffer for drawing, including color index or RGBA color data, wherein RGBA represents the color space of red (Red), green (Green), blue (Blue) and opacity parameter (Alpha). When drawing a block, the GPU first completes the rendering in a buffer, and then transmits the rendering result to the DPU. The depth buffer storage (Depth Stencil buffer) corresponds to the frame buffer (Frame Buffer), and stores the depth value of each pixel drawn on the screen. The depth value refers to the distance of the pixel from the camera in the three-dimensional (3-dimension, 3D) world, that is, the Z value. The larger the depth value, the farther from the camera. If there is no depth buffer storage, a closer object is drawn first, and then a farther object is drawn. The farther object will cover the closer object because it is drawn later. With the depth buffer storage, the order of drawing objects is not so important. The rendering software interface writes the depth value of the pixel point to the depth buffer storage.

[0032] S102: Determine cache parameters of the image blocks to be updated according to the current image data and historical image data of each image block.

[0033] In an embodiment of the present application, the current hash value of each tile is calculated based on the current image data of each tile; the historical hash value of each tile is calculated based on the historical image data of each tile; the tile to be updated is determined based on the current hash value and the historical hash value of each tile; the cache parameters of the tile to be updated are determined based on the number of tiles to be updated and the coordinate pair index of the tile to be updated. Identification information is added to the cache parameters of the tile to be updated, and the identification information is used to identify the storage location of the tile to be updated. The identification information is a preset identification agreed upon by the system in advance, which facilitates the DPU to read the cache parameters of the tile to be updated according to the identification information. Among them, the tile to be updated represents a tile where there is a difference between the current image data and the historical image data.

[0034] In the embodiment of the present application, although each block includes multiple pixels, each pixel has a color value and a depth value, the GPU is based on the block, and the hash value of each block is calculated using a hash function, that is, the hash value of multiple pixels in each block is calculated. When comparing two adjacent frames (current frame and previous frame), the comparison is also based on the block. If the hash value of the same block in the previous frame image and the current frame image is the same (that is, the current image data and the historical image data are the same), it means that the block has not changed, and the block does not need to be updated, and it is not a block to be updated. If the hash value of the same block in the previous frame image and the current frame image is different (that is, there is a difference between the current image data and the historical image data), it means that the block has changed, and the block needs to be updated, and it is a block to be updated. By comparing the same block in two adjacent frames, the block to be updated is screened out from multiple blocks, and the processing efficiency is improved compared to the comparison scheme of the same pixel.

[0035] In an embodiment of the present application, when displaying video content or image content, each frame of the image can be displayed every preset time period (for example, 16.7ms), that is, the screen is updated and displayed every preset time period, and the time interval between two adjacent frame images is the preset time period. By comparing the hash value changes of the image data of two adjacent frame images, the blocks to be updated are determined, and the number of blocks to be updated can be 0, indicating that the image content of the current frame image is the same as that of the previous frame image. The number of blocks to be updated can also be one or more.

[0036] In some embodiments, the structure of the cache parameters of the tiles to be updated includes a list header and a list valid data group; wherein the list header includes the number of tiles to be updated, the number of pixels in each tile, and the storage space of the list valid data group; the list valid data group includes the coordinate pair index of the tiles to be updated.

[0037] In an embodiment of the present application, a GPU based on a TBR architecture divides the screen into multiple Tiles, and then renders each Tile, and each frame of the image includes a color buffer storage and a depth buffer storage. In the rendering of a frame of image, if the image data (for example, color value or depth value) of at least one pixel among the 8×8 or 16×16 pixels covered by the Tile is updated, then the Tile is called a tile to be updated (Dirty Tile). Based on this, a new buffer storage is added to this scheme, namely, a buffer storage (Dirty Tile buffer) for tiles to be updated, which is used to store the Tile list actually updated and written in this rendered image frame (corresponding to the cache parameters of the tiles to be updated). The Dirty Tile buffer can be used for DPU display or for the GPU in the next rendering process (Render pass). Render pass represents a sub-process of GPU rendering in a frame, including various shader objects in an independent rendering pipeline, etc. For a more complex image (with richer content or higher resolution), the GPU needs to execute multiple Renderpasses when rendering. Each Renderpass corresponds to at least one tile in the frame image. When executing the next Renderpass, the Dirty Tile buffer corresponding to the previous Renderpass needs to be used, and so on, until the last Renderpass is executed, and the final Dirty Tile buffer of the frame image is obtained. The final Dirty Tilebuffer of the frame image can be used for DPU display.

[0038] In an embodiment of the present application, the cache parameters of the tiles to be updated are stored in a list structure, including a list header (header) and a list valid data group (payload), the list header includes identification information (magicId), the number of tiles to be updated (tileNumber), the number of pixels in each tile (tileMode), the screen resolution for displaying image content (fboWidth and fboHeight), and the storage space (payloadSize) of the list valid data group. Among them, the identification information uses a system-predefined identification so that the GPU can identify and read the corresponding cache parameters of the tiles to be updated. The screen resolution is related to the number of divisions of the tiles, which is related to the coordinate pair index of the tiles. The storage space of the list valid data group is related to the maximum number of tiles to be updated that can be stored. The list valid data group includes the coordinate pair index of the tiles to be updated.

[0039] In the embodiment of the present application, the Dirty Tile buffer can be used to accurately identify the Partial Update area actually affected by the rendering. The Partial Update area in this solution is the outline of the object that has changed, and Figure 1 The rectangular area in the middle is the bounding rectangle of the object that has changed. It can be seen that the GPU local rendering process in this scheme is a fine-grained local update scheme. Figure 1 , further saving bandwidth and reducing power consumption.

[0040] Exemplarily, the Dirty Tile Buffer includes two parts: a list header and a list valid data group (payload). The structure definition of the Dirty Tile Buffer Header is as follows.

[0041]

[0042] Exemplarily, unit32_t represents the data type when storing data, which is a 32-bit unsigned type data. t is the abbreviation of type / typedef, which is the data type uniformly set during software coding. The above magicId represents the magic number of the Dirty TileBuffer, which can be understood as the identification information of the Dirty Tile Buffer. The system-predefined identification is used so that the GPU can read the Dirty Tile Buffer, that is, read the cache parameters of the tiles to be updated. TileMode is to parse the size of each Tile. The size of each Tile can be 8×8 (indicated by "0"), 16×16 (indicated by "1"), 32×32 (indicated by "2") or 64×64, etc., representing the number of pixels included in each Tile, that is, each tile includes multiple pixels. TileNumber is to indicate the number of Dirty Tiles in the Dirty Tile Buffer Payload, that is, the number of tiles to be updated. fboWidth and fboHeight are the width and height of the Color Buffer object corresponding to the Dirty Tile Buffer, that is, the screen resolution used to display the image content. For example, if the terminal device is a mobile phone and its corresponding screen resolution is 1920×1080, if each tile is 64×64, then 1920 / 64=30, 1080 / 64=17 (rounded up), and there are a total of 30×17=510 tiles. payloadSize is the size of the payload storage space in the Dirty Tile Buffer. The structured definition of the Dirty Tile Buffer Payload is as follows: Payload stores the coordinate value pairs of the Dirty Tile (corresponding to the coordinate pair index of the tile to be updated).

[0043] In some embodiments, the list valid data group is stored in a sequence of row parameters plus column parameters; or, the list valid data group is stored in a sequence of column parameters plus row parameters.

[0044] In the embodiment of the present application, the list valid data group is a one-dimensional array, and the coordinate pair index is stored sequentially according to the order of rows and columns of each block to be updated, or the coordinate pair index is stored according to the order of columns and rows of each block to be updated. This embodiment of the present application is not limited to this.

[0045] Exemplarily, the coordinate pair index of the tile to be updated (i.e., Tile list) includes: Tile[0,1], Tile[0,2], Tile[1,0], Tile[1,1], Tile[1,2], Tile[2,1]. The list valid data group stores the coordinate sequence of the Tile: {0,1,0,2,1,0,1,1,1,2,2,1}, that is, the sequence is stored according to the row parameter plus the column parameter; or the list valid data group stores the coordinate sequence of the Tile: {1,0,2,0,0,1,1,1,2,1,1,2}, that is, the sequence is stored according to the column parameter plus the row parameter.

[0046] In an embodiment of the present application, by writing a Dirty Tile list based on GPU rendering on a TBR architecture GPU, more accurate local updates can be achieved, thereby achieving greater reductions in power consumption and bandwidth savings.

[0047] S103 . Update and display the image content corresponding to the current frame image according to the cache parameters of the image block to be updated and the current image data of the image block to be updated in the current frame image.

[0048] In an embodiment of the present application, the cache parameters of the tiles to be updated carry identification information, for example, 0XDA55. The identification information is a preset identification pre-agreed by the system. The DPU can read the cache parameters of the tiles to be updated according to the preset identification. The cache parameters of the tiles to be updated include the number of tiles to be updated and the coordinate pair index of the tiles to be updated. According to the number of tiles to be updated, it can be determined whether to update the image content corresponding to the previous frame image. According to the coordinate pair index of the tiles to be updated, the coordinate position of the tiles to be updated can be determined. Combined with the current image data of the tiles to be updated in the current frame image, the image content corresponding to the previous frame image is partially updated with the tiles to display the image content corresponding to the current frame image.

[0049] In an embodiment of the present application, the rendering software interface writes the color values ​​of multiple pixels of each block in each frame of the image into the color buffer storage, and writes the depth values ​​of multiple pixels of each block in each frame of the image into the depth buffer storage, and both the color buffer storage and the depth buffer storage can be in the DDR. The GPU reads the color buffer storage and the depth buffer storage of two adjacent frame images from the DDR, compares the hash values ​​of each block, and determines the cache parameters of the block to be updated. The cache parameters of the block to be updated only mark the coordinate position of the block to be updated, and do not have the image data (color value and depth value) of the block to be updated. Therefore, after the DPU reads the cache parameters of the block to be updated, it is also necessary to obtain the current image data of each block to be updated in the current frame image from the DDR, so as to locally update and display the image content corresponding to the previous frame image. The power consumption is reduced by the local rendering and local update scheme based on the block.

[0050] In an embodiment of the present application, based on the rendering characteristics of the TBR GPU, the Dirty Tile Buffer is displayed and output; based on the Dirty Tile Buffer, the GPU accurately identifies the update area of ​​this rendering; the DPU can achieve precise PartialUpdate refresh, saving bandwidth and reducing power consumption to the greatest extent.

[0051] According to the scheme provided by the embodiment of the present application, the method includes: obtaining the current image data of each block in the current frame image, and the historical image data of each block in the previous frame image of the current frame image; determining the cache parameters of the blocks to be updated according to the current image data and the historical image data of each block; the blocks to be updated represent the blocks where there are differences between the current image data and the historical image data. By comparing the image data difference of the image data of the same block in the previous frame image and the current frame image, the blocks that need to be updated in the current frame image (i.e., the blocks to be updated) are determined. Compared with the local update scheme of the rectangular frame area, the blocks to be updated in this scheme are the outlines of the objects that have changed, and the rectangular frame area is the circumscribed rectangle of the objects that have changed. Therefore, the blocks to be updated are fine-grained local update methods, which saves bandwidth. According to the cache parameters of the blocks to be updated and the current image data of the blocks to be updated in the current frame image, the image content corresponding to the current frame image is updated and displayed. According to the cache parameters of the tiles to be updated, we know which tiles need to be updated. Combined with the current image data of the tiles to be updated, we can only update the tiles to be updated in the previous frame image to display the image content corresponding to the current frame image. For other tiles, there is no need to update them, which reduces power consumption.

[0052] In some embodiments, the cache parameters of the tiles to be updated include the number of tiles to be updated and the coordinate pair index of the tiles to be updated. Figure 2 S103 may also include S1031 and S1032. Figure 3 As shown, Figure 3 An optional step flow chart of another image processing method provided in an embodiment of the present application.

[0053] S1031: If the number of blocks to be updated is zero, continue to display the image content corresponding to the previous frame of image.

[0054] S1032: If the number of the blocks to be updated is not zero, the image content corresponding to the previous frame image is updated according to the coordinate pair index of the blocks to be updated and the current image data of the blocks to be updated in the current frame image to display the image content corresponding to the current frame image.

[0055] In an embodiment of the present application, when the number of blocks to be updated is zero, it means that the image content corresponding to the current frame image is the same as the image content corresponding to the previous frame image. There is no need to update and display the current frame image, and the image content corresponding to the previous frame image can continue to be displayed.

[0056] In an embodiment of the present application, when the number of blocks to be updated is one or more, it means that the image content corresponding to the current frame image is not exactly the same as the image content corresponding to the previous frame image, and only the blocks to be updated in the previous frame image need to be updated to display the image content corresponding to the current frame image.

[0057] It should be noted that the above S1031 and S1032 are two different examples. When the DPU displays the image content of the current frame image, it selects one of the steps to execute according to the number of blocks to be updated.

[0058] In an embodiment of the present application, the GPU stores the Dirty Tile Buffer in the DDR, and the DPU uses the Dirty Tile Buffer in the DDR. The steps for the DPU to perform a Partial Update based on the Dirty Tile Buffer are as follows: read the Header information of the Dirty Tile Buffer to determine whether a refresh is required; if the number of Dirty Tiles is 0, no refresh is required. If the number of Dirty Tiles is not 0, read the Payload of the Dirty Tile Buffer, parse the Dirty Tile list, obtain the Dirty Tile coordinate value pair, and combine the current image data (color value and depth value) of the Dirty Tile in the current frame image to refresh the image content corresponding to the previous frame image and display the image content corresponding to the current frame image.

[0059] In an embodiment of the present application, whether the image content of the previous frame needs to be updated is determined by the number of blocks to be updated, and the outline of the object to be updated is constructed in units of blocks to be updated. Only the blocks that need to be refreshed are updated, which saves bandwidth and reduces power consumption.

[0060] In some embodiments, the above Figure 3S1032 can also be implemented in the following manner: obtaining the maximum number of tiles corresponding to the display screen update command information; if the number of tiles to be updated is greater than the maximum number of tiles, fusing the tiles to be updated to determine the fused tiles; determining the coordinate pair index of the fused tiles according to the coordinate pair index of the tiles to be updated, so that the number of the fused tiles is less than or equal to the maximum number of tiles; updating the image content corresponding to the previous frame image according to the coordinate pair index of the fused tiles and the current image data of the tiles to be updated in the current frame image, so as to display the image content corresponding to the current frame image.

[0061] In an embodiment of the present application, before updating the image content corresponding to the previous frame image, it is also necessary to determine the number of tiles that the display screen can update and display each time (corresponding to the maximum number of tiles) according to the display screen update command information of the terminal device. If the number of tiles to be updated is greater than the number of tiles that the display screen can update and display each time, it is necessary to fuse the tiles to be updated to reduce the number of tiles to be updated. The number of fused tiles after fusion needs to be less than or equal to the number of tiles that the display screen can update and display each time, and the coordinate index of the fused tile is determined based on the coordinate pair index of the tile to be updated, so that the display screen of the terminal device can update the image content corresponding to the previous frame image based on the coordinate index of the fused tile after fusion and the current image data of the fused tile (that is, the current image data of the tile to be updated).

[0062] In an embodiment of the present application, the number of pixels in the fused block is greater than the number of pixels in the block to be updated. For example, the block to be updated is 8×8, and the blocks to be updated are fused to obtain a fused block, and the fused block is 16×16, or 32×32, or 64×64. The current image data of the fused block includes the current image data of multiple blocks to be updated. For example, the block to be updated is 8×8, the fused block is 16×16, and one fused block includes four blocks to be updated, and the current image data of one fused block includes the current image data of four blocks to be updated.

[0063] In an embodiment of the present application, the DPU can construct the update command of the CMD Mode screen for the Dirty Tile list originally Tile by Tile, that is, directly update the image content corresponding to the previous frame image according to the coordinate index of each Tile and the current image data of each Tile one by one to display the image content corresponding to the current frame image; wherein, CMD (command) refers to the command prompt, and the CMD Mode screen is a refresh mode of the terminal device screen. The screen has a built-in random access memory (RAM) to cache data and support local updates of the screen. The DPU can also perform further processing on the Dirty Tile list, for example, merging 8×8 Tiles into 16×16 macroTiles to reduce the number of tiles to be updated, and then construct an update command for the CMD Mode screen based on the fused macro Tiles; wherein, a macro replaces a certain Tile pattern according to a series of predefined rules. Then, the DPU updates the image content corresponding to the previous frame image according to the coordinate index of the fused block and the current image data of the fused block to display the image content corresponding to the current frame image.

[0064] In an embodiment of the present application, the maximum number of tiles corresponding to the display screen update command is obtained. If the number of tiles to be updated is less than or equal to the maximum number of tiles, the image content corresponding to the previous frame image is updated directly according to the coordinate pair index of the tile to be updated, combined with the current image data of the tile to be updated in the current frame image, to display the image content corresponding to the current frame image. If the number of tiles to be updated is greater than the maximum number of tiles, it is necessary to fuse the tiles to be updated and determine the fused tiles to reduce the number of tiles to be updated, so as to ensure that the number of fused tiles is less than or equal to the maximum number of tiles. Thus, the DPU updates the image content corresponding to the previous frame image according to the coordinate pair index of the fused tiles, combined with the current image data of the tile to be updated in the current frame image, to display the image content corresponding to the current frame image. Combined with the display screen update command, the number of tiles to be updated is controlled within the number of tiles that the display screen can update and display each time, so that the DPU can update the image content corresponding to the current frame image based only on the tiles to be updated, thereby reducing power consumption.

[0065] In some embodiments, the image data processing method further includes a step of determining a coordinate pair index of a block and a step of determining a storage space corresponding to the coordinate pair index of the block to be updated, including S201-S203. Figure 4 As shown, Figure 4 A flowchart of optional steps of another image processing method provided in an embodiment of the present application.

[0066] S201, obtaining a screen resolution for displaying image content and rendering architecture parameters for slicing the image content.

[0067] In an embodiment of the present application, the screen resolution used to display the image content is the screen resolution of the terminal device. Exemplarily, taking a mobile phone as an example, its screen resolution can be 1920×1080. The rendering architecture is a TBR architecture. The TBR architecture is a process of subdividing a computer graphics image through a regular grid in optical space and rendering each part of the grid or tile separately. Compared with the immediate mode rendering system that draws the entire frame immediately, the consumption of memory and bandwidth is reduced. The TBR architecture divides the screen into tiles one by one, and the rendering architecture parameters characterize the size parameters of each divided tile during the rendering process. For example, each tile is 8×8, 16×16, 32×32 or 64×64.

[0068] S202, determining the number of multiple tiles in each frame image and the coordinate pair index of each tile according to the screen resolution and the rendering architecture parameters; the coordinate pair index of each tile is used to determine the coordinate pair index of the tile to be updated in the cache parameters of the tile to be updated.

[0069] In an embodiment of the present application, the number of tiles included in each frame image and the coordinate pair index of each tile can be determined according to the screen resolution and the size parameters of each tile. For example, taking the screen resolution of 1920×1080 and each tile of 64×64 as an example, 1920 / 64=30, 1080 / 64=17 (rounded up), there are a total of 30×17=510 tiles. The coordinate pair index of each tile can be represented in the order of rows and columns, for example, Tile[0,0], Tile[0,1], Tile[0,2], Tile[1,0], Tile[1,1], Tile[1,2], etc. Based on this, the coordinate pair index of the tile to be updated follows the coordinate pair indexing method of each tile to indicate the location of the tile to be updated, so that the DPU can be updated at the position of the corresponding tile to display the image content corresponding to the current frame image.

[0070] In some embodiments, the rendering architecture parameters include the number of preset pixels in each tile; Figure 4 S202 can also be implemented in the following way: determining the row parameters according to the horizontal parameters in the screen resolution and the number of preset pixels in each block; determining the column parameters according to the vertical parameters in the screen resolution and the number of preset pixels in each block; determining the number of multiple blocks and the coordinate pair index of each block according to the row parameters and the column parameters.

[0071] In the embodiment of the present application, the horizontal parameter in the screen resolution is divided by the square root of the number of preset pixels in each block, and the divisor is rounded up to obtain the row parameter; the vertical parameter in the screen resolution is divided by the square root of the number of preset pixels in each block, and the divisor is rounded up to obtain the column parameter. The product of the row parameter and the column parameter is used as the number of multiple blocks. Based on the row parameter and the column parameter, the coordinates are marked in a numbering method starting with 0 to obtain the coordinate pair index of each block.

[0072] For example, taking the screen resolution of 24×44 and the number of preset pixels in each block as 8×8, Figure 5 As shown, Figure 5 An exemplary schematic diagram of a tile update list provided in an embodiment of the present application, in Figure 5 In the example, the width and height of the ColorBuffer are 44 and 24 respectively. Figure 5 1056 pixels are shown in the figure; Tile mode is selected as 8×8; ColorBuffer is divided into Figure 5 The Tile grid shown, 44 / 8=6 (rounded up), 24 / 8=3, it should be noted that, Figure 5 If the middle width cannot be divided by the tile width, it must be rounded up. Similarly, the height is handled similarly. Figure 5 The number of multiple tiles shown in is 6×3=18, and their corresponding coordinate pair indexes include Tile[0,0], Tile[0,1], Tile[0,2], Tile[0,3], Tile[0,4], Tile[0,5], Tile[1,0], Tile[1,1], Tile[1,2], Tile[1,3], Tile[1,4], Tile[1,5], Tile[2,0], Tile[2,1], Tile[2,2], Tile[2,3], Tile[2,4], Tile[2,5].

[0073] In the embodiment of the present application, based on the above Figure 5 , the Tile list occupied by the triangle actually drawn in this frame is: Tile[0,1], Tile[0,2], Tile[1,0], Tile[1,1], Tile[1,2], Tile[2,1]. For example, the value of the Header in the Dirty Tile Buffer is as follows:

[0074]

[0075] Exemplarily, the above magicId represents the magic number of the Dirty Tile Buffer, and 0XDA55 represents the identification information of the Dirty Tile Buffer, which is a system-predefined identifier that enables the GPU to read the Dirty Tile Buffer, that is, read the cache parameters of the tiles to be updated. tileMode is used to parse the size of each Tile. "0" means that the size of each Tile is 8×8, indicating that the number of pixels included in each Tile is 64. tileNumber indicates the number of Dirty Tiles in the Dirty Tile BufferPayload, that is, the number of tiles to be updated is 6. fboWidth and fboHeight are respectively the width (44 pixels) and height (24 pixels) of the Color Buffer object corresponding to the Dirty Tile Buffer. payloadSize represents the size of the payload storage space in the Dirty Tile Buffer. Since it is a row and column structure storage method, the coordinate value pairs of the Dirty Tile are stored in the Payload, so payloadSize is 12.

[0076] Exemplarily, based on the value of the above Header, in row-first storage, the value of Payload is as follows: a one-dimensional array stores the coordinate sequence of the Tile: {0, 1, 0, 2, 1, 0, 1, 1, 1, 2, 2, 1}.

[0077] In some embodiments, the structure of the Dirty Tile Buffer can derive some variations, for example, changing row-first storage to column-first storage, and the value of Payload is as follows: a one-dimensional array stores the coordinate sequence of the Tile: {1, 0, 2, 0, 0, 1, 1, 1, 2, 1, 1, 2}.

[0078] S203 . Determine, according to the number of the plurality of tiles, a storage space corresponding to the coordinate pair index of the tile to be updated included in the cache parameters of the tile to be updated.

[0079] In the embodiment of the present application, the number of multiple tiles is the upper limit of the number of tiles to be updated, which determines the storage space corresponding to the coordinate pair index of the tile to be updated. According to the number of multiple tiles, the storage space corresponding to the coordinate pair index of the tile to be updated is determined, which can ensure that the storage space has the function of storing the coordinate pair index of the tile to be updated, and does not waste space memory.

[0080] In an embodiment of the present application, the number of all tiles included in the screen of the terminal device and the coordinate pair index of each tile can be determined based on the screen resolution and the number of preset pixels in each tile. The number of all tiles is the upper limit of the number of tiles to be updated. Based on the number of multiple tiles, the storage space corresponding to the coordinate pair index of the tiles to be updated is determined. While ensuring that all tiles to be updated can be stored, the utilization rate of the storage space is improved.

[0081] In some embodiments, the image processing method also includes a step of storing the coordinate pair index of the tile to be updated: using a predefined data type, the coordinate pair index of the tile to be updated is stored or compressed in the storage space corresponding to the coordinate pair index of the tile to be updated included in the cache parameters of the tile to be updated; wherein the number of bits corresponding to the predefined data type is 2 to the power of N, and N is a positive integer greater than 2.

[0082] In an embodiment of the present application, in the storage space corresponding to the coordinate pair index of the tile to be updated, only the coordinate pair index of the tile to be updated is stored, and the image data (color value and depth value) of the tile to be updated is not involved. The coordinate pair index is only a numerical representation, so the range of values ​​stored is limited, and a data type with a lower number of bits can be used for storage. In other words, since the Dirty Tile Buffer stores the index of the tile, its own numerical range is limited, and it can use uint8_t, uint16_t, or the storage methods listed in the above column such as unit32_t. That is, the predefined data type can be unit32_t, uint8_t, uint16_t, etc. For example, 100 coordinate pair indexes need to be stored in the storage space. If the uint8_t data type is used for storage, 10 bits are required. If the uint16_t data type is used for storage, 20 bits are required.

[0083] In an embodiment of the present application, the Dirty Tile Buffer may also support compressed storage to reduce the occupancy of memory resources.

[0084] In the embodiment of the present application, the storage space can use different data types to store the coordinate pair index of the updated block, which increases the diversity of storage methods. By compressing and storing the coordinate pair index, the memory occupied by resources is reduced and the resource utilization rate is improved.

[0085] In some embodiments, the image processing method also includes the step of providing corresponding configuration to the outside: providing the configuration parameters of the cache parameters of the to-be-updated image block and the configuration parameters corresponding to the to-be-updated rectangular box to be updated to the third-party application; wherein the to-be-updated rectangular box represents the maximum positive circumscribed rectangle corresponding to the to-be-updated area, the area corresponding to the to-be-updated rectangular box is larger than the area corresponding to the to-be-updated area, and the to-be-updated area is the area composed of the to-be-updated image blocks; or, for a preset application scenario, the configuration parameters of the cache parameters of the to-be-updated image block are used to cover the configuration parameters corresponding to the rectangular box to be updated.

[0086] In an embodiment of the present application, the GPU adds a new tile buffer storage (DirtyTile buffer) to be updated on the basis of the original output color buffer storage (Color buffer) and depth buffer storage (Depth Stencil buffer), which is used to store the Tile list actually updated and written in this rendering frame. The GPU is connected to the rendering software interface (Rendering Software API). In order to maintain the compatibility of the API, it not only provides the configuration parameters of the Dirty Tile buffer, that is, the configuration parameters of the cache parameters of the tiles to be updated, to the third-party application (also known as software or program); it also provides the original configuration parameters of the partial update area (Partial Update) to the third-party application, that is, the configuration parameters of the rectangular box to be updated. For the third-party application to select the corresponding configuration parameters according to its actual needs. Since the scheme using the Dirty Tile buffer is lower in power consumption than the scheme using the Partial Update, for the preset application scenario, the configuration parameters of the Dirty Tile buffer are overwritten with the configuration parameters of the Partial Update in the related technology, so that the preset application scenario uses the scheme of the Dirty Tile buffer for image processing, thereby achieving the technical effect of reducing power consumption.

[0087] It should be noted that the preset application scenarios can be appropriately set by those skilled in the art according to actual conditions. For example, for applications whose usage times, usage time or usage users exceed a preset threshold, the scenario of using or opening the above application is set as the preset application scenario. When it is detected that the terminal device is in this scenario, the Dirty Tile buffer solution provided in the embodiment of the present application is used to perform image processing.

[0088] In an embodiment of the present application, a GPU based on a TBR architecture outputs a Dirty Tile Buffer. For a GPU with a TBR architecture, the Tile index can be written out by customizing the GPU manufacturer's Driver Development Toolkit (DDK). Among them, GPU DDK refers to a GPU driver suite, including kernel mode (Kernel Mode Driver, KMD), user mode driver (User Mode Driver, UMD) and other tools, and other analysis and debugging tools can also be packaged into the DDK. The modified part includes: in the code for initializing the frame buffer (Frame Buffer) object, adding the creation of the Dirty Tile Buffer, and applying for storage space of the corresponding size. The size of the storage space can be determined in the following manner: according to the screen resolution and the number of preset pixels in each tile in the rendering architecture parameters, the number of multiple tiles in each frame image is determined, and according to the number of multiple tiles, the storage space for the coordinate pair index is determined.

[0089] In the embodiment of the present application, additional functions are required at the extended API interface of Partial Update to increase the processing of updating Dirty Tile Buffer. To maintain API compatibility, the original PartialUpdate area parameters based on the rectangular frame are retained; the newly added fine-grained PartialUpdate area parameters based on Dirty Tile Buffer can be exposed to third-party applications to call display configuration, and can also cover the coarse-grained Partial Update rectangular frame parameters for the Security Operations Center (SoC) scenario, and only use the fine-grained Dirty Tile Buffer.

[0090] For example, Figure 6 As shown, Figure 6 An exemplary schematic diagram of a rectangular frame to be updated provided in an embodiment of the present application, Figure 6 FIG. 2 shows a rectangular frame to be updated in the related art, which is a rectangular frame surrounded by the upper left point and the lower right point of the object to be updated (teapot). Figure 7 As shown, Figure 7 An exemplary schematic diagram of an area to be updated provided in an embodiment of the present application, Figure 7 The outer contour of the object to be updated in this solution is shown, that is, the area to be updated formed by the blocks to be updated. Figure 6 and Figure 7 This is an example of Partial Update area comparison. Figure 6 The rectangle to be updated shown in Figure 7 The maximum positive circumscribed rectangle of the area to be updated in , Figure 6 The area of ​​the rectangular box to be updated is greater than Figure 7 The area corresponding to the area to be updated.

[0091] The display partial update method based on GPU Tile list provided in the embodiment of the present application can realize accurate Partial Update refresh based on DirtyTile Buffer of DPU, and realize the maximum bandwidth saving and power consumption reduction. For irregular graphics, such as slender, flat, and inclined objects waiting to be updated (or called primitives), the power consumption reduction of Partial Update based on Dirty TileBuffer is more significant. Figure 7 It is a solution that uses the Dirty TileBuffer to identify the local update area. Figure 6 The local update area scheme based on the upper left corner and the lower right corner of the rectangular area can save 40% of the bandwidth.

[0092] In some embodiments, when the rendering architecture parameters do not support slicing of the image content, the image processing method is described above. Figure 2 The process before S101 also includes the following steps: performing network division on both the current frame image and the previous frame image to draw multiple blocks of the current frame image and multiple blocks of the previous frame image.

[0093] In an embodiment of the present application, when the rendering architecture parameters do not support the slicing of image content, that is, the terminal device is a non-TBR architecture. Since the non-TBR architecture is based on direct full-screen drawing, the screen will not be divided into tiles one by one. Therefore, before the GPU of the non-TBR architecture writes out the Dirty Tile Buffer, it is also necessary to divide the screen into tiles one by one (Tiles), and then render based on each Tile. That is, the network division step needs to be performed for each frame of the image, each frame of the image is divided into multiple tiles, and then the hash values ​​of the image data of two adjacent frames of the image are compared, and the Dirty Tile Buffer is output.

[0094] In the embodiment of the present application, for a non-TBR architecture GPU, which can be a GPU on a desktop or server, writing out the Dirty Tile Buffer requires additional steps. This can be achieved by adding a GPU post-processing stage implemented by a compute shader, calculating the difference between the current drawing result and the previous drawing result, and then constructing the Dirty Tile Buffer.

[0095] In the embodiment of the present application, for a terminal device with a non-TBR architecture, the GPU can draw multiple tiles of each frame image by dividing the network for each frame image, and then build a DirtyTile Buffer based on the image data of multiple tiles. Based on the Dirty Tile Buffer, the GPU accurately identifies the update area of ​​this rendering; then, the DPU can implement accurate Partial Update refresh based on the Dirty Tile Buffer. This image processing method can be applied not only to terminal devices with a TBR architecture, but also to terminal devices with a non-TBR architecture, expanding the application scenarios of the image processing method.

[0096] In an embodiment of the present application, for the same scenario (scenario such as watching videos or images), the bandwidth of writing out the Color Buffer rendered by the GPU in the terminal device and the bandwidth of reading in the DPU with Partial Update refresh turned on are tested. For the rectangular frame partial update scheme provided in the related art, the write bandwidth or read bandwidth is similar to the bandwidth calculated based on the API. When the write bandwidth or read bandwidth is significantly lower than the bandwidth calculated based on the API, it means that the scheme adopts the image processing method provided in the embodiment of the present application. Check the operation log to see if there is an auxiliary buffer similar to the Dirty Tile Buffer created and attached to the Frame Buffer object. If there is an additional auxiliary buffer created in the scheme and the auxiliary buffer is attached to the Frame Buffer, it can be said that the scheme adopts the image processing method provided in the embodiment of the present application.

[0097] In order to implement the image processing method of the embodiment of the present application, the embodiment of the present application also provides an image processing device, such as Figure 8 As shown, Figure 8 An optional structural schematic diagram of an image processing device provided for an embodiment of the present application, the image processing device 80 includes: an acquisition module 801, used to acquire current image data of each block in a current frame image, and historical image data of each block in a previous frame image of the current frame; a determination module 802, used to determine cache parameters of the blocks to be updated based on the current image data and historical image data of each block; an update module 803, used to update and display the image content corresponding to the current frame image based on the cache parameters of the blocks to be updated and the current image data of the blocks to be updated in the current frame image.

[0098] In some embodiments, the to-be-updated blocks represent blocks where there are differences between the current image data and the historical image data; the cache parameters of the to-be-updated blocks include the number of to-be-updated blocks and the coordinate pair index of the to-be-updated blocks;

[0099] The updating module 803 is also used to continue to display the image content corresponding to the previous frame image if the number of blocks to be updated is zero; if the number of blocks to be updated is not zero, the image content corresponding to the previous frame image is updated according to the coordinate pair index of the block to be updated and the current image data of the block to be updated in the current frame image, so as to display the image content corresponding to the current frame image.

[0100] In some embodiments, the acquisition module 801 is further used to acquire the maximum number of tiles corresponding to the display screen update command information;

[0101] The determination module 802 is further configured to merge the tiles to be updated to determine the merged tiles if the number of tiles to be updated is greater than the maximum number of tiles; determine the coordinate pair index of the merged tiles according to the coordinate pair index of the tiles to be updated, so that the number of the merged tiles is less than or equal to the maximum number of tiles;

[0102] The updating module 803 is further used to update the image content corresponding to the previous frame image according to the coordinate pair index of the fused image block and the current image data of the image block to be updated in the current frame image, so as to display the image content corresponding to the current frame image.

[0103] In some embodiments, the acquisition module 801 is further used to acquire a screen resolution for displaying image content and rendering architecture parameters for slicing the image content;

[0104] The determination module 802 is further used to determine the number of multiple tiles in each frame image and the coordinate pair index of each tile according to the screen resolution and the rendering architecture parameters; the coordinate pair index of each tile is used to determine the coordinate pair index of the tile to be updated in the cache parameters of the tile to be updated; and according to the number of multiple tiles, determine the storage space corresponding to the coordinate pair index of the tile to be updated included in the cache parameters of the tile to be updated.

[0105] In some embodiments, the rendering architecture parameters include the number of preset pixels in each tile;

[0106] The determination module 802 is also used to determine the row parameters according to the horizontal parameters in the screen resolution and the number of preset pixels in each block; determine the column parameters according to the vertical parameters in the screen resolution and the number of preset pixels in each block; determine the number of multiple blocks and the coordinate pair index of each block according to the row parameters and the column parameters.

[0107] In some embodiments, the image processing device 80 further includes a storage module 804;

[0108] The storage module 804 is used to store or compress the coordinate pair index of the tile to be updated in the storage space corresponding to the coordinate pair index of the tile to be updated included in the cache parameters of the tile to be updated, using a predefined data type; wherein the number of bits corresponding to the predefined data type is 2 to the power of N, and N is a positive integer greater than 2.

[0109] In some embodiments, the image processing device 80 further includes a configuration module 805;

[0110] Configuration module 805 is used to provide the third-party application with the configuration parameters of the cache parameters of the tiles to be updated, and the configuration parameters corresponding to the rectangular box to be updated; wherein the rectangular box to be updated represents the maximum positive circumscribed rectangle corresponding to the area to be updated, the area corresponding to the rectangular box to be updated is larger than the area corresponding to the area to be updated, and the area to be updated is the area composed of the tiles to be updated; or, for a preset application scenario, the configuration parameters of the cache parameters of the tiles to be updated are used to overwrite the configuration parameters corresponding to the rectangular box to be updated.

[0111] In some embodiments, the image processing device 80 further includes a segmentation module 806;

[0112] The division module 806 is used to perform network division on both the current frame image and the previous frame image to draw multiple blocks of the current frame image and multiple blocks of the previous frame image when the rendering architecture parameters do not support block processing of the image content.

[0113] In some embodiments, the structure of the cache parameters of the tiles to be updated includes a list header and a list valid data group; wherein the list header includes the number of tiles to be updated, the number of pixels in each tile, and the storage space of the list valid data group; the list valid data group includes the coordinate pair index of the tiles to be updated.

[0114] In some embodiments, the list valid data group is stored in a sequence of row parameters plus column parameters; or, the list valid data group is stored in a sequence of column parameters plus row parameters.

[0115] It should be noted that the image processing device provided in the above embodiment only uses the division of the above program modules as an example when performing image processing. In actual applications, the above processing can be assigned to different program modules as needed, that is, the internal structure of the device is divided into different program modules to complete all or part of the processing described above. In addition, the image processing device provided in the above embodiment belongs to the same concept as the image processing method embodiment. Its specific implementation process and beneficial effects are detailed in the method embodiment, which will not be repeated here. For technical details not disclosed in the embodiment of this device, please refer to the description of the method embodiment of this application for understanding.

[0116] In the embodiments of the present application, Fig. 9 This is a schematic diagram of the structure of the image processing device proposed in the embodiment of the present application, such as Fig. 9 As shown, the image processing device 90 proposed in the embodiment of the present application includes a processor 901 and a memory 902 storing an executable computer program. The processor 901 is used to implement the image processing method provided in the embodiment of the present application when executing the executable computer program stored in the memory 902.

[0117] In some embodiments, the image processing device 90 may further include a communication interface 903 , and a bus 904 for connecting the processor 901 , the memory 902 , and the communication interface 903 .

[0118] In the embodiment of the present application, the processor 901 may be at least one of an application-specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), a programmable logic device (PLD), a field programmable gate array (FPGA), a central processing unit (CPU), a controller, a microcontroller, and a microprocessor. It is understandable that for different devices, the electronic device used to implement the above-mentioned processor function may also be other, and the embodiment of the present application does not specifically limit it.

[0119] In the embodiment of the present application, the bus 904 is used to connect the communication interface 903, the processor 901 and the memory 902 to achieve mutual communication between these devices.

[0120] The memory 902 is used to store executable computer programs and data. The executable computer program includes computer operation instructions. The memory 902 may include a high-speed RAM memory, and may also include a non-volatile memory, for example, at least two disk memories. In practical applications, the memory 902 may be a volatile memory (volatile memory), such as a random access memory (Random-Access Memory, RAM); or a non-volatile memory (non-volatile memory), such as a read-only memory (Read-Only Memory, ROM), a flash memory (flash memory), a hard disk (Hard Disk Drive, HDD) or a solid-state drive (Solid-State Drive, SSD); or a combination of the above types of memory, and provide the processor 901 with executable computer programs and data.

[0121] In addition, each functional module in this embodiment can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or software functional modules.

[0122] If the integrated unit is implemented in the form of a software function module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this embodiment is essentially or the part that contributes to the prior art or the whole or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) or a processor to perform all or part of the steps of the method of this embodiment. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.

[0123] An embodiment of the present application provides a computer-readable storage medium storing a computer program for implementing the image processing method described in any of the above embodiments when executed by a processor.

[0124] Exemplarily, program instructions corresponding to an image processing method in this embodiment can be stored on a storage medium such as a CD, a hard disk, or a USB flash drive. When the program instructions corresponding to an image processing method in the storage medium are read or executed by an electronic device, the image processing method described in any of the above embodiments can be implemented.

[0125] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of hardware embodiments, software embodiments, or embodiments in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) that contain computer-usable program code.

[0126] The present application is described with reference to implementation flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the process in the flowchart. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0127] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which is implemented in the implementation flow diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0128] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for executing the steps in the flowchart. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0129] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application.

Claims

1. An image processing method, characterized in that: The method comprises: Acquire current image data of each image block in the current frame image, and historical image data of each image block in the previous frame image of the current frame; Determining cache parameters of the image blocks to be updated according to the current image data and the historical image data of each image block; The image content corresponding to the current frame image is updated and displayed according to the cache parameters of the to-be-updated image block and the current image data of the to-be-updated image block in the current frame image.

2. The method according to claim 1, characterized in that The to-be-updated blocks represent blocks where the current image data and the historical image data are different; the cache parameters of the to-be-updated blocks include the number of to-be-updated blocks and the coordinate pair index of the to-be-updated blocks; The updating and displaying of the image content corresponding to the current frame image according to the cache parameter of the to-be-updated block and the current image data of the to-be-updated block in the current frame image includes: If the number of the image blocks to be updated is zero, continue to display the image content corresponding to the previous frame of image; If the number of the blocks to be updated is not zero, the image content corresponding to the previous frame image is updated according to the coordinate pair index of the blocks to be updated and the current image data of the blocks to be updated in the current frame image to display the image content corresponding to the current frame image.

3. The method according to claim 2, characterized in that The updating of the image content corresponding to the previous frame image according to the coordinate pair index of the image block to be updated and the current image data of the image block to be updated in the current frame image to display the image content corresponding to the current frame image includes: Get the maximum number of tiles corresponding to the display screen update command information; If the number of the to-be-updated blocks is greater than the maximum number of blocks, merging the to-be-updated blocks to determine fused blocks; Determine the coordinate pair index of the fused image block according to the coordinate pair index of the image block to be updated, so that the number of the fused image blocks is less than or equal to the maximum number of image blocks; The image content corresponding to the previous frame image is updated according to the coordinate pair index of the fused image block and the current image data of the image block to be updated in the current frame image to display the image content corresponding to the current frame image.

4. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: Obtaining a screen resolution for displaying image content and rendering architecture parameters for slicing the image content; Determine the number of multiple tiles in each frame image and the coordinate pair index of each tile according to the screen resolution and the rendering architecture parameter; the coordinate pair index of each tile is used to determine the coordinate pair index of the tile to be updated in the cache parameter of the tile to be updated; According to the number of the plurality of tiles, a storage space corresponding to the coordinate pair index of the tile to be updated included in the cache parameter of the tile to be updated is determined.

5. The method according to claim 4, characterized in that The rendering architecture parameters include the number of preset pixels in each of the blocks; The determining, according to the screen resolution and the rendering architecture parameter, the number of the plurality of tiles and the coordinate pair index of each tile comprises: Determining a row parameter according to a horizontal parameter in the screen resolution and a number of preset pixels in each of the image blocks; Determining a column parameter according to a longitudinal parameter in the screen resolution and a number of preset pixels in each of the image blocks; The number of the plurality of image blocks and the coordinate pair index of each image block are determined according to the row parameter and the column parameter.

6. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: Using a predefined data type, in a storage space corresponding to the coordinate pair index of the image block to be updated included in the cache parameters of the image block to be updated, the coordinate pair index of the image block to be updated is stored or compressed; The number of bits corresponding to the predefined data type is 2 to the power of N, where N is a positive integer greater than 2.

7. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: Providing the configuration parameters of the cache parameters of the to-be-updated tiles and the configuration parameters corresponding to the to-be-updated rectangular frame to the third-party application; wherein the to-be-updated rectangular frame represents the maximum positive circumscribed rectangle corresponding to the to-be-updated area, the area corresponding to the to-be-updated rectangular frame is larger than the area corresponding to the to-be-updated area, and the to-be-updated area is the area formed by the to-be-updated tiles; Alternatively, for a preset application scenario, the configuration parameters of the cache parameters of the to-be-updated block are used to overwrite the configuration parameters corresponding to the to-be-updated rectangular frame.

8. The method according to any one of claims 1 to 3, characterized in that: Before acquiring the current image data of each picture block in the current frame image and the historical image data of each picture block in the previous frame image of the current frame, the method further includes: When the rendering architecture parameters do not support slicing of the image content, network division is performed on both the current frame image and the previous frame image to draw multiple blocks of the current frame image and multiple blocks of the previous frame image.

9. The method according to any one of claims 1 to 3, characterized in that: The structure of the cache parameters of the tiles to be updated includes a list header and a list valid data group; wherein the list header includes the number of tiles to be updated, the number of pixels in each tile, and the storage space of the list valid data group; the list valid data group includes the coordinate pair index of the tiles to be updated.

10. The method according to claim 9, characterized in that The storage method of the valid data group in the list is a sequence storage of row parameters plus column parameters; Alternatively, the storage method of the list valid data group is a sequence storage of column parameters plus row parameters.

11. An image processing device, characterized in that: The device comprises: An acquisition module, used to acquire current image data of each image block in a current frame image, and historical image data of each image block in a previous frame image of the current frame; A determination module, used to determine the cache parameters of the image blocks to be updated according to the current image data and the historical image data of each image block; The updating module is used to update and display the image content corresponding to the current frame image according to the cache parameters of the image block to be updated and the current image data of the image block to be updated in the current frame image.

12. An image processing device, characterized in that: The device comprises: a memory for storing executable computer programs; A processor, configured to implement the method according to any one of claims 1 to 10 when executing the executable computer program stored in the memory.

13. A computer-readable storage medium, characterized in that: A computer program is stored, which is used to implement the method described in any one of claims 1 to 10 when executed by a processor.

Citation Information

Cited By

  • TBDR rendering method of desktop GPU for mobile graphic application optimization

    CN122415831A

  • A TBDR rendering method of a desktop GPU oriented to mobile graphics application optimization

    CN122415831B