Decoder / encoder and method for supporting adaptive dependent quantization of transform coefficient levels

Through a unified architecture design, it supports independent quantization and multiple dependent quantization variants, solving the trade-off between coding efficiency and complexity, achieving efficient coding and flexible reconstruction of transform coefficients, and improving the performance of encoders and decoders.

CN121509655APending Publication Date: 2026-02-10FRAUNHOFER GESELLSCHAFT ZUR FORDERUNG DER ANGEWANDTEN FORSCHUNG EV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511674611.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2019-12-20
Filing Date
2020-12-18
Publication Date
2026-02-10

AI Technical Summary

Technical Problem

Existing video coding technologies struggle to find a suitable balance between coding efficiency and implementation complexity when handling the quantization of transform coefficients, especially when supporting multiple variants of dependent quantization, resulting in excessively high design complexity for both encoders and decoders.

Method used

It adopts a unified architecture design, supports independent quantization and multiple dependent quantization variants, and achieves flexible reconstruction and encoding at the transformation coefficient level through state transition tables and entropy coding methods, including high-level signaling and a unified quantization index reconstruction procedure to adapt to the switching of different quantization states.

Benefits of technology

It improves encoding efficiency, reduces the implementation complexity of encoders and decoders, and enables flexible switching and efficient encoding under different quantization states.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121509655A_ABST
    Figure CN121509655A_ABST
Patent Text Reader

Abstract

A decoder configured to decode a residual level representing a prediction residual from the data stream and sequentially inverse quantize the residual level: inverse quantize the current residual level in accordance with the current transition state to obtain an inverse quantized residual value, the current transition state is updated according to a current residual level characteristic obtained by applying a binary function to the current residual level and according to quantization mode information contained in the data stream. The media signal is reconstructed using the inverse quantized residual value. A current transition state is in accordance with a full-shot mapping of a domain combined from a set of one or more transition states having a current residual level characteristic to a set of one or more transition states in accordance with quantization mode information, wherein a cardinality of the set of one or more transition states differs in accordance with the quantization mode information. A selection of a quantizer is performed by mapping a predetermined number of bits of a current transform state to a default quantizer using a first mapping regardless of quantization mode information.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of Fraunhofer Institute for the Promotion of Applied Research, filed on December 18, 2020, with application number 202080097352.7, entitled "Solver / Encoder and Method for Adaptive Dependent Quantization Supporting Transformation Coefficient Level". Technical Field

[0002] According to embodiments of the present invention, therein lies a decoder, encoder, and method that supports adaptive dependent quantization at the transform coefficient level.

[0003] This invention applies to lossy encoding of residual sample blocks. A residual sample represents the difference between the original block of the sample and the sample in the predicted signal (the predicted signal can be obtained by intra-picture prediction, inter-picture prediction, a combination of intra-picture and inter-picture prediction, or any other means; in special cases, the predicted signal can be set to zero).

[0004] The residual blocks of the samples are transformed using a signal transform. Typically, linear and separable transforms are used (linear means the transform is linear, but can incorporate additional rounding of the transform coefficients). Integer approximations of DCT-II or other transforms from the DCT / DST family are commonly used. Different transforms can be used in the horizontal or vertical directions. The transform is not limited to linear and separable transforms. Any other transform (linear and non-separable, or nonlinear) can be used. Specifically, a second-order non-separable transform can be applied to the transform coefficients or a portion of the transform coefficients obtained after the first separable transform. The transform coefficient block, resulting from the signal transform, represents the original block of the residual samples in different signal spaces. In special cases, the transform can be equal to the recognition transform (i.e., the block of transform coefficients can be equal to the block of residual samples). The block of transform coefficients is encoded using lossy coding. On the decoder side, the block of reconstructed transform coefficients is inversely transformed to obtain the reconstructed block of the residual samples. Finally, the reconstructed block of the image samples is obtained by adding the prediction signal.

[0005] This invention describes the concept of lossy coding for blocks of transform coefficients. Specifically, it describes methods for implementing various variations of dependent quantization and adaptive selection of applicable variations.

[0006] In this context, dependent quantization involves a quantization method with the following properties: On the encoder side, blocks of transform coefficients are mapped to blocks at the transform coefficient level (i.e., quantization indexes), representing transform coefficients with reduced fidelity. On the decoder side, quantization indexes are mapped to reconstructed transform coefficients (which differ from the original transform coefficients due to quantization). Unlike traditional scalar quantization, transform coefficients are not quantized independently. Instead, the set of permissible reconstructibility levels for some transform coefficients depends on the quantization indexes chosen for others.

[0007] Dependent quantization has several variants, primarily differing in the number of possible quantization states. Increasing the number of quantization states generally improves coding efficiency but also increases encoder complexity. Therefore, supporting multiple variants of dependent quantization is reasonable to give the encoder the freedom to choose an appropriate trade-off between coding efficiency and implementation complexity. However, for the decoder, implementation complexity increases with the number of supported variants used for quantization.

[0008] This invention describes methods for supporting various variants of independent and dependent quantization in a unified architecture. The refactoring procedure and entropy coding at the transform coefficient level are designed so that the decoder can support all variants in a single implementation. The only aspect dependent on the chosen variant is the selection of the state transition table. This invention includes the following aspects:

[0009] In addition to traditional independent quantization, it also supports two or more variations of dependent quantization;

[0010] • In particular, a variant with 8 states of dependency quantization is added;

[0011] • High-level signaling using quantization methods;

[0012] • A unified procedure for reconstructing transform coefficient levels from quantization indices;

[0013] • A unified procedure for entropy encoding of quantized indexes (including standards for the maximum number of context-coded binaries);

[0014] • Uniform state-dependent context selection for significance flags. Background Technology

[0015] The following sections will describe the concepts of dependent quantization and entropy coding at the associated transform coefficient level. The descriptions will particularly emphasize the design aspects specified in draft 7 for the Versatile VideoCoding standard (VTM-7). However, it should be noted that many variations of this particular design are possible.

[0016] 2.1 Dependency Quantification

[0017] Dependent quantization of transform coefficients involves the following concept: the set of available reconstruction levels for transform coefficients depends on the quantization index (within the same transform block) selected for the preceding transform coefficient in the reconstruction order. Based on the quantization index used for the preceding transform coefficient (in encoding order), multiple sets of reconstruction levels are predefined, and one of these predefined sets is selected to reconstruct the current transform coefficient.

[0018] 2.1.1 Set of Refactoring Levels

[0019] In a union of predefined sets of reconstruction levels (two or more sets), a set of permissible reconstruction levels is selected for the current transform coefficient (based on the quantization index used for the preceding transform coefficients in coding order). 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 (within the entire set of reconstruction levels) represent integer multiples of the quantization step size Δ. This is used for specific transform coefficients. (k represents the reconstruction order) quantization step size It can be determined not only by the block quantization parameter QP, but also for specific transform coefficients. Quantization step size It may also be determined by the quantization weight matrix and block quantization parameters. Typically, it is used for the transform coefficients. Quantization step size It is used for transformation coefficients Weighting coefficients (Specified by the quantization weight matrix) and block quantization step size Given as a product (specified by the block quantization parameter)

[0020]

[0021] In VTM-7, dependent scalar quantization of the transform coefficients uses two completely different sets of reconstruction levels. The transform coefficients in these two sets... The total reconstruction level represents the quantization step size of the transform coefficients here. The quantization step size is an integer multiple of the quantization step size (which is determined at least in part by the block-based quantization parameters). Note that the quantization step size... This precisely represents the scaling factor used for the permissible reconstructed values ​​in both sets. This is in addition to the scaling factor used for different transformation coefficients within the transform block. Possible individual quantization step size (And therefore, apart from the individual scaling factor) the same two sets of reconstruction levels are used for all transformation coefficients.

[0022] Figure 1 This displays two sets of reconstruction levels. Hollow and filled circles represent two distinct subsets within the set of reconstruction levels; these subsets can be used to determine the set of reconstruction levels used for the next transformation coefficients in the reconstruction order.

[0023] The two sets at the refactoring level are in Figure 1 The text shows:

[0024] • Included in the first quantization set (denoted as Figure 1 The reconstruction level in the set 0) represents an even integer multiple of the quantization step size.

[0025] • Second quantized set (labeled as) Figure 1 The set 1) contains all odd integer multiples of the quantization step size and additionally contains reconstruction levels equal to zero.

[0026] It should be noted that both reconstructed sets are symmetric to zero. Both reconstructed sets contain reconstructed levels equal to zero; otherwise, these reconstructed sets would be disjoint. The union of both reconstructed sets includes all integer multiples of the quantization step size.

[0027] 2.1.2 Representation of Refactoring Levels

[0028] The reconstruction level selected by the encoder from the permissible reconstruction levels must be indicated within the bitstream. As in traditional independent scalar quantization, this is achieved using a so-called quantization index (also known as a transform coefficient level). The quantization index (or transform coefficient level) uniquely identifies an integer within the quantization set (i.e., within the set of reconstruction levels) of the available reconstruction levels. The quantization index is transmitted to the decoder as part of the bitstream (using any entropy coding technique). On the decoder side, the reconstructed transform coefficients can be uniquely computed based on the current set of reconstruction levels (determined by the previous quantization index in encoding / reconstruction order) and the transmitted quantization indexes used for the current transform coefficients.

[0029] Figure 1 The reconstruction level is indicated by the associated quantization index (given by the number below the circle, which represents the reconstruction level). A quantization index equal to 0 is assigned to a 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 smaller reconstruction level greater than 0 (i.e., the second smallest reconstruction level greater than 0)... and so on. Or, in other words, reconstruction levels greater than 0 are indicated by integers greater than 0 in ascending order (i.e., by 1, 2, 3, etc.). Similarly, a quantization index -1 is assigned to the largest reconstruction level less than 0, a quantization index -2 is assigned to the next smaller reconstruction level less than 0 (i.e., the second largest)... and so on. Or, in other words, reconstruction levels less than 0 are indicated by integers less than 0 in descending order (i.e., by -1, -2, -3, etc.).

[0030] The use of reconstruction levels (which represent integer multiples of the quantization step size) will allow for low-complexity algorithms in the computation of reconstruction transform coefficients on the decoder side. This is shown in the following... Figure 1 A preferred example. The first quantization set includes all even integer multiples of the quantization step size, and the second quantization set includes all odd integer multiples of the quantization step size plus a reconstruction level equal to 0 (which is included in both quantization sets). Similar... Figure 2 The algorithm represented by the pseudocode is used to implement the reconstruction procedure of the transform coefficients.

[0031] Figure 2 The pseudocode illustrating the reconstruction procedure for the transform coefficients is shown. k represents the index, indicating the reconstruction order of the current transform coefficient. The quantization index for the current transform coefficient is denoted by level[k], and it is applied to the quantization step size of the current transform coefficient. Let quant_step_size[k] represent the transformation coefficients and trec[k] represent the reconstructed transformation coefficients. The value of `setId[k]`. The variable `setId[k]` indicates the set of reconstruction levels applied to the current transform coefficients. It is determined based on the preceding transform coefficients in reconstruction order; the possible values ​​of `setId[k]` are 0 and 1. The variable `n` indicates an integer factor of the quantization step size; it is given by the set of reconstruction levels selected (i.e., the value of `setId[k]`) and the transmitted quantization index `level[k]`.

[0032] exist Figure 2 In the pseudocode, level[k] represents the transform coefficients. The transmitted quantization index, and setId[k] (equal to 0 or 1) represents the identifier of the set of the current reconstruction level (which is determined based on the previous quantization index in reconstruction order, as detailed 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]. If the quantization step size is included... If the transform coefficients are encoded using the first set of reconstruction levels that are even integer multiples of the quantization index (setId[k] == 0), then the variable n is twice the transmitted quantization index. If the transform coefficients are encoded using the second set of reconstruction levels (setId[k] == 1), then there are three cases: (a) if level[k] equals 0, then n also equals 0; (b) if level[k] is greater than 0, then n equals twice the quantization index level[k] minus 1; and (c) if level[k] is less than 0, then n equals twice the quantization index level[k] plus 1. This can be represented using a sign function.

[0033]

[0034] Next, if the second quantization set is used, the variable n is equal to twice the quantization index level[k] minus the sign function sign(level[k]) of the quantization index.

[0035] Once the variable n (an integer factor representing the quantization step size) is determined, then n is multiplied by the quantization step size. And obtain the reconstruction transformation coefficients .

[0036] Figure 3 Explanation shown Figure 2 The pseudocode is an alternative implementation of the pseudocode in [the original text]. The main change is the use of an integer implementation to represent the multiplication operation with the quantization step size, which uses scaling and shift parameters. Typically, for the transform block, the shift parameter (denoted by shift) is fixed, and only the scaling parameter (given by scale[k]) can depend on the position of the transform coefficients. The variable add represents the rounding offset, which is usually set to equal add = (1 << (shift - 1)). Given the nominal quantization step size of the transform coefficients, select the parameters shift and scale[k] to make .

[0037] As mentioned above, the reconstruction transform coefficients can be obtained through integer approximation. To replace and quantize step size Exact multiplication. This is in Figure 3The pseudocode in the code explains this. Here, the variable `shift` represents a right shift of bits. Its value typically depends only on the block's quantization parameters (but it's possible that the shift parameters can vary for different transform coefficients within the block). The variable `scale[k]` represents the transform coefficient. The scaling factor; besides the block quantization parameter, it can also depend, for example, on the corresponding elements of the quantization weight matrix. The variable `add` represents the rounding offset, which is usually set to equal `add = (1 << (shift - 1))`. It should be noted that, in addition to rounding, Figure 3 The pseudocode in the last line represents integer arithmetic, which is equivalent to the quantization step size. (Given the following) multiplication operations.

[0038]

[0039] Compared to Figure 2 , Figure 3 Another change (on the surface) is the use of the ternary if-then-else operator (a? b : c) to switch between two sets at the refactoring level, and thus the ternary if-then-else operator (a ? b : c) can be known in programming languages ​​such as C.

[0040] 2.1.3 Dependent Reconstruction of Transformation Coefficients

[0041] Another important design aspect of dependent scalar quantization is the algorithm used to switch between defined sets of quantizations (sets of reconstructed levels). The algorithm used determines the "packing density" achievable 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 results in increased coding efficiency.

[0042] In VTM-7, the transitions between quantization sets (set 0 and set 1) are determined by state variables (or quantization states). For the first transform coefficient in the reconstruction sequence, the state variable is set to a predetermined value. Typically, this predetermined value is 0. The state variables for subsequent transform coefficients in the encoding sequence are determined by an update procedure. The state of a particular transform coefficient depends only on the state and value of the previous transform coefficients in the reconstruction sequence.

[0043] The state variable has four possible values ​​(0, 1, 2, 3). On one hand, the state variable indicates the quantization set used for the current transform coefficients. Quantization set 0 is used when (and only if) the state variable is equal to 0 or 1; and quantization set 1 is used when (and only if) the state variable is equal to 2 or 3. On the other hand, the state variable also indicates possible transitions between quantization sets.

[0044] The state of a particular transform coefficient depends only on the state of the previous transform coefficients in the reconstruction sequence and a binary function of the values ​​of the previous transform coefficients. This binary function is referred to below as a path. In VTM-7, the following state transition table is used, where "path" refers to the binary function at the level of the previous transform coefficient in the reconstruction sequence.

[0045] Table 1: State transition table in VTM-6.

[0046]

[0047] In VTM-7, the path is given by the parity of the quantization index. At level... In the case of transformation coefficients, it can be determined according to the following:

[0048]

[0049] The operator "&" represents the bitwise "and" in two's complement integer arithmetic.

[0050] As an alternative, a path can also represent a level. Other binary functions. For example, it can indicate whether the transformation coefficient level is equal to or not equal to 0:

[0051]

[0052] The concept of state transitions for dependent scalar quantization allows for a low-complexity implementation of reconstructed transform coefficients in the decoder. A preferred example of a procedure for reconstructing transform coefficients for a single transform block is shown in [the diagram]. Figure 4 The pseudocode used is in C language form.

[0053] Figure 4 This section shows the pseudocode illustrating the reconstruction procedure for the transform coefficients of a transform block. The array `level` represents the transform coefficient level (quantization index) transmitted for the transform block, and the array `trec` represents the corresponding reconstructed transform coefficients. The two-dimensional table `state_trans_table` represents the state transition table, and the table `setId` represents the quantization set associated with the state. The function `path()` represents the binary function for the transform coefficient level.

[0054] exist Figure 4In the pseudocode, index k represents the reconstruction order of the transform coefficients. Note that in the example code, index k decreases in reconstruction order. The final index of the transform coefficient is equal to k=0. The first index kstart represents the reconstruction index (or more precisely, the dereconstruction index) of the first reconstructed transform coefficient. The variable kstart can be set to the number of transform coefficients in the transform block minus 1, or it can be set to the index of the first non-zero quantization index in the encoding / reconstruction order (e.g., if the position of the first non-zero quantization index is transmitted using the applied entropy coding method). In the latter case, all preceding transform coefficients (indicating k > kstart) are presumed to be equal to 0. The reconstruction procedure for each transform coefficient is... Figure 3 The examples are the same. Regarding Figure 3 In the example, the quantization index is represented by level[k], and the associated reconstruction transformation is represented by trec[k]. The state variable is represented by state. A one-dimensional table setId[] represents the set of quantizations associated with different values ​​of the state variable, and a two-dimensional table state_trans_table[][] represents the state transition, where the current state (first parameter) and path (second parameter) are given. As an example, path can be given by the parity of the quantization index (using the bitwise AND operator &), but other concepts are also possible. As another example, path can represent whether the transformation coefficients are equal to or not equal to zero. An example of the table (in C language formal syntax) is in Figure 5 The following are provided (these tables are the same as those in Table 1).

[0055] Figure 5 Display the state transition table `state_trans_table` and the table `setId`, which represents the set of quantizations associated with the state. The table representation given in C language syntax is the table indicated by Table 1.

[0056] Arithmetic operations that produce the same result can be used instead of using the table `state_trans_table[][]` to determine the next state. Similarly, arithmetic operations can be used to implement the table `setId[]`. Alternatively, arithmetic operations can be used to implement table lookups using the one-dimensional table `setId[]` and combinations of positive and negative sign functions.

[0057] 2.2 Entropy Coding at the Transform Coefficient Level

[0058] The main aspect of dependent scalar quantization is the set of different permissible reconfigurable levels (also called the quantization set) for different transform coefficients. The quantization set of the current transform coefficients is determined based on the values ​​of the quantization indices of the previous transform coefficients. If we consider... Figure 1By comparing two preferred examples and considering the two quantization sets, it becomes clear that the distance between the reconstruction level equal to zero and its neighboring reconstruction levels is larger in set 0 compared to set 1. Therefore, the probability of a quantization index equal to 0 is higher when using set 0, and lower when using set 1. In VTM-7, this effect is applied to entropy coding by switching the probabilistic model based on the state used for the current quantization index.

[0059] It should be noted that, in order to properly switch codeword tables or probability models, when entropy decodes the current quantization index (or the corresponding binary decision of the current quantization index), all paths (binary functions of the quantization index) of the previous quantization index must be known.

[0060] In VTM-7, the quantization index is encoded using binary arithmetic coding similar to H.264 | MPEG-4 AVC or H.265 | MPEG-H HEVC. For this purpose, the non-binary quantization index is first mapped to a series of binary decisions (which are usually called binary symbols (bins)).

[0061] 2.2.1 Binarization

[0062] Quantization indexes are transmitted as absolute values ​​and a plus or minus sign (for cases where the absolute value is greater than 0). When the plus or minus sign is transmitted as a single binary symbol, there are many possibilities for mapping the absolute value to a series of binary decisions.

[0063] Table 2: Binarization of the absolute value |q| at the transform coefficient level in VTM-7.

[0064]

[0065] Table 2 shows the binary representation of absolute values ​​used by VTM-7. The following binary and non-binary syntax elements are transmitted:

[0066] • sig_flag indicates whether the absolute value |q| of the transformation coefficient level is greater than 0;

[0067] • If sig_flag equals 1, then gt1_flag indicates whether the absolute value |q| of the transformation coefficient level is greater than 1;

[0068] • If gt1_flag equals 1, then par_flag indicates the parity check of the absolute value |q| at the transform coefficient level, and gt3_flag indicates whether the absolute value |q| at the transform coefficient level is greater than 3;

[0069] • If gt3_flag equals 1, then the non-binary value rem indicates the remainder of the absolute level |q|. This syntax element is transmitted using Golomb-Rice codes in bypass mode of the arithmetic encoder.

[0070] Non-existent syntax elements are inferred to be equal to 0. On the decoder side, the absolute values ​​at the transform coefficient level are reconstructed as follows:

[0071] |q| = sig_flag + gt1_flag + par_flag +2 * ( gt3_flag + rem )

[0072] For non-zero transform coefficient levels (indicated by sig_flag equal to 1), sign_flag indicates that the sign of the transform coefficient level is transmitted additionally in bypass mode.

[0073] 2.2.2 Encoding order and bypass mode of binary symbols

[0074] The entropy at the transform coefficient level in VTM-7 shares several aspects with HEVC. However, it also includes the additional aspect of entropy coding used for dependent quantization.

[0075] Figure 6 Signaling that displays the position of the first non-zero quantization index 120 in the encoding order (highlighted sample). Except for the position of the first non-zero transform coefficient 120, only binary symbols of coefficients 122 after the first non-zero quantization index 120 in the encoding order 102 are transmitted (e.g., the blue sample), and coefficients before the first non-zero quantization index 120 in the encoding order 102 are inferred to be equal to 0 (e.g., the white sample).

[0076] Each block of transform coefficients is divided into fixed-size sub-blocks (also called coefficient groups). Generally, the sub-blocks have coefficients of size 4x4 (see...). Figure 6 In some cases, other sizes can be used (e.g., 2x2, 2x4, 4x2, 2x8, or 8x2).

[0077] Similar to HEVC, the block encoding of transform coefficients is performed as follows:

[0078] First, the so-called `coded_block_flag` is transmitted, indicating whether there are any non-zero transform coefficient levels in the transform block. If `coded_block_flag` equals 0, then all transform coefficient levels are equal to 0, and transform block data is no longer transmitted. In some cases (e.g., in skip mode), `coded_block_flag` may not be explicitly transmitted, but rather inferred from other syntax elements.

[0079] • If coded_block_flag equals 1, then the x and y coordinates of the first significant transform coefficient in the transmission coding order are transmitted (this is sometimes called the last significant coefficient because the actual scan order indicates the scan from high frequency to low frequency components).

[0080] • Scan the transform coefficients based on sub-blocks (usually 4x4 sub-blocks); encode all transform coefficient levels of the sub-blocks before encoding any transform coefficient levels of any other sub-blocks; process the sub-blocks in a predetermined scan order, starting with the sub-block that includes the first importance coefficient in the scan order and ending with the sub-block that includes the DC coefficient;

[0081] • The syntax includes coded_subblock_flag, which indicates whether the subblock includes any non-zero transform coefficient level; this flag is not transmitted for the first and last subblocks in the scan order (i.e., subblocks that include the first importance coefficient and subblocks that include the DC coefficient in the scan order), and is inferred to be equal to 1; when coded_subblock_flag is transmitted, it is usually transmitted at the beginning of the subblock.

[0082] • For each subblock where coded_subblock_flag equals 1, the transform coefficient level is transmitted in multiple scan passes that cover the scan positions of the subblock.

[0083] The following will initially ignore the special aspect (which will be described later). Without this special aspect, the encoding of subblocks where coded_subblock_flag equals 1 is performed as follows:

[0084] For the first subblock in the encoding order (i.e., the subblock containing the first significant scan position, whose x and y coordinates are explicitly transmitted), encoding begins at the scan position firstSigScanIdx with 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, encoding begins at the smallest scan index minSubblockScanIdx within the subblock. Scanning ends at the largest scan index maxSubblockScanIdx within the subblock.

[0085] • In the first pass, the normally encoded binary flags sig_flag, gt1_flag, par_flag, and gt3_flag are transmitted:

[0086] If sig_flag can be inferred to be equal to 1, then sig_flag is not transmitted. In the following two cases, sig_flag can be inferred to be equal to zero:

[0087] (1) The current scan position is equal to the scan index startScanIdx, which is the first non-zero coefficient in the scan sequence (that is, the scan position corresponding to the explicitly transmitted x and y coordinates);

[0088] (2) The current subblock is the subblock that has been transmitted with coded_subblock_flag equal to 1, the current scan index is the maximum scan index maxSubblockScanIdx within the subblock, and all previously transmitted sig_flags for the current subblock are equal to 1.

[0089] If sig_flag[k] at scan index k is equal to 1 (transmit or infer), then gt1_flag is transmitted. Otherwise, gt1_flag is inferred to be zero.

[0090] If gt1_flag[k] at scan index k is equal to 1, then par_flag and gt3_flag are transmitted. Otherwise, it is inferred that par_flag and gt3_flag are equal to zero.

[0091] In the second pass, the remaining rem is encoded for those scan indices where the transmitted gt3_flag is equal to 1. For all other scan indices, the remaining rem is inferred to be equal to 0. The remaining rem is encoded using a concatenation of Rice codes and exponential Golomb codes (parameterized by the so-called Rice parameter). The binary code of the corresponding codeword is encoded in bypass mode. The Rice parameter is determined based on the already encoded syntax elements (see below).

[0092] Finally, in the final iteration, for all scan indices k (encoded or inferred) where sig_flag[k] equals 1, sign_flag is transmitted, indicating whether the transformation coefficient value is negative or positive.

[0093] The following pseudocode further illustrates the encoding procedure for the transform coefficient levels within a subblock. It is presented from the decoder's perspective. The Boolean variable `firstSubblock` indicates whether the current subblock is the first subblock in the encoding order (within the transform block). `firstSigScanIdx` indicates the scan index, which corresponds to the position of the first significant transform coefficient in the transform block (one of the signals explicitly sent at the start of the transform block syntax). `minSubblockScanIdx` and `maxSubblockScanIdx` represent the minimum and maximum scan indices of the current subblock, respectively. Note that the first scan index for which any data has been transmitted depends on whether the subblock includes the first significant coefficient in the scan order. If so, the first scan pass begins at the scan index corresponding to the first significant transform coefficient; otherwise, the first scan pass begins at the minimum scan index of the subblock. The variable `coeff[k]` for scan index `k` represents the reconstructed transform coefficient level. Encoding is performed in conjunction with decoding.

[0094] The pseudocode (simplified) specifies the decoding of subblocks where coded_subblock_flag equals 1:

[0095]

[0096]

[0097] A drawback of VTM-7 compared to HEVC is the increased maximum number of normalized binary symbols per transform coefficient. To circumvent this issue, VTM-7 includes the following concepts:

[0098] The maximum number of regular encoded binary symbols used for transform blocks, maxNumRegBins, is set to equal to...

[0099] maxNumRegBins =1.75 * width *height,

[0100] Where width and height represent the size of the transform block (more precisely, when the transform coefficients are forced to be equal to zero, they represent the size of the non-zero outer region of the transform block).

[0101] • At the beginning of the transform block, set the counter remRegBins (which represents the number of available normalized binary symbols) to be equal to remRegBins = maxNumRegBins.

[0102] • After encoding or decoding the regular binary code, decrement the counter remRegBins by 1.

[0103] • At the start of encoding at a scan position in the first pass, if the counter is less than 4 (in this case, not all binary symbols sig_flag, gt1_flag, par_flag, and gt3_flag can be transmitted without exceeding the maximum number of normally encoded binary symbols), then the first pass ends. Furthermore, for such scan positions, only the remainder included in the first pass is transmitted.

[0104] • Absolute levels that have no data to encode in the first scan pass are encoded entirely in bypass mode. They are encoded using the same type of code used for the rest of the rem. The Rice parameter and variable pos0 are determined based on the already encoded syntax elements (see below). These absolute levels |q| are not encoded directly, but are first mapped to the syntax element abs_level, and then encoded using the parameter code.

[0105] The mapping from the absolute value |q| to the syntax element abs_level depends on the variable pos0. It is represented as:

[0106] abs_level = ( |q| == 0 ? pos0 : ( |q|<= pos0 ? |q|-1: |q|)

[0107] On the decoder side, the mapping from the syntax element abs_level to the absolute value |q| is represented as follows:

[0108] |q| = ( abs_level == pos0 ? 0 : ( abs_level < pos0 ? abs_level + 1 :abs_level )

[0109] It should be noted that the limit on the number of regular encoded binary symbols is applied on a block-by-block basis, not a sub-block basis. This means that the counter `remRegBins` is initialized at the beginning of the transform block and decrements for each regular encoded binary symbol. If encoding is switched to bypass mode within a specific sub-block, then all transform coefficient levels of all subsequent sub-blocks in the encoding order will also be encoded in bypass mode.

[0110] The following pseudocode illustrates the encoding procedure used for subblocks (where coded_subblock_flag equals 1). As with the previous pseudocode, this encoding procedure is presented from the decoder's perspective. For the first coded subblock, the initial value of the counter remRegBins is equal to maxNumRegBins. For all subsequent subblocks, the initial value of the counter remRegBins is equal to the value obtained at the end of the previous coded subblock. The scan index startIdxBypass is the first scan index (if applicable) at the start of bypass encoding (i.e., encoding at the abs_level) within the subblock.

[0111] The pseudocode specifying the decoding of subblocks where coded_subblock_flag equals 1 (in bypass mode). (114):

[0112]

[0113]

[0114]

[0115] 2.2.3 Context Modelling

[0116] For the regular encoded binary symbols sig_flag, gt1_flag, par_flag, and gt3_flag, one of several probabilistic models (or contexts) is selected for the actual encoding.

[0117] Figure 7 Displays a local template used to select the probabilistic model for one or more binary codes. Black squares 130 indicate the current scan position, and highlighted samples 132 (e.g., blue squares) indicate neighboring scan positions within the template.

[0118] 2.2.3.1 Valid value flag sig_flag

[0119] For the valid value flag, the chosen probability model depends on:

[0120] • Is the current transform block a luma or chroma transform block?

[0121] • A state of interdependence and quantification;

[0122] • The x and y coordinates of the current transformation coefficients;

[0123] • The absolute value of the partial reconstruction in the local neighborhood region (after the first pass).

[0124] More details will be provided below.

[0125] The variable `state` represents the state of the current transform coefficient used in dependent quantization. `state` can take the values ​​0, 1, 2, or 3. Initially, `state` is set to 0. As explained above, the state of the current transform coefficient is given by the states of the previous coefficients in the encoding order and the parity check (or more generally, a binary function) at the level of the previous transform coefficients.

[0126] Given that x and y are the coordinates of the current transform coefficient within the transform block, 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:

[0127] dsig = ( diag < 2 ? 2 : ( diag < 5 ? 1 : 0 ) ) for the brightness transformation block

[0128] as well as

[0129] dsig = ( diag < 2 ? 1 : 0 ) for chroma transform block

[0130] The ternary operator (c ? a : b) represents an if-then-else statement. If condition c is true, the value a is used; otherwise (c is false), the value b is used.

[0131] The context also depends on the absolute value of the partial reconstruction within the local neighborhood region. In VTM-7, the local neighborhood region is determined by... Figure 7 The template T shown is given. However, other templates are also possible. The template used can also depend on whether the luma or chroma blocks have been encoded. Let sumAbs be the sum of the absolute values ​​of the partial reconstructions in template T (after the first pass):

[0132]

[0133] Where abs1[k] represents the absolute level of the partial reconstruction of index k after the first pass. In the binary case of VTM-7, it is given by:

[0134] abs1[k] = sig_flag[k] + gt1_flag[k] + par_flag[k] +2 * gt3_flag[k].

[0135] It should be noted that abs1[k] is equal to the value coeff[k] obtained after the first scan pass (see above).

[0136] Assume that the possible probability models used for sig_flag are of a one-dimensional array structure. Let ctxIdSig be the index identifying the probability model used. According to VTM-7, the context index ctxIdSig can be derived as follows:

[0137] If the transform block is a brightness block

[0138] ctxIdSig = min( (sumAbs+1)>>1, 3 ) + 4 * dsig +12 * min( state-1,0 )

[0139] If the transform block is a chroma block

[0140] ctxIdSig = 36 + min( (sumAbs+1)>>1, 3 ) + 4 * dsig + 8 * min( state-1,0 )

[0141] Here, the operator ">>" indicates a right shift of bits (in two's complement arithmetic). This operation is equivalent to dividing by two and rounding the result down to the next integer.

[0142] It should be noted that other structures for the context model are also possible. However, in any case, the choice of the probabilistic model for encoding sig_flag depends on:

[0143] • Whether to encode luminance or chrominance blocks;

[0144] • The state variable, specifically min(state-1,0);

[0145] • Diagonal category dsig;

[0146] • The sum of the absolute values ​​of the partial reconstructions within the local samples (after the first pass), specifically min((sumAbs+1)>>1, 3).

[0147] 2.2.3.2 Flags gt1_flag, par_flag, and gt3_flag

[0148] For the flags gt1_flag, par_flag, and gt3_flag, the chosen probabilistic model depends on:

[0149] • Is the current transform block a luminance or chrominance transform block?

[0150] • Is the current transform coefficient the first non-zero coefficient in the transform block according to the coding order?

[0151] • The x and y coordinates of the current transformation coefficients;

[0152] • The absolute value of partial reconstruction in the local neighborhood region (after the first pass).

[0153] Let firstCoeff be a variable indicating whether the current scan index represents the scan index of the first non-zero transform coefficient level in the encoding order (i.e., the scan index that explicitly encodes the x and y positions). If the current scan index is equal to the scan index of the first non-zero transform coefficient level, then firstCoeff equals 1; otherwise, firstCoeff equals 0.

[0154] Given that x and y are the coordinates of the current transform coefficient within the transform block, 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:

[0155] dclass = ( diag == 0 ? 3 : ( diag < 3 ? 2 : ( diag < 10 ? 1 : 0 ) ) ) For the brightness transformation block

[0156] as well as

[0157] dclass = ( diag == 0 ? 1 : 0 ) for chroma transform blocks

[0158] The context also depends on the absolute value of the partial reconstruction within the local neighborhood region. The variable sumAbs is derived as shown above. Furthermore, the variable numSig (which represents the number of non-zero transform coefficient levels within template T) is derived as follows:

[0159]

[0160] Similar to sig_flag, we assume the possible probability models are structured as a one-dimensional array. Let ctxId be the index used to identify the probability model. According to VTM-7, the context index ctxId can be derived as follows:

[0161] If the transform block is a brightness block

[0162] ctxId = ( firstCoeff ?0 : 1 + min( sumAbs-numSig, 4 ) + 5 * dclass )

[0163] If the transform block is a chroma block

[0164] ctxId =21 + ( firstCoeff ?0 : 1 + min( sumAbs-numSig, 4 ) + 5 * dclass)

[0165] It should be noted that other structures of its context model are also possible. However, in any case, the chosen probabilistic model depends on:

[0166] • Whether to encode luminance or chrominance blocks;

[0167] • Is the current scan index the scan index at the first non-zero transform coefficient level in the encoding order?

[0168] • Diagonal category dclass;

[0169] The difference between the sum of the absolute values ​​of partial reconstructions within the local sample (after the first pass) and the number of non-zero transformation coefficient levels within the local template is min(sumAbs-numSig, 4).

[0170] It should be noted that the same context index ctxId is used for gt1_flag, par_flag, and gt3_flag. However, for each of these flags, a different set of context models is used.

[0171] 2.2.3.3 Rice parameter used for the transform coefficient level of the rest and bypass coding

[0172] The remaining parts, rem and the absolute value abs_level, are both encoded using parameter class codes, where the binary code is encoded in bypass mode (see above). The actual binary representation 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 encoded syntax element abs_level to the actual absolute value.

[0173] Based on the sum of the absolute values ​​of the reconstructions in the local template, the Rice parameter RPrem for the remainder is derived. In VTM-7, the same template as described above is used. With T representing the template and coeff[k] representing the coefficients of the reconstruction at scan index k, the sum sumAbs is derived as follows:

[0174]

[0175] 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 as follows:

[0176] RPrem = tabRPrem[ max( min( sumAbs –20, 31 ),0 ) ].

[0177] Let tabRPabs[] be another fixed-size table of size 32. The Rice parameter RPabs used to encode abs_level is derived as follows:

[0178] RPabs = tabRPabs[ min( sumAbs, 31 ) ].

[0179] The variable pos0 depends on both the sum of the absolute values ​​of the reconstructions in the local template and the state variables. The variable pos0 is derived from the quantized state and the Rice parameter RPabs, as follows:

[0180] pos0 = (state <2 ?1 :2 ) << RPabs.

[0181] 2.3 High-level signaling for quantization methods

[0182] VTM-7 supports dependent quantization with four states and additionally supports traditional independent scalar quantization. The quantization method selected by the encoder is indicated in the bit stream, as described below.

[0183] The image header includes the syntax element `pic_dep_quant_enabled_flag`, which is encoded using a single bit and indicates whether the current image uses or does not use dependent quantization. If `pic_dep_quant_enabled_flag` equals 0, the current image uses traditional independent quantization. If `pic_dep_quant_enabled_flag` equals 1, the current image uses a specific variant of dependent quantization.

[0184] The image header syntax element is not always present in the image header. Its existence is controlled by another syntax element encoded in the image parameter set. The image parameter set includes the syntax element pps_dep_quant_enabled_idc, which is encoded using a 2-bit fixed-length code and has the following meaning:

[0185] A value of 0 indicates that pic_dep_quant_enabled_flag exists in the image header;

[0186] A value of 1 indicates that pic_dep_quant_enabled_flag does not exist in the image header, but for all images in the reference image parameter set, pic_dep_quant_enabled_flag is inferred to be equal to 0;

[0187] A value of 2 indicates that pic_dep_quant_enabled_flag does not exist in the image header, but for all images in the reference image parameter set, pic_dep_quant_enabled_flag is inferred to be equal to 1;

[0188] The value is 3, reserved for future use.

[0189] If the image parameter set flag `constant_slice_header_params_enabled_flag` is equal to 1, then `pps_dep_quant_enabled_idc` exists in the image parameter set. If the image parameter set flag `constant_slice_header_params_enabled_flag` is equal to 0, then the image parameter set syntax element `pps_dep_quant_enabled_idc` does not exist in the image parameter set, but it is inferred to be equal to 0 (in this case, `pic_dep_quant_enabled_flag` is encoded in the image header).

[0190] Therefore, it is desirable to provide concepts that make image coding and / or video coding more efficient to support adaptive dependent quantization at the transform coefficient level. Additionally, or alternatively, it is desirable to reduce bitstream and thus signaling costs.

[0191] This is achieved through the objectives of the independent claims of this application.

[0192] Further embodiments of the present invention are defined by the objectives of the dependent claims of this application. Summary of the Invention

[0193] According to a first aspect of the invention, the inventors understand that when attempting to use dependent quantization / dequantization at the transform coefficient level, a problem arises from the high implementation complexity involved when providing multiple dependent quantization / dequantization modes. According to the first aspect of this application, this problem is overcome by unifying the architecture for various variations of independent quantization / dequantization and dependent quantization / dequantization. The inventors have found it advantageous to choose a quantizer independent of quantization mode information. The only aspect dependent on quantization mode information is the update of the current transformation state, such as the selection of a transformation table that can be used for updating. This is based on the idea that a unified procedure for all supported quantization modes introduces almost no additional implementation complexity on the decoder side compared to supporting a single quantization mode. However, if different methods must be supported, the decoder complexity increases. Therefore, allowing the use of different quantization modes, thereby giving the encoder the freedom to choose variations, provides the most appropriate trade-off between coding efficiency and implementation complexity for its application domain. Furthermore, the choice of quantizer (independent of quantization mode) allows the use of dependent quantization modes with more than 4 transition states at the encoder / decoder, thereby improving coding efficiency by achieving a denser and more compact reconstructible point in the N-dimensional signal space.

[0194] Therefore, according to a first aspect of this application, a decoder is configured to decode residual levels from a data stream, the residual levels representing predicted residuals, and to sequentially dequantize the residual levels by: selecting a quantizer from a set of default quantizers based on the current conversion state; dequantizing the current residual level using the quantizer to obtain dequantized residual values; applying a binary function to the current residual level to obtain characteristics of the current residual level (e.g., parity); and updating the current conversion state based on the characteristics of the current residual level using a conversion table to be used. The dequantization of residual levels is performed sequentially, meaning that the above dequantization steps are performed in a cyclic manner (e.g., until all residual values ​​are dequantized), so the update of the current conversion state can be understood as the first or final step in this sequence. The update step of the current conversion state connects to the successive dequantization of residual levels; for example, the dequantization of previous residual levels is connected to the dequantization of the current residual level through the update of the current conversion state. Furthermore, for example, in the case of dequantization at the first residual level, the current conversion state can be set to a default / predetermined state (e.g., zero), and this current conversion state is updated based on the characteristics of the current residual level (i.e., the characteristics of the first residual level) using the conversion table to be used (e.g., the sequential dequantization used to initialize the residual level). The decoder is configured to reconstruct the media signal using the dequantized residual values. Furthermore, the decoder is configured to select a default conversion table from a set of default conversion tables as the conversion table to be used based on quantization mode information included in the data stream. Each default conversion table represents a surjective mapping, which maps the domain of a combination of sets of one or more conversion states having the characteristics of the current residual level to a set of one or more conversion states, where the difference between the default conversion tables lies in the cardinality of the set of one or more conversion states. A surjective mapping, for example, maps the elements (i.e., conversion states) of a set of one or more conversion states to the elements (i.e., conversion states) of a set of one or more conversion states. Both the domain and the common domain of the surjective mapping are associated, for example, with the same set of one or more conversion states. The selection of this transformation table to be used can be performed for each residual level during the update of the current transformation state; it can be performed for each transform block including most residual levels; or it can be performed per image. Furthermore, the decoder is configured to perform quantizer selection by mapping a predetermined number of bits of the current transformation state to the default quantizer using a first mapping, regardless of which default transformation table is selected as the transformation table to be used; the predetermined number and the first mapping are equal regardless of which default transformation table is selected as the transformation table to be used. The predetermined number of bits represents, for example, a certain number of one or more bits located at one or more predetermined bit positions (e.g., LSBs or bits located at the second but not the last significant bit position).

[0195] Therefore, according to a first aspect of this application, a decoder is configured to decode residual levels from a data stream, the residual levels representing predicted residuals, and to sequentially dequantize the residual levels by: selecting a quantizer from a set of default quantizers based on the current conversion state; dequantizing the current residual level using the quantizer to obtain dequantized residual values; and updating the current conversion state based on the characteristics of the current residual level obtained by applying a binary function to the current residual level (e.g., parity check), and based on quantization mode information included in the data stream. As described above, the dequantization of residual levels is performed sequentially, meaning that the above dequantization steps are performed in a cyclic manner (e.g., until all residual values ​​are quantized), so the update of the current conversion state can be understood as the first or final step in this sequence. The update step of the current conversion state connects to the successive dequantization of residual levels, for example: the dequantization of previous residual levels is connected to the dequantization of the current residual level through the update of the current conversion state. Furthermore, for example, in the case of dequantization at the first residual level, the current conversion state can be set to a default / predetermined state (e.g., zero), and this current conversion state is updated according to the characteristics of the current residual level (i.e., the characteristics of the first residual level) (e.g., to initialize sequential dequantization of the residual level). Based on a surjective mapping dependent on the quantization mode information, the current conversion state is transformed (e.g., during update) from a combination of sets of one or more conversion states having the characteristics of the current residual level to a set of one or more conversion states, where the cardinality of the set of one or more conversion states varies according to the quantization mode information. Regardless of the quantization mode information (e.g., unrelated to the quantization mode information, or independent of the quantization mode information), the decoder is configured to perform quantizer selection by mapping a predetermined number of bits of the current conversion state (e.g., one or more bits at one or more predetermined bit positions, such as LSBs or bits at a second but not last significant bit position) to the default quantizer using a first mapping; the predetermined number and the first mapping are equal regardless of the quantization mode information. Furthermore, the decoder is configured to reconstruct the media signal using the dequantized residual values.

[0196] Therefore, according to a first aspect of this application, an encoder is configured to: predictively encode a media signal to obtain a residual signal; and sequentially quantize residual values ​​representing the residual signal to obtain a residual level by: selecting a quantizer from a set of default quantizers based on a current conversion 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 characteristics of the current residual level (e.g., parity); and updating the current conversion state based on the characteristics of the current residual level and using a conversion table to be used. The quantization of the residual levels is performed sequentially, meaning that the above quantization steps are performed in a cyclic manner (e.g., until all residual values ​​are quantized), so the update of the current conversion state can be understood as the first or final step in this sequence. The update step of the current conversion state connects to the continuous quantization of the residual levels; for example, the quantization of a previous residual level is connected to the quantization of the current residual level through the update of the current conversion state. Furthermore, for example, in the case of quantization at the first residual level, the current conversion state can be set to a default / predetermined state (e.g., zero), and this current conversion state is updated based on the characteristics of the current residual level (i.e., the characteristics of the first residual level) using the conversion table to be used (e.g., the sequential dequantization used to initialize the residual level). The encoder is configured to encode the residual level into the data stream. Furthermore, the encoder is configured to select a default conversion table from a set of default conversion tables as the conversion table to be used based on the quantization mode information transmitted in the data stream. Each default conversion table represents a surjective mapping, which maps the domain of a set of one or more conversion states having the characteristics of the current residual level to a set of one or more conversion states, where the difference between the default conversion tables lies in the cardinality of the set of one or more conversion states. A surjective mapping, for example, maps the elements (i.e., conversion states) of a set of one or more conversion states to the elements (i.e., conversion states) of a set of one or more conversion states. Both the domain and the common domain of the surjective mapping are, for example, associated with the same set of one or more conversion states. The selection of this transformation table to be used can be performed for each residual level during the update of the current transformation state; it can be performed for each transform block including most residual levels; or it can be performed per image. Furthermore, the encoder is configured to perform quantizer selection by mapping a predetermined number of bits of the current transformation state to the default quantizer using a first mapping, regardless of which default transformation table is selected as the transformation table to be used; the predetermined number and the first mapping are equal regardless of which default transformation table is selected as the transformation table to be used. The predetermined number of bits represents, for example, a certain number of one or more bits located at one or more predetermined bit positions (e.g., LSBs or bits located at the second but not the last significant bit position).

[0197] Therefore, according to a first aspect of this application, an encoder is configured to: predictively encode a media signal to obtain a residual signal; and sequentially quantize residual values ​​representing the residual signal to obtain a residual level by: selecting a quantizer from a set of default quantizers based on a current conversion state; quantizing the current residual value using the quantizer to obtain a current residual level; and updating the current conversion state based on the characteristics of the current residual level obtained by applying a binary function to the current residual level (e.g., parity check), and based on quantization mode information transmitted in the data stream. As described above, the quantization of the residual levels is performed sequentially, which means that the above quantization steps are performed in a cyclic manner (e.g., until all residual values ​​are quantized), so the update of the current conversion state can be understood as the first or final step in this sequence. The update step of the current conversion state connects to the continuous quantization of the residual levels, for example: the quantization of the previous residual level is connected to the quantization of the current residual level through the update of the current conversion state. Furthermore, for example, in the case of quantization at the first residual level, the current conversion state can be set to a default / predetermined state (e.g., zero), and this current conversion state is updated according to the characteristics of the current residual level (i.e., the characteristics of the first residual level) (e.g., to initialize the sequential dequantization of the residual level). Based on a surjective mapping dependent on the quantization mode information, the current conversion state is transformed (e.g., during update) from a combination of sets of one or more conversion states having the characteristics of the current residual level to a set of one or more conversion states, where the cardinality of the set of one or more conversion states varies according to the quantization mode information. Regardless of the quantization mode information (e.g., unrelated to the quantization mode information, or independent of the quantization mode information), the decoder is configured to perform quantizer selection by mapping a predetermined number of bits of the current conversion state (e.g., one or more bits at one or more predetermined bit positions, such as LSBs or bits at a second but not last significant bit position) to the default quantizer using a first mapping; the predetermined number and the first mapping are equal regardless of the quantization mode information. Furthermore, the encoder is configured to encode the residual level into the data stream.

[0198] Therefore, according to a first aspect of this application, a method includes: decoding a residual level from a data stream, the residual level representing a predicted residual; and sequentially dequantizing the residual level by: selecting a quantizer from a set of default quantizers based on a current conversion state; dequantizing the current residual level using the quantizer to obtain a dequantized residual value; and updating the current conversion state based on the characteristics of the current residual level (e.g., parity) obtained by applying a binary function to the current residual level, and based on quantization mode information contained in the data stream. Furthermore, the method includes reconstructing a media signal using the dequantized residual value. The current conversion state is transformed from a domain of a combination of one or more conversion states having the characteristics of the current residual level to a set of one or more conversion states, wherein the cardinality of the set of one or more conversion states differs according to the quantization mode information, based on a surjective mapping dependent on the quantization mode information. Furthermore, the method includes performing quantizer selection by mapping a predetermined number of bits of the current conversion state (e.g., one or more bits at one or more predetermined bit positions, such as LSBs or bits at a second but not last significant bit position) to a default quantizer using a first mapping, regardless of the quantization mode information (e.g., unrelated to or independent of the quantization mode information); the predetermined number and the first mapping are equal regardless of the quantization mode information.

[0199] Therefore, according to a first aspect of this application, a method includes: predictively encoding a media signal to obtain a residual signal; and sequentially quantizing residual values ​​representing the residual signal to obtain a residual level by: selecting a quantizer from a set of default quantizers based on a current conversion state; quantizing the current residual value using the quantizer to obtain a current residual level; and updating the current conversion state based on the characteristics of the current residual level obtained by applying a binary function to the current residual level (e.g., parity check), and based on quantization mode information transmitted in the data stream. Furthermore, the method includes encoding the residual level into the data stream. The current conversion state is transformed from a domain of a combination of sets of one or more conversion states having the characteristics of the current residual level to a set of one or more conversion states, wherein the cardinality of the set of one or more conversion states differs according to the quantization mode information, based on a surjective mapping dependent on the quantization mode information. Furthermore, the method includes performing quantizer selection by mapping a predetermined number of bits of the current conversion state (e.g., one or more bits at one or more predetermined bit positions, such as LSBs or bits at a second but not last significant bit position) to a default quantizer using a first mapping, regardless of the quantization mode information (e.g., unrelated to or independent of the quantization mode information); the predetermined number and the first mapping are equal regardless of the quantization mode information.

[0200] The methods described above are based on the same considerations as those for encoders / decoders. Incidentally, these methods can be implemented using all available features and functionalities, which are also described in terms of encoders / decoders.

[0201] One implementation relates to a data stream having images or videos encoded therein using the encoding methods described herein.

[0202] One implementation relates to a computer program having program code that, when the program code is running on a computer, executes the methods described herein. Attached Figure Description

[0203] The accompanying drawings are not necessarily drawn to scale; rather, they usually emphasize the principles of the invention through illustration. In the following description, various embodiments of the invention are described with reference to the following drawings, wherein:

[0204] Figure 1 Two different quantizers are shown;

[0205] Figure 2 The pseudocode illustrating the reconstruction procedure for the transformation coefficients is shown;

[0206] Figure 3 The pseudocode illustrates an alternative implementation of the reconstructing procedure for the transformation coefficients;

[0207] Figure 4 The pseudocode illustrating the reconstruction procedure for the transform coefficients of the transform block is shown;

[0208] Figure 5 Show the state transition table;

[0209] Figure 6 Indicate the encoding order;

[0210] Figure 7 This shows a local template of a probabilistic model that can be used to select one or more binary codes;

[0211] Figure 8 A decoder according to an embodiment is shown;

[0212] Figure 9 An implementation of context-adaptive binary arithmetic coding for effective value binary symbol codes is shown;

[0213] Figure 10 A conversion table according to the implementation method is shown;

[0214] Figure 11 Displays the pseudocode of the reconstruction procedure for the transform coefficients of the transform block according to the description of the implementation method;

[0215] Figure 12 The image and / or video encoder is shown;

[0216] Figure 13 Show image and / or video decoders; and

[0217] Figure 14 This shows the relationship between the reconstructed signal, the predicted residual signal, and the combination of the predicted signals. Detailed Implementation

[0218] In the following description, identical or equivalent components or components having the same or equivalent functions are represented by the same or equivalent component symbols (even if they appear in different figures).

[0219] In the following description, numerous details are set forth to provide a more complete illustration of embodiments of the invention. However, it will be apparent to those skilled in the art that embodiments of the invention can be implemented without these specific details. In other instances, well-known structures and apparatuses are shown in block diagram form without detail to avoid obscuring embodiments of the invention. Furthermore, unless specifically indicated otherwise, the different features of the embodiments described below can be combined with each other.

[0220] The following implementation will primarily describe the features and functions from the perspective of the decoder. However, it is obvious that the encoder may include the same or similar characteristics and functions; for example, the decoding performed by the decoder may correspond to the encoding of the encoder. Furthermore, the encoder may include the same features as the decoder in the feedback loop, for example, in prediction level 36.

[0221] Figure 8 This illustrates an implementation of decoder 20. Decoder 20 may optionally include features and / or functions as described in Section 2 (e.g., one or more features described in Sections 2.1 to 2.3).

[0222] Decoder 20 is configured to decode residual level 142 (representing the prediction residual) from data stream 14. Residual level 142 can be a quantization level representing the transform coefficients of the prediction residual. For example... Figure 1 As shown, residual level 142 can represent an integer multiple of quantization step size 144.

[0223] Decoder 20 is configured to sequentially dequantize 150 residual levels 142. The 150 residual levels 142 can be dequantized along the encoding order (i.e., scan order or reconstruction order). Different encoding orders are possible, and the encoding order can depend on the media signal, such as an image signal, video signal, or audio signal that will be decoded by decoder 20. Figure 6An example of encoding sequence 102 is shown, which can be used to decode image or video signals. According to one embodiment, decoder 20 can dequantize residual level 142 150, starting with the first non-zero transform coefficient of 150 (i.e., the first transform coefficient whose residual level in the encoding sequence is not equal to zero), and continuing to dequantize the residual levels 142 of subsequent transform coefficients of 150 in the encoding sequence until the final transform coefficient in the encoding sequence. The residual levels of transform coefficients in the encoding sequence prior to the first non-zero quantization index can be inferred to be equal to 0 by decoder 20.

[0224] Decoder 20 is configured to sequentially dequantize residual level 142 150 in the following manner: 152 Selecting quantizer 153 from the set 151 of default quantizers according to the current conversion state 220; dequantizing the current residual level 154 using quantizer 153 to obtain the dequantized residual value 104; and updating the current conversion state 158 based on the characteristics 157 of the current residual level obtained by applying a binary function 156 to the current residual level and based on the quantization mode information 180 included in the data stream 14. Dequantizing the current residual level 154 to obtain the dequantized residual value 104, wherein the quantizer 153 used for dequantization 154 depends on the current conversion state 220. After this dequantization 154, the current conversion state is updated 158 to obtain a new current conversion state, which may be used, for example, to dequantize the next residual level or to dequantize the current residual level again using the updated current conversion state (e.g., see the dequantization 150 of the first residual level below). The new current transition state depends, for example, on the current transition state and on the characteristic 157 of the current residual level. The characteristic 157 of the current residual level can represent the characteristics of the current residual level and not the characteristics of the next residual level. The transition state of a particular transform coefficient can depend on the transition state of the previous transform coefficients in the coding order and the residual level characteristic 157 of the previous transform coefficients.

[0225] During update 158, based on the surjective mapping dependent on the quantization mode information 180, the current conversion state is transformed from the domain of a combination 163 of a set 161 of one or more conversion states with the current residual level to the set 161 of one or more conversion states, wherein the cardinality l, m, n of the set 161 of one or more conversion states differs depending on the quantization mode information 180. For example, if the quantization mode information 180 indicates a first quantization mode, the set 161a of one or more conversion states has a cardinality l; if the quantization mode information 180 indicates a second quantization mode, the set 161b of one or more conversion states has a cardinality m; and if the quantization mode information 180 indicates a third quantization mode, the set 161c of one or more conversion states has a cardinality n. According to one implementation, the decoder 20 can be configured to use a set 161a of one or more transition states having a base l (e.g., l=1) or a set 161b of one or more transition states having a base m (e.g., m=4) based on the quantization mode information 180. Figure 10 Show three possible surjective mappings 106a, 106b, and 106c.

[0226] In one implementation, the binary function is parity.

[0227] exist Figure 8 In this context, the binary function can be referred to as a "path," and the first residual level feature can be associated with "path 0," while the second residual level feature can be associated with "path 1." According to one implementation, the decoder 20 is configured to obtain the parity of the residual level as a residual level feature 157. The decoder can be configured to determine whether the residual level has even-parity or odd-odd-even parity by applying the binary function 156 to the current residual level. For example, "path 0" can correspond to even-parity and "path 1" can correspond to odd-odd-even.

[0228] like Figure 8 As shown, decoder 20 is configured to perform selection 152 of quantizer 153 (regardless of the quantization mode information 180, for example, unrelated to or independent of quantization mode information 180) by mapping a predetermined number of bits of the current transition state 220 to the default quantizer using a first mapping 200, wherein the predetermined number and the first mapping 200 are equal regardless of the quantization mode information 180. The predetermined number of bits represents, for example, one or more bits of the current transition state 220 located at one or more predetermined bit positions (e.g., LSB or bits located at a second but not the last significant bit position).

[0229] According to one implementation, the default set of quantizers 151 (such as...) Figure 1 The diagram shown is composed of a first default quantizer 1511 and a second default quantizer 1512. The first default quantizer 1511 includes an even integer multiple of the quantization step size 144 as the reconstruction level 142, and the second default quantizer 1512 includes an odd integer multiple of the quantization step size 144 and zero as the reconstruction level 142.

[0230] According to one implementation, the first mapping 200 maps a current transition state 220 that is equal to or less than one to a first default quantizer 1511, and maps a current transition state 220 that is greater than one to a second default quantizer 1512. A predetermined number of bits may be one, and the decoder 20 may be configured to map a second bit (e.g., a second LSB) of the current transition state 220 to either the first default quantizer or the second default quantizer.

[0231] Figure 8 The decoder 20 shown is configured to reconstruct the media signal 170 using the dequantized residual value 104. According to one embodiment, the decoder 20 is configured to obtain a predicted version of the media signal by performing a prediction to perform reconstruction 170, and to correct the predicted version using the dequantized residual value 104; or to reconstruct the media signal by obtaining a predicted version of the media signal by performing a prediction using the dequantized residual value 104; to inversely transform the dequantized residual value 104 to obtain a media residual signal; and to correct the predicted version using the media residual signal.

[0232] As described above, residual level 142 is sequentially dequantized 150. There are different choices for the first residual level (i.e., the residual level of the first non-zero transform coefficients) used to dequantize 150, wherein decoder 20 can be configured to use one of these choices.

[0233] Decoder 20 can be configured to set the current conversion state 190, where the current residual level is the first residual level, to a predetermined value. For example, the predetermined value could be zero. Based on this predetermined current conversion state, selection 152 of quantizer 153 can be performed, and the first residual level is, for example, dequantized using the selected quantizer 153 154. Decoder 20 can be configured to apply a binary function 156 to the first residual level to obtain the characteristics of the first residual level as the characteristics of the current residual level 157, and update the current conversion state 158 based on the characteristics of the current residual level 157. According to a first selection, decoder 20 can be configured to use the updated conversion state as the current conversion state to perform dequantization 150 for the next residual level. According to a second selection, decoder 20 is configured to use the updated conversion state as the current conversion state and perform dequantization 150 for the first residual level again before performing dequantization 150 for the next residual level. Alternatively, according to the third option, decoder 20 can be configured to set the current conversion state 190, where the current residual level is the first residual level, to a predetermined value, and apply a binary function 156 to the first residual level to obtain the characteristics of the first residual level as the characteristics 157 of the current residual level. For example, the predetermined value can be zero. Furthermore, decoder 20 is configured to update the predetermined current conversion state 158 according to the characteristics 157 of the current residual level to obtain the current conversion state. Based on this current conversion state, selection 152 of quantizer 153 can be performed, and the first residual level is, for example, dequantized using the selected quantizer 153 154. Furthermore, decoder 20 can be configured to perform update 158 again to obtain the current conversion state for the next residual level.

[0234] According to one implementation, decoder 20 is configured to update the current conversion state 158 using a transformation table 106 to be used. For example, decoder 20 is configured to sequentially dequantize residual level 150 142 by: selecting quantizer 153 from a set of default quantizers 151 based on the current conversion state; dequantizing the current residual level 154 using quantizer 153 to obtain the dequantized residual value 104; applying a binary function 156 to the current residual level to obtain the characteristics 157 of the current residual level; and updating the current conversion state 158 using the transformation table 106 to be used and based on the characteristics 157 of the current residual level. The decoder can be configured to select a default transformation table as the transformation table to be used from a set 159 of default transformation tables 106a, b, c, based on quantization mode information 180 included in data stream 14. Each transformation table 106a, b, c represents a domain surjective mapping from a set 163 of one or more transformation states with characteristics 157 of the current residual level to a set 161 of one or more transformation states, wherein the difference between these default transformation tables lies in the cardinality l, m, n of the set 161 of one or more transformation states. Furthermore, the decoder 20 is configured, for example, to perform a quantizer selection 152 (regardless of which default transformation table is selected as the transformation table to be used), which is performed by mapping a predetermined number of bits of the current transformation state 220 to the default quantizer using a first mapping 200, wherein the predetermined number and the first mapping 200 are equal regardless of which default transformation table is selected as the transformation table to be used.

[0235] According to one implementation, the set 159 of default conversion tables 106a, b, and c includes two or more of the following:

[0236] The first default transition table 106a has a cardinality of one for the set of one or more transition states.

[0237] The second default transition table 106b has a cardinality of four for the set of one or more transition states.

[0238] The third default transition table 106c has a cardinality of eight for the set of one or more transition states.

[0239] According to one implementation, the set 159 of default transformation tables 106a, b, c includes: a first default transformation table 106a, wherein the cardinality of the set of one or more transformation states is one; and a second default transformation table 106b, wherein the cardinality of the set of one or more transformation states is four.

[0240] In other words, based on the quantization pattern information 180, the cardinality l, m, and n of the surjective mapping and the set 161 of one or more transition states can be selected from two or more of the following: the cardinality l of the set 161a of one or more transition states is one, the cardinality m of the set 161b of one or more transition states is four, and the cardinality n of the set 161c of one or more transition states is eight. According to one embodiment, the cardinality l, m, and n of the surjective mapping and the set 161 of one or more transition states can be selected between the cardinality l of the set 161a being one and the cardinality m of the set 161b of one or more transition states being four.

[0241] According to one implementation, decoder 20 is configured to manage a set 159 of default transformation tables 106a, b, c as different parts of a unified transformation table; in the unified transformation table, for each default transformation table 106a, b, c, each of a set 161 of one or more transformation states is indexed using a state index that is different from the state index used to index any other default transformation table in the unified transformation table (e.g., for the transformation states of default transformation tables in different parts of the unified transformation table, the default transformation tables do not intersect with each other).

[0242] According to one implementation, the decoder 20 is configured to perform an update 158 to the current conversion state 220, for example, by looking up an item in the unified conversion table corresponding to the combination 163 of the current residual level and the current conversion state 220, based on the characteristics 157 of the current residual level and using the conversion table 106 of the next conversion state 162 to be used in the next inverse quantization of the residual level.

[0243] According to one implementation, the quantization mode information 180 includes a syntax element in the data stream that represents the starting transition state for dequantizing the first residual level in a sequential dequantization order (e.g., sequential dequantization along this order). This syntax element indicates the transition table to be used from the default transition table by fitting a state index to a portion of a unified transition table that corresponds only to the transition table to be used.

[0244] According to one implementation, the media signal is video, and the decoder 20 is configured to read quantization mode information 180 from the data stream 14 and perform a selection of a default conversion table 106 from a set of default conversion tables in one of the following ways: once for video, per-picture block, per-picture, per-slice, and per-picture sequence.

[0245] In other words, decoder 20 can be configured to read quantization mode information 180, which controls the updating to be performed in one of the following ways: once for video, per image block, per image, per slice, and per image sequence.

[0246] According to one implementation, the media signal is color video, and the decoder 20 is configured to use different versions of a set 151 of default quantizers for different color components.

[0247] Decoder 20 and / or the corresponding encoder may include features and / or functions as described in one or more of the following embodiments.

[0248] This invention discloses a decoder, an encoder, and a method for supporting multiple variations of dependent quantization in a unified architecture. Specifically, the invention describes a concept in which entropy decoding and reconstruction procedures (e.g., media signal reconstruction 170) are substantially identical for all supported quantization methods, i.e., independent of quantization mode information 180, for example, selecting only state transition table 106 based on the quantization method chosen by the encoder and transmitted within the bitstream (i.e., data stream 14). In a preferred embodiment of the invention, three quantization methods are supported, which can be indicated by quantization mode information 180:

[0249] Traditional independent stoichiometry;

[0250] • Dependent quantization with 4 states (i.e., transition states); and

[0251] • Dependency quantization with 8 states (i.e. transition states).

[0252] In another implementation, additional variations of dependency quantization with more than 8 states (e.g., 16 states) are supported. In yet another implementation, only conventional quantization and versions of dependency quantization with more than 4 states are supported. In yet another implementation, two or more variations of dependency quantization, all with more than 4 states, are supported. According to another aspect, only conventional quantization and dependency quantization with 4 states are supported.

[0253] One aspect of the invention is to design all decoder operations to be independent of the actual quantization method used. In this aspect, the choice of the quantization method depends on the selection of the state transition table 106. Once the state transition table 106 is given, the decoding procedure becomes independent of the selected quantization method.

[0254] The advantages of this invention are as follows:

[0255] • By supporting dependent quantization with more than 4 states, coding efficiency can be improved due to the denser and more compact reconstructable points in the N-dimensional signal space (as shown in the literature).

[0256] • By supporting different variants of dependent quantization (differences in the number of states), the encoder is given the freedom to choose variants, providing the most appropriate trade-off between coding efficiency and implementation complexity in its application domain. It should be noted that encoder complexity depends on the number of quantization states supported, i.e., on the cardinality l, m, n of the set 161 of one or more transition states. While dependent quantization with 8 states yields higher coding efficiency than dependent quantization with 4 states, it also requires higher encoder complexity.

[0257] • By designing a unified decoder procedure for all supported quantization methods, virtually no additional implementation complexity is required on the decoder side. It should be noted that decoding complexity is almost independent of the number of quantization states. However, if different methods must be supported, the decoder complexity will increase. By unifying the decoding procedure for all supported quantization methods, the decoder implementation complexity is almost invariant compared to supporting a single method of dependent quantization.

[0258] 5.1 Basic Concepts of the Invention

[0259] In VTM-7, dependent quantization with four states is specified, along with the following state transition table 106, for example, the state transition table 106b representing a set 161b of one or more transition states where the cardinality m is four:

[0260]

[0261] In VTM-5, the path is given by the parity check of the current transform coefficient level (i.e., the current residual level (or quantization index) in coding order 102). With level[k] representing the current transform coefficient level, the variable path is determined as follows:

[0262] path = (level[k] &1),

[0263] Here, "&" represents the bitwise "sum" operator in two's complement arithmetic. As mentioned above, the path can be any binary function of the quantization index. Nevertheless, using parity checking is preferred.

[0264] In the VTM-7 decoding process, some operations depend on state variables (i.e., state transitions). Specifically, the following three aspects:

[0265] The quantizer 153 selected for reconstructing the transform coefficients depends on the current transform state 220. In VTM-7, the quantizer identifier (which can be zero or one) is given as QId = state >> 1.

[0266] Given the current value of the state variable and the current quantization index level[k], the reconstructed transform coefficients trec[k] (i.e., the dequantized residual value 104) are obtained as follows:

[0267] if ( level[ k ] != 0 ) {

[0268] n = 2 * level[ k ] + ( level[k] > 0 ? −(state>>1) : (state>>1)

[0269] trec[ k ] = ( n * scale[ k ] + add ) >> shift

[0270] } else {

[0271] trec[k] = 0

[0272] }

[0273] The second line within the if branch represents the integer variable multiplied by the quantization step size 144. The expression (state>>1) indicates the quantizer 153 used; for example, (state>>1) indicates the first mapping 200. The operator ">>" indicates a right shift of bits.

[0274] ·See Figure 9 The context model (i.e., context 242) used to encode the significance bin (i.e., the significance binary 92) depends on the state variable (i.e., the current transition state 220). In VTM-7, this depends on the value 230 of max(state-1,0) and optionally on other variables. This can be interpreted as using three different sets of context models 242. The first set is for the transition coefficient level (i.e., the residual level 142), where the state variable 220 equals 0 or 1; the second set is for the transition coefficient level 142, where the state variable 220 equals 2; and the third set is for the transition coefficient level 142, where the state variable 220 equals 3.

[0275] The parameter pos0 (e.g., representing binaryization parameter 302) used to encode the syntax element dec_abs_level (the level of transform coefficients encoded in bypass mode) depends on the quantization state (i.e., the transformation state specified to the individual residual level). In VTM-7, the variable pos0 is determined as follows:

[0276] pos0 = (state <2 ?1:2) << RPabs

[0277] Where RPabs represents the Rice parameter selected based on the sum of the absolute transformation coefficients in the local neighborhood region.

[0278] 5.1.1 Another variation of adding dependency quantification

[0279] At this point, for example, additional variants of dependent quantization with eight states should be supported in the bitstream syntax and decoding procedure. This variant can use the following state transition table 106c (e.g., a set of one or more transition states 161c when the base n is eight):

[0280]

[0281] For this variant, quantizer 153 is given as QId = state >> 2.

[0282] Conceptually, two quantizers that are separate from the quantizers selected in VTM-7 would be preferred.

[0283] See Figure 9 For the valid value flag 92, more than three distinct context sets 242 would be preferred. Using the same relation as the 4-state variant (i.e., min(state-1,0)), seven context sets 242 would be required. The number of context sets 242 could be limited to three, but then a different rule than that used for the 4-state variant must be applied.

[0284] Furthermore, the derivation of the pos0 variable (i.e., binary parameter 302) in VTM-7 (used to encode dec_abs_level) depends on the quantizer 153 used. For quantizer 1511, it is set to equal to

[0285] pos0 = 1 << RPabs,

[0286] As for the second quantizer 1512, it is set to equal to

[0287] pos0 = 2 << RPabs.

[0288] Therefore, a different implementation will be required for the 8-state variant.

[0289] 5.1.2 Standardization of Decoding Programs

[0290] The idea behind the proposed concept is to unify the decoding procedure for all supported quantization variants. Residual-level quantization variants can be indicated by quantization mode information 180. A first observation allowing for unification is that quantization states (i.e., transition states) can be relabeled without affecting the results of the reconstruction procedure. For example, this can be achieved using the VTM-7 state transition table given below.

[0291]

[0292] It can be rewritten as

[0293]

[0294] Here, the meanings of states 1 and 2 are swapped. For the original table, quantizer 153 is given by QId = state >> 1. For the redefined table 106, quantizer 153 is given by QId = state & 1, where "&" represents the bitwise "AND" operator.

[0295] In a similar manner, the state transition table 106 for the 8-state version (or any other variant of dependent quantization) can be reformulated so that the same relation (i.e., the first mapping 200) can be used to derive the quantizer identifier (i.e., the quantizer 153 to be used).

[0296] To further unify the decoding process, a compromise must be made between encoding efficiency and implementation complexity. For example, for entropy encoding with a valid value flag of 92, it is not possible to select the best version suitable for all supported quantizer variants, but a unified version can still be designed, even if it is a suboptimal approach for some of the supported dependent quantization variants.

[0297] 5.1.3 Signaling for the selected quantization variant

[0298] Finally, the selected quantizer variant (i.e., the quantizer 153 to be used) must be specified within the bit stream (i.e., the data stream 14). For this purpose, several variants are possible:

[0299] • It can be selected at the block level (e.g., per coding tree unit or coding unit); in this case, each corresponding block must transmit dedicated syntax elements;

[0300] • It can be selected at the slice or image level (or, tile or tile group level); in this case, special syntax elements must be transmitted in the slice or image header (or, tile or tile group);

[0301] • It can be selected at the sequence level; in this case, special syntax elements must be transmitted within the sequence parameter set or similar syntax structure.

[0302] In one implementation, different quantizers can be used for different color components (e.g., different quantizers can be used for luminance and chrominance).

[0303] 5.2 Description of Specific Implementation Methods

[0304] Embodiments of the invention will be described in more detail below. However, it should be noted that other embodiments are also possible (as described above and in part below). The invention is not limited to the specific design described below.

[0305] The invention is characterized by a combination of two or more of the following aspects:

[0306] • A bitstream syntax and decoder that supports one or more variants of independent quantization and dependent quantization, wherein at least one variant of dependent quantization uses 4 or more quantization states;

[0307] The quantization variant used is indicated by a dedicated syntax element transmitted at the block, slice, image, or sequence level. In the preferred version, it is transmitted at the image header.

[0308] The quantization state of the transformation coefficients is derived through a state transition procedure (i.e., surjective mapping), which consists of the following steps:

[0309] o sets the state (i.e., the transition state) of the first transform coefficient (i.e., the first residual level) in the encoding sequence to a predetermined value; in a preferred version, it is set to 0.

[0310] Based on the states of the previous transform coefficients in the encoding order and the binary function of the values ​​of the quantization indices of the previous transform coefficients (i.e., the binary function of the values ​​of the previous residual levels), the state of the current transform coefficient (i.e., the current residual level) is derived. In a preferred version, the binary function represents parity, meaning the current state is given by the parity of the previous states and the previous quantization indices (i.e., the previous residual levels).

[0311] o State transition procedure (i.e., surjective mapping), which determines the current state 220 based on the previous state, and the binary function (preferably parity check) of the previous quantization index is indicated by state transition table 106.

[0312] o Selecting the state transition table 106 is based on the actual quantization variant selected (indicated in the bit stream, for example, via quantization mode information 180). However, for a given state transition table 106, the state transition procedure (e.g., the binary function used) is independent of the selected quantizer variant.

[0313] ·support Figure 1 The two scalar quantizers shown are (e.g., quantizer 1511 and quantizer 1512), and the quantizer 153 used for the current transform coefficients is uniquely determined by the quantizer state:

[0314] The same mapping from state 220 to the quantizer identifier (0 or 1) (i.e., the first mapping 200) is used for all supported quantization variants. In the preferred version, the quantizer identifier is given by qId = state &1.

[0315] The reconfigurable level 142 of the quantizer 1511 (qid equals 0) includes all even integer multiples of the quantization step size 144.

[0316] The permissible refactoring level 142 of the second quantizer 1512 (qid equals 1) includes all odd integer multiples of the quantization step size 144, as well as an additional refactoring level equal to 0.

[0317] For example, see Figure 9 The quantization index (i.e., residual level 142) is encoded using binary arithmetic coding, where the binaryization 300 includes at least one binary symbol (preferably a valid value flag 92, indicating whether the quantization index is zero or non-zero). The probabilistic model (or context model 242) selected for this purpose depends on the quantization state (i.e., the current transition state 220) of the corresponding transform coefficient (i.e., the current residual level). Therefore, the same method used to derive the context model 242 is applied to all supported quantization variants. This means that the context model derivation of the corresponding binary symbol depends on state 220, but it does not depend on the selected quantization variant, i.e., it is independent of the quantization mode information 180.

[0318] The following describes specific implementations that support independent quantization, dependent quantization with 4 states, and dependent quantization with 8 states.

[0319] 5.2.1 High-level signaling

[0320] According to one implementation, such as Figure 8As shown, the media signal is video, and the quantization mode information 180 in data stream 14 includes a first syntax element 182 (e.g., pps_dep_quant_enabled_idc) indicating whether the video or a portion of the video is selected from a set 159 of default conversion tables 106a, b, c. A default conversion table 106 is controlled within the video or the portion of the video via a second syntax element 184 (e.g., pic_dep_quant_idc) of the quantization mode information 180 in data stream 14, or which of the set 159 of default conversion tables 106a, b, c will be selected as a default conversion table 106 for the portion of the video.

[0321] In other words, the media signal is video, and the quantization mode information 180 in data stream 14 includes a first syntax element 182 (e.g., pps_dep_quant_enabled_idc), which indicates whether the video or a portion of the video is updated 158 within the video or the portion thereof via a second syntax element 184 (e.g., pic_dep_quant_idc) of the quantization mode information 180 in data stream 14, or which of the surjective mappings and the cardinality l, m, n of the set 161 of one or more transition states will be selected for the update 158.

[0322] According to one embodiment, when the portion is video, a first syntax element 182 is included within a set of video parameters in data stream 14, and a second syntax element 184 controls the selection of a default transformation table 106 from a set 159 of default transformation tables 106a, b, c, on a unit basis, such as image sequences, images, tiles, slices, coded tree blocks, coded blocks, or residual transform blocks. Alternatively, when the portion is an image sequence, a first syntax element 182 is included within a set of sequence parameters in data stream 14, and a second syntax element 184 controls the selection of a default transformation table 106 from a set 159 of default transformation tables 106a, b, c, on a unit basis, such as image sequences, tiles, slices, coded tree blocks, coded blocks, or residual transform blocks. Alternatively, when the portion is one or more images, the first syntax element 182 is included within the image parameter set in the data stream 14, and the second syntax element 184 controls the selection of a default transformation table 106 from the set 159 of default transformation tables 106a, b, and c, on a unit basis, such as an image, tile, slice, coded tree block, coded block, or residual transform block. Alternatively, when the portion is an image, the first syntax element 182 is included within the image header in the data stream 14, and the second syntax element 184 controls the selection of a default transformation table 106 from the set 159 of default transformation tables 106a, b, and c, on a unit basis, such as a tile, slice, coded tree block, coded block, or residual transform block. Alternatively, when the portion is a coded tree block, the first syntax element 182 is included within the parameter set in the data stream 14, and the second syntax element 184 controls the selection of a default transformation table 106 from the set 159 of default transformation tables 106a, b, and c, on a unit basis, such as a coded block or residual transform block. In the case of coding tree blocks, selection can be controlled in units such as: uniformly pre-subdividing an image into units before dividing each coding tree block into coding blocks using recursive multi-tree subdivision. In the case of coding blocks, selection can be controlled in units such as: making intra-image / inter-image pattern determinations.

[0323] In other words, when the portion is video, the first syntax element 182 is included within the video parameter set in data stream 14, and the second syntax element controls update 158 in units of image sequences, images, tiles, slices, coded tree blocks, coded blocks, or residual transform blocks. Alternatively, when the portion is an image sequence, the first syntax element 182 is included within the sequence parameter set in data stream 14, and the second syntax element controls update 158 in units of images, tiles, slices, coded tree blocks, coded blocks, or residual transform blocks. Alternatively, when the portion is one or more images, the first syntax element 182 is included within the image parameter set in data stream 14, and the second syntax element controls update 158 in units of images, tiles, slices, coded tree blocks, coded blocks, or residual transform blocks. Alternatively, when the portion is an image, the first syntax element 182 is included within the image header in data stream 14, and the second syntax element controls update 158 in units of tiles, slices, coded tree blocks, coded blocks, or residual transform blocks. Alternatively, when the portion is a coded tree block, the first syntax element 182 is included within the parameter set in data stream 14, and the second syntax element controls update 158 in units of coded blocks or residual transform blocks. In the case of coded tree blocks, update 158 can be controlled in units such as uniformly pre-subdividing an image before dividing each coded tree block into coded blocks via recursive multi-tree subdivision. In the case of coded blocks, updates can be controlled in units such as determining intra-image / inter-image patterns.

[0324] In one version, the selected quantization method is indicated by a syntax element (i.e., second syntax element 184) encoded in the image header. This syntax element 184 may be called pic_dep_quant_idc and may take one of three values, for example, indicating which of the surjective mappings and which of the cardinalities l, m, n of a set 161 of one or more transformation states will be selected for updating 158 (e.g., indicating which set 159 of default transformation tables 106a, b, c will be selected as a default transformation table 106 for the portion of the video):

[0325] A value of 0 indicates that traditional independent scalar quantization is used for the current image (e.g., indicating that set 161a has a cardinality l equal to to1);

[0326] A value of 1 indicates that a dependent quantization with 4 states is used for the current image (e.g., it indicates that set 161b has a cardinality m equal to 4);

[0327] A value of 2 indicates that the dependent quantization with 8 states is used for the current image (e.g., it indicates that set 161c has a cardinality n equal to 8).

[0328] Furthermore, similar to VTM-7, the existence of image header syntax elements is indicated by the image parameter set (PPS) syntax element pps_dep_quant_enabled_idc. This syntax element (i.e., the first syntax element 182) can be encoded using a 2-bit fixed-length code and can have the following semantics:

[0329] A value of 0 indicates that pic_dep_quant_idc exists in the image header (e.g., indicating that update 158 is controlled within the video or the aforementioned portion of the video via the second syntax element 184);

[0330] A value of 1 indicates that pic_dep_quant_idc does not exist in the image header, but for the entire image referenced to the image parameter set, it is inferred to be equal to 0 (independent scalar quantization) (e.g., indicating that the cardinality l of set 161a is equal to 1);

[0331] A value of 2 indicates that pic_dep_quant_idc does not exist in the image header, but for the entire image referenced to the image parameter set, it is inferred to be equal to 1 (dependent quantization with 4 states) (e.g., indicating that the cardinality m of set 161b is equal to 4).

[0332] A value of 3 indicates that pic_dep_quant_idc does not exist in the image header, but for the entire image referenced to the image parameter set, it is inferred to be equal to 2 (dependent quantization with 8 states) (e.g., indicating that the cardinality n of set 161c is equal to 8).

[0333] Similar to VTM-7, if the image parameter set flag `constant_slice_header_params_enabled_flag` is equal to 1, then `pps_dep_quant_enabled_idc182` exists in the image parameter set. If the image parameter set flag `constant_slice_header_params_enabled_flag` is equal to 0, then the image parameter set syntax element `pps_dep_quant_enabled_idc182` does not exist in the image parameter set, but it is inferred to be equal to 0 (in this case, `pic_dep_quant_idc184` is encoded in the image header).

[0334] 5.2.2 State Transition Table

[0335] Based on the value of the image header syntax element pic_dep_quant_idc (or any similar syntax element) (the transmitted value or the inferred value), state transition table 106 can be selected. For example... Figure 10 As shown, the three state transition tables 106a, b, and c can support three quantization-enabled variants. State transition tables 106a, b, and c are shown as examples (the actual state transition tables used can deviate from these examples).

[0336] According to one implementation, the decoder 20 and / or the corresponding encoder use only state transition tables 106a and 106b.

[0337] 5.2.3 State Transition

[0338] For each transform block 112, the initial state is set to 0.

[0339] The transform coefficients (i.e., residual level 142) of transform block 112 are processed according to a predetermined encoding order 102. Given the state (currState) of the current transform coefficient (i.e., the current transformation state 220) and the quantization index (also called the transform coefficient level or residual level) of the current transform coefficient (currLevel), the state (nextState) of the next transform coefficient in the encoding / processing order is derived as follows:

[0340] nextState = stateTransTab[ currState ][ currLevel &1 ] ,

[0341] For example, this represents a surjective mapping, where stateTransTab represents state transition table 106 determined by the selected quantization variant. Here, the parity check of the quantization index (currLevel &1) determines the path variables (see the state transition table above). Alternatively, any other binary function of the quantization index (see above) may be used instead of parity check.

[0342] 5.2.4 Reconstruction of Transformation Coefficients

[0343] The quantizer 153 used for the current transformation coefficients (i.e., the current residual level) is uniquely indicated by the value of the state variable (i.e., the current transformation state 220). The quantizer identifier QId is derived as follows:

[0344] QId = state &1,

[0345] The first mapping 200 is represented, where & represents the bitwise AND operator. A quantizer 1511 with QId = 0 includes even integer multiples of the quantization step size 144 as the refactorable level 142. A quantizer 1512 with QId = 1 includes odd integer multiples of the quantization step size 144 and values ​​equal to 0 as the refactorable level 142.

[0346] A preferred example of a reconstruction procedure for the transform coefficients of a single transform block is shown in [the diagram]. Figure 11 In pseudocode using the C language form.

[0347] Figure 11 The pseudocode shown illustrates the reconstruction procedure for the transform coefficients of transform block 112. The array `level` represents the level of transform coefficients transmitted for transform block 112 (i.e., the transmitted residual level 142 (quantization index)), and the array `trec` represents the corresponding reconstructed transform coefficients 104. The two-dimensional table `state_trans_table` represents the state transition table 106 (e.g., selected based on higher-level syntax elements such as `dep_quant_idc`).

[0348] exist Figure 11 In the pseudocode, index k indicates the reconstruction order 102 of the transform coefficients (i.e., residual level 142). Note that in the example code, index k decreases according to the reconstruction order. The index of the final transform coefficient is equal to k=0. The first index kstart indicates the reconstruction index (or more precisely, the dereconstruction index) of the first reconstructed transform coefficient. The variable kstart can be set to be equal to the number of transform coefficients in the transform block minus 1, or it can be set to be equal to the index of the first non-zero quantization index in the encoding / reconstruction order 102 (e.g., the position of the first non-zero quantization index if transmitted in the applied entropy coding method). In the latter case, all previous transform coefficients (in the case of index k>kstart) are inferred to be equal to 0. The quantization index (i.e., residual level 142) is represented by level[k], and the associated reconstructed transform coefficient (i.e., dequantized residual level 104) is represented by trec[k]. The state variable (i.e., the current transformation state 220) is represented by state. The state transition table 106 is represented by a two-dimensional array state_trans_table[][]. In cases where the table state_trans_table[][] is used instead to determine the next state, arithmetic operations that produce the same result can be used.

[0349] `quant_step_size[k]` represents the quantization step size of 144 for the transform coefficient at index k. It should be noted that different quantization step sizes of 144 can be used for different transform coefficient positions k (as given by the combination of the quantization weight matrix and the block quantization parameters). As mentioned above, multiplication of non-integer quantization step sizes is typically implemented using integer arithmetic, for example:

[0350] trec[ k ] = ( n * scale[ k ] + add ) >> shift

[0351] The quantization step size of 144 is basically given by the following:

[0352] 5.2.5 Entropy Coding of Quantization Index (or Transform Coefficient Level)

[0353] In the preferred version (see) Figure 9 The quantization index is encoded using binary arithmetic encoding similar to H.264 | MPEG-4 AVC or H.265 | MPEG-H HEVC.

[0354] For this purpose, the non-binary quantization index 90 is first mapped to a series of binary decisions (which are commonly referred to as binary symbols). The quantization index is transmitted in terms of absolute value and sign (for cases where the absolute value is greater than 0). In the preferred version, the same binaryization as in VTM-7 is used.

[0355]

[0356] Transmit the following binary and non-binary syntax elements:

[0357] • sig_flag 92 indicates whether the absolute value |q| of the coefficient level is greater than 0;

[0358] • If sig_flag 92 equals 1, then gt1_flag 96 indicates whether the absolute value |q| of the transformation coefficient level is greater than 1;

[0359] • If gt1_flag 96 equals 1, then par_flag 94 indicates the parity check of the absolute value |q| at the transform coefficient level, and gt3_flag 98 indicates whether the absolute value |q| at the transform coefficient level is greater than 3;

[0360] • If gt3_flag 98 equals 1, then the non-binary value rem 99 indicates the remainder of the absolute level |q|. This syntax element is transmitted using Golomb-Rice codes in bypass mode of an arithmetic encoder.

[0361] Non-existent syntax elements are inferred to be equal to 0. On the decoder side, the absolute values ​​at the transform coefficient level are reconstructed as follows:

[0362] |q| = sig_flag + gt1_flag + par_flag +2 * ( gt3_flag + rem )

[0363] For non-zero transform coefficient levels (indicated by sig_flag 92 equal to 1), sign_flag is additionally transmitted in bypass mode, which indicates the sign of the transform coefficient level.

[0364] Apart from the two aspects described below, the encoding order 102 of the binary code and the context model are essentially the same as in VTM-7. Furthermore, the same worst-case concept is used to limit the number of context-encoded binary codes.

[0365] Figure 9 Displays the initial range 90 for the absolute values ​​used in residual level 142. This initial range 90 can include all integer values ​​between zero and some maximum values. The initial range 90 can also be a range open to larger values. The number of integer values ​​in the initial range 90 does not need to be a power of 2. Furthermore, Figure 9 Display the various binary symbol types (i.e., those representing the absolute values) of the individual residual level 142. There exists a type `sig_flag 92` that indicates whether the absolute value of a specific residual level is zero or non-zero. That is, `sig_flag 92` divides the initial value range 90 into two sub-parts; one part includes only zero, while the other includes all other possible values. Specifically, if the latter is exactly zero (e.g., ...), the absolute value is zero. Figure 9 As shown below), sig_flag 92 uniquely represents the absolute value of the residual level. The non-zero values ​​of the initial range 90 form range 96, which is further bisected by the binary symbol type gt1_flag 96; that is, one part includes only one, while the other part includes all other possible values. The next flag, par_flag 94, divides the resulting range (including all values ​​greater than one) into one part of odd values ​​and another part of even values. For a specific residual level 142, par_flag 94 is only required if the latter is greater than one. par_flag 94 does not produce uniqueness relative to one of the halves into which range 94 is also bisected. It indicates one half as the range of the next result (recursively defined), and therefore the next flag (i.e., gt3_flag 98) further bisectes this resulting range after par_flag 94. Figure 9As shown below, this means that if the latter is exactly zero, only sig_flag 92 is encoded for a specific transform coefficient's residual level; and if the latter is exactly one, both sig_flag 92 and gt1_flag 96 are encoded for a specific transform coefficient's residual level. If the latter falls within the range of absolute values ​​from 2 to 5, all flags sig_flag 92, gt1_flag 96, par_flag 94, and gt3_flag 98 are encoded to represent a specific residual level for a specific transform coefficient; furthermore, for residual levels of transform coefficients whose absolute values ​​fall outside the initial value range of 90, the remaining portion 99 is encoded.

[0366] 5.2.5.1 Context selection for valid value flags

[0367] Figure 9 This illustrates an implementation of context-adaptive binary arithmetic coding (CABAC) for the valid value binary symbol code 92. According to one implementation, the decoder 20 (shown in...) Figure 8 The decoder 20 is configured to use context-adaptive binary arithmetic decoding 240 with the binary symbol code of the current residual level 300 to decode the current residual level 210 from the data stream 14, the binary symbol code including a valid value binary symbol code 92 indicating whether the current residual level is zero or non-zero. The decoder 20 can be configured to select a first context 242 for decoding the first binary symbol code (i.e., the valid value binary symbol code 92) of the current residual level based on a value 230 obtained through mapping, wherein the mapping is using a second mapping 202 to map a further predetermined number of bits (e.g., LSBs) of the current transition state 220 to the value 230. The second mapping 202 can be equal regardless of the quantization mode information 18, for example, regardless of which of the default transition tables 106a, b, c is selected as the transition table 106 to be used. A further predetermined number of bits represent one or more bits of the current transition state 220, for example, located at one or more predetermined bit positions (e.g., LSB or bits located at the second but not the last significant bit position).

[0368] According to one implementation, a further predetermined number of bits is two, representing, for example, the LSB (last significant bit) and the bit located at the second but not last significant bit position. Value 230 can be generated from the second mapping 202, which is either max(state-1,0) or max(0, (state&3)-1) as shown in Section 5.1. Alternative mapping methods are possible.

[0369] For a valid value flag (i.e., a valid value binary symbol 92), the chosen probability model (i.e., a context model or context 242) depends, for example, on:

[0370] • Is the current transform block 112 a luminance or chrominance transform block?

[0371] • The transformation state of interdependent quantification;

[0372] • The x and y coordinates of the current transform coefficient (the current residual level indicates the residual level of the current transform coefficient);

[0373] • The absolute residual value of partial reconstruction in the local neighborhood region (after the first pass 601).

[0374] The variable `state` represents the state used for the current transform coefficient (i.e., the current transform state 220). As explained above, the state 220 used for the current transform coefficient is given by the state used for the previous coefficients in the encoding sequence 102 and the parity check (or more generally, the binary function) of the previous transform coefficient level.

[0375] Given that x and y are the coordinates of the current transform coefficient within transform block 112, let diag = x + y be the diagonal position of the current coefficient. Given the diagonal position, the diagonal category index dsig is derived as follows:

[0376] dsig = ( diag < 2 ? 2 : ( diag < 5 ? 1 : 0 ) ) for the brightness transformation block

[0377] as well as

[0378] dsig = ( diag < 2 ? 1 : 0 ) for chroma transform block

[0379] The ternary operator (c ? a : b) represents an if-then-else statement. If condition c is true, the value a is used; otherwise, the value b is used (c is false).

[0380] Context 242 can depend on the absolute value of the partial reconstruction within the local neighborhood region. For example, in VTM-7, the local neighborhood region can be given by template T132, such as... Figure 7 As shown. However, other templates 132 are possible. The sample 132 used can also depend on whether luma or chroma blocks are encoded. Let sumAbs be the sum of the absolute values ​​of the partial reconstructions in template T132 (after the first pass 601):

[0381]

[0382] Where abs1[k] represents the absolute level of the partial reconstruction of index k after the first pass. In the binary form of VTM-7, it is given as follows:

[0383] abs1[k] = sig_flag[k] + gt1_flag[k] + par_flag[k] +2 * gt3_flag[k].

[0384] It should be noted that abs1[k] is equal to the value coeff[k] obtained after the first scan cycle 601 (see above).

[0385] Assume that the possible probabilistic models used for sig_flag92 (i.e., context 242) are of the structure of a one-dimensional array. Let ctxIdSig be the index identifying the probabilistic model 242 used. The context index ctxIdSig (e.g., representing the index of context 242) can be derived as follows:

[0386] If the transform block is a brightness block

[0387] ctxIdSig = min( (sumAbs+1)>>1, 3 ) + 4 * dsig +12 * state2CtxSet(state & 3 )

[0388] If the transform block is a chroma block

[0389] ctxIdSig = 36 + min( (sumAbs+1)>>1, 3 ) + 4 * dsig + 8 * state2CtxSet( state & 3 )

[0390] Here, the operator ">>" represents a right shift of bits (two's complement arithmetic). This operation is the same as dividing by two and rounding the result down to the next integer.

[0391] It should be noted that the state (i.e., the current transition state 220) is first mapped to a value between 0 and 3 (inclusive). This is achieved by performing a bitwise AND operation with 3 (i.e., state & 3). Next, the function state2CtxSet(..) maps this value to one of the values ​​230 (0, 1, 2). In a preferred embodiment, the function is given as follows:

[0392]

[0393] According to this implementation, the second mapping 202 can be understood as two consecutive mappings, in which the current transition state 220 is first mapped to a first value, and then this first value is mapped to a value 230 (the choice of context 242 depends on this value 230).

[0394] It should be noted that the context index depends on state 220, but not on the quantization method 180 used.

[0395] It should be noted that other structures for the context model (i.e., different contexts 242) are possible. However, in any case, the probabilistic model (i.e., context 242) chosen by encoding sig_flag92 depends on:

[0396] • Whether to encode luminance or chrominance blocks;

[0397] • State variable 220 (but the same function is used, for example, for all supported quantization variants);

[0398] • Diagonal category dsig;

[0399] • The sum of the absolute values ​​of the partial reconstructions within local template 132 (after the first pass 601), specifically...

[0400] min((sumAbs+1)>>1,3).

[0401] 5.2.5.2 Mapping parameters for transform coefficient level after bypass coding

[0402] According to one implementation, the media signal is video, and the decoder 20 (displayed on) Figure 8 The data stream 14 is configured to decode the residual level of one image block 84 (e.g., representing transform coefficient block 112) before the residual level of another image block 84, while decoding residual level 142 (e.g., 210) from data stream 14. Figure 6 (As shown below). Decoder 20 can be configured to sequentially decode 210 the binary codes of the binary representation 300 of the residual level 142 of the image block 84 in one or more scans 60 (i.e., scans along the encoding order 102), using context-adaptive binary arithmetic decoding for a predetermined number of preceding binary codes of the binary representation 300 of the residual level 142, and using an equal-probability bypass mode for subsequent binary codes of the binary representation 300 of the residual level 142. Figure 9As shown, for example, the effective value binary code 92, the parity binary code 94, the binary code 96 greater than one, and the binary code 98 greater than three are decoded in the first scan 601 (i.e., the first pass), and the remaining binary code 99 is encoded in the second scan 602. Alternatively, the residual level 142 can be decoded in one scan 60 or three or more scans 60. Figure 9 An exemplary transform coefficient block 112 is shown, wherein the transform coefficients are scanned along the encoding order 102 and begin at the first non-zero residual level 120. Because residual level 304 represents the final residual level after a predetermined number of leading binary symbols has not been exceeded, the binary symbols of residual level 146 are decoded using CABAC up to residual level 304, and the binary symbols of residual level 144 are encoded using an equal-probability bypass mode. Decoder 20 can be configured to map a further predetermined number of bits (e.g., LSBs) of transition state 220 (i.e., the transition state associated with predetermined residual level 145) to binaryization parameter 302 using a third mapping 118, and to perform determination of binaryization 300 of predetermined residual level 145 based on binaryization parameter 302 to determine binaryization 300 of predetermined residual level 145 (where a predetermined number 304 of binary symbols have been exhausted). According to one implementation, the determination of binary representation for all residual levels 144 (where a predetermined number of 304 binary symbols are exhausted) can be performed by decoder 20. The bits of transition state 220 are, for example, one or more bits located at one or more predetermined bit positions in transition state 220 (e.g., LSB, or bits located at the second but not the last significant bit position).

[0403] According to one implementation, decoder 20 is configured to determine binaryization 300 for a predetermined residual level 145 based on binaryization parameter 302, such that binaryization 300 is a modified default binaryization (e.g., Golomb-Rice code) in such a way that a binaryization code associated with the predetermined level (which depends on binaryization parameter 302, e.g., pos0) is re-directed to level zero, and one or more binaryization codes associated with one or more levels (from zero to the predetermined level minus one) are redirected to be associated with one or more levels (from one to the predetermined level). The modification of the default binaryization can be implemented by the equation |q| = (abs_level == pos0 ? 0 : (abs_level < pos0 ? abs_level + 1 : abs_level ) as described below.

[0404] According to one implementation, a further predetermined number of bits is one.

[0405] Similar to VTM-7, the absolute levels (i.e., residual level 144) for which no data is encoded in the first scan pass 601 are encoded entirely in bypass mode (i.e., equal probability bypass mode). They are encoded using the same type of code used for the rest, rem 99. Based on the encoded syntax elements (see below), the Rice parameter and variable pos0 (i.e., binary parameter 302) can be determined. These absolute levels |q|144 are not directly encoded, for example, but are first mapped to the syntax element abs_level, which is then encoded using the parameter code.

[0406] Based on the variable pos0 302, the absolute value |q|144 can be mapped to the syntax element abs_level. It can be represented as:

[0407] abs_level = ( |q| ==0 ? pos0 : ( |q|<= pos0 ? |q|-1 : |q| )

[0408] On the decoder side, mapping the syntax element abs_level to the absolute value |q| can be represented as follows:

[0409] |q| = ( abs_level == pos0 ?0 : ( abs_level < pos0 ? abs_level +1 : abs_level )

[0410] The Rice parameter RPabs used to encode abs_level is derived as follows:

[0411] RPabs = tabRPabs[ min( sumAbs, 31 ) ] ,

[0412] Where sumAbs represents the sum of absolute quantization indices within local template 132; that is, the sum of absolute levels of residuals (see above).

[0413] The variable pos0 302 can depend on both the sum of the absolute values ​​of the reconstructions in local template 132 and the state variable 220. The variable pos0 302 is derived 118 from the quantized state 220 and the Rice parameter Rpabs according to the following formula:

[0414] pos0 = (1 + ( state &1 ) ) << RPabs.

[0415] It should be noted that the variable pos0 302 does depend on state 220, but not on the quantization method 180 used.

[0416] The equation pos0 = (1 + (state &1)) << RPabs can represent the third mapping 118, which maps a further predetermined number of bits of transition state 220 to the binary parameter pos0 302, where (state &1) indicates that the LSB is mapped to the binary parameter pos0. The further predetermined number of bits is one.

[0417] Alternatively, the equation pos0 = (state<2 ?1 : 2 ) << RPabs can represent a third mapping 118, which maps a further predetermined number of bits of transition state 220 to the binary parameter pos0 302, where (state<2 ?1 : 2 ) represents mapping the second, but not the last, significant bit position of transition state 220 to the binary parameter pos0 (see the last item in Section 5.1). The further predetermined number of bits is one.

[0418] 5.3 Aspects of other implementation methods

[0419] Several aspects of the above-described embodiments can be modified. Some of these aspects will be specified below:

[0420] • The number of supported quantization variants and / or the number of actual state transition tables 106 used for these variants can be modified;

[0421] • Different mechanisms can be used to represent the selected quantization variant;

[0422] Binary functions with different quantization indices can be used in the state transition procedure. This means that the state transition can be represented as:

[0423] nextState = stateTransTable[ currState ][ binFun( currLevel ) ] ,

[0424] Where binFunc() represents any binary function (that is, a function with possible values ​​of 0 and 1).

[0425] Different binaryization procedures can be used to encode quantization indices. In particular, state-dependent binaryization is possible, where multiple binaryizations are supported and the binaryization used depends on the quantization state (and possibly other parameters). In this case, the choice of binaryization can be dependent on the value of the state variable, but independent of the chosen quantization method. For example, two binaryizations can be supported, and the chosen binaryization can depend on the value of (state & 1).

[0426] Different context models can be used for any binary code. In this case, the context used for one or more binary codes can still be dependent on the state variables, but it can be independent of the chosen quantization method.

[0427] Different methods can be used to determine the Rice parameters and / or the quantization index for the bypass coding of the remainder.

[0428] Different methods can be used to derive the parameter pos0 that encodes the quantization index of the bypass coding. However, in conjunction with the present invention, the determination of the parameter pos0 does not depend on the quantization method chosen.

[0429] 5.4 Further Implementation Methods

[0430] In the above embodiments, transform coding is used to encode the prediction residuals, and the quantization scheme / mode is selected by the encoder and signaled to the decoder for quantization / dequantization of the transform coefficients. Entropy coding (i.e., context-adaptive arithmetic coding) of the obtained quantization index can be used. On the decoder side, the set of reconstructed samples is obtained by decoding the corresponding quantization index and dequantizing the corresponding transform coefficients so that the inverse transform produces the prediction residuals in the spatial domain. However, the above-described embodiments can be modified to produce other embodiments, such as encoding other residual values ​​(e.g., residual samples in the spatial domain). In the alternative to using the above-described embodiments for encoding video, the above concepts can be used to process another media signal, such as an audio signal. The main objective of the embodiments described below is lossy coding of blocks of prediction error samples in image and video codecs, but the embodiments can also be applied to lossy coding in other fields. Specifically, there is no limitation on the set of samples forming rectangular blocks.

[0431] While not limited to video coding using transform-based predictive residual coding, descriptions of a block-based predictive codec for video image coding are provided below to illustrate an implementation architecture for encoding and decoding transform representations of sample blocks. The video encoder and video decoder are based on... Figures 12 to 14The embodiments of this application as described above can be readily established respectively on... Figure 12 And among the video encoders and decoders of 13, although the above-described embodiments can also be used to form non-based Figure 12 And 13 video encoders and video decoders that operate within the encoding architecture.

[0432] Figure 12 This diagram illustrates the apparatus used to predictively encode a video 11 consisting of a sequence of images 12 into a data stream 14. For this purpose, block-by-block predictive coding is used. Furthermore, transform-based residual coding is used exemplary. The apparatus (or encoder) is referred to by reference numeral 10. Figure 13 The corresponding decoder 20 is displayed; that is, device 20 is configured to predictively decode video 11' composed of images 12' in image blocks from data stream 14, here also exemplarily using transform-based residual decoding, where apostrophes are used to indicate images 12' and video 11' reconstructed by decoder 20 respectively, and which deviate from the original image 12 encoded by device 10 in terms of coding loss introduced by quantization of the predictive residual signal. Although Figure 12 as well as Figure 13 Transform-based prediction residual coding is used exemplary, but embodiments of this application are not limited to this prediction residual coding. For reference... Figure 12 And other details described in 13, which are also true, will be described below.

[0433] Encoder 10 is configured to perform a spatial-to-spectral transformation on the prediction residual signal, and to encode the resulting prediction residual signal into data stream 14. Similarly, decoder 20 is configured to decode the prediction residual signal from data stream 14, and to perform a spectral-to-spatial transformation on the resulting prediction residual signal.

[0434] Encoder 10 may internally include a prediction residual signal former 22, which generates a prediction residual 24 to measure the deviation of the prediction signal 26 from the original signal (i.e., video 11 or current image 12). The prediction residual signal former 22 may be, for example, a subtractor that subtracts the prediction signal from the original signal (i.e., current image 12). Encoder 10 further includes a transformer 28 that performs a spatial-to-spectral transformation on the prediction residual signal 24 to obtain a spectral domain prediction residual signal 24', which is then quantized by a quantizer 32 (also included in encoder 10). The thus quantized prediction residual signal 24'' is encoded into bitstream 14. For this purpose, encoder 10 may optionally include an entropy encoder 34 that performs entropy encoding on the prediction residual signal, transforms it, and quantizes it into datastream 14. The prediction residual 26 is generated by prediction stage 36 of encoder 10 based on the prediction residual signal 24'', which is decoded into and can be decoded from datastream 14. For this purpose, such as Figure 12 As shown, prediction stage 36 may include an inverse quantizer 38 that inverse-quantizes the prediction residual signal 24'' to obtain a spectral domain prediction residual signal 24''' (which corresponds to signal 24' except for quantization loss); followed by an inverse transformer 40, which performs an inverse transform (i.e., spectral to spatial transformation) on the subsequent prediction residual signal 24''' to obtain a prediction residual signal 24'''' (which corresponds to the original prediction residual signal 24 except for quantization loss). Combiner 42 of prediction stage 36 then recombines the prediction signal 26 and the prediction residual signal 24'''' (e.g., by addition) to obtain a reconstructed signal 46 (i.e., a reconstruction of the original signal 12). The reconstructed signal 46 may correspond to signal 12'.

[0435] By using, for example, spatial prediction (i.e., intra-image prediction) and / or temporal prediction (i.e., inter-image prediction), the prediction module 44 of prediction stage 36 then generates a prediction signal 26 based on signal 46. Details regarding this are described below.

[0436] Similarly, decoder 20 can be internally composed of components corresponding to prediction stage 36 (and interconnected accordingly). Specifically, the entropy decoder 50 of decoder 20 can predict the residual signal 24'' from the spectral domain of the entropy decoded quantization of the data stream; accordingly, the inverse quantizer 52, inverse transformer 54, combiner 56, and prediction module 58, based on the interconnection and cooperation of the modules related to prediction stage 36, recover the reconstructed signal based on the predicted residual signal 24'', so that the output of combiner 56 produces the reconstructed signal (i.e., video 11' or its current image 12'), such as... Figure 13 As shown.

[0437] Although not specifically described above, it is clear that encoder 10 can set some coding parameters (including, for example, prediction modes, motion parameters, and the like) based on some optimization schemes (e.g., optimizing some rate and distortion-related criteria (i.e., coding cost) and / or using some rate control methods). As described in more detail below, encoder 10, decoder 20, and corresponding modules 44 and 58 support different prediction modes, such as intra-image coding modes and inter-image coding modes, which form a set or pool of original prediction modes based on the prediction of image blocks composed in the manner detailed below. The granularity of switching between these prediction components by encoder and decoder can correspond to the subdivision of blocks in images 12 and 12', respectively. It should be noted that some of these blocks can be blocks coded only intra-image and some blocks can be blocks coded only inter-image, and selectively, even some blocks can be blocks obtained using both intra-image coding and inter-image coding, the details of which will be presented below. According to the intra-image coding mode, the prediction signal of a block is obtained based on the spatially encoded / decoded neighboring regions of the individual block. Multiple intra-image coding sub-modes can be selected, where "quasi" represents an intra-image prediction parameter. Directional or angular intra-image coding sub-modes can exist, according to which the prediction signal for an individual block is filled into the individual block by extrapolating sample values ​​from neighboring regions along a specific direction (specific to the individual directional intra-image coding sub-mode). Intra-image coding sub-modes can also include, for example, one or more other sub-modes, such as: a DC coding mode, according to which the prediction signal for an individual block assigns DC values ​​to all samples within the individual block; and / or a planar intra-image coding mode, according to which the prediction signal for an individual block approximates or determines the spatial distribution of sample values ​​at the sample locations of the individual block as described by a two-dimensional linear function, deriving the tilt and offset of the plane defined by the two-dimensional linear function based on neighboring samples. In contrast, according to inter-image prediction modes, the prediction signal for a block can be obtained, for example, by temporally predicting the interior of the block. For parameterization of inter-image prediction modes, motion vectors can be signaled within the data stream, representing the spatial displacement of portions of previously encoded images of video 11, which are sampled here to obtain the prediction signals for individual blocks. This means that, in addition to the residual signal encoding included in data stream 14 (e.g., transform coefficient levels representing the entropy encoding of the quantized spectral domain prediction residual signal 24''), data stream 14 may also have prediction correlation parameters encoded therein for specifying block prediction modes, prediction parameters for the specified prediction modes (e.g., motion parameters for inter-image prediction modes), and (optionally) other parameters controlling the composition of the final prediction signals for blocks using the specified prediction modes and prediction parameters, as described in more detail below.In addition, the data stream may include control and signaling parameters for subdividing images 12 and 12' into blocks, respectively. Decoder 20 uses these parameters to perform the following operations: subdivide the image in the same manner as the encoder, specify the same prediction mode and parameters for the blocks, and perform the same predictions to generate the same prediction signals.

[0438] Figure 14 This section explains, on one hand, the relationship between the reconstructed signal (i.e., the reconstructed image 12') and the combination of the prediction residual signal 24'''' and the prediction signal 26 in the data stream; on the other hand, it explains the combination of the prediction residual signal 24'''' and the prediction signal 26. As mentioned above, the combination can be additive. The prediction signal 26 in Figure 14 The image shown is subdivided into blocks 80 of different sizes, but this is only an example. The subdivision can be any subdivision, such as a regular subdivision of the image region into columns and rows of blocks, or a multi-tree subdivision of image 12 into leaf blocks of different sizes (e.g., a quadtree subdivision or the like), where... Figure 14 The method of blending is shown, in which the image region is first subdivided into columns and rows of root blocks, and then the root blocks are further subdivided according to a recursive multi-tree subdivision method to produce block 80.

[0439] Figure 14 The prediction residual signal 24'''' in the image also shows the subdivision of the image region into blocks 84. These blocks can be called transform blocks to distinguish them from coded blocks 80. In fact, Figure 14 The encoder 10 and decoder 20 can respectively use two different subdivisions to divide the image 12 and image 12' into blocks; that is, a subdivision to divide into coding blocks 80 and another subdivision to divide into blocks 84. The two subdivisions can be the same (that is, each block 80 can simultaneously form transform blocks 84), and vice versa; but Figure 14The following scenarios are illustrated: For example, a subdivision into transform block 84 forms an extension of a subdivision into block 80, such that any boundary between two blocks 80 overlaps with the boundary between two blocks 84, or alternatively, each block 80 coincides with one of the transform blocks 84, or with a cluster of transform blocks 84. However, the determination or selection of subdivisions can also be independent of each other, such that transform blocks 84 can alternatively span block boundaries between blocks 80. Regarding subdivision into transform block 84, a similar description as that given regarding subdivision into block 80 holds true; that is, block 84 can be the result of regularly subdividing an image region into blocks arranged in columns and rows, the result of recursively subdividing an image region into multiple tree-like subdivisions, or a combination thereof, or any other segmentation. Incidentally, it should be noted that blocks 80 and 84 are not limited to squares, rectangles, or any other shape. Furthermore, the subdivision of the current image 12 into block 80 (which forms the prediction signal) and the subdivision of the current image 12 into block 84 (which encodes the prediction residual) are not the only subdivisions that can be used for encoding / decoding. These subdivisions form the granularity where prediction signal determination and residual coding are performed; however, firstly, residual coding can be performed alternatively without subdivisions; secondly, for other granularities besides these subdivisions, the encoder and decoder can set specific coding parameters, which may include some of the aforementioned parameters, such as prediction parameters, prediction signal composition control signals, and the like.

[0440] Figure 14 The combination of the prediction signal 26 and the prediction residual signal 24'''' directly generates the reconstructed signal 12'. However, it should be noted that, according to alternative embodiments, more than one prediction signal 26 may be combined with the prediction residual signal 24'''' to generate the image 12', for example, prediction signals obtained from other views or from other coding layers (which are, for example, encoded / decoded in a separate prediction loop with a separate DPB).

[0441] exist Figure 14 In this context, transform block 84 should have the following meaning. Transformer 28 and inverse transformer 54 perform their transformations on a unit basis of these transform blocks 84. For example, many codecs use some form of DST or DCT for all transform blocks 84. Some codecs allow the transformation to be omitted, so that for a portion of transform blocks 84, the prediction residual signal is directly encoded in the spatial domain. The supported transformations may include one or more of the following:

[0442] oDCT-II (or DCT-III), where DCT stands for Discrete Cosine Transform.

[0443] oDST-IV, where DST stands for Discrete Sine Transform.

[0444] oDCT-IV

[0445] oDST-VII

[0446] o Identity Transformation (IT)

[0447] The transform can be a separable transform. A second transform (which can be a non-separable transform) can be applied to the low-frequency range, for example, a subarray extending from the DC component to a certain intermediate frequency component, excluding DC and the highest frequency component. The encoder can decide to use such a second transform, and select one for a specific block, and signal this decision to the decoder.

[0448] Now, returning to the adaptive quantization mode, the decoder and encoder can operate as follows. See example. Figure 8 Decoder 20 can be configured to decode residual level 142 (e.g., as shown in the figure) from data stream 14. Figure 1 The quantization level of the transformation coefficient 100 shown represents the prediction residual 24''), and is sequentially arranged in the following manner (i.e., along as follows). Figure 6 The scan order shown 102) Dequantization 150 Residual level 142: Based on the current conversion state, from the set of default quantizers 151 (e.g., Figure 1 The decoder 20 selects a quantizer from sets 0 and 1; dequantizes the current residual level 154 using the quantizer to obtain a dequantized residual value 104; applies a binary function (e.g., a parity check function) 156 to the current residual level to obtain a characteristic 157 (i.e., one or zero) of the current residual level; and updates the current transition state 160 158 based on the characteristic 157 of the current residual level and using a transition table 106 for the next transition state 162 of the residual level to be used for the next dequantization. The decoder 20 uses the dequantized residual value 104 to reconstruct a media signal 170, such as an image or video. Based on the quantization mode information 180 included in data stream 14 (e.g., the example described in Section 5.1.3), decoder 20 can select a default transformation table 106 from a set 159 of default transformation tables 106a, b, c as the transformation table to be used. Each of the default transformation tables 106a, b, c represents a domain surjective mapping from a combination 163 of a set of one or more transformation states having the current residual level (see, for example...). Figure 10The decoder 20 is configured to perform quantizer selection 152 by mapping a predetermined number of LSBs (e.g., one, only LSBs) of the current transition state to a set 161 of one or more transition states, wherein the difference between default transition tables 106a, b, and c lies in the cardinality l, m, and n of the set of one or more transition states. Regardless of which default transition table 106a, b, or c is selected as the transition table 106 to be used, the decoder 20 is configured to perform quantizer selection 210 by mapping (using first mapping 108, see section 5.2.4, for example) of the current transition state to the default quantizer; regardless of which default transition table 106a, b, or c is selected as the transition table 106 to be used, the predetermined number and the first mapping are equal (i.e., independent of the selected mode 180 or transition table 106a, b, or c, respectively). The current residual level 142 can be decoded from the data stream 14 using context-adaptive binary arithmetic decoding of the binary symbol code of the current residual level. The binary code may include a valid value binary code (sig_flag) indicating whether the current residual level is zero or non-zero, and the context for decoding this first binary code for the current residual level can be selected by mapping the current transformation state by a further predetermined number (e.g., 2, which is taken by "&3") of LSBs (e.g., using a second mapping 110, as described in Section 5.2.5.1) to a first context. The second mapping is equal regardless of which default transformation tables 106a, b, c are selected as the transformation table 106 to be used. Additionally or alternatively, before decoding the residual level 142 of one image block (e.g., ...), the context for decoding the current residual level may be decoded by... Figure 10 Block 84 in the middle, its residual is obtained by... Figure 6(The transform coefficient block 112 shown is obtained by further transformation), and the residual level 142 is decoded from the data stream 14, and the binary code of the residual level 142 of an image block is sequentially decoded in one or more scans (see pass 114 in Section 2.2.2), and the preceding binary code of the binary code of the residual level is decoded using context-adaptive binary arithmetic for a predetermined number (e.g., remRegBins) of the binary code of the residual level, and the subsequent binary code of the binary code of the residual level (k >= startIdxBypass uses an equal-probability bypass mode; for a binary symbol whose predetermined number of uses are exhausted (k>=startIdxBypass), the binaryization of the predetermined residual level 145 is determined by using the third mapping 118 to map a further predetermined number (e.g., 1) of LSBs that are manifested for the transition state 220 of the predetermined residual level 145 to the binaryization parameter 302 (e.g., pos0), and the determination of the binaryization of the predetermined residual level is performed according to the binaryization parameter 302; the third mapping 118 is equal regardless of which default transition table 106a, b, c is selected as the transition table 106 to be used. Based on binaryization parameter 302, the binaryization of the predetermined residual level 145 can be determined such that the binaryization is a default binaryization (e.g., Rice code) modified in the following way: a binary code associated with the predetermined level (which depends on the binaryization parameter) is redirected to be associated with level zero, and one or more binary codes associated with one or more levels (from zero to the predetermined level minus one) are redirected to be associated with one or more levels (from one to the predetermined level).

[0449] Next, the decoder 20 is configured to reconstruct the 170 media signal by using the dequantized residual value 104 to obtain a predicted version of the media signal by performing a prediction, and to correct the predicted version using the dequantized residual value 104; or to reconstruct the media signal by using the dequantized residual value 104 to obtain a predicted version of the media signal by performing a prediction, and to reverse transform the dequantized residual value 104 to obtain a media residual signal, and to correct the predicted version using the media residual signal.

[0450] The following describes additional embodiments and aspects of the invention, which may be used alone or in combination with any of the features, functions and details described herein.

[0451] According to the first aspect, a decoder (20) can be configured as follows:

[0452] The residual level (142) representing the prediction residual is decoded (210) from the data stream (14), and the residual level (142) is dequantized (150) sequentially in the following manner:

[0453] Based on the current conversion state (220), select (152) a quantizer (153) from the set of default quantizers (151);

[0454] The current residual level is dequantized (154) using the quantizer (153) to obtain the dequantized residual value;

[0455] Apply the binary function (156) to the current residual level to obtain the characteristics (157) of the current residual level; and

[0456] Using the transformation table to be used (106), the current transformation state (220) is updated (158) according to the characteristics (157) of the current residual level.

[0457] The media signal (170) is reconstructed using the inversely quantized residual value (104).

[0458] Based on the quantization mode information (180) contained in the data stream (14), a default transformation table is selected from the set of default transformation tables (159) as the transformation table to be used (106), wherein each of the default transformation tables represents a surjective mapping from the domain of a combination (163) of a set (161) of one or more transformation states having the characteristic (157) of the current residual level to the set (161) of one or more transformation states, wherein the difference between the default transformation tables lies in the cardinality of the set (161) of one or more transformation states, and

[0459] Regardless of which default conversion table is selected as the conversion table to be used (106), the selection (152) of the quantizer (153) is performed by mapping a predetermined number of bits of the current conversion state (220) to the default quantizer using a first mapping (200), wherein the predetermined number is equal to the first mapping (200) regardless of which default conversion table is selected as the conversion table to be used (106).

[0460] According to the second aspect (when referencing the first aspect), in the decoder (20), a predetermined number of bits can be one.

[0461] According to the third aspect (when referencing the first or second aspect), the decoder (20) can be configured to select a conversion table (106) to be used from a set (159) of default conversion tables (106a, b, c) based on quantization mode information (180), and to manage a set (159) of default conversion tables as different parts of a unified conversion table, wherein for each default conversion table, each of a set (161) of one or more conversion states is indexed using a state index that is different from the state index used for indexing any other default conversion table in the unified conversion table (e.g., for the conversion states of default conversion tables in different parts of the unified conversion table, the default conversion tables do not intersect with each other).

[0462] According to the fourth aspect (when referencing the third aspect), the decoder (20) can be configured to perform an update (158) of the current transformation state (220) by looking up an item in the unified transformation table, the item corresponding to a combination of the characteristics (157) of the current residual level and the current transformation state (220).

[0463] According to the fifth aspect (when referring back to the third or fourth aspect), in the decoder (20), the quantization mode information (180) may include syntax elements in the data stream (14) that represent the start transition state used to dequantize the first residual level in the order of dequantization (e.g., sequential dequantization is performed along this order), and the syntax elements indicate the transition table to be used (106) from the default transition table by fitting to the state index in a portion of the unified transition table that corresponds only to the transition table to be used (106).

[0464] According to the sixth aspect (when referencing any of the first to fifth aspects), in the decoder (20), the set (151) of default quantizers can consist of the following:

[0465] The first default quantizer (1511) includes even integer multiples of the quantization step size (144) as reconstruction levels; and

[0466] The second default quantizer (1512) includes odd integer multiples of the quantization step size (144) and zero as the reconstruction level.

[0467] According to the seventh aspect (when referencing any one of the first to sixth aspects), the decoder (20) can be configured as follows:

[0468] Context-adaptive binary arithmetic decoding using binary symbols of the current residual level to decode the current residual level from the data stream (14), wherein the binary symbols include a valid value binary symbol (92) indicating whether the current residual level is zero or non-zero;

[0469] By using a second mapping (202) to map a further predetermined number of bits of the current transition state (220) to a value, a first context (242) is selected based on the obtained value (230) for decoding the first binary symbol (92) of the current residual level; the second mapping (144) is equal regardless of the quantization mode information (180).

[0470] According to the eighth aspect (when referencing the seventh aspect), in the decoder (20), the further predetermined number of bits can be two.

[0471] According to the ninth aspect (when referencing any of the first to eighth aspects), in the decoder (20), the media signal can be video, and the decoder (20) can be configured as follows:

[0472] The residual level (142) is decoded (210) from the data stream (14) in the following manner:

[0473] Decode the residual level for image block (84) before the residual level for another image block (84);

[0474] In one or more scans, binary codes of residual level binary representations of the image block (84) are sequentially decoded, and context-adaptive binary arithmetic decoding is used for a predetermined number of preceding binary codes of residual level binary representations, and equal probability bypass mode is used for subsequent binary codes of residual level binary representations.

[0475] The binaryization of a predetermined residual level is determined, wherein the predetermined number of binary symbols are exhausted, and a further predetermined number of bits of the transition state (e.g., one or more bits at one or more predetermined bit positions, such as LSB or bits at the second but not the last significant bit position) are mapped to the binaryization parameter (302) by using a third mapping, and the determination of the binaryization of the predetermined residual level is performed based on the binaryization parameter (302); the third mapping is equal regardless of the quantization mode information (180).

[0476] According to the tenth aspect (when referring back to the ninth aspect), the decoder (20) can be configured to determine the binaryization of a predetermined residual level based on the binaryization parameter (302), such that the binaryization is a modified default binaryization in such a way that the binaryization code based on the binaryization parameter (302) is redirected from being associated with a predetermined level to being associated with level zero, and one or more binaryization codes are redirected from being associated with one or more levels from zero to the predetermined level minus one to being associated with one or more levels from one to the predetermined level.

[0477] According to the eleventh aspect (when referencing the ninth or tenth aspect), in the decoder (20), a further predetermined number of bits can be one.

[0478] According to the twelfth aspect (when referencing the ninth aspect), in the decoder (20), based on the quantization mode information (180), the cardinality of the surjective mapping and the set (161) of one or more transition states can be selected from two or more of the following:

[0479] The cardinality of the set (161) of one or more transition states is one;

[0480] The cardinality of the set (161) of one or more transition states is four;

[0481] The cardinality of the set (161) of one or more transition states is eight.

[0482] According to the thirteenth aspect (when referencing any one of the first to twelfth aspects), in the decoder (20), the media signal can be video, and the decoder (20) can be configured as follows:

[0483] Read quantization mode information (180), wherein the quantization mode information (180) controls updates (158) in one of the following ways:

[0484] Only once for the aforementioned video;

[0485] Image block by image (84);

[0486] Based on each image;

[0487] Based on each slice; and

[0488] Based on each image sequence.

[0489] According to the fourteenth aspect (when referencing 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 whether the video or a portion of the video is updated (158) is controlled by a second syntax element of the quantization mode information (180) in the data stream (14) within the video or the portion of the video, or which of the surjective mappings and the cardinality of a set (161) of one or more transition states will be selected for the update (158).

[0490] According to aspect fifteen (when referring back to aspect fourteen), in the decoder (20), the first syntax element may be included in one of the following in the data stream (14):

[0491] A set of video parameters, wherein the portion is the video and the second syntax element is updated in units of the following items (158):

[0492] Image sequence,

[0493] image,

[0494] tile,

[0495] slice,

[0496] Encoding tree blocks (e.g., units that are uniformly pre-subdivided from an image before each encoding tree block is divided into encoding blocks through recursive multi-tree subdivision), encoding blocks (making intra-image / inter-image pattern determination),

[0497] Encoded blocks (e.g., in units that determine intra-image / inter-image patterns, or)

[0498] Residual transform block;

[0499] A set of sequence parameters, wherein the portion is an image sequence and the second syntax element is updated in units of the following items (158):

[0500] image,

[0501] tile,

[0502] slice,

[0503] Encoding tree blocks (e.g., units that are uniformly pre-subdivided from an image before each encoding tree block is divided into encoding blocks through recursive multi-tree subdivision), encoding blocks (making intra-image / inter-image pattern determination),

[0504] Encoded blocks (e.g., in units that determine intra-image / inter-image patterns, or)

[0505] Residual transform block;

[0506] A set of image parameters, wherein the portion consists of one or more images and the second syntax element controls the updating in units of the following items (158):

[0507] image,

[0508] tile,

[0509] slice,

[0510] Encoding tree blocks (e.g., units that are uniformly pre-subdivided from an image before each encoding tree block is divided into encoding blocks through recursive multi-tree subdivision), encoding blocks (making intra-image / inter-image pattern determination),

[0511] Encoded blocks (e.g., in units that determine intra-image / inter-image patterns, or)

[0512] Residual transform block; or

[0513] The image header, wherein the portion is an image and the second syntax element is updated in units of the following items (158):

[0514] tile,

[0515] slice,

[0516] Encoding tree blocks (e.g., units that are uniformly pre-subdivided from an image before each encoding tree block is divided into encoding blocks through recursive multi-tree subdivision), encoding blocks (making intra-image / inter-image pattern determination),

[0517] Encoded blocks (e.g., in units that determine intra-image / inter-image patterns, or)

[0518] Residual transform block; or

[0519] The parameter set, wherein the part is a coding tree block and the second syntax element is updated in units of the following items (158):

[0520] Encoded blocks (e.g., in units that determine intra-image / inter-image patterns, or)

[0521] Residual transformation block.

[0522] According to the sixteenth aspect (when referencing any of the first to fifteenth aspects), in the decoder (20), the media signal can be a color video, and the decoder (20) can be configured to use different versions of the set (151) of default quantizers for different color components.

[0523] According to the seventeenth aspect (when referencing any of the first to sixteenth aspects), in the decoder (20), the binary function can be a parity check.

[0524] According to the eighteenth aspect (when referencing any one of the first to seventeenth aspects), the decoder (20) can be configured to reconstruct the (170) media signal using the dequantized residual value (104):

[0525] Perform predictions to obtain a predicted version of the media signal; and

[0526] The prediction version is corrected using the inverse quantization residual (104).

[0527] According to the nineteenth aspect (when referencing any one of the first to eighteenth aspects), the decoder (20) can be configured to reconstruct the (170) media signal using the dequantized residual value (104):

[0528] Perform predictions to obtain a predicted version of the media signal;

[0529] The inversely transformed residual value (104) is then used to obtain the media residual signal; and

[0530] The predicted version is corrected using the media residual signal.

[0531] According to aspect 20, an encoder can be configured as follows:

[0532] Predictively encode media signals to obtain residual signals;

[0533] The residual values ​​representing the residual signals are sequentially quantized in the following manner to obtain the residual level (142):

[0534] Based on the current conversion state (220), select (152) a quantizer (153) from the set of default quantizers (151);

[0535] The current residual value is quantized using the quantizer (153) to obtain the current residual level;

[0536] Based on the characteristics (157) of the current residual level obtained by applying (156) a binary function to the current residual level (e.g., parity check), and based on the quantization mode information (180) transmitted in the data stream (14), the current conversion state (220) is updated (158); and

[0537] The residual level (142) is encoded into the data stream (14);

[0538] The current transformation state (220) is transformed from the domain of a combination (163) of a set (161) of one or more transformation states with features (157) of the current residual level to a set (161) of one or more transformation states, based on a surjective mapping dependent on the quantization mode information (180). The cardinality of the set (161) of one or more transformation states varies according to the quantization mode information (180).

[0539] Regardless of the quantization mode information (180) (e.g., unrelated to or independent of the quantization mode information (180)), a predetermined number of bits of the current transition state (220) (e.g., one or more bits at one or more predetermined bit positions, such as LSB or bits at the second but not the last significant bit position) are mapped to the default quantizer by using a first mapping (200) to perform the selection (152) of the quantizer (153); the predetermined number and the first mapping (200) are equal regardless of the quantization mode information (180).

[0540] According to aspect 21 (when referring back to aspect 20), in the encoder, a predetermined number of bits can be one.

[0541] According to aspect 22 (when referring back to aspect 20 or 21), the encoder can be configured to select a transformation table (106) to be used from a set of default transformation tables (159) based on quantization mode information (180), and to manage the set of default transformation tables (159) as different parts of a unified transformation table, wherein for each default transformation table, each of a set of one or more transformation states (161) is indexed using a state index, and the state index is different from the state index used for indexing any other default transformation table in the unified transformation table (e.g., for the transformation states of default transformation tables in different parts of the unified transformation table, the default transformation tables do not intersect with each other).

[0542] According to aspect 23 (when referencing aspect 22), the encoder can be configured to perform an update (158) of the current transformation state (220) by looking up an item in a unified transformation table, the item corresponding to a combination of the characteristics (157) of the current residual level and the current transformation state (220).

[0543] According to aspect 24 (when referring back to aspect 22 or 23), the encoder can be configured to encode syntax elements into the data stream (14) as quantization mode information (180), the syntax elements representing the start transition state used to quantize the first residual value in quantization order (e.g., sequential dequantization along this order), by fitting to the state index in a portion of a unified transition table (106) corresponding only to the transition table to be used, such that the syntax elements indicate the transition table to be used (106) from the default transition table.

[0544] According to aspect 25 (when referencing any of aspects 20 to 24), in the encoder, the set of default quantizers (151) consists of the following:

[0545] The first default quantizer (1511) includes even integer multiples of the quantization step size (144) as encoding levels; and

[0546] The second default quantizer (1512) includes odd integer multiples of the quantization step size (144) and zero as the encoding level.

[0547] According to aspect twenty-six (when referencing any one of aspects twenty to twenty-five), the encoder can be configured as follows:

[0548] The current residual level is encoded into the data stream (14) using context-adaptive binary arithmetic coding of the binary symbol code of the current residual level, wherein the binary symbol code includes a valid value binary symbol code (92), which indicates whether the current residual level is zero or non-zero.

[0549] By using a second mapping (144) to map a further predetermined number of bits of the current transition state (220) to a value (230), a first context (242) is selected based on the obtained value (230) to encode the first binary symbol (92) for the current residual level; the second mapping (144) is equal regardless of the quantization mode information (180).

[0550] According to aspect 27 (when referring back to aspect 26), in the encoder, a further predetermined number of bits can be two.

[0551] According to aspect 28 (when referring back to any of aspects 20 to 27), in the encoder, the media signal can be video, and the encoder can be configured as follows:

[0552] The residual level (142) is encoded into the data stream (14) in the following manner:

[0553] Before the residual level for another image block (84), the residual level is encoded;

[0554] Binary symbols of residual level are sequentially encoded with respect to the image block (84) in one or more scans, and context-adaptive binary arithmetic coding is used for a predetermined number of leading binary symbols of residual level, and equal probability bypass mode is used for subsequent binary symbols of residual level.

[0555] The binaryization of a predetermined residual level is determined, wherein a predetermined number of binary symbols are exhausted, and a further predetermined number of bits of the transition state (e.g., one or more bits at one or more predetermined bit positions, such as LSB or bits at the second but not the last significant bit position) are mapped to the binaryization parameter (302) by using a third mapping, and the determination of the binaryization of the predetermined residual level is performed based on the binaryization parameter (302); the third mapping is equal regardless of the quantization mode information (180).

[0556] According to aspect 29 (when referring back to aspect 28), the encoder may be configured to determine the binaryization of a predetermined residual level based on binaryization parameters (302), such that the binaryization is a modified default binaryization in such a way that the binaryization code based on the binaryization parameters (302) is redirected from being associated with a predetermined level to being associated with level zero, and one or more binaryization codes are redirected from being associated with one or more levels from zero to the predetermined level minus one to being associated with one or more levels from one to the predetermined level.

[0557] According to aspect 30 (when referring back to aspect 28 or 29), in the encoder, a further predetermined number of bits can be one.

[0558] According to aspect thirty-one (when referring back to aspect twenty-eight), in the encoder, based on the quantization mode information (180), the cardinality of the surjective mapping and the set (161) of one or more transition states can be selected from two or more of the following:

[0559] The cardinality of the set (161) of one or more transition states is one;

[0560] The cardinality of the set (161) of one or more transition states is four;

[0561] The cardinality of the set (161) of one or more transition states is eight.

[0562] According to aspect thirty-two (when referring back to any of aspects twenty to thirty-one), in the encoder, the media signal can be video, and the encoder can be configured as follows:

[0563] Write the quantization mode information (180) in one of the following ways to control the update (158):

[0564] Only once for the aforementioned video;

[0565] Image block by image (84);

[0566] Based on each image;

[0567] Based on each slice; and

[0568] Based on each image sequence.

[0569] According to aspect thirty-three (when referencing any of aspects twenty to thirty-two), 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 whether the video or a portion of the video is controlled by a second syntax element of the quantization mode information (180) in the data stream (14) to update (158) within the video or the portion of the video, or which of the surjective mappings and the cardinality of a set (161) of one or more transition states will be selected for update (158).

[0570] According to aspect thirty-four (when referring back to aspect thirty-three), in the encoder, the first syntax element may be included in one of the following in the data stream (14):

[0571] A set of video parameters, wherein the portion is the video and the second syntax element is updated in units of the following items (158):

[0572] Image sequence,

[0573] image,

[0574] tile,

[0575] slice,

[0576] Encoding tree blocks (e.g., units that are uniformly pre-subdivided from an image before each encoding tree block is divided into encoding blocks through recursive multi-tree subdivision), encoding blocks (making intra-image / inter-image pattern determination),

[0577] Encoded blocks (e.g., in units that determine intra-image / inter-image patterns, or)

[0578] Residual transform block;

[0579] A set of sequence parameters, wherein the portion is an image sequence and the second syntax element is updated in units of the following items (158):

[0580] image,

[0581] tile,

[0582] slice,

[0583] Encoding tree blocks (e.g., units that are uniformly pre-subdivided from an image before each encoding tree block is divided into encoding blocks through recursive multi-tree subdivision), encoding blocks (making intra-image / inter-image pattern determination),

[0584] Encoded blocks (e.g., in units that determine intra-image / inter-image patterns, or)

[0585] Residual transform block;

[0586] A set of image parameters, wherein the portion consists of one or more images and the second syntax element is updated in units of the following items (158):

[0587] image,

[0588] tile,

[0589] slice,

[0590] Encoding tree blocks (e.g., units that are uniformly pre-subdivided from an image before each encoding tree block is divided into encoding blocks through recursive multi-tree subdivision), encoding blocks (making intra-image / inter-image pattern determination),

[0591] Encoded blocks (e.g., in units that determine intra-image / inter-image patterns, or)

[0592] Residual transform block; or

[0593] The image header, wherein the portion is an image and the second syntax element is updated in units of the following items (158):

[0594] tile,

[0595] slice,

[0596] Encoding tree blocks (e.g., units that are uniformly pre-subdivided from an image before each encoding tree block is divided into encoding blocks through recursive multi-tree subdivision), encoding blocks (making intra-image / inter-image pattern determination),

[0597] Encoded blocks (e.g., in units that determine intra-image / inter-image patterns, or)

[0598] Residual transform block; or

[0599] The parameter set, wherein the portion is a code tree block and the second syntax element is updated in units of the following items (158):

[0600] Encoded blocks (e.g., in units that determine intra-image / inter-image patterns, or)

[0601] Residual transformation block.

[0602] According to aspect thirty-five (when referring back to any of aspects twenty to thirty-four), in the encoder, the media signal can be color video, and the encoder can be configured to use different versions of the set of default quantizers (151) for different color components.

[0603] According to aspect thirty-six (when referencing any of aspects twenty to thirty-five), in the encoder, the binary function can be a parity check.

[0604] According to aspect thirty-seven (when referencing any one of aspects twenty to thirty-six), the encoder can be configured to predictively encode the media signal to obtain the residual signal in the following manner:

[0605] Perform a prediction to obtain a predicted version of the media signal and the residual signal.

[0606] According to aspect thirty-eight (when referencing any one of aspects twenty to thirty-seven), the encoder can be configured to predictively encode the media signal to obtain the residual signal in the following manner:

[0607] Perform a prediction to obtain a predicted version of the media signal and the residual signal;

[0608] The residual signal is then transformed in the forward direction.

[0609] According to aspect thirty-nine, the method may include the following steps:

[0610] The residual levels are decoded from the data stream, where each residual level represents a prediction residual, and then sequentially dequantized as follows:

[0611] Based on the current conversion state, select a quantizer from the set of default quantizers;

[0612] Use the quantizer to dequantize the current residual level to obtain the dequantized residual value;

[0613] The current transformation state is updated based on the characteristics of the current residual level obtained by applying a binary function to the current residual level (e.g., parity check), and based on the quantization mode information contained in the data stream; and

[0614] The media signal is reconstructed using the inversely quantized residual values;

[0615] Based on a surjective mapping dependent on quantization mode information, the current transformation state is transformed from a domain of a combination of one or more transformation states having characteristics of the current residual level to a set of one or more transformation states, wherein the cardinality of the set of one or more transformation states varies according to the quantization mode information; and

[0616] Regardless of the quantization mode information (e.g., unrelated to or independent of the quantization mode information), a quantizer selection is performed by mapping a predetermined number of bits of the current conversion state (e.g., one or more bits at one or more predetermined bit positions, such as LSBs or bits at the second but not the last significant bit position) to the default quantizer using a first mapping; the predetermined number and the first mapping are equal regardless of the quantization mode information.

[0617] According to aspect 40, a method may have the following steps:

[0618] Predictively encode media signals to obtain residual signals;

[0619] The residual values ​​of the residual signal are sequentially quantized in the following manner to obtain the residual level;

[0620] Based on the current conversion state, select a quantizer from the set of default quantizers;

[0621] The current residual value is quantized using the quantizer to obtain the current residual level;

[0622] The current conversion state is updated based on the characteristics of the current residual level obtained by applying a binary function to the current residual level (e.g., parity check), and based on the quantization mode information transmitted in the data stream; and

[0623] Encode the residual level into the data stream;

[0624] The current transformation state is transformed from a combination of one or more transformation states having characteristics of the current residual level to a set of one or more transformation states, based on a surjective mapping that depends on the quantization mode information; and the cardinality of the set of one or more transformation states varies according to the quantization mode information.

[0625] Regardless of the quantization mode information (e.g., unrelated to or independent of the quantization mode information), a quantizer selection is performed by mapping a predetermined number of bits of the current conversion state (e.g., one or more bits at one or more predetermined bit positions, such as LSBs or bits at the second but not the last significant bit position) to the default quantizer using a first mapping; the predetermined number and the first mapping are equal regardless of the quantization mode information.

[0626] According to aspect 41, a data stream can be encoded using the method described in aspect 40.

[0627] According to aspect 42, a computer program having program code may, when the program code is run on one or more computers, execute the method according to aspect 39 or 40.

Claims

1. A decoder (20) configured to: The residual level (142) representing the prediction residual is decoded (210) from the data stream (14), and the residual level (142) is dequantized (150) sequentially in the following manner: Based on the current conversion state (220), select (152) a quantizer (153) from the set of default quantizers (151); The current residual level is dequantized (154) using the quantizer (153) to obtain the dequantized residual value; Apply the binary function (156) to the current residual level to obtain the characteristics of the current residual level (157). as well as Using the transformation table to be used (106), the current transformation state (220) is updated (158) according to the characteristics (157) of the current residual level. The media signal (170) is reconstructed using the inversely quantized residual value (104). Based on the quantization mode information (180) contained in the data stream (14), a default transformation table is selected from the set of default transformation tables (159) as the transformation table to be used (106), wherein each of the default transformation tables represents a surjective mapping from the domain of a combination (163) of a set (161) of one or more transformation states having the characteristic (157) of the current residual level to the set (161) of one or more transformation states, wherein the difference between the default transformation tables lies in the cardinality of the set (161) of one or more transformation states, and Regardless of which default conversion table is selected as the conversion table to be used (106), the selection (152) of the quantizer (153) is performed by mapping a predetermined number of bits of the current conversion state (220) to the default quantizer using a first mapping (200), wherein the predetermined number is equal to the first mapping (200) regardless of which default conversion table is selected as the conversion table to be used (106).

2. The decoder according to claim 1, wherein the predetermined number of bits is one bit.

3. The decoder according to any one of claims 1 or 2, wherein the decoder is configured to manage the set (159) of the default transformation tables as different parts of a unified transformation table, wherein for each default transformation table, each transformation state in the set (161) of the one or more transformation states is indexed using a state index different from the state index used to index any other default transformation table in the unified transformation table.

4. The decoder of claim 3, wherein the decoder is configured to perform an update (158) of the current transformation state (220) by looking up an item in the unified transformation table that corresponds to the combination of the characteristic (157) of the current residual level and the current transformation state (220).

5. The decoder according to claim 3 or 4, wherein the quantization mode information (180) includes syntax elements in the data stream (14) representing the start transition state used in dequantizing the first residual level in dequantization order, such that by fitting to a state index used only in a portion of the unified transition table (106) corresponding to the transition table to be used, the syntax element indicates the transition table (106) to be used from the default transition table.

6. The decoder according to any one of claims 1 to 5, wherein the set (151) of the default quantizers comprises the following: The first default quantizer (1511) includes even integer multiples of the quantization step size (144) as reconstruction levels; and The second default quantizer (1512) includes odd integer multiples of the quantization step size (144) and zero as the reconstruction level.

7. The decoder according to any one of claims 1 to 6 is configured as follows: The current residual level is decoded from the data stream (14) using context-adaptive binary arithmetic decoding of the binary symbolic code of the current residual level, the binary symbolic code including a valid value binary symbolic code (92) indicating whether the current residual level is zero or non-zero. Based on the value obtained by mapping a further predetermined number of bits of the current transition state (220) to a value (230) using a second mapping (144), a first context (242) is selected for decoding the first binary symbol (92) of the current residual level, wherein the second mapping (144) is equal regardless of which default translation table is selected as the translation table to be used (106).

8. The decoder of claim 7, wherein the further predetermined number of bits is two bits.

9. The decoder according to any one of claims 1 to 8, wherein the media signal is video, and the decoder is configured to: The residual level (142) is decoded (210) from the data stream (14) in the following manner: Decode the residual level (142) of image block (84) before the residual level (142) of another image block (84); In one or more scans, binary codes of the residual level (142) of the image block (84) are sequentially decoded, and context-adaptive binary arithmetic decoding is used for a predetermined number of leading binary codes of the binary codes of the residual level, and equal probability bypass mode is used for subsequent binary codes of the binary codes of the residual level. The binary representation of a predetermined residual level is determined by mapping a further predetermined number of bits of the transition state to the binary representation parameter (302) using a third mapping, and the determination of the binary representation of the predetermined residual level is performed according to the binary representation parameter (302).

10. The decoder of claim 9, configured to determine the binaryization of the predetermined residual level based on the binaryization parameter (302), such that the binaryization is a modified default binaryization by redirecting a binary code based on the binaryization parameter (302) from being associated with a predetermined level to being associated with level zero, and redirecting one or more binary codes from being associated with one or more levels from zero to the predetermined level minus one to being associated with one or more levels from one to the predetermined level.

11. The decoder according to claim 9 or 10, wherein the further predetermined number of bits is one bit.

12. The decoder of claim 9, wherein the set (159) of default translation tables comprises two or more of the following: A first default transformation table, wherein the cardinality of the set (161) of one or more transformation states is one; The second default transformation table, wherein the cardinality of the set (161) of one or more transformation states is four; The third default transformation table, wherein the cardinality of the set (161) of one or more transformation states is eight.

13. The decoder according to any one of claims 1 to 12, wherein the media signal is video, and the decoder is configured to: The quantization mode information (180) is read from the data stream (14) in one of the following ways, and the selection of a default conversion table from the set (159) of default conversion tables is performed: Only once for the aforementioned video; Image-by-image patch (84); Based on each image; Based on each slice; and Based on each image sequence.

14. The decoder according to any one of claims 1 to 13, wherein the media signal is video, and the quantization mode information (180) includes a first syntax element in the data stream (14), the first syntax element indicating whether, for the video or a portion of the video, the selection of a default conversion table from the set of default conversion 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 default conversion table from the set of default conversion tables (159) will be selected as the default conversion table for the portion of the video.

15. The decoder of claim 14, wherein the first syntax element is included in one of the following in the data stream (14): A set of video parameters, wherein the portion is the video, and the second syntax element controls the selection of a default conversion table from the set of default conversion tables (159) in units of the following: Image sequence, image, tile, slice, Encoding tree blocks, Encoded blocks, or Residual transform block; A set of sequence parameters, wherein the portion is an image sequence, and the second syntax element controls the selection of a default transformation table from the set (159) of default transformation tables in units of the following: image, tile, slice, Encoding tree blocks, Encoded blocks, or Residual transform block; A set of image parameters, wherein the portion comprises one or more images, and the second syntax element controls the selection of a default transformation table from the set of default transformation tables (159) in units of the following: image, tile, slice, Encoding tree blocks, Encoded blocks, or Residual transform block; or The image header, wherein the portion is an image, and the second syntax element controls the selection of a default transformation table from the set (159) of default transformation tables in units of the following: tile, slice, Encoding tree blocks, Encoded blocks, or Residual transform block; or The parameter set, wherein the portion thereof is a code tree block, and the second syntax element controls the selection of a default transformation table from the set of default transformation tables (159) in units of the following: Encoded blocks; or Residual transformation block.

16. The decoder according to any one of claims 1 to 15, wherein the media signal is a color video, and the decoder is configured to use different versions of the set (151) of the default quantizers for different color components.

17. The decoder according to any one of claims 1 to 16, wherein the binary function is a parity check.

18. The decoder according to any one of claims 1 to 17 is configured to reconstruct (170) the media signal using the dequantized residual value (104) in such a way that: Perform a prediction to obtain a predicted version of the media signal; The prediction version is corrected using the inversely quantized residual value (104).

19. The decoder according to any one of claims 1 to 18 is configured to reconstruct (170) the media signal using the dequantized residual value (104) in such a way that: Perform a prediction to obtain a predicted version of the media signal; The inversely transformed residual value (104) is reverse-transformed to obtain the media residual signal; and The prediction version is corrected using the media residual signal.

20. An encoder configured to: Predictively encode media signals to obtain residual signals; The residual values ​​representing the residual signal are sequentially quantized in the following manner to obtain the residual level (142): Based on the current conversion state (220), select (152) a quantizer (153) from the set of default quantizers (151); The current residual value is quantized (154) using the quantizer (153) to obtain the current residual level; Apply the binary function (156) to the current residual level to obtain the characteristics of the current residual level (157). as well as Using the transformation table to be used (106), the current transformation state (220) is updated (158) according to the characteristics (157) of the current residual level; The residual level (142) is encoded into the data stream (14); Based on the quantization mode information (180) transmitted in the data stream (14), a default transformation table is selected from the set of default transformation tables (159) as the transformation table to be used (106), wherein each of the default transformation tables represents a surjective mapping from the domain of a combination (163) of a set (161) of one or more transformation states having the characteristics (157) of the current residual level to the set (161) of one or more transformation states, wherein the difference between the default transformation tables lies in the cardinality of the set (161) of one or more transformation states; and Regardless of which default conversion table is selected as the conversion table to be used (106), the selection (152) of the quantizer (153) is performed by mapping a predetermined number of bits of the current conversion state (220) to the default quantizer using a first mapping (200), wherein the predetermined number is equal to the first mapping (200) regardless of which default conversion table is selected as the conversion table to be used (106).

21. The encoder of claim 20, wherein the predetermined number of bits is one bit.

22. The encoder according to any one of claims 20 or 21, wherein the encoder is configured to manage the set (159) of the default transformation tables as different parts of a unified transformation table, wherein for each default transformation table, each transformation state in the set (161) of the one or more transformation states is indexed using a state index different from the state index used to index any other default transformation table in the unified transformation table.

23. The encoder of claim 22, wherein the encoder is configured to perform an update (158) of the current transformation state (220) by looking up an item in the unified transformation table that corresponds to the combination of the characteristic (157) of the current residual level and the current transformation state (220).

24. The encoder of claim 22 or 23 is configured to encode a syntax element as the quantization mode information (180) into the data stream (14), the syntax element representing the start transition state used in quantizing the first residual value in quantization order, such that by fitting to a state index used only in a portion of a unified transition table corresponding to the transition table to be used, the syntax element indicates the transition table to be used from the default transition table.

25. The encoder according to any one of claims 20 to 24, wherein the set (151) of the default quantizers comprises: The first default quantizer (1511) includes even integer multiples of the quantization step size (144) as encoding levels; and The second default quantizer (1512) includes odd integer multiples of the quantization step size (144) and zero as the encoding level.

26. The encoder according to any one of claims 20 to 25 is configured to: The current residual level is encoded into the data stream (14) using context-adaptive binary arithmetic coding of the binary symbol code of the current residual level, the binary symbol code including a valid value binary symbol code (92) indicating whether the current residual level is zero or non-zero. Based on the value obtained by mapping a further predetermined number of bits of the current transformation state (220) to a value (230) using a second mapping (144), a first context (242) is selected to encode the first binary code (92) for the current residual level, wherein the second mapping (144) is equal regardless of which default transformation table is selected as the transformation table to be used.

27. The encoder of claim 26, wherein the further predetermined number of bits is two bits.

28. The encoder according to any one of claims 20 to 27, wherein the media signal is video, and the encoder is configured to: The residual level is encoded into the data stream (14) in the following manner: The residual level for one image block (84) is encoded before the residual level for another image block (84); In one or more scans, binary codes of the residual level of the binary code of the image block (84) are sequentially encoded, and context-adaptive binary arithmetic coding is used for a predetermined number of leading binary codes of the binary code of the residual level, and equal probability bypass mode is used for subsequent binary codes of the binary code of the residual level. The binary representation of a predetermined residual level is determined by mapping a further predetermined number of bits of the transition state to the binary representation parameter (302) using a third mapping, and the determination of the binary representation of the predetermined residual level is performed according to the binary representation parameter (302).

29. The encoder of claim 28, configured to determine the binaryization of the predetermined residual level based on the binaryization parameter (302), such that the binaryization is a modified default binaryization by: redirecting a binary code based on the binaryization parameter (302) from being associated with a predetermined level to being associated with level zero, and redirecting one or more binary codes from being associated with one or more levels from zero to the predetermined level minus one to being associated with one or more levels from one to the predetermined level.

30. The encoder of claim 28 or 29, wherein the further predetermined number of bits is one bit.

31. The encoder of claim 28, wherein the set (159) of default transformation tables comprises two or more of the following: A first default transformation table, wherein the cardinality of the set (161) of one or more transformation states is one; The second default transformation table, wherein the cardinality of the set (161) of one or more transformation states is four; The third default transformation table, wherein the cardinality of the set (161) of one or more transformation states is eight.

32. The encoder according to any one of claims 20 to 31, wherein the media signal is video, and the encoder is configured to: The quantization mode information (180) is written to the data stream (14) in one of the following ways, and the selection of a default conversion table from the set (159) of default conversion tables is performed: Only once for the aforementioned video; Image-by-image patch (84); Based on each image; Based on each slice; and Based on each image sequence.

33. The encoder according to any one of claims 20 to 32, wherein the media signal is video, and the quantization mode information (180) includes a first syntax element in the data stream (14), the first syntax element indicating whether, for the video or a portion of the video, the selection of a default transformation table from the set of default transformation 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 default transformation table from the set of default transformation tables (159) will be selected as the default transformation table for the portion of the video.

34. The encoder of claim 33, wherein the first syntax element is included in one of the following in the data stream (14): A set of video parameters, wherein the portion is the video, and the second syntax element controls the selection of a default conversion table from the set of default conversion tables (159) in units of the following: Image sequence, image, tile, slice, Encoding tree blocks, Encoded blocks, or Residual transform block; A set of sequence parameters, wherein the portion is an image sequence, and the second syntax element controls the selection of a default transformation table from the set (159) of default transformation tables in units of the following: image, tile, slice, Encoding tree blocks, Encoded blocks, or Residual transform block; A set of image parameters, wherein the portion comprises one or more images, and the second syntax element controls the selection of a default transformation table from the set of default transformation tables (159) in units of the following: image, tile, slice, Encoding tree blocks, Encoded blocks, or Residual transform block; or The image header, wherein the portion is an image, and the second syntax element controls the selection of a default transformation table from the set (159) of default transformation tables in units of the following: tile, slice, Encoding tree blocks, Encoded blocks, or Residual transform block; or The parameter set, wherein the portion thereof is a code tree block, and the second syntax element controls the selection of a default transformation table from the set (159) of default transformation tables in units of the following: Encoded blocks, or Residual transformation block.

35. The encoder according to any one of claims 20 to 34, wherein the media signal is a color video, and the encoder is configured to use different versions of the set (151) of the default quantizers for different color components.

36. The encoder according to any one of claims 20 to 35, wherein the binary function is a parity check.

37. The encoder according to any one of claims 20 to 36 is configured to predictively encode a media signal to obtain a residual signal in such a way that: Perform a prediction to obtain a predicted version of the media signal and the residual signal.

38. The encoder according to any one of claims 20 to 37 is configured to predictively encode a media signal to obtain a residual signal in such a way that: Perform a prediction to obtain a predicted version of the media signal and the residual signal; The residual signal is then transformed in the forward direction.

39. A method comprising: The residual levels representing the prediction residuals are decoded from the data stream, and the residual levels are dequantized sequentially in the following manner: Based on the current conversion state, select a quantizer from the set of default quantizers; The quantizer is used to dequantize the current residual level to obtain the dequantized residual value; Apply a binary function to the current residual level to obtain the characteristics of the current residual level; as well as Using the transformation table to be used, the current transformation state is updated based on the characteristics of the current residual level. The media signal is reconstructed using the inversely quantized residual values. Based on the quantization mode information contained in the data stream, a default transformation table is selected from a set of default transformation tables as the transformation table to be used. Each default transformation table represents a surjective mapping from a combination of the domains of a set of one or more transformation states having the characteristics of the current residual level to a set of one or more transformation states. The difference between the default transformation tables lies in the cardinality of the set of one or more transformation states. Regardless of which default conversion table is selected as the conversion table to be used, the selection of the quantizer is performed by mapping a predetermined number of bits of the current conversion state to the default quantizer using a first mapping, wherein the predetermined number and the first mapping are equal regardless of which default conversion table is selected as the conversion table to be used.

40. A method comprising: Predictively encode media signals to obtain residual signals; The residual values ​​representing the residual signal are sequentially quantized in the following manner to obtain the residual levels: Based on the current conversion state, select a quantizer from the set of default quantizers; The current residual value is quantized using the quantizer to obtain the current residual level; Apply the binary function to the current residual level to obtain the characteristics of the current residual level; as well as Using the transformation table to be used, update the current transformation state based on the characteristics of the current residual level; The residual level is encoded into the data stream; Based on the quantization mode information transmitted in the data stream, a default transformation table is selected from the set of default transformation tables as the transformation table to be used, wherein each of the default transformation tables represents a surjective mapping from the domain of a combination of a set of one or more transformation states having the characteristics of the current residual level to a set of one or more transformation states, wherein the difference between the default transformation tables lies in the cardinality of the set of one or more transformation states. as well as Regardless of which default conversion table is selected as the conversion table to be used, the selection of the quantizer is performed by mapping a predetermined number of bits of the current conversion state to the default quantizer using a first mapping, wherein the predetermined number and the first mapping are equal regardless of which default conversion table is selected as the conversion table to be used.

41. A data stream (14) wherein the data stream is encoded according to the method of claim 40.

42. A computer program having program code that, when run on one or more computers, performs the method according to claim 39 or 40.