The invention relates to graphics processing, and, in particular, to a graphics system and a method for generating dirtiness information to indicate a damaged region between the frames of image data in a graphics system.
Mobile devices on the market are usually equipped with graphics systems such as a graphics processing unit for rendering and composing image data with multiple frames. Conventionally, the graphics system also includes a compositor to generate a resulting image according to the frames of the image data.
Conventionally, the graphics system also performs a dirty region calculation to identify dirty regions, which describe screen regions been changed, to track screen updates. However, the dirty region calculation in a conventional graphics system is not precise enough, so the compositor may waste time recomposing unnecessary regions even if only parts of the regions have been changed. For example, in cases where video data is being played on a webpage, only the frames of the video data are changed. The dirty regions, however, may be identified as all regions of whole webpage rather than just the regions of the video data. In such cases, the compositor needs to retrieve all pixels of the dirty regions of the frames from the frame buffer when generating a resulting image and thus the time that it takes to recompose regions other than the regions of the video data is wasted.
Accordingly, there is demand for a graphics system and an associated method for precisely identifying dirty regions between frames of image data to solve the aforementioned problem.
A detailed description is given in the following embodiments with reference to the accompanying drawings.
In an exemplary embodiment, a method for generating dirtiness information indicating dirty regions between frames of image data in a graphics system is provided. The method includes the steps of: dividing each of the frames of the image data into a plurality of regions; obtaining a respective checksum of each region in the frames; and generating dirtiness information for each frame of the image data according to the respective checksum of each region of a current frame and a previous frame.
In another exemplary embodiment, a graphics system is provided. The graphics system includes a graphics processing unit (GPU) and a dirtiness information generator. The graphics processing unit (GPU) is configured to divide each of the frames into a plurality of regions. The dirtiness information generator is configured to obtain the checksum of each region of the frames, and generate the dirtiness information of each frame of the image data according to the respective checksum of each region of a current frame and a previous frame.
Other aspects and features of the present invention will become apparent to those with ordinary skill in the art upon review of the following descriptions of specific embodiments of the graphics systems for carrying out the methods for generating dirtiness information in images having multiple frames.
The invention can be more fully understood by reading the subsequent detailed description and examples with references made to the accompanying drawings, wherein:
This description is made for the purpose of illustrating the general principles of the invention and should not be taken in a limiting sense. The scope of the invention is best determined by reference to the appended claims. It should be understood that the embodiments may be realized in software, hardware, firmware, or any combination thereof.
In an embodiment, the GPU 130 may comprise a dirtiness information generator 132. In some other embodiments, the dirtiness information generator 132 is a stand-alone circuit that is external to the GPU 130. The dirtiness information generator 132 can be configured to generate dirtiness information according to the graphics data such as image data with a plurality of frames. For example, each of the frames of the image data is divided into a plurality of regions, and each region has a respective checksum (e.g. a hash value or a CRC value) that is determined by either the processor 110 or the GPU 130 or both. The divided regions can be equally-sized tiles or blocks or non-equally-sized tiles or blocks. Each frame can be divided in the same way. In addition, the frames to be rendered can be stored in the memory unit 140, e.g., in the volatile memory 141. The dirtiness information generator 132 may obtain the respective checksum of each region of the frames from the volatile memory 141, and generate dirtiness information for each region of the frames according to the checksums of regions of the frames. In one embodiment, each frame and its respective checksums can be stored in the same frame buffer. In another embodiment, each frame and its respective checksums can be stored in different frame buffer. For example, the frame can be stored in a first frame buffer, and the respective checksums can be stored in a second frame buffer.
In an embodiment, the display 150 may comprise a compositor 151. In some other embodiments, the compositor 151 is a stand-alone circuit that is external to the display 150. The compositor 151 can be configured to generate a resulting blended image or a frame according to the graphics data such as a plurality of frames or overlay image layers. The compositor 151 may obtain the respective dirtiness information of each region of the frames from the volatile memory 141, and generate a blended image according to the dirtiness information of each region of the frames.
In an embodiment, each of the frames is divided into a plurality of regions, and each region of the frame also includes a plurality of pixels. The respective pixel data that is associated with each pixel of the frames can be stored in one or more frame buffers of the graphics system. In some embodiments, each region in the frames has its own checksums, and the respective checksums associated with each region of the frames can be determined according to the pixel data associated with the pixels of the region of the frames by using a checksum algorithm such as cyclic redundancy checks (CRC), Fletcher's checksum, Adler-32 and so on. For example, in one embodiment, the checksum is a CRC (e.g., a 16-bit or 32-bit CRC) and the checksum of a specific region of a current frame can be determined by applying a CRC checking algorithm to the pixel data associated with the pixels of the specific region of the current frame. In another embodiment, the checksum of the specific region of the current frame can be the output of a hash function applied to the pixel data associated with the pixels of the specific region in the specific region. Generally, regions with the same checksum are identical.
It should be noted that a detailed description of checksum algorithms and checksum generation is omitted herein for brevity since it is beyond the scope of the application, and reference may be made to any checksum algorithm well-known by those who are skilled in this technology.
The dirtiness information generator 132 makes a determination as to whether each region has undergone a change between the current frame and a previous frame based on the respective checksums. It should be understood that, the frames are sequentially displayed according to a display order and the current frame is to be displayed next to the previous frame. That is, the previous frame comes before the current frame. If a region has changed (i.e., the display content of the region in the current frame is different from the display content of the region in the previous frame), then the dirtiness information generator 132 indicates that the region is a dirty region. If the region hasn't changed (i.e., the display content of the region in the current frame is the same as the display content of the region in the previous frame), then the dirtiness information generator 132 indicates that it is a non-dirty region. For comparing a region in the current frame with its corresponding region in the previous frame, the dirtiness information generator 132 only compares the checksums (e.g., CRC values or hash values) of the regions being compared to determine if a region has changed. For subsequent frames, the stored checksum of each region is compared against the checksum of the corresponding region and if they match each other, the dirtiness information generator 132 may generate corresponding dirtiness information indicating that the region being compared is a non-dirty region.
When the pixel values associated with a certain region in a current frame are different from the pixel values associated with the same region in a previous frame (frame at an earlier time) (e.g., the certain region in the current frame has changed from what it was in that previous frame), the checksum of the certain region in the current frame is different from the checksum of the certain region in the previous frame so that the dirtiness information associated with the certain region in the current frame indicates that the pixels in the certain region are dirty. Accordingly, the pixel values associated with the certain region in the current frame are required to be retrieved to update the display 150. In contrast, when the pixel values associated with the certain region in the certain frame are the same as the pixel values associated with the same region in a previous frame, the checksum of the certain region in the current frame is the same as the checksum of the certain region in the previous frame so that the dirtiness information associated with the certain region in the current frame indicates that the pixels in the certain region are non-dirty. Accordingly, for display 150, it is not necessary to retrieve the pixel values associated with the certain region in the current frame, and it can be skipped.
The compositor 151 may then obtain the respective dirtiness information of each region of the frames from the volatile memory 141, and generate a blended image according to the dirtiness information of each region of the frames.
It should be noted that the compositor 151 may determine whether to retrieve or skip pixel data of each region of the frames from the respective frame buffers according to the retrieved dirtiness information associated with each region of the frames. In an embodiment where the respective dirtiness information of a specific region of the frame indicates a non-dirty region, the compositor 151 may skip data access of the specific region in the frames. In contrast, when the dirtiness information of a specific region in the frames indicates a dirty region, the compositor 151 may retrieve data of the specific region in the frames.
When the dirtiness information of any region of any frame in the frames indicates a non-dirty region, the compositor can skip retrieving pixel values of the non-dirty region of the frame. Specifically, when the dirtiness information associated with a certain region of a current frame indicates that the pixels in the region are dirty, it indicates that the pixel values associated with the certain region in the current frame are different from the pixel values associated with the same region in a previous frame. Accordingly, the pixel values associated with the certain region for the certain frame are required to be retrieved to update the display 150. In contrast, when the dirtiness information associated with a certain region of a current frame indicates that the pixels in the region are non-dirty, it indicates that the pixel values associated with the certain region in the certain frame are the same as the pixel values associated with the same region in a previous frame. Accordingly, it is not necessary to retrieve the pixel values associated with the certain region in the current frame, and it can be skipped.
In addition, the checksums associated with all of the regions in the frames can be stored in one or more frame buffers of the graphics system 100. For example, the volatile memory 141 may include a plurality of partitions, and each partition can be regarded as a frame buffer, and the respective checksums associated with each region of the frames can be stored in one or more frame buffers of the graphics system 100. The frame buffers storing the checksum of each region of the frames can be the same as those storing the pixel data of each region of the frames. Alternatively, the frame buffers storing the checksum of each region of the frames can also be different from those storing the pixel data of each region of the frames.
It should be understood that the components described in the embodiment of
In step S308, the respective dirtiness information of each region of the current frame is generated according to the checksums of each region in the frames. Embodiments in connection to
In step S402, each of the frames is divided into a plurality of regions, where each region can include a plurality of pixels. Step S402 may be performed by GPU 130 in
In step S404, respective pixel data associated with each pixel of the frames are stored in at least one of one or more frame buffers in the graphics system 100. It should be noted that the aforementioned pixel data may include the pixel value of the pixel. Step S404 may be performed by GPU 130 in
In step S406, the respective CRC values associated with each region in the frames are obtained according to the pixel data associated with the pixels in each region of the frames. Step S406 may be performed by GPU 130 in
In step S408, the respective CRC values associated with each region in the frames are stored into at least one of the one or more frame buffers of the graphics system 100. It should be noted that the respective CRC value associated with each region in each of the frames can be stored into the same frame buffer, or into different frame buffers. Step S408 may be performed by GPU 130 in
In step S410, the respective CRC value of each region in each of the frames is retrieved from the at least one of the one or more frame buffers. Step S410 may be performed by the dirtiness information generator 132 in
In step S412, it is determined whether a specific region of the regions in the frames is a dirty region or a non-dirty region according to the retrieved CRC values associated with each region in the frames being compared. Step S412 may be performed by the dirtiness information generator 132 in
In step S414, dirtiness information associated with each region of the frames is generated according to the comparison result. Step S414 may be performed by the dirtiness information generator 132 in
Taking regions 21 and 22 in frame 230 as shown in
After the dirtiness information associated with each region of the frames are generated, the respective dirtiness information associated with each region of the frames may further be stored into the one or more frame buffers of the graphics system 100 and the compositor 151 may retrieve dirtiness information associated with each region of the frames and determine whether to retrieve or skip the pixel data of each region of the frames from the at least one of the one or more frame buffers according to the retrieved dirtiness information associated with each region of the frames. The compositor 151 may then generate a resulting image (e.g., a blended image) according to the retrieved regions of the frames. For example, when the dirtiness information of a specific region indicates a dirty region, the compositor 151 retrieves the data of the specific region from the one or more frame buffers. Conversely, when the dirtiness information of the specific region indicates a non-dirty region, the compositor 151 can skip data access of the specific region from the one or more frame buffers.
In view of the above embodiments, a graphics system and an associated method for generating dirtiness information of data image composed of a plurality of frames are provided. The dirtiness information generator of the graphics system may retrieve the respective checksum of each region of the frames of image data when reading the pixel data of each region of the image from the frame buffer, and provide dirtiness information to indicate which region has been changed or damaged between the frames according to a comparison of the respective checksums of the regions of the frames of image data. For example, when the checksum of a specific region of a current frame of the image data is the same as the checksum of a corresponding region of a previous frame of the image data, the dirtiness information generator generates the dirtiness information indicating that it is a non-dirty region for the specific region. When the checksum of a specific region of the current frame of the image data is different from the checksum of a corresponding region of the previous frame of the image data, the dirtiness information generator generates the dirtiness information indicating that it is a dirty region for the specific region. The compositor can then skip data access of particular regions (i.e., the non-dirty regions) of the frame according to the dirtiness information associated with each region of the frames of image data to avoid wasting time recomposing the regions of the frame that haven't been changed. Accordingly, the dirty regions or damaged regions between the frames can be set appropriately, thus providing efficient partial updating on only the necessary regions between frames and enabling the compositor to recompose only parts of the surface that have changed so as to significantly reduce the number of data accesses to the frame buffer and reduce the required memory bandwidth.
The embodiments of methods for generating dirtiness information indicating dirty regions between frames of image data in a graphics system that have been described, or certain aspects or portions thereof, may be practiced in logic circuits, or may take the form of program code (i.e., instructions) embodied in tangible media, such as floppy diskettes, CD-ROMS, hard drives, or any other machine-readable storage medium, wherein, when the program code is loaded into and executed by a machine such as a smartphone, a mobile phone, or a similar device, the machine becomes an apparatus for practicing the invention. The disclosed methods may also be embodied in the form of program code transmitted over some transmission medium, such as electrical wiring or cabling, through fiber optics, or via any other form of transmission, wherein, when the program code is received and loaded into and executed by a machine, the machine becomes an apparatus for practicing the invention. When implemented on a general-purpose processor, the program code combines with the processor to provide a unique apparatus that operates analogously to specific logic circuits.
While the invention has been described by way of example and in terms of the preferred embodiments, it is to be understood that the invention is not limited to the disclosed embodiments. On the contrary, it is intended to cover various modifications and similar arrangements as would be apparent to those skilled in the art. Therefore, the scope of the appended claims should be accorded the broadest interpretation so as to encompass all such modifications and similar arrangements.
This application is a Continuation-In-Part of application Ser. No. 15/137,418, filed on Apr. 25, 2016, which claims the benefit of provisional Application No. 62/157,066, filed on May 5, 2015.
Number | Date | Country | |
---|---|---|---|
62157066 | May 2015 | US |
Number | Date | Country | |
---|---|---|---|
Parent | 15137418 | Apr 2016 | US |
Child | 15334258 | US |