Unified transform type signaling and transform type-dependent transform coefficient level coding

By unifying transform type signaling and dedicated horizontal coding technology that depends on the selected transform type, the problem that transform type signaling has nothing to do with coding in the prior art is solved, and the compression efficiency of video coding is improved.

CN113519155BActive Publication Date: 2024-09-27FRAUNHOFER GESELLSCHAFT ZUR FORDERUNG DER ANGEWANDTEN FORSCHUNG EV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201980093433.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2019-03-12
Filing Date
2019-12-30
Publication Date
2024-09-27
Estimated Expiration
2039-12-30

AI Technical Summary

Technical Problem

In existing video coding technology, transform type signaling has nothing to do with horizontal coding of transform coefficients, resulting in low compression efficiency and inability to effectively utilize the differences between different transform types.

Method used

By uniformly selecting transform type signaling and providing dedicated horizontal coding techniques depending on the selected transform type, appropriate coding methods are selected for different transform types to improve compression efficiency.

Benefits of technology

The compression efficiency of video encoding is improved. By performing dedicated encoding for different transform types, the encoding process of transform coefficients is optimized and the encoding performance is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113519155B_ABST
    Figure CN113519155B_ABST
Patent Text Reader

Abstract

A device for decoding a picture using predictive coding and block-based transform residual coding, the device being configured to subdivide the picture into transform blocks of different sizes. The device is configured to select a selected transform for a predetermined transform block by checking whether the size of the predetermined transform block exceeds a predetermined threshold size. If the size of the predetermined transform block exceeds the predetermined threshold size, the device is configured to select the selected transform using a default method. If the size of the predetermined transform block does not exceed the predetermined threshold size, the device is configured to use a transform pointed to by an index sent in a data stream for the predetermined transform block in a predetermined transform list as the selected transform, the predetermined transform list including an identity transform and a non-identity transform. In addition, the device is configured to decode a coefficient block from a data stream for the predetermined transform block, if the selected transform is an identity transform, use the coefficient block as a residual sample array of the predetermined transform block, and if the selected transform is not an identity transform, perform an inverse transform on the coefficient block corresponding to the selected transform to obtain a residual sample array of the predetermined transform block. In addition, the device is configured to use the residual sample array to correct the prediction of the predetermined transform block to reconstruct the predetermined transform block.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] Hybrid video compression schemes such as AVC and HEVC rely on block-based prediction, followed by transform of the prediction residuals, quantization of the transform coefficients, and entropy coding of the quantization indices. The latter is also referred to as transform coefficient level coding, or simply horizontal coding in the rest of this document. The following description also uses the term transform for integer approximations of the transform as implemented in actual hybrid video compression schemes.

[0003] Traditionally, a fixed transform is specified in the video coding standard for each potential block size N×N. For example, the HEVC standard specifies that DCT-II is used except for 4×4 blocks predicted within a picture (which use DST-VI). Higher compression efficiency can be achieved by choosing between multiple predefined transform types. The current draft of Versatile Video Coding (VVC) specifies a set of five different transform types (including DCT-II). Together with the transform skip mode (TSM), a total of six transform types are supported, in which the transform is equal to the identity transform. The bitstream syntax includes syntax to signal the transform type selected by the encoder to the decoder. The encoding of the transform coefficient level is independent of the selected transform type.

[0004] The present invention describes a method for improving compression efficiency by a) unifying the signaling of the selected transform type and b) providing dedicated level coding techniques depending on the selected transform type.

[0005] Background of the Invention

[0006] Current state-of-the-art video coding techniques, including VVC development, specify methods to signal one of a number of predefined transform types, including the possibility to skip a transform (i.e. use an identity transform) using TSM. The entropy coding of the transform coefficient levels (i.e. the quantization indices of the transform coefficients) is independent of the selected transform.

[0007] Change Type Signaling

[0008] The current VVC development specifies N×M transform blocks, where N≤64 and M≤64, and both N and M are integer powers of 2. Note that in contrast to HEVC, rectangular (non-square) transform blocks are possible. When N≤32 and M≤32, in addition to DCT-II, additional transform types are available, and the technology is called multiple transform selection (MTS). Similar to HEVC, for 4×4 transform blocks, transform skip mode (TSM) is an additional coding option, which can be interpreted as using an identity transform. In transform skip mode (TSM), the transform stage is skipped and the prediction residual is processed directly by the quantization stage. The range extension profile of HEVC specifies an extension to TSM, which allows TSM to be used for all transform block sizes (i.e. not only for 4×4 blocks).

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

[0010] Table 1 MTS signaling using CT MTS flag and TU MTS index

[0011]

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

[0013] Horizontal Encoding

[0014] Horizontal coding in HEVC as well as in the current VVC development is independent of the chosen transform type. In VVC (Draft 3), horizontal coding is similar to that in HEVC. First, the bitstream includes a flag (coded block flag CBF) to signal the significance of the transform block, i.e. the presence of a quantization index (horizontal) not equal to zero. Second, when the block is significant (i.e. it includes any quantization index not equal to zero), the last significant scan position is specified as an offset from the root in x and y coordinates, the root being located at the top left corner of the transform block. A transform block 84 larger than 4×4 is divided into non-intersecting 4×4 sub-blocks 84', as Fig.25 In the current VVC design, a diagonal scanning pattern 85 is used to scan the sub-block 84' and the horizontal within the sub-block 84'.

[0015] Fig.25 An example of dividing a transform block into 16 4×4 sub-blocks 84 ′ and an inverse diagonal scanning pattern 85 for scanning horizontally within the sub-blocks 84 ′ and the sub-blocks 84 ′ within the transform block 84 is shown.

[0016] The scanning of the transform block is performed in a sub-block-first manner. Specifically, the sub-block containing the last significant scan position is processed first, and each sub-block is processed similarly to a conventional 4×4 block. For each sub-block after the sub-block with the last significant scan position, a CBF (coded_sub_block_flag) is sent. This sub-block CBF signals the significance of the corresponding sub-block, except for the sub-block containing the DC frequency position (top left within the transform block). Therefore, the levels at the frequency positions covered by the top left sub-block are always encoded.

[0017] The encoding of the level within each sub-block is as follows. In the first scan pass, a significance flag (sig_coeff_flag) indicating whether the current absolute level is greater than zero is encoded, followed by information greater than one (abs_level_gt1_flag) and parity information (par_level_flag). These three syntax elements are encoded for each scan position covered by the current sub-block forming the first scan pass. When the absolute level is equal to 0, sig_coeff_flag is encoded as equal to 0, and the subsequent syntax is not encoded but inferred to be equal to 0. Similarly, when the absolute level is equal to 1, sig_coeff_flag is equal to 1, abs_level_gt1_flag is encoded as equal to 0, and the subsequent syntax is not encoded but inferred to be equal to 0. After the first pass, the absolute level at scan position n is calculated as follows:

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

[0019] In the next scan pass, a flag greater than three is sent (abs_level_gt3_flag), followed by a third scan pass with the remainder information (abs_remainder). The absolute level at scan position n is calculated as follows:

[0020] AbsLevel(n)=AbsLevelPass1(n)+2*(abs_level_gt3_flag(n)+abs_remainder(n))

[0021] The last scan pass sends the sign of the significant scan position (coeff_sign_flag), and the level at scan position n is calculated as follows:

[0022] Level(n)=(2*AbsLevel(n)+(QState>1?1:0))*(1-2*coeff_sign_flag(n))

[0023] where QState is the current quantization state QState for the associated quantization, which depends on the previous state and the parity of the previous coding level as follows:

[0024] QState=QStateTransTable(QState)(par_level_flag)

[0025] Dependent quantization was added during VVC development, the state transfer table QStateTransTable()() is shown in Table 2, and QState is reset to 0 at the beginning of each transform block. In the case where dependent quantization is disabled by a high-level flag (e.g. at the slice or tile header level), QState is always equal to 0 (this can be achieved by using a state transfer table with all entries equal to zero).

[0026] Table 2 Quantization state transition table QStateTransTable(i)(j), where i=0..3 represents the previous state, j=0,1 represents the parity check of the previous transform coefficient level (ie, the previous quantization index)

[0027] j\i 0 1 2 3 0 0 2 1 3 1 2 0 3 1

[0028] Current VVC developments include a restriction on the number of binary bins coded using a context model (hereinafter denoted as context coded binary bins (CCBs)). When all absolute levels of all sub-blocks within a transform block are ≥ 4, the number of CCBs per level is equal to four, because each binary 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). In order to limit the worst-case complexity of entropy decoding, for example from four CCBs per level to two CCBs, the number of CCBs (sig_coeff_flag, abs_level_gt1_flag, par_level_flag) in the first scan pass is tracked. For example, this can be done by counting the remaining binary bins in descending order starting from 28 in the first pass (remBinsPass1); and when parsing abs_level_gt3_flag, leaving 4 binary bins for the second pass (remBinsPass2). When a certain number of CCBs has been reached, the level coding process skips the subsequent 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 encodes the absolute levels in bypass mode of the arithmetic coding engine to produce an adaptive binarization scheme. In the case where the maximum number of CCBs has been reached and there are still scan positions where there are remaining levels to be encoded, the remaining absolute levels are all encoded in bypass mode using different residual partial binarizations (dec_abs_level).

[0029] Table 3 illustrates a syntax table for the above-mentioned state-of-the-art encoding, where the CCB is restricted using remBinsPass1 and remBinsPass2.

[0030] Table 3 Example prior art residual coding syntax independent of transform type

[0031]

[0032]

[0033]

[0034]

[0035]

[0036] For context model selection for the sig_coeff_flag, abs_level_gt1_flag, par_level_flag, and abs_level_gt3_flag syntaxes, the local template evaluates the activity around the current scan position n. Five processed neighbors are considered: right (NB0), below (NB1), second right (NB2), second below (NB3), and right below (NB4).

[0037]

[0038] 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 d within the transform block, the number of significant neighbors locNumSig, and the sum of the absolute values ​​of the significant neighbors after the first pass locSumAbsPass1. Note that the latter may contain only partial information, since the overall absolute horizontal information is only known after the scan pass for the remaining partial information. These values ​​can be calculated as follows:

[0039] d=xC+yC

[0040]

[0041]

[0042] The context model for the sig_coeff_flag, abs_level_gt1_flag, par_level_flag and abs_level_gt3_flag syntax is selected by an index or offset into the context set, which is derived from the diagonal d and, for sig_coeff_flag, additionally from the quantization state QState. For the sig_coeff_flag syntax, the context offset within the context set is derived from 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 number of significant positions locNumSig is subtracted from the absolute sum locSumAbsPass1. As a special feature, a dedicated context model is used for the syntax element of the last significant scan position.

[0043] In the bypass mode of the entropy encoder, the remainder is encoded using a combination of Golomb-Rice (Rm) and Exponential-Golomb (EGk) codes. The order m for the Rice code and the order k for the EG code are derived based on the coded remainder values ​​within the sub-block (similar to HEVC).

[0044] Due to the limitation on the number of CCBs, there are two additional remainder scan passes. In the first additional scan pass after the conventional remainder scan pass, the remainder of the scan positions with only sig_coeff_flag, abs_level_gt1_flag and par_level_flag syntax elements is sent, i.e., for these positions, the abs_level_gt3_flag syntax has been skipped. In the second additional scan pass, the remainder of the scan positions without any syntax elements is encoded. Please note that the scan pass also means encoding the absolute level completely in bypass mode. For this last remainder pass, the binarization parameters m and k are derived using another local template having the same shape as the template for the sig_coeff_flag syntax. The absolute sum within the template is obtained and mapped to the Rice parameter n, which directly leads to the order of the EG code having the relationship k=m+1. Summary of the invention

[0045] According to an embodiment of the present invention, a device for decoding a picture using predictive coding and block-based transform residual coding is configured to subdivide the picture into transform blocks of different sizes. The device is configured to select a selected transform for a predetermined transform block by checking whether the size of the predetermined transform block exceeds a predetermined threshold size. If the size of the predetermined transform block exceeds the predetermined threshold size, the device is configured to select the selected transform using a default method. If the size of the predetermined transform block does not exceed the predetermined threshold size, the device is configured to use a transform pointed to by an index sent in a data stream for the predetermined transform block in a predetermined transform list as the selected transform, and the predetermined transform list includes an identity transform and a non-identity transform. In addition, the device is configured to decode a coefficient block from a data stream for a predetermined transform block, and if the selected transform is an identity transform, use the coefficient block as a residual sample array of the predetermined transform block, and if the selected transform is not an identity transform, perform an inverse transform corresponding to the selected transform on the coefficient block to obtain a residual sample array of the predetermined transform block. In addition, the apparatus is configured to use the residual sample array to correct a prediction of the predetermined transform block (which may be a spatial prediction or a temporal prediction, invalid for all subsequent occurrences) to reconstruct the predetermined transform block.

[0046] According to an embodiment of the present invention, a device for decoding a picture using predictive coding and block-based transform residual coding is configured to select a selected transform for a predetermined transform block by decoding an index from a data stream for the predetermined transform block, and using a transform pointed to by the index in a predetermined transform list as the selected transform. In addition, the device is configured to decode a coefficient block from the data stream for the predetermined transform block, derive a residual sample array of the predetermined transform block from the coefficient block, so that the coefficient block is related to the residual sample array according to the selected transform, and use the residual sample array to correct the prediction of the predetermined transform block to reconstruct the predetermined transform block. In addition, the apparatus is configured to, when decoding a coefficient block from a data stream for a predetermined transform block, depending on whether a selected transform for the predetermined block is included in a predefined set of one or more transforms, decode from the data stream a coded block flag that signals whether the coefficient block has at least one non-zero coefficient if the selected transform for the predetermined block is included in the predefined set of one or more transforms, and infer that the coefficient block has at least one non-zero coefficient if the selected transform for the predetermined block is not included in the predefined set of one or more transforms (in other words, if the selected transform for the predetermined block is included in the predefined set of one or more transforms, do not decode the CBF from the data stream, or even in other words, decode a syntax element other than the CBF from the current portion of the data stream that is being decoded from the CBF).

[0047] According to an embodiment of the present invention, a device for decoding a picture using predictive coding and block-based transform residual coding is configured to decode a coefficient block from a data stream for a predetermined transform block, including decoding a coding block flag from the data stream to signal whether the coefficient block has at least one non-zero coefficient. The device is configured to, if the coding block flag signals that the coefficient block has at least one non-zero coefficient, select a selected transform for the predetermined transform block by decoding an index from the data stream for the predetermined transform block and using a transform pointed to by the index in a predetermined transform list as the selected transform, derive a residual sample array of the predetermined transform block from the coefficient block, so that the coefficient block is related to the residual sample array according to the selected transform, and use the residual sample array to correct the prediction of the predetermined transform block to reconstruct the predetermined transform block. If the coding block flag signals that the coefficient block does not have at least one non-zero coefficient, the device is configured to reconstruct the predetermined transform block without predictive correction (in other words, if the coding block flag signals that the coefficient block does not have at least one non-zero coefficient, the index is not decoded from the data stream, for example, a syntax element different from the index is decoded from the current portion of the decoded index in the data stream).

[0048] According to an embodiment of the present invention, a device for decoding a picture using predictive coding and block-based transform residual coding is configured to fill or fill and sort a predetermined transform list depending on a data stream. The device is configured to select a selected transform for a predetermined transform block by decoding an index from the data stream using a variable length code, and using a transform pointed to by the index in the predetermined transform list as the selected transform, so that each transform in the predetermined transform list has been assigned a codeword of the variable length code, and the codeword length of the codeword of the variable length code increases monotonically with the order of the transform assigned the codeword in the predetermined transform list. In addition, the device is configured to decode a coefficient block from the data stream for the predetermined transform block, derive a residual sample array of the predetermined transform block from the coefficient block, so that the coefficient block is related to the residual sample array according to the selected transform, and use the residual sample array to correct the prediction of the predetermined transform block to reconstruct the predetermined transform block.

[0049] According to an embodiment of the present invention, a device for decoding a picture using predictive coding and block-based transform residual coding is configured to select a selected transform for a predetermined transform block by decoding an index in a predetermined transform list from a data stream using a combined variable length code codeword, the combined variable length code codeword consisting of the following items: a first codeword of a variable length code, and if the first codeword is the longest codeword of the variable length code, the first codeword is followed by a second codeword of a fixed length code. A codeword consisting of only one of the two non-longest codewords of the variable length code in the combined variable length code is assigned to an identity transform and a predefined non-identity transform included in the predetermined transform list, and is used to distinguish the identity transform from the predefined non-identity transform, and other codewords of the combined variable length code are assigned to other non-identity transforms in the predetermined transform list, and are used to distinguish other non-identity transforms in the predetermined transform list. The device is configured to select a selected transform for a predetermined transform block by using a transform pointed to by the index in the predetermined transform list as the selected transform. Furthermore, the apparatus is configured to, for a predetermined transform block, decode a coefficient block from a data stream, derive a residual sample array of the predetermined transform block from the coefficient block, such that the coefficient block is associated with the residual sample array according to a selected transform, and use the residual sample array to correct a prediction of the predetermined transform block to reconstruct the predetermined transform block.

[0050] According to an embodiment of the present invention, a device for decoding a picture using predictive coding and block-based transform residual coding is configured to select a selected transform from a predetermined transform list for a predetermined transform block, the selected transform including an identity transform and at least one non-identity transform. The device is configured to decode a coefficient block from a data stream for the predetermined transform block by checking whether 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 to obtain a predetermined coefficient position, the position information being related to where a non-zero coefficient is first encountered along a scanning order that traverses all coefficients of the coefficient block, or where a non-zero coefficient is last encountered along a scanning order that traverses all coefficients of the coefficient block (please note the following. In the above embodiments, the position is referred to as the last position measured along a scanning order that leads from the upper left corner to the lower right, although according to these embodiments, the actual scanning starts encoding from there. That is, the actual encoding occurs in a reverse scanning order that leads from the lower right corner to the upper left corner. Here, the scanning order is the encoding order.), and decode the coefficient block from the data stream for the predetermined transform block by decoding the first coefficient of the coefficient block from the data stream, the first coefficient including all non-zero coefficients of the coefficient block and traversed by the scanning order starting from or up to the predetermined coefficient position, and inferring that the second coefficient in the coefficient block that is different from the first coefficient is zero. If the selected transform is an identity transform, the device is configured to decode the coefficient block from the data stream for the predetermined transform block by decoding all coefficients of the coefficient block from the data stream. Furthermore, the apparatus is configured to derive a residual sample array of a predetermined transform block from the coefficient block, such that the coefficient block is associated with the residual sample array according to the selected transform, and to use the residual sample array to correct the prediction of the predetermined transform block to reconstruct the predetermined transform block.

[0051] According to an embodiment of the present invention, a device for decoding a picture using predictive coding and block-based transform residual coding is configured to select a selected transform from a predetermined transform list for a predetermined transform block, the selected transform including an identity transform and at least one non-identity transform. The device is configured to decode the coefficients of the coefficient block from the data stream in units of sub-blocks into which the coefficient block is divided by inferring a sub-block flag in the data stream to signal that the coefficients in the sub-block of zero are zero, and decoding the sub-block flag in the data stream from the data stream to signal the coefficients in the sub-block of non-zero, so as to decode the coefficient block from the data stream for the predetermined transform block. If the selected transform is one of at least one non-identity transform, the device is configured to decode the coefficient block from the data stream for the predetermined transform block by sequentially decoding the sub-block flags except at least one of the first sub-block flag and the last sub-block flag from the data stream, and inferring the at least one sub-block flag in the first sub-block flag and the last sub-block flag to signal non-zero, so as to decode the coefficient block from the data stream for the predetermined transform block. If the selected transform is an identity transform, the apparatus is configured to decode a coefficient block from the data stream for a predetermined transform block by decoding subblock flags from the data stream for all subblocks. In addition, the apparatus is configured to derive a residual sample array of the predetermined transform block from the coefficient block, such that the coefficient block is associated with the residual sample array according to the selected transform, and to correct a prediction of the predetermined transform block using the residual sample array to reconstruct the predetermined transform block.

[0052] According to an embodiment of the present invention, a device for decoding a picture using predictive coding and block-based transform residual coding is configured to select a selected transform from a predetermined transform list for a predetermined transform block, the selected transform including an identity transform and at least one non-identity transform. The device is configured to decode the coefficients of the coefficient block from the data stream by inferring the sub-block flag in the data stream to signal that the coefficients in the sub-block of zero are zero, and decoding the sub-block flag in the data stream from the data stream to signal the coefficients in the sub-block of non-zero, so as to decode the coefficient block from the data stream for the predetermined transform block, wherein the currently decoded sub-block flag is decoded from the data stream by context adaptive entropy decoding and using the context. If the selected transform is one of the at least one non-identity transform, the context depends on the logical or of the sub-block flags related to the sub-blocks adjacent to the currently decoded sub-block flag, and if the selected transform is an identity transform, the context depends on the arithmetic sum of the sub-block flags related to the sub-blocks adjacent to the currently decoded sub-block flag. Furthermore, the apparatus is configured to derive a residual sample array of a predetermined transform block from the coefficient block such that the coefficient block is associated with the residual sample array according to the selected transform, and to use the residual sample array to correct a prediction of the predetermined transform block to reconstruct the predetermined transform block.

[0053] According to an embodiment of the present invention, a device for decoding a picture using predictive coding and block-based transform residual coding is configured to select a selected transform from a predetermined transform list for a predetermined transform block, the selected transform including an identity transform and at least one non-identity transform. The device is configured to decode a coefficient block from a data stream for a predetermined transform block by decoding a significance flag indicating whether the current coefficient is zero using a context for a current coefficient. If the selected transform is an identity transform, the context depends on the number of non-zero coefficients in a first coefficient set immediately adjacent to the current coefficient, and if the selected transform is one of at least one non-identity transform, the context depends on the number of non-zero coefficients in a second coefficient set, the value of the second coefficient set, and the position of the current coefficient, the second coefficient set including the first coefficient set and the coefficient farther away from the current coefficient than the first coefficient set. In addition, the device is configured to derive a residual sample array of a predetermined transform block from the coefficient block, so that the coefficient block is related to the residual sample array according to the selected transform, and the residual sample array is used to correct the prediction of the predetermined transform block to reconstruct the predetermined transform block.

[0054] According to an embodiment of the present invention, a device for decoding a picture using predictive coding and block-based transform residual coding is configured to select a selected transform from a predetermined transform list for a predetermined transform block, the selected transform including an identity transform and at least one non-identity transform. The device is configured to decode a coefficient block from a data stream for a predetermined transform block by context-adaptively entropy decoding N greater than X flags, and by decoding the remaining portion indicating the amount by which the absolute value of the predetermined coefficient exceeds an absolute threshold using a variable length code, wherein the greater than X flag indicates whether the absolute value of the predetermined coefficient is greater than X, and the predetermined threshold depends on N, wherein N is greater when the selected transform is an identity transform than when the selected transform is one of at least one non-identity transform. In addition, the device is configured to derive a residual sample array of the predetermined transform block from the coefficient block, so that the coefficient block is related to the residual sample array according to the selected transform, and use the residual sample array to correct the prediction of the predetermined transform block to reconstruct the predetermined transform block.

[0055] According to an embodiment of the present invention, a device for decoding a picture using predictive coding and block-based transform residual coding is configured to select a selected transform from a predetermined transform list for a predetermined transform block, the selected transform including an identity transform and at least one non-identity transform. The device is configured to decode the coefficient block from a data stream for the predetermined transform block by context-adaptive entropy decoding the sign of the predetermined coefficient using a predetermined context (e.g., selecting the context according to the sign of the coefficient of the coefficient block in the neighborhood of the predetermined coefficient) if the selected transform is an identity transform, and updating the probability associated with the predetermined context; and the device is configured to decode the sign of the predetermined coefficient by bypass decoding (e.g., context-adaptive entropy decoding with fixed equal probability) if the selected coding is one of at least one non-identity transform, to decode the coefficient block from the data stream for the predetermined transform block. In addition, the device is configured to derive a residual sample array of the predetermined transform block from the coefficient block, so that the coefficient block is related to the residual sample array according to the selected transform, and use the residual sample array to correct the prediction of the predetermined transform block to reconstruct the predetermined transform block.

[0056] According to an embodiment of the present invention, a device for decoding a picture using predictive coding and block-based transform residual coding is configured to select a selected transform from a predetermined transform list for a predetermined transform block, the selected transform including an identity transform and at least one non-identity transform. The device is configured to decode a coefficient block from a data stream for the predetermined transform block by context-adaptive entropy decoding N greater than X flags, and by decoding the remaining portion indicating the amount by which the absolute value of the predetermined coefficient exceeds an absolute threshold using a variable length code, wherein the greater than X flag indicates whether the absolute value of the predetermined coefficient is greater than X, and the predetermined threshold depends on N. If the selected transform is one of the at least one non-identity transform, the device is configured to perform context-adaptive entropy decoding of the N greater than X flags in a pass sequence by sequentially context-adaptive entropy decoding of the N greater than X flags, wherein X is increased with one or more of the N greater than X flags in each pass, and the number of flags encoded using context-adaptive entropy decoding is recorded during the pass sequence, and if the number exceeds a predetermined flag threshold, the context-adaptive entropy decoding of the N greater than X flags is stopped. If the selected transform is an identity transform, the apparatus is configured to sequentially perform context adaptive entropy decoding on the N greater than X flags, and after decoding a significance flag (X=0) among the N greater than X flags and before decoding another N greater than X flags among the N greater than X flags, decode a greater than X flag bypass flag indicating whether a predetermined coefficient is greater than an absolute threshold, and if the greater than X flag bypass flag indicates that the predetermined coefficient is greater than the absolute threshold, stop context adaptive entropy decoding on the N greater than X flags relative to the other N greater than X flags (e.g., and if the greater than X flag bypass flag indicates that the predetermined coefficient is not greater than the absolute threshold, resume context adaptive entropy decoding on the N greater than X flags relative to the other greater than X flags except for the last greater than X flag among the N greater than X flags). In addition, the apparatus is configured to derive a residual sample array of the predetermined transform block from the coefficient block, so that the coefficient block is related to the residual sample array according to the selected transform, and use the residual sample array to correct the prediction of the predetermined transform block to reconstruct the predetermined transform block.

[0057] According to an embodiment of the present invention, a device for decoding a picture using predictive coding and block-based transform residual coding is configured to select a selected transform from a predetermined transform list for a predetermined transform block, the selected transform including an identity transform and at least one non-identity transform. The device is configured to decode a coefficient block from a data stream for a predetermined transform block in a pass sequence by context-adaptively entropy decoding N greater than X flags for a predetermined coefficient, decoding a remainder indicating an amount by which an absolute value of a predetermined coefficient exceeds an absolute threshold by using a variable length code, and decoding a sign of a predetermined coefficient, wherein the pass traverses the coefficients of the coefficient block in a predetermined scanning order, the greater than X flag indicating whether the absolute value of the predetermined coefficient is greater than X, and the absolute threshold depends on N. The device is configured to distribute the decoding of the N greater than X flags, the remainder, and the sign differently over the pass sequence depending on whether the selected transform is an identity transform or one of the at least one non-identity transforms. Furthermore, the apparatus is configured to derive a residual sample array of a predetermined transform block from the coefficient block such that the coefficient block is associated with the residual sample array according to the selected transform, and to use the residual sample array to correct a prediction of the predetermined transform block to reconstruct the predetermined transform block.

[0058] According to an embodiment of the present invention, a device for decoding a picture using predictive coding and block-based transform residual coding is configured to select a selected transform from a predetermined transform list for a predetermined transform block, the selected transform including an identity transform and at least one non-identity transform. The device is configured to decode a coefficient block from a data stream for a predetermined transform block by decoding one or more predetermined flags (e.g., a parity check flag and / or a greater than X flag, a significance flag) for each coefficient from the data stream in a pass sequence, the pass traversing the coefficients of the block, each predetermined flag reducing the absolute value domain of the corresponding coefficient (e.g., the parity check bit reduces the absolute value domain to half by excluding each even or odd absolute value, the greater than X flag reduces the domain of possible absolute values ​​by excluding one of the possible absolute values ​​or leaving one of the possible absolute values ​​and excluding all other possible absolute values), the absolute value of the corresponding coefficient is within the absolute value domain (e.g., the absolute value domain starts from the beginning of one or more passes, for example, in the case of X-bit representation, from the general absolute value domain of the coefficient, 0...2 X-1). The apparatus is configured to decode a coefficient block from a data stream for a predetermined transform block by, in a sequence of passes, decoding, for each coefficient whose cardinality of the absolute value domain is not reduced to 1 by one or more predetermined flags decoded for the corresponding coefficient, a variable length code codeword (e.g., a Rice code / Exponential Golomb code), the variable length code codeword indicating an absolute value of the corresponding coefficient within the absolute value domain of the corresponding coefficient (e.g., the code length of the variable length code may increase monotonically with increasing absolute value), the pass traversing the coefficients of the block. In addition, the apparatus is configured to derive a residual sample array of the predetermined transform block from the coefficient block, such that the coefficient block is associated with the residual sample array according to the selected transform, and use the residual sample array to correct a prediction of the predetermined transform block to reconstruct the predetermined transform block. The apparatus is configured to, when decoding one or more predetermined flags in a pass sequence, stop decoding the one or more predetermined flags once a predetermined number of predetermined flags has been reached (i.e., the total number of predetermined flags decoded for all coefficients so far has reached a limit), so that the absolute value domain for the first set of non-zero coefficients has a smaller cardinality than the second set of non-zero coefficients, and the pointer points to an absolute value within the absolute value domain (i.e., the cardinality is smaller for coefficients before the limit is reached in the last pass than for coefficients after the limit is reached), and the apparatus is configured to use different variable length codes for variable length code words for the first set of non-zero coefficients and the second set of non-zero coefficients when decoding the one or more predetermined flags in the pass sequence.

[0059] According to an embodiment of the present invention, a device for decoding a picture using predictive coding and block-based transform residual coding is configured to select a selected transform from a predetermined transform list for a predetermined transform block, the selected transform including an identity transform and at least one non-identity transform. The device is configured to decode the coefficient block from a data stream for the predetermined transform block by decoding the coefficients of the coefficient block from the data stream along a first scanning order (possibly following this order multiple times in multiple passes) leading to the DC coefficient of the non-identity transform (e.g., from the highest frequency coefficient forward, possibly starting from the "last" significant coefficient position) if the selected transform is a non-identity transform. The device is configured to decode the coefficient block from the data stream for the predetermined transform block by decoding the coefficients of the coefficient block from the data stream in a second scanning order from the upper left sample position to the lower right sample position if the selected transform is an identity transform. Furthermore, the apparatus is configured to derive a residual sample array of a predetermined transformed block from the coefficient block such that the coefficient block is associated with the residual sample array according to the selected transform (this step may comprise, in the case of an identity transform, adding to each coefficient the coefficients in the block residing on a predetermined side, e.g. the left-hand side in the case of horizontal DPCM and the top of the corresponding coefficient in the case of vertical DPCM, in order to perform a DPCM inversion), and to correct the prediction of the predetermined transformed block using the residual sample array in order to reconstruct the predetermined transformed block.

[0060] According to an embodiment of the present invention, a device for decoding a picture using predictive coding and block-based transform residual coding is configured to select a selected transform from a predetermined transform list for a predetermined transform block, the selected transform including an identity transform and at least one non-identity transform. The device is configured to, if the selected transform is one of at least one non-identity transform, derive from the syntax element whether the signs of non-zero coefficients in a predetermined non-zero coefficient group are equal to each other by decoding a syntax element from a data stream, if they are equal to each other, derive the signs of the non-zero coefficients in the predetermined non-zero coefficient group, and if the signs of the non-zero coefficients in the predetermined non-zero coefficient group are not equal to each other, decode the signs of the non-zero coefficients in the predetermined non-zero coefficient group by decoding the sign bit on a per-non-zero coefficient basis, so as to decode the coefficient block from the data stream for the predetermined transform block. The apparatus is configured to decode the signs of the non-zero coefficients within the predetermined non-zero coefficient group by decoding the sign bit on a per-non-zero coefficient basis, regardless of whether the signs of the non-zero coefficients within the predetermined non-zero coefficient group are equal to each other, if the selected transform is an identity transform, so as to decode the coefficient block from the data stream for the predetermined transform block. In addition, the apparatus is configured to derive a residual sample array of the predetermined transform block from the coefficient block, so that the coefficient block is related to the residual sample array according to the selected transform, and use the residual sample array to correct the prediction of the predetermined transform block to reconstruct the predetermined transform block.

[0061] According to an embodiment of the present invention, a device for decoding a picture using predictive coding and block-based transform residual coding is configured to select a selected transform from a predetermined transform list for a predetermined transform block, wherein the selected transform includes an identity transform and at least one non-identity transform. The device is configured to, if the selected transform is an identity transform, derive a symbol probability trend index from a data stream, and use a context model associated with the symbol probability trend index (a context model defining a certain symbol probability, such as a probability of a positive sign) to entropy decode the sign of a predetermined non-zero coefficient (e.g., the first in the decoding order or a non-zero coefficient in a certain sub-block in the coefficient block to which the index is applied) to decode the coefficient block from the data stream for the predetermined transform block. In addition, the device is configured to, if the selected transform is one of at least one non-identity transform, decode the coefficient block from the data stream for the predetermined transform block by bypass decoding the sign of the predetermined non-zero coefficient (e.g., context adaptive entropy decoding with fixed equal probability). Furthermore, the apparatus is configured to derive a residual sample array of a predetermined transform block from the coefficient block such that the coefficient block is associated with the residual sample array according to the selected transform, and to use the residual sample array to correct a prediction of the predetermined transform block to reconstruct the predetermined transform block.

[0062] According to an embodiment of the present invention, a device for decoding a picture using predictive coding and block-based transform residual coding is configured to select a selected transform from a predetermined transform list for a predetermined transform block, the selected transform including an identity transform and at least one non-identity transform. The device is configured to decode the symbol of the predetermined non-zero coefficient by using a predetermined context model in a plurality of context models if the selected transform is an identity transform, and select a predetermined context model from a plurality of context models according to statistics of the symbol of the previously decoded coefficient to decode the symbol of the predetermined non-zero coefficient, so as to decode the coefficient block from a data stream for the predetermined transform block. In addition, the device is configured to decode the symbol of the predetermined non-zero coefficient by bypass decoding (e.g., context adaptive entropy decoding with fixed equal probability) for the symbol of the predetermined non-zero coefficient if the selected transform is one of at least one non-identity transform, so as to decode the coefficient block from a data stream for the predetermined transform block. Furthermore, the apparatus is configured to derive a residual sample array of a predetermined transform block from the coefficient block such that the coefficient block is associated with the residual sample array according to the selected transform, and to use the residual sample array to correct a prediction of the predetermined transform block to reconstruct the predetermined transform block.

[0063] According to an embodiment of the present invention, a device for decoding a picture using predictive coding and block-based transform residual coding is configured to select a selected transform from a predetermined transform list for a predetermined transform block, the selected transform including an identity transform and at least one non-identity transform. The device is configured to decode a coefficient block from a data stream for a predetermined transform block by decoding one or more predetermined flags (e.g., a parity check flag and / or a greater than X flag, a significance flag) for each coefficient from the data stream in a pass sequence, the pass traversing the coefficients of the block, each predetermined flag reducing the absolute value domain of the corresponding coefficient (e.g., the parity check bit reduces the absolute value domain to half by excluding each even or odd absolute value, the greater than X flag reduces the domain of possible absolute values ​​by excluding one of the possible absolute values ​​or leaving one of the possible absolute values ​​and excluding all other possible absolute values), the absolute value of the corresponding coefficient is within the absolute value domain (e.g., the absolute value domain starts from the beginning of one or more passes, for example, in the case of X-bit representation, from the general absolute value domain of the coefficient, 0...2 X-1). In addition, the apparatus is configured to decode a block of coefficients from a data stream for a predetermined transform block by decoding, in a sequence of passes, for each coefficient whose cardinality of the absolute value domain is not reduced to 1 by one or more predetermined flags decoded for the corresponding coefficient, a variable length code codeword (e.g., a Rice code / Exponential Golomb code), the variable length code codeword being used to identify the absolute value of the corresponding coefficient within the absolute value domain of the corresponding coefficient (e.g., the code length of the variable length code may increase monotonically with increasing absolute value; here, the codeword freely refers to only the reduced absolute value domain or generally one absolute value domain or some other absolute value domain that is inevitably a suitable superset of the reduced absolute value domain), the pass traversing the coefficients of the block. In addition, the apparatus is configured to derive a residual sample array of the predetermined transform block from the coefficient block, such that the coefficient block is associated with the residual sample array according to the selected transform, and use the residual sample array to correct the prediction of the predetermined transform block to reconstruct the predetermined transform block. The apparatus is configured to, when decoding one or more predetermined flags in a pass sequence, stop decoding the one or more predetermined flags once a predetermined number of predetermined flags has been reached (i.e., the total number of predetermined flags decoded for all coefficients has reached a limit so far), except for a significance flag in the one or more predetermined flags indicating whether the coefficient for which the significance flag is decoded is zero (and therefore, inevitably decoded using context adaptive binary entropy decoding), so that the cardinality of the absolute value range for a first set of non-zero coefficients is smaller than that for a second set of non-zero coefficients (i.e., the cardinality is smaller for coefficients before the limit is reached in a last pass than for coefficients after the limit is reached), wherein the predetermined number corresponds to the upper limit minus the number of coefficients for which the significance flag has not yet been decoded.

[0064] According to an embodiment, a device for encoding a picture using predictive coding and block-based transform residual coding is configured to subdivide the picture into transform blocks of different sizes. In addition, the device is configured to select a selected transform for a predetermined transform block by checking whether the size of the predetermined transform block exceeds a predetermined threshold size. If the size of the predetermined transform block exceeds the predetermined threshold size, the device is configured to select the selected transform using a default method. If the size of the predetermined transform block does not exceed the predetermined threshold size, the device is configured to select a transform from a predetermined transform list and send an index pointing to the selected transform in the predetermined transform list in a data stream so as to be used as the selected transform for the predetermined transform block, the predetermined transform list including an identity transform and a non-identity transform. In addition, the device is configured to predict the predetermined transform block, and for the predetermined transform block, encode a coefficient block into the data stream, so that if the selected transform is an identity transform, the coefficient block is used as a residual sample array for correcting the prediction to reconstruct the predetermined transform block, and if the selected transform is not an identity transform, the coefficient block is inversely transformed corresponding to the selected transform to obtain a residual sample array of the predetermined transform block.

[0065] According to an embodiment, a device for encoding a picture using predictive coding and block-based transform residual coding is configured to select a selected transform from a predetermined transform list for a predetermined transform block, and to encode an index pointing to the selected transform in the predetermined transform list into a data stream for the predetermined transform block. In addition, the device is configured to predict the predetermined transform block, and to encode a coefficient block into the data stream for the predetermined transform block, so that a residual sample array of the predetermined transform block can be derived from the coefficient block, so that the coefficient block is related to the residual sample array according to the selected transform, and the residual sample array can be used to predict the transform block to reconstruct the predetermined transform block. The device is configured to, when encoding the coefficient block into the data stream for the predetermined transform block, depending on whether the selected transform for the predetermined block is included in a predefined set of one or more transforms, encode a coded block flag into the data stream if the selected transform for the predetermined block is included in the predefined set of one or more transforms, and the coded block flag signals whether the coefficient block has at least one non-zero coefficient. In addition, the device is configured to, when encoding a coefficient block into a data stream for a predetermined transform block, depend on whether the selected transform for the predetermined block is included in a predefined set of one or more transforms, if the selected transform for the predetermined block is not included in the predefined set of one or more transforms (in other words, if the selected transform for the predetermined block is included in the predefined set of one or more transforms, the CBF is not encoded into the data stream, or even in other words, a syntax element different from the CBF is encoded into the current part of encoding the CBF into the data stream), avoid encoding a coded block flag into the data stream, wherein the encoder side must infer the coded block flag to signal that the coefficient block has at least one non-zero coefficient.

[0066] According to an embodiment, a device for encoding a picture using predictive coding and block-based transform residual coding is configured to predict a predetermined transform block, and for the predetermined transform block, encode a coefficient block into a data stream, including encoding a coding block flag into the data stream, the coding block flag signals whether the coefficient block has at least one non-zero coefficient. The device is configured to select a selected transform from a predetermined transform list for the predetermined transform block if the coding block flag signals that the coefficient block has at least one non-zero coefficient, and for the predetermined transform block, encode an index pointing to the selected transform in the predetermined transform list into the data stream. A residual sample array of the predetermined transform block can be derived from the coefficient block, so that the coefficient block is related to the residual sample array according to the selected transform, and the residual sample array can be used to correct the prediction of the predetermined transform block to reconstruct the predetermined transform block. The apparatus is configured to reconstruct a predetermined transform block without predictive correction if the coding block flag signals that the coefficient block does not have at least one non-zero coefficient (in other words, if the coding block flag signals that the coefficient block does not have at least one non-zero coefficient, the index is not encoded into the data stream, for example by encoding a syntax element different from the index into the current part of the data stream into which the index is encoded).

[0067] According to an embodiment, a device for encoding a picture using predictive coding and block-based transform residual coding is configured to fill or fill and sort a predetermined transform list depending on a data stream, and select a selected transform from the predetermined transform list for a predetermined transform block. In addition, the device is configured to encode an index pointing to the selected transform in the predetermined transform list into the data stream using a variable length code, so that each transform in the predetermined transform list has been assigned a codeword of the variable length code, and the codeword length of the codeword of the variable length code increases monotonically with the order of the transform assigned the codeword in the predetermined transform list. In addition, the device is configured to derive a prediction of the predetermined transform block, and for the predetermined transform block, encode a coefficient block into the data stream, so that a residual sample array of the predetermined transform block can be derived from the coefficient block, so that the coefficient block is related to the residual sample array according to the selected transform, and so that the predetermined transform block can be reconstructed by correcting the prediction of the predetermined transform block using the residual sample array to reconstruct the predetermined transform block.

[0068] According to an embodiment, a device for encoding a picture using predictive coding and block-based transform residual coding is configured to derive a prediction of a predetermined transform block. In addition, the device is configured to select a selected transform from a predetermined transform list for the predetermined transform block, and encode an index pointing to the selected transform in the predetermined transform list into a data stream using a combined variable length code codeword, the combined variable length code codeword consisting of the following items: a first codeword of the variable length code, and if the first codeword is the longest codeword of the variable length code, the first codeword is followed by a second codeword of the fixed length code. The codeword consisting of only one of the two non-longest codewords of the variable length code in the combined variable length code is assigned to the identity transform and the predefined non-identity transform included in the predetermined transform list, and is used to distinguish the identity transform from the predefined non-identity transform, and the other codewords of the combined variable length code are assigned to other non-identity transforms in the predetermined transform list, and are used to distinguish other non-identity transforms in the predetermined transform list. In addition, the apparatus is configured to encode, for a predetermined transform block, a coefficient block into a data stream such that the coefficient block is associated with a residual sample array according to a selected transform and such that a prediction of the predetermined transform block can be corrected by using the residual sample array to reconstruct the predetermined transform block.

[0069] According to an embodiment, an apparatus for encoding a picture using predictive coding and block-based transform residual coding is configured to select a selected transform from a predetermined transform list for a predetermined transform block, the transform including an identity transform and at least one non-identity transform. In addition, the apparatus is configured to derive a prediction of the predetermined transform block, and to encode a coefficient block into a data stream for the predetermined transform block by checking whether the selected transform is a non-identity transform. If the selected transform is a non-identity transform, the device is configured to encode position information into the data stream so as to obtain a predetermined coefficient position, the position information being related to where a non-zero coefficient is first encountered along a scanning order that traverses all coefficients of the coefficient block, or where a non-zero coefficient is last encountered along a scanning order that traverses all coefficients of the coefficient block (please note the following. In the above embodiments, the position is referred to as the last position measured along a scanning order that leads from the upper left corner to the lower right, although according to these embodiments, the actual scanning starts encoding from there. That is, the actual encoding occurs in a reverse scanning order that leads from the lower right corner to the upper left corner. Here, the scanning order is the encoding order.), and encode the first coefficient of the coefficient block into the data stream, the first coefficient including all non-zero coefficients of the coefficient block and traversed by a scanning order starting from or up to a predetermined coefficient position, and inferring that a second coefficient in the coefficient block that is different from the first coefficient is zero, so as to encode the coefficient block into the data stream for a predetermined transform block. If the selected transform is an identity transform, the device is configured to encode all coefficients of the coefficient block into the data stream, so as to encode the coefficient block into the data stream for a predetermined transform block. The coefficient block is associated with a residual sample array according to the selected transform, and the predetermined transform block can be reconstructed by correcting the prediction of the predetermined transform block using the residual sample array.

[0070] According to an embodiment, a device for encoding a picture using predictive coding and block-based transform residual coding is configured to select a selected transform from a predetermined transform list for a predetermined transform block, the selected transform including an identity transform and at least one non-identity transform, and derive a prediction of the predetermined transform block. In addition, the device is configured to encode a coefficient block into a data stream for the predetermined transform block by encoding the coefficients of the coefficient block into the data stream in units of sub-blocks into which the coefficient block is divided, wherein a sub-block flag in the data stream is inferred to signal that the coefficients within the sub-block of zero are zero, and a sub-block flag in the data stream is encoded into the data stream to signal that the coefficients within the sub-block of non-zero are encoded into the data stream. The inferred coefficients are zero and the encoding of non-zero coefficients is performed by: if the selected transform is one of at least one non-identity transform, sequentially encoding sub-block flags other than at least one of a first sub-block flag and a last sub-block flag into a data stream, wherein the at least one sub-block flag of the first sub-block flag and the last sub-block flag is inferred to signal non-zeroness; and if the selected transform is an identity transform, encoding the sub-block flags into the data stream for all sub-blocks. The coefficient block is associated with a residual sample array according to the selected transform, and a prediction of a predetermined transform block can be corrected by using the residual sample array to reconstruct the predetermined transform block.

[0071] According to an embodiment, a device for encoding a picture using predictive coding and block-based transform residual coding is configured to select a selected transform from a predetermined transform list for a predetermined transform block, the selected transform including an identity transform and at least one non-identity transform, and derive a prediction of the predetermined transform block. In addition, the device is configured to encode the coefficients of the coefficient block into the data stream in units of sub-blocks into which the coefficient block is divided by inferring a sub-block flag in the data stream to signal that the coefficients in the sub-block of zero are zero, and encoding the sub-block flag in the data stream to signal the coefficients in the sub-block of non-zero into the data stream, so as to encode the coefficient block into the data stream for the predetermined transform block, wherein the sub-block flag currently encoded is encoded into the data stream by context adaptive entropy coding and using context. If the selected transform is one of the at least one non-identity transform, the context depends on the logical OR of the sub-block flags related to the sub-blocks adjacent to the currently encoded sub-block flag, and if the selected transform is an identity transform, the context depends on the arithmetic sum of the sub-block flags related to the sub-blocks adjacent to the currently encoded sub-block flag. The coefficient block is associated with a residual sample array according to the selected transform, and the predetermined transform block can be reconstructed by correcting the prediction of the predetermined transform block using the residual sample array.

[0072] According to an embodiment, a device for encoding a picture using predictive coding and block-based transform residual coding is configured to select a selected transform from a predetermined transform list for a predetermined transform block, the selected transform including an identity transform and at least one non-identity transform, and derive a prediction of the predetermined transform block. In addition, the device is configured to encode a coefficient block into a data stream for the predetermined transform block by encoding a significance flag indicating whether the current coefficient is zero using a context for the current coefficient. If the selected transform is an identity transform, the context depends on the number of non-zero coefficients in a first coefficient set immediately adjacent to the current coefficient, and if the selected transform is one of at least one non-identity transform, the context depends on the number of non-zero coefficients in a second coefficient set, the value of the second coefficient set, and the position of the current coefficient, the second coefficient set including the first coefficient set and the coefficients farther away from the current coefficient than the first coefficient set. The coefficient block is associated with a residual sample array according to the selected transform, and the prediction of the predetermined transform block can be corrected by using the residual sample array to reconstruct the predetermined transform block.

[0073] According to an embodiment, a device for encoding a picture using predictive coding and block-based transform residual coding is configured to select a selected transform from a predetermined transform list for a predetermined transform block, the selected transform including an identity transform and at least one non-identity transform, and derive a prediction of the predetermined transform block. In addition, the device is configured to encode a coefficient block into a data stream for the predetermined transform block by context-adaptively entropy encoding N greater than X flags and encoding the remaining portion indicating the amount by which the absolute value of the predetermined coefficient exceeds an absolute threshold using a variable length code, wherein the greater than X flag indicates whether the absolute value of the predetermined coefficient is greater than X, and the predetermined threshold depends on N, wherein N is greater when the selected transform is an identity transform than when the selected transform is one of the at least one non-identity transform. The coefficient block is associated with a residual sample array according to the selected transform, and is capable of correcting the prediction of the predetermined transform block using the residual sample array to reconstruct the predetermined transform block.

[0074] According to an embodiment, a device for encoding a picture using predictive coding and block-based transform residual coding is configured to select a selected transform from a predetermined transform list for a predetermined transform block, the selected transform including an identity transform and at least one non-identity transform, and derive a prediction of the predetermined transform block. In addition, the device is configured to encode a coefficient block into a data stream for the predetermined transform block by context-adaptive entropy decoding the sign of the predetermined coefficient using a predetermined context if the selected transform is an identity transform, and updating the probability associated with the predetermined context, and bypass coding (e.g., context-adaptive entropy coding with fixed equal probability) if the selected transform is one of the at least one non-constant transforms. The coefficient block is associated with a residual sample array according to the selected transform, and the prediction of the predetermined transform block can be corrected by using the residual sample array to reconstruct the predetermined transform block.

[0075] According to an embodiment, a device for encoding a picture using predictive coding and block-based transform residual coding is configured to select a selected transform from a predetermined transform list for a predetermined transform block, the selected transform including an identity transform and at least one non-identity transform, and derive a prediction of the predetermined transform block. In addition, the device is configured to encode a coefficient block into a data stream for the predetermined transform block by context-adaptively entropy encoding N greater than X flags and encoding the remaining portion indicating the amount by which the absolute value of the predetermined coefficient exceeds an absolute threshold using a variable length code, wherein the greater than X flag indicates whether the absolute value of the predetermined coefficient is greater than X, and the predetermined threshold depends on N. The device is configured to perform context-adaptive entropy encoding of the N greater than X flags in a pass sequence by sequentially context-adaptively entropy encoding the N greater than X flags if the selected transform is one of the at least one non-identity transform, wherein X is increased with one or more of the N greater than X flags in each pass, and the number of flags encoded using context-adaptive entropy encoding is recorded during the pass sequence, and if the number exceeds a predetermined flag threshold, the context-adaptive entropy encoding of the N greater than X flags is stopped. In addition, the apparatus is configured to, if the selected transform is an identity transform, sequentially perform context adaptive entropy coding on the N greater than X flags, and after coding a significance flag (X=0) among the N greater than X flags and before coding another N greater than X flags among the N greater than X flags, code a greater than X flag bypass flag indicating whether a predetermined coefficient is greater than an absolute threshold, and, if the greater than X flag bypass flag indicates that the predetermined coefficient is greater than the absolute threshold, stop context adaptive entropy coding on the N greater than X flags relative to the other N greater than X flags (e.g., and if the greater than X flag bypass flag indicates that the predetermined coefficient is not greater than the absolute threshold, resume context adaptive entropy coding on the N greater than X flags relative to the other greater than X flags except for the last greater than X flag among the N greater than X flags). The coefficient block is associated with a residual sample array according to the selected transform, and is capable of correcting a prediction of a predetermined transform block by using the residual sample array to reconstruct the predetermined transform block.

[0076] According to an embodiment, a device for encoding a picture using predictive coding and block-based transform residual coding is configured to select a selected transform from a predetermined transform list for a predetermined transform block, the selected transform including an identity transform and at least one non-identity transform, and derive a prediction of the predetermined transform block. In addition, the device is configured to encode the coefficient block into a data stream in a pass sequence for the predetermined transform block by context-adaptively entropy encoding N greater than X flags for the predetermined coefficients, encoding the remainder indicating the amount by which the absolute value of the predetermined coefficient exceeds an absolute threshold by using a variable length code, and encoding the sign of the predetermined coefficient, wherein the pass traverses the coefficients of the coefficient block in a predetermined scanning order, the greater than X flag indicating whether the absolute value of the predetermined coefficient is greater than X, and the absolute threshold depends on N. The device is configured to distribute the encoding of the N greater than X flags, the remainder and the sign differently on the pass sequence depending on whether the selected transform is an identity transform or one of the at least one non-identity transforms. The coefficient block is associated with a residual sample array according to the selected transform, and is capable of correcting the prediction of the predetermined transform block using the residual sample array to reconstruct the predetermined transform block.

[0077] According to an embodiment, a device for encoding a picture using predictive coding and block-based transform residual coding is configured to select a selected transform from a predetermined transform list for a predetermined transform block, the selected transform including an identity transform and at least one non-identity transform. In addition, the device is configured to encode a block of coefficients into a data stream for a predetermined transform block by encoding one or more predetermined flags (e.g., a parity check flag and / or a greater than X flag, a significance flag) for each coefficient into the data stream using context-adaptive binary entropy coding in a pass sequence, the pass traversing the coefficients of the block, each predetermined flag reducing the absolute value range of the corresponding coefficient (e.g., the parity check bit reduces the absolute value range to half by excluding each even or odd absolute value, the greater than X flag reduces the possible absolute value range by excluding one of the possible absolute values ​​or leaving one of the possible absolute values ​​and excluding all other possible absolute values), the absolute value of the corresponding coefficient is within the absolute value range (e.g., the absolute value range starts from the beginning of one or more passes, for example, in the case of X-bit representation, from the general absolute value range of the coefficient, 0...2 X-1). In addition, the apparatus is configured to encode the coefficient block into the data stream for the predetermined transform block by encoding, in the pass sequence, for each coefficient whose cardinality of the absolute value domain is not reduced to 1 by one or more predetermined flags encoded for the corresponding coefficient, a variable length code codeword (e.g., a Rice code / Exponential Golomb code), the variable length code codeword indicating the absolute value of the corresponding coefficient within the absolute value domain of the corresponding coefficient (e.g., the code length of the variable length code may increase monotonically with increasing absolute value). The apparatus is configured to encode the coefficient block into the data stream for the predetermined transform block so that the coefficient block is associated with a residual sample array of the predetermined transform block according to the selected transform, allowing the residual sample array to be used to correct the prediction of the predetermined transform block to reconstruct the predetermined transform block. The device is configured to stop encoding the one or more predetermined flags once a predetermined number of the predetermined flags is reached (i.e., the total number of predetermined flags decoded for all coefficients so far has reached a limit) when encoding the one or more predetermined flags in the pass sequence, so that the cardinality of the absolute value domain for the first set of non-zero coefficients is smaller than that for the second set of non-zero coefficients, the pointer points to the absolute value within the absolute value domain (i.e., the cardinality is smaller for the coefficients before the limit is reached in the last pass than for the coefficients after the limit is reached), and different variable length codes are used for the variable length code codewords of the first set of non-zero coefficients and the second set of non-zero coefficients.

[0078] According to an embodiment, a device for encoding a picture using predictive coding and block-based transform residual coding is configured to select, for a predetermined transform block, a selected transform from a predetermined transform list, the selected transform including an identity transform and at least one non-identity transform. In addition, the device is configured to, if the selected transform is a non-identity transform, encode the coefficient block into a data stream by encoding the coefficients of the coefficient block into the data stream along a first scanning order (which may be followed multiple times in multiple passes) leading to the DC coefficient of the non-identity transform (e.g., from the highest frequency coefficient forward, possibly starting from the "last" significant coefficient position) to the data stream. In addition, the device is configured to, if the selected transform is an identity transform, encode the coefficient block into the data stream for the predetermined transform block by encoding the coefficients of the coefficient block into the data stream along a second scanning order from the upper left sample position to the lower right sample position. Furthermore, the apparatus is configured to encode, for a predetermined transform block, a block of coefficients into the data stream such that the block of coefficients is associated with a residual sample array of the predetermined transform block according to the selected transform (this step may comprise, in the case of an identity transform, adding to each coefficient the coefficients in the block residing on a predetermined side, e.g. the left-hand side in the case of horizontal DPCM and the top of the corresponding coefficient in the case of vertical DPCM, in order to perform a DPCM inversion), allowing the residual sample array to be used to correct the prediction of the predetermined transform block in order to reconstruct the predetermined transform block.

[0079] According to an embodiment, a device for encoding a picture using predictive coding and block-based transform residual coding is configured to select a selected transform from a predetermined transform list for a predetermined transform block, the selected transform including an identity transform and at least one non-identity transform. In addition, the device is configured to, if the selected transform is one of the at least one non-identity transform, encode a coefficient block into a data stream for the predetermined transform block by the following operations: encoding a syntax element into the data stream, deriving from the syntax element whether the signs of non-zero coefficients in a predetermined non-zero coefficient group are equal to each other, if they are equal to each other, deriving the signs of the non-zero coefficients in the predetermined non-zero coefficient group, and if the signs of the non-zero coefficients in the predetermined non-zero coefficient group are not equal to each other, encoding the signs of the non-zero coefficients in the predetermined non-zero coefficient group by encoding the sign bit on a per-non-zero coefficient basis. Furthermore, the apparatus is configured to, if the selected transform is an identity transform, encode the coefficient block into the data stream for the predetermined transform block by encoding the sign of the non-zero coefficients within the predetermined non-zero coefficient group by encoding the sign bit on a per-non-zero coefficient basis, regardless of whether the signs of the non-zero coefficients within the predetermined non-zero coefficient group are equal to each other. Additionally, the apparatus is configured to encode the coefficient block into the data stream for the predetermined transform block such that the coefficient block is associated with a residual sample array of the predetermined transform block according to the selected transform, wherein the residual sample array is allowed to be used to correct the prediction of the predetermined transform block to reconstruct the predetermined transform block.

[0080] According to an embodiment, a device for encoding a picture using predictive coding and block-based transform residual coding is configured to select a selected transform from a predetermined transform list for a predetermined transform block, the selected transform including an identity transform and at least one non-identity transform. In addition, the device is configured to, if the selected transform is an identity transform, encode a symbol probability trend index into a data stream, and entropy encode a symbol of a predetermined non-zero coefficient (e.g., the first in the coding order or a non-zero coefficient in a sub-block of the coefficient block to which the index is applied) using a context model associated with the symbol probability trend index (a context model defining a certain symbol probability, such as a probability of a positive sign), to encode a coefficient block into the data stream for the predetermined transform block. In addition, the device is configured to, if the selected transform is one of at least one non-identity transform, encode a coefficient block into the data stream for the predetermined transform block by bypass encoding the symbol of the predetermined non-zero coefficient (e.g., context adaptive entropy encoding with fixed equal probability). In addition, the device is configured to encode a coefficient block into a data stream for a predetermined transform block by encoding the signs of non-zero coefficients of the predetermined coefficient block, so that the coefficient block is related to the residual sample array of the predetermined transform block according to the selected transform, wherein the residual sample array can be used to correct the prediction of the predetermined transform block to reconstruct the predetermined transform block.

[0081] According to an embodiment, a device for encoding a picture using predictive coding and block-based transform residual coding is configured to select a selected transform from a predetermined transform list for a predetermined transform block, the selected transform including an identity transform and at least one non-identity transform. In addition, the device is configured to encode the sign of the predetermined non-zero coefficient by using a predetermined context model in a plurality of context models if the selected transform is an identity transform, and select a predetermined context model in a plurality of context models according to statistics of the sign of the previously encoded coefficient, and if the selected transform is one of at least one non-identity transform, bypass encode the sign of the predetermined non-zero coefficient (e.g., context adaptive entropy coding with fixed equal probability) to encode the sign of the non-zero coefficient of the predetermined coefficient block, so as to encode the coefficient block into a data stream for the predetermined transform block. In addition, the device is configured to encode the coefficient block into a data stream for the predetermined transform block, so that the coefficient block is related to the residual sample array of the predetermined transform block according to the selected transform, so that the residual sample array can be used to correct the prediction of the predetermined transform block to reconstruct the predetermined transform block.

[0082] According to an embodiment, a device for encoding a picture using predictive coding and block-based transform residual coding is configured to select a selected transform from a predetermined transform list for a predetermined transform block, the selected transform including an identity transform and at least one non-identity transform. In addition, the device is configured to encode a block of coefficients into a data stream for a predetermined transform block by encoding one or more predetermined flags (e.g., a parity check flag and / or a greater than X flag, a significance flag) for each coefficient into the data stream using context-adaptive binary entropy coding in a pass sequence, the pass traversing the coefficients of the block, each predetermined flag reducing the absolute value range of the corresponding coefficient (e.g., the parity check bit reduces the absolute value range to half by excluding each even or odd absolute value, the greater than X flag reduces the possible absolute value range by excluding one of the possible absolute values ​​or leaving one of the possible absolute values ​​and excluding all other possible absolute values), the absolute value of the corresponding coefficient is within the absolute value range (e.g., the absolute value range starts from the beginning of one or more passes, for example, in the case of X-bit representation, from the general absolute value range of the coefficient, 0...2 X-1). In addition, the device is configured to encode a block of coefficients into a data stream for a predetermined transform block by encoding, in a sequence of passes, for each coefficient whose cardinality of the absolute value domain is not reduced to 1 by one or more predetermined flags encoded for the corresponding coefficient, a variable length code codeword (e.g., a Rice code / Exponential Golomb code), the variable length code codeword being used to identify the absolute value of the corresponding coefficient within the absolute value domain of the corresponding coefficient (e.g., the code length of the variable length code may increase monotonically with increasing absolute value; here, the codeword freely refers to only the reduced absolute value domain or generally one absolute value domain or some other absolute value domain that is inevitably a suitable superset of the reduced absolute value domain), the pass traversing the coefficients of the block. In addition, the device is configured to encode the block of coefficients into the data stream for the predetermined transform block, such that the coefficient block is related to a residual sample array of the predetermined transform block according to a selected transform, so that the residual sample array can be used to correct the prediction of the predetermined transform block to reconstruct the predetermined transform block. The apparatus is configured to, when encoding one or more predetermined flags in a pass sequence, stop encoding the one or more predetermined flags once a predetermined number of predetermined flags is reached (i.e., the total number of predetermined flags that have been encoded for all coefficients has reached a limit so far), except for a significance flag in the one or more predetermined flags indicating whether the coefficient for which the significance flag is encoded is zero (and therefore, inevitably encoded using context adaptive binary entropy decoding), so that the cardinality of the absolute value range for the first set of non-zero coefficients is smaller than that for the second set of non-zero coefficients (i.e., the cardinality is smaller for coefficients before the limit is reached in the last pass than for coefficients after the limit is reached), wherein the predetermined number corresponds to the upper limit minus the number of coefficients for which the significance flag has not yet been encoded.

[0083] According to an embodiment, a method for decoding a picture using predictive coding and block-based transform residual coding includes subdividing the picture into transform blocks of different sizes. In addition, the method includes selecting a selected transform for a predetermined transform block by checking whether the size of the predetermined transform block exceeds a predetermined threshold size. If the size of the predetermined transform block exceeds the predetermined threshold size, the selected transform is selected using a default method. If the size of the predetermined transform block does not exceed the predetermined threshold size, the transform pointed to by the index sent in the data stream for the predetermined transform block in a predetermined transform list is used as the selected transform, and the predetermined transform list includes an identity transform and a non-identity transform. In addition, the method includes decoding a coefficient block from the data stream for the predetermined transform block, if the selected transform is an identity transform, using the coefficient block as a residual sample array of the predetermined transform block, and if the selected transform is not an identity transform, performing an inverse transform on the coefficient block corresponding to the selected transform to obtain a residual sample array of the predetermined transform block. In addition, the method includes correcting the prediction of the predetermined transform block using the residual sample array to reconstruct the predetermined transform block.

[0084] According to an embodiment, a method for decoding a picture using predictive coding and block-based transform residual coding comprises selecting a selected transform for a predetermined transform block by decoding an index from a data stream for the predetermined transform block and using one of the transforms pointed to by the index in a predetermined transform list as the selected transform. In addition, the method comprises decoding a coefficient block from the data stream for the predetermined transform block, deriving a residual sample array of the predetermined transform block from the coefficient block, such that the coefficient block is associated with the residual sample array according to the selected transform, and correcting the prediction of the predetermined transform block using the residual sample array to reconstruct the predetermined transform block. The method comprises, when decoding the coefficient block from the data stream for the predetermined transform block, depending on whether the selected transform for the predetermined block is contained in a predefined set of one or more transforms. The method comprises, when decoding a coefficient block from a data stream for a predetermined transform block, decoding from the data stream a coded block flag that signals whether the coefficient block has at least one non-zero coefficient if a selected transform for the predetermined block is included in a predefined set of one or more transforms, and inferring that the coefficient block has at least one non-zero coefficient if the selected transform for the predetermined block is not included in the predefined set of one or more transforms (in other words, if the selected transform for the predetermined block is included in the predefined set of one or more transforms, not decoding a CBF from the data stream, or even in other words, decoding a syntax element other than the CBF from a current portion of the data stream that is being decoded from the CBF).

[0085] According to an embodiment, a method for decoding a picture using predictive coding and block-based transform residual coding includes decoding a coefficient block from a data stream for a predetermined transform block, including decoding a coding block flag from the data stream to signal whether the coefficient block has at least one non-zero coefficient. The method includes, if the coding block flag signals that the coefficient block has at least one non-zero coefficient, then for the predetermined transform block, by decoding an index from the data stream for the predetermined transform block and using a transform pointed to by the index in a predetermined transform list as the selected transform, selecting a selected transform for the predetermined transform block, deriving a residual sample array of the predetermined transform block from the coefficient block, so that the coefficient block is associated with the residual sample array according to the selected transform, and using the residual sample array to correct the prediction of the predetermined transform block to reconstruct the predetermined transform block. In addition, the method includes, if the coding block flag signals that the coefficient block does not have at least one non-zero coefficient, the device is configured to reconstruct the predetermined transform block without predictive correction (in other words, if the coding block flag signals that the coefficient block does not have at least one non-zero coefficient, then the index is not decoded from the data stream, for example, a syntax element different from the index is decoded from the current portion of the decoded index in the data stream).

[0086] According to an embodiment, a method for decoding a picture using predictive coding and block-based transform residual coding includes filling or filling and sorting a predetermined transform list depending on a data stream. The method includes selecting a selected transform for a predetermined transform block by decoding an index from the data stream using a variable length code, and using a transform pointed to by the index in the predetermined transform list as the selected transform, so that each transform in the predetermined transform list has been assigned a codeword of the variable length code, and the codeword length of the codeword of the variable length code increases monotonically with the order of the transform assigned the codeword in the predetermined transform list. In addition, the method includes decoding a coefficient block from the data stream for the predetermined transform block, deriving a residual sample array of the predetermined transform block from the coefficient block, so that the coefficient block is related to the residual sample array according to the selected transform, and using the residual sample array to correct the prediction of the predetermined transform block to reconstruct the predetermined transform block.

[0087] According to an embodiment, a method for decoding a picture using predictive coding and block-based transform residual coding includes, for a predetermined transform block, selecting a selected transform by decoding an index in a predetermined transform list from a data stream using a combined variable length code codeword, the combined variable length code codeword consisting of the following items: a first codeword of the variable length code, and if the first codeword is the longest codeword of the variable length code, the first codeword is followed by a second codeword of a fixed length code. The codeword consisting of only one of the two non-longest codewords of the variable length code in the combined variable length code is assigned to an identity transform and a predefined non-identity transform included in the predetermined transform list, and is used to distinguish the identity transform from the predefined non-identity transform, and the other codewords of the combined variable length code are assigned to other non-identity transforms in the predetermined transform list, and are used to distinguish other non-identity transforms in the predetermined transform list. The method includes selecting the selected transform for the predetermined transform block by using a transform pointed to by the index in the predetermined transform list as the selected transform. Furthermore, the method comprises, for a predetermined transform block, decoding a coefficient block from a data stream, deriving a residual sample array of the predetermined transform block from the coefficient block, such that the coefficient block is associated with the residual sample array according to a selected transform, and correcting a prediction of the predetermined transform block using the residual sample array to reconstruct the predetermined transform block.

[0088] According to an embodiment, a method for decoding a picture using predictive coding and block-based transform residual coding includes, for a predetermined transform block, selecting a selected transform from a predetermined transform list, the selected transform including an identity transform and at least one non-identity transform. The method includes decoding a coefficient block from a data stream for the predetermined transform block by checking whether the selected transform is a non-identity transform. If the selected transform is a non-identity transform, the method includes decoding position information from the data stream to obtain a predetermined coefficient position, the position information being related to where a non-zero coefficient is first encountered along a scanning order traversing all coefficients of the coefficient block, or where a non-zero coefficient is last encountered along a scanning order traversing all coefficients of the coefficient block (please note the following. In the above embodiments, the position is referred to as the last position measured along a scanning order from the upper left corner to the lower right, although according to these embodiments, the actual scanning starts encoding from there. That is, the actual encoding occurs in a reverse scanning order from the lower right corner to the upper left corner. Here, the scanning order is the encoding order. See the embodiment in which two scanning directions are expected), and the method includes decoding a coefficient block from the data stream for a predetermined transform block by decoding a first coefficient of the coefficient block from the data stream, the first coefficient including all non-zero coefficients of the coefficient block and traversed by a scanning order starting from or up to a predetermined coefficient position, and inferring that a second coefficient in the coefficient block that is different from the first coefficient is zero. If the selected transform is an identity transform, the method includes decoding a coefficient block from the data stream for a predetermined transform block by decoding all coefficients of the coefficient block from the data stream. Furthermore, the method comprises deriving a residual sample array of a predetermined transform block from the coefficient block such that the coefficient block is related to the residual sample array according to the selected transform, and using the residual sample array to correct the prediction of the predetermined transform block to reconstruct the predetermined transform block.

[0089] According to an embodiment, a method for decoding a picture using predictive coding and block-based transform residual coding includes, for a predetermined transform block, selecting a selected transform from a predetermined transform list, the selected transform including an identity transform and at least one non-identity transform. The method includes decoding the coefficients of the coefficient block from a data stream in units of subblocks into which the coefficient block is divided by inferring a subblock flag in the data stream to signal that the coefficients in the subblock of zero are zero, and decoding the subblock flag in the data stream from the data stream to signal the coefficients in the subblock of non-zero, so as to decode the coefficient block from the data stream for the predetermined transform block. If the selected transform is one of the at least one non-identity transform, sequentially decode the subblock flags except at least one of the first subblock flag and the last subblock flag from the data stream, and infer the at least one subblock flag in the first subblock flag and the last subblock flag to signal non-zero, and if the selected transform is the identity transform, decode the subblock flag from the data stream for all subblocks, so as to decode the coefficient block for the predetermined transform block from the data stream. Furthermore, the method comprises deriving a residual sample array of the predetermined transform block from the coefficient block such that the coefficient block is related to the residual sample array according to the selected transform, and using the residual sample array to correct the prediction of the predetermined transform block to reconstruct the predetermined transform block.

[0090] According to an embodiment, a method for decoding a picture using predictive coding and block-based transform residual coding includes, for a predetermined transform block, selecting a selected transform from a predetermined transform list, the selected transform including an identity transform and at least one non-identity transform. The method includes decoding the coefficients of the coefficient block from the data stream in units of subblocks into which the coefficient block is divided by inferring a subblock flag in the data stream to signal that the coefficients within the subblock of zero are zero, and decoding the subblock flag in the data stream from the data stream to signal the coefficients within the subblock of non-zero, so as to decode the coefficient block from the data stream for the predetermined transform block, wherein the currently decoded subblock flag is decoded from the data stream by context adaptive entropy decoding and using the context. If the selected transform is one of the at least one non-identity transform, the context depends on the logical OR of the subblock flags related to the subblocks adjacent to the currently decoded subblock flag, and if the selected transform is the identity transform, the context depends on the arithmetic sum of the subblock flags related to the subblocks adjacent to the currently decoded subblock flag. Furthermore, the method comprises deriving a residual sample array of the predetermined transform block from the coefficient block such that the coefficient block is related to the residual sample array according to the selected transform, and using the residual sample array to correct the prediction of the predetermined transform block to reconstruct the predetermined transform block.

[0091] According to an embodiment, a method for decoding a picture using predictive coding and block-based transform residual coding includes, for a predetermined transform block, selecting a selected transform from a predetermined transform list, the selected transform including an identity transform and at least one non-identity transform. The method includes decoding a coefficient block from a data stream for the predetermined transform block by decoding a significance flag indicating whether the current coefficient is zero using a context for the current coefficient. If the selected transform is an identity transform, the context depends on the number of non-zero coefficients in a first coefficient set immediately adjacent to the current coefficient, and if the selected transform is one of at least one non-identity transform, the context depends on the number of non-zero coefficients in a second coefficient set, the value of the second coefficient set, and the position of the current coefficient, the second coefficient set including the first coefficient set and coefficients farther away from the current coefficient than the first coefficient set. In addition, the method includes deriving a residual sample array of the predetermined transform block from the coefficient block, so that the coefficient block is related to the residual sample array according to the selected transform, and using the residual sample array to correct the prediction of the predetermined transform block to reconstruct the predetermined transform block.

[0092] According to an embodiment, a method for decoding a picture using predictive coding and block-based transform residual coding includes, for a predetermined transform block, selecting a selected transform from a predetermined transform list, the selected transform including an identity transform and at least one non-identity transform. The method includes decoding a predetermined coefficient by context-adaptive entropy decoding of N greater than X flags to decode a coefficient block from a data stream for the predetermined transform block, the greater than X flag indicating whether the absolute value of the predetermined coefficient is greater than X. In addition, the method includes decoding a coefficient block from a data stream for the predetermined transform block by decoding a remaining portion indicating an amount by which the absolute value of the predetermined coefficient exceeds an absolute threshold using a variable length code, the predetermined threshold depending on N, wherein N is greater when the selected transform is an identity transform than when the selected transform is one of the at least one non-identity transform. In addition, the method includes deriving a residual sample array of the predetermined transform block from the coefficient block, such that the coefficient block is related to the residual sample array according to the selected transform, and using the residual sample array to correct the prediction of the predetermined transform block to reconstruct the predetermined transform block.

[0093] According to an embodiment, a method for decoding a picture using predictive coding and block-based transform residual coding includes, for a predetermined transform block, selecting a selected transform from a predetermined transform list, the selected transform including an identity transform and at least one non-identity transform. The method includes, if the selected transform is an identity transform, context-adaptive entropy decoding of a sign of a predetermined coefficient using a predetermined context, and updating a probability associated with the predetermined context; and if the selected coding is one of at least one non-identity transform, decoding the sign of the predetermined coefficient by bypass decoding (e.g., context-adaptive entropy decoding with fixed equal probability), to decode a coefficient block from a data stream for the predetermined transform block. In addition, the method includes deriving a residual sample array of the predetermined transform block from the coefficient block, so that the coefficient block is related to the residual sample array according to the selected transform, and using the residual sample array to correct the prediction of the predetermined transform block to reconstruct the predetermined transform block.

[0094] According to an embodiment, a method for decoding a picture using predictive coding and block-based transform residual coding includes, for a predetermined transform block, selecting a selected transform from a predetermined transform list, the selected transform including an identity transform and at least one non-identity transform. The method includes decoding a coefficient block from a data stream for the predetermined transform block by context-adaptive entropy decoding N greater than X flags, the greater than X flag indicating whether the absolute value of the predetermined coefficient is greater than X. In addition, the method includes decoding a coefficient block from a data stream for the predetermined transform block by decoding a remaining portion indicating an amount by which the absolute value of the predetermined coefficient exceeds an absolute threshold using a variable length code, the predetermined threshold depending on N. If the selected transform is one of the at least one non-identity transform, context-adaptive entropy decoding of the N greater than X flags is performed in a pass sequence by sequentially context-adaptive entropy decoding of the N greater than X flags, wherein X is increased with one or more of the N greater than X flags in each pass, and the number of flags encoded using context-adaptive entropy decoding is recorded during the pass sequence, and if the number exceeds a predetermined flag threshold, context-adaptive entropy decoding of the N greater than X flags is stopped. If the selected transform is an identity transform, context adaptive entropy decoding is sequentially performed on the N greater than X flags, and after decoding a significance flag (X=0) among the N greater than X flags and before decoding another N greater than X flags among the N greater than X flags, a greater than X flag bypass flag indicating whether the predetermined coefficient is greater than an absolute threshold is decoded, and if the greater than X flag bypass flag indicates that the predetermined coefficient is greater than the absolute threshold, context adaptive entropy decoding of the N greater than X flags is stopped relative to the other N greater than X flags (for example, and if the greater than X flag bypass flag indicates that the predetermined coefficient is not greater than the absolute threshold, context adaptive entropy decoding of the N greater than X flags is resumed relative to the greater than X flags among the other greater than X flags except for the last greater than X flag among the N greater than X flags). In addition, the method includes deriving a residual sample array of the predetermined transform block from the coefficient block, so that the coefficient block is related to the residual sample array according to the selected transform, and using the residual sample array to correct the prediction of the predetermined transform block to reconstruct the predetermined transform block.

[0095] According to an embodiment, a method for decoding a picture using predictive coding and block-based transform residual coding includes, for a predetermined transform block, selecting a selected transform from a predetermined transform list, the selected transform including an identity transform and at least one non-identity transform. The method includes decoding a coefficient block from a data stream for the predetermined transform block in a pass sequence by context-adaptively entropy decoding N greater than X flags for the predetermined coefficients, decoding a remainder indicating the amount by which the absolute value of the predetermined coefficient exceeds an absolute threshold using a variable length code, and decoding a sign of the predetermined coefficient, wherein the pass traverses the coefficients of the coefficient block in a predetermined scanning order, the greater than X flag indicating whether the absolute value of the predetermined coefficient is greater than X, and the absolute threshold depends on N, wherein the method includes distributing the decoding of the N greater than X flags, the remainder, and the sign differently over the pass sequence depending on whether the selected transform is an identity transform or one of the at least one non-identity transforms. In addition, the method includes deriving a residual sample array of the predetermined transform block from the coefficient block, so that the coefficient block is related to the residual sample array according to the selected transform, and using the residual sample array to correct the prediction of the predetermined transform block to reconstruct the predetermined transform block.

[0096] The above-mentioned apparatus and method for encoding a picture are based on the same considerations as the above-mentioned apparatus for decoding a picture. Incidentally, the apparatus and method for encoding a picture can be completed by all the features and / or functions also described with respect to the apparatus for decoding a picture. BRIEF DESCRIPTION OF THE DRAWINGS

[0097] The accompanying drawings are not necessarily drawn to scale, but emphasis is generally placed on illustrating the principles of the invention. In the following description, various embodiments of the invention are described with reference to the following drawings, in which:

[0098] Figure 1 A schematic diagram of a video encoder for predictively encoding a picture into a data stream according to an embodiment of the present invention is shown;

[0099] Figure 2 A schematic diagram of a video decoder configured to predict a decoded picture from a data stream according to an embodiment of the present invention is shown;

[0100] Figure 3 A schematic diagram showing 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;

[0101] Figure 4 A schematic diagram of an apparatus for decoding a picture according to an embodiment of the present invention is shown, wherein the apparatus is configured to select a selected transform depending on a size of a predetermined transform block;

[0102] Figure 5 A schematic diagram of an apparatus for decoding a picture according to an embodiment of the present invention is shown, wherein the apparatus is configured to decode a coefficient block depending on a selected transform;

[0103] Figure 6 A schematic diagram showing an apparatus for decoding a picture according to an embodiment of the present invention is shown;

[0104] Figure 7 A schematic diagram of an apparatus for decoding a picture according to an embodiment of the present invention is shown, wherein the apparatus is configured to reconstruct a predetermined transform block depending on a coding block flag;

[0105] Figure 8 A schematic diagram of an apparatus for decoding a picture according to an embodiment of the present invention is shown, wherein the apparatus is configured to fill or fill and sort a predetermined transformation list;

[0106] Fig. 9 A schematic diagram of a combined variable length code according to an embodiment of the present invention is shown;

[0107] Fig.10 A schematic diagram of an apparatus for decoding a picture according to an embodiment of the present invention is shown, wherein the apparatus is configured to decode position information depending on a selected transformation;

[0108] Fig.11 A schematic diagram of an apparatus for decoding a picture according to an embodiment of the present invention is shown, wherein the apparatus is configured to decode all coefficients of a coefficient block sub-block by sub-block;

[0109] Fig.12 A schematic diagram of an apparatus for decoding a picture according to an embodiment of the present invention is shown, wherein the apparatus is configured to decode a sub-block flag depending on a selected transform;

[0110] Fig.13a A schematic diagram showing decoding of a sub-block flag when at least one previous sub-block flag signals non-zeroness according to an embodiment of the present invention;

[0111] Fig.13b A schematic diagram showing decoding of a sub-block flag when all previous sub-block flags signal zeroness according to an embodiment of the present invention;

[0112] Fig.14 A schematic diagram of an apparatus for decoding a picture according to an embodiment of the present invention is shown, wherein the apparatus is configured to decode a sub-block flag by context adaptive entropy decoding;

[0113] Fig.15A schematic diagram showing an apparatus for decoding a picture according to an embodiment of the present invention, wherein the apparatus is configured to decode a significance mark using a context;

[0114] Fig.16 A schematic diagram of an apparatus for decoding a picture according to an embodiment of the present invention is shown, wherein the apparatus is configured to decode a coefficient block by context-adaptively entropy decoding N flags greater than X and decoding the remaining part using a variable length code;

[0115] Fig.17 A schematic diagram of an apparatus for decoding a picture according to an embodiment of the present invention is shown, wherein the apparatus is configured to decode the sign of a coefficient depending on a selected transform;

[0116] Fig.18 A schematic diagram of an apparatus for decoding a picture according to an embodiment of the present invention is shown, the apparatus being configured to decode coefficient blocks in a plurality of passes depending on a selected transform;

[0117] Fig.19 A schematic diagram of an apparatus for decoding a picture according to an embodiment of the present invention is shown, the apparatus being configured to decode coefficient blocks in a plurality of passes by distributing the decoding of N flags greater than X, remainders, and symbols differently over a pass sequence depending on a selected transform;

[0118] Fig. 20 A schematic diagram of an apparatus for decoding a picture according to an embodiment of the present invention is shown, the apparatus being configured to decode coefficient blocks in multiple passes by decoding one or more flags, each flag reducing an absolute value range;

[0119] Fig.21 A schematic diagram of an apparatus for decoding a picture according to an embodiment of the present invention is shown, the apparatus being configured to decode coefficient blocks in a scanning order depending on a selected transform;

[0120] Fig. 22 A schematic diagram of an apparatus for decoding a picture according to an embodiment of the present invention is shown, the apparatus being configured to decode the sign of a coefficient depending on a sign probability trend index if the selected transform is a non-identity transform;

[0121] Fig.23 A schematic diagram of an apparatus for decoding a picture according to an embodiment of the present invention is shown, the apparatus being configured to decode the sign of a coefficient depending on a syntax element if the selected transform is an identity transform;

[0122] Fig.24A schematic diagram of an apparatus for decoding a picture according to an embodiment of the present invention is shown, the apparatus being configured to decode the sign of a coefficient depending on statistics of the signs of previously decoded coefficients if the selected transform is an identity transform; and

[0123] Fig.25 A schematic diagram of a transform block and sub-blocks of the transform block is shown. DETAILED DESCRIPTION

[0124] In the following description, the same or equivalent elements or elements having the same or equivalent functions are denoted by the same or equivalent reference numerals even if they occur in different drawings.

[0125] In the following description, a number of 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 examples, well-known structures and devices are shown in block diagram form rather than specifically to avoid confusion with embodiments of the present invention. In addition, unless specifically indicated otherwise, the features of the different embodiments described below may be combined with each other.

[0126] The following description of the drawings starts with the presentation of a description of an encoder and a decoder of a block-based prediction codec for encoding pictures of a video in order to form an example of a coding framework in which embodiments of the present invention may be built. Figures 1 to 3 In the following, a description of embodiments of the concepts of the present invention and how these concepts are respectively constructed into Figure 1 The encoder and Figure 2 's decoder, although the subsequent Figure 4 The embodiments described below can also be used to form Figure 1 The encoder and Figure 2 The encoder and decoder operate under the encoding framework of the decoder.

[0127] Figure 1 An apparatus (eg, a video encoder) is shown for predictively encoding a picture 12 into a video stream 14, exemplarily using transform-based residual coding. Reference numeral 10 is used to denote the apparatus or encoder. Figure 2 A corresponding decoder 20 is shown, i.e. an apparatus 20 configured to predictively decode a picture 12' from a data stream 14 also using transform-based residual decoding, wherein a prime sign has been used to indicate that the picture 12' reconstructed by the decoder 20 deviates from the picture 12 originally encoded by the apparatus 10 with respect to coding losses introduced by quantization of the prediction residual signal. Figure 1 and Figure 2Transform-based prediction residual coding is used illustratively, although the embodiments of the present application are not limited to such prediction residual coding. Figure 1 and Figure 2 The same is true for the other details of the description, which will be outlined below.

[0128] The encoder 10 is configured to perform a spatial-to-spectral transform on the prediction residual signal and encode the prediction residual signal obtained thereby into the data stream 14. Similarly, the decoder 20 is configured to decode the prediction residual signal from the data stream 14 and perform a spectral-to-spatial transform on the prediction residual signal obtained thereby. Figure 4 and the embodiments described below, the type of transform used for the spatial to spectral transform may be signaled by the encoder in the data stream. Figure 4 As with the embodiments described below, the transform type for the spectral to spatial transform may be read from the data stream 14 by the decoder 20 .

[0129] Internally, according to an embodiment of the present invention, the encoder 10 may include a prediction residual signal former 22, which generates a prediction residual 24 so as to measure the deviation of the prediction signal 26 from the original signal (i.e. from the picture 12), wherein the prediction signal 26 can be interpreted as a linear combination of a set of one or more prediction sub-blocks. The prediction residual signal former 22 can, for example, be a subtractor, which subtracts the prediction signal from the original signal, i.e. from the picture 12. The encoder 10 then also includes a transformer 28, which performs a spatial to spectral transform on the prediction residual signal 24 to obtain a spectral domain prediction residual signal 24', which is then quantized by a quantizer 32 also included in the encoder 10. The thus quantized prediction residual signal 24" is encoded into the bitstream 14. According to the subsequent Figure 4 As with the embodiments described below, this can be performed by transform type dependent transform coefficient level coding. To this end, the encoder 10 may optionally include an entropy encoder 34 which entropy encodes the transformed and quantized prediction residual signal into the data stream 14.

[0130] The prediction signal 26 is generated by a prediction stage 36 of the encoder 10 based on a prediction residual signal 24″ encoded into the data stream 14 and decodable from the data stream 14. For this purpose, Figure 1As shown, the prediction stage 36 may internally include an inverse quantizer 38, which performs inverse quantization on the prediction residual signal 24" to obtain a spectral domain prediction residual signal 24"' corresponding to the signal 24' except for the quantization loss. The prediction stage 36 then includes an inverse transformer 40, which performs an inverse transformation on the latter prediction residual signal 24"', that is, a spectrum-to-spatial transformation, to obtain a prediction residual signal 24"" corresponding to the original prediction residual signal 24 except for the quantization loss. Then, the combiner 42 of the prediction stage 36 recombines the prediction signal 26 and the prediction residual signal 24"" by, for example, addition, to obtain a reconstructed signal 46, that is, a reconstruction of the original signal 12. The reconstructed signal 46 may correspond to the signal 12'. Then, the prediction module 44 of the prediction stage 36 generates the prediction signal 26 based on the signal 46 by using, for example, spatial prediction (i.e., intra-picture prediction) and / or temporal prediction (i.e., inter-picture prediction).

[0131] Likewise, if Figure 2 As shown, the decoder 20 may be internally composed of components corresponding to the prediction stage 36 and interconnected in a manner corresponding to the prediction stage 36. Specifically, the entropy decoder 50 of the decoder 20 may entropy decode the quantized spectral domain prediction residual signal 24″ from the data stream, and then the inverse quantizer 52, inverse transformer 54, combiner 56 and prediction module 58 interconnected and cooperating in the manner described above with reference to the modules of the prediction stage 36 may restore the reconstructed signal based on the prediction residual signal 24″, such that Figure 2 As shown, the output of combiner 56 produces a reconstructed signal, namely picture 12'. The decoding performed by decoder 20 may be based on the subsequent Figure 4 And the transform coefficient level decoding related to the transform type of the embodiments described below.

[0132] Although not specifically described above, it is easy to understand that the encoder 10 can set some encoding parameters, including, for example, prediction modes, motion parameters, etc., according to some optimization schemes such as in a manner to optimize some rate-distortion related criteria (i.e., encoding costs). For example, the encoder 10 and the decoder 20 and the corresponding modules 44 and 58 can support different prediction modes, such as intra-frame coding mode and inter-frame coding mode. The granularity at which the encoder and the decoder switch between these prediction mode types can correspond to the subdivision of the pictures 12 and 12' into coding segments or coding blocks, respectively. For example, in units of these coding segments, the pictures can be subdivided into intra-frame coded blocks and inter-frame coded blocks.

[0133] The intra-coded blocks are predicted based on a spatially already encoded / decoded neighborhood (e.g., a current template) of the respective block (e.g., the current block), as outlined in more detail below. There may be several intra-coding modes, including directional or angular intra-coding modes, and an intra-coding mode is selected for each intra-coded segment, according to which each segment is filled by extrapolating sample values ​​of the neighborhood into the corresponding intra-coded segment along a direction specific to the respective directional intra-coding mode. The intra-coding modes may also, for example, include one or more other modes, such as a DC coding mode, according to which the prediction of each intra-coded block assigns a DC value to all samples within the respective intra-coded segment, and / or a plane intra-coding mode, according to which the prediction of each block is approximated or determined as a spatial distribution of sample values ​​at sample positions of the respective intra-coded block described by a two-dimensional linear function, wherein the slope and offset of the plane defined by the two-dimensional linear function are driven based on neighboring samples.

[0134] In contrast, inter-coded blocks may be temporally predicted, for example. For inter-coded blocks, a motion vector may be signaled in the data stream 14, the motion vector indicating the spatial offset of a portion of a previously coded picture (e.g. a reference picture) of the video to which the picture 12 belongs, at which the previously coded / decoded picture was sampled in order to obtain a prediction signal for the respective inter-coded block. This means that, in addition to the residual signal encoding comprised by the data stream 14, such as the entropy coded transform coefficient levels representing the quantized spectral domain prediction residual signal 24″, the data stream 14 may encode therein coding mode parameters for assigning a coding mode to the respective blocks, prediction parameters for some blocks (e.g. motion parameters for inter-coded segments), and optionally other parameters (e.g. parameters for controlling and signaling the subdivision of the pictures 12 and 12′, respectively, into segments). The decoder 20 uses these parameters to subdivide the pictures in the same way as the encoder, assign the same prediction modes to the segments, and perform the same predictions to produce the same prediction signals.

[0135] Figure 3 The relationship between the reconstructed signal, i.e. the reconstructed picture 12', on the one hand, and the combination of the prediction residual signal 24"" and the prediction signal 26 signaled in the data stream on the other hand is shown. As mentioned above, the combination may be additive. The prediction signal 26 is Figure 3 , the picture region is shown to be subdivided into blocks for intra-frame coding schematically indicated by hatching and blocks for inter-frame coding schematically indicated by non-hatching. The subdivision may be any subdivision, such as a regular subdivision of the picture region into rows and columns of square blocks or non-square blocks, or a multi-tree subdivision (such as quadtree subdivision, etc.) of the picture 12 from a tree root block into a plurality of leaf blocks of different sizes, wherein Figure 3 A hybrid of these is shown in , where the picture region is first subdivided into rows and columns of tree root blocks, which are then further subdivided into one or more leaf blocks according to a recursive multi-tree subdivision.

[0136] Again, the data stream 14 may have an intra-coding mode encoded therein for an intra-coded block 80, which assigns one of several supported intra-coding modes to the corresponding intra-coded block 80. For an inter-coded block 82, the data stream 14 may have one or more motion parameters encoded therein. In general, the inter-coded block 82 is not limited to being encoded in time. Alternatively, the inter-coded block 82 may be any block predicted from a previously coded portion other than the current picture 12 itself, such as a previously coded picture of the video to which the picture 12 belongs, or, in the case where the encoder and decoder are scalable encoders and decoders, respectively, a picture of another view or a lower layer of the hierarchy.

[0137] Figure 3 The prediction residual signal 24"" in is also shown to subdivide the picture area into blocks 84. These blocks may be referred to as transform blocks in order to distinguish them from the coding blocks 80 and 82. In practice, Figure 3 It is shown that the encoder 10 and the decoder 20 can respectively subdivide the picture 12 and the picture 12' into blocks using two different subdivisions, namely one subdivision into coding blocks 80 and 82 respectively, and another subdivision into blocks 84. The two subdivisions may be the same, that is, each coding block 80 and 82 can also form a transform block 84, but Figure 3 The following situation is shown, in which, for example, the subdivision into a transform block 84 forms an extension of the subdivision into coding blocks 80, 82, so that any border between two blocks of blocks 80 and 82 covers the border between two blocks 84, or in other words, each block 80, 82 either coincides with one of the transform blocks 84 or with a cluster of transform blocks 84. However, the subdivisions can also be determined or selected independently of each other, so that the transform block 84 can alternatively cross the block border between blocks 80, 82. As far as the subdivision into the transform block 84 is concerned, similar statements are therefore correct as those proposed with respect to the subdivision into blocks 80, 82, i.e. the block 84 can be the result of a regular subdivision of the picture area into blocks (arranged in rows and columns or not), the result of a recursive multi-tree subdivision of the picture area or a combination thereof or any other type of blockation. By the way, it should be noted that the blocks 80, 82 and 84 are not limited to square, rectangular or any other shape.

[0138] Figure 3It is further shown that the combination of the prediction signal 26 and the prediction residual signal 24"" directly produces the reconstructed signal 12'. However, it should be noted that according to alternative embodiments more than one prediction signal 26 may be combined with the prediction residual signal 24"" to produce the picture 12'.

[0139] exist Figure 3 In the embodiment described below, the transform block 84 shall have the following meanings. The transformer 28 and the inverse transformer 54 perform their transforms 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 skipping transforms so that for some transform blocks 84, the prediction residual signal is encoded directly in the spatial domain. However, according to the embodiments described below, the encoder 10 and the decoder 20 are configured in such a way that they support several transforms. For example, the transforms supported by the encoder 10 and the decoder 20 may include:

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

[0141] DST-IV, where DST stands for discrete sine transform

[0142] DCT-IV

[0143] ·DST-VII

[0144] Identity Transformation (IT)

[0145] Naturally, the transformer 28 will support all forward transformed versions of these transforms, while the decoder 20 or inverse transformer 54 will support their corresponding backward or inverse versions:

[0146] Inverse DCT-II (or Inverse DCT-III)

[0147] ·Inverse DST-IV

[0148] Inverse DCT-IV

[0149] ·Inverse DST-VII

[0150] Identity Transformation (IT)

[0151] According to the subsequent Figure 4 As with the embodiments described below, transform type dependent transform coefficient level coding may be used by an encoder or a decoder.

[0152] The subsequent description provides more details about which transforms may be supported by the encoder 10 and decoder 20. In any case, it should be noted that the set of supported transforms may include only one transform, such as a spectral to spatial or spatial to spectral transform, but it is also possible that the encoder or decoder does not use any transform at all or does not use a transform for a single block 80, 82, 84.

[0153] As already outlined above, it has been presented Figures 1 to 3 As an example, the inventive concept further described below may be implemented to form specific examples of encoders and decoders according to the present application. In this regard, Figure 1 The encoder and Figure 2 The decoders represent possible implementations of the encoder and decoder described below in this paper, respectively. However, Figure 1 and Figure 2 However, the encoder according to the embodiment of the present application may use different concepts to perform block-based encoding of the picture 12. Figure 1 The encoders differ, for example, in the following ways: Figure 3 The subdivision into blocks 80 may be performed in different ways according to the exemplary embodiments, and / or no transform may be used at all or for individual blocks. Likewise, a decoder according to an embodiment of the present application may perform block-based decoding of a picture 12' from a data stream 14 using the coding concepts outlined further below, but the decoder may be similar to Figure 2 The decoder 20 of the reference 20 differs, for example, in the following aspects: Figure 3 The described approaches subdivide the picture 12' into blocks in different ways and / or derive the prediction residual from the data stream 14 not in the transform domain, but for example in the spatial domain and / or for example do not use any transform at all or do not use any transform for individual blocks.

[0154] The present invention describes a unified signaling concept for selecting multiple transform types and a dedicated transform coefficient level encoding stage for the selected transform type. This design improves compression efficiency depending on the input signal characteristics of hybrid video compression applications.

[0155] The present invention combines different transform type configurations with signaling. In addition, a transform type-dependent horizontal coding is proposed which can achieve higher compression efficiency.

[0156] Unification of transform type signaling

[0157] Summary of various aspects (informative description):

[0158] 1. A combined MTS syntax including DCT-II and TSM, where:

[0159] ο Combine the maximum allowed TSM and MTS sizes using a single value

[0160] ο Combine applicable color components for TSM and MTS

[0161] ο Signaling level

[0162] 2. Unify the interaction between MTS syntax and CBF

[0163] o For each component, signal the MTS mode for each significant transform block, e.g., signal the MTS mode only for luma when limited to luma

[0164] οCBF follows the MTS pattern rather than precedes it

[0165] 3. Unify the semantics of MTS syntax

[0166] οPosition of TS / DCT-II within the conventional MTS pattern

[0167] οMPM list, adaptive order of indexes, similar to intra mode

[0168] 4. Binarization and context modeling of unified MTS grammar

[0169] o Unary or fixed length code for the pattern

[0170] o Dedicated context model or separate context model

[0171] οAdditional context modeling for TS / DCT-2 modes

[0172] 1. The present invention does not treat TSM and MTS as different methods, but combines these two elements into a unified MTS syntax. One aspect includes using the same maximum allowed size for both MTS and TSM (compare Figure 4 ). The maximum size may be fixed or may be signaled in a high-level syntax structure inside the bitstream, e.g. at a sequence, picture, slice or tile level.

[0173] Figure 4An apparatus 100 for decoding a picture 12a using predictive coding and block-based transform residual coding is shown. The apparatus is configured to subdivide the picture 12a into transform blocks 84 of different sizes and to select 110 a selected transform 112 for a predetermined transform block 84c by checking whether the size of the predetermined transform block exceeds a predetermined threshold size 111. If the size of the predetermined transform block 84c exceeds the predetermined threshold size 110, the selected transform 112 is selected using a default manner 114. If the size of the predetermined transform block 84c does not exceed the predetermined threshold size 111, the transform pointed to by the index sent in the data stream 14 for the predetermined transform block 84c in a predetermined transform list 116 is used as the selected transform 112. The predetermined transform list 116 includes an identity transform 117 and a non-identity transform 118. Furthermore, the apparatus 100 is configured to decode 120 a coefficient block (c-block) from the data stream 14 for the predetermined transform block 84c. The apparatus is, for example, configured to determine or identify 130 a residual sample array 132 based on the c-block and the selected transform 112. If the selected transform 112 is the identity transform 117, the apparatus is configured to use the coefficient block as the residual sample array 132 for the predetermined transform block 84c, and if the selected transform 112 is not the identity transform 117, the apparatus is configured to perform an inverse transform 131 on the coefficient block corresponding to the selected transform 112 to obtain the residual sample array 132 for the predetermined transform block 84c. The apparatus uses the residual sample array 132 to correct a prediction 84'c of the predetermined transform block (e.g., this may be a spatial or temporal prediction, which is invalid for all subsequent occurrences) to reconstruct 84"c the predetermined transform block 84c.

[0174] According to an embodiment, selecting 110 a default mode 114 of transformation may include decoding a default index pointing to a transform in a predetermined list 116 from the data stream or decoding a default transform from the data stream. Alternatively, a default transform known to the apparatus 100 may be selected 110 as the default mode 114.

[0175] 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 predetermined transform block 84c exceeds a predetermined threshold size 111. The default non-identity transform is for example contained in the predetermined transform list 116, such as one of the non-identity transforms 118.

[0176] According to an embodiment, the apparatus 100 is configured to derive a predetermined threshold size 111 from the data stream 14 .

[0177] According to an embodiment, the apparatus 100 is configured to decode 115 an index for the predetermined transform block 84c from the current position in the data stream 14 if the size of the predetermined transform block 84c does not exceed a predetermined threshold size 111, and to decode a syntax element different from the index from the current position in the data stream 14 if the size of the predetermined transform block exceeds a predetermined threshold size. As a syntax element different from the index, for example, another element (rather than the index) is read from the data stream 14, but not in the sense of being skipped and not read, but because the data stream 14 does not contain the index, although the syntax may be the same up to that position in the data stream.

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

[0179] In another preferred version, both TSM and MTS are applicable to all color components of the block. In other words, the device 100 is configured, for example, to apply the selected transform 112 to the luma component and the chroma component of the picture within the predetermined transform block 84c. Additionally or alternatively, the device 100 is configured to decode 115 an index from the data stream 14 for the predetermined transform block for each of the luma component and the chroma component of the picture 12a. The version used (luma component only or all components) can also be signaled in the bitstream. In other words, the device 100 is configured, for example, to derive from the signal in the data stream 14 whether the transform block 84 is a luma transform block and whether a fixed default transform is to be used for the chroma transform block, whether the selected transform 112 is to be applied to the luma component and the chroma component of the picture within the predetermined transform block, or for each of the luma component and the chroma component of the picture, whether an index is to be decoded 115 from the data stream for the predetermined transform block. In the case of having the same conditions for all transform types, a single syntax specifying the transform type for each transform block can be sent in the bitstream. The following table describes an example of this unified syntax using TU MTS index.

[0180] Table 4 Example of unified MTS signaling using one TU MTS index

[0181]

[0182] In the previous examples, the unified MTS syntax was signaled at the TU level. However, in case the CU is split into multiple TUs, the unified MTS syntax, i.e. the CU MTS index, may also be signaled at the CU level. In other words, the device 100 is, for example, configured to decode 115 from the data stream 14 for indexing for a coding block of a picture, the coding block being divided into multiple transform blocks including a predetermined transform block. Please note that it is possible to signal the unified MTS syntax for disjoint sets of CUs at a higher level, i.e. the index may be valid for a set of coding blocks. Another variant would be to signal the unified MTS syntax for disjoint sets of CUs at a higher level, for example, "coding block" being one of the disjoint sets.

[0183] According to an embodiment, the apparatus 100 may perform Figure 5 In other words, Figure 5 It is shown that for a predetermined transform block 84c, a coefficient block 122 is decoded 120 from the data stream 14. Depending on whether the selected transform 112 for the predetermined block 84c is included in a predefined set of one or more transforms 125, the device is configured to: if the selected transform 112 for the predetermined block 84c is included in the predefined set of one or more transforms 125, decode a coded block flag 126' from the data stream 14, the coded block flag 126' signaling whether the coefficient block 122 has at least one non-zero coefficient (see 127). Alternatively, if the selected transform 112 for the predetermined block 84c is not included in the predefined set of one or more transforms 125, it is inferred that the coefficient block 122 has at least one non-zero coefficient (see 127'). In other words, if the selected transform for the predetermined block is included in the predefined set of one or more transforms, no CBF is decoded from the data stream, or even in other words, a syntax element other than the CBF is decoded from the current portion of the data stream that is decoding the CBF.

[0184] According to an embodiment, the predefined set of one or more transforms 125 includes an identity transform 125a and a default non-identity transform 125b, which is selected by default according to a default manner for selecting a selected transform.

[0185] 2. In general, if all levels of a transform block are equal to 0 (i.e. if CBF=0), then all transform types will produce the same reconstructed signal. For example, in the prior art, the MTS transform syntax for luma is signaled only if the CBF of the luma transform block is not equal to 0 (i.e. if there are any significant levels). Similarly, TSM can be selected only if CBF is equal to 1.

[0186] In a preferred embodiment of the present invention, a unified MTS syntax for a block including MTS and TSM information is signaled before the CBF for the block. In this configuration, if the selected transform type is not equal to a specific transform (e.g. DCT-II or transform skip), the value of CBF can be inferred to be equal to 1 (compare Figure 6 ). Or in other words, if the syntax element specifies a transform type equal to a predefined value, then it specifies the transform represented by the predefined value and the CBF is encoded. But if the syntax element specifies a transform type that is not equal to the predefined value, then it specifies the transform represented by the value of the syntax element and additionally specifies that the CBF is equal to 1 (no CBF is sent for these values ​​of the transform type syntax element).

[0187] Figure 6 An apparatus 100 for decoding a picture 12a using predictive coding and block-based transform residual coding is shown. The apparatus 100 is configured to select a selected transform 112 for a predetermined transform block 84c by decoding 115 an index from a data stream 14 for the predetermined transform block 84c and using one of the transforms pointed to by the index in a predetermined transform list 116 as the selected transform 112. Furthermore, the apparatus 100 is configured to decode 120 a coefficient block 122 from the data stream 14 for the predetermined transform block 84c. The apparatus is configured to derive 130 a residual sample array 132 of the predetermined transform block 84c from the coefficient block 122 such that the coefficient block 122 is associated with the residual sample array 132 according to the selected transform 112. The apparatus 100 is further configured to correct 140 a prediction 84'c of the predetermined transform block 84c using the residual sample array 132 to reconstruct the predetermined transform block. In addition, the apparatus 100 is configured to, when decoding 120 a coefficient block 122 from the data stream 14 for a predetermined transform block 84c, depend on whether the selected transform for the predetermined block is included in a predefined set of one or more transforms, such as Figure 5 As shown. Thus, the apparatus is configured to decode 126 a coded block flag 126' from the data stream 14 if the selected transform for the predetermined block is included in the predefined set of one or more transforms, the coded block flag 126' signaling whether the coefficient block 122 has at least one non-zero coefficient; and the apparatus is configured to infer that the coefficient block 122 has at least one non-zero coefficient if the selected transform for the predetermined block is not included in the predefined set of one or more transforms. In other words, if the selected transform for the predetermined block is included in the predefined set of one or more transforms, the CBF is not decoded from the data stream, or even in other words, a syntax element other than the CBF is decoded from the current portion of the data stream that is being decoded from the CBF.

[0188] According to an embodiment, the predefined 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 predefined set of one or more transforms 125 and the predetermined list of one or more transforms 116 may be identical. In other words, one transform list may be used, for example, for the selection of a transform 116 and for the decoding 120 of a c-block. The terms predefined set of one or more transforms 125 and predetermined list of one or more transforms 116 may be interchanged here and in all other embodiments.

[0189] According to an embodiment, the apparatus 100 is configured to fill or fill and sort the predetermined transformation list depending on the data stream 14, and decode the index from the data stream using a variable length code, so that each transformation in the predetermined transformation list has been assigned a codeword of the variable length code, and the codeword length of the codeword of the variable length code increases monotonically with the order of the transformation assigned the codeword in the predetermined transformation list. This feature is for example in Figure 8 Shown in FIG. 1 is a transformation selection 110 .

[0190] In another preferred embodiment of the invention, the CBF is signaled before the transform type. If the CBF is equal to 0, the transform type is not signaled (the actual transform used has no impact on the decoding result; it can be inferred to be equal to DCT-II or transform skip or any other transform). The transform type syntax element is sent only when the CBF is equal to 1. (compare Figure 7 )

[0191] Figure 7An apparatus 100 for decoding a picture using predictive coding and block-based transform residual coding is shown, configured to decode 120 a coefficient block 122 from a data stream 14 for a predetermined transform block, including decoding 120 a coded block flag 126' from the data stream 14, the coded block flag 126' signaling whether the coefficient block 122 has at least one non-zero coefficient. The apparatus 100 is configured to decode 115 an index for the predetermined transform block from the data stream 14 if the coded block flag signals 1271 that the coefficient block 122 has at least one non-zero coefficient, and select 110 a selected transform 112 for the predetermined transform block using one of the transforms pointed to by the index in a predetermined transform list 116 as the selected transform 112. A residual sample array 132 for the predetermined transform block is derived 130 from the coefficient block 122, such that the coefficient block 122 is associated with the residual sample array 132 according to the selected transform 112. Additionally, the prediction 84'c of the predetermined transform block is corrected 140 using the residual sample array 132 to reconstruct the predetermined transform block. Alternatively, if the coded block flag 126' signals 1272 that the coefficient block 122 does not have at least one non-zero coefficient, the apparatus 100 is configured to reconstruct 150 the predetermined transform block without performing a prediction correction. In other words, if the coded block flag signals that the coefficient block does not have at least one non-zero coefficient, the index is not decoded from the data stream, for example by decoding a syntax element other than the index from the current portion of the data stream.

[0192] 3. Another aspect to consider is the assignment of unified MTS indices to the allowed transform types and / or the ordering of unified MTS indices. For example, TSM can be signaled before DCT-II types and in case of variable length codes, TSM has shorter codewords and vice versa. For screen or computer generated content, TSM is often preferred due to the frequent presence of high frequency edge structures, but they are less suitable for energy compression performed by DCT / DST-like transforms. In this case, it is beneficial to signal TSM before any other transform type. (compare Figure 8 ) This signal adaptive method can be implemented using a most probable transform mode (MPM) list similar to the MPM list used for intra prediction mode encoding. Instead of directly signaling the transform type, the MPM list is constructed with the most probable transform type with a small number of indices, and the index into the list is sent in the bitstream.

[0193] Figure 8An apparatus 100 for decoding a picture using predictive coding and block-based transform residual coding is shown, configured to fill 160 or fill and sort 160' a predetermined transform list 116 depending on a data stream 14. The apparatus 100 is configured to select 110 a selected transform 112 for a predetermined transform block by decoding 115 an index from the data stream 14 using a variable length code 115', such that each transform in the predetermined transform list 116 has been assigned a codeword of the variable length code and the codeword length of the codeword of the variable length code increases monotonically with the order of the transforms assigned the codeword in the predetermined transform list, and to use as the selected transform a transform in the predetermined transform list pointed to by the index. Furthermore, the apparatus 100 is configured to decode 120 a coefficient block 122 from the data stream 14 for a predetermined transform block, and the apparatus 100 is configured to derive 130 a residual sample array 132 of the predetermined transform block from the coefficient block 122, such that the coefficient block 122 is associated with the residual sample array 132 according to the selected transform 112. Furthermore, the apparatus is configured to correct 140 a prediction 84'c of the predetermined transform block using the residual sample array 132 to reconstruct the predetermined transform block.

[0194] According to an embodiment, the device is configured to sort 160' the predetermined transform list 116 depending on a syntax element in the data stream 14, the syntax element being valid at least globally for the picture. Additionally or alternatively, the device 100 is configured to sort 160' the predetermined transform list 116 depending on an evaluation of sample statistics in a spatial neighborhood of a predetermined transform block. Additionally or alternatively, the device 100 is configured to sort 160' the predetermined transform list 116 depending on a syntax element signaled in the data stream 14 for blocks in the spatial neighborhood of the predetermined transform block. Additionally or alternatively, the device 100 is configured to sort 160' the predetermined transform list 116 such that there is at least one state of the data stream 14 that causes the sorting 160' of the predetermined transform list 116 to place the identity transform in a leading order, for example with index 0, and to assign the shortest codeword of the variable length code, for example codeword 0, to the leading order.

[0195] According to an embodiment, the apparatus 100 is configured to decode 115 an index from a data stream 14 using a combined variable length code codeword, the combined 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. The codeword of the combined 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 predefined non-identity transformation and is used to distinguish between the identity transformation and the predefined non-identity transformation, and the other codewords of the combined variable length code are assigned to other non-identity transformations in a predetermined transformation list and are used to distinguish between other non-identity transformations in the predetermined transformation list. The combined variable length code may be associated with Fig. 9 The combined variable length code 115' in is similar or identical.

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

[0197] In other words, according to an embodiment, the apparatus 100 for decoding a picture using prediction coding and block-based transform residual coding is configured to decode the picture by using, for example, Fig. 9 The combined variable length code 115' codeword 115'a shown in the figure selects the selected transform for a predetermined transform block by decoding an index in a predetermined transform list from a data stream, the variable length code 115' codeword 115'a consisting of the following items: 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, followed by a second codeword 115'a2 of the fixed length code. The codeword 115'a of the combined variable length code 115' consisting of only one of the two non-longest codewords 115'c1 and 115'c2 of the variable length code is assigned to the constant transform 117 and the predefined non-identical transform 1181 contained in the predetermined transform list 116, and is used to distinguish the constant transform 117 from the predefined non-identical transform 1181. Other codewords of the combined variable length code are assigned to other non-identity transforms 1182 to 1185 in the predetermined transform list 116 and are used to distinguish other non-identity transforms 1182 to 1185. The apparatus is configured to select the selected transform for the predetermined transform block by using one transform pointed to by the index in the predetermined transform list 116 as the selected transform. In addition, the apparatus is configured to decode the coefficient block from the data stream for the predetermined transform block to derive the residual sample array of the predetermined transform block from the coefficient block, so that the coefficient block is related to the residual sample array according to the selected transform, and use the residual sample array to correct the prediction of the predetermined transform block to reconstruct the predetermined transform block.

[0198] Horizontal coding for transform skip mode

[0199] The encoding of transform coefficient levels, or simply levels in the rest of this document, is a process embedded in the entropy coding stage of a transform coding architecture, which can be part of a hybrid video codec. In the latter architecture, the prediction minimizes the energy of the original signal, resulting in a residual signal that has been subjected to a transform coding process. Typically, the transform and quantization stages modify the residual signal and provide the result to the entropy coding stage, where the transformed and quantized coefficients are referred to as transform coefficient levels. This hybrid design is suitable for content captured by a camera. However, in practical applications, video signals are not always captured by a camera; therefore, the transform coding approach is not always optimal in a rate-distortion sense. A workaround to maintain 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 of TSM lead to an improvement in compression efficiency.

[0200] Summary of various aspects (informative description):

[0201] 1. No last position signaling

[0202] 2. Sub-block CBF of each sub-block (coded_sub_block_flag)

[0203] 3.sig_coeff_flag context modeling includes

[0204] ο Reduced distinctive sign template, only left and right

[0205] οThe number of significant positions rather than the absolute sum

[0206] 4.abs_level_gt1_flag and par_level_flag context modeling:

[0207] 5.abs_remainder encoding:

[0208] οabs_remainder binarization, where the template of Rice parameters is reduced

[0209] οabs_remainder, with a dedicated context model for each binary bin index

[0210] o Increased number of binary bin indices encoded by ctx

[0211] o Adaptive number of ctx-encoded binary bin indices

[0212] o Maximum number of context-encoded binary bins per sample

[0213] 6.coeff_sign_flag context modeling

[0214] οDifferent approaches for context modeling

[0215] Additional syntax elements that can modify the parsing process

[0216] 7. Additional count-based reduction of CCB

[0217] 8. Different sub-block shapes and sizes

[0218] 9. Adaptive scanning pattern depending on predictor

[0219] In order to keep the changes relative to the conventional horizontal coding mode as low as possible, a similar design can be used. Specifically, compared to the conventional mode, the dedicated horizontal coding mode for TSM does not use the last significant position information (compare Fig.10 ). Therefore, a sub-block-level coded block flag (CBF) is sent for each sub-block in the transform block (compare Fig.12 ). In addition, the cutoff value for transitions between truncated unary codes and Rice / Exponential Golomb codes in binarization is fixed and increased relative to the normal mode, resulting in a higher number of binary bins encoded using the context adaptive model in the normal mode of the entropy encoder (compare Fig.16 ).

[0220] The dedicated horizontal coding approach is particularly beneficial for TSM because the symbol source statistics are completely different from those used for other transform candidates (usually DCT / DST transforms). However, the deviation from the existing conventional horizontal coding mode should be kept as low as possible to keep the implementation overhead low. In addition, the dedicated TSM design should not be much more complex than the conventional mode. The differences from conventional horizontal coding are described as follows:

[0221] 1. Last significant scan position: Since the residual signal reflects the spatial residual after prediction, and no transform-induced energy compression is performed for TSM, there is no longer a higher probability of trailing zeros or insignificant levels in the lower right corner of the transform block. Therefore, the last significant scan position signaling is omitted in this case. Instead, the first subblock to be processed is the lower rightmost subblock within the transform block. (Compare Fig.10 )

[0222] Fig.10An apparatus 100 for decoding a picture using predictive coding and block-based transform residual coding is shown, configured to select 110 a selected transform 112 from a list of predetermined transforms 116 for a predetermined transform block, 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 coefficient block 122 from a data stream 14 for the predetermined transform block by checking 123 whether the selected transform 112 is a non-identity transform 118. If the selected transform 112 is a non-identity transform 118, the apparatus 100 is configured to decode 120 the coefficient block 122 by decoding 124 position information from the data stream in order to obtain a predetermined coefficient position, the position information being related to where a non-zero coefficient 121a is first encountered along a scanning order traversing all coefficients of the coefficient block, or where a non-zero coefficient 121a is last encountered along a scanning order traversing all coefficients of the coefficient block. Please note the following: In the above embodiments, the position is referred to as the last position measured along the scan order from the upper left corner to the lower right corner, although according to these embodiments, the actual scanning / encoding starts there. That is, the actual encoding is performed in a reverse scan order 85 from the lower right corner to the upper left corner. Here, the scan order is the encoding order. See the next embodiment that anticipates these two scan directions. If the selected transform 112 is a non-identity transform 118, the device 100 is also configured to decode the coefficient block by decoding 121 a first coefficient 121a of the coefficient block from the data stream and inferring that a second coefficient 121b in the coefficient block that is different from the first coefficient 121a is zero, the first coefficient 121a includes all non-zero coefficients of the coefficient block and is traversed by a scan order starting from or until a predetermined coefficient position 121a1. If the selected transform 112 is an identity transform 117, the device 100 is configured to decode 120 the coefficient block by decoding 121' all coefficients of the coefficient block from the data stream 14. Furthermore, the apparatus 100 is configured to derive 130 a residual sample array 132 of a predetermined transform block from the coefficient block 122 such that the coefficient block is associated with the residual sample array 132 according to the selected transform 112, and to use the residual sample array 132 to correct 140 a prediction 84'c of the predetermined transform block to reconstruct the predetermined transform block.

[0223] According to an embodiment, the apparatus 100 is configured to use the scan order 85 and start decoding the first coefficient 121a at the predetermined coefficient position 121a1 when decoding 121 the first coefficient 121a of the coefficient block 122 from the data stream 14, so that the first coefficient 121a is decoded in the scan order 85 (e.g., Fig.10 85 in the scanning order 85) traverses the first coefficient 121a, or completes the decoding 121 of the first coefficient 121a at the predetermined coefficient position 121a1, so that the scanning order 85 (reverse scanning order; in the same as Fig.10 121a) in the opposite direction of the scanning order 85 shown in FIG. 12. In addition, the apparatus 100 is configured to sequentially decode all coefficients in the coefficient block 122 starting with or ending with the last coefficient traversed in the scanning order when decoding 121 all coefficients of the coefficient block 122 from the data stream 14. Fig.10 The scan order 85 shown is only an example. Different scan orders are possible.

[0224] According to an embodiment, the apparatus 100 is configured to use the scan order 85 and complete the decoding of all coefficients at the coefficient last traversed by the scan order in the coefficient block, or to use the reverse scan order and start the decoding of all coefficients at the coefficient last traversed by the scan order in the coefficient block, when decoding 121 all coefficients of the coefficient block 122 from the data stream 14. This means that, for example, the coefficient position 121a2 may represent the end position (e.g. Fig.10 ), it can also represent the starting position of the scan order. Please note that the scan order is defined as the scan order in the case of non-identity transformation 118.

[0225] According to an embodiment, the device 100 is configured to decode 124 position information by decoding the coordinates of the predetermined coefficient position 121a1 from the data stream 14, such as (x, y), or decoding the order of the predetermined coefficient position 121a1 within the scan order 85 from the data stream 14, such as indicating the order in the scan order.

[0226] According to an embodiment, the apparatus 100 is configured to perform decoding 121 of the first coefficient 121a of the coefficient block 122 in units of sub-blocks 1221-1224 into which the coefficient block is divided by inferring a sub-block flag in the data stream 14 (e.g., a coded sub-block flag used in the above-mentioned embodiment) to signal that the first coefficient 121a in the sub-block of zero is zero, and by decoding the sub-block flag in the data stream from the data stream 14 to signal the first coefficient 121a in the sub-block of non-zero, so that the scanning order 85 is traversed when the first coefficient 121a of the coefficient block 122 is different from one sub-block. Before traversing all first coefficients 121a in the one word block, a sub-block flag other than at least one of a first sub-block flag and a second sub-block flag is decoded from the data stream, the first sub-block flag is related to a sub-block including a predetermined coefficient position, the second sub-block flag is related to a sub-block including a first coefficient of the coefficient block, a plurality of first coefficients are located between the first coefficient of the coefficient block and the predetermined coefficient position and it is inferred that the sub-block flag other than the at least one of the first sub-block flag and the second sub-block flag is used to signal non-zeroness. Furthermore, the apparatus is configured to perform decoding 121 of all coefficients of a coefficient block 122 decoded from a data stream 14 in units of sub-blocks 1221-1224 into which the coefficient block is divided, and by inferring a sub-block flag in the data stream to signal that coefficients within the sub-block of zero are zero and decoding a sub-block flag in the data stream to signal that coefficients within the sub-block of non-zero are non-zero from the data stream, so that the scanning order traverses all coefficients within a sub-block before traversing the first coefficient within a sub-block different from the sub-block, wherein the sub-block flag is decoded from the data stream for all sub-blocks. An example of the decoding 121 is described in Fig.11 According to Fig.11 , for example, sub-blocks 1221, 1222, 1223, and 1224 are decoded in this order, thereby only the first coefficient is decoded, and all second coefficients are not decoded. The scanning order 85 is shown as a solid line running through all first coefficients and a dashed line running through all second coefficients. Reverse scanning of sub-blocks 1221-1224 and / or reverse scanning order 85 is also possible.

[0227] According to an embodiment, the device 100 is configured to, when decoding sub-block flags from the data stream for all sub-blocks, sequentially decode the sub-block flags of all sub-blocks from the data stream in a sub-block order, and if all previous sub-block flags preceding the sub-block order signal zero, infer that the sub-block flag located last in the sub-block order signals non-zero. Compare the above embodiments, in which 2.b. has been pointed out: "Unless all other coded_sub_block_flag syntax elements are already equal to 0, this also includes the coded_sub_block_flag of the DC sub-block. In this case, it is inferred that the DC coded_sub_block_flag is equal to 1" (compare Fig.13a and 13b ).

[0228] According to an embodiment, the apparatus 100 is configured to, when decoding sub-block flags from a data stream for all sub-blocks, sequentially decode the sub-block flags of all sub-blocks from the data stream in a sub-block order, and if all previous sub-block flags preceding in the sub-block order signal zeroness, sequentially decode coefficients within a predetermined sub-block in a coefficient order, infer, for a predetermined sub-block, a sub-block flag located last in the sub-block order to signal non-zeroness, and for each coefficient except the last coefficient within the predetermined sub-block, decode a significance flag indicating whether the corresponding coefficient is non-zero, and infer that the last coefficient is non-zero if other coefficients within the predetermined sub-block are zero, and decode the significance flag of the last coefficient if at least one other coefficient within the predetermined sub-block is non-zero. Furthermore, the apparatus 100 is configured to, when decoding a sub-block flag other than at least one of the first sub-block flag and the second sub-block flag from the data stream, decode the sub-block flag other than at least one of the first sub-block flag and the second sub-block flag from the data stream, and infer that the at least one of the first sub-block flag and the second sub-block flag signals non-zeroness, and, for all first coefficients within the sub-block associated with the second sub-block flag, inevitably decode a significance flag indicating whether the corresponding coefficient is non-zero. Comparing the above embodiment, if all other significance (SIG) flags of the sub-block are equal to 0, the significance flag at (0,0) is inferred, see 2.b of this description: "In this case, the DC coded_sub_block_flag is inferred to be equal to 1 (inferDcSbCbf=1). Since there must be at least one significance level in the DC sub-block, if all other sig_coeff_flag syntax elements in the DC sub-block are equal to 0, the sig_coeff_flag syntax element at the first position at (0,0) is not signaled, but derived to be equal to 1 (inferSbDcSigCoeffFlag=1)."

[0229] 2. Sub-block CBF: The absence of the last significant scan position signaling requires the following modification of the sub-block CBF signaling with coded_sub_block_flag of the TSM:

[0230] a. Due to quantization, the aforementioned insignificant sequence may still appear locally within the transformed block. Therefore, the last significant scan position is removed as before and coded_sub_block_flag is encoded for all sub-blocks. (Compare Fig.12 )

[0231] 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 predetermined transform block, a selected transform from a predetermined transform list, the selected transform including an identity transform and at least one non-identity transform. In addition, the apparatus 100 is configured to decode 121 coefficients of a coefficient block from a data stream in units of sub-blocks into which the coefficient block is divided by inferring a sub-block flag in the data stream to signal that the coefficients within the sub-block of zero are zero, and decoding from the data stream the sub-block flag in the data stream to signal the coefficients within the sub-block of non-zero, so as to decode 120 the coefficient block from the data stream for the predetermined transform block, wherein if the selected transform 112 is one of the at least one non-identity transform (see Fig.12 1231), then decode 2001 sequentially from the data stream 14 in the scanning order except for the first sub-block mark 2101 and the last sub-block mark 210 n The first sub-block flag 2101 is related to the position information indicating non-zero (for example, the sub-block flag related to the first sub-block), and the first sub-block flag 2101 and the last sub-block flag 2101 are inferred. n The at least one sub-block flag in the signal signals non-zeroness. For a non-identity transform, the probability of non-zero coefficients in the top left sub-block is high. Depending on the scan order, this sub-block is the first 2101 sub-block, or the last 210 n In addition, the apparatus 100 is configured to decode the coefficients of the coefficient block from the data stream in units of subblocks into which the coefficient block is divided by inferring a subblock flag from the data stream to signal that the coefficients in the subblock of zero are zero, and decoding the subblock flag from the data stream to signal the coefficients in the subblock of non-zero from the data stream, so as to decode the coefficient block from the data stream for a predetermined transform block, wherein if the selected transform 112 is an identity transform (see Fig.12 1232 in ), then decode 2002 the sub-block flags from the data stream for all sub-blocks. For the identity transform, the sub-blocks with high probability non-zero coefficients are unknown, so all sub-block flags should be decoded. Additionally, the apparatus is configured to derive a residual sample array of a predetermined transform block from the coefficient block, so that the coefficient block is related to the residual sample array according to the selected transform, and use the residual sample array to correct the prediction of the predetermined transform block to reconstruct the predetermined transform block. The apparatus can be used with Fig.10 The device shown in FIG. 1 is similar to that shown in FIG. 1 , except that the decoding 120 of the c block is as follows: Fig.12 Execute as shown in .

[0232] b. The coded_sub_block_flag of the sub-block covering the DC frequency position (upper left sub-block) represents a special case. In the horizontal coding of the prior art, the coded_sub_block_flag of this sub-block is never signaled, but is always inferred to be equal to 1. When the last significant scan position is in another sub-block, this means that there is at least one significant level outside the DC sub-block. Therefore, although the coded_sub_block_flag of this sub-block is inferred to be equal to 1, the DC sub-block may contain all zero / non-significant levels. Due to the lack of last scan position information in 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 Fig.12 ), unless all other coded_sub_block_flag syntax elements are already equal to 0 (compare Fig.13a and Fig.13b ). In this case, the DCcoded_sub_block_flag is inferred to be equal to 1 (inferDcSbCbf=1). Since there must be at least one significant level in the DC sub-block, if all other sig_coeff_flag syntax elements in the DC sub-block are equal to 0, the sig_coeff_flag syntax element at the first position at (0,0) is not signaled, but derived to be equal to 1 (inferSbDcSigCoeffFlag=1). This is not the case in prior art level coding.

[0233] According to an embodiment, the apparatus 100 and Fig.10 The device shown is similar except that Fig.12 The decoding of block c is performed 120, and the apparatus 100 is configured to: 36 , when decoding the sub-block flag from the data stream, all sub-blocks 1221-122 are decoded sequentially from the data stream according to the sub-block order 85 36 and if at least one of the preceding sub-block flags preceding in sub-block order signals non-zeroness (e.g. Fig.13a Sub-block 122 32 Sub-block flag and sub-block 122 18 The sub-block flag indicates non-zero), then the last sub-block flag in the sub-block sequence is decoded, for example, sub-block 122 36 The sub-block flag of the previous sub-block sequence (for example, all previous sub-blocks 1221 to 122 35 The flag of the last sub-block in the sub-block sequence (e.g., sub-block 122) is used to signal the zeroness.36 sub-block flag) to signal non-zero (compare Fig.13b ).

[0234] According to an embodiment, the apparatus 100 is configured to, when inferring that the last sub-block flag in the sub-block order signals non-zeroness, infer that the last coefficient in the sub-block indicates non-zeroness if all previous coefficients in the sub-block inferred to signal non-zeroness are zero.

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

[0236] c. When there is only one sub-block within a transform block, coded_sub_block_flag is never signaled as in prior art horizontal coding (this is included in the previous case, since no sub-block with CBF equal to 1 is sent for the current transform block).

[0237] d. In addition, the context modeling for 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 coded_sub_block_flag(B) below, instead of the logical OR of the two, i.e. coded_sub_block_flag(R)|coded_sub_block_flag(R). (Compare Fig.14 )

[0238] According to an embodiment, the apparatus 100 for decoding a picture using prediction coding and block-based transform residual coding is configured to select a selected transform 112 from a predetermined transform list for a predetermined transform block, wherein the selected transform includes an identity transform and at least one non-identity transform. Furthermore, the apparatus 100 is configured to decode 121 coefficients of a coefficient block from a data stream in units of subblocks into which the coefficient block is divided by inferring a subblock flag in the data stream to signal that coefficients within a subblock of zero are zero, and decoding a subblock flag in the data stream 14 to signal that coefficients within a subblock of non-zero are non-zero, so as to decode 120 a coefficient block 122 for a predetermined transform block, wherein a currently decoded subblock flag is decoded 200 from the data stream by context adaptive entropy decoding and using a context 300, if the selected transform is one of at least one non-identity transform, the context 300 depends on a logical OR 310 of subblock flags associated with subblocks adjacent to the currently decoded subblock flag, and if the selected transform is an identity transform, the context 300 depends on an arithmetic SUM 320 of subblock flags associated with subblocks adjacent to the currently decoded subblock flag. In addition, the apparatus 100 is configured to derive a residual sample array of a predetermined transform block from the coefficient block, so that the coefficient block is related to the residual sample array according to the selected transform, and use the residual sample array to correct the prediction of the predetermined transform block to reconstruct the predetermined transform block. The apparatus can be used with Fig.10 The device shown in FIG. 1 is similar to that shown in FIG. 1 , except that the decoding 120 of the c block is as follows: Fig.14 Execute as shown in .

[0239] According to an embodiment, the apparatus 100 is configured to decode, for a current coefficient within a sub-block in a data stream that signals non-zeroness, a significance flag indicating whether the current coefficient is zero from the data stream using a context, the context depending on the number 310 of coefficients that are non-zero in a first set of coefficients if the selected transform is an identity transform, and the context depending on the number 320 of coefficients that are non-zero in a second 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 first set of coefficients being immediately adjacent to the current coefficient, the second set of coefficients including the first set of coefficients and coefficients that are further away from the current coefficient than the first set of coefficients.

[0240] 3. sig_coeff_flag context modeling: The context modeling of sig_coeff_flag adopts a local template similar to the horizontal coding mode of the above-mentioned prior art. However, only the neighbors to the right (NB0) and the neighbors below (NB1) of the current scan position are considered. The context model offset is only the number of significant neighboring positions sig_coeff_flag(NB0)+sig_coeff_flag(NB1). Therefore, the selection of different context sets depending on the diagonal d within the current transform block is removed. This results in three context models and a single context model set for encoding the sig_coeff_flag flag. (Compare Fig.15 )

[0241] 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 predetermined transform block, a selected transform 112 from a predetermined transform list, the selected transform comprising an identity transform and at least one non-identity transform. In addition, the apparatus 100 is configured to decode 120 a coefficient block 122 from a data stream 14 for a predetermined transform block by decoding 400 a significance flag indicating whether the current coefficient is zero using a context 300 for a current coefficient, the context 300 depending 310 on the number of non-zero coefficients in a first coefficient set if the selected transform 112 is an identity transform, and depending 320 on the number of non-zero coefficients in a second coefficient set, the value of the second coefficient set and the position of the current coefficient if the selected transform 112 is one of the at least one non-identity transforms, the first coefficient set being adjacent to the current coefficient, the second coefficient set comprising the first coefficient set and coefficients further away from the current coefficient than the first coefficient set. In addition, the apparatus 100 is configured to derive a residual sample array of a predetermined transform block from the coefficient block 122, such that the coefficient block is related to the residual sample array according to the selected transform, and use the residual sample array to correct the prediction of the predetermined transform block to reconstruct the predetermined transform block. The apparatus can be used with Fig.10 The device shown in FIG. 1 is similar to that shown in FIG. 1 , except that the decoding 120 of the c block is as follows: Fig.15 Execute as shown in .

[0242] According to an embodiment, the apparatus 100 is configured to decode a predetermined coefficient by context-adaptively entropy decoding N greater than X flags and decoding a remaining portion indicating an amount by which an absolute value of the predetermined coefficient exceeds an absolute threshold by using a variable length code, the greater than X flag indicating whether the absolute value of the predetermined coefficient is greater than X, the absolute threshold depending on N, wherein N is greater when the selected transform is an identity transform than when the selected transform is one of the at least one non-identity transforms.

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

[0244] 5. abs_remainder encoding: Although the empirical distribution of absolute levels generally still conforms to a Laplace or geometric distribution, there is more non-stationarity than in the transformed coefficients. Specifically, the variance within consecutive realization windows is higher than in the conventional case. This motivates the following modifications to the abs_remainder grammar binarization and context modeling:

[0245] a. Using higher cutoff values ​​in binarization, i.e. the transition point from coding with sig_coeff_flag, abs_level_gt1_flag, par_level_flag and abs_level_gt3_flag to Rice coding with abs_remainder, and dedicated context models for each bin position yields higher compression efficiency. (compare Fig.16 ) Increasing the cutoff value will result in more "greater than X" marks, for example by introducing abs_level_gt5_flag, abs_level_gt7_flag Wait until a cutoff value is reached (numGtXFlags). The cutoff value itself can be fixed for all transform block sizes, or fixed depending on the transform block size, or adaptively selected depending on the already coded transform blocks, or signaled in a high-level syntax structure within the bitstream (e.g. at sequence, picture, slice or tile level).

[0246] b. The number of binary bins for context encoding that specifies whether the absolute level is greater than a threshold is fixed or adaptive. Each binary bin index uses a dedicated context model.

[0247] c. The template used for Rice parameter derivation is modified, that is, only the neighbors to the left and below the current scanning position are considered to be similar to the local template modeled by the sig_coeff_flag context.

[0248] 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 predetermined transform block, a selected transform from a predetermined transform list, the selected transform including an identity transform and at least one non-identity transform. In addition, the apparatus 100 is configured to decode 120 a coefficient block 122 from a data stream 14 for the predetermined transform block by context-adaptive entropy decoding 500 of N greater than X flags and decoding the remaining portion indicating the amount by which the absolute value of the predetermined coefficient exceeds an absolute threshold by using variable length code decoding 600, the greater than X flag indicating whether the absolute value of the predetermined coefficient is greater than N, the absolute threshold depending on N, wherein N is greater in the case where the selected transform is an identity transform than in the case where the selected transform is one of the at least one non-identity transform. In addition, the apparatus is configured to derive a residual sample array of the predetermined transform block from the coefficient block, such that the coefficient block is related to the residual sample array according to the selected transform, and use the residual sample array to correct the prediction of the predetermined transform block to reconstruct the predetermined transform block. The apparatus can be used with Fig.10 The device shown in FIG. 1 is similar to that shown in FIG. 1 , except that the decoding 120 of the c block is as follows: Fig.16 Execute as shown in .

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

[0250] According to an embodiment, the variable length code is a Rice code, and the device 100 is configured to determine the Rice parameters of the Rice code depending on the following items: if the selected transform is an identity transform, then depending on a first set of coefficients adjacent to the predetermined coefficient, and if the selected transform is one of at least one non-identity transform, then depending on a second set of coefficients, the second set of coefficients including the first set of coefficients and coefficients that are farther away from the predetermined coefficients than the first set of coefficients.

[0251] According to an embodiment, the apparatus 100 is configured to decode the symbols of the predetermined coefficients by decoding the symbols of the predetermined coefficients using context adaptive entropy decoding of a predetermined context and updating the probability associated with the predetermined context if the selected transform is an identity transform, and to decode the symbols of the predetermined coefficients 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.

[0252] 6. coeff_sign_flag context modeling:Due to the instability within the symbol sequence and the fact that intra prediction is often biased, a context model can be used to encode the symbol even if the global empirical distribution is almost uniform. A single dedicated context model can be used for the encoding of the symbol. Alternatively, the context model can depend on the symbols of the neighbors evaluated using local templates. Another alternative is to use a fixed context model for the current subblock, where the context offsets are derived using neighboring subblocks and their symbol flags. The symbol is encoded using the context model instead of using the bypass mode of the entropy encoder. (compare Fig.17 )

[0253] According to an embodiment, an apparatus 100 for decoding a picture using predictive coding and block-based transform residual coding is configured to select a selected transform from a predetermined transform list for a predetermined transform block, the selected transform including an identity transform and at least one non-identity transform. In addition, the apparatus 100 is configured to decode 120 a coefficient block 122 from a data stream 14 for a predetermined transform block by decoding the sign of a predetermined coefficient. The apparatus 100 is configured to, when decoding the sign of the predetermined coefficient, if the selected transform 112 is an identity transform, perform context adaptive entropy decoding using a predetermined context 710 (e.g., select the context depending on the sign of the coefficient in the field of the predetermined coefficient in the coefficient block) and update the probability associated with the predetermined context 710, and if the selected transform 112 is one of the at least one non-identity transform, use bypass decoding (e.g., context adaptive entropy decoding with fixed equal probability). In addition, the apparatus is configured to derive a residual sample array of a predetermined transform block from the coefficient block, such that the coefficient block is related to the residual sample array according to the selected transform, and use the residual sample array to correct the prediction of the predetermined transform block to reconstruct the predetermined transform block. The apparatus can be used with Fig.10 The device shown in FIG. 1 is similar to that shown in FIG. 1 , except that the decoding 120 of the c block is as follows: Fig.17 Execute as shown in .

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

[0255] 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 in non-zero coefficients within previously decoded coefficients if the selected transform is an identity transform.

[0256] According to an embodiment, the apparatus 100 is configured to set the number of context models among the plurality of context models to a default number.

[0257] According to an embodiment, the apparatus 100 is configured to derive the number of context models from a plurality of context models from a data stream.

[0258] According to an embodiment, the device 100 is configured to associate a context model with adjacent and non-overlapping relative frequency intervals of positive or negative relative frequencies, and perform selection so that the positive or negative relative frequencies in the non-zero coefficients of the previously decoded coefficients fall into the relative frequency interval associated with a predetermined context model.

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

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

[0261] According to an embodiment, the device 100 is configured to, if the selected transform is an identity transform, entropy decode symbols of a non-zero coefficient subset in a predetermined transform block that is located in a subblock of a coefficient block and includes non-zero predetermined coefficients using a predetermined context model, update statistics using the symbols of the non-zero coefficient subset of the predetermined transform block to obtain updated statistics, select another predetermined context model from a plurality of context models based on the updated statistics, and entropy decode symbols of another non-zero coefficient subset in another subblock of the coefficient block in the predetermined transform block using the other predetermined context model.

[0262] According to an embodiment, the apparatus 100 is configured to update a symbol probability associated with a predetermined context model based on the sign of a predetermined non-zero coefficient if the selected transform is an identity transform.

[0263] According to an embodiment, a device 100, wherein a plurality of context models are subdivided into a plurality of context model sets, and the device is configured to perform selection by selecting a predetermined context model set based on statistics of signs of previously decoded coefficients, and if the selected transform is an identity transform, perform selection by selecting a predetermined context model from the selected context model set based on signs of one or more adjacent non-zero coefficients (e.g., non-zero coefficients located at and surrounding template positions at corresponding symbols).

[0264] 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 pass sequence by sequentially context adaptive entropy decoding the N greater than X flags, wherein X is increased with one or more of the N greater than X flags in each pass, and the number of flags encoded using context adaptive entropy decoding is recorded during the pass sequence, and context adaptive entropy decoding of the N greater than X flags is stopped if the number exceeds a predetermined flag threshold. In addition, the apparatus 100 is configured to, if the selected transform is an identity transform, sequentially perform context adaptive entropy decoding of N greater than X flags, and after decoding a significance flag (X=0) among the N greater than X flags and before decoding another N greater than X flags among the N greater than X flags, decode a greater than X flag bypass flag indicating whether a predetermined coefficient is greater than an absolute threshold, and, if the greater than X flag bypass flag indicates that the predetermined coefficient is greater than the absolute threshold, stop the context adaptive entropy decoding of the N greater than X flags corresponding to the other greater than X flags (e.g., and, if the greater than X flag bypass flag indicates that the predetermined coefficient is not greater than the absolute threshold, resume the context adaptive entropy decoding of the N greater than X flags relative to the other greater than X flags except for the last one of the N greater than X flags).

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

[0266] a. CCB reduction can be guaranteed by specifying modes with CCB>k as invalid, where k is a positive integer. Note that for the conventional horizontal coding mode currently developed by VVC, k=2. This restriction is equivalent to a reduction in quantization space.

[0267] b. To avoid this limitation, an additional flag may be signaled after the sig_coeff_flag syntax, specifying whether the absolute level is greater than a threshold that can be implemented with CCBs. For example, the number of additional greater than flags is set equal to four (numGtXFlags = 5), resulting in eight 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 may be signaled with CCBs is equal to 9. The horizontal limit flag then indicates that the current absolute level is greater than 9, so the number of CCBs can be reduced for the transform block. Note that such a concept may only apply to TSM and not to transform blocks that are conventionally transformed and quantized. (Compare Fig.18 )

[0268] According to an embodiment, an apparatus 100 for decoding a picture using predictive coding and block-based transform residual coding is configured to select a selected transform 112 from a predetermined transform list for a predetermined transform block, wherein the selected transform 112 includes an identity transform and at least one non-identity transform. In addition, the apparatus 100 is configured to decode 120 a coefficient block 122 of a predetermined transform block from a data stream by decoding predetermined coefficients. The apparatus 100 is configured to decode 800 N greater than X flags (e.g., N gtX_flags, such as N gtX_flags) when decoding the predetermined coefficients. Fig.18gt1_flag, gt2_flag, etc. in , and decode the remaining part 810 indicating the amount by which the absolute value of the predetermined coefficient exceeds an absolute threshold using a variable length code, the absolute threshold depending on N. The apparatus 100 is configured to, when decoding the predetermined coefficient, if the selected transform is one of at least one non-identity transform, perform context adaptive entropy decoding 800 of N flags greater than X in a sequence of passes 8201 to 8203 by sequentially 830 context adaptive entropy decoding 800 of N flags greater than X, wherein X is increased in each pass with one or more of the N flags greater than X, and the number of flags encoded using context adaptive entropy decoding 832 is recorded during the pass sequence 830, and if the number 832 exceeds a predetermined flag threshold 834, the context adaptive entropy decoding 800 of the N flags greater than X is stopped; and if the selected transform is an identity transform (e.g., TSM=transform skip mode), sequentially perform context adaptive entropy decoding 800 of the N flags greater than X. The following adaptive entropy decoding 800, and after decoding a significance flag 840 (X=0) among the N greater than X flags and before decoding another N greater than X flags (such as gt1_flag) among the N greater than X flags, decoding a greater than X flag bypass flag 850 indicating whether a predetermined coefficient is greater than an absolute threshold, and in the case 852 where the greater than X flag bypass flag 850 indicates that the predetermined coefficient is greater than the absolute threshold, stopping the context adaptive entropy decoding of the N greater than X flags relative to the other greater than X flags (and, for example, in the case 854 where the greater than X flag bypass flag indicates that the predetermined coefficient is not greater than the absolute threshold, resuming the context adaptive entropy decoding of the N greater than X flags relative to the other greater than X flags except the last one of the N greater than X flags). In addition, the apparatus 100 is configured to derive a residual sample array of a predetermined transform block from a coefficient block, so that the coefficient block is related to the residual sample array according to a selected transform, and use the residual sample array to correct the prediction of the predetermined transform block to reconstruct the predetermined transform block. Fig.18 An example of decoding a coefficient block in multiple (at least two) passes or scans is shown. Fig.18 In the illustrated embodiment, if the selected transform 112 is a non-identity transform, only sig_flag, parity_flag, and gt1_flag are decoded in the first scan, and all remaining gtX_flags are decoded in the second to Nth scans. Alternatively, if the selected transform is an identity transform, gtX_bypass_flag 850 indicates whether gtX_flag must be decoded, or whether decoding of gtX_flag can be skipped and only the remaining portions need to be decoded.

[0269] c. Since a large number of binary bins using the normal mode of the entropy encoder represents a challenge in hardware architecture implementation, it is beneficial to limit this number. One approach is bitstream limiting, i.e., coding decisions that result in some context-coded binary bins being larger than a certain threshold are invalid, so that a conforming decoder can expect a maximum number of context-coded binary bins given a conforming bitstream. Alternatively, the number of context-coded binary bins is tracked for each transform block. Within the processing of the transform block, when the limit is reached, a bypass mode is used to send all remaining horizontal information without modifying the binarization or with modifying the binarization (compare Fig. 20 ). In the latter configuration, each absolute level is binarized using a combination of Rice / Exponential Golomb codes, i.e. the unary part is truncated and no longer participates in the binarization process.

[0270] According to an embodiment, the apparatus 100 is configured to decode a picture using predictive coding and block-based transform residual coding, and for a predetermined transform block, a selected transform is selected from a predetermined transform list, the predetermined transform list comprising an identity transform and at least one non-identity transform. In addition, the apparatus 100 is configured to decode a coefficient block from a data stream for a predetermined transform block by decoding one or more predetermined flags using context binary entropy decoding in a pass sequence for each coefficient, the pass traversing the coefficients of the block, the predetermined flags such as Fig. 20 92, par_flag 96 (parity_flag), gt1_flag 98 (greater than X flag for X=1) and / or gt2_flag 104 (greater than X flag for X=2) and / or parity check flags and / or further greater than X flags, each predetermined flag reduces the absolute value range 90 of the corresponding coefficient (e.g., the parity check bit 96 reduces the absolute value range 90 to half by excluding every even or even value, and the greater than X flags, such as gt1_flag 98 and gt2_flag 104, reduce the possible absolute value range 90 by excluding one of the possible absolute values ​​or retaining only the possible absolute values ​​and excluding all other absolute values), and the absolute value of the corresponding coefficient is located in the absolute value range 90 (e.g., the absolute value range starts from the beginning of one or more paths, for example, from coefficients 0...2 in the case of X bit representation). X-1In addition, the apparatus 100 is configured to decode a coefficient block from the data stream for a predetermined transform block by decoding a variable length code codeword (e.g., Rice code / Exponential Golomb code) for each coefficient whose cardinality of the absolute value field 90 is not reduced to 1 by one or more predetermined flags 92, 96, 98, 104 decoded for the corresponding coefficient in a sequence of passes, the pass traversing the coefficients of the block, the variable length code codeword indicating the absolute value of the corresponding coefficient within the absolute value field 90 of the corresponding coefficient (e.g., the code length of the variable length code may increase monotonically with increasing absolute value, see 8701 to 8705). The apparatus 100 is configured to derive a residual sample array of a predefined transform block from the coefficient block, such that the coefficient block is associated with the residual sample array according to the selected transform, and use the residual sample array to correct the prediction of the predefined transform block to reconstruct the predefined transform block. Furthermore, the apparatus is configured to stop decoding the one or more predetermined markers 92, 96, 98, 104 once a predetermined number of predetermined markers 92, 96, 98, 104 has been reached (i.e., the total number of predetermined markers decoded so far for all coefficients has reached a limit) when decoding the one or more predetermined markers 92, 96, 98, 104 in the pass sequence, so that the absolute value range for the first set of non-zero coefficients has a smaller cardinality than the second set of non-zero coefficients, and the pointer points to an absolute value within the absolute value range (i.e., the cardinality is smaller for coefficients before reaching the limit in the last pass than for coefficients after reaching the limit), and the apparatus is configured to use different variable length codes for the variable length code words for the first set of non-zero coefficients and the second set of non-zero coefficients. (See Fig. 20 )

[0271] To illustrate the concept just outlined for limiting the number of context adaptive encoding / decoding flags, refer to Fig. 20 . Fig. 20 At 90, an initial value range of the absolute value range of the quantization index for the transform coefficients is illustrated. The initial value range may contain all integer values ​​between zero and some maximum value. The initial value range may also be an interval open to larger numbers. The number of integer values ​​in the initial value range 90 does not necessarily have to be a power of 2. In addition, Fig. 20 The various flag types that participate in representing (i.e., participate in indicating the absolute value of) each quantization index are shown. There is a sig_flag type that indicates whether the absolute value of a certain quantization index is zero. That is, sig_flag 92 divides the initial value range 90 into two sub-parts, one containing only zeros and the other containing all other possible values. That is, if the absolute value of the quantization index happens to be zero, then sig_flag has uniquely indicated the absolute value of the quantization index, such as Fig.14As shown at the bottom of the figure. The non-zero values ​​of the initial value range 90 form a value range 94, which is further divided into odd values ​​on the one hand and even values ​​on the other hand by the flag type par_flag. Only when a certain quantization index is non-zero, a par_flag 96 needs to be provided for a certain quantization index. It does not produce uniqueness with respect to one of the two halves into which the value range 94 is divided by par_flag 96. It indicates one half as the next result (recursively defined) value range, and therefore the next flag (i.e. gt1_flag 98) further divides this result value range into two after par_flag, i.e. an odd non-zero value 100 in the case of an odd value of the quantization index, and an even non-zero value 102 in the case of an even non-zero value of the quantization index. In particular, the division by gt1_flag 98 is performed in such a way that one part only includes the smallest odd value of the value range 100 or the smallest non-zero even value of the domain 102, respectively. The other part includes all other values ​​of the corresponding domain 100 / 102. The remaining value range is further divided into two parts in the same way by the flag gt2_flag 104, that is, the minimum value represents one part and the other values ​​represent the other part. Fig. 20 As shown at the bottom of , this means that if the latter remainder value range happens to be zero, only sig_flag 92 is encoded for the quantization index of a certain transform coefficient, and if the latter remainder value range happens to fall into the value interval 106 consisting of absolute values ​​1 and 2, sig_flag 92, par_flag 96 and gt1_flag 98 are encoded to indicate a certain quantization index of a certain transform coefficient, and if the latter remainder value range happens to fall into the immediately following value interval 108 including values ​​3 and 4, all flags 92, 96, 98 and 104 are encoded to indicate the absolute value of the quantization index of a certain transform coefficient, and the remainder is additionally encoded for the quantization index of the transform coefficient in the remainder interval 110 whose absolute value is outside the initial value range 90. For example, flags of flag types 92, 96 and 98 are encoded in the first pass. For example, flag 104 is encoded in the second pass. These flags are encoded using context adaptive arithmetic coding. However, the number of flags encoded in the pass may be limited and subject to, for example, restrictions on the quantization index of the transform coefficient. Fig.18The flags of flag types 92, 96 and 98 are encoded along the sequence 85 for the currently accessed transform coefficient position within the first pass only if all three flag types can still be encoded in the pass 601, and the total number of encoded flags in the pass 601 does not exceed the maximum allowed number of flags to be encoded / decoded in the pass 8201. Similarly, for example, the flag of flag type 104 is encoded along the sequence 85 for the currently accessed transform coefficient position within the second pass 8202 only if flag type 104 can still be encoded in the pass 602, and the total number of encoded flags 834 in the pass 8202 does not exceed the maximum allowed number 834 of flags to be encoded / decoded in the pass 8202.

[0272] According to an embodiment, the different variable length codes of the variable length code codewords for the first set of non-zero coefficients and the second set of non-zero coefficients differ in: the binarization boundary (cutoff value) between the transition from the unary part to the Rice part and the exponential Golomb part and / or the binarization parameters of the general binarization scheme.

[0273] According to an embodiment, different variable length codes of the variable length code codewords for the first set of non-zero coefficients and the second set of non-zero coefficients differ in that: the binarization boundaries (cutoff values) between the transitions from the unary part to the Rice part and the exponential Golomb part and / or the dependence of the binarization parameters of the general binarization scheme on previously decoded coefficients are different.

[0274] 8. Scan pass: The order of transmission of syntax elements can be changed. Although it is usually beneficial to encode all bypass coded binary bins of a subblock consecutively. There are several possibilities to organize the conventionally coded binary bins in one or more scan passes. In one version of the invention, all conventionally coded binary bins (including the coeff_sign_flag flag) are encoded in one scan pass and all bypass coded binary bins are encoded in a second scan pass. In another version, the conventionally coded binary bins are transmitted in multiple scan passes. For example, the binary bin sig_coeff_flag, abs_level_gt1_flag / abs_level_gtX_flag(0) and par_level_flag are encoded 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 encoded in the second scan pass, and the coeff_sign_flag flag is encoded in the third scan pass (in addition, all bypass-coded abs_remainder syntax elements are encoded 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 (similarly, 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 encoded in the first scan pass; each additional gtX 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) are encoded in a separate scan pass, and the co_eff_flag flag is encoded in another separate scan pass (similarly, all bypass-coded abs_remainder syntax elements are encoded in separate passes). (Compare. Fig.19 )

[0275] According to an embodiment, an apparatus 100 for decoding a picture using predictive coding and block-based transform residual coding is configured to select a selected transform 112 from a predetermined transform list for a predetermined transform block, the selected transform comprising an identity transform and at least one non-identity transform. In addition, the apparatus 100 is configured to decode 120 a coefficient block 122 from a data stream 14 for a predetermined transform block in a pass sequence by context-adaptively entropy decoding N greater than X flags for a predetermined coefficient, and decoding the remaining portion indicating the amount by which the absolute value of the predetermined coefficient exceeds an absolute threshold by using a variable length code, and decoding the sign of the predetermined coefficient, the pass traverses the coefficients of the block, the greater than X flag indicating whether the absolute value of the predetermined coefficient is greater than X, the absolute threshold depending on N, wherein the apparatus is configured to depend on whether the selected transform is an identity transform or one of the at least one non-identity transforms (e.g., see Fig.19 ), distributing the codes of N greater than X signs, remainders and signs differently on the pass sequence. In addition, the apparatus 100 is configured to derive a residual sample array of a predetermined transform block from the coefficient block, so that the coefficient block is associated with the residual sample array according to the selected transform, and use the residual sample array to correct the prediction of the predetermined transform block to reconstruct the predetermined transform block.

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

[0277] In other words, the apparatus 100 for decoding a picture using predictive coding and block-based transform residual coding is configured to select a selected transform from a predetermined transform list for a predetermined transform block, the selected transform comprising an identity transform and at least one non-identity transform. In addition, the apparatus is configured to, if the selected transform is a non-identity transform, perform the following steps along a first scanning order (e.g., Fig.13b 85, to decode the coefficients of the coefficient block from the data stream for a predetermined transform block, the first scanning order leading to the DC coefficient of the non-identity transform (e.g., starting from the highest frequency coefficient, possibly starting from the "last" significant coefficient position), to decode the coefficient block from the data stream for a predetermined transform block. In addition, the apparatus is configured to decode the coefficient block from the data stream by following the second scanning order (e.g., Fig.13a The apparatus 100 is further configured to decode the coefficients of the coefficient block from the data stream for a predetermined transform block by decoding the coefficients of the coefficient block from the data stream in a scanning order 85 shown in the figure, the second scanning order leading from the upper left sample position to the lower right sample position. In addition, the apparatus 100 is configured to derive a residual sample array of the predefined transform block from the coefficient block, such that the coefficient block is associated with the residual sample array according to the selected transform (in the case of an identity transform, this step may include adding the coefficients in the block located on a predetermined side to each coefficient, for example in the case of horizontal DPCM, the predetermined side is the left-hand side, or in the case of vertical DPCM, the predetermined side is the top of the corresponding pixel in order to perform DPCM inversion), and to use the residual sample array to correct the prediction of the predefined transform block to reconstruct the predefined transform block.

[0278] According to an embodiment, the apparatus 100 is configured to select a second scanning order according to the DPCM direction used by the predetermined transform block to be encoded, for example, in the case of horizontal DPCM, the DPCM direction is horizontal raster scanning, and in the case of vertical DPCM, the DPCM direction is vertical raster scanning.

[0279] Encoding of symbolic syntax elements in TSM

[0280] For a conventionally transformed residual signal, the expected value for the level is predominantly zero, i.e. the absolute levels are statistically distributed around a value equal to zero. Therefore, the symbol values ​​are transmitted in a bypass mode of the entropy encoder using an adaptive context model, since the probabilities are uniformly distributed. The levels in the TSM tend to have the same deviation for a given area compared to what is observed for the content captured by the camera, i.e. they are locally deviated, while the expected value may be equal to the zero value, similar to the case of the content captured by the camera. Therefore, it is beneficial to encode the symbol information using a context model for an entropy coding engine employing adaptive context modeling. The context model selection for encoding the symbol values ​​can be designed locally, for example, using local templates that evaluate neighboring spatial positions. The present invention describes another stage that can be combined with the existing context modeling of symbol values ​​in the TSM mode or in a mode where the transform characteristics are not suitable.

[0281] Forward Adaptive Configuration

[0282] When using a context model to encode symbol values, the theoretical minimum codeword length may be shorter due to the actual design of the entropy coding engine, or in other words, the minimum codeword length is limited by the implementation of the entropy coding engine. One solution is to send an additional syntax element in the bitstream that indicates whether all symbols in a region have the same value. (Compare Fig. 22 ) Several configurations are possible and may be combined depending on additional data such as block size and / or operating point. The configuration of regions may be per subblock, or per transform block, or a combination of both. In all three cases, the regions may be fixed. Alternatively, the region configuration is adaptive, e.g. depending on the number of consecutive scan positions within a transform block and statistics occurring within the adaptation region and / or with respect to a previous region in the same subblock, transform block and / or coding unit.

[0283] According to an embodiment, the apparatus 100 is used for decoding a picture using predictive coding and block-based transform residual coding, and is configured to select a selected transform 112 from a predetermined transform list for a predefined transform block, the predetermined transform list comprising an identity transform and at least one non-identity transform. In addition, the apparatus 100 is configured to decode 120 a coefficient block from the data stream for a predetermined transform block by: if the selected transform is one of the at least one non-identity transform 1231, decoding 900 a syntax element from the data stream 14, deriving from the syntax element whether the signs of the non-zero coefficients within the predetermined non-zero coefficient group are equal to each other 910 or unequal to each other 920, if they are equal to each other 910, deriving 930 the signs of the non-zero coefficients within the predetermined non-zero coefficient group, and if they are unequal to each other 920, decoding 940 the signs of the non-zero coefficients within the predetermined non-zero coefficient group by decoding the sign bit on a per-non-zero coefficient basis. In addition, the device 100 is configured to decode the coefficient block from the data stream for the predetermined transform block by: if the selected transform is the identity transform 1232, decoding the sign of the non-zero coefficients within the predetermined non-zero coefficient group by decoding the sign bit on a per-non-zero coefficient basis, regardless of whether the signs of the non-zero coefficients within the predetermined non-zero coefficient group are equal to each other. In addition, the device 100 is configured to derive a residual sample array of the predetermined transform block from the coefficient block, so that the coefficient block is related to the residual sample array according to the selected transform, and use the residual sample array to correct the prediction of the predetermined transform block to reconstruct the predetermined transform block. (See Fig. 22 )

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

[0285] According to an embodiment, the apparatus 100 is configured to decode another syntax element from the data stream if the selected transform is one of at least one non-identity transform, derive whether the signs of the non-zero coefficients in another predetermined non-zero coefficient group are equal to each other based on the another syntax element, derive the signs of the non-zero coefficients in another predetermined non-zero coefficient group if they are equal to each other, and decode the signs of the non-zero coefficients in another predetermined non-zero coefficient group by decoding the additional sign bit on a per-non-zero coefficient basis if the signs of the non-zero coefficients in another predetermined non-zero coefficient group are not equal to each other. In addition, the apparatus 100 is configured to group the non-zero coefficients of the coefficient block into a plurality of non-zero coefficient groups, the plurality of non-zero coefficient groups comprising a non-zero coefficient group and another non-zero coefficient group.

[0286] According to an embodiment, the apparatus 100 is configured to subdivide a coefficient block into sub-blocks such that each group of non-zero coefficients only includes non-zero coefficients located in one of the sub-blocks.

[0287] According to an embodiment, the apparatus 100 is configured to adjust the subdivision relative to the size of the predetermined subblock based on the signs of one or more non-zero coefficients in one or more subblocks that precede the predetermined subblock in the subblock decoding order. Additionally or alternatively, the apparatus 100 is configured to adjust the subdivision based on the signs of previously decoded non-zero coefficients.

[0288] According to an embodiment, the apparatus 100 is configured to determine a predetermined non-zero coefficient group so as to include all non-zero coefficients within a coefficient block.

[0289] According to an embodiment, the apparatus 100 is configured to, if the selected transform is one of at least one non-identical transform, decode a block global syntax element from a data stream, derive whether the signs of all non-zero coefficients in a predetermined transform block are equal to each other based on the block global syntax element, derive the signs of all non-zero coefficients in the predetermined transform block if they are equal to each other, and perform decoding of syntax elements from the data stream if the signs of all non-zero coefficients in the predetermined transform block are not equal to each other.

[0290] For the case where the condition is not met, i.e. when the symbol information does not have the same value, the additional syntax element introduces overhead. Assuming that only one value in the set of symbol values ​​is different from the rest, the configuration using additional syntax elements becomes inefficient. An alternative forward adaptive signaling is the trend index. When the trend index is signaled, the decoder uses a specific set of context models (compare Fig.23 ). The scale, i.e., the number of trend indices, may be fixed or adaptive, and the scale may be signaled in a bitstream header such as a slice header or a sequence parameter set and / or in a picture parameter set. An exemplary configuration may specify three trend indices, where a first trend index indicates a high probability of a positive symbol value, a second trend index indicates a high probability of a negative symbol value, and a last trend index indicates an uncertain case. Likewise, the trend index may be signaled for each sub-block, or for each transform block, or a combination of both. In contrast to a syntax element indicating that all symbols within a region have the same value, the trend index may be signaled at a higher level, such as a coding unit, and / or a slice header, and / or a picture parameter set, and / or a sequence parameter set.

[0291] According to an embodiment, the apparatus 100 for decoding a picture using prediction coding and block-based transform residual coding is configured to select a selected transform 112 from a predetermined transform list for a predetermined transform block, wherein the selected transform includes an identity transform and at least one non-identity transform. In addition, the device 100 is configured to decode 120 a coefficient block from the data stream 14 for a predefined transform block by the following operations: if the selected transform 112 is an identity transform 1232, the symbols of the non-zero coefficients of the predetermined coefficient block are decoded 1000 by deriving 1100 a symbol probability trend index from the data stream 14 and entropy decoding 1110 a symbol of a predetermined non-zero coefficient (e.g., the first one in the decoding order or a non-zero coefficient within a sub-block in the coefficient block to which the index is applied) using a context model associated with the symbol probability trend index (a context model that defines a certain symbol probability (e.g., a positive probability)); and if the selected transform is one of at least one non-identity transform 1231, the symbols of the non-zero coefficients of the predetermined coefficient block are decoded 1000 by bypass decoding 1200 (e.g., context adaptive entropy decoding with fixed equal probability) the symbols of the predetermined non-zero coefficients. In addition, the apparatus 100 is configured to derive a residual sample array of a predetermined transform block from the coefficient block, so that the coefficient block is related to the residual sample array according to the selected transform, and use the residual sample array to correct the prediction of the predetermined transform block to reconstruct the predetermined transform block. (See Fig.23 )

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

[0293] According to an embodiment, the apparatus 100 is configured to update a symbol probability associated with a context model associated with a symbol probability trend index based on the sign of a predetermined non-zero coefficient if the selected transform is an identity transform.

[0294] According to an embodiment, multiple context models are associated with a symbol probability trend index, and the device is configured to, if the selected transform is an identity transform, entropy decode each symbol of the non-zero coefficient using a predetermined context model from the multiple context models associated with the symbol probability trend index, and select a predetermined context model from the multiple context models associated with the symbol probability trend index based on the symbols of one or more adjacent non-zero coefficients (e.g., non-zero coefficients at template positions located at and around the corresponding symbol); and if the selected transform is one of at least one non-identity transform, bypass decode the symbols of all predetermined non-zero coefficients (e.g., context adaptive entropy decoding with fixed equal probability).

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

[0296] According to an embodiment, a symbol probability trend index is signaled in a data stream specifically for the following items: a subblock where a predetermined non-zero coefficient is located within a coefficient block, a predetermined transform block, a coding block containing a predetermined transform block, a picture slice containing a predetermined transform block, a picture, or a picture sequence containing a picture.

[0297] According to an embodiment, the device 100 is configured to: read from a data stream information about which context model set among different context model sets having different cardinalities (three in the case of the example given in the description) is to be applied to a symbol probability trend index, wherein the symbol probabilities associated with the context models are more densely distributed within a first context model set than within a second context model set, the cardinality of the second context model set being smaller than the cardinality of the first context model set, and select a context model by using the symbol probability trend index as a pointer to the context model set to be applied to the symbol probability trend index.

[0298] According to an embodiment, the symbol probability trend index is signaled in the data stream specifically for: a picture slice, a picture, or a picture sequence comprising a picture containing a predetermined transform block.

[0299] Backward Adaptive Configuration

[0300] Compared to the forward adaptive configuration, the backward adaptive method does not require additional syntax elements in the bitstream. Since the symbol values ​​in TSM are locally biased, the context modeling can take into account local statistics, such as the number of positive or negative symbol values ​​relative to the total number of symbol syntax elements. (Compare Fig.24) Specifically, the relative number of relationships can be derived, and different context model sets can be selected when a specific threshold is met. This threshold configuration can be symmetric or asymmetric. For example, a configuration can use three context model sets, the first context model set is applicable to the case of high probability of positive signs, the second context model set is applicable to the case of high probability of negative signs, and the last context model set represents the uncertain case. For a symmetric configuration, the first context model set or the second context model set is selected when the ratio is lower than the value b0=x or higher than the value b1=(1-x) (where x is the ratio). For an asymmetric configuration, the values ​​b0 and b1 are not related by another variable given in the symmetric configuration. In addition, the number of thresholds b and their values ​​can be fixed or adaptive. The specific configuration of this information can be signaled at the coding unit level, slice level, etc.

[0301] According to an embodiment, the apparatus 100 is used to decode a picture using predictive coding and block-based transform residual coding, and is configured to select a selected transform from a predetermined transform list for a predefined transform block, the predetermined transform list including an identity transform and at least one non-identity transform. In addition, the apparatus 100 is configured to decode 10001 the signs of non-zero coefficients of a predetermined coefficient block by the following operations if the selected transform is an identity transform 1232, so as to decode 120 a coefficient block from a data stream 14 for a predetermined transform block: using a predetermined context model 1300 from a plurality of context models to decode the signs of the predetermined non-zero coefficients, and selecting 1310 the predetermined context model 1300 from a plurality of context models based on statistics 1400 of the signs of previously decoded coefficients. Furthermore, the apparatus 100 is configured to decode 10002 the signs of the non-zero coefficients of the predetermined coefficient block by bypass decoding (e.g., context adaptive entropy decoding with fixed equal probability) the signs of the predetermined non-zero coefficients if the selected transform is one of at least one non-identical transform 1231, so as to decode 120 the coefficient block from the data stream for the predetermined transform block. In addition, the apparatus is configured to derive a residual sample array of the predetermined transform block from the coefficient block, so that the coefficient block is associated with the residual sample array according to the selected transform, and to use the residual sample array to correct the prediction of the predetermined transform block to reconstruct the predetermined transform block. (See Fig.24 )

[0302] According to an embodiment, the apparatus 100 is configured to select a predetermined context model according to a relative frequency of positive or negative signs in non-zero coefficients within previously decoded coefficients if the selected transform is an identity transform.

[0303] According to an embodiment, the apparatus 100 is configured to set the number of context models in the plurality of context models to a default number.

[0304] According to an embodiment, the apparatus 100 is configured to derive the number of context models from a plurality of context models from a data stream.

[0305] According to an embodiment, the device 100 is configured to associate a context model with mutually adjacent and non-overlapping relative frequency intervals for relative frequencies of positive or negative signs, and perform selection so that the relative frequencies of positive or negative signs in non-zero coefficients of previously decoded coefficients fall into the relative frequency interval associated with a predetermined context model.

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

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

[0308] According to an embodiment, the device 100 is configured to, if the selected transform is an identity transform, entropy decode symbols of a non-zero coefficient subset in a predetermined transform block that is located in a subblock of a coefficient block and includes non-zero predetermined coefficients using a predetermined context model, update statistics using the symbols of the non-zero coefficient subset of the predetermined transform block to obtain updated statistics, select another predetermined context model from a plurality of context models based on the updated statistics, and entropy decode symbols of another non-zero coefficient subset in another subblock of the coefficient block in the predetermined transform block using the other predetermined context model.

[0309] According to an embodiment, the apparatus 100 is configured to update a symbol probability associated with a predetermined context model based on the sign of a predetermined non-zero coefficient if the selected transform is an identity transform.

[0310] According to an embodiment, multiple context models are subdivided into context model sets, and the device is configured to select a predetermined context model set based on statistics of signs of previously decoded coefficients, and if the selected transform is an identity transform, a predetermined context model is selected from the selected context model set based on signs of one or more adjacent non-zero coefficients (e.g., those non-zero coefficients located at corresponding symbols and at positions that should conform to a surrounding template).

[0311] Combination of forward and backward adaptive configurations

[0312] Any combination of the forward and backward adaptation configurations described in the present invention is possible because they do not overlap, i.e., there are no conflicts in the context model set selection rules. For example, the combination of the trend index with the backward adaptation method produces a configuration such that the initial context model set is derived using the trend index and updated according to the backward adaptation method.

[0313] Preferred Embodiments

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

[0315] In another preferred embodiment of the present invention, the limitation on the number of context-coded binary bins is achieved by switching to the bypass mode of entropy coding and setting the first binarization boundary to zero, i.e. the resulting binarization is only a combination of Rice code and exponential Golomb code (compare Fig. 20 ).

[0316] In another preferred embodiment of the invention, the limitation on the number of context-coded binary bins is achieved by switching to a bypass mode of the entropy coding and using a dedicated binarization scheme, such as Rice codes only (compare Fig. 20 ).

[0317] In yet another preferred embodiment of the present invention, when switching to the bypass mode, the parameter derivation for selecting a specific Rice code among all Rice codes or for selecting an Exponential Golomb code among all Exponential Golomb codes is modified.

[0318] In another preferred embodiment of the present invention, the limitation of the number of context-coded binary bins is achieved by switching to a bypass mode of entropy coding while still using the context model to encode the salient information. In this configuration, the switching point must also be determined by considering the remaining number of scan positions.

[0319] In other words, the apparatus 100 is used to decode a picture using predictive coding and block-based transform residual coding, and can be configured to select a selected transform from a predetermined transform list for a predefined transform block, the selected transform including an identity transform and at least one non-identity transform. In addition, the apparatus 100 is configured to decode one or more predetermined flags (e.g., a parity check flag and / or a greater than X flag, a significance flag; for example, a context-adaptive binary entropy decoding) from a data stream for each coefficient in a pass sequence. Fig. 2092, par_flag 96, gt1_flag 98 and / or gt2_flag 104 shown in the figure) to decode a coefficient block from the data stream for a predetermined transform block, the pass traverses the coefficients of the block, each predetermined flag reduces the absolute value range 90 of the corresponding coefficient (for example, the parity check bit 96 reduces the absolute value range 90 to half by excluding each even or odd absolute value, and is greater than the X flag, such as gt1_flag 98 and gt2_flag 104, by excluding one of the possible absolute values ​​or leaving one of the possible absolute values ​​and excluding all other possible absolute values, to reduce the possible absolute value range), the absolute value of the corresponding coefficient is within the absolute value range (for example, the absolute value range starts from the beginning of one or more passes, such as in the case of X bit representation, from the general absolute value range of the coefficient, 0...2 X-1 ). In addition, the device 100 is configured to decode a coefficient block from the data stream for a predetermined transform block by decoding, in a pass sequence, for each coefficient whose cardinality of the absolute value field 90 is not reduced to 1 by one or more predetermined flags decoded for the corresponding coefficient, a variable length code codeword (e.g., a Rice code / Exponential Golomb code), the variable length code codeword being used to identify the absolute value of the corresponding coefficient within the absolute value field of the corresponding coefficient (e.g., the code length of the variable length code may increase monotonically with increasing absolute value; here, the codeword freely refers to only the reduced absolute value field or generally one absolute value field or some other absolute value field that is inevitably a suitable superset of the reduced absolute value field), the pass traversing the coefficients of the block. In addition, the device 100 is configured to derive a residual sample array of the predetermined transform block from the coefficient block, so that the coefficient block is related to the residual sample array according to the selected transform, and use the residual sample array to correct the prediction of the predetermined transform block to reconstruct the predetermined transform block. The apparatus is configured to, when decoding one or more predetermined flags in a pass sequence, stop decoding the one or more predetermined flags once a predetermined number of predetermined flags has been reached (i.e., the total number of predetermined flags decoded for all coefficients has reached a limit so far), except for a significance flag in the one or more predetermined flags indicating whether the coefficient for which the significance flag is decoded is zero (and therefore, inevitably decoded using context adaptive binary entropy decoding), so that the cardinality of the absolute value range for the first set of non-zero coefficients is smaller than that for the second set of non-zero coefficients (i.e., the cardinality is smaller for coefficients before the limit is reached in the last pass than for coefficients after the limit is reached), wherein the predetermined number corresponds to the upper limit minus the number of coefficients for which the significance flag has not yet been decoded. (with Fig. 20 Compare)

[0320] In the preferred embodiment of the present invention, the processing order of the horizontal encoding for TSM is forward, that is, the scan starts at the DC frequency position and ends at the highest AC frequency position (compare Fig.21 ).

[0321] In other words, the apparatus 100 is used to decode a picture using predictive coding and block-based transform residual coding, and is configured to select a selected transform from a predetermined transform list for a predefined transform block, the selected transform including an identity transform and at least one non-identity transform. The apparatus is configured to decode 120 coefficient blocks from a data stream for a predetermined transform block by decoding coefficients of the coefficient block from the data stream along a first scanning order 851 (which may be followed multiple times in several passes), if the selected transform is a non-identity transform 1231, the first scanning order leading to the DC coefficient of the non-identity transform (for example, starting from the highest frequency coefficient, possibly from the "last" significant coefficient position). The apparatus is configured to decode 120 coefficient blocks from a data stream for a predetermined transform block by decoding coefficients of the coefficient block from the data stream along a second scanning order 852, the second scanning order leading from the upper left sample position to the lower right sample position, if the selected transform is an identity transform 1232. The scanning order determines the number of samples in the first scanning order. Fig.21 In addition, the apparatus 100 is configured to derive a residual sample array of a predefined transform block from the coefficient block, such that the coefficient block is associated with the residual sample array according to the selected transform (in the case of an identity transform, this step may include adding coefficients in a block located at a predetermined side to each coefficient, such as the left-hand side in the case of horizontal DPCM, or the top of the corresponding coefficient in the case of vertical DPCM, in order to perform DPCM inversion), and to use the residual sample array to correct the prediction of the predefined transform block to reconstruct the predefined transform block.

[0322] In another preferred embodiment of the present invention, the scanning mode can be horizontal or vertical and is coupled to the prediction mode used, such as BDPCM and / or RBDPCM (compare Fig.21 ).

[0323] In other words, the apparatus 100 is configured to select the second scanning order 852 according to the DPCM direction (eg, horizontal raster scanning in case of horizontal DPCM and vertical raster scanning in case of vertical DPCM) used to encode a predetermined transform block.

[0324] In a preferred embodiment of the invention, all context coded binary bins are coded in a single cycle instead of separate cycles, and the final level information coded in bypass mode forms another processing cycle.

[0325] In another preferred embodiment of the present invention, each level is fully encoded before processing the next scan position.

[0326] In a preferred embodiment of the invention, the number of positive or negative values ​​is tracked together with the total number of symbol values. When the symmetric threshold x is exceeded, a different set of context models is used, resulting in three sets of context models. The level used for statistics is the transform block.

[0327] In another preferred embodiment of the present invention, the level used for statistics is sub-block.

[0328] In another preferred embodiment of the present invention, the level used for statistics is slice.

[0329] In another preferred embodiment of the present invention, the threshold value x is fixed.

[0330] In another preferred embodiment of the present invention, the threshold value x is variable.

[0331] In another preferred embodiment of the present invention, the context modeling of the index within the context model set is fixed and equal to 1.

[0332] In a preferred embodiment of the present invention, the number of context model sets is also equal to 3, and the threshold is asymmetric.

[0333] In a preferred embodiment of the invention, the threshold value is sent in a header such as a slice header or in a picture parameter set in the bitstream.

[0334] In a preferred embodiment of the invention, the encoding of symbolic syntax elements is separated from the encoding of the absolute level.

[0335] In a preferred embodiment of the present invention, a syntax element indicating whether symbol values ​​of a specific region are the same is transmitted in the bitstream.

[0336] In another preferred embodiment of the present invention, a syntax element indicating whether symbol values ​​of a specific region are the same is transmitted in a bitstream, the specific region being defined as a transform block.

[0337] In another preferred embodiment of the present invention, a syntax element indicating whether symbol values ​​of a specific region are the same is transmitted in a bitstream, the specific region being defined as a sub-block.

[0338] In another preferred embodiment of the present invention, a syntax element indicating whether symbol values ​​of a specific region are the same is transmitted in a bitstream, the specific region being defined as a coding unit.

[0339] In another preferred embodiment of the present invention, when regions are defined as sub-blocks, context modeling of additional syntax elements is derived by evaluating neighboring sub-blocks.

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

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

[0342] Table 5 Example residual coding syntax for transform skipping

[0343]

[0344]

[0345]

[0346]

[0347] The following apparatus for encoding may include similar or equivalent features to the above-mentioned apparatus for decoding.

[0348] According to an embodiment, a device for encoding a picture using predictive coding and block-based transform residual coding is configured to subdivide the picture into transform blocks of different sizes. In addition, the device is configured to select a selected transform for a predetermined transform block by checking whether the size of the predetermined transform block exceeds a predetermined threshold size. If the size of the predetermined transform block exceeds the predetermined threshold size, the device is configured to select the selected transform using a default method. If the size of the predetermined transform block does not exceed the predetermined threshold size, the device is configured to select a transform from a predetermined transform list and send an index pointing to the selected transform in the predetermined transform list in a data stream so as to be used as the selected transform for the predetermined transform block, the predetermined transform list including an identity transform and a non-identity transform. In addition, the device is configured to predict the predetermined transform block, and for the predetermined transform block, encode a coefficient block into the data stream, so that if the selected transform is an identity transform, the coefficient block is used as a residual sample array for correcting the prediction to reconstruct the predetermined transform block, and if the selected transform is not an identity transform, the coefficient block is inversely transformed corresponding to the selected transform to obtain a residual sample array of the predetermined transform block.

[0349] According to an embodiment, the apparatus is configured to use a default non-identity transform for the selected transform if the size of the predetermined transform block exceeds a predetermined threshold size.

[0350] According to an embodiment, the default non-identity transform is included in a list of predetermined transforms.

[0351] According to an embodiment, the apparatus is configured to derive the predetermined threshold size from the data stream.

[0352] According to an embodiment, the apparatus is configured to, if the size of the predetermined transform block does not exceed a predetermined threshold size, encode an index into the current position in the data stream for the predetermined transform block, and, if the size of the predetermined transform block exceeds the predetermined threshold size, encode a syntax element different from the index (e.g., instead of the index, another element is read, but not in the sense of skipping and not reading, but although the syntax may be the same up to this position in the data stream, the data stream does not actually contain the index) into the current position in the data stream.

[0353] According to an embodiment, the apparatus is configured to encode an index into a data stream for a coding block of a picture, the coding block being divided into a plurality of transform blocks including a predetermined transform block. (Note that a unified MTS syntax may be signaled at a higher level for disjoint CU sets), i.e., the index may be valid for a set of coding blocks.

[0354] According to an embodiment, the transform block is a luma transform block and the apparatus is configured to use a fixed default transform for the chroma transform block.

[0355] According to an embodiment, the apparatus is configured to apply the selected transform to the luma component and the chroma components of the picture within a predetermined transform block.

[0356] According to an embodiment, the apparatus is configured to encode, for each of the luma and chroma components of a picture, an index into the data stream for a predetermined transform block.

[0357] According to an embodiment, the device is configured to signal in a data stream whether the following situations are true: the transform block is a luma transform block and a fixed default transform is to be used for the chroma transform block; the selected transform is to be applied to the luma component and the chroma component of the picture within a predetermined transform block; or, for each of the luma component and the chroma component of the picture, an index is to be encoded into the data stream for the predetermined transform block.

[0358] According to an embodiment, the device is configured to, when encoding the coefficient block into the data stream for a predetermined transform block, depend on whether the selected transform for the predetermined block is included in a predefined set of one or more transforms. In addition, the device is configured to, when encoding the coefficient block into the data stream for the predetermined transform block, if the selected transform for the predetermined block is included in the predefined set of one or more transforms, encode into the data stream a coded block flag that signals whether the coefficient block has at least one non-zero coefficient, and the device is configured to, when encoding the coefficient block into the data stream for the predetermined transform block, if the selected transform for the predetermined block is not included in the predefined set of one or more transforms, infer that the coefficient block has at least one non-zero coefficient (in other words, if the selected transform for the predetermined block is included in the predefined set of one or more transforms, not encode the CBF into the data stream, or even in other words, encode a syntax element different from the CBF into the current part of encoding the CBF into the data stream).

[0359] According to an embodiment, the predefined set of one or more transforms includes an identity transform and a default non-identity transform, and the default non-identity transform is selected by default according to a default manner for selecting a selected transform.

[0360] According to an embodiment, a device for encoding a picture using predictive coding and block-based transform residual coding is configured to select a selected transform from a predetermined transform list for a predetermined transform block, and to encode an index pointing to the selected transform in the predetermined transform list into a data stream for the predetermined transform block. In addition, the device is configured to predict the predetermined transform block, and to encode a coefficient block into the data stream for the predetermined transform block, so that a residual sample array of the predetermined transform block can be derived from the coefficient block, so that the coefficient block is related to the residual sample array according to the selected transform, and the residual sample array can be used to predict the transform block to reconstruct the predetermined transform block. The device is configured to, when encoding the coefficient block into the data stream for the predetermined transform block, depending on whether the selected transform for the predetermined block is included in a predefined set of one or more transforms, if the selected transform for the predetermined block is included in the predefined set of one or more transforms, encode a coding block flag that signals whether the coefficient block has at least one non-zero coefficient into the data stream. In addition, the device is configured to, when encoding a coefficient block into a data stream for a predetermined transform block, depend on whether the selected transform for the predetermined block is included in a predefined set of one or more transforms, avoid encoding a coded block flag into the data stream if the selected transform for the predetermined block is not included in the predefined set of one or more transforms, wherein the encoder side must infer the coded block flag to signal that the coefficient block has at least one non-zero coefficient (in other words, if the selected transform for the predetermined block is included in the predefined set of one or more transforms, the CBF is not encoded into the data stream, or even in other words, a syntax element different from the CBF is encoded into the current part of encoding the CBF into the data stream).

[0361] According to an embodiment, the predefined set of one or more transforms includes an identity transform.

[0362] According to an embodiment, the apparatus is configured to fill or fill and sort a predetermined transformation list depending on a data stream, and to encode an index into the data stream using a variable length code, such that each transformation in the predetermined transformation list has been assigned a codeword of the variable length code, and the codeword length of the codeword of the variable length code increases monotonically with the order of the transformation to which the codeword is assigned in the predetermined transformation list.

[0363] According to an embodiment, a device for encoding a picture using predictive coding and block-based transform residual coding is configured to predict a predetermined transform block, and for the predetermined transform block, encode a coefficient block into a data stream, including encoding a coding block flag that signals whether the coefficient block has at least one non-zero coefficient into the data stream. The device is configured to select a selected transform from a predetermined transform list for the predetermined transform block if the coding block flag signals that the coefficient block has at least one non-zero coefficient, and for the predetermined transform block, encode an index pointing to the selected transform in the predetermined transform list into the data stream. A residual sample array of the predetermined transform block can be derived from the coefficient block, so that the coefficient block is related to the residual sample array according to the selected transform, and the residual sample array can be used to correct the prediction of the predetermined transform block to reconstruct the predetermined transform block. The apparatus is configured to reconstruct a predetermined transform block without predictive correction if the coding block flag signals that the coefficient block does not have at least one non-zero coefficient (in other words, if the coding block flag signals that the coefficient block does not have at least one non-zero coefficient, the index is not encoded into the data stream, for example by encoding a syntax element different from the index into the current part of the data stream into which the index is encoded).

[0364] According to an embodiment, a device for encoding a picture using predictive coding and block-based transform residual coding is configured to fill or fill and sort a predetermined transform list depending on a data stream, and select a selected transform from the predetermined transform list for a predetermined transform block. In addition, the device is configured to encode an index pointing to the selected transform in the predetermined transform list into the data stream using a variable length code, so that each transform in the predetermined transform list has been assigned a codeword of the variable length code, and the codeword length of the codeword of the variable length code increases monotonically with the order of the transform assigned the codeword in the predetermined transform list. In addition, the device is configured to derive a prediction of the predetermined transform block, and for the predetermined transform block, encode a coefficient block into the data stream, so that a residual sample array of the predetermined transform block can be derived from the coefficient block, so that the coefficient block is related to the residual sample array according to the selected transform, and so that the predetermined transform block can be reconstructed by correcting the prediction of the predetermined transform block using the residual sample array to reconstruct the predetermined transform block.

[0365] According to an embodiment, the apparatus is configured to sort the predetermined transform list according to a syntax element in the data stream, the syntax element being valid at least globally for the picture.

[0366] According to an embodiment, the apparatus is configured to sort the list of predetermined transforms according to an evaluation of sample statistics in a spatial neighborhood of a predetermined transform block.

[0367] According to an embodiment, the apparatus is configured to order the predetermined transform list according to syntax elements signaled in the data stream for blocks in a spatial neighborhood of the predetermined transform block.

[0368] According to an embodiment, the apparatus is configured to sort the predetermined transformation list so that there is at least one state of the data stream such that sorting the predetermined transformation list places the identity transformation in a leading order to which the shortest codeword of the variable length code is assigned.

[0369] According to an embodiment, the apparatus is configured to encode the index into the data stream using a combined variable length code codeword, the combined variable length code codeword consisting of the following items: a first codeword of the variable length code, and if the first codeword is the longest codeword of the variable length code, the first codeword is followed by a second codeword of the fixed length code. A codeword in the combined 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 predefined non-identity transformation and is used to distinguish between the identity transformation and the predefined non-identity transformation, and other codewords of the combined variable length code are assigned to other non-identity transformations in a predetermined transformation list and are used to distinguish between other non-identity transformations in the predetermined transformation list.

[0370] According to an embodiment, a device for encoding a picture using predictive coding and block-based transform residual coding is configured to derive a prediction of a predetermined transform block. In addition, the device is configured to select a selected transform from a predetermined transform list for the predetermined transform block, and encode an index pointing to the selected transform in the predetermined transform list into a data stream using a combined variable length code codeword, the combined variable length code codeword consisting of the following items: a first codeword of the variable length code, and if the first codeword is the longest codeword of the variable length code, the first codeword is followed by a second codeword of the fixed length code. The codeword consisting of only one of the two non-longest codewords of the variable length code in the combined variable length code is assigned to the identity transform and the predefined non-identity transform included in the predetermined transform list, and is used to distinguish the identity transform from the predefined non-identity transform, and the other codewords of the combined variable length code are assigned to other non-identity transforms in the predetermined transform list, and are used to distinguish other non-identity transforms in the predetermined transform list. In addition, the apparatus is configured to encode, for a predetermined transform block, a coefficient block into a data stream such that the coefficient block is associated with a residual sample array according to a selected transform and such that a prediction of the predetermined transform block can be corrected by using the residual sample array to reconstruct the predetermined transform block.

[0371] According to an embodiment, an apparatus for encoding a picture using predictive coding and block-based transform residual coding is configured to select a selected transform from a predetermined transform list for a predetermined transform block, the transform including an identity transform and at least one non-identity transform. In addition, the apparatus is configured to derive a prediction of the predetermined transform block, and to encode a coefficient block into a data stream for the predetermined transform block by checking whether the selected transform is a non-identity transform. If the selected transform is a non-identical transform, the device is configured to encode position information into the data stream so as to obtain a predetermined coefficient position, the position information being related to the position where a non-zero coefficient is first encountered along the scanning order of traversing all coefficients of the coefficient block, or the position where a non-zero coefficient is last encountered along the scanning order of traversing all coefficients of the coefficient block (please note the following. In the above embodiments, the position is referred to as the last position measured along the scanning order from the upper left corner to the lower right, although according to these embodiments, the actual scanning starts encoding from there. That is, the actual encoding occurs in a reverse scanning order from the lower right to the upper left corner. Here, the scanning order is the encoding order. See the next embodiment for anticipating these two scanning orders), and encode the first coefficient of the coefficient block into the data stream, the first coefficient including all non-zero coefficients of the coefficient block and traversed by the scanning order starting from the predetermined coefficient position or up to the predetermined coefficient position, and inferring that the second coefficient in the coefficient block, which is different from the first coefficient, is zero, so as to encode the coefficient block into the data stream for a predetermined transform block. If the selected transform is an identity transform, the apparatus is configured to encode all coefficients of the coefficient block into the data stream to encode the coefficient block into the data stream for a predetermined transform block. The coefficient block is associated with a residual sample array according to the selected transform and is capable of correcting a prediction of the predetermined transform block by using the residual sample array to reconstruct the predetermined transform block.

[0372] According to an embodiment, the device is configured to use a scanning order when encoding a first coefficient of a coefficient block into a data stream, and to start encoding the first coefficient at a predetermined coefficient position so that the first coefficient is traversed by the scanning order starting from the predetermined coefficient position, or to use a scanning order and complete encoding the first coefficient at a predetermined coefficient position so that the first coefficient is traversed by the scanning order up to the predetermined coefficient position. The device is configured to sequentially encode all coefficients starting from the coefficient last traversed by the scanning order in the coefficient block when encoding all coefficients of the coefficient block into a data stream, or to complete sequentially encoding all coefficients at the coefficient last traversed by the scanning order in the coefficient block.

[0373] According to an embodiment, the device is configured to, when encoding all coefficients of a coefficient block into a data stream, use a scanning order and complete encoding of all coefficients at the coefficient in the coefficient block that was last traversed by the scanning order, or use a reverse scanning order and start encoding of all coefficients at the coefficient in the coefficient block that was last traversed by the scanning order.

[0374] According to an embodiment, the apparatus is configured to encode the position information by encoding the coordinates of the predetermined coefficient positions into the data stream, or by encoding the order of the predetermined coefficient positions within the scanning position into the data stream.

[0375] According to an embodiment, the device is configured to perform encoding of the first coefficient of the coefficient block in units of sub-blocks into which the coefficient block is divided, so that the scanning order traverses all the first coefficients in a sub-block before traversing the first coefficient in a sub-block different from a sub-block, wherein a sub-block flag in the data stream is inferred (please note that "encoded sub-block flag" has been used in the above embodiment) to signal that the first coefficient in the sub-block of zero is zero, and the sub-block flag in the data stream is encoded into the data stream to signal the first coefficient in the sub-block of non-zero, wherein sub-block flags other than at least one of the first sub-block flag and the second sub-block flag are encoded into the data stream, the first sub-block flag is related to a sub-block including a predetermined coefficient position, the second sub-block flag is related to a sub-block including the first coefficient of the coefficient block, and multiple first coefficients are located between the first coefficient of the coefficient block and the predetermined coefficient position, wherein the at least one sub-block flag in the first sub-block flag and the second sub-block flag is inferred to signal non-zero. The apparatus is configured to perform encoding of all coefficients of a coefficient block into a data stream in units of sub-blocks into which the coefficient block is divided, such that a scanning order traverses all coefficients within a sub-block before traversing a first coefficient within a sub-block different from a sub-block, wherein a sub-block flag in the data stream is inferred to signal that coefficients within a sub-block of zero are zero, and a sub-block flag in the data stream is encoded into the data stream to signal that coefficients within a sub-block of non-zero are non-zero, wherein the sub-block flag is encoded into the data stream for all sub-blocks.

[0376] According to an embodiment, the apparatus is configured to, when encoding the sub-block flags into the data stream for all sub-blocks, sequentially encode the sub-block flags into the data stream in the sub-block order for all sub-blocks, and if all previous sub-block flags preceding the sub-block order signal zero, then the sub-block flag located last in the sub-block order is not encoded, but the sub-block flag located last in the sub-block order is inferred to signal non-zero. (Compare the above embodiment, where it is already pointed out in 2.b.: "Unless all other coded_sub_block_flag syntax elements are already equal to 0, this also includes the coded_sub_block_flag of the DC sub-block. In this case, the DC coded_sub_block_flag is inferred to be equal to 1")

[0377] According to an embodiment, the device is configured to, when encoding sub-block flags into a data stream for all sub-blocks, sequentially encode the sub-block flags into the data stream in a sub-block order for all sub-blocks, and if all previous sub-block flags preceding in the sub-block order signal zeroness, sequentially encode coefficients within a predetermined sub-block in a coefficient order, for a predetermined sub-block, the sub-block flag of the predetermined sub-block is located last in the sub-block order and infer that the sub-block flag of the predetermined sub-block signals non-zeroness, and for each coefficient in the predetermined sub-block except the last coefficient, encode a significance flag indicating whether the corresponding coefficient is non-zero, and if other coefficients in the predetermined sub-block are zero, infer that the last coefficient is non-zero, and if at least one of the other coefficients in the predetermined sub-block is non-zero, encode the significance flag of the last coefficient. Furthermore, the apparatus is configured to, when encoding the sub-block flags other than at least one of the first sub-block flag and the second sub-block flag into the data stream, encode the sub-block flags other than the at least one of the first sub-block flag and the second sub-block flag into the data stream, infer that the at least one of the first sub-block flag and the second sub-block flag signals non-zeroness, and, for all first coefficients within the sub-block associated with the second sub-block flag, inevitably encode a significance flag indicating whether the corresponding coefficient is non-zero. (Compare the above embodiment, where the inference of the significance flag occurs at the (0,0) position if all other significance flags for the sub-block are equal to 0, see 2.b of the specification: "In this case, the DC coded_sub_block_flag is inferred to be equal to 1 (inferDcSbCbf=1). If all other sig_coeff_flag syntax elements in the DC sub-block are equal to 0, then since there must be at least one significance level in the DC sub-block, the sig_coeff_flag syntax element for the first position at (0,0) is not signaled, but is derived to be equal to 1 (inferSbDcSigCoeffFlag=1).")

[0378] According to an embodiment, a device for encoding a picture using predictive coding and block-based transform residual coding is configured to select a selected transform from a predetermined transform list for a predetermined transform block, the selected transform including an identity transform and at least one non-identity transform, and derive a prediction of the predetermined transform block. In addition, the device is configured to encode a coefficient block into a data stream for the predetermined transform block by encoding the coefficients of the coefficient block into the data stream in units of sub-blocks into which the coefficient block is divided, wherein a sub-block flag in the data stream is inferred to signal that the coefficients within the sub-block of zero are zero, and a sub-block flag in the data stream is encoded into the data stream to signal that the coefficients within the sub-block of non-zero are encoded into the data stream. The inferred coefficients are zero and the encoding of non-zero coefficients is performed by: if the selected transform is one of at least one non-identity transform, sequentially encoding sub-block flags other than at least one of a first sub-block flag and a last sub-block flag into a data stream, wherein the at least one sub-block flag of the first sub-block flag and the last sub-block flag is inferred to signal non-zeroness; and if the selected transform is an identity transform, encoding the sub-block flags into the data stream for all sub-blocks. The coefficient block is associated with a residual sample array according to the selected transform, and a prediction of a predetermined transform block can be corrected by using the residual sample array to reconstruct the predetermined transform block.

[0379] According to an embodiment, the apparatus is configured to, when encoding the sub-block flags into the data stream for all sub-blocks, sequentially encode the sub-block flags into the data stream in a sub-block order for all sub-blocks, and encode the sub-block flag that is last in the sub-block order if at least one of the previous sub-block flags that precede the sub-block order signals non-zeroness, wherein if all previous sub-block flags that precede the sub-block order signal zeroness, it is inferred that the sub-block flag that is last in the sub-block order signals non-zeroness.

[0380] According to an embodiment, the apparatus is configured to, when inferring a sub-block flag that is last in the sub-block order to signal non-zeroness, infer that a last coefficient within the sub-block signals non-zeroness if all previous coefficients within the sub-block inferred to signal non-zeroness are zero.

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

[0382] According to an embodiment, a device for encoding a picture using predictive coding and block-based transform residual coding is configured to select a selected transform from a predetermined transform list for a predetermined transform block, the selected transform including an identity transform and at least one non-identity transform, and derive a prediction of the predetermined transform block. In addition, the device is configured to encode the coefficients of the coefficient block into the data stream in units of sub-blocks into which the coefficient block is divided by inferring a sub-block flag in the data stream to signal that the coefficients in the sub-block of zero are zero, and encoding the sub-block flag in the data stream to signal the coefficients in the sub-block of non-zero into the data stream, so as to encode the coefficient block into the data stream for the predetermined transform block, wherein the sub-block flag currently encoded is encoded into the data stream by context adaptive entropy coding and using context. If the selected transform is one of the at least one non-identity transform, the context depends on the logical OR of the sub-block flags related to the sub-blocks adjacent to the currently encoded sub-block flag, and if the selected transform is an identity transform, the context depends on the arithmetic sum of the sub-block flags related to the sub-blocks adjacent to the currently encoded sub-block flag. The coefficient block is associated with a residual sample array according to the selected transform, and the predetermined transform block can be reconstructed by correcting the prediction of the predetermined transform block using the residual sample array.

[0383] According to an embodiment, the apparatus is configured to, for a current coefficient within a sub-block in a data stream for which a sub-block flag signals non-zeroness, encode into the data stream a significance flag indicating whether the current coefficient is zero using a context, wherein if the selected transform is an identity transform, the context depends on the number of non-zero coefficients in a first set of coefficients immediately adjacent to the current coefficient, and if the selected transform is one of at least one non-identity transform, the context depends on the number of non-zero coefficients in a second set of coefficients, the value of the second set of coefficients, and the position of the current coefficient, the second set of coefficients comprising the first set of coefficients and coefficients further away from the current coefficient than the first set of coefficients.

[0384] According to an embodiment, a device for encoding a picture using predictive coding and block-based transform residual coding is configured to select a selected transform from a predetermined transform list for a predetermined transform block, the selected transform including an identity transform and at least one non-identity transform, and derive a prediction of the predetermined transform block. In addition, the device is configured to encode a coefficient block into a data stream for the predetermined transform block by encoding a significance flag indicating whether the current coefficient is zero using a context for the current coefficient. If the selected transform is an identity transform, the context depends on the number of non-zero coefficients in a first coefficient set immediately adjacent to the current coefficient, and if the selected transform is one of at least one non-identity transform, the context depends on the number of non-zero coefficients in a second coefficient set, the value of the second coefficient set, and the position of the current coefficient, the second coefficient set including the first coefficient set and the coefficients farther away from the current coefficient than the first coefficient set. The coefficient block is associated with a residual sample array according to the selected transform, and the prediction of the predetermined transform block can be corrected by using the residual sample array to reconstruct the predetermined transform block.

[0385] According to an embodiment, the apparatus is configured to encode N greater than X flags by context adaptive entropy coding, the greater than X flag indicating whether the absolute value of the predetermined coefficient is greater than X, and to encode a remaining portion indicating the amount by which the absolute value of the predetermined coefficient exceeds an absolute threshold by using a variable length code, the predetermined threshold depending on N, wherein N is greater in the case where the selected transform is an identity transform than in the case where the selected transform is one of the at least one non-identity transforms.

[0386] According to an embodiment, a device for encoding a picture using predictive coding and block-based transform residual coding is configured to select a selected transform from a predetermined transform list for a predetermined transform block, the selected transform including an identity transform and at least one non-identity transform, and derive a prediction of the predetermined transform block. In addition, the device is configured to encode a coefficient block into a data stream for the predetermined transform block by context-adaptively entropy encoding N greater than X flags and encoding the remaining portion indicating the amount by which the absolute value of the predetermined coefficient exceeds an absolute threshold using a variable length code, wherein the greater than X flag indicates whether the absolute value of the predetermined coefficient is greater than X, and the predetermined threshold depends on N, wherein N is greater when the selected transform is an identity transform than when the selected transform is one of the at least one non-identity transform. The coefficient block is associated with a residual sample array according to the selected transform, and is capable of correcting the prediction of the predetermined transform block using the residual sample array to reconstruct the predetermined transform block.

[0387] According to an embodiment, the apparatus is configured to perform context adaptive entropy encoding of N greater than X flags in a pass sequence by sequentially context adaptive entropy encoding the N greater than X flags, wherein X is increased with one or more of the N greater than X flags in each pass, wherein the apparatus is configured to record the number of flags encoded using context adaptive entropy encoding during the pass sequence and stop context adaptive entropy encoding of the N greater than X flags if the number exceeds a predetermined flag threshold.

[0388] According to an embodiment, the variable length code is a Rice code, and the device is configured to determine the Rice parameters of the Rice code based on the following items: if the selected transform is an identity transform, it is determined based on a first set of coefficients that are adjacent to the predetermined coefficients, and if the selected transform is one of at least one non-identity transform, it is determined based on a second set of coefficients, the second set of coefficients including the first set of coefficients and coefficients that are farther away from the predetermined coefficients than the first set of coefficients.

[0389] 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 and updating a probability associated with the predetermined context if the selected transform is an identity transform, and performing bypass coding (e.g., context adaptive entropy coding with fixed equal probability) if the selected transform is one of at least one non-constant transform.

[0390] According to an embodiment, a device for encoding a picture using predictive coding and block-based transform residual coding is configured to select a selected transform from a predetermined transform list for a predetermined transform block, the selected transform including an identity transform and at least one non-identity transform, and derive a prediction of the predetermined transform block. In addition, the device is configured to encode a coefficient block into a data stream for the predetermined transform block by context-adaptive entropy decoding the sign of the predetermined coefficient using a predetermined context if the selected transform is an identity transform, and updating the probability associated with the predetermined context, and bypass coding (e.g., context-adaptive entropy coding with fixed equal probability) if the selected transform is one of the at least one non-constant transforms. The coefficient block is associated with a residual sample array according to the selected transform, and the prediction of the predetermined transform block can be corrected by using the residual sample array to reconstruct the predetermined transform block.

[0391] 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 coding of the N greater than X flags in a pass sequence by sequentially context adaptive entropy coding the N greater than X flags, wherein X is increased with one or more of the N greater than X flags in each pass, and the number of flags encoded using context adaptive entropy coding is recorded during the pass sequence, and the context adaptive entropy coding of the N greater than X flags is stopped if the number exceeds a predetermined flag threshold. In addition, the apparatus is configured to, if the selected transform is an identity transform, sequentially perform context adaptive entropy coding on the N greater than X flags, and after coding a significance flag (X=0) among the N greater than X flags and before coding another N greater than X flags among the N greater than X flags, code a greater than X flag bypass flag indicating whether a predetermined coefficient is greater than an absolute threshold, and, if the greater than X flag bypass flag indicates that the predetermined coefficient is greater than the absolute threshold, stop context adaptive entropy coding on the N greater than X flags with respect to the other N greater than X flags (e.g., and, if the greater tha...

Claims

1. An apparatus (100) for decoding a picture using predictive coding and block-based transform residual coding, the apparatus comprising a processor and configured to: For a predetermined transform block, selecting (110) a transform (112) from a plurality of transforms, the selected transform comprising an identity transform and at least one non-identity transform, For the predetermined transform block, a coefficient block (122) is decoded (120) from a data stream by decoding (400) for a current coefficient a significance flag indicating whether the current coefficient is zero using a context (300), wherein: When the selected transform is the identity transform, the context depends on the number of non-zero coefficients (310) in a first set of coefficients immediately adjacent to the current coefficient, and When the selected transform is one of at least one non-identity transform, the context depends on a value of a second set of coefficients and a position of the current coefficient, the second set of coefficients comprising at least one coefficient immediately adjacent to the current coefficient and at least one coefficient further away from the current coefficient than any coefficient immediately adjacent to the current coefficient, deriving (130) a residual sample array for the predetermined transformed block from the coefficient block such that the coefficient block is related to the residual sample array according to the selected transform, and The prediction of the predetermined transform block is corrected (140) using the residual sample array to reconstruct the predetermined transform block.

2. The apparatus (100) according to claim 1, configured to decode the predetermined coefficient by: performing context adaptive entropy decoding on N greater than X flags, wherein the greater than X flag indicates whether the absolute value of the predetermined coefficient is greater than X, A remainder is decoded using a variable length code, the remainder indicating an amount by which an absolute value of the predetermined coefficient exceeds an absolute threshold, the absolute threshold depending on N, which is greater when the selected transform is an identity transform than when the selected transform is one of the at least one non-identity transforms.

3. The device according to claim 1, wherein: When the selected transform is a non-identity transform, the context depends on: The first coefficient immediately adjacent to the current coefficient in the downward direction, The second coefficient immediately adjacent to the current coefficient in the right direction, a third coefficient that is adjacent to the first coefficient in the right direction and adjacent to the second coefficient in the downward direction, a fourth coefficient that is immediately adjacent to the first coefficient in the downward direction, and The fifth coefficient is adjacent to the second coefficient in the right direction.

4. The device according to claim 1, wherein: When the selected transform is the identity transform, the context depends on: a first coefficient adjacent to the current coefficient in a first direction, A second coefficient adjacent to the current coefficient in a second direction different from the first direction.

5. An apparatus for encoding a picture using predictive coding and block-based transform residual coding, the apparatus comprising a processor and configured to: For a predetermined transform block, a transform is selected from a plurality of transforms, the selected transform comprising an identity transform and at least one non-identity transform, deriving a prediction of said predetermined transform block, For the predetermined transform block, a coefficient block is encoded into a data stream by encoding, for a current coefficient, a significance flag indicating whether the current coefficient is zero using a context, wherein: When the selected transform is the identity transform, the context depends on the number of non-zero coefficients in a first set of coefficients immediately adjacent to the current coefficient, and When the selected transform is one of at least one non-identity transform, the context depends on a value of a second set of coefficients and a position of the current coefficient, the second set of coefficients comprising at least one coefficient immediately adjacent to the current coefficient and at least one coefficient further away from the current coefficient than any coefficient immediately adjacent to the current coefficient, The coefficient block is associated with a residual sample array according to the selected transform, and the predetermined transform block can be reconstructed by correcting the prediction of the predetermined transform block using the residual sample array.

6. The device according to claim 5, wherein: When the selected transform is a non-identity transform, the context depends on: The first coefficient immediately adjacent to the current coefficient in the downward direction, The second coefficient immediately adjacent to the current coefficient in the right direction, a third coefficient that is adjacent to the first coefficient in the right direction and adjacent to the second coefficient in the downward direction, a fourth coefficient that is immediately adjacent to the first coefficient in the downward direction, and The fifth coefficient is adjacent to the second coefficient in the right direction.

7. The device according to claim 5, wherein: When the selected transform is the identity transform, the context depends on: a first coefficient adjacent to the current coefficient in a first direction, A second coefficient adjacent to the current coefficient in a second direction different from the first direction.

8. A method for decoding a picture using predictive coding and block-based transform residual coding, the method comprising: For a predetermined transform block, a transform is selected from a plurality of transforms, the selected transform comprising an identity transform and at least one non-identity transform, For the predetermined transform block, a coefficient block is decoded from a data stream by decoding, for a current coefficient, a significance flag indicating whether the current coefficient is zero using a context, wherein: When the selected transform is the identity transform, the context depends on the number of non-zero coefficients in a first set of coefficients immediately adjacent to the current coefficient, and When the selected transform is one of at least one non-identity transform, the context depends on a value of a second set of coefficients and a position of the current coefficient, the second set of coefficients comprising at least one coefficient immediately adjacent to the current coefficient and at least one coefficient further away from the current coefficient than any coefficient immediately adjacent to the current coefficient, deriving a residual sample array for the predetermined transformed block from the coefficient block such that the coefficient block is related to the residual sample array according to the selected transform, and The prediction of the predetermined transform block is corrected using the residual sample array to reconstruct the predetermined transform block.

9. The method according to claim 8, wherein: When the selected transform is a non-identity transform, the context depends on: The first coefficient immediately adjacent to the current coefficient in the downward direction, The second coefficient immediately adjacent to the current coefficient in the right direction, a third coefficient that is adjacent to the first coefficient in the right direction and adjacent to the second coefficient in the downward direction, a fourth coefficient that is immediately adjacent to the first coefficient in the downward direction, and The fifth coefficient is adjacent to the second coefficient in the right direction.

10. The method according to claim 8, wherein: When the selected transform is the identity transform, the context depends on: a first coefficient adjacent to the current coefficient in a first direction, A second coefficient adjacent to the current coefficient in a second direction different from the first direction.

11. A method for encoding a picture using predictive coding and block-based transform residual coding, the method comprising: For a predetermined transform block, a transform is selected from a plurality of transforms, the selected transform comprising an identity transform and at least one non-identity transform, deriving a prediction of said predetermined transform block, For the predetermined transform block, a coefficient block is encoded into a data stream by encoding, for a current coefficient, a significance flag indicating whether the current coefficient is zero using a context, wherein: When the selected transform is the identity transform, the context depends on the number of non-zero coefficients in a first set of coefficients immediately adjacent to the current coefficient, and When the selected transform is one of at least one non-identity transform, the context depends on a value of a second set of coefficients and a position of the current coefficient, the second set of coefficients comprising at least one coefficient immediately adjacent to the current coefficient and at least one coefficient further away from the current coefficient than any coefficient immediately adjacent to the current coefficient, The coefficient block is associated with a residual sample array according to the selected transform, and the predetermined transform block can be reconstructed by correcting the prediction of the predetermined transform block using the residual sample array.

12. The method according to claim 11, wherein: When the selected transform is a non-identity transform, the context depends on: The first coefficient immediately adjacent to the current coefficient in the downward direction, The second coefficient immediately adjacent to the current coefficient in the right direction, a third coefficient that is adjacent to the first coefficient in the right direction and adjacent to the second coefficient in the downward direction, a fourth coefficient that is immediately adjacent to the first coefficient in the downward direction, and The fifth coefficient is adjacent to the second coefficient in the right direction.

13. The method according to claim 11, wherein: When the selected transform is the identity transform, the context depends on: a first coefficient adjacent to the current coefficient in a first direction, A second coefficient adjacent to the current coefficient in a second direction different from the first direction.

14. A computer program product having a program code for executing the method according to claim 8 or claim 11 when the program code is run on one or more computers.