Decoder, encoder, and method for supporting adaptive driven quantization of transform coefficient level
By integrating a framework that supports multiple quantization variations within a single decoder implementation, the challenges of increased complexity and reduced efficiency in existing decoders are addressed, leading to improved coding performance and reduced implementation complexity.
Patent Information
- Application Number
- JP2025000034
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2019-12-20
- Filing Date
- 2025-01-06
- Publication Date
- 2025-04-10
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing decoders face challenges in efficiently supporting multiple variations of dependent quantization, leading to increased implementation complexity and reduced coding efficiency.
The proposed solution integrates a framework that supports multiple variations of independent and dependent quantization, allowing decoders to handle all variations in a single implementation. This is achieved by designing the reconstruction process and transform coefficient level entropy encoding to be independent of the selected quantization variation, with the only dependency being the selection of the state transition table.
This approach reduces the implementation complexity on the decoder side, allowing for efficient support of multiple quantization variations without increasing decoder complexity. It also enables the use of dependent quantization modes with more than four states, improving coding efficiency by achieving denser filling of acceptable reconstruction points in the signal space.
Smart Images

Figure 2025060987000001_ABST
Abstract
Description
[Technical field]
[0001] SUMMARY OF THE PRESENT EMBODIMENTS Embodiments in accordance with the present invention relate to decoders, encoders, and methods for supporting adaptive dependent quantization of transform coefficient levels.
[0002] The invention is applied to a lossy coding of a block of residual samples, which represent the difference between the original block of samples and samples of a prediction signal (which can be obtained by intra- or inter-picture prediction, or by a combination of intra- and inter-picture prediction, or by any other means; in special cases the prediction signal can be set equal to 0).
[0003] The residual block of samples is transformed using a signal transformation. Typically, a linearly separable transform is used (linear means that the transform is linear but can incorporate additional rounding of the transform coefficients). Often, an integer approximation of the DCT-II or an integer approximation of another transform of the DCT / DST family is used. Different transforms can be used in the horizontal or vertical direction. The transform is not limited to a linearly separable transform. Any other transform (linear and non-separable, or non-linear) may be used. In particular, a second-order non-separable transform can be applied to the transform coefficients or to a part of the transform coefficients obtained after the first separable transform. As a result of the signal transformation, a block of transform coefficients is obtained that represents the original block of residual samples in a different signal space. In special cases, the transform can be equal to a discriminant transform (i.e. the block of transform coefficients can be equal to a block of residual samples). The block of transform coefficients is coded using a lossy coding. At the decoder side, the reconstructed block of transform coefficients is inverse transformed so that a reconstructed block of residual samples is obtained. Finally, a reconstructed block of image samples is obtained by adding the prediction signals.
[0004] The present invention describes the concept of lossy coding of blocks of transform coefficients, and in particular a method that allows multiple variants of dependent quantization and adaptive selection of the variant to be applied.
[0005] In this context, dependent quantization refers to a quantization method having the property that, at the encoder side, a block of transform coefficients is mapped to a block of transform coefficient levels (i.e., quantization indexes) that represent the transform coefficients with reduced fidelity. At the decoder side, the quantization indexes are mapped to the reconstructed transform coefficients (which differ from the original transform coefficients due to quantization). In contrast to conventional scalar quantization, the transform coefficients are not quantized independently. Instead, the allowable set of reconstruction levels for one transform coefficient depends on the selected quantization indexes for the other transform coefficients.
[0006] There are several variants of dependent quantization, which mainly differ in the number of possible so-called quantization states. Increasing the number of quantization states usually improves the coding efficiency, but also increases the complexity of the encoder. Therefore, it is reasonable to support several variants of dependent quantization to give the encoder the freedom to choose an appropriate trade-off between coding efficiency and implementation complexity. However, for the decoder, the implementation complexity increases with the number of variants supported for quantization.
[0007] The present invention describes a method to support multiple variants of independent and dependent quantization in a unified framework. The reconstruction process and the entropy coding of the transform coefficient levels are designed in such a way that the decoder can support all variants in a single implementation. The only aspect that depends on the variant selected is the choice of state transition tables. The present invention includes the following aspects: Support two or more variants of dependent quantization in addition to traditional independent quantization In particular, adding a variant of dependency quantization with eight states High level signaling of the quantization method used · A unified process for reconstructing transform coefficient levels from quantization indices · Unified process for entropy coding of quantization indices (including a criterion for the maximum number of context coding bins) Integrated state-dependent context selection for significance flags [Background technology]
[0008] In the following, the concept of dependent quantization of transform coefficient levels and associated entropy coding is described. This description places special emphasis on the design aspects specified in Draft 7 of the Versatile Video Coding Standard (VTM-7). However, it should be noted that multiple variations of this particular design are possible.
[0009] 2.1 Dependent quantization Dependent quantization of transform coefficients refers to the concept that the set of available reconstruction levels of a transform coefficient depends on the selected quantization index of the preceding transform coefficient in the reconstruction order (within the same transform block). Multiple sets of reconstruction levels are predefined, and based on the quantization index of the preceding transform coefficient (in the coding order), one of the predefined sets is selected to reconstruct the current transform coefficient.
[0010] 2.1.1 Set of Reconstruction Levels A set of permissible reconstruction levels for a current transform coefficient is selected (based on the quantization indexes for the preceding transform coefficients in the coding order) from among a set of predefined sets of reconstruction levels (two or more sets). The values of the reconstruction levels in the set of reconstruction levels are parameterized by a block-based quantization parameter. The block-based quantization parameter (QP) determines the quantization step size Δ, and all reconstruction levels (in all sets of reconstruction levels) represent integer multiples of the quantization step size Δ. For a particular transform coefficient t k (k indicates the reconstruction order) for the quantization step size Δ k may not be determined solely by the block quantization parameter QP, but by the specific transform coefficient tk quantization step size Δ k It is also possible that the quantization weighting matrix and the block quantization parameter are determined. Typically, the transform coefficients t k The quantization step size Δ k is the conversion factor t k Weighting factor w k (specified by the quantization weight matrix) and the block quantization step size Δ block (specified by the block quantization parameter), Δ k =w k Δ block It is.
[0011] In VTM-7, the dependent scalar quantization of the transform coefficients uses exactly two different sets of reconstruction levels. k All the reconstruction levels of the two sets for k (determined, at least in part, by a block-based quantization parameter). k Note that t simply represents the scaling factor for acceptable reconstruction values in both sets. k Possible individual quantization step sizes Δ k Except for (and therefore the individual scaling coefficients), the same two sets of reconstruction levels are used for all transform coefficients.
[0012] 1 shows two sets of reconstruction levels, the open and closed circles denote two different subsets within the set of reconstruction levels that can be used to determine the set of reconstruction levels for the next transform coefficient in the reconstruction order. The two sets of rearrangement levels are shown in FIG.
[0013] The reconstruction levels contained in the first quantization set (labeled set 0 in FIG. 1) represent even multiples of the quantization step size. The second quantization set (labeled set 1 in FIG. 1) includes all odd integer multiples of the quantization step size plus reconstruction levels equal to 0.
[0014] Note that both reconstruction sets are symmetric about 0. Reconstruction levels equal to 0 are included in both reconstruction sets, otherwise the reconstruction sets are discontinuous. The union of both reconstruction sets contains all integer multiples of the quantization step size.
[0015] 2.1.2 Reconstruction Level Representation The reconstruction level that the encoder selects from among the allowable reconstruction levels must be indicated in the bitstream. As in conventional independent scalar quantization, this can be achieved using so-called quantization indexes, also referred to as transform coefficient levels. A quantization index (or transform coefficient level) is an integer that uniquely identifies an available reconstruction level in a quantization set (i.e., in a set of reconstruction levels). The quantization index is sent to the decoder as part of the bitstream (using any entropy coding technique). At the decoder side, a reconstructed transform coefficient can be uniquely calculated based on the current set of reconstruction levels (determined by the preceding quantization index in the coding / reconstruction order) and the transmitted quantization index of the current transform coefficient.
[0016] The reconstruction levels in FIG. 1 are labeled with an associated quantization index (the quantization index is given by a number under the circle representing the reconstruction level). A quantization index equal to 0 is assigned to the reconstruction level equal to 0. A quantization index equal to 1 is assigned to the smallest reconstruction level greater than 0, a quantization index equal to 2 is assigned to the next reconstruction level greater than 0 (i.e., the second smallest reconstruction level greater than 0), and so on. Or, in other words, the reconstruction levels greater than 0 are labeled with integers greater than 0 (i.e., 1, 2, 3, etc.) in ascending order of their values. Similarly, a quantization index −1 is assigned to the largest reconstruction level less than 0, a quantization index −2 is assigned to the next (i.e., the second largest) reconstruction level less than 0, and so on. Or, in other words, the reconstruction levels less than 0 are labeled with integers less than 0 (i.e., −1, −2, 3, etc.) in descending order of their values.
[0017] The use of reconstruction levels representing integer multiples of the quantization step size allows a computationally less complex algorithm for the reconstruction of the transform coefficients at the decoder side. This is explained on the basis of the preferred example of FIG. 1 below. The first quantization set includes all even multiples of the quantization step size, and the second quantization set includes all odd multiples of the quantization step size plus a reconstruction level equal to 0 (included in both quantization sets). The reconstruction process of the transform coefficients can be implemented similarly to the algorithm specified in the pseudocode of FIG. 2.
[0018] 2 shows pseudocode illustrating the process of reconstructing transform coefficients, where k represents an index that specifies the reconstruction order of the current transform coefficient, the quantization index of the current transform coefficient is denoted by level[k], and the quantization step size Δ k is denoted by quant_step_size[k], and trec[k] is the reconstructed transform coefficient t' krepresents the value of . The variable setId[k] specifies the set of reconstruction levels to be applied to the current transform coefficient. This is determined based on the preceding transform coefficient in the reconstruction order, and possible values of setId[k] are 0 and 1. The variable n specifies an integer factor of the quantization step size and is given by the selected set of reconstruction levels (i.e., the value of setId[k]) and the transmitted quantization index level[k].
[0019] In the pseudocode in Figure 2, level[k] is the transformation coefficient t k where setId[k] (equal to 0 or 1) specifies the identifier of the current set of reconstruction levels (determined based on the preceding quantization index in the reconstruction order, as explained in more detail below). The variable n represents an integer multiple of the quantization step size given by the quantization index level[k] and the set identifier setId[k]. k If the transform coefficients are coded using the first set of reconstruction levels (setId[k]==0) that contains an even multiple of , then the variable n is twice the transmitted quantization index. If the transform coefficients are coded using the second set of reconstruction levels (setId[k]==1), then there are three cases: (a) if level[k] is equal to 0, then n is also equal to 0, (b) if level[k] is greater than 0, then n is equal to twice the quantization index level[k] minus 1, and (c) if level[k] is less than 0, then n is equal to twice the quantization index level[k] plus 1. This is done by using the sign function This can be specified using TIFF2025060987000002.tif1952.
[0020] Then, when the second quantization set is used, the variable n is equal to twice the quantization index level[k] minus the sign function of the quantization index, sign(level[k]).
[0021] Once the variable n (which specifies the integer factor of the quantization step size) has been determined, the reconstructed transform coefficients t' k n is the quantization step size Δ k is obtained by multiplying with
[0022] FIG. 3 shows pseudocode illustrating an alternative implementation of the pseudocode of FIG. 2. The main change is that the multiplication with the quantization step is expressed using an integer implementation using scale and shift parameters. Typically, the shift parameter (denoted by shift) is constant for the transform block, and only the scale parameter (given by scale[k]) may depend on the position of the transform coefficient. The variable add represents a rounding offset, typically set equal to add=(1<<(shift-1)). Δ k is the nominal quantization step of the transform coefficients, the parameters shift and scale[k] are k ~scale[k] 2 -shift is selected to have
[0023] As mentioned above, the quantization step size Δ k Instead of exact multiplication with k can be obtained by integer approximation. This is shown in the pseudocode of Figure 3. Here, the variable shift represents a bit shift to the right. Its value typically depends only on the quantization parameter for the block (but it is also possible that the shift parameter can be changed for different transform coefficients within a block). The variable scale[k] is the iterative scale of the transform coefficient t k represents a scaling factor for , which in addition to the block quantization parameters can depend, for example, on the corresponding entry of a quantization weighting matrix. The variable add specifies the rounding offset and is typically set equal to add = (1 << (shift - 1)). The integer arithmetic specified in the pseudocode of Figure 3 (last line) is Δ k =scale[k] 2 -shift The quantization step size Δ is given by k Note that this is equivalent to multiplying with
[0024] Another (purely cosmetic) modification of Figure 3 with respect to Figure 2 is that the switching between the two sets of reconstruction levels is implemented using the ternary if-then-else operator (a?b:c) known from programming languages such as the C programming language.
[0025] 2.1.3 Dependent reconstruction of transform coefficients Another important design aspect of dependent scalar quantization is the algorithm used to switch between the defined quantization sets (sets of reconstruction levels). The algorithm used determines the "packing density" that can be achieved in the N-dimensional space of the transform coefficients (and therefore also in the N-dimensional space of the reconstructed samples). A higher packing density ultimately leads to an increase in coding efficiency.
[0026] In VTM-7, the transition between quantization sets (set 0 and set 1) is determined by a state variable (or quantization state). For the first transform coefficient in the reconstruction order, the state variable is set equal to a predefined value. Typically, the predefined value is equal to 0. The state variables for subsequent transform coefficients in the coding order are determined by an update process. The state of a particular transform coefficient depends only on the state of the previous transform coefficient and the value of the previous transform coefficient in the reconstruction order.
[0027] The state variable has four possible values (0,1,2,3). On the one hand, the state variable specifies the quantization set to be used for the current transform coefficients: Quantization set 0 is used only if the state variable is equal to 0 or 1, and quantization set 1 is used only if the state variable is equal to 2 or 3. On the other hand, the state variable also specifies the possible transitions between the quantization sets.
[0028] The state of a particular transform coefficient depends only on the state of the previous transform coefficient in the reconstruction order and a binary function of the value of the previous transform coefficient. The binary function is referred to as a path in the following. In VTM-7, the following state transition table is used, where "path" refers to the binary function of the previous transform coefficient level in the reconstruction order: [Table 1] In VTM-7, the path is given by the parity of the quantization index. If level[k] is the transform coefficient level, then it is path=(level[k]&1) where the operator "&" represents bitwise "and" in two's complement integer arithmetic.
[0029] Alternatively, the path may represent other binary functions of level[k]. As an example, this may specify whether the transform coefficient level is equal to 0 or not. TIFF2025060987000004.tif1359
[0030] The concept of state transitions for dependent scalar quantization allows for a low-complexity implementation for the reconstruction of transform coefficients at the decoder. A preferred example of the reconstruction of transform coefficients of a single transform block is shown in Figure 4 using C-style pseudocode.
[0031] Figure 4 shows pseudocode illustrating the reconstruction process of transform coefficients for a transform block. The array level represents the transmitted transform coefficient levels (quantization indexes) for a transform block, and the array trec represents the corresponding reconstructed transform coefficients. The 2d table state_trans_table specifies the state transition table, and the table setId specifies the quantization set associated with the state. The function path() specifies a binary function of the transform coefficient levels.
[0032] In the pseudocode of FIG. 4, the index k specifies the reconstruction order of the transform coefficients. Note that in the exemplary code, the index k decreases in the reconstruction order. The last transform coefficient has an index equal to k=0. The first index kstart specifies the reconstruction index (or, more precisely, the inverse reconstruction index) of the first reconstructed transform coefficient. The variable kstart can be set equal to the number of transform coefficients in the transform block minus one, or equal to the index of the first non-zero quantization index in the coding / reconstruction order (e.g., if the position of the first non-zero quantization index is transmitted in the applied entropy coding method). In the latter case, all preceding transform coefficients (with index k>kstart) are inferred to be equal to 0. The reconstruction process for each single transform coefficient is the same as in the example of FIG. 3. For the example of FIG. 3, the quantization index is represented by level[k] and the associated reconstructed transform is represented by trec[k]. The state variable is represented by state. The 1d table setId[] specifies the quantization sets associated with different values of the state variables, and the 2d table state_trans_table[][] specifies the state transitions given the current state (first argument) and a path (second argument). As an example, a path may be given by the parity of the quantization index (bitwise and using the operator &), but other concepts are possible. As a further example, a path may specify that a transform coefficient is equal or not equal to 0. Examples of tables in C-style syntax are shown in FIG. 5 (these tables are identical to Table 1).
[0033] 5 shows a state transition table, state_trans_table, and a table, setId, that specifies a quantization set associated with a state. The table given in the C-style syntax represents the table specified in Table 1.
[0034] Instead of using the table state_trans_table[][] to determine the next state, arithmetic operations can be used that yield the same result. Similarly, the table setId[] can also be implemented using arithmetic operations. Or, the combination of a table lookup using the 1d table setId[] and a sign function can be implemented using arithmetic operations.
[0035] 2.2 Entropy coding at the transform coefficient level The main aspect of dependent scalar quantization is that there are different sets of allowable reconstruction levels (also called quantization sets) for a transform coefficient. The quantization set for a current transform coefficient is determined based on the values of the quantization indexes for the preceding transform coefficients. Considering the preferred example of FIG. 1 and comparing the two quantization sets, it is clear that the distance between a reconstruction level equal to 0 and an adjacent reconstruction level is larger for set 0 than for set 1. Thus, the probability of a quantization index equal to 0 is larger when set 0 is used and smaller when set 1 is used. In VTM-7, this effect is exploited in entropy coding by switching the probability model based on the state used for the current quantization index.
[0036] Note that for proper switching of codeword tables or probability models, the paths of all previous quantization indexes (binary functions of the quantization indexes) need to be known when entropy decoding the current quantization index (or the corresponding binary decision of the current quantization index).
[0037] In VTM-7, the quantization indexes are coded using binary arithmetic coding similar to H.264|MPEG-4 AVC or H.265|MPEG-H HEVC. To that end, the non-binary quantization indexes are first mapped to a set of binary decisions (generally called bins).
[0038] 2.2.1 Thresholding The quantization index is transmitted as an absolute value, and as a sign if the absolute value is greater than 0. The sign is transmitted as a single bin, but there are many possibilities for mapping the absolute value to a sequence of binary decisions.
[0039] [Table 2] The magnitude binarization used in VTM-7 is shown in Table 2. The following binary and non-binary syntax elements are transmitted:
[0040] · sig_flag specifies whether the absolute value |q| of the transform coefficient level is greater than 0. If sig_flag is equal to 1, then gt1_flag specifies whether the absolute value |q| of the transform coefficient level is greater than 1. When gt1_flag is equal to 1, par_flag specifies the parity of the absolute value |q| of the transform coefficient level, and gt3_flag specifies whether the absolute value |q| of the transform coefficient level is greater than 3.
[0041] If gt3_flag is equal to 1, the non-binary value rem specifies the remainder of the absolute level |q|. This syntax element is transmitted in the bypass mode of the arithmetic coding engine using Golomb-Rice coding. Syntax elements that are not present are inferred to be equal to 0. At the decoder side, the absolute values of the transform coefficient levels are reconstructed as follows: |q|=sig_flag+gt1_flag+par_flag+2*(gt3_flag+rem)
[0042] For non-zero transform coefficient levels (indicated by sig_flag equal to 1), a sign_flag, which specifies the sign of the transform coefficient level, is further transmitted in bypass mode.
[0043] 2.2.2 Bin Encoding Order and Bypass Mode The transform coefficient level entropy in VTM-7 shares several aspects with that of HEVC, but the present invention also includes the additional aspect that entropy coding is adapted to dependent quantization.
[0044] 6 illustrates signaling (highlighted samples) of the position of the first non-zero quantization index 120 in the coding order. In addition to the position of the first non-zero transform coefficient 120, only the bins of coefficients 122 that follow the first non-zero quantization index 120 in the coding order 102 are transmitted (e.g., samples marked in blue), and coefficients preceding the first non-zero quantization index 120 in the coding order 102 are inferred to be equal to 0 (e.g., samples marked in white).
[0045] Each block of transform coefficients is divided into fixed-size sub-blocks (also called coefficient groups). Typically, the sub-blocks have a size of 4×4 coefficients (see FIG. 6). In some cases, other sizes may be used (e.g., 2×2, 2×4, 4×2, 2×8, or 8×2). Similar to HEVC, the coding of a block of transform coefficients proceeds as follows.
[0046] First, the so-called coded_block_flag is transmitted, which specifies whether there are any non-zero transform coefficient levels in the transform block. If coded_block_flag is equal to 0, all transform coefficient levels are equal to 0 and no further data is transmitted for the transform block. In some cases (e.g. in skip mode), coded_block_flag may not be transmitted explicitly, but is inferred based on other syntax elements.
[0047] If coded_block_flag is equal to 1, then the x and y coordinates of the first significant transform coefficient in coding order are transmitted (this is sometimes called the last significant coefficient, since the actual scanning order specifies scanning from high frequency components to low frequency components).
[0048] Scanning of the transform coefficients proceeds on a sub-block basis (typically 4x4 sub-blocks), with all transform coefficient levels of a sub-block being coded before any transform coefficient levels of any other sub-block are coded. The sub-blocks are processed in a predefined scan order, starting with the sub-block containing the first significant coefficient in the scan order and ending with the sub-block containing the DC coefficient.
[0049] · This syntax includes coded_subblock_flag, which indicates whether the subblock contains any non-zero transform coefficient levels. For the first and last subblock in scan order (i.e., the subblock containing the first significant coefficient in scan order and the subblock containing a DC coefficient), this flag is not sent but is inferred to be equal to 1. When coded_subblock_flag is sent, it is typically sent at the start of a subblock.
[0050] For each subblock with coded_subblock_flag equal to 1, the transform coefficient levels are transmitted in multiple scan passes across the scan positions of the subblock.
[0051] In the following, we first ignore the special aspects (described below): Without these special aspects, the coding of subblocks with coded_subblock_flag equal to 1 proceeds as follows:
[0052] For the first subblock in coding order (i.e., the subblock containing the first significant scan position for which x and y coordinates are explicitly transmitted), coding starts from the scan position firstSigScanIdx of the first non-zero coefficient in the scan order (i.e., the scan position corresponding to the explicitly transmitted x and y coordinates). For all other subblocks, coding starts at the minimum scan index minSubblockScanIdx within the subblock. Scanning ends at the maximum scan index maxSubblockScanIdx within the subblock. In the first pass, the regular coding bins sig_flag, gt1_flag, par_flag, and gt3_flag are transmitted. ○ sig_flag is not sent if it can be assumed to be equal to 1. It can be assumed to be equal to 0 in the following two cases:
[0053] (1) The current scan position is equal to the scan index, startScanIdx, of the first non-zero coefficient in the scan order (i.e., the scan position corresponding to the explicitly transmitted x and y coordinates).
[0054] (2) The current subblock is the subblock for which coded_subblock_flag equal to 1 was sent, the current scan index is the maximum scan index within the subblock, maxSubblockScanIdx, and all sig_flag previously sent for the current subblock are equal to 1.
[0055] o If sig_flag[k] for scan index k is equal to 1 (sent or inferred), then gt1_flag is sent. Otherwise, gt1_flag is inferred to be equal to 0.
[0056] o If gt1_flag[k] for scan index k is equal to 1, then par_flag and gt3_flag are sent. Otherwise, par_flag and gt3_flag are inferred to be equal to 0.
[0057] In the second pass, the remainder value rem is coded for those scan indices for which a gt3_flag equal to 1 was transmitted. For all other scan indices, the remainder rem is presumed to be equal to 0. The remainder value rem is coded using a concatenation of a Rice code and an Exponential-Golomb code parameterized by the so-called Rice parameter. The bins of the corresponding codeword are coded in bypass mode. The Rice parameter is determined based on the syntax elements already coded (see below).
[0058] Finally, in the last pass, for all scan indexes k (encoded or inferred) with sig_flag[k] equal to 1, a sign_flag is transmitted specifying whether the transform coefficient value is negative or positive.
[0059] The following pseudocode further illustrates the encoding process of transform coefficient levels within a subblock. This is shown from the decoder's point of view. The Boolean variable firstSubblock specifies whether the current subblock is the first subblock in coding order (within the transform block). firstSigScanIdx specifies the scan index corresponding to the position of the first significant transform coefficient in the transform block (the one explicitly signaled in the start of transform block syntax). minSubblockScanIdx and maxSubblockScanIdx represent the minimum and maximum scan index values for the current subblock. Note that the first scan index for which any data is transmitted depends on whether the subblock contains the first significant coefficient in the scan order. In this case, the first scan pass starts from the scan index corresponding to the first significant transform coefficient, otherwise the first scan pass starts from the minimum scan index of the subblock. The variable coeff[k] for scan index k represents the reconstructed transform coefficient level. Encoding proceeds similarly to decoding.
[0060] Pseudocode specifying decoding of subblocks with coded_subblock_flag equal to 1 (simplified): startScanIdx = ( firstSubblock ? firstSigScanIdx : minSubblockScanIdx ) endScanIdx = maxSubblockScanIdx / / first pass (regular coded bins) for( k = startScanIdx; k <= endScanIdx; k++ ) { coeff[k] = 0 if( sig_flag cannot be inferred to be equal to 1 ) { decode sig_flag[k] } if( sig_flag[k] != 0 ) { decode gt1_flag[k] if( gt1_flag[k] != 0 ) { decode par_flag[k] decode gt3_flag[k] } coeff[k] = 1 + gt1_flag[k] + par_flag[k] + 2 * gt3_flag[k] } state = stateTransTable[ state ][ coeff[k] & 1 ] } / / second pass (bypass coding of remainder) for( k = startScanIdx; k <= endScanIdx; k++ ) { if( gt3_flag[k] != 0 ) { decode rem[k] coeff[k] = coeff[k] + 2 * rem[k] } } / / third pass (bypass coding of signs) for( k = startScanIdx; k <= endScanIdx; k++ ) { if( coeff[k] != 0 ) { decode sign_flag[k] if( sign_flag[k] == 1 ) coeff[k] = -coeff[k]} }
[0061] One drawback compared to HEVC was that the maximum number of regular coding bins per transform coefficient was increased. To avoid this problem, the following concepts are included in VTM-7: The maximum number of regular coding bins, maxNumRegBins, in a transformation block is maxNumRegBins=1.75*width*height where width and height represent the size of the transform block (or more precisely, the outer non-zero region of the transform block, when the transform coefficients are forced to be equal to 0).
[0062] At the start of a transformation block, a counter remRegBins specifying the available number of regular coding bins is set equal to remRegBins=maxNumRegBins. After a canonical encoded bin is encoded or decoded, the counter remRegBins is decremented by one.
[0063] If at the start of encoding for a scan position in the first pass, the counter is less than 4 (in this case all bins sig_flag, gt1_flag, par_flag and gt3_flag cannot be transmitted without exceeding the maximum number of regular encoding bins), the first pass ends. Furthermore, remainder values are only transmitted for scan positions included in the first pass. Absolute levels for which no data is coded in the first scan pass are fully coded in bypass mode. They are coded using the same class of codes as the remainder rem. The Rice parameter and the variable pos0 are determined based on already coded syntax elements (see below). These absolute levels |q| are not coded directly, but are first mapped to the syntax element abs_level and then coded using the parameter code.
[0064] The mapping of the absolute value |q| to the syntax element abs_level depends on the variable pos0. This is abs_level=(|q|==0?pos0:(|q|<=pos0?|q|-1:|q|) It is specified by On the decoder side, the mapping of the syntax element abs_level to absolute values |q| is specified as follows: |q|=(abs_level==pos0?0:(abs_level <pos0?abs_level+1:abs_level)
[0065] Note that the limit on the number of regular coding bins is applied per transform block, not per subblock. This means that the counter remRegBins is initialized at the beginning of the transform block and is decremented for each regular coding bin. If coding switches to bypass mode for a particular subblock, all transform coefficient levels of all subsequent subblocks in coding order are also coded in bypass mode.
[0066] The encoding process for a sub-block (with coded_subblock_flag equal to 1) is shown in the following pseudocode. As with the previous pseudocode, the encoding process is shown from the decoder's point of view. For the first coded sub-block, the initial value of the counter remRegBins is equal to maxNumRegBins. For all subsequent sub-blocks, the initial value of the counter remRegBins is equal to the value obtained at the end of the previous coded sub-block. The scan index startIdxBypass is the first scan index at which bypass coding (i.e., coding of abs_level) starts within the sub-block (if applicable).
[0067] Pseudocode (114) specifying decoding of subblocks with coded_subblock_flag equal to 1 (with bypass mode): startScanIdx = (firstSubblock ? firstSigScanIdx : minSubblockScanIdx) endScanIdx = maxSubblockScanIdx startIdxBypass = (remRegBins >= 4 ? maxSubblockScanIdx + 1 : startScanIdx) / / first pass (regular coded bins) for( k = startScanIdx; k <= endScanIdx && remRegBins >= 4; k++ ) { coeff[k] = 0 if( sig_flag cannot be inferred to be equal to 1 ) { decode sig_flag[k] remRegBins = remRegBins - 1 } if( sig_flag[k] != 0 ) { decode gt1_flag[k] remRegBins = remRegBins - 1 if( gt1_flag[k] != 0 ) { decode par_flag[k] decode gt3_flag[k] remRegBins = remRegBins - 2 } coeff[k] = 1 + gt1_flag[k] + par_flag[k] + 2 * gt3_flag[k] } if( remRegBins < 4 ) { startIdxBypass = k + 1 } state = stateTransTable[ state ][ coeff[k] & 1 ] } / / second pass (bypass coding of remainder) for( k = startScanIdx; k < startIdxBypass; k++ ) { if( gt3_flag[k] != 0 ) { decode rem[k] coeff[k] = coeff[k] + 2 * rem[k] } } / / third pass (bypass coding of absolute levels) for( k = startIdxBypass; k <= endScanIdx; k++ ) { derive pos0 decode abs_level[k] if( abs_level[k] == pos0 ) coeff[k] = 0 else if ( abs_level[k] < pos0) coeff[k] = abs_level[k] + 1 else coeff[k] = abs_level[k] state = stateTransTable[ state ][ coeff[k] & 1 ] } / / fourth pass (bypass coding of signs) for( k = startScanIdx; k <= endScanIdx; k++ ) { if( coeff[k] != 0 ) { decode sign_flag[k] if( sign_flag[k] == 1 ) coeff[k] = -coeff[k] } }
[0068] 2.2.3 Context Modeling For the regular coding bins sig_flag, gt1_flag, par_flag, and gt3_flag, one of several probability models (or contexts) is selected for the actual coding.
[0069] 7 shows a local template used to select a probability model for one or more bins. The black square 130 represents the current scan position, and the highlighted samples 132 (e.g., blue squares) represent adjacent scan positions within the template.
[0070] 2.2.3.1 Significance Flag sig_flag For the significance flag, the probability model selected depends on: Whether the current transform block is a luma transform block or a chroma transform block ·Dependent quantization state The x and y coordinates of the current conversion factor Partially reconstructed absolute values (after the first pass) in a local neighborhood
[0071] This is explained in more detail below. The variable state represents the state of the current transform coefficient used in the dependent quantization. The state can take the values 0, 1, 2, or 3. Initially, the state is set equal to 0. As explained above, the state of the current transform coefficient is given by the state of the previous coefficient in the coding order and the parity (or, more generally, a binary function) of the previous transform coefficient level.
[0072] If x and y are the coordinates of the current transform coefficient in the transform block, then let diag=x+y be the diagonal position of the current coefficient. Given the diagonal position, the diagonal class index dsig is derived as follows: dsig=(diag<2?2:(diag<5?1:0)) (for luma transform block) and dsig=(diag<2?1:0) (for chroma conversion block) The ternary operator (c?a:b) represents an if-then-else statement: if the condition c is true, the value of a is used, otherwise (c is false), the value of b is used.
[0073] The context also depends on the partially reconstructed absolute values within a local neighborhood. In VTM-7, the local neighborhood is given by the template T shown in Figure 7. However, other templates are possible. The template used may also depend on whether a luma or a chroma block is coded. Let sumAbs be the sum of the partial reconstructed absolute values within a local neighborhood. In VTM-7, the local neighborhood is given by the template T shown in Figure 7. However, other templates are possible. The template used may also depend on whether a luma or a chroma block is coded. TIFF2025060987000006.tif1344
[0074] where abs1[k] represents the partially reconstructed absolute level for scan index k after the first pass. For VTM-7 binarization, abs1[k]=sig_flag[k]+gt1_flag[k]+par_flag[k]+2*gt3_flag[k] is given by: Note that abs1[k] is equal to the value coeff[k] obtained after the first scanning pass (see above).
[0075] Assume that the possible probability models of sig_flag are organized in a 1d array. Let ctxIdSig be the index that identifies the probability model to be used. According to VTM-7, the context index ctxIdSig can be derived as follows: If the transform block is a luma block, ctxIdSig=min((sumAbs+1)>>1,3)+4*dsig+12*min(state-1,0) If the transformation block is a chroma block, ctxIdSig=36+min((sumAbs+1)>>1,3)+4*dsig+8*min(state-1,0) Here, the operator ">>" represents a bit shift to the right (two's complement arithmetic). The operation is equivalent to dividing by 2 and truncating the result (to the next integer).
[0076] It should be noted that other organisations of context models are possible, but in any case the probability model chosen to code sig_flag depends on: Whether luma blocks or chroma blocks are coded · State variables, specifically min(state-1,0) ·Diagonal class dsig The sum of the partially reconstructed absolute values in the local template (after the first pass), specifically min((sumAbs+1)>>1,3)
[0077] 2.2.3.2 Flags gt1_flag, par_flag, gt3_flag For the flags gt1_flag, par_flag, and gt3_flag, the probability model selected depends on the following: Whether the current transform block is a luma transform block or a chroma transform block Whether the current transform coefficient is the first non-zero coefficient in coding order within the transform block The x and y coordinates of the current conversion factor Partially reconstructed absolute values (after the first pass) in a local neighborhood Let firstCoeff be a variable that indicates whether the current scan index represents the scan index of the first non-zero transform coefficient level in coding order (i.e., the scan index or one whose x and y positions are explicitly coded). If the current scan index is equal to the scan index of the first non-zero transform coefficient level, then firstCoeff is equal to 1; otherwise, firstCoeff is equal to 0.
[0078] If x and y are the coordinates of the current transform coefficient in the transform block, then let diag=x+y be the diagonal position of the current coefficient. Given the diagonal position, the diagonal class index dclass is derived as follows: dclass=(diag==0?3:(diag<3?2:(diag<10?1:0))) (for luma transform block) and dclass=(diag==0?1:0) (for chroma conversion block)
[0079] The context also depends on the partially reconstructed absolute values in the local neighborhood. The variable sumAbs is derived as described above. In addition, a variable numSig is derived that specifies the number of non-zero transform coefficient levels in the template T. numSig=Σ k∈T sig_flag[k]
[0080] As with sig_flag, we assume that the possible probability models are organized in a 1d array. Let ctxId be the index that identifies the probability model to be used. According to VTM-7, the context index ctxId can be derived as follows: If the transform block is a luma block, ctxId=(firstCoeff?0:1+min(sumAbs-numSig,4)+5*dclass) If the transformation block is a chroma block, ctxId=21+(firstCoeff?0:1+min(sumAbs-numSig,4)+5*dclass)
[0081] It should be noted that other organisations of the context models are possible, but in any case the probability model chosen depends on: Whether luma blocks or chroma blocks are coded Whether the current scan index is the scan index of the first non-zero transform coefficient level in coding order · Diagonal class dclass The difference between the sum of the partially reconstructed absolute values (after the first pass) in the local template and the number of non-zero transform coefficient levels in the local template, specifically min(sumAbs-numSig,4)
[0082] Note that the same context index, ctxId, is used for gt1_flag, par_flag, and gt3_flag, but a different set of context models is used for each of these flags.
[0083] 2.2.3.3 Rice parameters for residue and bypass coded transform coefficient levels Both the remainder rem and the absolute value abs_level are coded using a parametric class of codes in which the bins are coded in bypass mode (see above). The actual binarization used is determined by the so-called Rice parameter RP. Furthermore, for the absolute level abs_level, the variable pos0 determines the mapping from the coding syntax element abs_level to the actual absolute value.
[0084] The Rice parameters of the remainder RPrem are derived based on the sum of the reconstructed absolute values in a local template. In VTM-7, the same template as above is used. If T represents the template and coeff[k] represents the reconstructed coefficient for scan index k, the sum sumAbs is derived according to: TIFF2025060987000007.tif1355
[0085] Note that the fully reconstructed transform coefficient values coeff[k] are used. Let tabRPrem[] be a fixed table of size 32. The Rice parameter RPrem is derived according to:
[0086] RPrem=tabRPrem[max(min(sumAbs-20,31),0)] Let tabRPabs[] be another fixed table of size 32. The Rice parameter RPabs used to encode abs_level is derived according to: RPabs=tabRPabs[min(sumAbs,31)]
[0087] The variable pos0 depends on both the reconstructed sum of absolute values in the local template and the state variables: The variable pos0 is derived from the quantized state and the Rice parameters RPabs according to: pos0=(state<2?1:2)< <RPabs.
[0088] 2.3 High-level signaling of quantization methods VTM-7 supports dependent quantization with four states, and also supports conventional independent scalar quantization. The quantization method selected by the encoder is indicated in the bitstream as follows:
[0089] The picture header includes a syntax element pic_dep_quant_enabled_flag, which is coded using a single bit and indicates whether or not dependent quantization is used for the current picture. If pic_dep_quant_enabled_flag is equal to 0, conventional independent quantization is used for the current picture. If pic_dep_quant_enabled_flag is equal to 1, the specified variant of dependent quantization is used for the current picture.
[0090] The picture header syntax element is not always present in the picture header. Its presence is controlled by another syntax element coded in the picture parameter set. The picture parameter set contains the syntax element pps_dep_quant_enabled_idc, which is coded using a 2-bit fixed length code and has the following meaning:
[0091] A value of 0 specifies that pic_dep_quant_enabled_flag is present in the picture header. A value of 1 specifies that pic_dep_quant_enabled_flag is not present in the picture header but is inferred to be equal to 0 for all pictures that reference the picture parameter set.
[0092] A value of 2 specifies that pic_dep_quant_enabled_flag is not present in the picture header but is inferred to be equal to 1 for all pictures that reference the picture parameter set. The value 3 is reserved for future use.
[0093] The pps_dep_quant_enabled_idc in a picture parameter set is present if the picture parameter set flag constant_slice_header_params_enabled_flag is equal to 1. If the picture parameter set flag constant_slice_header_params_enabled_flag is equal to 0, the picture parameter set syntax element pps_dep_quant_enabled_idc is not present in the picture parameter set, but is inferred to be equal to 0 (in this case pic_dep_quant_enabled_flag is coded in the picture header). Summary of the Invention [Problem to be solved by the invention]
[0094] It is therefore desirable to provide a concept for rendering picture coding and / or video coding more efficiently in order to support adaptive dependent quantization of transform coefficient levels. Additionally or alternatively, it is desirable to reduce the bitstream and thus the signaling costs. [Means for solving the problem]
[0095] This is achieved by the subject matter of the independent claims of the present application. Further embodiments according to the invention are defined by the subject matter of the dependent claims of the present application.
[0096] According to a first aspect of the present invention, the inventors of the present application have recognized that one problem encountered when trying to use dependent quantization / dequantization of transform coefficient levels arises from the fact that a high implementation complexity is involved in providing multiple dependent quantization / dequantization modes. According to a first aspect of the present application, this difficulty is overcome by integrating the framework of independent quantization / dequantization with multiple variants of dependent quantization / dequantization. The inventors have found that it is advantageous to select a quantizer that does not depend on the quantization mode information. The only aspect that depends on the quantization mode information is the update of the current transition state, e.g. the selection of a transition table that can be used for updating. This is based on the idea that a unified process for all supported quantization modes brings little additional implementation complexity on the decoder side compared to supporting a single quantization mode. However, if different methods need to be supported, the complexity of the decoder increases. Thus, the use of different quantization modes is made possible, which gives the encoder the freedom to select the variant that provides the most appropriate tradeoff between coding efficiency and implementation complexity for its application area. Furthermore, the selection of the quantizer independent of the quantization mode allows the use of dependent quantization modes with more than four transition states in the encoder / decoder, thereby increasing the coding efficiency since a denser packing of the allowable reconstruction points in the N-dimensional signal space is achieved.
[0097] Thus, according to a first aspect of the present application, the decoder is configured to sequentially dequantize the residual levels by decoding from the data stream residual levels representing prediction residuals, selecting a quantizer from a set of default quantizers depending on a current transition state, dequantizing the current residual level using the quantizer to obtain a dequantized residual value, applying a binary function to the current residual level to obtain a characteristic of the current residual level, for example parity, and updating the current transition state depending on the characteristic of the current residual level using the transition table used. The dequantization of the residual levels is performed sequentially, which means, for example, that the above-mentioned dequantization steps are performed in a loop until all residual values are dequantized, so that the update of the current transition state can be understood as either the first or the last step in the sequence. The step of updating the current transition state connects successive dequantizations of the residual levels, for example the dequantization of the previous residual level is connected with the dequantization of the current residual level by the update of the current transition state. Furthermore, for example in the case of the inverse quantization of the first residual level, the current transition state may be set to a default / predetermined state, e.g. 0, and this current transition state is updated depending on the characteristics of the current residual level, i.e. the characteristics of the first residual level, e.g. using a transition table used to initialize the sequential inverse quantization of the residual levels. The decoder is configured to reconstruct the media signal using the inverse quantized residual values. Furthermore, the decoder is configured to select one default transition table from a set of default transition tables as the transition table to be used depending on the quantization mode information included in the data stream, each of the default transition tables representing a surjective mapping from a domain of a combination of the set of one or more transition states and the characteristics of the current residual level to the set of one or more transition states, the default transition tables having different cardinality of the set of one or more transition states. The surjective mapping e.g. maps an element of the set of one or more transition states, i.e. a transition state, to an element of the set of one or more transition states, i.e. a transition state. Both the domain and the domain for the surjective mapping e.g. relate to the same set of one or more transition states.This selection of the transition table to be used may for example be performed for each residual level in updating the current transition state, or for each transform block comprising multiple residual levels, or may be performed picture by picture. Furthermore, the decoder is configured to perform the quantizer selection by mapping a predetermined number of bits of the current transition state to a default quantizer using a first mapping, whatever the default transition table is selected as the transition table to be used, the predetermined number and the first mapping being equal whatever the default transition table is selected as the transition table to be used. The predetermined number of bits represents a number of one or more predetermined bit positions, such as for example a bit in the LSB or the second but last significant bit position.
[0098] Thus, according to a first aspect of the present application, the decoder is configured to sequentially dequantize the residual levels by decoding residual levels representing prediction residuals from the data stream, selecting a quantizer from a set of default quantizers depending on a current transition state, dequantizing the current residual level using the quantizer to obtain a dequantized residual value, and updating the current transition state depending on characteristics of the current residual level, e.g. obtained by applying a binary function to the parity, and depending on quantization mode information included in the data stream. As mentioned above, the dequantization of the residual levels is performed sequentially, which means, for example, that the above-mentioned dequantization steps are performed in a loop until all residual values are quantized, so that the update of the current transition state can be understood as either the first or the last step in the sequence. The step of updating the current transition state connects successive dequantizations of the residual levels, e.g. the dequantization of the previous residual level is connected with the dequantization of the current residual level by the update of the current transition state. Furthermore, for example, in the case of the inverse quantization of the first residual level, the current transition state may be set to a default / predetermined state, e.g., 0, and this current transition state is updated depending on the characteristics of the current residual level, i.e., the characteristics of the first residual level, for example, to initialize the sequential inverse quantization of the residual levels. The current transition state, for example, when updated, transitions from a domain of a combination of the set of one or more transition states and the characteristics of the current residual level to a set of one or more transition states according to a bijective mapping that depends on the quantization mode information, the cardinality of the set of one or more transition states being different depending on the quantization mode information. Whatever the quantization mode information, for example, irrespective of or independent of the quantization mode information, the decoder is configured to perform the quantizer selection by mapping a predetermined number of bits of the current transition state (e.g., one or more bits in one or more predetermined bit positions, such as LSBs, or a bit in the second but last significant bit position) to a default quantizer using a first mapping, the predetermined number and the first mapping being equal whatever the quantization mode information.Furthermore, the decoder is configured to reconstruct the media signal using the dequantized residual values.
[0099] Thus, according to a first aspect of the present application, the encoder is configured to predictively encode the media signal to obtain a residual signal, and sequentially quantize the residual values representing the residual signal to obtain a residual level, by selecting a quantizer from a set of default quantizers depending on a current transition state, quantizing the current residual value using the quantizer to obtain a current residual level, applying a binary function to the current residual level to obtain a characteristic of the current residual level, e.g. parity, and updating the current transition state depending on a characteristic of the current residual level using the transition table used. The quantization of the residual levels is performed sequentially, which means, for example, that the above-mentioned quantization steps are performed in a loop until all residual values are quantized, so that the update of the current transition state can be understood as either the first or the last step in the sequence. The step of updating the current transition state connects successive quantizations of the residual levels, e.g. the quantization of the previous residual level is connected with the quantization of the current residual level by the update of the current transition state. Furthermore, for example, in case of quantization of the first residual level, the current transition state may be set to a default / predetermined state, e.g. 0, and this current transition state is updated depending on the characteristics of the current residual level, i.e. the characteristics of the first residual level, e.g. using a transition table used to initialize the sequential quantization of the residual levels. The encoder is configured to encode the residual levels into the data stream. Furthermore, depending on the quantization mode information transmitted to the data stream, the encoder is configured to select one default transition table from a set of default transition tables as the transition table to be used, each of the default transition tables representing a surjective mapping from a domain of a combination of the set of one or more transition states and the characteristics of the current residual level to the set of one or more transition states, the default transition tables having different cardinality of the set of one or more transition states. The surjective mapping e.g. maps an element of the set of one or more transition states, i.e. a transition state, to an element of the set of one or more transition states, i.e. a transition state. Both the domain and the domain for the surjective mapping e.g. relate to the same set of one or more transition states.This selection of the transition table to be used may be performed, for example, for each residual level in an update of the current transition state, for each transform block comprising multiple residual levels, or on a picture-by-picture basis. Furthermore, the encoder is configured to perform the quantizer selection by mapping a predetermined number of bits of the current transition state to a default quantizer using a first mapping, whatever the default transition table is selected as the transition table to be used, the predetermined number and the first mapping being equal, whatever the default transition table is selected as the transition table to be used. The predetermined number of bits represents a number of one or more predetermined bit positions, such as, for example, a bit in the LSB or the second but last significant bit position.
[0100] Thus, according to a first aspect of the present application, the encoder is configured to predictively code the media signal to obtain a residual signal, and to sequentially quantize the residual values representing the residual signal to obtain a residual level, by selecting a quantizer from a set of default quantizers depending on a current transition state, quantizing the current residual value using the quantizer to obtain a current residual level, and updating the current transition state depending on characteristics of the current residual level, e.g. obtained by applying a binary function to the parity, and depending on quantization mode information transmitted in the data stream. As mentioned above, the quantization of the residual levels is performed sequentially, which means, for example, that the above-mentioned quantization steps are performed in a loop until all residual values are quantized, so that the update of the current transition state can be understood as either the first or the last step in the sequence. The step of updating the current transition state connects successive quantizations of the residual levels, e.g. the quantization of the previous residual level is connected with the quantization of the current residual level by the update of the current transition state. Furthermore, for example, in case of quantization of the first residual level, the current transition state may be set to a default / predetermined state, e.g., 0, and this current transition state is updated depending on the characteristics of the current residual level, i.e., the characteristics of the first residual level, for example, to initialize the sequential quantization of the residual levels. The current transition state, for example, when updated, transitions from a domain of a combination of the set of one or more transition states and the characteristics of the current residual level to a set of one or more transition states according to a bijective mapping that depends on the quantization mode information, the cardinality of the set of one or more transition states being different depending on the quantization mode information. Whatever the quantization mode information, for example, irrespective of or independent of the quantization mode information, the decoder is configured to perform the quantizer selection by mapping a predetermined number of bits of the current transition state (e.g., one or more bits in one or more predetermined bit positions, such as LSBs, or a bit in the second but last significant bit position) to a default quantizer using a first mapping, the predetermined number and the first mapping being equal whatever the quantization mode information.In addition, the encoder is configured to encode the residual level into the data stream.
[0101] Thus, according to a first aspect of the present application, the method comprises: decoding residual levels representing prediction residuals from a data stream; sequentially dequantizing the residual levels by selecting a quantizer from a set of default quantizers depending on a current transition state; dequantizing the current residual level using the quantizer to obtain a dequantized residual value; and updating the current transition state depending on a characteristic of the current residual level, e.g. obtained by applying a binary function to the current residual level, e.g. a parity, and depending on quantization mode information included in the data stream. Furthermore, the method comprises reconstructing a media signal using the dequantized residual value. The current transition state transitions from a domain of a combination of the set of one or more transition states and the characteristic of the current residual level to a set of one or more transition states according to a bijective mapping depending on the quantization mode information, the cardinality of the set of one or more transition states being different depending on the quantization mode information. Further, the method includes performing quantizer selection by mapping a predetermined number of bits of the current transition state (e.g., one or more bits in one or more predetermined bit positions, such as LSBs, or a bit in a second but last significant bit position) to a default quantizer using a first mapping whatever the quantization mode information is, e.g., regardless or independent of the quantization mode information, where the predetermined number and the first mapping are equal whatever the quantization mode information is.
[0102] Thus, according to a first aspect of the present application, the method includes predictively encoding a media signal to obtain a residual signal, and sequentially quantizing the residual values representing the residual signal to obtain the residual level, by selecting a quantizer from a set of default quantizers in response to a current transition state, quantizing the current residual value using the quantizer to obtain a current residual level, and updating the current transition state in response to a characteristic of the current residual level, e.g. obtained by applying a binary function to the current residual level, e.g. a parity, and in response to quantization mode information transmitted in the data stream. Furthermore, the method includes encoding the residual level into the data stream. The current transition state transitions from a domain of a combination of the set of one or more transition states and the characteristic of the current residual level to a set of one or more transition states according to a bijective mapping that depends on the quantization mode information, the cardinality of the set of one or more transition states being different in response to the quantization mode information. Further, the method includes performing quantizer selection by mapping a predetermined number of bits of the current transition state (e.g., one or more bits in one or more predetermined bit positions, such as LSBs, or a bit in a second but last significant bit position) to a default quantizer using a first mapping whatever the quantization mode information is, e.g., regardless or independent of the quantization mode information, where the predetermined number and the first mapping are equal whatever the quantization mode information is.
[0103] The above method is based on the same considerations as the above encoder / decoder: the method can be completed using all the features and functions that are also described for the encoder / decoder. One embodiment relates to a data stream comprising pictures or video encoded using the encoding method described herein. An embodiment relates to a computer program having a program code for performing the methods described herein, when the computer program runs on a computer.
[0104] The drawings are not necessarily to scale. Instead, emphasis is generally placed upon illustrating the principles of the invention. In the following description, various embodiments of the invention are described with reference to the following drawings, in which: [Brief description of the drawings]
[0105] [Figure 1] FIG. 2 illustrates two different quantizers. [Diagram 2] 1 shows pseudocode illustrating the transformation coefficient reconstruction process. [Diagram 3] 13 shows pseudocode illustrating an alternative implementation of a transformation coefficient reconstruction process. [Figure 4] 1 shows pseudocode illustrating the reconstruction process of transform coefficients for a transform block. [Diagram 5] The state transition table is shown below. [Figure 6] Indicates the coding order. [Figure 7] 13 shows a local template that can be used to select a probability model for one or more bins. [Figure 8] 2 illustrates a decoder according to one embodiment; [Figure 9] 1 illustrates an embodiment of context-adaptive binary arithmetic coding (CABAC) of significant bins. [Figure 10] FIG. 2 illustrates a transition table according to one embodiment. [Figure 11] 4 shows pseudocode illustrating a reconstruction process of transform coefficients for a transform block according to one embodiment. [Figure 12] Indicates a picture and / or video encoder. [Figure 13] 1 illustrates a picture and / or video decoder. [Figure 14] 1 illustrates the relationship between the reconstructed signal and the combination of the prediction residual signal and the prediction signal. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0106] In the following description, identical or similar elements, or elements having identical or similar functions, are designated by the same or similar reference numbers even if they are present in different drawings.
[0107] In the following description, numerous details are set forth to provide a more thorough description of the embodiments of the present invention. However, it will be apparent to those skilled in the art that the embodiments of the present invention may be practiced without these specific details. In other instances, well-known structures and devices are shown in block diagram form, rather than in detail, in order to avoid obscuring the embodiments of the present invention. Furthermore, features of different embodiments described hereinafter may be combined with each other unless otherwise specified.
[0108] The following embodiments mainly present features and functionality from the perspective of a decoder, however, it will be apparent that the same or similar features and functionality may be included by an encoder, e.g., the decoding performed by a decoder may correspond to the encoding by the encoder. Furthermore, the encoder may include the same features in the feedback loop, e.g., in the prediction stage 36, as described with respect to the decoder.
[0109] Figure 8 illustrates an embodiment of a decoder 20. The decoder 20 may optionally include features and / or functionality described in Section 2 (eg, one or more of the features described in Sections 2.1-2.3).
[0110] The decoder 20 is configured to decode (210) residual levels 142 representing the prediction residual from the data stream 14. The residual levels 142 may be quantization levels of the transform coefficients representing the prediction residual. As shown in Figure 1, the residual levels 142 may represent integer multiples of a quantization step size 144.
[0111] The decoder 20 is configured to dequantize (150) the residual levels 142 sequentially. The residual levels 142 may be dequantized (150) along the coding order, i.e. the scanning order or the reconstruction order. Different coding orders are possible, and the coding order may depend on the media signal, e.g. a picture signal, a video signal, or an audio signal, to be decoded by the decoder 20. FIG. 6 shows an example of a coding order 102 that may be used to decode a picture or video signal. According to one embodiment, the decoder 20 may dequantize (150) the residual levels 142 starting from the first non-zero transform coefficient, i.e. the first transform coefficient having a residual level not equal to 0 in the coding order, and proceed to dequantize (150) the residual levels 142 of subsequent transform coefficients in the coding order until the last transform coefficient in the coding order. The residual level of the transform coefficient preceding the first non-zero quantization index in the coding order may be inferred to be equal to 0 by the decoder 20.
[0112] The decoder 20 is configured to sequentially dequantize (150) the residual levels 142 by selecting (152) a quantizer 153 from a set of default quantizers 151 in response to a current transition state 220, dequantizing (154) the current residual level using the quantizer 153 to obtain a dequantized residual value 104, and updating (158) the current transition state in response to characteristics 157 of the current residual level obtained by applying (156) a binary function to the current residual level and in response to quantization mode information 180 included in the data stream 14. The current residual level is dequantized (154) to obtain a dequantized residual value 104, and the quantizer 153 used for the dequantization 154 depends on the current transition state 220. After this inverse quantization 154, the current transition state is updated (158) and a new current transition state is obtained, e.g., for inverse quantizing the next residual level or for inverse quantizing the current residual level again with the updated current transition state (see, e.g., inverse quantization 150 of the first residual level below). The new current transition state depends, e.g., on the current transition state and the characteristics 157 of the current residual level. The characteristics 157 of the current residual level may represent characteristics of the current residual level and not characteristics of the next residual level. The transition state for a particular transform coefficient may depend, in coding order, on the transition state for the previous transform coefficient and on the residual level characteristics 157 of the previous transform coefficient.
[0113] In update 158, the current transition state transitions from a domain of a combination 163 of one or more sets of transition states 161 and a property 157 of a current residual level to one or more sets of transition states 161 according to a bijective mapping that depends on quantization mode information 180, where the cardinalities l, m, n of the one or more sets of transition states 161 vary depending on the quantization mode information 180. For example, the one or more sets of transition states 161a have cardinal l if a first quantization mode is indicated by quantization mode information 180, the one or more sets of transition states 161b have cardinal m if a second quantization mode is indicated by quantization mode information 180, and the one or more sets of transition states 161c have cardinal n if a third quantization mode is indicated by quantization mode information 180. According to one embodiment, the decoder 20 may be configured to use either a set of one or more transition states 161a with cardinality l, e.g., l=1, or a set of one or more transition states 161b with cardinality m, e.g., m=4, depending on the quantization mode information 180. Figure 10 shows three possible surjective maps 106a, 106b, and 106c. According to one embodiment, the binary function is parity.
[0114] In FIG. 8, the binary functions may be referred to as "paths", and a first residual level characteristic may be associated with "path 0" and a second residual level characteristic may be associated with "path 1". According to one embodiment, the decoder 20 is configured to obtain the parity of the residual level as a residual level characteristic 157. The decoder may be configured to determine whether the residual level has even or odd parity by applying 156 the binary function to the current residual level. For example, "path 0" may correspond to even parity and "path 1" may correspond to odd parity.
[0115] 8, the decoder 20 is configured to perform the selection 152 of the quantizer 153 by mapping a predetermined number of bits of the current transition state 220 to a default quantizer using a first mapping 200, e.g., independently or regardless of the quantization mode information 180, the predetermined number and the first mapping 200 being equal whatever the quantization mode information 180. The predetermined number of bits indicates one or more bits of the current transition state 220 in one or more predetermined bit positions, e.g., bits in the LSB or the second but last significant bit position.
[0116] According to one embodiment, the set of default quantizers 151 consists of a first default quantizer 1511 that includes even integer multiples of the quantization step size 144 as reconstruction levels 142, and a second default quantizer 1512 that includes odd integer multiples of the quantization step size 144 and 0 as reconstruction levels 142, as shown in FIG.
[0117] According to one embodiment, the first mapping 200 maps a current transition state 220 equal to or less than 1 to a first default quantizer 1511 and maps a current transition state 220 greater than 1 to a second default quantizer 1512. The predetermined number of bits may be 1 and the decoder 20 may be configured to map a second bit of the current transition state 220, e.g. the second LSB, to the first default quantizer or the second default quantizer.
[0118] The decoder 20 shown in Figure 8 is configured to reconstruct (170) a media signal using the dequantized residual values 104. According to one embodiment, the decoder 20 is configured to perform the reconstruction 170 by performing a prediction to obtain a predicted version of the media signal and correcting the predicted version using the dequantized residual values 104, or is configured to reconstruct the media signal using the dequantized residual values 104 by performing a prediction to obtain a predicted version of the media signal, subjecting the dequantized residual values 104 to an inverse transform to obtain a media residual signal, and correcting the predicted version using the media residual signal.
[0119] As described above, the residual levels 142 are sequentially dequantized (150). Different options exist for dequantizing (150) the first residual level, i.e., the residual level of the first non-zero transform coefficient, and the decoder 20 may be configured to use one of the options.
[0120] The decoder 20 may be configured to set (190) a current transition state for a first residual level, which is the current residual level, to a predefined value. For example, the predefined value may be 0. The selection 152 of a quantizer 153 may be performed based on this predefined current transition state, and the first residual level is, for example, inverse quantized (154) using the selected quantizer 153. The decoder 20 may then be configured to apply (156) a binary function to the first residual level to obtain a characteristic of the first residual level as a characteristic 157 of the current residual level, and to update (158) the current transition state depending on the characteristic 157 of the current residual level. According to a first option, the decoder 20 may be configured to perform an inverse quantization 150 for the next residual level using the updated transition state as the current transition state. According to a second option, the decoder 20 is configured to perform again the inverse quantization 150 of the first residual level using the updated transition state as the current transition state before proceeding to the inverse quantization 150 of the next residual level. Alternatively, according to a third option, the decoder 20 may be configured to set (190) the current transition state of the first residual level, which is the current residual level, to a predefined value and to apply (156) a binary function to the first residual level to obtain a characteristic of the first residual level as a characteristic 157 of the current residual level. For example, the predefined value may be 0. The decoder 20 is then configured to update (158) the predefined current transition state depending on the characteristic 157 of the current residual level to obtain a current transition state. The selection 152 of the quantizer 153 may be performed based on this current transition state, and the first residual level is for example inverse quantized (154) with the selected quantizer 153. The decoder 20 may then be configured to perform the update 158 again to obtain the current transition state of the next residual level.
[0121] According to one embodiment, the decoder 20 is configured to use the transition table 106 used to update 158 the current transition state. For example, the decoder 20 is configured to sequentially dequantize (150) the residual levels 142 by selecting (152) a quantizer 153 from a set of default quantizers 151 depending on the current transition state, dequantizing (154) the current residual level using the quantizer 153 to obtain a dequantized residual value 104, applying (156) a binary function to the current residual level to obtain a characteristic 157 of the current residual level, and updating (158) the current transition state depending on the characteristic 157 of the current residual level using the transition table 106 used. The decoder may be configured to select one of a set 159 of default transition tables 106a,b,c as the transition table 106 to be used depending on the quantization mode information 180 included in the data stream 14, each of the default transition tables representing a surjective mapping from a domain of a combination 163 of one or more sets of transition states 161 and a characteristic 157 of the current residual level to the one or more sets of transition states 161, the default transition tables differing in cardinality l, m, n of the one or more sets of transition states 161. Furthermore, the decoder 20 is configured to perform the quantizer selection 152, for example by mapping a predetermined number of bits of the current transition state 220 to a default quantizer using a first mapping 200, which is equal no matter which default transition table is selected as the transition table to be used.
[0122] According to one embodiment, the set 159 of default transition tables 106a,b,c is: a first default transition table 106a having a set of one or more transition states with cardinality of one; a second default transition table 106b having a set of one or more transition states with a cardinality of four; A third default transition table 106c having a set of one or more transition states with a cardinality of 8. Contains two or more of the following: According to one embodiment, the set 159 of default transition tables 106a, b, c includes a first default transition table 106a having a set of one or more transition states with a cardinality of 1, and a second default transition table 106b having a set of one or more transition states with a cardinality of 4.
[0123] In other words, depending on the quantization mode information 180, the cardinalities l, m, n of the surjection map and the set(s) of transition states 161 can be selected between two or more of: the cardinal number l of the set(s) of transition states 161a is 1; the cardinal number m of the set(s) of transition states 161b is 4; and the cardinal number n of the set(s) of transition states 161c is 8. According to one embodiment, the cardinalities l, m, n of the surjection map and the set(s) of transition states 161 can be selected between: the cardinal number l of the set(s) of transition states 161a is 1; and the cardinal number m of the set(s) of transition states 161b is 4.
[0124] According to one embodiment, the decoder 20 is configured to manage the set 159 of default transition tables 106a,b,c as different parts of the integrated transition table, where for each default transition table 106a,b,c each of the set 161 of one or more transition states is indexed using a state index that is different from the state index by which any other default transition table is indexed within the integrated transition table, e.g. the transition states of the default transition tables in different parts of the integrated transition table are separated from one default transition table to another default transition table.
[0125] According to one embodiment, the decoder 20 is configured to perform an update 158 of the current transition state 220 by looking up in the integrated transition table an entry corresponding to a combination 163 of the characteristics 157 of the current residual level and the current transition state 220, e.g. using the transition table 106 used for the next transition state 162 for the next dequantized residual level depending on the characteristics 157 of the current residual level.
[0126] According to one embodiment, the quantization mode information 180 includes a syntax element in the data stream indicating a starting transition state to use in dequantizing the first residual level, e.g., in the dequantization order along which sequential dequantization is performed, whereby the syntax element indicates which of the default transition tables to use by matching a state index used only in the portion of the integrated transition table that corresponds to the transition table to be used.
[0127] According to one embodiment, the media signal is video and the decoder 20 is configured to read quantization mode information 180 from the data stream 14 and to select one default transition table 106 from a set of default transition tables once for the video in one of the following ways: on a picture block basis, on a picture basis, on a slice basis, and on a picture sequence basis.
[0128] In other words, the decoder 20 may be configured to retrieve quantization mode information 180 that controls updates for the video in one of the following ways: on a picture block basis, a picture basis, a slice basis, and a picture sequence basis.
[0129] According to one embodiment, the media signal is color video and the decoder 20 is configured to use different versions for the set of default quantizers 151 for different color components. The decoder 20 and / or a corresponding encoder may comprise features and / or functionality as described with respect to one or more of the following embodiments.
[0130] The present invention specifies a decoder, encoder and method in which multiple variants of dependent quantization are supported in a unified framework. The present invention particularly describes the concept that the entropy decoding and reconstruction process, e.g., reconstruction 170 of the media signal, is essentially the same for all supported quantization methods, i.e., independent of the quantization mode information 180, e.g., only the state transition table 106 is selected based on the quantization method selected by the encoder and signaled in the bitstream, i.e., data stream 14. In a preferred embodiment of the present invention, there are three quantization methods that can be indicated by the quantization mode information 180, namely: Conventional independent scalar quantization, Dependent quantization with four states, i.e., transition states, and Dependent quantization with eight states, i.e. transition states is supported.
[0131] In another embodiment, additional variants of dependent quantization with more than eight states (e.g., 16 states) are supported. In another embodiment of the invention, only conventional quantization and versions of dependent quantization with more than four states are supported. In another embodiment, two or more variants of dependent quantization, all with more than four states, are supported. According to another aspect, only conventional quantization and dependent quantization with four states are supported.
[0132] One aspect of the present invention is that all decoder operations are designed to be independent of the actual quantization method used. The aspect that may depend on the selected quantization method is the selection of the state transition table 106. Given the state transition table 106, the decoding process becomes independent of the selected quantization method.
[0133] The advantages of the present invention are as follows: By supporting dependent quantization with more than four states, a denser packing of admissible reconstruction points in the N-dimensional signal space is achieved, thus increasing coding efficiency (this has been shown in the literature).
[0134] By supporting different variants of dependency quantization (diverging in the number of states), the encoder is given the freedom to choose the variant that offers the most suitable trade-off between coding efficiency and implementation complexity for its application area. Note that the encoder complexity depends on the number of supported quantization states, i.e. the cardinalities l, m, n of the set of one or more transition states 161. Dependent quantization with eight states results in higher coding efficiency than dependent quantization with four states, but also requires higher encoder complexity.
[0135] By designing a unified decoder process for all supported quantization methods, essentially no additional implementation complexity is required on the decoder side. Note that the decoding complexity is substantially independent of the number of quantization states. However, the decoder complexity increases if different methods need to be supported. By unifying the decoding process for all supported quantization methods, the decoder implementation complexity does not change substantially for supporting a single dependent quantization method.
[0136] 5.1 Basic Concept of the Invention In VTM-7, a dependent quantization with four states and the following state transition table 106 is specified, representing, for example, a state transition table 106b with a set of one or more transition states 161b with a base m of four.
[0137] [Table 3]
[0138] In VTM-5, the path is given by the parity of the current transform coefficient level, i.e., the current residual level (or quantization index), in the coding order 102. If level[k] denotes the current transform coefficient level, then the variable path is path=(level[k]&1) where "&" denotes the bitwise operator in two's complement arithmetic. As noted above, the path can be any binary function of the quantization indexes. Nevertheless, it is preferred to use parity.
[0139] In the VTM-7 decoding process, the number of actions depends on the state variables, i.e. the transition states. In particular, there are three aspects:
[0140] The quantizer 153 selected to reconstruct the transform coefficients depends on the current transition state 220. In VTM-7, the quantizer id (which can be 0 or 1) is given by QId=state>>1.
[0141] Given the current value of the state variable state and the current quantization index level[k], the reconstructed transform coefficient trec[k], ie the dequantized residual value 104, is obtained by: if(level[k] != 0) { n=2*level[k]+(level[k]>0?-(state>>1):(state>>1) trec[k]=(n*scale[k]+add)>>shift }else{ trec[k]=0 }
[0142] where the second line in the if branch specifies the integer version of the multiplication with the quantization step size 144. The expression (state>>1) specifies the quantizer 153 to be used, e.g., the expression (state>>1) represents the first mapping 200. The operator ">>" specifies a bit shift to the right.
[0143] The context model, i.e. context 242, for coding the significance flag, i.e. significance bin 92, depends on the state variable, i.e. current transition state 220 (see FIG. 9). In VTM-7 it depends on the value 230 of max(state-1,0) and optionally on other variables. It can be interpreted that three different sets of context models 242 are used: a first set is used for transform coefficient levels, i.e. residual levels 142, for which the state variable 220 is equal to 0 or 1, a second set is used for transform coefficient levels 142 for which the state variable 220 is equal to 2 and a third set is used for transform coefficient levels 142 for which the state variable 220 is equal to 3.
[0144] The parameter pos0, which represents for example the binarization parameters 302, for coding the syntax element dec_abs_level (transform coefficient level coded in bypass mode) depends on the quantization state, i.e. the transition state assigned to the respective residual level. In VTM-7, the variable pos0 is pos0=(state<2?1:2)< <RPabs where RPabs specifies the Rice parameter that is selected based on the sum of the absolute transform coefficients in a local neighborhood.
[0145] 5.1.1 Adding another variant of dependent quantization Here, as an example, a further variant of dependent quantization with 8 states should be supported by the bitstream syntax and the decoding process, which can use, for example, the following state transition table 106c with one or more sets of transition states 161c with base n being 8:
[0146] [Table 4] In this variant, the quantizer 153 is given by QId=state>>2. Conceptually, two quantizers that deviate from the quantizer selected in VTM-7 are preferred.
[0147] More than two different context sets 242 may be preferred for encoding the significance flags 92 (see FIG. 9). Using the same relationship as the four-state variant (i.e., min(state-1,0)) would require seven context sets 242. The number of context sets 242 can be limited to three, but different rules must be used than for the four-state variant.
[0148] Furthermore, the derivation of the pos0 variable (for encoding dec_abs_level) in VTM-7, i.e. the binarization parameter 302, depends on the quantizer 153 used. For the first quantizer 1511, it is pos0=1< <RPabs and for the second quantizer 1512, it is set equal to pos0=2< <RPabs is set equal to Therefore, a different implementation is required for the 8-state variant.
[0149] 5.1.2 Integrating the Decryption Process The idea of the proposed concept is to unify the decoding process for all supported quantization variants. The quantization variants of the residual levels can be indicated by the quantization mode information 180. The first observation that allows the unification is that it is possible to relabel the quantization states, i.e. the transition states, without affecting the outcome of the reconstruction process. For example, the VTM-7 state transition table given below:
[0150] [Table 5] It can be rewritten as follows:
[0151] [Table 6]
[0152] Here, the meaning of state 1 and state 2 have been swapped. Meanwhile, for the original table, quantizer 153 is given by QId=state>>1. For reformulated table 106, quantizer 153 is given by QId=state&1, where "&" represents the bitwise "and" operator.
[0153] Similarly, the state transition table 106 for the 8-state version (or any other variant of dependent quantization) can be reformulated so that the same relationship, i.e., the first mapping 200, can be used to derive the quantizer id, i.e., the quantizer 153 to be used.
[0154] To further unify the decoding process, a compromise must be made between coding efficiency and implementation complexity. For example, in the case of entropy coding of significance flag 92, the best version cannot be selected for all supported quantizer variants, but a unified version can be designed, even if it is suboptimal for some of the supported variants of dependent quantization.
[0155] 5.1.3 Signaling the selected quantization variant Finally, the variant of the selected quantizer, i.e. the quantizer 153 used, must be indicated inside the bitstream, i.e. the data stream 14. To that end, several variants are possible.
[0156] The selection can be made at block level (e.g. per coding tree or per coding unit), in which case dedicated syntax elements need to be sent for each corresponding block.
[0157] It can be selected at slice or picture level (or tile or tile group level), in which case dedicated syntax elements need to be sent in the slice or picture header (or for the tile or tile group).
[0158] It can be selected at sequence level, in which case a dedicated syntax element has to be sent in the sequence parameter set or a similar syntax structure. In one embodiment, different quantizers may be used for different color components (eg, different quantizers may be used for luma and chroma).
[0159] 5.2 Description of Specific Embodiments In the following, embodiments of the invention are described in more detail. It should be noted, however, that other embodiments are possible (as mentioned above and partly below). The invention is not limited to the specific designs described below.
[0160] The invention is characterized by the combination of two or more of the following aspects: A bitstream syntax and decoding process supporting one or more variants of independent quantization and dependent quantization, where at least one variant of dependent quantization uses four or more quantization states.
[0161] The quantization variant used is indicated by a dedicated syntax element transmitted at block, slice, picture or sequence level. In the preferred version, it is transmitted in the picture header. The quantization states of the transform coefficients are derived by a state transition process, i.e., a surjection mapping, which consists of the following steps:
[0162] The state, i.e. the transition state, for the first transform coefficient in the coding order, i.e. the first residual level, is set to a predefined value, in a preferred version, equal to 0.
[0163] The state of a current transform coefficient, i.e. the current residual level, is derived based on the state of the preceding transform coefficient in the coding order and on a binary function of the value of the quantization index of the preceding transform coefficient, i.e. the value of the preceding residual level. In a preferred version, the binary function represents parity, i.e. the current state is given by the preceding state and the parity of the preceding quantization index, i.e. the preceding residual level.
[0164] o A state transition process, i.e. a surjection map, determines the current state 220 based on the previous states, and a binary function (preferably parity) of the previous quantization indexes is specified by the state transition table 106.
[0165] o The state transition table 106 is selected based on the actual quantization variant selected (indicated in the bitstream, e.g., by quantization mode information 180). However, for a given state transition table 106, the state transition process (e.g., the binary function used) is independent of the quantizer variant selected.
[0166] Two scalar quantizers are supported, e.g., quantizer 1511 and quantizer 1512 shown in FIG. 1, and the quantizer 153 used for the current transform coefficient is uniquely determined by the quantizer state.
[0167] o The same mapping from state 0 to quantizer id (220 or 1), i.e. the first mapping 200, is used for all supported quantization variants. In the preferred version, the quantizer id is given by qId=state&1. o The allowable reconstruction levels 142 (qid equal to 0) of the first quantizer 1511 include all even multiples of the quantization step size 144.
[0168] The allowable reconstruction levels 142 (qid equal to 1) of the second quantizer 1512 include all odd multiples of the quantization step size 144 and further reconstruction levels equal to 0.
[0169] The quantization indexes, i.e. residual levels 142, are coded using binary arithmetic coding (see e.g. Fig. 9), where the binarization 300 includes at least one bin (preferably a significance flag 92 indicating whether the quantization index is 0 or not) for which the selected probability model (or context model 242) depends on the quantization state for the corresponding transform coefficient, i.e. current residual level, i.e. current transition state 220. Thus, the same method for deriving the context model 242 is used for all supported quantization variants. This means that the context model derivation for the corresponding bin depends on the state 220 but does not depend on the selected quantization variant, i.e. is independent of the quantization mode information 180. Below, specific embodiments are described that support independent quantization, dependent quantization with four states, and dependent quantization with eight states.
[0170] 5.2.1 High-level signalling According to one embodiment, the media signal is a video and the quantization mode information 180 includes a first syntax element 182, e.g., pps_dep_quant_enabled_idc, in the data stream 14 as shown in FIG. 8, which indicates whether the selection of one default transition table 106 from the set 159 of default transition tables 106a, b, c for a video or a portion of a video is controlled within the video or portion of a video via a second syntax element 184, e.g., pic_dep_quant_idc, of the quantization mode information 180 in the data stream 14, or which of the set 159 of default transition tables 106a, b, c should be selected as one default transition table 106 for the portion of the video.
[0171] In other words, the media signal is a video and the quantization mode information 180 includes a first syntax element 182 in the data stream 14, such as pps_dep_quant_enabled_idc, which indicates, for a video or a portion of a video, whether update 158 is controlled within the video or a portion of a video via a second syntax element 184 of the quantization mode information 180 in the data stream 14, such as pic_dep_quant_idc, or which surjection mapping and which cardinalities l, m, n of the set of one or more transition states 161 should be selected for update 158.
[0172] According to one embodiment, the first syntax element 182 is included in the data stream 14 in a video parameter set having a portion that is a video, and the second syntax element 184 controls the selection of one of the set of default transition tables 106a,b,c 159 per picture, tile, slice, coding tree block, coding block, or residual transform block. Alternatively, the first syntax element 182 is included in the data stream 14 in a sequence parameter set having a portion that is a sequence of pictures, and the second syntax element 184 controls the selection of one of the set of default transition tables 106a,b,c 159 per picture, tile, slice, coding tree block, coding block, or residual transform block. Alternatively, the first syntax element 182 is included in the data stream 14 in a picture parameter set having a portion that is one or more pictures, and the second syntax element 184 controls the selection of one of the set of default transition tables 106a,b,c 159 per picture, tile, slice, coding tree block, coding block, or residual transform block. Alternatively, the first syntax element 182 is included in the data stream 14 in a picture header having a portion that is a picture, and the second syntax element 184 controls the selection of one of the set of default transition tables 106a,b,c 159 per tile, slice, coding tree block, coding block, or residual transform block. Alternatively, the first syntax element 182 is included in the data stream 14 in a parameter set having a portion that is one coding tree block, and the second syntax element 184 controls the selection of one default transition table 106 from the set 159 of default transition tables 106a,b,c on a coding block or residual transform block basis. In the case of coding tree blocks, the selection may be controlled, for example, in units where a picture is uniformly pre-divided before each coding tree block is divided into coding blocks by recursive multi-tree subdivision.In the case of coding blocks, the selection may be controlled, for example, on a per unit basis at which an intra-mode / inter-mode decision is made.
[0173] In other words, the first syntax element 182 is included in the data stream 14 in a video parameter set having a portion that is a video, and the second syntax element controls the updating 158 in units of a sequence of pictures, pictures, tiles, slices, coding tree blocks, coding blocks, or residual transform blocks. Alternatively, the first syntax element 182 is included in the data stream 14 in a sequence parameter set having a portion that is a sequence of pictures, and the second syntax element controls the updating 158 in units of pictures, tiles, slices, coding tree blocks, coding blocks, or residual transform blocks. Alternatively, the first syntax element 182 is included in the data stream 14 in a picture parameter set having a portion that is one or more pictures, and the second syntax element controls the updating 158 in units of pictures, tiles, slices, coding tree blocks, coding blocks, or residual transform blocks. Alternatively, the first syntax element 182 is included in the data stream 14 in a picture header having a portion that is a picture, and the second syntax element controls the update 158 in units of tiles, slices, coding tree blocks, coding blocks, or residual transform blocks. Alternatively, the first syntax element 182 is included in the data stream 14 in a parameter set having a portion that is a coding tree block, and the second syntax element controls the update 158 in units of coding blocks or residual transform blocks. In the case of coding tree blocks, the update 158 may be controlled in units where a picture is uniformly pre-split, for example, before each coding tree block is split into coding blocks by recursive multi-tree subdivision. In the case of coding blocks, the update may be controlled in units where an intra mode / inter mode decision is made, for example.
[0174] In one version, the selected quantization method is indicated by a syntax element coded in the picture header, namely, the second syntax element 184. This syntax element 184 may be called pic_dep_quant_idc and may take one of the following three values, indicating, for example, which surjection and which cardinalities l, m, n of the set of one or more transition states 161 should be selected for update 158 (e.g., which of the set of default transition tables 106a, b, c 159 should be selected as one default transition table 106 for a portion of the video): The value 0 indicates that conventional independent scalar quantization is used for the current picture, eg the set 161a with base l equal to 1. A value of 1 indicates that a dependent quantization with four states is used for the current picture, for example the set 161b with base m equal to four. A value of 2 indicates that a dependent quantization with 8 states is used for the current picture, for example the set 161c with base n equal to 8.
[0175] In addition, similar to VTM-7, the presence of a picture header syntax element is indicated by the picture parameter set (PPS) syntax element pps_dep_quant_enabled_idc. This syntax element, the first syntax element 182, may be coded using a 2-bit fixed length code and may have the following semantics:
[0176] A value of 0 specifies that pic_dep_quant_idc is present in the picture header, indicating, for example, that the update 158 is controlled within the video or portion of the video via the second syntax element 184.
[0177] A value of 1 specifies that pic_dep_quant_idc is not present in the picture header but is inferred to be equal to 0 for all pictures that reference the picture parameter set (independent scalar quantization), e.g. indicating set 161a with base l equal to 1.
[0178] A value of 2 specifies that pic_dep_quant_idc is not present in the picture header but is inferred to be equal to 1 for all pictures that reference a picture parameter set (dependent quantization with 4 states), indicating, for example, set 161b with base m equal to 4.
[0179] A value of 3 specifies that pic_dep_quant_idc is not present in the picture header but is inferred to be equal to 2 for all pictures that reference a picture parameter set (dependent quantization with 8 states), e.g. indicating set 161c with base n equal to 8.
[0180] Similar to VTM-7, pps_dep_quant_enabled_idc 182 in a picture parameter set is present if the picture parameter set flag constant_slice_header_params_enabled_flag is equal to 1. If the picture parameter set flag constant_slice_header_params_enabled_flag is equal to 0, the picture parameter set syntax element pps_dep_quant_enabled_idc 182 is not present in the picture parameter set, but is inferred to be equal to 0 (in this case pic_dep_quant_idc 184 is coded in the picture header).
[0181] 5.2.2 State Transition Table A state transition table 106 may be selected based on the value (transmitted or inferred) of the picture header syntax element pic_dep_quant_idc (or any similar syntax element). As shown in Fig. 10, three state transition tables 106a, b, c may be supported for the three supported quantization variants. Note that the state transition tables 106a, b, c are examples (actual state transition tables used may deviate from this example).
[0182] According to one embodiment, only the state transition tables 106a and 106b are used by the decoder 20 and / or the corresponding encoder.
[0183] 5.2.3 State Transitions For each transformation block 112, the initial state is set equal to zero. The transform coefficients, i.e., residual levels 142, of the transform block 112 are processed in a predefined coding order 102. Given a current transform coefficient state (currState), i.e., a current transition state 220, and a quantization index (also called a transform coefficient level or a residual level) of the current transform coefficient (currLevel), the state of the next transform coefficient in the coding / processing order (nextState) is nextState=stateTransTab[currState][currLevel&1] and represents, for example, a surjection map, where stateTransTab points to a state transition table 106 determined by the selected quantization variant, where the parity of the quantization index (currLevel&1) determines the path variable (see state transition table above). Instead of using the parity, any other binary function of the quantization index can also be used (see above).
[0184] 5.2.4 Reconstruction of transform coefficients The quantizer 153 used for the current transform coefficient, i.e. the current residual level, is uniquely specified by the value of the state variable, i.e. the current transition state 220. The quantizer id QId is QId=state&1 and represents a first mapping 200, where "&" represents a bitwise operator. A quantizer 1511 with QId=0 includes even multiples of the quantization step size 144 as acceptable reconstruction levels 142. A quantizer 1512 with QId=1 includes odd multiples of the quantization step size 144 and values equal to 0 as acceptable reconstruction levels 142.
[0185] A preferred example of the reconstruction of the transform coefficients of a single transform block is shown in FIG. 11 using C-style pseudocode.
[0186] 11 shows pseudocode illustrating the reconstruction process of transform coefficients for a transform block 112. The array levels represent the transmitted transform coefficient levels, i.e., the transmitted residual levels 142 (quantization indexes), for the transform block 112, and the array trec represents the corresponding reconstructed transform coefficients 104. The 2d table state_trans_table specifies a state transition table 106 that is selected, for example, based on a high-level syntax element (e.g., dep_quant_idc).
[0187] In the pseudocode of FIG. 11, the index k specifies the reconstruction order 102 of the transform coefficients, i.e. the residual level 142. Note that in the exemplary code, the index k decreases in the reconstruction order. The last transform coefficient has an index equal to k=0. The first index kstart specifies the reconstruction index (or, more precisely, the inverse reconstruction index) of the first reconstructed transform coefficient. The variable kstart can be set equal to the number of transform coefficients in the transform block minus one, or equal to the index of the first non-zero quantization index in the coding / reconstruction order 102 (e.g., if the position of the first non-zero quantization index is transmitted in the applied entropy coding method). In the latter case, all preceding transform coefficients (with index k>kstart) are inferred to be equal to 0. The quantization index, i.e. the residual level 142, is represented by level[k], and the associated reconstructed transform coefficient, i.e. the inverse quantized residual level 104, is represented by trec[k]. The state variable, i.e., the current transition state 220, is represented by state. The state transition table 106 is specified by the 2d array state_trans_table[][]. Instead of using the table state_trans_table[][] to determine the next state, an arithmetic operation can be used that will achieve the same result.
[0188] quant_step_size[k] specifies the quantization step size 144 for the transform coefficient at index k. Note that different quantization step sizes 144 can be used for different transform coefficient positions k (as given by the quantization weighting matrix in combination with the block quantization parameter). As mentioned above, multiplication with a non-integer quantization step size can be reduced to integer arithmetic, e.g. trec[k]=(n*scale[k]+add)>>shift where the quantization step size 144 is essentially: Δ k =scale[k] 2 -shift is given by:
[0189] 5.2.5 Entropy Coding of Quantization Indexes (or Transform Coefficient Levels) In a preferred version, referring to FIG. 9, the quantization indexes are coded using binary arithmetic coding similar to H.264|MPEG-4 AVC or H.265|MPEG-H HEVC.
[0190] For that purpose, the non-binary quantization index 90 is first mapped to a sequence of binary decisions (generally called bins). The quantization index is transmitted as an absolute value, and as a sign if the absolute value is greater than 0. In the preferred version, the same binarization as in VTM-7 is used.
[0191] [Table 7]
[0192] The following binary and non-binary syntax elements are transmitted: · sig_flag92 specifies whether the absolute value |q| of the transform coefficient level is greater than 0. When sig_flag92 is equal to 1, gt1_flag96 specifies whether the absolute value |q| of the transform coefficient level is greater than 1. When gt1_flag 96 is equal to 1, par_flag 94 specifies the parity of the absolute value |q| of the transform coefficient level, and gt3_flag 98 specifies whether the absolute value |q| of the transform coefficient level is greater than 3.
[0193] If gt3_flag98 is equal to 1, the non-binary value rem99 specifies the remainder of the absolute level |q|. This syntax element is transmitted in the bypass mode of the arithmetic coding engine using Golomb-Rice coding. Syntax elements that are not present are inferred to be equal to 0. At the decoder side, the absolute values of the transform coefficient levels are reconstructed as follows: |q|=sig_flag+gt1_flag+par_flag+2*(gt3_flag+rem)
[0194] For non-zero transform coefficient levels (indicated by sig_flag 92 equal to 1), a sign_flag, which specifies the sign of the transform coefficient level, is further transmitted in bypass mode.
[0195] The bin coding order 102 and context modeling are essentially the same as in VTM-7, except for two aspects described below: Furthermore, the same concept of limiting the worst-case number of context-coded bins is used.
[0196] FIG. 9 shows an initial value domain of the absolute value of the residual level 142 at 90. This initial value domain 90 may include all integer values between 0 and some maximum value. The initial value domain 90 may be an interval that opens up towards larger numbers. The number of integer values in the initial value domain 90 does not necessarily have to be a power of 2. Furthermore, FIG. 9 shows different bin types involved in representing the individual residual levels 142, i.e., in indicating their absolute values. There is a sig_flag 92 type that indicates whether the absolute value of a certain residual level is 0 or not. That is, sig_flag 92 divides the initial value domain 90 into two subparts, one that simply contains 0 and one that contains all other possible values. That is, sig_flag 92 already uniquely indicates the absolute value of the residual level if it happens to be 0, as shown in the lower part of FIG. 9. The non-zero values of the initial value domain 90 form a value domain 96 that is further divided into two halves by the bin type gt1_flag 96, i.e., one containing just one and the other containing all other possible values. The next flag, par_flag 94, divides the resulting value domain, containing all values greater than 1, into odd values on one side and even values on the other side. par_flag 94 needs to be present for a residual level 142 only if that level is greater than 1. par_flag 94 does not provide uniqueness with respect to one of the halves that the same divides the value domain 94 into. It indicates the next resulting (recursively defined) half of the value domain, and therefore the next flag, gt3_flag 98, divides this resulting value domain into two halves after par_flag 94. As shown at the bottom of Figure 9, this means that if the residual level of a certain transform coefficient happens to be 0, only sig_flag92 is coded for that residual level, and if the residual level of a particular transform coefficient happens to be 1, then sig_flag92 and gt1_flag96 are coded for that residual level.All flags sig_flag92, gt1_flag96, par_flag94 and gt3_flag98 are coded to represent a certain residual level of a transform coefficient when the transform coefficient falls within a value interval including absolute values 2 to 5, and further a remainder 99 is coded for the residual level of a transform coefficient whose absolute value is in the remaining interval outside the initial value domain 90.
[0197] 5.2.5.1 Context Selection for Significance Flags Fig. 9 shows an embodiment of a context-adaptive binary arithmetic coding (CABAC) of significance bins 92. According to an embodiment, the decoder 20 shown in Fig. 8 is configured to decode (210) a current residual level from the data stream 14 using a context-adaptive binary arithmetic decoding 240 of the bins of a binarization 300 of the current residual level, including a significance bin 92 indicating whether the current residual level is zero or non-zero. The decoder 20 may be configured to select a first context 242 for decoding the first bin of the current residual level, i.e. the significance bin 92, depending on a value 230 obtained by mapping a further predetermined number of bits, e.g. the LSB, of the current transition state 220 to said value 230 using a second mapping 202. The second mapping 202 may be equal to whatever the quantization mode information 180 is, e.g. whatever the default transition table 106a,b,c is selected as the transition table 106 to be used. The further predetermined number of bits indicates one or more bits of the current transition state 220 in one or more predetermined bit positions, such as, for example, a bit in the LSB or the second but last significant bit position.
[0198] According to one embodiment, the further predetermined number of bits is 2, e.g., indicating the LSB (last significant bit) and a bit in the second but last significant bit position. Value 230 may result from a second mapping 202, as shown in section 5.1, that is max(state-1,0) or max(0,(state&3)-1). Other mappings are possible.
[0199] With respect to the significance flags, i.e. significance bins 92, the selected probability model, i.e. context model or context 242, depends, for example, on: Whether the current transform block 112 is a luma transform block or a chroma transform block Transition state of dependent quantization The x and y coordinates of the current transform coefficient (the current residual level represents the residual level of the current transform coefficient) Partially reconstructed absolute residual values (after the first pass 601) in a local neighborhood
[0200] The variable state represents the state of the current transform coefficient, i.e., the current transition state 220. As explained above, the current transform coefficient state 220 is given by the state of the previous coefficient in the coding order 102 and the parity (or, more generally, a binary function) of the previous transform coefficient level.
[0201] If x and y are the coordinates of the current transform coefficient in transform block 112, then let diag=x+y be the diagonal position of the current coefficient. Given the diagonal position, the diagonal class index dsig is derived as follows: dsig=(diag<2?2:(diag<5?1:0)) (for luma transform block) and dsig=(diag<2?1:0) (for chroma conversion block) The ternary operator (c?a:b) represents an if-then-else statement: if the condition c is true, the value of a is used, otherwise (c is false), the value of b is used.
[0202] The context 242 also depends on the partially reconstructed absolute values in a local neighborhood. As in VTM-7, the local neighborhood may be given by a template T132, for example, as shown in FIG. 7. However, other templates 132 are possible. The template 132 used may also depend on whether luma or chroma blocks are coded. sumAbs is calculated based on the template T132. TIFF2025060987000013.tif1344
[0203] where abs1[k] represents the partially reconstructed absolute level for scan index k after the first pass. For VTM-7 binarization, abs1[k]=sig_flag[k]+gt1_flag[k]+par_flag[k]+2*gt3_flag[k] is given by: Note that abs1[k] is equal to the value coeff[k] obtained after the first scan pass 601 (see above).
[0204] Assume that the possible probability models for sig_flag 92, i.e., contexts 242, are organized in a 1d array. Let ctxIdSig be an index that identifies the probability model 242 to be used. The context index ctxIdSig, e.g., an index indicating a context 242, may be derived 110 as follows: If the transform block is a luma block, ctxIdSig=min((sumAbs+1)>>1,3)+4*dsig+12*state2CtxSet(state&3) If the transformation block is a chroma block, ctxIdSig=36+min((sumAbs+1)>>1,3)+4*dsig+8*state2CtxSet(state&3) Here, the operator ">>" represents a bit shift to the right (two's complement arithmetic). The operation is equivalent to dividing by 2 and truncating the result (to the next integer).
[0205] Note that the state, i.e., current transition state 220, is initially mapped to a value between 0 and 3. This can be achieved by applying a bitwise "and" with 3 (i.e., state&3). The function state2CtxSet(..) then maps this value to one of the values 230, 0, 1, or 2. In the preferred embodiment, the function is given by: TIFF2025060987000014.tif1991
[0206] According to this embodiment, the second mapping 202 can be understood as two successive mappings, where the current transition state 220 is first mapped to a first value, and then this first value is mapped to a value 230 on which the selection of the context 242 depends. Note that the context index depends on the state 220, but does not depend on the quantization method 180 used.
[0207] It should be noted that other organisations of context models are possible, i.e. different contexts 242. In any case, however, the probability model, i.e. context 242, selected to code sig_flag 92 depends on: Whether luma blocks or chroma blocks are coded State variables 220 (but the same function, e.g., is used for all supported quantization variants) ·Diagonal class dsig The sum of the partially reconstructed absolute values in the local template 132 (after the first pass 601), specifically min((sumAbs+1)≫1,3)
[0208] 5.2.5.2 Mapping parameters for bypass coding transform coefficient levels According to one embodiment, the media signal is a video and the decoder 20 shown in Fig. 8 is configured to decode (210) residual levels 142 from the data stream 14, e.g. by decoding residual levels associated with one picture block 84, representing a transform coefficient block 112, before residual levels associated with another picture block 84, as shown in the bottom right of Fig. 6. The decoder 20 may be configured to sequentially decode 210 bins of a binarization 300 of the residual levels 142 for one picture block 84 in one or more scans 60, i.e. scans along the coding order 102, and to use context-adaptive binary arithmetic decoding for a predetermined number of the leading bins of the binarization 300 of the residual levels 142 and to use equal probability bypass mode for the subsequent bins of the binarization 300 of the residual levels 142. As shown in Fig. 9, for example, the significance bin 92, the parity bin 94, the bins greater than 1 96, and the bins greater than 3 98 are decoded in a first scan 601, i.e., a first pass, and the remaining bins 99 are coded in a second scan 602. Alternatively, the residual level 142 may be decoded in one scan 60 or in more than two scans 60. Fig. 9 shows an exemplary transform coefficient block 112, in which the transform coefficients are scanned along the coding order 102 starting from the first non-zero residual level 120. As the residual level 144 represents the last residual level that does not exceed a predetermined number of leading bins, the binarization bins of the residual level 146 up to the residual level 304 are decoded using CABAC, and the binarization bins of the residual level 304 are coded using equal probability bypass mode. The decoder 20 may be configured to determine the binarization 300 of the predetermined residual level 145 for which the predetermined number 304 bins have been exhausted, by mapping a further predetermined number of bits, e.g. the LSBs, of the transition state 220, i.e. of the transition state associated with the predetermined residual level 145, onto the binarization parameter 302 using the third mapping 118, and performing the determination of the binarization 300 of the predetermined residual level 145 depending on the binarization parameter 302. According to an embodiment, the binarization determination may be performed by the decoder 20 for all residual levels 144 for which the predetermined number 304 bins have been exhausted.The bits of the transition state 220 are, for example, one or more bits at one or more predetermined bit positions such as the LSB, or the bit at the second but last significant bit position of the transition state 220.
[0209] According to one embodiment, the decoder 20 redirects the binarization 300 from a state associated with a predetermined level to a state associated with level 0 for one binarization code, e.g., pos0, that depends on the binarization parameter 302, and redirects one or more binarization codes from a state associated with one or more levels from 0 to a predetermined level - 1 to a state associated with one or more levels from 1 to a predetermined level, so as to determine the binarization 300 for a predetermined residual level 145 according to the binarization parameter 302, such as a modified default binarization, e.g., a Golomb - Rice code. The modification of the default binarization can be achieved by the formula |q|=(abs_level==pos0?0:(abs_level<pos0?abs_level + 1:abs_level)), see below.
[0210] According to one embodiment, a further predetermined number of bits is 1. Similar to VTM - 7, the absolute levels where data is not encoded in the first scan path 601, i.e., the residual levels 144, are fully encoded in the bypass mode, i.e., the equiprobable bypass mode. These are encoded using codes of the same class as the remainder rem99. The Rice parameter and the variable pos0, i.e., the binarization parameter 302, can be determined based on the already - encoded syntax elements (see below). These absolute - value levels |q|144 are not directly encoded, for example, but are first mapped to the syntax element abs_level and then encoded using the parameter code.
[0211] The mapping of the absolute value |q|144 to the syntax element abs_level may depend on the variable pos0 302. This is abs_level = (|q| == 0? pos0 : (|q| <= pos0? |q| - 1 : |q|)) is specified by On the decoder side, the mapping of the syntax element abs_level to the absolute value |q| can be specified as follows. |q| = (abs_level == pos0? 0 : (abs_level < pos0? abs_level + 1 : abs_level)) The Rice parameter RPabs used to encode abs_level is RPabs = tabRPabs[min(sumAbs, 31)] derived according to this, where sumAbs represents the sum of the absolute quantization indices within the local template 132 (see above), i.e., the sum of the absolute levels of the residual levels.
[0212] The variable pos0 302 may depend on both the sum of the reconstructed absolute values within the local template 132 and the state variable 220. The variable pos0 302 is derived from the quantization state 220 and the Rice parameter RPabs according to pos0 = (1 + (state & 1)) << RPabs (derived (118)). Note that the variable pos0 302 depends on the state 220 but not on the quantization method 180 used.
[0213] The equation pos0 = (1 + (state & 1)) << RPabs can represent a third mapping 118 of a further predetermined number of bits of the transition state 220 to the binarization parameter pos0, where (state & 1) indicates that the LSB is mapped to the binarization parameter pos0. The further predetermined number of bits is 1.
[0214] Alternatively, the formula pos0 = (state < 2? 1 : 2) << RPabs can represent a third mapping 118 of a further predetermined number of bits of the transition state 220 to the binarization parameter pos0, where (state < 2? 1 : 2) indicates that the second but last significant bit position of the transition state 220 is mapped onto the binarization parameter pos0 (see the last item in Section 5.1). The further predetermined number of bits is 1.
[0215] 5.3 Aspects of Other Embodiments A plurality of aspects of the above-described embodiments can be modified. Some of these aspects are pointed out below.
[0216] · The number of quantization deformation modes supported and / or the actual state transition table 106 for these deformation modes can be modified. · Different mechanisms for indicating the selected quantization deformation mode can be used. · Different binary functions of the quantization index can be used for the state transition process. This means that the state transition can be nextState = stateTransTable[currState][binFun(currLevel)] specified by, where binFunc() specifies any binary function (i.e., a function with possible function values of 0 and 1).
[0217] · Different binarization processes can be used to encode the quantization index. In particular, it is possible to use state-dependent binarization, where multiple binarizations are supported and the binarization used depends on the quantization state (and in some cases other parameters). In this case, the choice of binarization depends on the value of the state variable but not on the selected quantization method. As an example, two binarizations may be supported and the binarization selected may depend on the value of (state & 1). A different context modeling can be used for any of the bins. In this case, the context of one or more bins can still depend on the state variables, but is independent of the quantization method chosen. Different approaches for determining the Rice parameters for the residue and / or bypass coded quantization indexes may be used. Different approaches for deriving the parameter pos0 for coding the bypass coded quantization indexes may be used. However, in combination with the present invention, the parameter pos0 is determined independently of the selected quantization method.
[0218] 5.4 Further embodiments In the above-mentioned embodiment, transform coding is used to code the prediction residual, and a quantization scheme / mode is selected by the encoder and signaled to the decoder to be used to quantize / dequantize the transform coefficients. Entropy coding of the obtained quantization indexes, i.e. context-adaptive arithmetic coding, may be used. At the decoder side, a set of reconstructed samples is obtained by corresponding decoding of the quantization indexes and corresponding dequantization of the transform coefficients, so that the inverse transform results in the prediction residual in the spatial domain. However, the above-described embodiment may be modified to result in other embodiments, such as with regard to coding other residual values, such as residual samples in the spatial domain. Instead of using the above-described embodiment to code video, other media signals may be handled using the above-described concept, such as audio signals. The following description of the embodiments is mainly directed to lossy coding of blocks of prediction error samples in image and video codecs, but the embodiments may also be applied to other areas of lossy coding. In particular, there is no restriction on the set of samples forming a rectangular block.
[0219] Although not limited to video coding using transform-based predictive residual coding, a description of a video encoder and a video decoder of a block-based predictive codec for encoding a picture of a video is then provided to form an example of an encoding framework into which embodiments for encoding and decoding transformed representations of sample blocks may be incorporated. The video encoder and the video decoder are described with respect to Figures 12 to 14. Although the description of the embodiments of the present application provided above may be easily incorporated into the video encoder and the video decoder of Figures 12 and 13, respectively, the embodiments described above may also be used to form a video encoder and a video decoder that do not operate according to the encoding framework underlying the video encoder and the video decoder of Figures 12 and 13.
[0220] Fig. 12 shows an apparatus for predictively coding a video 11 consisting of a sequence of pictures 12 into a data stream 14. For this purpose, a block-wise predictive coding is used. Furthermore, a transform-based residual coding is exemplarily used. The apparatus or encoder is indicated with the reference number 10. Fig. 13 shows a corresponding decoder 20, i.e. an apparatus 20 arranged to predictively decode a video 11' consisting of pictures 12' in picture blocks from the data stream 14, again using the transform-based residual coding exemplarily. The apostrophe is used to indicate that the pictures 12' and the video 11' reconstructed by the decoder 20 respectively deviate from the picture 12 originally coded by the apparatus 10 in terms of coding losses introduced by the quantization of the predictive residual signal. Although Figs. 12 and 13 exemplarily use a transform-based predictive residual coding, the embodiments of the present application are not limited to this type of predictive residual coding. This also applies to other details described with respect to Figs. 12 and 13, as outlined below.
[0221] The encoder 10 is configured to subject the prediction residual signal to a spatial-spectral transformation and to encode the prediction residual signal thus obtained into a data stream 14. Similarly, the decoder 20 is configured to decode the prediction residual signal from the data stream 14 and to subject the prediction residual signal thus obtained to a spectral-spatial transformation.
[0222] Internally, the encoder 10 may include a prediction residual signal former 22 for generating a prediction residual 24 so as to measure the deviation of a prediction signal 26 from an original signal, i.e. the video 11 or the current picture 12. The prediction residual signal former 22 may for example be a subtractor for subtracting a prediction signal from the original signal, i.e. the current picture 12. The encoder 10 further includes a transformer 28 for spatial-spectral transforming the prediction residual signal 24 to obtain a spectral domain prediction residual signal 24', which is quantized by a quantizer 32 included in the encoder 10. The prediction residual signal 24'' thus quantized is coded into the bitstream 14. For this purpose, the encoder 10 may optionally include an entropy coder 34 for entropy coding the quantized prediction residual signal transformed into the data stream 14. The prediction residual 26 is generated by a prediction stage 36 of the encoder 10 on the basis of the prediction residual signal 24'' decoded into and decodable from the data stream 14. For this purpose, the prediction stage 36 may internally include, as shown in Fig. 12, an inverse quantizer 38 for inverse quantizing the prediction residual signal 24'' to obtain a spectral domain prediction residual signal 24''' corresponding to the signal 24' except for the quantization losses, and an inverse transformer 40 for subjecting the latter prediction residual signal 24'' to an inverse transformation, i.e. a spectral-spatial transformation, to obtain a prediction residual signal 24'''' corresponding to the original prediction residual signal 24 except for the quantization losses. A combiner 42 of the prediction stage 36 then recombines the prediction signal 26 and the prediction residual signal 24'''', such as by addition, to obtain a reconstructed signal 46, i.e. a reconstruction of the original signal 12. The reconstructed signal 46 may correspond to the signal 12'.
[0223] A prediction module 44 of the prediction stage 36 then generates a prediction signal 26 based on the signal 46, for example by using spatial prediction, i.e. intra-prediction, and / or temporal prediction, i.e. inter-prediction, as will be described in more detail below.
[0224] Similarly, the decoder 20 may be internally constructed from components corresponding to the prediction stage 36, interconnected in a manner corresponding to the prediction stage 36. In particular, an entropy decoder 50 of the decoder 20 may entropy decode the quantized spectral domain prediction residual signal 24'' from the data stream, after which an inverse quantizer 52, an inverse transformer 54, a combiner 56 and a prediction module 58, interconnected and cooperating in the manner described above with respect to the modules of the prediction stage 36, recover a reconstructed signal based on the prediction residual signal 24'', such that the output of the combiner 56 results in a reconstructed signal, i.e. the video 11' or its current picture 12', as shown in Figure 13.
[0225] Although not specifically described above, it is readily apparent that the encoder 10 may set any encoding parameters, including, for example, prediction mode, motion parameters, etc., according to any optimization scheme, for example to optimize any rate- and distortion-related criterion, i.e., encoding cost, and / or to use any rate control. As will be described in more detail below, the encoder 10 and the decoder 20, as well as the corresponding modules 44, 58, each support different prediction modes, such as intra- and inter-coding modes, which form a kind of set or pool of primitive prediction modes based on which the prediction of picture blocks is configured in a manner described in more detail below. The granularity at which the encoder and the decoder switch between these prediction configurations may correspond to a subdivision of the pictures 12 and 12', respectively, into blocks. It should be noted that some of these blocks may be solely intra-coded blocks, some may be solely inter-coded blocks, and, if desired, further blocks may be blocks obtained using both intra- and inter-coding, as will be described in more detail below. According to the intra-coding modes, a prediction signal for a block is obtained based on the spatial already coded / decoded neighborhood of the respective block. There may be several intra-coding sub-modes, the selection of which represents some kind of intra-prediction parameters. There may be directional or angular intra-coding sub-modes, according to which a prediction signal for a respective block is filled by extrapolating to the respective block the sample values of the neighborhood along a certain direction specific to the respective directional intra-coding sub-mode.The intra-coding sub-modes may also include one or more further sub-modes, such as, for example, a DC coding mode, in which the prediction signal for each block assigns a DC value to all samples in the respective block, and / or a planar intra-coding mode, in which the prediction signal for each block is approximated or determined to be a spatial distribution of sample values described by a two-dimensional linear function over the sample positions of the respective block, deriving the slope and offset of the plane defined by the two-dimensional linear function based on neighboring samples. In comparison, according to an inter-prediction mode, the prediction signal for a block may be obtained, for example, by predicting the block interior temporally. For parameterization of the inter-prediction mode, a motion vector may be signaled in the data stream, indicating the spatial displacement of the part of the previously coded picture of the video 11 from which the previously coded / decoded picture is sampled to obtain the prediction signal for the respective block. This means that in addition to the residual signal coding included in the data stream 14, such as the entropy coded transform coefficient levels representing the quantized spectral domain prediction residual signal 24'', the data stream 14 may also encode prediction related parameters for assigning prediction modes to blocks, prediction parameters for the assigned prediction modes, such as motion parameters for inter prediction modes, and optionally further parameters that control the construction of the final prediction signal for the blocks using the assigned prediction modes and prediction parameters, as outlined in more detail below. Furthermore, the data stream may contain parameters that control and signal the subdivision of the pictures 12 and 12' into blocks, respectively. The decoder 20 uses these parameters to subdivide the pictures in the same way as the encoder did, to assign the same prediction modes and parameters to the blocks, and to perform the same predictions to obtain the same prediction signals.
[0226] FIG. 14 shows the relationship between the reconstructed signal, i.e. the reconstructed picture 12′, on the one hand, and the combination of the prediction residual signal 24′″ and the prediction signal 26 signaled in the data stream on the other hand. As already mentioned above, the combination may be additive. The prediction signal 26 is shown in FIG. 14 as a subdivision of the picture area into blocks 80 of different sizes, but this is only an example. The subdivision may be any subdivision, such as a regular subdivision of the picture area into rows and columns of blocks, or a multi-tree subdivision of the picture 12 into leaf blocks of different sizes, such as a quad-tree subdivision, a mixture of which is shown in FIG. 14, where the picture area is first subdivided into rows and columns of tree root blocks and then further subdivided into blocks 80 according to a recursive multi-tree subdivision.
[0227] The prediction residual signal 24'''' in Fig. 14 is also shown as a subdivision of the picture area into blocks 84. These blocks are sometimes referred to as transform blocks to distinguish them from the coding blocks 80. In fact, Fig. 14 shows that the encoder 10 and the decoder 20 may use two different subdivisions of the pictures 12 and 12' into blocks, one into coding blocks 80 and another into blocks 84, respectively. Although both subdivisions may be the same, i.e. each block 80 may simultaneously form a transform block 84, or vice versa, Fig. 14 shows the case, for example, where the subdivision into transform blocks 84 forms an extension of the subdivision into blocks 80, where any boundary between two blocks 80 overlaps with the boundary between two blocks 84, or in other words, where each block 80 coincides with one of the transform blocks 84 or with a cluster of transform blocks 84. However, the subdivisions may also be determined or selected independently of each other, such that the transform blocks 84 may alternatively cross block boundaries between the blocks 80. As far as the subdivision into transform blocks 84 is concerned, similar statements apply as those presented for the subdivision into blocks 80, i.e. the blocks 84 may be the result of a regular subdivision of the picture area into blocks arranged in rows and columns, or a recursive multi-tree subdivision of the picture area, or a combination thereof, or any other type of segmentation. As an aside, it should be noted that the blocks 80 and 84 are not limited to square, rectangular, or any other shape. Furthermore, the subdivision of the current picture 12 into blocks 80, from which a prediction signal is formed, and into blocks 84, from which a prediction residual is coded, may not be the only subdivisions used for coding / decoding. These subdivisions form the granularity at which prediction signal determination and residual coding are performed, but firstly, the residual coding may alternatively be performed without subdivision, and secondly, at a granularity other than these subdivisions, the encoder and decoder may set certain coding parameters which may include some of the aforementioned parameters such as prediction parameters, prediction signal configuration control signals, etc.
[0228] 14 shows that the combination of the prediction signal 26 and the prediction residual signal 24'''' directly results in the reconstructed signal 12'. However, it should be noted that more than one prediction signal 26 may be combined with the prediction residual signal 24'''' to result in the picture 12' according to alternative embodiments, e.g. prediction signals obtained from other views or other coding layers that are encoded / decoded in another prediction loop with another DPB.
[0229] In Fig. 14, the transform blocks 84 have the following meaning: the transformer 28 and the inverse transformer 54 perform the transform in units of these transform blocks 84. For example, many codecs use some kind of DST or DCT for all transform blocks 84. Some codecs allow to skip the transform for some of the transform blocks 84, so that the prediction residual signal is directly coded in the spatial domain. Supported transforms may include one or more of the following: DCT-II (or DCT-III) where DCT stands for Discrete Cosine Transform. Here, DST-IV stands for discrete sine transform. DCT-IV DST-VII Identity Transformation (IT)
[0230] The transform may be a separable transform. A secondary transform, which may be a non-separable transform, may be applicable to the low frequency portion, such as a subarray that spans from the DC component to the DC component and some intermediate component other than the highest frequency component. The encoder may decide to use such a secondary transform, select one for a block, and signal the decision to the decoder.
[0231] Returning now to the adaptive quantization mode aspect, the decoder and encoder may operate as follows. 8, for example, the decoder 20 may be configured to decode (140) residual levels 142, such as quantization levels of the transform coefficients 100 shown in FIG. 1 that represent prediction residuals 24″ from the data stream 14, and dequantize (150) the residual levels 142 sequentially, i.e., along a scan order, such as 102 shown in FIG. 6, by selecting (152) a quantizer from a set of default quantizers 151 (e.g., set 0, set 1 of FIG. 1) according to a current transition state, dequantizing (154) the current residual level using the quantizer to obtain a dequantized residual value 104, applying (156) a binary function, such as a parity function, to the current residual level to obtain a characteristic 157 of the current residual level, i.e., 1 or 0, and updating (158) the current transition state 162 according to the characteristic 157 of the current residual level using a transition table 106 that is used for the next transition state 160 for the next dequantized residual level. The decoder 20 reconstructs (170) a media signal, such as a picture or video, using the dequantized residual values 104. The decoder 20 may select one of a set 159 of default transition tables 106a,b,c as the transition table 106 to be used depending on quantization mode information 180 included in the data stream 14 (examples of which are mentioned in section 5.1.3), each of the default transition tables representing a surjective mapping (see, e.g., FIG. 10 ) from a domain of a combination 163 of a set of one or more transition states and a characteristic 157 of the current residual level to one or more sets 161 of transition states, the default transition tables 106a,b,c differing in cardinality l,m,n of the set of one or more transition states.The decoder 20 is configured to perform the quantizer selection 152 by mapping a predetermined number of LSBs (e.g., one, i.e., only the LSBs) of the current transition state to a default quantizer using a first mapping 108 (see, e.g., section 5.2.4) no matter which default transition table 106a,b,c is selected as the transition table 106 to be used, the predetermined number and the first mapping being equal no matter which default transition table 106a,b,c is selected as the transition table 106 to be used (i.e., independent of the selected mode 180 or transition table 106a,b,c, respectively). The decoding 210 of the current residual level 142 from the data stream 14 may be performed using context-adaptive binary arithmetic decoding of the binarization bins of the current residual level. The bins may include a significance bin (sig_flag) indicating whether the current residual level is zero or non-zero, and the context for decoding this first bin of the current residual level may be selected by mapping a further predetermined number of LSBs of the current transition state (e.g., 2 extracted by "&3") to the first context, for example using a second mapping 110, as described in Section 5.2.5.1, which is equal to whichever default transition table 106a, b, c was selected as the transition table 106 to be used.Additionally or alternatively, the residual level 142 may be decoded (210) by decoding the residual level 142 for one picture block (e.g., block 84 in FIG. 10 , whose residual is obtained by retransforming the transform coefficient block 112 shown in FIG. 6 ) before the residual level for another picture block, by sequentially decoding the binarization bins of the residual level 142 for one picture block in one or more scans (see pass 114 in Section 2.2.2 ), using context-adaptive binary arithmetic decoding for the first bins of a predetermined number (e.g., remRegBins) of the binarization bins of the residual level, and decoding the subsequent bins (k>=startId and determining the binarization of the predetermined residual level 145 for the bins for which a predetermined number has been exhausted (k>=startIdxBypass) by using an equal probability bypass mode for the transition states 220 (k>=startIdxBypass) that appear for the predetermined residual level 145 and mapping a further predetermined number (e.g., 1) of LSBs of the transition states 220 that appear for the predetermined residual level 145 to the binarization parameter 302 (e.g., pos0) using a third mapping 118 and performing the binarization determination of the predetermined residual level according to the binarization parameter 302, the third mapping 118 being equal no matter which default transition table 106a,b,c is selected as the transition table 106 to be used. Depending on the binarization parameters 302, the binarization for a given residual level 145 may be determined such that the binarization is a default binarization (e.g., a Rice code) modified by redirecting one binarization code depending on the binarization parameter from a state associated with the given level to a state associated with level 0, and by redirecting one or more binarization codes from a state associated with one or more levels from 0 to the given level minus 1 to a state associated with one or more levels from 1 to the given level.
[0232] The decoder 20 is then configured to reconstruct (170) the media signal using the dequantized residual values 104 by performing a prediction to obtain a predicted version of the media signal and correcting the predicted version using the dequantized residual values 104, or is configured to reconstruct the media signal using the dequantized residual values 104 by performing a prediction to obtain a predicted version of the media signal, subjecting the dequantized residual values 104 to an inverse transform to obtain a media residual signal, and correcting the predicted version using the media residual signal.
[0233] Below are described additional embodiments and aspects of the present invention, which can be used individually or in combination with any of the features and functions and details described herein.
[0234] According to a first aspect, the decoder (20) comprises: Decoding (210) residual levels (142) representing the prediction residual from the data stream (14); selecting (152) a quantizer (153) from a set of default quantizers (151) depending on a current transition state (220); dequantizing (154) the current residual level using a quantizer (153) to obtain a dequantized residual value (104); updating (158) a current transition state (220) in response to a characteristic (157) of the current residual level obtained by application (156) of a binary function to the current residual level (e.g. parity) and in response to quantization mode information (180) contained in the data stream (14), by sequentially inverse quantizing (150) the residual levels (142); reconstructing (170) a media signal using the dequantized residual values (104), wherein a current transition state (220) transitions from a domain of a combination (163) of one or more sets of transition states (161) and a characteristic (157) of a current residual level to one or more sets of transition states (161) according to a surjective mapping that depends on quantization mode information (180), the cardinality (l, m, n) of the one or more sets of transition states (161) varying depending on the quantization mode information (180); performing a selection (152) of a quantizer (153) whatever the quantization mode information (180) is (e.g., regardless of or independent of the quantization mode information (180)) by mapping a predetermined number of bits (e.g., one or more bits in one or more predetermined bit positions, such as a bit in the LSB or the second but last significant bit position) of the current transition state (220) to a default quantizer using a first mapping (200), the predetermined number and the first mapping (200) being equal whatever the quantization mode information (180) is; The method may be configured to perform the following steps.
[0235] According to the second aspect, and referring back to the first aspect, in the decoder (20), the predetermined number of bits may be 1.
[0236] According to a third aspect, and referring back to the first or second aspects, the decoder (20) may be configured to select a selection of the transition table (106) to be used from a set (159) of default transition tables (106a, b, c) in response to the quantization mode information (180), and to manage the set (159) of default transition tables as different parts of a consolidated transition table, in which, for each default transition table, each of the one or more sets (161) of transition states is indexed using a state index that is different from the state index by which any other default transition table is indexed within the consolidated transition table [e.g., the transition states of the default transition tables in different parts of the consolidated transition table are separated from one default transition table to another default transition table].
[0237] According to a fourth aspect, and referring back to the third aspect, the decoder (20) may be configured to update (158) the current transition state (220) by looking up, in the integrated transition table, an entry corresponding to a combination of the characteristic (157) of the current residual level and the current transition state (220).
[0238] According to a fifth aspect, and referring back to the third or fourth aspects, in the decoder (20), the quantization mode information (180) may include a syntax element in the data stream (14) indicating a starting transition state to use in dequantizing the first residual level in the dequantization order (e.g., along which sequential dequantization is performed), whereby the syntax element indicates which of the default transition tables (106) to use by matching a state index used only in the portion of the integrated transition table that corresponds to the transition table (106) to be used.
[0239] According to a sixth aspect, referring back to any of the first to fifth aspects, in the decoder (20), the set of default quantizers (151) is a first default quantizer (1511) that includes even multiples of the quantization step size (144) as reconstruction levels; a second default quantizer (1512) that includes an odd multiple of the quantization step size (144) and zero as reconstruction levels; It may consist of.
[0240] According to a seventh aspect, referring back to any of the first to sixth aspects, the decoder (20) comprises: decoding a current residual level from the data stream (14) using context-adaptive binary arithmetic decoding of a binarization bin of the current residual level, the bins including a significance bin (92) indicating whether the current residual level is zero or non-zero; selecting a first context (242) for decoding a first bin (92) of the current residual level according to a value (230) obtained by mapping a further predetermined number of bits of the current transition state (220) to said value using a second mapping (144), the second mapping (202) being equal whatever the quantization mode information (180); The method may be configured to perform the following steps.
[0241] According to the eighth aspect, and referring back to the seventh aspect, in the decoder (20), the further predetermined number of bits may be two.
[0242] According to a ninth aspect, referring back to any of the first to eighth aspects, in the decoder (20), the media signal may be video, and the decoder (20) may: Decoding a residual level for one picture block (84) before a residual level for another picture block (84); sequentially decoding bins of the residual level binarization for one picture block (84) in one or more scans, using context-adaptive binary arithmetic decoding for a predetermined number of leading bins of the residual level binarization, and using equal probability bypass mode for subsequent bins of the residual level binarization; determining a binarization of a predetermined residual level at which a predetermined number of bins have been exhausted by mapping a further predetermined number of bits of the transition state (e.g., one or more bits in one or more predetermined bit positions, such as the LSB, or a bit in the second but last significant bit position) to a binarization parameter (302) using a third mapping, and performing a binarization decision of the predetermined residual level according to the binarization parameter (302), where the third mapping is equal whatever the quantization mode information (180) is, thereby Residual levels (142) from the data stream (14) can be configured to be decoded (210).
[0243] According to a tenth aspect, referring back to the ninth aspect, the decoder (20) may be configured to determine a binarization for a given residual level depending on the binarization parameters (302), such that the binarization is a default binarization modified by redirecting one binarization code depending on the binarization parameters (302) from a state associated with a given level to a state associated with level 0, and by redirecting one or more binarization codes from a state associated with one or more levels from 0 to the given level minus 1 to a state associated with one or more levels from 1 to the given level.
[0244] According to an eleventh aspect, referring back to the ninth or tenth aspect, a decoder (20) In, a further predetermined number of bits may be 1.
[0245] According to the twelfth aspect, referring back to the ninth aspect, in the decoder (20), the cardinality of the surjection map and the set of one or more transition states (161) is determined according to the quantization mode information (180): The set of one or more transition states (161) has a cardinality of 1; The set of one or more transition states (161) has a cardinality of 4; The set of one or more transition states (161) may be selectable between two or more of the base 8 transition states.
[0246] According to a thirteenth aspect, referring back to any of the first to twelfth aspects, in the decoder (20), the media signal may be video, and the decoder (20) comprises: About the video: Picture block (84) units, Picture units, Slice units, and It can be configured to read quantization mode information (180) that controls the updating (158) in a picture sequence-by-picture manner.
[0247] According to a fourteenth aspect, referring back to any of the first to thirteenth aspects, in the decoder (20), the media signal may be video, and the quantization mode information (180) may include a first syntax element in the data stream (14), the first syntax element indicating, for a video or a portion of a video, whether the update (158) is controlled within the video or portion of the video via a second syntax element of the quantization mode information (180) in the data stream (14), or which surjection mapping and which cardinality of the set or sets of one or more transition states (161) should be selected for the update (158).
[0248] According to a fifteenth aspect, referring back to the fourteenth aspect, in the decoder (20), the first syntax element is: The part is a video and the second syntax element is A sequence of pictures, Picture, tile, slice, coding tree blocks (e.g., coding blocks for which intra / inter mode decisions are made, e.g., in units of uniform pre-subdivision of a picture, before each coding tree block is divided into coding blocks by recursive multi-tree subdivision); A coding block (e.g., the unit at which the intra / inter mode decision is made), or residual transform block A video parameter set that controls the update (158) with respect to The part is a sequence of pictures and the second syntax element is Picture, tile, slice, coding tree blocks [e.g., coding blocks for which intra / inter mode decisions are made, e.g., in units of uniform pre-subdivision of one picture, before each coding tree block is partitioned into coding blocks by recursive multi-tree subdivision], A coding block (e.g., the unit at which the intra / inter mode decision is made), or residual transform block A sequence parameter set that controls the update (158) with respect to The portion is one or more pictures, and the second syntax element is Picture, tile, slice, coding tree blocks [e.g., coding blocks for which intra / inter mode decisions are made, e.g., in units of uniform pre-subdivision of one picture, before each coding tree block is partitioned into coding blocks by recursive multi-tree subdivision], A coding block (e.g., the unit at which intra / inter mode decisions are made), or residual transform block A picture parameter set that controls the update (158) in units of The part is a picture, and the second syntax element is tile, slice, coding tree blocks (e.g., coding blocks for which intra / inter mode decisions are made, e.g., in units of uniform pre-subdivision of one picture before each coding tree block is partitioned into coding blocks by recursive multi-tree subdivision); A coding block (e.g., the unit at which intra / inter mode decisions are made), or residual transform block The picture header controls the update (158) in units of the picture. or, The part is one coding tree block, and the second syntax element is A coding block (e.g., the unit at which intra / inter mode decisions are made), or residual transform block A set of parameters that controls the update (158) The data stream (14) may include:
[0249] According to a sixteenth aspect, referring back to any of the first to fifteenth aspects, in a decoder (20), the media signal may be color video, and the decoder (20) may be configured to use different versions for the set of default quantizers (151) for different color components.
[0250] According to a seventeenth aspect, referring back to any of the first to sixteenth aspects, in the decoder (20), the binary function may be parity.
[0251] According to the 18th 6th aspect, referring back to any of the 1st to 17th aspects, the decoder (20) comprises: performing a prediction to obtain a predicted version of the media signal; correcting the predicted version using the dequantized residual values (104), whereby The dequantized residual values (104) can be used to reconstruct (170) the media signal.
[0252] According to a nineteenth aspect, referring back to any of the first to eighteenth aspects, the decoder (20) comprises: performing a prediction to obtain a predicted version of the media signal; subjecting the dequantized residual values (104) to an inverse transform to obtain a media residual signal; and correcting the predicted version using the media residual signal, The dequantized residual values (104) can be used to reconstruct (170) the media signal.
[0253] According to a twentieth aspect, an encoder includes: predictively encoding a media signal to obtain a residual signal; selecting (152) a quantizer (153) from a set of default quantizers (151) depending on a current transition state (220); quantizing the current residual value using a quantizer (153) to obtain a current residual level; updating (158) a current transition state (220) in response to a characteristic (157) of the current residual level obtained by application (156) of a binary function to the current residual level (e.g. parity) and in response to quantization mode information (180) transmitted in the data stream (14), by - successively quantizing the residual values representative of the residual signal to obtain residual levels (142); encoding the residual level (142) into the data stream (14), wherein the current transition state (220) transitions from a domain of a combination (163) of the one or more sets of transition states (161) and the characteristic (157) of the current residual level to the one or more sets of transition states (161) according to a surjective mapping that depends on the quantization mode information (180), the cardinality of the one or more sets of transition states (161) varying depending on the quantization mode information (180); performing a selection (152) of a quantizer (153) whatever the quantization mode information (180) is (e.g., regardless of or independent of the quantization mode information (180)) by mapping a predetermined number of bits (e.g., one or more bits in one or more predetermined bit positions, such as a bit in the LSB or the second but last significant bit position) of the current transition state (220) to a default quantizer using a first mapping (200), the predetermined number and the first mapping (200) being equal whatever the quantization mode information (180) is; The method may be configured to perform the following steps.
[0254] According to the twenty-first aspect, with reference back to the twentieth aspect, in the encoder, the predetermined number of bits may be one.
[0255] According to the twenty-second aspect, and referring back to the twentieth or twenty-first aspects, the encoder may be configured to select a selection of the transition table (106) to be used from a set of default transition tables (159) depending on the quantization mode information (180), and to manage the set of default transition tables (159) as different parts of a consolidated transition table, in which, for each default transition table, each of the one or more sets of transition states (161) is indexed using a state index that is different from the state index by which any other default transition table is indexed within the consolidated transition table [e.g., the transition states of the default transition tables in different parts of the consolidated transition table are separated from one default transition table to another default transition table].
[0256] According to a twenty-third aspect, and referring back to the twenty-second aspect, the encoder may be configured to update (158) the current transition state (220) by looking up an entry in the joint transition table that corresponds to a combination of the characteristic (157) of the current residual level and the current transition state (220).
[0257] According to a 24th aspect, and referring back to the 22nd or 23rd aspects, the encoder may be configured to encode, in a quantization order (e.g., along which sequential inverse quantization is performed), a syntax element indicating a starting transition state to use in quantizing the first residual value as quantization mode information (180) into the data stream (14), whereby the syntax element indicates which of the default transition tables (106) to use by matching a state index used only in the portion of the integrated transition table that corresponds to the transition table (106) to be used.
[0258] According to a twenty-fifth aspect, referring back to any of the twentieth to twenty-fourth aspects, in an encoder, a set of default quantizers (151) is a first default quantizer (1511) that includes an even multiple of the quantization step size (144) as a coding level; a second default quantizer (1512) that includes odd multiples of the quantization step size (144) and 0 as coding levels; It consists of:
[0259] According to a twenty-sixth aspect, referring back to any of the twentieth to twenty-fifth aspects, an encoder comprises: encoding the current residual level into a data stream (14) using context-adaptive binary arithmetic coding of binarization bins of the current residual level, the bins including significance bins (92) indicating whether the current residual level is zero or non-zero; selecting a first context (242) for encoding a first bin (92) of the current residual level depending on a value (230) obtained by mapping a further predetermined number of bits of the current transition state (220) to said value using a second mapping (144), the second mapping (144) being equal whatever the quantization mode information (180); The method may be configured to perform the following steps.
[0260] According to the twenty-seventh aspect, and referring back to the twenty-sixth aspect, in the encoder the further predetermined number of bits may be two.
[0261] According to a twenty-eighth aspect, referring back to any of the twentieth to twenty-seventh aspects, in the encoder, the media signal may be video, the encoder comprising: encoding a residual level for one picture block (84) before a residual level for another picture block (84); Sequentially coding bins of the residual level binarization for one picture block (84) in one or more scans, using context-adaptive binary arithmetic coding for a predetermined number of leading bins of the residual level binarization, and using equal probability bypass mode for subsequent bins of the residual level binarization; determining a binarization of a predetermined residual level at which a predetermined number of bins have been exhausted by mapping a further predetermined number of bits of the transition state (e.g., one or more bits in one or more predetermined bit positions, such as a bit in the LSB or the second but last significant bit position) to a binarization parameter (302) using a third mapping, and performing a binarization determination of a predetermined residual level according to the binarization parameter (302), where the third mapping is equal whatever the quantization mode information (180) is, whereby The residual level (142) can be configured to be encoded into the data stream (14).
[0262] According to a 29th aspect, and referring back to the 28th aspect, the encoder may be configured to determine a binarization for a given residual level depending on the binarization parameters (302), such that the binarization is a default binarization modified by redirecting one binarization code depending on the binarization parameters (302) from a state associated with a given level to a state associated with level 0, and by redirecting one or more binarization codes from a state associated with one or more levels from 0 to the given level minus 1 to a state associated with one or more levels from 1 to the given level.
[0263] According to a thirtieth aspect, with reference back to the twenty-eighth or twenty-ninth aspects, in the encoder the further predetermined number of bits may be one.
[0264] According to a thirty-first aspect, referring back to the twenty-eighth aspect, in an encoder, the cardinality of the surjection map and the set of one or more transition states (161) is determined according to the quantization mode information (180): The set of one or more transition states (161) has a cardinality of 1; The set of one or more transition states (161) has a cardinality of 4; The set of one or more transition states (161) may be selectable between two or more of the base 8 transition states.
[0265] According to a thirty-second aspect, referring back to any of the twentieth to thirty-first aspects, in the encoder, the media signal may be video, the encoder comprising: About the video: Picture block (84) units, Picture units, Slice units, and Picture sequence unit The quantization mode information (180) may be configured to write quantization mode information (180) that controls the updating (158) in one of two ways.
[0266] According to a thirty-third aspect, referring back to any of the twentieth to thirty-second aspects, in the encoder, the media signal may be video, and the quantization mode information (180) may include a first syntax element in the data stream (14), the first syntax element indicating, for a video or portion of a video, whether an update (158) is controlled within the video or portion of a video via a second syntax element of the quantization mode information (180) in the data stream (14), or which surjection mapping and which cardinality of the set or sets of one or more transition states (161) should be selected for the update (158).
[0267] According to a thirty-fourth aspect, referring back to the thirty-third aspect, in the encoder, the first syntax element comprises: The part is a video and the second syntax element is A sequence of pictures, Picture, tile, slice, coding tree blocks (e.g., coding blocks for which intra / inter mode decisions are made, e.g., in units of uniform pre-subdivision of a picture, before each coding tree block is divided into coding blocks by recursive multi-tree subdivision); A coding block (e.g., the unit at which the intra / inter mode decision is made), or residual transform block A video parameter set that controls the update (158) with respect to The part is a sequence of pictures and the second syntax element is Picture, tile, slice, coding tree blocks [e.g., coding blocks for which intra / inter mode decisions are made, e.g., in units of uniform pre-subdivision of one picture, before each coding tree block is partitioned into coding blocks by recursive multi-tree subdivision], A coding block (e.g., the unit at which the intra / inter mode decision is made), or residual transform block A sequence parameter set that controls the update (158) with respect to The portion is one or more pictures, and the second syntax element is Picture, tile, slice, coding tree blocks [e.g., coding blocks for which intra / inter mode decisions are made, e.g., in units of uniform pre-subdivision of one picture, before each coding tree block is partitioned into coding blocks by recursive multi-tree subdivision], A coding block (e.g., the unit at which the intra / inter mode decision is made), or residual transform block A picture parameter set that controls the update (158) in units of The part is a picture, and the second syntax element is tile, slice, coding tree blocks (e.g., coding blocks for which intra / inter mode decisions are made, e.g., in units of uniform pre-subdivision of one picture, before each coding tree block is partitioned into coding blocks by recursive multi-tree subdivision); A coding block (e.g., the unit at which the intra / inter mode decision is made), or residual transform block The picture header controls the update (158) in units of the picture. or, The part is one coding tree block, and the second syntax element is A coding block (e.g., the unit at which the intra / inter mode decision is made), or residual transform block A set of parameters that controls the update (158) The data stream (14) may include:
[0268] According to a thirty-fifth aspect, referring back to any of the twentieth to thirty-fourth aspects, in the encoder, the media signal may be color video, and the encoder may be configured to use different versions for the set of default quantizers (151) for different color components.
[0269] According to a thirty-sixth aspect, with reference back to any of the twentieth to thirty-fifth aspects, in the encoder, the binary function may be parity.
[0270] According to a thirty-seventh aspect, referring back to any of the twentieth to thirty-sixth aspects, an encoder includes: by performing a prediction to obtain a predicted version of the media signal and the residual signal; It may be arranged to predictively encode the media signal to obtain a residual signal.
[0271] According to a thirty-eighth aspect, referring back to any of the twentieth to thirty-seventh aspects, an encoder includes: performing prediction to obtain predicted versions of the media signal and the residual signal; and forward transforming the residual signal, It may be arranged to predictively encode the media signal to obtain a residual signal.
[0272] According to a thirty-ninth aspect, a method comprises the steps of: Decoding a residual level representing a prediction residual from the data stream; selecting a quantizer from a set of default quantizers depending on a current transition state; dequantizing the current residual level using a quantizer to obtain a dequantized residual value; updating the current transition state in response to a characteristic of the current residual level obtained by application of a binary function to the current residual level (e.g. parity) and in response to quantization mode information contained in the data stream, whereby sequentially dequantizing the residual levels; reconstructing the media signal using the dequantized residual values, where a current transition state transitions from a domain of a combination of the set of one or more transition states and a property of the current residual level to a set of one or more transition states according to a surjective mapping that depends on the quantization mode information, the cardinality of the set of one or more transition states being different depending on the quantization mode information; performing quantizer selection whatever the quantization mode information is (e.g., regardless of or independent of the quantization mode information) by mapping a predetermined number of bits (e.g., one or more bits in one or more predetermined bit positions, such as the LSB or a bit in the second but last significant bit position) of the current transition state to a default quantizer using a first mapping, where the predetermined number and the first mapping are equal whatever the quantization mode information is; may have:
[0273] According to a fortieth aspect, a method comprises: predictively encoding a media signal to obtain a residual signal; selecting a quantizer from a set of default quantizers depending on a current transition state; quantizing the current residual value using a quantizer to obtain a current residual level; updating the current transition state in response to a characteristic of the current residual level obtained by application of a binary function to the current residual level (e.g. parity) and in response to quantization mode information transmitted in the data stream, whereby - successively quantizing residual values representative of the residual signal to obtain residual levels; encoding the residual level into a data stream, where a current transition state transitions from a domain of a combination of the set of one or more transition states and a property of the current residual level to a set of one or more transition states according to a surjective mapping that depends on the quantization mode information, the cardinality of the set of one or more transition states being different depending on the quantization mode information; performing quantizer selection whatever the quantization mode information is (e.g., regardless of or independent of the quantization mode information) by mapping a predetermined number of bits (e.g., one or more bits in one or more predetermined bit positions, such as the LSB or a bit in the second but last significant bit position) of the current transition state to a default quantizer using a first mapping, where the predetermined number and the first mapping are equal whatever the quantization mode information is; may have:
[0274] According to a forty-first aspect, the data stream may be encoded by a method according to the fortieth aspect.
[0275] According to a forty-second aspect, a computer program may have program code for performing the method according to the thirty-ninth or fortieth aspect, when the program is run on one or more computers.
Claims
1. A decoder (20), comprising: Decoding (210) residual levels (142) representing the prediction residual from the data stream (14); Selecting (152) a quantizer (153) from a set of default quantizers (151) depending on the current transition state (220); dequantizing (154) the current residual level using the quantizer (153) to obtain a dequantized residual value; applying (156) a binary function to the current residual level to obtain a characteristic (157) of the current residual level; updating (158) said current transition state (220) in response to characteristics (157) of said current residual level using a transition table (106) used, whereby sequentially dequantizing (150) the residual levels (142); reconstructing (170) a media signal using the dequantized residual values (104); selecting one default transition table from a set of default transition tables (159) as the transition table (106) to be used depending on quantization mode information (180) included in the data stream (14), each of the default transition tables representing a surjective mapping from a domain of a combination (163) of one or more of the sets of transition states (161) and the characteristic (157) of the current residual level to one or more of the sets of transition states (161), the default transition tables having different cardinalities of one or more of the sets of transition states (161); performing said selection (152) of said quantizer (153) by mapping a predetermined number of bits of said current transition state (220) to said default quantizer using a first mapping (200), regardless of which default transition table is selected as said transition table (106) to be used, said predetermined number and said first mapping (200) being equal, regardless of which default transition table is selected as said transition table (106) to be used; 4. The method of claim 3, A decoder (20).
2. 2. The decoder of claim 1, wherein the predetermined number of bits is one.
3. 3. The decoder of claim 1 or 2, wherein the decoder is configured to manage the set of default transition tables (159) as different parts of an integrated transition table, and for each default transition table, each of the set of one or more transition states (161) is indexed using a state index that is different from a state index by which any other default transition table is indexed in the integrated transition table.
4. 4. The decoder of claim 3, wherein the decoder is configured to perform the updating (158) of the current transition state (220) by looking up an entry in the joint transition table that corresponds to a combination of the characteristic (157) of the current residual level and the current transition state (220).
5. 5. The decoder of claim 3, wherein the quantization mode information (180) comprises a syntax element in the data stream (14) indicating a starting transition state to use in dequantizing a first residual level in a dequantization order, whereby the syntax element indicates which of the default transition tables to use by matching a state index used only in the portion of the integrated transition table that corresponds to the transition table (106) to be used.
6. The set of default quantizers (151) is A first default quantizer (151) that includes even multiples of the quantization step size (144) as reconstruction levels. 1 )and, A second default quantizer (151) including an odd multiple of the quantization step size (144) and zero as reconstruction levels. 2 )and A decoder according to any one of claims 1 to 5, comprising:
7. decoding the current residual level from the data stream (14) using context-adaptive binary arithmetic decoding of binarization bins of the current residual level, the bins including significance bins (92) indicating whether the current residual level is zero or non-zero; selecting a first context (242) for decoding the first bin (92) of the current residual level according to a value (230) obtained by mapping a further predetermined number of bits of the current transition state (220) to the value using a second mapping (144), the second mapping (144) being equal to any default transition table selected as the transition table (106) to be used; A decoder according to any one of claims 1 to 6, configured to:
8. 8. The decoder of claim 7, wherein the further predetermined number of bits is two.
9. The media signal is video and the decoder comprises: Decoding a residual level (142) for one picture block (84) before a residual level (142) for another picture block (84); - decoding sequentially the bins of the binarization of the residual level (142) for said one picture block (84) in one or more scans, using context-adaptive binary arithmetic decoding for a predetermined number of leading bins of the binarization of the residual level and using an equal probability bypass mode for subsequent bins of the binarization of the residual level; determining the binarization of the predetermined residual level at which the predetermined number of bins have been exhausted, by mapping a further predetermined number of bits of the transition state onto a binarization parameter (302) using a third mapping and performing the determination of the binarization of the predetermined residual level according to the binarization parameter (302), A decoder according to any one of claims 1 to 8, configured to decode (210) the residual levels (142) from the data stream (14).
10. 10. The decoder of claim 9, configured to determine the binarization for the given residual level as a function of the binarization parameters (302) such that the binarization is a default binarization modified by redirecting one binarization code depending on the binarization parameters (302) from a state associated with a given level to a state associated with level 0, and by redirecting one or more binarization codes from states associated with one or more levels from 0 to the given level minus 1 to states associated with one or more levels from 1 to the given level.
11. A decoder as claimed in claim 9 or 10, wherein the further predetermined number of bits is one.
12. The set of default transition tables (159) includes: a first default transition table in which the cardinality of the set of one or more transition states (161) is 1; a second default transition table in which the cardinality of the set of one or more transition states (161) is 4; A third default transition table in which the cardinality of the one or more sets of transition states (161) is 8.
10. The decoder of claim 9, comprising two or more of:
13. the media signal is video, and the decoder comprises: reading the quantization mode information (180) from the data stream (14); said selecting said one default transition table out of said set of default transition tables (159); Once for said video, Picture block (84) unit, Picture units, Slice units, and Picture sequence unit 13. A decoder according to any one of claims 1 to 12, configured to:
14. 14. The decoder of claim 1, wherein the media signal is a video and the quantization mode information (180) comprises a first syntax element in the data stream (14), the first syntax element indicating whether, for the video or the portion of the video, a selection of the one of the set of default transition tables (159) is controlled within the video or the portion of the video via a second syntax element of the quantization mode information (180) in the data stream (14) or which of the set of default transition tables (159) should be selected as the one default transition table for the portion of the video.
15. The first syntax element is: The portion is the video, and the second syntax element is: A sequence of pictures, Picture, tile, slice, Coding tree block, A coding block, or Residual Transform Block a video parameter set for controlling the selection of the one default transition table out of the set of default transition tables (159), The portion is a sequence of pictures, and the second syntax element is Picture, tile, slice, Coding tree block, A coding block, or Residual Transform Block a sequence parameter set for controlling the selection of the one default transition table out of the set of default transition tables (159), The portion is one or more pictures, and the second syntax element is Picture, tile, slice, Coding tree block, A coding block, or Residual Transform Block a picture parameter set for controlling the selection of the one default transition table of the set of default transition tables (159) for each The portion is a picture, and the second syntax element is tile, slice, Coding tree block, A coding block, or Residual Transform Block a picture header for controlling the selection of the one default transition table of the set of default transition tables (159) for each picture; or The portion is one coding tree block, and the second syntax element is A coding block, or Residual Transform Block a parameter set for controlling the selection of the one default transition table from the set of default transition tables (159) 15. The decoder of claim 14, included in the data stream (14) in:
16. 16. The decoder of claim 1, wherein the media signal is color video and the decoder is configured to use different versions for the set of default quantizers (151) for different color components.
17. A decoder according to any one of claims 1 to 16, wherein the binary function is parity.
18. performing a prediction to obtain a predicted version of the media signal; correcting the predicted version using the dequantized residual values (104), thereby A decoder according to any one of claims 1 to 17, configured to reconstruct (170) the media signal using the dequantized residual values (104).
19. performing a prediction to obtain a predicted version of the media signal; subjecting the dequantized residual values (104) to an inverse transform to obtain a media residual signal; and correcting the predicted version using the media residual signal, A decoder according to any one of claims 1 to 18, configured to reconstruct (170) the media signal using the dequantized residual values (104).
20. 1. An encoder comprising: predictively encoding a media signal to obtain a residual signal; Selecting (152) a quantizer (153) from a set of default quantizers (151) depending on the current transition state (220); quantizing (154) the current residual value using the quantizer (153) to obtain a current residual level; applying (156) a binary function to the current residual level to obtain a characteristic (157) of the current residual level; updating (158) said current transition state (220) in response to characteristics (157) of said current residual level using a transition table (106) used, whereby - successively quantizing residual values representative of said residual signal to obtain residual levels (142); encoding said residual levels (142) into said data stream (14); selecting one default transition table from a set of default transition tables (159) as the transition table (106) to be used in response to quantization mode information (180) transmitted in the data stream (14), each of the default transition tables representing a surjective mapping from a domain of a combination (163) of one or more of the sets of transition states (161) and the characteristic (157) of the current residual level to one or more of the sets of transition states (161), the default transition tables having different cardinalities of the one or more sets of transition states (161); performing said selection (152) of said quantizer (153) by mapping a predetermined number of bits of said current transition state (220) to said default quantizer using a first mapping (200), regardless of which default transition table is selected as said transition table (106) to be used, said predetermined number and said first mapping (200) being equal, regardless of which default transition table is selected as said transition table (106) to be used; 4. The method of claim 3, Encoder.
21. 21. The encoder of claim 20, wherein the predetermined number of bits is one.
22. 22. The encoder of claim 20 or 21, wherein the encoder is configured to manage the set of default transition tables (159) as different parts of an integrated transition table, and for each default transition table, each of the set of one or more transition states (161) is indexed using a state index that is different from a state index by which any other default transition table is indexed in the integrated transition table.
23. 23. The encoder of claim 22, wherein the encoder is configured to perform the updating (158) of the current transition state (220) by looking up an entry in the joint transition table that corresponds to a combination of the characteristic (157) of the current residual level and the current transition state (220).
24. 24. The encoder of claim 22 or 23, configured to encode into the data stream (14) as the quantization mode information (180) a syntax element indicating a starting transition state to use when quantizing a first residual value in a quantization order, whereby the syntax element indicates the transition table to be used from the default transition table by matching a state index used only in the portion of the integrated transition table that corresponds to the transition table to be used.
25. The set of default quantizers (151) is A first default quantizer (151) that includes an even multiple of the quantization step size (144) as coding levels. 1 )and, A second default quantizer (151) including an odd multiple of the quantization step size (144) and zero as coding levels. 2 )and 25. An encoder according to any one of claims 20 to 24, comprising:
26. encoding the current residual level into the data stream (14) using context-adaptive binary arithmetic coding of binarization bins of the current residual level, the bins including significance bins (92) indicating whether the current residual level is zero or non-zero; selecting a first context (242) for encoding the first bin (92) of the current residual level depending on a value (230) obtained by mapping a further predetermined number of bits of the current transition state (220) to said value using a second mapping (144), said second mapping (144) being equal to any default transition table selected as the transition table to be used; 26. An encoder according to any one of claims 20 to 25, configured to:
27. 27. The encoder of claim 26, wherein the further predetermined number of bits is two.
28. The media signal is video, and the encoder comprises: encoding a residual level for one picture block (84) before a residual level for another picture block (84); - sequentially coding the bins of the binarization of the residual level for said one picture block (84) in one or more scans, using context-adaptive binary arithmetic coding for a predetermined number of leading bins of the binarization of the residual level and using equal probability bypass mode for subsequent bins of the binarization of the residual level; determining the binarization of the predetermined residual level at which the predetermined number of bins have been exhausted, by mapping a further predetermined number of bits of the transition state onto a binarization parameter (302) using a third mapping and performing the determination of the binarization of the predetermined residual level according to the binarization parameter (302), 28. An encoder according to any one of claims 20 to 27, configured to encode the residual levels into the data stream (14).
29. 29. The encoder of claim 28, configured to determine the binarization for the given residual level depending on the binarization parameter (302) such that the binarization is a default binarization modified by redirecting one binarization code depending on the binarization parameter (302) from a state associated with a given level to a state associated with level 0, and by redirecting one or more binarization codes from states associated with one or more levels from 0 to the given level minus 1 to states associated with one or more levels from 1 to the given level.
30. 30. An encoder as claimed in claim 28 or 29, wherein the further predetermined number of bits is one.
31. The set of default transition tables (159) includes: a first default transition table in which the cardinality of the set of one or more transition states (161) is 1; a second default transition table in which the cardinality of the set of one or more transition states (161) is 4; A third default transition table in which the cardinality of the one or more sets of transition states (161) is 8.
30. The encoder of claim 28, comprising two or more of:
32. the media signal is video, the encoder writing the quantization mode information (180) into the data stream (14); said selecting said one default transition table out of said set of default transition tables (159); Once for said video, Picture block (84) unit, Picture units, Slice units, and Picture sequence unit 32. An encoder as claimed in any one of claims 20 to 31, configured to perform one of the following:
33. 33. The encoder of claim 20, wherein the media signal is a video and the quantization mode information (180) comprises a first syntax element in the data stream (14), the first syntax element indicating whether, for the video or the portion of the video, a selection of the one of the set of default transition tables (159) is controlled within the video or the portion of the video via a second syntax element of the quantization mode information (180) in the data stream (14) or which of the set of default transition tables (159) should be selected as the one default transition table for the portion of the video.
34. The first syntax element is: The portion is the video, and the second syntax element is: A sequence of pictures, Picture, tile, slice, Coding tree block, A coding block, or Residual Transform Block a video parameter set for controlling the selection of the one default transition table out of the set of default transition tables (159), The portion is a sequence of pictures, and the second syntax element is Picture, tile, slice, Coding tree block, A coding block, or Residual Transform Block a sequence parameter set for controlling the selection of the one default transition table out of the set of default transition tables (159), The portion is one or more pictures, and the second syntax element is Picture, tile, slice, Coding tree block, A coding block, or Residual Transform Block a picture parameter set for controlling the selection of the one default transition table of the set of default transition tables (159) for each The portion is a picture, and the second syntax element is tile, slice, Coding tree block, A coding block, or Residual Transform Block a picture header for controlling the selection of the one default transition table of the set of default transition tables (159) for each picture; or The portion is one coding tree block, and the second syntax element is A coding block, or Residual Transform Block a parameter set for controlling the selection of the one default transition table from the set of default transition tables (159) 34. The encoder of claim 33, wherein the data stream (14) includes:
35. 35. The encoder of any one of claims 20 to 34, wherein the media signal is color video and the encoder is configured to use different versions for the set of default quantizers (151) for different color components.
36. 36. An encoder according to any one of claims 20 to 35, wherein the binary function is parity.
37. by performing a prediction to obtain a predicted version of the media signal and the residual signal; 37. An encoder according to any one of claims 20 to 36, configured to predictively encode the media signal to obtain the residual signal.
38. performing prediction to obtain predicted versions of the media signal and the residual signal; and subjecting the residual signal to a forward transform, whereby 38. An encoder according to any one of claims 20 to 37, configured to predictively encode the media signal to obtain the residual signal.
39. 1. A method comprising: Decoding a residual level representing a prediction residual from the data stream; selecting a quantizer from a set of default quantizers depending on a current transition state; dequantizing the current residual level using the quantizer to obtain a dequantized residual value; applying a binary function to the current residual level to obtain a characteristic of the current residual level; updating said current transition state according to characteristics of said current residual level using a transition table used, whereby sequentially dequantizing the residual levels; reconstructing a media signal using the dequantized residual values; and selecting one default transition table from a set of default transition tables as the transition table to be used in response to quantization mode information included in the data stream, each of the default transition tables representing a surjective mapping from a domain of combinations of one or more sets of transition states and characteristics of the current residual level to one or more sets of transition states, the default transition tables differing in cardinality of one or more sets of transition states; performing said selection of said quantizer by mapping a predetermined number of bits of said current transition state to said default quantizer using a first mapping, regardless of which default transition table is selected as the transition table to be used, said predetermined number and said first mapping being equal, regardless of which default transition table is selected as the transition table to be used; Including, method.
40. 1. A method comprising: predictively encoding a media signal to obtain a residual signal; selecting a quantizer from a set of default quantizers depending on a current transition state; quantizing the current residual value using the quantizer to obtain a current residual level; applying a binary function to the current residual level to obtain a characteristic of the current residual level; updating said current transition state according to characteristics of said current residual level using a transition table used, whereby successively quantizing residual values representative of the residual signal to obtain residual levels; encoding said residual level into said data stream; selecting, as the transition table to be used, one default transition table from a set of default transition tables in response to quantization mode information transmitted in the data stream, each of the default transition tables representing a surjective mapping from a domain of combinations of one or more sets of transition states and characteristics of the current residual level to one or more sets of transition states, the default transition tables differing in cardinality of one or more sets of transition states; performing said selection of said quantizer by mapping a predetermined number of bits of said current transition state to said default quantizer using a first mapping, regardless of which default transition table is selected as the transition table to be used, said predetermined number and said first mapping being equal, regardless of which default transition table is selected as the transition table to be used; Including, method.
41. A data stream (14) encoded by the method according to claim 40.
42. 41. A computer program having a program code for performing the method according to claim 39 or 40, when said program runs on one or more computers.