Efficient coding of transform coefficient using or suitable for combination with dependent scalar quantization

By employing dependent scalar quantization and context-adaptive entropy encoding for transform coefficients, the encoding efficiency and distortion trade-off in video encoding are improved, resulting in reduced complexity and enhanced information utilization.

JP2025102920AActive Publication Date: 2025-07-08FRAUNHOFER GESELLSCHAFT ZUR FORDERUNG DER ANGEWANDTEN FORSCHUNG EV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
JP2025061276
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2018-09-24
Filing Date
2025-04-02
Publication Date
2025-07-08
Estimated Expiration
2039-09-24

AI Technical Summary

Technical Problem

Existing video encoding technologies face challenges in achieving efficient encoding of transform coefficients due to the trade-off between bit rate and quantization distortion, and the complexity introduced by dependent quantization and context modeling, which affects the encoding efficiency and information availability.

Method used

The use of dependent scalar quantization combined with context-adaptive entropy encoding, where the set of reconstruction levels for a transform coefficient depends on the quantization indices of preceding coefficients, along with modified entropy coding techniques to optimize the probability model for improved encoding efficiency.

Benefits of technology

This approach reduces the average distortion between input and reconstructed transform coefficients while maintaining a low implementation complexity, achieving higher encoding efficiency and better utilization of available information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025102920000030
    Figure 2025102920000030
  • Figure 2025102920000031
    Figure 2025102920000031
  • Figure 2025102920000032
    Figure 2025102920000032
Patent Text Reader

Abstract

To provide a coding method of a transform coefficient level such as the one for coding a picture or a video, and provide an electronic apparatus, and a storage medium.SOLUTION: A method for decoding a picture from a data stream includes steps of: identifying the number of available context coding bins; decoding at least one context coding flag at a current position in a subblock; updating the number of available context coding bins; comparing the number of updated available context coding bins and a predefined value, after decoding all of the context coding flags associated with the current position and before advancing to a next position immediately following the current position in a scan order; ending a decoding path based on the comparison; decoding the residual value at an absolute level associated with specific transform coefficients in each position of the specific transform coefficients; and decoding an absolute level associated with transform coefficients in each position.SELECTED DRAWING: None
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the encoding of transform coefficient levels for encoding an image or video.

Background Art

[0002] When setting the quantization parameter, the encoder has to compromise. Coarser quantization reduces the bit rate but increases quantization distortion, while finer quantization reduces the distortion but increases the bit rate. It is preferable to have in hand the concept of increasing the encoding efficiency for a given domain of available quantization levels. One such possibility is the use of dependent quantization where quantization is constantly adapted depending on previously quantized and encoded data. However, the dependencies in quantization also cause problems such as an increase in the complexity of encoding, affect the interrelationships between the data items being quantized and encoded, and reduce the information available for performing context modeling so as to affect the availability of information for context derivation for encoding individual syntax elements.

[0003] It is preferable to have the concept of achieving more efficient encoding of the coefficients of a transform block by using dependent quantization and context adaptive entropy encoding, or enabling more efficient encoding of the coefficients of a transform block such that the use of dependent quantization is combined with the use of context adaptive entropy encoding.

Summary of the Invention

Problems to be Solved by the Invention

[0004] An object of the present invention is to provide such a concept for encoding a block of transform coefficients.

Means for Solving the Problems

[0005] This object is achieved by the subject matter of the independent claims of the present application.

[0006] Advantageous aspects are the subject matter of the dependent claims. Preferred embodiments of the present application will be described with reference to the following drawings.

Brief Description of the Drawings

[0007]

Figure 1

Figure 2

Figure 3

Figure 4

Figure 5

Figure 6

Figure 7

Figure 8

Figure 9

Figure 10

Figure 11

Figure 12a

Figure 12b

Figure 13-1

Figure 13-2

Figure 14

Figure 15

Figure 16-1

Figure 16-2

Figure 17

Figure 18-1

Figure 18-2

Figure 19-1

Figure 19-2

[0008] According to the embodiments described below, transform coding is used to transform a set of samples. Dependent quantization is used to quantize the resulting transform coefficients, and entropy coding of the obtained quantization indices, i.e., context-adaptive arithmetic coding, is performed. On the decoder side, the set of reconstructed samples is obtained by corresponding to the decoding of the dependent reconstruction of the quantization indices and the transform coefficients, and the inverse transform yields the samples. The samples can be part of an image or video and can describe a particular image block. Of course, other possibilities exist as well. The following description of the embodiments is mainly directed to the lossy coding of blocks of prediction error samples in image and video coders, but the embodiments can also be applied to other areas of lossy coding. In particular, there is no restriction on the set of samples forming a rectangular block, nor is there a restriction on the set of samples representing prediction error samples (i.e., the difference between the original and the predicted signal).

[0009] All modern video coders, such as the international video coding standards, H.264|MPEG-4 AVC and H.265|MPEG-H HEVC, follow the basic approach of hybrid video coding. The video image is divided into blocks, the samples of the blocks are predicted using intra-picture prediction or inter prediction, and the resulting prediction error signal (the difference between the samples of the original and the predicted signal) is encoded using transform coding.

[0010] FIG. 1 shows a simplified block diagram of a typical up-to-date video encoder. Video images of a video sequence are encoded in a specific order called the encoding order. The encoding order of the images may be different from the capture and display order. For actual encoding, each video image is divided into blocks. A block contains samples of a rectangular region of a specific color component. The entities of blocks of all color components corresponding to the same rectangular region are often called units. In H.265|MPEG-H HEVC, depending on the purpose of block partitioning, it is distinguished between coding tree blocks (CTBs), coding blocks (CBs), prediction blocks (PBs), and transform blocks (TBs). The related units are called coding tree units (CTUs), coding units (CUs), prediction units (PUs), and transform units (TUs).

[0011] Typically, a video image is first divided into units of a fixed size (i.e., blocks of a fixed size aligned for all color components). In H.265|MPEG-H HEVC, these units of fixed size are called coding tree units (CTUs). Each CTU may be further divided into a plurality of coding units (CUs). A coding unit is an entity in which a coding mode (e.g., intra or inter picture coding) is selected. In H.265|MPEG-H HEVC, the decomposition of a CTU into one or more CUs is specified by a quadtree (QT) syntax and transmitted as part of the bitstream. The CUs of a CTU are processed in a so-called z-scan order. That is, the four blocks resulting from the division are processed in raster scan order, and if any of the blocks is further divided, the corresponding four blocks (including the smaller blocks included) are processed before the next block of the higher division level is processed.

[0012] When a CU is encoded in an intra coding mode, an intra prediction mode for the luma signal is transmitted, and when the video signal includes chroma components, another intra prediction mode for the chroma signals is transmitted. In ITU-T H.265|MPEG-H HEVC, when the CU size is equal to the smallest CU size (as signaled in the sequence parameter set), the luma block can be divided into four blocks of equal size, in which case, for each of these blocks, a separate luma intra prediction mode is transmitted. The actual intra prediction and encoding are performed based on transform blocks. For each transform block of an intra picture coding CU, the prediction signal is derived using already reconstructed samples of the same color component. The algorithm used to generate the prediction signal for a transform block is determined by the transmitted intra prediction mode.

[0013] A CU encoded in the inter-picture coding mode may be further divided into a plurality of prediction units (PUs). A prediction unit is an entity consisting of a luminance and, in the case of color video, two associated chrominance blocks (covering the same picture area), and a single set of prediction parameters is used. The CU may be encoded as a single prediction unit, or it may be divided into two non-square (symmetric and asymmetric partitions are supported) or four square prediction units. For each PU, an individual set of motion parameters is transmitted. Each set of motion parameters includes the number of motion hypotheses (one or two in H.265|MPEG-H HEVC) and, for each motion hypothesis, a reference picture (indicated in the list of reference pictures via a reference picture index) and an associated motion vector. Further, H.265|MPEG-H HEVC provides a so-called merge mode where the motion parameters are not explicitly transmitted but are derived based on the motion parameters of spatially or temporally neighboring blocks. When a CU or PU is encoded in the merge mode, only the index of a list of motion parameter candidates (this list is derived using the motion data of spatially and temporally neighboring blocks) is transmitted. The index completely determines the set of motion parameters to be used. The prediction signal for an inter-coded PU is formed by motion-compensated prediction. For each motion hypothesis (specified by a reference picture and a motion vector), the prediction signal is formed by a displaced block within the specified reference picture, and the displacement for the current PU is specified by the motion vector. The displacement is typically specified with sub-sample accuracy (in H.265|MPEG-H HEVC, the motion vector has a quarter-luminance sample accuracy). In the case of a non-integer motion vector, the prediction signal is generated by inserting a reconstructed reference picture (typically using a separable FIR filter). The final prediction signal for a PU with multiple hypothesis predictions is formed by a weighted sum of the prediction signals for the individual motion hypotheses. Typically, the same set of motion parameters is used for the luminance and chrominance blocks of the PU.Even though the latest video coding standards may use translational displacement vectors to identify the motion of the current region (block of samples) with respect to a reference picture, it is also possible to use higher-order motion models (e.g., affine motion models). In that case, additional motion parameters have to be sent for the motion hypothesis.

[0014] For both intra-picture and inter-picture coded CUs, the prediction error signal (also called the residual signal) is typically transmitted via transform coding. In H.265|MPEG-H HEVC, the block of luminance residual samples of a CU as well as the block of chrominance residual samples (if present) are partitioned into transform blocks (TBs). The partitioning of a CU into transform blocks is indicated by a quadtree syntax and is also called a residual quadtree (RQT). The resulting transform blocks are coded using transform coding: a 2D transform is applied to the block of residual samples, the resulting transform coefficients are quantized using independent scalar quantization, and the resulting transform coefficient levels (quantization indices) are entropy coded. In P and B slices, at the start of the CU syntax, a skip_flag is transmitted. If this flag is equal to 1, it indicates that the corresponding CU consists of a single prediction unit coded in merge mode (i.e., it is assumed that merge_flag is equal to 1), and that all transform coefficients are equal to 0 (i.e., the reconstructed signal is equal to the predicted signal). In that case, only merge_idx is transmitted in addition to skip_flag. If skip_flag is equal to 0, the prediction mode (inter or intra) is signaled and the syntax features described above continue.

[0015] Since already encoded pictures may be used for motion compensated prediction of blocks in subsequent pictures, pictures must be fully reconstructed in the encoder. The reconstructed prediction error signal of the block (obtained by reconstructing the transform coefficients given quantization indices and by inverse transformation) is added to the corresponding prediction signal, and the result is written to the buffer for the current picture. After all blocks of the picture have been reconstructed, one or more in-loop filters can be applied (e.g., a deblocking filter and a sample adaptive offset filter). Thereafter, the final reconstructed picture is stored in the decoded picture buffer.

[0016] The embodiments described below present concepts for encoding transform coefficient blocks such as those related to prediction errors. The concepts are applicable to both intra-picture and inter-picture encoding blocks. They are also applicable to the transform coding of non-rectangular sample portions. In contrast to conventional transform coding, the transform coefficients are not quantized independently. Rather, they are quantized using dependent quantization. According to dependent quantization, the set of available reconstruction levels for a particular transform coefficient depends on the quantization index selected for other transform coefficients.

[0017] All major video coding standards (including the latest standard H.265|MPEG-H HEVC) utilize the concept of transform coding for encoding blocks of prediction error samples. The prediction error samples of a block represent the difference between the samples of the original signal for the block and the samples of the prediction signal. The prediction signal is obtained either by intra-picture prediction (in which case the samples of the prediction signal for the current block are derived based on the already reconstructed samples of neighboring blocks within the same picture), or by inter-picture prediction (in which case the samples of the prediction signal are derived based on the samples of an already reconstructed picture). The samples of the original prediction error signal are obtained by subtracting the value of the samples of the prediction signal from the sample values of the original signal for the current block.

[0018] The transform coding of the sample block consists of linear transformation, scalar quantization, and entropy coding of the quantization index. On the encoder side (see Figure 2a), an N×M block of original samples is transformed using the linear analysis transform A. The result is an N×M block of transform coefficients. The transform coefficient tk represents the original prediction error samples in a different signal space (or different coordinate system). The N×M transform coefficients are quantized using N×M independent scalar quantizers. Each transform coefficient tk is mapped to a quantization index qk, also called the transform coefficient level. The resulting quantization index qk is entropy coded and written into the bitstream.

[0019] On the decoder side shown in Figure 2b, the transform coefficient level qk is decoded from the received bitstream. Each transform coefficient level qk is mapped to a reconstructed transform coefficient t′k. An N×M block of reconstructed samples is obtained by transforming the block of reconstructed transform coefficients using the linear synthesis transform B.

[0020] Even if the video coding standard only specifies the synthesis transform B, it is common practice to use the inverse of the synthesis transform B as the analysis transform A in the encoder, i.e., A = B -1 That is. Furthermore, the transforms used in actual video coding systems are orthogonal transforms (B -1 = B T ) or almost orthogonal transforms. In the case of orthogonal transforms, the distortion of the mean squared error (MSE) in the signal space is equal to the distortion of the MSE in the transform domain. Orthogonality has the important advantage that the distortion of the MSE between the original and the reconstructed sample blocks can be minimized using independent scalar quantizers. The use of orthogonal transforms significantly simplifies the quantization algorithm even if the actual quantization process used in the encoder takes into account the dependencies between the transform coefficient levels (introduced by the above description of entropy coding).

[0021] For a typical prediction error signal, the transform has the effect that the signal energy is concentrated in a small number of transform coefficients. The resulting statistical dependency among the transform coefficients is reduced compared to the original prediction error samples.

[0022] In the latest video coding standards, a separable discrete cosine transform (type II) or its integer approximation is used. However, the transform can be easily replaced without changing other aspects of the transform coding system. Examples of improvements that have been proposed in the literature or standards documents include the following. ● Use of a discrete sine transform (DST) for intra-picture prediction blocks (optionally depending on the intra-picture prediction mode and / or block size). Note that H.265|MPEG-H HEVC already includes a DST for intra-picture prediction 4×4 transform blocks. ● Switching transform: The encoder selects the transform to be actually used from a predefined set of transforms. The set of available transforms is known to both the encoder and the decoder and can be efficiently signaled using an index in the list of available transforms. The set of available transforms and their ordering in the list can depend on other coding parameters for the block, such as the selected intra prediction mode. In special cases, since the transform used is completely determined by encoding the parameters like the intra prediction mode, no syntax element for specifying the transform needs to be transmitted. ● Non-separable transform: The transform used in the encoder and decoder represents a non-separable transform. Note that the concept of switching transform may include one or more non-separable transforms. For complex reasons, the use of non-separable transforms can be restricted to a specific block size. ● Multi-level conversion: The actual conversion consists of two or more conversion stages. The first conversion stage can be composed of separable conversions with low computational complexity. Then, in the second stage, a subset of the resulting conversion coefficients is further converted using non-separable conversion. The two-stage approach has the advantage that a more complex non-separable conversion is applied to a smaller number of samples compared to non-separable conversion for the entire conversion block. The concept of multi-level conversion can be efficiently combined with the concept of switched conversion.

[0023] The conversion coefficients are quantized using a scalar quantizer. As a result of quantization, the set of allowable values of the conversion coefficients is reduced. In other words, the conversion coefficients are mapped to an addable set (actually, a finite set) of so-called reconstruction levels. The set of reconstruction levels represents an appropriate subset of the set of possible conversion coefficient values. To simplify the following entropy coding, the allowable reconstruction levels are represented by quantization indices (also called conversion coefficient levels) and transmitted as part of the bitstream. On the decoder side, the quantization index (conversion coefficient level) is mapped to the reconstructed conversion coefficients. The possible values of the reconstructed conversion coefficients correspond to the set of reconstruction levels. On the encoder side, the result of scalar quantization is a block of conversion coefficient levels (quantization indices).

[0024]

Number

[0025] In this context, the term "independent scalar quantization" indicates the property that, when a quantization index q for any conversion coefficient is given, the associated reconstructed conversion coefficient t' can be determined independently of all quantization indices for other conversion coefficients.

[0026]

Number

[0027] Even old video coding standards such as H.262|MPEG-2 video identify a modified URQ where the distance between the reconstruction level zero and the first non-zero reconstruction level is increased (e.g., up to three halves of the nominal quantization step size Δ) compared to the nominal quantization step size.

[0028]

Number

[0029] The slice QP is typically sent within the slice header. In general, it is possible to modify the quantization parameter QP on a block basis. For that purpose, a DQP (delta quantization parameter) can be sent. The quantization parameter used is determined by the sent DQP and the predicted QP value and is derived using the QP of already encoded (typically neighboring) blocks.

[0030]

Number

[0031] The main purpose of the quantization weight matrix is to provide the possibility of introducing quantization noise in a perceptually meaningful way. By using an appropriate weight matrix, it is possible to utilize the spatial contrast sensitivity of human vision and achieve a good trade-off between bitrate and subjective reconstruction quality. Nevertheless, many encoders use a so-called flat quantization matrix (which can be efficiently sent using high-level syntax elements). In this case, the same quantization step size Δ is used for all transform coefficients within the block. Thus, the quantization step size is fully specified by the quantization parameter QP.

[0032] Blocks of transform coefficient levels (quantization indices for the transform coefficients) are entropy encoded (i.e., transmitted as part of a bit stream in a lossless manner). Since linear transforms can only reduce linear dependencies, entropy encoding of transform coefficient levels is typically designed to take advantage of the non-linear dependencies remaining between the transform coefficient levels within a block to enable efficient encoding. Well-known examples are run-level encoding in MPEG-2 video, run-level-last encoding in H.263 and MPEG-4 video, context-adaptive variable-length coding (CAVLC) in H.264|MPEG-4 AVC, and context-adaptive binary arithmetic coding (CABAC) in H.264|MPEG-4 AVC and H.265|MPEG-H HEVC.

[0033] The CABAC specified in the latest video coding standard H.265|MPEG-H HEVC follows a general concept that can be applied to a wide variety of transform block sizes. Transform blocks larger than 4×4 samples are divided into 4×4 sub-blocks. The division is shown as an example of a 16×16 transform block in FIGS. 4a and b. The coding order of the 4×4 sub-blocks shown in FIG. 4a, as well as the coding order of the transform coefficient levels within the sub-blocks shown in FIG. 4b, are generally specified by the reverse diagonal scan shown in the figure. For a particular intra-picture prediction block, a horizontal or vertical scan pattern is used (depending on the actual intra prediction mode). The coding order always starts at the high-frequency positions.

[0034] In H.265|MPEG-H HEVC, transform coefficient levels are transmitted based on 4×4 sub-blocks. Lossless coding of transform coefficient levels includes the following steps. 1. The syntax element coded_block_flag is transmitted to signal whether there are non-zero transform coefficient levels within the transform block. If coded_block_flag is equal to 0, no further data is encoded for the transform block. 2. The x and y coordinates of the first non-zero transform coefficient level in the symbolization order (e.g., the reverse diagonal scan order of the block direction shown in FIG. 4) are transmitted. The transmission of the coordinates is split into a prefix and a suffix part. The standard uses the syntax elements last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, and last_sig_coeff_x_suffix. 3. Starting from the 4×4 sub-block containing the first non-zero transform coefficient level in the symbolization order, the 4×4 sub-blocks are processed in the symbolization order, and the encoding of the sub-blocks includes the following main steps: a. The syntax element coded_sub_block_flag is transmitted, which indicates whether the sub-block contains non-zero transform coefficient levels. For the first and last 4×4 sub-blocks (i.e., the sub-blocks containing the first non-zero transform coefficient level or the DC level), this flag is not transmitted and is assumed to be equal to 1. b. If all transform coefficient levels within the sub-block with coded_sub_block_flag are equal to 1, the syntax element significant_coeff_flag indicates whether the corresponding transform coefficient level is not equal to zero. This flag is transmitted only if its value cannot be estimated based on the data that has already been transmitted. In particular, this flag is not transmitted for the first significant scan position (identified by the transmitted x and y coordinates), the DC coefficient is located in a sub-block different from the first non-zero coefficient in the symbolization order, and is not transmitted for the DC coefficient when all other significant_coeff_flag for the last sub-block are equal to zero. c. If the first eight transform coefficient levels with significant_coeff_flag are equal to 1 (if any), the flag coeff_abs_level_greater1_flag is transmitted. It indicates whether the absolute value of the transform coefficient level is greater than 1. If (if any) the first transform coefficient having the d.coeff_abs_level_greater1_flag is equal to 1, the flag coeff_abs_level_greater2_flag is transmitted. It indicates whether the absolute value of the transform coefficient level is greater than 2. If all levels having the e.significant_coeff_flag are equal to 1 (exceptions are described below), the syntax element coeff_sign_flag is transmitted to specify the sign of the transform coefficient level. For all transform coefficient levels whose absolute value is not already fully specified by the values of the significant_coeff_flag, coeff_abs_level_greater1_flag, and coeff_abs_level_greater2_flag (if any of the transmitted flags is equal to zero, the absolute value is fully specified), the remainder of the absolute value is transmitted using the multilevel syntax element coeff_abs_level_remaining.

[0035] In H.265|MPEG-H HEVC, all syntax elements are encoded using context-adaptive binary arithmetic coding (CABAC). All non-binary syntax elements are first mapped to a series of binary decisions, also called bins. The resulting bin sequence is encoded using binary arithmetic coding. For that purpose, each bin is associated with a probability model, also called a context (binary probability mass function). For most bins, the context represents an adaptive probability model, which means that the associated binary probability mass function is updated based on the value of the bin that has actually been encoded. Conditional probabilities can be exploited by switching the context of a particular bin based on the data that has already been transmitted. CABAC also includes a so-called bypass mode, where a fixed probability mass function (0.5, 0.5) is used.

[0036] The context selected for the coding of coded_sub_block_flag depends on the value of coded_sub_block_flag for already-coded neighboring sub-blocks. The context for significant_coeff_flag is selected based on the scan position (x and y coordinates) within the sub-block, the size of the transform block, and the value of coded_sub_block_flag within neighboring sub-blocks. For the flags coeff_abs_level_greater1_flag and coeff_abs_level_greater2_flag, the context selection depends on whether the current sub-block contains the DC coefficient and whether the coeff_abs_level_be_flag equal to 1 has been sent to neighboring sub-blocks. For coeff_abs_level_greater1_flag, it further depends on the number and values of coeff_abs_level_greater1_flag already coded for the sub-block.

[0037] The sign coeff_sign_flag and the absolute value residue coeff_abs_level_remaining are coded in the bypass mode of the binary arithmetic coder. When mapping coeff_abs_level_remaining to a sequence of bins (binary decisions), an adaptable binarization scheme is used. The binarization is controlled by a single parameter and adapted based on the values already coded for the sub-block.

[0038] H.265|MPEG-H HEVC also includes a so-called coded data concealment mode, where (under certain conditions) the transmission of the sign for the last non-zero level within a sub-block is omitted. Instead, the sign of this level is embedded in the parity of the sum of the absolute values for the levels of the corresponding sub-block. Note that the encoder must take this aspect into account when determining the appropriate transform coefficient levels.

[0039] A video coding standard only specifies a bitstream syntax and a reconstruction process. When considering transform coding for a given block of original prediction error samples and a given quantization step size, the encoder has many degrees of freedom. When a quantization index qk is given for a transform block, the entropy coding must follow a uniquely defined algorithm (i.e., constituting an arithmetic codeword) for writing data into the bitstream. However, the encoder algorithm for obtaining the given quantization index qk for the original block of prediction error samples is outside the scope of the video coding standard. Furthermore, the encoder has the freedom to select a quantization parameter QP in block units. In the following description, it is assumed that the quantization parameter QP and the quantization weight matrix are given. Therefore, the quantization step size of each transform coefficient is known. Furthermore, it is assumed that the encoder performs an analysis transform that is the inverse (or a very close approximation thereto) of a specified synthesis transform for obtaining the original transform coefficient tk. Even under these conditions, the encoder has the freedom to select a quantization index qk for each original transform coefficient tk. Since the selection of the transform coefficient level determines both distortion (or reconstruction / approximation quality) and bit rate, the quantization algorithm used has a substantial impact on the rate-distortion performance of the generated bitstream.

[0040] [Number]

[0041] [Number]

[0042] [Number]

[0043] [Number]

[0044]

Number

[0045] The modified concept for transform coding is that the transform coefficients are not independently quantized and not reconstructed. Instead, the allowable reconstruction levels of the transform coefficients depend on the quantization indices selected for the transform coefficients preceding in the reconstruction order. The concept of dependent scalar quantization is combined with modified entropy coding, and the selection of the probability model for the transform coefficients (or, alternatively, the selection of the codeword table) depends on the set of allowable reconstruction levels.

[0046]

Number

[0047] Dependent scalar quantization of transform coefficients has the effect that the expected value of the distance between a given input vector of transform coefficients and the nearest available reconstruction vector is reduced for a given average number of reconstruction vectors per N-dimensional unit volume. As a result, the average distortion between the input vector of transform coefficients and the vector-reconstructed transform coefficients can be reduced for a given average number of bits. In vector quantization, this effect is called the space filling gain. By using dependent scalar quantization for the transform block, most of the potential space filling gain for high-dimensional vector quantization can be utilized. And, in contrast to vector quantization, the complexity of the implementation of the reconstruction process (or, the decoding process) is comparable to that of conventional transform coding using independent scalar quantizers.

[0048]

Number

[0049] Like conventional transform coding, the transform coding according to the embodiments outlined herein further includes an analysis transform, a quantization algorithm, and an entropy coding. As the analysis transform, typically, the inverse of the synthesis transform (or a very close approximation thereof) is used, and the entropy coding usually uniquely identifies a given entropy decoding process. However, similar to conventional transform coding, there are many degrees of freedom in selecting the quantization index for which the original transform coefficient is given.

[0050] Dependent quantization of transform coefficients refers to the concept that the set of reconstruction levels available for a transform coefficient depends on the selected quantization index of the transform coefficients that precede it in the reconstruction order (within the same transform block).

[0051] Multiple sets of reconstruction levels are predefined, and based on the quantization indexes of the transform coefficients that precede in the coding order, one of the predefined sets is selected to reconstruct the current transform coefficient.

[0052]

Number

[0053] In one embodiment, the dependent scalar quantization for transform coefficients uses exactly two different sets of reconstruction levels. And all the reconstruction levels of the two sets for the transform coefficient tk represent integer multiples of the quantization step size Δk for this transform coefficient (determined at least in part by block-based quantization parameters). Note that the quantization step size Δk only represents a scaling factor for the allowable reconstruction values in both sets. Except for the possible individual quantization step sizes Δk (and individual scaling factors) for different transform coefficients tk within the transform block, the same two sets of reconstruction levels are used for all transform coefficients.

[0054] A more preferred configuration for the two sets of reconstruction levels is shown in FIG. 7. The reconstruction levels included in the first quantization set (labeled as set 0 in the figure) represent even integer multiples of the quantization step size. The second quantization set (labeled as set 1 in the figure) includes all odd integer multiples of the quantization step size, and further includes a reconstruction level equal to zero. Note that both reconstruction sets are almost symmetric about zero. The reconstruction level equal to zero is included in both reconstruction sets, and otherwise, the reconstruction sets are relatively prime to each other. The combination of both reconstruction sets includes all integer multiples of the quantization step size.

[0055] The reconstruction level selected by the encoder from among the acceptable reconstruction levels must be indicated or transmitted within the bitstream. This can be achieved using a so-called quantization index, also called a transform coefficient level, as in conventional independent scalar quantization. The quantization index (or transform coefficient level) is an integer number that uniquely identifies the available reconstruction levels within the quantization set (i.e., within the set of reconstruction levels). The quantization index is sent to the decoder as part of the bitstream (using entropy coding techniques). On the decoder side, the reconstructed transform coefficient can be uniquely calculated based on the current set of reconstruction levels (determined by the quantization index preceding in the encoding / reconstruction order) and the quantization index transmitted for the current transform coefficient.

[0056] The reconstruction levels of FIG. 7 are labeled with the associated quantization indices (the quantization indices are given by the numbers below the circles representing the reconstruction levels). 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, and a quantization index equal to 2 is assigned to the next reconstruction level greater than 0 (i.e., the second smallest reconstruction level greater than 0), and so on. That is to say, the reconstruction levels greater than 0 are labeled with integer numbers greater than 0 (i.e., having 1, 2, 3, etc.) in ascending order of their values. Similarly, a quantization index of -1 is assigned to the largest reconstruction level less than 0, a quantization index of -2 is assigned to the next (i.e., the second largest) reconstruction level less than 0, and so on. That is to say, the reconstruction levels less than 0 are labeled with integer numbers less than 0 (i.e., -1, -2, -3, etc.) in descending order of their values. The use of reconstruction levels representing integer multiples of the quantization step size enables an algorithm with low computational complexity for the reconstruction of the transform coefficients on the decoder side. This is shown based on a more preferred example of FIG. 7 below. 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 and the reconstruction level equal to 0 (included in both quantization sets). The reconstruction process of the transform coefficients can be implemented in the same way as the algorithm specified in the pseudo-code of FIG. 8.

[0057]

Number

[0058]

Number

[0059]

Number

[0060] Another (merely superficial) change in FIG. 9 compared to FIG. 8 is that the switching between the two sets of reconstruction levels is performed using a ternary if-then-else operator (a ? b : c), which is known from programming languages such as the C programming language.

[0061] In addition to the selection of the set of reconstruction levels described above, another task in dependent scalar quantization in transform coding is the algorithm used to switch between the defined quantization sets (sets of reconstruction levels). The algorithm used determines the "compression density" that can be achieved in the N-dimensional space of the transform coefficients (and also in the N-dimensional space of the subsequently reconstructed samples). A higher compression density will ultimately result in increased coding efficiency.

[0062] In a more preferred embodiment, the transition between the quantization sets (set 0 and set 1) is determined by a state variable. For the first transform coefficient in the reconstruction order, the state variable is set equal to a predefined value. Typically, the predefined value is equal to 0. The state variable of the next transform coefficient in the coding order is determined by an update process. The state of a particular transform coefficient depends only on the state of the preceding transform coefficient and the value of the preceding transform coefficient in the reconstruction order.

[0063] The state variable may have four possible values (0, 1, 2, 3). On the one hand, the state variable specifies the quantization set used for the current transform coefficient. Quantization set 0 is used if and only if the state variable is equal to 0 or 1, and quantization set 1 is used if and only if the state variable is equal to 2 or 3. On the other hand, the state variable also specifies the possible transitions between the quantization sets.

[0064] For example, the state of a particular transform coefficient may depend only on the state of the transform coefficients preceding it in the reconstruction order and the binary function of the values of the preceding transform coefficient levels. The binary function is hereinafter referred to as a path. In a particularly preferred embodiment, the following state transition table is used, where "path" refers to the binary function of the transform coefficient levels preceding it in the reconstruction order.

[0065]

Table 1

[0066]

Number

[0067] The concept of state transitions for subordinated scalar quantization enables a low-complexity implementation for the reconstruction of transform coefficients in a decoder. A preferred example for the reconstruction process of the transform coefficients of a single transform block is shown in FIG. 10 and uses C-style pseudocode.

[0068] In the pseudo code of FIG. 10, the index k specifies the reconstruction order of the conversion coefficients. It should be noted that in the exemplary code, the index k is in descending order in the reconstruction order. The last conversion coefficient has an index equal to k = 0. The first index kstart specifies the reconstruction index (or, more precisely, the inverse reconstruction index) of the first reconstructed conversion coefficient. The variable kstart may be set equal to a value obtained by subtracting 1 from the number of conversion coefficients in the conversion block, or (for example, when transmitted in an entropy coding method to which the position of the first non-zero quantization index is applied) may be set equal to the index of the first non-zero quantization index in the coding / reconstruction order. In the latter case, all preceding conversion coefficients (having an index k > kstart) are assumed to be equal to 0. The reconstruction process for each single conversion coefficient is the same as in the example of FIG. 9. As in the case of the example of FIG. 9, the quantization index is represented by level[k], and the associated reconstructed conversion is represented by trec[k]. The state variable is represented by state. The one-dimensional table setId[] specifies the quantization sets associated with different values of the state variable, and the two-dimensional table state_trans_table[][] specifies the state transitions given the current state (first argument) and the path (second argument). As an example, the path can be given by the parity of the quantization index (using bit units and the operator &), but other concepts are possible. As another example, the path can specify whether the conversion coefficient is equal to or not equal to zero. Examples of tables in C-style syntax are as follows (these tables are the same as Table 1 above).

[0069] setId[4] = { 0, 0, 1, 1} state_trans_table[4][2] = { {0,2}, {2,0}, {1,3}, {3,1}}

[0070] Instead of using the table state_trans_table[][] to determine the next state, arithmetic operations that produce the same result can be used. Similarly, the table setld[] can also be implemented using arithmetic operations. Alternatively, a combination of a table for searching using a one-dimensional table setId[] and a sign function can be implemented using arithmetic operations.

[0071] A main aspect of dependent scalar quantization is that there are different sets of acceptable reconstruction levels (also called quantization sets) for the transform coefficients. The quantization set for the current transform coefficient is determined based on the value of the quantization index for the preceding transform coefficient. Considering the example of Figure 7 and comparing two quantization sets, it is clear that the distance between the reconstruction level equal to 0 and the neighboring reconstruction levels is larger in set 0 than in set 1. Therefore, when set 0 is used, the probability that the quantization index is equal to 0 is greater, and when set 1 is used, it is smaller. This effect may be utilized in entropy coding by switching the probability model based on the quantization set or more generally the state used for the current quantization index.

[0072] Note that for proper switching of the codeword table or probability model, all paths of the preceding quantization indices (binary functions of the quantization indices) must be known when entropy decoding the current quantization index (or the corresponding binary decision of the current quantization index).

[0073] The quantization index may be encoded using binary arithmetic coding similar to H.264|MPEG-4 AVC or H.265|MPEG-H HEVC. For that purpose, the non-binary quantization index is first mapped to a series of binary decisions (usually called bins).

[0074] The following describes various examples of how, i.e., in what order and using what context, to binarize and arithmetic code the quantization index resulting from dependent quantization. Here, the quantization index is transmitted as a sign for absolute values and absolute values greater than zero. The sign is transmitted as a single bin, but there are many possibilities for mapping the absolute value to a series of binary decisions that clarify itself in the examples described below. The following description first focuses on the coding order and the binarization scheme and thus presents various examples. Thereafter, different examples for context modeling are described. The latter may be combined with the former embodiments related to the coding order and the binarization scheme, but the former embodiments are not limited to the latter examples.

[0075] Example 1 The following binary and non-binary syntax elements are transmitted: ● sig_flag: Specifies whether the absolute value of the transform coefficient level is greater than zero. ● When sig_flag is equal to 1, gt1_flag: Specifies whether the absolute value of the transform coefficient level is greater than 1. ● When gt1_flag is equal to 1, gt2_flag: Specifies whether the absolute value of the transform coefficient level is greater than 1. ● When gt2_flag is equal to 1, remainder: A non-binary syntax element that specifies the remainder of the absolute level. This syntax element is transmitted, for example, in bypass mode of the arithmetic coding engine using a Golomb-Rice code. The current syntax element is not assumed to be equal to zero. On the decoder side, the absolute value of the transform coefficient level is reconstructed as follows: absLevel = sig_flag + gt1_flag + gt2_flag + remainder Additional gtX_flag may be transmitted, or gt2_flag may be omitted, or both gt1_flag and gt2_flag may be omitted. sig_flag and gtX_flag are encoded using an adaptive context model.

[0076] Example 2 The following binary and non-binary syntax elements are transmitted: ● sig_flag: Specifies whether the absolute value of the transform coefficient level is greater than 0. ● When sig_flag is equal to 1, gt1_flag: Specifies whether the absolute value of the transform coefficient level is greater than 1. ● When gt1_flag is equal to 1 ○ par_flag: Specifies the parity of the remainder of the absolute value of the transform coefficient level (i.e., absolute value - 2). ○ remainder: A non-binary syntax element that specifies the remainder of the absolute level (i.e., (absolute value - 2 - par_flag) / 2). This syntax element is transmitted, for example, in bypass mode of the arithmetic coding engine using a Golomb-Rice code. It is not assumed that the current syntax element is equal to 0. On the decoder side, the absolute value of the transform coefficient level is reconstructed as follows: absLevel = sig_flag + gt1_flag + par_flag + 2 * remainder Additional gtX_flag may be transmitted, or gt1_flag may be omitted. As an example, instead of the remainder above, gt2_flag (specifying whether the absolute value is greater than 3) and (when gt2_flag is equal to 1) a modified remainder (i.e., (absolute value - 3 - par_flag) / 2) can be transmitted. Then, the absolute value can be constructed as follows. absLevel = sig_flag + gt1_flag + par_flag + 2 * (gt2_flag + remainder) sig_flag, gtX_flag and par_flag are encoded using an adaptive context model.

[0077] Example 3 The following binary and non-binary syntax elements are transmitted: ●sig_flag: Specifies whether the absolute value of the transform coefficient level is greater than 0. ●When sig_flag is equal to 1 ○par_flag: Specifies the parity of the remainder of the absolute value of the transform coefficient level (i.e., absolute value - 1). ○gt1_flag: Specifies whether the remainder of the absolute value of the transform coefficient level (i.e., (absolute value - 1 - par_flag) / 2) is greater than 0. ●When gt1_flag is equal to 1, gt2_flag: Specifies whether the remainder of the absolute value of the transform coefficient level (i.e., (absolute value - 1 - par_flag) / 2) is greater than 1. ●When gt2_flag is equal to 1, remainder: A non-binary syntax element that specifies the remainder of the absolute level (i.e., (absolute value - 1 - par_flag) / 2 - 2). This syntax element is transmitted in bypass mode of the arithmetic coder using, for example, Golomb-Rice codes. The current syntax element is not assumed to be equal to 0. On the decoder side, the absolute value of the transform coefficient level is reconstructed as follows: absLevel = sig_flag + par_flag + 2 * (gt1_flag + gt2_flag + remainder) Additional gtX_flag may be transmitted, or gt2_flag may be omitted. sig_flag, gtx_flag and par_flag are coded using an adaptive context model.

[0078] Furthermore, binarization is possible.

[0079] Regarding context modeling, the following example is provided to show the interrelationships among binarization, bin / coefficient ordering, and context derivation. In a particular example, the syntax for transmitting the quantization index of a transform block includes a bin that specifies whether the quantization index is equal to zero or not equal to 0 (sig_flag introduced above). The probability model used to encode this bin may be selected from among a set of two or more probability models. The selection of the probability model used depends on the current state variable (the state variable means the quantization set used). In this case, different sets of probability models may be used for all possible values of the state variable, or different sets of probability models may be used for each cluster (e.g., a first set of probability models for states 0 or 1, a second set of probability models for state 2, and a third set of probability models for state 3; or alternatively, a first set of probability models for states 0 or 1, a second set of probability models for states 2 or 3).

[0080] It is also possible for the selected probability model for other binary syntax elements (e.g., gt1_flag or par_flag) to depend on the value of the current state variable.

[0081] When the dependent quantization of transform coefficients is combined with entropy coding, it is advantageous for the selection of the probability model for one or more bins of the binary representation of the quantization index (also called quantization level) to depend on the state variable of the current quantization index. The state variable is given by the quantization index (or a subset of the bins representing the quantization index) for the transform coefficients that precede in the encoding and reconstruction order.

[0082] In particular, advantageously, the described selection of the probability model is combined with one or more of the following aspects of entropy coding: ● Sending a flag for a transform block, which specifies whether any of the quantization indices for the transform block is not equal to zero, or whether all quantization indices for the transform block are equal to zero. ● Splitting the coefficients of a transform block within multiple sub-blocks (at least for transform blocks exceeding a predefined size given by the block dimension or the number of samples included). This is exemplarily shown for the transform block 10 in FIG. 12a, where the coefficients 12 of the block are subdivided into sub-blocks 14, here exemplarily coefficients of size 4×4. If the transform block is split into multiple sub-blocks 14, then for one or more of the sub-blocks, a flag (unless estimated based on already transmitted syntax elements) is transmitted, specifying whether the sub-block contains non-zero quantization indices. The sub-blocks may be used to specify the coding order of bins. For example, the coding bins can be split into sub-blocks 14, and all bins of a sub-block are coded before any bin of the next sub-block 14 is transmitted. However, the bins of a particular sub-block 14 can be coded in multiple passes over the transform coefficients within this sub-block. For example, all bins specifying the absolute value of the quantization index for a sub-block may be coded before any sign bin is coded. The bins for the absolute value can also be split into multiple passes as described above. ● Transmission of the first non-zero position in the symbolization order. The position is shown in Fig. 12a and is shown in bold. It can be transmitted as x and y coordinates specifying the position within the two-dimensional array of transform coefficients, which can be transmitted in scan order as indices, or can be transmitted by any other means. As shown in Fig. 12a, the transmitted position of the first non-zero quantization index (or transform coefficient) in the symbolization order specifies that all transform coefficients 12 (marked white in Fig. 12a) preceding the coefficient identified in the symbolization order are equal to zero. Further, the data is transmitted only for the specified position (marked black / bold in Fig. 12a), i.e., the coefficient at the first position in the symbolization order, and the coefficients following this coefficient in the symbolization order (marked hatched in Fig. 12a). The example of Fig. 12a shows a 16×16 transform block 10 having a 4×4 sub-block 14; the symbolization order used is the diagonal scan of the sub-block unit specified in H.265|MPEG-H HEVC. It should be noted that the coding of the quantization index at the specified position (the first non-zero coefficient in the symbolization order) may be slightly changed. For example, if the binarization of the absolute value of the quantization index includes a bin specifying whether the quantization index is not equal to 0, this bin does not transmit the quantization index at the specified position (since it is already known that the coefficient is not equal to 0), instead, the bin is assumed to be equal to 1. ● The binarization of the absolute value of the quantization index includes an adaptively encoded bin that specifies whether the quantization index is not equal to 0. The probability model (referred to as context) used to encode this bin is selected from a set of candidate probability models. The selected candidate probability model may be determined by the state variable of the current quantization index, and further may be determined by the quantization index already transmitted for the transform block. In a preferred embodiment, the state variable determines a subset of available probability models (also referred to as a context set), and the value of the quantization index already encoded determines the probability model used within this subset (context set). In a preferred embodiment, the probability model used within the context set is determined based on the value of the quantization index of the already encoded quantization index in the local neighborhood 52 of the current transform coefficient 50, that is, the value of the coefficient for which the bin is currently being encoded / decoded, and the context for the same requirement is determined. An example of such a local neighborhood 52 is shown in FIG. 12b. In the figure, the current transform coefficient 50 is marked in black, and the local neighborhood 52 is marked with diagonal lines. Below, some exemplary processes that can be derived based on the values of the quantization indices of the neighboring coefficients 51 within the local neighborhood 52 and then used to select a probability model of a pre-determined context set are listed. Furthermore, other data available to the decoder may be used (either explicitly or in combination with the processes listed above) to derive a probability model within a pre-determined context set. Such data includes the following. ○ The position of the current transform coefficient (x coordinate, y coordinate, diagonal number, or any combination thereof) ○ The size of the current block (vertical size, horizontal size, number of samples, or any combination thereof) ○ The aspect ratio of the current transform block ● The binarization of the absolute value of the quantization index includes an adaptively coded bin that specifies whether the absolute value of the quantization index is greater than 1. The probability model (referred to as context) used to code this bin is selected from a set of candidate probability models. The selected probability model is determined by the quantization index already transmitted for the transform block. To select a probability model, any of the above methods can be used (for the bin that specifies whether the quantization index is not equal to 0).

[0083] As already described above, the coding order of the bins for the binarization of the quantization index of coefficient 12 affects the coding efficiency of block 10. For example, the probability model selected for at least one of the binary decisions (bins), typically sig_flag, depends on the value of the current state variable. And since the state variable is determined by the binary function path() of the preceding transform coefficient levels, when coding sig_flag for the current transform coefficient (or, more generally, the binary syntax element for which the probability model depends on the state variable), the coding order of the bins must be arranged as if the paths for all preceding transform coefficients are known.

[0084] For example, all bins that specify the absolute value of the quantization index can be coded consecutively. That is, all bins (for the absolute value) of all preceding quantization indexes in the coding / reconstruction order are coded before the first bin of the current quantization index. The sign bin may or may not be coded in a separate second path across the transform coefficients (which may actually depend on the quantization set used). The sign bin of a sub-block can be coded after the bin for the absolute value of the sub-block but before any bin for the next sub-block.

[0085] In another example, only a subset of the bins that specify the absolute value of the quantization index is continuously encoded in the first pass across the transform coefficients. However, these bins uniquely specify the state variables. The remaining bins are encoded in one or more additional passes across the transform coefficients. Assuming that the pass is specified by the parity of the quantization index, the parity bins are included in the first pass across the transform coefficients. The remaining bins may be sent in one or more additional passes. In other embodiments of the present invention, similar concepts are used. For example, the number of singleton bins can be changed or even adapted based on symbols that have already been sent. Different passes can be used based on sub-blocks, in which case the bins of the sub-block are encoded in multiple passes, but all bins of the sub-block are sent before any bins of the next sub-block are sent.

[0086] In the following, several examples are listed for encoding the binary decision in multiple passes. Example A: This example uses the binarization of Example 3 described above, and the pass is given by the parity. ● Pass 1: sig_flag, par_flag, gt1_flag ● Pass 2: gt2_flag ● Pass 3: remainder ● Pass 4: sig_flag, par_flag, gt1_flag Example B: This example uses the binarization of Example 3 described above, and the pass is given by the parity. ● Pass 1: sig_flag, par_flag ● Pass 2: gt1_flag ● Pass 3: gt2_flag ● Pass 4: remainder ● Pass 5: sign bits Example C: This example uses the binarization of Example 1 described above, and the pass specifies whether the absolute value is greater than zero. ● Pass 1: sig_flag ● Path 2: gt1_flag ● Path 3: gt2_flag ● Path 4: remainder ● Path 5: sign bits Example D: This example uses the binarization of Example 2 described above, and the paths are given by parity. ● Path 1: sig_flag, gt1_flag, par_flag ● Path 2: remainder ● Path 3: sign bits Example E: This example uses the binarization of Example 2 described above together with an additional gt2_flag, and the paths are given by parity. ● Path 1: sig_flag, gt1_flag, par_flag, gt2_flag ● Path 2: remainder ● Path 3: sign bits As a minor modification to this example, the gt2_flag can also be sent on a separate path.

[0087] Another encoding order or combination is binarized, and the encoding order is possible.

[0088] To enable the implementation of a high-throughput decoder, it is preferable to maintain the lowest possible number of context coding bins (also called positive coding bins) without degrading performance. This can be achieved by limiting the maximum number of specific bins (similar to HEVC). The remaining information is encoded using the bypass mode of the arithmetic coding engine. The methods for reducing the maximum number of context coding bins described below may be combined with one or more of the following aspects already presented above: ● Multiple sets of reconstruction levels for quantization of transform coefficients. In particular, two sets: the first set includes all even integer multiples of the quantization step size, and the second set includes all odd integer multiples of the quantization step size and zero. (At least a part of the transform coefficients within the transform block) ● The selected set of reconstruction levels depends on the state variables. The state variables are set equal to 0 for the first coefficient in the reconstruction order. For all other coefficients, the following applies. The value of the state variable for the current transform coefficient is determined by the value of the state variable for the preceding transform coefficient level and a binary function (path) of the value of the preceding transform coefficient level. ● The transform coefficient levels are binarized and the bins are entropy coded using binary arithmetic coding. The binarization includes a sig_flag that specifies whether the transform coefficient level is not equal to zero. This flag is coded using an adaptive probability model, and the selected probability model depends on the value of the state variable of the current transform coefficient (and potentially other parameters).

[0089] The following describes a plurality of embodiments for reducing the number of context coding bins for dependent scalar quantization. In these embodiments, the worst-case decoding complexity is limited based on sub-blocks. Typically, as in HEVC, larger transform blocks are divided into 4×4 sub-blocks and the following applies: ● The syntax of the transform block includes a syntax element (e.g., coded_block_flag) that specifies whether there are non-zero transform coefficient levels within the transform block. If coded_block_flag is equal to 0, all transform coefficient levels are equal to 0 and no further data is transmitted for the transform block; otherwise (if coded_block_flag is equal to 1), the following applies; ● The x and y coordinates of the first significant transform coefficient in the scan order are transmitted (since the actual scan order specifies a scan from high-frequency to low-frequency components, this is sometimes referred to as the last significant coefficient); ● The scan of the transform coefficients is processed based on sub-blocks (typically 4×4 sub-blocks); all transform coefficient levels of a sub-block are encoded before any transform coefficient level of any other sub-block is encoded, the sub-blocks are processed in a predefined scan order, starting with the sub-block containing the first significant coefficient in the scan order and ending with the sub-block containing the DC coefficient. ● The syntax includes a coded_subblock_flag, indicating whether the sub-block contains non-zero transform coefficient levels; for the first and last sub-blocks in the scan order (i.e., the sub-block containing the first significant coefficient in the scan order and the sub-block containing the DC coefficient), this flag is not transmitted but is assumed to be equal to 1; when the coded_subblock_flag is transmitted, it is typically transmitted at the start of the sub-block. ● For each sub-block for which the coded_subblock_flag is equal to 1, the transform coefficient levels are transmitted in a plurality of scan paths over the scan positions of the sub-block.

[0090] The following embodiments apply to the encoding of transform coefficient levels for sub-blocks having a coded_subblock_flag equal to 1. However, the embodiments are not limited to this case. It is also possible to apply the embodiments to complete the transform block (without a sub-block structure). In this context, it is possible to use the sub-block structure (as described above), but it is possible to apply the worst-case complexity limit to complete the transform block (instead of applying it to the sub-blocks individually by restricting them).

[0091] Embodiment 1 In the first embodiment, the transform coefficient levels are encoded in a plurality of scan paths. It has the following characteristics. ● The state machine for dependent quantization is driven by the parity of the transform coefficient levels, i.e., the binary function path (level) returns the parity of its argument; ● The probability model of sig_flag in the first path is selected based on the corresponding values of the state variables (and, optionally, other parameters available to the decoder, see above). First path: In the first path regarding the scan position, the following context-encoded bins are transmitted: ● sig_flag indicates whether the conversion coefficient is not equal to 0; if sig_flag can be estimated to be equal to 1 (e.g., if it is the case of the first significant scan position (explicitly signaled by x and y coordinates) in the conversion block), sig_flag is not transmitted. ● If sig_flag is equal to 1 (encoded or estimated value), the following are additionally transmitted for the current scan position: ○ par_flag specifies a value obtained by subtracting 1 from the parity of the absolute value. ○ gt1_flag specifies whether the remainder (given by (absolute level - 1 - par_flag) / 2) is greater than 0. ● When the predefined maximum number of context-encoded bins is reached, the first path ends. Let MAX_REG_BINS be the maximum number of bins that can be transmitted in the first path, and regBins represent the number of positive encoded bins still available. Then, the following applies: ○ regBins is initially set equal to MAX_REG_BINS; ○ After encoding any of the bins (sig_flag, gt1_flag, par_flag), regBins is decreased by 1 ○ After transmitting the bins (sig_flag, and if sig_flag is equal to 1, gt1_flag, par_flag) for the scan position, if the number of bins regBins still available is less than 3 (i.e., sig_flag, par_flag, and gt1_flag cannot be transmitted for the next scan position), then the first scan path ends. Second path: In the second path regarding the scan position, the following context-encoded bins are transmitted: ● When the gt1_flag at the scan position is equal to 1, the gt2_flag is transmitted, specifying whether the remainder given by (absolute level - 3 - par_flag) / 2 is greater than 0. ● When the predefined maximum number of context - encoded gt2_flags is transmitted, the second pass ends. When reaching a scan position where no data was transmitted in the first pass (i.e., for such a scan position, no data is transmitted in the second pass), the second pass also ends. The third pass: In the third pass regarding the scan position, the remainder of the absolute level (i.e., the data not already specified by the transmitted sig_flag, par_flag, gt1_flag, and gt2_flag) is transmitted for all scan positions where the sig_flag was encoded in pass 1. The remainder of non - binary syntax elements is binarized using a structured code (such as a Golomb - Rice code), and the bins are encoded in the bypass mode of the arithmetic coding engine. The remainder is transmitted for the following scan positions: ● For all scan positions, a gt2_flag equal to 1 is transmitted in the second pass: For these scan positions, the remainder of the transmitted non - binary syntax elements specifies the following: (absolute value - 5 - par_flag) / 2 ● For all scan positions, a gt1_flag equal to 1 was transmitted in the first pass, but no gt2_flag was transmitted in the second pass: For these scan positions, the remainder of the transmitted non - binary syntax elements specifies the following: (absolute value - 3 - par_flag) / 2 The fourth pass: In the fourth pass, the absolute levels for all scan positions where no data was transmitted in the first pass are encoded. The absolute levels are first binarized using a structured code, and the code used can depend on the local activity measurement as well as the value of the current state variable. The bins are transmitted using the bypass mode of the arithmetic coding engine. The fifth pass: Finally, in the fifth pass, the signs of all conversion coefficient levels not equal to zero are transmitted. The signs are transmitted in bypass mode of the arithmetic coding engine.

[0092] An advantage of the described embodiment is that the number of context coding bins is efficiently reduced compared to a version where the number of bins in the first and second passes is not restricted. Complexity is reduced because the coding and decoding of context coding bins requires more complex implementations than the bins coded in bypass mode.

[0093] Illustrate the above description based on the pseudo code shown in FIG. 13. FIG. 13 shows a method for decoding a block of conversion coefficients according to the above-described embodiment, and the corresponding coding embodiment can be easily derived therefrom by replacing all "decode" with "encode".

[0094] The pseudo code shown in FIG. 13 shows the encoding / decoding process of the conversion coefficient levels within sub-block 14. It is illustrated from the perspective of the decoder. Decoding from the data stream is performed in a sequence of paths 601 to 605 that scan the positions 12 of the conversion coefficients in block 10 in scan order. Binarization is used, i.e., flags / bins are used to define the quantization index of the coefficients, and the distribution of flags and residual encoding / decoding in the encoding / decoding path is changed in the embodiments described below. Therefore, the description of FIG. 13 focuses on providing an overview or schematic explanation that is also applicable to the embodiments described below.

[0095] The possible basic scan orders of the paths have been described above with respect to FIGS. 12a,b and are exemplarily shown at 62 in FIG. 12b, but note that paths 601 to 605 do not need to scan all positions 12 of the conversion coefficients in conversion block 10, but they all use scan order 62; flags for some of the flag types may be transmitted in the same path as described with respect to FIG. 13, but other possibilities also exist.

[0096] The predefined values MAX_REG_BINS and MAX_GT2_BINS shown in FIG. 13 specify the maximum number of positive-coded bins in each of path 1 601 and path 2 602. The boolean variable firstSubblock specifies whether the current subblock is the first subblock in the encoding / decoding order (within the transform block) for block 10, such as the subblock containing the bold / black coefficient 12 in FIG. 12a. firstSigScanIdx specifies the scan index corresponding to the position of the first significant transform coefficient in transform block 10, i.e., the position of the coefficient explicitly signaled at the start of the transform block syntax. The reference sign 64 will be used hereinafter to indicate that position. minSubblockScanIdx and maxSubblockScanIdx represent the minimum and maximum values of the scan index for the current, i.e., currently decoded / encoded, subblock. Note that the first scan index, startScanIdx, depends on whether any data is being sent for the current subblock 14 and whether the subblock contains the first significant coefficient in scan order. In this case, the first scan path starts at the scan index corresponding to the first significant transform coefficient 64; otherwise, the first scan path starts at the minimum scan index of the subblock, such as the bottom-left coefficient position in subblock 14, or, in other words, at the position farthest from the DC position 66, where the scan order 62 is derived. Again, FIG. 13 is an embodiment for use in encoding subblocks, but the concept relates to encoding coefficients en-block or can be associated with some of the aspects described below for subblocks, while others can be easily modified to relate to the entire block 10.

[0097] In the sequences of paths 601 to 604, context adaptive binary arithmetic coding / decoding is used to code / decode a flag or bin respectively selected from a set of one or more flag types including, for example, sig_flag, par_flag, gt1_flag and gt2_flag in Embodiment 1 currently described, and variable length coding is used to code / decode the residual value. That is, the bins of the codeword of the variable length coding are coded / decoded in the bypass mode of the binary arithmetic coding / decoding engine using a uniform non-adaptive probability model, and the compression rate for each bin is 1. Therefore, each flag and each residual value are decoded with respect to the position of the transform coefficient currently being scanned as shown by 50 in FIG. 12b. In the pseudo code, this current position is indicated by the parameter or index k.

[0098]

Number

[0099] When the residual value is coded / decoded with respect to the position 50 of a specific currently scanned transform coefficient, the residual value is from the value domain if at least one flag is decoded with respect to the position of the currently scanned transform coefficient, or from the initial value domain if no flag is decoded with respect to the position of the currently scanned transform coefficient, and uniquely indicates the absolute value of the quantization index with respect to the position of the currently scanned transform coefficient. Note that the positions of the transform coefficients for which the residual value is not coded / decoded and one or more flags are coded / decoded have already restricted the value domain and contain only one absolute value. As in the case of the sign, if no transform coefficient is shown at all, as in this embodiment, but not necessarily requiring a modified embodiment, the same may be coded separately in the bypass mode. In FIG. 13, it is shown that it is coded / decoded separately in a separate path 605 for any non-zero quantization index, but this can be changed to reach a further embodiment.

[0100] Subordinate quantization is used to successively inverse-quantize the quantization indexes of the positions of a coded set of transform coefficients to obtain the reconstructed transform coefficients for this set of positions of transform coefficients. This process yields the reconstructed transform coefficients for this set of positions of transform coefficients. For example, state transitions as outlined above can be used. It can be done by making a selection for the current position of the transform coefficient, shown using index k as in FIG. 10, for example, using a state transition table or trellis diagram according to scan order 62. The quantization index is uniquely encoded / decoded according to the concepts described above, and the set of reconstructed levels from a set of multiple reconstruction levels 73, i.e., sets 0 and 1 in FIG. 7, is uniquely based on the state that the state transition assumes for the current position of the transform coefficient, indicated by "state" in FIG. 7. The quantization index points to the set of reconstruction levels, i.e., the reconstructed transform coefficients are set equal to the said reconstruction levels, by inverse-quantizing the quantization index level[k] to the reconstruction level trec[k], and by updating the state of the state transition assumed for what is currently being scanned during subordinate quantization in order to generate an updated state 78 for the current position of the transform coefficient, i.e., the position of the transform coefficient following the current transform coefficient in the scan order. The update 76 is performed depending on the quantization index of the current position of the transform coefficient, level[k] as indicated by 80 in FIG. 10, where table 82 is used at the end. Similarly, quantization using the selected level set is performed on the encoder side.

[0101] As illustrated above, the state transition may transition between four different states corresponding to the four elements of the vector described in FIG. 10. Further, the update may be performed by determining between a first subsequent state and second subsequent states 841 and 842 depending on a binary function 86 such as a parity function applied to the quantization index 80 of the position of the current conversion coefficient, and the first subsequent state and the second subsequent states depend on the state of the position of the current conversion coefficient, as indicated by 88. The encoder and decoder are parameterized by a set of levels reconstructed by a predetermined quantization step size, i.e., Δ in FIG. 7 and 2shift in FIG. 10, and information regarding the predetermined quantization step size is transmitted, for example, in the data stream. Further, as shown in FIG. 7, each set of reconstruction levels may be composed of a set of all reconstruction levels for the position of the current conversion coefficient that is constant or an integer multiple of a predetermined quantization step size that is valid. It should be noted that different step sizes may be used for different coefficients within one block 10 for the scaling matrix described above. The number of sets of reconstruction levels among the plurality of sets of reconstruction levels may be two, and the plurality of sets of reconstruction levels may include a first set of reconstruction levels including zero and even multiples of a predetermined quantization step size, i.e., set 0, and a second set of reconstruction levels including odd multiples of a predetermined quantization step size.

[0102] So far, the description of FIG. 13 also applies to the embodiments described below. However, Embodiment 1 uses the following mechanism to limit the number of flags encoded using context adaptability. In particular, in a specific path of the path sequence, i.e., path 601 shown in FIG. 13, the sig_flag type flag is only encoded / decoded up to a predetermined position that first meets the predetermined abort criterion in the scan order in the first path - "up to" should be understood as the position preceding and including the position in this specification, while the reference to the position "after [position 112]" should be understood as representing the position after position 112 excluding position 112 -. In FIG. 13, not only the number of sig_flag is limited in this way, but also the number of par_flag, gt1_flag in path 601 and gt2_flag in path 602 is limited. Note that the limitation affects the binarization: as soon as the abort criterion is met, each flag type is no longer used for the definition of the coefficient position following the position of the predetermined conversion coefficient immediately preceding in the scan order. That is, the flags of the predetermined flag type, i.e., those subject to the limitation of the number of encoded / decoded, are encoded / decoded only for the conversion coefficient positions preceding and including the position of the conversion coefficient predetermined in the scan order. Therefore, in FIG. 13, as soon as the criterion related to path 601, i.e., related to MAX_REG_BINS, is met, for each of the encoded sets of conversion coefficient positions following the position of the predetermined conversion coefficient in the scan order, in a further path of the path sequence, i.e., path 603 in the case of FIG. 13, one of the residual values is encoded, and the latter directly, i.e., by any of the flags of the flag type used to encode / decide the quantization index of each coefficient, uniquely indicates the absolute value of the quantization index for each conversion coefficient position in the initial value domain without the previous limitation of the initial value domain.

[0103] To explain the concept shown above for adaptively limiting the number of context-encoded / decoded flags, reference is made to FIGS. 14 and 15 in addition to FIG. 13. FIG. 14 shows an initial value domain for the absolute value of the quantization index of the transform coefficient at 90. This initial value domain can include all integer values between zero and some maximum value. The initial value domain may be an interval that opens towards larger numbers. The number of integer values in the initial value domain 90 does not necessarily have to be a power of 2. Further, FIG. 14 shows various flag types related to representing an individual quantization index, i.e., related to indicating its absolute value. There is a sig_flag type that indicates whether the absolute value of a particular quantization index is zero. That is, sig_flag 92 bisects the initial value domain 90 into two sub-parts, i.e., one contains only zero and the other contains all other possible values. That is, as shown at the bottom of FIG. 14, if the latter is zero, the sig_flag already uniquely indicates the absolute value of the quantization index. The non-zero values of the initial value domain 90 form a value domain 94, and this value domain 94 is further bisected by the flag type par_flag, i.e., one is odd-valued and the other is even-valued. The par_flag 96 needs to exist only if the latter is non-zero. The par_flag 96 does not create uniqueness for one of the halves that bisect the value domain 94 in the same way. It indicates the (recursively defined) half of the resulting value domain, and thus the next flag, i.e., gt1_flag 98, bisects this resulting value domain after the par_flag, and further indicates that for an odd quantization index value, it is the odd non-zero value 100, and for an even quantization index value, it is the even non-zero value 102. In particular, the bisection by the gt1_flag 98 is performed such that one part simply contains the minimum odd value 100 of the value domain or the minimum non-zero even value 102 of the value domain, respectively. The other part contains all other values 100 / 102 of their respective domains.The latter of the remaining value domain is further split by flag gt2_flag104 in the same way, i.e., the minimum value represents one part and the other values represent the other parts. As shown in the lower part of FIG. 14, when the latter becomes zero, simply sig_flag92 is encoded for the quantization index of a specific conversion coefficient. When the latter is divided into value intervals 106 including absolute values 1 and 2, sig_flag, par_flag and gt1_flag 92, 96 and 98 are encoded to represent a specific quantization index of a specific conversion coefficient. When all flags 92, 96, 98 and 104 are divided into the immediately following value interval 108 including values 3 and 4, they are encoded to represent the absolute value of the quantization index of a specific conversion coefficient. Additionally, they are encoded for the absolute value of the quantization index of a specific conversion coefficient in the remaining interval 110 of the initial value domain 90. The flags 92, 96 and 98 of the flag type are encoded in the first pass 601. Flag 104 is encoded in the second pass 602. These flags are encoded using context adaptive arithmetic coding. However, the number of flags encoded within a pass may be limited, and may be limited by FIG. 13. In the example of FIG. 13, the number of flags of the flag type in pass 601 is limited to max_rec_bins. The flags 92, 96 and 98 of the flag type are encoded according to order 62 with respect to the position 12 of the currently accessed conversion coefficient within the first pass only if the total number of flags encoded in pass 601 does not exceed the maximum allowable number of flags encoded / decoded in pass 601 and it is possible for them to be encoded in pass 601. FIG. 15 shows that the position of the last conversion coefficient that does not exceed the maximum number of allowable flags in pass 601 is 112. Similarly, the flag 104 encoded in pass 602 is encoded according to order 62 with respect to the position 12 of the currently accessed conversion coefficient within the second pass only if the total number of flags 104 encoded in pass 602 does not exceed the maximum allowable number of flags encoded / decoded in pass 602 and it is possible for it to be encoded in pass 602.In FIG. 15, it is shown that the position of the last conversion coefficient that does not exceed the maximum number of allowable flags in path 602 is 116.

[0104] FIG. 15 shows the encoding of the quantization indices having the transformation coefficients or their respective sub - blocks 14. However, as already shown above, the embodiment of FIG. 13 may be modified as long as all the processes of FIG. 13 are applied to block 10 as a whole. Further, FIG. 15 shows the case of all coefficients in a sub - block following a sub - block in a scan order including, for example, the position 64 of the first non - zero transformation coefficient, in the case where the encoded set of transformation coefficients is included. Accordingly, all the positions of the transformation coefficients indicated by hatching in FIG. 15 are related to the quantization indices of the transformation coefficients represented to include flag types 92, 96, and 98. Thus, in the first pass 601, the flags 92, 96, and 98 of these flag types are encoded for the transformation coefficients 12 up to position 112. For some of the transformation coefficients 12 up to position 112, only sig_flag92 needs to be encoded, while all the other three flag types are included and encoded / decoded in pass 601. FIG. 15 shows that the data stream accordingly includes a corresponding portion 114 in which the flags 92, 96, and 98 of these flag types are encoded within pass 601. After position 112, nothing is encoded / decoded within pass 601. In the second pass 602, according to the scan order 62, as long as there is a maximum number of gt2_flag that can be encoded during pass 602, that is, as long as the number of such flags does not exceed max_gt2_bins, the positions 12 of the transformation coefficients are traversed again, and such gt2_flag are encoded for the transformation coefficients indicated by gt1_flag98 that the absolute value of the corresponding quantization index is within the remaining value domain portion including intervals 108 and 118. FIG. 15 shows all the positions 12 of the transformation coefficients up to position 116 hatched according to the scan order 62, distinguishing these positions from the subsequent positions 12 of the transformation coefficients only hatched up to position 112. It is shown that all the positions 12 of the transformation coefficients following position 112 are not hatched in FIG. 15. The gt2_flag104 encoded during pass 602 is encoded in the portion 118 of the data stream following immediately after portion 114.No further data is encoded between paths 602 after position 116. In the next two paths 603, 604, it may be interpreted as forming half of one path, and the remainder is encoded in part 120 of the data stream that follows immediately after part 118. In particular, in the first sub - part of part 120, the remainder for the position 12 of the transform coefficients up to position 112 during path 603 is encoded. Thus, these remainders indicate the absolute value of the quantization index of the position 12 of the specific transform coefficients among the remaining value domains including the cross - hatched position 12 of the transform coefficients, i.e., interval 110 for the position 12 of the transform coefficients up to position 116, and the simply hatched position 12 of the transform coefficients, i.e., intervals 108 and 110 for the positions up to position 112 following position 116. After the sub - part 122 of the remainder of the position 12 of the transform coefficients up to position 112, there is a further sub - part 124 of one remainder for each position 12 of the transform coefficients following position 112 during path 604, i.e., for each position 12 of the non - hatched transform coefficients, which is encoded in the data stream. The latter remainder directly indicates the quantization index, i.e., the direct absolute value within the initial value domain 90. Thus, the number of context - adaptive coding flags 92, 96, 98, and 104 is reduced, and the number of bins encoded using the bypass mode, i.e., the fixed equiprobability mode, i.e., the bins of the binarization of the remainder, is increased.

[0105] That is, in FIG. 13, the aforementioned abort criterion relates to whether the number of flags decoded in the first pass exceeds a predetermined threshold. In addition to sig_flag, flags of types 96 and 98 are counted.

[0106] The variable-length code for encoding / decoding the residual value for the position of the conversion coefficient currently being scanned may be selected from a set of predefined variable-length codes such as the Golomb-Rice code. The selected code may vary depending on whether the position of the conversion coefficient currently being scanned is located up to a predetermined conversion coefficient position 112, i.e., in the hatched position in FIG. 15, or follows the predetermined conversion coefficient position 112 in the scan order 62. In the case of FIG. 13, the selection may depend on whether the position is located between positions 112 and 116. For example, the residual encoding / decoding may use a different VLC code in path 603 than in path 604, or encoding / decoding the residual of the coefficient simply hatched in FIG. 15 with 128 in FIG. 13 may even include a different code compared to the VLC code used when encoding / decoding the residual of the cross-hatched coefficient shown with 130 in FIG. 15. The selection can include parameterization of the VLC code such as selecting the order of the Exponential Golomb code or the Rice parameter as described below. Alternatively, the parameter indicating the selected variable-length code may be kept constant in path 603 and gradually changed with the quantization index of the position of the preceding conversion coefficient that meets a predetermined criterion. Or, the binarization parameter may be selected depending on the quantization index of the position of the conversion coefficient in the vicinity of the position of the conversion coefficient currently being scanned when encoding the residual. This dependency is used, for example, only in the case of the position of the current conversion coefficient for which the residual, which is the one preceding in the scan order 62 or the predetermined conversion coefficient position 112 in FIG. 15, is encoded for all hatched positions in FIG. 15. Further details on this are outlined below.

[0107] The coded word selected from the selected / parameterized coefficients depends also on the coefficient positions where the remainder is coded / decoded: the absolute value of the quantization index minus the maximum value representable by the flags 92, 96, 98 and 104 of the first and second paths 601, 2, i.e., 4 plus 1, i.e., 5 is represented, or in the case of the coefficient to which the quantization index belongs, the VLC coded by the binarization of the remainder of the quantization index of any coefficient is somewhere up to position 116, the absolute value of the quantization index minus the maximum value represented by the flags 92, 96, 98 of the first path 601, i.e., 2 plus 1, i.e., 3 is represented, or in the case of the coefficient to which the quantization index belongs, the VLC coded by the binarization of the remainder of the quantization index of any coefficient is somewhere from after position 116 to up to position 112, the absolute value of the quantization index is directly represented, or in the case of the coefficient to which the quantization index belongs, the VLC coded by the binarization of the remainder of the quantization index of any coefficient is somewhere after position 112.

[0108] Some variations of the embodiment of FIG. 13 may be applied. For example, the gt2_flag may not be coded / decoded in a separate path 602 and may be included in the first path 601. Next, the number of coded gt2_flags may be included in the count of the context coding bins in the first path 601 and the first path is terminated if the number of available context coding bins is less than 4. That is, in this case, a single threshold for the number of context coding bins is used. Alternatively, the gt2_flag is not transmitted at all and in that case, if the gt1_flag is equal to 1, the remainder is coded. In another variation of this embodiment, one or more additional gtx_flags are included. Similar to the gt2_flag, these flags are coded only if the preceding gty_flag (y = x - 1) is equal to 1 and indicate whether the absolute value of the quantization index is greater than the minimum possible value specified by the preceding gtx_flag. Next, the reconstruction of the absolute value is given as follows. absLevel = sig_flag + par_flag + 2 * (gt1_flag + gt2_flag + gt3_flag + … + remainder). These flags can be coded in the same path as gt2_flag (including the case where gt2_flag is included in the first path), or in one or more additional paths. In the latter case, an additional threshold can be applied to limit the number of gtx_flag.

[0109] The second embodiment described below differs from the first embodiment in one aspect: the order of par_flag and gt1_flag is swapped (thus, the meaning of these flags is changed). When sig_flag is equal to 1, the first gt1_flag is transmitted, which specifies whether the absolute value of the conversion coefficient level is greater than 1. And when gt1_flag is equal to 1, par_flag specifies the remaining parity (i.e., absolute level - 2). Similar to the case of the first embodiment, the following applies: ● The state machine for dependent quantization is driven by the parity of the conversion coefficient level, i.e., the binary function path (level) returns the parity of its argument; ● The probability model of sig_flag in the first path is selected based on the corresponding values of the state variables (and, optionally, other parameters available to the decoder, see above). First path: In the first path regarding the scan position, the following context coding bins are transmitted: ● sig_flag indicates whether the conversion coefficient is not equal to 0; if sig_flag can be estimated to be equal to 1 (e.g., it is the case of the first significant scan position (explicitly signaled by x and y coordinates) in the conversion block), sig_flag is not transmitted. ● When sig_flag is equal to 1 (encoded or estimated value), the following are additionally transmitted for the current scan position: ○ The gt1_flag specifies whether the absolute value is greater than 1; ○ When the gt1_flag is equal to 1, the par_flag specifies the parity - 2 of the absolute level; ● When the predefined maximum number of context - encoded bins is reached, the first pass ends. Let MAX_REG_BINS be the maximum number of bins that can be sent in the first pass, and regBins represent the number of positive encoded bins still available. Then the following applies: ○ The regBins is initially set equal to MAX_REG_BINS; ○ After encoding any of the bins (sig_flag, gt1_flag, par_flag), the regBins is decreased by 1; ○ After sending the bins (sig_flag, and if applicable, gt1_flag and par_flag) for a scan position, if the number of bins regBins still available is less than 3 (i.e., sig_flag, par_flag, and gt1_flag cannot be sent for the next scan position), then the first scan pass ends. Second pass: In the second pass regarding the scan position, the following context - encoded bins are sent: ● When the gt1_flag at the scan position is equal to 1, the gt2_flag is sent, specifying whether the remainder given by (absolute level - 2 - par_flag) / 2) is greater than 0. ● When the predefined maximum number of context - encoded gt2_flag is sent, the second pass ends. When reaching a scan position where no data was sent in the first pass (i.e., for such a scan position, no data is sent in the second pass), the second pass also ends. The third pass: In the third pass regarding the scan positions, the absolute-level residues (i.e., data not already specified by the transmitted sig_flag, par_flag, gt1_flag, and gt2_flag) are transmitted for all scan positions where sig_flag was encoded in pass 1. The residues of non-binary syntax elements are binarized using a structured code (such as a Golomb-Rice code), and the bins are encoded in the bypass mode of the arithmetic coding engine. The residues are transmitted for the following scan positions: ● For all scan positions, a gt2_flag equal to 1 is transmitted in the second pass: For these scan positions, the transmitted residues of non-binary syntax elements specify the following: (Absolute value - 4 - par_flag) / 2 ● For all scan positions, a gt1_flag equal to 1 was transmitted in the first pass, but no gt2_flag was transmitted in the second pass: For these scan positions, the transmitted residues of non-binary syntax elements specify the following: (Absolute value - 2 - par_flag) / 2 The fourth pass: In the fourth pass, the absolute levels for all scan positions where no data was transmitted in the first pass are encoded. The absolute levels are first binarized using a structured code, and the code used can depend on the local activity measurement as well as the value of the current state variable. The bins are transmitted using the bypass mode of the arithmetic coding engine. The fifth pass: Finally, in the fifth pass, the signs of all transform coefficient levels not equal to 0 are transmitted. The signs are transmitted in the bypass mode of the arithmetic coding engine. The pseudo code of FIG. 16 further shows the encoding / decoding process of the conversion coefficient levels within a sub-block. The same comments as in the first embodiment apply. FIG. 17 shows a modified version of FIG. 14 adapted to FIG. 16. FIG. 15 is also changed for FIG. 16, except for details starting from the value domain related to the coefficients between positions 112 and 116, i.e., the maximum value is represented using flags 92, 96, and 98, which is 2 in the case of FIG. 13 and 1 in the case of FIG. 16. As seen outside the case of FIG. 13, the encoding / decoding of the flag par_flag in the first pass 601 is exclusively performed for the positions of the conversion coefficients indicated by the flag gt1_flag that the quantization index of the corresponding scanned conversion coefficient is of a magnitude greater than 1 and the positions of the subsequent conversion coefficients. In the case of FIG. 13, this encoding / decoding is necessarily performed when the corresponding sig_flag indicates non-zero.

[0110] In a variant of this embodiment, gt2_flag is not encoded in a separate pass and is included in the first pass. Next, the number of encoded gt2_flags is included in the count of the context encoding bins in the first pass, and the first pass is terminated when the number of available context encoding bins is less than 4. That is, in this case, a single threshold for the number of context encoding bins is used.

[0111] Alternatively, gt2_flag is not transmitted at all, in which case the residue is encoded when gt1_flag is equal to 1.

[0112] In another variant of this embodiment, one or more additional gtx_flags are included. Similar to gt2_flag, these flags are encoded only when the preceding gty_flag (y = x - 1) is equal to 1. It indicates whether the absolute value of the quantization index is greater than the minimum possible value specified by the preceding gtx_flag. Next, the reconstruction of the absolute value is given as follows. absLevel = sig_flag + gt1_flag + par_flag + 2 * ( gt2_flag + gt3_flag + … + remainder ) These flags can be encoded in the same path as gt2_flag (which includes the case where gt2_flag is included in the first path), or in one or more additional paths. In the latter case, an additional threshold for limiting the number of gtx_flag may be applied.

[0113] A third embodiment differs from the first embodiment in one aspect: the sig_flag in the first path is encoded for all scan positions, and only the presence of par_flag and gt1_flag is determined by the number of context-encoded bins already transmitted. As in the case of the first embodiment, the following applies: ● The state machine for dependent quantization is driven by the parity of the transform coefficient level, i.e., the binary function path (level) returns the parity of its argument; ● The probability model of sig_flag in the first path is selected based on the corresponding values of the state variables (and, optionally, other parameters available to the decoder, see above). First path: In the first path regarding the scan position, the following context-encoded bins are transmitted: ● sig_flag indicates whether the transform coefficient is not equal to 0; if sig_flag can be estimated to be equal to 1 (e.g., it is the case of the first significant scan position (explicitly signaled by x and y coordinates) in the transform block), sig_flag is not transmitted. ● If sig_flag is equal to 1 (encoded or estimated value), the following are additionally transmitted for the current scan position: ○ par_flag specifies a value obtained by subtracting 1 from the parity of the absolute level; ○ gt1_flag specifies whether the remainder (given by (absolute level - 1 - par_flag) / 2) is greater than 0. ● When the predefined maximum number of context-encoded bins (still including the encoded sig_flag) is reached, the transmission of par_flag and gt1_flag is skipped. Let MAX_REG_BINS be the maximum number of bins that can be transmitted in the first pass, and regBins represent the number of positive encoded bins still available. Then, the following applies: ○ regBins is initially set equal to the value obtained by subtracting the sig_flag transmitted in the first pass from MAX_REG_BINS (this number is given by the first scan index for the first pass, the last scan index of the sub-block, and information on whether the sub-block includes the first significant coefficient in scan order); ○ After encoding any gt1_flag or par_flag, regBins is decreased by 1; ○ After transmitting the bins (sig_flag, and if sig_flag is equal to 1, gt1_flag, par_flag) for the scan position, if the number of bins regBins still available is less than 2 (i.e., par_flag and gt1_flag cannot be transmitted for the next scan position), then for all subsequent scan indices in the first scan pass, only sig_flag is transmitted. Second pass: In the second pass regarding the scan position, the following context-encoded bins are transmitted: ● If the gt1_flag at the scan position is equal to 1, gt2_flag is transmitted, specifying whether the remainder (given by (absolute level - 3 - par_flag) / 2) is greater than 0. ● When the predefined maximum number of context-encoded gt2_flag is transmitted, the second pass ends. If the scan position is reached where only sig_flag equal to 1 was transmitted in the first pass (i.e., no data is transmitted in the second pass for such a scan position), the second pass also ends. Third Pass: In the third pass regarding the scan positions, the absolute-level residue (i.e., data not already specified by the transmitted sig_flag, par_flag, gt1_flag, and gt2_flag) is transmitted for all scan positions where sig_flag, gt1_flag, and par_flag were encoded in Pass 1. The residue of non-binary syntax elements is binarized using a structured code (such as a Golomb-Rice code), and the bins are encoded in the bypass mode of the arithmetic coding engine. The residue is transmitted for the following scan positions: ● For all scan positions where gt2_flag equal to 1 was transmitted in the second pass: For these scan positions, the transmitted residue of non-binary syntax elements specifies the following: (absolute value - 5 - par_flag) / 2 ● For all scan positions where gt1_flag equal to 1 was transmitted in the first pass but gt2_flag was not transmitted in the second pass: For these scan positions, the transmitted residue of non-binary syntax elements specifies the following: (absolute value - 3 - par_flag) / 2 Fourth Pass: In the fourth pass, the absolute level minus 1 is encoded for all scan positions, and only sig_flag equal to 1 is encoded in the first pass (but gt1_flag is not transmitted). The residue (absolute level minus 1) is first binarized using a structured code, and the code used can depend on the local activity measurement as well as the value of the current state variable. The bins are transmitted using the bypass mode of the arithmetic coding engine. Fifth Pass: Finally, in the fifth pass, the signs of all transform coefficient levels not equal to 0 are transmitted. The signs are transmitted in the bypass mode of the arithmetic coding engine. The pseudo-code of FIG. 18 further shows the encoding process of the conversion coefficient levels within a sub-block. The same comments as in the first embodiment apply. FIGS. 14 and 15 are also changed for FIG. 18, and flags 96 and 98 are no longer encoded according to scan order 62, while except for the fact that sig_flag indicates at position 112 a position where it is available for the whole block, the residue downstream of the conversion position, i.e., the non-hatched ones, do not represent the quantization index of the corresponding coefficients. Rather, the residue is encoded for the coefficients after position 112 where its sig_flag indicates non-zero and only indicates the absolute level of the quantization index minus 1.

[0114] After the first sig_flag equal to 1 is encoded, note that the state variables are not known and gt1_flag / par_flag do not follow. Thus, for subsequent sig_flags, the probability model used must be derived independently from the state variables (which still depend on the state variables for the preceding sig_flags).

[0115] The following variations of Embodiment 3 are possible. 1. The state machine is driven by sig_flag (i.e., information on whether the conversion coefficient level is equal to zero or not equal to zero). The binary function path specifies whether the level is not equal to zero. In this case, the parity flag does not need to be transmitted, and only the following data is added to sig_flag and transmitted. ● First path: gt1_flag (the transmission of sig_flag is equal to 1; specifies whether the absolute level is greater than 0; ● Second path: gt2_flag (the transmission of gt1_flag is equal to 1; specifies whether the absolute level is greater than 2. This has the advantage that the state variables are known for all sig_flag, and thus the probability model used to encode sig_flag can be selected based on the state variables. Further, the gt1_flag is removed from the first path and can be encoded in a separate path as follows. ● First path: Transmission of sig_flag ● Second path: Transmission of gt1_flag (up to the maximum number of gt1_flag) ● Third path: Transmission of gt2_flag (up to the maximum number of gt2_flag) ● Fourth path: (a) The remaining scan-in indices where gt2_flag equal to 1 was transmitted, (b) where gt1_flag equal to 1 was transmitted but gt2_flag was not transmitted ● Fifth path: Absolute level minus 1 for scan positions where sig_flag is equal to 1 but gt1_flag was not transmitted ● Sixth path: Sign for all conversion coefficient levels not equal to 0

[0116] 2. The state machine switches from a parity-driven state machine to an important-driven state machine. This means the following. ● For all scan-in indices where regBins (specified in the above pseudo-code) is greater than or equal to 2, the state variables are updated using parity (i.e., the binary function path specifies the parity of the conversion coefficient levels); ● After regBins becomes less than 2, the state variables are updated using significant information (i.e., the binary function path (level) specifies whether the level is not equal to 0). This has the advantage that the state variables are known for all sig_flag, and thus the probability model used to encode sig_flag may be selected based on the state variables. In contrast to Variant 1 (where the state machine is always driven by sig_flag), a higher compression density in the N-dimensional space and a subsequent higher encoding efficiency are achieved.

[0117] That is, the update of the state being transitioned depends on whether the current position of the transform coefficient given by k in FIG. 10 precedes in the scan order 62, or is the predetermined position 112 of the transform coefficient, i.e., the hatched one in FIG. 15, or exceeds the latter range, i.e., for the scan 601, is the unhatched position shown in FIG. 15, to the extent that the state being transitioned as described in 76 to be simply parity-driven may, for now, be changed. If the current position of the transform coefficient does not exceed the predetermined position 112 of the transform coefficient according to the scan order 62, i.e., occurs before or is equal to the position 112 of the transform coefficient, the flag 96 of the second flag type at the current position of the transform coefficient, i.e., the subsequent update depends on the parity described above, but if the current position of the transform coefficient follows the predetermined position of the transform coefficient in the scan order, i.e., exceeds it according to the scan order 62, the update depends on the first flag of the position of the transform coefficient, i.e., depends on the zero value of the current coefficient. Then, this may be used when context-adaptive entropy decoding the flag of the first flag type determined in advance, i.e., according to this embodiment, the sig_flag related to the representation of the quantization index of each coefficient exceeds the coefficient position 112 other than the parity flag and the gt1 flag whose encoding is stopped at 112: Therefore, for all positions of the transform coefficient that occur before, include, and exceed the predetermined position 112 of the transform coefficient, the decoder and the encoder can determine the context of such sig_flag for the transform coefficient currently being scanned depending on the state assumed for the position of the transform coefficient currently being scanned.

[0118] Alternatively, the state update is performed in any way such that it is simply parity-driven, and the context for the sig_flag up to position 112 is performed independently after position 112 based on the state of the dependent quantization.

[0119] Similar to Embodiment 1, the following variations are possible. ● The first pass includes gt2_flag; ● gt2_flag is not encoded at all; ● An additional gtx_flag is encoded.

[0120] That is, in the third embodiment, there are flags 92 of a predetermined first flag type, i.e., sig_flag, and flags 96 of a predetermined second flag type, i.e., par_flag. Similar to the case of other embodiments, the flag that restricts the value domain of the absolute value of the quantization index with respect to the position of the first conversion coefficient is encoded / decoded before the flag that restricts the value domain of the absolute value of the quantization index with respect to the position of the second conversion coefficient following the position of the first conversion coefficient in the scan order 62. That is, any sig_flag[k] and par_flag[k] are encoded / decoded before sig_flag[k + 1] and par_flag[k + 1]. However, except for the case of FIG. 13, the encoding / decoding of the flag of the predetermined second flag type, i.e., par_flag, is performed up to the position 112 of the predetermined conversion coefficient indicated by "startldxByass-1" in FIG. 18. In the first pass 601, the abort criterion is first satisfied according to the scan order 62 - for example, the number of encoded flags in the first pass 601 exceeds a specific threshold. The encoding / decoding of the flag of the predetermined first flag type, i.e., sig_flag, is performed in the scan order 62 beyond the position 112 of the predetermined conversion coefficient, that is, for example, for all conversion coefficients, or not all, for the first non-zero quantization index for the position 64, without investigating any abort criterion.

[0121] The fourth embodiment is different from the third embodiment in one aspect: the order of the par_flag and gt1_flag is swapped (and the meanings of these flags are changed accordingly). When sig_flag is equal to 1, the first gt1_flag is transmitted, specifying whether the absolute value of the conversion coefficient level is greater than 1. And when gt1_flag is equal to 1, par_flag specifies the remaining parity (i.e., absolute level - 2). Similar to the first embodiment, the following applies: ● The state machine for dependent quantization is driven by the parity of the conversion coefficient level, i.e., the binary function path (level) returns the parity of its argument; ● The probability model of sig_flag in the first path is selected based on the value of the state variable (and optionally other parameters available to the decoder, see above). First path: In the first path regarding the scan position, the following context - encoded bins are transmitted: ● sig_flag indicates whether the conversion coefficient is not equal to 0; if sig_flag can be estimated to be equal to 1 (e.g., it is the case of the first significant scan position (explicitly signaled by x and y coordinates) in the conversion block), sig_flag is not transmitted. ● When sig_flag is equal to 1 (encoded or estimated value), then the following are additionally transmitted for the current scan position: ○ gt1_flag specifies whether the absolute level is greater than 1. ○ When gt1_flag is equal to 1, par_flag specifies the parity of the absolute level minus 2. ● When the predefined maximum number of context - encoded bins (still including the encoded sig_flag) is reached, the transmission of par_flag and gt1_flag is skipped. Let MAX_REG_BINS be the maximum number of bins that can be transmitted in the first path, and regBins still represents the number of positive encoded bins available. Then the following applies: ○ regBins is initially set equal to the value obtained by subtracting the sig_flag transmitted in the first pass from MAX_REG_BINS (this number is given by the first scan index for the first pass, the last scan index of the sub-block, and information on whether the sub-block includes the first significant coefficient in scan order); ○ After encoding either gt1_flag or par_flag, regBins is decreased by 1; ○ After transmitting the bin (sig_flag, and if sig_flag equals 1, gt1_flag, par_flag) for the scan position, if the number of bins regBins still available is less than 2 (i.e., par_flag and gt1_flag cannot be transmitted for the next scan position), then for all subsequent scan indices in the first scan pass, only sig_flag is transmitted. Second pass: In the second pass regarding the scan position, the following context-encoded bins are transmitted: ● If gt1_flag at the scan position equals 1, gt2_flag is transmitted, specifying whether the remainder (given by (absolute level - 2 - par_flag) / 2) is greater than 0. ● If the predefined maximum number of context-encoded gt2_flag is transmitted, the second pass ends. If only skip_flag equal to 1 reaches the scan position transmitted in the first pass (i.e., no data is transmitted in the second pass for such a scan position), the second pass also ends. Third path: In the third path regarding the scan position, the absolute level residue (i.e., the data not already specified by the transmitted sig_flag, par_flag, gt1_flag, and gt2_flag) is transmitted for all scan positions where sig_flag, gt1_flag, and par_flag were encoded in path 1. The residue of non-binary syntax elements is binarized using a structured code (such as a Golomb-Rice code), and the bins are encoded in the bypass mode of the arithmetic coding engine. The residue is transmitted for the following scan positions: ● For all scan positions, a gt2_flag equal to 1 is transmitted in the second path: For these scan positions, the transmitted residue of non-binary syntax elements specifies the following: (absolute value - 4 - par_flag) / 2 ● For all scan positions, a gt1_flag equal to 1 was transmitted in the first path, but a gt2_flag was not transmitted in the second path: For these scan positions, the transmitted residue of non-binary syntax elements specifies the following: (absolute value - 2 - par_flag) / 2 Fourth path: In the fourth path, the absolute level minus 1 is encoded for all scan positions, and only the sig_flag equal to 1 in the first path is encoded (but the gt1_flag is not transmitted). The residue (absolute level minus 1) is first binarized using a structured code, and the code used can depend on the local activity measurement as well as the value of the current state variable. The bins are transmitted using the bypass mode of the arithmetic coding engine. Fifth path: Finally, in the fifth path, the signs of all transform coefficient levels not equal to 0 are transmitted. The signs are transmitted in the bypass mode of the arithmetic coding engine. The pseudo-code of FIG. 19 further shows the encoding process of the conversion coefficient levels within a sub-block. The same comments as in the first and third embodiments apply. FIGS. 17 and 15 are also changed with respect to FIG. 19. However, in FIG. 15, the residue between positions 112 and 116 of the coefficients, i.e., the maximum value representable using flags 92, 96, and 98, is changed to the start of the value domain of case 2 of FIG. 13 and case 1 of FIG. 19.

[0122] For Embodiment 4, the same variations as in Embodiment 3 are possible. This includes the following aspects (similar to Embodiment 2). ● The first pass includes gt2_flag; ● gt2_flag is not encoded at all; ● An additional gtx_flag is encoded.

[0123]

Number

Number

Number

[0124] Probability model selection for par_flag, gt1_flag, and gt2_flag The adaptive probability model for encoding the current par_flag is selected from a set of probability models. Similarly for the significance flag, assume that the available probability models are organized in a four-dimensional array. probModelPar[ cPar ][ sPar ][ dPar ][ aPar ], where cPar specifies an index that depends on the current color channel, sPar specifies an index that depends on the state variable, dPar specifies an index that depends on the x and y positions within the transform block, and aPar specifies an index that depends on the local activity measurement. Also, a similar concept is used for gt1_flag and par_flag. probModelGt1[ cGt1 ][ sGt1 ][ dGt1 ][ aGt1], probModelGt2[ cGt2 ][ sGt2 ][ dGt2 ][ aGt2 ] In a preferred embodiment, the same index is used for the three flags par_flag, gt1_flag, and gt2_flag. This has the advantage that the index (or combined index) only has to be calculated once per scan index. cGt2 = cGt1 = cPar sGt2 = sGt1 = sPar dGt2 = dGt1 = dPar aGt2 = aGt1 = aPar Even if the indices are the same, different sets of probability models are still used for the three flags par - flag, gt1_flag, and gt2_flag. In another embodiment, the same set of probability models is used for both gt1_flag and gt2_flag (in this case, for each sample position, gt1_flag and gt2_flag are always encoded with the same probability model). It is also possible to use different methods to derive the indices of the individual flags. Below, for example, the indices cPar, sPar, dPar, and aPar are described. The same method is applied to the corresponding indices for gt1_flag and gt2_flag. Color channel index cPar In a preferred embodiment, similar to the significance flag, the color channel index cSig is set as follows. cPar = (current channel is luma? 0 : 1 ) Alternatively, the alternatives described above for cSig can be used. [Number] [Number] Alternatively, different maximum values or different functions of sumAbs1 and numSig can be used. Residual binarization (excluding fully bypassed coefficients) In a preferred embodiment of the present invention, the residue of the syntax element is encoded in bypass mode of the arithmetic coding engine. The compression efficiency depends on the binarization used. In HEVC, similar syntax elements are encoded using a class of binarization codes called Golomb-Rice codes. The codes of this class are parameterized by a so-called Rice parameter. The Rice parameter can be adjusted during encoding, and the binarization used depends on the preceding syntax element. In a preferred embodiment of the present invention, the residue of the syntax element is binarized using a so-called Golomb-Rice code. The Golomb-Rice code consists of a prefix part and a suffix part if the value to be encoded exceeds a predefined threshold. The prefix part represents a truncated Rice code (see HEVC) and is parameterized by a Rice parameter (RP) and a maximum symbol value (cMax). If the value to be encoded (residue) is greater than or equal to cMax, a string of suffix bins is added to the string of prefix bins. The string of suffix bins is given by an exponential Golomb code of degree kEG. To parameterize the concatenated code by a single parameter, the values of cMax and kEG used represent a function of the Rice parameter (RP). In particular, in this setting, cMax and kEG (the degree of the exponential Golomb code) are derived as follows. cMax = ( RP == 1? 6 : 7 ) << RP, kEG = RP + 1 Other functional relationships for cMax(RP) and kEG(RP) are possible. Furthermore, other parameterized sets of structured coding can be used. Below, two methods for adapting the Rice parameter (RP) or similar parameters for different classes of codes are described. Method 1: Increase RP if the last encoded value (or the last absolute level) exceeds a threshold At the start of the sub-block (or alternatively, the transform block), the Rice parameter RP is set equal to a predefined value. In particular, in this embodiment, the predefined value is equal to 0. After decoding (or encoding) the residue of the syntactic element, the Rice parameter is updated as follows. if( RP < MAX_RP && remainder > Threshold( RP ) ) { RP = RP + 1 } At this time, MAX_RP represents a predefined value for the maximum Rice parameter. In a preferred embodiment, MAX_RP is set equal to 3. The function Threshold(RP) represents a threshold value that depends on the current value of the Rice parameter. In a preferred embodiment, this function is defined as follows. Threshold( RP ) = ( 3 << RP ) - 1, Here, the operator “<<” represents a right bit shift. That is, “3 << RP” is equal to 3 * 2^RP. For example, any other definition of Threshold(RP) as a lookup table is possible. In a variation of this method, instead of the residue of the encoded value, the reconstructed absolute level absLevel is used to compare with the threshold. And the Rice parameter is updated as follows. if( RP < MAX_RP && absLevel > Threshold( RP ) ) { RP = RP + 1 }

[0125]

Number

[0126]

Number

[0127] That is, the variable length code for encoding / decoding the residual value for the position of the conversion coefficient currently being scanned can be selected from a set of predefined variable length codes, such as a set of Golomb-Rice codes that are different from each other by RP. The selection may depend on whether the position of the currently scanned conversion coefficient for which the residue is to be encoded / decoded is located up to a predetermined conversion coefficient position 112 or is located downstream thereof in the scan order 62. That is, different RPs are selected in the former and latter cases. According to the above-described methods 1 and 2, the RP parameter indicating the selected variable length code may generally be kept constant between paths 603 and 4, but, as in method 1, the quantization index of the preceding decoded / encoded conversion coefficient that satisfies a predetermined criterion exceeding a certain limit, or the quantization index at the conversion position in the vicinity of the position of the currently scanned conversion coefficient that satisfies several criteria exceeding a certain limit may be gradually changed. For example, this dependency or incremental change can be used only when the position of the current conversion coefficient for which the residue is encoded is arranged up to the predetermined conversion coefficient position 112, that is, for all hatched positions in FIG. 15. In addition to the quantization index of the neighboring coefficients, the dependent quantization state may be used to select the binarization code parameter.

[0128] The following aspects can be combined with the above-described embodiments, but may alternatively be implemented in the above-described embodiments to increase the coding efficiency. This aspect relates to the explicit signaling of blocks / sub-blocks that do not contain any conversion coefficient levels having an absolute value greater than 1. To reduce the number of bins for encoding the conversion coefficient level, a dedicated flag is introduced on a per-conversion block or sub-block basis to signal whether any of the absolute levels within the block or sub-block is greater than 1: ● When the subblock with coded_subblock_flag equals 1 (coded or estimated), a second flag is sent for the subblock. This flag (gt1_subblock_flag) specifies whether the subblock contains any transform coefficient levels with absolute levels greater than 1. ● When gt1_subblock_flag equals 0, only the significant information (sig_flag) and the sign bits of the transform coefficient levels not equal to 0 are sent. ● When gt1_subblock_flag equals 1, the coding of the transform coefficient levels proceeds as described in Embodiments 1 to 4. When reaching the last scan index within the subblock and when all preceding absolute levels within the subblock equal 1, it may be possible to further assume that the last absolute level is greater than 1. - Thus, the corresponding gt1_flag may be assumed to equal 1. For Embodiments 1 and 3 as well, the parity flag par_flag may be assumed to equal 0 in this case. It is also possible to send, instead for the entire transform block, a flag specifying that all levels have an absolute value equal to 1, based on the subblock. It is also possible to send this flag only for the selected subblock (e.g., the subblock containing the first significant coefficient).

[0129] That is, here, the transform coefficient block 10 is encoded / decoded in the following manner. For each of at least one set of sub-blocks 14 into which the transform coefficient block 10 is divided, a sub-block significant flag, that is, gt1_subblock_flag, is transmitted indicating, for example, whether each sub-block 14 contains a transform coefficient 12 whose absolute value of the quantization index is greater than a predetermined non-zero threshold. The transform coefficients of the transform coefficient block within each sub-block 14 indicated by the sub-block significant flag as having at least one transform coefficient whose absolute value of the quantization index is greater than a predetermined non-zero threshold are recursively bisectioned into two parts in the value domain of each respective transform coefficient, and a sequence of one or more flags 92, 96, 98, 194 or other flags indicating in which of the two parts the quantization index of each respective transform coefficient exists is sequentially encoded / decoded for each of the transform coefficients within each sub-block, and when the value domain is interpreted to define a signed value and as soon as the value domain contains only one value or values that are equal in an absolute sense, the decoding of the sequence is stopped, which is accompanied by. If the value domain still contains one or more values that are different in an absolute sense, the residual value indicating the absolute value of the quantization index of each transform coefficient in the value domain is encoded / decoded. However, within each sub-block indicated by the sub-block significant flag as having no transform coefficient whose absolute value of the quantization index is greater than a predetermined non-zero threshold, For each of the transform coefficients within each sub-block, the subsequent decoding of the sequence of one or more flags stops as soon as the value domain contains only one value that does not exceed a non-zero threshold, or simply one value or simply values that are equal in an absolute sense. A first stopping criterion arises from the fact that the indices of all coefficients in each sub-block satisfy the requirement indicated by the sub-block significant flag by not exceeding a predetermined non-zero threshold, and thus, this one value of the value domain is the quantization index, as determined by the previously encoded / decoded flags for each coefficient such that the remaining value domain or remaining value interval simply contains.

[0130] Accordingly, among other things, the following embodiments have been described above.

[0131] An apparatus for decoding a block of transform coefficients, the apparatus being in a sequence of passes that scans the positions of the transform coefficients of the block according to a scan order (the passes need not scan all the positions of the transform coefficients of the transform block, but all of the scan order is used, and it should be noted that for some of the flag types, the flags may be transmitted in the same pass), using context-adaptive binary arithmetic decoding to: 1) decode flags, each of which is one of a set of one or more flag types (e.g., in Embodiment 1: sig_flag, par_flag, gt1_flag, gt2_flag), and variable-length codes (e.g., using a compression rate of 1; transmitted in bypass mode; as described above, the VLC codeword bins may be encoded using an arithmetic coding engine, but instead of using this context adaptation, it is executed using a (0.5; 0.5) probability bypass mode - separately from that, these VLC bins are used for the start of binarization and non-adaptive binary arithmetic decoding or a bypass mode having a uniform probability model), and 2) decode residual values (residuals) from the data stream such that each flag and each residual value is decoded for the position of the transform coefficient currently being scanned (e.g., in Embodiment 1: index k), and for each position of the encoded set of positions of the transform coefficients (e.g., expanding between a predefined first position of the transform coefficient and a predefined last position of the transform coefficient, where the predefined first and last positions of the transform coefficient identify a subset of the positions of the transform coefficients within the transform block; alternatively, e.g., expanding between a predefined coefficient such as the last non-zero coefficient and the DC coefficient), at least one of the one or more flags and one residual value (e.g., one residual and no flags, one or more flags and one residual, or one or more flags and no residuals) is decoded continuously such that there is an initial value domain in which the absolute value of the quantization index for the position of the transform coefficient currently being scanned exists (e.g., an x-bit representation → Ω = 0 to 2 x-1; for example, x = 16) is continuously (i.e., in a continuous sense) restricted to include only the absolute value of the quantization index for the position of the currently scanned transform coefficient within the value domain (i.e., the "one or more flags and one residual value" decoded for the position of a particular transform coefficient uniquely defines the latter from the initial value domain), where each flag divides the value domain of the absolute value of the quantization index for the position of the currently scanned transform coefficient into two parts (for example, sig_flag: the value domain Ω is divided into A = {0} and

Number

Number

[0132] A2. The apparatus according to any one of Embodiment B5 or A1, configured to perform a transition of the state transition between four different states.

[0133] A3. When updating the state of the state transition, configured to perform the update by determining between a first subsequent state and a second subsequent state depending on a binary function applied to the quantization index of the position of the current transform coefficient, wherein the first subsequent state and the second subsequent state depend on the state of the position of the current transform coefficient, an embodiment The apparatus according to any one of Embodiment B5 or A1 - A2.

[0134] A4. The binary function produces the parity or zero, the apparatus according to any one of Embodiment B5 or A1 - A3.

[0135] A5. The apparatus according to any one of Embodiment B5 or A1 - A4, configured to parameterize the plurality of quantization level sets by a predetermined quantization step size and derive information regarding the predetermined quantization step size from the data stream.

[0136] A6. Each of the plurality of quantization level sets consists of multiples of a predetermined quantization step size that is constant for the plurality of quantization level sets, the apparatus according to any one of Embodiment B5 or A1 - A5.

[0137] A7. The number of the quantization level sets among the plurality of quantization level sets is 2, and the plurality of quantization level sets include a first quantization level set including zero and even multiples of a predetermined quantization step size, and a second quantization level set including zero and odd multiples of the predetermined quantization step size. The apparatus according to any one of Embodiment B5 or A1 - A6.

[0138] A8. In a first path of the sequence of the paths, the decoder decodes from the data stream a flag of a predetermined first flag type (e.g., sig_flag) and a flag of a predetermined second flag type (e.g., par_flag) such that a flag that restricts the value domain of the absolute value of the quantization index for the position of a first transform coefficient is decoded before a flag that restricts the value domain of the absolute value of the quantization index for the position of a second transform coefficient that follows the position of the first transform coefficient in the scan order (i.e., any sig_flag[k] and par_flag[k] before any sig_flag[k + 1] and par_flag[k + 1]). Here, the decoding of the flag of the predetermined second flag type is performed in the first path until a predetermined conversion coefficient position (e.g., in Embodiment 3: startIdxBypass - 1) where a predetermined abort criterion is first satisfied in the scan order (e.g., the number of flags encoded in the first path exceeds a specific threshold), and the decoding of the flag of the predetermined first flag type is performed beyond the predetermined conversion coefficient position in the scan order (for all of the encoded sets, or for a first non - zero quantization index for which no abort criterion is measured). The flag of the predetermined first flag type indicates whether the quantization index of the currently scanned transform coefficient is zero (e.g., sig_flag). The apparatus according to any one of Embodiments A1 - A7.

[0139] Apparatus according to embodiment A8, wherein the flag of the second pre-determined flag type indicates the parity of the quantization index for the currently scanned transform coefficient.

[0140] Apparatus according to any of the preceding embodiments A8 - A9, configured to decode the flag of the second pre-determined flag type exclusively for the positions of the transform coefficients where the flag of the first pre-determined flag type indicates that the quantization index of the currently scanned transform coefficient is non-zero and for the positions of the subsequent transform coefficients.

[0141] Apparatus according to embodiment A8, wherein the pre-determined abort criterion is related to the number of flags decoded in the first pass exceeding a pre-determined threshold.

[0142] Apparatus according to any of the preceding embodiments A8 - A11, configured to also decode a flag of a third pre-determined flag type indicating whether it is assumed that the quantization index for the position of the currently scanned transform coefficient is the minimum value within the value domain in terms of absolute value.

[0143] Apparatus according to embodiment A12, configured to decode the flag of the third pre-determined flag type exclusively for the positions of the transform coefficients where the flag of the first pre-determined flag type indicates that the quantization index of the currently scanned transform coefficient is non-zero and for the positions of the subsequent transform coefficients.

[0144] A14. In the first pass, for the positions of the transform coefficients indicated by the flag of the first predetermined flag type indicating that the quantization index for the position of the currently scanned transform coefficient is non-zero and for the positions of the subsequent transform coefficients, the apparatus according to embodiment A13 (e.g., embodiment 3) is configured to decode the flag of the third predetermined flag type after the flag of the second predetermined flag type.

[0145] A15. In the first pass, for the positions of the transform coefficients indicated by the flag of the first predetermined flag type indicating that the quantization index for the position of the currently scanned transform coefficient is non-zero and for the positions of the subsequent transform coefficients, the apparatus according to embodiment A13 (e.g., embodiment 4) is configured to exclusively decode the flag of the second predetermined flag type for the positions of the transform coefficients where the flag of the third predetermined flag type indicates a magnitude greater than 1.

[0146] A16. In a second pass following the first pass, the apparatus according to any of the preceding embodiments A8 - A15 is configured to also decode a flag of a fourth predetermined flag type indicating whether to assume that the quantization index for the position of the currently scanned transform coefficient is restricted by the flag decoded in the first pass to be the minimum value within the value domain in terms of absolute value.

[0147] A17. In one or more additional passes following the second pass, the apparatus according to embodiment A16 is configured to decode the residual value.

[0148] A18. In one or more passes following the first pass, the apparatus according to embodiments A8 - A17 is configured to decode the residual value.

[0149] A19. In the last pass, the apparatus according to embodiments A8 - A18 is configured to decode the signs of the non-zero transform coefficients.

[0150] A20. The decoder is configured to: 1) in the state transition, when the position of the current transform coefficient precedes or is equal to the position of the predetermined transform coefficient in the scan order, for each position of the respective transform coefficient, depending on the flag of the second flag type at the position of the current transform coefficient (e.g., in Embodiment 3: par_flag), and when the position of the current transform coefficient follows the position of the predetermined transform coefficient in the scan order, for each position of the respective transform coefficient, depending on the flag of the first flag type at the position of the current transform coefficient (e.g., in Embodiment 3: the path (level) causes zero) to perform the update of the state of the state transition (e.g., in Embodiment 3, the second modification "2. The state machine switches from a parity-driven state machine to an important-driven state machine."); 2) in the context-adaptive entropy decoding, depending on the state assumed by the state transition for the position of the currently scanned transform coefficient, to determine a context for decoding the flag of the predetermined first flag type for the currently scanned transform coefficient for all positions of the respective transform coefficients that precede, include, and follow the position of the predetermined transform coefficient, the apparatus according to any one of the preceding embodiments A8 - A19.

[0151] A21. In the context - adaptive entropy decoding, for the positions of the transformation coefficients that precede and include the position of the predetermined transformation coefficient, the state transition depends on the state assumed for the position of the currently scanned transformation coefficient, and for the positions of the transformation coefficients that follow the position of the predetermined transformation coefficient, the state transition is independent of the state assumed for the position of the currently scanned transformation coefficient, and the apparatus is configured to determine a context for decoding the flag of the predetermined first flag type for the position of the currently scanned transformation coefficient (for example, Embodiment 3), the apparatus according to any one of the preceding embodiments A8 - A19.

[0152] A22. The decoder is configured such that: 1) in the context - adaptive entropy decoding, for all positions of the transformation coefficients that precede, include, and follow the position of the predetermined transformation coefficient (112), the state transition depends on the state assumed for the position of the currently scanned transformation coefficient, and the decoder is configured to determine a context for decoding the flag (92) of the predetermined first flag type for the position of the currently scanned transformation coefficient; 2) in the state transition, depending on the flag of the first flag type at the position of the current transformation coefficient (for example, in Embodiment 3: the path (level) causes zero), the decoder is configured to perform the update of the state of the state transition assumed for the position of the current transformation coefficient for the positions of the transformation coefficients that follow the position of each transformation coefficient in the scan order (for example, in Embodiment 3: the first modification), the apparatus according to any one of the preceding embodiments A8 - A19.

[0153] An apparatus for decoding a block of transform coefficients, in a sequence of paths that scan the positions of the transform coefficients according to a scan order (wherein the paths need not scan all the positions of the transform coefficients of a transform block, but all of the scan order is used, and it should be noted that for some flag types, the flags may be transmitted in the same path), 1) using context-adaptive binary arithmetic decoding, a flag (e.g., in Embodiment 1: sig_flag, par_flag, gt1_flag, gt2_flag), each of which is one of a set of one or more flag types, and 2) using a variable-length code (e.g., using a compression rate of 1; transmitted in bypass mode; thus, see also the comment for A1), a residual value (residue) is decoded from the data stream, such that each flag and each residual value is decoded for the position of the transform coefficient currently being scanned (e.g., in Embodiment 1: index k), and for each transform coefficient position in an encoded set of transform coefficient positions (e.g., expanding between a predefined first transform coefficient position and a predefined last transform coefficient position, where the predefined first and last transform coefficient positions identify a subset of the positions of the transform coefficients within a transform block; alternatively, e.g., expanding between a predefined coefficient such as the last non-zero coefficient and the DC coefficient), at least one of the one or more flags and one residual value (e.g., one residual and no flags, one or more flags and one residual, or one or more flags and no residue) is decoded continuously, and an initial value domain in which an absolute value of a quantization index for the position of the transform coefficient currently being scanned exists (e.g., x-bit representation → Ω = 0 to 2 x-1; for example, x = 16), is continuously (i.e., in a continuous sense) restricted to include only the absolute value of the quantization index for the position of the currently scanned transform coefficient (i.e., the “one or more flags and one residual value” decoded for the position of a particular transform coefficient uniquely defines the latter from the initial value domain), where each flag divides the value domain of the absolute value of the quantization index for the position of the currently scanned transform coefficient into two (e.g., sig_flag: value domain Ω is divided into A = {0} and

Number

Number

[0154] B2. The apparatus according to embodiment B1, configured to parameterize the variable - length code to decode the residual value for the position of the currently scanned conversion coefficient differently depending on whether the position of the currently scanned conversion coefficient precedes, is, or follows the predetermined position of the conversion coefficient in the scan order.

[0155] Apparatus according to Embodiment B1 or B2, configured to parameterize the variable length code by gradually changing it to the quantization index of the position of a preceding transform coefficient that meets a predetermined criterion in order to decode the residual value for the position of the currently scanned transform coefficient when the position of the currently scanned transform coefficient precedes (in scan order) or is equal to the position of the predetermined transform coefficient, and / or depending on the quantization index of the position of transform coefficients in the vicinity of the position of the currently scanned transform coefficient.

[0156] Apparatus according to Embodiment B1 or B2 or B3, configured to parameterize the variable length code depending on the quantization index of the position of transform coefficients in the vicinity of the position of the currently scanned transform coefficient and depending on the state assumed for the position of the currently scanned transform coefficient when the state transition occurs, in order to decode the residual value for the position of the currently scanned transform coefficient when the position of the currently scanned transform coefficient follows (in scan order) the position of the predetermined transform coefficient.

[0157] B5. The decoder selects, for the position of the current transform coefficient, a set of one reconstruction level from a plurality of reconstruction level sets based uniquely on the state to which the state transition assumes for the position of the current transform coefficient, and inverse quantizes the quantization index to the reconstruction level indicated by the quantization index in the set of reconstruction levels, and b) depending on the quantization index for the position of the current transform coefficient, for the position of the transform coefficient following the position of the current transform coefficient in the scan order (note that this term is now intended to indicate the purpose or effect of the update), the position of the current transform coefficient (note that this is what is currently being scanned during dependent quantization; "currently being scanned" is used to represent what is currently being decoded during a pass).) updates the state of the state transition assumed for the position of the current transform coefficient, thereby using the state transition (e.g., referring to a trellis diagram) to continuously inverse quantize the quantization index of the position of the transform coefficient in the encoded set of positions of the transform coefficient (i.e., the use of dependent quantization).) is configured as described in any of embodiments B1 - B4 (embodiments 1 - 4), the apparatus according to any of embodiments B1 - B4.

[0158] 3. For each of the sets of the one or more flag types, the decoding is configured to be executed to decode the flag of each of the flag types in one of the sequences of the paths, the apparatus according to any of embodiments A1 - A22 or B1 - B5.

[0159] 4. The variable - length code is a Golomb - Rice code, the apparatus according to any of the preceding embodiments (e.g., embodiments 1 - 4).

[0160] 5. The apparatus is configured to parameterize the variable length code by gradually changing it to the quantization index at the position of a preceding transform coefficient that meets a predetermined criterion and / or depending on the quantization index at the position of a transform coefficient in the vicinity of the position of the currently scanned transform coefficient, for decoding the residual value for the position of the currently scanned transform coefficient (e.g., Methods 1 and 2 in Embodiments 1 to 4, 4.5.4), the apparatus according to any of the preceding embodiments.

[0161] 6. The apparatus according to any of the preceding embodiments is configured to determine the encoded set of positions of transform coefficients that are expanded according to the scan order between the position of the first non-zero quantization index in the scan order and the position of a predefined transform coefficient, and to identify the position of the first non-zero quantization index based on the data stream (e.g., Embodiments 1 to 4).

[0162] 7. The apparatus according to any of the preceding embodiments is configured to decode the code bits from the data stream for each non-zero quantization index using an equiprobable bypass mode.

[0163] 10. The apparatus according to any of the preceding embodiments is configured to decode the flag of the first flag type for a predetermined position of a transform coefficient using context adaptive entropy decoding by selecting a context depending on the coefficient position of the predetermined transform coefficient.

[0164] 11. a) Determine local activity for a set of positions of neighboring transformation coefficients within a local template around the position of the predetermined transformation coefficient based on a set of flags decoded prior to the flag of the predetermined flag type at the position of the predetermined transformation coefficient, and b) select a context depending on the local activity, thereby being configured to decode the flag of the first predetermined flag type for the position of the predetermined transformation coefficient using context-adaptive entropy decoding, the apparatus according to any of the preceding embodiments.

[0165] 12. The set of flags includes the flag of the predetermined first flag type decoded for the set of positions of neighboring transformation coefficients, the flag of the predetermined second flag type, and the flag of the predetermined third flag type (at least; it may be more than 4), the apparatus being configured to calculate the activity based on the sum of addends for each of the positions of the neighboring transformation coefficients, the addends being the minimum assumed absolute value or the minimum assumed absolute quantization level for the quantization index for the position of the neighboring transformation coefficient determined based on (at least) the flag of the predetermined first flag type decoded for the position of the neighboring transformation coefficient, the flag of the predetermined second flag type, and the flag of the predetermined third flag type, the apparatus according to embodiment 11.

[0166] 13. The decoder is configured to continuously inverse quantize (i.e., use dependent quantization) using a state transition according to the scan order (e.g., refer to a trellis diagram) by: 1) a) for each position of the transform coefficient, selecting one reconstruction level set from a plurality of reconstruction level sets based uniquely on the state that the state transition assumes for each position of the transform coefficient, and inverse quantizing the quantization index to the reconstruction level indicated by the quantization index in the set of reconstruction levels; and b) updating the state of the state transition assumed for the position of the current transform coefficient (note that this is the one currently being scanned during dependent quantization; "currently being scanned" is used to represent what is currently being decoded during a pass) depending on the quantization index of the position of the current transform coefficient, for the position of the transform coefficient following the current transform coefficient in the scan order (note that this term is currently intended to indicate the purpose or effect of the update); 2) decoding using context-adaptive entropy decoding by selecting a context depending on the state that the state transition assumes for the predetermined position of the transform coefficient and / or the set of reconstruction levels selected for the predetermined position of the transform coefficient (e.g., Embodiments 1 to 4), the apparatus according to any of the preceding embodiments.

[0167] 20. The apparatus according to any of the preceding embodiments, wherein the flag of the second flag type for the predetermined position of the transform coefficient is configured to be decoded using context-adaptive entropy decoding by selecting a context depending on the coefficient position of the predetermined transform coefficient.

[0168] 21.1) For a set of positions of neighboring transform coefficients within a local template around the position of a predetermined transform coefficient, based on a set of flags decoded prior to the flag of the second predetermined flag type at the position of the predetermined transform coefficient, determining local activity and / or the number of transform coefficients with non-zero quantization indices within the local template around the position of the predetermined transform coefficient, and 2) selecting a context depending on the local activity and / or the number of non-zero quantization indices, thereby configuring the flag of the second predetermined flag type for the position of the predetermined transform coefficient to be decoded using context-adaptive entropy decoding, the apparatus according to any of the preceding embodiments.

[0169] 22. The apparatus according to embodiment 21, configured to select the context depending on a difference between the local activity and the number of non-zero quantization indices.

[0170] 23. The setting of the flag includes the flag of the predetermined first flag type decoded for the set of positions of the conversion coefficients in the vicinity, the flag of the predetermined second flag type, and the flag of the predetermined third flag type (for example, encoded in the first scan path, and the same applies to Embodiment 12). The apparatus is configured to calculate the activity based on the sum of addends for each position of the conversion coefficients in the vicinity. The addends are based on the flag of the predetermined first flag type decoded for the position of the conversion coefficients in the vicinity, the flag of the predetermined second flag type, and the flag of the predetermined third flag type (note that more flags than the above flags can be used when more flags are transmitted in the first path). The minimum assumed absolute value of the quantization index for the position of the conversion coefficients in the vicinity, or the minimum assumed absolute quantization index, as described in Embodiment 20 or 21.

[0171] 33. The apparatus according to any of the preceding embodiments, wherein the flag of the third flag type for the position of the predetermined conversion coefficient is configured to be decoded using context adaptive entropy decoding by selecting a context depending on the coefficient position of the predetermined conversion coefficient.

[0172] 31.1) Based on the set of flags of the second predetermined flag type of the predetermined conversion coefficient that has been decoded prior to the flag for the set of positions of the neighboring conversion coefficients within the local template around the position of the predetermined conversion coefficient, determining the local activity and / or the number of conversion coefficients within the local template around the position of the predetermined conversion coefficient for which the quantization index is not zero, and 2) selecting a context depending on the local activity and / or the number of non-zero quantization indices, whereby the flag of the third predetermined flag type for the position of the predetermined conversion coefficient is configured to be decoded using context-adaptive entropy decoding, the apparatus according to any of the preceding embodiments.

[0173] 32. The apparatus according to embodiment 31, configured to select the context depending on the difference between the local activity and the number of non-zero quantization indices.

[0174] 33. The set of flags includes the flag of the first predetermined flag type that has been decoded for the set of positions of the neighboring conversion coefficients, the flag of the second predetermined flag type, and the flag of the third predetermined flag type (see the considerations of embodiments 12 and 23), the apparatus is configured to calculate the activity based on the sum of the addends for each of the positions of the neighboring conversion coefficients, the addends being the minimum assumed absolute value or the minimum assumed absolute quantization index for the quantization index for the position of the neighboring conversion coefficient determined based on the flag of the first predetermined flag type that has been decoded for the set of positions of the neighboring conversion coefficients, the flag of the second predetermined flag type, and the flag of the third predetermined flag type (see the considerations of embodiments 12 and 23), the apparatus according to embodiment 30 or 31.

[0175] A decoder for decoding a transform coefficient block, comprising: 1) for each of at least one set of sub-blocks into which the transform coefficient block is divided, decoding a sub-block significance flag indicating whether each of the sub-blocks contains a transform coefficient whose absolute value of the quantization index is greater than a predetermined non-zero threshold; and 2) in each sub-block indicated by the sub-block significance flag that there is at least one transform coefficient whose absolute value of the quantization index is greater than the predetermined non-zero threshold, a) for each of the transform coefficients in each of the sub-blocks, recursively bisecting the value domain of each of the transform coefficients into two parts, continuously decoding a sequence of one or more flags indicating in which of the two parts the quantization index of each of the transform coefficients exists, and stopping decoding of the sequence as soon as the value domain contains only one value or values that are equal in an absolute sense, and, if the value domain still contains one or more values that are different in an absolute sense, continuously decoding the residual values indicating the absolute value of the quantization index of each of the transform coefficients in the value domain; and in each sub-block indicated by the sub-block significance flag that there is no transform coefficient whose absolute value of the quantization index is greater than the predetermined non-zero threshold, b) for each of the transform coefficients in each of the sub-blocks, continuously decoding the sequence of the one or more flags and stopping decoding of the sequence as soon as the value domain contains only one value not exceeding the non-zero threshold, a single value or values that are equal in an absolute sense, thereby configured to decode the transform coefficients of the transform coefficient block, a decoder.

[0176] The apparatus according to embodiment C1, wherein the first flag of the sequence flag is a significance flag indicating whether the transform coefficient for which the first flag is decoded is zero.

[0177] Embodiment C2 of the apparatus, wherein the predetermined non-zero threshold is 1, and in each sub-block indicated by the sub-block significance flag that there is no transform coefficient whose absolute value of the quantization index is greater than 1, for each of the transform coefficients in each of the sub-blocks, the first flag is configured to be decoded continuously.

[0178] C4.1) For each of at least one other set of the sub-blocks into which the transform coefficient block is divided, decode another sub-block significance flag indicating whether each of the sub-blocks contains a transform coefficient not equal to zero; 2) determine the set of sub-blocks forming the sub-blocks indicated by the another sub-block significance flag that the sub-block significance flag is decoded and contains at least one transform coefficient not equal to zero; 3) in each sub-block indicated by the another sub-block significance flag that there is no non-zero transform coefficient, the transform coefficients of the transform coefficient block are configured to be estimated to be all zero, the apparatus according to any one of the preceding embodiments C1-C3.

[0179] In the above description, the concepts of quantization and entropy coding of the transform coefficient level (quantization index) for block-based hybrid video coding are presented. The techniques outlined above may be applied to the lossy coding of blocks of residual samples. The residual samples can represent the difference between the original block of samples and the samples of the prediction signal (the prediction signal can be obtained by intra-picture prediction or inter-picture prediction, or a combination of inter-picture and intra-picture prediction, or any other means; in special cases, the prediction signal may be set equal to zero).

[0180] The residual blocks of the samples may be transformed using a signal transformation. Typically, linear and separable transformations are used (linear in that the transformation is linear, but can incorporate additional rounding of the transformation coefficients). Often, integer approximations of the DCT-II or other transformations of the DCT / DST family are used. Different transformations can be used in the horizontal or vertical direction. The transformation is not limited to linear and separable transformations. Any other transformation (linear and non-separable, or non-linear) may be used. As a result of the signal transformation, a block of transformation coefficients representing the original block of residual samples in a different signal space is obtained. In special cases, the transformation can be made equal to an identity transformation (i.e., the block of transformation coefficients can be made equal to the block of residual samples). The block of transformation coefficients is encoded using a lossy coding. On the decoder side, the reconstructed block of transformation coefficients is inverse-transformed to obtain a reconstructed block of residual samples. Finally, by adding the predicted signal, a reconstructed block of image samples is obtained.

[0181] In particular, the following aspects, which are suitable for lossy coding of the block of transformation coefficients, are used in the embodiments described above: ● Dependent scalar quantization of the transformation coefficients: On the encoder side, the block of transformation coefficients is mapped to a block of transformation coefficient levels (i.e., quantization indices), which represent the transformation coefficients with reduced fidelity. On the decoder side, the quantization indices are mapped to reconstructed transformation coefficients (different from the original transformation coefficients for quantization). In contrast to conventional scalar quantization, the transformation coefficients are not quantized independently. Instead, the set of acceptable reconstructed levels for a particular transformation coefficient depends on the quantization indices selected for the other transformation coefficients. ● Entropy coding of the transformation coefficient levels (quantization indices): The transform coefficient levels representing the reconfigured transform coefficients (for dependent scalar quantization) are entropy encoded using binary arithmetic coding. In that context, the characteristics of dependent quantization are utilized to improve the efficiency of entropy coding.

[0182] Different embodiments and aspects have been described above. The description relates to various aspects such as flag / residual representation, distribution of flags and residuals to paths, context derivation, and limitations of context adaptively coded flags. These aspects, features, functions, and details described in different parts can optionally be introduced into the embodiments described herein, either individually or together. Also, the embodiments described herein can be used individually and can be supplemented by any of the features, functions, and details in other chapters. Note that the individual aspects described herein can be used individually or in combination. Thus, details can be added to each of the individual aspects without adding details to another one of the aspects. In particular, the embodiments are also described in the claims. The embodiments described in the claims can optionally be supplemented, individually and in combination, by any of the features, functions, and details as described herein. This disclosure describes features that can be used in a video encoder (a device for providing an encoded representation of an input video signal) and a video decoder (a device for providing a decoded representation of a video signal based on an encoded representation of the video signal), either explicitly or implicitly. Thus, any of the features described herein can be used in the context of a video encoder and in the context of a video decoder. Furthermore, the features and functions disclosed herein in connection with the method can also be used in an apparatus (configured to perform such functions). Additionally, the features and functions disclosed herein in connection with the apparatus can also be used in the corresponding method. In other words, the methods disclosed herein can be supplemented by any of the features and functions described with respect to the apparatus. Also, any of the features and functions described herein can be implemented in hardware or software, or a combination of hardware and software, as described in the "Implementation Options" paragraph.

[0183] Although some aspects have been described in the context of an apparatus, it is clear that these aspects also represent descriptions of the corresponding method, and that a block or device corresponds to a method step or the function of a method step. Similarly, aspects described in the context of a method step represent descriptions of the corresponding block, item, or function of the corresponding apparatus. Some or all of the method steps can be performed by (or with) a hardware device such as a microprocessor, a programmable computer, or an electronic circuit. In some embodiments, one or more of the most important method steps can be performed by such an apparatus.

[0184] Depending on specific implementation requirements, embodiments of the invention can be implemented in hardware or in software. The implementation can be carried out using a digital storage medium, such as a floppy disk, a DVD, a Blu-ray disk, a CD, a ROM, a PROM, an EPROM, an EEPROM, or a flash memory, which has electronically readable control signals stored thereon and which can cooperate (or be capable of cooperating) with a programmable computer system so that respective methods are executed. Thus, the digital storage medium can be made computer-readable.

[0185] Some embodiments according to the present invention comprise a data carrier having electronically readable control signals which can cooperate with a programmable computer system so that one of the methods described herein is executed.

[0186] Generally, embodiments of the present invention can be implemented as a computer program product with program code operable to execute one of the methods when the computer program product runs on a computer. The program code can be stored, for example, on a machine-readable carrier.

[0187] Other embodiments comprise a computer program stored on a machine-readable carrier, which executes one of the methods described herein.

[0188] In other words, an embodiment of the method of the present invention is, therefore, a computer program having program code that executes one of the methods described herein when the computer program runs on a computer.

[0189] A further embodiment of the method of the present invention is, therefore, a data carrier (or digital storage medium or computer-readable medium) having recorded thereon a computer program which executes one of the methods described herein. The data carrier, digital storage medium or recording medium is usually tangible and / or non-volatile.

[0190] A further embodiment of the method of the present invention is, therefore, a data stream or sequence of signals representing a computer program which executes one of the methods described herein. The data stream or sequence of signals can be configured to be transferred, for example, by a data communication connection, such as the Internet.

[0191] Further embodiments comprise processing means, such as a computer or a programmable logic device, configured or adapted to perform one of the methods described herein.

[0192] Further embodiments comprise a computer having installed thereon a computer program for performing one of the methods described herein.

[0193] Further embodiments according to the invention comprise an apparatus or system configured to transfer (e.g., electronically or optically) a computer program for performing one of the methods described herein to a receiver. The receiver can be, for example, a computer, a mobile device, a memory device, etc. The apparatus or system can comprise, for example, a file server for transferring the computer program to the receiver. In some embodiments, a programmable logic device (e.g., a field programmable gate array) can be used to perform some or all of the functions of the methods described herein. In some embodiments, the field programmable gate array can cooperate with a microprocessor to perform one of the methods described herein. In general, the methods are preferably performed by any hardware device.

[0194] The apparatus described herein may be implemented using a hardware device, or using a computer, or using a combination of a hardware device and a computer.

[0195] The apparatus described herein or any component of the apparatus described herein may be implemented at least partially in hardware and / or software.

[0196] The methods described herein may be performed using a hardware device, or using a computer, or using a combination of a hardware device and a computer.

[0197] Any component of the method described in this specification or of the apparatus described in this specification may be at least partially executed by hardware and / or software.

[0198] The embodiments described in this specification are merely illustrative of the principles of the present invention. Modifications and changes to the configurations and details described in this application will be understood to be obvious to those skilled in the art. Therefore, it is intended that the present invention be limited only by the scope of the impending claims and not by the specific details represented by the description and explanation of the embodiments in this application.

Claims

1. A method for decoding an image from a data stream, comprising: identifying the number of context encoding bins available for decoding a transform block representing a part of the image; a step between decoding paths of at least one position where each position corresponds to a transform coefficient in a sub-block of the transform block, starting from a start position and proceeding along a scan order that sequentially traverses the at least one position, the step comprising: decoding at least one context encoding flag at the current position within the sub-block; updating the number of available context encoding bins in response to decoding each of the at least one context encoding flag; after decoding all context encoding flags associated with the current position, comparing the updated number of available context encoding bins with a predefined value before proceeding to the next position following the current position in the scan order; ending the decoding path based on a comparison indicating that the updated number of available context encoding bins is less than the predefined value; including; after the step of ending the decoding path, for each position along the scan order from the next position to the final position within the sub-block during at least one additional decoding path: deriving a Rice parameter based on the sum of the absolute levels associated with at least one transform coefficient adjacent to the current transform coefficient at each position; decoding a Golomb-Rice code using the Rice parameter; deriving a parameter zPos based at least in part on the sum of the absolute levels; determining the absolute level associated with the current transform coefficient at each position based at least in part on the parameter zPos and the decoded value; A method comprising.

2. The local template identifies the at least one transform coefficient adjacent to the current transform coefficient, The method according to claim 1.

3. The step of deriving the parameter zPos comprises: determining a state variable; deriving the parameter zPos based on the sum of the absolute levels and the state variable; including The method according to claim 1.

4. further comprising the step of determining said value based on a comparison, wherein when said comparison indicates that said value is equal to zPos, the method includes the step of setting said absolute level associated with said conversion coefficient at each said position to zero, wherein when said comparison indicates that said value is greater than zPos, the method includes the step of setting said absolute level associated with said conversion coefficient at each said position to said value, wherein when said comparison indicates that said value is less than zPos, the method includes the step of setting said absolute level associated with said conversion coefficient at each said position to a value obtained by adding 1 to said value, The method according to claim 1.

5. A decoder for decoding an image from a data stream, wherein the decoder identifies the number of context coding bins available for decoding a transform block representing a part of the image, wherein each position is a decoding path of at least one position corresponding to a transform coefficient within a sub-block of the transform block, starting at a start position and proceeding along a scan order that sequentially traverses said at least one position, decodes at least one context coding flag at a current position within said sub-block, updates the number of said available context coding bins in response to decoding each of said at least one context coding flag, after decoding all the context coding flags associated with said current position, before proceeding to the next position immediately following said current position in said scan order, compares the updated number of said available context coding bins with a predefined value, ends said decoding path based on a comparison indicating that the updated number of said available context coding bins is less than the predefined value, after ending said decoding path, during at least one additional decoding path, for each position along said scan order from the next position to the final position within said sub-block, derives a Rice parameter based on the sum of the absolute levels associated with at least one transform coefficient adjacent to the current transform coefficient at each position, decodes a Golomb-Rice code using said Rice parameter, derives a parameter zPos based at least in part on said sum of said absolute levels, Determining the absolute level associated with the current conversion factor at each position, based at least in part on the parameter zPos and the decoded value configured as a decoder [

6. ] The local template identifies the at least one conversion factor adjacent to the current conversion factor The decoder according to claim 5 [

7. ] To derive the parameter zPos The decoder determines a state variable and is configured to derive the parameter zPos based on the sum of the absolute levels and the state variable The decoder according to claim 5 [

8. ] The decoder is configured to determine the value based on a comparison wherein when the comparison indicates that the value is equal to zPos, the decoder is configured to set the absolute level associated with the conversion factor at each position to 0 wherein when the comparison indicates that the value is greater than zPos, the decoder is configured to set the absolute level associated with the conversion factor at each position to the value wherein when the comparison indicates that the value is less than zPos, the decoder is configured to set the absolute level associated with the conversion factor at each position to the value plus 1 The decoder according to claim 5 [

9. ] at least one processor of an electronic device a process of identifying the number of context-encoded bins available for decoding a transform block representing a portion of an image at least one decoding path for a position corresponding to a transform coefficient within a sub-block of the transform block, the decoding path starting at a start position and proceeding along a scan order that sequentially traverses the at least one position a process of decoding at least one context-encoded flag at the current position within the sub-block a process of updating the number of available context-encoded bins in response to decoding each of the at least one context-encoded flag a process of comparing the updated number of available context-encoded bins with a predefined value after decoding all context-encoded flags associated with the current position and before proceeding to the next position immediately following the current position in the scan order ending the decoding path based on a comparison indicating that the number of the updated available context-encoded bins is less than the predefined value; after ending the decoding path, between at least one additional decoding path, for each position along the scan order from the next position to the final position within the sub-block, deriving a Rice parameter based on the sum of the absolute levels associated with at least one transform coefficient adjacent to the current transform coefficient at each position; decoding a Golomb-Rice code using the Rice parameter; deriving a parameter zPos based at least in part on the sum of the absolute levels; determining the absolute level associated with the current transform coefficient at each position based at least in part on the parameter zPos and the decoded values; including instructions for causing execution of; a non-transitory computer-readable recording medium. **Claim 10** The local template identifies the at least one transform coefficient adjacent to the current transform coefficient. The non-transitory computer-readable recording medium according to claim 9. **Claim 11** The instructions for causing the at least one processor to execute the process of deriving the parameter zPos include instructions for causing the at least one processor to determine a state variable; instructions for causing the at least one processor to derive the parameter zPos based on the sum of the absolute levels and the state variable; and are included in the non-transitory computer-readable recording medium according to claim 9. The non-transitory computer-readable recording medium according to claim 9. **Claim 12** The instructions cause the at least one processor to execute a process of determining the value based on a comparison, wherein when the comparison indicates that the value is equal to zPos, the instructions cause the at least one processor to execute a process of setting the absolute level associated with the transform coefficient at each position to zero; wherein when the comparison indicates that the value is greater than zPos, the instructions cause the at least one processor to execute a process of setting the absolute level associated with the transform coefficient at each position to the value. When the comparison indicates that the value is less than zPos, the instruction causes the at least one processor to perform a process of setting the absolute level associated with the conversion coefficient at each position to a value obtained by adding 1 to the value. The non-transitory computer-readable recording medium according to claim 9. Claims 13 A method for encoding an image, comprising: setting the number of available context encoding bins based on the size of a conversion block representing a part of the image; for each position corresponding to a conversion coefficient within a sub-block of the conversion block, a step between encoding paths that starts from a start position and proceeds along a scan order that sequentially traverses each position; encoding at least one context encoding flag at the current position within the sub-block; updating the number of available context encoding bins in response to encoding each of the at least one context encoding flag; after encoding all context encoding flags associated with the current position, comparing the updated number of available context encoding bins with a predefined value before proceeding to the next position immediately following the current position in the scan order; ending the encoding path when the comparison indicates that the updated number of available context encoding bins is less than the predefined value; after ending the encoding path, for each position from the next position in the scan order to the end position within the sub-block during at least one additional encoding path, deriving a Rice parameter based on the sum of the absolute levels associated with at least one conversion coefficient adjacent to the current conversion coefficient at each position; deriving a parameter zPos based at least in part on the sum of the absolute levels; comparing the parameter zPos with the absolute level associated with the current conversion coefficient at each position; setting a value associated with the current conversion coefficient at each position based on the result of the comparison; encoding the value with a Golomb-Rice code using the Rice parameter; A method comprising the above steps. Claims 14 The local template identifies the at least one conversion coefficient adjacent to the current conversion coefficient. The method according to claim 13.

15. The step of deriving the parameter zPos includes: determining a state variable; and deriving the parameter zPos based on the sum of the absolute levels and the state variable. including The method according to claim 13.

16. When the comparison indicates that the absolute level associated with the current conversion coefficient at each position is equal to 0, the method includes setting the value to the parameter zPos. When the comparison indicates that the absolute level associated with the current conversion coefficient at each position is greater than 0 and less than or equal to zPos, the method includes setting the value to a value obtained by subtracting 1 from the absolute level. When the comparison indicates that the absolute level associated with the current conversion coefficient at each position is greater than zPos, the method includes setting the value to the absolute level. The method according to claim 13.

17. An encoder for encoding an image, wherein the encoder sets the number of available context encoding bins based on the size of a transform block representing a part of the image; in an encoding path of at least one position where each position corresponds to a transform coefficient within a sub-block of the transform block, starting from a start position and proceeding along a scan order that sequentially traverses the at least one position, encodes at least one context encoding flag at the current position within the sub-block; in response to encoding each of the at least one context encoding flag, updates the number of available context encoding bins; after encoding all the context encoding flags associated with the current position, before proceeding to the next position immediately following the current position in the scan order, compares the updated number of available context encoding bins with a predefined value; when the comparison indicates that the updated number of available context encoding bins is less than the predefined value, ends the encoding path. After completing the encoding path, between at least one additional encoding path, for each position from the next position in the scan order to the end position within the sub-block, derive a Rice parameter based on the sum of the absolute levels associated with at least one transform coefficient adjacent to the current transform coefficient at each position, derive a parameter zPos based at least in part on the sum of the absolute levels, compare the parameter zPos with the absolute level associated with the current transform coefficient at each position, set a value associated with the current transform coefficient at each position based on the result of the comparison, wherein the value is configured to be encoded by a Golomb-Rice code using the Rice parameter, encoder. **Claim 18** The local template identifies the at least one transform coefficient adjacent to the current transform coefficient, The encoder according to claim 17. **Claim 19** To derive the parameter zPos, the encoder determines a state variable, is configured to derive the parameter zPos based on the sum of the absolute levels and the state variable, The encoder according to claim 17. **Claim 20** If the comparison indicates that the absolute level associated with the current transform coefficient at each position is equal to 0, the encoder is further configured to set the value to the parameter zPos, If the comparison indicates that the absolute level associated with the current transform coefficient at each position is greater than 0 and less than or equal to zPos, the encoder is further configured to set the value to a value obtained by subtracting 1 from the absolute level, If the comparison indicates that the absolute level associated with the current transform coefficient at each position is greater than zPos, the encoder is further configured to set the value to the absolute level, The encoder according to claim 17. **Claim 21** at least one processor of an electronic device, a process of setting the number of available context coding bins based on the size of a transform block representing a part of an image, An encoding path for at least one position where each position corresponds to a transform coefficient within a sub-block of the transform block, starting at a start position and proceeding along a scan order that sequentially traverses the at least one position, which is a process between encoding paths, a process of encoding at least one context encoding flag at the current position within the sub-block; a process of updating the number of available context encoding bins in response to encoding each of the at least one context encoding flag; a process of comparing the updated number of available context encoding bins with a predefined value before proceeding to the next position immediately following the current position in the scan order after encoding all context encoding flags associated with the current position; a process of ending the encoding path if the comparison indicates that the updated number of available context encoding bins is less than the predefined value; after ending the encoding path, between at least one additional encoding path, for each position from the next position in the scan order to the end position within the sub-block, a process of deriving a Rice parameter based on the sum of the absolute levels associated with at least one transform coefficient adjacent to the current transform coefficient at each position; a process of deriving a parameter zPos based at least in part on the sum of the absolute levels; a process of comparing the parameter zPos with the absolute level associated with the current transform coefficient at each position; a process of setting a value associated with the current transform coefficient at each position based on the result of the comparison; a process of encoding the value with a Golomb-Rice code using the Rice parameter; including instructions for causing execution of a non-transitory computer-readable recording medium.

22. The local template identifies the at least one transform coefficient adjacent to the current transform coefficient. The non-transitory computer-readable recording medium according to claim 21.

23. The instructions for causing the at least one processor to execute the process of deriving the parameter zPos cause the at least one processor to a process of determining a state variable; A process of deriving the parameter zPos based on the sum of the absolute levels and the state variable; including an instruction to cause execution of; The non-transitory computer-readable recording medium according to claim 21.

24. When the comparison indicates that the absolute level associated with the current conversion coefficient at each position is equal to 0, the instruction causes the at least one processor to execute a process of setting the value to the parameter zPos; When the comparison indicates that the absolute level associated with the current conversion coefficient at each position is greater than 0 and less than or equal to zPos, the instruction causes the at least one processor to execute a process of setting the value to a value obtained by subtracting 1 from the absolute level; When the comparison indicates that the absolute level associated with the current conversion coefficient at each position is greater than zPos, the instruction causes the at least one processor to execute a process of setting the value to the absolute level. The non-transitory computer-readable recording medium according to claim 21.

Citation Information

Patent Citations

  • Coding of Coefficient Levels in Video Coding

    JP2018529273A

  • Regularly coded bin reduction for coefficient decoding using thresholds and Rice parameters

    JP2022510145A