Decoding a data array
By identifying specific missing bit patterns and selecting appropriate adjustment schemes, the problem of image quality degradation in lossy compression decoding is solved, and the stability and accuracy of image quality after multiple encoding/decoding cycles are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ARM LTD
- Filing Date
- 2021-10-09
- Publication Date
- 2026-06-02
AI Technical Summary
Existing lossy compression schemes may cause image quality to continue to deteriorate after each encoding/decoding cycle during the decoding process, and missing bit patterns introduce problematic behavior, affecting image quality stability.
By identifying specific missing bit patterns through the decoder, selecting appropriate adjustment schemes to avoid problematic behavior, and applying different rounding adjustment schemes to fill missing bits, the image quality is ensured to remain stable after multiple encoding/decoding cycles.
The improved decoding operation provides more accurate decoded data values, preventing image quality from deteriorating during the encoding/decoding cycle and ensuring the stability and accuracy of image quality.
Smart Images

Figure CN114363625B_ABST
Abstract
Description
Background Technology
[0001] The technology described herein relates to methods and apparatus for determining data values for use by a data processing system based on data that has been (e.g., in a compressed format) encoded, and more specifically, to methods and apparatus for determining data values for graphics processing based on encoded image data.
[0002] Data processing systems typically store the generated image data in a frame buffer. The frame buffer usually contains a complete set of data for, for example, the frame (image) to be displayed, including, for example, the color value of each pixel within that frame. A suitable display controller can then read the contents of the frame buffer and use the image data stored therein to drive the display to show the desired frame (image).
[0003] However, the storage and access of image data in the frame buffer (“frame buffer data”) can place relatively high demands on the storage and / or bandwidth resources of, for example, data processing systems (or conversely, lead to performance degradation when such demands are not met).
[0004] To reduce the burden on data processing systems, it is desirable to be able to store such frame buffer data in a “compressed” format. This is particularly needed in data processing devices such as portable devices (where processing resources and power may be relatively limited), such as digital cameras or mobile devices that include such cameras (e.g., smartphones, tablets, HMDs (head-mounted displays)).
[0005] Similar considerations apply to various other situations where it is desirable to reduce the amount of data required to store and / or transmit a message.
[0006] In the context of graphics processing, another example would be storing texture data, for instance, as an array of texture elements (or “texels”), each representing a given texture data value (such as color, brightness, etc.), which can then be mapped to the corresponding sampling location (pixel) in the generated rendered output. Again, the storage and access to this texture data can impose relatively high storage and / or bandwidth requirements on the data processing system.
[0007] Therefore, it is common practice to encode arrays of data elements (such as arrays of image data values) to compress the data, thereby reducing bandwidth and memory consumption. When a data processing system subsequently needs such data that has been stored in this compressed form, the compressed data must be decoded before it can be used, for example, to determine the original (i.e., uncompressed) data values in a format that can then be used by the data processing system.
[0008] To address this, various data compression schemes have been developed. Some data compression schemes encode data in a lossless manner, allowing the original array of data elements to be perfectly reconstructed from the encoded data. This is desirable for applications where maintaining data fidelity is particularly important.
[0009] However, for other applications, sacrificing some data fidelity may be acceptable, and it may be more desirable to be able to (for example) guarantee a given bandwidth (bit rate). Therefore, other data compression schemes can encode data packets of a fixed size.
[0010] In this case, compression of fixed-size data blocks is inherently "lossy" because once a fixed-size data block is full, any remaining bits are then not included in the data block, and these bits are thus effectively discarded, resulting in the loss of information associated with the discarded bits. This means that the original data value cannot (generally speaking) be perfectly constructed from the encoded data.
[0011] However, the applicant has recognized that problems may still exist when decoding data that has been encoded using such lossy compression schemes, and therefore, there is still room for improvement in the arrangement of data values for determining the data elements of the data element array based on the encoded representation of the data element array (i.e., for decoding data, especially data that has been encoded using lossy compression schemes). Attached Figure Description
[0012] Various embodiments of the technology described herein will now be described by way of example only, with reference to the accompanying drawings, wherein:
[0013] Figure 1 An example of a data processing system in which the techniques described herein can be implemented is illustrated schematically;
[0014] Figure 2 The decoder operation is schematically illustrated in an embodiment in which the techniques described herein can be implemented;
[0015] Figure 3 Showing from Figure 2 An example of the output pixels of the initial entropy decoding step in the decoder operation;
[0016] Figure 4 Decoder operation according to the embodiments of the technology described herein is shown in more detail;
[0017] Figure 5 Decoder operation according to another embodiment of the technology described herein is shown;
[0018] Figure 6 It shows Figure 5 The corresponding encoder operation of the illustrated implementation scheme; and
[0019] Figure 7 The document illustrates how encoding hints, according to the techniques described herein, can be stored within an array of data elements.
[0020] Where appropriate, similar reference numerals are used for similar elements in the accompanying drawings. Detailed Implementation
[0021] A first embodiment of the technology described herein includes a method for determining the data values of data elements in a data element array based on the encoded representation of the data element array.
[0022] Each data element in the data element array is associated with one or more corresponding data values, and each data value is represented by a corresponding bit sequence.
[0023] The encoded representation of the data element array uses a subset of one or more bits of the corresponding bit sequence of the data value to represent at least some of the data values of the data elements in the data element array, such that for those data elements, data indicating the bit values of one or more other bits of the corresponding bit sequence of the data value are not stored in the encoded representation;
[0024] The method includes:
[0025] Decoding the encoded representation of the data element array to determine an initial bit sequence representing the data value of the data element, wherein the initially determined bit sequence of the data value of the data element can have one or more missing bits corresponding to one or more bits whose data is not stored in the encoded representation;
[0026] For the data value of the data element, determine which bits (if any) are missing;
[0027] Depending on which bits (if any) are missing for the data value of the data element, an adjustment scheme to be applied to the data value of the data element is selected from multiple available adjustment schemes; and
[0028] The selected adjustment scheme is applied to the data value of the data element to obtain the decoded data value of the data element.
[0029] A second embodiment of the technology described herein includes a decoder for determining the data values of data elements in the data element array based on the encoded representation of the data element array.
[0030] Each data element in the data element array is associated with one or more corresponding data values, and each data value is represented by a corresponding bit sequence.
[0031] The encoded representation of the data element array uses a subset of one or more bits of the corresponding bit sequence of the data value to represent at least some of the data values of the data elements in the data element array, such that for those data elements, data indicating the bit values of one or more other bits of the corresponding bit sequence of the data value are not stored in the encoded representation;
[0032] The decoder includes:
[0033] Decoding circuit, the decoding circuit being configured as follows:
[0034] Decoding the encoded representation of the data element array to determine an initial bit sequence representing the data value of the data element, wherein the initially determined bit sequence of the data value of the data element can have one or more missing bits corresponding to one or more bits whose data is not stored in the encoded representation;
[0035] Rounding circuit, the rounding circuit being configured as follows:
[0036] For the data value of the data element, determine which bits (if any) are missing;
[0037] Depending on which bits (if any) are missing for the data value of the data element, an adjustment scheme to be applied to the data value of the data element is selected from multiple available adjustment schemes; and
[0038] The selected adjustment scheme is applied to the data value of the data element to obtain the decoded data value of the data element.
[0039] The techniques described herein relate to methods for determining (decoded) data values of data elements in an array of data elements (which may include, for example, an image data array) based on the encoded representation of the data array. Specifically, the techniques described herein relate to methods for decoding a data array that has been encoded in a "lossy" manner, for example, such that some of the original information may have been discarded during encoding.
[0040] For example, each of the data values associated with a data element in the data element array may be defined by a corresponding bit sequence. However, the effect of lossy encoding is that the bit sequence (at least some of it) may be truncated during the encoding process, for example, by the encoder discarding one or more bits (e.g., and in one embodiment, corresponding to one or more least significant bits), such that the data indicating the bit value of the discarded bit is not stored in the encoded representation of the data array.
[0041] One such example of a lossy coding scheme that can be used in implementations of the techniques described herein is the scheme described in Armlmited’s International Patent Application Publication No. WO2020 / 115471 (PCT / GB2019 / 053416), which is incorporated herein in its entirety.
[0042] In the (lossy) encoding scheme described above, encoding a block of data elements involves truncating a bit sequence representation of at least some of the data values of the data elements within the block, such that only one or more subsets of the corresponding bit sequence representation of the original data values (e.g., and in one embodiment, a subset of one or more most significant bits) are stored in the encoded representation of the data block.
[0043] Correspondingly, this means that when a data array encoded in this way is subsequently decoded, for example when a data processing system wants to use the data values of the elements in the array, the decoding process cannot perfectly recreate the values of the discarded bits, and therefore the decoded data value generated by the initial decoding may have one or more "missing" bits.
[0044] In an attempt to better reproduce the original data value from data that has already been encoded in this way (i.e., in a lossy manner), various adjustment (e.g., "rounding" insertion) schemes can be applied as part of the decoding process, for example, to fill in missing bits, and this is done in the technique described herein. Thus, the effect of the adjustment (e.g., rounding) scheme is to attempt to approximate the contribution from any "missing" bits whose data is not stored in the encoded representation, such as any bits discarded during the encoding process (and therefore the decoder cannot recreate the actual bit values of these missing bits).
[0045] Adjustment (e.g., rounding) schemes may involve, for example, adding a suitable sequence of rounding bits (e.g., at the end of a truncation bit sequence representing a data value) to replace at least some missing bits discarded during encoding. Therefore, the adjustment schemes applied during the techniques described herein may include, and in one embodiment do indeed include, different rounding modes. However, the adjustments used may be more or less complex as needed (e.g., depending on the encoding scheme).
[0046] The applicant has recognized that it may be desirable to apply different adjustments in different situations, for example, rather than using the same standard adjustment scheme for all data values to be decoded. In this regard, the applicant has recognized that attempting to apply a standard adjustment scheme for all data values may not necessarily be appropriate (e.g., optimal), and may further lead to a loss of fidelity in at least some cases, as will be explained further below.
[0047] Therefore, in the techniques described herein, the decoder is operable to select from a plurality of available adjustment schemes an adjustment scheme to be used during the decoding process when decoding the data value of a data element. For example, in one embodiment, each of the plurality of available adjustment schemes is associated with a particular adjustment or set of adjustments that can be applied to the data value, for example, to determine how to fill any missing bits.
[0048] More specifically, the applicant has recognized that when using lossy encoding and decoding techniques of the type described above, the choice of which adjustment schemes to apply to the data values associated with a particular data element can be advantageously selected based on the “pattern” of the missing bits of the data values under consideration.
[0049] Therefore, according to the technology described herein, in one implementation, at least some data values having a specific missing bit “pattern” are adjusted (e.g., rounded) in a way different from the original (e.g., if they have different missing bit patterns).
[0050] In other words, in the technique described herein, there are therefore multiple different available adjustment schemes (each adjustment scheme is associated with a different adjustment or set of adjustments), and which adjustment scheme will be used for a specific data value or group of data values associated with a particular data element is selected based on the missing bits of the data value under consideration.
[0051] In one implementation, a missing bit pattern reflecting the missing bits of all data values associated with the same data element is used to select the adjustment scheme. Therefore, for a specific data value within a group of data values associated with a single data element, in one implementation, the adjustment scheme to be used is selected based on the missing bits of the data value itself and the missing bits of other data values within the group of data values associated with the same data element.
[0052] Therefore, the method may include the step of determining which bits (if any) are missing for the data value of the data element under consideration, and then selecting an adjustment scheme to be applied to the data value based on that determination.
[0053] For example, in an implementation, there may be a first “standard” adjustment scheme that is applied in most cases, and a second “exceptional” adjustment scheme that is applied only in certain cases (e.g., when a specific missing bit pattern is identified) (as will be explained further below). In this case, the first adjustment or set of adjustments may be applied to the data values associated with the data element to be decoded when using the first standard adjustment scheme. However, when the second exception adjustment scheme is used, an adjustment different from the adjustment applied when using the first standard adjustment scheme is applied to one or more data values associated with the data element to be decoded.
[0054] However, in general, there can be any number of available adjustment schemes, such as two, four, eight, etc. The decoder can select among these adjustment schemes when decoding the data element based on the missing bits of the data value associated with the data element. Each adjustment scheme involves the corresponding adjustment or set of adjustments to be applied to the data value.
[0055] In this way, the applicant has discovered that improved decoding operations can be provided, for example, which provide more accurate decoded data values (i.e., which better match the original data values, especially after multiple encoding / decoding loops), as will be explained further below.
[0056] For example, the applicant recognizes that in such encoding and decoding schemes, it is expected that the image quality will stabilize after multiple encoding / decoding cycles. That is, although there is usually an initial reduction in image quality due to the lossy nature of encoding, the image quality should not continue to deteriorate with each encoding / decoding cycle.
[0057] This may be desirable, for example, for benchmarking encoding / decoding schemes, but it is also desirable in use where the same data slices can be repeatedly encoded / decoded within a data processing system, for example, where the same data slices must be passed between different processing units. An example of this would be when generating an image for display, where the same image data slices can be processed, for example, sequentially by a video processor, a graphics processing unit, and a display processor, with the image data being encoded / decoded between each processing step.
[0058] However, the applicant has recognized that when using a lossy compression scheme, the adjustment scheme applied during the decoding process may introduce problematic behavior in some cases, where image quality continues to degrade after each encoding / decoding cycle.
[0059] In this regard, the applicant has found that certain missing bit patterns may exist that can introduce such problematic behavior, for example, depending on the applied adjustment and the potential interaction between adjustments with any additional optional decoding steps (such as data transformations), as will be explained further below.
[0060] Therefore, in one implementation, the technology described herein also recognizes, for example, that the decoder can determine a missing bit pattern associated with the data element to be decoded, and thereby identify any such instances of missing bit patterns that could lead to problematic behavior.
[0061] Therefore, in the implementation, when the decoder identifies a data element associated with a problematic missing bit pattern, the data element can then be exceptionally processed, for example, and specifically, by using a different adjustment scheme, such that different adjustments are applied at least for the data values associated with the data element for which the problematic behavior is expected to occur. Thus, when the decoder identifies a data element with a problematic missing bit pattern, instead of using the standard adjustment scheme that the decoder would otherwise use for the data values under consideration (e.g., if different missing bit patterns exist), the decoder can use a different exceptional adjustment scheme to apply different adjustments, for example, so that the problematic behavior does not occur.
[0062] Therefore, in the implementation, an adjustment scheme is selected that does not necessarily attempt to reproduce the original image as accurately as possible (as could be the case with a standard heuristic for the decoder), but rather aims to ensure that specific problematic behaviors, such as those described above, are avoided.
[0063] In this way, the problem of image quality deteriorating with each encoding / decoding cycle can be prevented in the implementation, thereby providing an improved (e.g., more stable) encoding / decoding arrangement. In other words, at least in its implementation, the techniques described herein can provide improved (e.g., more accurate) decoded values even after multiple encoding / decoding cycles.
[0064] In the above cases, the missing bit pattern that causes such problematic behavior will usually depend on the decoding scheme.
[0065] For example, in one instance, corresponding to an implementation of the technology described herein, the data element array represents an image data array set in (e.g.) RGB(A) format but transformed into a different (e.g. YUV) color format for encoding.
[0066] In this case, each data element in the data element array may correspond to a specific pixel in the image and may be associated with a set of three (or four) data values, such as representing the RGB(A) channel.
[0067] To convert data values into a suitable format for encoding, the encoding in this embodiment therefore includes the step of transforming RGB(A) data values to the YUV color space. In one embodiment, this step involves multiplying an array of RGB(A) data values by one or more suitable color transformation matrices. However, various arrangements for converting RGB(A) data values to the YUV color space will be possible as needed, and any suitable conversion scheme can be used in the embodiment. The conversion can be performed in a lossless or lossy manner.
[0068] Correspondingly, when data that has been encoded in this way is to be decoded, after initial decoding and rounding adjustments have been performed to determine, for example, a set of decoded values in YUV color format, an appropriate inverse color transformation is applied to convert the initial decoded values (in YUV color format) into the desired RGB(A) data format for use by the data processing system.
[0069] In this context, the applicant has discovered that for a particular missing bit pattern within a color value group in an initially decoded (e.g.) YUV color format, when the color value group in the initially decoded format is subsequently (inversely) transformed back to its original (e.g.) RGB(A) format, there may be an interaction between the inverse color transformation and rounding adjustment, which could cause one or more of the color values to increase after each encoding / decoding cycle.
[0070] When such a problematic missing bit pattern is identified, the decoder, when operating according to an implementation of the technology described herein, may then apply a special rounding adjustment to at least one or more color values in which the problematic behavior occurs, in order to prevent the problematic behavior.
[0071] Specifically, the applicant has discovered that in such cases, there exists a specific missing bit pattern in the group of data values associated with the data element, which, if rounding sets the least significant bit of one of the data values (color channels) in the group to "1", causes the data value to continue to grow with each encoding / decoding cycle and thus become progressively removed from the original ("true") data value.
[0072] In the techniques described herein, the decoder is thus able to identify such cases and apply different adjustment schemes, for example, and in one implementation, this adjustment scheme, by exception, always sets the least significant bit of the data value for which it might otherwise exhibit problematic behavior (e.g., if the standard adjustment scheme causes it to round to "1") to "0". In this way, the aforementioned problematic behavior is avoided.
[0073] However, in general, various other situations are expected where the interaction between missing bit patterns and adjustments, and optionally any further transformations, can introduce similar problematic behaviors that can be addressed by the techniques described herein. Once such problematic behaviors have been identified, appropriate adjustments can be determined to avoid them.
[0074] Furthermore, while the foregoing provides a specific example of a problematic behavior that can be addressed by the techniques described herein for illustrative purposes, it should be understood that the techniques described herein are not limited to this case, and there may be other cases where it is beneficial to perform different adjustments in the manner described herein depending on the missing bit pattern.
[0075] In this way, it should be understood that the techniques described herein can provide improved decoding arrangements.
[0076] In any of the embodiments described herein, the data element array may take any desired and suitable form. Therefore, although examples have been given above in the context of image data, and particularly image data in RGB(A) format (but in one embodiment, it is transformed to the YUV color space for encoding purposes), it should be understood that the techniques described herein are not limited to such data and can generally be used as needed when processing any suitable image or non-image data. While embodiments relate to data arrays comprising image and / or video data, other examples of data array arrangements will be possible if desired, and in general, the data element array may comprise any data array that can be encoded to represent data appropriately or desiredly stored, which can be decoded according to the techniques described herein.
[0077] In one implementation, the data element array represents a spatial distribution of values (at least in its original, uncompressed format, such as the format ultimately usable as a data element array, for example, throughout the data processing system). That is, the data element array in this implementation represents a set of data values distributed in a spatial domain. Therefore, each data element can represent a data value at a certain location within the spatial distribution. Thus, in this implementation, the data element array can (each) correspond to a data location array.
[0078] However, in some implementations, encoding involves transforming the spatially distributed values into the frequency domain. This can facilitate an improved encoding process. In this case, the data values stored for encoding represent, rather than represent, the spatial distribution of the values, the distribution of the values in the frequency domain.
[0079] Correspondingly, in one implementation, decoding includes inverse frequency conversion.
[0080] In some implementations, the array of data elements or locations may correspond to all or part of a desired (e.g., image) output, such as a still image or video frame (e.g., for display). That is, the array of data elements in an implementation may include an image data array, i.e., data used to generate an image for display. Therefore, in some implementations, the data array may correspond to a single still image to be encoded. In other implementations, the data array may correspond to a video frame of a video frame stream to be encoded.
[0081] In one implementation, each data element in the data element array is associated with a corresponding group of multiple data values. Therefore, in one implementation, each data element in the data element array is associated with a corresponding group of data values, wherein in one implementation, each data value in the group of data values of a data element is defined by a corresponding bit sequence.
[0082] For example, in some implementations, the data element array includes a color image data array, as described above. In this case, each data element may represent a sampling location or pixel within the image, and each data element may be associated with a group of color values. The group of data values for the data elements may represent values for different color channels.
[0083] The encoded data values can typically be defined in a first uncompressed data format, which corresponds to the format used by the encoder (but does not need to correspond to the original data format, i.e., the data format used by the data processing system). For example, if the first uncompressed data format is a YUV color format, the data values stored in the encoded representation can represent the values of the Y, U, and V components. Therefore, the data values in the first uncompressed data format generated by decoding may need to be converted to a second uncompressed data format (e.g., RGB(A) data format) for use by the data processing system. (In embodiments where encoding includes frequency transformation, the data values stored in the encoded representation, rather than representing the values of the Y, U, and V components themselves, may represent a set of frequency transformation values, and in this case, the decoded values may need to be transformed in both the color space and the frequency space.)
[0084] Generally, any desired and suitable correspondence can exist between data elements and the desired output. For example, each data element in an array may correspond to one or more pixels in the desired output. The array of data elements can be of any desired and suitable size or shape in terms of data elements or positions, but in one embodiment it is rectangular (including square). Data elements can represent two-dimensional data, but can also represent one-dimensional, three-dimensional, or higher-dimensional data. Data elements can also have any desired and suitable format, such as a format representing image data values (e.g., brightness or color values).
[0085] In any of the embodiments described herein, the array of data elements may be provided in any desired and suitable manner. Embodiments may include generating at least some or all of the data elements of the array. Embodiments may also include, or alternatively include, reading at least some or all of the data elements of the array from memory, for example.
[0086] The data elements of the array can be generated in any desired and suitable manner. In one embodiment, the data elements of the array may be generated by a camera, such as a video camera. In other embodiments, generating the data elements of the array may include a rendering process. The rendering process may include deriving data values represented by the data elements of the array (e.g., by rasterizing primitives to generate graphic fragments and / or by rendering graphic fragments). A graphics processor (graphics processing pipeline) may be used to generate the data elements of the array. The graphics processing pipeline may include any suitable and desired processing stages that the graphics pipeline and processor may include, such as vertex shaders, rasterization stages (rasterizers), rendering stages (rasterizers), etc., to generate the data elements of the array.
[0087] In the techniques described herein, in one embodiment, data elements of a data array are encoded, for example, on a block-by-block basis as “blocks” of data elements. For example, the data element array may be divided into multiple source blocks to be encoded on a block-by-block basis. Therefore, any reference herein to the processing or encoding of a data array or its data elements should be considered to include, and generally refer to, the processing or encoding of such blocks of data elements. A “block” can typically comprise an N×N data element array.
[0088] Therefore, when encoding an array of (overall) data elements, such as representing an entire frame (image), the array is divided into multiple blocks, and each block is then encoded according to the encoding scheme described herein to provide a corresponding set of data packets. In an implementation, each block of data elements within a larger array of data elements is encoded (compressed) into fixed-size data packets.
[0089] Therefore, in one implementation, the data element blocks being encoded into fixed-size data packets include data element blocks from a larger overall data array (and in one implementation, this is repeated for each of the multiple blocks constituting the overall data array). The data packets of each block can then be appropriately combined in a specific order into an encoded data stream representing the data of the overall data element array.
[0090] Therefore, the technique described herein is, in one embodiment, a block-based scheme, in which each block is encoded independently so that the blocks can then be decoded independently. This facilitates random access to blocks within a frame encoded using the technique described herein. For example, it is generally known how many bytes each data packet (block) contains, thus the location of each block in memory can be easily identified, making them easy to load and randomly access.
[0091] Data elements may include, for example, differences compared to a reference frame or block. However, more commonly, the encoding / decoding schemes described herein are used to encode the raw data, and therefore the data elements may represent (raw) pixel values.
[0092] As described above, the encoding scheme used to generate the encoded representation (to be decoded in the manner described above) is advantageously a lossy encoding scheme, which allows the encoded representation to not store all bits of data.
[0093] Specifically, in one embodiment, the encoding scheme used to generate the encoded representation is such that the encoding of the data element block involves a bit sequence representation of the data values of the data elements within the truncated block, such that the data values of the data elements in the data element block are represented using (only) a subset of one or more bits (e.g., in one embodiment, a subset of one or more most significant bits of the corresponding bit sequence representation of the original data value (“truncated” data value)), and for each data element, only these bit subsets (e.g., in one embodiment, corresponding to one or more most significant bits (truncated data value)) are included in the encoded data block.
[0094] Therefore, the effect of this truncation is that one or more other bits (e.g., and in one embodiment, one or more least significant bits) can be discarded during the encoding process, such that the data indicating these bits is not stored in the encoded representation.
[0095] (To avoid confusion, it should be understood that the most significant bit (singular) of a bit sequence is the highest-value bit. The most significant bit (complex) is the bit that is closest to and includes the most significant bit. For example, for a bit sequence containing N bits, where the Nth bit represents the highest value (most significant bit), the most significant bit can include the Nth bit, the (N-1)th bit, etc.)
[0096] Therefore, in one implementation, the encoding scheme encodes the data element block by truncating the bit sequence representing the data value of each data element within the data element block to give a corresponding "truncated data value" for the data element. The truncated data value includes only a subset of one or more bits, for example, and in one implementation, includes one or more most significant bits represented by the bit sequence from the original data value.
[0097] Truncating the bit sequence (i.e., the data values) in this way can thus provide the desired data compression. However, any information represented by other (e.g., less effective) bits not included in the data block is naturally lost due to this truncation. The effect of this is that there is less representable information in the decoded output.
[0098] This might be the case, for example, when data element blocks are encoded into fixed-size data packets in "raw" format. In this case, once the data packet is full, any remaining bits are effectively discarded. Therefore, encoding fixed-size data packets is inherently lossy.
[0099] Therefore, in one implementation, the data element array (at least for encoding purposes) is divided into multiple data element blocks that can be independently encoded / decoded, and each block is allocated a specific bit budget (size) to ensure that each block is encoded into a fixed-size data packet. In one implementation, the most significant bit of each data element in a block is then encoded in its "raw" form (by including the bit value "as is" into the data packet), starting from the most significant bit (i.e., the most significant bit) of each of the data elements, and moving to the next most significant bit of the data element after adding the most significant bit of each of the data elements, as long as there is still available space in the data packet, until the data packet is full (the allocated bit budget has been used).
[0100] As part of the encoding scheme, the order in which the bit values of data elements are added to the data block is varied in one implementation, and in another implementation in a random manner, for example, such that the order in which data elements are processed when the most significant bit value is added to the data block may be different from the order in which data elements are processed when the next most significant bit value is added to the data block, and so on.
[0101] In one implementation, the order in which bits are added to data blocks also varies between different data element blocks, for example, throughout the entire array of data elements and / or within a sequence of such arrays. This helps to avoid introducing duplication artifacts across the decoded output. For example, if data elements in all blocks within the entire data element array are always processed in the same order, a larger number of bits can be included in the data blocks of the first data elements processed, and this can introduce repetition patterns into the decoded output, for example, based on the block division of the array.
[0102] This means that the number of least significant bits discarded for one or more data values associated with a data element can vary across the array, allowing different numbers of least significant bits to be discarded for different data elements within the array and for one or more different data values of a data element.
[0103] Therefore, in one implementation, the encoding scheme according to the technology described herein stores as many of the most significant bits of the data elements in the data element block as possible within the allocated bit budget, while still ensuring a fixed-size data block. However, depending on the expected (fixed) size of the data block, i.e., the number of bits allocated to the data block, this may mean that only a subset of the bits of each data element within the block are included in the data block (where the bit values of one or more least significant bits are not included in the data block).
[0104] In one implementation, the encoding is performed according to the encoding technique described in Arm Limited’s international patent application PCT / GB2019 / 053416 (WO 2020 / 115471), the contents of which are incorporated herein by reference in their entirety.
[0105] However, various other lossy coding arrangements are possible, and coding can be performed according to any suitable such coding scheme, such as any suitable lossy coding scheme in which some of the least significant bits are potentially discarded.
[0106] When it is desired to use one or more of the data values of a specific data element in an array of data elements stored in encoded form, the encoded representation of the data element array must be decoded to determine the decoded data value (or group of data values) associated with the data element.
[0107] Because encoding results in a subset of (only) (e.g., most significant) bits being stored in the encoded representation (at least for some of the data elements), where the remaining (e.g., least significant) bits are discarded during encoding in one implementation, the initial representation of the data value determined by the decoder may have one or more missing bits corresponding to the bits discarded during encoding.
[0108] Therefore, as described above, after the initial decoding has been performed to extract the initial set of data values from the encoded representation of the data array, appropriate adjustments (e.g., rounding) are applied to approximate the contribution to the data values from any missing bits (e.g., any bits that may have been discarded during encoding and for which no data was stored for the encoded representation).
[0109] This adjustment can be a rounding adjustment as described, for example, in International Patent Application PCT / GB2019 / 053416 (WO 2020 / 115471). However, in general, any suitable adjustment scheme may be used as needed, and the adjustment may be more or less complex.
[0110] In the technique described herein, the decoder is operable to select an adjustment scheme from multiple available adjustment schemes based on a "pattern" (e.g., the number of missing bits in the data value associated with the data element being decoded). That is, instead of applying the same adjustment scheme to all data values to be decoded (to all data elements), the decoder of the technique described herein determines a data element having one or more data values to be decoded (if any, whose bits are missing from the data values associated with the data element), and selects the adjustment scheme to apply based on this determination.
[0111] To this end, in one implementation, the decoder determines a count of how many bits are missing for each data value associated with the data element to be encoded. For example, in one implementation, the decoder is able to determine how many bits are stored for a given data value based on the encoded representation, and may also be able to determine (or, for example, based on a known data format) how many bits should be stored for that data value. In this way, the decoder can determine the number of missing bits for a data value, for example, by comparing the count of how many bits are actually stored for a given data value with the number of bits that should be stored for that data value.
[0112] Depending on the encoding scheme, the decoder may also be able to determine the location of missing bits. For example, in cases where the encoding scheme is designed to encode from the most significant bit down so that the least significant (or less significant) bit is preferentially discarded, it can be determined (or known) that any missing bit will correspond to the least significant bit (and this is typically and in one implementation).
[0113] Therefore, the missing bit pattern can be accurately determined. Alternatively, in some cases, an estimate of the most likely missing bit pattern can be used.
[0114] In this respect, various arrangements for determining the missing bit pattern associated with the data value of a data element will be possible.
[0115] Therefore, in one implementation, the missing bit pattern relates to the number of missing bits in the data value under consideration. In this implementation, the missing bit pattern is the missing bit pattern of a group of data values associated with a single data element. That is, in one implementation, the missing bit pattern of a given data value associated with a data element may correspond to the number of missing bits in the data value under consideration, and the number of missing bits in any other data values in the group of data values associated with the same data element.
[0116] For example, for a data element having three associated data values representing, for example, three different data (e.g., color) channels, the missing bit pattern can correspond to the "XYZ" missing bit pattern, meaning that the first (color) channel has X missing bits, the second (color) channel has Y missing bits, and the third (color) channel has Z missing bits. Therefore, a pattern is defined for the data value group of the data element as a whole.
[0117] This means that in one implementation, the adjustment applied to a specific data value in a group of data values associated with a single data element is determined not only based on the missing bit associated with that data value but also based on other data values in the group of data values.
[0118] Then, based on the determined missing bit pattern, select the adjustment scheme to be applied to the data value.
[0119] For example, in most cases, when decoding data elements, the decoder may apply a standard adjustment scheme, which involves applying a first set of corresponding adjustments to the data value associated with the data element. The standard adjustment scheme may involve any suitable adjustments, such as rounding, or a scheme based on any suitable and desired heuristic.
[0120] However, when the decoder identifies a specific missing bit pattern, the decoder may alternatively apply a second exception adjustment scheme, in which an adjustment different from the adjustment applied in the standard adjustment scheme is applied to at least one (but not all) of the data values associated with the data element.
[0121] Therefore, in one implementation, a default adjustment scheme exists (which itself may include multiple different adjustments, for example, the decoder may choose among these multiple different adjustments based on various other metrics), and this default adjustment scheme is applied to the majority of data elements. However, when the decoder identifies a specific missing bit pattern, the decoder applies a different adjustment scheme instead of the default adjustment scheme.
[0122] For example, in one implementation, there may be a specific set of (in the chosen implementation) predetermined missing bit patterns that have been found to introduce potentially problematic behavior, such as those described above. In this case, when a particular data element is to be decoded by the decoder, the decoder can therefore compare the missing bit pattern identified for the data element with the specific missing bit pattern (in one implementation, a predetermined missing bit pattern) in the chosen implementation and then appropriately select an adjustment scheme.
[0123] When the decoder identifies a data element as associated with a potentially problematic missing bit pattern, it can then apply an exception adjustment scheme. On the other hand, for other missing bit patterns, the decoder can apply its standard adjustment scheme as usual.
[0124] For example, in one implementation, the decoder examines the initial representation of the data values in the data value group of the data element to see if encoding / decoding has produced a missing bit pattern that has (previously) been identified as causing problematic behavior within a repeated encoding / decoding loop, as described above.
[0125] For example, for a given encoding / decoding scheme, there may be multiple predetermined missing bit patterns that have been found to cause such problematic behavior. Therefore, the decoder can operate to examine the missing bit patterns of the initial representation of data values in a group of data values of a data element to determine whether the missing bit pattern matches one of the predetermined problematic missing bit patterns.
[0126] Each predetermined missing bit pattern can also be associated with a corresponding adjustment scheme to be used for that missing bit pattern. For example, a suitable indication of the adjustment scheme to be used for a particular missing bit pattern can be stored, for example, in the form of a suitable lookup table. Alternatively, in an implementation, the same exceptional adjustment scheme can be applied to any and all missing bit patterns in the list.
[0127] In one implementation, the applied exception adjustment scheme (e.g., when such a missing bit pattern is identified) involves rounding at least one data value in a way that would otherwise be rounded (e.g., if a standard adjustment scheme were to be applied).
[0128] When data elements are associated with groups of data values, an exception adjustment scheme can apply different adjustments to different data values within that group. For example, it's possible that fewer than all (e.g., only one) of the data values in the group are rounded differently (compared to how they would otherwise be rounded according to the decoder's standard adjustment scheme), while the other data values in the group are rounded normally (in the same way they would be rounded using the decoder's standard adjustment scheme). For instance, this could be a situation where a missing bit pattern in the data value group has been identified, causing problematic behavior for fewer than all data values in the group, making it necessary only those values to be rounded differently.
[0129] In this respect, various arrangements will be possible. However, in general, the adjustment schemes (and adjustments) applied can include any suitable adjustment (e.g., that provides the desired behavior). For example, once a certain type of problematic behavior associated with a particular missing bit pattern has been identified, appropriate corrections can be determined.
[0130] In one implementation, the exception scheme applied when such a problematic missing bit pattern is identified involves setting at least one (but not all) of the least significant missing bits to "0". For example, in some cases, problematic behavior has been observed only for one data value in a group of data values associated with a data element, and the problematic behavior specifically occurs when the least significant bit of that data value is rounded to "1". In this case, the problematic behavior can be avoided by forcing the least significant bit of the data value in which the problematic behavior would otherwise occur to be "0".
[0131] However, other data values in the data value group associated with a data element can still be rounded normally, for example, according to the decoder's standard heuristic (whatever they may be). Therefore, in an exception adjustment scheme, in one implementation, some, but not all, of the least significant bits of the data values in the data value group are set to zero.
[0132] Therefore, in the implementation, when it is determined that a missing bit pattern of a data element corresponds to a missing bit pattern that has been (previously) found to cause problematic behavior for one or more data values in a group of data values of the data element, the adjustment may be applied to set the least significant bit of the one or more data values for which the problematic behavior has been observed to be zero.
[0133] However, in other cases, it may be desirable to set all missing bits to zero, for example, to simplify the decoding process.
[0134] Therefore, in one implementation, each data element in the data element array is associated with a corresponding data value group, wherein each data value in the data value group of the data element is defined by a corresponding bit sequence in one implementation (e.g., in a first uncompressed data format, which is the format used by the encoder and does not need to correspond to the original data format used for the data values).
[0135] In this case, in one implementation, the encoded representation of the data element array stores and represents data values defined in a first uncompressed data format in compressed form, wherein one or more least significant bits from the corresponding bit sequence of the data values associated with the data elements in the data element array may have been discarded, such that the bit value indicating the discarded bit is not stored in the encoded representation.
[0136] Therefore, in one embodiment, the method includes: when it is desired to use the data values of data elements in the data element array stored in the encoded representation of the data element array: determining an initial bit sequence for each data value in the data value group of the data element according to the encoded representation of the data element array, wherein the initially determined bit sequence represents the data value in the data value group of the data element in the first uncompressed data format, but may have one or more missing bits corresponding to one or more discard bits whose data is not stored in the encoded representation.
[0137] In one embodiment, the method further includes: identifying a missing bit pattern of the group of data values associated with the data element from the initially determined bit sequence of the data values in the set of data values of the data element; selecting one or more adjustment (e.g., rounding) values to apply to the data values in the group of data values of the data element based on the identified missing bit pattern; and applying the selected adjustment values to the initially determined bit sequence of the data values in the group of data values of the data element to determine a set of adjusted data values representing the data element in a first uncompressed data format.
[0138] Therefore, in one implementation, the result of the adjustment is to produce a set of adjusted data values, which represent the data values in the group of data elements in a first uncompressed data format (i.e., the format in which they are encoded).
[0139] The data value can then be output in a first uncompressed data format, for example, as a data value for use by a data processing system. However, as mentioned above, in the implementation, the original data value is set in a different data format and is then transformed into the first uncompressed data format for encoding.
[0140] Therefore, in the implementation, the decoded data value may undergo various additional desired processing steps to provide a decoded data value for use by a data processing system. For example, such additional processing steps may include one or more (inverse) transformations to transform the data value from a first uncompressed format (which is used for encoding) to another data format suitable for use by the data processing system (i.e., the "raw" data format).
[0141] In this respect, as described above, various arrangements will be possible.
[0142] For example, in one implementation, one or more inverse transformations are applied to the adjusted data value in a first uncompressed data format, thereby transforming the data value into the desired original data format for use by the data processing system.
[0143] For example, to improve coding efficiency, it might be desirable to convert the spatial representation of the data into a frequency domain transform. To do this, an appropriate frequency transform is applied during encoding, and a corresponding inverse frequency transform is applied during decoding.
[0144] For example, an encoder may be designed to process data in a first (e.g., YUV) data format. In this case, if the original data is set and used in a different (e.g., RGB(A)) data format, the original data should be transformed into the first data format as part of the encoding process. To do this, a suitable color transformation is applied during encoding, and then the corresponding inverse color transformation is applied during decoding.
[0145] Therefore, in the implementation, the encoding scheme is designed to process data set in a specific data format (i.e., a first uncompressed data format). For example, the encoding scheme may be designed to process image data set in, for example, a YUV color format. Thus, each data value in the data value group of a data element may be defined by a corresponding bit sequence in the first uncompressed data format (e.g., YUV).
[0146] This means that when data is initially set in a different format (e.g., RGB(A) color format) and used by a data processing system, in one embodiment, encoding includes the step of transforming the data from its original format to a first uncompressed format. Correspondingly, in one embodiment, decoding involves one or more steps of (inversely) transforming the decoded data from the first uncompressed data format (i.e., the format in which it was encoded) to a different uncompressed data format (i.e., the original data format used by the data processing system).
[0147] In other words, the first uncompressed format in which data is encoded (and the encoding represents the storage of its representative data) does not need to be the original data format (i.e., the original data format used by the data processing system), and in one implementation, it is not the original data format.
[0148] In one embodiment, the data element array includes an array of image data represented using RGB(A) data format but encoded in YUV data format. Therefore, in one embodiment, encoding includes applying a color transformation to the original data in RGB(A) data format to transform the data into YUV format for encoding. Correspondingly, in one embodiment, decoding includes applying an inverse color transformation to transform the decoded data in YUV format back to the original RGB(A) format.
[0149] These transformations typically involve multiplying the data array by a suitable (inverse) color transformation matrix. In this respect, various arrangements will be possible.
[0150] In the implementation, the encoder can use a variety of possible color transformations (e.g., different matrices). Therefore, the encoder is operable to select, for example, which color transformation to use during encoding based on some suitable heuristic.
[0151] In this regard, the applicant has now recognized that it may be beneficial to force the encoder to use the same transformation matrix whenever the same data slice is encoded / decoded, especially when the encoder will determine which transformation matrix to use in other ways, for example, based on its own coding heuristic.
[0152] In other words, when compressing the same data slices multiple times, the applicant recognizes that it may be desirable to use the same transformation matrix for each compression cycle.
[0153] More generally, the applicant has recognized that, where the encoder is operable to choose among several different encoding parameters, the encoder should use the same encoding parameters each time the same data slice is encoded / decoded in order to provide more consistent encoding.
[0154] To achieve this, in one implementation, an encoding "hint" is provided to the encoder along with the data to be encoded. This hint indicates which encoding parameters should be used to encode the data, for example, based on which encoding parameters were used when the same data was previously encoded. Therefore, the encoder can appropriately read the encoding hint to determine the encoding parameters to use. In this way, the encoder's normal selection of encoding parameters can be overridden, where the encoder is forced to use whatever encoding parameters are indicated in the encoding hint, rather than the encoder having to determine which encoding parameters should be used.
[0155] Encoding hints can be embedded in the decoded data, for example, during the decoding process, or otherwise associated with the decoded data, so that when the encoded / decoded data slices are to be encoded again, the encoder can determine which parameters to use during the previous encoding and use the same encoding parameters based on the encoding hints associated with the decoded data.
[0156] For example, in one implementation, the decoder can access a set of associated metadata of the encoded representation, which indicates one or more encoding parameters used to generate the encoded representation. The metadata of the encoded representation can be stored along with the encoded representation itself, for example, as header data. Alternatively, the associated metadata can be provided to the decoder separately, for example, as side-channel information. Various arrangements are possible in this regard.
[0157] Therefore, the decoder is operable to determine the encoding parameters used when the data was last encoded based on the associated metadata, and in one implementation, the encoder should reuse these encoding parameters the next time the data is encoded. Thus, the decoder can generate encoding hints based on the associated metadata, which can then be appropriately associated with the decoded data and provided to the encoder along with the decoded data when it is to be re-encoded.
[0158] In this way, by adding such information to the decoded data during the decoding process, the encoder is then allowed to read the encoding hints when it wants to re-encode the data, and the encoder is allowed to override its normal encoding heuristic and use the same encoding parameters as previously used, so as to provide an improved encoding / decoding process across multiple encoding / decoding loops.
[0159] It is believed that generating and providing such coded hints can be novel and advantageous in its own right.
[0160] Another embodiment of the technology described herein includes a method for processing data using a decoder, the method comprising:
[0161] Decoding an encoded representation of a data element array to determine a set of decoded data representing the data element array in a first uncompressed data format, wherein the decoding is performed using associated metadata of the encoded representation, the associated metadata indicating one or more encoding parameters for generating the encoded representation;
[0162] The decoder determines the one or more encoding parameters for generating the encoded representation based on the associated metadata of the encoded representation, and generates an encoded "hint" from therethe hint, the encoded hint including an indication of the one or more encoding parameters for generating the encoded representation; and
[0163] The decoder associates the encoding hint with the set of decoded data in such a way that when the decoded data is subsequently encoded, the one or more encoding parameters indicated by the encoding hint can be determined.
[0164] Another embodiment of the technology described herein includes a decoder, the decoder comprising:
[0165] A decoding circuit configured to decode an encoded representation of a data element array to determine a set of decoded data representing the data element array in a first uncompressed data format, wherein the decoding is performed using associated metadata of the encoded representation, the associated metadata indicating one or more encoding parameters for generating the encoded representation;
[0166] The decoding circuit is further configured to determine the one or more encoding parameters for generating the encoded representation based on the associated metadata of the encoded representation, and to generate an encoded "hint" from therethe encoded "hint" including an indication of the one or more encoding parameters for generating the encoded representation;
[0167] The decoder also includes an output circuit configured to output decoded data and associate the encoding hint with the set of decoded data in such a way that when the decoded data is subsequently encoded, the one or more encoding parameters indicated by the encoding hint can be determined.
[0168] In one implementation, the encoding / decoding according to these other implementations is performed according to the first and second implementations described above.
[0169] For example, in one embodiment, encoding / decoding is performed according to the lossy method described in Arm Limited's International Patent Application Publication No. WO2020 / 115471 (PCT / GB2019 / 053416). However, other arrangements will be possible, and in general, any suitable encoding / decoding scheme can be used in conjunction with these additional embodiments.
[0170] Similarly, the data element array processed in these other embodiments can typically be any suitable data element array, such as any data element array described above. For example, in one embodiment, the data element array includes an image data array.
[0171] According to these other embodiments of the technology described herein, once decoded (e.g., image) data has been generated, an encoded "hint" is associated with the decoded data, as discussed above.
[0172] In one implementation, this is accomplished by storing the encoded hint within the decoded data itself. Therefore, in this implementation, a subset of the data elements in the decoded data array can be used to store the encoded hint. For example, where the data array comprises an image and the data elements correspond to individual pixels, a specific number of pixels can be used to store the encoded hint.
[0173] In one implementation, the encoding hint is stored in the decoded data in such a way that its presence is not easily noticeable (e.g., to the user when the decoded data is displayed).
[0174] For example, in some implementations, a relatively small number of data elements are used to store the encoded cues, and in others, the data elements used to store the encoded cues are spaced apart from each other and / or located away from the intended region of interest (e.g., away from the center of the image).
[0175] Similarly, in one implementation, the set of least significant bits (or less significant bits) of the data elements in the array is used to store the encoded hints. For example, the implementation may use four, eight, or other least significant bits from different data elements (e.g., pixels) to store different encoded hints.
[0176] In this way, encoded cues can be added to decoded data without significantly reducing, for example, the perceptual quality of the image.
[0177] However, in the implementation, any suitable portion of the data element can be used to store the encoding hints as needed.
[0178] Generally speaking, the size of the encoding cue (e.g., the number of bits used to store the encoding cue) should be chosen to provide a balance between maintaining data fidelity and ensuring that the encoding cue is unique enough to reduce the encoder's erroneous detection of the presence of the encoding cue (in locations where no encoding cue is provided).
[0179] For example, an encoder will typically not know whether a given data slice is associated with an encoding hint. To avoid incorrect determinations, one embodiment also selects the bit sequence used to store the encoding hint so that it is unlikely to occur naturally. For example, the encoding hint should not be represented using a common data value (e.g., zero) (and in one embodiment, a common data value is not used).
[0180] As described above, in one embodiment, the encoded cue is stored using a sequence of N least significant bits associated with corresponding N data elements distributed within the data array. The encoder may have to choose among multiple different sets of encoding parameters, and therefore in one embodiment, each different set of encoding parameters is associated with a unique encoded cue.
[0181] In one implementation, the encoded cues are stored using a number of bits greater than the minimum number of bits required to store the different encoded cues. For example, in the case where there are eight different encoded cues that may need to be stored (corresponding to eight different sets of encoded parameters), this set of cues can be represented using a minimum of N = 3 bits. However, in this implementation, instead of using the minimum number of bits (i.e., 3), a larger number of bits is used. For example, eight different encoded cues can be represented using 8 bits. In this way, the probability of encoded cues occurring naturally is again reduced. For example, with 8 bits, 256 possible values can be represented, but only 8 of these 256 possible values correspond to the encoded cues.
[0182] When decoded data, including such encoding hints, is subsequently provided to the encoder for re-encoding, the encoder is thus operable to read the encoding hints, thereby identifying one or more encoding parameters used when the data was previously encoded, and then using the same encoding parameters. On the other hand, if the encoder cannot recognize the encoding hints (or does not provide them), encoding is performed according to the encoder's normal encoding heuristics.
[0183] For example, in one implementation, an encoding cue may indicate which of several possible transformation matrices is used during encoding. Thus, there may be, for example, eight possible transformation matrices, and eight different corresponding encoding cuees may need to be generated. Therefore, the encoder can determine, based on the encoding cue (e.g., using a suitable lookup table), which transformation matrix should be used when encoding the data, and thus use the indicated transformation matrix. However, in general, encoding cuees can be used to store any suitable information about the encoding parameters that the encoder can use, as needed.
[0184] Generally speaking, a decoder is operable to decode a data stream to recover the encoded original source data (e.g., an image), and then use (e.g., display) that data as needed. Therefore, once the data stream has been decoded, the decoder can be configured to display the decoded data or output the decoded data for display.
[0185] The aforementioned encoding and decoding devices are typically provided as part of a data processing system. For example, the devices may include a portion of an image and / or video processing system, which includes a camera, such as a digital camera, mobile phone, or tablet computer.
[0186] Generally, in any embodiment, the methods described herein can be performed by any desired and suitable means. For example, in any embodiment, the processes described herein can be performed by an image or video processor (codec). Therefore, in any embodiment, the data processing apparatus described herein may include or may be a video processor. Thus, the processing (encoding / decoding) circuits, output circuits, header generation circuits, header reading circuits, or input circuits described herein may form part of a video processor. In any embodiment, the data processing apparatus described herein may include a system-on-a-chip (SoC), or may be a SoC, or may be part of a SoC.
[0187] As those skilled in the art will understand, the encoding / decoding apparatus described herein can be part of an overall data processing system including, for example, a host (e.g., central) processor. The host processor can, for example, execute an application that requires data processing by the encoding / decoding apparatus. The host processor can send appropriate commands and data to the encoding / decoding apparatus to control it to perform data encoding / decoding operations and generate and / or use the output required by the application executing on the host processor. For this purpose, the host processor can execute a driver for the encoding / decoding apparatus.
[0188] In embodiments, the apparatus or system may include and / or be communicatable to one or more memories and / or memory devices storing the data described herein, and / or storing software for performing the processes described herein. The apparatus or system may include a display and / or be communicatable to a display for displaying images based on an array of data elements. The apparatus or system may include a camera that generates an array of data elements and / or be communicatable to a camera that generates the array of data elements.
[0189] The memory mentioned herein can be that of a data processing device or any desired and suitable memory for a data processing device. The memory can be external to the data processing device (e.g., a video processor and / or a system-on-a-chip (SoC)). The memory can be, for example, main system memory.
[0190] The techniques described herein can be used with all forms of data arrays that a data processing device can provide and / or use, such as images or frames for display. Therefore, as described above, a data element array can include image data and / or correspond to images or image data frames.
[0191] In one implementation, the various functions of the technology described herein are performed on a single data (e.g., image) processing platform that provides and / or uses an array of data elements.
[0192] The techniques described herein can be implemented in any suitable system, such as a properly configured computer or a microprocessor-based system. In one embodiment, the techniques described herein are implemented in a computer- and / or microprocessor-based system.
[0193] The various functions of the technology described herein can be performed in any desired and suitable manner. For example, the steps and functions of the technology described herein can be implemented in hardware or software as needed. Therefore, for example, unless otherwise specified, the various circuits / circuits, functional elements, and stages of the technology described herein may include one or more suitable processors, one or more controllers, functional units, circuits / circuits, processing logic, microprocessor arrangements, etc., operable to perform various steps or functions, such as appropriate dedicated hardware elements (processing circuits) and / or programmable hardware elements (processing circuits) that can be programmed to operate in a desired manner.
[0194] Specifically, it is conceivable that the encoder can be implemented in hardware or software as needed. Thus, for example, the encoder may include suitable one or more processors, one or more controllers, functional units, (encoding) circuits / circuits, processing logic, microprocessor arrangements, etc., operable to perform various encoding steps or functions, as described herein, for example, suitable dedicated hardware elements (processing circuits / circuits) and / or programmable hardware elements (processing circuits / circuits) that can be programmed to operate in a desired manner.
[0195] Similarly, the decoder can be implemented in hardware or software as needed. Thus, for example, a decoder may include suitable one or more processors, one or more controllers, functional units, (decoding) circuits / circuits, processing logic, microprocessor arrangements, etc., operable to perform various encoding steps or functions, as described herein, for example, suitable dedicated hardware elements (processing circuits / circuits) and / or programmable hardware elements (processing circuits / circuits) that can be programmed to operate in a desired manner.
[0196] The various steps or functions of the technology described herein can be repeated and / or executed in parallel on a given processor. Similarly, various processing stages can share processing circuitry / circuits, etc., if needed.
[0197] Depending on the hardware required to perform the specific steps or functions described above, the system may otherwise include data processing devices and / or any one or more or all of the usual functional units included in the system.
[0198] Therefore, various data processing stages can be implemented as needed and in any suitable manner, and can each perform any desired and appropriate function. Similarly, various types of data can be defined and stored in any suitable and desired manner.
[0199] Those skilled in the art should also understand that all embodiments of the technology described herein may, as appropriate, include any one or more or all of the features described herein in one embodiment.
[0200] The methods described herein can be implemented at least in part using software, such as computer programs. Therefore, further embodiments of the techniques described herein include: computer software, particularly adapted to perform the methods described herein when installed on a data processor; computer program elements including computer software code portions for performing the methods described herein when the program elements are run on the data processor; and a computer program including code adapted to perform all steps of one or more methods described herein when the program is run on a data processing system. The data processor may be a microprocessor system, a programmable FPGA (Field-Programmable Gate Array), etc.
[0201] The techniques described herein also extend to computer software carriers that include such software, when used to operate a data processing apparatus or system including a data processor, cause the apparatus or system to engage the data processor to perform the steps of the methods described herein. Such computer software carriers can be physical storage media, such as ROM chips, CD-ROMs, RAM, flash memory, or disks, or they can be signals, such as electronic signals transmitted through wires, optical signals, or radio signals, such as signals to satellites.
[0202] It should also be understood that not all steps of the methods described herein need to be performed by computer software. Therefore, in other embodiments, the techniques described herein include computer software and such software installed on a computer software carrier for performing at least one step of the methods described herein.
[0203] Therefore, the techniques described herein may suitably be embodied as computer program products used with computer systems. Such embodiments may include a series of computer-readable instructions fixed on a tangible, non-transitory medium, such as a computer-readable medium, for example, a disk, CD, DVD, ROM, RAM, flash memory, or hard disk. It may also include a series of computer-readable instructions that can be invisibly 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 using wireless technologies (including but not limited to microwave, infrared, or other transmission technologies). This series of computer-readable instructions embodies all or part of the functions previously described herein.
[0204] Those skilled in the art will understand that such computer-readable instructions can be written in a variety of programming languages to be used with many computer architectures or operating systems. Furthermore, such instructions can be stored using any memory technology described herein (including, but not limited to, semiconductor, magnetic, or optical technologies), or transmitted using any communication technology described herein (including, but not limited to, optical, infrared, or microwave technologies). It is conceivable that such computer program products can be distributed as a removable medium with accompanying printed or electronic documentation (e.g., shrink-wrapping software), pre-loaded with a computer system on, for example, a system ROM or a fixed disk, or distributed via a network (e.g., the Internet or the World Wide Web) from a server or electronic bulletin board.
[0205] The accompanying drawings illustrate elements of a data processing apparatus and system related to embodiments of the technology described herein. As those skilled in the art will understand, other elements of the data processing apparatus that are not shown in the drawings may be present. It should also be noted here that the drawings are merely illustrative, and, for example, in practice, the elements shown may share important hardware circuitry, even if they are schematically shown as separate elements in the drawings (or conversely, where elements are shown as sharing important hardware circuitry, these elements may in practice include separate elements).
[0206] Figure 1 An embodiment of a data processing system 100 is schematically illustrated, which can provide and use arrays of data, such as image or video frames, encoded in a manner described herein for display. It should be understood that... Figure 1 Only one example of a system suitable for use with the techniques described herein is shown, and various other arrangements are possible.
[0207] In this embodiment, system 100 includes a data processing device in the form of a system-on-a-chip (SoC) 102. System 100 also includes off-chip (main) memory 116, a display device 118, and a camera 120.
[0208] The SoC 102 includes a central processing unit (CPU) 104, a graphics processing unit (GPU) 106, an image / video processor 108, a display controller 110, an interconnect 112, and a memory controller 114.
[0209] like Figure 1 As shown, CPU 104, GPU 106, image / video processor 108, and display controller 110 communicate with each other via interconnect 112, and communicate with memory 116 via interconnect 112 and memory controller 114. Display controller 110 also communicates with display device 118. Camera 120 also communicates with image / video processor 108 on SoC 102 via interconnect 112.
[0210] In one implementation, the image / video processor 108 reads image data from memory 116, encodes the image data using a suitable encoder circuit 122 (e.g., in the manner described herein), and then outputs the encoded image data, for example, for storage in memory 116 or for streaming to another device. The encoded image data may later be retrieved and decoded, for example, by a suitable decoder circuit 124 of the image / video processor 108, or received and decoded by another device. Although the image / video processor 108 is shown as having separate encoder circuit 122 and decoder circuit 124, it should be understood that this is merely illustrative and these may form part of a common encoding / decoding circuit. The decoded image data may then be output, for example, by display controller 110 to display device 118 or by another device for display.
[0211] Therefore, within such data processing systems, it may be desirable to compress the image data being processed at various points. Furthermore, to facilitate higher throughput, such as for higher bandwidth media applications, it may be desirable to guarantee a given bandwidth (bitrate).
[0212] In this embodiment, an encoding scheme as described in International Patent Application PCT / GB2019 / 053416 (WO 2020 / 115471) is used. This encoding scheme can encode image data into data blocks of fixed size, thereby ensuring the use of the desired bit rate. The encoding scheme is a block-based scheme.
[0213] Each data element in the block (e.g., a sampling location or pixel within an image) is associated with a corresponding group of multiple data values (e.g., a set of color values representing the sampling location or pixel under consideration).
[0214] The encoding scheme in this embodiment involves applying a space-to-frequency transform, such as a discrete cosine transform (DCT) or a similar transform, to a block to generate a corresponding block of signed frequency transform coefficients. The frequency transform coefficient blocks are then encoded into fixed-size data packets using bit-plane-based entropy coding.
[0215] In this embodiment, the data processing system uses image data in RGB(A) color format. However, the encoding scheme is designed to encode data provided in YUV color format. Therefore, the encoding scheme also involves applying color transformations to blocks to convert the original RGB(A) color values into YUV color format for encoding.
[0216] Figure 2 The corresponding decoding process is shown. The decoding process is actually the reverse of the encoding process described above.
[0217] Therefore, as Figure 2 As shown, when the data processor needs to use the data value of the data element, the decoder can operate to read the compressed bit stream (step 200) and perform the initial steps of entropy decoding (step 201) to determine the initial decoded representation of the data value in a first uncompressed data format (which is the YUV color format in this embodiment) based on the compressed representation of the data value.
[0218] Then, the data values are subjected to an inverse color transformation in the initial decoded representation of the first uncompressed data format to convert the data values in YUV color format to the desired RGB(A) color format (step 202), and an inverse spatial transformation is performed (step 203) to convert the data values from the frequency domain back to the desired spatial distribution.
[0219] Therefore, the output of the decoding (step 204) is an uncompressed encoded unit (i.e., a decoded data block) in a suitable format, which the data processing system can then use.
[0220] In this embodiment, when encoding image data blocks, at least some of the image data is encoded using a “raw” encoding scheme, wherein the most significant bit representing the data value of different sampling points within the image is added to the data group “as is” until the data group is full.
[0221] Therefore, this "original" encoding scheme adds as many most significant bits as possible to the data elements until the desired data block size is reached. However, depending on the desired size of the data block, this may have the effect of truncating at least some of the data values.
[0222] For example, in a typical example, one or two least significant bits may be discarded for each data value.
[0223] Correspondingly, this means that when the compressed bitstream is subsequently decoded, the initial decoded data value determined by entropy decoding (step 201) may have one or more “missing” bits, which correspond to the least significant bits that were discarded during the encoding process.
[0224] Figure 3 Showing from Figure 2 An example of the output pixel in the initial entropy decoding step of the decoder operation. As shown, the pixel is associated with three data values (samples 0, 1, and 2) corresponding to the YUV color channels. In this example, each data value at this stage has one or more missing least significant bits (i.e., is "quantized"). Specifically, the first color channel (Y channel) has a single missing bit 301, the second color channel (U channel) has two missing bits 302 and 303, and the third color channel (V channel) has a single missing bit 304.
[0225] To approximate the contribution of these missing bits, various suitable rounding adjustments can be applied to the initial decoded data value, such as to fill in any missing bits. Various suitable rounding schemes can be applied to attempt to provide a better approximation of the original data value.
[0226] However, the applicant recognizes that when such rounding is applied, depending on the rounding scheme, certain missing bit patterns can introduce problematic behavior. Specifically, the applicant has discovered that when the same data slice is encoded / decoded multiple times, certain missing bit patterns exist that can cause at least some data values in the color channel to continue to increase with each encoding / decoding cycle, resulting in a degradation of image quality with each encoding / decoding cycle.
[0227] This could be the result of, for example, the interaction between the rounding scheme applied during the decoding process and the inverse color transformation.
[0228] In embodiments of the invention, the decoder is thus operable to identify such instances of potentially problematic missing bit patterns, and when a data element has a missing bit pattern that has been found to cause such problematic behavior, the decoder applies a different rounding scheme to its otherwise normally used rounding scheme.
[0229] Therefore, the decoder of this embodiment checks for missing bit patterns in the data element and determines whether this is a bit pattern that has (previously) been identified as producing problematic behavior when the data element is repeatedly encoded / decoded, and in that case, for example, and in one embodiment, the data element is exceptionally processed by applying a rounding scheme different from the rounding scheme that the decoder would otherwise use.
[0230] In other words, during normal operation, and for any data element that does not contain a missing bit pattern that has been identified as causing such problematic behavior (or a data element in which there are no missing bits, i.e., the pattern is an "empty" pattern), the decoder applies a first "standard" rounding scheme (e.g., the rounding scheme described in International Patent Application Publication No. WO2020 / 115471 (PCT / GB2019 / 053416), the contents of which are incorporated herein by reference in their entirety).
[0231] However, when the decoder detects a data element containing a problematic missing bit pattern, it instead applies a different second rounding scheme.
[0232] The missing bit patterns that cause this behavior will generally depend on the encoding / rounding scheme under consideration. Therefore, while various examples of problematic missing bit patterns for this encoding scheme are described in the table below, along with appropriate rounding adjustments, problematic missing bit patterns may also exist depending on the encoding / rounding scheme under consideration. However, these can be predetermined for a specific encoding / rounding scheme and then stored, enabling the decoder to recognize such cases and apply the exceptional rounding scheme accordingly.
[0233] therefore, Figure 4 An example of the decoding process according to this embodiment is shown. Figure 4 As shown, after recreating the quantized samples via initial entropy decoding (step 400), these quantized samples may have one or more missing bits, and then appropriate rounding adjustments are applied (step 401) to recreate any missing bits. For most data elements, the entropy decoder uses its "standard" rounding scheme, such as the rounding heuristic chosen to provide the expected optimal image quality. However, when the entropy decoder detects a problematic missing bit pattern (step 402), a different rounding scheme is applied.
[0234] Specifically, in this example, when a problematic missing bit pattern is identified, a different rounding adjustment is used where the specific bit is (always) set to "0", instead of applying the standard rounding scheme.
[0235] Therefore, in this embodiment, after the initial entropy decoding, before applying any rounding to fill any missing bits (those discarded during encoding and therefore for which no indicative data is stored), the missing bit pattern is checked to see if the missing bit pattern is the one that has been found to cause this problematic behavior.
[0236] Then, such cases are handled as exceptions. That is, instead of applying a rounding scheme (which can be a fixed rounding scheme or one that can be selected by the decoder), at least some of the missing bits are set to zero (i.e., a "zero" rounding scheme is applied).
[0237] Decoding then continues as usual, for example, by applying the desired inverse color transformation (step 403) and inverse space transformation (step 404) to convert the data values into the desired data format for use by the data processing system.
[0238] For example, Table 1 shows the number of missing bits that can cause problematic behavior in the first color channel (e.g., the Y channel).
[0239] Sample 0 Sample 1 Sample 2 Mode 1 1 2 X
[0240] Table 1
[0241] In this scenario, the color channel (e.g., the Y channel) represented by sample 0 exhibits problematic behavior when there is one missing bit in the first channel, two missing bits in the second (e.g., U) channel, and any number of missing bits in the third (e.g., V) channel.
[0242] Specifically, in this example, if the missing bits of sample 0 (Y channel) are rounded to "1" based on a standard rounding scheme (for example), the Y value can continue to grow with each encoding / decoding cycle.
[0243] Therefore, when this missing bit pattern is identified, the decoder should (and in this embodiment, does) always set the least significant bit of sample 0 (Y channel) to "0" instead of applying the standard rounding scheme. However, other samples (sample 1 and sample 2) can still be rounded normally, since the problematic behavior only applies to sample 0 (Y channel).
[0244] For example, Table 2 shows the number of missing bits in the problematic pattern of the second (e.g., U) color channel (sample 1). In this case, the least significant bit of sample 1 (U channel) should (and actually) always be set to "0" to prevent problematic behavior. Similarly, other samples (Y channel and V channel) can be rounded as usual.
[0245] Sample 0 Sample 1 Sample 2 Mode 1 1 1 2 Mode 2 1 2 1 Mode 3 1 2 2
[0246] Table 2
[0247] It should be understood that these specific examples are provided for illustrative purposes only, and depending on, for example, the encoding / decoding scheme, there may be various other problematic missing bit patterns that can be handled in a similar manner. For example, once a problematic missing bit pattern is identified for a particular encoding / decoding scheme, an appropriate exception rounding scheme can be identified.
[0248] In this way, by selecting the adjustment scheme to be applied based on the missing bit pattern generated by the initial entropy decoding, this implementation can provide an improved stable encoding / decoding process, for example, which is stable within repeated encoding / decoding loops.
[0249] Another source of potentially problematic behavior when repeatedly encoding / decoding the same data slices occurs when the encoder must choose which encoding parameters to use. In this case, where the encoder has multiple available encoding schemes and must choose between different encoding parameters, it might be desirable to force the encoder to use the same parameters when encoding the same data slices in order to provide more consistent encoding (since this may not be the case).
[0250] In this embodiment, the encoded "hint" is therefore included in the decoded image data, thereby instructing the encoder which encoding parameters should be used the next time the data is encoded. This information can be embedded in the image data itself, for example, by storing the information by appropriately setting the value of the least significant bit of a particular pixel.
[0251] Encoding hints can be generated during the decoding process and added to the decoded data.
[0252] therefore, Figure 5 A decoding stream according to another implementation is shown.
[0253] The decoding process begins by reading the compressed data (step 500), and then performs initial entropy decoding, including any rounding (step 501), as described above.
[0254] The decoder then reads the compressed metadata associated with the compressed data (step 502) to determine which color transformation matrix was used during encoding. The decoder then applies the appropriate inverse color transformation matrix (step 503) and inverse space transformation (step 504) in a similar manner to the above to determine the decoded data value.
[0255] However, instead of outputting the decoded image at this stage as in the previous embodiment, the decoder will embed an encoding cue indicating which color transformation matrix was used into the decoded image data (step 505). The decoded image including the embedded encoding cue is then written out for use by the data processing system (step 506).
[0256] When the image needs to be encoded again, the encoder is thus able to read the embedded encoding cue and use it to determine which color transformation matrix to use.
[0257] exist Figure 6 The encoding stream is shown in the diagram. The input image is read (step 600), and then the encoder extracts the bit values of the encoding cue from the input image (step 601). When the encoder is able to recognize the encoding cue (step 602 - Yes), the encoder selects the indicated color transformation matrix for use (step 603).
[0258] Otherwise, if the encoder cannot recognize the encoding prompt (step 602 - No), the encoder uses its standard heuristic to determine which color transformation matrix to use (step 604).
[0259] Encoding then proceeds as usual, with the appropriate spatial transformation matrix applied (step 605), followed by the application of a color transformation using the selected matrix (step 606). The transformed data values are then quantized and entropy encoded (step 607), and the compressed data, along with metadata indicating which color transformation matrix was used, is written to the compressed output buffer (step 608).
[0260] In this embodiment, data elements within the image data itself are used to store the encoding cue. For example, the least significant bits of a specific set of pixels within the image can be used to store the value of the encoding cue. The encoder can then read the least significant bits of those pixels and compare that value with a list of corresponding values associated with the encoding cue. When the encoder recognizes the encoding cue, it can then apply the color transformation matrix associated with that encoding cue.
[0261] For example, there could be eight different color transformation matrices, and eight different values corresponding to the encoding cue. When one of these eight values is detected, the encoder uses the corresponding color transformation matrix.
[0262] On the other hand, if the bit value does not correspond to one of the eight encoding tips, the encoder determines which color transformation matrix to use in the normal manner.
[0263] exist Figure 7 The image shows an example of how encoded hints can be stored within an array of image data.
[0264] Figure 7 (A) shows an example of an image data block 700, where a subset 701 of data elements (e.g., pixels) is used to store an encoded cue. Specifically, the least significant bits of the four pixels 701 are used to store the value of the encoded cue.
[0265] Figure 7 (B) shows another example of an image data block 700, where a different subset 702 of data elements is used to store encoded cues. Figure 7 In (B), the pixels used to store the encoded cues are compared with... Figure 7 The different modes used in (A) are distributed within image data block 700. For example... Figure 7 As in (B), spacing the pixels used to store coded cues further apart can help reduce the user's perception of coded cues in the image data. However, any suitable pixel pattern or distribution can be used to store coded cues.
[0266] Generally, any suitable subset of data elements can be used to store encoding cues. However, the number of pixels used to store encoding cues should be relatively small to maintain image fidelity. The locations of the pixels used can also be chosen to be far from the intended region of interest in the image.
[0267] The values used to represent encoding hints are also selected to avoid common values (such as "0"), for example, to prevent the encoder from erroneously detecting encoding hints in places where no encoding hints have been added.
[0268] Furthermore, in this embodiment, the eight distinct coded cues are represented as 8-bit values (using the 8 least significant bits across the image data distribution). It should be understood that only 3 bits could be used to represent the eight distinct coded cues. However, using a larger number of bits reduces the likelihood that the 8-bit values used to represent the coded cues might naturally appear in the image data, thus causing the encoder to erroneously detect the presence of coded cues at locations where they are not present.
[0269] The specific embodiments described above are presented for illustrative and descriptive purposes only. They are not intended to be exhaustive or to limit the technology described herein to the precise forms disclosed. Many modifications and variations are possible in accordance with the teachings above. The described embodiments were chosen to best explain the principles of the technology described herein and its practical application, thereby enabling others skilled in the art to best utilize the technology described herein in various embodiments and with various modifications suitable for the particular intended use. The scope of the invention is intended to be defined by the appended claims.
Claims
1. A method for determining the data value of a data element in a data element array from an encoded representation of the data element array, Each data element in the data element array is associated with one or more corresponding data values, and each data value is represented by a corresponding bit sequence. The encoded representation of the data element array uses a subset of one or more bits of the corresponding bit sequence of the data value to represent at least some of the data values of the data elements in the data element array, such that for those data elements, data indicating the bit values of one or more other bits of the corresponding bit sequence of the data value are not stored in the encoded representation; The method includes: Decoding the encoded representation of the data element array to determine an initial bit sequence representing the data value of the data element, wherein the determined initial bit sequences of the data value of the data element can have one or more missing bits corresponding to one or more bits whose data is not stored in the encoded representation; For the data value of the data element, determine which bits (if any) are missing; Depending on which bits (if any) are missing for the data value of the data element, an adjustment scheme to be applied to the data value of the data element is selected from a plurality of available adjustment schemes; as well as The selected adjustment scheme is applied to the data value of the data element to obtain the decoded data value of the data element.
2. The method of claim 1, wherein each data element in the data element array is associated with a corresponding data value group, wherein each data value in the data value group of the data element is defined by a corresponding bit sequence in a first uncompressed data format, the method comprising: When it is desired to use the data value of a data element in the data element array stored in the encoded representation of the data element array: An initial bit sequence is determined for each data value in the data value group of the data element according to the encoded representation of the data element array, wherein the determined plurality of initial bit sequences represent the data value in the data value group of the data element in the first uncompressed data format, but may have one or more missing bits corresponding to one or more discard bits whose data is not stored in the encoded representation; Identify the missing bit pattern of the data value group associated with the data element from a plurality of determined initial bit sequences of the data values in the data value group of the data element; and The adjustment scheme is selected based on the identified missing bit pattern.
3. The method of claim 2, wherein selecting the adjustment scheme based on the identified missing bit pattern comprises comparing the identified missing bit pattern with one or more preposition patterns that have been found to cause problematic behavior in at least one of the data values.
4. The method of claim 3, wherein when such a missing bit pattern is identified, the selected adjustment scheme includes setting one or more least significant bits of the at least one of the data values to zero.
5. The method according to any one of claims 1 to 4, wherein the data element array is an image data array, and wherein the one or more data values associated with each data element comprise a corresponding set of one or more color values.
6. The method according to any one of claims 1 to 4, comprising converting the decoded data value from a first uncompressed data format to a second uncompressed data format for use by a data processing system.
7. The method of claim 6, wherein transforming the decoded data value from the first uncompressed data format to the second uncompressed data format includes an inverse color transformation.
8. The method of any one of claims 1 to 4, wherein the decoding is performed using associated metadata of the encoded representation, the associated metadata indicating one or more encoding parameters for generating the encoded representation, the method further comprising associating an encoding hint with the decoded data value, the encoding hint including an indication for generating the one or more encoding parameters of the encoded representation.
9. A method for processing data using a decoder, the method comprising: Decoding an encoded representation of a data element array to determine a set of decoded data representing the data element array in a first uncompressed data format, wherein the decoding is performed using associated metadata of the encoded representation, the associated metadata indicating one or more encoding parameters for generating the encoded representation; The decoder determines the one or more encoding parameters for generating the encoded representation based on the associated metadata of the encoded representation, and generates an encoding hint from therein, the encoding hint including an indication of the one or more encoding parameters for generating the encoded representation; as well as The decoder associates the encoding hint with the set of decoded data so that when the decoded data is subsequently encoded, the one or more encoding parameters indicated by the encoding hint can be determined.
10. The method of claim 9, wherein associating the encoded hint with the decoded data set comprises storing the encoded hint in the data element array using a corresponding set of bits from different data elements in the data element array.
11. A decoder for determining the data values of data elements in a data element array from an encoded representation of the data element array. Each data element in the data element array is associated with one or more corresponding data values, and each data value is represented by a corresponding bit sequence. The encoded representation of the data element array uses a subset of one or more bits of the corresponding bit sequence of the data value to represent at least some of the data values of the data elements in the data element array, such that for those data elements, data indicating the bit values of one or more other bits of the corresponding bit sequence of the data value are not stored in the encoded representation; The decoder includes: Decoding circuit, the decoding circuit being configured as follows: Decoding the encoded representation of the data element array to determine an initial bit sequence representing the data value of the data element, wherein the determined initial bit sequences of the data value of the data element can have one or more missing bits corresponding to one or more bits whose data is not stored in the encoded representation; Rounding circuit, the rounding circuit being configured as follows: For the data value of the data element, determine which bits are missing; Depending on which bits are missing for the data value of the data element, an adjustment scheme to be applied to the data value of the data element is selected from multiple available adjustment schemes; and The selected adjustment scheme is applied to the data value of the data element to obtain the decoded data value of the data element.
12. The decoder of claim 11, wherein each data element in the data element array is associated with a corresponding data value group, wherein each data value in the data value group of the data element is defined by a corresponding bit sequence in a first uncompressed data format, and wherein the rounding circuit is configured to: An initial bit sequence is determined for each data value in the data value group of the data element according to the encoded representation of the data element array, wherein the determined plurality of initial bit sequences represent the data value in the data value group of the data element in the first uncompressed data format, but may have one or more missing bits corresponding to one or more discard bits whose data is not stored in the encoded representation; Identify the missing bit pattern of the data value group associated with the data element from a plurality of determined initial bit sequences of the data values in the data value group of the data element; and The adjustment scheme is selected based on the identified missing bit pattern.
13. The decoder of claim 12, wherein the rounding circuit is configured to select the adjustment scheme based on the identified missing bit pattern by comparing the identified missing bit pattern with one or more pre-position patterns that have been found to cause problematic behavior in at least one of the data values.
14. The decoder of claim 13, wherein when such a missing bit pattern is identified, the selected adjustment scheme includes setting one or more least significant bits of at least one of the data values to zero.
15. The decoder according to any one of claims 11 to 14, wherein the data element array is an image data array, and wherein the one or more data values associated with each data element comprise a corresponding set of one or more color values.
16. The decoder according to any one of claims 11 to 14, wherein the decoding circuit is configured to transform the decoded data value obtained from the rounding circuit from a first uncompressed data format to a second uncompressed data format for use by a data processing system.
17. The decoder of claim 16, wherein the decoding circuitry is configured to transform the decoded data value from the first uncompressed data format to the second uncompressed data format by applying an inverse color transformation.
18. The decoder according to any one of claims 11 to 14, wherein the decoding circuitry is configured to decode the encoded representation using associated metadata for the encoded representation, the associated metadata indicating one or more encoding parameters for generating the encoded representation. The decoding circuit is further configured to determine the one or more encoding parameters for generating the encoded representation based on the associated metadata of the encoded representation, and to generate an encoding hint from therefrom, the encoding hint including an indication of the one or more encoding parameters for generating the encoded representation; The decoder also includes an output circuit configured to output decoded data and associate the encoded hint with the decoded data.
19. A decoder, comprising: A decoding circuit configured to decode an encoded representation of a data element array to determine a set of decoded data representing the data element array in a first uncompressed data format, wherein the decoding is performed using associated metadata of the encoded representation, the associated metadata indicating one or more encoding parameters for generating the encoded representation; The decoding circuit is further configured to determine the one or more encoding parameters for generating the encoded representation based on the associated metadata of the encoded representation, and to generate an encoding hint from therefrom, the encoding hint including an indication of the one or more encoding parameters for generating the encoded representation; The decoder also includes an output circuit configured to output decoded data and associate the encoding hint with the decoded data, such that when the decoded data is subsequently encoded, the one or more encoding parameters indicated by the encoding hint can be determined.
20. The decoder of claim 19, wherein associating the encoded hint with the decoded data set comprises storing the encoded hint in the data element array using corresponding bit sets from different data elements in the data element array.