Method and apparatus for selecting an encoding mode for encoding / decoding a residual block

By enabling or disabling the encoding modes of separable and non-separable 2D transformations, the problem of high encoding complexity in existing technologies is solved, thereby improving encoding efficiency and controlling performance loss.

CN114554215BActive Publication Date: 2026-06-12INTERDIGITAL VC HOLDINGS INC

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
INTERDIGITAL VC HOLDINGS INC
Filing Date
2018-01-08
Publication Date
2026-06-12

AI Technical Summary

Technical Problem

Existing video coding technologies suffer from high coding complexity and uncontrollable performance loss when selecting coding modes for residual blocks.

Method used

By enabling or disabling encoding modes for separable and non-separable 2D transformations, and determining whether to enable a second encoding mode based on the first encoding mode, the overall encoding mode is restricted to reduce encoding-side complexity and accept acceptable performance loss.

🎯Benefits of technology

This approach reduces coding complexity while maintaining low performance loss and improving coding efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114554215B_ABST
    Figure CN114554215B_ABST
Patent Text Reader

Abstract

The present principles relate to a method and a device. A method for encoding a residual block, comprising: - obtaining (500) a first coding mode related to a first 2D transform when encoding the residual block according to a coding mode related to the first 2D transform is enabled; - obtaining (510) a second coding mode related to a second 2D transform when encoding the residual block according to a coding mode related to the second 2D transform is enabled; and - encoding (530) the residual block according to the first coding mode or the second coding mode or both; the method being characterized in that enabling or disabling (520) the encoding of the residual block according to the second coding mode depends on the first coding mode. The present principles also relate to a method and a device for encoding / decoding a picture.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of the invention patent application filed on January 8, 2018, with application number 201880011377.3 and entitled "Method and apparatus for selecting an encoding mode for encoding / decoding a residual block". Technical Field

[0002] This principle generally relates to image / video encoding and decoding. Specifically, but not exclusively, the technical field of this principle relates to selecting encoding modes for encoding / decoding residual data. Background Technology

[0003] This section aims to introduce the reader to various aspects of the technology, which may relate to the aspects of this principle described and / or claimed below. It is believed that this discussion will help provide the reader with background information for a better understanding of the various aspects of this principle. Therefore, it should be understood that these statements should be read in this context, rather than as an admission of prior art.

[0004] In the following text, an image comprises one or more sample (pixel value) arrays of a specific image / video format, specifying all information relating to the pixel values ​​of the image (or video) and, for example, all information that can be used by a display and / or any other device to visualize and / or decode the image (or video). An image includes at least one component in the form of a first sample array, typically a luma (or luminance) component, and possibly at least one other component in the form of at least one other sample array, typically a color component. Alternatively, equivalently, the same information can also be represented by a set of color sample arrays, such as the traditional three-color RGB representation.

[0005] Pixel values ​​are represented by a vector of C values, where C is the number of components. Each value in the vector is represented by a number of bits that define the maximum dynamic range of the pixel value.

[0006] To encode images in a video sequence, video compression methods typically divide the images into sets of pixel blocks. Each block is then predicted using the reconstructed information, corresponding to a previously encoded / decoded block in the current image. Encoding of the current block is performed using intra- or inter-frame prediction, and a prediction residual, or "residual block," corresponding to the difference between the current block and the predicted block is calculated. The resulting residual block is then transformed, for example, using a transform such as a DCT (Discrete Cosine Transform) or DST (Discrete Sine Transform). The coefficients of the transformed residual block are then quantized and encoded using entropy coding, and passed to the decoder.

[0007] In the HEVC video compression standard (“ITU-T H.265 ITU Telecommunication Standardization Sector (10 / 2014), H Series: Audiovisual and Multimedia Systems, Audiovisual Services Infrastructure – Mobile Video Coding, Efficient Video Coding, Recommendation ITU-T H.265”), images are divided into Coding Tree Units (CTUs), which can be 64×64, 128×128, or 256×256 pixels in size. Each CTU can be further subdivided using quadtree partitioning, where each leaf of the quadtree is called a Coding Unit (CU). Each CU is then given some intra-frame or inter-frame prediction parameters. For this purpose, the CU is spatially divided into one or more Prediction Units (PUs), which can have a square or rectangular shape. Each PU is assigned some prediction information, such as, for example, motion information and / or spatial intra-frame prediction.

[0008] According to the HEVC video compression standard, each CU can be further subdivided into square transform units (TUs) for performing the transformation of residual blocks.

[0009] The Quadtree Plus Binary Tree (QTBT) coding tool (“Joint Exploration Algorithm Description Test Model 3”, document JVET-C1001_v3, ISO / IEC JTC1 / SC29 / WG11 Joint Video Exploration Group, 3rd Meeting, 26 May to 1 June 2015, Geneva, CH) provides a more flexible CTU representation than the CU / PU / TU arrangement of the HEVC standard. The Quadtree Plus Binary Tree (QTBT) coding tool includes a coding tree, where coding units can be split in both quadtree and binary tree manners.

[0010] The splitting of the CU is determined on the encoder side through a rate-distortion optimization process, which includes determining the QTBT representation of the CTU at the minimum rate-distortion cost. In the QTBT representation, the CU has a square or rectangular shape. The size of the coding unit is always a power of 2 and typically ranges from 4 to 128. Using the QTBT representation, the CU is no longer split into PUs or TUs. Using the QTBT representation, the residual block transformation is performed on blocks whose sizes are powers of 2, and existing separable transformations and fast implementations of such transformations, typically used for square blocks, can be reused.

[0011] Therefore, when splitting residual blocks according to the CU / PU / TU arrangement of HEVC or according to the CU itself when using QTBT, the aforementioned residual blocks can specify the TU. The above definition of residual blocks is given for illustrative purposes only and does not limit the scope of this principle, which applies to any residual dataset obtained from images.

[0012] Transforming the residual block is effective when most of its energy is concentrated in a few transformed coefficients.

[0013] 2D separable or non-separable transforms based on well-known DCT (Discrete Cosine Transform) and / or DST (Discrete Sine Transform) transforms are commonly used for video coding because most of the picture energy is concentrated on a small number of frequencies represented by a finite number of significant transform coefficients.

[0014] For example, the Joint Exploratory Test Model (JEM) (Joint Collaboration Group on Video Coding of ITU-TSG16 WP3 and ISO / IEC JTC1 / SC29 / WG11, JCTVC-V1002, 22nd Meeting, October 2015), built upon the HEVC test model (C. Rosewarne, B. Bross, M. Naaccari, K. Sharman, G. J. Sullivan, “Updated Encoder Description of HEVC Test Model 16 (HM 16) 4”), defines multiple candidate coding schemes for transforming data from residual blocks.

[0015] Some of these candidate coding patterns (denoted as Enhanced Multiple Transform (EMT)) define 2D separable transforms by combining two 1D DCT and / or DST transforms (one for the horizontal and one for the vertical).

[0016] EMT is used to encode residual data for both inter-coded blocks and intra-coded blocks.

[0017] For intra-frame residual coding, due to the different residual statistics of different intra-frame prediction modes, three transform subsets are formed using four 1D transforms, denoted as DST-VII, DCT-VIII, DST-I, and DCT-V, as shown in Table 1. First, one of these three transform subsets is selected based on the intra-frame prediction mode of the residual block to be transformed, as specified in Table 2.

[0018] Transform set Transform candidate 0 DST-VII, DCT-VIII 1 DST-VII, DST-I 2 DST-VII, DCT-V

[0019] Table 1

[0020]

[0021] Table 2

[0022] For example, when the intra-prediction mode of the residual block to be transformed is equal to 8, a transform subset index equal to 0 for the horizontal (DST-VII or DCT-VIII) can be used, and a transform subset index equal to 2 for the vertical (DST-VII or DCT-VIII) can be used. Next, for each of the identified transform subsets for the horizontal (H) and vertical (V) directions, one of two transform candidates is determined, and the transform candidate determined for both the horizontal and vertical identified transform subsets forms a coding mode, hereinafter referred to as the EMT mode. Hereinafter, the EMT mode is indicated by an index denoted as EMTidx.

[0023] Following the previous example, DST-VII is used for horizontal transformation, and DCT-VIII is used for vertical transformation.

[0024] In the following text, nbEMTmodes refers to the maximum number of 2D separable transformations. According to Table 1, nbEMTmodes = 4 and EMTidx can be equal to four values, such as 0, 1, 2 or 3, to indicate each of the 2D separable transformations mentioned above.

[0025] For inter-frame residual coding, only one 2D separable transform is used in JEM, which is defined from DST-VII and DCT-VIII. The aforementioned 2D separable transform is used for all inter-frame modes and for both horizontal and vertical transforms.

[0026] In order to apply the same 2D separable transform to the residual block on the decoder side, the EMT requires some signaling. In JEM, when using the CU / PU / TU arrangement in HEVC, the EMT is signaled whether it is applicable via a CU level flag (hereinafter referred to as EMTflag), and when the residual block (here, TU) belongs to a CU enabled by the EMT (EMTflag = 1), the EMT mode selected for the aforementioned residual block (TU) is signaled on the encoder side via an index EMTidx.

[0027] When EMTflag equals 0, i.e. for CUs with EMT disabled, the usual HEVC transform (denoted as DCT-II) is applied to encode the residual block (each TU of the CU), and when EMTflag equals 1, i.e. for CUs with EMT enabled, the usual HEVC transform DCT-II is replaced by a 2D separable transform identified by EMTidx.

[0028] For the luminance coding block within the CU enabled by EMT, two additional flags are signaled to identify the 1D horizontal and vertical transforms to be used.

[0029] Some other candidate coding schemes defined in the current JEM (usually denoted as Inseparable Quadratic Transformation NSST) involve 2D Inseparable Transformation Matrices, each defining a 2D Inseparable Transformation.

[0030] When using CU / PU / TU to arrange HEVC, NSST can be applied only to intra-coded residual blocks, such as TUs within intra-coded CUs. However, NSST can also be applied after EMT, i.e., to transformed residual blocks.

[0031] Due to the different residual statistics of different intra-prediction modes, several 2D inseparable transform matrices have been defined, and one of these 2D inseparable transform matrices is selected based on the intra-prediction mode of the residual block to be transformed. The selected 2D inseparable transform matrix defines the coding mode, hereinafter referred to as the NSST mode, and the NSST mode is identified by an index denoted as NSSTidx.

[0032] In JEM, several transform subsets are defined, each consisting of three 2D inseparable transform matrices. Therefore, the transform subset is first selected based on the intra-prediction mode of the residual block to be transformed, as specified in Table 3.

[0033] Luminous Intra-Frame Mode 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 Transform set index 0 0 1 2 1 2 1 2 3 4 3 4 3 4 5 5 5 6 6 6 7 7 7 8 9 8 9 8 9 10 11 10 11 10 Luminous Intra-Frame Mode 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67(LM) Transform set index 11 10 11 10 11 10 9 8 9 8 9 8 7 7 7 6 6 6 5 5 5 4 3 4 3 4 3 2 1 2 1 2 1 0

[0034] Table 3

[0035] Next, one of the three 2D inseparable transformation matrices is determined from the selected subset of transformations, and the determined 2D inseparable transformation matrix forms the NSST pattern identified by the index NSSTidx.

[0036] To apply the same 2D inseparable transform to the residual block on the decoder side, NSST requires some signaling. In JEM, when using the CU / PU / TU arrangement in HEVC, for each residual block (for each TU of a CU), if there is more than one non-zero coefficient in the aforementioned residual block (CU), NSST is signaled at the CU level via the index NSSTidx to indicate whether NSST is applicable. If NSSTidx is not signaled, the default value is zero (NSST disabled).

[0037] EMT and NSST define their own candidate coding modes (EMT mode and NSST mode), which can interact with transform skip mode, which is configured to perform deactivation transform and direct coding on the residual block in the spatial domain. Transform skip mode is signaled via the Tskip flag in HEVC.

[0038] As mentioned above, HEVC provides several opportunities for transforming residual blocks, including EMT, NSST, or combinations thereof.

[0039] However, for a given residual block to be transformed, a selection process is needed to determine which of the EMT or NSST candidate coding modes (or a combination thereof) should be used to transform the given residual block.

[0040] Figure 1 The diagram illustrates a method for selecting an encoding mode for encoding residual blocks based on the interaction of JEM with EMT, NSST, and transform skip mode.

[0041] Basically, this method continuously evaluates the rate-distortion cost (RDO cost) of the encoding of the residual block (here, the TU within the CU to be encoded) for each candidate encoding mode and selects the one with the lowest rate-distortion cost.

[0042] As previously explained, EMT modes are defined by EMTflag, which at the CU level enables or disables the use of EMT modes to transform residual blocks (TUs within the CU), and defines a specific EMT mode for the residual block (a TU belonging to an EMT-enabled CU) via EMTidx. Furthermore, NSST modes are defined at the CU level via NSSTidx, which defines whether NSST is enabled (NSSTidx ≠ 0) or disabled (NSSTidx = 0), and if enabled, defines a specific NSST mode for the residual block (TU within the CU).

[0043] All parameters of this method, namely EMTflag, EMTidx, nbEMTmodes (maximum number of EMT modes), NSSTidx, and nbNSSTmodes (maximum number of NSST modes), are initialized. Here, NSSTidx = EMTflag = EMTidx = Tskip = 0, and nbNSSTmodes = nbEMTmodes = 4.

[0044] In step 110, the module calculates the rate-distortion cost for encoding the residual block (TU within the CU) based on the encoding mode determined from the current values ​​of EMTidx, EMTflag, and NSSTidx. Note that the encoding mode can be EMT mode, NSST mode, or EMT mode followed by NSST mode, as described above. If the rate-distortion cost is the lowest (or first), the cost and parameters are stored as "selected parameters".

[0045] Next, steps 120-190 determine the update of the current values ​​of the parameters in order to enable or disable a specific combination of EMT mode, NSST mode and transform skip mode.

[0046] More precisely, in step 120, the module checks whether the EMTidx value is strictly lower than the value T calculated from the EMTflag, Tskip, and nbEMTmodes values.

[0047] According to the embodiment, when EMTflag = 1 and Tskip = 0, that is, when EMT is enabled and the skip mode of TU is disabled, the value T is equal to nbEMTmodes-1. Otherwise, T = 0.

[0048] The value T is calculated as follows:

[0049] ((EMTflag&&!Tskip)?nbEMTmodes-1:0)

[0050] If the EMTidx value is strictly lower than the value T, then in step 130, the EMTidx value is incremented by 1 to consider another EMT pattern. Step 110 follows step 130.

[0051] Otherwise, in step 140, the module checks whether the Tskip value is strictly less than 1.

[0052] If the Tskip value is strictly less than 1, then the Tskip value is increased by 1 (step 150) to take into account the Tskip pattern for encoding the residual block. Step 110 follows step 150.

[0053] Otherwise, in step 160, the module checks whether the EMTflag value is strictly less than 1.

[0054] If the EMTflag value is strictly less than 1, then the EMTflag value is increased by 1 (step 170). Step 110 follows step 170.

[0055] Otherwise, in step 180, the module checks whether the NSSTidx value is strictly lower than (nbNSSTmodes-1).

[0056] If the NSSTidx value is strictly less than (nbNSSTmodes-1), then NSSTidx is incremented by 1 (step 190). Step 110 follows step 190.

[0057] Otherwise, the method terminates and the current value of the parameter is used to encode the residual block.

[0058] Once the encoding mode for encoding the residual block (TU of CU) is selected, the values ​​of the parameters EMTflag, Tskip, EMTidx, and NSSTidx should be encoded in the bitstream (and correspondingly decoded from the bitstream) so that the same encoding mode for the residual block is defined on the decoding side.

[0059] Figure 2 A block diagram is shown illustrating the steps of a method for encoding (and correspondingly decoding) the parameters required to encode (and correspondingly decode) a residual block.

[0060] In step 200, the module checks whether the use of EMT is enabled (use-EMT = 1). Note that use-EMT is a parameter of the encoder / decoder stored in the SPS (Sequence Parameter Set) or PPS (Picture Parameter Set) in HEVC.

[0061] If EMT is enabled, in step 210, the module encodes the EMTflag (for the current CU) into a bitstream (and correspondingly decodes the EMTflag from the bitstream).

[0062] Otherwise, in step 220, the module sets EMTflag to 0.

[0063] In step 230, the module checks whether EMTflag = 0.

[0064] If EMTflag = 0 or after step 200, then in step 240, the module will set the Tskip value ( Figure 1 The output is encoded into a bitstream (correspondingly, the EMTflag is decoded from the bitstream F).

[0065] If EMTflag = 1 (step 230), then in step 250, the module checks whether the Tskip value is equal to 0 and EMTflag is equal to 1 (i.e., the residual block is encoded using the EMT mode).

[0066] If the Tskip value is equal to 0 and the EMTflag value is equal to 1, then in step 260, the module will set the EMTidx value ( Figure 1 The output is encoded into a bitstream (and correspondingly decoded from the bitstream).

[0067] Otherwise, step 270 follows step 250.

[0068] In step 270, the module checks whether the Tskip value is equal to 0 and whether the use of NSST is enabled (use-NSST = 1). Note that use-NSST is an encoder / decoder parameter stored in the SPS (Sequence Parameter Set) or PPS (Picture Parameter Set).

[0069] If the Tskip value is equal to 0 and use-NSST = 1 (i.e., the residual block is encoded using NSST mode), then in step 280, the module will set the NSSTidx value ( Figure 1 The output is encoded into a bitstream (and correspondingly decoded from the bitstream).

[0070] Otherwise, the process ends.

[0071] Based on the selection of the encoding mode, the value of Tskip is systematically checked (steps 250 and 270) to disable the use of EMT or NSST encoding modes when selecting a skip mode to encode the residual block. Therefore, the Tskip flag should be signaled for each residual block (each TU of the CU) to be encoded. Furthermore, the EMT and NSST modes are selected independently of each other, allowing an exhaustive search for the optimal encoding mode from all possible candidate encoding modes, but this results in high complexity on the encoding side. Summary of the Invention

[0072] The following is a brief overview of this principle to provide a basic understanding of some aspects of it. This overview is not a comprehensive summary of the principle. It is not intended to identify key or essential elements of the principle. The following overview presents only some aspects of the principle in a simplified form as an introduction to the more detailed description provided below.

[0073] This principle proposes a method comprising: - obtaining a first encoding mode for encoding residual blocks of an image when a first encoding mode is enabled, the first encoding mode indicating a first 2D transform from a first set of 2D transforms; - obtaining a second encoding mode for encoding the residual blocks when a second encoding mode is enabled, the second encoding mode indicating a second 2D transform from a second set of 2D transforms; - encoding the residual blocks according to the first encoding mode or the second encoding mode or both; wherein enabling or disabling encoding the residual blocks according to the second encoding mode depends on the first encoding mode, wherein one of the first set of 2D transforms and the second set of 2D transforms is a set of separable 2D transforms, and the other of the first set of 2D transforms and the second set of 2D transforms is a set of inseparable 2D transforms, wherein the second encoding mode is obtained from a set of candidate encoding modes, and the cardinality of the set of candidate encoding modes is defined according to the first encoding mode.

[0074] This principle proposes a device comprising components for performing the following operations: - when a first encoding mode is enabled, obtaining a first encoding mode for encoding residual blocks of an image, the first encoding mode indicating a first 2D transform from a first set of 2D transforms; - when a second encoding mode is enabled, obtaining a second encoding mode for encoding the residual blocks, the second mode indicating a second 2D transform from a second set of 2D transforms; - encoding the residual blocks according to the first encoding mode or the second encoding mode or both; wherein enabling or disabling encoding of the residual blocks according to the second encoding mode depends on the first encoding mode, wherein one of the first set of 2D transforms and the second set of 2D transforms is a set of separable 2D transforms, and the other of the first set of 2D transforms and the second set of 2D transforms is a set of inseparable 2D transforms, wherein the second encoding mode is obtained from a set of candidate encoding modes, and the cardinality of the set of candidate encoding modes is defined according to the first encoding mode.

[0075] This principle proposes another method comprising: - decoding a residual block according to a first encoding mode or a second encoding mode or both; wherein enabling or disabling decoding of the residual block according to the second encoding mode depends on the first encoding mode, wherein when the first encoding mode is enabled, the first encoding mode indicates a first 2D transform for decoding the residual block, wherein the first 2D transform is derived from a first set of 2D transforms; wherein when the second encoding mode is enabled, the second encoding mode indicates a second 2D transform for decoding the residual block, wherein the second 2D transform is derived from a second set of 2D transforms; and wherein one of the first set of 2D transforms and the second set of 2D transforms is a set of separable 2D transforms, and the other of the first set of 2D transforms and the second set of 2D transforms is a set of inseparable 2D transforms, wherein the second encoding mode is obtained from a set of candidate encoding modes, and the cardinality of the set of candidate encoding modes is defined according to the first encoding mode.

[0076] This principle proposes another device comprising components for performing the following operations: - decoding a residual block according to a first encoding mode or a second encoding mode or both; wherein enabling or disabling decoding of the residual block according to the second encoding mode depends on the first encoding mode, wherein when the first encoding mode is enabled, the first encoding mode indicates a first 2D transform for decoding the residual block, wherein the first 2D transform is derived from a first set of 2D transforms; wherein when the second encoding mode is enabled, the second encoding mode indicates a second 2D transform for decoding the residual block, wherein the second 2D transform is derived from a second set of 2D transforms; and wherein one of the first set of 2D transforms and the second set of 2D transforms is a set of separable 2D transforms, and the other of the first set of 2D transforms and the second set of 2D transforms is a set of inseparable 2D transforms, wherein the second encoding mode is obtained from a set of candidate encoding modes, and the cardinality of the set of candidate encoding modes is defined according to the first encoding mode.

[0077] This principle proposes a method for encoding residual blocks to overcome at least one drawback of existing technologies, the method comprising:

[0078] - When encoding the residual block according to the encoding mode associated with the first 2D transform is enabled, the first encoding mode associated with the first 2D transform is obtained;

[0079] - When encoding the residual block according to the encoding mode associated with the second 2D transform is enabled, a second encoding mode associated with the second 2D transform is obtained; and

[0080] - The residual block is encoded according to the first encoding mode, the second encoding mode, or both. The method is characterized in that enabling or disabling encoding of the residual block according to the second encoding mode depends on the first encoding mode.

[0081] This method allows for the restriction of the overall coding pattern, which results in reduced coding-side complexity and reduced, acceptable performance loss.

[0082] According to the embodiment, the first 2D transformation is a 2D separable transformation, and the second 2D transformation is a 2D non-separable transformation.

[0083] According to an embodiment, when the skip mode is disabled and when the first encoding mode belongs to a predefined set of candidate encoding modes, encoding of the residual block according to the second encoding mode is enabled.

[0084] According to an embodiment, when skip mode is disabled and when encoding of residual blocks according to the first encoding mode is disabled, encoding of residual blocks according to the second encoding mode is enabled.

[0085] According to an embodiment, the second coding pattern is obtained from the candidate coding pattern set (510), and / or the cardinality of the candidate coding pattern set and at least one candidate coding pattern are defined based on the first coding pattern and / or enabling or disabling encoding of residual blocks according to the second coding pattern.

[0086] According to other aspects of this principle, this principle relates to a method / apparatus for encoding / decoding images, comprising steps for encoding residual blocks according to a prior method, and a non-transitory storage medium carrying instructions of program code for performing steps of at least one of the above methods when the program is executed on a computing device.

[0087] The particular properties of this principle, as well as its other objects, advantages, features, and uses, will become apparent from the following description of examples taken in conjunction with the accompanying drawings. Attached Figure Description

[0088] The accompanying drawings illustrate an example of this principle. They show:

[0089] - Figure 1 The diagram illustrates a method for selecting an encoding mode for encoding residual blocks based on the interaction of JEM with EMT, NSST, and transform skip mode.

[0090] - Figure 2 A block diagram illustrating the steps of a method for encoding (and correspondingly decoding) parameters required to encode (and correspondingly decode) residual blocks is shown.

[0091] - Figure 3 This is a schematic block diagram illustrating an exemplary video encoder in which this principle can be implemented;

[0092] - Figure 4 This is a schematic block diagram illustrating an exemplary video decoder in which this principle can be implemented;

[0093] - Figure 5 A block diagram illustrating the steps of a method for encoding residual blocks according to an example of this principle is shown;

[0094] - Figure 6 An example of the architecture of a device based on this principle is shown; and

[0095] - Figure 7 An example of two remote devices communicating over a communication network is shown, based on this principle.

[0096] Similar or identical elements are represented by the same reference numeral. Detailed Implementation

[0097] The principle will be described more fully below with reference to the accompanying drawings, in which examples of the principle are shown. However, the principle can be implemented in many alternative forms and should not be construed as limited to the examples set forth herein. Thus, while the principle is readily available in various modifications and alternatives, specific examples are shown by way of example in the drawings and will be described in detail herein. However, it should be understood that there is no intention to limit the principle to the specific forms disclosed, but rather, this disclosure is intended to cover all modifications, equivalents, and alternatives falling within the spirit and scope of the principle as defined by the claims.

[0098] The terminology used herein is for the purpose of describing specific examples only and is not intended to limit the principles. As used herein, the singular forms “a,” “an,” and “the” are intended to include the plural forms as well, unless the context explicitly indicates otherwise. It will also be understood that, when used in this specification, the terms “comprises,” “comprising,” “include,” and / or “including” specify the presence of the stated feature, integral, step, operation, element, and / or component, but do not preclude the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or groups thereof. Furthermore, when an element is referred to as “responding” or “connected” to another element, it may directly respond to or be connected to the other element, or there may be intermediate elements. Conversely, when an element is referred to as “directly responding” or “directly connected” to another element, there are no intermediate elements. As used herein, the term “and / or” includes any and all combinations of one or more of the associated listed items and may be abbreviated to “ / .”

[0099] It will be understood that although the terms first, second, etc., may be used herein to describe various elements, these elements should not be limited by these terms. These terms are only used to distinguish one element from another. For example, the first element may be called the second element, and similarly, the second element may be called the first element without departing from the teachings of this principle.

[0100] Although some diagrams include arrows along the communication path to indicate the main direction of communication, it should be understood that communication can occur in the opposite direction to the arrows shown.

[0101] The block diagrams and operation flowcharts describe some examples, where each block represents a circuit element, module, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in other implementations, the functions marked in the blocks may occur in a non-linear order. For example, two blocks shown consecutively may actually execute substantially simultaneously, or these blocks may sometimes execute in reverse order, depending on the functions involved.

[0102] The use of "according to an example" or "in an example" here means that a specific feature, structure, or characteristic described in connection with the example may be included in at least one implementation of this principle. The phrase "according to an example" or "in an example" appearing in various places in the specification does not necessarily refer to the same example, and a single or alternative example is not necessarily mutually exclusive with other examples.

[0103] Reference numerals appearing in the claims are for illustrative purposes only and should not limit the scope of the claims.

[0104] Although not explicitly described, this embodiment and its variations can be adopted in any combination or sub-combination.

[0105] This principle is described for encoding / decoding a collection of images in a video, but it is extended to encoding / decoding still images, since each image in the video is encoded / decoded sequentially, as described below.

[0106] Figure 3 This is a schematic block diagram showing an exemplary video encoder 300 in which this principle can be implemented.

[0107] Traditionally, a video encoder 300 may include several modules for block-based video coding, such as Figure 3 As shown in the diagram, the image I to be encoded is input to the encoder 300. The encoder 300 includes a segmentation image unit for splitting the image I into block BLKs, and a mode selection unit for selecting the encoding mode of the block BLKs (e.g., rate / distortion-based optimization). Such a mode selection unit includes:

[0108] - Motion estimation module, used to estimate the motion between a current block of the image to be encoded and a reference image.

[0109] - Motion compensation module, used to predict the current block BLK using the estimated motion.

[0110] - Intra-frame prediction module, used for spatial prediction of the current block BLK.

[0111] The mode selection unit delivers the prediction block PRED and the corresponding syntax elements to be encoded in the bitstream for use in performing the same block prediction at the decoder.

[0112] Then, the residual block RES is obtained from the block BLK and the prediction block PRED. The residual block RES is transformed by a transform processing module configured to implement this principle, and the transformed coefficients TCOEFF are quantized by a quantization module that delivers the quantized residual transform coefficients QCOEF.

[0113] The syntax elements and the quantized residual transform coefficients QCOEF are then input to the entropy coding module to deliver the encoded video data. For example, the encoded video data is stored in memory or added to the bitstream STR for transmission to the decoder, for example.

[0114] The quantized residual transform coefficients COEF are processed by the inverse quantization module and the inverse transform module configured to implement this principle for reconstructing the residual block RES'.

[0115] The predicted block PRED is added to the reconstructed residual block RES' for use in reconstructing the block, which forms the reconstructed current image REC. The reconstructed current image REC is then added to the reference frame memory for later use as a reference image for encoding subsequent images of the video content.

[0116] Figure 4 This is a schematic block diagram illustrating an exemplary video decoder 400 in which the present principle can be implemented. The video decoder may include a receiver for a bitstream STR representing an encoded image or video, including encoded data representing at least one block of the image or video, wherein the block has been encoded according to embodiments of the present disclosure. The video decoder parses the bitstream STR to obtain encoded data, which is passed to an entropy decoding module. The entropy decoding module performs entropy decoding and delivers quantized coefficients QCOEF' to an inverse quantization module and syntax elements to a prediction module. The quantized coefficients QCOEF' are inverse quantized by the inverse quantization module, and the inverse quantized coefficients TCOEFF' are inversely transformed by an inverse transform module, which delivers residual block data RES'. The inverse transform module is configured to implement the present principle. The prediction module constructs a prediction block PRED based on the syntax elements and, if the current block has been inter-frame predicted, uses a motion compensation module, or if the current block has been spatially predicted, uses an intra-frame prediction module. The reconstructed image I' is formed from the reconstructed blocks obtained by adding the predicted block PRED and the residual block RES'. The reconstructed image I' is added to the reference frame memory for later use as a reference frame. The reconstructed image I' is then output through the video decoder 400.

[0117] The video decoder 400 is configured to decode data that has been encoded by the video encoder 300.

[0118] The video encoder 300 (and video decoder 400) is not limited to a specific encoder, which can be, for example, a lossy image / video encoder such as JPEG, JPEG2000, MPEG2, HEVC Recommendation or H.264 / AVC Recommendation (“Advanced Video Coding for General Audiovisual Services”, H Series: Audiovisual and Multimedia Systems, Recommendation ITU-T H.264, ITU Telecommunication Standardization Sector, February 2014).

[0119] Figure 5 A block diagram illustrating the steps of a method for encoding residual blocks according to an example of this principle is shown.

[0120] In step 500, when encoding the residual block according to the encoding mode associated with the first 2D transform is enabled, the module obtains the first encoding mode associated with the first 2D transform.

[0121] In step 510, when encoding the residual block according to the encoding mode associated with the second 2D transform is enabled, the module obtains the second encoding mode associated with the second 2D transform (different from the first 2D transform).

[0122] In step 520, the module enables or disables the encoding of the residual block according to the second encoding mode according to the first encoding mode.

[0123] In step 530, the module encodes the residual block according to the first encoding mode or the second encoding mode (if enabled) or both.

[0124] Preferably, the first 2D transformation and the second 2D transformation can be separable or inseparable 2D transformations.

[0125] According to a non-limiting embodiment of this principle, the first encoding mode is index EMTidx, as defined in the introduction, and the second encoding mode is index NSSTidx, as defined in the introduction. Therefore, the first encoding mode indicates a 2D separable transformation constructed by combining a 1D horizontal transformation with a 1D vertical transformation, and the second encoding mode indicates a 2D non-separable transformation, as explained in the introduction (Tables 1, 2, and 3).

[0126] According to this example, enabling or disabling NSST depends on the value of EMTidx.

[0127] According to another non-limiting embodiment of this principle, the first encoding mode is index NSSTidx, and the second encoding mode is index EMTidx, as defined in the introduction. Therefore, the first encoding mode indicates a 2D non-separable transformation, and the second encoding mode indicates a 2D separable transformation, as explained in the introduction (Tables 1, 2, and 3), and according to this example, enabling or disabling EMT depends on the value of NSSTidx.

[0128] Generally, according to this principle, a first encoding mode can indicate a separable or non-separable 2D transformation, and a second encoding mode can indicate a separable or non-separable 2D transformation and a second encoding mode; enabling or disabling the encoding of the residual block according to the second encoding mode depends on the first encoding mode. The last feature described above applies independently of whether the first and / or second encoding modes indicate a separable or non-separable 2D transformation.

[0129] According to a variation of this principle, when the skip mode is disabled (Tskip=0) and the first coding mode mentioned above belongs to a predefined set of candidate coding modes, the coding of the residual block according to the second coding mode mentioned above is enabled.

[0130] Then, when Tskip=1 and / or when the first coding pattern does not belong to the predetermined set of candidate coding patterns, the coding of the residual block according to the second coding pattern is disabled.

[0131] Table 4 provides a non-limiting example of this variation of the principle, in which encoding of the residual block according to the second encoding mode (NSSTidx) is enabled when Tskip = 0 and the first encoding mode EMTidx < 1 (the predetermined set of candidate encoding modes equals a single value 0).

[0132] No EMT EMTidx = 0 EMTidx = 1 EMTidx = 2 EMTidx = 3 NSSTidx = 0 allow allow allow allow allow NSSTidx = 1 allow allow NSSTidx = 2 allow allow NSSTidx=3 allow allow

[0133] Table 4

[0134] Therefore, according to Table 4, NSST is enabled when the first coding index EMTidx = 0, and the coding of the residual block can depend on one of the first coding mode EMTidx and / or NSSTidx based on the rate-distortion optimization result (see the introduction section for more details).

[0135] Table 5 provides another non-limiting example of a variation of the above principle, wherein encoding of the residual block according to the second encoding mode (NSSTidx) is enabled when Tskip = 0 and the first encoding mode EMTidx = 0 or 2 (the predetermined set of candidate encoding modes here includes values ​​0 and 2).

[0136] Note that when the first encoding pattern belongs to the predetermined set of candidate encoding patterns, all possible NSST encoding patterns can be enabled or disabled, as shown in Table 5. Here, when EMTidx = 0, only the encoding pattern with index NSSTidx 1 is enabled, and when EMTidx = 2, the encoding patterns with index NSSTidx = 1 or 2 are enabled. Note that NSSTidx = 0 means that NSST is disabled.

[0137] No EMT EMTidx = 0 EMTidx = 1 EMTidx = 2 EMTidx = 3 NSSTidx = 0 allow allow allow allow allow NSSTidx = 1 allow allow allow NSSTidx = 2 allow allow NSSTidx=3 allow

[0138] Table 5

[0139] According to a variation of this principle, encoding of the residual block according to the second encoding mode is enabled when skip mode is disabled and when encoding of the residual block according to the first encoding mode is disabled, i.e., when Tskip = 0 and EMTflag = 0. Note that EMTflag = 0 means that CU is EMT disabled, that is, the residual block (each TU of CU) is encoded using the normal HEVC transform, instead of using the first 2D transform defined by the EMT mode.

[0140] When Tskip=1 and / or EMTflag=1, encoding of residual blocks according to the second encoding mode (NSSTidx) is not allowed.

[0141] According to a variation of the embodiment of step 510, a second coding pattern is obtained from the candidate coding pattern set, and the cardinality of the candidate coding pattern set and / or at least one of the candidate coding patterns in the candidate coding pattern set is defined according to the first coding pattern and / or whether to enable or disable encoding of the residual block according to the second coding pattern.

[0142] For example, when the first encoding mode is indicated by EMTidx and the second encoding mode is indicated by NSSTidx, the cardinality of the candidate encoding mode set and / or at least one of the candidate encoding modes is defined according to the values ​​of EMTidx and / or NSSTidx: NSSTidx = 0 means NSST is disabled, and NSSTidx ≠ 0 means NSST is enabled.

[0143] exist Figures 1-5In this context, a module is a functional unit that may or may not be associated with a distinguishable physical unit. For example, these modules, or some of them, may be grouped together in specific components or circuits, or contribute to the functionality of the software. Conversely, some modules may consist of separate physical entities. Devices compatible with this principle are implemented using pure hardware, such as dedicated hardware like ASICs or FPGAs or VLSIs (“Application-Specific Integrated Circuits”, “Field-Programmable Gate Arrays”, and “Very Large Scale Integration”, respectively), or from several integrated electronic components in an embedded device, or from a hybrid of hardware and software components.

[0144] Figure 6 This represents an exemplary architecture of device 60, which can be configured to implement information about... Figures 1-5 The method described.

[0145] Device 60 includes the following components linked together via data and address bus 61:

[0146] - A microprocessor 62 (or CPU), which is, for example, a DSP (or digital signal processor);

[0147] -ROM (or read-only memory) 63;

[0148] - RAM (or random access memory) 64;

[0149] -I / O interface 65, used to receive data to be transmitted from the application; and

[0150] - Battery 66.

[0151] According to the example, battery 66 is external to the device. In each mentioned memory, the term "register" used in the specification can correspond to a small area (a few bits) or a very large area (e.g., an entire program or a large amount of received or decoded data). ROM 63 includes at least a program and parameters. ROM 63 can store algorithms and instructions for executing techniques according to these principles. When powered on, CPU 62 loads the program from RAM and executes the corresponding instructions.

[0152] RAM 64 includes in registers the program executed by CPU 62 and uploaded after device 60 is turned on, input data, intermediate data for different states of the method, and other variables used to execute the method.

[0153] The implementations described herein can be implemented, for example, as methods or processes, apparatus, software programs, data streams, or signals. Even if discussed only in the context of a single form of implementation (e.g., only as a method or apparatus), the features under discussion can also be implemented in other forms (e.g., programs). Apparatus can be implemented, for example, in suitable hardware, software, and firmware. Methods can be implemented, for example, in apparatuses such as processors (which generally relate to processing devices, including, for example, computers, microprocessors, integrated circuits, or programmable logic devices). Processors also include communication devices, such as, for example, computers, cellular phones, portable / personal digital assistants (“PDAs”), and other devices that facilitate information communication between end users.

[0154] Based on an example of an encoder or encoder, obtain image I from the source. For example, the source belongs to a set including:

[0155] - Local storage (63 or 64), such as video storage or RAM (or random access memory), flash memory, ROM (or read-only memory), hard disk;

[0156] - Storage interface (65), such as an interface with mass storage, RAM, flash memory, ROM, optical disc or magnetic support;

[0157] - Communication interface (65), such as a wired interface (e.g., bus interface, WAN interface, LAN interface) or a wireless interface (e.g., IEEE 802.11 interface or Interface); and

[0158] - Image capture circuitry (e.g., sensors such as CCD (or charge-coupled devices) or CMOS (or complementary metal-oxide-semiconductor)).

[0159] Based on the example of a decoder or decoder, the decoded image I' is sent to the destination; specifically, the destination belongs to a set including the following:

[0160] - Local storage (63 or 64), such as video storage or RAM, flash storage, hard disk;

[0161] - Storage interface (65), such as an interface with mass storage, RAM, flash memory, ROM, optical disc or magnetic support;

[0162] - Communication interface (65), such as a wired interface (e.g., a bus interface (e.g., USB (or Universal Serial Bus)), a WAN interface, a LAN interface, an HDMI (High Definition Multimedia Interface) interface) or a wireless interface (e.g., an IEEE 802.11 interface, or Interface); and

[0163] -monitor.

[0164] Depending on the encoding or encoder example, the bitstream STR is sent to the destination. As an example, the bitstream STR is stored in local or remote memory, such as video memory (64) or RAM (64), hard disk (63). In a variant, the bitstream STR is sent to a storage interface (65) (e.g., an interface with mass storage, flash memory, ROM, optical disc, or magnetically supported memory), and / or transmitted via a communication interface (65) (e.g., an interface to a point-to-point link, communication bus, point-to-multipoint link, or broadcast network).

[0165] Depending on the example of the decoder or decoder, the bitstream STR is obtained from the source. Exemplarily, the bitstream STR is read from local memory, such as video memory (64), RAM (64), ROM (63), flash memory (63), or hard disk (63). In a variant, the bitstream STR is received from a storage interface (65) (e.g., an interface to a mass storage device, RAM, ROM, flash memory, optical disc, or magnetically supported device), and / or from a communication interface (65) (e.g., an interface to a point-to-point link, bus, point-to-multipoint link, or broadcast network).

[0166] Based on the example, it is configured to implement about Figure 3 and Figure 5 The device 60 describing the encoding method belongs to the following set:

[0167] -mobile device;

[0168] - Communication equipment;

[0169] -Gaming devices;

[0170] - Tablet (or tablet computer);

[0171] - Laptop computers;

[0172] -Still image camera;

[0173] -Camera;

[0174] - Encoding chip;

[0175] - Still image server; and

[0176] - Video server (e.g., broadcast server, video-on-demand server, or web server).

[0177] Based on the example, it is configured to implement about Figure 4 and Figure 5 The device 60 describing the decoding method belongs to the following set:

[0178] -mobile device;

[0179] - Communication equipment;

[0180] -Gaming devices;

[0181] - Set-top box;

[0182] -TV set;

[0183] - Tablet (or tablet computer);

[0184] - Laptop computers;

[0185] - Monitor, and

[0186] -Decoding chip.

[0187] Based on an example of this principle, in Figure 7 As shown, in the context of a transmission between two remote devices A and B on a communication network NET, device A includes a processor associated with memory RAM and ROM, which are configured to implement as described above. Figure 5 The method described is for encoding residual blocks, or as per [the description of]... Figure 3 The described method for encoding images, and device B includes a processor associated with memory RAM and ROM, which are configured to implement as described above. Figure 5 The method described is for encoding residual blocks, or as per [the description of]... Figure 4 The method described is for decoding.

[0188] According to the example, the network is a broadcast network adapted to broadcast still images or video images from device A to decoding devices (including bitstream STR) including device B.

[0189] The various processing and features described herein can be implemented in a wide variety of different equipment or applications. Examples of such equipment include encoders, decoders, post-processors that process the output from decoders, pre-processors that provide input to encoders, video encoders, video decoders, video codecs, network servers, set-top boxes, laptops, personal computers, cellular phones, PDAs, and any other devices or other communication equipment used for processing images or videos. As should be clear, the equipment can be mobile and may even be installed in mobile vehicles.

[0190] Additionally, the method can be implemented by instructions being executed by a processor, and such instructions (and / or data values ​​generated by the implementation) can be stored on a computer-readable storage medium. The computer-readable storage medium can take the form of a computer-readable program product contained in one or more computer-readable media and having computer-executable computer-readable program code contained thereon. As used herein, a computer-readable storage medium is considered a non-transitory storage medium, giving it the inherent ability to store information therein and to provide the inherent ability to retrieve information therefrom. A computer-readable storage medium can be, for example, but not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any suitable combination of the foregoing. It should be understood that while more specific examples of computer-readable storage media to which this principle can be applied are provided below, they are merely illustrative and not exhaustive lists readily understood by one of ordinary skill in the art: portable computer disks; hard disks; read-only memory (ROM); erasable programmable read-only memory (EPROM or flash memory); portable compact disc read-only memory (CD-ROM); optical storage devices; magnetic storage devices; or any suitable combination of the foregoing.

[0191] Instructions can form an application that is tangibly contained on a processor-readable medium.

[0192] Instructions can be, for example, in hardware, firmware, software, or a combination thereof. Instructions can reside, for example, in an operating system, a standalone application, or a combination of both. Therefore, a processor can be characterized as both a device configured to perform processing and a device including a processor-readable medium (such as a storage device) having instructions for performing processing. Furthermore, in addition to instructions or alternatives to instructions, the processor-readable medium can store data values ​​generated by the implementation.

[0193] As will be apparent to those skilled in the art, implementations can generate various signals formatted to carry, for example, information that can be stored or transmitted. The information may include, for example, instructions for performing a method or data generated by one of the described implementations. For example, a signal may be formatted to carry as data rules a syntax for writing or reading the examples described in this principle, or as data actual syntax values ​​written by the examples described in this principle. For example, such a signal may be formatted as an electromagnetic wave (e.g., using the radio frequency portion of a spectrum) or a baseband signal. Formatting may include, for example, encoding a data stream and modulating a carrier wave with the encoded data stream. For example, the information carried by the signal may be analog or digital. As is known, signals can be transmitted via various wired or wireless links. Signals may be stored on a processor-readable medium.

[0194] Several implementations have been described. However, it will be understood that various modifications can be made. For example, elements of different implementations can be combined, supplemented, modified, or removed to produce other implementations. Furthermore, those skilled in the art will understand that other structures and processes can replace those disclosed, and the resulting implementations will perform at least substantially the same functions as the disclosed implementations in at least substantially the same manner to achieve at least substantially the same results. Therefore, this application considers these and other implementations.

Claims

1. A method for encoding residual blocks of an image, comprising: When the residual block is encoded according to the encoding mode associated with the first 2D transform, the first encoding mode associated with the first 2D transform is obtained; When the residual block is encoded according to the encoding mode associated with the second 2D transform, the second encoding mode associated with the second 2D transform is obtained; The first encoding mode indicates a first 2D transform from a first set of 2D transforms, and the second encoding mode indicates a second 2D transform from a second set of 2D transforms; One of the first 2D transformation set and the second 2D transformation set is an inseparable 2D transformation set, and the other of the first 2D transformation set and the second 2D transformation set is a separable 2D transformation set; - Encode the residual block according to the first encoding mode or the second encoding mode or both the first encoding mode and the second encoding mode; Enabling or disabling the encoding of the residual block according to the second encoding mode depends on the first encoding mode. The second encoding pattern is obtained from a set of candidate encoding patterns, and the cardinality of the set of candidate encoding patterns is defined according to the first encoding pattern.

2. The method according to claim 1 further includes encoding the image.

3. The method according to any one of claims 1-2, wherein at least one candidate encoding mode of the set of candidate encoding modes is defined by whether the encoding of the residual block is enabled or disabled according to the first encoding mode and / or according to the second encoding mode.

4. The method according to any one of claims 1-2, wherein one of the first encoding mode and the second encoding mode indicating an inseparable 2D transform has a first index, the value of the first index indicating whether the one of the first encoding mode and the second encoding mode is enabled, and when the first index indicates that the one of the first encoding mode and the second encoding mode is enabled, the value of the first index indicates the inseparable 2D transform in the set of inseparable 2D transforms, and When the other of the first and second encoding modes is enabled, the other of the first and second encoding modes indicating separable 2D transformations has a second index, the second index indicating the separable 2D transformation in the set of separable 2D transformations, wherein the second index indicates horizontal and vertical transformations to form the separable 2D transformation.

5. The method of claim 4, wherein enabling or disabling encoding of the residual block according to the second encoding mode depends on the value of the first index when the first encoding mode indicates the non-separable 2D transformation, or depends on the second index when the first encoding mode indicates the separable 2D transformation.

6. The method of claim 4, wherein the cardinality of the set of candidate coding patterns is defined according to the first index when the first coding pattern indicates the inseparable 2D transform or according to the second index when the first coding pattern indicates the separable 2D transform.

7. An apparatus for encoding residual blocks of an image, comprising components for performing the following operations: When the residual block is encoded according to the encoding mode associated with the first 2D transform, the first encoding mode associated with the first 2D transform is obtained; When the residual block is encoded according to the encoding mode associated with the second 2D transform, the second encoding mode associated with the second 2D transform is obtained; The first encoding mode indicates a first 2D transform from a first set of 2D transforms, and the second encoding mode indicates a second 2D transform from a second set of 2D transforms; One of the first 2D transformation set and the second 2D transformation set is an inseparable 2D transformation set, and the other of the first 2D transformation set and the second 2D transformation set is a separable 2D transformation set; - Encode the residual block according to the first encoding mode or the second encoding mode or both the first encoding mode and the second encoding mode; in, Enabling or disabling the encoding of the residual block according to the second encoding mode depends on the first encoding mode. The second encoding pattern is obtained from a set of candidate encoding patterns, and the cardinality of the set of candidate encoding patterns is defined according to the first encoding pattern.

8. The device according to claim 7, further comprising a component for encoding the image.

9. The device according to any one of claims 7-8, wherein at least one candidate encoding mode of the set of candidate encoding modes is defined by whether the encoding of the residual block is enabled or disabled according to the first encoding mode and / or according to the second encoding mode.

10. The device according to any one of claims 7-8, wherein the first encoding mode and the second encoding mode indicating an inseparable 2D transform have a first index, the value of the first index indicating whether the one of the first encoding mode and the second encoding mode is enabled, and when the first index indicates that the one of the first encoding mode and the second encoding mode is enabled, the value of the first index indicates the inseparable 2D transform in the set of inseparable 2D transforms, and When the other of the first and second encoding modes is enabled, the other of the first and second encoding modes indicating separable 2D transformations has a second index, the second index indicating separable 2D transformations in the set of separable 2D transformations, wherein the second index indicates horizontal and vertical transformations to form the separable 2D transformation.

11. The device of claim 10, wherein enabling or disabling encoding of the residual block according to the second encoding mode depends on the value of the first index when the first encoding mode indicates the inseparable 2D transformation, or depends on the value of the first index depending on the second index when the first encoding mode indicates the separable 2D transformation.

12. The device of claim 10, wherein the cardinality of the set of candidate coding patterns is defined according to the first index when the first coding pattern indicates the inseparable 2D transformation or according to the second index when the first coding pattern indicates the separable 2D transformation.

13. A method for decoding residual blocks of an image, comprising: - Decode the residual block according to a first encoding mode or a second encoding mode or both the first encoding mode and the second encoding mode; Enabling or disabling decoding of the residual block according to the second encoding mode depends on the first encoding mode. The first encoding mode relates to a first 2D transform when decoding of the residual block is enabled according to an encoding mode associated with a first 2D transform, and the first encoding mode indicates a first 2D transform from a first set of 2D transforms; the second encoding mode relates to a second 2D transform when decoding of the residual block is enabled according to an encoding mode associated with a second 2D transform, and the second encoding mode indicates a second 2D transform from a second set of 2D transforms. In this set, one of the first 2D transformation set and the second 2D transformation set is an inseparable 2D transformation set, and the other of the first 2D transformation set and the second 2D transformation set is a separable 2D transformation set. The second encoding pattern is obtained from a set of candidate encoding patterns, and the cardinality of the set of candidate encoding patterns is defined according to the first encoding pattern.

14. The method according to claim 13 further includes decoding the image.

15. The method according to any one of claims 13-14, wherein at least one candidate coding mode of the set of candidate coding modes is defined by whether decoding of the residual block according to the first coding mode and / or according to the second coding mode is enabled or disabled.

16. The method according to any one of claims 13-14, wherein one of the first encoding mode and the second encoding mode indicating an inseparable 2D transform has a first index, the value of the first index indicating whether the one of the first encoding mode and the second encoding mode is enabled, and when the first index indicates that the one of the first encoding mode and the second encoding mode is enabled, the value of the first index indicates the inseparable 2D transform in the set of inseparable 2D transforms, and When the other of the first and second encoding modes is enabled, the first encoding mode and the other of the second encoding modes, which indicate separable 2D transformations, have a second index. The second index indicates a separable 2D transformation in the set of separable 2D transformations, wherein the second index indicates horizontal and vertical transformations to form a separable 2D transformation.

17. The method of claim 16, wherein enabling or disabling decoding of the residual block according to the second encoding mode depends on the value of the first index when the first encoding mode indicates the inseparable 2D transform, or depends on the second index when the first encoding mode indicates the separable 2D transform.

18. The method of claim 16, wherein the cardinality of the set of candidate coding patterns is defined according to the first index when the first coding pattern indicates the inseparable 2D transform or according to the second index when the first coding pattern indicates the separable 2D transform.

19. The method of claim 16, wherein when the first encoding mode indicates the separable 2D transform, and wherein the second encoding mode is enabled if the first encoding mode is disabled or the second index is 0 or 2, otherwise the second encoding mode is disabled.

20. The method of claim 16, wherein when the first encoding mode indicates the inseparable 2D transformation, and wherein if the first encoding mode is disabled and the second encoding mode is enabled, the second index ranges from 0 to 3.

21. A non-transitory storage medium storing program code instructions that, when executed by a processor, perform the steps of at least one method according to claim 1 or 13.

22. An apparatus for decoding residual blocks of an image, comprising components for performing the following operations: The residual block is decoded according to a first encoding mode or a second encoding mode or both the first encoding mode and the second encoding mode; in, Enabling or disabling decoding of the residual block according to the second encoding mode depends on the first encoding mode. The first encoding mode relates to a first 2D transform when decoding the residual block is enabled according to an encoding mode associated with a first 2D transform, and the first encoding mode indicates a first 2D transform from a first set of 2D transforms; the second encoding mode relates to a second 2D transform when decoding the residual block is enabled according to an encoding mode associated with a second 2D transform, and the second encoding mode indicates a second 2D transform from a second set of 2D transforms. In this set, one of the first 2D transformation set and the second 2D transformation set is an inseparable 2D transformation set, and the other of the first 2D transformation set and the second 2D transformation set is a separable 2D transformation set. The second encoding pattern is obtained from a set of candidate encoding patterns, and the cardinality of the set of candidate encoding patterns is defined according to the first encoding pattern.

23. The device of claim 22, further comprising a component for decoding the image.

24. The device according to any one of claims 22-23, wherein, At least one candidate encoding mode is used to define the set of candidate encoding modes by enabling or disabling decoding of the residual block according to the first encoding mode and / or the second encoding mode.

25. The device according to any one of claims 22-23, wherein the first encoding mode and the second encoding mode indicating an inseparable 2D transform have a first index, the value of the first index indicating whether the one of the first encoding mode and the second encoding mode is enabled, and when the first index indicates that the one of the first encoding mode and the second encoding mode is enabled, the value of the first index indicates the inseparable 2D transform in the set of inseparable 2D transforms, and When the other of the first and second encoding modes is enabled, the other of the first and second encoding modes indicating the separable 2D transform has a second index, the second index indicating the separable 2D transform in the set of separable 2D transforms, wherein the second index indicates horizontal and vertical transforms to form the separable 2D transform.

26. The device of claim 25, wherein enabling or disabling decoding of the residual block according to the second encoding mode depends on the value of the first index when the first encoding mode indicates the inseparable 2D transformation, or depends on the second index when the first encoding mode indicates the separable 2D transformation.

27. The device of claim 25, wherein the cardinality of the set of candidate coding patterns is defined according to the first index when the first coding pattern indicates the inseparable 2D transformation or according to the second index when the first coding pattern indicates the separable 2D transformation.

28. The device of claim 25, wherein when the first encoding mode indicates the separable 2D transformation, and wherein the second encoding mode is enabled if the first encoding mode is disabled or the second index is 0 or 2, otherwise the second encoding mode is disabled.

29. The device of claim 25, wherein when the first encoding mode indicates the inseparable 2D transformation, and wherein if the first encoding mode is disabled and the second encoding mode is enabled, the second index ranges from 0 to 3.