Transform coefficient block coding
Patent Information
- Application Number
- CN202311076613.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2018-03-29
- Filing Date
- 2019-03-28
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2039-03-28
AI Technical Summary
[0016] Finally, another aspect of this application addresses the use of partition-specific context sets and proposes improving coding efficiency by decoupling the scan pattern from the partitions. This is achieved by traversing the transform coefficients of the transform coefficient block in such a way that at least one transform coefficient of the first partition is traversed between two transform coefficients of the second partition, and the transform coefficients of the transform coefficient block are encoded sequentially along the scan pattern. In this way, it is feasible to traverse the transform coefficients in a manner that allows for more rapid "knowledge gain" during the scanning of transform coefficients to obtain an improved coding history with context selection/adaptation, while simultaneously enabling the appropriate association of each upper and lower set with the respective partitions of the transform block.
Smart Images

Figure CN117119195B_ABST
Abstract
Description
[0001] This application is a divisional application of PCT international application PCT / EP2019 / 057895, filed on March 28, 2019, and filed with the China Patent Office on November 27, 2020, and entered the Chinese national phase, corresponding to invention patent application No. 201980036095.3 entitled "Transformation Coefficient Block Encoding". Technical Field
[0002] This application relates to encoding images and videos using transform coefficient block coding. Background Technology
[0003] In other words, this application relates to the field of digital signal processing, and more specifically, to methods and apparatus for image and video decoders and encoders.
[0004] The purpose of this invention is to provide a concept for more efficiently encoding images and / or videos into data streams. Summary of the Invention
[0005] This objective is achieved through the subject matter of the independent claims of this application.
[0006] According to a first aspect of this application, improved coding efficiency in image encoding is achieved by using a context or context model to entropy encode / decode a transform coefficient block for a certain color component, wherein the context or context model depends on the transform coefficient blocks for different color components. That is, blocks of the image are subjected to separate bianalyses for a first color component and a second color component to obtain a first transform coefficient block for the first color component and a second transform coefficient block for the second color component. The context adaptively entropy encodes / decodes the second transform coefficient block, selecting the context used based on the first transform coefficient block. Both transforms may be related to the prediction residual determined for each color component block, but this is only optional. In any case, rendering the context for entropy encoding / decoding the second transform coefficient block based on the first transform coefficient block improves probability estimation under entropy encoding / decoding, and thus improves coding efficiency. According to an embodiment, the context dependency of the first transform coefficient block is used or applied to an indication of whether the transform coefficients within the corresponding transform coefficient block are encoded into the data stream, or whether the encoding of the transform coefficients within the corresponding transform coefficient block is skipped and all transform coefficients within the corresponding transform coefficient block are zero. This indication may be a flag signaled in the data stream for both transform coefficient blocks. Therefore, according to this embodiment, context-adaptive entropy encoding / decoding is used to perform encoding / decoding of the indication for the second transform coefficient block, depending on the context of the first transform coefficient block, such as depending on the signaled indication in the data stream for the first transform coefficient block or the quantization level of the transform coefficients of the first transform coefficient block.
[0007] According to a second aspect of this application, image encoding using transform coefficient block entropy encoding is presented more efficiently by using a separate set of contexts for entropy encoding of the quantization levels of certain transform coefficients. Specifically, assuming that transform coefficient blocks are encoded into a data stream using a scan pattern, where each transform coefficient block represents a block of an image, the scan pattern sequentially traverses the transform coefficients of the transform coefficient block. Therefore, entropy encoding / decoding is used to encode / decode a set of data representing the transform coefficient block, which is obtained by the scan pattern traversing from a first terminating coefficient position to a second terminating coefficient position in a predetermined direction. This data includes the quantization levels of the transform coefficients in the encoded set of transform coefficients. Using a first set of contexts for the quantization levels of the transform coefficients at the first or second terminating coefficient position, the context adaptively performs the encoding / decoding of the quantization levels, wherein this first set of contexts does not intersect with a second set of contexts for any other transform coefficients in the encoded set of transform coefficients. For example, a separate set of contexts is used for the DC transform coefficients of the transform coefficient block, or in other words, for the transform coefficients on the top-left side, where the predetermined direction results in the DC transform coefficient representing the second terminating coefficient position. For example, the quantization level of the transform coefficients can be encoded by using context adaptation for entropy encoding / decoding, and a set of disjoint contexts can be applied to or used for one or more segments of the binarization, such as the prefix portion of the binarization.
[0008] According to a third aspect of this application, an improvement in encoding efficiency is achieved when encoding an image using entropy encoding of a transform coefficient block, by determining the context for entropy encoding / decoding of the quantization level of the transform coefficients of the currently encoded transform coefficient block based on the sum of one or more previously encoded transform coefficients and / or the number of valid transform coefficients among one or more previously encoded transform coefficients, where the one or more previously encoded transform coefficients are located at positions determined by local templates located in the currently encoded / decoded transform coefficients. That is, local templates are used to examine transform coefficients located nearby within the transform coefficient block, provided that the quantization level of one or more transform coefficients examined is disclosed by a previous portion of the data stream. For example, entropy encoding / decoding of the quantization level of the transform coefficients in the transform coefficient block can be performed sequentially on a binary basis by entropy encoding / decoding segments of binarized data in multiple paths, and thus the context for at least one segment of binarized data for the currently encoded / traversed transform coefficients is determined based on the sum of the transform coefficients located in the local template and / or the number of valid transform coefficients among the transform coefficients located in the local template. For example, the sum of binarized previously encoded / decoded segments based on the coefficient levels of one or more previous transform coefficients can be the sum of the absolute values of the coefficient levels of one or more previous transform coefficients located in the local template, wherein the one or more previous transform coefficients have at least the absolute values. Additionally or alternatively, the context can be determined based on the number of valid transform coefficients among the one or more previous transform coefficients located in the local template, wherein the validity is determined based on the segments of previous encoding / decoding.
[0009] Another aspect of this application relates to encoding the transform coefficients of a transform coefficient block using binarization of the absolute value of the quantization level of the transform coefficients. According to this aspect, improved encoding efficiency is achieved by setting binarization parameters for parameterizing the binarization of the currently encoded / decoded transform coefficients based on the sum of one or more previously encoded transform coefficients and / or the number of valid transform coefficients among one or more previously encoded transform coefficients, where one or more previously encoded / decoded transform coefficients are located at positions determined by local templates positioned in the currently encoded / decoded transform coefficients. For example, a first portion of the binarized transform coefficients can be encoded using context-adaptive entropy encoding / decoding, while a second portion of the binarized transform coefficients can be encoded / decoded using an equal-probability bypass mode. That is, the second portion is written to the data stream at a coding rate of 1 and read from the data stream at a coding rate of 1. The second portion may include a prefix portion and a suffix portion, and the binarization parameters can determine the length of the prefix portion. The length may, for example, be an exponential Golomb order or a Rice parameter. Statements similar to those above may be correct regarding the possibility of encoding the transform coefficients or their coefficient levels in several pathways for a block of transform coefficients, and regarding taking this into account when forming the sum and / or determining the number of effective coefficients.
[0010] Another aspect of this application relates to binary encoding of the absolute values of the quantization levels of the transform coefficients of a transform coefficient block. Specifically, according to this aspect, image encoding is made more efficient by adaptively changing the cutoff value associated with binarization. The binarization includes a first binarization code and a second binarization code, the first binarization code being below the cutoff value and the second binarization code being above the cutoff value and prefixed with the codeword used by the first binarization code for the cutoff value. The adaptive change of the cutoff value is performed based on the previously encoded / decoded transform coefficients. For example, the adaptation can be accomplished by also causing the cutoff value to be set to zero, and then the binarization including only the second binarization code. Encoding can be accomplished such that segments of the second binarization code are context-adaptively encoded, while segments of the second binarization code are encoded in a bypass mode.
[0011] Another aspect of this application relates to a cutoff value, and aims to improve coding efficiency by setting the cutoff value according to one or more of the following: block size, color components of the block, prediction mode of the prediction signal, the prediction mode of the block representing the prediction residual, transformation of the transform coefficient block, quantization parameters for quantizing the transform coefficient block, and a measure of the energy of previously encoded / decoded transform coefficients, wherein the latter may be located at a position determined by a local template located in the currently encoded / decoded transform coefficient or at a position in the transform coefficient block that is offset from the current partition, the currently encoded / decoded transform coefficient being located in the current partition and preceding the current partition according to the coding order used to encode / decode the absolute values of the quantization levels of the transform coefficients of the transform coefficient block, the coding order being defined by traversing the transform coefficients of the transform coefficient block along the scan pattern in a predetermined direction.
[0012] Another aspect of this application aims to improve the encoding efficiency of image encoding using transform coefficient block encoding by intelligently setting the shape of local templates or disabling local templates. This intelligent approach is used for context-adaptive entropy encoding of the quantization level of the transform coefficients of the transform coefficient block. Specifically, the dependencies may involve one or more of the following: the size of the block, the color components of the block, the position of the terminating coefficient (the last non-zero transform coefficient located at the terminating coefficient position when traversing the scan pattern in the forward direction), and the transform performed on the transform coefficient block. The context can then be determined based on one or more previously encoded / decoded transform coefficients located at positions determined by the local templates positioned on the currently encoded / decoded transform coefficients, or, if the local templates are disabled, regardless of these transform coefficients. In this way, the context management complexity, the number of contexts, and the context efficiency in terms of probability estimation accuracy can be better determined or adapted according to actual needs. In this regard, it should be recognized that excessive use of context does not necessarily increase encoding efficiency. Rather, the selection of context needs to take into account that: preferably, context should be used frequently enough to obtain good probability estimates through context updates. Therefore, this aspect aims to adapt the context management features to the needs in order to improve encoding efficiency.
[0013] According to another aspect of this application, in order to use a separate set of contexts for each partition, the transform coefficient block is divided into patterns. The aim is to improve coding efficiency by changing the shape of the partitions so that they are inconsistent with each other within the transform coefficient block, and / or by making the shape of the partitions different according to the scan pattern, performing entropy encoding / decoding of the quantization level of the transform coefficient block along the scan pattern, and / or by making the shape of the partitions different according to the block size and / or by making the shape of the partitions different according to the displayed partition shape information. Again, the idea behind this aspect involves the necessity of adapting the context management complexity to practical needs. This, in turn, improves coding efficiency.
[0014] Another aspect of this application relates to signaling an indication in the data stream for each partition, dividing the transform coefficient block into partitions, which in turn indicates whether all transform coefficients within the corresponding partition are encoded into the data stream in real time, or whether encoding of all transform coefficients within the corresponding partition is skipped and all transform coefficients within the corresponding partition are zero. Specifically, according to this aspect of the application, the indication is described in a manner that indicates whether all coefficients are encoded or no coefficients are encoded. Each of these partitions may have a set of contexts associated with it, which are used for encoding if the indication indicates encoding of transform coefficients within the corresponding partition. In other words, the partition-level zeroing indication here indicates that, if so, all transform coefficients within a certain partition are encoded, and this situation no longer needs to be challenged.
[0015] Another aspect of this application relates to the following: spending a partition-specific context set to encode the quantization level of transform coefficients within each partition, and aiming to improve encoding efficiency by signaling the partitioning mode for transform coefficient blocks in the data stream, the partitioning mode indicating whether partitioning is used, or indicating whether such partitioning is disabled, and instead, a set of the context is used globally for transform coefficient blocks.
[0016] Finally, another aspect of this application addresses the use of partition-specific context sets and proposes improving coding efficiency by decoupling the scan pattern from the partitions. This is achieved by traversing the transform coefficients of the transform coefficient block in such a way that at least one transform coefficient of the first partition is traversed between two transform coefficients of the second partition, and the transform coefficients of the transform coefficient block are encoded sequentially along the scan pattern. In this way, it is feasible to traverse the transform coefficients in a manner that allows for more rapid "knowledge gain" during the scanning of transform coefficients to obtain an improved coding history with context selection / adaptation, while simultaneously enabling the appropriate association of each upper and lower set with the respective partitions of the transform block. Attached Figure Description
[0017] The advantageous implementations of the above embodiments and aspects are the subject matter of the dependent claims. Preferred embodiments of this application are described below with reference to the accompanying drawings, in which:
[0018] Figure 1 A schematic block diagram of a block-based predictive decoder using transform-based residual coding is shown, which serves as an example of a possible implementation of the embodiments of this application described herein;
[0019] Figure 2 It shows that it is suitable for Figure 1 A schematic block diagram of a block-based predictive video decoder for an encoder, which serves as an example of a possible implementation of an embodiment of the decoder described herein;
[0020] Figure 3 The illustration shows an example of dividing an image into coded blocks using intra-frame prediction and inter-frame prediction coding, and an example of dividing the same image into residual blocks for a transform-based residual transformation of the prediction residual. The residual-based prediction correction is also illustrated by adding the prediction signal and the residual signal separately.
[0021] Figure 4 A schematic diagram is shown illustrating the transformation-based residual encoding of the residual block by inverse encoding of the transform coefficient block 92 associated with the residual block via a certain transformation.
[0022] Figure 5 The diagram illustrates how, when scanning transform coefficients from a specific first-scanned transform coefficient (such as a DC coefficient) to the coefficient furthest from that first coefficient, the encoding set of the transform coefficients of the transform coefficient block is encoded by defining the encoding set via an indication of the last non-zero transform coefficient, such that the encoding set includes all coefficients between the transform coefficient at the last non-zero coefficient and the position of the first coefficient.
[0023] Figure 6 A schematic diagram illustrating the possibility of encoding transform coefficients using binarization consisting of a first binarization code and a second binarization code is shown, wherein the binarization is switched from a state that includes only the first binarization code to a state where the binarization includes the codeword for the cutoff value in the first binarization code, followed by the second binarization code;
[0024] Figure 7 This illustrates when such binarization can be used as, for example... Figure 6 The second binary code is based on the possibility of having a prefix part and a suffix part;
[0025] Figure 8 An illustrative example is shown of partitioning a block of transform coefficients into partitions, here divided into multiple row partitions and multiple column partitions, so that each partition consists of an array of coefficients, wherein the partitioning can be used in relation to a set of contexts related to the transform coefficients and / or the zeroness of the transform coefficients, as described below;
[0026] Figure 9 This is a schematic diagram illustrating the use of partitioning for contextual set associativity;
[0027] Figure 10 The transform coefficient block and the local template used for the currently encoded / decoded transform coefficient block are schematically shown in order to select a context for the transform coefficients of the currently encoded / decoded entropy;
[0028] Figure 11aA schematic diagram illustrating how to encode a residual block by decomposing it into more than one color component is shown;
[0029] Figure 11b The diagram illustrates data 96 encoded into data stream 14 as transform coefficient block 92, which includes a global nulling indication 190 indicating whether all transform coefficients of block 92 are zero. If all transform coefficients of block 92 are zero, the quantization level of the transform coefficients does not need to be encoded, but can be inferred as zero on the decoder side.
[0030] Figure 11c The illustration shows the purpose of dividing the transform coefficient block into partitions so that the nulling of the transform coefficients can be indicated by encoding the sub-block flag CBF on a partition-by-partition basis.
[0031] Figure 11d The data 96 shown, which encodes a block of transform coefficients, may include a last position indicator 114, which indicates, as... Figure 5 The position of the last coefficient of the non-zero transform coefficients shown;
[0032] Figure 11e An example is shown of entropy decoding / encoding of the quantization level of transform coefficients using a context from the context set in a context-adaptive manner;
[0033] Figure 11f This schematically illustrates the fact that data encoded with transform coefficient blocks can include sequential encoding of the quantization levels of the transform coefficients in encoding order 102, which traverses from the last coefficient position to the first coefficient position. Figure 5 The scanned portion corresponds to the one in the image;
[0034] Figure 12 A schematic diagram illustrating a first embodiment of the present application is shown, which performs context selection for a color component based on a transform coefficient block of the same residual block for another color component;
[0035] Figure 13 The illustration shows how to divide the transform coefficient block into... Figure 8 A schematic diagram of the inconsistently shaped partitions shown;
[0036] Figure 14 The description has been changed. Figure 10 The diagram shows the possible shapes of the local template used for context selection, or even a schematic of disabling the local template;
[0037] Figure 15The diagram illustrates how a block of transform coefficients is divided into partitions using a scanning section that sequentially encodes the transform coefficients by traversing the transform coefficients in a manner that interleaves the transform coefficients of the partitions.
[0038] Figure 16 This illustrates the transformation coefficient block and its use. Figure 15 The diagram illustrates the encoding of the interleaved scan portion, which exemplarily shows the transform coefficients of the current entropy encoding / decoding and the transform coefficients of the previous encoding that exceed certain thresholds. For example, the count of the transform coefficients of the previous encoding that exceed certain thresholds is used to perform context selection for the transform coefficients of the current entropy encoding / decoding.
[0039] Figure 17 This diagram illustrates, on one hand, the encoded sequence showing the quantization level of the coefficients, and on the other hand, the nulling indication of the encoded sub-block flags. This is achieved by... Figure 18 The transform coefficient blocks of the interleaved scan portion shown as an example are encoded to obtain the result;
[0040] Figure 18 It also shows having a pair of Figure 15 and Figure 16 The scan portion of the transform coefficient block, which shows the transform coefficients of different partitions interleaved, is shown with non-zero coefficients indicated by shading.
[0041] Figure 19 A partition-level scan example of a transformation example of a block of transform coefficients is shown;
[0042] Figure 20 The pseudocode used to encode the transform coefficient block is shown;
[0043] Figure 21 The pseudocode for binarizing the absolute values of the quantization levels of the transform coefficients is shown;
[0044] Figure 22 An example is shown for binarizing the absolute values of the quantization levels of the transform coefficients;
[0045] Figure 23 Pseudocode for encoding the transform coefficients of a transform coefficient block is shown;
[0046] Figure 24 The pseudocode used to encode the transform coefficients of the transform coefficient block is shown; and
[0047] Figure 25 Different examples of dividing the transform coefficient block into partitions are shown. Detailed Implementation
[0048] The following description of the accompanying figures begins with the presentation of a video encoder and video decoder performing block-based predictive coding and decoding on images of a video, to form an example for an encoding framework in which the embodiments described herein can be incorporated. References Figures 1 to 3 A video encoder and a video decoder are described. Below, other embodiments of this application are described with respect to the accompanying drawings. The same parts are numbered, and in the foregoing sections, reference numerals are used to indicate which parts refer to the embodiments described and claimed below. All these embodiments can be respectively incorporated into Figure 1 Video encoders and Figure 2 In video decoders, although the embodiments described herein (e.g., those described with reference to the following figures) can also be used to form video decoders that do not conform to... Figure 1 Video encoders and Figure 2 The video encoder and video decoder operate under the encoding framework of the video decoder.
[0049] Figure 1 An apparatus for predictively encoding a video 11 consisting of a sequence of images 12 into a data stream 14 is shown. For this purpose, block-level predictive coding is used. Furthermore, transform-based residual coding is used exemplarily. Reference numeral 10 is used to denote the apparatus or encoder. Figure 2 The corresponding decoder 20 is shown, which is an apparatus 20 configured, here also exemplarily, to predictively decode the video 11' composed of pictures 12' from the data stream 14 in units of picture blocks, where the apostrophe has been used to indicate that the pictures 12' and video 11' reconstructed by the decoder have deviated from the pictures 12 originally encoded by the apparatus 10 in terms of the coding loss introduced by the quantization of the predictive residual signal. Figure 1 and Figure 2 Transform-based prediction residual coding is used exemplarily, although embodiments of this application are not limited to this prediction residual coding. For reference... Figure 1 and Figure 2 The same applies to other details described, which will be outlined below.
[0050] Encoder 10 is configured to perform a spatial-to-spectral transformation on the prediction residual signal and encode the resulting prediction residual signal into data stream 14. Similarly, decoder 20 is configured to decode the prediction residual signal from data stream 14 and perform a spectral-to-spatial transformation on the resulting prediction residual signal.
[0051] The encoder 10 may internally include a prediction residual signal former 22 that generates a prediction residual 24 to measure the deviation of the prediction signal 26 from the original signal (i.e., video 11 or current image 12). The prediction residual signal former 22 may be, for example, a subtractor that subtracts the prediction signal from the original signal (i.e., current image 12). The encoder 10 then includes a transformer 28 that performs a space-to-spectrum transform on the prediction residual signal 24 to obtain a spectral domain prediction residual signal 24', which is then quantized by a quantizer 32 also included in the encoder 10. The quantized prediction residual signal 24' is thus encoded into a bitstream 14. For this purpose, the encoder 10 may optionally include an entropy encoder 34 that entropy-encodes the transformed and quantized prediction residual signal into the data stream 14. The prediction residual 26 is generated by the prediction stage 36 of the encoder 10 based on the prediction residual signal 24' encoded into and decodeable from the data stream 14. For this purpose, as... Figure 1 As shown, prediction stage 36 may include an inverse quantizer 38 that inverse-quantizes the prediction residual signal to obtain a spectral domain prediction residual signal 24”', which corresponds to signal 24' except for quantization loss. This spectral domain prediction residual signal 24”' then undergoes an inverse transform 40, which performs a spectral-to-spatial transform on the latter prediction residual signal 24”' to obtain a prediction residual signal 24”", which corresponds to the original prediction residual signal 24 except for quantization loss. Then, combiner 42 of prediction stage 36, for example by addition, recombines the prediction signal 26 and the prediction residual signal 24”" to obtain a reconstructed signal 46, which is a reconstruction of the original signal 12. The reconstructed signal 46 corresponds to signal 12'.
[0052] Then, the prediction module 44 of prediction stage 36 generates a prediction signal 26 based on signal 46 by using, for example, spatial prediction (i.e., intra-frame prediction) and / or temporal prediction (i.e., inter-frame prediction). Details of this are described below.
[0053] Similarly, decoder 20 can internally consist of components corresponding to prediction stage 36 and interconnected in a manner corresponding to prediction stage 36. Specifically, the entropy decoder 50 of decoder 20 can entropy decode the quantized spectral domain prediction residual signal 24” from the data stream, and the inverse quantizer 52, inverse transformer 54, combiner 56, and prediction module 58, interconnected and cooperating with the modules of the aforementioned reference prediction stage 36, recover the reconstructed signal based on the prediction residual signal 24”, such that... Figure 2 As shown, the output of combiner 56 produces a reconstructed signal, namely video 11' or its current image 12'.
[0054] Although not specifically described above, it is readily apparent that encoder 10 can set encoding parameters based on optimization schemes, such as optimizing some rate and distortion-related criteria (i.e., encoding cost) and / or using some rate control methods. These encoding parameters include, for example, prediction modes, motion parameters, etc. As described in more detail below, encoder 10, decoder 20, and corresponding modules 44 and 58 each support different prediction modes, such as intra-frame coding modes and inter-frame coding modes, or a set or pool of modes forming the original prediction modes, based on which image blocks are predicted. The granularity at which the encoder and decoder switch between these prediction compositions can correspond to the subdivision of images 12 and 12' into blocks, respectively. Note that some of these blocks may be intra-frame coded only, and some blocks may be inter-frame coded only, and optionally, even more blocks may be blocks obtained using both intra-frame and inter-frame coding, but details are described below. Based on the intra-frame coding mode, the predicted signal of the block is obtained based on the space of the corresponding block and the encoded / decoded neighborhood. Several intra-coding sub-modes may exist, with one chosen to approximate an intra-prediction parameter. Directional or angular intra-coding sub-modes may exist, according to which blocks are populated by extrapolating sample values from the neighborhood along a direction specific to the corresponding directional intra-coding sub-mode to the respective blocks. Intra-coding sub-modes may also include, for example, one or more other sub-modes, such as DC coding modes and / or planar intra-coding modes. According to the DC coding mode, the prediction signal for each block assigns DC values to all samples within the block. According to the planar intra-coding mode, the prediction signal for each block is approximated or determined as the spatial distribution of sample values described by a two-dimensional linear function at the sample locations of the block, which defines the slope and offset of the plane based on neighboring samples. In contrast, according to inter-frame prediction modes, the prediction signal for a block can be obtained, for example, by predicting the block interior temporally. For parameterization of inter-frame prediction modes, motion vectors can be signaled in the data stream, indicating spatial displacements of portions of previously encoded images in video 11, where previously encoded / decoded images are sampled to obtain prediction signals for individual blocks. This means that, in addition to the residual signal encoding included in data stream 14, such as the entropy-encoded transform coefficient levels representing the quantized frequency domain prediction residual signal 24", data stream 14 may also encode: prediction correlation parameters for assigning block prediction modes, prediction parameters for the assigned prediction modes (e.g., motion parameters for inter-frame prediction modes), and optional other parameters that use the assigned prediction modes and prediction parameters to control the composition of the final prediction signal for the block, as will be outlined in more detail below. Additionally, the data stream may include parameters for controlling and signaling the subdivision of images 12 and 12' into blocks, respectively.Decoder 20 uses these parameters to subdivide the image in the same way as encoder, assigns the same prediction modes and parameters to blocks, and performs the same predictions to produce the same prediction signals.
[0055] Figure 3 This illustrates the relationship between the reconstructed signal (i.e., the reconstructed image 12') and the combination of the prediction residual signal 24"" and the prediction signal 26 signaled in the data stream on the other hand. As mentioned above, the combination can be additive. The prediction signal 26 in... Figure 3 The image is shown as being subdivided into blocks of different sizes, although this is merely an example. The subdivision can be any subdivision, such as regularly subdividing the image region into blocks of multiple rows and columns, or subdividing the image into multiple tree subdivisions (e.g., quadtree subdivision) into leaf blocks of different sizes, where... Figure 3 The diagram illustrates a hybrid of regular subdivision and multi-tree subdivision, where the image region is first subdivided into multi-row root blocks or multi-column root blocks, and then these root blocks are further subdivided into blocks 80 according to recursive multi-tree subdivision.
[0056] Figure 3 The predicted residual signal 24” is also shown as subdividing the image region into blocks 84. These blocks can be called transform blocks or residual blocks to distinguish them from the coded blocks 80. In fact, Figure 3 The encoder 10 and decoder 20 are shown to use two different subdivisions to divide images 12 and 12' into blocks respectively: one subdivision into encoding blocks 80 and the other subdivision into blocks 84. The two subdivisions can be the same, meaning each block 80 can simultaneously form transform blocks 84, and vice versa. Figure 3For example, it is shown that the subdivision to transform block 84 forms an extension of the subdivision to block 80, such that any boundary between two blocks 80 covers the boundary between two blocks 84, or that each block 80 either coincides with one of the transform blocks 84 or with a cluster of transform blocks 84. However, the subdivisions can also be determined or selected independently of each other, such that transform blocks 84 can alternatively span the block boundaries between blocks 80. A similar statement is therefore correct regarding the subdivision to transform block 84, as proposed regarding the subdivision to block 80, i.e., block 84 can be: the result of regularly subdividing the image region into blocks arranged in rows and columns, the result of recursive multi-tree subdivision of the image region, or a combination thereof or any other kind of segmentation. Incidentally, it should be noted that blocks 80 and 84 are not limited to squares, rectangles, or any other shape. Furthermore, subdividing the current image into blocks 80 to form the prediction signal in units of blocks 80, and subdividing the current image 12 into blocks 84 to encode the prediction residual in units of blocks 84, may not be the only subdivision used for encoding / decoding. These subdivisions create the granularity for performing prediction signal determination and residual coding. However, firstly, residual coding can be performed alternatively without subdivisions. Secondly, at other granularities besides these subdivisions, the encoder and decoder can set certain coding parameters, which may include some of the aforementioned parameters, such as prediction parameters, prediction signal composition control parameters, etc.
[0057] Figure 3 The combination of prediction signal 26 and prediction residual signal 24”” is shown to directly generate the reconstructed signal 12'. However, it should be noted that, according to alternative embodiments, more than one prediction signal 26 can be combined with prediction residual signal 24”” to generate image 12', the prediction signal being, for example, a prediction signal obtained from other views or from other coding layers that are encoded / decoded in separate prediction loops with separate DPBs.
[0058] exist Figure 3 In this context, transform block 84 should have the following meaning. Transformer 28 and inverse transformer 54 perform their transforms on a unit basis using these transform blocks 84. For example, many codecs use some kind of DST or DCT for all transform blocks 84. Some codecs allow skipping transforms, thus encoding the prediction residual signal directly in the spatial domain for some transform blocks 84. However, according to the embodiments described below, encoder 10 and decoder 20 are configured to support several transforms. For example, the transforms supported by encoder 10 and decoder 20 may include:
[0059] oDCT-II (or DCT-III), where DCT stands for Discrete Cosine Transform
[0060] oDST-IV, where DST represents Discrete Sine Transform
[0061] oDCT-IV
[0062] oDST-VII
[0063] oIdentity Transformation (IT)
[0064] Naturally, while transformer 28 will support all forward versions of these transforms, decoder 20 or inverse transformer 54 will support their corresponding backward or inverse versions:
[0065] o Inverse DCT-II (or Inverse DCT-III)
[0066] oInverse DST-IV
[0067] oReverse DCT-IV
[0068] oInverse DST-VII
[0069] oIdentity Transformation (IT)
[0070] In any case, it should be noted that the set of supported transformations may include only one transformation, such as a spectrum-to-space or space-to-spectrum transformation.
[0071] As outlined above, it has already been presented Figures 1 to 3 As an example, the concepts further described below can be implemented to form a specific example of a video encoder and decoder according to this application. In this regard, Figure 1 Video encoders and Figure 2 The video decoder can be represented by the possible implementations of the video encoder and decoder described below in this paper.
[0072] Embodiments of various aspects of this application described later sometimes utilize previously proposed common underlying concepts. That is, the encoders and decoders of the embodiments described later need not be implemented in accordance with the above references as just outlined. Figures 1 to 3 The details described here do not correspond to specific technical details, but rather they may correspond to one or more of the following technical details, which help or assist in understanding the embodiments described later. For example, let us start from Figure 4 To begin. The consistent feature of the embodiments described later is that they relate to image encoding. An image can be part of a video, and the decoder and encoder described below can be a video encoder and a video decoder, respectively; however, still image encoding can also be applied. Therefore, Figure 4 The general behavior or task of the encoder and decoder of the embodiments described below are illustrated schematically.
[0073] Figure 4 The image to be encoded is shown. It uses... Figures 1 to 3The same reference numerals are used in the accompanying drawings to aid in understanding how the details set forth below can be used in a certain way to achieve... Figures 1 to 3 Examples are provided to obtain embodiments of this application. Furthermore, Figure 4 Block 84 of Figure 12 is shown. It is either the currently encoded block or the currently decoded block. The use of reference numeral 84 reveals that the transform coding outlined below can be related to the prediction residual, as has been referred to above. Figures 1 to 3 The prediction residual is outlined, but in principle this is something that can be omitted in alternative embodiments. That is, for all embodiments described below, it can be a transformation of the prediction residual within the transformation coefficient block representation block 84 mentioned therein, such as the residual relative to intra-frame or inter-frame image prediction. Block 84 is associated with transformation coefficient block 92 via transformation 90. (See above for reference.) Figures 1 to 3 Examples of transformations are illustrated, and they should apply to all embodiments. A transformation is selected for block 84. Alternatively, the transformation can be fixed. If selected, the selection can be signaled in the data stream. A transformation can be an identity transformation. Although the transformation of the transform coefficient block 92 may have the same size or dimensions as the block 84, i.e., the number of coefficients in block 92 may be the same as the number of samples in block 84, this does not need to apply to all supported transformations, or may not apply if only one transformation 90 is used. Both the encoder and decoder can use the inverse transformation to reconstruct the interior of block 84 in the spatial domain, such as predicting residuals, which the decoder uses for rendering purposes and the encoder uses for feeding the decoded image buffer. The embodiments described below focus on the task 108 of encoding the transform coefficient block 92 into / decoding the transform coefficient block 92 from the data stream 14.
[0074] like Figure 4 As shown, the transform coefficient block 92 can be composed of transform coefficients 91 arranged in a rectangular array. That is, the transform coefficient block 92 can be a rectangular block.
[0075] The purpose of transformation 90 is to reduce redundancy and collect non-zero coefficients for a smaller number of coefficients 91. See, for example, [link to example]. Figure 5 This illustrates transform coefficient block 92. The transform coefficient at transform coefficient position 104 (i.e., the top-left coefficient position) can be a DC coefficient, and the probability of a coefficient being quantized to a non-zero quantization level increases, for example, towards coefficient position 104. To utilize this, the encoding of transform coefficient block 92 can involve signaling an indication in the data stream that points to the transform coefficient position 98 furthest from coefficient position 104 when sequentially scanning transform coefficients along scan path 94 starting from coefficient position 104 in a manner generally away from coefficient position 104. This indication of the termination position 98 will be used as the data stream 14 only for the encoded set 100 in which transform coefficient 91 is encoded (i.e.,...). Figure 5 The coefficients are indicated by shading, wherein the encoding set 100 includes all transform coefficients up to the terminating coefficient position 98, and includes transform coefficient 104. Then, the decoder side knows... Figure 5 Other coefficients not shown in shaded areas are zero.
[0076] When the set of codes for transform coefficients 91 is encoded into the data stream 14 in the reverse direction 118, i.e., not in the forward direction of the scan path 94 that generally deviates from the position of the termination coefficient 104, but in the opposite direction to the position of the termination coefficient 104, this may be useful and used in some embodiments according to this application.
[0077] Although not specifically discussed with reference to some embodiments described later, it can even be applied to (optionally) subsequent embodiments that use binarization to encode the quantization level of transform coefficient 91 into data stream 14. That is, as Figure 6 As shown, binarization maps the quantization level of a transform coefficient 91 to a binarized string or codeword 161. Binarization can consist of a first binarization code 160 and a second binarization code 162 used as a prefix. More precisely, assuming... Figure 6 In this context, 106 represents the quantization level. If the quantization level 106 is above a certain cutoff value 164, then the quantization level 106 is binarized into a segment string 161, which consists of a portion 162 derived from the second binarization code and is prefixed with the codeword in the first binarization code corresponding to the cutoff value 164. However, if the quantization level 106 is not above the cutoff value, then the quantization level 106 is mapped to a segment string consisting only of the first binarization code 160. In some embodiments, for certain transform coefficients, the cutoff value 164 can become zero; in this case, the binarization 161 only includes the second binarization code 162.
[0078] Although one or more segments of binarization 161 forming a certain transform coefficient can be encoded into the data stream coefficient by coefficient along scan path 94, and then decoded from the data stream coefficient by coefficient, some embodiments described later utilize several paths traversing these coefficients. This again means that whenever "previously encoded / decoded transform coefficients" are mentioned below, their binarization may not have been fully encoded / decoded. Instead, at least one segment has been encoded / decoded for such previous transform coefficients. Binarization 161 can be formed in such a way that the length of the first binarization code, the length of the second binarization code, and the overall binarization length of binarization 161 monotonically increase relative to quantization level 106, or more precisely, the magnitude of quantization level 106. In other words, for a certain quantization level 106, the more leading segments that have been read in binarization 161, the greater the likelihood that binarization 161 will be fully read. Furthermore, if there are segments of binarization 161 after these leading segments and these segments have not yet been read, the quantization level 106 may not be lower than or the absolute value of the minimum quantization level may be larger.
[0079] As a concrete example, for instance, the data segment of the first binary code 160 may be encoded / decoded first in one or more paths, and then the data segment of the second binary code may be encoded / decoded. Although context-adaptive entropy coding can be used to encode the data segment of the first binary code 160, the data segment of the second binary code 162 can be encoded using an equal-probability bypass mode (i.e., using a coding rate of 1).
[0080] like Figure 7 As shown, the second binarization code itself can be composed of a binary code including a prefix part 162a and a suffix part 162b. The binarization parameter 163 can adjust the length of the prefix part 162a. For example, the binarization parameter 163 can be an Exp-Golomb order or a Rice parameter.
[0081] Furthermore, context-adaptive binary encoding can be used to encode segment 165, which belongs to the first binary code of binary 161. Figure 6 These segments are shown using shaded lines. A bypass mode can be used to encode other segments 165 belonging to the second binary code 162, and... Figure 6 and Figure 7 These segments are shown without shading. Many embodiments described subsequently involve context selection. Then, as a particular implementation, this context selection can, for example, be used to adaptively encode one or more segments 165. Further details are set forth below.
[0082] Before beginning the description of embodiments of this application, other concepts that are commonly used in some embodiments described later will be presented. Specifically, according to some embodiments, the transformation coefficient block 92 is used as follows: Figure 8 The dashed lines in the diagram indicate that the data stream is divided into partitions 120 so that all transform coefficients within a partition 120 are signaled to be zero, and thus the partition can be skipped when encoding the transform coefficients 91. If this division is used for zeroing signaling, an indication is signaled partition by partition in the data stream 14 to signal whether all transform coefficients 91 in a partition are zero, or not all are zero, and to encode the transform coefficients 91 therein into the data stream. Unless otherwise taught during the description of the various embodiments of this application, it is possible that the scan portion 94 can be selected in such a way that the transform coefficients 91 are scanned or traversed by the scan path 94 in such a way that all transform coefficients 91 of a partition 120 are scanned or traversed before the transform coefficients of any other partition. When the latter possibility is compared with the above reference... Figure 6 and Figure 7 When the multiple-path alternatives are combined as mentioned, the transform coefficients 91 within a partition 120 can be fully encoded, meaning that the segments of the string 161 are fully encoded before encoding / decoding proceeds to the transform coefficients of any other partition. In other words, before encoding / decoding proceeds to one or more paths for encoding / decoding the transform coefficients of the next partition along scan path 94 in the scan sequence (e.g., scan sequence 118), one or more paths are used to traverse the transform coefficients 91 of a partition 120 along scan path 94 for encoding / decoding.
[0083] Reference Figure 9 Another concept of partitioning is illustrated. Some embodiments described later utilize this concept. Here, for the purposes of context, the transform coefficient block 92 is divided into partitions 120. Figure 9 The right side shows context sets 110a to 110c. Context sets 110a to 110c include one or more contexts indicated by “P#”. Each “context” can alternatively be represented as a context model and indicates a probability estimate for entropy encoding using that context. For example, in the case of binary entropy encoding, i.e., entropy encoding of segments, the context indicates, for example, a probability estimate for one of the segment values, and correspondingly, automatically indicates a probability estimate for the other segment value. Each partition 120 has one of the context sets 110a to 110c associated with it. For example, the transform coefficient 91 within a partition 120 is entropy encoded / decoded using the context set associated with a partition 120 in context set 110, the selection of which is based, for example, on an evaluation of coefficients in the neighborhood of the current coefficient 91.
[0084] The latter case is, for example, in Figure 10 The diagram shows the transform coefficients currently encoded / decoded. Crosses 130 are used to highlight these coefficients in this document. When using the multipath approach described above, current encoding / decoding can mean a segment of coefficient 130 currently being encoded / decoded. Reference numeral 132 indicates a local template located on or around coefficient 130, and coefficients located within or at local template 132 are evaluated or used to determine the context to be used for encoding coefficient 130 or its currently encoded / decoded segments. Again, some embodiments directly refer to the use of local template 132. In embodiments described later, the use of local template 132 for determining the context for the currently encoded / decoded coefficient 130 is not specifically mentioned; however, it may be modified in practice to also use this method to select the context. Figure 9 In one embodiment, the selection of coefficient 130 can be made from the set associated with the partition 120a in which the current coefficient 130 is located. However, the use of partitions for the partition-specific design of the context set is merely an example and may not be applicable to all embodiments.
[0085] Some embodiments described later directly relate to, and can also be used to modify or extend, another aspect of other embodiments, relating to the content of block 84 in relation to multiple components (i.e., multiple color components). Examples of color components are, for example, a luminance / chrominance representation, according to which the content of block 84 is spatial sampling for luminance L and for the two chrominance components C1 and C2, but other examples may also exist. Thus, block 84 will consist of a sample array 841 for the first color component, a sample array 842 for the second color component, and a sample array 843 for the third color component. The aspect here is that each component can be processed separately. That is, for each component, the corresponding sample array of block 84 can represent the prediction residual relative to the corresponding component of the predictor. A transformation 90 is performed on each sample array, preferably the same transformation, and produces corresponding transform coefficient blocks 921 to 923. However, it should be noted here that the sample resolutions of the individual color components can be different from each other, and therefore the sizes between sample arrays and between transform coefficient blocks can also be varied. Each transform coefficient block 921 to 923 is encoded into / decoded from data stream 14, wherein each transform coefficient block 921 to 923 is referenced. Figures 3 to 9 The described measures, steps, and processes. Although it can be... Figure 11a The multi-component concept described herein applies to embodiments explained below that do not mention any color components, but it should be noted that the embodiments explained below can also be used for cases or implementations where only one component exists.
[0086] Another aspect not described above is the fact that the encoding of a certain transform coefficient block 92 and its corresponding decoding can begin with indication 190, which indicates whether any transform coefficient 91 of that transform coefficient block 92 is still nonzero. If not, the decoder knows that the transform coefficient block is globally zero. Only when... Figure 11b The indication 190 shown indicates that, in the presence of at least one non-zero coefficient 91, any combination of the concepts outlined above is used to encode the transform coefficient block. Similarly, Figure 11c Similar indications 150 are shown for partition 120, indicating zeroing within the associated partition 120. Figure 11d The last position indication 114, which may indicate position 98, is shown. Figure 11e The diagram shows the various contexts selected from the associated context set 110, currently used for entropy encoding / decoding 116 of the current coefficient's quantization level 106, and... Figure 11f The encoding order 102 for encoding quantization level 106 into the data stream is shown, i.e., the order produced by traversing path 94 in direction 118, for example.
[0087] The reader should now be prepared to understand and follow the embodiments of this application described below. (Refer to...) Figure 12 An embodiment relating to the first aspect of this application is described. Here, the encoder and decoder encode image 12 into / decode image 12 from data stream 14 in a special manner in terms of entropy encoding of different transform coefficient blocks of different color components of a block 84. Figure 12 Block 84 is shown to consist of two color components, which are thus composed of sample arrays 841 and 842; however, it is clear that this composition can cover, as shown in the reference. Figure 11a The three color components are explained. (See reference...) Figure 11a As explained, the encoder performs a transform 90 on block 84 of image 12 for the first color component and the second color component, respectively, to obtain a first transform coefficient block 921 and a second transform coefficient block 922. Similarly, the decoder derives block 84 of the image by performing inverse transforms on the first transform coefficient block 921 and the second transform coefficient block 922, respectively. Regarding the entropy encoding of the second transform coefficient block 922 into data stream 14 and the entropy decoding of the second transform coefficient block 922 from data stream 14, the encoder and decoder operate in a context-adaptive manner, depending on the context of the first transform coefficient block 921. This dependency is... Figure 12 It is shown by arrow 300 in the middle.
[0088] For example, the context determined using the dependency 300 on the first transform coefficient block can be compared with the above reference. Figure 8The interpretation pertains to a partition-specific indication, indicating whether all transform coefficients 91 in a partition 120 are zero or contain at least one non-zero coefficient. If at least one non-zero coefficient is present, the quantization level of the transform coefficients 91 within that partition is entropy-encoded into / entropy-decoded from data stream 14. For other partitions indicating all-zero quantization, this entropy encoding / decoding is skipped. This indication for partition 120 can be a flag and can be referred to as a coded subblock flag. For example, the context selected for such a coded subblock flag for a partition / subblock 120 can, for instance, depend on the selection of a coded subblock flag (another indication) for encoding a co-occurring subblock (partition) in a first transform coefficient block. Therefore, a choice can be made between two available contexts: if the flag for a co-occurring partition in the first transform coefficient block 921 is 1, a first available context is used; if the flag for a co-occurring partition in the first transform coefficient block 921 is 0, a second available context is used for the flag of a partition in the second transform coefficient block 922. However, the dependency 300 on a certain indication of a certain partition 120 of the second transform coefficient block 922 can be alternatively implemented in different ways. For example, the context selected for a certain indication of the nulling of a certain partition 120 of the second transform coefficient block 922 can depend on the quantization level of the transform coefficients of the first transform coefficient block, such as the quantization level of those transform coefficients within a co-occurring partition.
[0089] In other words, unless explicitly stated above, we can assume that the two transform coefficient blocks 921 and 922 can have the same shape and size, or the same aspect ratio relative to the horizontal and vertical dimensions, and that the division to partition 120 can be the same for these blocks 921 and 922, or that they can overlap when one transform coefficient block 921 is scaled to the other.
[0090] Alternatively or additionally, dependency 300 may be related to the global indication of transform coefficient nullification as explained above. That is, the indication regarding the encoding of transform coefficient block 922 into or from data stream 14 will then depend on the context used relative to the first transform coefficient block 921, via dependency 300. If the indication indicates that the transform coefficients 91 of the second transform coefficient block 921 include at least one non-zero coefficient, the quantization level of the transform coefficients 91 of block 922 is entropy encoded into and entropy decoded from data stream 14. However, if the indication indicates that all transform coefficients within the second transform coefficient block are zero, the encoding / decoding of the second transform coefficient block 922 is completed by inferring that all transform coefficients 91 of block 922 are zero via the decoder. For example, in this case, dependency 300 may depend on the context of the indication for nullification of the second transform coefficient block 922, based on the corresponding indication for encoding / decoding the first transform coefficient block 921. Alternatively, dependency 300 may depend on the quantization level of the transform coefficients of the first transform coefficient 921 to present the context for the indication of nulling of transform coefficient block 922. For example, if the indication of the first transform coefficient block 921 indicates the non-zeroing of at least one non-zero coefficient of the first transform coefficient block 921, a first context may be selected for the indication of the second transform coefficient block, and if the corresponding nulling indication of the first transform coefficient block 921 indicates the nulling of all transform coefficients of the first transform coefficient block 921, a second context may be selected for the nulling indication of the second transform coefficient block 922.
[0091] Additionally or alternatively, dependency 300 may relate to the position indication of the termination coefficient position 98. Various possibilities exist for signaling this position indication in the data stream 14. For example, when measuring along the scan path 94 in the positive direction 116, the position indication may be signaled in the data stream as a one-dimensional address or rank that indicates position 98 as the address or rank of position 98 among all coefficient positions. Alternatively, the position indication may use two coordinates to indicate the position of position 98 within each transform coefficient block, indicating position 98 in terms of its horizontal and vertical position within transform coefficient blocks 921 and 922, respectively. Now, in addition to the possibility of implementing dependency 300 discussed above, or as an alternative to the possibility of implementing dependency 300 discussed above, dependency 300 may also affect the final position indication of position 98 for the second transform coefficient block 922. Specifically, the context used to encode the indication may depend on the first transform coefficient block, such as the last position indication for position 98 of the first transform coefficient block 921, or an evaluation of the position or distribution of the effective transform coefficients 91 within the first transform coefficient block 921.
[0092] The way the last position indications of blocks 921 and 922 are encoded can also involve binarization into a binary code, and the context (whose dependency involves dependency 300) can be used for one or more segments, such as the first segment of the binary code of the last position indication.
[0093] Alternatively or additionally, dependency 130 may be applied to one or more segments (e.g., the first segment) of binarization 161 of transform coefficients 91 within the second transform coefficient block 922, i.e., the context for encoding one or more segments of binarization 161 may depend on the first transform coefficient block 921, e.g., the corresponding segments of binarization of co-bit transform coefficients of the first transform coefficient block 921.
[0094] After completing the Figure 12 When describing the embodiments, it should be noted that Figure 12 The two color components shown can be chromaticity components, and specifically, the color component of the second transform coefficient block can be C. r The color component of the first transformation coefficient block 921 can be C. b .
[0095] The next embodiment of the encoder for encoding an image into a data stream and the decoder for decoding an image from the data stream relates to another aspect of this application, namely, to improve encoding efficiency by providing a specific context set 110 for a particular transform coefficient position (i.e., transform coefficient position 104, which may be a DC coefficient position as described above). Although an embodiment is given below specifically for transform coefficient position 104, it should be noted that alternatively or additionally, the provision of a separate context set for a particular coefficient may be applied to coefficient position 98, i.e., the position of the non-zero coefficient furthest from coefficient position 104 as measured along scan path 94. "Separate context" should mean the fact that the context set is not used for any other coefficient 91 in the same transform coefficient block, or even any context contained in the context set of the transform coefficient position in question (here, 104) is not used for encoding any other transform coefficient within the same transform coefficient block.
[0096] Based on Figure 5 This embodiment is illustrated. The encoder is configured to encode transform coefficient block 92 into the data stream using scan pattern 94 by encoding data 96 into the data stream, and the decoder is configured to decode transform coefficient block 92 from the data stream using scan pattern 94 by decoding data 96 from the data stream. Figure 4In comparison, data 96 represents the encoding set 100 of transform coefficients 91 traversed by scan pattern 94 from first termination coefficient position 98 to second termination coefficient 104 in a predetermined direction 102. Data 96 includes the quantization level of non-zero transform coefficients in the encoding set 100 of transform coefficients, that is, at least the quantization level of non-zero transform coefficients along their positions or the quantization level of all transform coefficients in the transform set 100. It should be understood that, for the embodiments described herein, the above references are... Figure 5 The described position indication of position 98 by signaling is merely an example, and in this embodiment, the position indication by signaling may be omitted and replaced by, for example, by encoding set 100 inevitably covering all transform coefficients 91 of transform coefficient block 92, or by otherwise synchronizing the encoder and decoder when determining encoding set 100.
[0097] In any case, according to this embodiment, the encoder and decoder are configured to use a specific (first) set 110 of context for the terminating coefficient position 104 to context-adaptively entropy encode / decode the quantization level, where the terminating coefficient position 104 may be a DC coefficient position, and this set 110 of coefficients for position 104 is disjoint with one or more context sets of any other transform coefficients 91 in the encoding set 100 for transform coefficients. According to a specific example, for instance, one context set 110 is used for entropy encoding of the quantization level of the DC transform coefficient at position 104, while another / different context set 110 is used for entropy encoding / decoding of the quantization levels of all other transform coefficients 91 in block 92, where the "difference" between the context sets may involve: contexts included in the context set of the coefficient at position 104 are not included in the context sets of other transform coefficients, and vice versa.
[0098] According to the aforementioned alternative scheme of using a position-specific context set for the quantization level of the transform coefficient at position 98, all other transform coefficients 91 can use the same context set, which is different from the context set used for the transform coefficient at position 98. Furthermore, in another alternative scheme also mentioned above, a position-specific context set can be used for both the transform coefficient at position 104 and the transform coefficient at position 98, and these can be different from each other and different from the context set, and then, for example, jointly used for entropy encoding / decoding of the coefficients 91 contained in the encoding set 100 and located between positions 104 and 98 along the scan path 94.
[0099] Therefore, a position-specific set of context provided separately for a coefficient position (i.e., coefficient position 104 here) can be used, for example, to encode one or more segments of the binarization 161 of the transform coefficient at position 104. These one or more segments 165 can be one or more segments 165 of the first binarization code 160. For example, it can be the first segment in the segment order of the binarization 161, indicating whether the transform coefficient at the corresponding position is valid, i.e., whether it is non-zero. Similarly, the disjoint set of context used for other transform coefficients will be used for the corresponding one or more segments of the binarization 161 of these other transform coefficients.
[0100] It should be remembered, refer to Figure 5 The aforementioned context set can then be used as a container, from which specific contexts are used for the transform coefficients of the current encoding / decoding. That is, the position-specific context set 110 used for the transform coefficient at position 104 will be used as the basis of the container, using... Figure 10 The local template 132 shown in the diagram selects from the container one or more segments of the binarization 161 of the coefficient level of the transform coefficients at position 104 for entropy encoding / decoding of the context. Figure 10 The local template 132 shown includes five transform coefficient positions in the neighborhood of the transform coefficient 130 of the current entropy encoding / decoding: the coefficient positions located to the right, below, and diagonally below the transform coefficient 130, as well as the next position to the right and the next position below the coefficient 130. However, this is only an example, and the number and location of positions covered by the local template 132 can be chosen differently.
[0101] For completeness, please note that the embodiment just described (where a context-specific set of contexts is used for one or two specific coefficient positions 104 and / or 98) can be compared with the reference. Figure 8 The possibilities for discussion are combined, based on reference. Figure 8 Regarding the possibility of partitioning the remaining transform coefficients, the partition-specific coefficient set 110 can be used to divide the transform coefficient block 92 into partitions 120. For example, Figure 13 Position 104 is shown, and the transform coefficient block 92 is shown to be divided into several partitions, specifically four partitions 120. According to this embodiment, a position-specific context set will be used for entropy encoding / decoding of the quantization level of the coefficient at position 104, while for all other transform coefficients 91 in block 92, the context set to be used will be determined as a context set associated with the partition in which the corresponding transform coefficient 91 is located, and these context sets may be mutually exclusive and non-overlapping with the context set specifically provided for position 104.
[0102] exist Figure 13 In the example, the partition extends diagonally along a direction inclined with respect to the diagonal 122 of the transform coefficient block, which passes through the relative angle of the termination coefficient position 104, such as the DC coefficient position, and the coefficient position on the lower right side of the transform coefficient block, which can thus correspond to the highest frequency in both the horizontal and vertical directions.
[0103] Obviously, referring to Figure 5 and Figure 13 The embodiments just described can be easily compared with reference to Figure 12 Combined with the described embodiments.
[0104] The embodiments described below relate to another aspect of this application: a decoder for encoding an image into a data stream and a decoder for decoding an image from the data stream, which is specific to the context selection or context determination of the transform coefficients for the current encoding / decoding. See also... Figure 10The embodiments are best understood and described. Specifically, the encoder and decoder are configured to: adaptively entropy encode / decode the quantization level of the current encoded / decoded transform coefficient 130 of the transform coefficient block 92 using a context determined based on the sum of one or more previously encoded transform coefficients and / or the number of valid transform coefficients among one or more previously encoded transform coefficients, where one or more previously encoded / decoded transform coefficients are located at positions determined by the local template 132 positioned on the currently encoded / decoded transform coefficient 130. It should be remembered that although according to this embodiment, it is possible to entropy encode / decode the transform coefficients, or more precisely, the quantization levels of the transform coefficients one after another, i.e., before entropy encode / decode the next transform coefficient 91, the concept discussed above can also be applied, according to which context-adaptive entropy encoding / decoding of the quantization levels of the transform coefficients is performed using binarized segments of quantization levels in a multi-path environment. As mentioned above, the context adaptability may be limited to the first binarization code 160. In other words, on the one hand, it should be noted that the context of using local template 132 to select / determine and form the sum of one or more transform coefficients within local template 132 and / or the count of valid transform coefficients among one or more transform coefficients can be applied to one or more segments of the first binarization code 160. Additionally, multi-path encoding can be used. That is, the transform coefficient 130 currently entropy encoded / decoded can be the transform coefficient whose segments are currently entropy encoded / decoded. Furthermore, since the segments 165 of the binarization 161 of transform coefficient 91 of block 92 are encoded sequentially in multiple paths, the segments 165 of the binarization 161 of transform coefficient 91 contained in local template 132 may not yet be fully entropy encoded / decoded. Therefore, regarding the context of determining coefficient 130, or more precisely, determining its currently encoded / decoded segments, the sum can be calculated as follows. Specifically, the sum of coefficients 91 within local template 132 can be calculated as the sum of predetermined absolute values of the coefficient levels of one or more transform coefficients located within local template 132. Based on the binarized segments of the coefficient levels of the transform coefficients that have been encoded / decoded so far during multi-path segment encoding / decoding, the coefficient level of the corresponding coefficient within local template 132 must have at least this predetermined absolute value. As a specific example, binarization 161 can be envisioned to include the following segments: As described above, the first segment of the first binarization code 160 can indicate whether the quantization level of the transform coefficients involved in binarization 161 is valid, i.e., whether it is non-zero. The second segment in the segment sequence of binarization 160 can also belong to the first binarization code 160, i.e., it can also be encoded / decoded using context adaptive entropy, and can indicate whether the absolute value of the quantization level of the coefficients involved in binarization 160 is greater than 1.The third segment in the sequence can also belong to the first binary code 160 and can indicate whether the absolute value of the transform coefficient is odd or even, i.e., its parity. Another segment in the sequence, the fourth segment, can also belong to the first binary code 160 and can indicate whether the current transform coefficient is greater than 2 if the parity is odd, and whether it is greater than 3 if the parity is even. Other segments can belong to the second binary code 162. Therefore, depending on the number of segments whose coefficients within the local template 132 have been entropy-encoded / decoded, their absolute quantization level value can either be completely known and can form an addend for summation, or alternatively, the minimum absolute value can be used and derived based on the encoded / decoded segments of that coefficient's quantization level.
[0105] Regarding the number of valid coefficients within the local template, the above process is also applicable based on the example just outlined, since at least for those coefficients within the local template that precede the currently encoded / decoded coefficients 130 along the scan path in the reverse direction 118, the first segment has already been encoded for the coefficients within the local template.
[0106] One specific example could be that the context is determined solely based on the sum. Another example could be that the context is determined / selected solely based on the number or count of valid coefficients within template 132. Yet another example is using the difference between the sum and the count of valid coefficients. Furthermore, alternatively or additionally, the context determined in the manner just outlined can be used for one or more segments of the first binary code 160, such as any segment or more than one segment from the segments just specifically exemplified.
[0107] Just referred to Figure 10 The described embodiments can be combined with any of the above embodiments.
[0108] The embodiments described below relate to another aspect of this application and can be combined with any previously described embodiments of this application. Reference may also be made to... Figure 10 Provide this description. As referenced... Figure 10Similar to the decoder and encoder described in the previously described embodiments, the embodiments now described relate to an encoder for encoding an image into a data stream and a decoder for decoding an image from the data stream. The encoder is configured to encode transform coefficient block 92 into the data stream, and the decoder is configured to decode transform coefficient block 92 from the data stream. However, according to the embodiments now described, a local template, and specifically one or more previously encoded / decoded transform coefficients located at the location of the local template, is used to set binarization parameters. The absolute value of the quantization level of the currently encoded / decoded transform coefficient 130 of transform coefficient block 92 is encoded / decoded in a manner that binarization is performed using binarization, and the binarization is parameterized using binarization parameters. The sum of one or more previously encoded / decoded transform coefficients and / or the number of valid transform coefficients among one or more previously encoded / decoded transform coefficients are used to determine this.
[0109] In other words, the description of this embodiment is very consistent with the previous description regarding determining the context based on the evaluation of one or more previously encoded / decoded transform coefficients of a local template; however, the focus is on the setting of the binarization parameters. It should be noted that, according to this embodiment, binarization using the absolute value of the quantization level of the transform coefficients of the transform coefficient block for encoding / decoding and setting its binarization parameters using local template 132 can be as described above. Figure 6 The binarization 161 is described, but is not mandatory. That is, binarization here means that it may have a first binarization code or its binary segments being context-adaptively encoded in a first part or prefix portion, but it can also be, for example, the entire transform coefficient block encoded using a bypass mode, or binarization here means that it consists only of a second binarization code 162. The length of the prefix portion 162a can be determined based on the binarization parameters determined by evaluating the local template 132. A lookup table can be used to map the sum of the absolute values of the quantization levels of one or more previously encoded / decoded transform coefficients within the local template 132 to the binarization parameters. The binarization parameters may be determined in a manner that makes the binarization parameters continuously increase or decrease over the transform coefficients.
[0110] Regarding other details, refer to the description of the previously described embodiments, specifically regarding the determination of the context upon which the binarized, context-adaptive entropy-encoded segments are encoded. These details illustrate how the sum is determined when traversing the transform coefficients using a multipath method. At this point, it should be remembered, for this embodiment and for the previous embodiment, that the multipath method can be implemented in a way that allows the multipath method to be applied in a partition-level manner. However, in any case, since scan path 94 generally points from the lower right to the upper left of the transform coefficient block 92, therefore... Figure 10The template position shown, that is, the template position located to the right and / or below the current encoding / decoding transform coefficient 130, tends to have been encoded / decoded when the current encoding / decoding transform coefficient or its current segment is to be encoded into / decoded from the data stream.
[0111] The embodiments described below relate to an encoder for encoding images into a data stream and a decoder for decoding images from the data stream, wherein the encoder and decoder are specific for the cutoff value 164. Therefore, it is possible to base... Figure 4 and Figure 6 The following description is best understood through a combination of these elements. Here, the encoder is configured to encode the absolute value of the quantization level 106 of the transform coefficients 91 of the transform coefficient block 92 by binarizing it using a first binarization code 160 and a second binarization code 162. Figure 5 The scan pattern 94 shown encodes the transform coefficient block 92 into a data stream. The decoder is configured to decode the absolute value of the quantization level 106 of the transform coefficients 91 of the transform coefficient block 92 by binarizing it using a first binarization code 160 and a second binarization code 162. Figure 5 The scan pattern 94 shown decodes transform coefficient block 92 from the data stream. First binary code 160 is below cutoff value 164, and second binary code 162 is above the cutoff value and prefixed with the codeword used for the cutoff value in the first binary code. It is clear from the above description of possible general implementation examples or concepts that the segments of the first binary code 160 are encoded using context-adaptive binary entropy coding, while the second binary code is encoded using an equal-probability bypass mode. According to this embodiment, the cutoff value of the transform coefficients 91 for transform coefficient block 92 is adaptively changed based on the previously encoded / decoded transform coefficients.
[0112] According to a specific embodiment, the adaptive change can be embodied as follows. The transform coefficient block 92 can be divided into partitions 120, where a scan path 94 traverses the transform coefficient block 92 to scan the transform coefficients 91 partition by partition. That is, all transform coefficient positions within a partition will be scanned / traversed by the scan path 94 before the next partition. Furthermore, the encoding / decoding of the transform coefficients 91 will be performed such that the segments 165 are encoded using a path encoding method. Segments 165 of the first binary code 160 will be context-entropy encoded, while segments of the second binary code 162 will be encoded using an equal-probability bypass mode. Segments of the first binary code 160 will be encoded / decoded before segments of the second binary code 162. In this encoding environment, the adaptive change of the cutoff value can be implemented as follows: scanning segments 165 of the transform coefficients 91 within the current partition in one or more leading paths. However, the number of segments 165 encoded using context-adaptive binary entropy encoding / decoding may be limited. In other words, in this case, assume a single path is used to encode segment 165 of the first binary code 160. Then, segment 165 of the first binary code 160, representing the absolute value of the quantization level of coefficient 91 within the current partition 120, is encoded coefficient by coefficient. The number of segments encoded for each coefficient 91 is then varied according to the quantization level of the corresponding transform coefficient. At a certain coefficient, the maximum number of context-adaptive binary entropy encoded segments 165 of the first binary code 160 is reached. Therefore, the first path is complete. The next path will scan the coefficients 91 of the current partition from the beginning, starting from the coefficient position farthest from block 92 104 within that partition 120. For all coefficients before reaching the maximum number of context-adaptive binary entropy encoded segments, the cutoff value 164 will be equal to the initial value of that cutoff value. For coefficients whose segments 165 of the first binary code 160 cannot be fully encoded / decoded using context-adaptive binary entropy encoding because the maximum number of segments encoded by context-adaptive entropy encoding has been reached, the cutoff value is reduced in a manner corresponding to the number of encoded segments 165 of the first binary code 160 for that coefficient. Specifically, the cutoff value of the coefficient is reduced to correspond to the number of segments encoded for that coefficient, and the second binary code 162 for that coefficient encodes only the "residual value" above the maximum absolute value associated with the segment 165 of the first binary code. For subsequent coefficients within this partition 120, the cutoff value will even be zero, and binarization 161 will consist only of the second binary code 162.
[0113] In the example just outlined, the adaptive change of the cutoff value plays a central role. In the embodiments outlined below, the setting of the cutoff value is used to improve coding efficiency; however, according to this embodiment, the setting could alternatively be an initial setting of the cutoff value at the beginning of encoding and decoding the transform coefficient block, respectively, rather than adaptively setting the cutoff value during the encoding / decoding of the transform coefficient block, although the latter option also exists according to this embodiment. In other words, according to these embodiments, the encoder for encoding an image into a data stream encodes the transform coefficient block 92 by encoding the absolute value of the quantization level 106 of the transform coefficient 91 of the transform coefficient block 92 in a manner that binarizes it using a first binarization code and a second binarization code 162. The decoder for decoding the image from the data stream decodes the transform coefficient block 92 by decoding the absolute value of the quantization level 106 of the transform coefficient 91 of the transform coefficient block 92 in a manner that binarizes it using a first binarization code and a second binarization code 162. The first binarization code is below a cutoff value 164, and the second binarization code 162 is above the cutoff value and is prefixed with the codeword used for the cutoff value 164 in the first binarization code 160. The cutoff value 164 is set according to one or more of the following:
[0114] The size of block 84,
[0115] • Color components of block 84
[0116] • The prediction mode for the predicted signal; block 84 represents the prediction residual of the prediction mode, such as intra-frame or inter-frame coding modes.
[0117] • The transformation performed on the transformation coefficient block 92,
[0118] • Quantization parameters used to quantize transform coefficient block 92
[0119] • A measure of the energy of the transform coefficients of the previous encoding / decoding, and
[0120] • Evaluation of the transform coefficients of the previous encoding / decoding.
[0121] Furthermore, the settings described herein can be applied to each coefficient 91, or alternatively only to the first encoded coefficient (i.e., the coefficient at position 98), or alternatively to the coefficients first traversed by scan path 94 within each partition, i.e., the coefficient at position 98 in the first traversed partition 120 and the coefficients that are also first traversed in any subsequent partition 120.
[0122] The above-described alternative schemes for setting the cutoff value 164 can be implemented in several possibilities. However, in principle, the setting of the cutoff value can also be embodied as an example relative to the previous example: that is, for each coefficient, the cutoff value 164 can be set according to the number of segments of the first binary code that have been context-adaptive binary entropy encoded / decoded so far. This number can be used as a measure of energy, or it can be an evaluation result of the previously decoded / encoded transform coefficients. If the number or count of segments that have been encoded / decoded in the first binary code 160 is completed for each partition 120, then this number or calculation will represent a measure of the energy of the previously encoded / decoded transform coefficients within the current partition 120. Regarding this embodiment of setting the cutoff value 164 and the previous embodiment of adaptively changing the cutoff value 164, it should be noted that, however, there is also a change regarding the maximum number of segments encoded by context-adaptive binary entropy: instead of defining the same maximum number separately for each partition 120, the maximum number can be determined globally. This would mean that the maximum number is reached only for a specific coefficient 91 located in a partition 120 and the entire transform coefficient block 92. For all previously scanned partitions 120, the cutoff value will correspond to the initial value, and reducing the cutoff value 164 to zero will only occur within that partition. Subsequent partitions will have a cutoff value of 164 of zero for all their coefficients 91.
[0123] Many other embodiments exist besides the embodiments just outlined for setting the cutoff value 164 according to one or more of the above-described / listed alternatives. For example, the evaluation of previously encoded / decoded transform coefficients may be limited to coefficients 91 located at positions determined by local template 132. That is, the currently encoded / decoded transform coefficients 130 will be set, and this setting will be effectively adaptively changed. Alternatively, the evaluation of previously encoded / decoded transform coefficients may be performed relative to coefficients located at positions within a partition of the transform coefficient block that are offset from the current position, where the currently encoded / decoded transform coefficient 130 is located in the current partition, and where, according to the encoding order 118, the currently encoded / decoded transform coefficient 130 is located before the current partition. In the latter alternative, the evaluation may be performed for each partition 120, i.e., at the start of encoding the transform coefficients 91 within the corresponding partition 120 with an initial setting of a cutoff value. Other alternatives will be discussed further below. For example, the initial setting may be performed according to any of one or more of the alternatives listed above. Depending on whether the initial setting of the cutoff value 164 is below or above a predetermined threshold, adaptive changes to the cutoff value can be activated, or the cutoff value can be kept constant. One example is, for instance, setting the cutoff value initially based on quantization parameters. If the quantization determined by the quantization parameters is finer than the predetermined threshold, adaptive changes can be activated, and the cutoff value can be adaptively changed, thus modifying the cutoff value relative to the initial setting based on the previously encoded / decoded transform coefficients. However, if the quantization parameters correspond to a coarser quantization, the cutoff value remains constant.
[0124] In the following text, embodiments of this application are referred to, which relate to one aspect of this application specifically dealing with the shape of the local template 132. That is, according to this embodiment, an encoder is used to encode an image into a data stream 14, and a decoder is used to decode the image from the data stream. The encoder and decoder are configured to encode / decode the quantization level 106 of the currently encoded transform coefficient 130 of the transform coefficient block 92 using a context determined based on one or more previously encoded transform coefficients, one or more of which are located at a position determined by the local template 132 positioned on the currently encoded / decoded transform coefficient 130, or, if the local template 132 is disabled, are independent of the previously encoded / decoded transform coefficient 91. Specifically, according to Figure 14In an embodiment, based on 1) the previously encoded / decoded transform coefficients 91 and / or 2) one or more of the following: the size of block 84, the color components of block 84, the position of the termination coefficient (the last non-zero transform coefficient result, i.e., 98, is located at this position when traversing the scan pattern 94 along the positive direction 116), the transform 90 performed on the transform coefficient block 92, the shape of the local template 132 is set, or the local template 132 is disabled according to the above, which means that the local template 132 disappears and does not contain any positioned coefficients at all. Figure 14 Two shapes 170 and 172 of the partial template 132 are shown exemplarily. One, 172, is the same as the one referenced above. Figure 10 The examples depicted and described correspond to each other. Another one, namely 170, only includes the adjacent coefficient positions immediately to the right of the current entropy encoded / decoded coefficient 130 and the adjacent coefficient positions immediately below the current entropy encoded / decoded coefficient 130.
[0125] According to the first alternative, the dependencies of the previously encoded / decoded transform coefficients on the previously encoded / decoded transform coefficients can be limited to one or more previously encoded / decoded transform coefficients located at positions defined by the smaller shape of the local template (e.g., local primitive template 170). This depends on the evaluation of the coefficients located in primitive template 170, such as determining whether to use primitive template 170 for context determination or whether to use a larger primitive template 172. The larger primitive template 172 extends further away from the currently encoded transform coefficients 130 compared to primitive template 170. The second primitive template 172 may include positions also included in the first primitive template 170, or may not include them.
[0126] The decision to use a shape based on an evaluation of the coefficients within the smaller template 170 can be made based on the sum of one or more previously encoded transform coefficients within the primitive template 170 and / or the number of valid transform coefficients among one or more previously encoded transform coefficients. A disabling decision can even be made based on an evaluation of one or more coefficients within the primitive template 170. Furthermore, a disabling decision can be made based on the cumulative value derived from previously encoded / decoded transform coefficients within the transform coefficient block, or whether the count of previously encoded / decoded transform coefficients within the transform coefficient block exceeds a predetermined amount. Additionally or alternatively, a local template can be disabled if the count of valid transform coefficients among the previously encoded / decoded transform coefficients 91 within the transform coefficient block exceeds a predetermined amount.
[0127] Regarding the context's dependency on one or more coefficients within local template 132, the details described above hold true; that is, the sum and / or number of valid coefficients within the local template can be used. Furthermore, the context derived from local template 132 can be limited to segments 165 used for the prefix portion 160. Additionally, the above descriptions regarding the use of multiple pathways and the relevance of determining the sum within local template 132 also apply here.
[0128] Referring to a specific embodiment, the local template 132 may be disabled for the chroma component, while the local template 132 may not be disabled for the luminance component.
[0129] When partition 120 is used as the granularity for determining the use of the context set, further embodiments of this application relate to the size of partition 120. For example, refer to... Figure 8 and Figure 13 This application describes embodiments relating to this aspect of an encoder for encoding features into a data stream 14 and a decoder for decoding features from the data stream 14. They entropy-encode / decode the quantization level 106 of the transform coefficients 91 of the transform coefficient block 92 by using a context set 110 associated with the corresponding partition for each partition 120. However, specifically, the partitions 120 into which the transform coefficient block 92 is subdivided (1) have different shapes, such that they are, for example, as... Figure 13 The representations shown are inconsistent with each other, and as... Figure 8 As shown, and / or 2) the shape of partition 120 depends on the scan pattern along which entropy encoding / decoding of the quantization level of transform coefficients 91 is performed, for example, by signaling the scan pattern in data stream 14, for example, inherently determined for the current blocks 84 / 92 respectively, and / or 3) the shape of partition 120 depends on the size of block 84, and / or 4) the shape of partition 120 depends on explicit partition shape information signaled in data stream 14. In this embodiment, for example, local template 132 can be used to determine which context set in the context set associated with the corresponding partition is actually used for each coefficient 91 within a partition 120 to entropy encode the corresponding coefficient or its current segment. As described above, partition 120 of the current embodiment can also be used as a partition for sending a coded block flag in the data stream, i.e., indicating whether all transform coefficients 91 within the corresponding partition are zero.
[0130] Another embodiment of this application relates to yet another aspect of this application, namely, according to this aspect, which partition is used for nulling indication, but indication 150 is a partition indication: whether all transform coefficients within the corresponding partition are encoded into the data stream, or whether the encoding of all transform coefficients within the corresponding partition is skipped and all transform coefficients within the corresponding partition are zero. Specifically, according to this aspect of the application, the indication is described in a manner that indicates whether all coefficients are encoded or no coefficients are encoded. Each of these partitions may have a set of contexts associated with it, which are used for encoding if the indication indicates that transform coefficients within the corresponding partition are encoded. In other words, here the partition-level nulling indication indicates that, if so, all transform coefficients within a certain partition are encoded, and this situation no longer needs to be questioned. Even the validity of the last encoded coefficients of a partition cannot be inferred based on all previous coefficients being zero; indication 150 signals the encoding of its coefficients for that partition.
[0131] Another embodiment of this application relates to yet another aspect of this application, namely, in the data stream, a partitioning mode is signaled for transform coefficient block 92, the partitioning mode indicating whether to apply partitioning to partition 120 in the associated partition's individual context set 110. More precisely, the embodiments describe an encoder for encoding an image into a data stream and a decoder for decoding an image from the data stream, wherein the partitioning mode of transform coefficient block 92 is encoded into / decoded from data stream 14, and the transform coefficient block 92 is encoded / decoded in the following manner: if the partitioning mode is a first mode, such as enabling partitioning to partition 120, then for each partition 120 into which the transform coefficient block 92 is subdivided, the quantization level 106 of the transform coefficient 91 of the transform coefficient block 92 is entropy-encoded / decoded context-adaptively using a context set 110 associated with the corresponding partition; if the partitioning mode is a second mode, such as indicating disabling partitioning to partition 120, then a global context set is used to context-adaptively entropy-encoded / decoded the quantization level 106 of the transform coefficient 91. However, it should be noted that the globality can be limited for the specific context set used for the coefficient at position 104 and / or the coefficient located at position 98. Furthermore, even in this embodiment, partition 120 can additionally serve as a unit for forming an indication of the zeroing of transform coefficients in the data stream: that is, for each partition 120, the coded sub-block flag can be a signal in the data stream indicating whether all transform coefficients 91 in the corresponding partition are zero.
[0132] By reference Figure 15The embodiments relating to the last aspect of this application can be best understood. Again, this aspect relates to the partitioning of partition 120 for associating a separate set of contexts 110 for each partition with partition 120. The encoder and decoder are configured to encode / decode an image into / from a data stream, and to encode / decode the transform coefficient block 92 using a scan pattern 94 that sequentially traverses the transform coefficients 91 of the transform coefficient block 92 by using a set of contexts 110 associated 126 with the corresponding partition 120 for each partition 120 into which the transform coefficient block 92 is subdivided, to context-adaptively entropy encode / decode the quantization level 106 of the transform coefficients of the transform coefficient block 92. However, unlike the previous description, the scan pattern 94 is described by exemplarily scanning the transform coefficients 91 in a partition-by-partition manner. Figure 15 The scanning pattern 94 scans the transformation coefficients 91 in the following different ways: Figure 15 This is indicated by an apostrophe, 94', for the scan pattern. The scan pattern 94' sequentially traverses the transform coefficients 91 of the transform coefficient block 92 in such a manner that at least one transform coefficient of the first partition traverses between the two transform coefficients of the second partition. For example, Figure 15 The coefficient 91' is such that it is scanned between the two coefficients of partition 1201. However, it is a member of partition 1202.
[0133] However, the partition-level association between the context set and partition 120 does not mean that the context set 110 associated with partition 120 is distinct or disjoint with respect to each pair of partitions 120. In other words, a context set can be associated with two partitions. For example, the interleaving transform coefficient 91 along scan pattern 94 can be associated with partition 120 having a common context set 110 associated with it. To understand this, refer to... Figure 16 This illustrates another example of scan portion 94', which traverses transform coefficients 91 in a manner that interleaves the transform coefficients of at least two partitions 120 (here, partitions 120a and 120b), wherein in Figure 16 In the example, only the transform coefficient block 92 is divided into partitions 120a and 120b. Here, the common context set can be associated with partitions 120a and 120b. However, in Figure 15 and Figure 16 In both examples, partitions can be additionally used as units, with the nulling code or nulling indication, i.e., the coded sub-block flag, signaled in the data stream on a unit-by-unit basis. Figure 15 and Figure 16In this embodiment, a context is selected from the context set 110 associated with the corresponding partition 120 where the currently encoded / decoded transform coefficients are located, and this can be performed using the local template 132 as described above. Alternatively or additionally, the selection of a context from the associated context set 110 can be based on a count of previously decoded / encoded transform coefficients within the current partition. The location of the currently encoded / decoded transform coefficients depends, for example, on whether this count exceeds one or more specific thresholds. For example, in... Figure 16 In the example, if transform coefficient 130 is the transform coefficient of the current encoding / decoding, then the four shaded transform coefficients can represent the transform coefficients of the previous encoding / decoding in block 92 that exceed one or more specific thresholds.
[0134] When using nulling indicators or coded sub-block flags, the nulling indicators or coded sub-block flags can be encoded into the data stream or decoded from the data stream during the first scan of the transform coefficients of a certain partition 120. That is, once the first transform coefficient 91 of a certain partition 120 has been scanned along the scan portion 94', the nulling indicators or coded sub-block flags of that partition can be scanned. Figure 17 and Figure 18 An example is provided for this purpose. Figure 18 An example of transform coefficient block 92 is shown again, this time divided into three partitions 120a, 120b, and 120c. A transform coefficient 91 (interleaved) in scan portion 94', located between two transform coefficients in another partition (i.e., partition 120b), is shown by reference numeral 91'. Figure 17 Suppose that the transform coefficient 91' is also by chance one of the first transform coefficients to be encoded, i.e., for example, using the above reference. Figure 5 When the final position indication is given, it is located at position 98. Its quantization level 106 is encoded, followed by the coded subblock flag CBF2 of partition 102b, which is zero because all transform coefficients 91 within partition 120b are zero. Figure 18 Assume that shading is used to indicate all non-zero transform coefficients 91. The coefficient directly below coefficient position 104 is also one of the coefficients 91' arranged in scanned order between two coefficients in another partition. Meanwhile, it is the scanned partition 120. a The first coefficient, therefore, is used for partition 120. b After CBF2, partition 120 a The indicator CBF3 is zeroed out. Similarly, assuming again that coefficient 91' below coefficient position 104 is non-zero, CBF3 is signaled to be 1, and then partition 120 is zeroed out. a The coefficient 91 is encoded.
[0135] As frequently mentioned above, but again noted here, the above embodiments belonging to different aspects of this application can be combined, for example, combining embodiments involving cross-color component context derivation with all other embodiments and combinations thereof, combining embodiments involving binarization parameter settings with embodiments involving context derivation, combining embodiments involving a set of contexts for these partitions with embodiments involving selecting contexts from such a set using local templates, and so on.
[0136] Therefore, the above embodiments relate to transform coefficient block coding, such as entropy coding used in image and video compression.
[0137] The above embodiments relate to the field of digital signal processing, and specifically to methods and apparatus for image and video decoders and encoders. Notably, the above embodiments generate a set of strategies applied to the entropy coding stage in image and video compression architectures employing partitioning techniques. An improved context modeling strategy has been implemented by modifying the processing order of syntax elements. In addition to aliases, the following techniques are included: analyzing local activity at the current level, employing a dedicated context model, modifying the syntax processing order, evaluating cross-component syntax elements, and excluding or dedicating to processing coding states with extreme probabilities.
[0138] Specifically, the above embodiments propose a new set of techniques for entropy coding, which are particularly suitable for syntax elements involving the residual compression stage in image and video compression architectures employing partitioning techniques. Such designs typically divide images into regular shapes, such as rectangles or blocks. Without loss of generality, the term "block" refers to any form of the partitioning technique described in this document. A starting point can be as referenced above. Figure 3 The maximum allowed size is explained, and the partitioning algorithm can further divide each block into smaller units. Such partitioning can be performed using a quadtree structure, as in the latest High Efficiency Video Coding (HEVC) specification. It is also possible to use different strategies for partitioning, for example, using binary trees instead of quadtrees. In addition to partitioning, new coding tools prior to the residual compression stage require further development of existing methods. To achieve improved compression efficiency, the following aspects were addressed:
[0139] • Define syntax elements to interchange encoding order (e.g.) Figure 15 , Figure 16 , Figure 18 )
[0140] • Based on the above modifications, binarization has been adjusted (e.g., adaptive changes for the cutoff value).
[0141] • Perform context modeling for each segment generated during the binarization process (e.g., see the concepts of adjusting the shape of the local context template for certain features or disabling the local context template).
[0142] • Evaluation of local activity in the spatial domain (e.g., see embodiments using local templates or setting cutoff values based on certain characteristics such as energy), evaluation of local activity in the frequency domain (e.g., see the concepts of adjusting the shape of a local context template or disabling a local context template for certain characteristics, and setting cutoff values based on certain characteristics such as energy), and evaluation of local activity across component domains (e.g. see...). Figure 11a )
[0143] • Exclude coding patterns with extreme probabilities
[0144] Specialized processing for coding patterns with extreme probabilities
[0145] · Handle dedicated coding states separately
[0146] The entropy coding stage used in HEVC is Context-Based Adaptive Binary Arithmetic Coding (CABAC), which consists of three internal processing stages. The first stage is the binarization stage, the second stage is the context modeling stage, and the final processing unit is the binary arithmetic coding engine. All input symbols undergo the binarization stage. If the input is already binary, the output is the same symbol; otherwise, the output is a codeword representing the input symbol, which is called a number string. The context modeling stage selects a context model and passes its selection to the entropy coding engine. Note that binary arithmetic coding engines, such as M-Coder implemented in CABAC, typically support bypass modes with equal probability for symbols. The remainder of this document will refer to coding using a context model as the regular mode and coding without a context model as the bypass mode.
[0147] For the residual compression stage, i.e., the transmission of transform coefficient levels, the input is primarily a block of integer-valued coefficients. These values are typically the prediction residuals transformed into the frequency domain, and due to the quantization process, these levels usually represent only a portion of the original information. Since this process is serial in the entropy coding stage, it is necessary to decompose the two-dimensional shape into a one-dimensional vector. The scan pattern specifies the mapping from the two-dimensional block to the one-dimensional vector. This scan pattern can be applied multiple times, such that only a portion of the transform coefficient levels is transmitted in the bitstream each time (e.g., in HEVC). The residual compression stage is described from different perspectives in the following paragraphs.
[0148] The residual compression mechanism in HEVC works as follows: First, the Code Block Flag (CBF) syntax element is encoded, which signals the invalidity of the current transform block, i.e., whether all transform coefficient levels are equal to zero. When a significant level exists, the last significant scan position is specified. This depends on the selected scan pattern and encodes all levels from the signaled last position to the first position defined by the scan pattern. Implicitly, the scan order is equivalent to using the scan pattern in reverse order. Breaking the entire process down into subtasks improves implementation complexity and compression efficiency. Transform blocks larger than 4×4 are processed into 4×4 sub-units, called sub-blocks. The processing order of sub-blocks is the same as that of scan positions, i.e., assuming each sub-block represents a regular frequency position, and the transform block has a size of N / 4×M / 4 instead of N×M, such as... Figure 19 The example shown is for an 8×8 block using a vertical scanning pattern.
[0149] In the first step of a valid transform block, the absolute coordinates of the last position are encoded, specifically the x and y coordinates with the top-left corner as the origin. One of three predefined scan patterns is chosen: diagonal, horizontal, or vertical. A horizontal or vertical scan pattern can be used when the prediction mode is intra-frame, the transform block is less than or equal to 8×8, and the direction of the predictor is within a predefined range. Next, starting with the sub-block containing the last valid level, the remaining information about the level is encoded until the level is reconstructed. The described process is repeated for the remaining sub-blocks until the last sub-block in the processing order, where the last sub-block is always the one covering the DC frequency position. Other techniques are embedded in the processing, such as encoding the CBF for sub-blocks. Since the signaling of the last scan position has already inferred that the sub-block is valid, the last sub-block is skipped. Inference for sub-blocks covering the DC frequency position is also a special case. Additionally, the Sign Bit Hiding (SBH) technique can be applied to each sub-block. Figure 20 An overview is provided.
[0150] From the perspective of the binarization stage, each integer value x represents a point in the interval, and a codeword is assigned to each point in the interval. Unary codes are a commonly used scheme, where |x| = n is represented by n binary values b0 followed by a terminating binary value b1. When the set of integer value symbols is limited, the terminating binary value can be reserved for the largest input symbol, resulting in what is called a truncated unary code. In HEVC, the binarization process for the levels consists of three different schemes. The first three absolute level values fall into the truncated unary part. When the current absolute level is greater than the limit, the remaining values are binarized using Rice code. The actual Rice code is chosen by specifying the order k. However, the intervals covered by the Rice code are also limited, and the remaining integer values are binarized using exponential Golomb code. In HEVC, the order of the exponential Golomb code is always equal to k+1. The transitions between codes are called binarization limits, and both limits—the transition from truncated unary to Rice and from Rice to exponential Columbus—are adaptive based on the number of coding syntax elements used for the first limit and the Rice parameter k used for the second limit. The first limit toggles within each sub-block and is equal to 3 at the start of processing each sub-block. The limit decreases to 2 whenever an absolute level greater than 2 is encoded. And, the limit decreases to 1 whenever eight absolute levels greater than 1 are encoded. As a result, validity is encoded in the normal mode for all frequency positions covered by the sub-block, but only at eight positions is information about whether the level is greater than 1 encoded, and only once for information about whether the level is greater than 2. The Rice parameter k is chosen as follows: At the beginning of each sub-block, the parameter is equal to zero. After reconstructing the full level, the absolute value is compared to a threshold, and if the absolute level is greater than the threshold, k is incremented by 1. However, considering the main HEVC profile, k is limited to four and does not exceed this value. Figure 21 and Figure 22 The binarization of levels is outlined.
[0151] The encoding of each sub-block is divided into several scanning paths, such that the syntax elements are sorted by group. In the first processing path, validity information is sent. Next, all syntax elements greater than 1 are sent, then all syntax elements greater than 2, the remaining absolute levels are sent, and finally the symbols are sent. The binarization of the last valid position of the integer value is performed as follows. Depending on the block size, for a block size of N, the maximum value is limited to N-1. Depending on the size N, the output of the binarization is a combination of truncated unary codes and fixed-length binary codes.
[0152] The details of context modeling are as follows. Generally, binary symbols (segments) generated by fixed-length binarization, Columbus-Rice, or exponential Columbus codes are encoded in bypass mode, while segments associated with unary codes or truncated unary codes are encoded in regular mode. Similarly, input symbols that are already binary are typically encoded in regular mode using an arithmetic binary encoder. For the CBF in the luma component, a dedicated context model is used for the zero-valued residual quadtree (RQT) depth, and another dedicated context model is used for the remaining depths. Since the CBF signaled in chroma extends along each depth, rather than along the leaf levels as in luma, a dedicated context model is used for each depth of the RQT. The last position specified for the x and y coordinates, depending on the block size, uses the same context model for a certain number of consecutive segments. More specifically, instead of using a single context model for each segment, a uniform context quantizer is used to reduce the number of context models used. Horizontal encoding employs four syntax element types that use different sets of context models. Based on the validity of adjacent right and lower sub-blocks, the CBF of a sub-block employs three different context models: both adjacent sub-blocks are valid, both adjacent sub-blocks are invalid, and one of the two adjacent sub-blocks is valid. The validity flag uses four different patterns, where the context model is fixedly assigned to the scan position within the sub-block, and these patterns depend on the adjacent right and lower sub-blocks. The remaining level information using the regular pattern is greater than 1 and greater than 2, i.e., the two segments of the unary code are truncated when the first binarization limit equals 3. Since information greater than 2 is encoded once, a single context model is used. For information greater than 1, the next context model in the set is used until the first non-terminating binary value b0 appears. If this occurs, a special context model is used until the end of the sub-block. Additionally, the context set is selected based on the presence of a level greater than 1 in the previous sub-block.
[0153] Context modeling plays a crucial role in the entropy coding stage. By employing more advanced context modeling techniques, higher compression efficiency can be achieved. The embodiment proposed in this paper improves the compression efficiency of horizontal coding by modifying the coding order, allowing existing information to be used in the context modeling stage earlier. A possible coding structure is as follows: Figure 23 As shown.
[0154] According to an embodiment, the processing order is modified so that each level is fully transmitted before stepping to the next scan position. By doing so, conditions are enabled for the context modeling stage, allowing for higher compression efficiency. Specifically, instead of processing sub-blocks in multiple paths, the absolute level of each scan position is transmitted completely, requiring only one processing path. While multiple scan path schemes are advantageous for some hardware architectures, they have disadvantages for other architecture types, such as in terms of memory access. (Summary as follows) Figure 24 As shown.
[0155] The modified processing order sends the full absolute level, ensuring that the complete absolute level is available when evaluating adjacent frequency locations, rather than using only a portion of the quantity. Note that the modification does not need to be fixed as described. Typically, the residual energy is flat, resulting in small absolute levels. The compromise operating mode enables template evaluation only when an absolute level greater than a specific threshold has been detected for a particular quantity. (See reference for example.) Figure 14 (Described embodiment) Additionally, for throughput reasons, the number of flags indicating an absolute level greater than 1 and greater than 2 can be limited to reduce the number of segments in the normal mode. (See, for example, Reference) Figure 6 The described and intended embodiments, designed to adapt to or set a cutoff value of 4, when using absolute horizontal encoding, the concept of sub-blocks no longer needs to depend on a 4×4 shape (e.g., embodiments related to the shape of partitions, as shown in reference). Figure 13 Instead of a single scan location, it can be a set of consecutive scan positions. That is, coefficients belonging to different partitions may not interleave. Note that the primary reason for sub-blocks can be context modeling. The concept of a 4×4 sub-block can be easily extended to a set of scan positions. For example, a fixed number of scan positions equal to 16 can be used, resulting in a configuration similar to existing 4×4 sub-blocks. Figure 25 The diagram shows four partitions (left) converted from a regular partition to a size of 16 (in units of coefficients), and four partitions (right) converted to the same size but following a zigzag scan.
[0156] Depending on the chosen size, groups of consecutive scan positions typically contain only the scan positions themselves. To improve compression efficiency, the size can be configured to be variable (see embodiments related to the shape of the partition), but for a given transform block size, the size is fixed. Another example is as follows. DC frequency positions can be formed into a specific shape, and the number of scan positions formed is equal to the diagonal. Note that the size should be configured in a manner that depends on the block size. Forming a specific number of consecutive scan patterns into a group eliminates the adjacency relationship between frequency positions. Therefore, it is reasonable to group scan positions that are spatially close to each other together. To combine with existing scan patterns, it is not necessary to process a group of scan positions consecutively. (See...) Figure 15 , Figure 16 and Figure 18 Instead, the CBF of the group is encoded when processing the first scan position of the group. See also Figure 17 and Figure 18 Furthermore, grouping can be pre-specified, for example, using a forward-driven method (comparing the explicit partition shape information described above) or a backward-driven method (comparing the partition shapes according to the scan pattern or block size) or a combination of both. In this configuration, based on the last valid position, another flag indicating whether a group is used is encoded, which results in the presence or absence of a group CBF. (See the embodiment using partitioned pattern signaling.) Adapting the number of scan positions allows for a reduction in the cost of levels at high-frequency positions as follows. Generally, levels at higher frequency positions have lower energy, and the distance between valid levels tends to be larger than at lower frequency positions. Therefore, rate distortion optimized quantization methods further quantize such levels as invalid. When the number of scan positions is adaptively formed, the cost of the distance between two such levels can be further reduced. This concept can also be applied to the other end. At higher operating points with higher residual energy, the cost of a group of scan positions with only valid levels can be further reduced. Furthermore, the definition of the CBF of the group is also changed, meaning that the group is encoded when the CBF equals 1, rather than encoding the group when at least one valid coefficient exists within the group. Changing the semantics reduces the logic.
[0157] From the perspective of empirical data on 4:2:0 chroma subsampled signals, the luminance residual signal typically contains higher energy than its spatially adjacent (e.g., spatially corresponding) chroma residual signals. This fact can be incorporated into the level encoding when the processing is reordered, allowing the level to be encoded immediately after the CBF is signaled. More information can then be evaluated in the context modeling phase. The context modeling used for luminance CBF and residuals can be adjusted based on the results of the chroma CBF or chroma residuals. (Comparison) Figure 12 (Description) In addition, the encoding of the last valid position can be decoupled from the horizontal encoding, i.e., when all three transform blocks are valid. All three last valid positions are encoded sequentially. Similar to CBF encoding, the encoding of the last valid position can be conditional on the result of the last valid positions of adjacent (e.g., co-occurring) transform blocks. (Comparison) Figure 12 (Description) Another technique is joint encoding of the last valid position, that is, for two chroma transform blocks, only the single last scan position is encoded, instead of encoding both last valid positions. For example, for luminance and chroma, the position indicator 114 is only jointly encoded once.
[0158] The first binarization threshold, i.e., the cutoff value of 164, is adaptive and represents a trade-off between complexity and compression efficiency. A lower fixed threshold results in lower compression efficiency, while a higher threshold leads to higher complexity. Note that a higher threshold does not result in a proportional increase in compression efficiency; rather, the improvement is very limited. However, the operating point changes due to different partitioning strategies and other or novel coding techniques preceding the residual compression stage. For example, setting the first binarization threshold to 5 can improve compression efficiency when enabling other transform modes (e.g., adaptive transforms with forward or backward adaptive control). The first binarization threshold can be used to control different coding modes. For example, when a high energy level is detected, the first binarization threshold can be set to zero, so that no segments are encoded in the normal mode. (Compare the above embodiments regarding changes and settings of the cutoff value.) High signal energy can be detected by analyzing the values of the sent syntax elements (or binary decisions) of the transform block or its sub-blocks. As an example, high signal energy can be detected by comparing the sum of the absolute values (in the transform block or its sub-blocks) with a certain threshold. Alternatively, this detection can be achieved by comparing the number of encoded segments in the first scan path at the scan position (of the transform block or a sub-block of the transform block) with a certain threshold. (Compare the above embodiments regarding changes and settings of cutoff values combined with the multi-path concept.)
[0159] The general operating point configuration is as follows. The initial limit, i.e., the cutoff value, depends on the prediction and transform modes used, as well as the quantization parameters, and the cutoff value is greater than 3, for example, equal to 5. (See the example above regarding the setting of the cutoff value.) For combinations of modes equal to those configured in HEVC, the initial first limit is set to equal to 3. In this mode, the limit is reduced based on the occurrence of a level value. (See the example above regarding the transformation of the cutoff value.) However, when the initial first limit is equal to 5, this initial first limit remains fixed for the group or even the entire transform block.
[0160] Local templates used for context derivation have been incorporated as part of the prior art; however, due to limited information—that is, only a portion of the absolute levels have been evaluated—existing information becomes available earlier in the encoding process by applying changes to the encoding structure, and thus can be used in the context and modeling stages. Since the absolute levels are available due to the aforementioned techniques applied to the encoding structure, the frequency locations covered by the local template include updated information, a fact utilized in some of the presented embodiments as follows. Because the encoding has been ordered such that each level is fully encoded, the local template evaluates adjacent spatial locations that have already been encoded. A context model of segments, which is part of a first binarization code (which may be unary binarization or truncated unary binarization), is derived using the sum of the absolute values of adjacent levels and the number of valid levels. Binarization parameters 163, such as Ricean parameters, can also be derived from the evaluation. An example configuration is shown below.
[0161] The shape of the template can be fixed or adaptive. An example of shape adaptation has been described above. For instance, when the template size is equal to 5 and the evaluation of the first two adjacent positions has resulted in a very high absolute sum, the evaluation of the remaining adjacent positions can be skipped, resulting in an adaptive shape for the local template. (See also...) Figure 14 The shape can be configured based on block size, color components, the last valid position, and the selected transform. In special cases, the template size can be set to zero, so that the encoded quantization levels within the local neighborhood are not used for context derivation. The local template is then disabled. When the residual energy is diffused and flat between frequency positions—that is, when the absolute level is low—a template covering more adjacent frequency positions is more effective. This is typically seen in larger transform blocks and combined with the last valid position at higher frequencies.
[0162] When the binarized segments of the quantization index are encoded in multiple scan paths at scan positions of transform blocks or sub-blocks of transform blocks, only the segments transmitted in the current and previous scan paths can be used to derive the context model. In this case, a partially reconstructed absolute level (derived using the segments transmitted in the current and previous scan paths) is used. Specifically, for the context-encoded segments transmitted in the first path (at scan positions of transform blocks or sub-blocks), the template is evaluated using the partially reconstructed transform coefficient level given by the segments encoded in the first scan path.
[0163] Different sets of context models can be employed based on information such as the current diagonal, block size, applied transform, selected predictor or prediction mode, and the position within the truncated unary codeword. To avoid context dilution, context sets can be merged. For example, adjacent diagonals can be combined with... Figure 25(On the right) is associated with a partition depicted. As an example, a certain context set can be used for multiple diagonal positions (i.e., dividing the block of transform coefficients into multiple regions based on diagonal (x+y) positions, and using a separate context set for each of these partitions). Similarly, different context sets can be obtained by merging multiple values of other parameters or combinations of different parameters. In some cases, it is also beneficial to set a dedicated context model for DC positions. (For example, see the embodiment of providing a sample-specific context set for positions 104 and / or 98) This means that for the DC coefficients (located at positions x=0 and y=0 in the block of transform coefficients, i.e., position 104), a set of context models different from all other coefficient positions can be used. Such a distinction in context sets can be applied to all segments as part of a truncated unary code. This means that any of the methods described above for specifying the context set can be applied to individual segments binarized at the transform coefficient level, or alternatively, to a subset of segments binarized at the transform coefficient level, or as another alternative, to all context-encoded segments binarized at the transform coefficient level.
[0164] The choice of context model depends on the results of template evaluation. For example, the sum of absolute values of the levels within the template and the number of valid positions are derived. Based on these two quantities, the context model for all segment portions of the first binary code 160 (e.g., a truncated unary code and the Rice parameter k) can be derived. For example, the sum of absolute values minus the number of valid positions directly results in the context model index within the context model set. Since the context model set is limited, the value can be truncated to the number of context models within the context model set. For the Rice parameter, a mapping table can be derived, allowing a direct mapping between the sum of absolute values and the Rice parameter. However, to limit the table size, the sum of absolute values should also be limited.
[0165] Context model selection can also be derived from the chosen transformation. Specifically, if a secondary transformation is used that applies only to a subset of the primary coefficients, a dedicated set of context models can be used for both subsets.
[0166] There are known coding states that can be utilized to improve compression efficiency. For the last valid scan position, a case with horizontal coding is given. For this position, a dedicated context model is used to encode the segments that are part of the first binarization code, which may be truncated unary binarization. Different context sets can be used, for example, by evaluating the diagonal and combining it with the current position in the block. It can be further combined with the methods described above, where another different set of context models is used for segments at the DC transform coefficient level (i.e., the transform coefficient level at positions x=0 and y=0 within the transform block). For the case where the last valid scan position is equal to the DC position, there are several possibilities: using a context set for the last position (i.e., the last position has higher priority), using a context set for the DC position (i.e., the last position has higher priority), or using a separate context set for the DC position, which is also the last scan position. As mentioned above, different context sets can be applied to individual segments of the binarization at the transform coefficient level, or alternatively, to a subset of segments of the binarization at the transform coefficient level, or, as another alternative, to all context-coded segments of the binarization at the transform coefficient level.
[0167] Another scenario occurs when all coefficients within a local template are valid and their absolute levels are above a specific threshold. In this case, context modeling switches to a mode where local template evaluation is disabled until the transform block ends. Again, for example, different sets of context models can be used depending on the current diagonal. Conversely, coding patterns that occur infrequently but require signaling can be excluded. Such a coding pattern is, for example, encoding the CBF of a group when the previous group consists of a high number of absolute levels. In this example, the configuration is to process the scan positions covered by the group sequentially. Another example is a first binarization bound of 160. Instead of starting with a fixed bound value at the beginning of each group, the absolute levels of the previous group are analyzed, and the bound varies between 1 and 5. To mitigate throughput, the bound can be set to zero when the previous group consists of very high residual energy. Then, the first binarization code 160 will disappear. Using local templates is effective when the statistics are not extreme, i.e., the conditional probability is not close to the minimum entropy. In the latter case, template opening evaluation can be disabled while maintaining compression efficiency, thereby reducing complexity. This is particularly useful for higher operating points when the number of levels plays a significant role in processing performance. An alternative case is presented at the beginning of the transform block when the primary quantity of the level is ineffective. In this case, template evaluation can be disabled due to higher uncertainty and less additional information available for context modeling.
[0168] There are different planes, also called color components, each carrying different color information, such as luminance and chromaticity information. All planes cover the same area of the image; therefore, transform blocks in one color plane have corresponding blocks in all other color planes. These transform blocks are encoded sequentially, each using the same syntax. Therefore, the same syntax elements exist for each transform block. Thus, information from transform blocks in a color component can be used for subsequent transform blocks. By evaluating the correspondings in other color components, this method can be used to derive a context model / set of syntax elements for the currently processed block. (Comparison) Figure 12 This paper presents a case where the coded block mark (CBF) of the second chroma component is encoded. One of two distinct contexts is selected based on the previous CBF value of the first chroma component. Another example is the use of a truncated unary code segment for absolute coefficient level encoding. Again, the value of the truncated unary code segment at the same position in the previous color plane is evaluated to select a different set of contexts.
[0169] In a preferred embodiment involving the coding structure, the coding is organized such that each transform coefficient level is fully transmitted for each scan position of the transform block. In another preferred embodiment, the levels are encoded in two paths such that all conventionally encoded segments 165 of portion 160 are encoded, followed by the bypass segments 165 of portion 162. In yet another preferred embodiment of the invention, the number of paths is preserved, but processing is performed on the entire transform block rather than on a sub-block basis.
[0170] In a preferred embodiment, the grouping shape is fixed, wherein the fixed shape size is smaller than the existing 4×4. In another preferred embodiment, the grouping shape is fixed, wherein the shape size is variable. The form depends on the transform block size and / or color components and / or prediction mode and / or the selected transform and / or the last valid position. In another preferred embodiment, the shape size is adaptively derived using forward adaptation. In this embodiment, the shape size begins with a regular 4×4 form, and as an example, the size can be changed to 8×8.
[0171] In a preferred embodiment, such as Figure 13 As exemplarily shown, the scan pattern is decoupled from the grouping, such that the CBF of the group is encoded when the first frequency position of the group is encoded. In this configuration, the scan pattern can be, for example, horizontal (or vertical), such that each row of the transform block is fully processed while the shape remains 4×4.
[0172] In a preferred embodiment, the encoding structure is arranged such that the level is encoded immediately after the CBF flag of the corresponding transform block is encoded. Reordering enables evaluation of spatially adjacent transform blocks that have already been encoded for context modeling. In another preferred embodiment, the encoding of chroma blocks is interleaved. In this configuration, the last position is encoded once, and encoding switches between two chroma transform blocks. In another embodiment, the last position is normally encoded, and the switching between two chroma blocks is activated when the scan position is aligned. In yet another preferred embodiment, two chroma blocks are interleaved to generate a transform block with the same chroma size as the 4:2:0 content. The merged chroma block is then normally encoded.
[0173] In a preferred embodiment, the last valid position is jointly encoded for the chroma transform blocks. In this configuration, the last position is not the last valid position; rather, it is the last position where encoding begins, and therefore valid information must be encoded for that specific position. In another embodiment, for two chroma blocks, the last position is encoded once, but only for one of the chroma blocks. For the other chroma block, validity must be encoded at the last valid position of that other chroma block.
[0174] In a preferred embodiment, CBF means that the transform block should be encoded. As a result, the transform block may be invalid. In this particular configuration, the last valid position is only equal to the last position. This configuration can be coupled to specific conditions such as block size, prediction mode, transform mode, etc. For example, when using one-dimensional partitioning, for a 4×4 block, the resulting stripe is only 1×4. In this case, when the first 1×4 stripe is valid, it can be inferred that CBF equals 1.
[0175] In a preferred embodiment, CBF means encoding the frequency position of the group. In this configuration, all scan positions are encoded, and the last scan position within the group is not inferred.
[0176] In a preferred embodiment of binarization, the first binarization bound 164 is variable for each transform block, depending on the block size, color components, prediction mode, or the selected transform. In this configuration, the first bound can be 5 when another transform mode needs to be signaled in the bitstream. However, for regular transforms, the first bound can remain at 3.
[0177] In a preferred embodiment, the first limit 164 never decreases when the limit is greater than 3. In this preferred embodiment, it is assumed that the level is not fixed, therefore, it makes sense to encode more segments than usual in the normal mode. In another preferred embodiment, the decrease of the first limit depends on the number of encoded symbols within a block (which may represent a transform block or a sub-block of a transform block). In another preferred embodiment, the first limit depends on the template evaluation being adaptive. For example, the first limit is 5 when the number of valid positions is zero. However, when there are a given number of valid levels within the template, such as 3, the limit is set to 2, and when there are 5 valid levels within the template, the limit is set to 1.
[0178] In a preferred embodiment, the Rice parameter is derived using a template. In this configuration, the sum of the absolute values of the levels is obtained and mapped to the Rice parameter. The table size can be limited to 8, 16, or 32. The values in the lookup table can be derived empirically. In another preferred embodiment of the invention, the Rice parameter does not decrease for a group even when using a template. In another preferred embodiment of the invention, the Rice parameter depends on the optimal Rice parameter of the levels covered by the template. Note that in this configuration, a first binarization bound of the already encoded levels can be considered in the calculation.
[0179] In a preferred embodiment, the interval of the Rice code coverage depends on the Rice parameter, and the interval becomes larger as the Rice parameter increases. In another preferred embodiment, the interval of the Rice code coverage depends on the block size and / or prediction mode, and / or transform size and / or quantization parameter. Note that, for the preferred embodiments in this paragraph, a second binarization bound can be inferred from the interval of the Rice code coverage.
[0180] In a preferred embodiment, the order of the exponential Golbus is fixed and equal to zero. In another preferred embodiment, the exponential Golbus order is initially one plus the Rice parameter. In yet another preferred embodiment, the exponential Golbus order is initially the Rice parameter. In both preferred embodiments, the exponential Golbus code covers only a finite number of intervals, and when the value exceeds the end of the interval, the exponential Golbus is applied again to the remaining values but with a different order. In a preferred embodiment, the exponential Golbus order is decreased in steps equal to 1 until it reaches zero. In yet another preferred embodiment, the exponential Golbus order is immediately equal to zero.
[0181] Regarding context modeling, in a preferred embodiment, the template shape is fixed and covers all adjacent spatial neighbors. In another preferred embodiment, the template shape is fixed and also covers spatially adjacent neighbors in another color channel. This configuration is designed for encoding chroma transform blocks.
[0182] In a preferred embodiment, the template shape is adaptive and derived at the beginning of the transform block. Specifically, the shape is larger or smaller depending on the transform block size, and / or prediction mode, and / or transform, and / or quantization parameters. In another preferred embodiment of the invention, the template shape is adjusted within the transform block. In this configuration, the shape becomes larger or smaller. For example, when the shape size is equal to 5 and 3 or 4 adjacent positions are valid, but the absolute level sum is below a certain threshold, the template is increased to merge more adjacent positions. On the other hand, when all frequency positions are valid and the absolute level sum is above a certain threshold, the shape becomes smaller, i.e., set to equal to 3.
[0183] In a preferred embodiment, the context model set for the first segment of the truncated unary portion depends on the diagonal. In this configuration, the luma transformation block can employ three different context sets, while the chroma transformation block employs only two different context sets. The diagonal defines the switching point and can differ between luma and chroma. In another preferred embodiment of the invention, different context sets are employed when a transformation must be signaled in the bitstream.
[0184] In a preferred embodiment, the segments starting from the second position, i.e., all segments in the truncated unary code except the first segment, use the same context set. In another preferred embodiment, the segments use the same set of context models, but the context set can differ depending on the diagonal. In another preferred embodiment, the segments use the same set of context models, but the context set can differ depending on the selected transformation. In another preferred embodiment, the first diagonal uses a dedicated context model set. In another preferred embodiment, the segments starting from the fourth position (i.e., all segments in the truncated unary code except the first, second, and third segments) use a different context set depending on the selected transformation.
[0185] In a preferred embodiment, the context model of the first segment is derived using the absolute sum of a template, the absolute sum of which is limited to a specific threshold having the same size as the context set used. In another preferred embodiment, the number of valid positions is evaluated by subtracting the absolute level sum from the valid positions before truncation. In another preferred embodiment, the number of valid positions is evaluated by subtracting the absolute level sum from the valid positions after truncation. In another preferred embodiment, the variance of the absolute levels is calculated and normalized to the number of context models within the context model set.
[0186] In a preferred embodiment, for the context model from the second segment up to the end of the truncated unary code, the context model is selected by subtracting the number of valid positions from the sum of absolute levels. In another preferred embodiment of the invention, a prior art method is used, but modified to be integrated with the template. In this configuration, a dedicated context model can be switched to earlier, for example, when the sum of absolute levels is above a certain threshold.
[0187] In a preferred embodiment, the selected transform is first decoded. If the transform consists of a primary transform stage and a secondary transform stage, and only a subset of the primary transform is further transformed by the secondary stage, then two different templates are used for the two sets of coefficient positions.
[0188] In a preferred embodiment, a dedicated context model is used to pinpoint the last valid position of a segment of the unary code. In this configuration, the context model is specifically used for the last valid position. (See also...) Figure 5 Details have been discussed. In another preferred embodiment, the context model for the segments of the truncated unary code used for the last valid position depends on the already encoded last valid positions of spatially adjacent transform blocks, including transform blocks at the same position in another color plane. Specifically, the set of context models selected for the current segment of the truncated unary code depends on the last valid position in another color plane. An additional set of context models is selected whenever the current position indicated by the current segment increases.
[0189] In a preferred embodiment, context modeling for the luma CBF depends on the already encoded chroma CBF. In another preferred embodiment, context modeling for the second chroma CBF depends on the already encoded first CBF. In another preferred embodiment of the invention, the context model for the first chroma CBF depends on the already encoded luma CBF. In another preferred embodiment of the invention, when the encoding structure is changed, context modeling for the CBF uses energy information from spatially adjacent transform blocks, which also include transform blocks at the same location in another color plane. Specifically, the sum of absolute values is evaluated and compared with a threshold list. The context index is incremented by 1 whenever the value is greater than a threshold. In another preferred embodiment, context modeling for the CBF uses the same energy information, but the threshold set depends on the prediction mode of the current and / or adjacent blocks, for example, if the test mode is one of the LM chroma modes. In another preferred embodiment, context modeling for the CBF uses the same energy information, but the context set can vary depending on the prediction mode of the current and / or adjacent blocks, for example, if the prediction mode is one of the LM chroma modes.
[0190] In a preferred embodiment, the context modeling for the first segment of the truncated unary code depends on the segments already encoded in spatially adjacent transform blocks, which also include transform blocks at the same position in another color plane. Specifically, the set of context models is selected based on the value of the first segment of the truncated unary code at the same position in another color plane.
[0191] In a preferred embodiment, context modeling for the segments used to truncate the unary code depends on the segments already encoded in spatially adjacent transform blocks, which also include transform blocks at the same position in another color plane. Specifically, a set of context models is selected based on the value of the corresponding segment position of the truncated unary code at the same position in another color plane. In another preferred embodiment, context modeling for the segments used to truncate the unary code uses energy information from spatially adjacent transform blocks, which also include transform blocks at the same position in another color plane. Specifically, the sum of absolute values in different regions of the transform block is evaluated and compared with a threshold list. If the value is greater than the threshold, another set of context models is selected.
[0192] In a preferred embodiment, the template is enabled / disabled once a sufficient number of absolute levels have been encoded. In another preferred embodiment, the template is enabled / disabled once a sufficient number of valid positions have been encoded.
[0193] In other words, the following is a summary of the implementation examples set above.
[0194] According to an embodiment, an encoder for encoding an image into a data stream can be configured to: transform blocks of the image for a first color component and a second color component respectively to obtain a first transform coefficient block and a second transform block respectively; and use a context that depends on the first transform coefficient block to adaptively entropy encode the second transform coefficient block.
[0195] According to one embodiment, the encoder can be configured to: encode an indication 150 for each partition in a set of partitions into which the second transform coefficient block is subdivided, the indication 150 indicating whether the transform coefficients in the corresponding partition are encoded into the data stream, or indicating whether to skip the encoding of the transform coefficients in the corresponding partition and all transform coefficients in the corresponding partition are zero; and for partitions where the indication indicates that the transform coefficients in the corresponding partition are encoded into the data stream, entropy encoding is performed on the quantization level of the transform coefficients of the second transform coefficient block; and for partitions where the indication indicates that the encoding of the transform coefficients in the corresponding partition is skipped and all transform coefficients in the partition are zero, the encoding of the transform coefficients in the partition is skipped, wherein context-adaptive entropy encoding is used to perform the encoding of the indication, depending on the context of the first transform coefficient block.
[0196] According to a further embodiment, the encoder can be configured to: encode a further indication for each further partition in a set of further partitions into which the first transform coefficient block is subdivided, the further indication indicating whether the transform coefficients in the corresponding further partition are encoded into the data stream, or indicating whether to skip the encoding of the transform coefficients in the corresponding further partition and all transform coefficients in the corresponding further partition are zero; and for partitions where the further indication indicates that the transform coefficients in the corresponding further partition are encoded into the data stream, entropy encoding is performed on the quantization level of the transform coefficients of the first transform coefficient block; and for further partitions where the further indication indicates that the encoding of the transform coefficients in the corresponding further partition is skipped and all transform coefficients in the further partition are zero, the encoding of the transform coefficients in the further partition is skipped, wherein context-adaptive entropy encoding is used to perform the encoding of the indication, depending on the context of the further indication and / or the quantization level of the transform coefficients of the further partitions of the first transform coefficient block.
[0197] According to a further embodiment, the encoder can be configured to: encode an indication 190 indicating whether the transform coefficients within the second transform coefficient block are encoded into the data stream, or indicating whether to skip the encoding of the transform coefficients within the corresponding partition and all transform coefficients within the second transform coefficient block are zero; and if the indication indicates that the transform coefficients of the second transform coefficient block are encoded into the data stream, then entropy encoding is performed on the quantization level of the transform coefficients of the second transform coefficient block; if the indication indicates to skip the encoding of the transform coefficients of the second transform coefficient block and all transform coefficients within the partition are zero, then the encoding of the transform coefficients of the second transform coefficient block is skipped, wherein context-adaptive entropy encoding is used to perform the encoding of the indication 190, depending on the context of the first transform coefficient block.
[0198] According to a further embodiment, the encoder can be configured to: encode a further indication 190, which indicates whether the transform coefficients of the first transform coefficient block are encoded into the data stream, or indicates whether to skip the encoding of the transform coefficients of the first transform coefficient block and all transform coefficients in the corresponding further partition are zero; and if the further indication indicates that the transform coefficients of the first transform coefficient block are encoded into the data stream, then entropy encoding is performed on the transform coefficients of the first transform coefficient block; if the further indication indicates to skip the encoding of the transform coefficients of the first transform coefficient block in the corresponding further partition and all transform coefficients in the first transform coefficient block are zero, then the encoding of the transform coefficients of the first transform coefficient block is skipped, wherein context-adaptive entropy encoding is used to perform the encoding of the indication 190, depending on the quantization level of the further indication and / or the transform coefficients of the first transform coefficient block.
[0199] According to a further embodiment, the encoder can be configured to: encode a first indication 114 of a first termination coefficient position into a data stream, wherein a first last non-zero transform coefficient is located at the first termination coefficient position when traversing a first scan pattern, the first scan pattern sequentially traversing the transform coefficients of a first transform coefficient block in a forward direction; encode first data into the data stream, the first data representing a first encoded set of transform coefficients traversed by the first scan pattern from the first termination coefficient position in a reverse direction, the first data including the quantization level of the non-zero transform coefficients in the first encoded set of transform coefficients; and encode the first indication 114 of a second termination coefficient position into a data stream. The second indicator 114 is encoded into the data stream. When traversing the second scan pattern, the second last non-zero transform coefficient is located at the second termination coefficient position. The second scan pattern traverses the transform coefficients of the second transform coefficient block sequentially in the forward direction. The second data is encoded into the data stream. The second data represents a second set of encoded transform coefficients traversed by the second scan pattern from the second termination coefficient position in the reverse direction. The second data includes the quantization level of the non-zero transform coefficients in the second set of encoded transform coefficients. The encoding of the second indicator is performed using context-adaptive entropy coding, which depends on the first termination coefficient position.
[0200] According to another embodiment, a decoder for decoding an image from a data stream can be configured to: transform blocks of the image for a first color component and a second color component, respectively, to obtain a first transform coefficient block and a second transform block, respectively; and use a context that depends on the first transform coefficient block to adaptively perform entropy decoding on the second transform coefficient block.
[0201] According to one implementation, the decoder can be configured to: decode an indication 150 for each partition in a set of partitions into which the second transform coefficient block is subdivided, the indication 150 indicating whether the transform coefficients in the corresponding partition are encoded into the data stream, or indicating whether to skip encoding the transform coefficients in the corresponding partition and all transform coefficients in the corresponding partition are zero; and for partitions where the indication indicates that the transform coefficients in the corresponding partition are encoded into the data stream, perform entropy decoding on the quantization level of the transform coefficients of the second transform coefficient block, and for partitions where the indication indicates that encoding the transform coefficients in the corresponding partition is skipped and all transform coefficients in the partition are zero, skip decoding the transform coefficients in the partition, wherein context-adaptive entropy coding is used to perform decoding of the indication, depending on the context of the first transform coefficient block.
[0202] According to a further embodiment, the decoder can be configured to: for each further partition in the set of further partitions into which the first transform coefficient block is subdivided, decode a further indication indicating whether the transform coefficients in the corresponding further partition are encoded into the data stream, or indicating whether to skip encoding the transform coefficients in the corresponding further partition and all transform coefficients in the corresponding further partition are zero; and for partitions where the further indication indicates that the transform coefficients in the corresponding further partition are encoded into the data stream, perform entropy decoding on the quantization level of the transform coefficients of the first transform coefficient block; and for further partitions where the further indication indicates to skip encoding the transform coefficients in the corresponding further partition and all transform coefficients in the further partition are zero, skip decoding the transform coefficients in the further partition, wherein context-adaptive entropy coding is used to perform decoding of the indication, depending on the context of the further indication and / or the quantization level of the transform coefficients of the further partitions of the first transform coefficient block.
[0203] According to a further embodiment, the decoder can be configured to: decode indication 190, which indicates whether the transform coefficients in the second transform coefficient block are encoded into the data stream, or indicates whether to skip the encoding of the transform coefficients in the corresponding partition and all transform coefficients in the second transform coefficient block are zero; and if the indication indicates that the transform coefficients of the second transform coefficient block are encoded into the data stream, then entropy decoding is performed on the quantization level of the transform coefficients of the second transform coefficient block; if the indication indicates to skip the encoding of the transform coefficients of the second transform coefficient block and all transform coefficients in the partition are zero, then the decoding of the transform coefficients of the second transform coefficient block is skipped, wherein context-adaptive entropy coding is used to perform the decoding of indication 190, depending on the context of the first transform coefficient block.
[0204] According to a further embodiment, the decoder can be configured to: decode a further indication 190, which indicates whether the transform coefficients of the first transform coefficient block are encoded into the data stream, or indicates whether to skip the encoding of the transform coefficients of the first transform coefficient block and all transform coefficients in the corresponding further partition are zero; and if the further indication indicates that the transform coefficients of the first transform coefficient block are encoded into the data stream, then entropy decoding is performed on the quantization level of the transform coefficients of the first transform coefficient block; if the further indication indicates to skip the encoding of the transform coefficients of the first transform coefficient block in the corresponding further partition and all transform coefficients of the first transform coefficient block are zero, then the decoding of the transform coefficients of the first transform coefficient block is skipped, wherein context-adaptive entropy coding is used to perform the decoding of indication 190, depending on the further indication and / or the quantization level of the transform coefficients of the first transform coefficient block.
[0205] According to a further embodiment, the decoder can be configured to: decode a first indication 114 of a first termination coefficient position from a data stream, wherein a first last non-zero transform coefficient is located at the first termination coefficient position when traversing a first scan pattern, the first scan pattern sequentially traversing the transform coefficients of a first transform coefficient block in a forward direction; decode first data from the data stream, the first data representing a first encoded set of transform coefficients traversed by the first scan pattern from the first termination coefficient position in a reverse direction, the first data including the quantization level of the non-zero transform coefficients in the first encoded set of transform coefficients; decode a second indication 114 of a second termination coefficient position from a data stream, wherein a second last non-zero transform coefficient is located at the second termination coefficient position when traversing a second scan pattern, the second scan pattern sequentially traversing the transform coefficients of a second transform coefficient block in a forward direction; decode second data from the data stream, the second data representing a second encoded set of transform coefficients traversed by the second scan pattern from the second termination coefficient position in a reverse direction, the second data including the quantization level of the non-zero transform coefficients in the second encoded set of transform coefficients, wherein context-adaptive entropy coding is used to perform decoding of the second indication, depending on the context of the first termination coefficient position.
[0206] According to a further embodiment, an encoder for encoding an image 12 into a data stream 14 can be configured to: encode data 96 representing a set of codes 100 (shown in shaded areas) in transform coefficients 91 into the data stream 14, the set of codes 100 being traversed by a scan pattern 94 [or scan path] in a predetermined direction 102 from a first termination coefficient position 98 to a second termination coefficient 104, using a scan pattern 94 that sequentially traverses the transform coefficients of transform coefficient blocks 92, to encode 108 the transform coefficient block 92 representing the image 12 into the data stream 14. In data stream 14, data 96 includes quantization levels 106 of at least non-zero transform coefficients in a set 100 of encoded transform coefficients, wherein the encoder is configured to entropy encode quantization level 106 using a first set 110 of quantization levels of non-zero transform coefficients at a first terminating coefficient position 98 or a second terminating coefficient position 104 in context 112, the first set 110 of context 112 being disjoint from a second set 110 of context 112 for any other non-zero transform coefficients in the set 100 of encoded transform coefficients.
[0207] According to one embodiment, the encoder can be configured to encode an indication 114 of the termination coefficient position into the data stream 14, where the last non-zero transform coefficient is located when the scan pattern 94 is traversed along the forward direction 116, wherein the predetermined direction 102 is the reverse direction 118, the first termination coefficient position is the termination coefficient position indicated by the indication 114, and the second termination coefficient position 104 is the coefficient position traversed last along the scan path 94 in the reverse direction 118.
[0208] According to a further embodiment, the encoder can be configured to use a first set of contexts for the non-zero transform coefficients at the first termination coefficient position 98.
[0209] According to a further implementation, the encoder can be configured to use a first set of contexts for non-zero transform coefficients at the second termination coefficient position.
[0210] According to a further embodiment, the encoder can be configured to: use a first set of context for non-zero transform coefficients at a first termination coefficient position 98, and use a third set of context that does not intersect with the first set for non-zero transform coefficients at a second termination coefficient position 98, wherein the first set and the third set do not intersect with a second set of any non-zero transform coefficients located along the scan pattern between the first termination coefficient position and the second termination coefficient position in the encoding set of context used for transform coefficients.
[0211] According to a further embodiment, the first set may not intersect with the second set of non-zero transform coefficients in the context for the coefficient positions at the following positions: coefficient positions along the scan pattern 94 in the reverse direction 118 immediately after the first termination coefficient position 98 and immediately before the second termination coefficient position 104.
[0212] According to a further implementation, disjointness may be independent of the first termination coefficient position 98.
[0213] According to a further embodiment, the encoder can be configured to: for each partition subblock of the transform coefficient block 92 into which the partition 120 is subdivided, use a set in the context that does not intersect with the first set to context-adaptively entropy encode the quantization level of other non-zero transform coefficients of the transform coefficient block 92.
[0214] According to a further embodiment, the partitions 120 into which the transform coefficient block is subdivided can extend diagonally along a direction inclined to the diagonal 122 of the transform coefficient block 92, which passes through the second termination coefficient position, such as the DC position.
[0215] According to a further embodiment, a decoder for decoding an image 12 from a data stream 14 can be configured to: decode data 96 representing a set of codes 100 (shown in shaded areas) in transform coefficients 91 from the data stream 14, the set of codes 100 being traversed by a scan pattern 94 [or scan path] in a predetermined direction 102 from a first terminating coefficient position 98 to a second terminating coefficient 104, using a scan pattern 94 that sequentially traverses the transform coefficients of transform coefficient blocks 92, to decode 108 the transform of blocks 84 representing the image 12 from the data stream 14. Coefficient block 92, data 96 includes quantization levels 106 of at least non-zero transform coefficients in the encoded set 100 of transform coefficients, wherein the decoder is configured to context-adaptively decode quantization levels 106 using a first set 110 of quantization levels of non-zero transform coefficients at a first terminating coefficient position 98 or a second terminating coefficient position 104 in context 112, the first set 110 being disjoint from a second set 110 of any other non-zero transform coefficients in the encoded set 100 of transform coefficients in context 112.
[0216] According to one embodiment, the decoder can be configured to decode an indication 114 of a termination coefficient position from the data stream 14, where the last non-zero transform coefficient is located when traversing the scan pattern 94 along the forward direction 116, wherein the predetermined direction 102 is the reverse direction 118, the first termination coefficient position is the termination coefficient position indicated by the indication 114, and the second termination coefficient position 104 is the coefficient position most recently traversed along the scan path 94 in the reverse direction 118.
[0217] According to a further implementation, the decoder can be configured to use a first set of contexts for the non-zero transform coefficients at the first termination coefficient position 98.
[0218] According to a further implementation, the decoder can be configured to use a first set of contexts for non-zero transform coefficients at the second termination coefficient position.
[0219] According to a further embodiment, the decoder can be configured to: use a first set of context for non-zero transform coefficients at a first termination coefficient position 98, and use a third set of context that does not intersect with the first set for non-zero transform coefficients at a second termination coefficient position 98, wherein the first set and the third set do not intersect with a second set of any non-zero transform coefficients located along the scan pattern between the first termination coefficient position and the second termination coefficient position in the encoded set of context used for transform coefficients.
[0220] According to a further embodiment, the decoder enables the first set to be non-intersecting with the second set of non-zero transform coefficients in the context for the coefficient positions immediately following the first termination coefficient position 98 and immediately preceding the second termination coefficient position 104 along the scan pattern 94 in the reverse direction 118.
[0221] According to a further implementation, disjointness may be independent of the first termination coefficient position 98.
[0222] According to a further embodiment, the decoder can be configured to: for each partition (sub-block) in the partitions 120 into which the transform coefficient block 92 is subdivided, use a set in the context that does not intersect with the first set to context-adaptively perform entropy decoding 116 on the quantization level of the other non-zero transform coefficients of the transform coefficient block 92.
[0223] According to a further embodiment, the partitions 120 into which the transform coefficient block is subdivided can extend diagonally along a direction inclined to the diagonal 122 of the transform coefficient block 92, which passes through the second termination coefficient position (e.g., the DC position).
[0224] According to another embodiment, an encoder for encoding an image into a data stream can be configured to: adaptively entropy encode the quantization level of the currently encoded transform coefficients of the transform coefficient block 92 representing the block 84 of the image 12, using a context determined by the sum of one or more previously encoded transform coefficients and the number of valid transform coefficients among the one or more previously encoded transform coefficients, the one or more previously encoded transform coefficients being located at positions determined by the local template 132 located on the currently encoded transform coefficients.
[0225] According to one implementation, the encoder can be configured to determine the context by forming a difference between a first value determined based on the sum and a second value determined based on the quantity.
[0226] According to a further implementation, the encoder can be configured to entropy encode the quantization level using context-adaptive binary arithmetic coding (which involves unary codes) of the binary value of the quantization level, wherein the context is used for segments of the unary codes.
[0227] According to a further embodiment, a decoder for decoding an image from a data stream can be configured to: adaptively entropy decode the quantization level of the currently decoded transform coefficients of the transform coefficient block 92 representing block 84 of image 12, using a context determined based on the sum of one or more previously decoded transform coefficients and / or the number of valid transform coefficients among one or more previously decoded transform coefficients, the one or more previously decoded transform coefficients being located at a position determined by a local template 132 located on the currently decoded transform coefficients.
[0228] According to one implementation, the decoder can be configured to determine the context by forming a difference between a first value determined based on the sum and a second value determined based on the quantity.
[0229] According to a further implementation, the decoder can be configured to entropy decode the quantization level using a context-adaptive binary arithmetic code (which involves unary codes) that binarizes the absolute value of the quantization level, where the context is used for segments of the unary codes.
[0230] According to another embodiment, an encoder for encoding an image into a data stream can be configured to encode a transform coefficient block 92 representing a block 84 of an image 12 into a data stream by encoding the absolute value of the quantization level of the currently encoded transform coefficients of the transform coefficient block in a manner using binarization 161. The binarization 161 is parameterized using binarization parameters [e.g., cutoff value; exponential Golomb order or Rice parameter], the settings of which are based on the sum of one or more previously encoded transform coefficients and the sum and number of valid transform coefficients among one or more previously encoded transform coefficients, the one or more previously encoded transform coefficients being located at positions determined by a local template 132 located on the currently encoded transform coefficients.
[0231] According to another embodiment, a decoder for decoding an image from a data stream can be configured to decode a block 92 of transform coefficients representing a block 84 of an image 12 from the data stream by decoding the absolute value of the quantization level of the currently decoded transform coefficients of the transform coefficient block in a manner using binarization 161. The binarization 161 is parameterized using binarization parameters [e.g., cutoff value; exponential Golomb order or Rice parameter] set based on the sum of one or more previously decoded transform coefficients and the sum and number of valid transform coefficients among one or more previously decoded transform coefficients, the one or more previously decoded transform coefficients being located at positions determined by a local template 132 located on the currently decoded transform coefficients.
[0232] According to another embodiment, an encoder for encoding an image into a data stream can be configured to: encode the absolute value of the quantization level 106 of the transform coefficients of a transform coefficient block by binarizing it with unary code 160 and non-unary code 162; encode a transform coefficient block 92 into the data stream by sequentially traversing a scan pattern 94 of the transform coefficients of the transform coefficient block, the transform coefficient block 92 representing block 84 of image 12, unary code 160 being below the cutoff value 164, non-unary code 162 being above the cutoff value and prefixed with unary code 160 for the cutoff value; and adaptively change the cutoff value of the transform coefficients for the transform coefficient block according to the previously encoded transform coefficients (compared to the absence of an initial cutoff value setting in claims 41 to 60).
[0233] According to another embodiment, a decoder for decoding an image from a data stream can be configured to: decode the absolute value of the quantization level 106 of the transform coefficients of a transform coefficient block by binarizing the transform coefficients with unary code 160 and non-unary code 162; decode the transform coefficient block 92 from the data stream by using a scan pattern 94 that sequentially traverses the transform coefficients of the transform coefficient block, wherein the unary code 160 of the transform coefficient block representing the block 84 of the image 12 is below the cutoff value 164, the non-unary code 162 is above the cutoff value and prefixed with the unary code 160 for the cutoff value; and adaptively change the cutoff value of the transform coefficients for the transform coefficient block according to the previously decoded transform coefficients (compared to the absence of an initial cutoff value setting in claims 41 to 60).
[0234] According to another embodiment, an encoder for encoding an image into a data stream can be configured to: encode a transform coefficient block 92 into the data stream by encoding the absolute values of the quantization level 106 of the transform coefficients of the transform coefficient block in a binarized manner with unary code 160 and non-unary code 162, the transform coefficient block representing block 84 of image 12, the unary code 160 being below the cutoff value [i.e., for absolute values below the cutoff value], the non-unary code 162 being above the cutoff value and prefixed with the unary code 160 used for the cutoff value, and the cutoff value 164 being set [e.g., initially] according to one or more of the following: the size of block 84, the color components of block 84, the prediction mode performed on the prediction signal (predicted by the predictor of block 84). The parameters include: the prediction residual (measurement mode), the transformation performed on the transform coefficient block 92, the quantization parameters used to quantize the transform coefficient block 92, the energy measurement of the previously encoded transform coefficients, and the evaluation of the previously encoded transform coefficients, which are located at positions determined by the local template 132 located on the currently encoded transform coefficients, or at positions in the transform coefficient block 92 that are offset from the current partition where the currently encoded transform coefficients are located and within the partition before the current partition according to the encoding order, which is used to encode the absolute values of the quantization level 106 of the transform coefficients of the transform coefficient block, and the encoding order is defined by traversing the transform coefficients of the transform coefficient block along the scan pattern in a predetermined direction 102.
[0235] According to one implementation, the encoder can be configured to: adaptively change the cutoff value of the transform coefficients for the transform coefficient block based on the previously encoded transform coefficients if the cutoff value is initially set to a value below a predetermined threshold [meaning finer quantization]; and keep the cutoff value 164 constant at least initially [e.g., until the last partition in the sequential direction 102 is reached] if the cutoff value is initially set to a value above the predetermined threshold [meaning coarser quantization].
[0236] According to a further embodiment, the encoder can adaptively change the cutoff value of the transform coefficients used for the current encoding based on the sum of one or more previously encoded transform coefficients and the number of valid transform coefficients among one or more previously encoded transform coefficients, the one or more previously encoded transform coefficients being located at positions determined by the local template 132 located at the transform coefficients of the current encoding.
[0237] According to a further embodiment, the encoder can be configured to: for each partition in which the transform coefficient block is subdivided, use a set of contexts associated with the corresponding partition, the context adaptively entropy-encoding one or more segments of the unary code, wherein the encoder is configured to: perform the setting of predetermined partitions in a manner dependent on the evaluation of previously encoded transform coefficients, the previously encoded transform coefficients being located in partitions preceding the predetermined partition when traversed by the encoding order.
[0238] According to a further embodiment, the encoder can be configured to adaptively change the cutoff value in such a way that there is no unary code when the energy metric of the previously encoded transformed data increases by a specific threshold, including setting the cutoff value to zero.
[0239] According to another embodiment, a decoder for decoding an image from a data stream can be configured to: decode a transform coefficient block 92 from the data stream by decoding the absolute values of the quantization level 106 of the transform coefficients of the transform coefficient block using unary code 160 and non-unary code 162 binarization, the transform coefficient block representing block 84 of image 12, unary code 160 being below a cutoff value [i.e., for absolute values below the cutoff value], and non-unary code 162 being above the cutoff value and prefixed with unary code 160 for the cutoff value, and setting the cutoff value 164 [e.g., initially] according to one or more of the following: the size of block 84, the color components of block 84, the prediction mode performed on the prediction signal (prediction of block 84). The pattern represents the prediction residual), the transformation performed on the transform coefficient block 92, the quantization parameters used to quantize the transform coefficient block 92, the energy measurement of the previously decoded transform coefficients, and the evaluation of the previously decoded transform coefficients, which are located at positions determined by the local template 132 located on the currently decoded transform coefficients, or at positions in the transform coefficient block 92 that are offset from the current partition where the currently decoded transform coefficients are located and within the partition preceding the current partition according to the encoding order used to decode the absolute values of the quantization level 106 of the transform coefficients of the transform coefficient block, and the encoding order is defined by traversing the transform coefficients of the transform coefficient block along the scan pattern in a predetermined direction 102.
[0240] According to one implementation, the decoder can be configured to: adaptively change the cutoff value of the transform coefficients for the transform coefficient block based on the previously decoded transform coefficients if the cutoff value is initially set to a value below a predetermined threshold [meaning finer quantization]; and keep the cutoff value 164 constant at least initially [e.g., until the last partition in the sequential direction 102 is reached] if the cutoff value is initially set to a value above the predetermined threshold [meaning coarser quantization].
[0241] According to a further embodiment, the decoder can be configured to adaptively change the cutoff value of the transform coefficients used for the current encoding based on the sum of one or more previously encoded transform coefficients and the number of valid transform coefficients among one or more previously encoded transform coefficients, the one or more previously encoded transform coefficients being located at positions determined by a local template 132 positioned at the transform coefficients of the current decoding.
[0242] According to a further embodiment, the decoder can be configured to: for each partition in which the transform coefficient block is subdivided, use a set of contexts associated with the corresponding partition, the context adaptively performing entropy decoding on one or more segments of the unary code, wherein the decoder is configured to: perform the setting of predetermined partitions in a manner dependent on the evaluation of previously decoded transform coefficients, the previously decoded transform coefficients being located in partitions preceding the predetermined partition when traversed by the encoding order.
[0243] According to a further embodiment, the decoder can be configured to adaptively change the cutoff value in such a way that there is no unary code when the energy metric of the previously decoded transformed data is increased by a specific threshold, including setting the cutoff value to zero.
[0244] According to another embodiment, an encoder for encoding an image into a data stream can be configured to: use a context determined based on one or more previously encoded transform coefficients, by setting the shape of a local template 132 or disabling the local template 132 [such that template-specific context dependencies are disabled] according to the previously encoded transform coefficients and / or according to one or more of the following: the size of the block 84, the position of the termination coefficient where the last non-zero transform coefficient is located when traversing the scan pattern along the positive direction 116, the transform performed on the transform coefficient block 92, one or more previously encoded transform coefficients located at positions determined by the local template 130 positioned at the currently encoded transform coefficients, or if the local template is disabled, the local template is independent of the previously encoded transform coefficients.
[0245] According to one embodiment, the encoder can be configured to: when setting the shape of a local template according to previously encoded transform coefficients, set the shape of the local template according to one or more previously encoded transform coefficients located at a position determined by a first local primitive template 170, the first local primitive template 170 being positioned at the currently encoded transform coefficient.
[0246] According to a further embodiment, the encoder can be configured to: when setting the shape of a local template according to previously encoded transform coefficients, determine whether the shape of the local template 132 should be the first local template 170 or the second local template 172 based on one or more previously encoded transform coefficients located at a position determined by the first local template 170, the first local template 170 being positioned at the currently encoded transform coefficient, wherein the second local template extends further away from the currently encoded transform coefficient than the first template and includes or excludes the position determined by the first template.
[0247] According to a further embodiment, the encoder can be configured to make a decision based on the sum of one or more previously encoded transform coefficients located at a position determined by the first local primitive template 170, which is positioned at the currently encoded transform coefficient.
[0248] According to a further embodiment, the encoder can be configured to: disable the local template if the cumulative value derived from the previously encoded transform coefficients within the transform coefficient block or the count of previously encoded transform coefficients within the transform coefficient block that are greater than some threshold exceeds a predetermined amount, and / or disable the local template if the count of invalid previously encoded transform coefficients within the transform coefficient block exceeds a predetermined amount.
[0249] According to a further embodiment, the encoder can be configured to determine the context by the sum of one or more previously encoded transform coefficients or the number of valid transform coefficients among one or more previously encoded transform coefficients, wherein one or more previously encoded transform coefficients are located at a position determined by a local template positioned on the currently encoded transform coefficient.
[0250] According to another embodiment, a decoder for decoding an image from a data stream can be configured to: use a context determined based on one or more previously decoded transform coefficients, by setting the shape of a local template 132 or disabling the local template 132 [such that template-specific context dependencies are disabled] according to the previously decoded transform coefficients and / or according to one or more of the following: the size of the block 84, the position of the terminating coefficient where the last non-zero transform coefficient is located when traversing the scan pattern along the positive direction 116, the transform performed on the transform coefficient block 92, one or more previously decoded transform coefficients located at positions determined by the local template 130 positioned on the currently decoded transform coefficients, or if the local template is disabled, the local template is independent of the previously decoded transform coefficients.
[0251] According to one embodiment, the decoder can be configured to: when setting the shape of a local template according to previously decoded transform coefficients, set the shape of the local template according to one or more previously decoded transform coefficients located at a position determined by a first local primitive template 170, the first local primitive template 170 being positioned at the currently decoded transform coefficient 130.
[0252] According to a further embodiment, the decoder can be configured to: when setting the shape of a local template according to previously decoded transform coefficients, determine whether the shape of the local template 132 should be the first local template 170 or the second local template 172 based on one or more previously decoded transform coefficients located at a position determined by the first local template 170, the first local template 170 being positioned at the currently decoded transform coefficient, wherein the second local template extends further away from the currently decoded transform coefficient than the first template and includes or excludes the position determined by the first template.
[0253] According to a further embodiment, the decoder can be configured to make a decision based on the sum of one or more previously decoded transform coefficients located at a position determined by the first local primitive template 170, which is positioned at the currently decoded transform coefficient.
[0254] According to a further embodiment, the decoder can be configured to: disable the local template if the cumulative value derived from the previously decoded transform coefficients within the transform coefficient block or the count of previously decoded transform coefficients within the transform coefficient block that are greater than some threshold exceeds a predetermined amount, and / or disable the local template if the count of invalid previously decoded transform coefficients within the transform coefficient block exceeds a predetermined amount.
[0255] According to a further embodiment, the decoder can be configured to determine the context based on the sum of one or more previously decoded transform coefficients or the number of valid transform coefficients among one or more previously decoded transform coefficients, wherein one or more previously decoded transform coefficients are located at a position determined by a local template positioned on the currently decoded transform coefficient.
[0256] According to another embodiment, an encoder for encoding an image into a data stream can be configured to: encode the transform coefficients 92 of the transform coefficient block 92 representing the image 12 by using a set of contexts associated with the respective partitions of the transform coefficient block to perform entropy encoding of the quantization level 106 of the transform coefficients of the transform coefficient block in an context-adaptive manner, for each partition in which the transform coefficient block is subdivided, wherein the partitions of the transform coefficient block are subdivided into different shapes [i.e. inconsistent with each other], and / or the shape of the partitions depends on a scan pattern, along which entropy encoding of the quantization level of the transform coefficients of the transform coefficient block is performed [and the scan pattern can be signaled in the data stream, or the scan pattern can be inherently determined], and / or the shape of the partitions depends on the size of the block 84, and / or the shape of the partitions depends on explicit partition shape information.
[0257] According to one implementation, the encoder can be configured to: adaptively entropy encode the quantization levels of the transform coefficients of the transform coefficient block sequentially by following a scan pattern, the scan pattern traversing the transform coefficients of the transform coefficient block sequentially in a manner that does not interleave the transform coefficients of different partitions.
[0258] According to a further embodiment, the transform coefficient block is subdivided into partitions that extend diagonally along a direction inclined to the normal, with the normal passing through the DC transform coefficients of the transform coefficient block.
[0259] According to another embodiment, a decoder for decoding an image from a data stream can be configured to: decode the transform coefficients 92 of the transform coefficient block 92 representing the image 12 by using a set of contexts associated with the respective partitions of the transform coefficient block to perform entropy decoding of the quantization level 106 of the transform coefficients of the transform coefficient block in an context-adaptive manner, for each partition in which the transform coefficient block is subdivided, wherein the partitions into which the transform coefficient block is subdivided have different shapes [i.e., inconsistent with each other], and / or the shape of the partitions depends on a scan pattern, along which entropy decoding of the quantization level of the transform coefficients of the transform coefficient block is performed and the scan pattern can be signaled in the data stream, or the scan pattern can be inherently determined], and / or the shape of the partitions depends on the size of the block 84, and / or the shape of the partitions depends on explicit partition shape information.
[0260] According to one implementation, the decoder can be configured to: adaptively and sequentially perform entropy decoding on the quantization levels of the transform coefficients of the transform coefficient block by following a scan pattern that sequentially traverses the transform coefficients of the transform coefficient block in a manner that avoids interleaving the transform coefficients of different partitions.
[0261] According to a further embodiment, the transform coefficient block is subdivided into partitions that extend diagonally along a direction inclined to the normal, with the normal passing through the DC transform coefficients of the transform coefficient block.
[0262] According to another embodiment, an encoder for encoding an image into a data stream can be configured to: encode the transform coefficients of transform coefficient block 92 representing block 84 of image 12 by encoding an indication 150 for each partition in a set of partitions into which the transform coefficient block is subdivided, the indication 150 indicating whether all transform coefficients in the corresponding partition are encoded into the data stream, or indicating whether to skip encoding all transform coefficients in the corresponding partition and all transform coefficients in the corresponding partition are zero; and for each partition indicating that all transform coefficients in the corresponding partition are encoded into the data stream, using a set of contexts associated with the corresponding partition, the contexts adaptively entropy encoding the quantization level of all transform coefficients in the corresponding partition.
[0263] According to one implementation, the encoder can be configured to entropy encode the quantization level of all transform coefficients in a given partition, independent of whether any previously encoded transform coefficients in the given partition are all zero, for each partition in the data stream where the indication indicates that all transform coefficients within the given partition are encoded into the data stream.
[0264] According to a further embodiment, a decoder for decoding an image from a data stream can be configured to: decode the transform coefficients of transform coefficient block 92 representing block 84 of image 12 by encoding an indication 150 for each partition in a set of partitions into which the transform coefficient block is subdivided, the indication 150 indicating whether all transform coefficients in the corresponding partition are decoded from the data stream, or indicating whether decoding of all transform coefficients in the corresponding partition is skipped and all transform coefficients in the corresponding partition are zero; and for each partition where the indication indicates that all transform coefficients in the corresponding partition are decoded from the data stream, using a set of contexts associated with the corresponding partition, the contexts adaptively performing entropy decoding on the quantization level of all transform coefficients in the corresponding partition.
[0265] According to a further embodiment, the decoder can be configured to: for each partition in which the indication indicates that all transform coefficients within the corresponding partition are decoded from the data stream, entropy decode the quantization level of all transform coefficients of the corresponding partition by entropy encoding a flag for the last transform coefficient of the corresponding partition, regardless of whether any previously decoded transform coefficients within the corresponding partition are all zero, the flag indicating whether the last transform coefficient is zero, the last transform coefficient of the corresponding partition being the last decoded transform coefficient among the transform coefficients of the corresponding partition.
[0266] According to another embodiment, an encoder for encoding an image into a data stream can be configured to: encode the partitioning mode of transform coefficient block 92 representing block 84 of image 12 into the data stream by encoding the transform coefficients in the following manner: if the partitioning mode is a first mode [e.g., partitioning to partition 120 is enabled], then for each partition into which the transform coefficient block is subdivided, the context adaptively entropy-encodes the quantization level of the transform coefficients of the transform coefficient block using a set of contexts associated with the corresponding partition; if the partitioning mode is a second mode [e.g., partitioning to partition 120 is disabled], then a global context set is used, and the context adaptively entropy-encodes the quantization level of the transform coefficients of the transform coefficient block (→as claimed in claims 21 to 40, but depending on the mode and having disjointness is merely optional).
[0267] According to one embodiment, the encoder of claim 161 is configured to: if the partitioning mode is a first mode, encode an indication for each partition in the partition set, the indication indicating whether the quantization level of the transform coefficients in the corresponding partition is encoded into the data stream, or indicating whether to skip the encoding of the quantization level of the transform coefficients in the corresponding partition and all transform coefficients in the corresponding partition are zero; and when entropy encoding of the quantization level of the transform coefficients, skip the entropy encoding of the partitions that indicate the skipping of the encoding of the quantization level of the transform coefficients in the partition and all transform coefficients in the partition are zero.
[0268] According to an embodiment, a decoder for decoding an image from a data stream can be configured to: decode the partitioning mode of a transform coefficient block 92 representing a block 84 of an image 12 from the data stream by decoding the transform coefficients in the following manner: if the partitioning mode is a first mode [e.g., partitioning to partition 120 is enabled], then for each partition into which the transform coefficient block is subdivided, the context adaptively performs entropy decoding on the quantization level of the transform coefficients of the transform coefficient block using a set of contexts associated with the corresponding partition; if the partitioning mode is a second mode [e.g., partitioning to partition 120 is disabled], then a global context set is used, and the context adaptively performs entropy decoding on the quantization level of the transform coefficients of the transform coefficient block (→as claimed in claims 21 to 40, but depending on the mode and having disjointness is merely optional; for example, one for the entire block 92).
[0269] According to one implementation, the decoder can be configured to: if the partitioning mode is a first mode, decode an indication for each partition in the partition set, the indication indicating whether to decode the quantization level of the transform coefficients within the corresponding partition from the data stream, or whether to skip decoding the quantization level of the transform coefficients within the corresponding partition and all transform coefficients within the corresponding partition are zero; and when performing entropy decoding on the quantization level of the transform coefficients, skip entropy decoding on partitions whose indication skips decoding the quantization level of the transform coefficients within the partition and all transform coefficients within the partition are zero.
[0270] According to another embodiment, an encoder for encoding an image into a data stream can be configured to: encode a block 92 of transform coefficients representing a block 84 of an image 12 into a data stream 14 using a scan pattern 94', by using a set of contexts 110a, 110b, 110c associated with the corresponding partition 120 for each of the partitions 120a, 120b, 120c into which the transform coefficient block is subdivided, wherein the context adaptively entropy-encodes the quantization level 106 of the transform coefficients of the transform coefficient block.
[0271] According to one implementation, the encoder can be configured such that a set of contexts is associated with both a first partition and a second partition (e.g., 120a or 120c).
[0272] According to a further embodiment, the encoder can be configured to: when performing entropy encoding on the quantization level of the transform coefficients of the transform coefficient block 92 in an context-adaptive manner, determine the context for the currently encoded transform coefficient 130 from a set 110 of contexts 112 associated with the partition (e.g., 120a) where the currently encoded transform coefficient is located, based on one or more previously encoded transform coefficients, the one or more previously encoded transform coefficients being located at positions determined by the local template 132 located on the currently encoded transform coefficient.
[0273] According to a further embodiment, the encoder can be configured to: when performing entropy encoding on the quantization level of the transform coefficients of the transform coefficient block 92 in an context-adaptive manner, determine the context for the currently encoded transform coefficient from a set of contexts associated with the partition where the currently encoded transform coefficient is located, based on one or more previously encoded transform coefficients located at positions determined by the local template 132 located on the currently encoded transform coefficient, regardless of whether these positions are within the partition where the currently encoded transform coefficient is located, and / or determine the context for the currently encoded transform coefficient from a set of contexts associated with the partition where the currently encoded transform coefficient is located, based on a count (in the example figure, example 4) of previously encoded transform coefficients (e.g., transform coefficient 140, shaded within the partition (e.g., 120a) where the currently encoded transform coefficient 130 is located) exceeding one or more specific thresholds.
[0274] According to a further embodiment, the encoder can be configured to: encode an indication 150 for each partition 120a, 120b, 120c in the set of partitions into which the transform coefficient block 92 is subdivided, the indication 150 indicating whether the transform coefficients in the corresponding partition are encoded into the data stream, or indicating whether the encoding of the transform coefficients in the corresponding partition is skipped and all transform coefficients in the corresponding partition are zero; and when entropy encoding is performed on the quantization level of the transform coefficients, skip the entropy encoding for the partitions for which the indication indicates that the encoding of the transform coefficients in the partitions is skipped and all transform coefficients in the partitions are zero.
[0275] According to a further embodiment, the encoder can be configured to: between the quantization levels of the transform coefficients in the partition (e.g., for 1201 and 1203) indicated by the indication, [in the case of CBF being zero, e.g., CBF2 in the example] encode the indication 150 into the data stream by replacing the first encountered transform coefficient in the partition involved by the indication, or [in the case of CBF being 1, e.g., CBF3 in the example] encode the indication 150 into the data stream before the first encountered transform coefficient in the partition involved by the indication.
[0276] According to another embodiment, a decoder for decoding an image from a data stream can be configured to: decode a block 92 representing an image 12 from the data stream 14 using a scan pattern 94' by using a set of contexts 110a, 110b, 110c associated with the corresponding partition 120 for each partition into which the transform coefficient block is subdivided, wherein the context adaptively performs entropy decoding on the quantization level 106 of the transform coefficients of the transform coefficient block, the scan pattern 94' sequentially traversing the transform coefficients 91 of the transform coefficient block, wherein the scan pattern 94' sequentially traverses the transform coefficients 91 of the transform coefficient block 92 in such a manner that at least one transform coefficient of the first partition (e.g., a shaded transform coefficient 91') is traversed between two transform coefficients of the second partition.
[0277] According to one implementation, the decoder can be configured such that a set of contexts is associated with both a first partition and a second partition (e.g., 120a or 120c).
[0278] According to a further embodiment, the decoder can be configured to: when performing entropy decoding of the quantization level of the transform coefficients of the transform coefficient block 92 in an context-adaptive manner, determine the context for the currently encoded transform coefficient 130 from a set 110 of contexts 112 associated with the partition (e.g., 120a) where the currently encoded transform coefficient is located, based on one or more previously encoded transform coefficients, the one or more previously encoded transform coefficients being located at positions determined by the local template 132 located on the currently decoded transform coefficient.
[0279] According to a further embodiment, the decoder can be configured to: when performing entropy decoding of the quantization level of the transform coefficients of the transform coefficient block 92 in an context-adaptive manner, determine the context for the currently decoded transform coefficient from a set of contexts associated with the partition where the currently decoded transform coefficient is located, based on one or more previously decoded transform coefficients located at positions determined by the local template 132 located on the currently decoded transform coefficient, regardless of whether these positions are within the partition where the currently decoded transform coefficient is located, and / or determine the context for the currently decoded transform coefficient from a set of contexts associated with the partition where the currently decoded transform coefficient is located, based on a count (in the example figure, example 4) of previously decoded transform coefficients (e.g., transform coefficient 140, shaded within the partition (e.g., 120a) where the currently decoded transform coefficient 130 is located) exceeding one or more specific thresholds.
[0280] According to a further embodiment, the decoder can be configured to: decode an indication 150 for each partition 120a, 120b, 120c in the set of partitions into which the transform coefficient block 92 is subdivided, the indication 150 indicating whether to decode the transform coefficients within the corresponding partition from the data stream, or indicating whether to skip decoding the transform coefficients within the corresponding partition and all transform coefficients within the corresponding partition are zero; and when performing entropy decoding on the quantization level of the transform coefficients, skip entropy decoding for partitions for which the indication indicates to skip decoding the transform coefficients within the partition and all transform coefficients within the partition are zero.
[0281] According to a further embodiment, the encoder can be configured to: between the quantization levels of the transform coefficients in the partition (e.g., for 1201 and 1203) that the indication indicates for decoding transform coefficients in the corresponding partition from the data stream, [in the case of CBF being zero, e.g., CBF2 in the example] decode the indication 150 from the data stream by replacing the first encountered transform coefficient in the partition to which the indication pertains, or [in the case of CBF being 1, e.g., CBF3 in the example] decode the indication 150 from the data stream before the first encountered transform coefficient in the partition to which the indication pertains.
[0282] Although some aspects have been described in the context of the apparatus, it will be clear that these aspects also represent a description of the corresponding method, wherein a block or device corresponds to a method step or a feature of a method step. Similarly, aspects described in the context of method steps also represent a description of the features of the corresponding block or item or the corresponding apparatus. Some or all of the method steps may be performed by (or using) hardware devices (such as microprocessors, programmable computers, or electronic circuits). In some embodiments, one or more of the most important method steps may be performed by such an apparatus.
[0283] The encoded data stream of the present invention can be stored on a digital storage medium or transmitted on a transmission medium such as a wireless transmission medium or a wired transmission medium (e.g., the Internet).
[0284] Depending on certain implementation requirements, embodiments of the invention can be implemented in hardware or software. Implementation can be performed using a digital storage medium (e.g., floppy disk, DVD, Blu-ray, CD, ROM, PROM, EPROM, EEPROM, or flash memory) on which electronically readable control signals are stored, which cooperate with (or are capable of cooperating with) a programmable computer system to perform the corresponding methods. Therefore, the digital storage medium can be computer-readable.
[0285] Some embodiments of the invention include a data carrier having electronically readable control signals, which is capable of cooperating with a programmable computer system to perform one of the methods described herein.
[0286] Typically, embodiments of the present invention can be implemented as a computer program product having program code operable to perform one of the methods when the computer program product is run on a computer. The program code may, for example, be stored on a machine-readable medium.
[0287] Other embodiments include a computer program stored on a machine-readable medium for performing one of the methods described herein.
[0288] In other words, embodiments of the method of the present invention are therefore computer programs having program code for performing one of the methods described herein when the computer program is run on a computer.
[0289] Therefore, another embodiment of the method of the present invention is a data carrier (or digital storage medium or computer-readable medium) on which a computer program is recorded, the computer program being used to perform one of the methods described herein. The data carrier, digital storage medium, or recording medium is typically tangible and / or non-transitory.
[0290] Therefore, another embodiment of the method of the present invention represents a data stream or signal sequence of a computer program used to perform one of the methods described herein. The data stream or signal sequence may, for example, be configured to be transmitted via a data communication connection (e.g., via the Internet).
[0291] Another embodiment includes a processing means, such as a computer or a programmable logic device, which is configured or adapted to perform one of the methods described herein.
[0292] Another embodiment includes a computer having a computer program installed thereon for performing one of the methods described herein.
[0293] Another embodiment of the invention includes an apparatus or system configured to transmit a computer program to a receiver (e.g., electronically or optically) for performing one of the methods described herein. The receiver may be, for example, a computer, mobile device, storage device, etc. The apparatus or system may, for example, include a file server for transmitting the computer program to the receiver.
[0294] In some embodiments, a programmable logic device (e.g., a field-programmable gate array) may be used to perform some or all of the functions described herein. In some embodiments, the field-programmable gate array may cooperate with a microprocessor to perform one of the methods described herein. Generally, the methods are preferably performed by any hardware device.
[0295] The apparatus described herein can be implemented using hardware devices, a computer, or a combination of hardware devices and a computer.
[0296] The apparatus described herein, or any component thereof, may be implemented, at least in part, in hardware and / or software.
[0297] The methods described herein can be performed using hardware devices, computers, or a combination of hardware devices and computers.
[0298] The methods or any components of the apparatus described herein may be performed, at least in part, by hardware and / or by software.
[0299] The above embodiments are merely illustrative of the principles of the present invention. It should be understood that modifications and variations of the arrangements and details described herein will be readily apparent to those skilled in the art. Therefore, the invention is intended to be limited only by the scope of the appended claims and not by the specific details given by way of the description and explanation of the embodiments herein.
Claims
1. A video encoder, comprising: The memory is configured to store at least one instruction; as well as A processor, connected to the memory, and configured to execute the at least one instruction stored in the memory to perform the following operations: Entropy encoding is performed on the absolute value of the quantization level of the current transform coefficient at position (xC, yC), wherein the absolute value is encoded using a first binarization and a second binarization, the first binarization comprising a context-adaptive binary arithmetic code segment, and the second binarization comprising an equally probable bypass code segment, wherein the context-adaptive binary arithmetic code segment comprises at least a first segment indicating whether the absolute value of the quantization level of the corresponding transform coefficient is valid, i.e., non-zero; and For the current transform coefficients, the first binarized segment is encoded using a context determined based on the following: The sum of the minimum absolute values of the transform coefficient quantization levels at one or more transform coefficient positions among (xC+1, yC), (xC+2, yC), (xC+1, yC+1), (xC, yC+1), and (xC, yC+2), wherein each of the minimum absolute values of the transform coefficient quantization levels is obtained based on the first binarized encoded segment at the corresponding transform coefficient position.
2. The video encoder according to claim 1, wherein, The context is further determined based on the following: The number of valid transform coefficient quantization levels at one or more transform coefficient positions among (xC+1, yC), (xC+2, yC), (xC+1, yC+1), (xC, yC+1), and (xC, yC+2), i.e., the number of non-zero transform coefficient quantization levels.
3. The video encoder according to claim 2, wherein, The context is determined based on the difference between the sum and the quantity.
4. The video encoder according to claim 1, wherein, The absolute value of the quantization level of the current transform coefficients is encoded in multiple paths of the transform block, wherein the first binarization and the second binarization are encoded in different paths.
5. A video decoder, comprising: The memory is configured to store at least one instruction; as well as A processor, connected to the memory, and configured to execute the at least one instruction stored in the memory to perform the following operations: Determine the absolute value of the quantization level of the current transform coefficient at position (xC, yC), wherein the absolute value is determined based on a first binarization and a second binarization, the first binarization comprising a context-adaptive binary arithmetic code segment, and the second binarization comprising an equal-probability bypass code segment, wherein the context-adaptive binary arithmetic code segment comprises at least a first segment indicating whether the absolute value of the quantization level of the corresponding transform coefficient is valid, i.e., non-zero; and For the current transform coefficients, the first binarized segment is decoded using a context determined based on the following: The sum of the minimum absolute values of the transform coefficient quantization levels at one or more transform coefficient positions among (xC+1, yC), (xC+2, yC), (xC+1, yC+1), (xC, yC+1), and (xC, yC+2), wherein each of the minimum absolute values of the transform coefficient quantization levels is obtained based on the first binarized decoded segment at the corresponding transform coefficient position.
6. The video decoder according to claim 5, wherein, The context is further determined based on the following: The number of valid transform coefficient quantization levels at one or more transform coefficient positions among (xC+1, yC), (xC+2, yC), (xC+1, yC+1), (xC, yC+1), and (xC, yC+2), i.e., the number of non-zero transform coefficient quantization levels.
7. The video decoder according to claim 6, wherein, The context is determined based on the difference between the sum and the quantity.
8. The video decoder according to claim 5, wherein, The absolute value of the quantization level of the current transform coefficient is determined in multiple paths of the transform block, wherein the first binarization and the second binarization are decoded in different paths.
9. A video encoding method, the method comprising: Entropy encoding is performed on the absolute value of the quantization level of the current transform coefficient at position (xC, yC), wherein the absolute value is encoded using a first binarization and a second binarization, the first binarization comprising a context-adaptive binary arithmetic code segment, and the second binarization comprising an equally probable bypass code segment, wherein the context-adaptive binary arithmetic code segment comprises at least a first segment indicating whether the absolute value of the quantization level of the corresponding transform coefficient is valid, i.e., non-zero; and For the current transform coefficients, the first binarized segment is encoded using a context determined based on the following: The sum of the minimum absolute values of the transform coefficient quantization levels at one or more transform coefficient positions among (xC+1, yC), (xC+2, yC), (xC+1, yC+1), (xC, yC+1), and (xC, yC+2), wherein each of the minimum absolute values of the transform coefficient quantization levels is obtained based on the first binarized encoded segment at the corresponding transform coefficient position.
10. The method according to claim 9, wherein, The context is further determined based on the following: The number of valid transform coefficient quantization levels at one or more transform coefficient positions among (xC+1, yC), (xC+2, yC), (xC+1, yC+1), (xC, yC+1), and (xC, yC+2), i.e., the number of non-zero transform coefficient quantization levels.
11. The method according to claim 10, wherein, The context is determined based on the difference between the sum and the quantity.
12. The method according to claim 9, wherein, The absolute value of the quantization level of the current transform coefficients is encoded in multiple paths of the transform block, wherein the first binarization and the second binarization are encoded in different paths.
13. A method for video decoding, the method comprising: Determine the absolute value of the quantization level of the current transform coefficient at position (xC, yC), wherein the absolute value is determined using a first binarization and a second binarization, the first binarization comprising a context-adaptive binary arithmetic code segment, and the second binarization comprising an equal-probability bypass code segment, wherein the context-adaptive binary arithmetic code segment comprises at least a first segment indicating whether the absolute value of the quantization level of the corresponding transform coefficient is valid, i.e., non-zero; and For the current transform coefficients, the first binarized segment is decoded using a context determined based on the following: The sum of the minimum absolute values of the transform coefficient quantization levels at one or more transform coefficient positions among (xC+1, yC), (xC+2, yC), (xC+1, yC+1), (xC, yC+1), and (xC, yC+2), wherein each of the minimum absolute values of the transform coefficient quantization levels is obtained based on the first binarized decoded segment at the corresponding transform coefficient position.
14. The method according to claim 13, wherein, The context is further determined based on the following: The number of valid transform coefficient quantization levels at one or more transform coefficient positions among (xC+1, yC), (xC+2, yC), (xC+1, yC+1), (xC, yC+1), and (xC, yC+2), i.e., the number of non-zero transform coefficient quantization levels.
15. The method according to claim 14, wherein, The context is determined based on the difference between the sum and the quantity.
16. The method according to claim 13, wherein, The absolute value of the quantization level of the current transform coefficient is determined in multiple paths of the transform block, wherein the first binarization and the second binarization are decoded in different paths.