Image processing apparatus and method

By assigning context variables based on parameters to the first bin of a bin sequence in image coding, the number of contexts and context coding bins are reduced, addressing the increased processing loads in conventional image coding methods.

JP2026032096APending Publication Date: 2026-02-25SONY GROUP CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2025201735
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2019-06-19
Filing Date
2025-11-21
Publication Date
2026-02-25

AI Technical Summary

Technical Problem

Conventional image coding methods increase the number of context variables and memory usage, leading to higher processing loads in encoding and decoding processes.

Method used

Assigning context variables based on parameters related to components or tree types to the first bin of a bin sequence in which adaptive orthogonal transform identifiers are binarized, and applying context coding or decoding accordingly.

Benefits of technology

Reduces the number of contexts and context coding bins, thereby suppressing memory usage and processing loads in encoding and decoding processes while maintaining coding efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026032096000001_ABST
    Figure 2026032096000001_ABST
Patent Text Reader

Abstract

To suppress an increase in load.SOLUTION: A predetermined context variable is assigned to the first bin of a bin string obtained by binarizing an adaptive orthogonal transformation identifier indicating the mode of adaptive orthogonal transformation in image encoding to perform context encoding. Further, a predetermined context variable is assigned to a first bin of a bin string obtained by binarizing an adaptive orthogonal transform identifier indicating a mode of inverse adaptive orthogonal transform in image decoding, and context decoding is performed. The present disclosure can be applied to, for example, an image processing device, an image encoding device, an image decoding device, an information processing device, an electronic apparatus, an image processing method, an information processing method, or the like.SELECTED DRAWING: Figure 4
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present disclosure relates to an image processing device and method, and more particularly to an image processing device and method that are capable of suppressing an increase in load. [Background technology]

[0002] In conventional image coding, an adaptive orthogonal transform identifier mts_idx is signaled (encoded and decoded) as mode information related to adaptive orthogonal transform (MTS (Multiple Transform Selection)). The adaptive orthogonal transform identifier mts_idx is encoded using context coding, which binarizes the adaptive orthogonal transform identifier mts_idx, assigns a context variable ctx to each bin in the bin sequence bins, and performs arithmetic coding. Furthermore, the coded data of the adaptive orthogonal transform identifier mts_idx is decoded using context decoding corresponding to the context coding. [Prior art documents] [Non-patent literature]

[0003] [Non-Patent Document 1] Benjamin Bross, Jianle Chen, Shan Liu, "Versatile Video Coding (Draft 5)", JVET-N1001v8, Joint Video Experts Team (JVET) of ITU-T SG 16 WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11 14th Meeting: Geneva, CH, 19-27 Mar. 2019 Summary of the Invention [Problem to be solved by the invention]

[0004] However, such a method may unnecessarily increase the number of context variables and memory usage, which may increase the load of encoding and decoding processes.

[0005] The present disclosure has been made in consideration of such circumstances, and aims to suppress an increase in the load of encoding and decoding processes. [Means for solving the problem]

[0006] An image processing device according to one aspect of the present technology is an image processing device that includes an encoding unit that performs context encoding by assigning a context variable based on a parameter related to a component to the first bin of a bin sequence in which an adaptive orthogonal transform identifier indicating a mode of adaptive orthogonal transform in image encoding is binarized.

[0007] An image processing method according to one aspect of the present technology is an image processing method that performs context encoding by assigning a context variable based on a parameter related to a component to the first bin of a bin sequence in which an adaptive orthogonal transform identifier indicating a mode of adaptive orthogonal transform in image coding is binarized.

[0008] An image processing device according to another aspect of the present technology is an image processing device including an encoding unit that performs context encoding by assigning a context variable based on a parameter related to a tree type to the first bin of a bin sequence in which an adaptive orthogonal transform identifier indicating a mode of adaptive orthogonal transform in image encoding is binarized.

[0009] An image processing method according to another aspect of the present technology is an image processing method that performs context encoding by assigning a context variable based on a parameter related to a tree type to the first bin of a bin sequence in which an adaptive orthogonal transform identifier indicating a mode of adaptive orthogonal transform in image coding is binarized.

[0010] An image processing device according to yet another aspect of the present technology is an image processing device including an encoding unit that assigns a context variable based on a parameter related to a component to the first bin of a bin sequence in which a secondary transformation identifier, which is an identifier related to a secondary transformation in image encoding, is binarized, and performs context encoding.

[0011] An image processing method according to yet another aspect of the present technology is an image processing method that performs context encoding by assigning a context variable based on a parameter related to a component to the first bin of a bin sequence in which a secondary transformation identifier, which is an identifier related to a secondary transformation in image encoding, is binarized.

[0012] An image processing device according to yet another aspect of the present technology is an image processing device including an encoding unit that assigns a context variable based on a parameter related to a tree type to the first bin of a bin sequence in which a secondary transformation identifier, which is an identifier related to a secondary transformation in image encoding, is binarized, and performs context encoding.

[0013] An image processing method according to yet another aspect of the present technology is an image processing method that performs context encoding by assigning a context variable based on a parameter related to a tree type to the first bin of a bin sequence in which a secondary transformation identifier, which is an identifier related to a secondary transformation in image encoding, is binarized.

[0014] An image processing device according to yet another aspect of the present technology is an image processing device including an encoding unit that assigns a context variable based on a parameter related to a component to the first bin of a bin sequence in which a transform skip flag, which is a flag related to skipping a primary transform and a secondary transform in image encoding, is binarized, and performs context encoding.

[0015] An image processing method according to yet another aspect of the present technology is an image processing method that performs context encoding by assigning a context variable based on a parameter related to a component to the first bin of a bin sequence in which a transform skip flag, which is a flag related to skipping a primary transform and a secondary transform in image encoding, is binarized.

[0016] An image processing device according to yet another aspect of the present technology is an image processing device including an encoding unit that performs context encoding by assigning a context variable based on a parameter related to a tree type to the first bin of a bin sequence in which a transform skip flag, which is a flag related to skipping primary transform and secondary transform in image encoding, is binarized.

[0017] An image processing method according to yet another aspect of the present technology is an image processing method that performs context encoding by assigning a context variable based on a parameter related to a tree type to the first bin of a bin sequence in which a transform skip flag, which is a flag related to skipping primary transforms and secondary transforms in image encoding, is binarized.

[0018] An image processing device according to yet another aspect of the present technology is an image processing device including a decoding unit that performs context decoding by assigning a context variable based on a parameter related to a component to the first bin of a bin sequence in which an adaptive orthogonal transform identifier indicating a mode of inverse adaptive orthogonal transform in image decoding is binarized.

[0019] An image processing method according to yet another aspect of the present technology is an image processing method that performs context decoding by assigning a context variable based on a parameter related to a component to the first bin of a bin sequence in which an adaptive orthogonal transform identifier indicating a mode of an inverse adaptive orthogonal transform in image decoding is binarized.

[0020] An image processing device according to yet another aspect of the present technology is an image processing device including a decoding unit that performs context decoding by assigning a context variable based on a parameter related to a tree type to the first bin of a bin sequence in which an adaptive orthogonal transform identifier indicating a mode of inverse adaptive orthogonal transform in image decoding is binarized.

[0021] An image processing method according to yet another aspect of the present technology is an image processing method that performs context decoding by assigning a context variable based on a parameter related to a tree type to the first bin of a bin sequence in which an adaptive orthogonal transform identifier indicating a mode of an inverse adaptive orthogonal transform in image decoding is binarized.

[0022] An image processing device according to yet another aspect of the present technology is an image processing device including a decoding unit that performs context decoding by assigning a context variable based on a parameter related to a component to the first bin of a bin sequence in which a secondary transformation identifier, which is an identifier related to an inverse secondary transformation in image decoding, is binarized.

[0023] An image processing method according to yet another aspect of the present technology is an image processing method that performs context decoding by assigning a context variable based on a parameter related to a component to the first bin of a bin sequence in which a secondary transform identifier, which is an identifier related to an inverse secondary transform in image decoding, is binarized.

[0024] An image processing device according to yet another aspect of the present technology is an image processing device including a decoding unit that performs context decoding by assigning a context variable based on a parameter related to a tree type to the first bin of a bin sequence in which a secondary transformation identifier, which is an identifier related to an inverse secondary transformation in image decoding, is binarized.

[0025] An image processing method according to yet another aspect of the present technology is an image processing method that performs context decoding by assigning a context variable based on a parameter related to a tree type to the first bin of a bin sequence in which a secondary transformation identifier, which is an identifier related to an inverse secondary transformation in image decoding, is binarized.

[0026] An image processing device according to yet another aspect of the present technology is an image processing device including a decoding unit that performs context decoding by assigning a context variable based on a parameter related to a component to the first bin of a bin sequence in which a transform skip flag, which is a flag related to skipping an inverse primary transform and an inverse secondary transform in image decoding, is binarized.

[0027] An image processing method according to yet another aspect of the present technology is an image processing method that performs context decoding by assigning a context variable based on a parameter related to a component to the first bin of a bin sequence in which a transform skip flag, which is a flag related to skipping an inverse primary transform and an inverse secondary transform in image decoding, is binarized.

[0028] An image processing device according to yet another aspect of the present technology is an image processing device including a decoding unit that performs context decoding by assigning a context variable based on a parameter related to a tree type to the first bin of a bin sequence in which a transform skip flag, which is a flag related to skipping an inverse primary transform and an inverse secondary transform in image decoding, is binarized.

[0029] An image processing method according to yet another aspect of the present technology is an image processing method that performs context decoding by assigning a context variable based on a parameter related to a tree type to the first bin of a bin sequence in which a transform skip flag, which is a flag related to skipping an inverse primary transform and an inverse secondary transform in image decoding, is binarized.

[0030] In an image processing device and method according to one aspect of the present technology, a context variable based on a parameter related to a component is assigned to the first bin of a bin sequence in which an adaptive orthogonal transform identifier indicating a mode of adaptive orthogonal transform in image coding is binarized, and then the first bin is context-coded.

[0031] In an image processing device and method according to another aspect of the present technology, a context variable based on a parameter related to a tree type is assigned to the first bin of a bin sequence in which an adaptive orthogonal transform identifier indicating a mode of adaptive orthogonal transform in image encoding is binarized, and then the first bin is context-coded.

[0032] In an image processing device and method according to yet another aspect of the present technology, a context variable based on a parameter related to a component is assigned to the first bin of a bin sequence in which a secondary transformation identifier, which is an identifier related to a secondary transformation in image encoding, is binarized, and then the first bin is context-coded.

[0033] In an image processing device and method according to yet another aspect of the present technology, a context variable based on a parameter related to a tree type is assigned to the first bin of a bin sequence in which a secondary transformation identifier, which is an identifier related to a secondary transformation in image encoding, is binarized, and then the first bin is context-coded.

[0034] In an image processing device and method according to still another aspect of the present technology, a context variable based on a parameter related to a component is assigned to the first bin of a bin sequence in which a transform skip flag, which is a flag related to skipping a primary transform and a secondary transform in image encoding, is binarized, and then the first bin is context-coded.

[0035] In an image processing device and method according to still another aspect of the present technology, a transform skip flag, which is a flag related to skipping primary and secondary transforms in image encoding, is binarized, and a context variable based on a parameter related to a tree type is assigned to the first bin of a bin sequence, and the first bin is then context-coded.

[0036] In an image processing device and method according to still another aspect of the present technology, a context variable based on a parameter related to a component is assigned to the first bin of a bin sequence in which an adaptive orthogonal transform identifier indicating a mode of an inverse adaptive orthogonal transform in image decoding is binarized, and then context decoding is performed.

[0037] In an image processing device and method according to still another aspect of the present technology, a context variable based on a parameter related to a tree type is assigned to the first bin of a bin sequence in which an adaptive orthogonal transform identifier indicating a mode of inverse adaptive orthogonal transform in image decoding is binarized, and then context decoding is performed.

[0038] In an image processing device and method according to yet another aspect of the present technology, a context variable based on a parameter related to a component is assigned to the first bin of a bin sequence in which a secondary transform identifier, which is an identifier related to an inverse secondary transform in image decoding, is binarized, and then context decoding is performed.

[0039] In an image processing device and method according to yet another aspect of the present technology, a context variable based on a parameter related to a tree type is assigned to the first bin of a bin sequence in which a secondary transform identifier, which is an identifier related to an inverse secondary transform in image decoding, is binarized, and then context decoding is performed.

[0040] In an image processing device and method according to still another aspect of the present technology, a context variable based on a parameter related to a component is assigned to the first bin of a bin sequence in which a transform skip flag, which is a flag related to skipping an inverse primary transform and an inverse secondary transform in image decoding, is binarized, and then context decoding is performed.

[0041] In an image processing device and method according to still another aspect of the present technology, a context variable based on a parameter related to a tree type is assigned to the first bin of a bin sequence in which a transform skip flag, which is a flag related to skipping an inverse primary transform and an inverse secondary transform in image decoding, is binarized, and then the first bin is context-decoded. [Brief explanation of the drawings]

[0042] [Figure 1] FIG. 10 is a diagram illustrating an example of how an adaptive orthogonal transform identifier is coded. [Figure 2] FIG. 10 is a diagram illustrating an example of how an adaptive orthogonal transform identifier is coded. [Figure 3] FIG. 10 illustrates an example of assignment of context variables to each bin of a bin sequence of an adaptive orthogonal transform identifier. [Figure 4] FIG. 10 illustrates an example of assignment of context variables to each bin of a bin sequence of an adaptive orthogonal transform identifier. [Figure 5] FIG. 10 is a diagram illustrating an example of an comparison of the number of contexts, the number of context coding bins, and the number of bypass coding bins for each method. [Figure 6] FIG. 1 is a block diagram illustrating an example of the main configuration of an image encoding device. [Figure 7] FIG. 2 is a block diagram illustrating an example of the main configuration of an encoding unit. [Figure 8] 10 is a flowchart illustrating an example of the flow of an image encoding process. [Figure 9] 10 is a flowchart illustrating an example of the flow of an encoding process. [Figure 10] FIG. 1 is a block diagram illustrating an example of the main configuration of an image decoding device. [Figure 11] FIG. 2 is a block diagram illustrating an example of the main configuration of a decoding unit. [Figure 12] 10 is a flowchart showing an example of the flow of an image decoding process. [Figure 13] 10 is a flowchart illustrating an example of the flow of a decoding process. [Figure 14] FIG. 10 illustrates an example of assignment of context variables to each bin of a bin sequence of an adaptive orthogonal transform identifier. [Figure 15] FIG. 10 illustrates an example of assignment of context variables to each bin of a bin sequence of an adaptive orthogonal transform identifier. [Figure 16] FIG. 10 is a diagram illustrating an example of an comparison of the number of contexts, the number of context coding bins, and the number of bypass coding bins for each method. [Figure 17] 10 is a flowchart illustrating an example of the flow of an encoding process. [Figure 18] 10 is a flowchart illustrating an example of the flow of a decoding process. [Figure 19] FIG. 10 illustrates an example of assignment of context variables to each bin of a bin sequence of an adaptive orthogonal transform identifier. [Figure 20] FIG. 10 illustrates an example of assignment of context variables to each bin of a bin sequence of an adaptive orthogonal transform identifier. [Figure 21] FIG. 10 is a diagram illustrating an example of an comparison of the number of contexts, the number of context coding bins, and the number of bypass coding bins for each method. [Figure 22] 10 is a flowchart illustrating an example of the flow of an encoding process. [Figure 23] 10 is a flowchart illustrating an example of the flow of a decoding process. [Figure 24] FIG. 10 illustrates an example of assignment of context variables to each bin of a bin sequence of an adaptive orthogonal transform identifier. [Figure 25] FIG. 10 illustrates an example of assignment of context variables to each bin of a bin sequence of an adaptive orthogonal transform identifier. [Figure 26] FIG. 10 is a diagram illustrating an example of an comparison of the number of contexts, the number of context coding bins, and the number of bypass coding bins for each method. [Figure 27] 10 is a flowchart illustrating an example of the flow of an encoding process. [Figure 28] 10 is a flowchart illustrating an example of the flow of a decoding process. [Figure 29] FIG. 10 illustrates an example of assignment of context variables to each bin of a bin sequence of an adaptive orthogonal transform identifier. [Figure 30]FIG. 10 illustrates an example of assignment of context variables to each bin of a bin sequence of an adaptive orthogonal transform identifier. [Figure 31] FIG. 10 is a diagram illustrating an example of the ratio of the area of ​​a coding block to the area of ​​a CTU. [Figure 32] FIG. 10 is a diagram illustrating an example of an comparison of the number of contexts, the number of context coding bins, and the number of bypass coding bins for each method. [Figure 33] 10 is a flowchart illustrating an example of the flow of an encoding process. [Figure 34] 10 is a flowchart illustrating an example of the flow of a decoding process. [Figure 35] FIG. 10 is a diagram illustrating an example of binarization of an adaptive orthogonal transform identifier. [Figure 36] FIG. 10 illustrates an example of assignment of context variables to each bin of a bin sequence of an adaptive orthogonal transform identifier. [Figure 37] FIG. 10 is a diagram illustrating an example of an comparison of the number of contexts, the number of context coding bins, and the number of bypass coding bins for each method. [Figure 38] 10 is a flowchart illustrating an example of the flow of an encoding process. [Figure 39] 10 is a flowchart illustrating an example of the flow of a decoding process. [Figure 40] FIG. 10 illustrates an example of syntax for a transform unit. [Figure 41] FIG. 10 is a diagram illustrating an example of syntax related to an orthogonal transform mode. [Figure 42] FIG. 10 illustrates an example of assignment of context variables to each bin of a bin sequence of an adaptive orthogonal transform identifier. [Figure 43] FIG. 10 illustrates an example of assignment of context variables to each bin of a bin sequence of an adaptive orthogonal transform identifier. [Figure 44] FIG. 10 is a diagram illustrating an example of an comparison of the number of contexts, the number of context coding bins, and the number of bypass coding bins for each method. [Figure 45] 10 is a flowchart illustrating an example of the flow of an encoding process. [Figure 46] 10 is a flowchart illustrating an example of the flow of a decoding process. [Figure 47] FIG. 1 is a block diagram illustrating an example of the main configuration of a computer. DETAILED DESCRIPTION OF THE INVENTION

[0043] Hereinafter, modes for carrying out the present disclosure (hereinafter referred to as embodiments) will be described in the following order. 1. Encoding of adaptive orthogonal transform identifier 2. First Embodiment 3. Second Embodiment 4. Third Embodiment 5. Fourth Embodiment 6. Fifth Embodiment 7. Sixth Embodiment 8. Seventh Embodiment 9. Notes

[0044] <1. Coding of adaptive orthogonal transform identifier> <1-1. Literature supporting technical content and terminology> The scope of disclosure of the present technology includes not only the contents described in the embodiments but also the contents described in the following non-patent documents that were publicly known at the time of filing, as well as the contents of other documents referenced in the following non-patent documents.

[0045] Non-patent document 1: (mentioned above) Non-patent document 2: Recommendation ITU-T H.264 (04 / 2017) "Advanced video coding for generic audiovisual services", April 2017 Non-patent document 3: Recommendation ITU-T H.265 (12 / 2016) "High efficiency video coding", December 2016 Unauthorized Document 4: J. Chen, E. Alshina, GJ Sullivan, J.-R. Ohm, J. Boyce, "Algorithm Description of Joint Exploration Test Model (JEM7)", JVET-G1001, Joint Video Exploration Team (JVET) of ITU-T SG 16 WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11 7th Meeting: Torino, IT, 13-21 July 2017 Non-licensed Document 5: B. Bross, J. Chen, S. Liu, "Versatile Video Coding (Draft 3)," JVET-L1001, Joint Video Experts Team (JVET) of ITU-T SG 16 WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11 12th Meeting: Macau, CN, 3-12 Oct. 2018 Unauthorized Document 6: JJ Chen, Y. Ye, S. Kim, "Algorithm description for Versatile Video Coding and Test Model 3 (VTM 3)", JVET-L1002, Joint Video Experts Team (JVET) of ITU-T SG 16 WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11 12th Meeting: Macau, CN, 3-12 Oct. 2018 Non-Patent Document 7: Jianle Chen, Yan Ye, Seung Hwan Kim, "Algorithm description for Versatile Video Coding and Test Model 5 (VTM 5)", JVET-N1002-v2, Joint Video Experts Team (JVET) of ITU-T SG 16 WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11 14th Meeting: Geneva, CH, 19-27 Mar. 2019 Non-Patent Document 8: Moonmo Koo, Jaehyun Lim, Mehdi Salehifar, Seung Hwan Kim, "CE6: Reduced Secondary Transform (RST) (CE6-3.1)", JVET-N0193, Joint Video Experts Team (JVET) of ITU-T SG 16 WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11 14th Meeting: Geneva, CH, 19-27 March 2019 Non-Patent Document 9: Mischa Siekmann, Martin Winken, Heiko Schwarz, Detlev Marpe "CE6 - related: Simplification of the Reduced Secondary Transform", JVET-N0555-v3, Joint Video Experts Team (JVET) of ITU-T SG 16 WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11 14th Meeting: Geneva, CH, 19-27 March 2019 Non-patent document 10: C. Rosewarne, J. Gan, "CE6-related: RST binarization", JVET-N0105-v2, Joint Video Experts Team (JVET) of ITU-T SG 16 WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11 14th Meeting: Geneva, CH, 19-27 March 2019

[0046] In other words, the contents of the above-mentioned non-patent documents are also used as a basis for determining the support requirements. For example, even if the Quad-Tree Block Structure and QTBT (Quad Tree Plus Binary Tree) Block Structure described in the above-mentioned non-patent documents are not directly described in the examples, they are considered to be within the scope of the disclosure of the present technology and to meet the support requirements of the claims. Similarly, even if technical terms such as parsing, syntax, and semantics are not directly described in the examples, they are considered to be within the scope of the disclosure of the present technology and to meet the support requirements of the claims.

[0047] Furthermore, in this specification, a "block" (not a block indicating a processing unit) used in the description as a partial region of an image (picture) or a processing unit refers to any partial region within a picture, and its size, shape, characteristics, etc. are not limited unless otherwise specified. For example, a "block" is intended to include any partial region (processing unit) such as a TB (Transform Block), TU (Transform Unit), PB (Prediction Block), PU (Prediction Unit), SCU (Smallest Coding Unit), CU (Coding Unit), LCU (Largest Coding Unit), CTB (Coding Tree Block), CTU (Coding Tree Unit), transform block, sub-block, macroblock, tile, or slice, as described in the above-mentioned non-patent document.

[0048] Furthermore, when specifying such block sizes, the block sizes may be specified not only directly but also indirectly. For example, the block sizes may be specified using identification information for identifying the sizes. Furthermore, for example, the block sizes may be specified by the ratio or difference with respect to the size of a reference block (e.g., LCU, SCU, etc.). For example, when transmitting information specifying the block size as a syntax element, the information indirectly specifying the size as described above may be used as the information. This may reduce the amount of information and improve coding efficiency. Furthermore, the specification of the block sizes may also include specification of a range of block sizes (e.g., specification of a range of allowable block sizes, etc.).

[0049] Furthermore, in this specification, "encoding" refers not only to the overall process of converting an image into a bitstream, but also to some of the processes. For example, it not only includes processes that encompass prediction processing, orthogonal transform, quantization, arithmetic coding, etc., but also includes a process that collectively refers to quantization and arithmetic coding, a process that encompasses prediction processing, quantization, and arithmetic coding, etc. Similarly, "decoding" refers not only to the overall process of converting a bitstream into an image, but also to some of the processes. For example, it not only includes processes that encompass inverse arithmetic decoding, inverse quantization, inverse orthogonal transform, prediction processing, etc., but also includes a process that encompasses inverse arithmetic decoding and inverse quantization, a process that encompasses inverse arithmetic decoding, inverse quantization, and prediction processing, etc.

[0050] <1-2. Context encoding and decoding of adaptive orthogonal transform identifier> In conventional image coding and decoding, the adaptive orthogonal transform identifier mts_idx is signaled (encoded and decoded) as mode information related to adaptive orthogonal transform (MTS (Multiple Transform Selection)). Context coding using the following contexts is applied to the coding of the adaptive orthogonal transform identifier mts_idx.

[0051] First, the adaptive orthogonal transform identifier mts_idx is binarized using a truncated unary code (TU) to obtain a bin string bins, as shown in Figure 1A. The TU code is equivalent to a truncated rice code (TR) with the Rice parameter cRiceParam = 0.

[0052] Next, arithmetic coding is performed by referring to a context variable ctx corresponding to each binIdx (an index indicating the ordinal number of the bin) in the bin sequence bins obtained by the TR. The index identifying the context variable ctx is called ctxInc (or ctxIdx).

[0053] Specifically, as shown in the table in FIG. 1B, the first bin in the bin sequence (binIdx = 0) is assigned a context variable ctx that corresponds one-to-one with the value of the CQT partition depth cqtDepth, which indicates the partition depth of the CU for the CTU using a quadtree. In the example in FIG. 1B, the context index ctxInc corresponding to the first bin sequence (binIdx = 0) is set to the smaller of the CQT partition depth cqtDepth or 5 (ctxInc = min(cqtDepth, 5)). In other words, since the occurrence (frequency) of 0s and 1s in the adaptive orthogonal transform may change depending on the partition depth, the context is also made variable accordingly to improve efficiency.

[0054] Furthermore, the second to fourth bins (binIdx=1...3) of the bin string bins are assigned context variables ctx (ctxInc=6...8 in the example of FIG. 1B) that correspond one-to-one to each binIdx.

[0055] Each bin in the bin string bins of the adaptive orthogonal transform identifier mts_idx can be interpreted as a flag corresponding to a transform type, as shown in the table in A of Fig. 2. In this example, the value of the first bin (binIdx = 0) corresponds to a flag indicating whether the transform type is DCT2xDCT2 (0 indicates Yes, 1 indicates No), the value of the second bin (binIdx = 1) corresponds to a flag indicating whether the transform type is DST7xDST7 (0 indicates Yes, 1 indicates No), the value of the third bin (binIdx = 2) corresponds to a flag indicating whether the transform type is DCT8xDST7 (0 indicates Yes, 1 indicates No), and the value of the fourth bin (binIdx = 3) corresponds to a flag indicating whether the transform type is DST7xDCT8 (0 indicates Yes, 1 indicates No).

[0056] The coded data of the adaptive orthogonal transform identifier mts_idx was decoded using a method corresponding to this coding, that is, context decoding using a context was applied.

[0057] However, such context encoding and decoding may increase the processing load.

[0058] For example, when the CQT division depth cqtDepth is a specific value, the adaptive orthogonal transform identifier mts_idx is not generated. As a result, there is a context variable ctx that is never used, and there is a risk that the memory usage will increase unnecessarily due to the context variable ctx (there is a risk that the memory capacity required for processing will increase).

[0059] For example, if all CU partitioning is performed using a quadtree, the CU size corresponding to each CQT partition depth cqtDepth when the CTU size is 128x128 is as shown in the table in FIG. 2B. In contrast, because adaptive orthogonal transform is not applied to blocks larger than 32x32, no adaptive orthogonal transform identifier mts_idx is generated for 128x128 CUs and 64x64 CUs. Therefore, among the context variables ctx corresponding to the first bin in the bin sequence bins of the adaptive orthogonal transform identifier mts_idx, ctxInc=0...1 is never used. In other words, there is a risk that these context variables ctx will unnecessarily increase memory usage.

[0060] Therefore, a predetermined context variable is assigned to the first bin of a bin sequence in which an adaptive orthogonal transform identifier indicating the mode of adaptive orthogonal transform in image coding is binarized, and then context coding is performed.

[0061] By doing this, it is possible to suppress an increase in the number of contexts assigned to the bin sequence of the adaptive orthogonal transform identifier, thereby suppressing an increase in memory usage and an increase in the load of the encoding and decoding processes.

[0062] Furthermore, a context variable based on a parameter related to the block size is assigned to the first bin of a bin sequence in which an adaptive orthogonal transform identifier indicating a mode of adaptive orthogonal transform in image coding is binarized, and then context coding is performed.

[0063] By doing this, it is possible to suppress an increase in the number of contexts assigned to the bin sequence of the adaptive orthogonal transform identifier, thereby suppressing an increase in memory usage and an increase in the load of the encoding and decoding processes.

[0064] <1-3. Bypass coding> Furthermore, the selection rates of the transform types are, in descending order, DCT (Discrete Cosine Transform) 2xDCT2, DST (Discrete Sine Transform) 7xDST7, DCT8xDST7, DST7xDCT8, and DCT8xDCT8. In other words, the selection rates of each transform type are not uniform. Therefore, it would be inefficient to assign the context variable ctx in the same way to all transform types, which could unnecessarily increase the total number of context coding bins. As described above, each bin in the bin sequence bins of the adaptive orthogonal transform identifier mts_idx can be interpreted as a flag corresponding to the transform type. In other words, it would be inefficient to assign the context variable ctx in the same way to each bin in the bin sequence bins, which could unnecessarily increase the total number of context coding bins.

[0065] Such an increase in the total number of context coding bins may increase the processing load (throughput) of CABAC (Context-based Adaptive Binary Arithmetic Code).

[0066] Therefore, bypass coding is applied to bins corresponding to transform types with a relatively low selection rate. This prevents a decrease in coding efficiency while suppressing an increase in the number of context coding bins, thereby suppressing an increase in the processing load (throughput) of CABAC. In other words, it is possible to suppress an increase in the load of the encoding process and the decoding process.

[0067] 2. First Embodiment <2-1. Coding of adaptive orthogonal transform identifier> In this embodiment, the assignment of context variables to each bin of a bin sequence obtained by binarizing an adaptive orthogonal transform identifier indicating the mode of adaptive orthogonal transform in image coding (Method 0), which was previously performed as shown in the table in B of Figure 1, is performed as follows.

[0068] That is, a predetermined context variable (a fixed (one-to-one correspondence) context variable) ctx is assigned to the first bin of the bin sequence, and the bin is then context-coded (method 1).

[0069] For example, as shown in the table in A of Figure 3, a predetermined context variable (an index ctxInc for identifying the context variable ctx) may be assigned to the first bin of a bin sequence in which the adaptive orthogonal transform identifier is binarized, and the first bin may be context-coded, and bypass coding may be performed on the second to fourth bins of the bin sequence (Method 1-1).

[0070] In the example of A in Figure 3, the first bin (binIdx = 0) of the bin string of the adaptive orthogonal transform identifier is assigned index ctxInc = A0 and is context coded, and the second to fourth bins (binIdx = 1...3) are each bypass coded (bypassed).

[0071] Also, for example, as shown in the table in B of FIG. 3, the first and second bins of a bin sequence in which the adaptive orthogonal transform identifier is binarized may be assigned different predetermined context variables (indexes ctxInc) and context-coded, and the third and fourth bins of the bin sequence may be bypass-coded (Method 1-2).

[0072] In the example of B in Figure 3, the first bin (binIdx = 0) in the bin sequence of the adaptive orthogonal transform identifier is assigned index ctxInc = A0 and is context coded, the second bin (binIdx = 1) is assigned index ctxInc = B1 and is context coded, and the third and fourth bins (binIdx = 2...3) are each bypass coded.

[0073] Furthermore, for example, as shown in the table in A of Figure 4, the first to third bins of a bin sequence in which the adaptive orthogonal transform identifier is binarized may be assigned predetermined different context variables (indexes ctxInc) and context coded, and the fourth bin of the bin sequence may be bypass coded (method 1-3).

[0074] In the example of A in Figure 4, the first bin (binIdx = 0) of the bin sequence of the adaptive orthogonal transform identifier is assigned the index ctxInc = A0 and is context coded, the second bin (binIdx = 1) is assigned the index ctxInc = B1 and is context coded, the third bin (binIdx = 2) is assigned the index ctxInc = B2 and is context coded, and the fourth bin (binIdx = 3) is bypass coded.

[0075] Furthermore, for example, as shown in the table in B of Figure 4, context coding may be performed by assigning predetermined different context variables (indexes ctxInc) to the first to fourth bins of a bin sequence in which the adaptive orthogonal transform identifier is binarized (method 1-4).

[0076] In the example of B in Figure 4, the first bin (binIdx = 0) in the bin sequence of the adaptive orthogonal transform identifier is assigned the index ctxInc = A0 and is context coded, the second bin (binIdx = 1) is assigned the index ctxInc = B1 and is context coded, the third bin (binIdx = 2) is assigned the index ctxInc = B2 and is context coded, and the fourth bin (binIdx = 3) is assigned the index ctxInc = B3 and is context coded.

[0077] In each table of FIG. 3 and FIG. 4, unique values ​​that do not overlap are set to the indexes A0, B1, B2, and B3.

[0078] Examples of the number of contexts, the number of context coding bins, and the number of bypass coding bins for each of these methods are shown in the table in Figure 5. For example, in method 0, the number of contexts is 9, the number of context coding bins is 4, and the number of bypass coding bins is 0. In contrast, in method 1-1, the number of contexts is 1, the number of context coding bins is 1, and the number of bypass coding bins is 3. In method 1-2, the number of contexts is 2, the number of context coding bins is 2, and the number of bypass coding bins is 2. Furthermore, in method 1-3, the number of contexts is 3, the number of context coding bins is 3, and the number of bypass coding bins is 1. In method 1-4, the number of contexts is 4, the number of context coding bins is 4, and the number of bypass coding bins is 0.

[0079] In this way, in any of Methods 1-1 to 1-4, the number of contexts required for encoding can be reduced compared to Method 0. That is, by applying Method 1, the number of contexts assigned to the first bin (binIdx = 0) can be reduced. Therefore, an increase in memory usage can be suppressed.

[0080] Furthermore, in any of Methods 1-1 to 1-3, the number of context coding bins required for coding can be reduced compared to Method 0. Note that in Method 1-4, the number of context coding bins required for coding is the same as in Method 0. In other words, by applying Method 1, bypass coding can be applied to bins corresponding to transform types with a relatively low selection rate. Therefore, it is possible to suppress an increase in the number of context coding bins and an increase in the amount of processing (throughput) while suppressing a decrease in coding efficiency.

[0081] As described above, by applying Method 1, it is possible to suppress an increase in the load of the encoding process.

[0082] <2-2. Decoding of adaptive orthogonal transform identifier> Similarly, in the case of decoding, the assignment of context variables to each bin of the bin sequence of binarized adaptive orthogonal transform identifiers indicating the mode of inverse adaptive orthogonal transform in image decoding (Method 0), which was previously performed as shown in the table in Figure 1B, is performed as follows.

[0083] That is, a predetermined context variable (a fixed (one-to-one correspondence) context variable) ctx is assigned to the first bin of the bin sequence, and context decoding is performed (method 1).

[0084] For example, as shown in the table in A of Figure 3, a predetermined context variable (an index ctxInc for identifying the context variable ctx) may be assigned to the first bin of a bin sequence of a binarized adaptive orthogonal transform identifier, and context decoding may be performed, and bypass decoding may be performed on the second to fourth bins of the bin sequence (method 1-1).

[0085] In the example of A in Figure 3, the first bin (binIdx = 0) of the bin sequence of the adaptive orthogonal transform identifier is assigned index ctxInc = A0 and is context decoded, and the second to fourth bins (binIdx = 1...3) are each bypass decoded.

[0086] Also, for example, as shown in the table in B of Figure 3, the first and second bins of the bin sequence of the binarized adaptive orthogonal transform identifier may be assigned different predetermined context variables (indexes ctxInc) and context-decoded, and the third and fourth bins of the bin sequence may be bypass-decoded (Method 1-2).

[0087] In the example of B in Figure 3, the first bin (binIdx = 0) in the bin sequence of the adaptive orthogonal transform identifier is assigned index ctxInc = A0 and is context decoded, the second bin (binIdx = 1) is assigned index ctxInc = B1 and is context decoded, and the third and fourth bins (binIdx = 2...3) are each bypass decoded.

[0088] Furthermore, for example, as shown in the table in A of Figure 4, the first to third bins of the bin sequence of the binarized adaptive orthogonal transform identifier may be assigned different predetermined context variables (indexes ctxInc) and context-decoded, and the fourth bin of the bin sequence may be bypass-decoded (Method 1-3).

[0089] In the example of A in Figure 4, the first bin (binIdx = 0) of the bin sequence of the adaptive orthogonal transform identifier is assigned the index ctxInc = A0 and is context decoded, the second bin (binIdx = 1) is assigned the index ctxInc = B1 and is context decoded, the third bin (binIdx = 2) is assigned the index ctxInc = B2 and is context decoded, and the fourth bin (binIdx = 3) is bypass decoded.

[0090] Furthermore, for example, as shown in the table in B of Figure 4, context decoding may be performed by assigning predetermined different context variables (indexes ctxInc) to the first to fourth bins of the bin sequence of the binarized adaptive orthogonal transform identifier (method 1-4).

[0091] In the example of B in Figure 4, the first bin (binIdx = 0) of the bin sequence of the adaptive orthogonal transform identifier is assigned the index ctxInc = A0 and is context decoded, the second bin (binIdx = 1) is assigned the index ctxInc = B1 and is context decoded, the third bin (binIdx = 2) is assigned the index ctxInc = B2 and is context decoded, and the fourth bin (binIdx = 3) is assigned the index ctxInc = B3 and is context decoded.

[0092] In the case of decoding, as in the case of encoding, unique values ​​that do not overlap are set to the indexes A0, B1, B2, and B3 in the tables of FIGS.

[0093] The number of contexts, the number of context coding bins, and the number of bypass coding bins for each of these methods are the same as in the coding case (FIG. 5).

[0094] In this way, in any of Methods 1-1 to 1-4, the number of contexts required for decoding can be reduced compared to Method 0. That is, by applying Method 1, the number of contexts assigned to the first bin (binIdx = 0) can be reduced. Therefore, an increase in memory usage can be suppressed.

[0095] Furthermore, in any of Methods 1-1 to 1-3, the number of context coding bins required for decoding can be reduced compared to Method 0. Note that in Method 1-4, the number of context coding bins required for decoding is the same as in Method 0. In other words, by applying Method 1, bypass decoding can be applied to bins corresponding to transform types with a relatively low selection rate. Therefore, it is possible to suppress an increase in the number of context coding bins and an increase in the amount of processing (throughput) while suppressing a decrease in coding efficiency.

[0096] As described above, by applying Method 1, it is possible to suppress an increase in the load of the decoding process.

[0097] <2-3. Encoding side> <Image encoding device> Next, the encoding side will be described. Fig. 6 is a block diagram showing an example of the configuration of an image encoding device, which is one aspect of an image processing device to which the present technology is applied. The image encoding device 100 shown in Fig. 6 is a device that encodes image data of a moving image. For example, the image encoding device 100 encodes image data of a moving image using an encoding method described in any of Non-Patent Documents 1 to 10.

[0098] Note that Fig. 6 shows the main processing units (blocks), data flows, etc., and is not limited to what is shown in Fig. 6. In other words, in the image encoding device 100, there may be processing units that are not shown as blocks in Fig. 6, and there may be processes and data flows that are not shown as arrows, etc. in Fig. 6.

[0099] As shown in FIG. 6 , the image coding device 100 includes a control unit 101, a rearrangement buffer 111, a calculation unit 112, an orthogonal transformation unit 113, a quantization unit 114, a coding unit 115, an accumulation buffer 116, an inverse quantization unit 117, an inverse orthogonal transformation unit 118, a calculation unit 119, an in-loop filter unit 120, a frame memory 121, a prediction unit 122, and a rate control unit 123.

[0100] <Control unit> The control unit 101 divides the video data held in the rearrangement buffer 111 into blocks (CUs, PUs, transform blocks, etc.) that are processing units based on an externally or pre-specified block size. The control unit 101 also determines coding parameters (header information Hinfo, prediction mode information Pinfo, transform information Tinfo, filter information Finfo, etc.) to be supplied to each block based on, for example, RDO (Rate-Distortion Optimization).

[0101] These coding parameters will be described in detail later. After determining the coding parameters as described above, the control unit 101 supplies them to each block. Specifically, this is as follows.

[0102] Header information Hinfo is provided for each block. The prediction mode information Pinfo is supplied to the encoding unit 115 and the prediction unit 122. The transformation information Tinfo is supplied to the encoding unit 115 , the orthogonal transformation unit 113 , the quantization unit 114 , the inverse quantization unit 117 , and the inverse orthogonal transformation unit 118 . The filter information Finfo is supplied to the in-loop filter unit 120 .

[0103] <Sorting buffer> Each field (input image) of video data is input to the image coding device 100 in its playback order (display order). The reordering buffer 111 acquires and holds (stores) each input image in its playback order (display order). Under the control of the control unit 101, the reordering buffer 111 reorders the input images in coding order (decoding order) and divides them into blocks, which are processing units. The reordering buffer 111 supplies each processed input image to the calculation unit 112. The reordering buffer 111 also supplies each input image (original image) to the prediction unit 122 and the in-loop filter unit 120.

[0104] <Arithmetic section> The calculation unit 112 receives an image I corresponding to a block of processing units and a predicted image P supplied from the prediction unit 122, subtracts the predicted image P from the image I as shown in the following equation, derives a prediction residual D, and supplies it to the orthogonal transformation unit 113.

[0105] D = I - P

[0106] <Orthogonal transformation section> The orthogonal transform unit 113 receives as input the prediction residual D supplied from the calculation unit 112 and the transformation information Tinfo supplied from the control unit 101, and performs an orthogonal transform on the prediction residual D based on the transformation information Tinfo to derive the transformation coefficient Coeff. Note that the orthogonal transform unit 113 can perform adaptive orthogonal transform that adaptively selects the type of orthogonal transform (transform coefficient). The orthogonal transform unit 113 supplies the obtained transformation coefficient Coeff to the quantization unit 114.

[0107] <Quantization part> The quantization unit 114 receives as input the transform coefficient Coeff supplied from the orthogonal transformation unit 113 and the transform information Tinfo supplied from the control unit 101, and scales (quantizes) the transform coefficient Coeff based on the transform information Tinfo. The quantization rate is controlled by the rate control unit 123. The quantization unit 114 supplies the quantized transform coefficient obtained by this quantization, i.e., the quantized transform coefficient level, to the encoding unit 115 and the inverse quantization unit 117.

[0108] <Encoding part> The encoding unit 115 receives as input the quantized transform coefficient level LEVEL supplied from the quantization unit 114, various encoding parameters (header information Hinfo, prediction mode information Pinfo, transformation information Tinfo, filter information Finfo, etc.) supplied from the control unit 101, information on filters such as filter coefficients supplied from the in-loop filter unit 120, and information on an optimal prediction mode supplied from the prediction unit 122. The encoding unit 115 performs variable-length coding (for example, arithmetic coding) on ​​the quantized transform coefficient level LEVEL to generate a bit string (encoded data).

[0109] Furthermore, the encoding unit 115 derives residual information Rinfo from the quantized transform coefficient level level, encodes the residual information Rinfo, and generates a bit string.

[0110] Furthermore, the encoding unit 115 includes information about the filter supplied from the in-loop filter unit 120 in the filter information Finfo, and includes information about the optimal prediction mode supplied from the prediction unit 122 in the prediction mode information Pinfo. Then, the encoding unit 115 encodes the various encoding parameters (header information Hinfo, prediction mode information Pinfo, transformation information Tinfo, filter information Finfo, etc.) described above to generate a bit string.

[0111] The encoding unit 115 multiplexes the bit strings of the various types of information generated as described above to generate encoded data, and supplies the encoded data to the accumulation buffer 116.

[0112] <Accumulation buffer> The accumulation buffer 116 temporarily stores the coded data obtained by the coding unit 115. The accumulation buffer 116 outputs the stored coded data, for example, as a bit stream or the like, to the outside of the image coding device 100 at a predetermined timing. For example, this coded data is transmitted to the decoding side via any recording medium, any transmission medium, any information processing device, or the like. In other words, the accumulation buffer 116 also functions as a transmission unit that transmits the coded data (bit stream).

[0113] <Inverse quantization section> The inverse quantization unit 117 performs processing related to inverse quantization. For example, the inverse quantization unit 117 receives the quantized transform coefficient level level supplied from the quantization unit 114 and the transformation information Tinfo supplied from the control unit 101 as input, and scales (inverse quantizes) the value of the quantized transform coefficient level level based on the transformation information Tinfo. Note that this inverse quantization is the inverse process of the quantization performed in the quantization unit 114.

[0114] The inverse quantization unit 117 supplies the transform coefficient Coeff_IQ obtained by such inverse quantization to the inverse orthogonal transformation unit 118. Note that since the inverse orthogonal transformation unit 118 is similar to the inverse orthogonal transformation unit (described later) on the decoding side, the description (described later) on the decoding side can be applied to the inverse quantization unit 117.

[0115] <Inverse orthogonal transform section> The inverse orthogonal transform unit 118 performs processing related to inverse orthogonal transform. For example, the inverse orthogonal transform unit 118 receives as input the transform coefficients Coeff_IQ supplied from the inverse quantization unit 117 and the transform information Tinfo supplied from the control unit 101, and performs inverse orthogonal transform on the transform coefficients Coeff_IQ based on the transform information Tinfo to derive a prediction residual D'. Note that this inverse orthogonal transform is the inverse process of the orthogonal transform performed in the orthogonal transform unit 113. In other words, the inverse orthogonal transform unit 118 can perform adaptive inverse orthogonal transform that adaptively selects the type of inverse orthogonal transform (transform coefficients).

[0116] The inverse orthogonal transform unit 118 supplies the prediction residual D' obtained by such inverse orthogonal transform to the calculation unit 119. Note that the inverse orthogonal transform unit 118 is similar to an inverse orthogonal transform unit (described later) on the decoding side, and therefore the description (described later) on the decoding side can be applied to the inverse orthogonal transform unit 118.

[0117] <Arithmetic section> The calculation unit 119 receives as input the prediction residual D' supplied from the inverse orthogonal transform unit 118 and the predicted image P supplied from the prediction unit 122. The calculation unit 119 adds the prediction residual D' to the predicted image P corresponding to the prediction residual D' to derive a locally decoded image Rlocal. The calculation unit 119 supplies the derived locally decoded image Rlocal to the in-loop filter unit 120 and the frame memory 121.

[0118] <In-loop filter section> The in-loop filter unit 120 performs processing related to in-loop filtering. For example, the in-loop filter unit 120 receives as input a locally decoded image Rlocal supplied from the calculation unit 119, filter information Finfo supplied from the control unit 101, and an input image (original image) supplied from the rearrangement buffer 111. Note that any information may be input to the in-loop filter unit 120, and information other than the above information may also be input. For example, information such as a prediction mode, motion information, a code amount target value, a quantization parameter QP, a picture type, and a block (CU, CTU, etc.) may be input to the in-loop filter unit 120 as needed.

[0119] The in-loop filter unit 120 performs appropriate filtering on the locally decoded image Rlocal based on the filter information Finfo. The in-loop filter unit 120 also uses the input image (original image) and other input information for the filtering, as necessary.

[0120] For example, the in-loop filter unit 120 applies four in-loop filters, namely, a bilateral filter, a deblocking filter (DBF (DeBlocking Filter)), an adaptive offset filter (SAO (Sample Adaptive Offset)), and an adaptive loop filter (ALF (Adaptive Loop Filter)), in this order. Note that which filters to apply and in what order they are applied are arbitrary and can be selected as appropriate.

[0121] Of course, the filtering process performed by the in-loop filter unit 120 is arbitrary and is not limited to the above example. For example, the in-loop filter unit 120 may apply a Wiener filter or the like.

[0122] The in-loop filter unit 120 supplies the filtered locally decoded image Rlocal to the frame memory 121. When transmitting information about the filter, such as a filter coefficient, to the decoding side, the in-loop filter unit 120 supplies the information about the filter to the encoding unit 115.

[0123] <Frame memory> The frame memory 121 performs processing related to the storage of image-related data. For example, the frame memory 121 receives as input the locally decoded image Rlocal supplied from the calculation unit 119 and the filtered locally decoded image Rlocal supplied from the in-loop filter unit 120, and holds (stores) them. The frame memory 121 also reconstructs and holds a decoded image R for each picture using the locally decoded image Rlocal (storing it in a buffer within the frame memory 121). The frame memory 121 supplies the decoded image R (or a part thereof) to the prediction unit 122 in response to a request from the prediction unit 122.

[0124] <Prediction Department> The prediction unit 122 performs processing related to the generation of a predicted image. For example, the prediction unit 122 receives as input prediction mode information Pinfo supplied from the control unit 101, an input image (original image) supplied from the rearrangement buffer 111, and a decoded image R (or a part thereof) read from the frame memory 121. The prediction unit 122 performs prediction processing such as inter prediction or intra prediction using the prediction mode information Pinfo and the input image (original image), performs prediction by referring to the decoded image R as a reference image, and performs motion compensation processing based on the prediction result to generate a predicted image P. The prediction unit 122 supplies the generated predicted image P to the calculation unit 112 and the calculation unit 119. Furthermore, the prediction unit 122 supplies information on the prediction mode selected by the above processing, i.e., the optimal prediction mode, to the encoding unit 115 as necessary.

[0125] <Rate control section> The rate control unit 123 performs processing related to rate control. For example, the rate control unit 123 controls the rate of the quantization operation of the quantization unit 114 based on the code amount of the coded data accumulated in the accumulation buffer 116 so as to prevent overflow or underflow.

[0126] These processing units (the control unit 101, the reordering buffer 111, the rate control unit 123, and the like) may have any configuration. For example, each processing unit may be configured with a logic circuit that realizes the above-described processing. Furthermore, each processing unit may have, for example, a central processing unit (CPU), a read-only memory (ROM), a random access memory (RAM), etc., and may execute a program using these to realize the above-described processing. Of course, each processing unit may have both of these configurations, and may realize part of the above-described processing using a logic circuit and the other part by executing a program. The configurations of the processing units may be independent of each other. For example, some processing units may realize part of the above-described processing using a logic circuit, other processing units may execute a program to realize the above-described processing, and still other processing units may realize the above-described processing using both a logic circuit and by executing a program.

[0127] <Encoding part> Fig. 7 is a block diagram showing an example of the main configuration of encoding unit 115 in Fig. 6. As shown in Fig. 7, encoding unit 115 has a binarization unit 131, a selection unit 132, a context setting unit 133, a context encoding unit 134, and a bypass encoding unit 135.

[0128] Note that although the encoding of the adaptive orthogonal transform identifier will be described here, as described above, the encoding unit 115 also encodes other encoding parameters, residual information Rinfo, etc. The encoding unit 115 encodes the adaptive orthogonal transform identifier by applying method 1 described in <2-1. Encoding of adaptive orthogonal transform identifier>.

[0129] The binarization unit 131 performs processing related to binarization of the adaptive orthogonal transform identifier. For example, the binarization unit 131 acquires the adaptive orthogonal transform identifier mts_idx supplied from the control unit 101. The binarization unit 131 then binarizes the adaptive orthogonal transform identifier using a truncated unary code (or a truncated Rice code) to generate a bin sequence. The binarization unit 131 then supplies the generated bin sequence to the selection unit 132.

[0130] The selection unit 132 performs processing related to selection of a supply destination of each bin of the bin sequence of the adaptive orthogonal transform identifier. For example, the selection unit 132 acquires the bin sequence of the adaptive orthogonal transform identifier supplied from the binarization unit 131.

[0131] Furthermore, the selection unit 132 selects whether to supply each bin of the bin sequence of the acquired adaptive orthogonal transform identifier to the context setting unit 133 or the bypass encoding unit 135. The selection unit 132 makes this selection according to Method 1 described above in <2-1. Coding of adaptive orthogonal transform identifier>. For example, the selection unit 132 may make this selection according to Method 1-1 (i.e., the table shown in A of FIG. 3). Alternatively, the selection unit 132 may make this selection according to Method 1-2 (i.e., the table shown in B of FIG. 3). Alternatively, the selection unit 132 may make this selection according to Method 1-3 (i.e., the table shown in A of FIG. 4). Alternatively, the selection unit 132 may make this selection according to Method 1-4 (i.e., the table shown in B of FIG. 4).

[0132] When a context variable (index ctxInc) is assigned and context coding is performed, the selection unit 132 supplies the bin to the context setting unit 133. When bypass coding is performed, the selection unit 132 supplies the bin to the bypass coding unit 135.

[0133] The context setting unit 133 performs processing related to context setting. For example, the context setting unit 133 obtains a bin supplied from the selection unit 132. The context setting unit 133 assigns a context variable (index ctxInc) to the bin. The context setting unit 133 performs the assignment according to Method 1 described above in <2-1. Coding of Adaptive Orthogonal Transform Identifier>. For example, the context setting unit 133 may perform the assignment according to Method 1-1 (i.e., the table shown in A of FIG. 3). Alternatively, the context setting unit 133 may perform the assignment according to Method 1-2 (i.e., the table shown in B of FIG. 3). Alternatively, the context setting unit 133 may perform the assignment according to Method 1-3 (i.e., the table shown in A of FIG. 4). Alternatively, the context setting unit 133 may perform the assignment according to Method 1-4 (i.e., the table shown in B of FIG. 4).

[0134] Furthermore, the context setting unit 133 can obtain the encoding result from the context encoding unit 134. The context setting unit 133 can appropriately update the context variable (index ctxInc) using the encoding result. The context setting unit 133 supplies the context variable (index ctxInc) derived in this manner to the context encoding unit 134.

[0135] The context coding unit 134 performs processing related to arithmetic coding. For example, the context coding unit 134 acquires a context variable (index ctxInc) supplied from the context setting unit 133. The context coding unit 134 then performs arithmetic coding using the context variable (index ctxInc). In other words, the context coding unit 134 performs context coding. The context coding unit 134 then supplies the coding result to the accumulation buffer 116 as coded data.

[0136] The bypass coding unit 135 performs processing related to bypass coding. For example, the bypass coding unit 135 acquires bins supplied from the selection unit 132. The bypass coding unit 135 performs bypass coding (arithmetic coding) on ​​the bins. The bypass coding unit 135 supplies the coding result to the accumulation buffer 116 as coded data.

[0137] As described above, each processing unit (binarization unit 131 to bypass coding unit 135) performs processing, and thus coding unit 115 can code the adaptive orthogonal transform identifier by applying method 1 (for example, any one of methods 1-1 to 1-4). This makes it possible to suppress an increase in memory usage. It also makes it possible to suppress an increase in the amount of processing (throughput). In other words, it makes it possible to suppress an increase in the load of the coding process.

[0138] <Image encoding process flow> Next, an example of the flow of image encoding processing executed by the image encoding device 100 configured as above will be described with reference to the flowchart of FIG.

[0139] When the image encoding process starts, in step S101, the reordering buffer 111 is controlled by the control unit 101 to reorder the frames of the input video data from the display order to the encoding order.

[0140] In step S102, the control unit 101 sets a processing unit for the input image held in the sorting buffer 111 (performs block division).

[0141] In step S103, the control unit 101 determines (sets) coding parameters for the input image held by the reordering buffer 111.

[0142] In step S104, the prediction unit 122 performs a prediction process to generate a predicted image etc. in an optimal prediction mode. For example, in this prediction process, the prediction unit 122 performs intra prediction to generate a predicted image etc. in an optimal intra prediction mode, performs inter prediction to generate a predicted image etc. in an optimal inter prediction mode, and selects an optimal prediction mode from among them based on a cost function value etc.

[0143] In step S105, the calculation unit 112 calculates the difference between the input image and the predicted image of the optimal mode selected by the prediction process in step S104. That is, the calculation unit 112 generates a prediction residual D between the input image and the predicted image. The prediction residual D calculated in this way has a reduced data amount compared to the original image data. Therefore, the data amount can be compressed compared to when the image is encoded as is.

[0144] In step S106, the orthogonal transform unit 113 performs an orthogonal transform process on the prediction residual D generated in the process of step S105, and derives a transform coefficient Coeff.

[0145] In step S107, the quantization unit 114 quantizes the transform coefficient Coeff obtained by the processing in step S106, for example, by using the quantization parameter calculated by the control unit 101, and derives the quantized transform coefficient level level.

[0146] In step S108, the inverse quantization unit 117 inverse quantizes the quantized transform coefficient level generated by the process of step S107 with characteristics corresponding to the quantization characteristics of step S107, to derive the transform coefficient Coeff_IQ.

[0147] In step S109, the inverse orthogonal transform unit 118 performs inverse orthogonal transform on the transform coefficient Coeff_IQ obtained by the process of step S108 using a method corresponding to the orthogonal transform process of step S106, thereby deriving a prediction residual D'. Note that this inverse orthogonal transform process is similar to the inverse orthogonal transform process (described later) performed on the decoding side, and therefore the explanation (described later) about the decoding side can be applied to the inverse orthogonal transform process of step S109.

[0148] In step S110, the calculation unit 119 generates a locally decoded image by adding the prediction image obtained by the prediction process in step S104 to the prediction residual D' derived in the process of step S109.

[0149] In step S111, the in-loop filter unit 120 performs in-loop filtering on the locally decoded image derived in the processing of step S110.

[0150] In step S112, the frame memory 121 stores the locally decoded image derived by the process of step S110 and the locally decoded image filtered in step S111.

[0151] In step S113, the encoding unit 115 encodes the quantized transform coefficient level LEVEL obtained by the process of step S107. For example, the encoding unit 115 encodes the quantized transform coefficient level LEVEL, which is information related to the image, by arithmetic coding or the like to generate encoded data. At this time, the encoding unit 115 also encodes various encoding parameters (header information Hinfo, prediction mode information Pinfo, and transform information Tinfo). Furthermore, the encoding unit 115 derives residual information RInfo from the quantized transform coefficient level LEVEL and encodes the residual information RInfo.

[0152] In step S114, the accumulation buffer 116 accumulates the encoded data obtained in this manner and outputs it, for example, as a bit stream, to the outside of the image encoding device 100. This bit stream is transmitted to the decoding side, for example, via a transmission path or a recording medium. In addition, the rate control unit 123 performs rate control as necessary.

[0153] When the process of step S114 ends, the image encoding process ends.

[0154] <Encoding process flow> In the encoding process of step S113 in Fig. 8, the encoding unit 115 encodes the adaptive orthogonal transform identifier mts_idx. At this time, the encoding unit 115 encodes the adaptive orthogonal transform identifier by applying Method 1 described in <2-1. Encoding of adaptive orthogonal transform identifier>. An example of the flow of encoding the adaptive orthogonal transform identifier mts_idx will be described with reference to the flowchart in Fig. 9.

[0155] When the encoding process starts, in step S131, the binarization unit 131 of the encoding unit 115 binarizes the adaptive orthogonal transform identifier mts_idx using a truncated unary code (or a truncated Rice code) to generate a bin string.

[0156] In step S132, the selection unit 132 processes the first bin (binIdx=0) in the bin string. In this case, the selection unit 132 selects the context setting unit 133 as the supply destination of the bin (i.e., selects context coding). For example, the selection unit 132 selects context coding as the coding method for this bin according to one of the tables shown in FIGS. 3 and 4 (i.e., applies one of Methods 1-1 to 1-4).

[0157] In step S133, the context setting unit 133 assigns a predetermined context variable ctx (index ctxInc) to the bin. Then, the context coding unit 134 performs arithmetic coding using the context variable. In other words, it performs context coding.

[0158] In step S134, the selection unit 132 selects an unprocessed bin from the second bin onward in the bin string as a processing target. In step S135, the selection unit 132 determines whether to bypass encode the bin to be processed. For example, the selection unit 132 determines whether to bypass encode the bin to be processed according to any of the tables shown in FIGS. 3 and 4 (i.e., by applying any of Methods 1-1 to 1-4).

[0159] If it is determined that bypass coding is to be performed, the process proceeds to step S136. That is, in this case, the selection unit 132 selects the bypass coding unit 135 as a supply destination of the bin. In step S136, the bypass coding unit 135 performs bypass coding (arithmetic coding) on ​​the bin to be processed. When the process of step S136 ends, the process proceeds to step S138.

[0160] On the other hand, if it is determined in step S135 that bypass coding is not to be performed (context coding is to be performed), the process proceeds to step S137. That is, in this case, the selection unit 132 selects the context setting unit 133 as a supply destination of the bin. In step S137, the context setting unit 133 assigns a predetermined context variable ctx (index ctxInc) to the bin. Then, the context coding unit 134 performs arithmetic coding using the context variable. That is, context coding is performed. When the process of step S137 ends, the process proceeds to step S138.

[0161] In step S138, the encoding unit 115 determines whether or not to end the encoding of the adaptive orthogonal transform identifier mts_idx. If it is determined not to end, the process returns to step S134, and the subsequent processes are repeated. Also, if it is determined to end in step S138, the encoding process ends.

[0162] By performing each process in this manner, the encoding unit 115 can encode the adaptive orthogonal transform identifier by applying method 1 (for example, any one of methods 1-1 to 1-4). Therefore, it is possible to suppress an increase in memory usage. It is also possible to suppress an increase in the amount of processing (throughput). In other words, it is possible to suppress an increase in the load of the encoding process.

[0163] <2-4. Decryption side> <Image decoding device> Next, the decoding side will be described. Fig. 10 is a block diagram showing an example of the configuration of an image decoding device, which is one aspect of an image processing device to which the present technology is applied. The image decoding device 200 shown in Fig. 10 is a device that encodes encoded data of a video image. For example, the image decoding device 200 decodes the encoded data using a decoding method described in any of Non-Patent Documents 1 to 10, and generates video data. For example, the image decoding device 200 decodes the encoded data (bit stream) generated by the above-mentioned image encoding device 100, and generates video data.

[0164] Note that Fig. 10 shows the main processing units, data flows, etc., and does not necessarily show everything. That is, in the image decoding device 200, there may be processing units that are not shown as blocks in Fig. 10, and there may be processing or data flows that are not shown as arrows, etc. in Fig. 10.

[0165] 10, the image decoding device 200 includes an accumulation buffer 211, a decoding unit 212, an inverse quantization unit 213, an inverse orthogonal transform unit 214, a calculation unit 215, an in-loop filter unit 216, a rearrangement buffer 217, a frame memory 218, and a prediction unit 219. The prediction unit 219 includes an intra prediction unit and an inter prediction unit, which are not shown.

[0166] <Accumulation buffer> The accumulation buffer 211 acquires and holds (stores) the bitstream input to the image decoding device 200. The accumulation buffer 211 supplies the accumulated bitstream to the decoding unit 212 at a predetermined timing or when a predetermined condition is met.

[0167] <Decryption section> The decoding unit 212 performs processing related to image decoding. For example, the decoding unit 212 receives a bit stream supplied from the accumulation buffer 211 as input, and performs variable-length decoding of the syntax values ​​of each syntax element from the bit string in accordance with the definition of the syntax table, thereby deriving parameters.

[0168] The parameters derived from the syntax elements and the syntax values ​​of the syntax elements include, for example, header information Hinfo, prediction mode information Pinfo, transformation information Tinfo, residual information Rinfo, filter information Finfo, etc. That is, the decoding unit 212 parses (analyzes and obtains) this information from the bitstream. These pieces of information will be described below.

[0169] <Header information Hinfo> The header information Hinfo includes header information such as a video parameter set (VPS), a sequence parameter set (SPS), a picture parameter set (PPS), a slice header (SH), etc. The header information Hinfo includes information that specifies, for example, an image size (horizontal width PicWidth, vertical width PicHeight), a bit depth (luminance bitDepthY, chrominance bitDepthC), a chrominance array type ChromaArrayType, a maximum CU size (MaxCUSize) / a minimum CU size (MinCUSize), a maximum depth MaxQTDepth / a minimum depth MinQTDepth of quad-tree partitioning (also referred to as quad-tree partitioning), a maximum depth MaxBTDepth / a minimum depth MinBTDepth of binary-tree partitioning, a maximum transform skip block size MaxTSSize (also referred to as maximum transform skip block size), an on / off flag (also referred to as a valid flag) of each encoding tool, etc.

[0170] For example, the on / off flags for the encoding tools included in the header information Hinfo include on / off flags related to the following conversion and quantization processes. Note that the on / off flags for the encoding tools can also be interpreted as flags indicating whether or not syntax related to the encoding tool is present in the encoded data. Furthermore, if the value of the on / off flag is 1 (true), it indicates that the encoding tool is usable, and if the value of the on / off flag is 0 (false), it indicates that the encoding tool is unusable. Note that the interpretation of the flag values ​​may be reversed.

[0171] Inter-component prediction enabled flag (ccp_enabled_flag): Flag information indicating whether inter-component prediction (CCP (Cross-Component Prediction), also referred to as CC prediction) is available. For example, if this flag information is "1" (true), it indicates that it is available, and if it is "0" (false), it indicates that it is not available.

[0172] This CCP is also called cross-component linear prediction (CCLM or CCLMP).

[0173] <Prediction mode information Pinfo> The prediction mode information Pinfo includes, for example, size information PBSize (prediction block size) of the processing target PB (prediction block), intra prediction mode information IPinfo, motion prediction information MVinfo, and the like.

[0174] The intra prediction mode information IPinfo includes, for example, prev_intra_luma_pred_flag, mpm_idx, and rem_intra_pred_mode in JCTVC-W1005, 7.3.8.5 Coding Unit syntax, and a luma intra prediction mode IntraPredModeY derived from the syntax.

[0175] In addition, the intra-prediction mode information IPinfo includes, for example, an inter-component prediction flag (ccp_flag (cclmp_flag)), a multi-class linear prediction mode flag (mclm_flag), a chrominance sample position type identifier (chroma_sample_loc_type_idx), a chrominance MPM identifier (chroma_mpm_idx), and a luminance intra-prediction mode (IntraPredModeC) derived from these syntaxes.

[0176] The inter-component prediction flag (ccp_flag (cclmp_flag)) is flag information indicating whether or not inter-component linear prediction is applied. For example, when ccp_flag==1, it indicates that inter-component prediction is applied, and when ccp_flag==0, it indicates that inter-component prediction is not applied.

[0177] The multi-class linear prediction mode flag (mclm_flag) is information related to the linear prediction mode (linear prediction mode information). More specifically, the multi-class linear prediction mode flag (mclm_flag) is flag information indicating whether to use the multi-class linear prediction mode. For example, "0" indicates a one-class mode (single-class mode) (e.g., CCLMP), and "1" indicates a two-class mode (multi-class mode) (e.g., MCLMP).

[0178] The chroma sample location type identifier (chroma_sample_loc_type_idx) is an identifier that identifies the type of pixel location of a chroma component (also referred to as a chroma sample location type). For example, if the chroma array type (ChromaArrayType), which is information about the color format, indicates the 420 format, the chroma sample location type identifier is assigned according to the following formula:

[0179] chroma_sample_loc_type_idx == 0:Type2 chroma_sample_loc_type_idx == 1:Type3 chroma_sample_loc_type_idx == 2:Type0 chroma_sample_loc_type_idx == 3:Type1

[0180] Note that this chrominance sample location type identifier (chroma_sample_loc_type_idx) is transmitted (stored in) information about the pixel location of the chrominance component (chroma_sample_loc_info()).

[0181] The chrominance MPM identifier (chroma_mpm_idx) is an identifier indicating which prediction mode candidate in the chrominance intra prediction mode candidate list (intraPredModeCandListC) is to be specified as the chrominance intra prediction mode.

[0182] The motion prediction information MVinfo includes information such as merge_idx, merge_flag, inter_pred_idc, ref_idx_LX, mvp_lX_flag, X={0,1}, mvd, etc. (see, for example, JCTVC-W1005, 7.3.8.6 Prediction Unit Syntax).

[0183] Of course, the prediction mode information Pinfo may include any information, and may include information other than the above information.

[0184] <Conversion information Tinfo> The conversion information Tinfo includes, for example, the following information: Of course, the information included in the conversion information Tinfo is arbitrary, and information other than the above information may be included.

[0185] The width size TBWSize and height TBHSize of the transform block to be processed (or the logarithmic values ​​log2TBWSize and log2TBHSize of TBWSize and TBHSize, respectively, with base 2). Transform skip flag (transform_skip_flag): A flag indicating whether or not to skip the (inverse) primary transform and the (inverse) secondary transform. Scan Identifier (scanIdx) Secondary Transformation Identifier (st_idx) Adaptive orthogonal transform identifier (mts_idx) Quantization parameter (qp) Quantization matrix (scaling_matrix (e.g., JCTVC-W1005, 7.3.4 Scaling list data syntax))

[0186] <Residual information Rinfo> The residual information Rinfo (see, for example, 7.3.8.11 Residual Coding syntax in JCTVC-W1005) includes, for example, the following syntax:

[0187] cbf(coded_block_flag): residual data presence flag last_sig_coeff_x_pos: Last non-zero transform coefficient X coordinate last_sig_coeff_y_pos: Last non-zero transform coefficient Y coordinate coded_sub_block_flag: Sub-block non-zero transform coefficient presence / absence flag sig_coeff_flag: Non-zero transform coefficient presence / absence flag gr1_flag: Flag indicating whether the level of a non-zero transform coefficient is greater than 1 (also called the GR1 flag) gr2_flag: Flag indicating whether the level of a non-zero transform coefficient is greater than 2 (also called the GR2 flag) sign_flag: The sign indicating the sign of a non-zero transform coefficient (also called the sign sign) coeff_abs_level_remaining: Residual level of non-zero transform coefficients (also called non-zero transform coefficient residual level) etc.

[0188] Of course, the residual information Rinfo may include any information, and may include information other than the above information.

[0189] <Filter information Finfo> The filter information Finfo includes, for example, control information related to each of the following filter processes:

[0190] Control information for the deblocking filter (DBF) Control information for pixel adaptive offset (SAO) Control information for the adaptive loop filter (ALF) Other control information for linear and nonlinear filters

[0191] More specifically, for example, the information includes information specifying the picture to which each filter is applied, an area within the picture, filter On / Off control information for each CU, filter On / Off control information related to slice and tile boundaries, etc. Of course, any information may be included in the filter information Finfo, and information other than these may be included.

[0192] Returning to the description of the decoding unit 212, the decoding unit 212 derives the quantized transform coefficient level "level" at each coefficient position in each transform block by referring to the residual information Rinfo. The decoding unit 212 supplies the quantized transform coefficient level "level" to the inverse quantization unit 213.

[0193] Furthermore, the decoding unit 212 supplies the parsed header information Hinfo, prediction mode information Pinfo, quantized transform coefficient level level, transform information Tinfo, and filter information Finfo to each block.

[0194] The header information Hinfo is supplied to the inverse quantization unit 213 , the inverse orthogonal transformation unit 214 , the prediction unit 219 , and the in-loop filter unit 216 . The prediction mode information Pinfo is supplied to the inverse quantization unit 213 and the prediction unit 219 . The transformation information Tinfo is supplied to the inverse quantization unit 213 and the inverse orthogonal transformation unit 214 . The filter information Finfo is supplied to the in-loop filter unit 216 .

[0195] Of course, the above example is merely an example and is not limiting. For example, each encoding parameter may be supplied to any processing unit. Furthermore, other information may be supplied to any processing unit.

[0196] <Inverse quantization section> The inverse quantization unit 213 has at least a configuration necessary for performing processing related to inverse quantization. For example, the inverse quantization unit 213 receives the transformation information Tinfo and the quantized transformation coefficient level level supplied from the decoding unit 212 as input, scales (inverse quantizes) the value of the quantized transformation coefficient level level based on the transformation information Tinfo, and derives the transformation coefficient Coeff_IQ after inverse quantization.

[0197] Note that this inverse quantization is performed as the inverse process of the quantization performed by the quantization unit 114 of the image encoding device 100. Furthermore, this inverse quantization is the same process as the inverse quantization performed by the inverse quantization unit 117 of the image encoding device 100. In other words, the inverse quantization unit 117 of the image encoding device 100 performs the same process (inverse quantization) as the inverse quantization unit 213.

[0198] The inverse quantization unit 213 supplies the derived transform coefficient Coeff_IQ to the inverse orthogonal transformation unit 214 .

[0199] <Inverse orthogonal transform section> The inverse orthogonal transform unit 214 performs processing related to inverse orthogonal transform. For example, the inverse orthogonal transform unit 214 receives the transform coefficients Coeff_IQ supplied from the inverse quantization unit 213 and the transform information Tinfo supplied from the decoding unit 212 as input, and performs inverse orthogonal transform processing on the transform coefficients Coeff_IQ based on the transform information Tinfo to derive a prediction residual D'.

[0200] This inverse orthogonal transform is performed as the inverse process of the orthogonal transform performed by the orthogonal transform unit 113 of the image encoding device 100. This inverse orthogonal transform is the same process as the inverse orthogonal transform performed by the inverse orthogonal transform unit 118 of the image encoding device 100. In other words, the inverse orthogonal transform unit 118 of the image encoding device 100 performs the same process (inverse orthogonal transform) as the inverse orthogonal transform unit 214.

[0201] The inverse orthogonal transform unit 214 supplies the derived prediction residual D′ to the calculation unit 215.

[0202] <Arithmetic section> The calculation unit 215 performs processing related to addition of information related to images. For example, the calculation unit 215 receives as input a prediction residual D' supplied from the inverse orthogonal transform unit 214 and a predicted image P supplied from the prediction unit 219. As shown in the following equation, the calculation unit 215 adds the prediction residual D' and the predicted image P (prediction signal) corresponding to the prediction residual D' to derive a locally decoded image Rlocal.

[0203] Rlocal = D' + P

[0204] The calculation unit 215 supplies the derived local decoded image Rlocal to the in-loop filter unit 216 and the frame memory 218.

[0205] <In-loop filter section> The in-loop filter unit 216 performs processing related to in-loop filter processing. For example, the in-loop filter unit 216 receives as input the locally decoded image Rlocal supplied from the calculation unit 215 and filter information Finfo supplied from the decoding unit 212. Note that any information may be input to the in-loop filter unit 216, and information other than the above information may also be input.

[0206] The in-loop filter unit 216 performs appropriate filtering on the locally decoded image Rlocal based on the filter information Finfo.

[0207] For example, the in-loop filter unit 216 applies four in-loop filters, namely, a bilateral filter, a deblocking filter (DBF (DeBlocking Filter)), an adaptive offset filter (SAO (Sample Adaptive Offset)), and an adaptive loop filter (ALF (Adaptive Loop Filter)), in this order. Note that which filters to apply and in what order they are applied are arbitrary and can be selected as appropriate.

[0208] The in-loop filter unit 216 performs a filter process corresponding to the filter process performed on the encoding side (for example, the in-loop filter unit 120 of the image encoding device 100). Of course, the filter process performed by the in-loop filter unit 216 is arbitrary and is not limited to the above example. For example, the in-loop filter unit 216 may apply a Wiener filter or the like.

[0209] The in-loop filter unit 216 supplies the filtered locally decoded image Rlocal to a rearrangement buffer 217 and a frame memory 218 .

[0210] <Sorting buffer> The reordering buffer 217 receives the locally decoded image Rlocal supplied from the in-loop filter unit 216 as input and holds (stores) it. The reordering buffer 217 reconstructs a decoded image R for each picture using the locally decoded image Rlocal and holds it (stores it in the buffer). The reordering buffer 217 reorders the obtained decoded images R from the decoding order to the playback order. The reordering buffer 217 outputs the reordered decoded images R to the outside of the image decoding device 200 as video image data.

[0211] <Frame memory> The frame memory 218 performs processing related to the storage of image data. For example, the frame memory 218 receives the locally decoded image Rlocal supplied from the calculation unit 215 as input, reconstructs a decoded image R for each picture, and stores the reconstructed image in a buffer within the frame memory 218.

[0212] Furthermore, the frame memory 218 receives as input the in-loop filtered local decoded image Rlocal supplied from the in-loop filter unit 216, reconstructs a decoded image R for each picture, and stores the reconstructed image in a buffer within the frame memory 218. The frame memory 218 appropriately supplies the stored decoded image R (or a part thereof) to the prediction unit 219 as a reference image.

[0213] The frame memory 218 may store header information Hinfo, prediction mode information Pinfo, transformation information Tinfo, filter information Finfo, and the like related to the generation of decoded images.

[0214] <Prediction Department> The prediction unit 219 performs processing related to generation of a predicted image. For example, the prediction unit 219 receives prediction mode information Pinfo supplied from the decoding unit 212 as input, performs prediction using a prediction method specified by the prediction mode information Pinfo, and derives a predicted image P. When deriving the predicted image P, the prediction unit 219 uses, as a reference image, a decoded image R (or a part thereof) before or after filtering stored in the frame memory 218 and specified by the prediction mode information Pinfo. The prediction unit 219 supplies the derived predicted image P to the calculation unit 215.

[0215] These processing units (accumulation buffer 211 to prediction unit 219) may have any configuration. For example, each processing unit may be configured with a logic circuit that realizes the above-described processing. Also, each processing unit may have, for example, a CPU, ROM, RAM, etc., and may execute a program using these to realize the above-described processing. Of course, each processing unit may have both of these configurations, and may realize part of the above-described processing using a logic circuit and the other part by executing a program. The configurations of each processing unit may be independent of each other. For example, some processing units may realize part of the above-described processing using a logic circuit, other processing units may execute a program to realize the above-described processing, and still other processing units may realize the above-described processing using both a logic circuit and by executing a program.

[0216] <Decryption section> Fig. 11 is a block diagram showing an example of the main configuration of decoding unit 212 in Fig. 10. As shown in Fig. 11, decoding unit 212 has a selection unit 231, a context setting unit 232, a context decoding unit 233, a bypass decoding unit 234, and a debinarization unit 235.

[0217] Note that although the decoding of the coded data of the adaptive orthogonal transform identifier will be described here, the decoding unit 212 also decodes coded data of other coding parameters, residual information Rinfo, etc., as described above. The decoding unit 212 decodes the coded data of the adaptive orthogonal transform identifier by applying method 1 described in <2-2. Decoding of adaptive orthogonal transform identifier>.

[0218] The selection unit 231 performs processing related to selecting a supply destination of the coded data of each bin of the bin string of the binarized adaptive orthogonal transform identifier. For example, the selection unit 231 acquires the coded data of the bin string of the adaptive orthogonal transform identifier supplied from the accumulation buffer 211.

[0219] Furthermore, the selection unit 231 selects whether the coded data of each bin in the bin sequence of the acquired adaptive orthogonal transform identifier is to be supplied to the context setting unit 232 or the bypass decoding unit 234. The selection unit 231 makes this selection according to Method 1 described above in <2-2. Decoding of Adaptive Orthogonal Transform Identifier>. For example, the selection unit 231 may make this selection according to Method 1-1 (i.e., the table shown in A of FIG. 3). Alternatively, the selection unit 231 may make this selection according to Method 1-2 (i.e., the table shown in B of FIG. 3). Alternatively, the selection unit 231 may make this selection according to Method 1-3 (i.e., the table shown in A of FIG. 4). Alternatively, the selection unit 231 may make this selection according to Method 1-4 (i.e., the table shown in B of FIG. 4).

[0220] When a context variable (index ctxInc) is assigned and context decoding is performed, the selection unit 231 supplies the coded data of that bin to the context setting unit 232. When bypass decoding is performed, the selection unit 231 supplies the bin to the bypass decoding unit 234.

[0221] The context setting unit 232 performs processing related to context setting. For example, the context setting unit 232 obtains the coded data of a bin supplied from the selection unit 231. The context setting unit 232 assigns a context variable (index ctxInc) to the bin. The context setting unit 232 performs this assignment according to Method 1 described above in <2-2. Decoding of Adaptive Orthogonal Transform Identifier>. For example, the context setting unit 232 may perform this assignment according to Method 1-1 (i.e., the table shown in A of FIG. 3). Alternatively, the context setting unit 232 may perform this assignment according to Method 1-2 (i.e., the table shown in B of FIG. 3). Alternatively, the context setting unit 232 may perform this assignment according to Method 1-3 (i.e., the table shown in A of FIG. 4). Alternatively, the context setting unit 232 may perform this assignment according to Method 1-4 (i.e., the table shown in B of FIG. 4).

[0222] Furthermore, the context setting unit 232 can acquire the decoding result from the context decoding unit 233. The context setting unit 232 can appropriately update the context variable (index ctxInc) using the decoding result. The context setting unit 232 supplies the context variable (index ctxInc) derived in this manner to the context decoding unit 233.

[0223] The context decoding unit 233 performs processing related to arithmetic decoding. For example, the context decoding unit 233 acquires a context variable (index ctxInc) supplied from the context setting unit 232. The context decoding unit 233 then performs arithmetic decoding using the context variable (index ctxInc). In other words, the context decoding unit 233 performs context decoding. The context decoding unit 233 then supplies the decoding result, i.e., the processing target bin of the bin sequence of the adaptive orthogonal transform identifier, to the debinarization unit 235.

[0224] The bypass decoding unit 234 performs processing related to bypass decoding. For example, the bypass decoding unit 234 obtains the coded data of the bins supplied from the selection unit 231. The bypass decoding unit 234 performs bypass decoding (arithmetic decoding) on ​​the coded data of the bins. The bypass decoding unit 234 supplies the decoding result, i.e., the bins to be processed in the bin sequence of the adaptive orthogonal transform identifier, to the debinarization unit 235.

[0225] The inverse binarization unit 235 performs processing related to inverse binarization (also referred to as multi-value conversion) of the bin sequence of the adaptive orthogonal transform identifier. For example, the inverse binarization unit 235 acquires the bin sequence of the adaptive orthogonal transform identifier supplied from the context decoding unit 233 or the bypass decoding unit 234. The inverse binarization unit 235 inversely binarizes the acquired bin sequence to derive an adaptive orthogonal transform identifier mts_idx. This inverse binarization is the inverse process of the binarization performed by the binarization unit 131. In other words, the inverse binarization unit 235 performs inverse binarization using a truncated unary code (or a truncated Rice code). The inverse binarization unit 235 supplies the derived adaptive orthogonal transform identifier mts_idx to the inverse orthogonal transform unit 214 as Tinfo. The inverse orthogonal transform unit 214 performs adaptive orthogonal transform as appropriate based on this adaptive orthogonal transform identifier mts_idx.

[0226] As described above, by each processing unit (selection unit 231 to inverse binarization unit 235) performing processing, the decoding unit 212 can decode the coded data of the adaptive orthogonal transform identifier by applying method 1 (for example, any one of methods 1-1 to 1-4). Therefore, it is possible to suppress an increase in memory usage. It is also possible to suppress an increase in the amount of processing (throughput). In other words, it is possible to suppress an increase in the load of the decoding process.

[0227] <Flow of image decoding process> Next, a description will be given of the flow of each process executed by the image decoding device 200 configured as above. First, an example of the flow of image decoding process will be described with reference to the flowchart in FIG.

[0228] When the image decoding process starts, in step S201, the accumulation buffer 211 acquires and holds (accumulates) coded data (bitstream) supplied from outside the image decoding device 200.

[0229] In step S202, the decoding unit 212 decodes the coded data (bitstream) to obtain the quantized transform coefficient level level. Furthermore, the decoding unit 212 parses (analyzes and obtains) various coding parameters from the coded data (bitstream) through this decoding.

[0230] In step S203, the inverse quantization unit 213 performs inverse quantization, which is the inverse process of the quantization performed on the encoding side, on the quantized transform coefficient level obtained by the process in step S202 to obtain a transform coefficient Coeff_IQ.

[0231] In step S204, the inverse orthogonal transform unit 214 performs inverse orthogonal transform processing, which is the inverse processing of the orthogonal transform processing performed on the encoding side, on the transform coefficient Coeff_IQ obtained in step S203, to obtain a prediction residual D'.

[0232] In step S205, the prediction unit 219 performs prediction processing using a prediction method specified by the encoding side based on the information parsed in step S202, and generates a predicted image P by, for example, referring to a reference image stored in the frame memory 218.

[0233] In step S206, the calculation unit 215 adds the prediction residual D' obtained in step S204 and the predicted image P obtained in step S205 to derive a locally decoded image Rlocal.

[0234] In step S207, the in-loop filter unit 216 performs in-loop filtering on the locally decoded image Rlocal obtained by the processing in step S206.

[0235] In step S208, the reordering buffer 217 derives decoded images R using the filtered local decoded images R obtained in step S207, and reorders the order of the decoded images R from the decoding order to the playback order. The reordered decoded images R are output as a moving image to the outside of the image decoding device 200.

[0236] In step S209, the frame memory 218 stores at least one of the locally decoded image Rlocal obtained by the process in step S206 and the locally decoded image Rlocal after the filtering process obtained by the process in step S207.

[0237] When the process of step S209 is completed, the image decoding process ends.

[0238] <Decryption process flow> In the decoding process of step S202 in Fig. 12, the decoding unit 212 decodes the coded data of the adaptive orthogonal transform identifier mts_idx. In doing so, the decoding unit 212 decodes the coded data of the adaptive orthogonal transform identifier by applying Method 1 described in <2-2. Decoding of adaptive orthogonal transform identifier>. An example of the flow of decoding the coded data of the adaptive orthogonal transform identifier mts_idx will be described with reference to the flowchart in Fig. 13.

[0239] When the decoding process starts, in step S231, the selection unit 231 of the decoding unit 212 processes the first bin (binIdx = 0) in the bin sequence of the adaptive orthogonal transform identifier mts_idx. In this case, the selection unit 231 selects the context setting unit 232 as the supply destination of that bin (i.e., selects context decoding). For example, the selection unit 231 selects context decoding as the decoding method for this bin according to one of the tables shown in Figures 3 and 4 (i.e., applies one of Methods 1-1 to 1-4).

[0240] In step S232, the context setting unit 232 assigns a predetermined context variable ctx (index ctxInc) to the bin. Then, the context decoding unit 233 performs arithmetic decoding using the context variable. In other words, it performs context decoding.

[0241] In step S233, the selection unit 231 selects an unprocessed bin from the second bin onward in the bin string as a processing target. In step S234, the selection unit 231 determines whether to bypass-decode the bin to be processed. For example, the selection unit 231 determines whether to bypass-decode the encoded data of the bin to be processed according to any of the tables shown in FIGS. 3 and 4 (i.e., by applying any of Methods 1-1 to 1-4).

[0242] If it is determined that bypass decoding is to be performed, the process proceeds to step S235. That is, in this case, the selection unit 231 selects the bypass decoding unit 234 as a supply destination of the coded data of the bin. In step S235, the bypass decoding unit 234 bypass-decodes the coded data of the bin to be processed. When the process of step S235 ends, the process proceeds to step S237.

[0243] On the other hand, if it is determined in step S234 that bypass decoding is not to be performed (context decoding is to be performed), the process proceeds to step S236. That is, in this case, the selection unit 231 selects the context setting unit 232 as a supply destination of the encoded data of the bin. In step S236, the context setting unit 232 assigns a predetermined context variable ctx (index ctxInc) to the bin. Then, the context decoding unit 233 performs arithmetic decoding using the context variable. That is, it performs context decoding. When the process of step S236 ends, the process proceeds to step S237.

[0244] In step S237, the debinarization unit 235 debinarizes the bin string using a truncated unary code (or a truncated Rice code) to derive an adaptive orthogonal transform identifier mts_idx.

[0245] In step S238, the decoding unit 212 determines whether or not to end the decoding of the adaptive orthogonal transform identifier mts_idx. If it is determined that the decoding is not to end, the process returns to step S233, and the subsequent processes are repeated. Also, if it is determined that the decoding is to end in step S238, the decoding process ends.

[0246] By performing each process in this manner, the decoding unit 212 can decode the coded data of the adaptive orthogonal transform identifier by applying method 1 (for example, any one of methods 1-1 to 1-4). Therefore, it is possible to suppress an increase in memory usage. It is also possible to suppress an increase in the amount of processing (throughput). In other words, it is possible to suppress an increase in the load of the decoding process.

[0247] 3. Second Embodiment <3-1. Coding of adaptive orthogonal transform identifier> In this embodiment, the assignment of context variables to each bin of a bin sequence obtained by binarizing an adaptive orthogonal transform identifier indicating the mode of adaptive orthogonal transform in image coding (Method 0), which was previously performed as shown in the table in B of Figure 1, is performed as follows.

[0248] That is, a context variable based on a parameter related to the block size is assigned to the first bin of a bin sequence in which an adaptive orthogonal transform identifier indicating the mode of adaptive orthogonal transform in image coding is binarized, and then context coding is performed.

[0249] More specifically, the parameter related to this block size is the difference between the logarithmic value of the long side of the transform block and the logarithmic value of the smallest transform block size to which adaptive orthogonal transform can be applied. That is, the context encoding is performed by assigning a context variable based on the difference between the logarithmic value of the long side of the transform block and the logarithmic value of the smallest transform block size to which adaptive orthogonal transform can be applied to the first bin of a bin sequence in which an adaptive orthogonal transform identifier indicating the mode of adaptive orthogonal transform in image coding is binarized (Method 2).

[0250] For example, as shown in the table in A of Figure 14, the first bin of a bin sequence in which the adaptive orthogonal transform identifier has been binarized may be context-coded by assigning a context variable ctx (index ctxInc) based on the difference (max(log2W, log2H) - log2MinMtsSize) between the longer of the logarithm of the horizontal transform block size (log2W) and the logarithm of the vertical transform block size (log2H) and the logarithm of the minimum transform block size to which adaptive orthogonal transform can be applied (log2MinMtsSize), and bypass coding may be performed on the second to fourth bins of the bin sequence (method 2-1).

[0251] In the example of A in Figure 14, the first bin (binIdx = 0) of the bin string of the adaptive orthogonal transform identifier is assigned an index ctxInc based on the difference (max(log2W, log2H) - log2MinMtsSize) and is context coded, and the second to fourth bins (binIdx = 1...3) are each bypass coded (bypassed).

[0252] Also, for example, as shown in the table in B of FIG. 14, the first bin in a bin sequence in which the adaptive orthogonal transform identifier has been binarized may be assigned a context variable ctx (index ctxInc) based on the difference (max(log2W, log2H) - log2MinMtsSize) between the longer of the logarithmic value of the horizontal transform block size and the logarithmic value of the vertical transform block size and the logarithmic value of the minimum transform block size to which adaptive orthogonal transform can be applied, and then context-coded; the second bin in the bin sequence may be assigned a predetermined context variable (index ctxInc), and then bypass-coded for the third and fourth bins in the bin sequence (Method 2-2).

[0253] In the example of B in Figure 14, the first bin (binIdx = 0) of the bin sequence of the adaptive orthogonal transform identifier is assigned an index ctxInc based on the difference (max(log2W, log2H) - log2MinMtsSize) and is context coded, the second bin (binIdx = 1) is assigned an index ctxInc = B1 and is context coded, and the third and fourth bins (binIdx = 2...3) are each bypass coded.

[0254] Furthermore, for example, as shown in the table in A of Figure 15, the first bin of a bin sequence in which the adaptive orthogonal transform identifier has been binarized may be assigned a context variable ctx (index ctxInc) based on the difference (max(log2W, log2H) - log2MinMtsSize) between the longer of the logarithmic value of the horizontal transform block size and the logarithmic value of the vertical transform block size and the logarithmic value of the minimum transform block size to which adaptive orthogonal transform can be applied, and then context-coded; the second and third bins of the bin sequence may be assigned predetermined different context variables (index ctxInc), and then context-coded; and the fourth bin of the bin sequence may be bypass-coded (method 2-3).

[0255] In the example of A in Figure 15, the first bin (binIdx = 0) of the bin sequence of the adaptive orthogonal transform identifier is assigned an index ctxInc based on the difference (max(log2W, log2H) - log2MinMtsSize) and is context coded, the second bin (binIdx = 1) is assigned an index ctxInc = B1 and is context coded, the third bin (binIdx = 2) is assigned an index ctxInc = B2 and is context coded, and the fourth bin (binIdx = 3) is bypass coded.

[0256] Furthermore, for example, as shown in the table in B of Figure 15, the first bin of a bin sequence in which the adaptive orthogonal transform identifier has been binarized may be assigned a context variable ctx (index ctxInc) based on the difference (max(log2W, log2H) - log2MinMtsSize) between the longer of the logarithmic value of the horizontal transform block size and the logarithmic value of the vertical transform block size and the logarithmic value of the minimum transform block size to which adaptive orthogonal transform can be applied, and then context-coded, and the second to fourth bins of the bin sequence may be assigned different predetermined context variables (index ctxInc) (method 2-4).

[0257] In the example of B in Figure 15, the first bin (binIdx = 0) of the bin sequence of the adaptive orthogonal transform identifier is assigned an index ctxInc based on the difference (max(log2W, log2H) - log2MinMtsSize) and is context-coded, the second bin (binIdx = 1) is assigned an index ctxInc = B1 and is context-coded, the third bin (binIdx = 2) is assigned an index ctxInc = B2 and is context-coded, and the fourth bin (binIdx = 3) is assigned an index ctxInc = B3 and is context-coded.

[0258] In each of the tables in FIGS. 14 and 15, unique values ​​that do not overlap are set for the indexes B1, B2, and B3.

[0259] Examples of the number of contexts, the number of context coding bins, and the number of bypass coding bins for each of these methods are shown in the table in Fig. 16. For example, in method 0, the number of contexts is 9, the number of context coding bins is 4, and the number of bypass coding bins is 0. In contrast, in method 2-1, the number of contexts is 4, the number of context coding bins is 1, and the number of bypass coding bins is 3. In method 2-2, the number of contexts is 5, the number of context coding bins is 2, and the number of bypass coding bins is 2. Furthermore, in method 2-3, the number of contexts is 6, the number of context coding bins is 3, and the number of bypass coding bins is 1. In method 2-4, the number of contexts is 7, the number of context coding bins is 4, and the number of bypass coding bins is 0.

[0260] In this way, in any of Methods 2-1 to 2-4, the number of contexts required for encoding can be reduced compared to Method 0. That is, by applying Method 2, the number of contexts assigned to the first bin (binIdx = 0) can be reduced. Therefore, an increase in memory usage can be suppressed.

[0261] Furthermore, in any of Methods 2-1 to 2-3, the number of context coding bins required for coding can be reduced compared to Method 0. Note that in Method 2-4, the number of context coding bins required for coding is the same as in Method 0. In other words, by applying Method 2, bypass coding can be applied to bins corresponding to transform types with a relatively low selection rate. Therefore, it is possible to suppress an increase in the number of context coding bins and an increase in the amount of processing (throughput) while suppressing a decrease in coding efficiency.

[0262] As described above, by applying Method 2, it is possible to suppress an increase in the load of the encoding process.

[0263] <3-2. Decoding of adaptive orthogonal transform identifier> Similarly, in the case of decoding, the assignment of context variables to each bin of the bin sequence of binarized adaptive orthogonal transform identifiers indicating the mode of inverse adaptive orthogonal transform in image decoding (Method 0), which was previously performed as shown in the table in Figure 1B, is performed as follows.

[0264] That is, a context variable based on a parameter related to the block size is assigned to the first bin of the binarized adaptive orthogonal transform identifier bin sequence, and then context coding is performed.

[0265] More specifically, the parameter related to this block size is the difference between the logarithm of the long side of the transform block and the logarithm of the smallest transform block size to which adaptive orthogonal transform can be applied. That is, a context variable based on the difference between the logarithm of the long side of the transform block and the logarithm of the smallest transform block size to which adaptive orthogonal transform can be applied is assigned to the first bin of the bin sequence of the binarized adaptive orthogonal transform identifier, and context decoding is performed (Method 2).

[0266] For example, as shown in the table in A of Figure 14, for the first bin of a bin sequence of binarized adaptive orthogonal transform identifiers, a context variable ctx (index ctxInc) may be assigned and context-decoded based on the difference (max(log2W, log2H) - log2MinMtsSize) between the longer of the logarithm of the horizontal transform block size (log2W) and the logarithm of the vertical transform block size (log2H) and the logarithm of the minimum transform block size to which adaptive orthogonal transform can be applied, and bypass decoding may be performed on the second to fourth bins of the bin sequence (method 2-1).

[0267] In the example of A in Figure 14, the first bin (binIdx = 0) of the bin sequence of the adaptive orthogonal transform identifier is assigned an index ctxInc based on the difference (max(log2W, log2H) - log2MinMtsSize) and is context-decoded, and the second to fourth bins (binIdx = 1...3) are each bypass-decoded.

[0268] Also, for example, as shown in the table in B of FIG. 14, the first bin in the bin sequence of the binarized adaptive orthogonal transform identifier may be assigned a context variable ctx (index ctxInc) based on the difference (max(log2W, log2H) - log2MinMtsSize) between the longer of the logarithmic value of the horizontal transform block size and the logarithmic value of the vertical transform block size and the logarithmic value of the minimum transform block size to which adaptive orthogonal transform can be applied, and context decoding may be performed; the second bin in the bin sequence may be assigned a predetermined context variable (index ctxInc), and context decoding may be performed; and the third and fourth bins in the bin sequence may be bypass-decoded (Method 2-2).

[0269] In the example of B in Figure 14, the first bin (binIdx = 0) of the bin sequence of the adaptive orthogonal transform identifier is assigned an index ctxInc based on the difference (max(log2W, log2H) - log2MinMtsSize) and is context decoded, the second bin (binIdx = 1) is assigned an index ctxInc = B1 and is context decoded, and the third and fourth bins (binIdx = 2...3) are each bypass decoded.

[0270] Furthermore, for example, as shown in the table in A of Figure 15, the first bin in the bin sequence of the binarized adaptive orthogonal transform identifier may be assigned a context variable ctx (index ctxInc) based on the difference (max(log2W, log2H) - log2MinMtsSize) between the longer of the logarithmic value of the horizontal transform block size and the logarithmic value of the vertical transform block size and the logarithmic value of the minimum transform block size to which adaptive orthogonal transform can be applied, and context decoding may be performed; the second and third bins in the bin sequence may be assigned predetermined different context variables (index ctxInc), and context decoding may be performed; and the fourth bin in the bin sequence may be bypass decoded (method 2-3).

[0271] In the example of A in Figure 15, the first bin (binIdx = 0) of the bin sequence of the adaptive orthogonal transform identifier is assigned an index ctxInc based on the difference (max(log2W, log2H) - log2MinMtsSize) and is context decoded, the second bin (binIdx = 1) is assigned an index ctxInc = B1 and is context decoded, the third bin (binIdx = 2) is assigned an index ctxInc = B2 and is context decoded, and the fourth bin (binIdx = 3) is bypass decoded.

[0272] Furthermore, for example, as shown in the table in B of Figure 15, the first bin in the bin sequence of the binarized adaptive orthogonal transform identifier may be assigned a context variable ctx (index ctxInc) based on the difference (max(log2W, log2H) - log2MinMtsSize) between the longer of the logarithmic value of the horizontal transform block size and the logarithmic value of the vertical transform block size and the logarithmic value of the minimum transform block size to which adaptive orthogonal transform can be applied, and then context decoding may be performed, and the second to fourth bins in the bin sequence may be assigned predetermined different context variables (index ctxInc) (method 2-4).

[0273] In the example of B in Figure 15, the first bin (binIdx = 0) of the bin sequence of the adaptive orthogonal transform identifier is assigned an index ctxInc based on the difference (max(log2W, log2H) - log2MinMtsSize) and is context decoded, the second bin (binIdx = 1) is assigned an index ctxInc = B1 and is context decoded, the third bin (binIdx = 2) is assigned an index ctxInc = B2 and is context decoded, and the fourth bin (binIdx = 3) is assigned an index ctxInc = B3 and is context decoded.

[0274] In the case of decoding, as in the case of encoding, unique values ​​that do not overlap are set to the indexes B1, B2, and B3 in the tables of FIGS.

[0275] The number of contexts, the number of context coding bins, and the number of bypass coding bins for each of these methods are the same as in the coding case (FIG. 16).

[0276] In this way, in any of Methods 2-1 to 2-4, the number of contexts required for decoding can be reduced compared to Method 0. That is, by applying Method 2, the number of contexts assigned to the first bin (binIdx = 0) can be reduced. Therefore, an increase in memory usage can be suppressed.

[0277] Furthermore, in any of Methods 2-1 to 2-3, the number of context coding bins required for decoding can be reduced compared to Method 0. Note that in Method 2-4, the number of context coding bins required for decoding is the same as in Method 0. In other words, by applying Method 2, bypass decoding can be applied to bins corresponding to transform types with a relatively low selection rate. Therefore, it is possible to suppress an increase in the number of context coding bins and an increase in the amount of processing (throughput) while suppressing a decrease in coding efficiency.

[0278] As described above, by applying Method 2, it is possible to suppress an increase in the load of the decoding process.

[0279] <3-3. Encoding side> <Configuration> Next, the encoding side will be described. The configuration of the encoding side in this case is the same as that in the first embodiment. That is, the image encoding device 100 in this case has the same configuration as that described with reference to Fig. 6. Also, the encoding unit 115 in this case has the same configuration as that described with reference to Fig. 7.

[0280] <Encoding process flow> In this case, the image coding device 100 performs basically the same processing as in the first embodiment. That is, the image coding processing executed by the image coding device 100 in this case follows the same flow as that described with reference to the flowchart in Fig. 8.

[0281] An example of the flow of the encoding process executed by the encoding unit 115 in this case to encode the adaptive orthogonal transform identifier will be described with reference to the flowchart in FIG.

[0282] In this encoding process, the processes of steps S301 and S302 are executed in the same manner as the processes of steps S131 and S132 in Fig. 9. That is, in this case, the selection unit 132 selects the context setting unit 133 as the supply destination of the bin (that is, selects context encoding). For example, the selection unit 132 selects context encoding as the encoding method for this bin according to one of the tables shown in Fig. 14 and Fig. 15 (that is, applies one of methods 2-1 to 2-4).

[0283] In step S303, the context setting unit 133 assigns a context variable ctx (index ctxInc) to the bin based on the difference (max(log2W, log2H) - log2MinMtsSize) between the longer of the logarithm of the horizontal transform block size and the logarithm of the vertical transform block size and the logarithm of the minimum transform block size to which adaptive orthogonal transform can be applied.The context encoding unit 134 then performs arithmetic encoding using the context variable. That is, it performs context encoding.

[0284] The processes of steps S304 to S308 are executed in the same manner as the processes of steps S134 to S138 in Fig. 9. If it is determined in step S308 that the process is to end, the encoding process ends.

[0285] By performing each process in this manner, the encoding unit 115 can encode the adaptive orthogonal transform identifier by applying method 2 (for example, any one of methods 2-1 to 2-4). Therefore, it is possible to suppress an increase in memory usage. It is also possible to suppress an increase in the amount of processing (throughput). In other words, it is possible to suppress an increase in the load of the encoding process.

[0286] <3-4. Decryption side> <Configuration> Next, the decoding side will be described. The configuration of the decoding side in this case is the same as that in the first embodiment. That is, the image decoding device 200 in this case has the same configuration as that described with reference to Fig. 10. Also, the decoding unit 212 in this case has the same configuration as that described with reference to Fig. 11.

[0287] <Decryption process flow> Furthermore, the image decoding device 200 in this case performs basically the same processing as in the case of the first embodiment. That is, the image decoding processing executed by the image decoding device 200 in this case is performed in the same flow as in the case described with reference to the flowchart in Fig. 12.

[0288] An example of the flow of the decoding process executed by the decoding unit 212 in this case to decode the coded data of the adaptive orthogonal transform identifier will be described with reference to the flowchart in FIG.

[0289] In this decoding process, the process of step S321 is executed in the same manner as the process of step S231 in Fig. 13. That is, in this case, the selection unit 231 selects the context setting unit 232 as the supply destination of the bin (that is, selects context decoding). For example, the selection unit 231 selects context decoding as the decoding method for this bin according to one of the tables shown in Fig. 14 and Fig. 15 (that is, applies one of methods 2-1 to 2-4).

[0290] In step S322, the context setting unit 232 assigns a context variable ctx (index ctxInc) to the bin based on the difference (max(log2W, log2H) - log2MinMtsSize) between the longer of the logarithm of the horizontal transform block size and the logarithm of the vertical transform block size and the logarithm of the minimum transform block size to which adaptive orthogonal transform can be applied. Then, the context decoding unit 233 performs arithmetic decoding using the context variable. That is, it performs context decoding.

[0291] The processes of steps S323 to S328 are executed in the same manner as the processes of steps S233 to S238 in Fig. 13. If it is determined in step S328 that the process is to end, the decoding process ends.

[0292] By performing each process in this manner, the decoding unit 212 can decode the coded data of the adaptive orthogonal transform identifier by applying method 2 (for example, any one of methods 2-1 to 2-4). Therefore, it is possible to suppress an increase in memory usage. It is also possible to suppress an increase in the amount of processing (throughput). In other words, it is possible to suppress an increase in the load of the decoding process.

[0293] 4. Third Embodiment <4-1. Coding of adaptive orthogonal transform identifier> In this embodiment, the assignment of context variables to each bin of a bin sequence obtained by binarizing an adaptive orthogonal transform identifier indicating the mode of adaptive orthogonal transform in image coding (Method 0), which was previously performed as shown in the table in B of Figure 1, is performed as follows.

[0294] That is, a context variable based on a parameter related to the block size is assigned to the first bin of a bin sequence in which an adaptive orthogonal transform identifier indicating the mode of adaptive orthogonal transform in image coding is binarized, and then context coding is performed.

[0295] More specifically, the parameter related to this block size is set to the minimum value between the difference between the logarithm of the long side of the transform block and the logarithm of the smallest transform block size to which adaptive orthogonal transform can be applied, and a predetermined threshold. That is, for the first bin in a bin sequence in which an adaptive orthogonal transform identifier indicating the mode of adaptive orthogonal transform in image coding is binarized, a context variable based on the smaller value between the difference between the logarithm of the long side of the transform block and the logarithm of the smallest transform block size to which adaptive orthogonal transform can be applied, and a predetermined threshold is assigned for context coding (Method 3).

[0296] The value of this threshold TH is arbitrary. By setting this threshold to a value smaller than the maximum value of the difference between the logarithm of the long side of the transform block and the logarithm of the smallest transform block size to which adaptive orthogonal transform can be applied, the number of contexts can be reduced compared to Method 2. Therefore, memory usage can be reduced.

[0297] For example, as shown in the table in A of Figure 19, the first bin of a bin sequence in which the adaptive orthogonal transform identifier has been binarized may be assigned a context variable ctx (index ctxInc) based on the longer (max(log2W, log2H)) of the logarithm of the horizontal transform block size (log2W) and the vertical transform block size (log2H) and the smaller (min(max(log2W, log2H) - log2MinMtsSize) of the difference between the logarithm of the minimum transform block size to which adaptive orthogonal transform can be applied (log2MinMtsSize) and a predetermined threshold (TH), and context encoding may be performed, and the second to fourth bins of the bin sequence may be bypass encoded (Method 3-1).

[0298] In the example of A in Figure 19, the first bin (binIdx = 0) of the bin string of the adaptive orthogonal transform identifier is assigned an index ctxInc based on its minimum value (min(max(log2W, log2H) - log2MinMtsSize, TH)) and is context coded, and the second to fourth bins (binIdx = 1...3) are each bypass coded (bypassed).

[0299] Also, for example, as shown in the table in B of FIG. 19, the first bin in a bin sequence in which the adaptive orthogonal transform identifiers have been binarized may be assigned a context variable ctx (index ctxInc) based on the smaller of the difference between the longer of the logarithm of the horizontal transform block size and the logarithm of the vertical transform block size and the logarithm of the minimum transform block size to which adaptive orthogonal transform can be applied, and a predetermined threshold (min(max(log2W, log2H) - log2MinMtsSize, TH)), and the second bin in the bin sequence may be assigned a predetermined context variable (index ctxInc) and context coded, and the third and fourth bins in the bin sequence may be bypass coded (Method 3-2).

[0300] In the example of B in Figure 19, the first bin (binIdx = 0) of the bin string of the adaptive orthogonal transform identifier is assigned an index ctxInc based on its minimum value (min(max(log2W, log2H) - log2MinMtsSize, TH)) and is context coded, the second bin (binIdx = 1) is assigned an index ctxInc = B1 and is context coded, and the third and fourth bins (binIdx = 2...3) are each bypass coded (bypass coded).

[0301] Furthermore, for example, as shown in the table in A of FIG. 20, the first bin in a bin sequence in which the adaptive orthogonal transform identifiers have been binarized may be assigned a context variable ctx (index ctxInc) based on the smaller of the difference between the longer of the logarithm of the horizontal transform block size and the logarithm of the vertical transform block size and the logarithm of the minimum transform block size to which adaptive orthogonal transform can be applied, and a predetermined threshold (min(max(log2W, log2H) - log2MinMtsSize, TH)), and the second and third bins in the bin sequence may be assigned different predetermined context variables (index ctxInc) and context coded, and the fourth bin in the bin sequence may be bypass coded (method 3-3).

[0302] In the example of A in Figure 20, the first bin (binIdx = 0) of the bin string of the adaptive orthogonal transform identifier is assigned an index ctxInc based on its minimum value (min(max(log2W, log2H) - log2MinMtsSize, TH)) and is context coded, the second bin (binIdx = 1) is assigned an index ctxInc = B1 and is context coded, the third bin (binIdx = 2) is assigned an index ctxInc = B2 and is context coded, and the fourth bin (binIdx = 3) is bypass coded.

[0303] Furthermore, for example, as shown in the table in B of Figure 20, the first bin of a bin sequence in which the adaptive orthogonal transform identifier has been binarized may be assigned a context variable ctx (index ctxInc) based on the smaller of the difference between the longer of the logarithm of the horizontal transform block size and the logarithm of the vertical transform block size and the logarithm of the minimum transform block size to which adaptive orthogonal transform can be applied, and a predetermined threshold (min(max(log2W, log2H) - log2MinMtsSize, TH)), and the second to fourth bins of the bin sequence may be assigned different predetermined context variables (indexes ctxInc) and context coded (Method 3-4).

[0304] In the example of B in Figure 20, the first bin (binIdx = 0) of the bin string of the adaptive orthogonal transform identifier is assigned an index ctxInc based on its minimum value (min(max(log2W, log2H) - log2MinMtsSize, TH)) and is context-coded, the second bin (binIdx = 1) is assigned an index ctxInc = B1 and is context-coded, the third bin (binIdx = 2) is assigned an index ctxInc = B2 and is context-coded, and the fourth bin (binIdx = 3) is assigned an index ctxInc = B3 and is context-coded.

[0305] In each of the tables in FIGS. 19 and 20, unique values ​​that do not overlap are set for the indexes B1, B2, and B3.

[0306] Examples of the number of contexts, the number of context coding bins, and the number of bypass coding bins for each of these methods are shown in Fig. 21. The table shown in A of Fig. 21 shows an example when the threshold value TH = 2. In this example, for example, in method 0, the number of contexts is 9, the number of context coding bins is 4, and the number of bypass coding bins is 0. In contrast, in method 3-1, the number of contexts is 3, the number of context coding bins is 1, and the number of bypass coding bins is 3. Also, in method 3-2, the number of contexts is 4, the number of context coding bins is 2, and the number of bypass coding bins is 2. Furthermore, in method 3-3, the number of contexts is 5, the number of context coding bins is 3, and the number of bypass coding bins is 1. Also, in method 3-4, the number of contexts is 6, the number of context coding bins is 4, and the number of bypass coding bins is 0.

[0307] The table shown in FIG. 21B shows an example where the threshold value TH is 1. In this example, in the case of method 3-1, the number of contexts is 2. In the case of method 3-2, the number of contexts is 3. In the case of method 3-3, the number of contexts is 4. In the case of method 3-4, the number of contexts is 5.

[0308] In this way, in any of Methods 3-1 to 3-4, the number of contexts required for encoding can be reduced compared to Method 0. That is, by applying Method 3, the number of contexts assigned to the first bin (binIdx = 0) can be reduced. Therefore, an increase in memory usage can be suppressed.

[0309] Furthermore, in any of Methods 3-1 to 3-3, the number of context coding bins required for coding can be reduced compared to Method 0. Note that in Method 3-4, the number of context coding bins required for coding is the same as in Method 0. In other words, by applying Method 3, bypass coding can be applied to bins corresponding to transform types with relatively low selection rates. Therefore, it is possible to suppress an increase in the number of context coding bins and an increase in the amount of processing (throughput) while suppressing a decrease in coding efficiency.

[0310] As described above, by applying Method 3, it is possible to suppress an increase in the load of the encoding process.

[0311] <4-2. Decoding of adaptive orthogonal transform identifier> Similarly, in the case of decoding, the assignment of context variables to each bin of the bin sequence of binarized adaptive orthogonal transform identifiers indicating the mode of inverse adaptive orthogonal transform in image decoding (Method 0), which was previously performed as shown in the table in Figure 1B, is performed as follows.

[0312] That is, a context variable based on a parameter related to the block size is assigned to the first bin of the binarized adaptive orthogonal transform identifier bin sequence, and then context coding is performed.

[0313] More specifically, the parameter related to this block size is set to the minimum value among the difference between the logarithm of the long side of the transform block and the logarithm of the smallest transform block size to which adaptive orthogonal transform can be applied, and a predetermined threshold. That is, for the first bin of the bin sequence of the binarized adaptive orthogonal transform identifier, a context variable based on the smaller value among the difference between the logarithm of the long side of the transform block and the logarithm of the smallest transform block size to which adaptive orthogonal transform can be applied, and then context decoding is performed (Method 3).

[0314] As in the case of encoding, the value of this threshold TH is arbitrary. By setting this threshold to a value smaller than the maximum value of the difference between the logarithm of the long side of the transform block and the logarithm of the smallest transform block size to which adaptive orthogonal transform can be applied, the number of contexts can be reduced compared to Method 2. Therefore, memory usage can be reduced.

[0315] For example, as shown in the table in A of Figure 19, for the first bin of a bin sequence of binarized adaptive orthogonal transform identifiers, a context variable ctx (index ctxInc) may be assigned and context-decoded based on the smaller value (min(max(log2W, log2H) - log2MinMtsSize) of the difference between the longer (max(log2W, log2H)) of the logarithm of the horizontal transform block size (log2W) and the vertical transform block size (log2H) and the logarithm of the minimum transform block size to which adaptive orthogonal transform can be applied (log2MinMtsSize) and a predetermined threshold (TH), as shown in the table in A of Figure 19, and bypass decoding may be performed on the second to fourth bins of the bin sequence (Method 3-1).

[0316] In the example of A in Figure 19, the first bin (binIdx = 0) of the bin string of the adaptive orthogonal transform identifier is assigned an index ctxInc based on its minimum value (min(max(log2W, log2H) - log2MinMtsSize, TH)) and is context-decoded, and the second to fourth bins (binIdx = 1...3) are each bypass-decoded.

[0317] Also, for example, as shown in the table in B of FIG. 19, a context variable ctx (index ctxInc) may be assigned to the first bin in a bin sequence of binarized adaptive orthogonal transform identifiers based on the smaller of the difference between the longer of the logarithm of the horizontal transform block size and the logarithm of the vertical transform block size and the logarithm of the minimum transform block size to which adaptive orthogonal transform can be applied, and a predetermined threshold (min(max(log2W, log2H) - log2MinMtsSize, TH)), and context decoding may be performed; a predetermined context variable (index ctxInc) may be assigned to the second bin in the bin sequence and context decoding may be performed; and bypass decoding may be performed on the third and fourth bins in the bin sequence (Method 3-2).

[0318] In the example of B in Figure 19, the first bin (binIdx = 0) of the bin string of the adaptive orthogonal transform identifier is assigned an index ctxInc based on its minimum value (min(max(log2W, log2H) - log2MinMtsSize, TH)) and is context decoded, the second bin (binIdx = 1) is assigned an index ctxInc = B1 and is context decoded, and the third and fourth bins (binIdx = 2...3) are each bypass decoded.

[0319] Furthermore, for example, as shown in the table in A of FIG. 20, the first bin in the bin sequence of the binarized adaptive orthogonal transform identifier may be assigned a context variable ctx (index ctxInc) based on the smaller of the difference between the longer of the logarithm of the horizontal transform block size and the logarithm of the vertical transform block size and the logarithm of the minimum transform block size to which adaptive orthogonal transform can be applied, and a predetermined threshold (min(max(log2W, log2H) - log2MinMtsSize, TH)), and the second and third bins in the bin sequence may be assigned predetermined different context variables (index ctxInc) and context decoded, and the fourth bin in the bin sequence may be bypass decoded (method 3-3).

[0320] In the example of A in Figure 20, the first bin (binIdx = 0) of the bin string of the adaptive orthogonal transform identifier is assigned an index ctxInc based on its minimum value (min(max(log2W, log2H) - log2MinMtsSize, TH)) and is context decoded, the second bin (binIdx = 1) is assigned an index ctxInc = B1 and is context decoded, the third bin (binIdx = 2) is assigned an index ctxInc = B2 and is context decoded, and the fourth bin (binIdx = 3) is bypass decoded.

[0321] Furthermore, for example, as shown in the table in B of Figure 20, the first bin in the bin sequence of the binarized adaptive orthogonal transform identifier may be assigned a context variable ctx (index ctxInc) based on the smaller value (min(max(log2W, log2H) - log2MinMtsSize, TH)) of the difference between the longer of the logarithm of the horizontal transform block size and the logarithm of the vertical transform block size and the logarithm of the minimum transform block size to which adaptive orthogonal transform can be applied, and a predetermined threshold, and then context decoding may be performed by assigning predetermined different context variables (index ctxInc) to the second to fourth bins in the bin sequence (method 3-4).

[0322] In the example of B in Figure 20, the first bin (binIdx = 0) of the bin string of the adaptive orthogonal transform identifier is assigned an index ctxInc based on its minimum value (min(max(log2W, log2H) - log2MinMtsSize, TH)) and is context decoded, the second bin (binIdx = 1) is assigned an index ctxInc = B1 and is context decoded, the third bin (binIdx = 2) is assigned an index ctxInc = B2 and is context decoded, and the fourth bin (binIdx = 3) is assigned an index ctxInc = B3 and is context decoded.

[0323] In the case of decoding, as in the case of encoding, unique values ​​that do not overlap are set to the indexes B1, B2, and B3 in the tables of FIGS.

[0324] The number of contexts, the number of context coding bins, and the number of bypass coding bins in each of these methods are the same as in the coding case (FIG. 21A and FIG. 21B).

[0325] In this way, in any of Methods 3-1 to 3-4, the number of contexts required for decoding can be reduced compared to Method 0. That is, by applying Method 3, the number of contexts assigned to the first bin (binIdx = 0) can be reduced. Therefore, an increase in memory usage can be suppressed.

[0326] Furthermore, in any of Methods 3-1 to 3-3, the number of context coding bins required for decoding can be reduced compared to Method 0. Note that in Method 3-4, the number of context coding bins required for decoding is the same as in Method 0. In other words, by applying Method 3, bypass decoding can be applied to bins corresponding to transform types with relatively low selectivity. Therefore, it is possible to suppress an increase in the number of context coding bins and an increase in the amount of processing (throughput) while suppressing a decrease in coding efficiency.

[0327] As described above, by applying Method 3, it is possible to suppress an increase in the load of the decoding process.

[0328] <4-3. Encoding side> <Configuration> Next, the encoding side will be described. The configuration of the encoding side in this case is the same as that in the first embodiment. That is, the image encoding device 100 in this case has the same configuration as that described with reference to Fig. 6. Also, the encoding unit 115 in this case has the same configuration as that described with reference to Fig. 7.

[0329] <Encoding process flow> In this case, the image coding device 100 performs basically the same processing as in the first embodiment. That is, the image coding processing executed by the image coding device 100 in this case follows the same flow as that described with reference to the flowchart in Fig. 8.

[0330] An example of the flow of the encoding process executed by the encoding unit 115 in this case to encode the adaptive orthogonal transform identifier will be described with reference to the flowchart in FIG.

[0331] In this encoding process, the processes of steps S351 and S352 are executed in the same manner as the processes of steps S131 and S132 in Fig. 9. That is, in this case, the selection unit 132 selects the context setting unit 133 as the supply destination of the bin (that is, selects context encoding). For example, the selection unit 132 selects context encoding as the encoding method for this bin according to one of the tables shown in Fig. 19 and Fig. 20 (that is, applies one of methods 3-1 to 3-4).

[0332] In step S353, the context setting unit 133 assigns a context variable ctx (index ctxInc) to the bin based on the minimum value (min(max(log2W, log2H) - log2MinMtsSize, TH)) between the difference between the longer of the logarithm of the horizontal transform block size and the logarithm of the vertical transform block size and the logarithm of the minimum transform block size to which adaptive orthogonal transform can be applied and a predetermined threshold.The context encoding unit 134 then performs arithmetic encoding using the context variable. That is, it performs context encoding.

[0333] The processes of steps S354 to S358 are executed in the same manner as the processes of steps S134 to S138 in Fig. 9. If it is determined in step S358 that the process is to end, the encoding process ends.

[0334] By performing each process in this manner, the encoding unit 115 can encode the adaptive orthogonal transform identifier by applying method 3 (for example, any one of methods 3-1 to 3-4). Therefore, it is possible to suppress an increase in memory usage. It is also possible to suppress an increase in the amount of processing (throughput). In other words, it is possible to suppress an increase in the load of the encoding process.

[0335] <4-4. Decryption side> <Configuration> Next, the decoding side will be described. The configuration of the decoding side in this case is the same as that in the first embodiment. That is, the image decoding device 200 in this case has the same configuration as that described with reference to Fig. 10. Also, the decoding unit 212 in this case has the same configuration as that described with reference to Fig. 11.

[0336] <Decryption process flow> Furthermore, the image decoding device 200 in this case performs basically the same processing as in the case of the first embodiment. That is, the image decoding processing executed by the image decoding device 200 in this case is performed in the same flow as in the case described with reference to the flowchart in Fig. 12.

[0337] An example of the flow of the decoding process executed by the decoding unit 212 in this case to decode the coded data of the adaptive orthogonal transform identifier will be described with reference to the flowchart in FIG.

[0338] In this decoding process, the process of step S371 is executed in the same manner as the process of step S231 in Fig. 13. That is, in this case, the selection unit 231 selects the context setting unit 232 as the supply destination of the bin (that is, selects context decoding). For example, the selection unit 231 selects context decoding as the decoding method for this bin according to one of the tables shown in Fig. 19 and Fig. 20 (that is, applies one of methods 3-1 to 3-4).

[0339] In step S372, the context setting unit 232 assigns a context variable ctx (index ctxInc) to the bin based on the minimum value (min(max(log2W, log2H) - log2MinMtsSize, TH)) between the difference between the longer of the logarithm of the horizontal transform block size and the logarithm of the vertical transform block size and the logarithm of the minimum transform block size to which adaptive orthogonal transform can be applied and a predetermined threshold. Then, the context decoding unit 233 performs arithmetic decoding using the context variable. That is, it performs context decoding.

[0340] The processes of steps S373 to S378 are executed in the same manner as the processes of steps S233 to S238 in Fig. 13. If it is determined in step S378 that the process is to end, the decoding process ends.

[0341] By performing each process in this manner, the decoding unit 212 can decode the coded data of the adaptive orthogonal transform identifier by applying method 3 (for example, any one of methods 3-1 to 3-4). Therefore, it is possible to suppress an increase in memory usage. It is also possible to suppress an increase in the amount of processing (throughput). In other words, it is possible to suppress an increase in the load of the decoding process.

[0342] 5. Fourth Embodiment <5-1. Coding of adaptive orthogonal transform identifier> In this embodiment, the assignment of context variables to each bin of a bin sequence obtained by binarizing an adaptive orthogonal transform identifier indicating the mode of adaptive orthogonal transform in image coding (Method 0), which was previously performed as shown in the table in B of Figure 1, is performed as follows.

[0343] That is, a context variable based on a parameter related to the block size is assigned to the first bin of a bin sequence in which an adaptive orthogonal transform identifier indicating the mode of adaptive orthogonal transform in image coding is binarized, and then context coding is performed.

[0344] More specifically, the parameter related to this block size is determined as the result of right-bit-shifting the minimum value among the difference between the logarithm of the long side of the transform block and the logarithm of the smallest transform block size to which adaptive orthogonal transform can be applied, and a predetermined threshold. That is, the context encoding is performed by assigning a context variable based on the result of right-bit-shifting the minimum value among the difference between the logarithm of the long side of the transform block and the logarithm of the smallest transform block size to which adaptive orthogonal transform can be applied, and a predetermined threshold, to the first bin of a bin sequence in which an adaptive orthogonal transform identifier indicating the mode of adaptive orthogonal transform in image coding is binarized (Method 4).

[0345] The value of this threshold TH is arbitrary. By setting this threshold to a value smaller than the maximum value of the difference between the logarithm of the long side of the transform block and the logarithm of the smallest transform block size to which adaptive orthogonal transform can be applied, the number of contexts can be reduced compared to method 2. Furthermore, the value of the scale parameter shift, which is the amount of right bit shift, is arbitrary. In method 4, the minimum value is further bit shifted to the right, so the number of contexts can be reduced compared to method 3. Therefore, memory usage can be reduced.

[0346] For example, as shown in the table in A of FIG. 24, the first bin of a bin sequence in which adaptive orthogonal transform identifiers have been binarized may be context-coded by assigning a context variable ctx (index ctxInc) based on the result of right bit-shifting (min(max(log2W, log2H) - log2MinMtsSize, TH)) the difference between the longer (max(log2W, log2H)) of the logarithm of the horizontal transform block size (log2W) and the vertical transform block size (log2H) and the logarithm of the minimum transform block size to which adaptive orthogonal transform can be applied (log2MinMtsSize), as shown in A of FIG. 24, and then performing bypass coding on the second to fourth bins of the bin sequence (Method 4-1).

[0347] In the example of A in Figure 24, the first bin (binIdx = 0) of the bin string of the adaptive orthogonal transform identifier is assigned an index ctxInc based on the result of its right bit shift (min(max(log2W, log2H) - log2MinMtsSize, TH) >> shift) and is context coded, and the second to fourth bins (binIdx = 1...3) are each bypass coded (bypass coded).

[0348] Furthermore, for example, as shown in the table in B of FIG. 24, the first bin in a bin sequence in which the adaptive orthogonal transform identifier has been binarized may be context-coded by assigning a context variable ctx (index ctxInc) based on the result of right bit-shifting (min(max(log2W, log2H) - log2MinMtsSize, TH) >> shift) of the smaller of the difference between the longer of the logarithm of the horizontal transform block size and the logarithm of the vertical transform block size and the logarithm of the minimum transform block size to which adaptive orthogonal transform can be applied, and a predetermined threshold; the second bin in the bin sequence may be context-coded by assigning a predetermined context variable (index ctxInc) to the second bin; and the third and fourth bins in the bin sequence may be bypass-coded (Method 4-2).

[0349] In the example of B in Figure 24, the first bin (binIdx = 0) of the bin string of the adaptive orthogonal transform identifier is assigned an index ctxInc based on the result of its right bit shift (min(max(log2W, log2H) - log2MinMtsSize, TH) >> shift) and is context coded, the second bin (binIdx = 1) is assigned an index ctxInc = B1 and is context coded, and the third and fourth bins (binIdx = 2...3) are each bypass coded (bypass coded).

[0350] Furthermore, for example, as shown in the table in A of FIG. 25, the first bin in a bin sequence in which adaptive orthogonal transform identifiers have been binarized may be context-coded by assigning a context variable ctx (index ctxInc) based on the result of right bit-shifting (min(max(log2W, log2H) - log2MinMtsSize, TH) >> shift) of the smaller of the difference between the longer of the logarithm of the horizontal transform block size and the logarithm of the vertical transform block size and the logarithm of the minimum transform block size to which adaptive orthogonal transform can be applied, and a predetermined threshold; the second and third bins in the bin sequence may be context-coded by assigning different predetermined context variables (index ctxInc) to the second and third bins; and the fourth bin in the bin sequence may be bypass-coded (method 4-3).

[0351] In the example of A in Figure 25, the first bin (binIdx = 0) of the bin sequence of the adaptive orthogonal transform identifier is assigned an index ctxInc based on the result of its right bit shift (min(max(log2W, log2H) - log2MinMtsSize, TH) >> shift) and is context coded, the second bin (binIdx = 1) is assigned an index ctxInc = B1 and is context coded, the third bin (binIdx = 2) is assigned an index ctxInc = B2 and is context coded, and the fourth bin (binIdx = 3) is bypass coded.

[0352] Furthermore, for example, as shown in the table in B of Figure 25, the first bin of a bin sequence in which the adaptive orthogonal transform identifier has been binarized may be context-coded by assigning a context variable ctx (index ctxInc) based on the result of right bit-shifting (min(max(log2W, log2H) - log2MinMtsSize, TH) >> shift) of the smaller of the difference between the longer of the logarithm of the horizontal transform block size and the logarithm of the vertical transform block size and the logarithm of the minimum transform block size to which adaptive orthogonal transform can be applied, and a predetermined threshold, and the second to fourth bins of the bin sequence may be context-coded by assigning predetermined different context variables (index ctxInc) (method 4-4).

[0353] In the example of B in Figure 25, the first bin (binIdx = 0) of the bin sequence of the adaptive orthogonal transform identifier is assigned an index ctxInc based on the result of its right bit shift (min(max(log2W, log2H) - log2MinMtsSize, TH) >> shift) and is context-coded, the second bin (binIdx = 1) is assigned an index ctxInc = B1 and is context-coded, the third bin (binIdx = 2) is assigned an index ctxInc = B2 and is context-coded, and the fourth bin (binIdx = 3) is assigned an index ctxInc = B3 and is context-coded.

[0354] In each of the tables in FIGS. 24 and 25, unique values ​​that do not overlap are set for the indexes B1, B2, and B3.

[0355] Examples of the number of contexts, the number of context coding bins, and the number of bypass coding bins for each of these methods are shown in Figure 26. The table shown in Figure 26 shows an example when the threshold value TH = 2 and the scale parameter (shift amount for right bit shift) shift = 1. In this example, for example, in the case of method 0, the number of contexts is 9, the number of context coding bins is 4, and the number of bypass coding bins is 0. In contrast, in the case of method 4-1, the number of contexts is 2, the number of context coding bins is 1, and the number of bypass coding bins is 3. Also, in the case of method 4-2, the number of contexts is 3, the number of context coding bins is 2, and the number of bypass coding bins is 2. Furthermore, in the case of method 4-3, the number of contexts is 4, the number of context coding bins is 3, and the number of bypass coding bins is 1. Also, in the case of method 4-4, the number of contexts is 5, the number of context coding bins is 4, and the number of bypass coding bins is 0.

[0356] In this way, in any of Methods 4-1 to 4-4, the number of contexts required for encoding can be reduced compared to Method 0. That is, by applying Method 4, the number of contexts assigned to the first bin (binIdx = 0) can be reduced. Therefore, an increase in memory usage can be suppressed.

[0357] Furthermore, in any of Methods 4-1 to 4-3, the number of context coding bins required for coding can be reduced compared to Method 0. Note that in Method 4-4, the number of context coding bins required for coding is the same as in Method 0. In other words, by applying Method 4, bypass coding can be applied to bins corresponding to transform types with relatively low selection rates. Therefore, it is possible to suppress an increase in the number of context coding bins and an increase in the amount of processing (throughput) while suppressing a decrease in coding efficiency.

[0358] As described above, by applying Method 4, it is possible to suppress an increase in the load of the encoding process.

[0359] <5-2. Decoding of adaptive orthogonal transform identifier> Similarly, in the case of decoding, the assignment of context variables to each bin of the bin sequence of binarized adaptive orthogonal transform identifiers indicating the mode of inverse adaptive orthogonal transform in image decoding (Method 0), which was previously performed as shown in the table in Figure 1B, is performed as follows.

[0360] That is, a context variable based on a parameter related to the block size is assigned to the first bin of the binarized adaptive orthogonal transform identifier bin sequence, and then context coding is performed.

[0361] More specifically, the parameter related to this block size is the result of right-bit-shifting the minimum value among the difference between the logarithm of the long side of the transform block and the logarithm of the smallest transform block size to which adaptive orthogonal transform can be applied, and a predetermined threshold. That is, for the first bin of the bin sequence of the binarized adaptive orthogonal transform identifier, a context variable based on the result of right-bit-shifting the minimum value among the difference between the logarithm of the long side of the transform block and the logarithm of the smallest transform block size to which adaptive orthogonal transform can be applied, and then context decoding is performed (Method 4).

[0362] As in the case of encoding, the value of this threshold TH is arbitrary. By setting this threshold to a value smaller than the maximum value of the difference between the logarithm of the long side of the transform block and the logarithm of the smallest transform block size to which adaptive orthogonal transform can be applied, the number of contexts can be reduced compared to method 2. Furthermore, the value of the scale parameter shift, which is the amount of right bit shift, is arbitrary. In method 4, the minimum value is further bit shifted to the right, so the number of contexts can be reduced compared to method 3. Therefore, memory usage can be reduced.

[0363] For example, as shown in the table in A of FIG. 24, for the first bin of a bin sequence of binarized adaptive orthogonal transform identifiers, a context variable ctx (index ctxInc) may be assigned based on the result of right bit-shifting (min(max(log2W, log2H) - log2MinMtsSize, TH)) the difference between the longer (max(log2W, log2H)) of the logarithm of the horizontal transform block size (log2W) and the vertical transform block size (log2H) and the logarithm of the minimum transform block size to which adaptive orthogonal transform can be applied (log2MinMtsSize), as shown in A of FIG. 24, and context decoding may be performed, and the second to fourth bins of the bin sequence may be bypass-decoded (Method 4-1).

[0364] In the example of A in Figure 24, the first bin (binIdx = 0) of the bin string of the adaptive orthogonal transform identifier is assigned an index ctxInc based on the result of its right bit shift (min(max(log2W, log2H) - log2MinMtsSize, TH) >> shift) and is context-decoded, and the second to fourth bins (binIdx = 1...3) are each bypass-decoded.

[0365] Also, for example, as shown in the table in B of FIG. 24, for the first bin in a bin sequence of binarized adaptive orthogonal transform identifiers, a context variable ctx (index ctxInc) may be assigned and context-decoded based on the result of right bit-shifting (min(max(log2W, log2H) - log2MinMtsSize, TH) >> shift) of the smaller of the difference between the longer of the logarithm of the horizontal transform block size and the logarithm of the vertical transform block size and the logarithm of the minimum transform block size to which adaptive orthogonal transform can be applied, and a predetermined threshold value; a predetermined context variable (index ctxInc) may be assigned and context-decoded for the second bin in the bin sequence; and bypass decoding may be performed on the third and fourth bins in the bin sequence (Method 4-2).

[0366] In the example of B in Figure 24, the first bin (binIdx = 0) of the bin sequence of the adaptive orthogonal transform identifier is assigned an index ctxInc based on the result of its right bit shift (min(max(log2W, log2H) - log2MinMtsSize, TH) >> shift) and is context decoded, the second bin (binIdx = 1) is assigned an index ctxInc = B1 and is context decoded, and the third and fourth bins (binIdx = 2...3) are each bypass decoded.

[0367] Furthermore, for example, as shown in the table in A of FIG. 25, for the first bin of a bin sequence of binarized adaptive orthogonal transform identifiers, a context variable ctx (index ctxInc) may be assigned based on the result of right bit-shifting (min(max(log2W, log2H) - log2MinMtsSize, TH) >> shift) of the smaller of the difference between the longer of the logarithm of the horizontal transform block size and the logarithm of the vertical transform block size and the logarithm of the minimum transform block size to which adaptive orthogonal transform can be applied, and a predetermined threshold, to perform context decoding; and for the second and third bins of the bin sequence, predetermined different context variables (index ctxInc) may be assigned and context-decoded; and for the fourth bin of the bin sequence, bypass decoding may be performed (method 4-3).

[0368] In the example of A in Figure 25, the first bin (binIdx = 0) of the bin sequence of the adaptive orthogonal transform identifier is assigned an index ctxInc based on the result of its right bit shift (min(max(log2W, log2H) - log2MinMtsSize, TH) >> shift) and is context decoded, the second bin (binIdx = 1) is assigned an index ctxInc = B1 and is context decoded, the third bin (binIdx = 2) is assigned an index ctxInc = B2 and is context decoded, and the fourth bin (binIdx = 3) is bypass decoded.

[0369] Furthermore, for example, as shown in the table in B of Figure 25, for the first bin of a bin sequence of binarized adaptive orthogonal transform identifiers, a context variable ctx (index ctxInc) may be assigned based on the result of right bit shifting (min(max(log2W, log2H) - log2MinMtsSize, TH) >> shift) of the smaller of the difference between the longer of the logarithm of the horizontal transform block size and the logarithm of the vertical transform block size and the logarithm of the minimum transform block size to which adaptive orthogonal transform can be applied, and a predetermined threshold, and context decoding may be performed, and predetermined different context variables (index ctxInc) may be assigned to the second to fourth bins of the bin sequence (method 4-4).

[0370] In the example of B in Figure 25, the first bin (binIdx = 0) of the bin sequence of the adaptive orthogonal transform identifier is assigned an index ctxInc based on the result of its right bit shift (min(max(log2W, log2H) - log2MinMtsSize, TH) >> shift) and is context decoded, the second bin (binIdx = 1) is assigned an index ctxInc = B1 and is context decoded, the third bin (binIdx = 2) is assigned an index ctxInc = B2 and is context decoded, and the fourth bin (binIdx = 3) is assigned an index ctxInc = B3 and is context decoded.

[0371] In the case of decoding, as in the case of encoding, unique values ​​that do not overlap are set to the indexes B1, B2, and B3 in the tables of FIGS.

[0372] The number of contexts, the number of context coding bins, and the number of bypass coding bins for each of these methods are the same as in the coding case (FIG. 26).

[0373] In this way, in any of Methods 4-1 to 4-4, the number of contexts required for decoding can be reduced compared to Method 0. That is, by applying Method 4, the number of contexts assigned to the first bin (binIdx = 0) can be reduced. Therefore, an increase in memory usage can be suppressed.

[0374] Furthermore, in any of Methods 4-1 to 4-3, the number of context coding bins required for decoding can be reduced compared to Method 0. Note that in Method 4-4, the number of context coding bins required for decoding is the same as in Method 0. In other words, by applying Method 4, bypass decoding can be applied to bins corresponding to transform types with relatively low selectivity. Therefore, it is possible to suppress an increase in the number of context coding bins and an increase in the amount of processing (throughput) while suppressing a decrease in coding efficiency.

[0375] As described above, by applying Method 4, it is possible to suppress an increase in the load of the decoding process.

[0376] <5-3. Encoding side> <Configuration> Next, the encoding side will be described. The configuration of the encoding side in this case is the same as that in the first embodiment. That is, the image encoding device 100 in this case has the same configuration as that described with reference to Fig. 6. Also, the encoding unit 115 in this case has the same configuration as that described with reference to Fig. 7.

[0377] <Encoding process flow> In this case, the image coding device 100 performs basically the same processing as in the first embodiment. That is, the image coding processing executed by the image coding device 100 in this case follows the same flow as that described with reference to the flowchart in Fig. 8.

[0378] An example of the flow of the encoding process executed by the encoding unit 115 in this case to encode the adaptive orthogonal transform identifier will be described with reference to the flowchart in FIG.

[0379] In this encoding process, the processes of steps S401 and S402 are executed in the same manner as the processes of steps S131 and S132 in Fig. 9. That is, in this case, the selection unit 132 selects the context setting unit 133 as the supply destination of the bin (that is, selects context encoding). For example, the selection unit 132 selects context encoding as the encoding method for this bin according to one of the tables shown in Fig. 24 and Fig. 25 (that is, applies one of methods 4-1 to 4-4).

[0380] In step S403, the context setting unit 133 assigns a context variable ctx (index ctxInc) to the bin based on the result of right bit-shifting (min(max(log2W, log2H) - log2MinMtsSize, TH) >> shift) the minimum value between the difference between the longer of the logarithm of the horizontal transform block size and the logarithm of the vertical transform block size and the logarithm of the minimum transform block size to which adaptive orthogonal transform can be applied and a predetermined threshold using the scale parameter shift. Then, the context encoding unit 134 performs arithmetic encoding using the context variable. In other words, it performs context encoding.

[0381] The processes of steps S404 to S408 are executed in the same manner as the processes of steps S134 to S138 in Fig. 9. If it is determined in step S408 that the process is to end, the encoding process ends.

[0382] By performing each process in this manner, the encoding unit 115 can encode the adaptive orthogonal transform identifier by applying method 4 (for example, any one of methods 4-1 to 4-4). Therefore, it is possible to suppress an increase in memory usage. It is also possible to suppress an increase in the amount of processing (throughput). In other words, it is possible to suppress an increase in the load of the encoding process.

[0383] <5-4. Decryption side> <Configuration> Next, the decoding side will be described. The configuration of the decoding side in this case is the same as that in the first embodiment. That is, the image decoding device 200 in this case has the same configuration as that described with reference to Fig. 10. Also, the decoding unit 212 in this case has the same configuration as that described with reference to Fig. 11.

[0384] <Decryption process flow> Furthermore, the image decoding device 200 in this case performs basically the same processing as in the case of the first embodiment. That is, the image decoding processing executed by the image decoding device 200 in this case is performed in the same flow as in the case described with reference to the flowchart in Fig. 12.

[0385] An example of the flow of the decoding process executed by the decoding unit 212 in this case to decode the coded data of the adaptive orthogonal transform identifier will be described with reference to the flowchart in FIG.

[0386] In this decoding process, the process of step S421 is executed in the same manner as the process of step S231 in Fig. 13. That is, in this case, the selection unit 231 selects the context setting unit 232 as the supply destination of the bin (that is, selects context decoding). For example, the selection unit 231 selects context decoding as the decoding method for this bin according to one of the tables shown in Fig. 24 and Fig. 25 (that is, applies one of methods 4-1 to 4-4).

[0387] In step S422, the context setting unit 232 assigns a context variable ctx (index ctxInc) to the bin based on the result of right bit-shifting (min(max(log2W, log2H) - log2MinMtsSize, TH) >> shift) the minimum value between the difference between the longer of the logarithmic value of the horizontal transform block size and the logarithmic value of the vertical transform block size and the logarithmic value of the minimum transform block size to which adaptive orthogonal transform can be applied and a predetermined threshold using the scale parameter shift. Then, the context decoding unit 233 performs arithmetic decoding using the context variable. That is, it performs context decoding.

[0388] The processes of steps S423 to S428 are executed in the same manner as the processes of steps S233 to S238 in Fig. 13. If it is determined in step S428 that the process is to end, the decoding process ends.

[0389] By performing each process in this manner, the decoding unit 212 can decode the coded data of the adaptive orthogonal transform identifier by applying method 4 (for example, any one of methods 4-1 to 4-4). Therefore, it is possible to suppress an increase in memory usage. It is also possible to suppress an increase in the amount of processing (throughput). In other words, it is possible to suppress an increase in the load of the decoding process.

[0390] 6. Fifth Embodiment <6-1. Coding of adaptive orthogonal transform identifier> In this embodiment, the assignment of context variables to each bin of a bin sequence obtained by binarizing an adaptive orthogonal transform identifier indicating the mode of adaptive orthogonal transform in image coding (Method 0), which was previously performed as shown in the table in B of Figure 1, is performed as follows.

[0391] That is, a context variable based on a parameter related to the block size is assigned to the first bin of a bin sequence in which an adaptive orthogonal transform identifier indicating the mode of adaptive orthogonal transform in image coding is binarized, and then context coding is performed.

[0392] More specifically, context encoding is performed by assigning a context variable depending on whether or not a parameter related to the block size is equal to or greater than a predetermined threshold (Method 5).

[0393] For example, as shown in the table in A of Figure 29, the first bin of a bin sequence in which the adaptive orthogonal transform identifier has been binarized may be context-coded by assigning a context variable ctx (index ctxInc) depending on whether a parameter (S) related to the block size is equal to or greater than a predetermined threshold (TH) (S < TH?), and bypass coding may be performed on the second to fourth bins of the bin sequence (Method 5-1).

[0394] In the example of A in Fig. 29, the first bin (binIdx = 0) in the bin sequence of the adaptive orthogonal transform identifier is assigned an index ctxInc = A0 and context-coded if the parameter related to the block size is less than a predetermined threshold (S < TH), and is assigned an index ctxInc = A1 and context-coded if the parameter related to the block size is equal to or greater than the predetermined threshold (S ≥ TH). Also, the second to fourth bins (binIdx = 1...3) are each bypass-coded.

[0395] Also, for example, as shown in the table in B of FIG. 29, the first bin in a bin sequence in which the adaptive orthogonal transform identifier is binarized may be context-coded by assigning a context variable ctx (index ctxInc) depending on whether a parameter related to the block size is equal to or greater than a predetermined threshold (S < TH?), the second bin in the bin sequence may be context-coded by assigning a predetermined context variable (index ctxInc), and the third and fourth bins in the bin sequence may be bypass-coded (method 5-2).

[0396] In the example of B in Figure 29, the first bin (binIdx = 0) in the bin sequence of the adaptive orthogonal transform identifier is assigned index ctxInc = A0 and context coded if the parameter related to the block size is less than a predetermined threshold (S < TH), and is assigned index ctxInc = A1 and context coded if the parameter related to the block size is greater than or equal to the predetermined threshold (S ≧ TH), the second bin (binIdx = 1) is assigned index ctxInc = B1 and context coded, and the third and fourth bins (binIdx = 2...3) are each bypass coded.

[0397] Furthermore, for example, as shown in the table in A of FIG. 30, the first bin of a bin sequence in which the adaptive orthogonal transform identifier has been binarized may be context-coded by assigning a context variable ctx (index ctxInc) depending on whether a parameter related to the block size is equal to or greater than a predetermined threshold (S < TH?), the second and third bins of the bin sequence may be context-coded by assigning predetermined different context variables (index ctxInc), and the fourth bin of the bin sequence may be bypass-coded (method 5-3).

[0398] In the example of A in Figure 30, if the parameter related to the block size is less than a predetermined threshold (S < TH), the first bin (binIdx = 0) in the bin sequence of the adaptive orthogonal transform identifier is assigned index ctxInc = A0 and is context coded; if the parameter related to the block size is greater than or equal to the predetermined threshold (S ≧ TH), index ctxInc = A1 is assigned and is context coded; the second bin (binIdx = 1) is assigned index ctxInc = B1 and is context coded; the third bin (binIdx = 2) is assigned index ctxInc = B2 and is context coded; and the fourth bin (binIdx = 3) is bypass coded.

[0399] Furthermore, for example, as shown in the table in B of Figure 30, the first bin of a bin sequence in which the adaptive orthogonal transform identifier has been binarized may be context-coded by assigning a context variable ctx (index ctxInc) depending on whether a parameter related to the block size is equal to or greater than a predetermined threshold (S < TH?), and the second to fourth bins of the bin sequence may be context-coded by assigning predetermined different context variables (index ctxInc) to them (method 5-4).

[0400] In the example of B in Figure 30, if the parameter related to the block size is less than a predetermined threshold (S < TH), the first bin (binIdx = 0) in the bin sequence of the adaptive orthogonal transform identifier is assigned index ctxInc = A0 and context coded; if the parameter related to the block size is greater than or equal to the predetermined threshold (S ≧ TH), index ctxInc = A1 is assigned and context coded; the second bin (binIdx = 1) is assigned index ctxInc = B1 and context coded; the third bin (binIdx = 2) is assigned index ctxInc = B2 and context coded; and the fourth bin (binIdx = 3) is assigned index ctxInc = B3 and context coded.

[0401] In each table of FIG. 29 and FIG. 30, unique values ​​that do not overlap are set for the indexes A0, A1, B1, B2, and B3.

[0402] The parameter S may be any parameter related to the block size.

[0403] For example, the parameter S may be the product of the width tbWidth and the height tbHeight of the transform block, that is, the area of ​​the transform block. S = tbWidth * tbHeight

[0404] Furthermore, the parameter S may be the sum of the logarithm of the width tbWidth and the logarithm of the height tbHeight of the transform block, that is, the logarithm of the area of ​​the transform block. S = log2(tbWidth) + log2(tbHeight)

[0405] Furthermore, the parameter S may be the maximum value of the width tbWidth and the height tbHeight of the transform block, that is, the size of the long side of the transform block. S = max(tbWidth, tbHeight)

[0406] Furthermore, the parameter S may be the minimum value of the width tbWidth and height tbHeight of the transform block, that is, the size of the short side of the transform block. S = min(tbWidth, tbHeight)

[0407] Furthermore, the parameter S may be the maximum value of the logarithm of the width tbWidth and the height tbHeight of the transform block, that is, the logarithm of the size of the long side of the transform block. S = max(log2(tbWidth), log2(tbHeight))

[0408] Furthermore, the parameter S may be the minimum of the logarithmic value of the width tbWidth and the height tbHeight of the transform block, that is, the logarithmic value of the size of the short side of the transform block. S = min(log2(tbWidth), log2(tbHeight))

[0409] Furthermore, the parameter S may be a ratio cbSubDiv of the area of ​​the coding block to the area of ​​the CTU. Examples of values ​​of the ratio cbSubDiv of the area of ​​the coding block to the area of ​​the CTU are shown in the table of FIG. S = cbSubDiv

[0410] Alternatively, the parameter S may be the result of right-bit-shifting the ratio cbSubDiv of the area of ​​the coding block to the area of ​​the CTU by the scale parameter shift. Note that this scale parameter shift may be the difference between the logarithm of the block size of the CTU and the logarithm of the maximum transform block size. Alternatively, the logarithm of the maximum transform block size may be 5. S = cbSubDiv >> shift shift = (log2CTUSize - log2MaxTsSize) log2MaxTsSize = 5

[0411] Furthermore, the parameter S may be the absolute value of the difference between the logarithm of the width tbWidth and the logarithm of the height tbHeight of the transform block. S = abs(log2(tbWidth) - log2(tbHeight))

[0412] Examples of the number of contexts, the number of context coding bins, and the number of bypass coding bins for each of these methods are shown in Fig. 32. In this example, for example, in the case of method 0, the number of contexts is 9, the number of context coding bins is 4, and the number of bypass coding bins is 0. In contrast, in the case of method 5-1, the number of contexts is 2, the number of context coding bins is 1, and the number of bypass coding bins is 3. Also, in the case of method 5-2, the number of contexts is 3, the number of context coding bins is 2, and the number of bypass coding bins is 2. Furthermore, in the case of method 5-3, the number of contexts is 4, the number of context coding bins is 3, and the number of bypass coding bins is 1. Also, in the case of method 5-4, the number of contexts is 5, the number of context coding bins is 4, and the number of bypass coding bins is 0.

[0413] In this way, in any of Methods 5-1 to 5-4, the number of contexts required for encoding can be reduced compared to Method 0. That is, by applying Method 5, the number of contexts assigned to the first bin (binIdx = 0) can be reduced. Therefore, an increase in memory usage can be suppressed.

[0414] Furthermore, in any of Methods 5-1 to 5-3, the number of context coding bins required for coding can be reduced compared to Method 0. Note that in Method 5-4, the number of context coding bins required for coding is the same as in Method 0. In other words, by applying Method 5, bypass coding can be applied to bins corresponding to transform types with relatively low selectivity. Therefore, it is possible to suppress an increase in the number of context coding bins and an increase in the amount of processing (throughput) while suppressing a decrease in coding efficiency.

[0415] As described above, by applying Method 5, it is possible to suppress an increase in the load of the encoding process.

[0416] <6-2. Decoding of adaptive orthogonal transform identifier> Similarly, in the case of decoding, the assignment of context variables to each bin of the bin sequence of binarized adaptive orthogonal transform identifiers indicating the mode of inverse adaptive orthogonal transform in image decoding (Method 0), which was previously performed as shown in the table in Figure 1B, is performed as follows.

[0417] That is, a context variable based on a parameter related to the block size is assigned to the first bin of the binarized adaptive orthogonal transform identifier bin sequence, and then context coding is performed.

[0418] More specifically, context decoding is performed by assigning a context variable depending on whether or not a parameter related to the block size is equal to or greater than a predetermined threshold (Method 5).

[0419] For example, as shown in the table in A of Figure 29, the first bin in the bin sequence of the binarized adaptive orthogonal transform identifier may be context-decoded by assigning a context variable ctx (index ctxInc) depending on whether the parameter (S) related to the block size is equal to or greater than a predetermined threshold (TH) (S < TH?), and bypass decoding may be performed on the second to fourth bins in the bin sequence (Method 5-1).

[0420] In the example of A in Fig. 29, when the parameter related to the block size is less than a predetermined threshold (S < TH), the first bin (binIdx = 0) of the bin sequence of the adaptive orthogonal transform identifier is assigned an index ctxInc = A0 and is context-decoded, and when the parameter related to the block size is equal to or greater than the predetermined threshold (S ≥ TH), the index ctxInc = A1 is assigned and is context-decoded. Also, the second to fourth bins (binIdx = 1...3) are each bypass-decoded.

[0421] Also, for example, as shown in the table in B of FIG. 29, the first bin in the bin sequence of the binarized adaptive orthogonal transform identifier may be context-decoded by assigning a context variable ctx (index ctxInc) depending on whether a parameter related to the block size is equal to or greater than a predetermined threshold (S < TH?), the second bin in the bin sequence may be context-decoded by assigning a predetermined context variable (index ctxInc), and the third and fourth bins in the bin sequence may be bypass-decoded (method 5-2).

[0422] In the example of B in Figure 29, the first bin (binIdx = 0) of the bin sequence of the adaptive orthogonal transform identifier is assigned an index ctxInc = A0 and context-decoded if the parameter related to the block size is less than a predetermined threshold (S < TH), and is assigned an index ctxInc = A1 and context-decoded if the parameter related to the block size is equal to or greater than the predetermined threshold (S ≥ TH).Furthermore, the second bin (binIdx = 1) is assigned an index ctxInc = B1 and context-decoded, and the third and fourth bins (binIdx = 2...3) are each bypass-decoded.

[0423] Furthermore, for example, as shown in the table in A of FIG. 30, the first bin in the bin sequence of the binarized adaptive orthogonal transform identifier may be context-decoded by assigning a context variable ctx (index ctxInc) depending on whether a parameter related to the block size is equal to or greater than a predetermined threshold (S < TH?), the second and third bins in the bin sequence may be context-decoded by assigning predetermined different context variables (index ctxInc), and the fourth bin in the bin sequence may be bypass-decoded (method 5-3).

[0424] In the example of A in Figure 30, if the parameter related to the block size is less than a predetermined threshold (S < TH), the first bin (binIdx = 0) of the bin sequence of the adaptive orthogonal transform identifier is assigned an index ctxInc = A0 and is context-decoded, and if the parameter related to the block size is equal to or greater than the predetermined threshold (S ≥ TH), the index ctxInc = A1 is assigned and is context-decoded. Also, the second bin (binIdx = 1) is assigned an index ctxInc = B1 and is context-decoded, the third bin (binIdx = 2) is assigned an index ctxInc = B2 and is context-decoded, and the fourth bin (binIdx = 3) is bypass-decoded.

[0425] Furthermore, for example, as shown in the table in B of Figure 30, the first bin in the bin sequence of the binarized adaptive orthogonal transform identifier may be context-decoded by assigning a context variable ctx (index ctxInc) depending on whether a parameter related to the block size is equal to or greater than a predetermined threshold (S < TH?), and the second to fourth bins in the bin sequence may be context-decoded by assigning predetermined different context variables (index ctxInc) to each other (method 5-4).

[0426] In the example of B in Figure 25, if the parameter related to the block size is less than a predetermined threshold (S < TH), the first bin (binIdx = 0) of the bin sequence of the adaptive orthogonal transform identifier is assigned an index ctxInc = A0 and is context-decoded, and if the parameter related to the block size is equal to or greater than the predetermined threshold (S ≥ TH), the index ctxInc = A1 is assigned and is context-decoded. Also, the second bin (binIdx = 1) is assigned an index ctxInc = B1 and is context-decoded, the third bin (binIdx = 2) is assigned an index ctxInc = B2 and is context-decoded, and the fourth bin (binIdx = 3) is assigned an index ctxInc = B3 and is context-decoded.

[0427] In the case of decoding, as in the case of encoding, unique values ​​that do not overlap are set to the indexes A0, A1, B1, B2, and B3 in the tables of FIGS.

[0428] Similarly to the encoding, the parameter S may be any parameter related to the block size in the case of decoding. For example, the parameter S may be derived by any of the methods described in <6-1. Encoding of adaptive orthogonal transform identifier>.

[0429] The number of contexts, the number of context coding bins, and the number of bypass coding bins for each of these methods are the same as in the case of coding (FIG. 32).

[0430] In this way, in any of Methods 5-1 to 5-4, the number of contexts required for decoding can be reduced compared to Method 0. That is, by applying Method 5, the number of contexts assigned to the first bin (binIdx = 0) can be reduced. Therefore, an increase in memory usage can be suppressed.

[0431] Furthermore, in any of Methods 5-1 to 5-3, the number of context coding bins required for decoding can be reduced compared to Method 0. Note that in Method 5-4, the number of context coding bins required for decoding is the same as in Method 0. In other words, by applying Method 5, bypass decoding can be applied to bins corresponding to transform types with relatively low selectivity. Therefore, it is possible to suppress an increase in the number of context coding bins and an increase in the amount of processing (throughput) while suppressing a decrease in coding efficiency.

[0432] As described above, by applying Method 5, it is possible to suppress an increase in the load of the decoding process.

[0433] <6-3. Encoding side> <Configuration> Next, the encoding side will be described. The configuration of the encoding side in this case is the same as that in the first embodiment. That is, the image encoding device 100 in this case has the same configuration as that described with reference to Fig. 6. Also, the encoding unit 115 in this case has the same configuration as that described with reference to Fig. 7.

[0434] <Encoding process flow> In this case, the image coding device 100 performs basically the same processing as in the first embodiment. That is, the image coding processing executed by the image coding device 100 in this case follows the same flow as that described with reference to the flowchart in Fig. 8.

[0435] An example of the flow of the encoding process executed by the encoding unit 115 in this case to encode the adaptive orthogonal transform identifier will be described with reference to the flowchart in FIG.

[0436] In this encoding process, the processes of steps S451 and S452 are executed in the same manner as the processes of steps S131 and S132 in Fig. 9. That is, in this case, the selection unit 132 selects the context setting unit 133 as the supply destination of the bin (that is, selects context encoding). For example, the selection unit 132 selects context encoding as the encoding method for this bin according to one of the tables shown in Fig. 29 and Fig. 30 (that is, applies one of methods 5-1 to 5-4).

[0437] In step S453, the context setting unit 133 assigns a context variable ctx (index ctxInc) to the bin depending on whether a parameter (S) related to the block size is equal to or greater than a predetermined threshold (TH) (S<TH?).

[0438] For example, if the parameter related to the block size is less than a predetermined threshold (S<TH), the context setting unit 133 assigns the index ctxInc=A0 to the bin. Also, if the parameter related to the block size is equal to or greater than a predetermined threshold (S≧TH), the context setting unit 133 assigns the index ctxInc=A1 to the bin.

[0439] Then, the context encoding unit 134 performs arithmetic encoding using the context variables, that is, performs context encoding.

[0440] The processes of steps S454 to S458 are executed in the same manner as the processes of steps S134 to S138 in Fig. 9. If it is determined in step S408 that the process is to end, the encoding process ends.

[0441] By performing each process in this manner, the encoding unit 115 can encode the adaptive orthogonal transform identifier by applying method 5 (for example, any one of methods 5-1 to 5-4). Therefore, it is possible to suppress an increase in memory usage. It is also possible to suppress an increase in the amount of processing (throughput). In other words, it is possible to suppress an increase in the load of the encoding process.

[0442] <6-4. Decryption side> <Configuration> Next, the decoding side will be described. The configuration of the decoding side in this case is the same as that in the first embodiment. That is, the image decoding device 200 in this case has the same configuration as that described with reference to Fig. 10. Also, the decoding unit 212 in this case has the same configuration as that described with reference to Fig. 11.

[0443] <Decryption process flow> Furthermore, the image decoding device 200 in this case performs basically the same processing as in the case of the first embodiment. That is, the image decoding processing executed by the image decoding device 200 in this case is performed in the same flow as in the case described with reference to the flowchart in Fig. 12.

[0444] An example of the flow of the decoding process executed by the decoding unit 212 in this case to decode the coded data of the adaptive orthogonal transform identifier will be described with reference to the flowchart in FIG.

[0445] In this decoding process, the process of step S471 is executed in the same manner as the process of step S231 in Fig. 13. That is, in this case, the selection unit 231 selects the context setting unit 232 as the supply destination of the bin (that is, selects context decoding). For example, the selection unit 231 selects context decoding as the decoding method for this bin according to one of the tables shown in Fig. 29 and Fig. 30 (that is, applies one of methods 5-1 to 5-4).

[0446] In step S472, the context setting unit 232 assigns a context variable ctx (index ctxInc) to the bin depending on whether a parameter (S) related to the block size is equal to or greater than a predetermined threshold (TH) (S<TH?).

[0447] For example, if the parameter related to the block size is less than a predetermined threshold (S<TH), the context setting unit 232 assigns the index ctxInc=A0 to the bin. Also, if the parameter related to the block size is equal to or greater than a predetermined threshold (S≧TH), the context setting unit 232 assigns the index ctxInc=A1 to the bin.

[0448] Then, the context decoding unit 233 performs arithmetic decoding using the context variables, that is, performs context decoding.

[0449] The processes of steps S473 to S478 are executed in the same manner as the processes of steps S233 to S238 in Fig. 13. If it is determined in step S478 that the process is to end, the decoding process ends.

[0450] By performing each process in this manner, the decoding unit 212 can decode the coded data of the adaptive orthogonal transform identifier by applying method 5 (for example, any one of methods 5-1 to 5-4). Therefore, it is possible to suppress an increase in memory usage. It is also possible to suppress an increase in the amount of processing (throughput). In other words, it is possible to suppress an increase in the load of the decoding process.

[0451] 7. Sixth Embodiment <7-1. Coding of adaptive orthogonal transform identifier> In this embodiment, the binarization (method 0) of the adaptive orthogonal transform identifier indicating the mode of adaptive orthogonal transform in image coding, which has been performed as shown in the table in FIG. 2A, is performed as follows.

[0452] That is, the adaptive orthogonal transform identifier is binarized and coded into a bin string consisting of one bin (one bit) indicating whether the transform type is other than DCT2xDCT2 or not and two bins (two bits) indicating other transform types (Method 6).

[0453] For example, as shown in the table in A of Figure 35, if the transform type of the adaptive orthogonal transform identifier is DCT2xDCT2, it is binarized into a bin string of 1 bin (=0), and if the transform type of the adaptive orthogonal transform identifier is other than DCT2xDCT2, it is binarized into a bin string of 3 bins.

[0454] In the example of A in FIG. 35 , the adaptive orthogonal transform identifier mts_idx=0 is binarized and coded as a bin sequence "0" indicating that the transform type is DCT2xDCT2. Furthermore, the adaptive orthogonal transform identifier mts_idx=1 is binarized and coded as a bin sequence "100" indicating that the transform type is other than DCT2xDCT2 and is DST7xDST7. Furthermore, the adaptive orthogonal transform identifier mts_idx=2 is binarized and coded as a bin sequence "101" indicating that the transform type is other than DCT2xDCT2 and is DCT8xDST7. Furthermore, the adaptive orthogonal transform identifier mts_idx=3 is binarized and coded as a bin sequence "110" indicating that the transform type is other than DCT2xDCT2 and is DST7xDCT8. Furthermore, the adaptive orthogonal transform identifier mts_idx=4 is binarized and coded into a bin string "111" which indicates that the transform type is other than DCT2xDCT2 and is DCT8xDCT8.

[0455] By binarizing in this way, the length of the bin string (bin length) can be reduced to a maximum of 3 bins. In the example A in Figure 2 (method 0), the length of the bin string (bin length) was a maximum of 4 bins, so by applying method 6, it can be reduced by 1 bin.

[0456] Note that this bin string may be binarized by dividing it into a prefix part of 1 bin indicating whether the transform type is other than DCT2xDCT2 or not, and a suffix part of 2 bins indicating other transform types, as shown in the table in B of FIG. 35.

[0457] Furthermore, a context may be assigned to each bin of the bin string of the adaptive orthogonal transform identifier generated by binarization according to Method 6 and coded using any of Methods 0 to 5 described above.

[0458] For example, as shown in the table in A of Figure 36, a predetermined context variable ctx (index ctxInc), i.e., a fixed (one-to-one corresponding) context variable ctx, may be assigned to the first bin of a bin sequence in which the adaptive orthogonal transform identifier is binarized, and the first bin may be context-coded, and bypass coding may be performed on the second and third bins of the bin sequence (method 1-1).

[0459] In the example of A in Figure 36, the first bin (binIdx = 0) in the bin string of the adaptive orthogonal transform identifier is assigned index ctxInc = A0 and is context coded, and the second and third bins (binIdx = 1...2) are each bypass coded (bypassed).

[0460] Also, for example, as shown in the table in B of Figure 36, the first and second bins of a bin sequence in which the adaptive orthogonal transform identifier is binarized may be assigned predetermined different context variables (index ctxInc) and context coded, and the third bin of the bin sequence may be bypass coded (Method 1-2).

[0461] In the example of B in Figure 36, the first bin (binIdx = 0) in the bin string of the adaptive orthogonal transform identifier is assigned index ctxInc = A0 and is context coded, the second bin (binIdx = 1) is assigned index ctxInc = B1 and is context coded, and the third bin (binIdx = 2) is bypass coded.

[0462] Furthermore, for example, as shown in the table C of Figure 36, context coding may be performed by assigning predetermined different context variables (indexes ctxInc) to the first to third bins of a bin sequence in which the adaptive orthogonal transform identifier is binarized (method 1-3).

[0463] In the example C of Figure 36, the first bin (binIdx = 0) in the bin string of the adaptive orthogonal transform identifier is assigned the index ctxInc = A0 and is context coded, the second bin (binIdx = 1) is assigned the index ctxInc = B1 and is context coded, and the third bin (binIdx = 2) is assigned the index ctxInc = B2 and is context coded.

[0464] In each table in FIG. 36, unique values ​​that do not overlap are set for the indexes A0, B1, and B2.

[0465] The table in FIG. 37 shows examples of the number of contexts, the number of context-coding bins, the number of bypass-coding bins, and the worst-case bin length for each of these methods. For example, for method 0, the worst-case bin length is 4. Therefore, the number of contexts is 9, the number of context-coding bins is 4, and the number of bypass-coding bins is 0. In contrast, when method 6 and method 1-1 are combined (method 6-1), the worst-case bin length is 3. Therefore, the number of contexts is 2, the number of context-coding bins is 1, and the number of bypass-coding bins is 2. Furthermore, when method 6 and method 1-2 are combined (method 6-2), the worst-case bin length is 3. Therefore, the number of contexts is 3, the number of context-coding bins is 2, and the number of bypass-coding bins is 1. Furthermore, when method 6 and method 1-3 are combined (method 6-3), the worst-case bin length is 3. Therefore, the number of contexts is 4, the number of context-coding bins is 3, and the number of bypass-coding bins is 0.

[0466] In this way, in any of Methods 6-1 to 6-3, the number of contexts required for encoding can be reduced compared to Method 0. That is, by applying Method 6, the bin length in the worst case can be reduced, and further, by applying Method 1, the number of contexts assigned to the first bin (binIdx = 0) can be reduced. Therefore, an increase in memory usage can be suppressed.

[0467] Furthermore, in any of Methods 6-1 to 6-3, the number of context coding bins required for coding can be reduced compared to Method 0. That is, by applying Method 6, the bin length in the worst case can be reduced, and by applying Method 1, bypass coding can be applied to bins corresponding to transform types with relatively low selectivity. Therefore, it is possible to suppress an increase in the number of context coding bins and an increase in the amount of processing (throughput) while suppressing a decrease in coding efficiency.

[0468] Note that by combining Method 6 with another method (for example, any of Methods 2 to 5) instead of Method 1, the effects of Method 6 can be combined with those of those methods. Therefore, in either case, increases in memory usage and processing volume (throughput) can be suppressed.

[0469] As described above, by applying Method 6, it is possible to suppress an increase in the load of the encoding process.

[0470] <7-2. Decoding of adaptive orthogonal transform identifier> In this embodiment, the inverse binarization (method 0) of the adaptive orthogonal transform identifier indicating the mode of the inverse adaptive orthogonal transform in image decoding, which has been performed according to the table shown in A of FIG. 2, is performed as follows.

[0471] That is, the bin string obtained by decoding, which consists of one bin (one bit) indicating whether the transform type is other than DCT2xDCT2 or not, and two bins (two bits) indicating other transform types, is de-binarized to derive an adaptive orthogonal transform identifier (Method 6).

[0472] For example, as shown in the table in A of Figure 35, a bin string with 1 bin (=0) is de-binarized to derive an adaptive orthogonal transform identifier whose transform type is DCT2xDCT2, and a bin string with 3 bins is de-binarized to derive an adaptive orthogonal transform identifier whose transform type is other than DCT2xDCT2.

[0473] In the example of A in FIG. 35 , a bin sequence “0” obtained by decoding the coded data is debinarized to derive an adaptive orthogonal transform identifier mts_idx=0 indicating that the transform type is DCT2xDCT2. A bin sequence “100” obtained by decoding the coded data is debinarized to derive an adaptive orthogonal transform identifier mts_idx=1 indicating that the transform type is other than DCT2xDCT2 and is DST7xDST7. A bin sequence “101” obtained by decoding the coded data is debinarized to derive an adaptive orthogonal transform identifier mts_idx=2 indicating that the transform type is other than DCT2xDCT2 and is DCT8xDST7. A bin sequence “110” obtained by decoding the coded data is debinarized to derive an adaptive orthogonal transform identifier mts_idx=3 indicating that the transform type is other than DCT2xDCT2 and is DST7xDCT8. Furthermore, the bin string "111" obtained by decoding the coded data is debinarized, and an adaptive orthogonal transform identifier mts_idx = 4 is derived, which indicates that the transform type is other than DCT2xDCT2 and is DCT8xDCT8.

[0474] By performing this inverse binarization, the length of the bin string (bin length) can be reduced to a maximum of 3 bins. In the example A in Figure 2 (method 0), the length of the bin string (bin length) was a maximum of 4 bins, so by applying method 6, it can be reduced by 1 bin.

[0475] Note that this bin string may be debinarized by dividing it into a prefix part of one bin indicating whether the transform type is other than DCT2xDCT2 or not, and a suffix part of two bins indicating other transform types, as shown in the table in B of FIG. 35 .

[0476] Furthermore, when applying the debinarization of Method 6, a context may be assigned to each bin of the bin sequence using any one of Methods 0 to 5 described above and then decoded.

[0477] For example, as shown in the table in A of Figure 36, a predetermined context variable ctx (index ctxInc), i.e., a fixed (one-to-one corresponding) context variable ctx, may be assigned to the first bin of a bin sequence in which the adaptive orthogonal transform identifier is binarized, and then context decoding may be performed on the second and third bins of the bin sequence (method 1-1).

[0478] In the example of A in Figure 36, the first bin (binIdx = 0) in the bin sequence of the adaptive orthogonal transform identifier is assigned index ctxInc = A0 and is context decoded, and the second and third bins (binIdx = 1...2) are each bypass decoded.

[0479] Also, for example, as shown in the table in B of Figure 36, the first and second bins of a bin sequence in which the adaptive orthogonal transform identifier is binarized may be assigned predetermined different context variables (index ctxInc) and context decoded, and the third bin of the bin sequence may be bypass decoded (Method 1-2).

[0480] In the example of B in Figure 36, the first bin (binIdx = 0) in the bin sequence of the adaptive orthogonal transform identifier is assigned index ctxInc = A0 and is context decoded, the second bin (binIdx = 1) is assigned index ctxInc = B1 and is context decoded, and the third bin (binIdx = 2) is bypass decoded.

[0481] Furthermore, for example, as shown in the table C of Figure 36, context decoding may be performed by assigning predetermined different context variables (indexes ctxInc) to the first to third bins of a bin sequence in which the adaptive orthogonal transform identifier is binarized (method 1-3).

[0482] In the example C of Figure 36, the first bin (binIdx = 0) in the bin sequence of the adaptive orthogonal transform identifier is assigned index ctxInc = A0 and is context decoded, the second bin (binIdx = 1) is assigned index ctxInc = B1 and is context decoded, and the third bin (binIdx = 2) is assigned index ctxInc = B2 and is context decoded.

[0483] In each table in FIG. 36, unique values ​​that do not overlap are set for the indexes A0, B1, and B2.

[0484] The number of contexts, the number of context coding bins, the number of bypass coding bins, and the worst-case bin length for each of these methods are the same as those for coding (FIG. 37).

[0485] In this way, in any of Methods 6-1 to 6-3, the number of contexts required for decoding can be reduced compared to Method 0. That is, by applying Method 6, the bin length in the worst case can be reduced, and further, by applying Method 1, the number of contexts assigned to the first bin (binIdx = 0) can be reduced. Therefore, an increase in memory usage can be suppressed.

[0486] Furthermore, in any of Methods 6-1 to 6-3, the number of context coding bins required for decoding can be reduced compared to Method 0. That is, by applying Method 6, the bin length in the worst case can be reduced, and by applying Method 1, bypass decoding can be applied to bins corresponding to transform types with relatively low selectivity. Therefore, it is possible to suppress an increase in the number of context coding bins and an increase in the amount of processing (throughput) while suppressing a decrease in coding efficiency.

[0487] Note that by combining Method 6 with another method (for example, any of Methods 2 to 5) instead of Method 1, the effects of Method 6 can be combined with those of those methods. Therefore, in either case, increases in memory usage and processing volume (throughput) can be suppressed.

[0488] As described above, by applying Method 6, it is possible to suppress an increase in the load of the decoding process.

[0489] <7-3. Encoding side> <Configuration> Next, the encoding side will be described. The configuration of the encoding side in this case is the same as that in the first embodiment. That is, the image encoding device 100 in this case has the same configuration as that described with reference to Fig. 6. Also, the encoding unit 115 in this case has the same configuration as that described with reference to Fig. 7.

[0490] <Encoding process flow> In this case, the image coding device 100 performs basically the same processing as in the first embodiment. That is, the image coding processing executed by the image coding device 100 in this case follows the same flow as that described with reference to the flowchart in Fig. 8.

[0491] An example of the flow of the encoding process executed by the encoding unit 115 in this case to encode the adaptive orthogonal transform identifier will be described with reference to the flowchart in FIG.

[0492] When the encoding process starts, in step S501, the binarization unit 131 of the encoding unit 115 binarizes the adaptive orthogonal transform identifier mts_idx into a bin string consisting of one bin (1 bit) indicating whether the transform type is other than DCT2xDCT2 or not, and two bins (2 bits) indicating other transform types.

[0493] The processes in steps S502 to S508 are executed in the same manner as the processes in steps S132 to S138 in FIG.

[0494] By performing each process in this manner, the encoding unit 115 can binarize the adaptive orthogonal transform identifier by applying method 6, and encode the bin string by applying method 1 (for example, any one of methods 1-1 to 1-3). Therefore, it is possible to suppress an increase in memory usage. Also, it is possible to suppress an increase in the amount of processing (throughput). In other words, it is possible to suppress an increase in the load of the encoding process.

[0495] <7-4. Decryption side> <Configuration> Next, the decoding side will be described. The configuration of the decoding side in this case is the same as that in the first embodiment. That is, the image decoding device 200 in this case has the same configuration as that described with reference to Fig. 10. Also, the decoding unit 212 in this case has the same configuration as that described with reference to Fig. 11.

[0496] <Decryption process flow> Furthermore, the image decoding device 200 in this case performs basically the same processing as in the case of the first embodiment. That is, the image decoding processing executed by the image decoding device 200 in this case is performed in the same flow as in the case described with reference to the flowchart in Fig. 12.

[0497] An example of the flow of the decoding process executed by the decoding unit 212 in this case to decode the coded data of the adaptive orthogonal transform identifier will be described with reference to the flowchart in FIG.

[0498] In this decoding process, the processes of steps S521 to S526 are executed in the same manner as the processes of steps S231 to S236 in FIG.

[0499] In step S527, the debinarization unit 235 debinarizes a bin string consisting of one bin (one bit) indicating whether the transform type is other than DCT2xDCT2 and two bins (two bits) indicating other transform types, and derives an adaptive orthogonal transform identifier mts_idx.

[0500] In step S528, the decoding unit 212 determines whether or not to end the decoding of the adaptive orthogonal transform identifier mts_idx. If it is determined that the decoding is not to end, the process returns to step S523, and the subsequent processes are repeated. Also, if it is determined that the decoding is to end in step S528, the decoding process ends.

[0501] By performing each process in this manner, the decoding unit 212 can decode the coded data of the adaptive orthogonal transform identifier by applying Method 1 (for example, any one of Methods 1-1 to 1-3) and derive the bin sequence. Furthermore, the decoding unit 212 can apply Method 6 to debinarize the bin sequence and derive the adaptive orthogonal transform identifier. Therefore, it is possible to suppress an increase in memory usage. It is also possible to suppress an increase in the amount of processing (throughput). In other words, it is possible to suppress an increase in the load of the decoding process.

[0502] 8. Seventh Embodiment <8-1. Coding of Transform Skip Flag and Adaptive Orthogonal Transform Identifier> In the case of the method described in Non-Patent Document 1, the transform skip flag transform_skip_flag and the adaptive orthogonal transform identifier tu_mits_idx, which indicate whether or not to apply a transform skip, are luminance-limited (4:2:0 format-limited).

[0503] Therefore, when the chroma array type is greater than 1 (i.e., when the chrominance format is 4:2:2 or 4:4:4), a transform skip flag or an adaptive orthogonal transform identifier is signaled (encoded and decoded) for each component ID (cIdx) so that transform skip and adaptive orthogonal transform can be applied to the chrominance components as well (Method 7).

[0504] In this case, an example of the syntax of the transform unit (transform_unit) is shown in FIG. 40. As shown in FIG. 40, the transform mode (transform_mode) is signaled for each of luma (Y), chrominance (Cb), and chrominance (Cr) as shown in the 17th, 20th, and 23rd lines (gray lines) from the top of this syntax. In this case, an example of the syntax of the transform mode (transform_mode) is shown in FIG. 41. As shown in FIG. 41, the transform skip flag transform_skip_flag[x0][y0][cIdx] is signaled in the 5th line (gray line) from the top of this syntax. Furthermore, the adaptive orthogonal transform identifier tu_mts_idx[x0][y0][cIdx] is signaled in the 8th line (gray line) from the top of this syntax. In other words, the transform skip flag and the adaptive orthogonal transform identifier are signaled for each component ID (cIdx).

[0505] This makes it possible to control the application of adaptive orthogonal transform to chrominance formats 4:2:2 and 4:4:4, which have a larger amount of information than the chrominance format 4:2:0, and therefore to suppress a decrease in coding efficiency.

[0506] In this case, the context variable ctx may be assigned to the first bin (binIdx = 0) of the bin sequence in which the adaptive orthogonal transform identifier is binarized, depending on whether the component ID (cIdx) of the transform block is 0 or not, and then the context may be coded.

[0507] For example, as shown in the table in A of Figure 42, the first bin in a bin sequence in which the adaptive orthogonal transform identifier is binarized may be context-coded by assigning a context variable ctx (index ctxInc) depending on whether the component ID (cIdx) of the transform block is 0 ((cIdx == 0)?), and bypass coding may be performed on the second to fourth bins in the bin sequence (method 7-1).

[0508] In the example of A in Figure 42, the first bin (binIdx = 0) in the bin sequence of the adaptive orthogonal transform identifier is assigned an index ctxInc = A0 and context-coded if the component ID (cIdx) of the transform block is 0 (cIdx == 0), and is assigned an index ctxInc = A1 and context-coded if the component ID (cIdx) of the transform block is not 0 (cIdx > 0). Also, the second to fourth bins (binIdx = 1...3) are each bypass-coded.

[0509] Also, for example, as shown in the table in B of Figure 42, the first bin in a bin sequence in which the adaptive orthogonal transform identifier is binarized may be context-coded by assigning a context variable ctx (index ctxInc) depending on whether the component ID (cIdx) of the transform block is 0 ((cIdx == 0)?), the second bin in the bin sequence may be context-coded by assigning a predetermined context variable (index ctxInc), and the third and fourth bins may be bypass-coded (method 7-2).

[0510] In the example of B in FIG. 42, if the component ID (cIdx) of the transform block is 0 (cIdx == 0), the first bin (binIdx = 0) in the bin sequence of the adaptive orthogonal transform identifier is assigned an index ctxInc = A0 and is context coded, and if the component ID (cIdx) of the transform block is not 0 (cIdx > 0), the first bin is assigned an index ctxInc = A1 and is context coded. The second bin (binIdx = 1) is assigned an index ctxInc = B1 and is context coded. The third and fourth bins (binIdx = 2...3) are each bypass coded.

[0511] Furthermore, for example, as shown in the table in A of Figure 43, the first bin in a bin sequence in which the adaptive orthogonal transform identifier is binarized may be context-coded by assigning a context variable ctx (index ctxInc) depending on whether the component ID (cIdx) of the transform block is 0 ((cIdx == 0)?), the second and third bins in the bin sequence may be context-coded by assigning predetermined different context variables (index ctxInc), and the fourth bin may be bypass-coded (method 7-3).

[0512] In the example of A in FIG. 43, if the component ID (cIdx) of the transform block is 0 (cIdx == 0), the first bin (binIdx = 0) in the bin sequence of the adaptive orthogonal transform identifier is assigned an index ctxInc = A0 and is context coded, and if the component ID (cIdx) of the transform block is not 0 (cIdx > 0), the index ctxInc = A1 is assigned and is context coded. The second bin (binIdx = 1) is assigned an index ctxInc = B1 and is context coded. The third bin (binIdx = 2) is assigned an index ctxInc = B2 and is context coded. The fourth bin (binIdx = 3) is bypass coded.

[0513] Also, for example, as shown in the table in B of Figure 43, the first bin in a bin sequence in which the adaptive orthogonal transform identifier is binarized may be context-coded by assigning a context variable ctx (index ctxInc) depending on whether the component ID (cIdx) of the transform block is 0 ((cIdx == 0)?), and the second to fourth bins in the bin sequence may be context-coded by assigning predetermined different context variables (index ctxInc) to each other (method 7-4).

[0514] In the example of B in FIG. 43, if the component ID (cIdx) of the transform block is 0 (cIdx == 0), the first bin (binIdx = 0) in the bin sequence of the adaptive orthogonal transform identifier is assigned index ctxInc = A0 and is context coded, and if the component ID (cIdx) of the transform block is not 0 (cIdx > 0), index ctxInc = A1 is assigned and is context coded. The second bin (binIdx = 1) is assigned index ctxInc = B1 and is context coded. The third bin (binIdx = 2) is assigned index ctxInc = B2 and is context coded. The fourth bin (binIdx = 3) is assigned index ctxInc = B3 and is context coded.

[0515] In each table of FIG. 42 and FIG. 43, unique values ​​that do not overlap are set for the indexes A0, A1, B1, B2, and B3.

[0516] Examples of the number of contexts, the number of context coding bins, and the number of bypass coding bins for each of these methods are shown in the table in Figure 44. For example, in method 0, the number of contexts is 9, the number of context coding bins is 4, and the number of bypass coding bins is 0. In contrast, in method 7-1, the number of contexts is 2, the number of context coding bins is 1, and the number of bypass coding bins is 3. In method 7-2, the number of contexts is 3, the number of context coding bins is 2, and the number of bypass coding bins is 2. In method 7-3, the number of contexts is 4, the number of context coding bins is 3, and the number of bypass coding bins is 1. In method 7-4, the number of contexts is 5, the number of context coding bins is 4, and the number of bypass coding bins is 0.

[0517] In this way, in any of Methods 7-1 to 7-4, the number of contexts required for encoding can be reduced compared to Method 0. That is, by applying Method 7, the number of contexts assigned to the first bin (binIdx = 0) can be reduced. Therefore, an increase in memory usage can be suppressed.

[0518] Furthermore, in any of Methods 7-1 to 7-3, the number of context coding bins required for coding can be reduced compared to Method 0. Note that in Method 7-4, the number of context coding bins required for coding is the same as in Method 0. In other words, by applying Method 7, bypass coding can be applied to bins corresponding to transform types with relatively low selectivity. Therefore, it is possible to suppress an increase in the number of context coding bins and an increase in the amount of processing (throughput) while suppressing a decrease in coding efficiency.

[0519] As described above, the application of adaptive orthogonal transform can be controlled for chrominance in 4:2:2 or 4:4:4 chrominance formats, which have a larger amount of information than the 4:2:0 chrominance format, and therefore, a decrease in coding efficiency can be suppressed.

[0520] As described above, by applying Method 7, it is possible to suppress an increase in the load of the encoding process.

[0521] Instead of the color component ID (cIdx), control parameters for transform skip and adaptive orthogonal transform may be signaled (encoded) for each treeType. That is, [cIdx] of each control parameter may be replaced with [treeType].

[0522] The above-described method of assigning a context variable to each bin of the bin sequence of the adaptive orthogonal transform identifier mts_idx can also be applied to other syntax elements related to orthogonal transform, etc. For example, it can also be applied to the secondary transform identifier st_idx and the transform skip flag ts_flag.

[0523] <8-2. Decoding of Transform Skip Flag and Adaptive Orthogonal Transform Identifier> Similarly, in the case of decoding, if the chroma array type is greater than 1 (i.e., if the chrominance format is 4:2:2 or 4:4:4), a transform skip flag or adaptive orthogonal transform identifier is signaled (decoded) for each component ID (cIdx) so that transform skip or adaptive orthogonal transform can be applied to the chrominance components as well (Method 7).

[0524] In this case, an example of the syntax of the transform unit (transform_unit) is shown in FIG. 40. As shown in FIG. 40, the transform mode (transform_mode) is signaled for each of luma (Y), chrominance (Cb), and chrominance (Cr) as shown in the 17th, 20th, and 23rd lines (gray lines) from the top of this syntax. In this case, an example of the syntax of the transform mode (transform_mode) is shown in FIG. 41. As shown in FIG. 41, the transform skip flag transform_skip_flag[x0][y0][cIdx] is signaled in the 5th line (gray line) from the top of this syntax. Furthermore, the adaptive orthogonal transform identifier tu_mts_idx[x0][y0][cIdx] is signaled in the 8th line (gray line) from the top of this syntax. In other words, the transform skip flag and the adaptive orthogonal transform identifier are signaled for each component ID (cIdx).

[0525] In this way, it is possible to control the application of inverse adaptive orthogonal transform to chrominance formats 4:2:2 and 4:4:4, which have a larger amount of information than the chrominance format 4:2:0, and therefore it is possible to suppress a decrease in coding efficiency.

[0526] In this case, the context variable ctx may be assigned to the first bin (binIdx = 0) of the bin sequence of the binarized adaptive orthogonal transform identifier depending on whether the component ID (cIdx) of the transform block is 0 or not, and context decoding may be performed.

[0527] For example, as shown in the table in A of Figure 42, the first bin in the bin sequence of the binarized adaptive orthogonal transform identifier may be context-decoded by assigning a context variable ctx (index ctxInc) depending on whether the component ID (cIdx) of the transform block is 0 ((cIdx == 0)?), and bypass decoding may be performed on the second to fourth bins in the bin sequence (method 7-1).

[0528] In the example of A in Figure 42, the first bin (binIdx = 0) in the bin sequence of the adaptive orthogonal transform identifier is assigned an index ctxInc = A0 and context-decoded if the component ID (cIdx) of the transform block is 0 (cIdx == 0), and is assigned an index ctxInc = A1 and context-decoded if the component ID (cIdx) of the transform block is not 0 (cIdx > 0). Also, the second to fourth bins (binIdx = 1...3) are each bypass-decoded.

[0529] Also, for example, as shown in the table in B of Figure 42, the first bin in a bin sequence in which the adaptive orthogonal transform identifier is binarized may be assigned a context variable ctx (index ctxInc) depending on whether the component ID (cIdx) of the transform block is 0 ((cIdx == 0)?), and then context-decoded; the second bin in the bin sequence may be assigned a predetermined context variable (index ctxInc), and then bypass-decoded for the third and fourth bins (method 7-2).

[0530] In the example of B in FIG. 42, if the component ID (cIdx) of the transform block is 0 (cIdx == 0), the first bin (binIdx = 0) of the bin sequence of the adaptive orthogonal transform identifier is assigned an index ctxInc = A0 and is context-decoded, and if the component ID (cIdx) of the transform block is not 0 (cIdx > 0), the index ctxInc = A1 is assigned and is context-decoded. Furthermore, the second bin (binIdx = 1) is assigned an index ctxInc = B1 and is context-decoded. Furthermore, the third and fourth bins (binIdx = 2...3) are each bypass-decoded.

[0531] Furthermore, for example, as shown in the table in A of Figure 43, the first bin of a bin sequence in which the adaptive orthogonal transform identifier is binarized may be assigned a context variable ctx (index ctxInc) depending on whether the component ID (cIdx) of the transform block is 0 ((cIdx == 0)?), and then context-decoded; the second and third bins of the bin sequence may be assigned predetermined, mutually different context variables (index ctxInc), and then bypass-decoded for the fourth bin (method 7-3).

[0532] In the example of A in FIG. 43, if the component ID (cIdx) of the transform block is 0 (cIdx == 0), the first bin (binIdx = 0) of the bin sequence of the adaptive orthogonal transform identifier is assigned an index ctxInc = A0 and is context-decoded, and if the component ID (cIdx) of the transform block is not 0 (cIdx > 0), the index ctxInc = A1 is assigned and is context-decoded. The second bin (binIdx = 1) is assigned an index ctxInc = B1 and is context-decoded. The third bin (binIdx = 2) is assigned an index ctxInc = B2 and is context-decoded. The fourth bin (binIdx = 3) is bypass-decoded.

[0533] Also, for example, as shown in the table in B of Figure 43, the first bin of a bin sequence in which the adaptive orthogonal transform identifier is binarized may be context-decoded by assigning a context variable ctx (index ctxInc) depending on whether the component ID (cIdx) of the transform block is 0 ((cIdx == 0)?), and the second to fourth bins of the bin sequence may be context-decoded by assigning predetermined mutually different context variables (index ctxInc) (method 7-4).

[0534] In the example of B in FIG. 43, if the component ID (cIdx) of the transform block is 0 (cIdx == 0), the first bin (binIdx = 0) of the bin sequence of the adaptive orthogonal transform identifier is assigned index ctxInc = A0 and is context-decoded, and if the component ID (cIdx) of the transform block is not 0 (cIdx > 0), index ctxInc = A1 is assigned and is context-decoded. Furthermore, the second bin (binIdx = 1) is assigned index ctxInc = B1 and is context-decoded. Furthermore, the third bin (binIdx = 2) is assigned index ctxInc = B2 and is context-decoded. Furthermore, the fourth bin (binIdx = 3) is assigned index ctxInc = B3 and is context-decoded.

[0535] In each table of FIG. 42 and FIG. 43, unique values ​​that do not overlap are set for the indexes A0, A1, B1, B2, and B3.

[0536] The number of contexts, the number of context coding bins, and the number of bypass coding bins for each of these methods are the same as in the case of coding (FIG. 44).

[0537] In this way, in any of Methods 7-1 to 7-4, the number of contexts required for decoding can be reduced compared to Method 0. That is, by applying Method 7, the number of contexts assigned to the first bin (binIdx = 0) can be reduced. Therefore, an increase in memory usage can be suppressed.

[0538] Furthermore, in any of Methods 7-1 to 7-3, the number of context coding bins required for decoding can be reduced compared to Method 0. Note that in Method 7-4, the number of context coding bins required for decoding is the same as in Method 0. In other words, by applying Method 7, bypass decoding can be applied to bins corresponding to transform types with relatively low selectivity. Therefore, it is possible to suppress an increase in the number of context coding bins and an increase in the amount of processing (throughput) while suppressing a decrease in coding efficiency.

[0539] As described above, the application of inverse adaptive orthogonal transform can be controlled for chrominance in 4:2:2 or 4:4:4 chrominance formats, which have a larger amount of information than the 4:2:0 chrominance format, thereby preventing a decrease in coding efficiency.

[0540] As described above, by applying Method 7, it is possible to suppress an increase in the load of the decoding process.

[0541] Instead of the color component ID (cIdx), control parameters for transform skip and adaptive orthogonal transform may be signaled (decoded) for each treeType. That is, [cIdx] of each control parameter may be replaced with [treeType].

[0542] The above-described method of assigning a context variable to each bin of the bin sequence of the adaptive orthogonal transform identifier mts_idx can also be applied to other syntax elements related to orthogonal transform, etc. For example, it can also be applied to the secondary transform identifier st_idx and the transform skip flag ts_flag.

[0543] <8-3. Encoding side> <Configuration> Next, the encoding side will be described. The configuration of the encoding side in this case is the same as that in the first embodiment. That is, the image encoding device 100 in this case has the same configuration as that described with reference to Fig. 6. Also, the encoding unit 115 in this case has the same configuration as that described with reference to Fig. 7.

[0544] <Encoding process flow> In this case, the image coding device 100 performs basically the same processing as in the first embodiment. That is, the image coding processing executed by the image coding device 100 in this case follows the same flow as that described with reference to the flowchart in Fig. 8.

[0545] An example of the flow of the encoding process executed by the encoding unit 115 in this case to encode the adaptive orthogonal transform identifier will be described with reference to the flowchart in FIG.

[0546] In this encoding process, the processes of steps S551 and S552 are executed in the same manner as the processes of steps S131 and S132 in Fig. 9. That is, in this case, the selection unit 132 selects the context setting unit 133 as the supply destination of the bin (that is, selects context encoding). For example, the selection unit 132 selects context encoding as the encoding method for this bin according to one of the tables shown in Figs. 42 and 43 (that is, applies one of methods 7-1 to 7-4).

[0547] In step S553, the context setting unit 133 assigns a context variable ctx (index ctxInc) to the bin depending on whether the component is luminance (Y) ((cIdx == 0)?).

[0548] For example, if the component is luminance (Y) (cIdx == 0), the context setting unit 133 assigns the index ctxInc = A0 to the bin. If the component is not luminance (Y) (cIdx > 0), the context setting unit 133 assigns the index ctxInc = A1 to the bin.

[0549] Then, the context encoding unit 134 performs arithmetic encoding using the context variables, that is, performs context encoding.

[0550] The processes of steps S554 to S558 are executed in the same manner as the processes of steps S134 to S138 in Fig. 9. If it is determined in step S558 that the process is to end, the encoding process ends.

[0551] By performing each process in this manner, the encoding unit 115 can encode the adaptive orthogonal transform identifier by applying method 7 (for example, any one of methods 7-1 to 7-4). Therefore, it is possible to suppress an increase in memory usage. It is also possible to suppress an increase in the amount of processing (throughput). In other words, it is possible to suppress an increase in the load of the encoding process.

[0552] <8-4. Decryption side> <Configuration> Next, the decoding side will be described. The configuration of the decoding side in this case is the same as that in the first embodiment. That is, the image decoding device 200 in this case has the same configuration as that described with reference to Fig. 10. Also, the decoding unit 212 in this case has the same configuration as that described with reference to Fig. 11.

[0553] <Decryption process flow> Furthermore, the image decoding device 200 in this case performs basically the same processing as in the case of the first embodiment. That is, the image decoding processing executed by the image decoding device 200 in this case is performed in the same flow as in the case described with reference to the flowchart in Fig. 12.

[0554] An example of the flow of the decoding process executed by the decoding unit 212 in this case to decode the coded data of the adaptive orthogonal transform identifier will be described with reference to the flowchart in FIG.

[0555] In this decoding process, the process of step S571 is executed in the same manner as the process of step S231 in Fig. 13. That is, in this case, the selection unit 231 selects the context setting unit 232 as the supply destination of the bin (that is, selects context decoding). For example, the selection unit 231 selects context decoding as the decoding method for this bin according to one of the tables shown in Fig. 42 and Fig. 43 (that is, applies one of methods 7-1 to 7-4).

[0556] In step S572, the context setting unit 232 assigns a context variable ctx (index ctxInc) to the bin depending on whether the component is luminance (Y) ((cIdx == 0)?).

[0557] For example, if the component is luminance (Y) (cIdx == 0), the context setting unit 232 assigns the index ctxInc = A0 to the bin. If the component is not luminance (Y) (cIdx > 0), the context setting unit 232 assigns the index ctxInc = A1 to the bin.

[0558] Then, the context decoding unit 233 performs arithmetic decoding using the context variables, that is, performs context decoding.

[0559] The processes of steps S573 to S578 are executed in the same manner as the processes of steps S233 to S238 in Fig. 13. If it is determined in step S578 that the process is to end, the decoding process ends.

[0560] By performing each process in this manner, the decoding unit 212 can decode the coded data of the adaptive orthogonal transform identifier by applying method 7 (for example, any one of methods 7-1 to 7-4). Therefore, it is possible to suppress an increase in memory usage. It is also possible to suppress an increase in the amount of processing (throughput). In other words, it is possible to suppress an increase in the load of the decoding process.

[0561] <9. Notes> <Combination> The present technology described in each of the above embodiments can be applied in combination with the present technology described in any other embodiment, as long as no contradiction occurs.

[0562] <Computer> The above-described series of processes can be executed by hardware or software. When the series of processes is executed by software, the programs constituting the software are installed on a computer. Here, the term "computer" includes computers built into dedicated hardware, and general-purpose personal computers, etc., that can execute various functions by installing various programs.

[0563] FIG. 47 is a block diagram showing an example of the hardware configuration of a computer that executes the above-described series of processes by a program.

[0564] In a computer 800 shown in FIG. 47, a CPU (Central Processing Unit) 801, a ROM (Read Only Memory) 802, and a RAM (Random Access Memory) 803 are interconnected via a bus 804.

[0565] An input / output interface 810 is also connected to the bus 804. To the input / output interface 810, an input unit 811, an output unit 812, a storage unit 813, a communication unit 814, and a drive 815 are connected.

[0566] The input unit 811 includes, for example, a keyboard, a mouse, a microphone, a touch panel, an input terminal, etc. The output unit 812 includes, for example, a display, a speaker, an output terminal, etc. The storage unit 813 includes, for example, a hard disk, a RAM disk, a non-volatile memory, etc. The communication unit 814 includes, for example, a network interface. The drive 815 drives removable media 821 such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory.

[0567] In a computer configured as above, the CPU 801 performs the above-described series of processes by, for example, loading a program stored in the storage unit 813 into the RAM 803 via the input / output interface 810 and the bus 804 and executing the program. The RAM 803 also stores data necessary for the CPU 801 to execute various processes as appropriate.

[0568] The program executed by the computer can be applied by recording it on removable media 821 such as package media, for example. In this case, the program can be installed in storage unit 813 via input / output interface 810 by inserting removable media 821 into drive 815.

[0569] This program can also be provided via a wired or wireless transmission medium such as a local area network, the Internet, digital satellite broadcasting, etc. In this case, the program can be received by the communication unit 814 and installed in the storage unit 813.

[0570] Alternatively, this program can be installed in advance in the ROM 802 or the storage unit 813 .

[0571] <Unit of information and processing> The data units in which the various pieces of information described above are set and the data units targeted by the various processes are each arbitrary and are not limited to the above examples. For example, these pieces of information and processes may be set for each TU (Transform Unit), TB (Transform Block), PU (Prediction Unit), PB (Prediction Block), CU (Coding Unit), LCU (Largest Coding Unit), sub-block, block, tile, slice, picture, sequence, or component, or may target data of these data units. Of course, these data units may be set for each piece of information or process, and the data units for all pieces of information and processes do not need to be unified. Note that the storage location of these pieces of information is arbitrary and may be stored in the headers or parameter sets of the above-mentioned data units, or may be stored in multiple locations.

[0572] <Control information> Control information related to the present technology described in each of the above embodiments may be transmitted from the encoding side to the decoding side. For example, control information (e.g., enabled_flag) that controls whether or not to permit (or prohibit) application of the above-described present technology may be transmitted. Also, for example, control information (e.g., present_flag) that indicates a target to which the above-described present technology is to be applied (or a target to which it is not to be applied) may be transmitted. For example, control information that specifies a block size (upper or lower limit, or both), frame, component, or layer to which the present technology is to be applied (or permitted or prohibited to be applied) may be transmitted.

[0573] <Applicable targets of this technology> This technology can be applied to any image encoding / decoding method. In other words, as long as it does not conflict with the above-mentioned technology, the specifications of various processes related to image encoding / decoding, such as transform (inverse transform), quantization (inverse quantization), encoding (decoding), and prediction, are arbitrary and are not limited to the above-mentioned examples. Furthermore, as long as it does not conflict with the above-mentioned technology, some of these processes may be omitted.

[0574] This technology can also be applied to a multi-viewpoint image encoding / decoding system that encodes and decodes multi-viewpoint images that include images from multiple views. In this case, this technology can be applied to the encoding and decoding of each view.

[0575] Furthermore, this technology can be applied to a layered image coding (scalable coding) and decoding system that encodes and decodes layered images with multiple layers to provide scalability for predetermined parameters. In this case, this technology can be applied to the encoding and decoding of each layer.

[0576] Furthermore, although the image encoding device 100 and the image decoding device 200 have been described above as application examples of the present technology, the present technology can be applied to any configuration.

[0577] For example, this technology can be applied to various electronic devices, such as transmitters and receivers (e.g., television sets and mobile phones) used in satellite broadcasting, cable TV and other wired broadcasting, distribution over the Internet, and distribution to terminals via cellular communications, or devices (e.g., hard disk recorders and cameras) that record images on media such as optical disks, magnetic disks, and flash memories, or play images from these storage media.

[0578] Furthermore, for example, the present technology can also be implemented as a part of an apparatus, such as a processor (e.g., a video processor) as a system LSI (Large Scale Integration), a module (e.g., a video module) using multiple processors, a unit (e.g., a video unit) using multiple modules, or a set in which other functions are added to a unit (e.g., a video set).

[0579] Furthermore, for example, the present technology can also be applied to a network system configured with multiple devices. For example, the present technology may be implemented as cloud computing in which multiple devices share and collaborate on processing via a network. For example, the present technology may be implemented in a cloud service that provides image (video)-related services to any terminal, such as a computer, AV (Audio Visual) equipment, a portable information processing terminal, or an IoT (Internet of Things) device.

[0580] In this specification, a system refers to a collection of multiple components (devices, modules (components), etc.), regardless of whether all the components are contained in the same housing. Therefore, multiple devices housed in separate housings and connected via a network, and a single device housed in a single housing with multiple modules, are both systems.

[0581] <Fields and applications where this technology can be applied> Systems, devices, processing units, etc. to which the present technology is applied can be used in any field, such as transportation, medical care, crime prevention, agriculture, livestock farming, mining, beauty, factories, home appliances, weather, and nature monitoring. In addition, the applications thereof are also arbitrary.

[0582] For example, the present technology can be applied to systems and devices used to provide viewing content, etc. Furthermore, for example, the present technology can also be applied to systems and devices used for transportation, such as monitoring traffic conditions and controlling automatic driving. Furthermore, for example, the present technology can also be applied to systems and devices used for security. Furthermore, for example, the present technology can also be applied to systems and devices used for automatic control of machines, etc. Furthermore, for example, the present technology can also be applied to systems and devices used for agriculture and livestock farming. Furthermore, for example, the present technology can also be applied to systems and devices used to monitor natural conditions, such as volcanoes, forests, and oceans, and wildlife. Furthermore, for example, the present technology can also be applied to systems and devices used for sports.

[0583] <Other> In this specification, a "flag" refers to information for identifying multiple states, and includes not only information used to identify two states, true (1) or false (0), but also information capable of identifying three or more states. Therefore, the value that this "flag" can take may be, for example, two values, 1 / 0, or three or more values. In other words, the number of bits constituting this "flag" is arbitrary, and may be one bit or multiple bits. Furthermore, identification information (including flags) can be assumed not only to include the identification information in the bit stream, but also to include difference information of the identification information relative to certain reference information in the bit stream. Therefore, in this specification, "flag" and "identification information" include not only the information itself, but also difference information relative to the reference information.

[0584] Furthermore, various types of information (metadata, etc.) related to the coded data (bitstream) may be transmitted or recorded in any form as long as they are associated with the coded data. Here, the term "associate" means, for example, that one piece of data can be used (linked) when processing the other piece of data. In other words, data associated with each other may be combined into one piece of data or may be individual pieces of data. For example, information associated with coded data (image) may be transmitted over a transmission path separate from that of the coded data (image). Also, for example, information associated with coded data (image) may be recorded on a recording medium separate from that of the coded data (image) (or on a different recording area of ​​the same recording medium). Note that this "association" may refer to only a portion of the data, rather than the entire data. For example, an image and information corresponding to that image may be associated with each other in any unit, such as multiple frames, one frame, or a portion of a frame.

[0585] In this specification, terms such as "composite," "multiplex," "add," "integrate," "include," "store," "embed," "insert," and the like refer to combining multiple items into one, such as combining encoded data and metadata into one piece of data, and refer to one method of "associating" as described above.

[0586] Furthermore, the embodiments of the present technology are not limited to the above-described embodiments, and various modifications are possible within the scope of the gist of the present technology.

[0587] For example, a configuration described as one device (or processing unit) may be divided and configured as multiple devices (or processing units). Conversely, configurations described above as multiple devices (or processing units) may be combined and configured as one device (or processing unit). Of course, configurations other than those described above may be added to the configuration of each device (or each processing unit). Furthermore, as long as the configuration and operation of the entire system are substantially the same, part of the configuration of one device (or processing unit) may be included in the configuration of another device (or other processing unit).

[0588] Furthermore, for example, the above-described program may be executed in any device, as long as the device has the necessary functions (functional blocks, etc.) and can obtain the necessary information.

[0589] Also, for example, each step of a single flowchart may be executed by one device, or may be shared and executed by multiple devices. Furthermore, when one step includes multiple processes, the multiple processes may be executed by one device, or may be shared and executed by multiple devices. In other words, multiple processes included in one step can be executed as multiple step processes. Conversely, processes described as multiple steps can be executed collectively as one step.

[0590] For example, the steps of a program executed by a computer may be executed in chronological order in the order described herein, or may be executed in parallel or individually at the required timing, such as when a call is made. In other words, as long as no contradiction occurs, the steps may be executed in an order different from the order described above. Furthermore, the steps of this program may be executed in parallel with the processing of another program, or may be executed in combination with the processing of another program.

[0591] Furthermore, for example, multiple technologies related to the present technology can be implemented independently and independently, as long as no contradiction occurs. Of course, any multiple technologies can also be implemented in combination. For example, part or all of the present technology described in any embodiment can be implemented in combination with part or all of the present technology described in another embodiment. Furthermore, part or all of any of the above-described present technologies can be implemented in combination with other technologies not described above.

[0592] The present technology can also be configured as follows. (1) An encoding unit that assigns a predetermined context variable to the first bin of a bin sequence in which an adaptive orthogonal transform identifier indicating a mode of adaptive orthogonal transform in image encoding is binarized, and performs context encoding. An image processing device comprising: (2) The encoding unit performs context encoding by assigning predetermined different context variables to the first to fourth bins of the bin sequence. The image processing device according to (1). (3) The encoding unit assigns predetermined different context variables to the first to third bins of the bin sequence and performs context encoding on the first to third bins of the bin sequence, and performs bypass encoding on the fourth bin of the bin sequence. The image processing device according to (1). (4) The encoding unit assigns predetermined different context variables to the first and second bins of the bin sequence and performs context encoding on the first and second bins, and performs bypass encoding on the third and fourth bins of the bin sequence. The image processing device according to (1). (5) The encoding unit assigns a predetermined context variable to a first bin of the bin sequence and performs context encoding on the first bin of the bin sequence, and performs bypass encoding on second to fourth bins of the bin sequence. The image processing device according to (1). (6) The encoding unit binarizes and encodes the adaptive orthogonal transform identifier into a bin sequence consisting of one bit indicating whether the transform type is other than DCT2xDCT2 or not and two bits indicating other transform types. An image processing device according to any one of (1) to (5). (7) Context coding is performed by assigning a predetermined context variable to the first bin of the bin sequence in which an adaptive orthogonal transform identifier indicating a mode of adaptive orthogonal transform in image coding is binarized. Image processing methods.

[0593] (8) An encoding unit that assigns a context variable based on a parameter related to a block size to the first bin of a bin sequence in which an adaptive orthogonal transform identifier indicating a mode of adaptive orthogonal transform in image encoding is binarized, and performs context encoding. An image processing device comprising: (9) The parameter relating to the block size is the difference between the logarithm of the long side of the transform block and the logarithm of the minimum transform block size to which the adaptive orthogonal transform can be applied. (8) An image processing device according to (8). (10) The parameter relating to the block size is the minimum value of the difference between the logarithm of the long side of the transform block and the logarithm of the minimum transform block size to which adaptive orthogonal transform can be applied, and a predetermined threshold value. (8) An image processing device according to (8). (11) The parameter related to the block size is the result of right bit-shifting the minimum value of the difference between the logarithm of the long side of the transform block and the logarithm of the minimum transform block size to which adaptive orthogonal transform can be applied, and a predetermined threshold. (8) An image processing device according to (8). (12) The encoding unit performs context encoding by assigning a context variable according to whether the parameter related to the block size is equal to or greater than a predetermined threshold. (8) An image processing device according to (8). (13) The encoding unit binarizes and encodes the adaptive orthogonal transform identifier into a bin sequence consisting of one bit indicating whether the transform type is other than DCT2xDCT2 or not and two bits indicating other transform types. An image processing device according to any one of (8) to (12). (14) The encoding unit binarizes and encodes the adaptive orthogonal transform identifier for each component. (8) An image processing device according to (8). (15) Context encoding is performed by assigning a context variable based on a parameter related to the block size to the first bin of a bin sequence in which an adaptive orthogonal transform identifier indicating the mode of adaptive orthogonal transform in image coding is binarized. Image processing methods. [Explanation of symbols]

[0594] 100 image encoding device, 115 encoding unit, 131 binarization unit, 132 selection unit, 133 context setting unit, 134 context encoding unit, 135 bypass encoding unit, 200 image decoding device, 212 decoding unit, 231 selection unit, 232 context setting unit, 233 context decoding unit, 234 bypass decoding unit, 235 de-binarization unit

Claims

1. An encoding unit that assigns a context variable based on a parameter related to a component to the first bin of a bin sequence in which an adaptive orthogonal transform identifier indicating a mode of adaptive orthogonal transform in image encoding is binarized, and performs context encoding. An image processing device comprising:

2. The encoding unit performs bypass encoding on each of the second and subsequent bins of the bin sequence. The image processing device according to claim 1 .

3. The encoding unit assigns a predetermined context variable to the second bin of the bin sequence and performs context encoding, and performs bypass encoding on the third bin and each subsequent bin. The image processing device according to claim 1 .

4. The encoding unit assigns different predetermined context variables to the second and third bins of the bin sequence and performs context encoding on them, and performs bypass encoding on the fourth and subsequent bins. The image processing device according to claim 1 .

5. The encoding unit performs context encoding by assigning different predetermined context variables to the second and subsequent bins of the bin sequence. The image processing device according to claim 1 .

6. Context encoding is performed by assigning a context variable based on a parameter related to a component to the first bin of a bin sequence in which an adaptive orthogonal transform identifier indicating a mode of adaptive orthogonal transform in image coding is binarized. Image processing methods.

7. An encoding unit that assigns a context variable based on a parameter related to a tree type to the first bin of a bin sequence in which an adaptive orthogonal transform identifier indicating a mode of adaptive orthogonal transform in image encoding has been binarized, and performs context encoding. An image processing device comprising:

8. The encoding unit performs bypass encoding on each of the second and subsequent bins of the bin sequence. The image processing device according to claim 7 .

9. The encoding unit assigns a predetermined context variable to the second bin of the bin sequence and performs context encoding, and performs bypass encoding on the third bin and each subsequent bin. The image processing device according to claim 7 .

10. The encoding unit assigns different predetermined context variables to the second and third bins of the bin sequence and performs context encoding on them, and performs bypass encoding on the fourth and subsequent bins. The image processing device according to claim 7 .

11. The encoding unit performs context encoding by assigning different predetermined context variables to the second and subsequent bins of the bin sequence. The image processing device according to claim 7 .

12. A context variable based on a parameter related to a tree type is assigned to the first bin of a bin sequence in which an adaptive orthogonal transform identifier indicating a mode of adaptive orthogonal transform in image coding is binarized, and then context coding is performed. Image processing methods.

13. An encoding unit that assigns a context variable based on a parameter related to a component to the first bin of a bin sequence obtained by binarizing a secondary transformation identifier that is an identifier related to a secondary transformation in image encoding, and performs context encoding. An image processing device comprising:

14. The encoding unit performs bypass encoding on each of the second and subsequent bins of the bin sequence. The image processing device according to claim 13 .

15. The encoding unit assigns a predetermined context variable to the second bin of the bin sequence and performs context encoding, and performs bypass encoding on the third bin and each subsequent bin. The image processing device according to claim 13 .

16. The encoding unit assigns different predetermined context variables to the second and third bins of the bin sequence and performs context encoding on them, and performs bypass encoding on the fourth and subsequent bins. The image processing device according to claim 13 .

17. The encoding unit performs context encoding by assigning different predetermined context variables to the second and subsequent bins of the bin sequence. The image processing device according to claim 13 .

18. A context variable based on a parameter related to a component is assigned to the first bin of a bin sequence obtained by binarizing a secondary transformation identifier, which is an identifier related to a secondary transformation in image coding, and then context coding is performed. Image processing methods.

19. An encoding unit that assigns a context variable based on a parameter related to a tree type to the first bin of a bin sequence obtained by binarizing a secondary transformation identifier that is an identifier related to a secondary transformation in image encoding, and performs context encoding. An image processing device comprising:

20. The encoding unit performs bypass encoding on each of the second and subsequent bins of the bin sequence. The image processing device according to claim 19.

21. The encoding unit assigns a predetermined context variable to the second bin of the bin sequence and performs context encoding, and performs bypass encoding on the third bin and each subsequent bin. The image processing device according to claim 19.

22. The encoding unit assigns different predetermined context variables to the second and third bins of the bin sequence and performs context encoding on them, and performs bypass encoding on the fourth and subsequent bins. The image processing device according to claim 19.

23. The encoding unit performs context encoding by assigning different predetermined context variables to the second and subsequent bins of the bin sequence. The image processing device according to claim 19.

24. A context variable based on a parameter related to a tree type is assigned to the first bin of a bin sequence obtained by binarizing a secondary transformation identifier, which is an identifier related to a secondary transformation in image coding, and then the context is coded. Image processing methods.

25. An encoding unit that assigns a context variable based on a parameter related to a component to the first bin of a bin sequence in which a transform skip flag, which is a flag related to skipping a primary transform and a secondary transform in image encoding, is binarized, and performs context encoding. An image processing device comprising:

26. The encoding unit performs bypass encoding on each of the second and subsequent bins of the bin sequence. The image processing device according to claim 25.

27. The encoding unit assigns a predetermined context variable to the second bin of the bin sequence and performs context encoding, and performs bypass encoding on the third bin and each subsequent bin. The image processing device according to claim 25.

28. The encoding unit assigns different predetermined context variables to the second and third bins of the bin sequence and performs context encoding on them, and performs bypass encoding on the fourth and subsequent bins. The image processing device according to claim 25.

29. The encoding unit performs context encoding by assigning different predetermined context variables to the second and subsequent bins of the bin sequence. The image processing device according to claim 25.

30. A context variable based on a parameter related to a component is assigned to the first bin of a bin sequence in which a transform skip flag, which is a flag related to skipping a primary transform and a secondary transform in image encoding, is binarized, and then context encoding is performed. Image processing methods.

31. An encoding unit that assigns a context variable based on a parameter related to a tree type to the first bin of a bin sequence in which a transform skip flag, which is a flag related to skipping primary transform and secondary transform in image encoding, is binarized, and performs context encoding. An image processing device comprising:

32. The encoding unit performs bypass encoding on each of the second and subsequent bins of the bin sequence. The image processing device according to claim 31.

33. The encoding unit assigns a predetermined context variable to the second bin of the bin sequence and performs context encoding, and performs bypass encoding on the third bin and each subsequent bin. The image processing device according to claim 31.

34. The encoding unit assigns different predetermined context variables to the second and third bins of the bin sequence and performs context encoding on them, and performs bypass encoding on the fourth and subsequent bins. The image processing device according to claim 31.

35. The encoding unit performs context encoding by assigning different predetermined context variables to the second and subsequent bins of the bin sequence. The image processing device according to claim 31.

36. A transformation skip flag, which is a flag for skipping primary transformation and secondary transformation in image coding, is binarized. A context variable based on a parameter related to a tree type is assigned to the first bin of the bin sequence, and then context coding is performed. Image processing methods.

37. A decoding unit that performs context decoding by assigning a context variable based on a parameter related to a component to the first bin of a bin sequence in which an adaptive orthogonal transform identifier indicating a mode of an inverse adaptive orthogonal transform in image decoding is binarized. An image processing device comprising:

38. The decoding unit performs bypass decoding on each bin from the second bin onward in the bin sequence.

38. The image processing device according to claim 37.

39. The decoding unit assigns a predetermined context variable to the second bin of the bin sequence and performs context decoding, and performs bypass decoding on each bin from the third bin onward.

38. The image processing device according to claim 37.

40. The decoding unit performs context decoding on the second and third bins of the bin sequence by assigning different predetermined context variables to the second and third bins, and performs bypass decoding on the fourth and subsequent bins.

38. The image processing device according to claim 37.

41. The decoding unit performs context decoding by assigning different predetermined context variables to the second and subsequent bins of the bin sequence.

38. The image processing device according to claim 37.

42. A context variable based on a parameter related to a component is assigned to the first bin of a bin sequence in which an adaptive orthogonal transform identifier indicating a mode of an inverse adaptive orthogonal transform in image decoding is binarized, and context decoding is performed. Image processing methods.

43. A decoding unit that performs context decoding by assigning a context variable based on a parameter related to a tree type to the first bin of a bin sequence in which an adaptive orthogonal transform identifier indicating a mode of an inverse adaptive orthogonal transform in image decoding is binarized. An image processing device comprising:

44. The decoding unit performs bypass decoding on each bin from the second bin onward in the bin sequence.

44. The image processing device according to claim 43.

45. The decoding unit assigns a predetermined context variable to the second bin of the bin sequence and performs context decoding, and performs bypass decoding on each bin from the third bin onward.

44. The image processing device according to claim 43.

46. The decoding unit performs context decoding on the second and third bins of the bin sequence by assigning different predetermined context variables to the second and third bins, and performs bypass decoding on the fourth and subsequent bins.

44. The image processing device according to claim 43.

47. The decoding unit performs context decoding by assigning different predetermined context variables to the second and subsequent bins of the bin sequence.

44. The image processing device according to claim 43.

48. A context variable based on a parameter related to a tree type is assigned to the first bin of a bin sequence in which an adaptive orthogonal transform identifier indicating a mode of an inverse adaptive orthogonal transform in image decoding is binarized, and then context decoding is performed. Image processing methods.

49. A decoding unit that performs context decoding by assigning a context variable based on a parameter related to a component to the first bin of a bin sequence obtained by binarizing a secondary transformation identifier that is an identifier related to an inverse secondary transformation in image decoding. An image processing device comprising:

50. The decoding unit performs bypass decoding on each bin from the second bin onward in the bin sequence.

50. The image processing device of claim 49.

51. The decoding unit assigns a predetermined context variable to the second bin of the bin sequence and performs context decoding, and performs bypass decoding on each bin from the third bin onward.

50. The image processing device of claim 49.

52. The decoding unit performs context decoding on the second and third bins of the bin sequence by assigning different predetermined context variables to the second and third bins, and performs bypass decoding on the fourth and subsequent bins.

50. The image processing device of claim 49.

53. The decoding unit performs context decoding by assigning different predetermined context variables to the second and subsequent bins of the bin sequence.

50. The image processing device of claim 49.

54. A context variable based on a parameter related to a component is assigned to the first bin of a bin sequence obtained by binarizing a secondary transformation identifier, which is an identifier related to an inverse secondary transformation in image decoding, and then context decoding is performed. Image processing methods.

55. A decoding unit that performs context decoding by assigning a context variable based on a parameter related to a tree type to the first bin of a bin sequence obtained by binarizing a secondary transformation identifier that is an identifier related to an inverse secondary transformation in image decoding. An image processing device comprising:

56. The decoding unit performs bypass decoding on each bin from the second bin onward in the bin sequence.

56. The image processing device according to claim 55.

57. The decoding unit assigns a predetermined context variable to the second bin of the bin sequence and performs context decoding, and performs bypass decoding on each bin from the third bin onward.

56. The image processing device according to claim 55.

58. The decoding unit performs context decoding on the second and third bins of the bin sequence by assigning different predetermined context variables to the second and third bins, and performs bypass decoding on the fourth and subsequent bins.

56. The image processing device according to claim 55.

59. The decoding unit performs context decoding by assigning different predetermined context variables to the second and subsequent bins of the bin sequence.

56. The image processing device according to claim 55.

60. A context variable based on a parameter related to a tree type is assigned to the first bin of a bin sequence obtained by binarizing a secondary transformation identifier, which is an identifier related to an inverse secondary transformation in image decoding, and then context decoding is performed. Image processing methods.

61. a decoding unit that performs context decoding by assigning a context variable based on a parameter related to a component to the first bin of a bin sequence in which a transform skip flag, which is a flag related to skipping an inverse primary transform and an inverse secondary transform in image decoding, is binarized; An image processing device comprising:

62. The decoding unit performs bypass decoding on each bin from the second bin onward in the bin sequence.

62. The image processing device of claim 61.

63. The decoding unit assigns a predetermined context variable to the second bin of the bin sequence and performs context decoding, and performs bypass decoding on each bin from the third bin onward.

62. The image processing device of claim 61.

64. The decoding unit performs context decoding on the second and third bins of the bin sequence by assigning different predetermined context variables to the second and third bins, and performs bypass decoding on the fourth and subsequent bins.

62. The image processing device of claim 61.

65. The decoding unit performs context decoding by assigning different predetermined context variables to the second and subsequent bins of the bin sequence.

62. The image processing device of claim 61.

66. A context variable based on a parameter related to a component is assigned to the first bin of a bin sequence in which a transform skip flag, which is a flag related to skipping an inverse primary transform and an inverse secondary transform in image decoding, is binarized, and then context decoding is performed. Image processing methods.

67. a decoding unit that performs context decoding by assigning a context variable based on a parameter related to a tree type to the first bin of a bin sequence in which a transform skip flag, which is a flag related to skipping an inverse primary transform and an inverse secondary transform in image decoding, is binarized; An image processing device comprising:

68. The decoding unit performs bypass decoding on each bin from the second bin onward in the bin sequence.

68. The image processing device of claim 67.

69. The decoding unit assigns a predetermined context variable to the second bin of the bin sequence and performs context decoding, and performs bypass decoding on each bin from the third bin onward.

68. The image processing device of claim 67.

70. The decoding unit performs context decoding on the second and third bins of the bin sequence by assigning different predetermined context variables to the second and third bins, and performs bypass decoding on the fourth and subsequent bins.

68. The image processing device of claim 67.

71. The decoding unit performs context decoding by assigning different predetermined context variables to the second and subsequent bins of the bin sequence.

68. The image processing device of claim 67.

72. A context variable based on a parameter related to a tree type is assigned to the first bin of a bin sequence in which a transform skip flag, which is a flag related to skipping an inverse primary transform and an inverse secondary transform in image decoding, is binarized, and then context decoding is performed. Image processing methods.