Data processing system

By encoding the sequence of video data frames into multiple blocks in the video processing system and storing them in different locations in the memory area, providing the latest version of the location indication solves the problem of the consumer processing unit reading incompletely written data, achieving ensures stable and efficient data processing.

CN110636309BActive Publication Date: 2024-09-24ARM LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201910519995.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2018-06-22
Filing Date
2019-06-17
Publication Date
2024-09-24
Estimated Expiration
2039-06-17

AI Technical Summary

Technical Problem

In data processing systems, data mixing and artifacts, or even deadlocks, can result when the consumer processing unit attempts to read data output that has not yet been fully written to memory, especially in the case of block-by-block encoding.

Method used

The video processing unit encodes the sequence of video data frames into multiple blocks and stores the encoded data blocks of consecutive frames at different locations in the memory area, providing an indication of the location of the latest version and ensuring that the consumer processing unit only reads fully written blocks. , to avoid data overwriting and confusion.

Benefits of technology

It reduces data processing delays, avoids artifacts and deadlock issues, ensures that the consumer processing unit can successfully decode data blocks, and improves the stability and efficiency of data processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN110636309B_ABST
    Figure CN110636309B_ABST
Patent Text Reader

Abstract

A data processing system. The video data processing system includes a video processing unit that generates a sequence of frames of video data for use by a consumer processing unit of the video processing system. The system also includes a memory (30) that stores the sequence of frames of video data generated by the video processing unit. The video processing unit encodes the frames into blocks of encoded data, stores a particular encoded block of a first frame at a first location (32) of the memory, and stores an indication (34) of the first location. The video processing unit stores a corresponding encoded block of a second frame at a second location (33) and updates the indication (34) to the second location.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to data processing systems and, more particularly, to the generation and consumption of coded data blocks in (eg, video) data processing systems. Background Art

[0002] In a data processing system, a "producer" processing unit can produce (generate) a data stream, which is then used (e.g., processed) by one or more other "consumer" processing units of the data processing system. An example of this is video encoding or decoding. For example, in a video encoding system, a video encoder can encode ("produce") a bitstream representing a sequence of video frames to be displayed that has been captured by a video camera or has been generated by a graphics processor. The encoded bitstream can then be "consumed" by a display processor, for example, for the purpose of displaying the sequence of video frames.

[0003] In such an arrangement, a producer processing unit typically stores the data stream it is producing in appropriate memory that is shared with (and accessed by) the consumer processing unit that is to use the data stream, which then reads the data stream from the memory for use.

[0004] By allowing a consumer processing unit to read and process data output produced by a producer processing unit (e.g., as part of a data flow) that is being produced and written to a shared memory, delays caused by writing data to and reading data from the shared memory can be minimized. In graphics or video processing, this arrangement is known as "front buffer" rendering. This is in contrast to an arrangement in which a producer processing unit has to completely write a data output, such as a frame, before a consumer processing unit can begin to use the data output, for example.

[0005] However, in such an arrangement, a situation may arise where a consumer processing unit attempts to read (a portion of) data that has not yet been fully written to memory. The consumer processing unit may then read both the new and old versions of the data output from memory (e.g., where a new data output is written over an existing data output) and attempt to combine them in some way.

[0006] The mixing of data output using old and new versions can cause many problems in data processing systems. For example, when a consumer processing unit outputs (e.g., for display) such a mixture of data, undesirable artifacts can be caused. In graphics and video processing systems, this effect is called "tearing."

[0007] These problems may be worse when the data output is generated in a block-by-block encoded (e.g., compressed) form, such that a consumer processing unit can only process an element (block) of the data output when it has all the data for an entire block of the data output. In this case, if the consumer processing unit attempts to read only a partially written block, this may cause more noticeable artifacts or errors (e.g., corruption) when using the data output. It may also cause the consumer processing unit to deadlock.

[0008] Therefore, the applicant believes that there is still room for improvement in the handling of data output shared between producing and consuming processing units in a data processing system, especially when the data output is processed and consumed through shared memory. Summary of the invention

[0009] When viewed from a first aspect, the present invention provides a method of operating a video processing system, wherein a video processing unit of the video processing system is operable to generate a sequence of frames of video data for use by one or more consumer processing units of the video processing system, the method comprising the steps of:

[0010] The video processing unit encodes a frame sequence of video data, each frame is encoded into one or more encoded data blocks, and the encoded data blocks of each frame are sequentially stored in a memory area, and the consumer processing unit will read the encoded data blocks from the memory area for processing, while the video processing unit is storing other encoded data blocks of the frame in the storage area;

[0011] The method further comprises the following steps:

[0012] The video processing unit:

[0013] The specific coded data block of the first frame in the frame sequence is stored in the first

[0014] a location; and

[0015] An indication of the first location is stored for the specific coded data block for the consumer to process a single

[0016] Meta is used when reading a specific block of data; and

[0017] The video processing unit stores the coded data block of the second frame corresponding to the specific coded data block of the first frame in the frame sequence at a second position in the memory area different from the first position when storing the coded data block of the second frame corresponding to the specific coded data block of the first frame in the frame sequence; and

[0018] An indication of a location of a coding block in the memory region is updated to the second location.

[0019] When viewed from a second aspect, the present invention provides a video data processing system, the video data processing system comprising:

[0020] a video processing unit operable to generate a sequence of frames of video data for use by one or more consumer processing units of the video processing system; and

[0021] a memory storing a frame sequence of video data generated by the video processing unit;

[0022] The video processing unit includes a processing circuit, which is capable of operating to:

[0023] encoding a sequence of frames of video data, each frame being encoded into one or more encoded data blocks; and sequentially storing the encoded data blocks of each frame in a memory area, wherein the consumer processing unit will read the encoded data blocks from the memory area for processing while other encoded data blocks are being stored in the memory area, while the video processing unit is storing other encoded data blocks of the frame in the memory area;

[0024] Wherein, the processing circuit can also work to:

[0025] storing a particular coded data block of a first frame in the sequence of frames at a first location in the memory area; and

[0026] storing an indication of a first location for the particular encoded data block for use by the consumer processing unit when reading the particular data block;

[0027] wherein the processing circuit is further operable to store the coded data block of a second frame corresponding to a specific coded data block of the first frame in the frame sequence at a second location in the memory area that is different from the first location; and

[0028] An indication of a location of a coding block in the memory region is updated to the second location.

[0029] The present invention relates to encoding and storing video (image) data using a video processing unit of a video data processing system. Video data is generated as a sequence of frames, where each video frame is divided into one or more (preferably multiple) blocks of data (e.g., blocks of pixels of a frame). Each block is encoded separately (and then, for example, decoded separately). The sequence of frames of video data is generated by the video processing unit for use by one or more consumer processing units (e.g., of the video data processing system).

[0030] The video processing unit stores the coded data blocks of the frame sequence in a memory area of ​​the video data processing system. The memory area is used by the video data processing system to store (write) the coded data blocks of the frame and is simultaneously used by the consumer processing unit to read (other) coded data blocks of the frame stored in the memory area.

[0031] Thus, the memory area is used in the manner of, and preferably includes, a "pre-buffer" that is shared between and can be accessed by the video processing unit and one or more consumer processing units simultaneously. This allows a consumer processing unit to read a block of coded data for the same frame from the same memory area before the video processing unit has finished writing the entire frame to the memory area, thereby allowing other blocks of the same (or subsequent) frame to be written to the same memory area while the coded block of the frame is being read by the consumer processing unit.

[0032] For example, such "front buffer" rendering enables the video processing unit to continuously write coded data blocks in a sequence of frames of video data to a memory area while also allowing the consumer processing unit to continuously read the stored coded data blocks starting from the same memory area. This helps reduce the latency of producing and consuming video data frames, for example, as opposed to a system where an entire frame of image data is first submitted to a "back" buffer (producers and consumers cannot access such front and back buffers to store and read data from them at the same time) before being submitted to a "front" buffer (where the image data frame is available for consumption.)

[0033] The method and system of the present invention allow to use a memory area in such a way that, due to a coded data block in a (second) frame corresponding to a previously stored coded data block from another (first frame) in a sequence of frames, the coded data block is stored to a (second) location different from the previously stored data block (which was stored at the first location), instead of overwriting a previous version of the coded data block in the memory. Thus, consecutive (corresponding) data blocks in the sequence of frames are stored in different locations of the same area of ​​the memory.

[0034] This allows a newly encoded data block to be stored (written) to a memory area while a previously encoded and stored data block is being used (read), while retaining valid encoded data blocks in the memory area for use by a consumer processing unit, for example, until the new encoded data block is (e.g., completely written to memory and) available for use.

[0035] The video processing unit also stores an indication of the (first) position of a particular coded block in the memory area. The indication is updated for the second frame (and eg subsequent frames) to provide a new different position of the corresponding block of that frame in the memory area.

[0036] Storing coded data blocks in consecutive frames in a sequence at different locations in the memory area and providing the location of the latest (e.g. completely stored) version of the coded block in the memory area has the effect that consumer processing units attempting to use the coded data block are able to locate (using the indication) available versions of the coded block in the memory area, and at least in preferred embodiments there is always a "complete" (e.g. "valid") version of the coded block available for them, i.e. the consumer processing unit simply uses the indication of the location of the latest version to locate the latest version of the coded block already stored in the memory area. This helps to ensure that the consumer processing unit can successfully decode the coded block, as it avoids the consumer processing unit attempting to read a coded data block that has not been completely stored in the memory area (although the decodable version of the block used may be from a previous frame if the new version of the block has not yet been written to the shared memory area).

[0037] Because the location indication of the most recent valid version of a particular block is used, ensuring that only valid coded data blocks are read for use by one or more consumer processing units helps overcome problems previously encountered when attempting to use partially updated data blocks from a storage location and unwanted artifacts resulting therefrom. Implementing this in a system that produces and consumes coded data blocks also helps overcome issues with data corruption and potential deadlock of one or more consumer processing units when attempting to use partially updated coded data blocks from a storage location.

[0038] The frame sequence of video data encoded by the video processing unit can be generated in any suitable and desired manner, for example, by the video processing unit. In one embodiment, the frame sequence of video data is captured by a video camera. In one embodiment, the frame sequence of video data is generated by a graphics processing unit (e.g., real-time rendering).

[0039] Preferably, the frame sequence of video data that has been generated (eg, by a video camera or a graphics processing unit) is stored (eg, in a memory) for use by the video processing unit when encoding the video data frames into one or more encoding blocks.

[0040] The sequence of frames of video data may be any suitable and desired sequence of video frames.There will be at least two frames in the sequence of source video frames, but preferably there are more than two frames in the sequence of source video frames.

[0041] The first frame and the second frame encoded by the video processing unit in the frame sequence can be any suitable and desired video data frame in the frame sequence. Preferably, the first frame and the second frame are encoded continuously by the video processing unit, that is, the second frame is the next frame to be encoded after the first frame. Therefore, the encoded and stored first frame and the second frame can be adjacent frames in the generated frame sequence and / or adjacent frames in the frame sequence to be consumed (e.g., displayed). However, this may not always be the case, for example, depending on the encoding format used to encode the frame sequence.

[0042] Preferably, the sequence of frames to be encoded is provided in the form of an input frame data stream representing a sequence of frames of video data, which is then encoded in the manner of the invention to provide one or more encoded data blocks (e.g., as an encoded data bitstream), which are then stored in a memory area. The encoded data blocks can then (preferably) be transmitted and decoded (e.g., by a consumer processing unit reading the encoded blocks from the memory area) to provide an output sequence of video frames, e.g., (preferably) for display purposes.

[0043] Thus, preferably, the method comprises (and the video processing unit is operable to) receive a sequence of frames of video data to be encoded, and encode the frames in the manner of the invention to produce one or more encoded data blocks, and then store the encoded data blocks in a memory area.

[0044] The video frames are encoded block by block, e.g., each frame of the encoded video data is divided into individual blocks of pixels (sampling positions) representing various regions (ranges) of the video frame, and then the blocks are individually encoded as blocks of encoded data (e.g., within an encoded video data bitstream). In this way, one or more consumer processing units can use (e.g., identify and decode) each individual block from the encoded video data stored in the memory.

[0045] Thus, preferably, the method comprises (and the video processing unit is operable to) process a frame of video data to divide the video frame into blocks for encoding.

[0046] The video data frame may be encoded (compressed) into one or more blocks using any suitable and desired encoding (compression) technique (eg, using the frame buffer compression techniques described in applicant's patents US 8,542,939 B2, US 9,014,496 B2, US 8,990,518 B2 and US 9,116,790 B2).

[0047] The data blocks into which the video frame is subdivided for the encoding process may be any suitable and desired blocks of the video frame. Preferably, the data blocks are rectangular, for example, square. The rectangular blocks may be of any suitable and desired size. Preferably, the size of each rectangular block is between 4×4 pixels and 64×64 pixels and includes 4×4 pixels and 64×64 pixels, and preferably, the size of each edge of the rectangular block is 2 n pixels, where n is an integer (eg, between 2 and 6, inclusive).

[0048] In one embodiment, a frame of video data is generated (e.g., rendered) as individual data blocks (e.g., by a graphics processing unit). In such "tile-based" rendering, preferably, the generated data blocks include "tiles", e.g., subdivided within the range of a frame, and used (i.e., encoded) by the video processing unit to produce encoded data blocks (which preferably correspond to the generated data blocks).

[0049] A particular coded data block in a first frame of video data may correspond to a corresponding coded data block in a second frame of video data in any suitable and desired manner. Preferably, the corresponding block occupies the same position (e.g., patch) in the second frame of video data as the particular block in the first frame (comprising the same set of data elements). When (e.g., individual) frames are encoded as a plurality of data blocks, preferably, each coded data block in the second frame corresponds to a corresponding coded data block in the first frame. Preferably, each frame in a sequence of frames is encoded as the same set of blocks (e.g., patch).

[0050] The memory area used by the video processing unit to store the encoded data blocks of the frame sequence (and used by one or more consumer processing units when reading the encoded data blocks) can be any suitable and desired memory area that can be accessed by the video processing unit and one or more consumer processing units at the same time (for example, shared between the video processing unit and one or more consumer processing units). Therefore, the memory storing the encoded data blocks can be any desired and suitable memory of the video processing system, such as (preferably) the main memory of the processing unit in question (for example, in the case where there is a separate storage system for the processing unit in question), and / or the main memory of the video processing system, which is shared with other elements such as the main processor (CPU) of the video processing system.

[0051] The memory may be external to the processing unit in question (e.g., off-chip). In a preferred embodiment, the memory is external DRAM. Of course, other arrangements are possible.

[0052] The memory area may be arranged in any suitable and desired manner. Preferably, the memory area comprises a (frame) buffer that can be accessed by the video processing unit and one or more consumer processing units simultaneously (e.g., shared between the video processing unit and one or more consumer processing units).

[0053] The memory area is used both by the video processing unit for storing coded data blocks and by one or more consumer processing units for reading coded data blocks.Thus, preferably, the memory area comprises a (eg single) pre-buffer.

[0054] Preferably, the same memory area is used by the video processing unit for storing all of the one or more coded data blocks of a frame, and preferably for all frames in a sequence of frames encoded and stored in this way. Similarly, preferably, the same memory area is subsequently used by one or more consumer processing units for all of the one or more coded data blocks to be used by one or more consumer processing units, and preferably for all frames in a sequence of frames to be used by one or more consumer processing units.

[0055] Within the memory area, a coded data block in a first frame of video data is stored at a first location, and then a corresponding (i.e., updated version) data block in a second frame of video data is stored at a different second location in the same memory area. Since a different (second) location in the memory area is used to store the newer version of the coded data block (i.e., the coded block from the second frame), a particular coded data block stored at the first location (i.e., the coded block from the first frame) should not and (preferably) is not overwritten when the corresponding (second) coded data block is stored at the second location.

[0056] The first position and the second position in the memory area may be arranged in any suitable and desired manner to avoid that a coded data block from a first frame is overwritten by a corresponding coded data block from a second frame. Preferably, the memory area has capacity to store all coded blocks of a (first) frame (i.e., the entire data output of each frame) and some additional "over-capacity" to store one or more coded blocks of another (e.g., a subsequent (second)) frame.

[0057] This allows the memory area to be able to store all of the coded blocks of a frame at any one time (e.g., complete and decodable versions) so that they are available to the consumer processing unit, for example, when new versions of corresponding data blocks are stored at different locations in the memory area, ensuring that there is "excess capacity" in the memory area to provide an available "second" location to store the coded blocks from the second frame, rather than overwriting the corresponding coded data blocks from the first frame.

[0058] This means that one or more coded data blocks from a first frame may be retained (for use by one or more consumer processing units) while new versions of the corresponding blocks are written to memory, e.g., until a complete new version of the coded data block is available to the one or more consumer processing units. The old version may then be overwritten (e.g., by a corresponding coded block of a subsequent frame).

[0059] The size of the excess capacity of the memory area may depend on the number (e.g., maximum number) of data blocks that the video processing unit is able to process (e.g., encode and store) at any one time (i.e., blocks that are "in flight"). Providing a certain (e.g., finite) amount of excess capacity in the memory area may help minimize the size of the memory area that needs to be provided and managed. However, this may require tracking locations in the memory area that are available for storing newly encoded data blocks, for example, by determining when locations storing previously encoded blocks can be overwritten.

[0060] Thus, in a preferred embodiment, the memory area has the capacity to store (e.g., at least) all of the coded blocks of the first frame and all of the coded blocks of the second frame (i.e., the entire data output of both frames). This helps ensure that there is always an available location for storing a new coded data block, while retaining the corresponding coded data block from the previous frame for use by the consumer processing unit until the new block is completely stored.

[0061] The memory area can be arranged in any suitable and desired manner to store all coded blocks of two frames (a first frame and a second frame). In a preferred embodiment, the memory area comprises two separate memory sub-areas (e.g., a first memory sub-area and a second memory sub-area), which are preferably two separate parts of the same (pre-) buffer.

[0062] Thus, preferably, the method includes (and the video processing unit is operable to) store a particular block of coded data from a first frame in a first sub-region of a memory area, and store a corresponding block of coded data from a second frame in a second sub-region of a memory area (e.g., the video processing unit alternately stores blocks of one frame in one sub-region and blocks of a subsequent frame in another sub-region). The first location is a location in a first memory sub-region and the second location is a location in a second memory sub-region (i.e., each of the first and second frames being processed has a corresponding sub-region in which the video processing unit can store coded blocks of those frames).

[0063] Providing separate (e.g., delineated) memory sub-regions in this way, wherein the coded data blocks (preferably all coded blocks) of a first frame are stored in one of these sub-regions, and the corresponding blocks (preferably all coded blocks) of a second frame are stored in another sub-region, helps to ensure that different (second) locations are provided to store newer coded data blocks. It also helps to avoid having to (correctly) identify a second location that is different from the first location (e.g., which may be required in the same memory region), so that when storing a coded block in the second location, a coded block in the first location is not overwritten.

[0064] Rather, in a preferred embodiment, this is exactly what is accomplished, and the video processing unit may simply alternate ("ping-pong") between the two memory sub-regions when storing corresponding coded data blocks in a first frame and a second (and preferably subsequent) frame, storing the corresponding coded data blocks of the alternating frames in the alternating memory sub-regions.

[0065] When the memory area storing the coded data blocks comprises two separate memory sub-areas, these sub-areas may still be readable by one or more consumer processing units (e.g., at any one time) (by virtue of being part of the same memory area) while other coded data blocks are stored in the memory area (e.g., in any one or each sub-area of ​​the memory area). Thus, preferably, the two separate sub-areas are operable to be read by one or more consumer processing units (e.g., consecutively) while the coded data blocks are stored in the sub-areas so that they can be accessed by the video processing unit and by the consumer processing unit at the same time. This is in contrast to a storage system having a front buffer and a back buffer, where data is only written to the back buffer and read from the front buffer.

[0066] Similarly, one or more consumer processing units (e.g., each) may internally operate to read two separate memory sub-regions (e.g., at any given time) when reading a frame of video data from the memory region. As will be discussed below, the one or more consumer processing units simply use the indication of the storage location of the encoded data block and access the relevant location of the memory region (which may be in either sub-region).

[0067] The two separate memory sub-areas can be arranged in any suitable and desired manner, for example, depending on the manner in which the frame sequence is encoded into data blocks. In one embodiment, the data blocks are encoded using the frame buffer compression techniques described in the applicant's patents US 8,542,939 B2, US 9,014,496 B2, US 8,990,518 B2 and US 9,116,790 B2. Using these techniques, data frames are encoded into one or more ("payload") data blocks stored in a "body" buffer. A "header" buffer stores "header" data, which indicates (e.g., points to) the location in the body buffer where the encoded data blocks are stored.

[0068] Thus, preferably, each of the two separate memory sub-regions comprises a body buffer. Thus, preferably, the memory region comprises two separate body buffers, for example as part of the same front buffer.

[0069] Preferably, all data blocks of a particular frame are stored in the same sub-region, for example, the coded blocks of a first frame are stored in the first sub-region and the coded blocks of a second frame are stored in the second sub-region. Therefore, preferably, each sub-region has (for example at least) the capacity to store all coded blocks of a frame (for example, the entire data output of the frame). Therefore, when the video data frame is encoded as a plurality of coded data blocks and the memory region comprises two separate memory sub-regions, preferably, the method comprises (and the video processing unit is operable to) store all the plurality of coded data blocks of a first frame of video data in the first memory sub-region, and store all the plurality of coded data blocks of a second frame of video data in the second memory sub-region.

[0070] In this case, for a frame of data encoded by the video processing unit, all the encoded blocks of the frame will be written to one memory sub-region. For the next frame in the sequence, all the encoded blocks will be written to the other sub-region, and then for the next frame, all the encoded blocks will be written to the first sub-region, and so on, that is, the video processing unit "reciprocates" between the two sub-regions when storing the encoded frames.

[0071] It should be appreciated that storing all coded blocks of a frame in the same sub-region (and then storing all coded blocks of subsequent frames in another sub-region) is a more manageable system (e.g., compared to a system that decides on a block-by-block basis where to store coded blocks in memory). This is because the video processing unit only needs to know (or be told or select) which sub-region to store the coded blocks for the first frame. Then, for subsequent frames in the sequence of frames, the video processing unit can alternate between the two sub-regions on a frame-by-frame basis, thereby ensuring that the corresponding coded blocks of the second frame are stored in a different location (i.e., in the second sub-region) than the particular coded blocks of the first frame (which are stored in the first sub-region).

[0072] The memory sub-region in which any particular coded data block (or data block of a particular frame) is stored may be determined and set in any suitable and desired manner. In one embodiment, the sub-region for a frame is set by a driver of the video processing unit. Thus, for example, preferably the driver is configured to set state information for the frame, which is used to indicate (to the video processing unit) in which sub-region (e.g., all) coded blocks of the frame are stored.

[0073] In addition to storing a particular coded data block at a first location in the memory area, the video processing unit also stores an indication of the first location. The indication of the second location is stored in the same manner, for example, preferably, for a given coded block, the indication of its storage location is updated so that there is only one valid location indication corresponding to the given coded data block. This allows one or more consumer processing units to locate (and then use) the coded data block.

[0074] The (e.g. updated) indication of the location of the coded data block may be stored in any suitable and desired part of the system. Preferably, the indication of the location of the coded data block is stored in the same memory area as the coded data block. The indication of the location of the coded data block may be stored in any suitable and desired part of the memory area. Preferably, the memory area includes (e.g. another) memory sub-area to store the indication of the location of the coded data block (and preferably, all such indications of the location of the coded data block are stored). Preferably, the sub-area includes a header buffer. Therefore, in a particularly preferred embodiment, the memory area includes two separate sub-areas (e.g. a "body" buffer) storing the coded data block and a separate sub-area (e.g. a "header" buffer) storing the indication of the location of the coded data block.

[0075] The indication of the location of the coded data block may be stored in any suitable and desired format. Preferably, the indication of the location of the coded data block comprises header data. Preferably, the indication of the coded data block comprises a pointer to the location where the coded data block is stored. In an embodiment where the memory area comprises two separate memory sub-areas, preferably, the indication of the location of the coded data block comprises a pointer to the memory sub-area storing the coded video data block.

[0076] Thus, in a preferred embodiment, for example, using the frame buffer compression techniques described in applicant's patents US 8,542,939 B2, US 9,014,496 B2, US 8,990,518 B2 and US 9,116,790 B2, the video processing unit is able to operate by storing coded video data blocks in (e.g., two) "body" buffers and storing a collection of headers in a "header" buffer, where each header points to a corresponding coded block in the body buffer.

[0077] In addition to the location of the coded data block (e.g., in the form of a pointer), the header data may include any suitable and desired information. In one embodiment, the header data of the coded data block includes one or more (preferably all) of the following information: information about the size of the coded block (e.g., stored as a byte size of compressed data), information about how the data in the block is compressed, information about the size of the subdivided compressed block (e.g., stored as a byte size) (e.g., for video encoding formats, it may be possible to decode only a portion of the coded data block).

[0078] The indication of the first position and the second position may be stored (updated) by the video processing unit in any suitable and desired manner. In a preferred embodiment, the indication is stored (updated) only when the corresponding coded video data block is completely stored, so that it is at least available to one or more consumer processing units.

[0079] This may be when the coded data block has been completely stored in the memory area (e.g., in the main memory). However, in the case where the coded block is (e.g., first) stored in a shared cache (accessible by the consumer processing unit), the indication may be stored (updated) when the coded block has been completely stored in the cache. When such a cache includes a cache hierarchy, the indication may be stored (updated) when the coded block reaches a specific level in the cache (i.e., the level from which the consumer processing unit can access the coded block). Thus, in some embodiments, the indication of the coded block may be stored (updated) before the coded block reaches its final position (e.g., in the memory area). For example, in some embodiments, the position indication may be temporarily stored first (e.g., in an on-chip memory) while the coded data block is stored. Then, the position indication (e.g., in the memory area) may be stored (updated) so that once the coded data block has been completely stored (e.g., when a confirmation of the stored coded data block has been received (as described below)), the consumer processing unit may read the position indication.

[0080] This helps allow the one or more consumer processing units to only know "valid" (fully stored) coded blocks of video data, thereby helping to prevent the one or more consumer processing units from attempting to use any coded video data blocks that have not been completely stored in the memory area. Once the indication of the coded block is stored (updated), the one or more consumer processing units are able to use the coded block at the location represented by the indication, knowing that it is valid and ready to be used without causing any problems. Storing (updating) the indication of the location of the coded video data block in this manner also reduces the synchronization required between the video processing unit and the one or more consumer processing units.

[0081] In a preferred embodiment, the method includes (and the memory system is operable to) confirm (e.g., to a video processing unit) that the coded data block has been (e.g., completely) stored so that it is at least available to one or more consumer processing units. Thus, in some embodiments, confirmation may be provided when the coded data block has been completely stored, as described above, for example, when a shared cache is used.

[0082] Providing such a write confirmation allows the video processing unit to store the indication of the position of the coded data block (e.g. only) if the coded data block has been (e.g. completely) stored. Therefore, preferably, the method includes (and the video processing unit is operable to) store (e.g. update) the indication of the (first or second) position of the coded data block once the storage system has confirmed (and preferably in response to the storage system's confirmation) that the coded data block has been (e.g. completely) stored (e.g.) in the memory area.

[0083] In these embodiments, once the indication of the second location at which the corresponding coded data block is stored is updated such that the memory area now stores a complete ("valid") coded data block, the particular coded data block stored at the first location may be overwritten. This is because the memory area now contains a completely stored new version of the coded data block, which is available to one or more consumer processing units via the indication of its location, such that the old version of the coded data block may no longer need to be accessed by the one or more consumer processing units (i.e., because the indication has been updated to the second location).

[0084] In some embodiments, use of a location in a memory area storing an old version of a coded data block to be overwritten by a coded data block (e.g., a subsequent version) may require (implicit or explicit) synchronization between the video processing unit and one or more consumer processing units to confirm that it is safe to overwrite the location. This may be required, for example, when the consumer processing unit has cached an old location indication (e.g., to locate an old version of a coded data block).

[0085] Although the indication is updated to the new (second) location of the newly stored coded data block by providing an indication invalidating the indication of the old (first) version (and validating the new (second) version) at a different storage location, in a preferred embodiment, the indication (at the second location) is updated by storing the indication at the second location in the same location in the memory area as the indication at the first location (e.g., overwriting). This allows a consumer processing unit, when it wishes to use the coded data block, to simply look up its location using the indication so that it will be directed to the latest (e.g., fully written) version of the coded block that it can read. When a newer version of the coded block is available, the indication is updated again so that the consumer processing unit can access the newer version of the coded block.

[0086] When a frame of video data is encoded as multiple data blocks, indications of the locations of the individual encoded data blocks will be stored at a particular location (e.g., known to the video processor and one or more consumer processing units) and updated (e.g., overwritten) each time the individual encoded data blocks are stored in the memory area to display (to the one or more consumer processing units) the locations of new versions of the individual encoded data blocks.

[0087] The one or more consumer processing units may use the one or more coded data blocks stored in the memory area in any suitable and desired manner. At the most basic, the one or more consumer processing units are capable of reading the one or more coded data blocks of the video data frame stored in the memory area and using the indication of the location of the blocks in the memory area to locate the data blocks. Thus, once the indication of the location of the one or more blocks has been stored in the memory area, the one or more consumer processing units are capable of using the one or more coded blocks of the video data frame.

[0088] In a preferred embodiment, the method comprises the following steps: The consumer processing unit (when wishing to use a specific coded data block):

[0089] An indication of a location of a coded data block to be read;

[0090] reading the coded data block from the location in the memory area indicated by the indication of the location of the coded data block; and

[0091] The encoded data block is consumed (eg, displayed and / or otherwise processed).

[0092] Accordingly, preferably, the video data processing system comprises one or more consumer processing units, (e.g. each) consumer processing unit comprising processing circuitry to (when the consumer processing unit wishes to use a particular coded data block) be operable to:

[0093] an indication of a location to read a block of coded data;

[0094] reading the coded data block from the location indicated by the location indication of the coded data block in the memory area; and

[0095] The encoded data block is consumed (eg, displayed and / or otherwise processed).

[0096] Preferably, the consumer processing unit performs these (and any other optional or preferred) steps for each coded block of frames in the sequence of frames that it wishes to use (eg, where appropriate).

[0097] Preferably, the method comprises (and the one or more consumer processing units are operable to) decode one or more encoded data blocks of a frame of video data.

[0098] Since the memory area storing the coded data blocks is configured such that the consumer processing unit can read the coded data blocks from the memory area while the video processing unit is storing other coded data blocks in the memory area, preferably, the method comprises (and the processing circuits of the video processing unit and the consumer processing unit can operate to):

[0099] The consumer processing unit reads one or more encoded data blocks of a frame from a memory area while the video processing unit is storing (writing) one or more other encoded data blocks of the frame in the same memory area.

[0100] The other coded data block stored by the video processing unit may be a data block corresponding to the particular data block read by the consumer processing unit (in a subsequent frame), or it may be another data block in the same frame or a subsequent frame. Thus, the consumer processing unit may read a coded data block from the memory area before the video data frame is completely stored in the memory area, for example, while other coded data blocks of the same frame are being stored in the same memory area.

[0101] Preferably, the one or more consumer processing units (eg, each) are operable to access (eg, the entire) memory area (to read the encoded data blocks therefrom) while the video processing unit is storing the encoded data blocks in the memory area.

[0102] Similarly, when the memory region includes two separate sub-regions (e.g., a body buffer), the consumer processing unit may read a coded data block from one of the sub-regions while the video processing unit is storing other coded data blocks in the same sub-region (e.g., in the case of reading a block in the same frame as the other blocks being stored), or the consumer processing unit may read a coded data block from one of the sub-regions while the video processing unit is storing other coded data blocks in the other sub-region (e.g., in the case of reading a block in a previous frame different from the other blocks being stored).

[0103] When the memory region includes two sub-regions storing coded data blocks, preferably one or more consumer processing units (eg, each) are capable of operating to access either of the two memory sub-regions at any given time.

[0104] The one or more consumer processing units may include any suitable and desired type of processing unit, for example, any processing unit that uses the encoded data block after it is encoded and stored in the memory area. In one embodiment, the consumer processing unit is capable of operating to further process the encoded video data block, for example, to apply visual effects to the video data. Thus, the one or more consumer processing units may include one or more graphics processing units.

[0105] However, in a preferred embodiment, one or more consumer processing units include one or more display processing units, wherein the display processing units may be capable of operating to display (e.g., using encoded video data blocks to) encoded video data blocks, such as displaying a frame sequence of video data.

[0106] Although the coded data blocks for a given frame may be stored in a variety of different places, for example, in either of two sub-regions of the memory area (e.g., the body buffer), one or more consumer processing units simply use the indication of the location of the coded data block to locate the block, as described above. Thus, a consumer processing unit that wishes to use the coded data blocks (e.g., before accessing the data) does not need to know how the memory area is organized or where one or more coded data blocks are stored in the memory area.

[0107] In some embodiments, one or more consumer processing units (e.g., each) can operate to pre-fetch data from a memory (e.g., a translation lookaside buffer). When a memory region storing a coded data block has excess capacity, preferably, one or more consumer processing units (e.g., each) are informed of the arrangement of the memory region (e.g., when the memory region includes two separate sub-regions) so that the consumer processing unit can pre-fetch all necessary information. Therefore, preferably, one or more consumer processing units (e.g., each) can operate to pre-fetch data from two separate memory sub-regions (e.g., a translation lookaside buffer).

[0108] Preferably, one or more consumer processing units (e.g., each) are set (e.g., software switch, such as a flag in the status information) to use two memory sub-regions to access the coded data blocks stored in the two sub-regions (and pre-fetch the data). Alternatively, the hardware block can be configured to: set one or more consumer processing units to use two memory sub-regions to access the coded data blocks stored in the two memory sub-regions (and pre-fetch the data). Therefore, in these embodiments, preferably, one or more consumer processing units know that there are two memory sub-regions where the coded data blocks may be stored.

[0109] There may be only one consumer processing unit using the coded data block, but in a preferred embodiment there may be more than one (multiple) consumer processing units using (preferably) the (same) coded data block. In the case where multiple consumer processing units are reading and using the same coded data block, preferably each consumer processing unit operates in the manner of the present invention (independently of the other consumer processing units).

[0110] In a preferred embodiment, for example when a frame of video data (e.g., each) is encoded into a plurality of data blocks, the present invention is performed for each data block in the frame, i.e., each block in a first frame is encoded and stored in one location (with an associated indication), and then the corresponding block of a second frame is encoded and stored in a different location, and the indication of the location of the stored encoded block is updated accordingly.

[0111] Similarly, the present invention is preferably performed on multiple video data frames in a frame sequence, that is, multiple blocks in one frame of video data are encoded and stored in different positions from the corresponding blocks of the previous frame, the operation is repeated for each consecutive frame in the frame sequence (relative to the previous frame), and the indication of the position of the stored encoded blocks is updated.

[0112] Although the above aspects and embodiments have been described primarily with reference to video processing systems, it will be appreciated that the present invention may be implemented in any suitable and desired data processing system in which a "producing" processing unit generates and stores coded data blocks for use by one or more "consuming" processing units. Thus, in addition to video processing systems, the present invention may also be used in other data processing systems, such as image processing systems and graphics processing systems.

[0113] Thus, when viewed from another aspect, the present invention provides a method of operating a data processing system in which a producer processing unit of the data processing system is operable to produce a sequence of data outputs for use by one or more consumer processing units of the data processing system, the method comprising the steps of:

[0114] The producer processing unit encodes the first data output in the data output sequence, each data output being encoded into one or more encoded data blocks, and sequentially stores the encoded data blocks of each data output in a memory area, from which the consumer processing unit will read the encoded data blocks for processing, while at the same time, the video processing unit stores other encoded data blocks of the data output in the memory area;

[0115] The method further comprises the following steps:

[0116] The producer processing unit:

[0117] The specific coded data block of the first data output in the data output sequence is stored in the storage

[0118] a first position in a device region; and

[0119] For the specific coded data block, an indication of the first position is stored for the consumer processing unit

[0120] Used when reading a specific block of data; and

[0121] The producer processing unit, when storing an encoded data block of a second data output in the sequence of data outputs corresponding to a particular encoded data block of the first data output, stores the encoded data block of the second data output in a second location in the memory area that is different from the first location; and

[0122] An indication of a location of a coding block in the memory region is updated to the second location.

[0123] From another aspect, the present invention provides a data processing system, the data processing system comprising:

[0124] a producer processing unit operable to produce a sequence of data outputs for use by one or more consumer processing units of the data processing system; and

[0125] a memory storing a data output sequence generated by said producer processing unit,

[0126] The producer processing unit includes a processing circuit, which is capable of operating to:

[0127] encoding a sequence of data outputs, each data output being encoded as one or more encoded data blocks; and

[0128] The encoded data blocks of each data output are sequentially stored in a memory area, from which the consumer processing unit will read the encoded data blocks for processing, while the producer processing unit stores other encoded data blocks of the data output in the memory area,

[0129] Wherein, the processing circuit can also work to:

[0130] storing a particular coded data block of the first data output at a first location in the memory area; and

[0131] storing, for the specific encoded data block, an indication of the first position for use by the consumer processing unit when reading the specific data block,

[0132] wherein the processing circuit is further operable to, when storing an encoded data block of a second data output corresponding to a particular encoded data block of the first data output in the sequence of data outputs, store the encoded data block of the second data output at a second location in the memory area different from the first location; and

[0133] An indication of a location of a coding block in the memory region is updated to the second location.

[0134] As will be appreciated by those skilled in the art, these aspects of the invention may (preferably) include, as appropriate: all or one or more of the preferred and optional features of the invention discussed herein. In particular, features described with reference to frames of video data preferably apply equally to data instances; features described with reference to video processing units preferably apply equally to producer processing units; and features described with reference to one or more consumer processing units preferably apply equally to one or more consumer processing units. For example, preferably, (e.g., each) data output in a sequence comprises an array of data, such as a frame of video data.

[0135] Any one or more or all of the processing units of the present invention may be embodied as processing unit circuits, for example, in the form of one or more fixed function units (hardware) (processing circuits), and / or in the form of programmable processing circuits that can be programmed to perform desired operations. Likewise, any one or more or all of the processing units and processing unit circuits of the present invention may be provided as separate circuit elements to any one or more other processing units or processing unit circuits, and / or any one or more or all of the processing units and processing unit circuits may be formed at least in part by shared processing circuits.

[0136] The processing unit may be part of a suitable overall processor, such as a video processor (VPU) or a graphics processor (GPU).

[0137] The processing unit and / or data processing system described in any aspect or embodiment herein may include a system on a chip (SoC), or may be a system on a chip (SoC), or may form part of a system on a chip (SoC).

[0138] In addition to the specific processing units, the data or video processing system of the present invention may also include any suitable and desired elements and units that a data (e.g., video) processing system may include. Therefore, in a preferred embodiment, the data processing system also includes a main (e.g., central) processor. For example, the main processor may execute an application program that requires data (e.g., video) processing by a processing unit of the system data processing system.

[0139] The main processor can send appropriate commands and data to the processing units to control them to perform data processing operations and generate and / or use one or more data streams required by the application program executed on the main processor. To this end, the main processor can execute one or more drivers for the processing units and / or can execute one or more compilers for compiling programs to be executed by the programmable execution units of the processing units.

[0140] In embodiments, the processing unit or system may include: one or more memories and / or memory devices storing data described herein, and / or storing software for performing the processes described herein; and / or, the processing unit or system may communicate with one or more memories and / or memory devices storing data described herein, and / or storing software for performing the processes described herein. The processing unit or system may include a display for displaying images based on a data stream, and / or may communicate with a display for displaying images based on a data stream. The processing unit or system may include a camera that generates an array of data elements, and / or may communicate with a camera that generates an array of data elements.

[0141] The invention may be implemented in any suitable system, such as a suitably configured computer or microprocessor-based system. In a preferred embodiment, the invention is implemented in a computer and / or microprocessor-based system.

[0142] The various functions of the present invention can be implemented in any desired and suitable manner. For example, as required, the steps and functions of the present invention can be implemented in hardware or software. Therefore, for example, unless otherwise specified, the various circuits, functional elements, stages, units and "devices" of the present invention may include suitable one or more processors, one or more controllers, functional units, circuits, processing logic, microprocessor arrangements, etc., to be operated to perform various steps or functions, etc., such as suitable dedicated hardware elements (processing circuits) and / or programmable hardware elements (processing circuits) can be programmed to operate in a desired manner.

[0143] The various steps or functions of the present invention may be replicated and / or performed in parallel on a given processor, etc. Likewise, the various processing units, etc. may share processing circuitry, etc., if desired.

[0144] Depending on any hardware required to perform the above-mentioned specific steps or functions, the system may further include any one or more or all of the common functional units included in the data (eg, video) processing system.

[0145] In a particularly preferred embodiment, the various functions of the present invention are performed on a single data (eg, video) processing platform that generates and outputs the data streams in question.

[0146] Those skilled in the art will also appreciate that all described embodiments of the present invention may suitably include, and do include in an embodiment, any one or more or all of the features described herein.

[0147] The method according to the invention may be implemented at least in part using software (e.g., a computer program). Therefore, other embodiments of the invention include: computer software, which is particularly suitable for executing the method described herein when installed on a data (e.g., video) processor; a computer program element, which includes a computer software code portion for executing the method described herein when the program element is running on a data (e.g., video) processor; and a computer program including a code, which is suitable for executing all steps of one or more methods described herein when the program is running on a data (e.g., video) processor. The data (e.g., video) processor may be a microprocessor system, a programmable FPGA (field programmable gate array), or the like.

[0148] The invention also extends to a computer software carrier comprising such software, which, when used to operate a data (e.g. video) processing device or system comprising a data (e.g. video) processor, causes the device or system to perform the steps of the method of the invention in conjunction with the data (e.g. video) processor. Such a computer software carrier may be a physical storage medium, such as a ROM chip, CD ROM, RAM, flash memory or disk, or may be a signal, such as an electronic signal on a wire, an optical signal or a radio signal such as to a satellite or the like.

[0149] It should also be understood that not all steps of the method of the present invention need to be performed by computer software, and therefore other embodiments need to include computer software, which is installed on a computer software carrier to perform at least one step of the method proposed herein.

[0150] Therefore, the present invention may be suitably embodied as a computer program product for use with a computer system. Such an implementation may include a series of computer-readable instructions fixed on any of the following tangible non-temporary media such as computer-readable media, such as a disk, CD, DVD, ROM, RAM, flash memory or hard disk. It may also include a series of computer-readable instructions that may be transmitted to a computer system via a modem or other interface device, through a tangible medium (including but not limited to optical or analog communication lines) or intangibly using wireless technology (including but not limited to microwave, infrared or other transmission technology). The series of computer-readable instructions embodies all or part of the functionality described previously.

[0151] Those skilled in the art will appreciate that such computer readable instructions may be written in many programming languages ​​for use with many computer architectures or operating systems. In addition, these instructions may be stored using any existing or future memory technology (including but not limited to semiconductor, magnetic or optical), or transmitted using any existing or future communication technology (including but not limited to optical, infrared or microwave). It is contemplated that such a computer program product may be distributed as a removable medium (with a printed document or electronic document (e.g., compressed packaged software, pre-installed with a computer system)), for example, to a system ROM or fixed disk, or distributed from a server or electronic bulletin board over a network (e.g., the Internet or the World Wide Web). BRIEF DESCRIPTION OF THE DRAWINGS

[0152] Various embodiments of the present invention will now be described, by way of example only, with reference to the accompanying drawings, in which:

[0153] Figure 1 An overview schematic diagram showing an embodiment of the present invention is shown;

[0154] Figure 2 schematically illustrates a data processing system that may operate in accordance with an embodiment of the present invention;

[0155] Figure 3 schematically illustrates a memory system that may be used in embodiments of the present invention;

[0156] Figure 4 is a flow chart showing the operation of a video processing unit in an embodiment of the present invention;

[0157] Figure 5 schematically illustrates two frames of video data encoded using an embodiment of the present invention; and

[0158] Figure 6 is a flowchart showing the operation of the display processing unit in an embodiment of the present invention;

[0159] Like reference numerals are used (where appropriate) for like features in the drawings.

[0160] The accompanying drawings illustrate elements of video processing devices and systems related to embodiments of the present invention. As will be appreciated by those skilled in the art, other elements of the video processing devices and systems may not be shown in the accompanying drawings. It should also be noted here that the accompanying drawings are only schematic, for example, even if the elements shown are schematically shown as separate elements in the accompanying drawings, in practice they may also share important hardware circuits. DETAILED DESCRIPTION

[0161] Embodiments of the present invention will now be described in the context of generating and displaying encoded video image data.

[0162] Figure 1 The basic operation of an embodiment of the present invention is shown, which shows the data flow.

[0163] like Figure 1 As shown, the graphics processor 1 generates compressed pixel (image) data. The compressed pixel data to be used to form a video image data frame is encoded (compressed) by the graphics processor 1 and written in the form of compressed pixel data blocks to the memory system 2. The memory system 2 is shared between the graphics processor 1 and the display processor 3 and can be accessed by the graphics processor 1 and the display processor 3.

[0164] The display processor 3 is capable of reading blocks of encoded pixel data from the memory system 2 so that the encoded pixel data can be used to display a frame of video image data.

[0165] The memory system 2 is configured to provide a write acknowledgement once a block of compressed pixel data is written to the memory system 2 by the graphics processor 1 , as will be described in more detail below.

[0166] Figure 2 A data processing system 10 is schematically shown in which the present embodiment (eg, Figure 1 arrangement shown in ).

[0167] like Figure 2 As shown, the data processing system 10 includes a data processing device in the form of a system on a chip (SoC) 11. The system 10 also includes an off-chip (main) memory 12, a display device 13 and a video camera 14.

[0168] The SoC 11 includes a central processing unit (CPU) 15 , a graphics processing unit (GPU) 16 , a video processor 17 , a display controller 18 , an interconnect 19 , and a memory controller 20 .

[0169] For example, Figure 2 The GPU 16 or video processor 17 shown in the system 10 may be operated in accordance with Figure 1 For example, the display controller 18 may be equivalent to the graphics processor 1 shown in FIG. Figure 1 For example, the main memory 12 and the memory controller 20 may be equivalent to Figure 1 The memory system 2 shown in .

[0170] like Figure 2As shown, CPU 15, GPU 16, video processor 17 and display controller 18 communicate with each other via interconnect 19, and communicate with memory 12 via interconnect 19 and storage controller 20. Display controller 18 also communicates with display device 13. Video camera 14 also communicates with SoC 11 via interconnect 19.

[0171] The video processor 17 may read image data (e.g., generated by the GPU 16 or captured by the video camera 14) from the memory 12 and / or from the video camera 14, encode the image data in a block manner, and then output the encoded image data, for example, to be stored in the memory 12 or streamed to another device. For example, the encoded image data may be later retrieved and decoded by the video processor 17, or received and decoded by another device. For example, the decoded image data may be output to the display device 13 for display via the display controller 18 or another device.

[0172] In the present embodiment, it is assumed that the video processor 17 processes frames of video image data and / or portions of a given video frame to generate coded blocks of image (pixel) data. The coded blocks are then stored in a compressed form in a frame buffer within the off-chip memory 12 so that they can be decoded by the display controller 18 and displayed on the display device 13.

[0173] Figure 3 The layout of the memory 30 used in the embodiment of the present invention is schematically shown. Figure 1 and Figure 2 The memory 30 implemented in the data processing system shown (and thus may be equivalent to Figure 1 The memory system 2 shown in Figure 2 The off-chip memory 12 shown in FIG. 1 includes a pre-buffer for storing compressed pixel (image) data. For example, the compressed pixel data may be stored by Figure 1 The graphics processor 1 shown generates or is composed of Figure 2 The video processor 17 shown is then used to encode the stored data. Figure 1 The display processor 3 or

[0174] Figure 2 The display controller 18 shown in FIG.

[0175] Figure 3 The front buffer of the memory 30 shown in FIG. 1 includes a header buffer 31 and two body buffers 32 and 33. The body buffers 32 and 33 are used to store (for example, Figure 1 The graphics processor 1 shown is either Figure 2The header buffer 31 is used to store pointers 34 pointing to the compressed pixel data in the body buffers 32,33.

[0176] For example, the pointer 34 in the header buffer 31 is represented by Figure 1 The display processor 3 shown in or Figure 2 The display controller 18 shown in FIG. 1 uses to identify the location of compressed pixel data to be displayed in one of the body buffers 32, 33. Therefore, in operation, the display processor 3 or the display controller 18 reads the pointer 34 in the header buffer 31, follows the pointer 34 to the location in one of the body buffers 32, 33, and reads the compressed pixel data at that location in the body buffer 32, 33.

[0177] Now refer to Figure 4 and Figure 6 The flowchart shown in Figure 5 The layout of the two video data frames shown in Figure 1 , Figure 2 , Figure 3 The operation of the system shown in . First, the process of generating (rendering, compressing, writing) a frame of image data will be described.

[0178] Figure 4 A flow chart detailing steps for generating compressed pixel data and writing the compressed pixel data to a memory according to an embodiment of the present invention is shown.

[0179] When a frame sequence of video image data is to be generated, the graphics processor 1 ( Figure 1 ) or GPU 16 ( Figure 2 ) starts rendering pixel data (step 101, Figure 4 ). A producer of pixel data (eg, a graphics processor 1 (eg, Figure 1 ) or a video processor 17 (as shown) that encodes the pixel data rendered by the GPU 16 Figure 2 As shown)) is first set up by the (driver) to write the compressed pixel data to (as Figure 3 shown) main buffer "0" 32 (step 102, Figure 4 ).

[0180] Now refer to Figure 5 Describes the process of generating and writing out compressed pixel data for a frame. Figure 5 There is schematically shown two frames 40, 50 of video data in a sequence of frames encoded using an embodiment of the present invention.

[0181] In this embodiment, each frame 40, 50 is rendered, compressed, and written out in "tiles" (dividing the frame into smaller sub-regions). Figure 5 As shown, the first frame 40 in the frame sequence is divided into four blocks 41, 42, 43, 44, and the second frame 50 is divided into corresponding four blocks 51, 52, 53, 54 (usually, a video data frame will include more than four blocks; however, for clarity, Figure 5 Only four tiles are shown in each frame shown in ). Each tile comprises a block (array) of sampling positions (pixels), and the tiles may be of any suitable and desired size, but are typically blocks of 16×16 sampling positions. It will be appreciated that the multiple tiles 41, 42, 43, 44, 51, 52, 53, 54 of the frames 40, 50 may be processed in parallel, for example, on multiple processing cores of the GPU 16 and / or video processor 17, as appropriate.

[0182] For a given patch in a frame (e.g., Figure 5 The generation process starts at (step 103, Figure 4 ) by the graphics processor 1( Figure 1 ) or GPU 16 ( Figure 2 ) and write the rendered tiles into the internal memory (step 104, Figure 4 Then, GPU 1 ( Figure 1 ) or video processor 17 ( Figure 2 ) compressed blocks (step 105, Figure 4 ). The rendered tile pixel data may be compressed according to any suitable desired compression or encoding technique. One such frame buffer compression technique is described in applicant's patents US 8,542,939 B2, US 9,014,496 B2, US 8,990,518 B2 and US 9,116,790 B2.

[0183] The compressed pixel ("payload") data for the tile is then written (e.g., as Figure 1 The main buffer "0" 32 (such as the memory system 2 or the off-chip memory 12) in the memory 30 shown in FIG. Figure 3 ) (step 106, Figure 4 When all compressed pixel ("payload") data for a tile has been written to the main buffer "0" 32, the memory system 2 sends an acknowledgment (eg, Figure 2 shown).

[0184] The producer of compressed pixel data waits for confirmation from the memory system 2 (step 107, Figure 4 ), and then write the corresponding header data into (such as Figure 2 ) header and buffer 31 (step 108, Figure 4 ). The header data of the compressed pixel data block of the mosaic block includes, for example, information about the size of the block, information about how to compress the pixel data, and the location of the compressed pixel data. Figure 3 As shown, a pointer 34 from the header buffer 31 to the body buffer “0” 32 is used to provide the location of the compressed pixel data of the patch in the body buffer “0” 32 .

[0185] The above process is performed for each tile in the frame. For example, a multi-core processor may be used to render, compress, and write out different tiles in parallel with each other. Once all tiles in the frame have been rendered, compressed, and written to the main buffer "0" 32 (step 109, Figure 4 ), the same process is performed on the next frame in the frame sequence.

[0186] However, before processing the next frame, the producer of pixel data (e.g. Figure 1 ) graphics processor 1 or ( Figure 2 The video processor 17 shown in FIG. 1 is first set to switch the writing of the compressed pixel data of the new frame to another main buffer, namely, Figure 3 ) main buffer "1" 33 (step 111, Figure 4 ).

[0187] Writing the compressed pixel data of the new frame to another main buffer "1" 33 prevents the compressed pixel data of the multiple tiles of the current frame in the main buffer "0" 32 (which have pointers 34 pointing to them from the header buffer 31) from being overwritten. This enables the tiles of the current frame to be used as complete blocks of data (e.g., by the display processor 3 ( Figure 1 ) or display controller 18 ( Figure 2 ), and reads following the head pointer 34), thereby avoiding any "tearing" artifacts or data corruption issues (it should be understood that once the compressed pixel data of the new frame has been written to another body buffer (body buffer "1" 33), and the header data in the head buffer 31 has been updated, the compressed pixel data in the body buffer "0" 32 no longer has a head pointer 34 pointing to the data, so subsequent frames can safely overwrite it.)

[0188] Therefore, in the same manner as the first frame, the next frame is subjected to the process of rendering, compressing and writing the compressed image data of the plurality of tiles into the body buffer "1" 33 and writing the header data into the header buffer 31. Figure 5In the second frame 50 shown in FIG. 4 , the video data of the patch A′ 51 corresponding to the patch A 41 in the first frame 40 is encoded and stored in the body buffer “ 1 ” 33 , and its header data is stored in the header buffer 31 .

[0189] When the header data of the new frame is written to the header buffer 31, the header of the coded block in the new frame overwrites the corresponding header data of the corresponding block in the previous frame (for example, Figure 5 The header of the coded data pointing to the patch A' 51 in the second frame 50 is shown to overwrite the header of the coded data pointing to the patch A 41 in the first frame 40). Therefore (as will be referred to below) Figure 6 As described above), when compressed pixel data of a new frame is to be read, new header data is read from the header buffer 31, and the pointer 34 is followed to reach the compressed pixels in the body buffer "1" 33.

[0190] The main buffer for writing compressed pixel data is switched for each frame, and the process of generating a frame having a plurality of blocks of compressed pixel data is repeated in the same manner (step 111, Figure 4 After each frame is generated, it is checked whether all frames in the frame sequence to be rendered have been generated and written out (step 110, Figure 4 ). When the frame sequence has been completed, the process ends (step 112, Figure 4 ).

[0191] The process of consuming (reading, decompressing, displaying) the generated image data frames will now be described. While the image data frames are being written to a single front buffer (although divided into two separate body buffers 32, 33), the image data frames can be consumed while they are being generated, as will be described.

[0192] Figure 6 A flow chart detailing the steps for consuming generated pixel data according to an embodiment of the present invention is shown.

[0193] In general, once the rendered tiles are encoded and stored in memory, they are decoded and reassembled by the display processor 3 or display controller 18 to provide an output frame (eg, for display).

[0194] When the frame sequence of video image data is to be displayed, while the frame sequence of video image data is generated (step 201, Figure 6 ), as referenced above Figure 4 As described above, a consumer of pixel data (eg, a display processor 3 (eg, which decodes compressed pixel data) Figure 1 ) or display controller 18 (as shown Figure 2)) is set (software switch) to read compressed pixel data from the front buffer in the memory 30, that is, by using the header data in the header buffer 31 to determine the location of the compressed pixel data in the appropriate body buffer 32, 33, as shown. Figure 3 As shown (step 202, Figure 6 ).

[0195] In the same manner that the pixel data is rendered, compressed and stored as tiles, the compressed pixel data is read, decompressed and displayed as tiles for display at each frame in the sequence of frames to be displayed. Thus, as will be described, the process of reading, decompressing and displaying the compressed pixel data as tiles is the same and repeated for all tiles in a frame of video image data.

[0196] For a given patch in a frame, the consumption process begins (step 203, Figure 6 ) in display processor 3( Figure 1 ) or display controller 18 ( Figure 2 ) reads the header buffer 31 ( Figure 3 ) in the header data (step 204, Figure 6 The display processor 3 or display controller 18 parses the header data it reads to determine information in the header data of the tile, such as the size of the tile (usually stored as the byte size of the compressed data), how the pixel data is compressed, and the location of the compressed pixel data (step 205, Figure 6 ).

[0197] Using the location of the compressed pixel data for the tile that the display processor 1 or display controller 18 has determined from the header data, the display processor 1 or display controller 18 reads the compressed pixel "payload" data for the tile from the appropriate body buffer 32, 33 (step 206, Figure 6 ).

[0198] It will be appreciated that, due to the way in which the header data is written to the header buffer 31 after all payload data has been stored in the appropriate body buffers 32, 33, the display processor 3 or display controller 18 is only able to read valid and complete blocks of coded pixel data. In the worst case, for example, the display processor 3 or display controller 18 will read an old version of a block of coded data while a new version of the block is being written to another body buffer 32, 33, but at least the block will be valid. The video processor 17 is able to write a block of coded data to the memory 12 while the display processor 3 or display controller 18 is reading the corresponding block of data for the previous frame from the memory 12, and this does not cause a problem because the new blocks of coded data do not overwrite the corresponding blocks of data previously stored. Instead, they are written to another body buffer 32, 33.

[0199] Once the compressed pixel data for the tile has been read from the appropriate master buffer 32, 33, the display processor 1 or display controller 18 uses the information in the header data (e.g., the size of the tile and the manner in which the pixel data was compressed) to decompress the pixel data for the tile (step 207, Figure 6 ).

[0200] The decompressed tile's pixel data is then sent by the display processor 1 or display controller 18 for display on, for example, Figure 2 On the display device 13 shown (step 208, Figure 6 ).

[0201] The above process is performed for each tile in the frame. For example, using a multi-core display processor, different tiles can be read, decompressed and displayed in parallel with each other. Once all tiles in the frame have been read, decompressed and displayed (step 209, Figure 6 ), the same process is performed on the next frame in the frame sequence. Similarly, the process is repeated for each frame in the frame sequence until all frames in the sequence have been displayed (step 210, Figure 6 ).

[0202] If necessary, many variations, modifications and substitutions may be made to the above-described embodiments of the present invention.

[0203] The present embodiment can be used in any desired and suitable data processing system in which a "generating" processing unit will generate and store coded data blocks for use by one or more "consuming" processing units. Therefore, in addition to video processing systems, the present embodiment can also be used in other data processing systems, such as image processing systems and graphics processing systems.

[0204] As can be seen from the above, the present invention, in its preferred embodiment, at least provides an improved mechanism for encoding and storing a sequence of video data frames as coded data blocks when using a "pre-buffer" arrangement, wherein other coded blocks can be read from the same memory area while storing the coded blocks. In a preferred embodiment of the present invention, this is achieved at least by a video processing unit that stores coded data blocks of (e.g., consecutive) data frames from different locations in the memory and indicates the position of each coded block, and when the data blocks in subsequent frames are stored in the memory area, the position indications of each coded block are also stored and updated simultaneously. The consumer processing unit then uses the position indications of the coded blocks to access the coded data blocks for subsequent use (e.g., display).

Claims

1. A method of operating a data processing system, in, The producer processing unit of the data processing system is operable to generate a data output sequence for use by one or more consumer processing units of the data processing system, the method comprising the following steps: The producer processing unit encodes a first data output in a sequence of data outputs, each data output being encoded into a plurality of encoded data blocks, and the producer processing unit sequentially stores the plurality of encoded data blocks of the respective data outputs in a memory area of ​​a memory system, the consumer processing unit reads the encoded data blocks from the memory area for processing, and at the same time, the producer processing unit stores other encoded data blocks of the data output in the memory area; The memory area includes a first memory sub-area and a second memory sub-area, and wherein the first memory sub-area is separated and demarcated from the second memory sub-area, The method further comprises the following steps: The producer processing unit stores all of the plurality of encoded data blocks of a first data output in the sequence of data outputs at a plurality of first locations in the first memory sub-region; The method further comprises, when storing each coded data block of the plurality of coded data blocks of the first data output in the sequence of data outputs: In response to the producer processing unit storing the encoded data block of the first data output in one of the plurality of first locations in the first memory sub-region, the memory system confirms to the producer processing unit that the encoded data block has been stored, so that the encoded data block can be used by at least the consumer processing unit; and In response to the memory system confirming to the producer processing unit that the encoded data block has been stored, the producer processing unit stores an indication of the first position in the first memory sub-region for the encoded data block for use by the consumer processing unit when reading the data block; and The producer processing unit stores all of the plurality of encoded data blocks of the second data output in a plurality of second locations in the second memory sub-area; The method further comprises, when storing each coded data block of the plurality of coded data blocks of the second data output corresponding to one of the plurality of coded data blocks of the first data output in the sequence of data outputs: The producer processing unit stores the encoded data block of the second data output in one of the plurality of second locations in the second memory sub-area; In response to the producer processing unit storing the encoded data block of the second data output in one of the plurality of second locations in the second memory sub-region, the memory system confirms to the producer processing unit that the encoded data block has been stored, so that the encoded data block can be used by at least the consumer processing unit; and In response to the memory system confirming to the producer processing unit that the coded data block has been stored, the producer processing unit updates the indication of the location of the coded data block in the memory to the one of the plurality of second locations in the second memory sub-area, The method further comprises the consumer processing unit: pre-fetching data for the first memory sub-region and the second memory sub-region; Read the position indication of the coded data block; reading a coded data block from a location in the memory area indicated by the coded data block location indication; and Use the encoded data block.

2. The method according to claim 1, further comprising: The following steps are involved: When storing the corresponding coded data block of the second data output to the second position, the coded data block of the first data output stored at the first position is not overwritten.

3. The method according to claim 1 or 2, in, The memory area includes a header buffer storing location indications of coded data blocks.

4. The method according to claim 1 or 2, in, The location indication of the coded data block comprises a pointer to a location where the coded data block is stored.

5. The method according to claim 1 or 2, further comprising: The following steps are involved: The consumer processing unit reads one or more coded data blocks from the memory area, while at the same time, the producer processing unit stores one or more other coded data blocks in the same memory area.

6. The method according to claim 1 or 2, in, The method also includes pre-fetching, by the consumer processing unit, translation-aside buffer data for the first memory sub-region and the second memory sub-region.

7. A data processing system, the data processing system include: a producer processing unit operable to generate a sequence of data outputs for use by one or more consumer processing units of the data processing system; as well as a memory system, the memory system comprising a memory for storing a sequence of data outputs produced by the producer processing unit; The producer processing unit includes a processing circuit, and the processing circuit is capable of operating to: encoding a sequence of data outputs, each data output being encoded into a plurality of encoded data blocks, and storing the plurality of coded data blocks of the respective data outputs in sequence in an area of ​​the memory, the consumer processing unit reading coded data blocks from the memory area for processing, while the producer processing unit storing other coded data blocks of the data outputs in the memory area; The memory area includes a first memory sub-area and a second memory sub-area, and wherein the first memory sub-area is separated and demarcated from the second memory sub-area, Wherein, the processing circuit can also work to: storing all of the plurality of coded data blocks of the first data output at a plurality of first locations in the first memory sub-area; The memory system is further operable to: for each coded data block of a plurality of coded data blocks of the first data output stored by the processing circuit in a plurality of first locations in the first memory sub-region: In response to the producer processing unit storing the encoded data block of the first data output in one of the plurality of first locations in the first memory sub-region, confirming to the producer processing unit that the encoded data block has been stored so that the encoded data block can be used by at least a consumer processing unit; and Wherein, the processing circuit can also work to: In response to the memory system confirming to the producer processing unit that the encoded data block has been stored, storing, for each encoded data block in the plurality of encoded data blocks, an indication of the first position in the first memory sub-region for use by the consumer processing unit in reading the data block; Wherein, the processing circuit can also work to: storing all of the plurality of coded data blocks of the second data output in a plurality of second locations in the second memory sub-area; When the processing circuit stores each coded data block of the plurality of coded data blocks of the second data output corresponding to one of the plurality of coded data blocks of the first data output in the data output sequence: The processing circuitry is further operable to store the encoded data block of the second data output at one of the plurality of second locations in the second memory sub-region; The memory system is operable to, in response to the producer processing unit storing the encoded data block of the second data output in one of the plurality of second locations in the second memory sub-region, confirm to the producer processing unit that the encoded data block has been stored, so that the encoded data block can be used by at least the consumer processing unit; and The processing circuitry is further operable to update the indication of the location of the coded data block in the memory to the one of the plurality of second locations in the second memory sub-region, Wherein, the data processing system includes one or more consumer processing units, and the consumer processing unit includes a processing circuit, and the processing circuit is capable of operating to: pre-fetching data for the first memory sub-region and the second memory sub-region; Read the position indication of the coded data block; reading a coded data block from a location in the memory area indicated by the coded data block location indication; and Use the encoded data block.

8. The data processing system according to claim 7, in, The processing circuitry of the producer processing unit is operable to: When storing the corresponding coded data block of the second data output to the second position, the coded data block of the first data output stored at the first position is not overwritten.

9. The data processing system according to claim 7 or 8, in, The memory area includes a header buffer storing location indications of coded data blocks.

10. The data processing system according to claim 7 or 8, in, The location indication of the coded data block comprises a pointer to a location where the coded data block is stored.

11. The data processing system according to claim 7 or 8, in, The processing circuitry of the one or more consumer processing units is operable to: One or more coded data blocks are read from the memory area while at the same time the producer processing unit stores one or more other coded data blocks in the same memory area.

12. The data processing system according to claim 7 or 8, in, The processing circuitry of the one or more consumer processing units is operable to: Pre-fetching translation-lookaside buffer data for the first memory sub-region and the second memory sub-region.

13. A computer-readable storage medium storing computer software code which, when executed on a data processing system, performs the method according to any one of claims 1 to 6.