Integrated transform type notification and transform type dependent transform coefficient level coding

The method integrates transform type signaling and transform coefficient level coding techniques, enhancing compression efficiency by adapting the transform type and level coding to the selected transform type, thereby improving video coding standards.

JP7783323B2Active Publication Date: 2025-12-09FRAUNHOFER GESELLSCHAFT ZUR FORDERUNG DER ANGEWANDTEN FORSCHUNG EV
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
JP2024043735
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2019-03-12
Filing Date
2024-03-19
Publication Date
2025-12-09
Estimated Expiration
2039-12-30

AI Technical Summary

Technical Problem

Current video coding standards like VVC lack efficient methods for signaling transform types and level coding that are dependent on the selected transform type, leading to suboptimal compression efficiency.

Method used

The method integrates transform type signaling and transform coefficient level coding that adapts to the selected transform type, using a list of transforms including an identity transform and non-identity transforms, and employs context-adaptive entropy decoding and bypass decoding techniques to enhance the selection of the given transform block.

Benefits of technology

This approach enhances the selection of the transform type and level coding techniques, achieving significant improvements in compression efficiency and reducing the transform type dependent transform coefficient level coding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007783323000012
    Figure 0007783323000012
  • Figure 0007783323000013
    Figure 0007783323000013
  • Figure 0007783323000014
    Figure 0007783323000014
Patent Text Reader

Abstract

To provide a decoding unit capable of increasing compression efficiency by unifying the signaling of a selected transform type.SOLUTION: An apparatus 100 for decoding a picture 12a includes: means to select, for a predetermined transform block 84c, a selected transformation 112 by checking whether a size of the predetermined transform block exceeds a predetermined threshold size; means to use a default way 114 for selecting the selected transformation, if the size of the predetermined transform block exceeds the predetermined threshold size; and means to use a transformation which is pointed to out of a predetermined list 116 of transformations by an index transmitted in a data stream 14 for the predetermined transform block as the selected transformation, if the size of the predetermined transform block does not exceed the predetermined threshold size, the predetermined list of transformations including an identity transformation 117 and non-identity transformations 118.SELECTED DRAWING: Figure 4
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] Embodiments according to the present invention relate to integrated transform type signaling and transform type dependent transform coefficient level coding.

[0002] Introduction Hybrid video compression schemes such as AVC and HEVC rely on block-based prediction, followed by a transform of the prediction residual, quantization of the transform coefficients, and entropy coding of the quantization indices. The latter is also referred to as transform coefficient level coding, or level coding for short in the remainder of this document. In the following description, the term transform is also used for integer approximations of the transforms implemented in actual hybrid video compression schemes.

[0003] Traditionally, video coding standards specify a fixed transform for each potential NxN block size. For example, the HEVC standard specifies the use of DCT-II except for intra-picture predicted 4x4 blocks, where DST-VI is used. By allowing selection between multiple per-definition transform types, higher compression efficiency can be achieved. The current draft of Versatile Video Coding (VVC) specifies a set of five different transform types (including DCT-II). A total of six transform types are supported, along with a transform skip mode (TSM) in which the transform is equal to the identity transform. The bitstream syntax includes syntax that allows the decoder to be informed of the transform type selected by the encoder. Coding is at the transform coefficient level, independent of the selected transform type.

[0004] The present invention describes a method for increasing compression efficiency by a) consolidating notification of the selected transform type and b) providing dedicated level coding techniques depending on the selected transform type. [Background technology]

[0005] Current state-of-the-art video coding techniques, including VVC development, specify means to signal one of several predefined transform types, including the possibility to skip the transform via TSM (i.e., using the identity transform). The entropy coding of the transform coefficient levels (i.e., the quantization indices of the transform coefficients) is independent of the selected transform. Conversion Type Notification

[0006] Current VVC development specifies N × M transform blocks, with N ≦ 64 and M ≦ 64, where N and M are both integer powers of two. Note that, in contrast to HEVC, rectangular (non-square) transform blocks are possible. For N ≦ 32 and M ≦ 32, additional transform types other than DCT-II are available; this technique is called Multiple Transform Selection (MTS). Similar to HEVC, for 4 × 4 transform blocks, transform skip mode (TSM) is an additional coding option that can be interpreted as using an identity transform. In transform skip mode (TSM), the prediction residual is processed directly by the quantization stage, skipping the transform stage. The HEVC Range Extension Profile specifies an extension for TSM that enables the use of TSM for all transform block sizes (i.e., not just 4 × 4 blocks).

[0007] A high-level syntax element (encoded in the sequence parameter set) indicates whether MTS is enabled for intra-predicted blocks and / or inter-predicted blocks. When MTS is available, a coding unit (CU)-level flag signals whether MTS is enabled for the CU, while the selected transform type is specified by a transform unit (TU)-level index. In the current design of VVC, the use of MTS is limited to luma transform blocks only. For the CU MTS flag, the context model used depends on the coding quadtree depth. A fixed binarization is used for the TU MTS index, i.e., the selected transform type. The four possible transform types, resulting in a two-bin fixed-length code with each bin index, employ two dedicated context models: one for intra-predicted CUs and one for inter-predicted CUs. The mapping between the TU MTS index, its binarization, and different transform types for the horizontal and vertical transform directions is shown in the table below (Table 1).

[0008] [Table 1]

[0009] In the case of TSM, a high-level flag (encoded in the picture parameter set) indicates whether TSM is enabled or not. When TSM is enabled and MST is disabled, one flag per transform block signals that the transform stage is skipped for the block of the corresponding color component (Y, Cb, or Cr). Level Coding

[0010] Level coding in HEVC and current VVC developments is independent of the selected transform type. In VVC (Draft 3), level coding is similar to that of HEVC. First, the bitstream includes a flag signaling the importance of the transform block (Coded Block Flag, CBF), i.e., the presence of quantization indices (levels) not equal to 0. Second, if a block is important (i.e., it contains any quantization indices not equal to 0), the last important scan position is specified as an offset from the root in x and y coordinates, with the root located at the upper-left corner of the transform block. As shown in Figure 25, a transform block 84 larger than 4x4 is divided into discontinuous 4x4 sub-blocks 84'. In the current VVC design, a diagonal scan pattern 85 is used to scan sub-blocks 84' and levels within sub-blocks 84'.

[0011] FIG. 25 shows an example of a transform block 84 divided into sixteen 4×4 sub-blocks 84′ and an inverse diagonal scan pattern 85 used to scan the levels within the sub-blocks 84′ and the sub-blocks 84′ within the transform block 84.

[0012] The scanning of the transform block is first performed in a sub-block manner. In particular, the sub-block containing the last significant scanning position is processed first, and each sub-block is treated like a normal 4x4 block. For each sub-block following the sub-block of the last significant scanning position, a CBF is transmitted (coded_sub_block_flag). This sub-block CBF signals the importance of the corresponding sub-block, except for the sub-block containing the DC frequency position (top left in the transform block). Therefore, the level at the frequency position covered by the top left sub-block is always coded.

[0013] The coding of levels within each sub-block is as follows: In the first scan pass, an importance flag (sig_coeff_flag) indicating whether the current absolute level is greater than 0 is coded, followed by information greater than 1 (abs_level_gt1_flag) and parity information (par_level_flag). Three syntax elements are coded for each scan position covered by the current sub-block forming the first scan pass: If the absolute level is equal to 0, sig_coeff_flag is coded equal to 0, and subsequent syntax is not coded but instead inferred to be equal to 0. Similarly, when the absolute level is equal to 1, sig_coeff_flag is coded equal to 1, abs_level_gt1_flag is coded equal to 0, and subsequent syntax is not coded but instead inferred to be equal to 0. The absolute level at scan position n after the first pass is calculated as follows:

[0014] AbsLevelPass1(n)=sig_coeff_flag(n)+par_level_flag(n)+abs_level_gt1_flag(n)

[0015] In the next scan pass, a flag greater than 3 (abs_level_gt3_flag) is sent, followed by a third scan pass with the remainder information (abs_remainder). The absolute level at scan position n is calculated as follows: AbsLevel(n)=AbsLevelPass1(n)+2*(abs_level_gt3_flag(n)+abs_remainder(n)) The final scan pass transmits the sign (coeff_sign_flag) for the critical scan position, and the level at scan position n is calculated as follows: Level(n)=(2*AbsLevel(n)+(QState>1 ? 1:0))*(1-2 * coeff_sign_flag(n))

[0016] where QState is the current quantization state QState for dependent quantization, which depends on the parity of the previous state and the previously coded level as follows: QState=QStateTransTable(QState)(par_level_flag)

[0017] Dependent quantization is added during VVC development using a state transition table QStateTransTable() as shown in Table 2, where QState is reset to 0 at the start of each transform block. If dependent quantization is disabled by a high-level flag, for example at the slice or tile header level, QState is always equal to 0 (which can be achieved by using a state transition table with all entries equal to 0).

[0018] [Table 2]

[0019] Current VVC developments include a limit on the number of bins coded using a context model, denoted as context-coded bins (CCBs) in the following text. If all absolute levels of all sub-blocks in a transform block are ≧4, then the number of CCBs per level is equal to 4, since each bin associated with the four flags sig_coeff_flag, abs_level_gt1_flag, par_level_flag, and abs_level_gt3_flag uses a context (i.e., an adaptive probability model). To limit the worst-case complexity of entropy decoding, e.g., from 4 to 2 CCBs per level, the number of CCBs is tracked in the first scan pass (sig_coeff_flag, abs_level_gt1_flag, par_level_flag). For example, this can be done by counting down the remaining bins for the first pass from 28 (remBinsPass1) when abs_level_gt3_flag is analyzed, leaving four bins for the second pass (remBinsPass2). When a certain number of CCBs is reached, the level coding process skips the following CCB information (e.g., sig_coeff_flag, abs_level_gt1_flag, and par_level_flag when remBinsPass1 is equal to 0, and abs_level_gt3_flag when remBinsPass2 is equal to 0) and instead codes the absolute levels in the bypass mode of the arithmetic coding engine, resulting in an adaptive binarization scheme. When the maximum number of CCBs is reached and there are still scan positions with levels to code, all remaining absolute levels are coded in bypass mode using a different residual binarization (dec_abs_level).

[0020] Table 3 shows the syntax table for the aforementioned cutting-edge level coding with the restriction of CCB using remBinsPass1 and remBinsPass2.

[0021] [Table 3] [Table 4] [Table 5]

[0022] For context model selection of the sig_coeff_flag, abs_level_gt1_flag, par_level_flag, and abs_level_gt3_flag constructs, a local template evaluates the activity around the current scan position n. Five already processed neighbors are considered: right (NB0), bottom (NB1), right plus 1 (NB2), bottom plus 1 (NB3), and bottom right (NB4). [Table 6]

[0023] For the current scan position n at (xC, yC), where xC and yC are the horizontal and vertical offsets relative to the top-left corner of the current transform block, three values ​​are used: the current diagonal within the transform block d, the number of significant neighbors locNumSig, and the sum of absolute values ​​after the first pass locSumAbsPass1. Note that the latter may contain only partial information, since the entire absolute level information is only known after the remainder information scan pass. The value can be calculated as follows: [Table 7]

[0024] The context model for the sig_coeff_flag, abs_level_gt1_flag, par_level_flag, and abs_level_gt3_flag constructs is selected by an index or offset into a context set derived from the diagonal d and derived from the quantization state QState in addition to sig_coeff_flag. For the sig_coeff_flag construct, the context offset within the context set is derived by the absolute sum locSumAbsPass1. The context offset derivation for abs_level_gt1_flag, par_level_flag, and abs_level_gt3_flag is the same: the absolute sum locSumAbsPass1 minus the number of critical positions locNumSig. As a special feature, a dedicated context model is used for the syntax element of the last critical scan position.

[0025] The remainder is coded in the bypass mode of the entropy coder using a combination of Golomb-Rice (Rm) and Exponential-Golomb (EGk) codes. Based on the already coded remainder values ​​in the subblock (similar to HEVC), the Rice degree m and the EG code degree k are derived.

[0026] Due to the limited number of CCBs, there are two additional remainder scan passes. In the first additional scan pass after the regular remainder scan pass, the remainders of scan positions with only the sig_coeff_flag, abs_level_gt1_flag, and par_level_flag syntax elements are transmitted; i.e., the abs_level_gt3_flag syntax is skipped for these positions. In the second additional scan pass, the remainders of scan positions without syntax elements are coded. Note that the scan pass also means that absolute levels are coded in a completely bypass mode. For this last remainder pass, the binarization parameters m and k are derived using another local template with the same shape as the one used for the sig_coeff_flag syntax. The absolute sum within the template is obtained and mapped to the Rice parameter n, which leads directly to the ordering of the EG code with the relationship k = m + 1. Summary of the Invention

[0027] An embodiment of the present invention is an apparatus for decoding a picture using predictive coding and block-based transform residual coding, configured to partition the picture into transform blocks of different sizes. The apparatus is configured to select a selected transform for a given transform block by checking whether the size of the given transform block exceeds a predetermined threshold size. If the size of the given transform block exceeds the predetermined threshold size, the apparatus is configured to use a default method for selecting the selected transform. If the size of the given transform block does not exceed the predetermined threshold size, the apparatus is configured to use as the selected transform a transform pointed to by an index transmitted in the data stream for the given transform block from a predetermined list of transforms, the predetermined list of transforms comprising an identity transform and a non-identity transform. Furthermore, the apparatus is configured to decode a block of coefficients from the data stream for the given transform block, and if the selected transform is an identity transform, use the block of coefficients as a residual sample array for the given transform block, and if the selected transform is not the identity transform, apply the block of coefficients to an inverse transform corresponding to the selected transform to obtain a residual sample array for the given transform block. Furthermore, the apparatus is configured to use the residual sample array to modify a prediction of a given transform block and reconstruct the given transform block (which may be a spatial or temporal prediction, which is not valid for all subsequent occurrences).

[0028] An embodiment of the present invention is an apparatus for decoding a picture using predictive coding and block-based transform residual coding, the apparatus being configured to: for a given transform block, select a selected transform by decoding an index from a data stream for the given transform block and using as the selected transform one transform of a predetermined list of transforms to which the index points; further configured to: for the given transform block, decode a block of coefficients from the data stream, derive a residual sample array for the given transform block from the block of coefficients such that the block of coefficients is associated with the residual sample array according to the selected transform; and modify a prediction of the given transform block using the residual sample array to reconstruct the given transform block. Furthermore, the device is configured to, for a given transform block, in decoding a block of coefficients from the data stream, depending on whether a selected transform of the given block is included in a predetermined set of one or more transforms, decode from the data stream a coded block flag indicating whether the block of coefficients has at least one non-zero coefficient if the selected transform of the given block is included in the predetermined set of one or more transforms, and infer that the block of coefficients has at least one non-zero coefficient if the selected transform of the given block is not included in the predetermined set of one or more transforms (in other words, subsequently, not decode a CBF from the data stream if the selected transform of the given block is included in the predetermined set of one or more transforms, or in further other words, decode a syntax element different from the current part of the data stream from which the CBF is decoded).

[0029] An embodiment of the present invention is an apparatus for decoding a picture using predictive coding and block-based transform residual coding, the apparatus being configured to decode a block of coefficients from a data stream, including decoding a coded block flag from the data stream indicating whether, for a given transform block, the block of coefficients has at least one non-zero coefficient. If the coded block flag indicates that the block of coefficients has at least one non-zero coefficient, the apparatus is configured to: select, for the given transform block, a selected transform by decoding an index from the data stream for the given transform block, use as the selected transform one transform from a predetermined list of transforms pointed to by the index, derive a residual sample array for the given transform block from the block of coefficients such that the block of coefficients is associated with the residual sample array according to the selected transform, and modify a prediction of the given transform block using the residual sample array to reconstruct the given transform block. If the coded block flag indicates that the block of coefficients does not have at least one non-zero coefficient, the device is configured to reconstruct the given transform block without prediction correction (in other words, if the coded block flag indicates that the block of coefficients does not have at least one non-zero coefficient, then not decode the index from the data stream, such as by decoding a syntax element that differs from the index from the current portion of the data stream from which the index is decoded).

[0030] An embodiment of the present invention is an apparatus for decoding pictures using predictive coding and block-based transform residual coding, configured to populate or populate and sort a predetermined list of transforms according to a data stream. The apparatus is configured to select a selected transform for a given transform block by decoding an index from the data stream using a variable length code, such that each transform in the predetermined list of transforms is assigned a codeword of a variable length code, and the codeword length of the codeword of the variable length code monotonically increases with the rank of the transform in the predetermined list of transforms to which the codeword is assigned. Furthermore, the apparatus is configured to decode a block of coefficients from the data stream for the given transform block, derive a residual sample array for the given transform block from the block of coefficients, such that the block of coefficients is associated with the residual sample array according to the selected transform, and use the residual sample array to modify a prediction of the given transform block to reconstruct the given transform block.

[0031] An embodiment of the present invention is an apparatus for decoding pictures using predictive coding and block-based transform residual coding, configured to select, for a given transform block, a selected transform by decoding an index into a predetermined list of transforms from the data stream using a composite variable-length codeword consisting of a first codeword of the variable-length code and, if the first codeword is the longest codeword of the variable-length code, a second codeword of the fixed-length code that follows the first codeword. A codeword of the composite variable-length code consisting of only one of two non-longest codewords of the variable-length code is assigned to an identity transform and a predetermined non-identity transform included in the predetermined list of transforms to identify the identity transform and the predetermined non-identity transform, and further codewords of the composite variable-length code are assigned to further non-identity transforms of the predetermined list of transforms to identify the further non-identity transform. The apparatus is configured to select, for the given transform block, the selected transform by using one transform from the predetermined list of transforms pointed to by the index as the selected transform. Furthermore, the apparatus is configured to, for a given transform block, decode a block of coefficients from the data stream, derive a residual sample array for the given transform block from the block of coefficients such that the block of coefficients is associated with the residual sample array according to the selected transform, modify a prediction of the given transform block using the residual sample array, and reconstruct the given transform block.

[0032] An embodiment of the present invention is an apparatus for decoding a picture using predictive coding and block-based transform residual coding, configured to select, for a given transform block, a selected transform from a predetermined list of transforms, the selected transform comprising an identity transform and at least one non-identity transform, and configured to decode a block of coefficients from a data stream by checking whether, for the given transform block, the selected transform is a non-identity transform. If the selected transform is a non-identity transform, the device is configured to decode position information from the data stream for the first encountered non-zero coefficient along a scan order traversing all coefficients of the block of coefficients or the last encountered non-zero coefficient along a scan order traversing all coefficients of the block of coefficients to obtain a predetermined coefficient position for a given transform block (note below that in the above embodiments this position is referred to as the last position measured along a scan order from the top left to the bottom right, but the actual scanning that started coding started there according to these embodiments. That is, the actual coding was done in the reverse scan order from the bottom right to the top left corner, where the scan order is the coding order), decode a first coefficient of a block of coefficients from the data stream that includes all non-zero coefficients of the block of coefficients and is traversed by the scan order starting from or up to the predetermined coefficient position, and infer a second coefficient of the block of coefficients that is different from the first coefficient to be zero. If the selected transform is an identity transform, the device is configured to decode a block of coefficients from the data stream by decoding all coefficients of the block of coefficients from the data stream for a given transform block. Furthermore, the apparatus is configured to derive a residual sample array for a given transform block from the block of coefficients such that the block of coefficients is associated with the residual sample array according to a selected transform, and to modify a prediction of the given transform block using the residual sample array to reconstruct the given transform block.

[0033] An embodiment of the present invention is an apparatus for decoding pictures using predictive coding and block-based transform residual coding, configured to select, for a given transform block, a selected transform from a predetermined list of transforms, the selected transform comprising an identity transform and at least one non-identity transform. The apparatus is configured to decode the block of coefficients from the data stream by, for the given transform block, decoding coefficients of the block of coefficients from the data stream in sub-blocks into which the block of coefficients is divided, inferring that coefficients in the sub-blocks for which a sub-block flag in the data stream is zero are zero, and decoding coefficients in the sub-blocks for which a sub-block flag in the data stream is non-zero. If the selected transform is one of the at least one non-identity transform, the apparatus is configured to decode the block of coefficients from the data stream by sequentially decoding sub-block flags from the data stream, except for at least one of the first and last sub-block flags, for the given transform block, and inferring that at least one of the first and last sub-block flags is non-zero. If the selected transform is an identity transform, the apparatus is configured to decode a block of coefficients from the data stream by decoding sub-block flags from the data stream of all sub-blocks for the given transform block, derive a residual sample array for the given transform block from the block of coefficients, such that the block of coefficients is associated with the residual sample array according to the selected transform, and modify a prediction of the given transform block using the residual sample array to reconstruct the given transform block.

[0034] An embodiment of the present invention is an apparatus for decoding pictures using predictive coding and block-based transform residual coding, configured to select, for a given transform block, a selected transform from a predetermined list of transforms, the selected transform comprising an identity transform and at least one non-identity transform. The apparatus is configured to, for the given transform block, decode a block of coefficients from a data stream in sub-blocks into which the block of coefficients is divided, infer that coefficients in the sub-blocks for which a sub-block flag in the data stream is zero are zero, decode coefficients in the sub-blocks for which a sub-block flag in the data stream is non-zero, and decode the block of coefficients from the data stream by context-adaptive entropy decoding and using the context. The context depends on the logical sum of sub-block flags associated with sub-blocks adjacent to the currently decoded sub-block flag if the selected transform is one of the at least one non-identity transform, and the context depends on the arithmetic sum of sub-block flags associated with sub-blocks adjacent to the currently decoded sub-block flag if the selected transform is the identity transform. Furthermore, the apparatus is configured to derive a residual sample array for a given transform block from the block of coefficients such that the block of coefficients is associated with the residual sample array according to a selected transform, and to modify a prediction of the given transform block using the residual sample array to reconstruct the given transform block.

[0035] An embodiment of the present invention is an apparatus for decoding a picture using predictive coding and block-based transform residual coding, configured to select, for a given transform block, a selected transform from a predetermined list of transforms, the selected transform comprising an identity transform and at least one non-identity transform. The apparatus is configured to decode, for the given transform block, a block of coefficients from a data stream by decoding, for a current coefficient, a significance flag indicating whether the current coefficient is zero using a context. The context depends on the number of non-zero coefficients from a first set of coefficients immediately adjacent to the current coefficient if the selected transform is the identity transform, and on the number of non-zero coefficients from a second set of coefficients including the first set of coefficients, coefficients located further from the current coefficient than the first set of coefficients, the value of the second set of coefficients, and the position of the current coefficient if the selected transform is one of at least one non-identity transform. Furthermore, the apparatus is configured to derive a residual sample array for the given transform block from the block of coefficients, such that the block of coefficients is associated with the residual sample array according to the selected transform, and to modify the prediction of the given transform block using the residual sample array to reconstruct the given transform block.

[0036] An embodiment of the present invention is an apparatus for decoding a picture using predictive coding and block-based transform residual coding, configured to select, for a given transform block, a selected transform from a predetermined list of transforms, the selected transform comprising an identity transform and at least one non-identity transform. The apparatus is configured to decode, for the given transform block, a block of coefficients from a data stream by decoding the given coefficients by context-adaptive entropy decoding N greater-than-X flags indicating whether the absolute value of the given coefficient is greater than X and decoding, using a variable length code, a remainder indicating the amount by which the absolute value of the given coefficient exceeds an absolute threshold that depends on N, where N is greater when the selected transform is the identity transform compared to when the selected transform is one of the at least one non-identity transform. Furthermore, the apparatus is configured to derive a residual sample array for the given transform block from the block of coefficients, such that the block of coefficients is associated with the residual sample array according to the selected transform, and to modify a prediction of the given transform block using the residual sample array to reconstruct the given transform block.

[0037] An embodiment of the present invention is an apparatus for decoding pictures using predictive coding and block-based transform residual coding, configured to select, for a given transform block, a selected transform from a predetermined list of transforms, the selected transform comprising an identity transform and at least one non-identity transform. The apparatus is configured to decode, for the given transform block, a block of coefficients from the data stream by decoding signs of the given coefficients by context-adaptive entropy decoding using a predetermined context (e.g., selecting a context according to signs of coefficients of a block of coefficients neighboring the given coefficient) and updating probabilities associated with the predetermined context if the selected transform is the identity transform. The apparatus is configured to decode, for the given transform block, a block of coefficients from the data stream by decoding signs of the given coefficients by bypass decoding (e.g., context-adaptive entropy decoding with fixed equal probabilities) if the selected transform is one of the at least one non-identity transform. Furthermore, the apparatus is configured to derive a residual sample array for a given transform block from the block of coefficients such that the block of coefficients is associated with the residual sample array according to a selected transform, and to modify a prediction of the given transform block using the residual sample array to reconstruct the given transform block.

[0038] An embodiment of the present invention is an apparatus for decoding pictures using predictive coding and block-based transform residual coding, configured to select, for a given transform block, a selected transform from a predetermined list of transforms, the selected transform comprising an identity transform and at least one non-identity transform. The apparatus is configured to decode a block of coefficients from a data stream for a given transform block by context-adaptive entropy decoding N greater-than-X flags indicating whether the absolute value of the given coefficient is greater than X and decoding, using a variable length code, a remainder indicating the amount by which the absolute value of the given coefficient exceeds an absolute threshold that depends on N. If the selected transform is one of the at least one non-identity transform, the apparatus is configured to perform context-adaptive entropy decoding of the N greater-than-X flags in a series of passes by context-adaptive entropy decoding the N greater-than-X flags in sequence, increasing X by one or more of the N greater-than-X flags for each pass, recording the number of flags coded using context-adaptive entropy decoding during the series of passes, and stopping context-adaptive entropy decoding of the N greater-than-X flags if the number exceeds a predetermined flag threshold. If the selected transform is an identity transform, the apparatus is configured to sequentially perform context-adaptive entropy decoding of the N greater-than-X flags, and after decoding an importance flag (X=0) among the N greater-than-X flags, decode a greater-than-X flag-bypass flag indicating whether a given coefficient is greater than the absolute threshold before N further greater-than-X flags among the N greater-than-X flags, and stop the context-adaptive entropy decoding of the N greater-than-X flags in the case of a greater-than-X flag-bypass flag indicating that the given coefficient is greater than the absolute threshold (e.g., in the case of a greater-than-X flag indicating that the given coefficient is not greater than the absolute threshold, resume the context-adaptive entropy decoding of the N greater-than-X flags for the further greater-than-X flags except for the last one of the N greater-than-X flags).Furthermore, the apparatus is configured to derive a residual sample array for a given transform block from the block of coefficients such that the block of coefficients is associated with the residual sample array according to a selected transform, and to modify a prediction of the given transform block using the residual sample array to reconstruct the given transform block.

[0039] An embodiment of the present invention is an apparatus for decoding pictures using predictive coding and block-based transform residual coding, configured to select, for a given transform block, a selected transform from a predetermined list of transforms, the selected transform comprising an identity transform and at least one non-identity transform. The apparatus is configured to decode, for a given transform block, a block of coefficients from a data stream in a series of passes that traverses the coefficients of the block of coefficients in a predetermined scan order for the given coefficient by context-adaptive entropy decoding N greater-than-X flags indicating whether the absolute value of the given coefficient is greater than X, decoding a remainder indicating the amount by which the absolute value of the given coefficient exceeds an absolute threshold that depends on N using a variable length code, and decoding the sign of the given coefficient. The apparatus is configured to distribute the decoding of the N greater-than-X flags, remainder, and sign differently across the series of passes depending on whether the selected transform is the identity transform or one of the at least one non-identity transform. Furthermore, the apparatus is configured to derive a residual sample array for a given transform block from the block of coefficients such that the block of coefficients is associated with the residual sample array according to a selected transform, and to modify a prediction of the given transform block using the residual sample array to reconstruct the given transform block.

[0040] An embodiment of the present invention is an apparatus for decoding pictures using predictive coding and block-based transform residual coding, configured to select, for a given transform block, a selected transform from a predetermined list of transforms, the selected transform comprising an identity transform and at least one non-identity transform. For the given transform block, the apparatus decodes one or more predetermined flags (e.g., parity flags and / or greater-than-X flags, sig flags) for each coefficient from a data stream using context-adaptive binary entropy decoding in a series of passes traversing the coefficients of the block, where each predetermined flag indicates where the absolute value of the respective coefficient is located (e.g., the absolute value domain starts at the beginning of one or more passes, e.g., for an X-bit representation, coefficients 0...2). X-1The apparatus is configured to decode a block of coefficients from the data stream by reducing the absolute value domain of each coefficient (starting from a common absolute value domain of ∇ ... Furthermore, the apparatus is configured to derive a residual sample array for a given transform block from the block of coefficients such that the block of coefficients is associated with the residual sample array according to a selected transform, modify a prediction of the given transform block using the residual sample array, and reconstruct the given transform block. The apparatus is configured to stop decoding one or more given flags in successive passes as soon as a predetermined number of given flags is reached (i.e., the total number of given flags decoded so far for all coefficients reaches a limit) such that a cardinality of an absolute value domain to which the pointer points is smaller for a first set of non-zero coefficients compared to a second set of non-zero coefficients (i.e., smaller for coefficients before the limit is reached in the last pass compared to coefficients after the limit is reached), and the apparatus is configured to use different variable length codes for the codewords of the variable length codes of the first and second sets of non-zero coefficients when decoding the one or more given flags in successive passes.

[0041] An embodiment of the present invention is an apparatus for decoding pictures using predictive coding and block-based transform residual coding, configured to select, for a given transform block, a selected transform from a predetermined list of transforms, the selected transform comprising an identity transform and at least one non-identity transform. If the selected transform is a non-identity transform, the apparatus is configured to decode, for the given transform block, a block of coefficients from the data stream by decoding coefficients of the block of coefficients from the data stream along a first scan order (possibly following this order several times in several passes) toward the DC coefficient of the non-identity transform (e.g., starting from the highest frequency coefficient thereafter, possibly from the "last" significant coefficient position). If the selected transform is the identity transform, the apparatus is configured to decode, for the given transform block, a block of coefficients from the data stream by decoding coefficients of the block of coefficients from the data stream along a second scan order from the upper-left sample position to the lower-right sample position. Furthermore, the apparatus is configured to derive a residual sample array for a given transform block from the block of coefficients such that the block of coefficients is associated with the residual sample array according to the selected transform (this step may include, in the case of an identity transform, adding to each coefficient the coefficients present in the block on a given side, such as the left side in the case of horizontal DPCM or above the respective coefficient in the case of vertical DPCM, so as to perform DPCM inversion), and to modify the prediction of the given transform block using the residual sample array to reconstruct the given transform block.

[0042] An embodiment of the present invention is an apparatus for decoding pictures using predictive coding and block-based transform residual coding, the apparatus being configured to select, for a given transform block, a selected transform from a predetermined list of transforms, the selected transform comprising an identity transform and at least one non-identity transform. If, for the given transform block, the selected transform is one of the at least one non-identity transform, the apparatus is configured to: decode a syntax element from the data stream and derive therefrom whether the signs of non-zero coefficients in a predetermined group of non-zero coefficients are equal to or unequal to each other, and if so, derive the signs of the non-zero coefficients in the predetermined group of non-zero coefficients; and if the signs of the non-zero coefficients in the predetermined group of non-zero coefficients are unequal to each other, decode the signs of the non-zero coefficients in the predetermined group of non-zero coefficients by decoding sign bits on a non-zero coefficient basis. The apparatus is configured to decode a block of coefficients from the data stream by decoding signs of non-zero coefficients in a predetermined group of non-zero coefficients by decoding a sign bit for each non-zero coefficient base regardless of whether the signs of the non-zero coefficients in the predetermined group of non-zero coefficients are equal to one another if the selected transform is an identity transform for the given transform block. Furthermore, the apparatus is configured to derive a residual sample array for the given transform block from the block of coefficients such that the block of coefficients is associated with the residual sample array according to the selected transform, and to modify a prediction of the given transform block using the residual sample array to reconstruct the given transform block.

[0043] An embodiment of the present invention is an apparatus for decoding pictures using predictive coding and block-based transform residual coding, configured to select, for a given transform block, a selected transform from a predetermined list of transforms, the selected transform comprising an identity transform and at least one non-identity transform. The apparatus is configured to decode, for the given transform block, a block of coefficients from the data stream by decoding signs of non-zero coefficients of the given block of coefficients, deriving a code probability tendency index from the data stream, and, if the selected transform is the identity transform, entropy decoding the signs of the given non-zero coefficients (e.g., those first in decoding order or within a particular sub-block of the coefficient block to which the index applies) using a context model (e.g., a context model defining a particular code probability, such as a probability of being positive) associated with the code probability tendency index. Furthermore, if the selected transform is one of the at least one non-identity transform, the apparatus is configured to decode, for the given transform block, a block of coefficients from the data stream by bypass decoding (e.g., context-adaptive entropy decoding with fixed equal probability) the signs of the given non-zero coefficients of the given block of coefficients. Furthermore, the apparatus is configured to derive a residual sample array for a given transform block from the block of coefficients such that the block of coefficients is associated with the residual sample array according to a selected transform, and to modify a prediction of the given transform block using the residual sample array to reconstruct the given transform block.

[0044] An embodiment of the present invention is an apparatus for decoding pictures using predictive coding and block-based transform residual coding, configured to select, for a given transform block, a selected transform from a predetermined list of transforms, the selected transform comprising an identity transform and at least one non-identity transform. The apparatus is configured to decode, for the given transform block, a coefficient block from a data stream by decoding signs of predetermined non-zero coefficients using a predetermined context model from among a plurality of context models, and, if the selected transform is the identity transform, by decoding signs of non-zero coefficients of the given coefficient block by selecting a predetermined context model from among the plurality of context models according to statistics of signs of previously decoded coefficients. Furthermore, if the selected transform is one of the at least one non-identity transform, the apparatus is configured to decode, for the given transform block, a coefficient block from a data stream by decoding signs of non-zero coefficients of the given block of coefficients by bypass decoding (e.g., context-adaptive entropy decoding with fixed equal probability) the signs of the predetermined non-zero coefficients. Furthermore, the apparatus is configured to derive a residual sample array for a given transform block from the block of coefficients such that the block of coefficients is associated with the residual sample array according to a selected transform, and to modify a prediction of the given transform block using the residual sample array to reconstruct the given transform block.

[0045] An embodiment of the present invention is an apparatus for decoding pictures using predictive coding and block-based transform residual coding, configured to select, for a given transform block, a selected transform from a predetermined list of transforms, the selected transform comprising an identity transform and at least one non-identity transform. For the given transform block, the apparatus decodes one or more predetermined flags (e.g., parity flags and / or greater-than-X flags, sig flags) for each coefficient from a data stream using context-adaptive binary entropy decoding in a series of passes traversing the coefficients of the block, where each predetermined flag indicates where the absolute value of the respective coefficient is located (e.g., the absolute value domain starts at the beginning of one or more passes, e.g., for an X-bit representation, coefficients 0...2). X-1The decoder is configured to decode a block of coefficients from a data stream by reducing the magnitude domain of each coefficient (starting from a common magnitude domain of ). (e.g., the parity bits reduce the magnitude domain by half by excluding all even or non-even magnitude values, and the greater-than-X flag reduces the domain of possible magnitude values ​​by excluding one of the possible magnitude values, or by keeping only this one and excluding all others). Further, the apparatus is configured to decode, for a given transform block, a block of coefficients from the data stream by, in a series of passes traversing the coefficients of the block, decoding, for each coefficient whose cardinality in the magnitude domain is not reduced to one by one or more predetermined flags decoded for the respective coefficient, a codeword (e.g., a Rice / Exp-Golomb code) of a variable length code to identify the absolute value of the respective coefficient in the magnitude domain of the respective coefficient (e.g., the code length of the variable length code may monotonically increase as the absolute value increases, where the codeword is free to refer only to the reduced magnitude domain, or a general one or some other one that is necessarily a proper superset of the reduced magnitude domain). Furthermore, the apparatus is configured to derive a residual sample array for the given transform block from the block of coefficients, such that the block of coefficients is associated with the residual sample array according to a selected transform, and to modify a prediction of the given transform block using the residual sample array to reconstruct the given transform block.The apparatus is configured to, in decoding one or more predetermined flags in a series of passes, stop decoding one or more predetermined flags as soon as a predetermined number of predetermined flags is reached (i.e., the total number of predetermined flags decoded so far for all coefficients reaches a limit), such that, except for an importance flag among the one or more predetermined flags indicating whether a decoded coefficient is zero or not (and therefore necessarily decoded using context-adaptive binary entropy decoding), the cardinality in the absolute value domain is smaller for a first set of non-zero coefficients compared to a second set of non-zero coefficients (i.e., the cardinality of coefficients before the limit is reached in the last pass is smaller compared to the cardinality of coefficients after the limit is reached), the predetermined number corresponding to an upper limit minus the number of coefficients whose importance flags have not yet been decoded.

[0046] According to an embodiment, an apparatus for encoding a picture using predictive coding and block-based transform residual coding is configured to divide the picture into transform blocks of different sizes. Furthermore, the apparatus is configured to select, for a given transform block, a selected transform by checking whether the size of the given transform block exceeds a predetermined threshold size. If the size of the given transform block exceeds the predetermined threshold size, the apparatus is configured to use a default method for selecting the selected transform. If the size of the given transform block does not exceed the predetermined threshold size, the apparatus is configured to select a transform from a predetermined list of transforms for the selected transform selection and to transmit in the data stream an index pointing to the selected transform from the predetermined list of transforms to be used for the given transform block as the selected transform, the predetermined list of transforms comprising an identity transform and a non-identity transform. Further, the apparatus is configured to predict a given transform block and, for the given transform block, encode a block of coefficients into a data stream, so that, if the selected transform is an identity transform, the block of coefficients is used as a residual sample array for modifying the prediction to reconstruct the given transform block, and, if the selected transform is not the identity transform, the block of coefficients is subjected to an inverse transform corresponding to the selected transform to obtain a residual sample array for the given transform block.

[0047] According to an embodiment, an apparatus for coding a picture using predictive coding and block-based transform residual coding is configured to select, for a given transform block, a selected transform from a predetermined list of transforms and code an index into a data stream for the given transform block that points to the selected transform. The apparatus is further configured to predict the given transform block and code, for the given transform block, a block of coefficients into a data stream such that, from the block of coefficients, a residual sample array for the given transform block can be derived such that the block of coefficients is associated with the residual sample array according to the selected transform, and the prediction of the given transform block can be modified using the residual sample array to reconstruct the given transform block. For the given transform block, the apparatus is configured, when coding the block of coefficients into a data stream depending on whether the selected transform for the given block is included in a predetermined set of one or more transforms, to code a coded block flag into the data stream indicating whether the block of coefficients has at least one non-zero coefficient if the selected transform for the given block is included in the predetermined set of one or more transforms. Furthermore, the device is configured, when encoding a block of coefficients into a data stream depending on whether, for a given transform block, the selected transform of the given block is included in a predetermined set of one or more transforms, to refrain from encoding a coded block flag into the data stream, which should be inferred on the encoder side as notification that the block of coefficients has at least one non-zero coefficient, if the selected transform of the given block is not included in the predetermined set of one or more transforms (in other words, then not encoding a CBF into the data stream, or in further other words, if the selected transform of the given block is included in the predetermined set of one or more transforms, encoding a syntax element different from the current part of the data stream to be coded, in which case the CBF is included in the predetermined set of one or more transforms).

[0048] According to an embodiment, an apparatus for coding a picture using predictive coding and block-based transform residual coding is configured to predict a given transform block and encode a block of coefficients into a data stream, the prediction including encoding a coded block flag into a data stream indicating whether, for the given transform block, the block of coefficients has at least one non-zero coefficient. If the coded block flag indicates that the block of coefficients has at least one non-zero coefficient, the apparatus is configured to select a selected transform from a predetermined list of transforms for the given transform block and encode an index into the data stream for the given transform block pointing to the selected transform in the predetermined list of transforms. From the block of coefficients, a residual sample array for the given transform block can be derived, such that the block of coefficients is related to the residual sample array according to the selected transform, and the prediction of the given transform block can be modified using the residual sample array to reconstruct the given transform block. The device is configured to reconstruct a given transform block without prediction modification if the coded block flag indicates that the block of coefficients does not have at least one non-zero coefficient (in other words, if the coded block flag then indicates that the block of coefficients does not have at least one non-zero coefficient, not code an index into the data stream, such as by coding a syntax element that differs from an index from a current portion of the data stream in which the index is coded).

[0049] According to an embodiment, an apparatus for encoding a picture using predictive coding and block-based transform residual coding is configured to populate or populate and sort a predetermined list of transforms according to a data stream, and to select a selected transform from the predetermined list of transforms for a given transform block. The apparatus is further configured to encode an index pointing to the selected transform in the predetermined list of transforms into the data stream using a variable length code, such that each transform in the predetermined list of transforms is assigned a codeword of the variable length code, the codeword length of the codeword of the variable length code monotonically increasing with the rank of the transform in the predetermined list of transforms to which the codeword is assigned. The apparatus is further configured to derive a prediction for the given transform block and encode a block of coefficients for the given transform block into the data stream, such that a residual sample array for the given transform block can be derived from the block of coefficients, such that the block of coefficients is associated with the residual sample array according to the selected transform, and the given transform block can be reconstructed by the prediction of the given transform block using the residual sample array to reconstruct the given transform block.

[0050] According to an embodiment, an apparatus for encoding a picture using predictive coding and block-based transform residual coding is configured to derive a prediction for a given transform block. The apparatus is further configured to select, for the given transform block, a selected transform from a predetermined list of transforms, and encode an index into the predetermined list of transforms pointing to the selected transform using a composite variable-length code codeword consisting of a first codeword of the variable-length code followed by a second codeword of the fixed-length code if the first codeword is the longest codeword of the variable-length code. A codeword of the composite variable-length code consisting of only one of the two non-longest codewords of the variable-length code is assigned to an identity transform and a predetermined non-identity transform included in the predetermined list of transforms to identify the identity transform and the predetermined non-identity transform, and further codewords of the composite variable-length code are assigned to further non-identity transforms in the predetermined list of transforms to identify the further non-identity transform. Further, the apparatus is configured to encode, for a given transform block, a block of coefficients into a data stream such that the block of coefficients is associated with a residual sample array according to a selected transform and the given transform block is reconstructable by modifying a prediction of the given transform block using the residual sample array.

[0051] According to an embodiment, an apparatus for decoding a picture using predictive coding and block-based transform residual coding is configured to select, for a given transform block, a selected transform from a predetermined list of transforms, the selected transform comprising an identity transform and at least one non-identity transform. Furthermore, the apparatus is configured to derive a prediction for the given transform block and to encode a block of coefficients into a data stream by checking, for the given transform block, whether the selected transform is a non-identity transform. If the selected transform is a non-identity transform, the device is configured to: encode into the data stream position information of the first non-zero coefficient encountered along a scan order traversing all coefficients of the block of coefficients, or the last non-zero coefficient encountered along a scan order traversing all coefficients of the block of coefficients, to obtain, for a given transform block, a predetermined coefficient position for encoding the block of coefficients into the data stream (please note below that in the above embodiments, this position is referred to as the last position measured along the scan order from the top left to the bottom right, but the actual scanning that started coding started there according to these embodiments. That is, the actual coding was performed in the reverse scan order from the bottom right to the top left corner, where the scan order is the coding order), encode into the data stream a first coefficient of the block of coefficients that includes all non-zero coefficients of the block of coefficients and that is traversed by the scan order starting from or up to the predetermined coefficient position; infer a second coefficient of the block of coefficients that is different from the first coefficient to be zero; and encode the block of coefficients into the data stream for the given transform block. If the selected transform is an identity transform, the apparatus is configured to encode all coefficients of the block of coefficients into the data stream, for a given transform block, to encode the block of coefficients into the data stream, the block of coefficients being associated with a residual sample array according to the selected transform, and the given transform block being reconstructable by modifying its prediction using the residual sample array.

[0052] According to an embodiment, an apparatus for decoding a picture using predictive coding and block-based transform residual coding is configured to select, for a given transform block, a selected transform from a predetermined list of transforms, the selected transform comprising an identity transform and at least one non-identity transform, and to derive a prediction for the given transform block. Furthermore, the apparatus is configured to encode, for the given transform block, a block of coefficients into a data stream by encoding coefficients of the block of coefficients into the data stream in sub-blocks into which the block of coefficients is divided, wherein coefficients in sub-blocks for which a sub-block flag in the data stream is zero are inferred to be zero, and coefficients in sub-blocks for which a sub-block flag in the data stream is non-zero are coded into the data stream. Inferring coefficients as zero and encoding non-zero coefficients is performed by sequentially encoding sub-block flags into the data stream except for at least one of the first sub-block flag and the last sub-block flag if the selected transform is one of at least one non-identity transform, and encoding sub-block flags for all sub-blocks into the data stream if at least one of the first sub-block flag and the last sub-block flag is inferred to signal non-zero and the selected transform is an identity transform. The blocks of coefficients are associated with residual sample arrays according to the selected transform, and a given transform block is reconstructable by modifying a prediction of the given transform block using the residual sample array.

[0053] According to an embodiment, an apparatus for decoding a picture using predictive coding and block-based transform residual coding is configured to select, for a given transform block, a selected transform from a predetermined list of transforms, the selected transform comprising an identity transform and at least one non-identity transform, and to derive a prediction for the given transform block. Furthermore, the apparatus is configured to encode, for the given transform block, the block of coefficients into a data stream in sub-blocks into which the block of coefficients is divided, inferring that coefficients in the sub-blocks whose sub-block flags in the data stream are zero are zero, encoding coefficients in the sub-blocks whose sub-block flags in the data stream are non-zero, and encoding the block of coefficients into the data stream by context-adaptive entropy coding and using the context. The context depends on the logical sum of sub-block flags associated with sub-blocks adjacent to the currently coded sub-block flag if the selected transform is one of the at least one non-identity transform, and on the arithmetic sum of sub-block flags associated with sub-blocks adjacent to the currently coded sub-block flag if the selected transform is the identity transform. The blocks of coefficients are associated with residual sample arrays according to a selected transform, and a given transform block can be reconstructed by modifying a prediction for the given transform block using the residual sample array.

[0054] According to an embodiment, an apparatus for decoding a picture using predictive coding and block-based transform residual coding is configured to select, for a given transform block, a selected transform from a predetermined list of transforms, the selected transform comprising an identity transform and at least one non-identity transform, and to derive a prediction for the given transform block. Furthermore, the apparatus is configured to encode, for the given transform block, a block of coefficients into a data stream by encoding, for a current coefficient, a significance flag indicating whether the current coefficient is zero using a context. The context depends on the number of non-zero coefficients from a first set of coefficients immediately adjacent to the current coefficient if the selected transform is the identity transform, and on the number of non-zero coefficients from a second set of coefficients including the first set of coefficients, coefficients located further from the current coefficient than the first set of coefficients, the value of the second set of coefficients, and the position of the current coefficient if the selected transform is one of at least one non-identity transform. The block of coefficients is associated with a residual sample array according to the selected transform, and the given transform block is reconstructable by modifying the prediction for the given transform block using the residual sample array.

[0055] According to an embodiment, an apparatus for decoding a picture using predictive coding and block-based transform residual coding is configured to select, for a given transform block, a selected transform from a predetermined list of transforms, the selected transform comprising an identity transform and at least one non-identity transform, and to derive a prediction for the given transform block. Furthermore, the apparatus is configured to encode, for the given transform block, a block of coefficients into a data stream by encoding the given coefficients by context-adaptive entropy coding N greater-than-X flags indicating whether the absolute value of the given coefficient is greater than X, and encoding, using a variable-length code, a remainder indicating the amount by which the absolute value of the given coefficient exceeds an absolute threshold that depends on N, where N is greater when the selected transform is the identity transform compared to when the selected transform is one of the at least one non-identity transform. The block of coefficients is associated with a residual sample array according to the selected transform, and the given transform block is reconstructable by modifying the prediction for the given transform block using the residual sample array.

[0056] According to an embodiment, an apparatus for decoding a picture using predictive coding and block-based transform residual coding is configured to select, for a given transform block, a selected transform from a predetermined list of transforms, the selected transform comprising an identity transform and at least one non-identity transform, and to derive a prediction for the given transform block. Furthermore, the apparatus is configured to encode, for the given transform block, a block of coefficients into a data stream by performing context-adaptive entropy coding using a predetermined context, updating a probability associated with the given context if the selected transform is the identity transform, and encoding the sign of the given coefficient by bypass coding (e.g., context-adaptive entropy coding with fixed equal probability) if the selected transform is one of the at least one non-identity transform. The block of coefficients is associated with a residual sample array according to the selected transform, and the given transform block is reconstructable by modifying the prediction of the given transform block using the residual sample array.

[0057] According to an embodiment, an apparatus for decoding pictures using predictive coding and block-based transform residual coding is configured to select, for a given transform block, a selected transform from a predetermined list of transforms, the selected transform comprising an identity transform and at least one non-identity transform, to derive a prediction for the given transform block. Furthermore, the apparatus is configured to encode, for the given transform block, a block of coefficients into a data stream by encoding the given coefficients by context-adaptive entropy coding N greater-than-X flags indicating whether the absolute value of the given coefficient is greater than X, and encoding using a variable length code a remainder indicating the amount by which the absolute value of the given coefficient exceeds an absolute threshold that depends on N. The apparatus is configured to, if the selected transform is one of the at least one non-identity transform, perform context adaptive entropy encoding of the N greater-than-X flags in a series of passes by context adaptive entropy encoding the N greater-than-X flags sequentially while increasing X by one or more of the N greater-than-X flags for each pass, record the number of flags coded using the context adaptive entropy coding during the series of passes, and stop context adaptive entropy coding of the N greater-than-X flags if the number exceeds a predetermined flag threshold. Furthermore, the apparatus is configured, when the selected transform is an identity transform, to sequentially perform context-adaptive entropy encoding of the N greater-than-X flags, to encode an importance flag (X=0) among the N greater-than-X flags, and then encode a greater-than-X flag-bypass flag indicating whether a given coefficient is greater than the absolute threshold before further N greater-than-X flags among the N greater-than-X flags, and to stop the context-adaptive entropy encoding of the N greater-than-X flags in the case of a greater-than-X flag-bypass flag indicating that the given coefficient is greater than the absolute threshold (e.g., to resume the context-adaptive entropy encoding of the N greater-than-X flags for further greater-than-X flags except for the last one among the N greater-than-X flags).The blocks of coefficients are associated with residual sample arrays according to a selected transform, and a given transform block can be reconstructed by modifying a prediction of the given transform block using the residual sample array.

[0058] According to an embodiment, an apparatus for decoding a picture using predictive coding and block-based transform residual coding is configured to select, for a given transform block, a selected transform from a predetermined list of transforms, the selected transform comprising an identity transform and at least one non-identity transform, and to derive a prediction for the given transform block. The apparatus is further configured to encode, for the given transform block, a block of coefficients into a data stream in a series of passes that traverse the coefficients of the block of coefficients in a predetermined scan order for the given coefficient by context-adaptive entropy encoding N greater-than-X flags indicating whether the absolute value of the given coefficient is greater than X, encoding a remainder indicating the amount by which the absolute value of the given coefficient exceeds an absolute threshold that depends on N using a variable-length code, and encoding the sign of the given coefficient. The apparatus is configured to distribute the encoding of the N greater-than-X flags, remainder, and sign differently across the series of passes depending on whether the selected transform is an identity transform or one of at least one non-identity transform. The block of coefficients is associated with a residual sample array according to the selected transform, and the given transform block is reconstructable by modifying the prediction of the given transform block using the residual sample array.

[0059] According to an embodiment, an apparatus for decoding a picture using predictive coding and block-based transform residual coding is configured to select, for a given transform block, a selected transform from a predetermined list of transforms, the selected transform comprising an identity transform and at least one non-identity transform. Furthermore, for the given transform block, the apparatus encodes into the data stream one or more predetermined flags (e.g., parity flags and / or greater-than-X flags, sig flags) for each coefficient in a series of passes traversing the coefficients of the block using context-adaptive binary entropy coding, where each predetermined flag indicates where the absolute value of the respective coefficient is located (e.g., the absolute value domain starts at the beginning of one or more passes, e.g., for an X-bit representation, coefficients 0...2). X-1The apparatus is configured to encode the block of coefficients into the data stream by reducing the absolute value domain of each coefficient (starting from a common absolute value domain of ∇ ... The apparatus is configured to encode blocks of coefficients into a data stream such that, for a given transform block, the blocks of coefficients are associated with a residual sample array for the given transform block according to a selected transform, the residual sample array enabling a prediction of the given transform block to be modified and the given transform block to be reconstructed. The apparatus is configured to stop encoding the one or more predetermined flags as soon as a predetermined number of the predetermined flags is reached (i.e., the total number of predetermined flags encoded so far for all coefficients reaches a limit) in successive passes such that a cardinality of an absolute value domain to which the pointers point is smaller for a first set of non-zero coefficients than for a second set of non-zero coefficients (i.e., smaller for coefficients before the limit is reached in the last pass than for coefficients after the limit is reached), and to use different variable length codes for the codewords of the variable length codes for the first and second sets of non-zero coefficients.

[0060] According to an embodiment, an apparatus for decoding a picture using predictive coding and block-based transform residual coding is configured to select, for a given transform block, a selected transform from a predetermined list of transforms, the selected transform comprising an identity transform and at least one non-identity transform. Furthermore, if the selected transform is a non-identity transform, the apparatus is configured to encode, for the given transform block, a block of coefficients into the data stream by encoding coefficients of the block of coefficients into the data stream along a first scan order (possibly following this order several times in several passes) toward a DC coefficient of the non-identity transform (e.g., starting from the highest frequency coefficient thereafter, possibly from the “last” significant coefficient position). Furthermore, if the selected transform is an identity transform, the apparatus is configured to encode, for the given transform block, a block of coefficients into the data stream by encoding coefficients of the block of coefficients into the data stream along a second scan order from an upper-left sample position to a lower-right sample position. Furthermore, the apparatus is configured to encode the block of coefficients into the data stream for a given transform block such that the block of coefficients is associated with the residual sample array of the given transform block according to a selected transform (this step may include, in the case of an identity transform, adding to each coefficient a coefficient present in the block on a given side, such as the left side in the case of horizontal DPCM or the top of each coefficient in the case of vertical DPCM, so as to perform DPCM inversion), allowing a prediction of the given transform block to be modified to reconstruct the given transform block.

[0061] According to an embodiment, an apparatus for decoding a picture using predictive coding and block-based transform residual coding is configured to select, for a given transform block, a selected transform from a predetermined list of transforms, the selected transform comprising an identity transform and at least one non-identity transform. Furthermore, if, for the given transform block, the selected transform is one of the at least one non-identity transform, the apparatus is configured to encode a syntax element into the data stream and derive therefrom whether the signs of non-zero coefficients in a predetermined group of non-zero coefficients are equal to or unequal to each other, and if so, derive the signs of the non-zero coefficients in the predetermined group of non-zero coefficients, and if the signs of the non-zero coefficients in the predetermined group of non-zero coefficients are unequal to each other, encode the signs of the non-zero coefficients in the predetermined group of non-zero coefficients by encoding a sign bit for each non-zero coefficient. Furthermore, the apparatus is configured to encode, for a given transform block, the block of coefficients into the data stream by encoding the signs of the non-zero coefficients in the predetermined group of non-zero coefficients by encoding a sign bit for each non-zero coefficient base regardless of whether the signs of the non-zero coefficients in the predetermined group of non-zero coefficients are equal to each other if the selected transform is an identity transform.Furthermore, the apparatus is configured, for the given transform block, to encode the block of coefficients into the data stream such that the block of coefficients is associated with a residual sample array of the given transform block according to the selected transform, the residual sample array allowing to modify a prediction of the given transform block and to reconstruct the given transform block.

[0062] According to an embodiment, an apparatus for decoding pictures using predictive coding and block-based transform residual coding is configured to select, for a given transform block, a selected transform from a predetermined list of transforms, the selected transform comprising an identity transform and at least one non-identity transform. The apparatus is further configured to encode, for the given transform block, the block of coefficients into the data stream by: encoding signs of non-zero coefficients of a given block of coefficients; encoding a code probability tendency index into the data stream; and, if the selected transform is the identity transform, entropy coding the signs of the given non-zero coefficients (e.g., those first in the coding order or within a particular sub-block of the coefficient block to which the index applies) using a context model (e.g., a context model defining a particular code probability, such as a probability of being positive) associated with the code probability tendency index. The apparatus is further configured, if the selected transform is one of the at least one non-identity transform, to encode, for the given transform block, the block of coefficients into the data stream by bypass coding (e.g., context-adaptive entropy coding with fixed equal probability) the signs of the given non-zero coefficients of the given block of coefficients. Further, the apparatus is configured to encode, for a given transform block, a block of coefficients into the data stream by encoding signs of non-zero coefficients of the given block of coefficients such that the block of coefficients is associated with a residual sample array of the given transform block according to a selected transform, and a prediction of the given transform block is modifiable using the residual sample array to reconstruct the given transform block.

[0063] According to an embodiment, an apparatus for decoding a picture using predictive coding and block-based transform residual coding is configured to select, for a given transform block, a selected transform from a predetermined list of transforms, the selected transform comprising an identity transform and at least one non-identity transform. Furthermore, the apparatus is configured to encode, for the given transform block, a coefficient block into a data stream by: encoding signs of predetermined non-zero coefficients using a predetermined context model from among a plurality of context models; if the selected transform is the identity transform, selecting a predetermined context model from among the plurality of context models according to statistics of signs of previously coded coefficients; and, if the selected transform is one of the at least one non-identity transform, by bypass coding (e.g., context-adaptive entropy coding with fixed equal probability) the signs of the predetermined non-zero coefficients of the given coefficient block. Furthermore, the apparatus is configured to encode, for the given transform block, a block of coefficients into a data stream such that, for the given transform block, the block of coefficients is associated with a residual sample array for the given transform block according to the selected transform, such that a prediction of the given transform block can be modified using the residual sample array to reconstruct the given transform block.

[0064] According to an embodiment, an apparatus for decoding a picture using predictive coding and block-based transform residual coding is configured to select, for a given transform block, a selected transform from a predetermined list of transforms, the selected transform comprising an identity transform and at least one non-identity transform. Furthermore, for the given transform block, the apparatus encodes one or more predetermined flags (e.g., parity flags and / or greater-than-X flags, sig flags) for each coefficient from the data stream using context-adaptive binary entropy coding in a series of passes traversing the coefficients of the block, where each predetermined flag indicates where the absolute value of the respective coefficient is located (e.g., the absolute value domain starts at the beginning of one or more passes, e.g., for an X-bit representation, coefficients 0...2). X-1The system is configured to encode a block of coefficients into a data stream by reducing the magnitude domain of each coefficient (starting from a common magnitude domain of ∇ ... Furthermore, the apparatus is configured to, for a given transform block, encode a block of coefficients into the data stream by, in a series of passes traversing the coefficients of the block, encoding, for each coefficient whose cardinality in the magnitude domain is not reduced to one by one or more predetermined flags encoded for the respective coefficient, a codeword (e.g., a Rice / Exp-Golomb code) of a variable length code to identify the absolute value of the respective coefficient in the magnitude domain of the respective coefficient (e.g., the code length of the variable length code may monotonically increase as the absolute value increases, where the codeword is free to refer only to the reduced magnitude domain, or a general one or some other one that is necessarily a proper superset of the reduced magnitude domain). Furthermore, the apparatus is configured to, for a given transform block, encode the block of coefficients into the data stream such that the block of coefficients is associated with a residual sample array of the given transform block according to a selected transform, so that a prediction of the given transform block is modifiable using the residual sample array to reconstruct the given transform block.The apparatus is configured to, in a series of passes, when encoding the one or more predetermined flags, except for an importance flag, which indicates whether a coefficient to be coded is zero or not (and therefore is necessarily coded using context-adaptive binary entropy coding), stop encoding the one or more predetermined flags as soon as a predetermined number of predetermined flags is reached (i.e., the total number of predetermined flags coded so far for all coefficients reaches a limit), such that the cardinality in the absolute value domain is smaller for a first set of non-zero coefficients compared to a second set of non-zero coefficients (i.e., the coefficients before the limit is reached in the last pass are smaller compared to the coefficients after the limit is reached), the predetermined number corresponding to an upper limit minus the number of coefficients whose importance flags are not yet coded.

[0065] According to an embodiment, a method for decoding a picture using predictive coding and block-based transform residual coding comprises dividing the picture into transform blocks of different sizes. Furthermore, the method comprises, for a given transform block, selecting a selected transform by checking whether the size of the given transform block exceeds a predetermined threshold size. If the size of the given transform block exceeds the predetermined threshold size, a default method for selecting the selected transform is used. If the size of the given transform block does not exceed the predetermined threshold size, a transform pointed to by an index transmitted in the data stream for the given transform block from a predetermined list of transforms is used as the selected transform, the predetermined list of transforms comprising an identity transform and a non-identity transform. Furthermore, the method comprises, for the given transform block, decoding a block of coefficients from the data stream, and, if the selected transform is an identity transform, using the block of coefficients as a residual sample array for the given transform block; and, if the selected transform is not an identity transform, subjecting the block of coefficients to an inverse transform corresponding to the selected transform to obtain a residual sample array for the given transform block. Furthermore, the method comprises modifying a prediction of the given transform block using the residual sample array to reconstruct the given transform block.

[0066] According to an embodiment, a method for decoding a picture using predictive coding and block-based transform residual coding comprises, for a given transform block, selecting a selected transform by decoding an index from a data stream for the given transform block and using one transform of a predetermined list of transforms to which the index points as the selected transform. Furthermore, the method comprises, for the given transform block, decoding a block of coefficients from the data stream, deriving a residual sample array for the given transform block from the block of coefficients such that the block of coefficients is associated with the residual sample array according to the selected transform, and modifying a prediction of the given transform block using the residual sample array to reconstruct the given transform block. The method comprises, for the given transform block, decoding the block of coefficients from the data stream depending on whether the selected transform for the given block is included in a predetermined set of one or more transforms. The method comprises, for a given transform block, in decoding a block of coefficients from the data stream, decoding a coded block flag from the data stream indicating whether the block of coefficients has at least one non-zero coefficient if the selected transform of the given block is included in a predetermined set of one or more transforms, and inferring that the block of coefficients has at least one non-zero coefficient if the selected transform of the given block is not included in the predetermined set of one or more transforms (in other words, subsequently not decoding a CBF from the data stream if the selected transform of the given block is included in the predetermined set of one or more transforms, or in further words decoding a syntax element different from the current part of the data stream from which the CBF is decoded).

[0067] According to an embodiment, a method for decoding a picture using predictive coding and block-based transform residual coding includes decoding a coded block flag from a data stream that indicates, for a given transform block, whether the block of coefficients has at least one non-zero coefficient, and comprises decoding the block of coefficients from the data stream. If the coded block flag indicates that the block of coefficients has at least one non-zero coefficient, the method comprises: selecting, for the given transform block, a selected transform by decoding an index from the data stream for the given transform block; using as the selected transform one transform from a predetermined list of transforms to which the index points, deriving a residual sample array for the given transform block from the block of coefficients such that the block of coefficients is related to the residual sample array according to the selected transform; and modifying a prediction of the given transform block using the residual sample array to reconstruct the given transform block. Furthermore, the method comprises reconstructing a given transform block without prediction modification if the coded block flag indicates that the block of coefficients does not have at least one non-zero coefficient (in other words, if the coded block flag indicates that the block of coefficients does not have at least one non-zero coefficient, then not decoding an index from the data stream, such as by decoding a syntax element that differs from an index from a current portion of the data stream in which the index is decoded).

[0068] According to an embodiment, a method for decoding a picture using predictive coding and block-based transform residual coding comprises populating, or populating and sorting, a predetermined list of transforms according to a data stream. The method comprises selecting a selected transform for a given transform block by decoding an index from the data stream using a variable length code and using as the selected transform one of the predetermined list of transforms to which the index points, such that each transform in the predetermined list of transforms is assigned a codeword of a variable length code, the codeword length of the codeword of the variable length code monotonically increasing with the rank of the transform in the predetermined list of transforms to which the codeword is assigned. Furthermore, the method comprises decoding a block of coefficients from the data stream for the given transform block, deriving a residual sample array for the given transform block from the block of coefficients, such that the block of coefficients is associated with the residual sample array according to the selected transform, and modifying a prediction of the given transform block using the residual sample array to reconstruct the given transform block.

[0069] According to an embodiment, a method for decoding pictures using predictive coding and block-based transform residual coding comprises, for a given transform block, selecting a selected transform by decoding an index into a predetermined list of transforms from a data stream using a composite variable-length codeword consisting of a first codeword of a variable-length code and, if the first codeword is the longest codeword of the variable-length code, a second codeword of a fixed-length code that follows the first codeword. A codeword of the composite variable-length code consisting of only one of the two non-longest codewords of the variable-length code is assigned to an identity transform and a predetermined non-identity transform included in the predetermined list of transforms to identify the identity transform and the predetermined non-identity transform, and a further codeword of the composite variable-length code is assigned to a further non-identity transform of the predetermined list of transforms to identify the further non-identity transform. The method comprises selecting, for the given transform block, a transform from the predetermined list of transforms pointed to by the index as the selected transform. Furthermore, the method comprises, for a given transform block, decoding a block of coefficients from the data stream, deriving a residual sample array for the given transform block from the block of coefficients such that the block of coefficients is associated with the residual sample array according to a selected transform, and modifying a prediction of the given transform block using the residual sample array to reconstruct the given transform block.

[0070] According to an embodiment, a method for decoding a picture using predictive coding and block-based transform residual coding comprises selecting, for a given transform block, a selected transform from a predetermined list of transforms, the selected transform comprising an identity transform and at least one non-identity transform. The method comprises decoding a block of coefficients from a data stream by checking, for the given transform block, whether the selected transform is a non-identity transform. If the selected transform is a non-identity transform, the method comprises decoding position information from the data stream at the first encountered non-zero coefficient along a scan order traversing all coefficients of the block of coefficients, or at the last encountered non-zero coefficient along a scan order traversing all coefficients of the block of coefficients, to obtain a predetermined coefficient position (note below that in the above embodiments this position is referred to as the last position measured along a scan order from the top left to the bottom right, but the actual scanning that started coding started there according to these embodiments. That is, the actual coding was done in the reverse scan order from the bottom right to the top left corner, where the scan order is the coding order; see embodiments in which both scan directions are predicted). The method comprises decoding a first coefficient of a block of coefficients from the data stream, which includes all non-zero coefficients of the block of coefficients and is traversed by the scan order starting from or up to the predetermined coefficient position, and inferring a second coefficient of the block of coefficients that is different from the first coefficient to be zero. If the selected transform is an identity transform, the method comprises decoding all coefficients of the coefficient block from the data stream. Furthermore, the method comprises deriving a residual sample array for a given transform block from the block of coefficients such that the block of coefficients is associated with the residual sample array according to a selected transform, and modifying a prediction of the given transform block using the residual sample array to reconstruct the given transform block.

[0071] According to an embodiment, a method for decoding a picture using predictive coding and block-based transform residual coding comprises selecting, for a given transform block, a selected transform from a predetermined list of transforms, the selected transform comprising an identity transform and at least one non-identity transform. The method comprises decoding, for the given transform block, coefficients of the block of coefficients from the data stream in sub-blocks into which the block of coefficients is divided, inferring that coefficients in the sub-block for which a sub-block flag in the data stream is zero are zero, and decoding coefficients in the sub-block for which a sub-block flag in the data stream is non-zero from the data stream. If the selected transform is one of the at least one non-identity transform, the method comprises sequentially decoding sub-block flags from the data stream except for at least one of the first and last sub-block flags, inferring that at least one of the first and last sub-block flags is non-zero, and if the selected transform is the identity transform, decoding sub-block flags from the data stream for all sub-blocks. Furthermore, the method comprises deriving a residual sample array for a given transform block from the block of coefficients such that the block of coefficients is associated with the residual sample array according to a selected transform, and modifying a prediction of the given transform block using the residual sample array to reconstruct the given transform block.

[0072] According to an embodiment, a method for decoding a picture using predictive coding and block-based transform residual coding comprises selecting, for a given transform block, a selected transform from a predetermined list of transforms, the selected transform comprising an identity transform and at least one non-identity transform. The method comprises, for the given transform block, decoding a block of coefficients from a data stream in sub-blocks into which the block of coefficients is divided, inferring that coefficients in the sub-blocks for which a sub-block flag in the data stream is zero are zero, decoding coefficients in the sub-blocks for which a sub-block flag in the data stream is non-zero, and decoding the block of coefficients from the data stream by context-adaptive entropy decoding and by using the context to decode a currently decoded sub-block flag from the data stream. The context depends on the logical sum of sub-block flags associated with sub-blocks adjacent to the currently decoded sub-block flag if the selected transform is one of the at least one non-identity transform, and on the arithmetic sum of sub-block flags associated with sub-blocks adjacent to the currently decoded sub-block flag if the selected transform is the identity transform. Furthermore, the method comprises deriving a residual sample array for a given transform block from the block of coefficients such that the block of coefficients is associated with the residual sample array according to a selected transform, and modifying a prediction of the given transform block using the residual sample array to reconstruct the given transform block.

[0073] According to an embodiment, a method for decoding a picture using predictive coding and block-based transform residual coding comprises selecting, for a given transform block, a selected transform from a predetermined list of transforms, the selected transform comprising an identity transform and at least one non-identity transform. The method comprises decoding, for the given transform block, a block of coefficients from a data stream by decoding, for a current coefficient, a significance flag indicating whether the current coefficient is zero using a context. The context depends on the number of non-zero coefficients from a first set of coefficients immediately neighboring the current coefficient if the selected transform is the identity transform, and on the number of non-zero coefficients from a second set of coefficients including the first set of coefficients, coefficients located further from the current coefficient than the first set of coefficients, the value of the second set of coefficients, and the position of the current coefficient if the selected transform is one of at least one non-identity transform. Furthermore, the method comprises deriving a residual sample array for the given transform block from the block of coefficients such that the block of coefficients is associated with the residual sample array according to the selected transform, and modifying a prediction of the given transform block using the residual sample array to reconstruct the given transform block.

[0074] According to an embodiment, a method for decoding a picture using predictive coding and block-based transform residual coding comprises selecting, for a given transform block, a selected transform from a predetermined list of transforms, the selected transform comprising an identity transform and at least one non-identity transform. The method comprises decoding a block of coefficients from a data stream for the given transform block by decoding the given coefficients via context-adaptive entropy decoding of N greater-than-X flags indicating whether the absolute value of the given coefficient is greater than X. Furthermore, the method comprises decoding a block of coefficients from a data stream for the given transform block by decoding the given coefficients using a variable length code, the remainder indicating an amount by which the absolute value of the given coefficient exceeds an absolute threshold that depends on N, where N is greater when the selected transform is the identity transform compared to when the selected transform is one of the at least one non-identity transform. Furthermore, the method comprises deriving a residual sample array for the given transform block from the block of coefficients, such that the block of coefficients is associated with the residual sample array according to the selected transform, and modifying a prediction of the given transform block using the residual sample array to reconstruct the given transform block.

[0075] According to an embodiment, a method for decoding a picture using predictive coding and block-based transform residual coding comprises selecting, for a given transform block, a selected transform from a predetermined list of transforms, the selected transform comprising an identity transform and at least one non-identity transform. The method is configured to decode, for the given transform block, a block of coefficients from a data stream by performing context-adaptive entropy decoding using a predetermined context, updating a probability associated with the predetermined context if the selected transform is the identity transform, and decoding the code of the given coefficient by bypass decoding (e.g., context-adaptive entropy decoding with fixed equal probability) if the selected transform is one of the at least one non-identity transform. Furthermore, the method comprises deriving a residual sample array for the given transform block from the block of coefficients, such that the block of coefficients is associated with the residual sample array according to the selected transform, and modifying a prediction of the given transform block using the residual sample array to reconstruct the given transform block.

[0076] According to an embodiment, a method for decoding a picture using predictive coding and block-based transform residual coding comprises selecting, for a given transform block, a selected transform from a predetermined list of transforms, the selected transform comprising an identity transform and at least one non-identity transform. The method comprises decoding a block of coefficients from a data stream for the given transform block by decoding the given coefficients by context-adaptive entropy decoding N greater-than-X flags that indicate whether the absolute value of the given coefficient is greater than X. The method further comprises decoding the block of coefficients from the data stream for the given transform block by decoding the given coefficients by decoding, using a variable length code, a remainder that indicates the amount by which the absolute value of the given coefficient exceeds an absolute threshold that depends on N. If the selected transform is one of the at least one non-identity transform, performing context adaptive entropy decoding of the N greater than X flags in a series of passes by context adaptive entropy decoding the N greater than X flags sequentially while increasing X by one or more of the N greater than X flags for each pass, recording the number of flags encoded using context adaptive entropy decoding during the series of passes, and stopping the context adaptive entropy decoding of the N greater than X flags if the number exceeds a predetermined flag threshold. If the selected transform is an identity transform, performing context-adaptive entropy decoding of sequential N greater-than-X flags; after decoding an importance flag (X=0) among the N greater-than-X flags, decoding a greater-than-X flag-bypass flag indicating whether a predetermined coefficient is greater than the absolute threshold before further N greater-than-X flags among the N greater-than-X flags; and stopping the context-adaptive entropy decoding of the N greater-than-X flags in the case of a greater-than-X flag-bypass flag indicating that the predetermined coefficient is greater than the absolute threshold (e.g., in the case of a greater-than-X flag indicating that the predetermined coefficient is not greater than the absolute threshold, restarting the context-adaptive entropy decoding of the N greater-than-X flags for further greater-than-X flags except for the last one of the N greater-than-X flags).Furthermore, the method comprises deriving a residual sample array for a given transform block from the block of coefficients such that the block of coefficients is associated with the residual sample array according to a selected transform, and modifying a prediction of the given transform block using the residual sample array to reconstruct the given transform block.

[0077] According to an embodiment, a method of decoding a picture using predictive coding and block-based transform residual coding comprises selecting, for a given transform block, a selected transform from a predetermined list of transforms, the selected transform comprising an identity transform and at least one non-identity transform. The method comprises decoding a block of coefficients from a data stream, for a given transform block, in a series of passes that traverses the coefficients of the block of coefficients in a predetermined scan order for the given coefficient by context-adaptive entropy decoding N greater-than-X flags that indicate whether the absolute value of the given coefficient is greater than X, decoding a remainder that indicates the amount by which the absolute value of the given coefficient exceeds an absolute threshold that depends on N using a variable length code, and decoding a sign of the given coefficient, the method comprising distributing the decoding of the N greater-than-X flags, remainder, and sign differently across the series of passes depending on whether the selected transform is the identity transform or one of the at least one non-identity transform. Furthermore, the method comprises deriving a residual sample array for a given transform block from the block of coefficients such that the block of coefficients is associated with the residual sample array according to a selected transform, and modifying a prediction of the given transform block using the residual sample array to reconstruct the given transform block.

[0078] The above-described apparatus and method for encoding a picture are based on the same considerations as the above-described apparatus for decoding a picture, and the apparatus and method for encoding a picture can be completed with all the features and / or functions described for the apparatus for decoding a picture.

[0079] The drawings are not necessarily to scale, emphasis instead generally being placed upon illustrating the principles of the invention. In the following description, various embodiments of the invention are described with reference to the following drawings: [Brief explanation of the drawings]

[0080] [Figure 1] 1 shows a schematic diagram of a video encoder for predictive coding of pictures into a data stream according to an embodiment of the present invention; [Figure 2] 1 shows a schematic diagram of a video decoder configured to predictively decode pictures from a data stream according to an embodiment of the present invention; [Figure 3] 2 shows a schematic diagram of the relationship between a reconstructed signal on the one hand and a combination of a prediction residual signal and a prediction signal signaled in a data stream on the other hand according to an embodiment of the present invention; [Figure 4] 1 shows a schematic diagram of an apparatus for decoding a picture, configured to select a selected transform depending on the size of a given transform block, according to an embodiment of the present invention; [Figure 5] 1 shows a schematic diagram of an apparatus for decoding a picture, configured to decode blocks of coefficients that depend on a selected transform, according to an embodiment of the present invention; [Figure 6] 1 shows a schematic diagram of an apparatus for decoding pictures according to an embodiment of the present invention; [Figure 7] 1 shows a schematic diagram of an apparatus for decoding a picture configured to reconstruct a given transform block depending on a coded block flag according to an embodiment of the present invention; [Figure 8] 1 shows a schematic diagram of an apparatus for decoding pictures configured to populate or populate and sort a predetermined list of transforms according to an embodiment of the present invention; [Figure 9] 1 shows a schematic diagram of a composite variable length code according to an embodiment of the present invention; [Figure 10]1 shows a schematic diagram of an apparatus for decoding pictures configured to decode position information dependent on a selected transformation according to an embodiment of the present invention; [Figure 11] 1 shows a schematic diagram of an apparatus for decoding a picture, configured to decode all coefficients of a block of coefficients sub-block-by-subblock, according to an embodiment of the present invention; [Figure 12] 1 shows a schematic diagram of an apparatus for decoding a picture configured to decode sub-block flags that depend on a selected transform according to an embodiment of the present invention; [Figure 13a] FIG. 10 shows a schematic diagram of decoding a sub-block flag when at least one preceding sub-block flag signals non-zero according to an embodiment of the present invention; [Figure 13b] FIG. 10 shows a schematic diagram of decoding a sub-block flag when all preceding sub-block flags signal zero according to an embodiment of the present invention; [Figure 14] 1 shows a schematic diagram of an apparatus for decoding a picture configured to decode sub-block flags by context-adaptive entropy decoding according to an embodiment of the present invention; [Figure 15] 1 shows a schematic diagram of an apparatus for decoding pictures configured to decode sig flags using context according to an embodiment of the present invention; [Figure 16] 1 shows a schematic diagram of an apparatus for decoding a picture, configured to decode a block of coefficients by context-adaptive entropy decoding N greater-than X flags and decoding the remainder using a variable length code, according to an embodiment of the present invention. [Figure 17] 1 shows a schematic diagram of an apparatus for decoding a picture configured to decode signs of coefficients that depend on a selected transform according to an embodiment of the present invention; [Figure 18] 1 shows a schematic diagram of an apparatus for decoding a picture configured to decode blocks of coefficients in multiple passes depending on a selected transform according to an embodiment of the present invention; [Figure 19] 1 shows a schematic diagram of an apparatus for decoding a picture configured to decode a block of coefficients in multiple passes by distributing the decoding of N greater-than X flags, remainders, and signs differently across a series of passes depending on a selected transform, according to an embodiment of the present invention; [Figure 20] 1 shows a schematic diagram of an apparatus for decoding a picture, configured to decode blocks of coefficients in multiple passes by decoding one or more flags, each flag reducing the absolute value domain, according to an embodiment of the present invention; [Figure 21] 1 shows a schematic diagram of an apparatus for decoding a picture configured to decode blocks of coefficients having a scanning order that depends on a selected transform, according to an embodiment of the present invention; [Figure 22] 1 shows a schematic diagram of an apparatus for decoding a picture configured to decode signs of coefficients that depend on a sign probability trend index when a selected transform is a non-identity transform, according to an embodiment of the present invention; [Figure 23] 1 shows a schematic diagram of an apparatus for decoding a picture configured to decode signs of coefficients that depend on syntax elements when a selected transform is an identity transform, according to an embodiment of the present invention; [Figure 24] 1 shows a schematic diagram of an apparatus for decoding a picture, configured to decode signs of coefficients that depend on statistics of signs of previously decoded coefficients when a selected transform is an identity transform, according to an embodiment of the present invention; [Figure 25] 1 shows a schematic diagram of a transform block and sub-blocks of a transform block; DETAILED DESCRIPTION OF THE INVENTION

[0081] Equal or equivalent elements or elements having equal or equivalent functionality are indicated in the following description by equal or equivalent reference signs, even if they occur in different figures.

[0082] In the following description, numerous details are set forth to provide a more thorough explanation of embodiments of the present invention. However, it will be apparent to those skilled in the art that embodiments of the present invention may be practiced without these specific details. In other instances, well-known structures and devices are shown in block diagram form, rather than in detail, to avoid obscuring the embodiments of the present invention. Furthermore, features of different embodiments described below may be combined with each other unless otherwise specified.

[0083] The following description of the figures begins with presenting a description of an encoder and decoder of a block-based predictive codec for coding pictures of video to form an example of a coding framework in which embodiments of the present invention can be incorporated. Each encoder and decoder is described with reference to Figures 1 to 3. Below, a description of embodiments of the inventive concepts is presented along with an explanation of how such concepts can be incorporated into the encoders and decoders of Figures 1 and 2, respectively, although the embodiments described subsequently in Figures 4 onward can also be used to form encoders and decoders that do not operate according to the coding framework underlying the encoders and decoders of Figures 1 and 2.

[0084] FIG. 1 illustrates an apparatus (e.g., a video encoder) that predictively codes a picture 12 into a data stream 14, illustratively using transform-based residual coding. The apparatus or encoder is designated using the reference numeral 10. FIG. 2 illustrates a corresponding decoder 20, i.e., apparatus 20 configured to predictively decode a picture 12′ from data stream 14, also using transform-based residual decoding; an apostrophe is used to indicate that picture 12′ reconstructed by decoder 20 deviates from picture 12 originally encoded by apparatus 10 in terms of coding loss introduced by quantization of the prediction residual signal. While FIGS. 1 and 2 illustratively use transform-based predictive residual coding, embodiments of the present patent application are not limited to this type of predictive residual coding. This also applies to other details described with respect to FIGS. 1 and 2, as outlined below.

[0085] The encoder 10 is configured to perform a spatial-spectral transform on the prediction residual signal and encode the resulting prediction residual signal into a data stream 14. Similarly, the decoder 20 is configured to decode the prediction residual signal from the data stream 14 and perform a spectral-spatial transform on the resulting prediction residual signal. The transform type of the spatial-spectral transform can be signaled in the data stream 14 by the encoder 10 according to the embodiments described below in Fig. 4 onwards. Similarly, the transform type of the spectral-spatial transform can be read from the data stream 14 by the decoder 20 according to the embodiments described below in Fig. 4 onwards.

[0086] Internally, the encoder 10 may, according to an embodiment of the present invention, comprise a prediction residual signal former 22 for generating a prediction residual 24 to measure the deviation of a prediction signal 26 from an original signal, i.e., picture 12, where the prediction signal 26 can be interpreted as a linear combination of a set of one or more prediction blocks. The prediction residual signal former 22 may, for example, be a subtractor that subtracts the prediction signal from the original signal, i.e., picture 12. The encoder 10 then further comprises a transformer 28 that performs a spatial-spectral transform of the prediction residual signal 24 to obtain a spectral-domain prediction residual signal 24′, which is then quantized by a quantizer 32 also included in the encoder 10. The prediction residual signal 24″ is then coded into the bitstream 14. This can be performed by transform-type-dependent transform coefficient level coding according to the embodiments described below from FIG. 4 onwards. For this purpose, the encoder 10 may, if necessary, comprise an entropy coder 34 that entropy codes the prediction residual signal that is transformed and quantized into the data stream 14.

[0087] The prediction signal 26 is generated by a prediction stage 36 of the encoder 10 based on a prediction residual signal 24″ that is encoded into and decodable from the data stream 14. To this end, the prediction stage 36 may include, as shown in FIG. 1 , an inverse quantizer 38 that inversely quantizes the prediction residual signal 24″ to obtain a spectral-domain prediction residual signal 24″ that corresponds to the signal 24′ without quantization losses, and an inverse transformer 40 that inversely transforms, i.e., spectral-space transforms, the latter prediction residual signal 24″ to obtain a prediction residual signal 24′′ that corresponds to the original prediction residual signal 24 without quantization losses. A combiner 42 of the prediction stage 36 then recombines the prediction signal 26 and the prediction residual signal 24′″, such as by addition, to obtain a reconstructed signal 46, i.e., a reconstruction of the original signal 12. The reconstructed signal 46 may correspond to the signal 12′. A prediction module 44 of prediction stage 36 then generates predicted signal 26 based on signal 46 using, for example, spatial prediction, ie, intra-picture prediction, and / or temporal prediction, ie, inter-picture prediction.

[0088] Similarly, decoder 20 may be internally configured with components corresponding to prediction stage 36, interconnected in a manner corresponding to the prediction stage, as shown in Figure 2. In particular, entropy decoder 50 of decoder 20 may entropy decode quantized spectral domain prediction residual signal 24" from the data stream, with inverse quantizer 52, inverse transformer 54, combiner 56, and prediction module 58 interconnected and cooperating in the manner described above with respect to the modules of prediction stage 36 to recover a reconstructed signal based on prediction residual signal 24" such that the output of combiner 56 provides the reconstructed signal, i.e., picture 12', as shown in Figure 2. The decoding performed by decoder 20 may be transform-type-dependent transform coefficient-level decoding according to the embodiments described subsequently beginning with Figure 4.

[0089] Although not specifically described above, it is readily apparent that the encoder 10 can set several coding parameters, including, for example, prediction modes, motion parameters, etc., according to several optimization schemes, such as, for example, a method for optimizing several rate- and distortion-related criteria, i.e., encoding cost. For example, the encoder 10 and the decoder 20 and corresponding modules 44, 58 can support different prediction modes, such as an intra-coding mode and an inter-coding mode, respectively. The granularity at which the encoder and the decoder switch between these prediction mode types can correspond to the division of the pictures 12 and 12′ into coding segments or coding blocks, respectively. In units of these coding segments, for example, a picture can be divided into intra-coded blocks and inter-coded blocks.

[0090] Intra-coded blocks are predicted based on the spatial, already coded / decoded neighbors (e.g., the current template) of each block (e.g., the current block), as outlined in more detail below. Several intra-coding modes, including directional or angular intra-coding modes, may be selected for each intra-coded segment, according to which the segment is filled by extrapolating neighboring sample values ​​along a specific direction specific to the directional intra-coding mode. The intra-coding modes may also include one or more additional modes, such as a DC coding mode in which the prediction of each intra-coded block assigns a DC value to all samples in the respective intra-coded segment, and / or a planar intra-coding mode in which the prediction of each block is approximated or determined to be a spatial distribution of sample values ​​described by a two-dimensional linear function over the sample positions of the respective intra-coded block with a planar driving slope and offset defined by the two-dimensional linear function based on neighboring samples.

[0091] In comparison, inter-coded blocks can be predicted temporally, for example. For inter-coded blocks, a motion vector indicating the spatial displacement of a portion of a previously coded picture (e.g., a reference picture) of the video to which picture 12 belongs can be signaled in data stream 14, from which a previously coded / decoded picture is sampled to obtain a prediction signal for the respective inter-coded block. This means that in addition to the residual signal coding included in data stream 14, such as entropy-coded transform coefficient levels representing quantized spectral domain prediction residual signal 24″, data stream 14 can also encode optional further parameters therein, such as coding mode parameters for assigning coding modes to various blocks, motion parameters for inter-coded segments, and other prediction parameters for the blocks, as well as parameters for controlling and signaling the division of pictures 12 and 12′ into their respective segments. Decoder 20 uses these parameters to divide the picture in the same way as the encoder did, assign the same prediction modes to the segments, and perform the same predictions, resulting in the same prediction signal.

[0092] 3 shows the relationship between, on the one hand, a reconstructed signal, i.e., a reconstructed picture 12′, and, on the other hand, a combination of a prediction residual signal 24′″ signaled in the data stream 14 and a prediction signal 26. As already mentioned above, the combination may be additive. The prediction signal 26 is shown in FIG. 3 as a division of the picture region into intra-coded blocks, exemplarily shown using hatching, and inter-coded blocks, exemplarily shown without hatching. The division may be a regular division of the picture region into rows and columns of square or non-square blocks, or any division, such as a multi-tree division of the picture 12 from a tree root block into multiple leaf blocks of various sizes, such as a quadtree division, a mixture of which is shown in FIG. 3, in which the picture region is first divided into rows and columns of tree root blocks, which are then further divided into one or more leaf blocks according to a recursive multi-tree division.

[0093] Again, data stream 14 may have an intra-coding mode coded for intra-coded blocks 80, which assigns one of several supported intra-coding modes to each intra-coded block 80. For inter-coded blocks 82, data stream 14 may have one or more motion parameters coded therein. Generally speaking, inter-coded blocks 82 are not limited to being temporally coded. Alternatively, inter-coded blocks 82 may be any blocks predicted from previously coded portions beyond current picture 12 itself, such as a previously coded picture of the video to which picture 12 belongs, or, if the encoder and decoder are scalable encoders and decoders, respectively, a picture of another view or a hierarchically lower layer.

[0094] The prediction residual signal 24"" in FIG. 3 is also shown as a division of the picture domain into blocks 84. These blocks are sometimes called transform blocks to distinguish them from the coding blocks 80 and 82. In fact, FIG. 3 shows that the encoder 10 and decoder 20 can use two different divisions of the picture 12 and the picture 12' into blocks: one division into coding blocks 80 and 82, and the other division into transform blocks 84. While both divisions may be the same, i.e., each coding block 80 and 82 may simultaneously form a transform block 84, FIG. 3 also shows the case where the division into transform blocks 84 forms an extension of the division into coding blocks 80, 82, for example, so that any boundary between the two blocks 80 and 82 covers the boundary between the two blocks 84; alternatively, each block 80, 82 coincides with one of the transform blocks 84 or with a cluster of transform blocks 84. However, these partitions may also be determined or selected independently of one another, such that the transformed block 84 may alternatively cross the block boundary between the blocks 80, 82. Thus, as far as the division into transformed blocks 84 is concerned, similar statements are true as those presented with respect to the division into blocks 80, 82; i.e., the blocks 84 may be the result of a regular division of the picture region into blocks (with or without arrangement into rows and columns), a recursive multi-tree division of the picture region, or a combination thereof, or any other type of blocking. As a mere aside, it should be noted that the blocks 80, 82, and 84 are not limited to being quadratic, rectangular, or any other shape.

[0095] 3 further illustrates that the combination of the prediction signal 26 and the prediction residual signal 24'''' directly results in the reconstructed signal 12'. However, it should be noted that, according to alternative embodiments, multiple prediction signals 26 can be combined into the prediction residual signal 24''' into the picture 12'.

[0096] In Fig. 3, the transform blocks 84 are assumed to have the following importance: The transformer 28 and the inverse transformer 54 perform transformations in units of these transform blocks 84. For example, many codecs use some kind of DST (Discrete Sine Transform) or DCT (Discrete Cosine Transform) for all transform blocks 84. Some codecs allow for skipping the transform for some of the transform blocks 84 so that the prediction residual signal is directly coded in the spatial domain. However, according to the embodiments described below, the encoder 10 and the decoder 20 are configured such that they support several transforms. For example, the transforms supported by the encoder 10 and the decoder 20 may comprise: DCT-II (or DCT-III), where DCT stands for Discrete Cosine Transform DST-IV, where DST stands for discrete sine transform DCT-IV DST-VII Identity Transformation (IT)

[0097] Of course, the transformer 28 supports all of the forward transform versions of these transforms, while the decoder 20 or inverse transformer 54 supports the corresponding backward or inverse versions: Inverse DCT-II (or Inverse DCT-III) Reverse DST-IV ·Inverse DCT-IV Reverse DST-VII Identity Transformation (IT)

[0098] According to the following FIG. 4 and the embodiments described thereafter, transform type dependent transform coefficient level coding or decoding can be used by an encoder or decoder.

[0099] The following description provides further details on which transforms can be supported by the encoder 10 and decoder 20. In any case, it should be noted that the set of supported transforms can include only one transform, such as one spectral-to-spatial or spatial-to-spectral transform, but it is also possible that no transforms are used by the encoder or decoder at all or for a single block 80, 82, 84.

[0100] As already outlined above, Figures 1 to 3 are presented as examples in which the inventive concepts further described below can be implemented to form specific examples of an encoder and decoder according to the present patent application. To that extent, the encoders and decoders of Figures 1 and 2 may represent possible implementations of the encoder and decoder, respectively, described later in this specification. However, Figures 1 and 2 are merely examples. However, an encoder according to an embodiment of the present patent application may perform block-based encoding of picture 12 differently from the encoder of Figure 1, using different concepts, e.g., the division into blocks 80 may be performed differently from the way illustrated in Figure 3 and / or no transform may be used at all or for single blocks. Similarly, a decoder according to an embodiment of the present patent application may perform block-based decoding of picture 12′ from data stream 14 using the coding concepts further outlined below, but may differ from decoder 20 of FIG. 2, for example, in that it subdivides the same picture 12′ into blocks in a different manner than described with respect to FIG. 3, and / or in that it does not derive prediction residuals from data stream 14 in the transform domain but in the spatial domain, for example, and / or in that it does not use transforms at all or for single blocks.

[0101] The presented invention describes a unified signaling concept for selecting multiple transform types, along with dedicated transform coefficient level coding stages for the selected transform type. Such a design results in improved compression efficiency depending on input signal characteristics for hybrid video compression applications. The present invention integrates different transform type configurations with notifications. Furthermore, a transform type dependent level coding is presented which allows for higher compression efficiency. Conversion Type Notification Integration Summary of Aspects (Informative Notes): 1. A composite MTS syntax including a DCT-II and a TSM with: Combine maximum allowed TSM and MTS sizes using a single value -Color component combinations applicable to TSM and MTS Signal Level 2. Interaction between the integrated MTS syntax and CBF For each significant transform block per component, e.g., if limited to luminance, only luminance signal MTS mode CBF after MTS mode, not before 3. Unified MTS Syntax Semantics Position of TS / DCT-II in normal MTS mode MPM list, adaptive ordering of indexes, similar to intra mode 4. Integrated MTS Syntax Binarization and Context Modeling · Unary or fixed length code for the mode Dedicated or separate context models Other context modeling for TS / DCT-2 mode

[0102] 1. Instead of considering TSM and MTS as different approaches, the presented invention combines the two elements into a unified MTS syntax. One aspect consists of using the same maximum allowed size for both MTS and TSM (compare Figure 4). This maximum size may be fixed or may be signaled at a higher level syntactic structure in the bitstream, for example at the sequence, picture, slice or tile level.

[0103] 4 shows an apparatus 100 for decoding a picture 12a using predictive coding and block-based transform residual coding. The apparatus is configured to divide the picture 12a into transform blocks 84 of different sizes and, for a given transform block 84c, select 110 a selected transform 112 by checking whether the size of the given transform block exceeds a predetermined threshold size 111. If the size of the given transform block 84c exceeds the predetermined threshold size 110, a default method 114 is used to select the selected transform 112. If the size of the given transform block 84c does not exceed the predetermined threshold size 111, a transform pointed to from a predetermined list of transforms 116 by an index transmitted in the data stream 14 for the given transform block 84c is used as the selected transform 112. The predetermined list of transforms 116 includes an identity transform 117 and a non-identity transform 118. Furthermore, the apparatus 100 is configured to decode 120 a block of coefficients (c block) from the data stream 14 for the given transform block 84c. Based on the c block and the selected transform 112, the apparatus is configured to, for example, determine or identify 130 a residual sample array 132. If the selected transform 112 is an identity transform 117, the apparatus is configured to use the block of coefficients as the residual sample array 132 of the given transform block 84c; if the selected transform 112 is not the identity transform 117, the apparatus is configured to subject the block of coefficients to an inverse transform 131 corresponding to the selected transform 112 to obtain the residual sample array 132 of the given transform block 84c. The prediction 84'c of the given transform block 84c, which may be a spatial or temporal prediction, for example, and which may not be valid for all subsequent occurrences 84''c, is modified by the apparatus using the residual sample array 132 to reconstruct the given transform block 84c.

[0104] According to an embodiment, the default method 114 of selecting a transform 110 may comprise decoding a default index from the data stream that points to a transform in a predetermined list 116, or decoding a default transform from the data stream. Alternatively, a default transform known by the device 100 may be selected 110 as the default method 114.

[0105] According to an embodiment, the apparatus 100 is configured to use a default non-identity transform for the selected transform if the size of the given transform block 84c exceeds a predetermined threshold size 111. The default non-identity transform is, for example, included in a predetermined list of transforms 116, e.g., one of the non-identity transforms 118. According to an embodiment, the device 100 is configured to derive a predetermined threshold size 111 from the data stream 14 .

[0106] According to an embodiment, the apparatus 100 is configured to decode 115 an index from a current position in the data stream 14 for a given transform block 84c if the size of the given transform block 84c does not exceed a predetermined threshold size 111, and to decode a syntax element other than an index from a current position in the data stream 14 if the size of the given transform block 84c exceeds a predetermined threshold size. A syntax element other than an index is not meant to be, for example, a skip and read, but is a separate element that is read from the data stream 14 instead of an index, in that the syntax may be the same up to that position in the data stream, but the data stream 14 does not actually contain the index.

[0107] In a preferred embodiment of the present invention, TSM and MTS are applied to the same color components. In one preferred version, both TSM and MTS are applied only to the luma component (i.e., for the chroma blocks, the standard DCT-II transform is used). In other words, transform block 84 is a luma transform block, and device 100 is configured to use a fixed default transform for the chroma transform block.

[0108] In another preferred version, both the TSM and the MTS are applied to all color components of the block. In other words, the device 100 is configured to apply, for example, the selected transform 112 to the luma and chroma components of the picture in the given transform block 84c. Additionally or alternatively, the device 100 is configured to decode 115 an index from the data stream 14 for the given transform block for each of the luma and chroma components of the picture 12a. The version to be used (only the luma component or all components) can also be signaled in the bitstream. In other words, the device 100 is configured to derive 115 from a signal in the data stream 14 whether the transform block 84 is a luma transform block and a fixed default transform should be used for the chroma transform block, whether the selected transform 112 should be applied to the luma and chroma components of the picture in the given transform block, or whether an index from the data stream should be decoded 115 for the given transform block for each of the luma and chroma components of the picture. Since we have the same requirements for all transform types, a single syntax can be transmitted in the bitstream that specifies the transform type used for each transform block. An example of such a unified syntax using the TU MTS index is shown in the table below.

[0109] [Table 8]

[0110] In the above example, the unified MTS syntax is signaled at the TU level. However, if a CU is divided into multiple TUs, the unified MTS syntax can also be signaled at the CU level, i.e., in a CU MTS index. In other words, the device 100 is configured to decode 115 an index from the data stream 14 of a coding block of a picture divided into multiple transform blocks, including, for example, a given transform block. Note that in some cases, the unified MTS syntax can be signaled as a disjoint set of CUs at a higher level, i.e., the index can be valid for a set of coding blocks. Another variation is to signal the unified MTS syntax for a discontinuous set of CUs at a higher level, where, for example, a "coding block" is one of the discontinuous sets.

[0111] According to an embodiment, the apparatus 100 can perform decoding 120 of a block of coefficients as described in Fig. 5. In other words, Fig. 5 illustrates decoding 120 of a block of coefficients 122 from the data stream 14 for a given transform block 84c. Depending on whether the selected transform 112 for the given block 84c is included in the predetermined set of one or more transforms 125, the apparatus is configured to decode 126 a coded block flag 126' from the data stream 14 indicating whether the block of coefficients 122 has at least one non-zero coefficient if the selected transform 112 for the given block is included in the predetermined set of one or more transforms 125 (see 127). Alternatively, if the selected transform 112 for the given block 84c is not included in the predetermined set of one or more transforms 125, the apparatus infers that the block of coefficients 122 has at least one non-zero coefficient (see 127'). In other words, then, do not decode the CBF from the data stream, or in further words, decode a syntax element that is different from the current part of the data stream from which the CBF is decoded if the selected transformation of the given block is included in the given set of one or more transformations.

[0112] According to an embodiment, the predetermined set of one or more transforms 125 comprises an identity transform 125a and a default non-identity transform 125b selected by default according to a default method for selecting the selected transform.

[0113] 2. In general, if all levels of a transform block are equal to 0 (i.e., CBF=0), all transform types generate the same reconstructed signal. In the state of the art, for example, the MTS transform syntax for luma is signaled only if the CBF for the luma transform block is not equal to 0, i.e., if any significance levels are present. Similarly, TSM can be selected only if the CBF is equal to 1.

[0114] In a preferred embodiment of the present invention, the combined MTS syntax of a block containing MTS and TSM information is signaled before the CBF of the block. In this configuration, if the selected transform type is not equal to one specific transform (e.g., DCT-II or transform skip), the value of CBF can be inferred to be equal to 1 (compare FIG. 6). Or, in other words, if the syntax element specifying the transform type is equal to a predetermined value, it specifies the transform represented by the predetermined value and for which the CBF is coded. However, if the syntax element specifying the transform type is not equal to a predetermined value, it specifies the transform represented by the value of the syntax element and further specifies that the CBF is equal to 1 (no CBF is transmitted for these values ​​of the transform type syntax element).

[0115] 6 shows an apparatus 100 for decoding a picture 12a using predictive coding and block-based transform residual coding. The apparatus 100 is configured to select 110, for a given transform block 84c, a selected transform 112 by decoding 115 an index from the data stream 14 for the given transform block 84c and using one transform from a predetermined list 116 of transforms to which the index points as the selected transform 112. The apparatus 100 is further configured to decode 120, for the given transform block 84c, a block of coefficients 122 from the data stream 14. The apparatus is configured to derive 130 a residual sample array 132 for the given transform block 84c from the block of coefficients 122, such that the block of coefficients 122 is associated with the residual sample array 132 according to the selected transform 112. The apparatus 100 is also configured to modify 140 a prediction 84'c of the given transform block 84c using the residual sample array 132 to reconstruct the given transform block. 5, the apparatus 100 is configured to decode 120 a block of coefficients 122 from the data stream 14 depending on whether, for a given transform block 84c, the selected transform of the given block is included in the predetermined set of one or more transforms. Thus, the apparatus is configured to decode a coded block flag 126' from the data stream 14 indicating whether the block of coefficients 122 has at least one non-zero coefficient if the selected transform for the given block is included in the predetermined set of one or more transforms, and the apparatus is configured to infer that the block of coefficients 122 has at least one non-zero coefficient if the selected transform for the given block is not included in the predetermined set of one or more transforms. In other words, the apparatus then does not decode a CBF from the data stream, or, in further words, decodes a syntax element different from the current portion of the data stream from which the CBF is decoded if the selected transform of the given block is included in the predetermined set of one or more transforms.

[0116] According to an embodiment, the predetermined set of one or more transforms 125 comprises an identity transform. Additionally or alternatively, the predetermined list of one or more transforms 116 comprises an identity transform. According to an embodiment, the predetermined set of one or more transforms 125 and the predetermined list of one or more transforms 116 may be identical. In other words, one list of transforms may be used, for example, for transform selection 116 and c-block decoding 120. The terms predetermined set of one or more transforms 125 and predetermined list of one or more transforms 116 may be interchangeable here and in all other embodiments.

[0117] According to an embodiment, the apparatus 100 is configured to populate, or populate and sort, a predetermined list of transforms in response to the data stream 14, and to decode an index from the data stream using a variable length code such that each transform in the predetermined list of transforms is assigned one codeword of the variable length code, and the codeword lengths of the codewords of the variable length code monotonically increase with the rank of the transform in the predetermined list of transforms to which the codeword is assigned. This feature is shown, for example, as transform selection 110 in FIG. 8.

[0118] In another preferred embodiment of the present invention, the CBF is signaled before the transform type. Also, if the CBF is equal to 0, the transform type is not signaled (the transform actually used does not have any effect on the decoding result; it can be inferred to be equal to DCT-II or transform skip or any other transform). Only if the CBF is equal to 1, the transform type syntax element is transmitted (compare Figure 7).

[0119] 7 shows an apparatus 100 for decoding a picture using predictive coding and block-based transform residual coding, configured to decode 120 a block of coefficients 122 from data stream 14, including decoding 120′ a coded block flag 126′ from data stream 14 indicating whether, for a given transform block, the block of coefficients 122 has at least one nonzero coefficient. If the coded block flag indicates 1271 that the block of coefficients 122 has at least one nonzero coefficient, the apparatus 100 is configured to select 110 a selected transform 112 for the given transform block by decoding 115 an index from data stream 14 for the given transform block, and use one transform from a predetermined list 116 of transforms pointed to by the index as the selected transform 112. A residual sample array 132 for the given transform block is derived 130 from the block of coefficients 122, such that the block of coefficients 122 is associated with the residual sample array 132 according to the selected transform 112. Further, the prediction 84'c of the given transform block is modified 140 using the residual sample array 132 to reconstruct the given transform block. Alternatively, if the coded block flag 126' indicates 1272 that the block of coefficients 122 does not have at least one non-zero coefficient, the apparatus 100 is configured to reconstruct 150 the given transform block without prediction modification. In other words, if the coded block flag indicates that the block of coefficients does not have at least one non-zero coefficient, then do not decode the index from the data stream, such as by decoding a syntax element that differs from the index from the current portion of the data stream in which the index is decoded.

[0120] 3. Another aspect to consider is the assignment and / or order of the unified MTS index to the allowed transform types. For example, TSM can be signaled before DCT-II type, which can have shorter codewords in the case of variable-length coding, or vice versa. For screen or computer-generated content, TSM is often preferred because high-frequency edge structures often occur and are less suitable for energy compaction performed by DCT / DST-like transforms. In such cases, it is beneficial to signal TSM before any other transform type (compare FIG. 8). Such a signal adaptation technique can be realized using a most probable transform mode (MPM) list similar to that used for intra-prediction mode coding. Instead of directly signaling the transform type, the MPM list is composed of the most probable transform types with lower indices, and the indices in the list are transmitted in the bitstream.

[0121] 8 shows an apparatus 100 for decoding pictures using predictive coding and block-based transform residual coding, configured to populate 160 or populate and sort 160′ a predefined list of transforms 116 in response to a data stream 14. The apparatus 100 is configured to decode 115 an index from the data stream 14 using a variable length code 115′ and select 110 a selected transform 112 for a given transform block by using as the selected transform one transform of the predefined list of transforms to which the index points, such that each transform in the predefined list of transforms 116 is assigned one codeword of a variable length code, the codeword length of the codeword of the variable length code monotonically increasing with the rank of the transform in the predefined list of transforms to which the codeword is assigned. Furthermore, the apparatus 100 is configured to decode 120 a block of coefficients 122 from the data stream 14 for a given transform block, and the apparatus 100 is configured to derive 130 a residual sample array 132 for the given transform block from the block of coefficients 122, such that the block of coefficients 122 is related to the residual sample array 132 according to the selected transform 112. The apparatus is further configured to modify 140 the prediction 84'c for the given transform block using the residual sample array 132 to reconstruct 140 the given transform block.

[0122] According to an embodiment, the apparatus is configured to sort 160' the predefined list of transforms 116 according to syntax elements in the data stream 14 that are globally valid for at least the picture. Additionally or alternatively, the apparatus 100 is configured to sort 160' the predefined list of transforms 116 according to evaluation of sample statistics in the spatial neighborhood of the predefined transform block. Additionally or alternatively, the apparatus 100 is configured to sort 160' the predefined list of transforms 116 according to syntax elements signaled in the data stream 14 for blocks in the spatial neighborhood of the predefined transform block. Additionally or alternatively, the apparatus 100 is configured to sort 160' the predefined list of transforms 116 such that there is at least one state of the data stream 14 such that sorting 160' the predefined list of transforms 116 places the identity transform in the leading rank, e.g., with index 0, assigned to it the shortest codeword of the variable length code, e.g., codeword 0.

[0123] According to an embodiment, the apparatus 100 is configured to decode 115 an index from the data stream 14 using a codeword of a composite variable length code consisting of a first codeword of the variable length code followed by a second codeword of the fixed length code if the first codeword is the longest codeword of the variable length code. A codeword of the composite variable length code consisting of only one of the two non-longest codewords of the variable length code is assigned to an identity transformation and a predetermined non-identity transformation to identify the identity transformation and the predetermined non-identity transformation, and further codewords of the composite variable length code are assigned to further non-identity transformations of the predetermined list of transformations to identify the further non-identity transformation. The composite variable length code can be similar to or exactly like the composite variable length code 115′ of FIG. 9.

[0124] 4. The binarization of the unified MTS syntax can be either fixed length or variable length, or a combination of both. For example, the use of DCT-II and TSM can be variable length, while fixed length is used for the remaining four non-DCT-II transform types.

[0125] In other words, the apparatus 100 for decoding pictures using predictive coding and block-based transform residual coding is configured, according to an embodiment, to select a selected transform for a given transform block by decoding an index into a predetermined list of transforms from the data stream using a codeword 115'a of a composite variable-length code 115' that is composed of a first codeword 115'a1 of the variable-length code and, if the first codeword 115'a1 is the longest codeword 115'b of the variable-length code, a second codeword 115'a2 of the fixed-length code that follows the first codeword 115'a1, as shown in Figure 9. The codeword 115'a of the composite variable-length code 115' that is composed of only one of the two non-longest codewords 115'c1 and 115'c2 of the variable-length code is assigned to and identifies the identity transform 117 and the predetermined non-identity transform 1181 included in the predetermined list of transforms 116. Further codewords of the composite variable length code are assigned to and identify further non-identity transforms 1182 to 1185 of the predetermined list of transforms 116. The apparatus is configured to select, for a given transform block, the selected transform by using one transform in the predetermined list of transforms 116 pointed to by the index as the selected transform. Furthermore, the apparatus is configured, for the given transform block, to decode a block of coefficients from the data stream, derive a residual sample array for the given transform block from the block of coefficients such that the block of coefficients is associated with the residual sample array according to the selected transform, and modify a prediction of the given transform block using the residual sample array to reconstruct the given transform block. Level coding for transform skip mode

[0126] Transform coefficient level coding, or level coding for short in the remainder of this document, is a process incorporated into the entropy coding stage of a transform coding architecture, which can be part of a hybrid video codec. In the latter architecture, prediction minimizes the energy of the original signal and results in a residual signal that undergoes a transform coding process. Typically, a transform and quantization stage modifies the residual signal and provides the result to the entropy coding stage, with the transformed and quantized coefficients referred to as transform coefficient levels. Such hybrid designs are suitable for camera-captured content. However, in real-world applications, video signals are not always captured by a camera. Therefore, transform coding techniques are not always optimal in the rate-distortion sense. A workaround that maintains the transform coding architecture is the so-called transform skip mode (TSM). As the name suggests, the transform stage is bypassed, resulting in quantization and entropy coding of the spatial residual signal. Adjustments to the entropy coding stage for TSM result in improved compression efficiency. Summary of Aspects (Informative Notes): 1. No last location notification 2. Sub-block CBF (coded_sub_block_flag) for each sub-block 3. sig_coeff_flag context modeling, including: Reduced template for sig flags, left and right only Number of important positions, not absolute sum 4. abs_level_gt1_flag and par_level_flag context modeling: 5. abs_remainder coding: Abs_remainder binarization with reduced template for Rice parameters abs_remainder with dedicated context model for each bin index Increased number of ctx-encoded bin indices ·ctx: adaptive number of coded bin indices Maximum number of context-coded bins per sample 6.coeff_sign_flag Context Modeling A different approach to context modeling Additional syntax elements that can modify the parsing process 7. Reduction of CCB and even counter base 8. Different sub-block shapes and sizes 9. Predictor-dependent adaptive scanning patterns

[0127] A similar design can be used to keep the changes to the normal level coding mode as low as possible. In particular, in contrast to the normal mode, the dedicated level coding mode for TSM does not use the last critical position information (see Figure 10). As a result, a subblock-level coded block flag (CBF) is transmitted for each subblock in a transform block (compare Figure 12). Furthermore, the cutoff value of the transition between truncated unary code and Rice / Exp-Golomb code in binarization is fixed and increases relative to the normal mode, resulting in a larger number of bins being coded in the normal mode of an entropy coder using a context adaptive model (compare claim 38 and Figure 16).

[0128] A dedicated level coding approach is particularly beneficial for TSM because the symbol source statistics are completely different from other transform candidates (typically DCT / DST transforms). However, deviations from existing normal level coding modes should be kept as low as possible to keep implementation overhead low. Furthermore, a dedicated TSM design should not be significantly more complex than the normal modes. The differences from normal level coding are explained below:

[0129] 1. Last significant scan position: The residual signal reflects the spatial residual after prediction, and since no energy compaction by transform is performed for TSM, the trailing zeros or insignificant levels in the bottom right corner of the transform block are no longer given a higher probability. Therefore, in this case, the last significant scan position notification is omitted. Instead, the first sub-block processed is the bottom right-most sub-block in the transform block (compare Figure 10).

[0130] 10 illustrates an apparatus 100 for decoding a picture using predictive coding and block-based transform residual coding, configured to select 110, for a given transform block, a selected transform 112 from a predetermined list of transforms 116, the selected transform 112 comprising an identity transform 117 and at least one non-identity transform 118. Furthermore, the apparatus 100 is configured to decode 120 a block of coefficients 122 from the data stream 14 by checking 123 whether the selected transform 112 is a non-identity transform 118 for the given transform block. If the selected transform 112 is a non-identity transform 118, the apparatus 100 is configured to decode 120 the block of coefficients 122 by decoding 124 position information from the data stream when a non-zero coefficient 121 a is first encountered along a scan order that traverses all coefficients of the block of coefficients, or when a non-zero coefficient 121 a is last encountered along a scan order that traverses all coefficients of the block of coefficients, to obtain a predetermined coefficient position. Note that in the above embodiments, this position is referred to as the last position measured along the scan order from the top left to the bottom right, but the actual scanning / coding started there according to these embodiments. That is, the actual coding was performed in reverse scan order 85, from the bottom right to the top left corner, where the scan order is the coding order. See the next embodiment, in which both scan directions are contemplated. If the selected transform 112 is a non-identity transform 118, the apparatus 100 is also configured to decode the coefficient block by decoding 121 a of the coefficient block from the data stream, which includes all non-zero coefficients of the coefficient block and is traversed by the scan order from or to a predetermined coefficient position 121 a, and inferring to be zero a second coefficient 121 b of the coefficient block that is different from the first coefficient 121 a. If the selected transform 112 is an identity transform 117, the apparatus 100 is configured to decode 120 a block of coefficients by decoding 121 ′ all coefficients of the block of coefficients from the data stream 14.Furthermore, the apparatus 100 is configured to derive 130 a residual sample array 132 for a given transform block from the block of coefficients 122 such that the block of coefficients is associated with the residual sample array 132 according to the selected transform 112, and to modify 140 a prediction 84'c for the given transform block using the residual sample array 132 to reconstruct the given transform block.

[0131] According to an embodiment, the apparatus 100 is configured, in decoding 121 of a first coefficient 121 a of a block of coefficients 122 from the data stream 14, to use a scan order 85 and to either start decoding the first coefficient 121 a at a predetermined coefficient position 121 a1 so that the first coefficient 121 a is traversed by the scan order 85 starting from the predetermined coefficient position 121 a1 (as shown by the scan order 85 in FIG. 10 ), or to end decoding 121 of the first coefficient 121 a at the predetermined coefficient position 121 a1 so that the first coefficient 121 a is traversed by the scan order 85 up to the predetermined coefficient position 121 a1 (reverse scan order; in the opposite direction to the scan order 85 shown in FIG. 10 ). Furthermore, in decoding 121 of all coefficients of the block of coefficients 122 from the data stream 14, the apparatus 100 is configured to sequentially decode all coefficients starting or ending with a coefficient of the block of coefficients last traversed by the scan order. The scan order 85 shown in Figure 10 is only an example, and different scan orders are possible.

[0132] According to an embodiment, the device 100 is configured to use the scan order 85 in decoding 121 all coefficients of a block 122 of coefficients from the data stream 14 and either finish decoding all coefficients in the block of coefficients last traversed by the scan order, or use the reverse scan order and start decoding all coefficients in the block of coefficients last traversed by the scan order. This means, for example, that coefficient position 121a2 can represent either the end or the start of the scan order, as shown in Figure 10. It should be noted that the scan order is defined to define the coding order in the case of a non-identity transform 118.

[0133] According to an embodiment, the device 100 is configured to decode 124 the position information by decoding the coordinates, e.g. (x, y), of the given coefficient position 121a1 from the data stream 14 or by decoding the rank of the given coefficient position 121a1 in the scanning order 85 from the data stream 14, e.g. a rank indicating the rank in the scanning order.

[0134] According to an embodiment, the device 100 is configured to perform the decoding 121 of the first coefficients 121 a of the block of coefficients 122 in the sub-blocks 1221 to 1224 into which the block of coefficients is divided, so that the scanning order 85 is adapted to traverse the first coefficients 121 a in different sub-blocks before inferring that the first coefficient 121 a in a sub-block that signals that a sub-block flag in the data stream 14, for example a coded sub-block flag as used in the above embodiment, is zero, and the sub-block flag in the data stream is not included in the data stream 14. A first coefficient 121a in a subblock that indicates a zero is decoded, and all first coefficients 121a in one subblock are traversed by decoding the subblock flags and the predetermined coefficient position in which the first coefficient is located from the data stream, excluding at least one of a first subblock flag associated with the subblock that includes the predetermined coefficient position and a second subblock flag associated with the subblock that includes the first coefficient of the block of coefficients therebetween, and inferring at least one of the first and second subblock flags to indicate a non-zero state. Furthermore, the device is configured to perform decoding 121 of all coefficients of a block of coefficients 122 from the data stream 14 in sub-blocks 1221-1224 into which the block of coefficients is divided, so that the scanning order traverses all coefficients in one sub-block by inferring that the coefficient in the sub-block whose sub-block flag in the data stream is zero is zero before traversing the first coefficient in a different sub-block, and decoding coefficients in the sub-block whose sub-block flag in the data stream is non-zero from the data stream, and decoding the sub-block flags from the data stream for all sub-blocks. An example of this decoding 121 is shown in Figure 11. According to Figure 11, for example, sub-blocks 1221, 1222, 1223, and 1224 are decoded in this order, thereby decoding only the first coefficients and not all second coefficients.The scan order 85 is shown as a continuous line through all the first coefficients and as a dashed ring through all the second coefficients. A reverse scan and / or reverse scan order 85 of the sub-blocks 1221-1224 is also possible.

[0135] According to an embodiment, the device 100 is configured to, in decoding the sub-block flags from the data stream for all sub-blocks, sequentially decode the sub-block flags from the data stream for all sub-blocks in sub-block order, and infer that the sub-block flag that is last in sub-block order signals non-zero if all preceding sub-block flags in sub-block order signal zero. Comparing the above embodiment in 2.b., the following can be stated: "This also includes the coded_sub_block_flag of the DC sub-block, unless all other coded_sub_block_flag syntax elements are already equal to 0. In this case, the DC coded_sub_block_flag is inferred to be equal to 1" (compare Figures 13a and 13b).

[0136] According to an embodiment, the device 100, in decoding the sub-block flags from the data stream for all sub-blocks, sequentially decodes the sub-block flags from the data stream for all sub-blocks in sub-block order, decodes a coefficient in a given sub-block whose sub-block flag that is last in sub-block order is inferred to be consecutively non-zero in coefficient order if all preceding sub-block flags in sub-block order indicate zero, decodes each coefficient in the given sub-block except for the last coefficient, an importance flag indicating whether each coefficient is non-zero, infers the last coefficient to be non-zero if the other coefficients in the given sub-block are zero, and decodes the importance flag of the last coefficient if at least one of the other coefficients in the given sub-block is non-zero. Furthermore, the apparatus 100 is configured to, in decoding the sub-block flags from the data stream excluding at least one of the first sub-block flag and the second sub-block flag, infer that the sub-block flag from the data stream excluding at least one of the first sub-block flag and the second sub-block flag is non-zero, and consequently decode, for all first coefficients in the sub-block to which the second sub-block flag relates, a significance flag indicating whether the respective coefficient is non-zero. Comparing the above embodiment where the inference of the SIG flag at (0,0) was made if all other SIG flags of this sub-block were equal to 0, see 2.b in the following description: "In this case, DC coded_sub_block_flag is inferred to be equal to 1 (inferDcSbCbf=1). Since this DC sub-block must have at least one importance level, the sig_coeff_flag syntax element in the first position at (0,0) is not signaled and is instead derived to be equal to 1 if all other sig_coeff_flag syntax elements in this DC sub-block are equal to 0 (inferSbDcSigCoeffFlag=1)."

[0137] 2. Sub-block CBF: The absence of the last critical scan position notification requires that the sub-block CBF notification with coded_sub_block_flag for TSM be modified as follows:

[0138] a. Due to quantization, the aforementioned non-significant sequences can still occur locally within a transform block. Therefore, the last significant scan position is removed as before, and coded_sub_block_flag is coded for all sub-blocks (compare Figure 12).

[0139] According to an embodiment, an apparatus 100 for decoding a picture using predictive coding and block-based transform residual coding is configured to select, for a given transform block, a selected transform from a predetermined list of transforms, the selected transform comprising an identity transform and at least one non-identity transform. Furthermore, the apparatus 100 decodes 121 coefficients of a block of coefficients from the data stream in sub-blocks into which the block of coefficients is divided, infers that coefficients in the sub-blocks for which a sub-block flag in the data stream indicates that the sub-block flag is zero, decodes coefficients in the sub-blocks for which the sub-block flag in the data stream indicates that the sub-block flag is non-zero from the data stream, and, if the selected transform 112 is one of the at least one non-identity transform (see 1231 in Figure 12), decodes a first sub-block flag 2101 associated with position information indicating non-zero, such as the sub-block flag associated with the first sub-block in scanning order, and a last sub-block flag 2102 associated with the last sub-block flag 2103. n 20. Sequentially decode 2001 the sub-block flags from the data stream 14, excluding at least one of the first sub-block flag 2101 and the last sub-block flag 2102. nis non-zero. For a non-identity transform, the probability of a non-zero coefficient in the top-left sub-block is high. Depending on the scanning order, this sub-block may be the first sub-block 2101 or the last sub-block 2102. n Furthermore, the apparatus 100 is configured to decode the block of coefficients from the data stream by, for a given transform block, decoding blocks of coefficients from the data stream in sub-blocks into which the block of coefficients is divided, inferring that coefficients in sub-blocks for which the sub-block flags in the data stream are zero are zero, decoding coefficients in sub-blocks for which the sub-block flags in the data stream are non-zero from the data stream, and decoding 2002 the sub-block flags from the data stream for all sub-blocks if the selected transform 112 is an identity transform (see 1232 in FIG. 12 ). In the case of an identity transform, no sub-blocks with a high probability of non-zero coefficients are known, and therefore all sub-block flags need to be decoded. Furthermore, the apparatus is configured to derive a residual sample array for the given transform block from the block of coefficients, such that the block of coefficients is associated with the residual sample array according to the selected transform, and to modify a prediction of the given transform block using the residual sample array to reconstruct the given transform block. This apparatus may be similar to the apparatus shown in FIG. 10, except that the decoding 120 of the c-block is performed as shown in FIG.

[0140] b. The coded_sub_block_flag for the sub-block covering the DC frequency position (top-left sub-block) presents a special case. In state-of-the-art level coding, the coded_sub_block_flag of this sub-block is never signaled and is always inferred to be equal to 1. When the last critical scan position is located within another sub-block, it means that there is at least one importance level outside the DC sub-block. As a result, the DC sub-block can contain all zero / non-importance levels, although its coded_sub_block_flag is inferred to be equal to 1. If the last scan position information is not present in the TSM, the coded_sub_block_flag of each sub-block is signaled. This also includes the coded_sub_block_flag of the DC sub-block (compare Figure 12), except if all other coded_sub_block_flag syntax elements are already equal to 0 (compare Figures 13a and 13b). In this case, DC coded_sub_block_flag is inferred to be equal to 1 (inferDcSbCbf=1). Since there must be at least one importance level in this DC sub-block, the sig_coeff_flag syntax element in the first position at (0,0) is not signaled, but is instead derived to be equal to 1 (inferSbDcSigCoeffFlag=1) if all other sig_coeff_flag syntax elements in this DC sub-block are equal to 0 (compare claim 30 and claim 33). This is not the case in state-of-the-art level coding.

[0141] According to the embodiment, the device 100 is similar to the device shown in FIG. 10, with the difference that the decoding 120 of the c block is performed as shown in FIG. 12, for all sub-blocks 1221 to 1222. 36 In decoding the sub-block flags from the data stream, all the sub-blocks 1221 to 1222 368. The sub-block flags are sequentially decoded from the data stream in sub-block order 85, and at least one of the preceding sub-block flags preceding in sub-block order is non-zero (e.g., sub-block 122 32 Sub-block flags and sub-block 122 18 13a) is non-zero), the sub-block flag that is last in the sub-block order, e.g., sub-block 122 36 and decodes the sub-block flags of all preceding sub-blocks, e.g., all preceding sub-blocks 1221 to 1222 35 If the flag of the subblock is zero (compare FIG. 13b), the flag of the subblock that is last in the subblock order, e.g., subblock 122 36 is configured to infer that the sub-block flags of

[0142] According to an embodiment, the device 100 is configured to infer the last coefficient in the sub-block for which the last sub-block flag is inferred to be non-zero to indicate non-zero when inferring the sub-block flag that is last in sub-block order to be non-zero if all preceding coefficients in the sub-block are zero.

[0143] According to an embodiment, the apparatus 100 is configured to decode a currently decoded sub-block flag from the data stream by context-adaptive entropy decoding and using a context that depends on the logical sum of sub-block flags associated with sub-blocks adjacent to the currently decoded sub-block flag if the selected transform is one of the at least one non-identity transform, and on the arithmetic sum of sub-block flags associated with sub-blocks adjacent to the currently decoded sub-block flag if the selected transform is an identity transform.

[0144] c. If there is only one sub-block in the transform block, coded_sub_block_flag is never signaled as the most advanced level coding (this is included in the previous case, since no sub-block with CBF equal to 1 was transmitted for the current transform block).

[0145] d. Furthermore, the context modeling of coded_sub_block_flag is changed: the context model index is calculated as the sum of the CBF of the right sub-block coded_sub_block_flag(R) and the CBF of the sub-block below coded_sub_block_flag(B) instead of the logical OR of both, i.e. coded_sub_block_flag(R)|coded_sub_block_flag(R) (compare Figure 14).

[0146] According to an embodiment, an apparatus 100 for decoding a picture using predictive coding and block-based transform residual coding is configured to select, for a given transform block, a selected transform 112 from a predetermined list of transforms, the selected transform comprising an identity transform and at least one non-identity transform. Furthermore, the apparatus 100 is configured to decode 121 coefficients of a block of coefficients from the data stream in sub-blocks into which the block of coefficients is divided, infer that coefficients in sub-blocks for which the sub-block flag in the data stream is zero are zero, decode coefficients in sub-blocks for which the sub-block flag in the data stream is non-zero from the data stream, and decode 200 a currently decoded sub-block flag from the data stream by context adaptive entropy decoding if the selected transform is one of at least one non-identity transform, and decode 120 a block of coefficients 122 from the data stream 14 for a given transform block by using the context 300 to depend on a logical sum 310 of sub-block flags associated with sub-blocks adjacent to the currently decoded sub-block flag and, if the selected transform is one of the at least one non-identity transform, an arithmetic sum 320 of sub-block flags associated with sub-blocks adjacent to the currently decoded sub-block flag. Furthermore, the apparatus 100 is configured to derive a residual sample array for a given transform block from the block of coefficients such that the block of coefficients is associated with the residual sample array according to the selected transform, and to modify a prediction of the given transform block using the residual sample array to reconstruct the given transform block. This apparatus may be similar to the apparatus shown in Figure 10, except that decoding 120 of the c block is performed as shown in Figure 14.

[0147] According to an embodiment, the apparatus 100 is configured to decode from the data stream, for a current coefficient in a sub-block that signals that a sub-block flag in the data stream is non-zero, a significance flag indicating whether the current coefficient is zero or not, using a context that depends on the number 310 of non-zero coefficients from a first set of coefficients that are directly neighboring the current coefficient if the selected transform is an identity transform, or on the number 320 of non-zero coefficients from the second set of coefficients that includes the first set of coefficients, the coefficients that are located further from the current coefficient than the first set of coefficients, the value of the second set of coefficients, and the position of the current coefficient if the selected transform is one of at least one non-identity transform.

[0148] 3. sig_coeff_flag Context Modeling: The context modeling for sig_coeff_flag uses a local template similar to the state-of-the-art level coding mode described above. However, it only considers the right neighbor (NB0) and the bottom neighbor (NB1) of the current scan position. The context model offset is only the number of significant neighbors, sig_coeff_flag(NB0) + sig_coeff_flag(NB1). Thus, the selection of different context sets depending on the diagonal d within the current transform block is eliminated. This results in three context models and a single context model set for coding the sig_coeff_flag flag (compare Figure 15).

[0149] According to an embodiment, an apparatus 100 for decoding pictures using predictive coding and block-based transform residual coding is configured to select, for a given transform block, a selected transform from a predetermined list of transforms, the selected transform comprising an identity transform and at least one non-identity transform. Furthermore, the apparatus 100 is configured to decode 120, for the given transform block, a block of coefficients 122 from a data stream 14 by decoding 400, for a given transform block, an importance flag from the data stream indicating whether the current coefficient is zero or not, using a context 300 that depends on a number 310 of non-zero coefficients from a first set of coefficients immediately adjacent to the current coefficient if the selected transform 112 is the identity transform, or on a number 320 of non-zero coefficients from a second set of coefficients including the first set of coefficients, coefficients located farther from the current coefficient than the first set of coefficients, a value of the second set of coefficients, and a position of the current coefficient if the selected transform 112 is one of the at least one non-identity transform. Furthermore, the apparatus 100 is configured to derive a residual sample array for a given transform block from the block of coefficients 122 such that the block of coefficients is associated with the residual sample array according to the selected transform, and to modify the prediction of the given transform block using the residual sample array to reconstruct the given transform block. This apparatus may be similar to the apparatus shown in Figure 10, except that decoding 120 of the c block is performed as shown in Figure 15.

[0150] According to an embodiment, the apparatus 100 is configured to decode a given coefficient by context-adaptive entropy decoding N greater-than-X flags indicating whether the absolute value of the given coefficient is greater than X, and decoding using a variable length code a remainder indicating the amount by which the absolute value of the given coefficient exceeds an absolute threshold that depends on N, where N is greater when the selected transform is an identity transform compared to when the selected transform is one of the at least one non-identity transform.

[0151] 4. abs_level_gt1_flag and par_level_flag context modeling: A single context model is used for the flags abs_level_gt1_flag and par_level_flag.

[0152] 5. abs_remainder coding: The empirical distribution of absolute levels typically still fits a Laplacian or geometric distribution, but there is a greater instantiation than the transformation coefficients. In particular, the variance within a window of successive realizations is higher than usual. This prompts the following modifications to the abs_remainder syntax binarization and context modeling:

[0153] a. Higher cutoff values ​​in binarization, i.e., the transition points from coding with sig_coeff_flag, abs_level_gt1_flag, par_level_flag, and abs_level_gt3_flag to Rice coding for abs_remainder, and using dedicated context models for each bin position, result in higher compression efficiency (compare Figure 16). Increasing the cutoff results in more "greater than X" flags, for example, by introducing abs_level_gt 5_flag, abs_level_gt 7_flag, etc. until the cutoff is reached (numGtXFlag). The cutoff itself may be fixed for all transform block sizes, or fixed depending on the transform block size, or adaptively selected depending on already coded transform blocks, or signaled at a higher-level syntax structure in the bitstream, for example, at the sequence, picture, slice, or tile level.

[0154] b. The number of context-coded bins that specify whether the absolute level is greater than the threshold can be either fixed or adaptive. Each bin index uses a dedicated context model.

[0155] c. The template for Rice parameter derivation is modified, i.e., only the left and bottom neighbors of the current scanning position are considered to be similar to the local template for sig_coeff_flag context modeling.

[0156] According to an embodiment, an apparatus 100 for decoding a picture using predictive coding and block-based transform residual coding is configured to select, for a given transform block, a selected transform from a predetermined list of transforms, the selected transform comprising an identity transform and at least one non-identity transform. Furthermore, the apparatus 100 is configured to decode 120, for the given transform block, a block of coefficients 122 from the data stream 14 by context-adaptive entropy decoding 500 N greater-than-X flags indicating whether the absolute value of the given coefficient is greater than X, and decoding 600 a remainder indicating an amount by which the absolute value of the given coefficient exceeds an absolute threshold that depends on N, where N is greater when the selected transform is the identity transform compared to when the selected transform is one of the at least one non-identity transform. Furthermore, the apparatus is configured to derive a residual sample array for the given transform block from the block of coefficients, such that the block of coefficients is associated with the residual sample array according to the selected transform, and to modify the prediction of the given transform block using the residual sample array to reconstruct the given transform block. This apparatus may be similar to the apparatus shown in FIG. 10, except that the decoding 120 of the c-block is performed as shown in FIG.

[0157] According to an embodiment, apparatus 100 is configured to perform context adaptive entropy decoding of N greater than X flags in a series of passes by context adaptive entropy decoding the N greater than X flags sequentially while increasing X by one or more of the N greater than X flags for each pass, and the apparatus is configured to record the number of flags encoded using context adaptive entropy decoding during the series of passes and to stop context adaptive entropy decoding of the N greater than X flags if the number exceeds a predetermined flag threshold.

[0158] According to an embodiment, the variable length code is a Rice code, and the apparatus 100 is configured to determine Rice parameters of the Rice code in response to a first set of coefficients that are directly adjacent to the predetermined coefficient if the selected transform is an identity transform, and in response to a second set of coefficients that includes coefficients and the first set of coefficients that are located further from the predetermined coefficient than the first set of coefficients if the selected transform is one of the at least one non-identity transform.

[0159] According to an embodiment, the apparatus 100 is configured to decode the code of a predetermined coefficient by performing context-adaptive entropy decoding using a predetermined context, updating a probability associated with the predetermined context if the selected transform is an identity transform, and by bypass coding (e.g., context-adaptive entropy coding with fixed equal probabilities) if the selected transform is one of at least one non-identity transform.

[0160] 6. coeff_sign_flag Context Modeling: Due to the instantiation within a sequence of codes and the fact that intra predictions are often biased, codes can be coded using a context model even when the global empirical distribution is approximately uniform. A single dedicated context model can be used to code the code. Alternatively, the context model can rely on neighboring codes evaluated using a local template. A further alternative is the use of a fixed context model for the current sub-block with a context offset derived using neighboring sub-blocks and their code symbols. Codes are instead coded by the context model using the bypass mode of the entropy coder (compare Figure 17).

[0161] According to an embodiment, an apparatus 100 for decoding a picture using predictive coding and block-based transform residual coding is configured to select, for a given transform block, a selected transform from a predetermined list of transforms, the selected transform comprising an identity transform and at least one non-identity transform. Furthermore, the apparatus 100 is configured to decode 120, for the given transform block, a block of coefficients 122 from a data stream 14 by decoding 700 the sign of the given coefficient. In decoding the sign of the given coefficient, the apparatus 100 is configured to use a predetermined context 710 (e.g., select a context depending on the signs of coefficients of a block of coefficients neighboring the given coefficient) and use context-adaptive entropy decoding that updates probabilities associated with the predetermined context 710 if the selected transform 112 is the identity transform, and to use bypass decoding (e.g., context-adaptive entropy decoding with fixed equal probabilities) if the selected transform 112 is one of the at least one non-identity transform. The apparatus is further configured to derive a residual sample array for a given transform block from the block of coefficients such that the block of coefficients is associated with the residual sample array according to the selected transform, and to modify a prediction of the given transform block using the residual sample array to reconstruct the given transform block. This apparatus may be similar to the apparatus shown in Figure 10, except that decoding 120 of the c block is performed as shown in Figure 17.

[0162] According to an embodiment, the device 100 is configured to select a given context 710 from among a plurality of contexts depending on statistics of the signs of previously decoded coefficients if the selected transform is an identity transform.

[0163] According to an embodiment, the apparatus 100 is configured to select the predetermined context 710 depending on the relative frequency of positive or negative signs among the non-zero coefficients in the previously decoded coefficients if the selected transform is an identity transform. According to an embodiment, the apparatus 100 is configured to set the number of context models of the plurality of context models to a default number. According to an embodiment, the apparatus 100 is configured to derive several context models of a plurality of context models from a data stream.

[0164] According to an embodiment, the device 100 is configured to associate a context model with adjacent and non-overlapping relative frequency intervals of the relative frequencies of positive or negative signs, and to perform a selection among the relative frequencies of positive or negative signs among the non-zero coefficients of the previously decoded coefficients to be included in the relative frequency interval associated with a given context model.

[0165] According to an embodiment, the apparatus 100 is configured to determine statistics over the codes of the previously decoded coefficients such that the previously decoded coefficients are spread over a picture or video portion larger than a given transform block.

[0166] According to an embodiment, the apparatus 100 is configured to entropy decode the signs of all non-zero coefficients of a given transform block using a given context model if the selected transform is an identity transform.

[0167] According to an embodiment, the apparatus 100 is configured to entropy decode signs of a subset of non-zero coefficients of a predetermined transform block located within a sub-block of the block of coefficients and comprising a non-zero predetermined coefficient using a predetermined context model, update the statistics using the signs of the subset of non-zero coefficients of the predetermined transform block to obtain updated statistics, select a further predetermined context model from among a plurality of context models depending on the updated statistics, and if the selected transform is an identity transform, entropy decode signs of a further subset of non-zero coefficients of the predetermined transform block located within a further sub-block of the block of coefficients using the further predetermined context model.

[0168] According to an embodiment, the apparatus 100 is configured to update sign probabilities associated with a given context model based on the signs of the given non-zero coefficients if the selected transform is an identity transform.

[0169] According to an embodiment, the device 100 is configured such that a plurality of context models are divided into sets of context models, and the device performs the selection by selecting a predetermined set of context models based on statistics of signs of previously decoded coefficients, and if the selected transformation is an identity transformation, by selecting a predetermined context model from the selected set of context models depending on signs of one or more adjacent non-zero coefficients, such as those located at the respective signs and at template positions surrounding them.

[0170] According to an embodiment, the apparatus is configured to, if the selected transform is one of the at least one non-identity transform, perform context adaptive entropy decoding of the N greater than X flags in a series of passes by context adaptive entropy decoding the N greater than X flags sequentially while increasing X by one or more of the N greater than X flags in each pass, record the number of flags encoded using context adaptive entropy decoding during the series of passes, and stop context adaptive entropy decoding of the N greater than X flags if the number exceeds a predetermined flag threshold. Furthermore, when the selected transform is an identity transform, the apparatus 100 is configured to sequentially perform context-adaptive entropy decoding of the N greater-than-X flags, decode an importance flag (X=0) among the N greater-than-X flags, and then decode a greater-than-X flag-bypass flag indicating whether a predetermined coefficient is greater than the absolute threshold before further N greater-than-X flags among the N greater-than-X flags, and stop the context-adaptive entropy decoding of the N greater-than-X flags in the case of a greater-than-X flag-bypass flag indicating that the predetermined coefficient is greater than the absolute threshold (e.g., resume the context-adaptive entropy decoding of the N greater-than-X flags for further greater-than-X flags except for the last one among the N greater-than-X flags).

[0171] 7. CCB Reduction: The first scan pass, i.e., the transmission of the sig_coeff_flag, abs_level_gt1_flag, and par_level_flag syntax elements, remains unchanged. However, the restriction on the number of context-coded bins (CCBs) is removed and handled differently as follows:

[0172] By specifying a mode that disables a.CCB>k, where k is a positive integer, a reduction in the number of CCBs can be guaranteed. Note that for the regular level coding mode in the current VVC development, k=2. Such a restriction is equivalent to a reduction in the quantization space.

[0173] b. To avoid such limitations, an additional flag can be signaled after the sig_coeff_flag syntax that specifies whether the absolute level is greater than the threshold achievable by the CCB. For example, the number of additional greater flags can be set equal to 4 (numGtXFlags=5), resulting in 8 CCBs (sig_coeff_flag, abs_level_gt1_flag / abs_level_gtX_flag(0), par_level_flag, abs_level_gt3_flag / abs_level_gtX_flag(1), abs_level_g5_flag / abs_level_gtX_flag(2), abs_level_g7_flag / abs_level_gtX_flag(3), abs_level_g9_flag / abs_level_gtX_flag(4), coeff_sign_flag). In such a configuration, the absolute level that can be signaled by the CCB is equal to 9. The level limit flag then indicates that the current absolute level is greater than 9, and therefore the number of CCBs for the transform block can be reduced. Note that such a concept may only be possible for TSMs, not for regular transformed and quantized transform blocks (compare Figure 18).

[0174] According to an embodiment, an apparatus 100 for decoding a picture using predictive coding and block-based transform residual coding is configured to select, for a given transform block, a selected transform 112 from a predetermined list of transforms, the selected transform 112 comprising an identity transform and at least one non-identity transform. Furthermore, the apparatus 100 is configured to decode 120, for the given transform block, a block 122 of coefficients from a data stream by decoding the given coefficient. In decoding the given coefficient, the apparatus 100 is configured to use context-adaptive entropy decoding 800 of N greater-than-X flags (e.g., N gtX_flags such as gt1_flag, gt2_flag, etc. of FIG. 18 ) indicating whether the absolute value of the given coefficient is greater than X, and to use a variable length code to decode a remainder 810 indicating the amount by which the absolute value of the given coefficient exceeds an absolute threshold that depends on N.When decoding a given coefficient, the apparatus 100 performs context adaptive entropy decoding 800 of the N greater than X flags in a series of passes 8201 to 8203 by context adaptive entropy decoding 800 of the N greater than X flags sequentially 830 while increasing X by one or more of the N greater than X flags per pass if the selected transform is one of the at least one non-identity transform, records a number 832 of flags coded using context adaptive entropy decoding during the series of passes 830, and stops the context adaptive entropy decoding 800 of the N greater than X flags if the number 832 exceeds a predetermined flag threshold 834, and when the selected transform 112 is an identity transform (e.g., TSM = Transform Skip Mode), performs context adaptive entropy decoding 800 of the N greater than X flags sequentially 830 while increasing X by one or more of the N greater than X flags per pass. The apparatus 100 is configured to perform context adaptive entropy decoding 800, and after decoding an importance flag 840 (X=0) among the N greater than X flags, decode a greater than X flag-bypass flag 850 indicating whether a given coefficient is greater than the absolute threshold, before N further greater than X flags such as gt1_flag among the N greater than X flags, and stop context adaptive entropy decoding of the N greater than X flags for the further greater than X flags in case of a greater than X flag-bypass flag 852 indicating that the given coefficient is greater than the absolute threshold (e.g., resume context adaptive entropy decoding of the N greater than X flags for the further greater than X flags except for the last one of the N greater than X flags in case of a greater than X flag-bypass flag 854 indicating that the given coefficient is not greater than the absolute threshold). Further, the apparatus 100 is configured to derive a residual sample array for the given transform block from the block of coefficients such that the block of coefficients is associated with the residual sample array according to the selected transform, and to modify a prediction of the given transform block using the residual sample array to reconstruct the given transform block. FIG. 18 shows an example of decoding a block of coefficients in multiple (at least two) passes or scans.18, if the selected transform 112 is a non-identity transform, then in the first scan only sig_flag is decoded, parity_flag and gt1_flag are decoded, and in the second through Nth scans all remaining gtX_flags are decoded. Alternatively, if the selected transform is an identity transform, gtX_bypass_flag 850 indicates whether gtX_flags need to be decoded or whether decoding of gtX_flags can be skipped and only the remainder needs to be decoded.

[0175] c. Because a large number of bins using the normal mode of the entropy coder presents challenges in hardware architecture implementation, limiting their number is beneficial. The approach is bitstream-limited: coding decisions resulting in a number of context-coded bins larger than a certain threshold are invalid, so a conforming decoder can predict the maximum number of context-coded bins given a conforming bitstream. Alternatively, the number of context-coded bins is tracked for each transform block. Within the processing of a transform block, when a limit is reached, all remaining level information is transmitted using a bypass mode, either without changing the binarization or with changed binarization (compare Figure 20). In the latter configuration, each absolute level is binarized using a combination of Rice / Exp-Golomb coding; that is, truncated unary parts no longer participate in the binarization process.

[0176] According to an embodiment, the device 100 is configured to select, for a given transform block, a selected transform from a predetermined list of transforms to decode a picture using predictive coding and block-based transform residual coding, the predetermined list of transforms comprising an identity transform and at least one non-identity transform. Furthermore, the apparatus 100 is configured to decode a block of coefficients from the data stream for a given transform block by decoding, for each coefficient from the data stream using context adaptive binary entropy decoding in a series of passes traversing the coefficients of the block, one or more predetermined flags, for example sig_flag 92, par_flag 96 (parity_flag), gt1_flag 98 (greater than X flag if X=1) and / or gt2_flag 104 (greater than X flag if X=2), and / or parity flags and / or further greater than X flags as shown in FIG. 20 , wherein each predetermined flag indicates where the absolute value of the respective coefficient is located (e.g., the absolute value domain starts at the beginning of one or more passes, e.g., for an X-bit representation, coefficients 0...2 X-1(e.g., parity bits 96 reduce the magnitude domain 90 by half by excluding even or non-even magnitude values, and greater-than-X flags, e.g., gt1_flag 98 and gt2_flag 104, reduce the domain 90 of possible magnitude values ​​by excluding one of the possible magnitude values ​​or excluding all but this one possible magnitude value). Furthermore, the apparatus 100 is configured to decode, for a given transform block, a block of coefficients from the data stream by decoding, in a series of passes traversing the coefficients of the block, a codeword of a variable length code (e.g., a Rice / Exp-Golomb code) indicating the absolute value of the respective coefficient in the absolute value domain 90 of the respective coefficient, for each coefficient whose cardinality of the absolute value domain 90 is not reduced to one by one or more predetermined flags 92, 96, 98, 104 decoded for the respective coefficient (e.g., the code length of the variable length code may monotonically increase as the absolute value increases, see 8701 to 8705). The apparatus 100 is configured to derive a residual sample array for the given transform block from the block of coefficients, such that the block of coefficients is associated with the residual sample array according to the selected transform, and to modify a prediction of the given transform block using the residual sample array to reconstruct the given transform block. Furthermore, the apparatus is configured to stop decoding one or more predetermined flags 92, 96, 98, 104 in successive passes (i.e., the total number of predetermined flags decoded so far for all coefficients reaches a limit) so that, in decoding the one or more predetermined flags 92, 96, 98, 104, the cardinality of the absolute value domain to which the pointers point is smaller for the first set of non-zero coefficients compared to the second set of non-zero coefficients (i.e., smaller for coefficients before the limit is reached in the last pass compared to coefficients after the limit is reached), and the apparatus is configured to use different variable length codes for the codewords of the variable length codes of the first and second sets of non-zero coefficients (see FIG. 20 ).

[0177] To illustrate the outlined concept of limiting the number of context-adaptively coded / decoded flags, refer to FIG. 20. FIG. 20 shows the initial value domain of the absolute value domain of the quantization indexes of a transform coefficient at 90. This initial value domain can encompass all integer values ​​between zero and some maximum value. The initial value domain can also be an interval that opens up toward larger numbers. The number of integer values ​​in the initial value domain 90 does not necessarily have to be a power of two. Furthermore, FIG. 20 shows various flag types involved in the representation of individual quantization indexes, i.e., the indication of their absolute values. A sig_flag type exists that indicates whether the absolute value of a quantization index is zero. That is, sig_flag 92 divides the initial value domain 90 into two subparts: one containing only zero and the other containing all other possible values. That is, sig_flag already uniquely indicates the absolute value of a quantization index if the quantization index happens to be zero, as shown in the lower part of FIG. 14. The non-zero values ​​of the initial value domain 90 form a value domain 94 that is further divided into two halves by a flag type par_flag, i.e., odd values ​​on the one hand and even values ​​on the other. The par_flag 96 needs to be present for a particular quantization index only if the latter is non-zero. The par_flag 96 does not provide uniqueness with respect to one half of the same value domain 94. It designates one half as the next resulting (recursively defined) value domain, and thus the next flag, namely, gt1_flag 98, after par_flag further divides this resulting value domain into two halves: odd non-zero values ​​100 if the quantization index value is odd, and even non-zero values ​​102 if the quantization index value is even non-zero. In particular, the division by gt1_flag 98 is performed so that one half simply contains the smallest odd value of value domain 100 or the smallest non-zero even value of domain 102, respectively. The other half contains all other values ​​in the respective domain 100 / 102.20, this means that if a particular transform coefficient happens to be zero, only sig_flag 92 is coded for the quantization index of the particular transform coefficient; if a particular transform coefficient happens to fall in value interval 106 containing absolute values ​​1 and 2, sig_flag, par_flag, and gt1_flag 92, 96, and 98 are coded to represent the particular quantization index of the particular transform coefficient; if a particular transform coefficient happens to fall in the immediately following value interval 108 containing values ​​3 and 4, all flags 92, 96, 98, and 104 are coded to represent the absolute value of the quantization index of the particular transform coefficient; and further, the remainder is coded for the quantization index of the transform coefficient whose absolute value falls in remainder interval 110 of initial value domain 90. Flags of flag types 92, 96, and 98 are coded, for example, in the first pass. Flag 104 is coded, for example, in the second pass. These flags are coded using context-adaptive arithmetic coding. However, the number of flags coded in a pass may be limited, for example, by a predetermined flag threshold as described with reference to FIG. 18 . Flags of flag types 92, 96, and 98 are coded for the currently visited transform coefficient position in the first pass along the order 85 only if all three flag types can still be coded in pass 8201 without the total number of coded flags in pass 601 exceeding the maximum allowable number of flags to be coded / decoded in pass 601. Similarly, flags of flag type 104 are coded for the currently visited transform coefficient position in the second pass 8202 along the order 85 only if the total number of coded flags 834 in pass 602 can still be coded in pass 8202 without exceeding the maximum allowable number of flags to be coded / decoded in pass 8202.

[0178] According to an embodiment, the different variable length codes for the codewords of the variable length codes of the first and second non-zero coefficient sets differ in binarization boundaries (cutoff values) between the transitions from the unary part to the Rice- and Exp-Golomb parts and / or in binarization parameters of the common binarization scheme.

[0179] According to an embodiment, the different variable length codes for the codewords of the variable length codes of the first and second non-zero coefficient sets differ in binarization boundaries (cutoff values) between the transitions from the unary part to the Rice- and Exp-Golomb parts and / or in different dependencies of the binarization parameters of the common binarization scheme on previously decoded coefficients.

[0180] 8. Scan Passes: The transmission order of syntax elements can be changed. It is generally beneficial to consecutively code all bypass-coded bins of a sub-block. There are several possibilities for organizing the normally-coded bins in one or more scan passes. In one version of the invention, all normally-coded bins (including the coeff_sign_flag flag) are coded in one scan pass, and all bypass-coded bins are coded in a second scan pass. In another version, the normally-coded bins are transmitted in multiple scan passes. For example, the bins sig_coeff_flag, abs_level_gt1_flag / abs_level_gtX_flag(0), and par_level_flag are coded in the first scan pass. abs_level_gt3_flag / abs_level_gtX_flag(1), abs_level_g5_flag / abs_level_gtX_flag(2), abs_level_g7_flag / abs_level_gtX_flag(3), abs_level_g9_flag / abs_level_gtX_flag(4) are coded in the second scan pass, and the coeff_sign_flag flag is coded in the third scan pass (and all bypass coded abs_remainder syntax elements are coded in a separate pass). In another example, sig_coeff_flag, coeff_sign_flag, sig_coeff_flag, abs_level_gt1_flag- / abs_level_gtX_flag(0), and par_level_flag are coded in one scan pass, and abs_level_gt3_flag / abs_level_gtX_flag(1), abs_level_g5_flag / abs_level_gtX_flag(2), abs_level_g7_flag / abs_level_gtX_flag(3), abs_level_g9_flag / abs_level_gtX_flag(4) are coded in a second scan pass (again, all bypass-coded abs_remainder syntax elements are coded in another pass).In another example, sig_coeff_flag, abs_level_gt1_flag / abs_level_gtX_flag(0), and par_level_flag are coded in a first scan pass. The additional gtX flags abs_level_gt3_flag / abs_level_gtX_flag(1), abs_level_g5_flag / abs_level_gtX_flag(2), abs_level_g7_flag / abs_level_gtX_flag(3), abs_level_g9_flag / abs_level_gtX_flag(4) are coded in a separate scan pass, and the coeff_sign_flag flag is coded in another separate scan pass (again, all bypass-coded abs_remainder syntax elements are coded in separate passes) (compare Figure 19).

[0181] According to an embodiment, an apparatus 100 for decoding pictures using predictive coding and block-based transform residual coding is configured to select, for a given transform block, a selected transform from a predetermined list of transforms, the selected transform comprising an identity transform and at least one non-identity transform. Furthermore, the apparatus 100 is configured to decode 120, for a given transform block, a block of coefficients 122 from the data stream 14 in a series of passes that traverse the coefficients of the block of coefficients in a predetermined scan order for the given coefficient by context-adaptive entropy decoding N greater-than-X flags indicating whether the absolute value of the given coefficient is greater than X, decoding a remainder indicating an amount by which the absolute value of the given coefficient exceeds an absolute threshold that depends on N using a variable-length code, and decoding a sign of the given coefficient, wherein the apparatus is configured to distribute the decoding of the N greater-than-X flags, remainder, and sign differently across the series of passes depending on whether the selected transform is the identity transform or one of the at least one non-identity transform (see, e.g., FIG. 19 ). Furthermore, the apparatus 100 is configured to derive a residual sample array for a given transform block from the block of coefficients such that the block of coefficients is associated with the residual sample array according to the selected transform, and to modify a prediction of the given transform block using the residual sample array to reconstruct the given transform block.

[0182] 9. Additionally, the scan may be reversed relative to normal mode so that sample positions within a transform block are processed in a forward direction rather than in reverse order as in normal mode. The use of forward scan is beneficial when combining level coding with differential pulse code modulation (DPCM) techniques such as block DPCM or residual DPCM, where each sample is independently quantized and reconstructed.

[0183] In other words, the apparatus 100 for decoding pictures using predictive coding and block-based transform residual coding is configured to select, for a given transform block, a selected transform from a predetermined list of transforms, the selected transform comprising an identity transform and at least one non-identity transform. Furthermore, if the selected transform is a non-identity transform, the apparatus is configured to decode, for the given transform block, a block of coefficients from the data stream by decoding coefficients of the block of coefficients from the data stream along a first scan order (e.g., scan order 85 as shown in FIG. 13b) (possibly following this order several times in several passes) toward the DC coefficient of the non-identity transform (e.g., starting from the highest frequency coefficient thereafter, possibly from the “last” significant coefficient position). Furthermore, if the selected transform is an identity transform, the apparatus is configured to decode, for the given transform block, a block of coefficients from the data stream by decoding coefficients of the block of coefficients from the data stream along a second scan order (e.g., scan order 85 as shown in FIG. 13a) from the upper-left sample position to the lower-right sample position. Furthermore, the apparatus 100 is configured to derive a residual sample array for a given transform block from the block of coefficients such that the block of coefficients is associated with the residual sample array according to the selected transform (this step may include, in the case of an identity transform, adding to each coefficient the coefficients present in the block on a given side, such as the left side in the case of horizontal DPCM or the top of the respective coefficient in the case of vertical DPCM, so as to perform DPCM inversion), and to modify the prediction of the given transform block using the residual sample array to reconstruct the given transform block.

[0184] According to an embodiment, the device 100 is configured to select a second scanning order depending on the DPCM direction used to encode a given transform block, e.g., horizontal raster scanning for horizontal DPCM and vertical raster scanning for vertical DPCM. Encoding of code syntax elements in TSM

[0185] For a regularly transformed residual signal, the expected values ​​of the levels are primarily zero, i.e., the absolute levels are statistically distributed around a value equal to zero. As a result, code values ​​are transmitted in the bypass mode of the entropy coder using an adaptive context model because they have equal probability distribution. In contrast to what is observed for camera-captured content, levels in TSM tend to have the same bias for a given region, i.e., they are locally biased, but the expected values ​​may be equal to the value zero, as in the case of camera-captured content. As a result, encoding code information using a context model for an entropy coding engine using adaptive context modeling is beneficial. The context model selection for encoding code values ​​can be locally designed, for example, using a local template that evaluates neighboring spatial locations. The present invention describes a further step that can be combined with existing context modeling of code values ​​in one or more TSM modes for which the transformation characteristics are not appropriate. Forward Adaptive Configuration

[0186] When encoding code values ​​using a context model, a lower limit exists due to the actual design of the entropy coding engine, or in other words, the minimum codeword length is limited due to the implementation of the entropy coding engine, but the theoretical minimum codeword length may be shorter. A solution is to transmit an additional syntax element in the bitstream indicating whether all codes in a region have the same value (compare Figure 22). Several configurations are possible, and can be combined depending on further data such as block size and / or operation point. The region configuration can be per sub-block (compare claim 56), per transform block (compare claim 60), or a combination of both (compare claim 61). In all three cases, the region may be fixed. Alternatively, the region configuration can be adaptive (compare claim 59), depending, for example, on the number of consecutive scan positions within the transform block and on statistics occurring within the adaptive region and / or within the previous region relative to the current region within the same sub-block, transform block, and / or coding unit.

[0187] According to an embodiment, the apparatus 100 is configured to select, for a given transform block, a selected transform 112 from a predetermined list of transforms, the predetermined list of transforms comprising an identity transform and at least one non-identity transform, for decoding a picture using predictive coding and block-based transform residual coding. Furthermore, if, for a given transform block, the selected transform is one of the at least one non-identity transform 1231, the apparatus 100 is configured to: decode 900 a syntax element from the data stream 14, and derive therefrom whether the signs of the non-zero coefficients in a predetermined group of non-zero coefficients are equal 910 or unequal 920, and if so, derive the signs of the non-zero coefficients in the predetermined group of non-zero coefficients 930, and if the signs of the non-zero coefficients in the predetermined group of non-zero coefficients are not equal 920, decode 120 a block of coefficients from the data stream by decoding 940 a sign bit for each non-zero coefficient. Furthermore, the apparatus 100 is configured to decode 940 the signs of the non-zero coefficients in the predetermined group of non-zero coefficients by decoding a sign bit for each non-zero coefficient base regardless of whether the signs of the non-zero coefficients in the predetermined group of non-zero coefficients are equal to each other, if the selected transform for the given transform block is the identity transform 1232. Furthermore, the apparatus 100 is configured to derive a residual sample array for the given transform block from the block of coefficients, such that the block of coefficients is associated with the residual sample array according to the selected transform, and to modify the prediction of the given transform block using the residual sample array to reconstruct the given transform block (see Figure 22).

[0188] According to an embodiment, the apparatus 100 is configured to determine a predetermined group of non-zero coefficients as non-zero coefficients within a block of coefficients that are located within a predetermined sub-block of the block of coefficients.

[0189] According to an embodiment, the apparatus 100 is configured to, if the selected transform is one of the at least one non-identity transform, decode a further syntax element from the data stream and derive therefrom whether the signs of the non-zero coefficients in the further predetermined group of non-zero coefficients are equal to or unequal to each other, and if so, derive the signs of the non-zero coefficients in the further predetermined group of non-zero coefficients, and if the signs of the non-zero coefficients in the predetermined group of non-zero coefficients are unequal to each other, decode the signs of the non-zero coefficients in the further predetermined group of non-zero coefficients by decoding a further sign bit for each non-zero coefficient base. Furthermore, the apparatus 100 is configured to group the non-zero coefficients of the block of coefficients into a plurality of groups of non-zero coefficients including the group of non-zero coefficients and the further group of non-zero coefficients.

[0190] According to an embodiment, the device 100 is configured to divide the block of coefficients into sub-blocks such that each group of non-zero coefficients comprises only non-zero coefficients that are located in one of the sub-blocks.

[0191] According to an embodiment, the apparatus 100 is configured to adapt the partitioning with respect to the size of a given sub-block based on signs of one or more non-zero coefficients in one or more of the sub-blocks preceding the given sub-block in sub-block decoding order. Additionally or alternatively, the apparatus 100 is configured to adapt the partitioning based on signs of previously decoded non-zero coefficients. According to an embodiment, the apparatus 100 is configured to determine a predetermined group of non-zero coefficients to include all non-zero coefficients in a block of coefficients.

[0192] According to an embodiment, the device 100 is configured to decode a block global syntax element from the data stream if the selected transform is one of the at least one non-identity transform and derive therefrom whether the signs of all non-zero coefficients in a given transform block are equal to one another, and if so, to perform decoding of the signs of all non-zero coefficients in the given transform block and of the syntax element from the data stream if the signs of all non-zero coefficients in the given transform block are not equal to one another.

[0193] The additional syntax element introduces overhead when the condition is not met, i.e., when the code information does not have the same value. Assuming that only one value in a set of code values ​​differs from the remaining value, a configuration using the additional syntax element would be inefficient. An alternative forward-adaptive signaling method is a trend index. When signaling a trend index, the decoder uses a specific context model set according to the trend index parsed from the bitstream (compare Figure 23). The scale, i.e., the number of trend indexes, may be fixed or adaptive, and the scale may be signaled in a bitstream header, such as a slice header or sequence parameter set, and / or in a picture parameter set (compare Claims 68 and 69). An exemplary configuration can specify three trend indexes, where the first trend index indicates a high probability of a positive code value, the second trend index indicates a high probability of a negative code value, and the last trend index indicates an uncertainty case. Again, a trend index can be signaled for each sub-block, or each transform block, or a combination of both. In contrast to a syntax element indicating that all codes within a region have the same value, the trend index can be signaled at an even higher level, such as in the coding unit, and / or slice header, and / or picture parameter set, and / or sequence parameter set (compare claim 67).

[0194] According to an embodiment, an apparatus 100 for decoding a picture using predictive coding and block-based transform residual coding is configured to select, for a given transform block, a selected transform 112 from a predetermined list of transforms, the selected transform comprising an identity transform and at least one non-identity transform. Furthermore, the apparatus 100 is configured to decode 1000 the signs of the non-zero coefficients of a given block of coefficients, derive 1100 a code probability tendency index from the data stream 14, and, if the selected transform 112 is an identity transform 1232, entropy decode the signs of the given non-zero coefficients (such as those first in the decoding order or within a particular sub-block of the coefficient block to which the index applies) using a context model (a context model defining a particular code probability, such as the probability of being positive) associated with the code probability tendency index 1110, and, if the selected transform is one of at least one non-identity transform 1231, bypass decode 1200 the signs of the given non-zero coefficients (e.g., context adaptive entropy decoding with fixed equal probability), decode 120 a block of coefficients from the data stream 14 for the given transform block. Furthermore, the apparatus 100 is configured to derive a residual sample array for a given transform block from the block of coefficients such that the block of coefficients is associated with the residual sample array according to the selected transform, and to modify the prediction of the given transform block using the residual sample array to reconstruct the given transform block (see Figure 23).

[0195] According to an embodiment, the apparatus 100 is configured to entropy decode the signs of all non-zero coefficients using a context model associated with the sign probability trend index if the selected transform is an identity transform, and to bypass decode (e.g., context-adaptive entropy decoding with fixed equal probability) the signs of all predetermined non-zero coefficients if the selected transform is one of at least one non-identity transform.

[0196] According to an embodiment, the apparatus 100 is configured to, if the selected transformation is an identity transformation, update the code probabilities associated with the context model associated with the code probability tendency index based on the signs of the predetermined non-zero coefficients.

[0197] According to an embodiment, a plurality of context models are associated with the code probability tendency index, and the device is configured to entropy decode each of the codes of the non-zero coefficients using a predetermined context model from the plurality of context models associated with the code probability tendency index, and if the selected transformation is an identity transformation, select a predetermined context model from the plurality of context models associated with the code probability tendency index according to the codes of one or more neighboring non-zero coefficients (such as those located at template positions at and around the respective codes), and if the selected transformation is one of at least one non-identity transformation, bypass decode (e.g., context-adaptive entropy decoding with fixed equal probabilities) the codes of all the predetermined non-zero coefficients.

[0198] According to an embodiment, the apparatus 100 is configured to select a predetermined context model from among a plurality of context models associated with a sign probability tendency index according to a frequency of positive or negative signs among one or more adjacent non-zero coefficients, if the selected transformation is an identity transformation.

[0199] According to an embodiment, the code probability trend index is signaled in the data stream, in particular for a sub-block of a block of coefficients in which a given non-zero coefficient is located, for a given transform block, for a coding block including the given transform block, for a picture slice including the given transform block of a picture, or for a picture sequence including the picture.

[0200] According to an embodiment, the device 100 is configured to read from the data stream information regarding which of different sets of context models (three in the example given in the description) with different cardinality apply to the code probability trend index, and select a context model where the code probabilities associated with the context models are more densely distributed in the first set of context models than in the second set of context models with a cardinality lower than that of the first set of context models, and to select a context model by using the code probability trend index as a pointer to the set of context models to apply to the code probability trend index.

[0201] According to an embodiment, the code probability trend index is signaled in the data stream, specifically for the picture slice, picture or picture sequence including the picture that includes the given transform block. Reverse adaptive configuration

[0202] In contrast to the forward adaptive configuration, the backward adaptive approach does not require additional syntax elements in the bitstream. Because the code values ​​in the TSM are locally biased, context modeling can consider local statistics, such as the number of positive or negative code values ​​relative to the total number of code syntax elements (compare FIG. 24). Specifically, the relative number of relationships can be derived, and different context model sets can be selected when a certain threshold is met (compare claim 71). Such threshold configurations can be symmetric or asymmetric. For example, a configuration can use three context model sets, with the first context model set suited to cases with a high probability of positive codes, the second context model set suited to cases with a high probability of negative codes, and the final context model set representing uncertainty cases. In the symmetric configuration, the first or second context model set is selected if the ratio is less than the value b0 = x or greater than the value b1 = (1 - x), where x is the ratio. In the asymmetric configuration, the values ​​b0 and b1 are not related via another variable given for the symmetric configuration. Furthermore, the number of thresholds b and their values ​​may be fixed or adaptive (compare claim 73). The particular configuration of the information can be signaled at the coding unit level, slice level, etc.

[0203] According to an embodiment, the apparatus 100 is configured to select, for a given transform block, a selected transform 112 from a predetermined list of transforms, the predetermined list of transforms comprising an identity transform and at least one non-identity transform, for decoding a picture using predictive coding and block-based transform residual coding. Furthermore, the apparatus 100 is configured to decode 120 a coefficient block from the data stream 14 for the given transform block by decoding 10001 the signs of the non-zero coefficients of the given coefficient block using a predetermined context model 1300 from among a plurality of context models, and if the selected transform is the identity transform 1232, by selecting 1310 the predetermined context model 1300 from among the plurality of context models according to statistics 1400 of the signs of previously decoded coefficients. Furthermore, the apparatus 100 is configured to decode 120 a coefficient block from the data stream for a given transform block by decoding 10002 the signs of non-zero coefficients of the given block of coefficients by bypass decoding (e.g., context adaptive entropy decoding with fixed equal probability) the signs of the given non-zero coefficients if the selected transform is one of the at least one non-identity transform 1231. Furthermore, the apparatus is configured to derive a residual sample array for the given transform block from the block of coefficients, such that the block of coefficients is associated with the residual sample array according to the selected transform, and to modify a prediction of the given transform block using the residual sample array to reconstruct the given transform block (see Figure 24).

[0204] According to an embodiment, the apparatus 100 is configured to select a predetermined context model depending on the relative frequency of positive or negative signs among the non-zero coefficients in the previously decoded coefficients if the selected transform is an identity transform. According to an embodiment, the apparatus 100 is configured to set the number of context models of the plurality of context models to a default number. According to an embodiment, the apparatus 100 is configured to derive several context models of a plurality of context models from a data stream.

[0205] According to an embodiment, the device 100 is configured to associate a context model with adjacent and non-overlapping relative frequency intervals of the relative frequencies of positive or negative signs, and to perform a selection among the relative frequencies of positive or negative signs among the non-zero coefficients of the previously decoded coefficients to be included in the relative frequency interval associated with a given context model.

[0206] According to an embodiment, the apparatus 100 is configured to determine statistics over the codes of the previously decoded coefficients such that the previously decoded coefficients are spread over a picture or video portion larger than a given transform block.

[0207] According to an embodiment, the apparatus 100 is configured to entropy decode the signs of all non-zero coefficients of a given transform block using a given context model if the selected transform is an identity transform.

[0208] According to an embodiment, the apparatus 100 is configured to entropy decode signs of a subset of non-zero coefficients of a predetermined transform block located within a sub-block of the block of coefficients and comprising a non-zero predetermined coefficient using a predetermined context model, update the statistics using the signs of the subset of non-zero coefficients of the predetermined transform block to obtain updated statistics, select a further predetermined context model from among a plurality of context models depending on the updated statistics, and if the selected transform is an identity transform, entropy decode signs of a further subset of non-zero coefficients of the predetermined transform block located within a further sub-block of the block of coefficients using the further predetermined context model.

[0209] According to an embodiment, the apparatus 100 is configured to update sign probabilities associated with a given context model based on the signs of the given non-zero coefficients if the selected transform is an identity transform.

[0210] According to an embodiment, the plurality of context models are divided into sets of context models, and the device is configured to perform the selection by selecting a predetermined set of context models based on statistics of the signs of previously decoded coefficients, and, if the selected transformation is an identity transformation, by selecting a predetermined context model from the selected set of context models depending on the signs of one or more adjacent non-zero coefficients (such as those located at the respective signs and in the template positions surrounding them). Combining forward and backward adaptive configurations

[0211] Combinations of any of the forward and backward adaptation configurations described in this invention are possible because they do not overlap, i.e., there are no conflicts in the context model set selection rules. For example, the combination of a trend index and a backward adaptation technique results in a configuration where the initial context model set is derived using the trend index and updated according to the backward adaptation technique (compare claim 64 and claim 65). Preferred Embodiments

[0212] In a preferred embodiment of the present invention, the limit on the number of context-coded bins is achieved by switching to a bypass mode of the entropy coding engine while maintaining the existing binarization scheme.

[0213] In a further preferred embodiment of the present invention, the limitation on the number of context-coded bins is achieved by switching to a bypass mode of entropy coding and setting the first binarization boundary to zero, i.e. the resulting binarization is a combination of Rice and Exp-Golomb codes only (compare Figure 20 or claim 51).

[0214] In a further preferred embodiment of the present invention, limiting the number of context-coded bins is achieved by switching to a bypass mode of entropy coding and using a dedicated binarization scheme such as Rice coding only (compare Figure 20).

[0215] In a further preferred embodiment of the present invention, when switching to bypass mode, the parameter derivation that selects a particular Rice code among all Rice codes or an Exp-Golomb code among all Exp-Golomb codes is changed.

[0216] In a further preferred embodiment of the present invention, the limit on the number of context-coded bins is achieved by switching to a bypass mode of entropy coding, where the importance information is still coded using the context model. In this configuration, the switch point must also take into account the remaining number of scanning positions.

[0217] In other words, apparatus 100 for decoding pictures using predictive coding and block-based transform residual coding may be configured to select, for a given transform block, a selected transform from a predetermined list of transforms, the selected transform comprising an identity transform and at least one non-identity transform. Furthermore, apparatus 100 may be configured to decode, for a given transform block, a block of coefficients from the data stream using context-adaptive binary entropy decoding by decoding one or more predetermined flags (e.g., parity flags and / or greater-than-X flags, sig flags; e.g., sig_flag 92, par_flag 96, gt1_flag 98, and / or gt2_flag 104 as shown in FIG. 20) for each coefficient from the data stream in a series of passes traversing the coefficients of the block, where each predetermined flag indicates where the absolute value of the respective coefficient is located (e.g., the absolute value domain starts at the beginning of one or more passes, e.g., for an X-bit representation, coefficients 0...2X-1(e.g., parity bits 96 reduce the magnitude domain 90 by half by excluding even or non-even magnitude values, and greater-than-X flags, e.g., gt1_flag 98 and gt2_flag 104, reduce the domain of possible magnitude values ​​by excluding one of the possible magnitude values ​​or excluding all but this one possible magnitude value). Furthermore, the apparatus 100 is configured to decode a block of coefficients from the data stream by, for a given transform block, decoding a codeword (e.g., a Rice / Exp-Golomb code) of a variable length code to identify the absolute value of the respective coefficient in the absolute value domain of the respective coefficient, for each coefficient whose cardinality 90 of the absolute value domain is not reduced to one by one or more predetermined flags decoded for the respective coefficient, in a series of passes traversing the coefficients of the block (e.g., the code length of the variable length code may monotonically increase as the absolute value increases, where the codeword is free to refer only to the reduced absolute value domain, or a general one or some other one that is necessarily a proper superset of the reduced absolute value domain). Furthermore, the apparatus 100 is configured to derive a residual sample array for the given transform block from the block of coefficients, such that the block of coefficients is associated with the residual sample array according to the selected transform, and to modify a prediction of the given transform block using the residual sample array to reconstruct the given transform block.The apparatus is configured to, in a series of passes, stop decoding one or more predetermined flags (except for an importance flag) that indicate whether a decoded coefficient is zero or not (and thus is necessarily decoded using context-adaptive binary entropy decoding), as soon as a predetermined number of the predetermined flags is reached (i.e., the total number of predetermined flags decoded so far for all coefficients reaches a limit), such that the cardinality in the absolute value domain is smaller for a first set of non-zero coefficients compared to a second set of non-zero coefficients (i.e., smaller for coefficients before the limit is reached in the last pass compared to coefficients after the limit is reached), the predetermined number corresponding to an upper limit minus the number of coefficients whose importance flags have not yet been decoded (compare Figure 20).

[0218] In a preferred embodiment of the present invention, the processing order of the levels for encoding the TSM is forward, ie, the scan starts at the DC frequency location and ends at the highest AC frequency location (compare FIG. 21).

[0219] In other words, the apparatus 100 for decoding pictures using predictive coding and block-based transform residual coding is configured to select, for a given transform block, a selected transform from a predetermined list of transforms, the selected transform comprising an identity transform and at least one non-identity transform. If the selected transform is a non-identity transform 1231, the apparatus is configured to decode 120 a block of coefficients from the data stream for the given transform block by decoding coefficients of the block of coefficients from the data stream along a first scan order 851 (possibly following this order several times in several passes) toward the DC coefficient of the non-identity transform (e.g., starting from the highest frequency coefficient thereafter, possibly from the “last” significant coefficient position). If the selected transform is an identity transform 1232, the apparatus is configured to decode 120 a block of coefficients from the data stream for the given transform block by decoding coefficients of the block of coefficients from the data stream along a second scan order 852 from the upper-left sample position to the lower-right sample position. This scan order determination is illustrated in FIG. 21. Furthermore, the apparatus is configured to derive a residual sample array for a given transform block from the block of coefficients such that the block of coefficients is associated with the residual sample array according to the selected transform (this step may include, in the case of an identity transform, adding to each coefficient the coefficients present in the block on a given side, such as the left side in the case of horizontal DPCM or above the respective coefficient in the case of vertical DPCM, so as to perform DPCM inversion), and to modify the prediction of the given transform block using the residual sample array to reconstruct the given transform block.

[0220] In a further preferred embodiment of the present invention, the scanning pattern may be horizontal or vertical and is coupled to the prediction mode used, such as BDPCM and / or RBDPCM (see FIG. 21).

[0221] In other words, the device 100 is configured to select a second scan order 852 depending on the DPCM direction used to encode a given transform block, e.g., horizontal raster scan for horizontal DPCM and vertical raster scan for vertical DPCM.

[0222] In a preferred embodiment of the present invention, all context coded bins are coded in a single loop rather than in separate loops, and the final level information coded in bypass mode forms a separate processing loop. In a more preferred embodiment of the present invention, each level is completely coded before processing the next scan position.

[0223] In a preferred embodiment of the present invention, the number of positive or negative values ​​is tracked along with the total number of sign values. Above a symmetric threshold of x, a different context model set is used, resulting in three context model sets. The level of statistics is the transformation block. In a further preferred embodiment of the present invention, the level of the statistics is sub-block. In a further preferred embodiment of the present invention, the level of the statistics is a slice. In a further preferred embodiment of the present invention, the threshold x is fixed. In a further preferred embodiment of the present invention, the threshold x is variable. In a further preferred embodiment of the present invention, the context modeling index in the context model set is fixed and equal to one. In a preferred embodiment of the present invention, the number of context model sets is also equal to three, and the thresholds are asymmetric. In a preferred embodiment of the present invention, the threshold value is transmitted in a header, such as a slice header or a picture parameter set in the bitstream. In a preferred embodiment of the present invention, the coding of the code syntax elements is separated from the coding of the absolute levels. In a preferred embodiment of the present invention, a syntax element is transmitted in the bitstream that indicates whether the code values ​​are the same for a particular region.

[0224] In a further preferred embodiment of the present invention, a syntax element is transmitted in the bitstream that indicates whether the code values ​​are the same for a particular region where the region is defined as a transform block.

[0225] In a further preferred embodiment of the present invention, a syntax element is transmitted in the bitstream that indicates whether the code values ​​are the same for a particular region where the region is defined as a sub-block.

[0226] In a further preferred embodiment of the present invention, a syntax element is transmitted in the bitstream that indicates whether the code values ​​are the same for a particular region where the region is defined as a coding unit.

[0227] In a further preferred embodiment of the present invention, the context modeling of the additional syntax elements is derived by evaluating neighboring sub-blocks when the region is defined as a sub-block.

[0228] In a further preferred embodiment of the present invention, the context modeling of the additional syntax elements is derived by evaluating neighboring transform blocks when the region is defined as a transform block.

[0229] Table 5 shows a syntax table for one embodiment of level coding for transform skip mode with numGtXFlags-1 additional "greater than X" flags.

[0230] [Table 9] [Table 10] [Table 11] The following apparatus for encoding may have similar or equivalent features to the above-described apparatus for decoding.

[0231] According to an embodiment, an apparatus for encoding a picture using predictive coding and block-based transform residual coding is configured to divide the picture into transform blocks of different sizes. Furthermore, the apparatus is configured to select, for a given transform block, a selected transform by checking whether the size of the given transform block exceeds a predetermined threshold size. If the size of the given transform block exceeds the predetermined threshold size, the apparatus is configured to use a default method for selecting the selected transform. If the size of the given transform block does not exceed the predetermined threshold size, the apparatus is configured to select a transform from a predetermined list of transforms for the selected transform selection and to transmit in the data stream an index pointing to the selected transform from the predetermined list of transforms to be used for the given transform block as the selected transform, the predetermined list of transforms comprising an identity transform and a non-identity transform. Further, the apparatus is configured to predict a given transform block and, for the given transform block, encode a block of coefficients into a data stream, so that, if the selected transform is an identity transform, the block of coefficients is used as a residual sample array for modifying the prediction to reconstruct the given transform block, and, if the selected transform is not the identity transform, the block of coefficients is subjected to an inverse transform corresponding to the selected transform to obtain a residual sample array for the given transform block.

[0232] According to an embodiment, the apparatus is configured to use a default non-identity transform for the selected transform if the size of the given transform block exceeds a predetermined threshold size. According to an embodiment, the default non-identity transform is included in a predetermined list of transforms. According to an embodiment, the device is configured to derive the predetermined threshold size from the data stream.

[0233] According to an embodiment, the device is configured to encode an index at the current position in the data stream of the given transform block if the size of the given transform block does not exceed a predetermined threshold size, and to encode a syntax element other than the index (e.g., in the sense that another element is read instead of the index, but not in the sense of not skipping and reading, in the sense that the syntax can be the same up to that position in the data stream, but the data stream does not actually include the index) at the current position in the data stream if the size of the given transform block exceeds a predetermined threshold size.

[0234] According to an embodiment, the device is configured to encode an index into the data stream for a coding block of a picture divided into multiple transform blocks containing a given transform block (note that in some cases the unified MTS syntax may be signaled as a disjoint set of CUs at a higher level), i.e., the index may be valid for a set of coding blocks. According to an embodiment, the transform block is a luma transform block and the device is configured to use a fixed default transform for the chroma transform block. According to an embodiment, the device is configured to apply the selected transform to luma and chroma components of the picture within a given transform block.

[0235] According to an embodiment, the device is configured to encode an index into the data stream of a given transform block for each component of the luma and chroma components of the picture.

[0236] According to an embodiment, the device is configured to signal in the data stream whether the transform block is a luma transform block and a fixed default transform should be used for the chroma transform block, whether the selected transform should be applied to the luma and chroma components of the picture in the given transform block, or whether an index from the data stream should be decoded for the given transform block for each of the luma and chroma components of the picture.

[0237] According to an embodiment, the device is configured to, for a given transform block, encode a block of coefficients into a data stream depending on whether a selected transform for the given block is included in a predetermined set of one or more transforms. Furthermore, when encoding the block of coefficients into the data stream for the given transform block, if the selected transform for the given block is included in the predetermined set of one or more transforms, the device is configured to encode a coded block flag into the data stream indicating whether the block of coefficients has at least one non-zero coefficient, and when encoding the block of coefficients into the data stream for the given transform block, if the selected transform for the given block is not included in the predetermined set of one or more transforms, the device is configured to infer that the block of coefficients has at least one non-zero coefficient (in other words, then not code a CBF into the data stream, or in further words, code a syntax element different from the current part of the data stream in which the CBF is coded if the selected transform for the given block is included in the predetermined set of one or more transforms).

[0238] According to an embodiment, the predetermined set of one or more transforms comprises a default selected identity transform and a default non-identity transform according to a default method for selecting the selected transform.

[0239] According to an embodiment, an apparatus for coding a picture using predictive coding and block-based transform residual coding is configured to select, for a given transform block, a selected transform from a predetermined list of transforms and code an index into a data stream for the given transform block that points to the selected transform. The apparatus is further configured to predict the given transform block and code, for the given transform block, a block of coefficients into a data stream such that, from the block of coefficients, a residual sample array for the given transform block can be derived such that the block of coefficients is associated with the residual sample array according to the selected transform, and the prediction of the given transform block can be modified using the residual sample array to reconstruct the given transform block. For the given transform block, the apparatus is configured, when coding the block of coefficients into a data stream depending on whether the selected transform for the given block is included in a predetermined set of one or more transforms, to code a coded block flag into the data stream indicating whether the block of coefficients has at least one non-zero coefficient if the selected transform for the given block is included in the predetermined set of one or more transforms. Furthermore, the device is configured, when encoding a block of coefficients into a data stream depending on whether, for a given transform block, the selected transform of the given block is included in a predetermined set of one or more transforms, to refrain from encoding a coded block flag into the data stream, which should be inferred on the encoder side as notification that the block of coefficients has at least one non-zero coefficient, if the selected transform of the given block is not included in the predetermined set of one or more transforms (in other words, then not encoding a CBF into the data stream, or in further other words, if the selected transform of the given block is included in the predetermined set of one or more transforms, encoding a syntax element different from the current part of the data stream to be coded, in which case the CBF is included in the predetermined set of one or more transforms). According to an embodiment, the predetermined set of one or more transformations comprises an identity transformation.

[0240] According to an embodiment, the apparatus is configured to populate, or populate and sort, a predetermined list of transformations in response to a data stream, and to encode an index into the data stream using a variable length code such that each transformation in the predetermined list of transformations is assigned one codeword of the variable length code, and such that the codeword lengths of the codewords of the variable length code monotonically increase with the rank of the transformation in the predetermined list of transformations to which the codeword is assigned.

[0241] According to an embodiment, an apparatus for coding a picture using predictive coding and block-based transform residual coding is configured to predict a given transform block and encode a block of coefficients into a data stream, the prediction including encoding a coded block flag into a data stream indicating whether, for the given transform block, the block of coefficients has at least one non-zero coefficient. If the coded block flag indicates that the block of coefficients has at least one non-zero coefficient, the apparatus is configured to select a selected transform from a predetermined list of transforms for the given transform block and encode an index into the data stream for the given transform block pointing to the selected transform in the predetermined list of transforms. From the block of coefficients, a residual sample array for the given transform block can be derived, such that the block of coefficients is related to the residual sample array according to the selected transform, and the prediction of the given transform block can be modified using the residual sample array to reconstruct the given transform block. The device is configured to reconstruct a given transform block without prediction modification if the coded block flag indicates that the block of coefficients does not have at least one non-zero coefficient (in other words, if the coded block flag then indicates that the block of coefficients does not have at least one non-zero coefficient, not code an index into the data stream, such as by coding a syntax element that differs from an index from a current portion of the data stream in which the index is coded).

[0242] According to an embodiment, an apparatus for encoding a picture using predictive coding and block-based transform residual coding is configured to populate or populate and sort a predetermined list of transforms according to a data stream, and to select a selected transform from the predetermined list of transforms for a given transform block. The apparatus is further configured to encode an index pointing to the selected transform in the predetermined list of transforms into the data stream using a variable length code, such that each transform in the predetermined list of transforms is assigned a codeword of the variable length code, the codeword length of the codeword of the variable length code monotonically increasing with the rank of the transform in the predetermined list of transforms to which the codeword is assigned. The apparatus is further configured to derive a prediction for the given transform block and encode a block of coefficients for the given transform block into the data stream, such that a residual sample array for the given transform block can be derived from the block of coefficients, such that the block of coefficients is associated with the residual sample array according to the selected transform, and the given transform block can be reconstructed by the prediction of the given transform block using the residual sample array to reconstruct the given transform block.

[0243] According to an embodiment, the device is configured to sort the predetermined list of transformations according to syntax elements in the data stream that are globally valid for at least the picture. According to an embodiment, the device is configured to sort the given list of transforms according to an evaluation of sample statistics in the spatial neighborhood of a given transform block.

[0244] According to an embodiment, the device is configured to sort the given list of transforms according to syntax elements signaled in the data stream for blocks in the spatial vicinity of the given transform block.

[0245] According to an embodiment, the apparatus is configured to sort the predetermined list of transformations such that there is at least one state of the data stream, such that sorting the predetermined list of transformations places the identity transformation in the leading rank having the shortest codeword of the variable length code assigned to it.

[0246] According to an embodiment, an apparatus is configured to encode an index into a data stream using a codeword of a composite variable length code consisting of a first codeword of the variable length code and, if the first codeword is the longest codeword of the variable length code, a second codeword of the fixed length code that follows it, wherein a codeword of the composite variable length code consisting of only one of the two non-longest codewords of the variable length code is assigned to an identity transformation and a predetermined non-identity transformation to identify the identity transformation and the predetermined non-identity transformation, and further codewords of the composite variable length code are assigned to further non-identity transformations of the predetermined list of transformations to identify the further non-identity transformation.

[0247] According to an embodiment, an apparatus for encoding a picture using predictive coding and block-based transform residual coding is configured to derive a prediction for a given transform block. The apparatus is further configured to select, for the given transform block, a selected transform from a predetermined list of transforms, and encode an index into the predetermined list of transforms pointing to the selected transform using a composite variable-length code codeword consisting of a first codeword of the variable-length code followed by a second codeword of the fixed-length code if the first codeword is the longest codeword of the variable-length code. A codeword of the composite variable-length code consisting of only one of the two non-longest codewords of the variable-length code is assigned to an identity transform and a predetermined non-identity transform included in the predetermined list of transforms to identify the identity transform and the predetermined non-identity transform, and further codewords of the composite variable-length code are assigned to further non-identity transforms in the predetermined list of transforms to identify the further non-identity transform. Further, the apparatus is configured to encode, for a given transform block, a block of coefficients into a data stream such that the block of coefficients is associated with a residual sample array according to a selected transform and the given transform block is reconstructable by modifying a prediction of the given transform block using the residual sample array.

[0248] According to an embodiment, an apparatus for decoding a picture using predictive coding and block-based transform residual coding is configured to select, for a given transform block, a selected transform from a predetermined list of transforms, the selected transform comprising an identity transform and at least one non-identity transform. Furthermore, the apparatus is configured to derive a prediction for the given transform block and to encode a block of coefficients into a data stream by checking, for the given transform block, whether the selected transform is a non-identity transform. If the selected transform is a non-identity transform, the device is configured to: encode into the data stream position information of the first non-zero coefficient encountered along a scan order traversing all coefficients of the block of coefficients, or the last non-zero coefficient encountered along a scan order traversing all coefficients of the block of coefficients, to obtain, for a given transform block, a predetermined coefficient position for encoding the block of coefficients into the data stream (please note below: in the above embodiments, this position is referred to as the last position measured along the scan order from the top left to the bottom right, but the actual scanning that started coding started there according to these embodiments. That is, the actual coding was done in the reverse scan order from the bottom right to the top left corner, where the scan order is the coding order; see the next embodiment in which both scan directions are anticipated); encode into the data stream a first coefficient of the block of coefficients that includes all non-zero coefficients of the block of coefficients and that is traversed by the scan order starting from or up to the predetermined coefficient position; infer a second coefficient of the block of coefficients that is different from the first coefficient to be zero; and encode the block of coefficients for the given transform block into the data stream. If the selected transform is an identity transform, the apparatus is configured to encode all coefficients of the block of coefficients into the data stream, for a given transform block, to encode the block of coefficients into the data stream, the block of coefficients being associated with a residual sample array according to the selected transform, and the given transform block being reconstructable by modifying its prediction using the residual sample array.

[0249] According to an embodiment, the device is configured to, in encoding a first coefficient of a block of coefficients into the data stream, use a scan order and start encoding the first coefficient at a predetermined coefficient position such that the first coefficient is traversed by the scan order starting from the predetermined coefficient position, or to use a scan order and end encoding the first coefficient at a predetermined coefficient position such that the first coefficient is traversed by the scan order up to the predetermined coefficient position, and the device is configured to, in decoding all coefficients of the block of coefficients into the data stream, sequentially encode all coefficients starting or ending with a coefficient of the block of coefficients last traversed by the scan order.

[0250] According to an embodiment, the device is configured to use a scan order in encoding all coefficients of a block of coefficients into the data stream, and to finish encoding all coefficients of the block of coefficients last traversed by the scan order, or to use a reverse scan order and start encoding all coefficients of the block of coefficients last traversed by the scan order. (Note that the scan order is defined here to define a coding order in the case of a non-identity transform.)

[0251] According to an embodiment, the device is configured to encode the position information by encoding the coordinates of a given coefficient position into the data stream or by encoding the rank of a given coefficient position within the scan order into the data stream.

[0252] According to an embodiment, the device is configured to perform decoding of first coefficients of a block of coefficients in sub-blocks into which the block of coefficients is divided, so that the scanning order traverses all first coefficients in one sub-block before traversing the first coefficient in a different sub-block, and a first coefficient in a sub-block for which a sub-block flag in the data stream (the term "encoded sub-block flag" was used in the above embodiment) is zero is inferred to be zero, and a first coefficient in a sub-block for which a sub-block flag in the data stream is non-zero is coded into the data stream, and the sub-block flags and the predetermined coefficient position at which the first coefficient is located are coded into the data stream, except for at least one of a first sub-block flag associated with the sub-block containing the predetermined coefficient position and a second sub-block flag associated with the sub-block between which the first coefficient of the block of coefficients is included, and at least one of the first and second predetermined sub-block flags should be inferred to be non-zero. The apparatus is configured to perform encoding of all coefficients of a block of coefficients into the data stream in sub-blocks into which the block of coefficients is divided, such that a scanning order traverses all coefficients in one sub-block before traversing a first coefficient in a different sub-block, and coefficients in sub-blocks for which a sub-block flag in the data stream is zero are inferred to be zero, and coefficients in sub-blocks for which a sub-block flag in the data stream is non-zero are coded into the data stream, as well as coding the sub-block flags into the data stream for all sub-blocks.

[0253] According to an embodiment, the device is configured, in encoding the sub-block flags into the data stream for all sub-blocks, to encode the sub-block flags into the data stream for all sub-blocks sequentially in sub-block order, and not to encode the sub-block flag that is last in sub-block order, so that it is inferred to signal non-zero if all preceding sub-block flags preceding it in sub-block order signal zero. (Comparing the above embodiment in 2.b., the following is stated: "This also includes the coded_sub_block_flag of the DC sub-block, unless all other coded_sub_block_flag syntax elements are already equal to 0, in which case DC coded_sub_block_flag is inferred to be equal to 1.")

[0254] According to an embodiment, the device, in encoding sub-block flags into the data stream for all sub-blocks, encodes sub-block flags into the data stream sequentially for all sub-blocks in sub-block order, encodes a coefficient in a given sub-block whose sub-block flag that is last in sub-block order is inferred to be consecutively non-zero in coefficient order if all preceding sub-block flags in sub-block order are zero, encodes for each coefficient in the given sub-block except for the last coefficient, an importance flag indicating whether each coefficient is non-zero, infers that the last coefficient is non-zero if the other coefficients in the given sub-block are zero, and encodes the importance flag of the last coefficient if at least one of the other coefficients in the given sub-block is non-zero. Furthermore, the apparatus is configured to, in encoding the sub-block flags into the data stream excluding at least one of the first sub-block flag and the second sub-block flag, encode the sub-block flags into the data stream excluding at least one of the first sub-block flag and the second sub-block flag that should be inferred to indicate non-zero, and to necessarily encode, for all first coefficients in the sub-block to which the second sub-block flag relates, a significance flag indicating whether the respective coefficient is non-zero. (Compare the above embodiment, where the inference of the SIG flag at (0,0) was made if all other SIG flags of this sub-block were equal to 0, see 2.b in the following description: "In this case, DC coded_sub_block_flag is inferred to be equal to 1 (inferDcSbCbf=1). Since this DC sub-block must have at least one importance level, the sig_coeff_flag syntax element in the first position at (0,0) is not signaled and is instead derived to be equal to 1 if all other sig_coeff_flag syntax elements in this DC sub-block are equal to 0 (inferSbDcSigCoeffFlag=1).")

[0255] According to an embodiment, an apparatus for decoding a picture using predictive coding and block-based transform residual coding is configured to select, for a given transform block, a selected transform from a predetermined list of transforms, the selected transform comprising an identity transform and at least one non-identity transform, and to derive a prediction for the given transform block. Furthermore, the apparatus is configured to encode, for the given transform block, a block of coefficients into a data stream by encoding coefficients of the block of coefficients into the data stream in sub-blocks into which the block of coefficients is divided, wherein coefficients in sub-blocks for which a sub-block flag in the data stream is zero are inferred to be zero, and coefficients in sub-blocks for which a sub-block flag in the data stream is non-zero are coded into the data stream. Inferring coefficients as zero and encoding non-zero coefficients is performed by sequentially encoding sub-block flags into the data stream except for at least one of the first sub-block flag and the last sub-block flag if the selected transform is one of at least one non-identity transform, and encoding sub-block flags for all sub-blocks into the data stream if at least one of the first sub-block flag and the last sub-block flag is inferred to signal non-zero and the selected transform is an identity transform. The blocks of coefficients are associated with residual sample arrays according to the selected transform, and a given transform block is reconstructable by modifying a prediction of the given transform block using the residual sample array.

[0256] According to an embodiment, the device is configured to, in encoding the sub-block flags into the data stream for all sub-blocks, encode the sub-block flags into the data stream for all sub-blocks sequentially in sub-block order, encode the sub-block flag that is last in the sub-block order if at least one of the preceding sub-block flags preceding it in the sub-block order signals to be non-zero, and infer that the sub-block flag that is last in the sub-block order signals to be non-zero if all preceding sub-block flags preceding it in the sub-block order signal to be zero.

[0257] According to an embodiment, the device is configured to infer the last coefficient in a sub-block for which the last sub-block flag is inferred to signal non-zero when inferring a sub-block flag that is last in sub-block order to signal non-zero if all preceding coefficients in the sub-block are zero.

[0258] According to an embodiment, the device is configured to encode a currently coded sub-block flag into a data stream by using context-adaptive entropy coding and a context, the context depending on a logical sum of sub-block flags associated with sub-blocks adjacent to the currently coded sub-block flag if the selected transform is one of at least one non-identity transform, and depending on an arithmetic sum of sub-block flags associated with sub-blocks adjacent to the currently coded sub-block flag if the selected transform is an identity transform.

[0259] According to an embodiment, an apparatus for decoding a picture using predictive coding and block-based transform residual coding is configured to select, for a given transform block, a selected transform from a predetermined list of transforms, the selected transform comprising an identity transform and at least one non-identity transform, and to derive a prediction for the given transform block. Furthermore, the apparatus is configured to encode, for the given transform block, the block of coefficients into a data stream in sub-blocks into which the block of coefficients is divided, inferring that coefficients in the sub-blocks whose sub-block flags in the data stream are zero are zero, encoding coefficients in the sub-blocks whose sub-block flags in the data stream are non-zero, and encoding the block of coefficients into the data stream by context-adaptive entropy coding and using the context. The context depends on the logical sum of sub-block flags associated with sub-blocks adjacent to the currently coded sub-block flag if the selected transform is one of the at least one non-identity transform, and on the arithmetic sum of sub-block flags associated with sub-blocks adjacent to the currently coded sub-block flag if the selected transform is the identity transform. The blocks of coefficients are associated with residual sample arrays according to a selected transform, and a given transform block can be reconstructed by modifying a prediction for the given transform block using the residual sample array.

[0260] According to an embodiment, the device is configured to encode, for a current coefficient in a sub-block for which a sub-block flag in the data stream indicates that the current coefficient is non-zero, a significance flag indicating whether the current coefficient is zero or not using a context, wherein the context depends on the number of non-zero coefficients in a first set of coefficients directly adjacent to the current coefficient if the selected transform is an identity transform, and on the number of non-zero coefficients in a second set of coefficients including the first set of coefficients, coefficients located further from the current coefficient than the first set of coefficients, the values ​​of the second set of coefficients, and the position of the current coefficient if the selected transform is one of at least one non-identity transform.

[0261] According to an embodiment, an apparatus for decoding a picture using predictive coding and block-based transform residual coding is configured to select, for a given transform block, a selected transform from a predetermined list of transforms, the selected transform comprising an identity transform and at least one non-identity transform, and to derive a prediction for the given transform block. Furthermore, the apparatus is configured to encode, for the given transform block, a block of coefficients into a data stream by encoding, for a current coefficient, a significance flag indicating whether the current coefficient is zero using a context. The context depends on the number of non-zero coefficients from a first set of coefficients immediately adjacent to the current coefficient if the selected transform is the identity transform, and on the number of non-zero coefficients from a second set of coefficients including the first set of coefficients, coefficients located further from the current coefficient than the first set of coefficients, the value of the second set of coefficients, and the position of the current coefficient if the selected transform is one of at least one non-identity transform. The block of coefficients is associated with a residual sample array according to the selected transform, and the given transform block is reconstructable by modifying the prediction for the given transform block using the residual sample array.

[0262] According to an embodiment, the apparatus is configured to encode a predetermined coefficient by context-adaptive entropy encoding N greater-than-X flags that indicate whether the absolute value of the predetermined coefficient is greater than X, and encoding using a variable length code a remainder that indicates the amount by which the absolute value of the predetermined coefficient exceeds an absolute threshold that depends on N, where N is greater when the selected transform is an identity transform compared to when the selected transform is one of the at least one non-identity transform.

[0263] According to an embodiment, an apparatus for decoding a picture using predictive coding and block-based transform residual coding is configured to select, for a given transform block, a selected transform from a predetermined list of transforms, the selected transform comprising an identity transform and at least one non-identity transform, and to derive a prediction for the given transform block. Furthermore, the apparatus is configured to encode, for the given transform block, a block of coefficients into a data stream by encoding the given coefficients by context-adaptive entropy coding N greater-than-X flags indicating whether the absolute value of the given coefficient is greater than X, and encoding, using a variable-length code, a remainder indicating the amount by which the absolute value of the given coefficient exceeds an absolute threshold that depends on N, where N is greater when the selected transform is the identity transform compared to when the selected transform is one of the at least one non-identity transform. The block of coefficients is associated with a residual sample array according to the selected transform, and the given transform block is reconstructable by modifying the prediction for the given transform block using the residual sample array.

[0264] According to an embodiment, an apparatus is configured to perform context adaptive entropy encoding of N greater than X flags in a series of passes by context adaptive entropy encoding the N greater than X flags sequentially while increasing X by one or more of the N greater than X flags for each pass, and the apparatus is configured to record the number of flags coded using the context adaptive entropy coding during the series of passes, and to stop the context adaptive entropy coding of the N greater than X flags if the number exceeds a predetermined flag threshold.

[0265] According to an embodiment, the variable length code is a Rice code, and the device is configured to determine Rice parameters of the Rice code in response to a first set of coefficients immediately adjacent to the predetermined coefficient if the selected transform is an identity transform, and in response to a second set of coefficients including coefficients and the first set of coefficients located further from the predetermined coefficient than the first set of coefficients if the selected transform is one of the at least one non-identity transform.

[0266] According to an embodiment, the apparatus is configured to encode the sign of a predetermined coefficient by performing context-adaptive entropy coding using a predetermined context, updating a probability associated with the predetermined context if the selected transform is an identity transform, and by bypass coding (e.g., context-adaptive entropy coding with fixed equal probability) if the selected transform is one of at least one non-identity transform.

[0267] According to an embodiment, an apparatus for decoding a picture using predictive coding and block-based transform residual coding is configured to select, for a given transform block, a selected transform from a predetermined list of transforms, the selected transform comprising an identity transform and at least one non-identity transform, and to derive a prediction for the given transform block. Furthermore, the apparatus is configured to encode, for the given transform block, a block of coefficients into a data stream by performing context-adaptive entropy coding using a predetermined context, updating a probability associated with the given context if the selected transform is the identity transform, and encoding the sign of the given coefficient by bypass coding (e.g., context-adaptive entropy coding with fixed equal probability) if the selected transform is one of the at least one non-identity transform. The block of coefficients is associated with a residual sample array according to the selected transform, and the given transform block is reconstructable by modifying the prediction of the given transform block using the residual sample array.

[0268] According to an embodiment, the apparatus is configured to, if the selected transform is one of the at least one non-identity transform, perform context adaptive entropy encoding of the N greater than X flags in a series of passes by context adaptive entropy encoding the N greater than X flags sequentially while increasing X by one or more of the N greater than X flags in each pass, record the number of flags coded using the context adaptive entropy coding during the series of passes, and stop the context adaptive entropy coding of the N greater than X flags if the number exceeds a predetermined flag threshold. Furthermore, the apparatus is configured, when the selected transform is an identity transform, to sequentially perform context-adaptive entropy encoding of the N greater-than-X flags, to encode an importance flag (X=0) among the N greater-than-X flags, and then encode a greater-than-X flag-bypass flag indicating whether a given coefficient is greater than the absolute threshold before further N greater-than-X flags among the N greater-than-X flags, and to stop the context-adaptive entropy encoding of the N greater-than-X flags in the case of a greater-than-X flag-bypass flag indicating that the given coefficient is greater than the absolute threshold (e.g., to resume the context-adaptive entropy encoding of the N greater-than-X flags for further greater-than-X flags except for the last one among the N greater-than-X flags).

[0269] According to an embodiment, an apparatus for decoding pictures using predictive coding and block-based transform residual coding is configured to select, for a given transform block, a selected transform from a predetermined list of transforms, the selected transform comprising an identity transform and at least one non-identity transform, to derive a prediction for the given transform block. Furthermore, the apparatus is configured to encode, for the given transform block, a block of coefficients into a data stream by encoding the given coefficients by context-adaptive entropy coding N greater-than-X flags indicating whether the absolute value of the given coefficient is greater than X, and encoding using a variable length code a remainder indicating the amount by which the absolute value of the given coefficient exceeds an absolute threshold that depends on N. The apparatus is configured to, if the selected transform is one of the at least one non-identity transform, perform context adaptive entropy encoding of the N greater-than-X flags in a series of passes by context adaptive entropy encoding the N greater-than-X flags sequentially while increasing X by one or more of the N greater-than-X flags for each pass, record the number of flags coded using the context adaptive entropy coding during the series of passes, and stop context adaptive entropy coding of the N greater-than-X flags if the number exceeds a predetermined flag threshold. Furthermore, the apparatus is configured, when the selected transform is an identity transform, to sequentially perform context-adaptive entropy encoding of the N greater-than-X flags, to encode an importance flag (X=0) among the N greater-than-X flags, and then encode a greater-than-X flag-bypass flag indicating whether a given coefficient is greater than the absolute threshold before further N greater-than-X flags among the N greater-than-X flags, and to stop the context-adaptive entropy encoding of the N greater-than-X flags in the case of a greater-than-X flag-bypass flag indicating that the given coefficient is greater than the absolute threshold (e.g., to resume the context-adaptive entropy encoding of the N greater-than-X flags for further greater-than-X flags except for the last one among the N greater-than-X flags).The blocks of coefficients are associated with residual sample arrays according to a selected transform, and a given transform block can be reconstructed by modifying a prediction of the given transform block using the residual sample array.

[0270] According to an embodiment, an apparatus for decoding a picture using predictive coding and block-based transform residual coding is configured to select, for a given transform block, a selected transform from a predetermined list of transforms, the selected transform comprising an identity transform and at least one non-identity transform, and to derive a prediction for the given transform block. The apparatus is further configured to encode, for the given transform block, a block of coefficients into a data stream in a series of passes that traverse the coefficients of the block of coefficients in a predetermined scan order for the given coefficient by context-adaptive entropy encoding N greater-than-X flags indicating whether the absolute value of the given coefficient is greater than X, encoding a remainder indicating the amount by which the absolute value of the given coefficient exceeds an absolute threshold that depends on N using a variable-length code, and encoding the sign of the given coefficient. The apparatus is configured to distribute the encoding of the N greater-than-X flags, remainder, and sign differently across the series of passes depending on whether the selected transform is an identity transform or one of at least one non-identity transform. The block of coefficients is associated with a residual sample array according to the selected transform, and the given transform block is reconstructable by modifying the prediction of the given transform block using the residual sample array.

[0271] According to an embodiment, an apparatus for decoding a picture using predictive coding and block-based transform residual coding is configured to select, for a given transform block, a selected transform from a predetermined list of transforms, the selected transform comprising an identity transform and at least one non-identity transform. Furthermore, for the given transform block, the apparatus encodes into the data stream one or more predetermined flags (e.g., parity flags and / or greater-than-X flags, sig flags) for each coefficient in a series of passes traversing the coefficients of the block using context-adaptive binary entropy coding, where each predetermined flag indicates where the absolute value of the respective coefficient is located (e.g., the absolute value domain starts at the beginning of one or more passes, e.g., for an X-bit representation, coefficients 0...2). X-1The apparatus is configured to encode the block of coefficients into the data stream by reducing the absolute value domain of each coefficient (starting from a common absolute value domain of ∇ ... The apparatus is configured to encode blocks of coefficients into a data stream such that, for a given transform block, the blocks of coefficients are associated with a residual sample array for the given transform block according to a selected transform, the residual sample array enabling a prediction of the given transform block to be modified and the given transform block to be reconstructed. The apparatus is configured to stop encoding the one or more predetermined flags as soon as a predetermined number of the predetermined flags is reached (i.e., the total number of predetermined flags encoded so far for all coefficients reaches a limit) in successive passes such that a cardinality of an absolute value domain to which the pointers point is smaller for a first set of non-zero coefficients than for a second set of non-zero coefficients (i.e., smaller for coefficients before the limit is reached in the last pass than for coefficients after the limit is reached), and to use different variable length codes for the codewords of the variable length codes for the first and second sets of non-zero coefficients.

[0272] According to an embodiment, the different variable length codes for the codewords of the variable length codes of the first and second non-zero coefficient sets differ in binarization boundaries (cutoff values) between the transitions from the unary part to the Rice- and Exp-Golomb parts and / or in binarization parameters of the common binarization scheme.

[0273] According to an embodiment, the different variable length codes for the codewords of the variable length codes of the first and second non-zero coefficient sets differ in binarization boundaries (cutoff values) between the transitions from the unary part to the Rice- and Exp-Golomb parts and / or in different dependencies of the binarization parameters of the common binarization scheme on previously coded coefficients.

[0274] According to an embodiment, an apparatus for decoding a picture using predictive coding and block-based transform residual coding is configured to select, for a given transform block, a selected transform from a predetermined list of transforms, the selected transform comprising an identity transform and at least one non-identity transform. Furthermore, if the selected transform is a non-identity transform, the apparatus is configured to encode, for the given transform block, a block of coefficients into the data stream by encoding coefficients of the block of coefficients into the data stream along a first scan order (possibly following this order several times in several passes) toward a DC coefficient of the non-identity transform (e.g., starting from the highest frequency coefficient thereafter, possibly from the “last” significant coefficient position). Furthermore, if the selected transform is an identity transform, the apparatus is configured to encode, for the given transform block, a block of coefficients into the data stream by encoding coefficients of the block of coefficients into the data stream along a second scan order from an upper-left sample position to a lower-right sample position. Furthermore, the apparatus is configured to encode the block of coefficients into the data stream for a given transform block such that the block of coefficients is associated with the residual sample array of the given transform block according to a selected transform (this step may include, in the case of an identity transform, adding to each coefficient a coefficient present in the block on a given side, such as the left side in the case of horizontal DPCM or the top of each coefficient in the case of vertical DPCM, so as to perform DPCM inversion), allowing a prediction of the given transform block to be modified to reconstruct the given transform block.

[0275] According to an embodiment, the device is configured to select a second scanning order depending on the DPCM direction used to encode a given transform block (e.g., horizontal raster scan for horizontal DPCM, vertical raster scan for vertical DPCM).

[0276] According to an embodiment, an apparatus for decoding a picture using predictive coding and block-based transform residual coding is configured to select, for a given transform block, a selected transform from a predetermined list of transforms, the selected transform comprising an identity transform and at least one non-identity transform. Furthermore, if, for the given transform block, the selected transform is one of the at least one non-identity transform, the apparatus is configured to encode a syntax element into the data stream and derive therefrom whether the signs of non-zero coefficients in a predetermined group of non-zero coefficients are equal to or unequal to each other, and if so, derive the signs of the non-zero coefficients in the predetermined group of non-zero coefficients, and if the signs of the non-zero coefficients in the predetermined group of non-zero coefficients are unequal to each other, encode the signs of the non-zero coefficients in the predetermined group of non-zero coefficients by encoding a sign bit for each non-zero coefficient. Furthermore, the apparatus is configured to encode, for a given transform block, the block of coefficients into the data stream by encoding the signs of the non-zero coefficients in the predetermined group of non-zero coefficients by encoding a sign bit for each non-zero coefficient base regardless of whether the signs of the non-zero coefficients in the predetermined group of non-zero coefficients are equal to each other if the selected transform is an identity transform.Furthermore, the apparatus is configured, for the given transform block, to encode the block of coefficients into the data stream such that the block of coefficients is associated with a residual sample array of the given transform block according to the selected transform, the residual sample array allowing to modify a prediction of the given transform block and to reconstruct the given transform block.

[0277] According to an embodiment, the apparatus is configured to determine the predetermined group of non-zero coefficients as non-zero coefficients in a block of coefficients that are located within a predetermined sub-block of the block of coefficients.

[0278] According to an embodiment, the apparatus is configured to, if the selected transform is one of the at least one non-identity transform, encode into the data stream a further syntax element indicating whether the signs of the non-zero coefficients in the further predetermined group of non-zero coefficients are equal to one another, and if so, encode the signs of the non-zero coefficients in the further predetermined group of non-zero coefficients, and if the signs of the non-zero coefficients in the further predetermined group of non-zero coefficients are not equal to one another, encode the signs of the non-zero coefficients in the further predetermined group of non-zero coefficients by encoding a further sign bit per non-zero coefficient base, and group the non-zero coefficients of the block of coefficients into multiple groups of non-zero coefficients comprising the group of non-zero coefficients and the further group of non-zero coefficients.

[0279] According to an embodiment, the device is configured to perform the grouping based on dividing a block of coefficients into sub-blocks, such that each group of non-zero coefficients comprises only non-zero coefficients located in one of the sub-blocks.

[0280] According to an embodiment, the device is configured to adapt the partitioning with respect to the size of a given sub-block based on signs of one or more non-zero coefficients in one or more of the sub-blocks preceding the given sub-block in sub-block coding order and / or based on signs of previously coded non-zero coefficients. According to an embodiment, the apparatus is configured to determine a predetermined group of non-zero coefficients to include all non-zero coefficients in a block of coefficients.

[0281] According to an embodiment, the device is configured to encode a block-global syntax element into the data stream if the selected transform is one of the at least one non-identity transform, derive therefrom whether the signs of all non-zero coefficients in a given transform block are equal to one another, and if so, perform encoding of the signs of all non-zero coefficients in the given transform block and of the syntax element into the data stream if the signs of all non-zero coefficients in the given transform block are not equal to one another.

[0282] According to an embodiment, an apparatus for decoding pictures using predictive coding and block-based transform residual coding is configured to select, for a given transform block, a selected transform from a predetermined list of transforms, the selected transform comprising an identity transform and at least one non-identity transform. The apparatus is further configured to encode, for the given transform block, the block of coefficients into the data stream by: encoding signs of non-zero coefficients of a given block of coefficients; encoding a code probability tendency index into the data stream; and, if the selected transform is the identity transform, entropy coding the signs of the given non-zero coefficients (e.g., those first in the coding order or within a particular sub-block of the coefficient block to which the index applies) using a context model (e.g., a context model defining a particular code probability, such as a probability of being positive) associated with the code probability tendency index. The apparatus is further configured, if the selected transform is one of the at least one non-identity transform, to encode, for the given transform block, the block of coefficients into the data stream by bypass coding (e.g., context-adaptive entropy coding with fixed equal probability) the signs of the given non-zero coefficients of the given block of coefficients. Further, the apparatus is configured to encode, for a given transform block, a block of coefficients into the data stream by encoding signs of non-zero coefficients of the given block of coefficients such that the block of coefficients is associated with a residual sample array of the given transform block according to a selected transform, and a prediction of the given transform block is modifiable using the residual sample array to reconstruct the given transform block.

[0283] According to an embodiment, the apparatus is configured to entropy code the signs of all non-zero coefficients using a context model associated with the sign probability trend index if the selected transform is an identity transform, and to bypass code (e.g., context-adaptive entropy coding with fixed equal probability) the signs of all predetermined non-zero coefficients if the selected transform is one of at least one non-identity transform.

[0284] According to an embodiment, the apparatus is configured to, if the selected transformation is an identity transformation, update the code probability associated with the context model associated with the code probability tendency index based on the signs of the predetermined non-zero coefficients.

[0285] According to an embodiment, a plurality of context models are associated with a code probability tendency index, and the device is configured to entropy code each of the codes of the non-zero coefficients using a predetermined context model from the plurality of context models associated with the code probability tendency index, select a predetermined context model from the plurality of context models associated with the code probability tendency index according to the codes of one or more neighboring non-zero coefficients (such as those located at template positions at and around the respective codes) if the selected transformation is an identity transformation, and bypass code (e.g., context-adaptive entropy coding with fixed equal probabilities) the codes of all the predetermined non-zero coefficients if the selected transformation is one of at least one non-identity transformation.

[0286] According to an embodiment, the device is configured to select a predetermined context model from among a plurality of context models associated with a sign probability tendency index according to a frequency of positive or negative signs among one or more adjacent non-zero coefficients, if the selected transformation is an identity transformation.

[0287] According to an embodiment, the code probability trend index is signaled in the data stream, in particular for a sub-block of a block of coefficients in which a given non-zero coefficient is located, f...

Claims

1. A decoder comprising: selecting a transform for the transform block from a group of transforms including an identity transform and at least one non-identity transform; deriving coefficients in the transform block, wherein to derive the coefficients, the decoder: determining, for a current coefficient of the plurality of coefficients, a context for decoding an importance flag based on whether the selected transform is the identity transform or one of the at least one non-identity transform, the importance flag indicating whether the current coefficient is zero, and when the selected transform is the identity transform, the context depends on a plurality of non-zero coefficients at a first position adjacent to the current coefficient, and when the selected transform is one of the at least one non-identity transform, the context depends on each sum of context coding flags corresponding to coefficients at a second position and a position of the current coefficient within the transform block, the second position including positions adjacent to the current coefficient and positions not adjacent to the current coefficient; decoding the importance flag based on the determined context; and and transforming the plurality of coefficients into a residual sample array based on the selected transform; modifying a prediction corresponding to the transform block using the residual sample array; a decoder configured to perform

2. The decoder of claim 1 , wherein the first location specifies two locations adjacent to the current coefficient.

3. one of the two positions is adjacent to the current coefficient in a first direction; 3. The decoder of claim 2, wherein the other of the two locations is adjacent to the current coefficient in a second direction different from the first direction.

4. the first direction is a vertical direction; 4. The decoder of claim 3, wherein the second direction is horizontal.

5. 2. The decoder of claim 1, wherein the second locations specify three locations adjacent to the current coefficient and two locations not adjacent to the current coefficient.

6. The three positions adjacent to the current coefficient are: a first coefficient adjacent to the current coefficient to the right; a second coefficient adjacent to the current coefficient in the downward direction; a third coefficient adjacent to the first coefficient downward and adjacent to the second coefficient to the right; Including, The two positions that are not adjacent to the current coefficient are: a fourth coefficient adjacent to the first coefficient to the right; a fifth coefficient adjacent to the second coefficient in the downward direction; 6. A decoder according to claim 5, comprising:

7. When the selected transform is the non-identity transform, the decoder: determining a first sum of the context coding flags corresponding to the first coefficient; determining a second sum of the context coding flags corresponding to the second coefficient; determining a third sum of the context coding flags corresponding to the third coefficient; determining a fourth sum of the context coding flags corresponding to the fourth coefficient; determining a fifth sum of the context coding flags corresponding to the fifth coefficient; determining the context based in part on a position of the current coefficient within the transform block and a sum of the first sum, the second sum, the third sum, the fourth sum, and the fifth sum; 7. A decoder according to claim 6, configured to perform:

8. decoding a transform skip flag indicating whether to select the identity transform for the transform block; responsive to the transform skip flag indicating selection of the identity transform, transforming the plurality of coefficients into the residual sample array using the identity transform; identifying the non-identity transform from a plurality of non-identity transforms in response to the transform skip flag indicating not to select the identity transform; After the non-identity transform is identified, transforming the plurality of coefficients into the residual sample array using the non-identity transform; 2. The decoder of claim 1, further configured to:

9. 1. A method for video decoding, comprising: selecting a transform for the transform block from a group of transforms including an identity transform and at least one non-identity transform; deriving a plurality of coefficients in the transform block, wherein deriving the plurality of coefficients comprises: determining, for a current coefficient of the plurality of coefficients, a context for decoding an importance flag based on whether the selected transform is the identity transform or one of the at least one non-identity transform, the importance flag indicating whether the current coefficient is zero, and when the selected transform is the identity transform, the context depends on a plurality of non-zero coefficients at a first position adjacent to the current coefficient, and when the selected transform is one of the at least one non-identity transform, the context depends on each sum of context coding flags corresponding to coefficients at a second position and a position of the current coefficient within the transform block, the second position including positions adjacent to the current coefficient and positions not adjacent to the current coefficient; decoding the importance flag based on the determined context; and and deriving transforming the plurality of coefficients into a residual sample array based on the selected transform; modifying a prediction corresponding to the transform block using the residual sample array; A method comprising:

10. The method of claim 9 , wherein the first location specifies two locations adjacent to the current coefficient.

11. one of the two positions is adjacent to the current coefficient in a first direction; The method of claim 10 , wherein the other of the two locations is adjacent to the current coefficient in a second direction different from the first direction.

12. the first direction is a vertical direction; The method of claim 11 , wherein the second direction is horizontal.

13. 10. The method of claim 9, wherein the second locations specify three locations adjacent to the current coefficient and two locations not adjacent to the current coefficient.

14. The three positions adjacent to the current coefficient are: a first coefficient adjacent to the current coefficient to the right; a second coefficient adjacent to the current coefficient in the downward direction; a third coefficient adjacent to the first coefficient downward and adjacent to the second coefficient to the right; Including, The two positions that are not adjacent to the current coefficient are: a fourth coefficient adjacent to the first coefficient to the right; a fifth coefficient adjacent to the second coefficient in the downward direction; 14. The method of claim 13, comprising:

15. When the selected transformation is the non-identity transformation, the method comprises: determining a first sum of the context coding flags corresponding to the first coefficient; determining a second sum of the context coding flags corresponding to the second coefficient; determining a third sum of the context coding flags corresponding to the third coefficient; determining a fourth sum of the context coding flags corresponding to the fourth coefficient; determining a fifth sum of the context coding flags corresponding to the fifth coefficient; determining the context based in part on a position of the current coefficient within the transform block and a sum of the first sum, the second sum, the third sum, the fourth sum, and the fifth sum; 15. The method of claim 14, comprising:

16. decoding a transform skip flag indicating whether to select the identity transform for the transform block; responsive to the transform skip flag indicating selection of the identity transform, transforming the plurality of coefficients into the residual sample array using the identity transform; identifying the non-identity transform from a plurality of non-identity transforms in response to the transform skip flag indicating not to select the identity transform; After the non-identity transform is identified, transforming the plurality of coefficients into the residual sample array using the non-identity transform; The method of claim 9 further comprising:

17. A non-transitory computer-readable medium containing instructions that, when executed, cause at least one processor to execute the instructions, selecting a transform for the transform block from a group of transforms including an identity transform and at least one non-identity transform; The instructions for deriving a plurality of coefficients in the transform block, which instructions, when executed, cause at least one processor to derive the plurality of coefficients, may include instructions, when executed, that cause the at least one processor to: determining, for a current coefficient of the plurality of coefficients, a context for decoding an importance flag based on whether the selected transform is the identity transform or one of the at least one non-identity transform, the importance flag indicating whether the current coefficient is zero, and when the selected transform is the identity transform, the context depends on a plurality of non-zero coefficients at a first position adjacent to the current coefficient, and when the selected transform is one of the at least one non-identity transform, the context depends on each sum of context coding flags corresponding to coefficients at a second position and a position of the current coefficient within the transform block, the second position including positions adjacent to the current coefficient and positions not adjacent to the current coefficient; decoding the importance flag based on the determined context; and and transforming the plurality of coefficients into a residual sample array based on the selected transform; modifying a prediction corresponding to the transform block using the residual sample array; A non-transitory computer-readable medium for causing the execution of

18. the first location specifies two locations adjacent to the current coefficient; one of the two positions is adjacent to the current coefficient in a first direction; 20. The non-transitory computer-readable medium of claim 17, wherein the first direction is a vertical direction.

19. 20. The non-transitory computer-readable medium of claim 18, wherein the other of the two locations is adjacent to the current coefficient in a horizontal direction different from the first direction.

20. the second locations designate three locations adjacent to the current coefficient and two locations not adjacent to the current coefficient; The three positions adjacent to the current coefficient are: a first coefficient adjacent to the current coefficient to the right; a second coefficient adjacent to the current coefficient in the downward direction; a third coefficient adjacent to the first coefficient downward and adjacent to the second coefficient to the right; Including, The two positions that are not adjacent to the current coefficient are: a fourth coefficient adjacent to the first coefficient to the right; a fifth coefficient adjacent to the second coefficient in the downward direction; 20. The non-transitory computer-readable medium of claim 17, comprising:

21. When executed, the at least one processor: decoding a transform skip flag indicating whether to select the identity transform for the transform block; responsive to the transform skip flag indicating selection of the identity transform, transforming the plurality of coefficients into the residual sample array using the identity transform; identifying the non-identity transform from a plurality of non-identity transforms in response to the transform skip flag indicating not to select the identity transform; After the non-identity transform is identified, transforming the plurality of coefficients into the residual sample array using the non-identity transform; 20. The non-transitory computer-readable medium of claim 17, further comprising:

22. 1. An encoder comprising: selecting a transform for the transform block from a group of transforms including an identity transform and at least one non-identity transform; transforming the plurality of coefficients into a residual sample array based on the selected transform; Encoding a plurality of coefficients within the transform block, wherein to encode the plurality of coefficients, the encoder comprises: determining, for a current coefficient of the plurality of coefficients, a context for encoding an importance flag based on whether the selected transform is the identity transform or one of the at least one non-identity transform, the importance flag indicating whether the current coefficient is zero, and when the selected transform is the identity transform, the context depends on a plurality of non-zero coefficients at a first position adjacent to the current coefficient, and when the selected transform is one of the at least one non-identity transform, the context depends on each sum of context encoding flags corresponding to coefficients at a second position and a position of the current coefficient within the transform block, the second position including a position adjacent to the current coefficient and a position not adjacent to the current coefficient; encoding the importance flag based on the determined context; and an encoder configured to:

23. 1. A method for video encoding, comprising: selecting a transform for the transform block from a group of transforms including an identity transform and at least one non-identity transform; transforming the plurality of coefficients into a residual sample array based on the selected transform; Encoding a plurality of coefficients within the transform block, wherein encoding the plurality of coefficients comprises: determining, for a current coefficient of the plurality of coefficients, a context for encoding an importance flag based on whether the selected transform is the identity transform or one of the at least one non-identity transform, the importance flag indicating whether the current coefficient is zero, and when the selected transform is the identity transform, the context depends on a plurality of non-zero coefficients at a first position adjacent to the current coefficient, and when the selected transform is one of the at least one non-identity transform, the context depends on each sum of context encoding flags corresponding to coefficients at a second position and a position of the current coefficient within the transform block, the second position including a position adjacent to the current coefficient and a position not adjacent to the current coefficient; encoding the importance flag based on the determined context; and A method comprising:

24. A non-transitory computer-readable medium containing instructions that, when executed, cause at least one processor to execute the instructions, selecting a transform for the transform block from a group of transforms including an identity transform and at least one non-identity transform; transforming the plurality of coefficients into a residual sample array based on the selected transform; The instructions for encoding a plurality of coefficients within the transform block, which, when executed, cause the at least one processor to encode the plurality of coefficients, may, when executed, cause the at least one processor to: determining, for a current coefficient of the plurality of coefficients, a context for encoding an importance flag based on whether the selected transform is the identity transform or one of the at least one non-identity transform, the importance flag indicating whether the current coefficient is zero, and when the selected transform is the identity transform, the context depends on a plurality of non-zero coefficients at a first position adjacent to the current coefficient, and when the selected transform is one of the at least one non-identity transform, the context depends on each sum of context encoding flags corresponding to coefficients at a second position and a position of the current coefficient within the transform block, the second position including a position adjacent to the current coefficient and a position not adjacent to the current coefficient; encoding the importance flag based on the determined context; and A non-transitory computer-readable medium for causing the execution of

Citation Information

Patent Citations

  • Coding of conversion factors for video coding

    JP2014509158A

  • Coding of significance coefficient information in conversion skip mode

    JP2014535247A

  • Context reduction of significance map coding of 4x4 and 8x8 transformation coefficients in HM4.0

    JP2015501581A

  • Video encoding device and video decoding device

    JP2020053924A

  • Coding of transform coefficients for video coding

    WO2012122286A1