Image processing device and method
By dynamically controlling orthogonal transform types based on encoding parameters, the method addresses inefficiencies in conventional AMT by reducing residual signal and mode information code amounts, thereby improving encoding efficiency.
Patent Information
- Application Number
- JP2024111523
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2018-03-30
- Filing Date
- 2024-07-11
- Publication Date
- 2024-10-01
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Conventional methods for adaptive multiple core transforms (AMT) in image processing face challenges in efficiently managing the code amount of residual signals and mode information, leading to potential decreases in encoding efficiency due to fixed numbers of candidates that fail to adapt to varying signal characteristics.
The proposed solution involves controlling the number of orthogonal transform type candidates based on encoding parameters, such as signal type and prediction mode, to dynamically adjust the transform types for luminance and chrominance components, thereby reducing unnecessary code amounts in both residual signals and mode information.
This approach effectively suppresses the increase in memory capacity and code amount, enhancing encoding efficiency by adaptively selecting transform types that align with the relative code amounts of residual signals and mode information.
Smart Images

Figure 2024133185000001_ABST
Abstract
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 a decrease in encoding efficiency (improving encoding efficiency). [Background technology]
[0002] Conventionally, for luminance, adaptive primary transforms (AMT: Adaptive Multiple Core Transforms) have been disclosed that adaptively select a primary transform from a plurality of different orthogonal transforms for each horizontal primary transform PThor (also referred to as a primary horizontal transform) and each vertical primary transform PTver (also referred to as a primary vertical transform) for each TU (Transform Unit) (see, for example, Non-Patent Document 1).
[0003] In Non-Patent Document 1, there are five one-dimensional orthogonal transforms, DCT-II, DST-VII, DCT-VIII, DST-I, and DCT-VI, as candidates for the primary transform. When AMT is applied, a 2-bit index indicating which orthogonal transform is applied horizontally / vertically from a transform set determined by a prediction mode is signaled, and one transform is selected from two candidates for each direction. In addition, it has been proposed to add two one-dimensional orthogonal transforms, DST-IV and IDT (Identity Transform: one-dimensional transform skip), to make a total of seven one-dimensional orthogonal transforms candidates for the primary transform (see, for example, Non-Patent Document 2). [Prior art documents] [Non-patent literature]
[0004] [Non-Patent Document 1] Jianle Chen, Elena Alshina, Gary J. Sullivan, Jens-Rainer, Jill Boyce, "Algorithm Description of Joint Exploration Test Model 4", JVET-G1001_v1, 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-Patent Document 2] V. Lorcy, P. Philippe, "Proposed improvements to the Adaptive multiple Core transform", JVET-C0022, Joint Video Exploration Team (JVET) of ITU-T SG 16 WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11 3rd Meeting: Geneva, CH, 26 May - 1 June 2016 Summary of the Invention [Problem to be solved by the invention]
[0005] Incidentally, in a block where the amount of code of the residual signal is relatively large and the amount of code of the AMT mode information is small, it is desirable to reduce the amount of code of the residual signal more. On the other hand, in a block where the amount of code of the residual signal is relatively small and the amount of code of the AMT mode information is large, it is desirable to reduce the amount of code of the AMT mode information more. However, in the case of the conventional method, the number of candidates for AMT conversion is fixed, and it is difficult to respond to the above-mentioned tendency. Therefore, there is a risk that the amount of code of the AMT mode information and the residual signal increases unnecessarily, and the coding efficiency decreases.
[0006] The present disclosure has been made in consideration of such circumstances, and makes it possible to suppress a decrease in coding efficiency (to improve coding efficiency). [Means for solving the problem]
[0007] An image processing device according to one aspect of the present technology is an image processing device including: a decoding unit that decodes encoded data to generate quantized data; an inverse quantization unit that inverse quantizes the quantized data generated by the decoding unit to generate coefficient data; a setting unit that sets an inverse orthogonal transform type for the chrominance component from candidates for inverse orthogonal transform type for the chrominance component, the number of candidates being set to be fewer than the number of candidates for inverse orthogonal transform type for the luminance component; and an inverse orthogonal transform unit that performs an inverse orthogonal transform on the chrominance component of the coefficient data generated by the inverse quantization unit using a transform matrix corresponding to the inverse orthogonal transform type set by the setting unit.
[0008] An image processing method according to one aspect of the present technology includes decoding encoded data to generate quantized data, inverse quantizing the generated quantized data to generate coefficient data, selecting an inverse orthogonal transform type for the chrominance component from candidates for inverse orthogonal transform types for the chrominance component, the number of candidates being set to be fewer than the number of candidates for inverse orthogonal transform types for the luminance component, and performing an inverse orthogonal transform on the chrominance component of the generated coefficient data using a transform matrix corresponding to the set inverse orthogonal transform type.
[0009] An image processing device according to another aspect of the present technology is an image processing device including: a setting unit that sets an orthogonal transform type for a chrominance component from candidates for orthogonal transform types for the chrominance component, the number of candidates being set fewer than the number of candidates for orthogonal transform types for the luminance component; an orthogonal transform unit that performs an orthogonal transform on the chrominance component of image data using a transform matrix corresponding to the orthogonal transform type set by the setting unit, and generates coefficient data; a quantization unit that quantizes the coefficient data generated by the orthogonal transform unit to generate quantized data; and an encoding unit that encodes the quantized data generated by the quantization unit to generate encoded data.
[0010] An image processing method according to another aspect of the present technology is an image processing method that includes setting an orthogonal transform type for a chrominance component from candidates for orthogonal transform types for the chrominance component, the number of candidates being set fewer than the number of candidates for orthogonal transform types for the luminance component, performing an orthogonal transform on the chrominance component of image data using a transform matrix corresponding to the set orthogonal transform type to generate coefficient data, quantizing the generated coefficient data to generate quantized data, and encoding the generated quantized data to generate encoded data.
[0011] In an image processing device and method according to one aspect of the present technology, encoded data is decoded to generate quantized data, the generated quantized data is inverse quantized to generate coefficient data, an inverse orthogonal transform type for the chrominance component is set from candidates for the inverse orthogonal transform type for the chrominance component, which is set to a number fewer than the number of candidates for the inverse orthogonal transform type for the luminance component, and an inverse orthogonal transform is performed on the chrominance component of the generated coefficient data using a transform matrix corresponding to the set inverse orthogonal transform type.
[0012] In an image processing device and method of another aspect of the present technology, an orthogonal transform type for a chrominance component is set from candidates for orthogonal transform types for the chrominance component, which is set to a number fewer than the number of candidates for orthogonal transform types for the luminance component, an orthogonal transform type for the chrominance component is performed on the chrominance component of the image data using a transform matrix corresponding to the set orthogonal transform type to generate coefficient data, the generated coefficient data is quantized to generate quantized data, and the generated quantized data is encoded to generate encoded data. Effect of the Invention
[0013] According to the present disclosure, it is possible to process an image. In particular, it is possible to suppress an increase in memory capacity required for orthogonal transformation and inverse orthogonal transformation. In addition, it is possible to more efficiently reduce the code amount of mode information of the orthogonal transformation and the residual signal. Note that the above-mentioned effects are not necessarily limited, and any of the effects shown in this specification or other effects that can be understood from this specification may be achieved together with or instead of the above-mentioned effects. [Brief description of the drawings]
[0014] [Figure 1] FIG. 13 is a diagram illustrating an example of the number of selectable transform pairs according to encoding parameters. [Diagram 2] FIG. 13 is a diagram showing examples of selectable transform pairs in each transform set. [Diagram 3] FIG. 13 is a diagram showing a correspondence relationship between a transform set and a prediction mode. [Figure 4] FIG. 1 is a block diagram showing an example of the main configuration of an image encoding device. [Diagram 5] 11 is a flowchart illustrating an example of the flow of an encoding process. [Figure 6] FIG. 2 is a block diagram showing an example of the main configuration of an image decoding device. [Figure 7] 13 is a flowchart illustrating an example of the flow of a decoding process. [Figure 8] 13 is a diagram showing an example of a list of encoding parameters used to control the number of transform pairs. [Figure 9] FIG. 1 is a block diagram showing an example of the main configuration of an image encoding device. [Figure 10] 4 is a block diagram showing an example of a main configuration of a control unit regarding control of orthogonal transformation. FIG. [Figure 11] 11 is a block diagram showing an example of the main configuration of an orthogonal transform unit. FIG. [Figure 12] 11 is a block diagram showing an example of the main configuration of a primary horizontal conversion unit. FIG. [Figure 13] 13 is a block diagram showing an example of the main configuration of a transformation matrix derivation unit. FIG. [Figure 14] 13 is a block diagram showing an example of the main configuration of a primary vertical conversion unit. FIG. [Figure 15] 13 is a block diagram showing an example of the main configuration of a transformation matrix derivation unit. FIG. [Figure 16] 13 is a flowchart showing an example of the flow of an image encoding process. [Figure 17] 11 is a flowchart illustrating an example of the flow of an orthogonal transform control process. [Figure 18] 11 is a flowchart illustrating an example of the flow of an orthogonal transform process. [Figure 19] 13 is a flowchart illustrating an example of the flow of a primary conversion process. [Figure 20] 13 is a flowchart illustrating an example of the flow of a primary horizontal transformation process. [Figure 21] 13 is a flowchart illustrating an example of the flow of a transformation matrix derivation process. [Figure 22] 13 is a flowchart illustrating an example of the flow of a primary vertical transformation process. [Diagram 23] FIG. 2 is a block diagram showing an example of the main configuration of an image decoding device. [Figure 24] 11 is a block diagram showing an example of a main configuration of a decoding unit related to control of inverse orthogonal transform. FIG. [Diagram 25] 11 is a block diagram showing an example of the main configuration of an inverse orthogonal transform unit. FIG. [Figure 26] 13 is a block diagram showing an example of the main configuration of an inverse primary vertical transform unit. FIG. [Figure 27] 13 is a block diagram showing an example of the main configuration of a transformation matrix derivation unit. FIG. [Figure 28] 13 is a block diagram showing an example of the main configuration of an inverse primary horizontal transform unit. FIG. [Figure 29] 13 is a block diagram showing an example of the main configuration of a transformation matrix derivation unit. FIG. [Diagram 30] 13 is a flowchart illustrating an example of the flow of an image decoding process. [Diagram 31] 11 is a flowchart illustrating an example of the flow of an inverse orthogonal transform control process. [Diagram 32] 13 is a flowchart illustrating an example of the flow of an inverse orthogonal transform process. [Diagram 33]13 is a flowchart illustrating an example of the flow of a reverse primary transformation process. [Diagram 34] 13 is a flowchart illustrating an example of the flow of an inverse primary vertical transform process. [Diagram 35] 13 is a flowchart illustrating an example of the flow of an inverse primary horizontal transform process. [Diagram 36] FIG. 13 is a diagram showing an example of the number of selectable transform pairs according to encoding parameters. [Figure 37] FIG. 11 is a diagram illustrating an example of encoding and decoding of conversion pair identification information. [Figure 38] FIG. 13 is a diagram showing an example of how the number of selectable conversion pairs is set according to method #1. [Figure 39] 13 is a flowchart illustrating an example of the flow of a conversion pair number setting process. [Diagram 40] FIG. 13 is a diagram showing an example of how the number of selectable conversion pairs is set according to method #2-1. [Diagram 41] 13 is a flowchart illustrating an example of the flow of a conversion pair number setting process. [Diagram 42] A figure showing an example of how to set the number of selectable conversion pairs according to method #2-2. [Diagram 43] 13 is a flowchart illustrating an example of the flow of a conversion pair number setting process. [Diagram 44] FIG. 13 is a diagram showing an example of how the number of selectable conversion pairs is set according to method #3. [Diagram 45] 13 is a flowchart illustrating an example of the flow of a conversion pair number setting process. [Diagram 46] A figure showing an example of how to set the number of selectable conversion pairs according to method #4-1. [Figure 47] 13 is a flowchart illustrating an example of the flow of a conversion pair number setting process. [Figure 48] A figure showing an example of how to set the number of selectable conversion pairs according to method #4-2. [Figure 49] 13 is a flowchart illustrating an example of the flow of a conversion pair number setting process. [Figure 50]A figure showing an example of how to set the number of selectable conversion pairs according to method #5-1. [Figure 51] 13 is a flowchart illustrating an example of the flow of a conversion pair number setting process. [Figure 52] A figure showing an example of how to set the number of selectable conversion pairs according to method #5-2. [Figure 53] 13 is a flowchart illustrating an example of the flow of a conversion pair number setting process. [Figure 54] A figure showing an example of how to set the number of selectable conversion pairs according to method #5-3. [Figure 55] 13 is a flowchart illustrating an example of the flow of a conversion pair number setting process. [Figure 56] FIG. 13 is a diagram illustrating an example of the number of selectable conversion pairs. [Figure 57] FIG. 13 is a diagram illustrating an example of how to set the number of selectable conversion pairs. [Figure 58] 13 is a syntax illustrating an example of control information regarding setting of the number of selectable conversion pairs. [Figure 59] FIG. 1 is a block diagram showing an example of a main configuration of a computer. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0015] Hereinafter, modes for carrying out the present disclosure (hereinafter referred to as embodiments) will be described in the following order. 1. Adaptive orthogonal transformation 2. Common Concept 2-1. Image encoding device 2-2.Image Decoding Device 2-3. List of methods 2-4. Image encoding device 2-5.Image Decoding Device 2-6.Other 3. First embodiment (Method #1) 4. Second embodiment (Method #2) 4-1. Method #2-1 4-2. Method #2-2 4-3.Method #2-3 5. Third embodiment (Method #3) 6. Fourth embodiment (Method #4) 6-1. Method #4-1 6-2. Method #4-2 7. Fifth embodiment (Method #5) 7-1. Method #5-1 7-2.Method #5-2 7-3.Method #5-3 8. Application Examples 9. Notes
[0016] <1. Adaptive orthogonal transformation> <References supporting technical content and technical terms> 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 the application.
[0017] Non-patent document 1: (mentioned above) Non-patent document 3: TELECOMMUNICATION STANDARDIZATION SECTOR OF ITU (International Telecommunication Union), "Advanced video coding for generic audiovisual services", H.264, 04 / 2017 Non-patent document 4: TELECOMMUNICATION STANDARDIZATION SECTOR OF ITU (International Telecommunication Union), "High efficiency video coding", H.265, 12 / 2016
[0018] In other words, the contents described in the above non-patent documents are also the basis for determining the support requirements. For example, even if the Quad-Tree Block Structure described in Non-Patent Document 4 and the QTBT (Quad Tree Plus Binary Tree) Block Structure described in Non-Patent Document 1 are not directly described in the embodiments, they are within the disclosure scope of the present technology and meet the support requirements of the claims. Similarly, even if technical terms such as parsing, syntax, and semantics are not directly described in the embodiments, they are within the disclosure scope of the present technology and meet the support requirements of the claims.
[0019] In addition, in this specification, a "block" (not a block indicating a processing unit) used in the description as a partial region or processing unit of an image (picture) indicates an arbitrary partial region in a picture, and its size, shape, characteristics, etc. are not limited, unless otherwise specified. For example, a "block" includes an arbitrary partial region (processing unit) such as a TB (Transform Block), a TU (Transform Unit), a PB (Prediction Block), a PU (Prediction Unit), a SCU (Smallest Coding Unit), a CU (Coding Unit), an LCU (Largest Coding Unit), a CTB (Coding Tree Block), a CTU (Coding Tree Unit), a transform block, a subblock, a macroblock, a tile, or a slice, as described in the above-mentioned Non-Patent Document 1, Non-Patent Document 3, and Non-Patent Document 4. In addition, when specifying the size of such a block, not only the block size may be specified directly, but also the block size may be specified indirectly. For example, the block size may be specified using identification information that identifies the size. For example, the block size may be specified by a ratio or difference from the size of a reference block (for example, an LCU or an SCU). For example, when transmitting information specifying a block size as a syntax element, the information may indirectly specify the size as described above. In this way, the amount of information can be reduced, and the coding efficiency can be improved. The block size specification also includes the specification of a range of block sizes (e.g., the specification of a range of allowable block sizes).
[0020] In this specification, encoding includes not only the whole process of converting an image into a bit stream, but also a part of the process. For example, it includes not only a process including prediction processing, orthogonal transformation, quantization, arithmetic coding, etc., but also a process collectively referring to quantization and arithmetic coding, a process including prediction processing, quantization, and arithmetic coding, etc. Similarly, decoding includes not only the whole process of converting a bit stream into an image, but also a part of the process. For example, it includes not only a process including inverse arithmetic decoding, inverse quantization, inverse orthogonal transformation, prediction processing, etc., but also a process including inverse arithmetic decoding and inverse quantization, a process including inverse arithmetic decoding, inverse quantization, and prediction processing, etc.
[0021] <Adaptive orthogonal transformation> In the test model (Joint Exploration Test Model 4 (JEM4)) described in Non-Patent Document 1, an adaptive primary transform (AMT (Adaptive Multiple core Transforms)) is disclosed that adaptively selects a primary transform from a plurality of different one-dimensional orthogonal transforms for each horizontal primary transform PThor (also called primary horizontal transform) and each vertical primary transform PTver (also called primary vertical transform) for a luminance transform block. Note that AMT is also called EMT (Explicit Multiple core Transforms).
[0022] Specifically, for a luminance transform block, when the adaptive primary transform flag apt_flag, which indicates whether or not to perform an adaptive primary transform, is 0 (false), the primary transform is uniquely determined by the mode information to be DCT (Discrete Cosine Transform)-II or DST (Discrete Sine Transform)-VII (TrSetIdx = 4).
[0023] When the adaptive primary transform flag apt_flag is 1 (true) and the current coding unit (CU) including the luminance transform block to be processed is an intra CU, a transform set TrSet including orthogonal transforms that are candidates for the primary transform in each of the horizontal direction (x direction) and vertical direction (y direction) is selected from three transform sets TrSet (TrSetIdx = 0, 1, 2). Note that the above-mentioned DST-VII, DCT-VIII, etc. indicate the type of orthogonal transform.
[0024] This transform set TrSet is uniquely determined based on the correspondence table between mode information and transform sets (intra-prediction mode information of the correspondence table). For example, as shown in the following formulas (1) and (2), a transform set identifier TrSetIdx that specifies the corresponding transform set TrSet is set for each transform set TrSetH, TrSetV.
[0025]
number
[0026] Here, TrSetH indicates a transform set of the primary horizontal transform PThor, TrSetV indicates a transform set of the primary vertical transform PTver, and the lookup table LUT_IntraModeToTrSet is a correspondence table between mode information and transform sets. The first array of the lookup table LUT_IntraModeToTrSet[][] takes the intra prediction mode IntraMode as an argument, and the second array takes {H=0, V=1} as an argument.
[0027] For example, in the case of intra-prediction mode number 19 (IntraMode == 19), a transform set with transform set identifier TrSetIdx = 0 is selected as the transform set TrSetH (also referred to as the primary horizontal transform set) for the primary horizontal transform PThor, and a transform set with transform set identifier TrSetIdx = 2 is selected as the transform set TrSetV (also referred to as the primary vertical transform set) for the primary vertical transform PTver.
[0028] In addition, when the adaptive primary transform flag apt_flag is 1 (true) and the current CU containing the luminance transform block to be processed is an inter CU, the transform set TrSetH for the primary horizontal transform and the transform set TrSetV for the primary vertical transform are assigned the transform set InterTrSet (TrSetIdx = 3) dedicated to inter CUs.
[0029] Next, for each of the horizontal and vertical directions, which orthogonal transform to apply from the selected transform set TrSet is selected based on the corresponding one of the primary horizontal transform specification flag pt_hor_flag and the primary vertical transform specification flag pt_ver_flag.
[0030] For example, as shown in the following equations (3) and (4), the primary {horizontal, vertical} transformation set TrSet{H, V} and the primary {horizontal, vertical} transformation specification flag pt_{hor, ver}_flag are used as arguments to derive from the transformation set definition table (LUT_TrSetToTrTypeIdx) shown in Figure 1.
[0031]
number
[0032] For example, when the intra prediction mode number is 34 (IntraMode == 34) (i.e., the primary horizontal transform set TraSetH is 0) and the primary horizontal transform specification flag pt_hor_flag is 0, the transform set definition table (LUT_TrSetToTrTypeIdx) indicates that the value of the transform type identifier TrTypeIdxH in equation (3) is 4, and the transform type corresponding to the value of the transform type identifier TrTypeIdxH is DST-VII. That is, DST-VII of the transform set whose transform set identifier TrSetIdx is 0 is selected as the transform type of the primary horizontal transform PThor. Also, when the primary horizontal transform specification flag pt_hor_flag is 1, DCT-VIII is selected as the transform type. Note that selecting a transform type includes selecting a transform type specified by the transform type identifier TrTypeIdx via the transform type identifier TrTypeIdx.
[0033] The primary transform identifier pt_idx is derived from the primary horizontal transform specification flag pt_hor_flag and the primary vertical transform specification flag pt_ver_flag based on the following formula (5). That is, the most significant bit of the primary transform identifier pt_idx corresponds to the value of the primary vertical transform specification flag, and the least significant bit corresponds to the value of the primary horizontal transform specification flag.
[0034]
number
[0035] The encoding is performed by applying arithmetic coding to the bin string of the derived primary transform identifier pt_idx to generate a bit string. Note that the adaptive primary transform flag apt_flag and the primary transform identifier pt_idx are signaled in the luma transform block.
[0036] As described above, in Non-Patent Document 1, five one-dimensional orthogonal transforms, DCT-II (DCT2), DST-VII (DST7), DCT-VIII (DCT8), DST-I (DST1), and DCT-V (DCT5), are proposed as candidates for the primary transform. When AMT is applied, a two-bit index indicating which orthogonal transform is to be applied horizontally / vertically from a transform set determined by a prediction mode is signaled, and one transform is selected from two candidates for each direction. In addition, in Non-Patent Document 2, two one-dimensional orthogonal transforms, DST-IV (DST4) and IDT (Identity Transform: one-dimensional transform skip), are added to the above, and a total of seven one-dimensional orthogonal transforms are proposed as candidates for the primary transform.
[0037] <Coding efficiency> Generally, the more candidates the AMT conversion is selected from (that is, the more selectable conversions the AMT has), the more likely it is that a more appropriate conversion will be selected, and the less the amount of code for the residual signal will be. However, as the number of candidates increases, the more likely it is that the amount of code for the AMT mode information including information indicating the applied conversion will increase (the amount of code will be large). In other words, the fewer the number of candidates for AMT conversion, the more likely it is that the amount of code for the AMT mode information will decrease (the amount of code will be small), and the more likely it is that the amount of code for the residual signal will increase.
[0038] However, if the amount of code of the AMT mode information is relatively small compared to the amount of code of the residual signal, the increase or decrease in the amount of code of the AMT mode information is small compared to the increase or decrease in the amount of code of the residual signal. Therefore, in a block where the amount of code of the residual signal is relatively large and the amount of code of the AMT mode information is small, the amount of code can be reduced more efficiently by increasing the number of AMT conversion candidates and reducing the amount of code of the residual signal than by reducing the amount of code of the AMT mode information.
[0039] Conversely, if the code amount of the AMT mode information is relatively large compared to the code amount of the residual signal, the increase or decrease in the code amount of the AMT mode information will be large compared to the increase or decrease in the code amount of the residual signal. Therefore, in a block where the code amount of the residual signal is relatively small and the code amount of the AMT mode information is large, the code amount can be reduced more efficiently by reducing the number of AMT conversion candidates and reducing the code amount of the AMT mode information than by reducing the code amount of the residual signal.
[0040] However, in the conventional method, the number of AMT conversion candidates is fixed, and it is difficult to control the amount of code as described above. Therefore, the amount of code of the AMT mode information and the residual signal increases unnecessarily, and there is a risk of reducing the coding efficiency.
[0041] <2. Common Concept> <Control of orthogonal transform type based on coding parameters> Therefore, based on encoding parameters, which are information related to the encoding of image data, the type of orthogonal transform of the prediction residual of the image data is controlled, the prediction residual is orthogonally transformed in accordance with the control of the type of orthogonal transform to generate coefficient data, and the coefficient data is encoded to generate encoded data.
[0042] For example, an image processing device may include a control unit that controls the type of orthogonal transform of the prediction residual of image data based on an encoding parameter, which is information related to the encoding of the image data, and an encoding unit that performs an orthogonal transform on the prediction residual in accordance with the control of the control unit to generate coefficient data, and encodes the coefficient data to generate encoded data.
[0043] In addition, based on encoding parameters, which are information regarding the decoding of encoded data of image data, the type of inverse orthogonal transform of coefficient data generated from the encoded data is controlled, the encoded data is decoded to generate coefficient data, and the coefficient data is inverse orthogonal transformed in accordance with the control of the type of inverse orthogonal transform to generate image data.
[0044] For example, an image processing device is provided with a control unit that controls the type of inverse orthogonal transform of coefficient data generated from encoded data of image data based on encoding parameters, which are information related to the decoding of the encoded data, and a decoding unit that decodes the encoded data to generate coefficient data, and performs inverse orthogonal transform on the coefficient data under the control of the control unit to generate image data.
[0045] By doing so, for example, in a block where the residual signal code amount is relatively large and the AMT mode information code amount is small, the residual signal code amount can be reduced more, and in a block where the AMT mode information code amount is large, the AMT mode information code amount can be reduced more. Therefore, it is possible to suppress the reduction in coding efficiency (improve coding efficiency).
[0046] For example, the control unit may select a type of orthogonal transform from among a number of candidates corresponding to the encoding parameters, and the encoding unit may perform an orthogonal transform on the prediction residual using a transform matrix of the type of orthogonal transform selected by the control unit.
[0047] Also, for example, the control unit may set the number of candidates for the type of inverse orthogonal transform according to the encoding parameters, parse information regarding the type of inverse orthogonal transform contained in the encoded data based on the set number of candidates for the type of inverse orthogonal transform, and set the type of inverse orthogonal transform based on the parsed information regarding the type of inverse orthogonal transform, and the decoding unit may perform an inverse orthogonal transform on the coefficient data using a transform matrix of the type of inverse orthogonal transform set by the control unit.
[0048] By doing so, for example, in a block in which the amount of code of the residual signal is relatively large and the amount of code of the AMT mode information including information indicating the type of the applied orthogonal transform (inverse orthogonal transform) is small, the number of candidates for the type of orthogonal transform (inverse orthogonal transform) can be increased, and the type of orthogonal transform (inverse orthogonal transform) can be selected from a larger number of candidates. This makes it possible to reduce the amount of code of the residual signal. Conversely, in a block in which the amount of code of the AMT mode information is relatively large and the amount of code of the residual signal is small, the number of candidates for the type of orthogonal transform (inverse orthogonal transform) can be reduced, and the type of orthogonal transform (inverse orthogonal transform) can be selected from a smaller number of candidates. This makes it possible to reduce the amount of code of the AMT mode information.
[0049] For example, the more the amount of code of the residual signal of the block to be processed (the less the mode information of AMT), the more the number of candidates of the type of orthogonal transform (inverse orthogonal transform) is increased, and the type of orthogonal transform (inverse orthogonal transform) can be selected from more candidates.In other words, the less the amount of code of the residual signal of the block to be processed (the more the mode information of AMT), the more the number of candidates of the type of orthogonal transform (inverse orthogonal transform) is reduced, and the type of orthogonal transform (inverse orthogonal transform) can be selected from fewer candidates.
[0050] Therefore, it is possible to suppress a decrease in the coding efficiency (to improve the coding efficiency).
[0051] As described above, the code amount of the residual signal of the block to be processed and the mode information of AMT are estimated based on the coding parameters. The coding parameters may be any information related to coding and decoding. For example, as shown in Table 11 in FIG. 1, the number of candidates (# of Transform Pair) for the type of orthogonal transform (inverse orthogonal transform) can be made variable according to coding parameters such as whether the processing target is a luminance signal or a chrominance signal (whether the component (Component) is luminance (Luma) or chrominance (Chroma)) and whether the prediction mode is intra prediction (Intra) or inter prediction (Inter).
[0052] Generally, the amount of code for the residual signal of the color difference signal is smaller than that of the luminance signal. Therefore, as shown in the example of Table 11, by reducing the number of candidates for the type of orthogonal transform (inverse orthogonal transform) for the color difference signal compared to that of the luminance signal (in other words, by reducing the number of candidates for the type of orthogonal transform (inverse orthogonal transform) for the luminance signal compared to that of the color difference signal), the amount of code can be reduced more efficiently in both the case of the luminance signal and the case of the color difference signal, and the reduction in the coding efficiency can be suppressed (the coding efficiency can be improved).
[0053] In addition, when a flag and an index are used as the AMT mode information (when the type of applied orthogonal transform (inverse orthogonal transform) is represented by a flag and an index), the bit length of the index may be made variable depending on the number of AMT transform candidates, as in the example of Table 11.
[0054] For example, as shown in the example of Table 11, the bit length of the index may be increased as the amount of code of the residual signal of the block to be processed increases (as the amount of AMT mode information decreases). In other words, the bit length of the index may be decreased as the amount of code of the residual signal of the block to be processed decreases (as the amount of AMT mode information increases).
[0055] The number of candidates for the orthogonal transform (inverse orthogonal transform) type (# of Transform Pair), flag, index, and other values shown in Table 11 are merely examples. These values are arbitrary and are not limited to these examples.
[0056] <Conversion set> As the orthogonal transform, one-dimensional orthogonal transform in the horizontal direction and one-dimensional orthogonal transform in the vertical direction may be performed, and each type may be controlled (set). For example, as shown in Table 12 in FIG. 2, a combination (transformation pair) of the type of one-dimensional orthogonal transform in the horizontal direction (TrH) and the type of one-dimensional orthogonal transform in the vertical direction (TrV) may be selected based on a prediction mode or the like.
[0057] In the case of Table 12, a desired combination of types is selected from a group of candidates (transform set) of orthogonal transform types according to the prediction mode by the index (or emt_flag and emt_idx). Note that this transform set is set based on the intra prediction mode (Intra Mode) using, for example, Table 31 in FIG. 3.
[0058] In the case of Table 12, by making the range of possible values of the index (or emt_flag and emt_idx) variable (controlling based on the encoding parameters), the number of candidates for the type of orthogonal transform (inverse orthogonal transform) can be made variable, as described above with reference to Table 11.
[0059] For example, in the case of a luminance signal (Luma / {Intra,Inter}), combinations within the range surrounded by border line 21 may be considered as candidates, in the case of intra-prediction of a color difference signal (Chroma / Intra), combinations within the range surrounded by border line 22 may be considered as candidates, and in the case of inter-prediction of a color difference signal (Chroma / Inter), combinations within the range surrounded by border line 23 may be considered as candidates.
[0060] In this way, the amount of code can be reduced more efficiently, and the reduction in coding efficiency can be suppressed (coding efficiency can be improved).
[0061] In addition, regarding Tables 12 and 31, the inverse orthogonal transform is the same as the orthogonal transform described above, so the explanation thereof will be omitted.
[0062] <2-1. Image encoding device> Next, a configuration and processing for realizing the above-mentioned control of the orthogonal transform will be described. Fig. 4 is a block diagram showing an example of a main 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. 4 is a device that encodes image data of a moving image.
[0063] As shown in FIG. 4, the image coding device 100 includes an orthogonal transform control unit 101, an orthogonal transform unit 102, and a coding unit 103.
[0064] The orthogonal transform control unit 101 is configured to perform processing related to the control of the orthogonal transform. For example, the orthogonal transform control unit 101 acquires coding parameters, which are information related to encoding (decoding), and controls the type of orthogonal transform (a transform matrix used for the orthogonal transform) performed by the orthogonal transform unit 102 based on the coding parameters.
[0065] For example, the orthogonal transform control unit 101 sets the number of candidates for the type of orthogonal transform according to the coding parameters, and selects (sets) the type of orthogonal transform by the orthogonal transform unit 102 from the set candidates. The orthogonal transform control unit 101 supplies information on the set type of orthogonal transform (AMT mode information) to the orthogonal transform unit 102. For example, the orthogonal transform control unit 101 supplies a transform type index, which is an identifier indicating the set type of orthogonal transform, to the orthogonal transform unit 102 as the AMT mode information. In the case of the example of FIG. 4, the orthogonal transform control unit 101 supplies a horizontal transform type index TrTypeH and a vertical transform type index TrTypeV as the transform type index to the orthogonal transform unit 102. The horizontal transform type index TrTypeH is an identifier indicating the type of one-dimensional orthogonal transform in the horizontal direction. The vertical transform type index TrTypeV is an identifier indicating the type of one-dimensional orthogonal transform in the vertical direction.
[0066] Furthermore, the orthogonal transform control unit 101 supplies information on the set type of orthogonal transform (AMT mode information) to the encoding unit 103, and transmits it to the decoding side. For example, the orthogonal transform control unit 101 supplies information on a transform pair index, which is an identifier for identifying a transform pair that is a combination of a type of one-dimensional orthogonal transform in the horizontal direction and a type of one-dimensional orthogonal transform in the vertical direction, to the encoding unit 103 as the AMT mode information. In the example of FIG. 4, the orthogonal transform control unit 101 supplies a transform flag emt_flag and a transform index emt_idx to the encoding unit 103 as information on the transform pair index. The transform flag emt_flag is a flag indicating whether to adaptively change the type of orthogonal transform. The transform index emt_idx is an identifier for narrowing down candidates for a combination of orthogonal transform types when adaptively changing the type of orthogonal transform.
[0067] The orthogonal transform unit 102 is configured to perform processing related to orthogonal transform. For example, the orthogonal transform unit 102 performs orthogonal transform on image data input to the image encoding device 100 under the control of the orthogonal transform control unit 101 to generate orthogonal transform coefficients. For example, the orthogonal transform unit 102 performs an orthogonal transform of a type specified by a transform type index supplied from the orthogonal transform control unit 101 (orthogonal transform using a transform matrix specified by the transform type index). In the example of FIG. 4, the orthogonal transform unit 102 performs a one-dimensional orthogonal transform in the horizontal direction and a one-dimensional orthogonal transform in the vertical direction as the orthogonal transform. At this time, the orthogonal transform unit 102 performs the one-dimensional orthogonal transform in the horizontal direction using a transform matrix specified by a horizontal transform type index TrTypeH supplied from the orthogonal transform control unit 101. Also, the orthogonal transform unit 102 performs the one-dimensional orthogonal transform in the vertical direction using a transform matrix specified by a vertical transform type index TrTypeV supplied from the orthogonal transform control unit 101.
[0068] The orthogonal transform unit 102 supplies the orthogonal transform coefficients generated by such orthogonal transform to the encoding unit 103. Note that the orthogonal transform unit 102 may orthogonally transform, for example, a prediction residual, which is a difference between the image data and data of a predicted image, instead of the image data. In other words, in this specification, "image data" may refer not only to "image data" itself but also to "prediction residual."
[0069] The encoding unit 103 is configured to perform processing related to encoding. For example, the encoding unit 103 encodes the orthogonal transform coefficients supplied from the orthogonal transform unit 102, and generates encoded data. The encoding unit 103 also encodes information on the type of orthogonal transform (AMT mode information) supplied from the orthogonal transform control unit 101, and includes it in the encoded data (generates encoded data including information on the type of orthogonal transform). For example, the encoding unit 103 encodes information on the transform pair index supplied from the orthogonal transform control unit 101, and generates encoded data including the information. In the case of the example of FIG. 4, the encoding unit 103 encodes the transform flag emt_flag and the transform index emt_idx supplied from the orthogonal transform control unit 101 as information on the transform pair index, and generates encoded data including them.
[0070] The encoding unit 103 outputs the encoded data thus generated to the outside of the image encoding device 100. Any encoding method may be used by the encoding unit 103. Alternatively, the orthogonal transform coefficients may be quantized, and the encoding unit 103 may encode the quantized coefficients generated by the quantization instead of the orthogonal transform coefficients.
[0071] The orthogonal transform unit 102 and the encoding unit 103 may be one processing unit (block) (encoding unit 110). That is, the encoding unit 110 performs orthogonal transform and encodes image data under the control of the orthogonal transform control unit 101 to generate encoded data. The orthogonal transform control unit 101 and the orthogonal transform unit 102 may be one processing unit (block). For example, the orthogonal transform unit 102 may include the orthogonal transform control unit 101. The orthogonal transform control unit 101 and the encoding unit 103 may be one processing unit (block). For example, the encoding unit 103 may include the orthogonal transform control unit 101. Furthermore, each of the orthogonal transform control units 101 may be configured as a single independent device. The same is true for the orthogonal transform unit 102, the encoding unit 103, and the encoding unit 110.
[0072] <Image encoding process flow> An example of the flow of the encoding process executed by the image encoding device 100 configured as above will be described with reference to the flowchart of FIG.
[0073] When the encoding process is started, in step S101, the orthogonal transformation control unit 101 sets the number of selectable transform pairs (the number of transform pair candidates) based on the encoding parameters.
[0074] In step S102, the orthogonal transform control unit 101 sets optimal transform pair identification information (information on transform pair index) based on the number of selectable transform pairs, and further sets a transform type index. That is, the orthogonal transform control unit 101 selects an optimal transform pair (sets a transform pair index) from among the number of transform pair candidates set in step S101, for example, based on the RD cost, and sets information on the transform pair index (for example, a transform flag and a transform index). In addition, the orthogonal transform control unit 101 generates a transform type index (horizontal transform type index and vertical transform type index) corresponding to the selected transform pair.
[0075] In step S103, the orthogonal transform unit 102 performs an orthogonal transform using a transform matrix of the type indicated by the transform type index generated in step S102, and generates orthogonal transform coefficients.
[0076] In step S104, the encoding unit 103 encodes the orthogonal transform coefficients generated in step S103 to generate encoded data. The encoding unit 103 also encodes information about the transform pair indexes set in step S102, and includes the information in the encoded data.
[0077] When the process of step S104 ends, the encoding process ends.
[0078] As described above, by controlling the type of orthogonal transform according to the coding parameters (for example, by selecting the type of orthogonal transform from among candidates whose number is according to the coding parameters), it is possible to reduce the amount of code more efficiently according to the relative amount of code between the residual signal and the AMT mode information. Therefore, it is possible to suppress the reduction in coding efficiency (improve coding efficiency).
[0079] In addition, by controlling the number of candidates for the orthogonal transform type according to the coding parameters as described above, it is possible to prevent the number of candidates for the orthogonal transform type from increasing unnecessarily. Therefore, it is possible to more easily select the type of orthogonal transform. In other words, it is possible to prevent an increase in the load of the coding process.
[0080] <2-2. Image Decoding Device> Next, a configuration and processing for realizing the above-mentioned control of the inverse orthogonal transform will be described. Fig. 6 is a block diagram showing an example of a main 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 130 shown in Fig. 6 is a device that decodes encoded data of image data of a moving image.
[0081] As shown in FIG. 6, the image decoding device 130 includes an inverse orthogonal transform control unit 131, a decoding unit 132, and an inverse orthogonal transform unit 133.
[0082] The inverse orthogonal transform control unit 131 is configured to perform processing related to the control of the inverse orthogonal transform. For example, the inverse orthogonal transform control unit 131 acquires coding parameters, which are information related to encoding (decoding), and controls the type of inverse orthogonal transform (a transform matrix used for the inverse orthogonal transform) performed by the inverse orthogonal transform unit 133 based on the coding parameters.
[0083] For example, the inverse orthogonal transform control unit 131 sets the number of candidates for the type of inverse orthogonal transform according to the encoding parameters, controls the decoding unit 132, and parses and extracts information on the transform pair index (e.g., the transform flag emt_flag and the transform index emt_idx) included in the encoded data according to the number of the set candidates. The inverse orthogonal transform control unit 131 acquires the extracted information on the transform pair index (e.g., the transform flag emt_flag and the transform index emt_idx) according to the number of the set candidates.
[0084] The inverse orthogonal transform control unit 131 sets a transform type index corresponding to the acquired transform pair index based on information about the transform pair index (for example, a transform flag emt_flag and a transform index emt_idx), prediction mode information, etc. In the example of FIG. 6, the inverse orthogonal transform control unit 131 sets a horizontal transform type index TrTypeH and a vertical transform type index TrTypeV as the transform type index. The inverse orthogonal transform control unit 131 supplies the set horizontal transform type index TrTypeH and vertical transform type index TrTypeV to the inverse orthogonal transform unit 133.
[0085] The decoding unit 132 is configured to perform processing related to decoding. For example, the decoding unit 132 decodes the coded data input to the image decoding device 130 to generate orthogonal transform coefficients. The decoding unit 132 supplies the orthogonal transform coefficients to the inverse orthogonal transform unit 133.
[0086] Furthermore, the decoding unit 132 parses and extracts information on the transform pair index (for example, the transform flag emt_flag and the transform index emt_idx) according to the number of candidates set by the inverse orthogonal transform control unit 131, which is included in the coded data input to the image decoding device 130, in accordance with the control of the inverse orthogonal transform control unit 131. The decoding unit 132 supplies the information on the transform pair index to the inverse orthogonal transform control unit 131.
[0087] The inverse orthogonal transform unit 133 is configured to perform processing related to inverse orthogonal transform. For example, the inverse orthogonal transform unit 133 performs inverse orthogonal transform on the orthogonal transform coefficients supplied from the decoding unit 132 under the control of the inverse orthogonal transform control unit 131 to generate image data. For example, the inverse orthogonal transform unit 133 performs an inverse orthogonal transform of a type specified by a transform type index supplied from the inverse orthogonal transform control unit 131 (an inverse orthogonal transform using a transform matrix specified by the transform type index). In the case of the example of FIG. 6, the inverse orthogonal transform unit 133 performs an inverse one-dimensional orthogonal transform in the horizontal direction and an inverse one-dimensional orthogonal transform in the vertical direction as the inverse orthogonal transform. At this time, the inverse orthogonal transform unit 133 performs an inverse one-dimensional orthogonal transform in the horizontal direction using a transform matrix specified by a horizontal transform type index TrTypeH supplied from the inverse orthogonal transform control unit 131. Also, the inverse orthogonal transform unit 133 performs an inverse one-dimensional orthogonal transform in the vertical direction using a transform matrix specified by a vertical transform type index TrTypeV supplied from the inverse orthogonal transform control unit 131.
[0088] The inverse orthogonal transform unit 133 supplies the image data generated by such inverse orthogonal transform to the outside of the image decoding device 130 (for example, a processing unit at a subsequent stage). Note that the inverse orthogonal transform unit 133 may, for example, inversely quantize the orthogonal transform coefficients to generate a prediction residual which is a difference between the image data and the data of a predicted image. In other words, in this specification, "image data" may indicate not only "image data" itself but also "prediction residual". Also, the decoding unit 132 may decode the coded data to generate a quantization coefficient instead of the orthogonal transform coefficient. In this case, the inverse orthogonal transform unit 133 may inversely orthogonally transform the orthogonal transform coefficient generated by inversely quantizing the quantization coefficient.
[0089] The decoding unit 132 and the inverse orthogonal transform unit 133 may be one processing unit (block) (decoding unit 140). That is, the decoding unit 140 decodes the coded data and performs inverse orthogonal transform under the control of the inverse orthogonal transform control unit 131 to generate image data. The inverse orthogonal transform control unit 131 and the inverse orthogonal transform unit 133 may be one processing unit (block). For example, the inverse orthogonal transform unit 133 may include the inverse orthogonal transform control unit 131. The inverse orthogonal transform control unit 131 and the decoding unit 132 may be one processing unit (block). For example, the decoding unit 132 may include the inverse orthogonal transform control unit 131. Furthermore, each of the inverse orthogonal transform control units 131 may be configured as an independent device. The same is true for the decoding unit 132, the inverse orthogonal transform unit 133, and the decoding unit 140.
[0090] <Flow of image decoding process> An example of the flow of the decoding process executed by the image decoding device 130 configured as above will be described with reference to the flowchart of FIG.
[0091] When the decoding process starts, in step S131, the decoding unit 132 decodes the coded data to generate orthogonal transform coefficients. The decoding unit 132 also parses and extracts coding parameters included in the coded data.
[0092] In step S132, the inverse orthogonal transform control unit 131 sets the number of selectable transform pairs (the number of transform pair candidates) based on the coding parameters extracted in step S131.
[0093] In step S133, the inverse orthogonal transform control unit 131 causes the decoding unit 132 to decode and acquire transform pair identification information (e.g., transform flag and transform index) included in the encoded data based on the selectable transform pair number set in step S132. The inverse orthogonal transform control unit 131 sets transform type indexes (horizontal transform type index and vertical transform type index) based on the acquired transform pair identification information.
[0094] In step S134, the inverse orthogonal transform unit 133 performs inverse orthogonal transform using a transform matrix of the type indicated by the transform type indexes (horizontal transform type index and vertical transform type index) set in step S133, and generates image data.
[0095] When the process of step S134 ends, the decoding process ends.
[0096] As described above, by controlling the type of inverse orthogonal transform according to the coding parameters (for example, by selecting the type of inverse orthogonal transform from among candidates whose number is according to the coding parameters), the coding side can reduce the amount of code more efficiently according to the relative amount of code between the residual signal and the AMT mode information. Therefore, it is possible to suppress the reduction in coding efficiency (improve coding efficiency).
[0097] <2-3. Variations of encoding parameters (list of methods)> The coding parameters used to control the number of candidates for the above-mentioned orthogonal transform (inverse orthogonal transform) types may be any information related to coding (decoding). Examples of coding parameters are shown in Table 151 of FIG.
[0098] For example, the coding parameters may include values of syntax elements transmitted as coded data from the coding side to the decoding side. In this way, the image coding device 100 can easily obtain the coding parameters used to control the number of candidates for the type of orthogonal transform by setting the syntax elements. Also, the image decoding device 130 can easily obtain the coding parameters used to control the number of candidates for the type of inverse orthogonal transform by parsing the coded data and extracting the syntax elements.
[0099] <Method #1> In this case, the coding parameters may include, for example, a value of a syntax element (e.g., a component ID (componentID)) related to the type of component. The component ID (componentID) is an identifier for identifying whether the signal is a luminance signal or a color difference signal (Y, Cb, or Cr). In other words, the number of candidates for the type of orthogonal transform (inverse orthogonal transform) may be controlled depending on whether the target of the orthogonal transform (inverse orthogonal transform) is a luminance signal or a color difference signal (Method #1 in Table 151).
[0100] For example, in the case of a color difference signal, the number of candidates for the type of orthogonal transform (inverse orthogonal transform) may be set to be smaller than that of a luminance signal. In general, the amount of code of the residual signal of a color difference signal is smaller than that of a luminance signal. Therefore, in the case of a color difference signal, the amount of code of the AMT mode information can be reduced by reducing the number of candidates for the type of orthogonal transform (inverse orthogonal transform), so that the amount of code can be reduced more efficiently and the reduction in the coding efficiency can be suppressed (the coding efficiency can be improved). Conversely, in the case of a luminance signal, the amount of code of the residual signal can be reduced by increasing the number of candidates for the type of orthogonal transform (inverse orthogonal transform), so that the amount of code can be reduced more efficiently and the reduction in the coding efficiency can be suppressed (the coding efficiency can be improved).
[0101] In this method #1, the number of type candidates of the orthogonal transform (inverse orthogonal transform) may be controlled according to the number of non-zero coefficients. Alternatively, the number of type candidates may be controlled according to information on other transform coefficients (the position of the last coefficient, the sum of absolute values of the non-zero coefficients).
[0102] <Method #2> The coding parameters may also include, for example, the value of a syntax element relating to the mode of prediction.
[0103] <Method #2-1> For example, the number of candidates for the type of orthogonal transform (inverse orthogonal transform) may be controlled depending on whether the prediction mode of the block to be processed for orthogonal transform (inverse orthogonal transform) is intra prediction (e.g., intra CU) or inter prediction (e.g., inter CU) (Method #2-1 in Table 151).
[0104] For example, in the case of inter prediction, the number of candidates of the orthogonal transform (inverse orthogonal transform) type may be set to be less than that in the case of intra prediction. In general, the amount of code of the residual signal is smaller in the inter CU than in the intra CU. Therefore, in the case of inter prediction, the amount of code of the mode information of the AMT can be reduced by reducing the number of candidates of the orthogonal transform (inverse orthogonal transform) type, so that the amount of code can be reduced more efficiently and the reduction in the coding efficiency can be suppressed (the coding efficiency can be improved). Conversely, in the case of intra prediction, the amount of code of the residual signal can be reduced by increasing the number of candidates of the orthogonal transform (inverse orthogonal transform) type, so that the amount of code can be reduced more efficiently and the reduction in the coding efficiency can be suppressed (the coding efficiency can be improved).
[0105] In this method #2-1, the number of type candidates of the orthogonal transform (inverse orthogonal transform) may be controlled according to the number of non-zero coefficients. Alternatively, the number of type candidates may be controlled according to information on other transform coefficients (the position of the last coefficient, the sum of absolute values of the non-zero coefficients).
[0106] <Method #2-2> For example, when the prediction mode of the block to be processed by orthogonal transform (inverse orthogonal transform) is inter-prediction (e.g., inter-CU), the number of candidates for the type of orthogonal transform (inverse orthogonal transform) may be controlled depending on whether it is forward prediction or bi-prediction (Method #2-2 in Table 151).
[0107] For example, in the case of bi-prediction, the number of candidates of the orthogonal transform (inverse orthogonal transform) type may be set to be less than that of the forward prediction. In general, bi-prediction has higher prediction accuracy and less coding amount of residual signal than forward prediction. Therefore, in the case of bi-prediction, the number of candidates of the orthogonal transform (inverse orthogonal transform) type can be reduced to reduce the coding amount of the AMT mode information, so that the coding amount can be reduced more efficiently and the reduction in coding efficiency can be suppressed (the coding efficiency can be improved). Conversely, in the case of forward prediction, the number of candidates of the orthogonal transform (inverse orthogonal transform) type can be increased to reduce the coding amount of the residual signal, so that the coding amount can be reduced more efficiently and the reduction in coding efficiency can be suppressed (the coding efficiency can be improved).
[0108] In this method #2-2, the number of type candidates of the orthogonal transform (inverse orthogonal transform) may be controlled according to the number of non-zero coefficients. Alternatively, the number of type candidates may be controlled according to information on other transform coefficients (the position of the last coefficient, the sum of absolute values of the non-zero coefficients).
[0109] <Method #2-3> For example, the number of candidates for the type of orthogonal transform (inverse orthogonal transform) may be controlled depending on whether the prediction mode of the block to be processed for orthogonal transform (inverse orthogonal transform) is a predetermined mode or another mode (Method #2-3 in Table 151).
[0110] For example, when the prediction mode is a predetermined mode, the number of candidates for the orthogonal transform (inverse orthogonal transform) type may be set to be smaller than in the case of other modes. For example, when the prediction mode is the predetermined mode, the amount of code of the residual signal is smaller than when the prediction mode is the other modes. In that case, when the prediction mode is the predetermined mode, the number of candidates for the orthogonal transform (inverse orthogonal transform) type can be reduced to reduce the amount of code of the AMT mode information, so that the amount of code can be reduced more efficiently and the reduction in the coding efficiency can be suppressed (the coding efficiency can be improved). Conversely, when the prediction mode is the other mode, the number of candidates for the orthogonal transform (inverse orthogonal transform) type can be increased to reduce the amount of code of the residual signal, so that the amount of code can be reduced more efficiently and the reduction in the coding efficiency can be suppressed (the coding efficiency can be improved).
[0111] In addition, when the prediction mode is the specified mode, if the amount of code for the residual signal is greater than when the prediction mode is another mode, the increase / decrease in the number of candidates for the orthogonal transform (inverse orthogonal transform) type can be reversed.
[0112] This predetermined mode may be any mode as long as the amount of code of the residual signal is smaller than that of other modes. For example, the predetermined mode may be a linear model mode (LMChroma) of luminance-chrominance prediction (CCP (Cross-component prediction)) in which a dynamically constructed linear function of the luminance component is used as a prediction function to predict the pixel value of the chrominance component. In general, in the case of this LMChroma, the amount of code of the residual signal is smaller than that of other intra prediction modes. Therefore, when the prediction mode is this LMChroma, the number of candidates of the type of orthogonal transform (inverse orthogonal transform) may be set to be smaller than that of other modes. In this way, the amount of code of the mode information of the AMT can be reduced, so that the amount of code can be reduced more efficiently and the reduction in the coding efficiency can be suppressed (the coding efficiency can be improved).
[0113] In this method #2-3, the number of type candidates of the orthogonal transform (inverse orthogonal transform) may be controlled according to the number of non-zero coefficients. Alternatively, the number of type candidates may be controlled according to information on other transform coefficients (the position of the last coefficient, the sum of absolute values of the non-zero coefficients).
[0114] <Method #3> Also, the coding parameters may include, for example, a value of a syntax element related to the size of a block to be processed by the orthogonal transform (inverse orthogonal transform). For example, the number of candidates for the type of orthogonal transform (inverse orthogonal transform) may be controlled according to the size of the block to be processed by the orthogonal transform (inverse orthogonal transform) (Method #3 in Table 151).
[0115] For example, the smaller the block size, the fewer the number of candidates for the orthogonal transform (inverse orthogonal transform) type may be set. In general, the smaller the block size, the smaller the amount of code for the residual signal. Therefore, by reducing the number of candidates for the orthogonal transform (inverse orthogonal transform) type as the block size becomes smaller, the amount of code for the AMT mode information can be reduced more, so that the amount of code can be reduced more efficiently and the reduction in the coding efficiency can be suppressed (the coding efficiency can be improved).
[0116] In other words, the larger the block size, the larger the amount of code of the residual signal. Therefore, the larger the block size, the more the number of candidates for the type of orthogonal transform (inverse orthogonal transform) can be increased, so that the amount of code of the residual signal can be reduced more efficiently, and the reduction in the coding efficiency can be suppressed (the coding efficiency can be improved).
[0117] For example, a predetermined threshold value may be used to classify block sizes into multiple stages (classifying block sizes into a plurality of groups according to their values), and the number of corresponding candidates may be set for each of the classified groups.
[0118] In this method #3, the number of type candidates of the orthogonal transform (inverse orthogonal transform) may be controlled according to the number of non-zero coefficients, or the number of type candidates may be controlled according to information on other transform coefficients (the position of the last coefficient, the sum of absolute values of the non-zero coefficients).
[0119] <Method #4> The coding parameters may also include, for example, values of syntax elements related to quantization parameters.
[0120] <Method #4-1> For example, the number of candidates for the type of orthogonal transform (inverse orthogonal transform) may be controlled according to the value of the quantization parameter QP (method #4-1 in Table 151).
[0121] For example, the larger the value of the quantization parameter QP, the smaller the number of candidates for the type of orthogonal transform (inverse orthogonal transform) may be set. In general, the larger the value of the quantization parameter QP, the smaller the amount of code of the residual signal. Therefore, the larger the value of the quantization parameter QP, the more the number of candidates for the type of orthogonal transform (inverse orthogonal transform) is reduced, so that the amount of code of the AMT mode information can be reduced, and the amount of code can be reduced more efficiently, and the reduction in the coding efficiency can be suppressed (the coding efficiency can be improved).
[0122] In other words, the smaller the value of the quantization parameter QP, the larger the amount of code of the residual signal. Therefore, the smaller the value of the quantization parameter QP, the more the number of candidates of the type of orthogonal transform (inverse orthogonal transform) is increased, so that the amount of code of the residual signal can be reduced more efficiently, and the reduction in the coding efficiency can be suppressed (the coding efficiency can be improved).
[0123] For example, the quantization parameters QP may be classified into multiple stages using a predetermined threshold (the quantization parameters QP may be classified into a plurality of groups according to their values), and the number of corresponding candidates may be set for each of the classified groups.
[0124] In this method #4-1, the number of type candidates of the orthogonal transform (inverse orthogonal transform) may be controlled according to the number of non-zero coefficients. Alternatively, the number of type candidates may be controlled according to information on other transform coefficients (the position of the last coefficient, the sum of absolute values of the non-zero coefficients).
[0125] <Method #4-2> For example, instead of the quantization parameter QP, the number of candidates for the type of orthogonal transform (inverse orthogonal transform) may be controlled based on a temporal ID, which is identification information indicating a layer in hierarchical coding in the time direction (Method #4-2 in Table 151).
[0126] For example, the coding parameters may be set to set the number of candidates of the orthogonal transform (inverse orthogonal transform) type to be smaller as the layer in the time-direction hierarchical coding is higher. Generally, the larger the value of this temporal ID (temporalID), that is, the higher the layer in the time-direction hierarchical coding, the larger the value of the quantization parameter (QP). Therefore, the larger the value of this temporal ID (temporalID), the more the number of candidates of the orthogonal transform (inverse orthogonal transform) type is reduced, so that the amount of code of the AMT mode information can be reduced, and the amount of code can be reduced more efficiently, and the reduction in the coding efficiency can be suppressed (the coding efficiency can be improved).
[0127] In other words, the smaller the value of the temporal ID, the larger the amount of code of the residual signal. Therefore, by increasing the number of candidates of the type of orthogonal transform (inverse orthogonal transform) as the value of the temporal ID, the amount of code of the residual signal can be reduced more, so that the amount of code can be reduced more efficiently and the reduction in the coding efficiency can be suppressed (the coding efficiency can be improved).
[0128] For example, a predetermined threshold may be used to classify the values of the temporal ID into multiple stages (classifying the temporal ID into multiple groups according to its value), and the number of corresponding candidates may be set for each classified group.
[0129] In this method #4-2, the number of type candidates of the orthogonal transform (inverse orthogonal transform) may be controlled according to the number of non-zero coefficients. Alternatively, the number of type candidates may be controlled according to information on other transform coefficients (the position of the last coefficient, the sum of absolute values of the non-zero coefficients).
[0130] <Method #5> For example, the coding parameters may include variables derived from values of syntax elements transmitted as coded data from the coding side to the decoding side. In this way, the image coding device 100 can control the number of candidates for the type of orthogonal transform (inverse orthogonal transform) based on more diverse coding parameters. Also, the image decoding device 130 can control the number of candidates for the type of inverse orthogonal transform based on more diverse coding parameters.
[0131] This variable may be any value, for example it may be a variable derived from a transform coefficient.
[0132] <Method #5-1> For example, the number of candidates for the type of orthogonal transform (inverse orthogonal transform) may be controlled according to the number of non-zero coefficients in a block to be processed by orthogonal transform (inverse orthogonal transform) (Method #5-1 in Table 151).
[0133] For example, the fewer the non-zero coefficients in the block to be processed by the orthogonal transform (inverse orthogonal transform), the fewer the number of candidates for the type of orthogonal transform (inverse orthogonal transform) may be set.In general, the fewer the number of non-zero coefficients, the smaller the code amount of the residual signal.Therefore, the fewer the non-zero coefficients in the block to be processed by the orthogonal transform (inverse orthogonal transform), the more the number of candidates for the type of orthogonal transform (inverse orthogonal transform) is reduced, so that the code amount of the AMT mode information can be reduced, and the code amount can be reduced more efficiently, and the reduction in the coding efficiency can be suppressed (the coding efficiency can be improved).
[0134] In other words, the more the number of non-zero coefficients, the more the amount of code of the residual signal is. Therefore, the more the number of non-zero coefficients, the more the number of candidates of the type of orthogonal transform (inverse orthogonal transform) is increased, so that the amount of code of the residual signal can be reduced more efficiently, and the reduction in the coding efficiency can be suppressed (the coding efficiency can be improved).
[0135] For example, a predetermined threshold may be used to classify the number of non-zero coefficients into multiple stages (classifying the number of non-zero coefficients into multiple groups according to their values), and the number of corresponding candidates may be set for each of the classified groups.
[0136] <Method #5-2> For example, the number of candidates for the type of orthogonal transform (inverse orthogonal transform) may be controlled according to the position of the last coefficient in a block to be processed by orthogonal transform (inverse orthogonal transform) (Method #5-2 in Table 151). The last coefficient is the last non-zero coefficient in the scan order in the block to be processed by orthogonal transform (inverse orthogonal transform). The number of candidates for the type of orthogonal transform (inverse orthogonal transform) may be controlled according to the position of this last coefficient (for example, the distance from the scan start position in the scan order).
[0137] For example, the closer the position of the last coefficient in the block to be processed by the orthogonal transform (inverse orthogonal transform) is from the scan start position, the fewer the number of candidates for the type of orthogonal transform may be set. In general, the fewer the number of non-zero coefficients, the closer the position of this last coefficient is to the scan start position. In other words, the amount of code of the residual signal is small. Therefore, the closer the position of the last coefficient in the block to be processed by the orthogonal transform (inverse orthogonal transform) is from the scan start position, the more the number of candidates for the type of orthogonal transform (inverse orthogonal transform) is reduced, thereby reducing the amount of code of the AMT mode information, and thus the amount of code can be reduced more efficiently, and the reduction in the coding efficiency can be suppressed (the coding efficiency can be improved).
[0138] In other words, the farther the position of the last coefficient is from the scan start position, the larger the amount of code of the residual signal. Therefore, by increasing the number of candidates for the type of orthogonal transform (inverse orthogonal transform) as the position of the last coefficient is from the scan start position, the amount of code of the residual signal can be reduced more, so that the amount of code can be reduced more efficiently and the reduction in the coding efficiency can be suppressed (the coding efficiency can be improved).
[0139] For example, a predetermined threshold value may be used to classify the distance from the scan start position to the position of the last coefficient into multiple stages (classifying this distance into multiple groups according to its value), and the number of corresponding candidates may be set for each of the classified groups.
[0140] <Method #5-3> For example, the number of candidates for the type of orthogonal transform (inverse orthogonal transform) may be controlled depending on the sum of the absolute values of non-zero coefficients in the block to be processed by the orthogonal transform (inverse orthogonal transform) (Method #5-3 in Table 151).
[0141] For example, the smaller the sum of the absolute values of non-zero coefficients in the block to be processed by orthogonal transform (inverse orthogonal transform), the smaller the number of candidates for the type of orthogonal transform (inverse orthogonal transform) may be set.In general, the smaller the sum of the absolute values of non-zero coefficients, the smaller the code amount of the residual signal.Therefore, the smaller the sum of the absolute values of the non-zero coefficients, the more the number of candidates for the type of orthogonal transform (inverse orthogonal transform) is reduced, so that the code amount of the mode information of AMT can be reduced more efficiently, and the reduction in the coding efficiency can be suppressed (the coding efficiency can be improved).
[0142] In other words, the larger the sum of the absolute values of the non-zero coefficients in the block to be processed by the orthogonal transform (inverse orthogonal transform), the larger the amount of code of the residual signal. Therefore, the larger the sum of the absolute values of the non-zero coefficients, the more the number of candidates for the type of orthogonal transform (inverse orthogonal transform) is increased, so that the amount of code of the residual signal can be reduced more efficiently, and the reduction in the coding efficiency can be suppressed (the coding efficiency can be improved).
[0143] For example, a predetermined threshold may be used to classify the sum of the absolute values of non-zero coefficients in a block to be subjected to orthogonal transform (inverse orthogonal transform) into multiple levels (the sum of the absolute values of the non-zero coefficients may be classified into multiple groups according to their values), and the number of corresponding candidates may be set for each of the classified groups.
[0144] <Combination of methods> Any combination of two or more of the above-mentioned methods may be used. For example, method #5-1, method #2-1, and method #1 may be applied in combination.
[0145] <2-4. Image encoding device> Next, a more specific example of application of the above-mentioned control of orthogonal transform (inverse orthogonal transform) will be described. FIG. 9 is a block diagram showing an example of a 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 200 shown in FIG. 9 is a device that encodes image data of a moving image. For example, the image encoding device 200 implements the technology described in Non-Patent Document 1, Non-Patent Document 3, or Non-Patent Document 4, and encodes image data of a moving image in a method that complies with a standard described in any of these documents.
[0146] Note that Fig. 9 shows the main processing units (blocks) and data flows, and is not limited to all that are shown in Fig. 9. In other words, in the image encoding device 200, there may be processing units that are not shown as blocks in Fig. 9, and there may be processes and data flows that are not shown as arrows or the like in Fig. 9. This is the same in other figures that explain processing units and the like in the image encoding device 200.
[0147] As shown in FIG. 9, the image encoding device 200 has a control unit 201, a rearrangement buffer 211, a calculation unit 212, an orthogonal transformation unit 213, a quantization unit 214, an encoding unit 215, an accumulation buffer 216, an inverse quantization unit 217, an inverse orthogonal transformation unit 218, a calculation unit 219, an in-loop filter unit 220, a frame memory 221, a prediction unit 222, and a rate control unit 223.
[0148] <Control Unit> The control unit 201 divides the video data held by the rearrangement buffer 211 into blocks (CU, PU, transform block, etc.) of processing units based on an external or pre-specified block size of processing units. The control unit 201 also determines the 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).
[0149] These coding parameters will be described in detail later. After determining the coding parameters as described above, the control unit 201 supplies them to each block. More specifically, the process is as follows.
[0150] Header information Hinfo is provided for each block. The prediction mode information Pinfo is supplied to the encoding unit 215 and the prediction unit 222. The transformation information Tinfo is supplied to the encoding unit 215 , the orthogonal transformation unit 213 , the quantization unit 214 , the inverse quantization unit 217 , and the inverse orthogonal transformation unit 218 . The filter information Finfo is supplied to the in-loop filter unit 220 .
[0151] <Control of orthogonal transform and inverse orthogonal transform> The control unit 201 sets or derives information relating to control of the orthogonal transform by the orthogonal transform unit 213 and the inverse orthogonal transform by the inverse orthogonal transform unit 218. The control unit 201 supplies the information thus obtained to the orthogonal transform unit 213 and the inverse orthogonal transform unit 218, thereby controlling the orthogonal transform performed by the orthogonal transform unit 213 and the inverse orthogonal transform performed by the inverse orthogonal transform unit 218.
[0152] During this control, the control unit 201 controls the type of orthogonal transform (inverse orthogonal transform) based on the various coding parameters described above. More specifically, the control unit 201 controls the number of selectable transform pairs (the number of transform pair candidates) NumTrPair based on the various coding parameters described above.
[0153] For example, the control unit 201 sets the number of candidates for the type of orthogonal transform (inverse orthogonal transform) (the number of selectable transform pairs NumTrPair) according to the encoding parameters, and selects a type of orthogonal transform (inverse orthogonal transform) from the set candidates for the type of orthogonal transform (inverse orthogonal transform). The control unit 201 supplies control information indicating the selected type to the orthogonal transform unit 213 and the inverse orthogonal transform unit 218, thereby controlling the orthogonal transform and inverse orthogonal transform.
[0154] By such control, the image coding device 200 can reduce the amount of code more efficiently by a method according to the relative amount of code of the residual signal of the block to be processed or the mode information of AMT, and can suppress the decrease in coding efficiency (improve coding efficiency). In addition, it is possible to suppress the increase in unnecessary candidates, and therefore it is possible to suppress the increase in the load of the coding process.
[0155] <Sorting Buffer> To the image coding device 200, each field (input image) of video image data is input in its playback order (display order). The reordering buffer 211 acquires and holds (stores) each input image in its playback order (display order). Under the control of the control unit 201, the reordering buffer 211 reorders the input images in coding order (decoding order) and divides them into blocks of processing units. The reordering buffer 211 supplies each processed input image to the calculation unit 212. The reordering buffer 211 also supplies each input image (original image) to the prediction unit 222 and the in-loop filter unit 220.
[0156] <Arithmetic section> The calculation unit 212 receives as input an image I corresponding to a block of a processing unit and a predicted image P supplied from the prediction unit 222, subtracts the predicted image P from the image I as shown in the following equation (6) to derive a prediction residual D, and supplies it to the orthogonal transformation unit 213.
[0157]
number
[0158] <Orthogonal transformation section> The orthogonal transform unit 213 receives the prediction residual D supplied from the calculation unit 212 and the transformation information Tinfo supplied from the control unit 201 as input, and performs an orthogonal transform on the prediction residual D based on the transformation information Tinfo to derive a transformation coefficient Coeff. The orthogonal transform unit 213 can perform adaptive orthogonal transform (AMT) that adaptively selects the type of orthogonal transform (transform coefficient). The orthogonal transform unit 213 supplies the obtained transformation coefficient Coeff to the quantization unit 214.
[0159] <Quantization part> The quantization unit 214 receives the transform coefficient Coeff supplied from the orthogonal transformation unit 213 and the transform information Tinfo supplied from the control unit 201, and scales (quantizes) the transform coefficient Coeff based on the transform information Tinfo. The quantization rate is controlled by the rate control unit 223. The quantization unit 214 supplies the quantized transform coefficient obtained by such quantization, i.e., the quantized transform coefficient level, to the encoding unit 215 and the inverse quantization unit 217.
[0160] <Encoding part> The encoding unit 215 receives as input the quantized transform coefficient level LEVEL supplied from the quantization unit 214, various encoding parameters (header information Hinfo, prediction mode information Pinfo, transformation information Tinfo, filter information Finfo, etc.) supplied from the control unit 201, information on filters such as filter coefficients supplied from the in-loop filter unit 220, and information on an optimal prediction mode supplied from the prediction unit 222. The encoding unit 215 performs variable-length coding (for example, arithmetic coding) on the quantized transform coefficient level LEVEL to generate a bit string (coded data).
[0161] Furthermore, the encoding unit 215 derives residual information Rinfo from the quantized transform coefficient level level, encodes the residual information Rinfo, and generates a bit string.
[0162] Furthermore, the encoding unit 215 includes information on the filter supplied from the in-loop filter unit 220 in the filter information Finfo, and includes information on the optimal prediction mode supplied from the prediction unit 222 in the prediction mode information Pinfo. Then, the encoding unit 215 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.
[0163] The encoding unit 215 multiplexes the bit strings of the various types of information generated as described above to generate encoded data. The encoding unit 215 supplies the encoded data to the accumulation buffer 216.
[0164] <Accumulation buffer> The accumulation buffer 216 temporarily holds the encoded data obtained in the encoding unit 215. The accumulation buffer 216 outputs the held encoded data, for example as a bit stream, to the outside of the image encoding device 200 at a predetermined timing. For example, this encoded data is transmitted to the decoding side via an arbitrary recording medium, an arbitrary transmission medium, an arbitrary information processing device, etc. In other words, the accumulation buffer 216 is also a transmission unit that transmits the encoded data (bit stream).
[0165] <Inverse quantization section> The inverse quantization unit 217 performs processing related to inverse quantization. For example, the inverse quantization unit 217 receives the quantized transform coefficient level level supplied from the quantization unit 214 and the transformation information Tinfo supplied from the control unit 201 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 214. The inverse quantization unit 217 supplies the transformation coefficient Coeff_IQ obtained by such inverse quantization to the inverse orthogonal transformation unit 218.
[0166] <Inverse orthogonal transform section> The inverse orthogonal transform unit 218 performs processing related to inverse orthogonal transform. For example, the inverse orthogonal transform unit 218 receives the transform coefficient Coeff_IQ supplied from the inverse quantization unit 217 and the transform information Tinfo supplied from the control unit 201 as input, and performs inverse orthogonal transform on the transform coefficient Coeff_IQ based on the transform information Tinfo to derive a prediction residual D'. Note that this inverse orthogonal transform is an inverse process of the orthogonal transform performed in the orthogonal transform unit 213. In other words, the inverse orthogonal transform unit 218 can perform adaptive inverse orthogonal transform (AMT) that adaptively selects the type of inverse orthogonal transform (transform coefficient).
[0167] The inverse orthogonal transform unit 218 supplies the prediction residual D' obtained by such inverse orthogonal transform to the calculation unit 219. Note that since the inverse orthogonal transform unit 218 is similar to an inverse orthogonal transform unit (described later) on the decoding side, the explanation on the decoding side (described later) can be applied to the inverse orthogonal transform unit 218.
[0168] <Arithmetic section> The calculation unit 219 receives as input the prediction residual D' supplied from the inverse orthogonal transform unit 218 and the predicted image P supplied from the prediction unit 222. The calculation unit 219 adds the prediction residual D' to the predicted image P corresponding to the prediction residual D' to derive a local decoded image Rlocal. The calculation unit 219 supplies the derived local decoded image Rlocal to the in-loop filter unit 220 and the frame memory 221.
[0169] <In-loop filter section> The in-loop filter unit 220 performs processing related to in-loop filter processing. For example, the in-loop filter unit 220 receives as input the locally decoded image Rlocal supplied from the calculation unit 219, the filter information Finfo supplied from the control unit 201, and the input image (original image) supplied from the rearrangement buffer 211. Note that any information is input to the in-loop filter unit 220, and information other than these pieces of information may be input. For example, a prediction mode, motion information, a code amount target value, a quantization parameter QP, a picture type, information on a block (CU, CTU, etc.), etc. may be input to the in-loop filter unit 220 as necessary.
[0170] The in-loop filter unit 220 performs an appropriate filter process on the locally decoded image Rlocal based on the filter information Finfo. The in-loop filter unit 220 also uses an input image (original image) and other input information for the filter process as necessary.
[0171] For example, the in-loop filter unit 220 applies four in-loop filters, 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, as described in Non-Patent Document 1. Note that which filters are applied and in what order they are applied are arbitrary and can be appropriately selected.
[0172] Of course, the filtering process performed by the in-loop filter unit 220 is arbitrary and is not limited to the above example. For example, the in-loop filter unit 220 may apply a Wiener filter or the like.
[0173] The in-loop filter unit 220 supplies the filtered local decoded image Rlocal to the frame memory 221. When transmitting information about the filter, such as a filter coefficient, to the decoding side, the in-loop filter unit 220 supplies the information about the filter to the encoding unit 215.
[0174] <Frame memory> The frame memory 221 performs processing related to storage of image-related data. For example, the frame memory 221 receives the locally decoded image Rlocal supplied from the calculation unit 219 and the locally decoded image Rlocal that has been subjected to filtering processing supplied from the in-loop filter unit 220, and holds (stores) them. The frame memory 221 also reconstructs a decoded image R for each picture unit using the locally decoded image Rlocal, and holds it (stores it in a buffer in the frame memory 221). The frame memory 221 supplies the decoded image R (or a part thereof) to the prediction unit 222 in response to a request from the prediction unit 222.
[0175] <Prediction Department> The prediction unit 222 performs processing related to the generation of a predicted image. For example, the prediction unit 222 receives the prediction mode information Pinfo supplied from the control unit 201, the input image (original image) supplied from the rearrangement buffer 211, and the decoded image R (or a part thereof) read from the frame memory 221 as input. The prediction unit 222 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, performs motion compensation processing based on the prediction result, and generates a predicted image P. The prediction unit 222 supplies the generated predicted image P to the calculation unit 212 and the calculation unit 219. The prediction unit 222 also supplies information on the prediction mode selected by the above processing, that is, the optimal prediction mode, to the encoding unit 215 as necessary.
[0176] <Rate control section> The rate control unit 223 performs processing related to rate control. For example, the rate control unit 223 controls the rate of the quantization operation of the quantization unit 214 based on the code amount of the encoded data accumulated in the accumulation buffer 216 so as to prevent overflow or underflow.
[0177] In the image coding device 200 configured as above, the control unit 201 performs the above-mentioned processing to which the present technology is applied as an orthogonal transform control unit or an inverse orthogonal transform control unit. Moreover, the orthogonal transform unit 213 performs the above-mentioned processing to which the present technology is applied as an orthogonal transform unit. Moreover, the coding unit 215 performs the above-mentioned processing to which the present technology is applied as an coding unit. Moreover, the inverse orthogonal transform unit 218 performs the above-mentioned processing to which the present technology is applied as an inverse orthogonal transform unit. Therefore, the image coding device 200 can suppress a decrease in coding efficiency (improve coding efficiency).
[0178] <Details of the control unit> Fig. 10 is a block diagram showing an example of main components related to the control of orthogonal transform in the control unit 201 in Fig. 9. As shown in Fig. 10, the control unit 201 has a transform pair number setting unit 241, a cMax setting unit 242, a transform pair identification information setting unit 243, a transform pair LUT 244, and a transform type index setting unit 245 as components for controlling the orthogonal transform.
[0179] The transform pair number setting unit 241 is configured to perform processing related to setting of the selectable transform pair number NumTrPair. The selectable transform pair number NumTrPair refers to the number of selectable transform pairs. The selectable transform pair refers to a candidate of the transform pair. The transform pair refers to a combination of a type of one-dimensional orthogonal transform in the horizontal direction (TrH) and a type of one-dimensional orthogonal transform in the vertical direction (TrV) (or a combination of a type of inverse one-dimensional orthogonal transform in the vertical direction and a type of inverse one-dimensional orthogonal transform in the horizontal direction).
[0180] The transform pair number setting unit 241 receives as input an encoding parameter. The encoding parameter may be set by the control unit 201 (a configuration other than that of the control unit 201 shown in FIG. 10) or may be supplied from outside the image encoding device 200. The encoding parameter is information related to encoding (decoding) and is not particularly limited as long as it can be used to control the orthogonal transform, but may include, for example, various parameters as described with reference to FIG. 8.
[0181] The conversion pair number setting unit 241 sets the selectable conversion pair number NumTrPair based on the encoding parameters. The conversion pair number setting unit 241 supplies the set selectable conversion pair number NumTrPair to the cMax setting unit 242 and the conversion pair identification information setting unit 243.
[0182] The cMax setting unit 242 is configured to perform processing related to the setting of cMax. This cMax is a variable indicating the maximum value of the selectable number of conversion pairs (i.e., the number of conversion pair candidates). The cMax setting unit 242 receives the selectable number of conversion pairs NumTrPair supplied from the conversion pair number setting unit 241 as an input. The cMax setting unit 242 sets cMax based on the selectable number of conversion pairs NumTrPair. The cMax setting unit 242 supplies the set cMax to the conversion pair identification information setting unit 243.
[0183] The transform pair identification information setting unit 243 is configured to perform processing related to the setting of the transform pair identification information. The transform pair identification information is information related to the transform pair index TrPairIdx, which is an identifier indicating a transform pair selected from among candidates. In other words, this transform pair identification information is one of the information related to the type of orthogonal transform (inverse orthogonal transform) (AMT mode information).
[0184] The transform pair identification information includes, for example, a transform pair index TrPairIdx. The transform pair identification information also includes, for example, a transform flag emt_flag and a transform index emt_idx corresponding to the transform pair index TrPairIdx. The transform flag emt_flag is a flag indicating whether to adaptively change the type of orthogonal transform (inverse orthogonal transform). The transform index emt_idx is an identifier for narrowing down candidates for a transform pair when adaptively changing the type of orthogonal transform. The transform pair index TrPairIdx corresponds to, for example, index in Table 12 in FIG. 2.
[0185] The conversion pair identification information setting unit 243 receives as input the selectable conversion pair number NumTrPair supplied from the conversion pair number setting unit 241 and cMax supplied from the cMax setting unit 242. The conversion pair identification information setting unit 243 sets conversion pair identification information based on these pieces of information.
[0186] As shown in FIG. 10, the transform pair identification information setting unit 243 has a transform pair index setting unit 251, a transform flag setting unit 252, and a transform index setting unit 253.
[0187] The transform pair index setting unit 251 is configured to perform processing related to setting of the transform pair index TrPairIdx. The transform pair index setting unit 251 receives the selectable transform pair number NumTrPair supplied from the transform pair number setting unit 241 and cMax supplied from the cMax setting unit 242 as input. The transform pair index setting unit 251 sets the transform pair index TrPairIdx based on the information. The transform pair index setting unit 251 supplies the set transform pair index TrPairIdx to the transform flag setting unit 252 and the transform index setting unit 253. The transform pair index setting unit 251 also supplies the set transform pair index TrPairIdx to the transform type index setting unit 245.
[0188] The transform flag setting unit 252 is configured to perform processing related to setting of the transform flag emt_flag. The transform flag setting unit 252 receives the transform pair index TrPairIdx supplied from the transform pair index setting unit 251 as input. The transform flag setting unit 252 sets the transform flag emt_flag corresponding to the transform pair index TrPairIdx. The transform flag setting unit 252 supplies the set transform flag emt_flag to the encoding unit 215 as AMT mode information (information related to the transform pair index), and transmits it to the decoding side as encoded data.
[0189] The transform index setting unit 253 is configured to perform processing related to setting of the transform index emt_idx. The transform index setting unit 253 receives the transform pair index TrPairIdx supplied from the transform pair index setting unit 251 as input. The transform index setting unit 253 sets the transform index emt_idx corresponding to the transform pair index TrPairIdx. The transform index setting unit 253 supplies the set transform index emt_idx to the encoding unit 215 as AMT mode information (information related to the transform pair index), and transmits it to the decoding side as encoded data.
[0190] The encoding unit 215 encodes the transform flag emt_flag supplied from the transform flag setting unit 252, and includes the quantized transform coefficient level level in the variable-length encoded encoded data (generates encoded data including the transform flag emt_flag). Similarly, the encoding unit 215 encodes the transform index emt_idx supplied from the transform index setting unit 253, and includes the quantized transform coefficient level level in the variable-length encoded encoded data (generates encoded data including the transform index emt_idx). In other words, the encoding unit 215 generates encoded data including information on the transform pair index (encoded data including the transform flag emt_flag and the transform index emt_idx).
[0191] The conversion pair LUT 244 has an arbitrary storage medium such as a semiconductor memory, and stores a lookup table (LUT) for selecting a conversion pair. This LUT has information such as Table 12 shown in FIG. 2. This LUT may be predetermined, or may be redesignable based on the RD cost or the like. The conversion pair LUT 244 supplies this LUT to the conversion type index setting unit 245 as necessary.
[0192] The transform type index setting unit 245 is configured to perform processing related to setting of the transform type index TrType. The transform type index TrType is an identifier for identifying the type (transform matrix) of the orthogonal transform (inverse orthogonal transform). This transform type index TrType includes, for example, a horizontal transform type index TrTypeH and a vertical transform type index TrTypeV. The horizontal transform type index TrTypeH is an identifier for identifying the type (transform matrix) of the one-dimensional orthogonal transform (inverse one-dimensional orthogonal transform) in the horizontal direction. The vertical transform type index TrTypeV is an identifier for identifying the type (transform matrix) of the one-dimensional orthogonal transform (inverse one-dimensional orthogonal transform) in the vertical direction.
[0193] The transform type index setting unit 245 receives as input the transform pair index TrPairIdx supplied from the transform pair index setting unit 251, the LUT supplied from the transform pair LUT 244, and mode information. The mode information includes coding parameters such as intra prediction mode information (IntraMode), mode information indicating inter prediction (Inter), and a component ID (compID). The mode information may be set by the control unit 201 (a configuration other than that of the control unit 201 shown in FIG. 10) or may be supplied from outside the image coding device 200.
[0194] Based on these pieces of information, the transform type index setting unit 245 sets a horizontal transform type index TrTypeH and a vertical transform type index TrTypeV as the transform type index TrType. That is, the transform type index setting unit 245 selects a transform pair corresponding to the transform pair index TrPairIdx and the mode information according to the LUT supplied from the transform pair LUT 244, and sets a horizontal transform type index TrTypeH and a vertical transform type index TrTypeV that identify the transform pair.
[0195] The transform type index setting unit 245 supplies the set horizontal transform type index TrTypeH and vertical transform type index TrTypeV to the orthogonal transform unit 213 and the inverse orthogonal transform unit 218 as transform information Tinfo.
[0196] That is, the control unit 201 controls the orthogonal transform and the inverse orthogonal transform by supplying the horizontal transform type index TrTypeH and the vertical transform type index TrTypeV to the orthogonal transform unit 213 and the inverse orthogonal transform unit 218. Then, as described above, when setting the horizontal transform type index TrTypeH and the vertical transform type index TrTypeV, the control unit 201 controls the number of transform pair candidates (NumTrPair) based on the coding parameters. Therefore, the image coding device 200 can suppress a decrease in coding efficiency (improve coding efficiency) as described above with reference to FIG. 8 and the like.
[0197] <Details of the orthogonal transformation section> Fig. 11 is a block diagram showing an example of the main configuration of orthogonal transform unit 213 in Fig. 9. As shown in Fig. 11, orthogonal transform unit 213 has a primary transform unit 261 and a secondary transform unit 262.
[0198] The primary transform unit 261 is configured to perform processing related to primary transform, which is a predetermined transform processing such as orthogonal transform, etc. For example, the primary transform unit 261 receives as input a prediction residual D and transform information Tinfo (such as a horizontal transform type index TrTypeH and a vertical transform type index TrTypeV).
[0199] The primary transform unit 261 performs primary transform on the prediction residuals D using a transform matrix corresponding to the horizontal transform type index TrTypeH and a transform matrix corresponding to the vertical transform type index TrTypeV, and derives transform coefficients Coeff_P after the primary transform. The primary transform unit 261 supplies the derived transform coefficients Coeff_P to the secondary transform unit 262.
[0200] As shown in FIG. 11, the primary conversion unit 261 has a primary horizontal conversion unit 271 and a primary vertical conversion unit 272.
[0201] The primary horizontal transform unit 271 is configured to perform processing related to primary horizontal transform, which is a one-dimensional orthogonal transform in the horizontal direction. For example, the primary horizontal transform unit 271 receives as input a prediction residual D and transform information Tinfo (horizontal transform type index TrTypeH, etc.). The primary horizontal transform unit 271 performs primary horizontal transform on the prediction residual D using a transform matrix corresponding to the horizontal transform type index TrTypeH. The primary horizontal transform unit 271 supplies transform coefficients after the primary horizontal transform to the primary vertical transform unit 272.
[0202] The primary vertical transform unit 272 is configured to perform processing related to primary vertical transform, which is a one-dimensional orthogonal transform in the vertical direction. For example, the primary vertical transform unit 272 receives transform coefficients after the primary horizontal transform and transform information Tinfo (such as a vertical transform type index TrTypeV). The primary vertical transform unit 272 performs primary vertical transform on the transform coefficients after the primary horizontal transform using a transform matrix corresponding to the vertical transform type index TrTypeV. The primary vertical transform unit 272 supplies the transform coefficients after the primary vertical transform (i.e., the transform coefficients Coeff_P after the primary transform) to the secondary transform unit 262.
[0203] The secondary transform unit 262 is configured to perform processing related to secondary transform, which is a predetermined transform processing such as orthogonal transform. For example, the secondary transform unit 262 receives the transform coefficient Coeff_P and transform information Tinfo as input. The secondary transform unit 262 performs secondary transform on the transform coefficient Coeff_P based on the transform information Tinfo, and derives the transform coefficient Coeff after the secondary transform. The secondary transform unit 262 outputs the transform coefficient Coeff to the outside of the orthogonal transform unit 213 (supplies it to the quantization unit 214).
[0204] In the orthogonal transform unit 213, the primary transform by the primary transform unit 261, the secondary transform by the secondary transform unit 262, or both may be skipped (omitted). Also, the primary horizontal transform by the primary horizontal transform unit 271 may be skipped (omitted). Similarly, the primary vertical transform by the primary vertical transform unit 272 may be skipped (omitted).
[0205] <Primary horizontal conversion section> Fig. 12 is a block diagram showing an example of the main configuration of primary horizontal transform unit 271 in Fig. 11. As shown in Fig. 12, primary horizontal transform unit 271 has a transformation matrix derivation unit 281, a matrix operation unit 282, a scaling unit 283, and a clip unit 284.
[0206] The transformation matrix derivation unit 281 calculates at least the transformation matrix T H (Transformation matrix T for one-dimensional orthogonal transformation in the horizontal direction H For example, the transformation matrix derivation unit 281 receives information on the horizontal transformation type index TrTypeH and the size of the transformation block. The transformation matrix derivation unit 281 derives a transformation matrix T H The transformation matrix derivation unit 281 derives the transformation matrix T H is supplied to the matrix calculation unit 282.
[0207] The matrix calculation unit 282 has at least a configuration necessary for performing processing related to matrix calculation. For example, the matrix calculation unit 282 receives the transformation matrix T H and input data X in (i.e., the transform block of the prediction residual D) is input. The matrix calculation unit 282 receives the transform matrix T H Using the input data X in (i.e., the transform block of the prediction residual D) is subjected to a horizontal one-dimensional orthogonal transform to obtain intermediate data Y1. This calculation can be expressed as a determinant as in the following equation (7).
[0208]
number
[0209] The matrix calculation unit 282 supplies the intermediate data Y 1 to the scaling unit 283 .
[0210] The scaling unit 283 shifts the coefficient Y1[i,j] of each i-th row and j-th column component of the intermediate data Y1 by a predetermined shift amount S Hto obtain intermediate data Y2. This scaling can be expressed as in the following equation (8). Hereinafter, the i-th row and j-th column component ((i,j) component) of a two-dimensional matrix (two-dimensional array) X will be represented as X[i,j].
[0211]
number
[0212] The scaling unit 283 supplies the intermediate data Y2 to the clip unit 284.
[0213] The clipping unit 284 clips the value of the coefficient Y2[i,j] of each i-th row and j-th column component of the intermediate data Y2, and outputs the output data X out (i.e., the transform coefficients after the primary horizontal transform) are derived. This process can be expressed as in the following equation (9).
[0214]
number
[0215] The clipping unit 284 clips the output data X out (the transform coefficient after the primary horizontal transform) is output to the outside of the primary horizontal transform unit 271 (supplied to the primary vertical transform unit 272).
[0216] <Transformation matrix derivation part> Fig. 13 is a block diagram showing an example of a main configuration of the transformation matrix derivation unit 281 in Fig. 12. As shown in Fig. 13, the transformation matrix derivation unit 281 has a transformation matrix LUT 291, a flip unit 292, and a transposition unit 293. Note that although arrows indicating data exchange are omitted in Fig. 13, the transformation matrix derivation unit 281 can exchange any data between any processing units (processing blocks).
[0217] The transformation matrix LUT 291 is a lookup table for holding (storing) a transformation matrix corresponding to the horizontal transformation type index TrTypeH and the size N of the transformation block. When the horizontal transformation type index TrTypeH and the size N of the transformation block are specified, the transformation matrix LUT 291 selects and outputs a transformation matrix corresponding to them. In the case of this derivation example, the transformation matrix LUT 291 converts the transformation matrix into a base transformation matrix T base to the flip section 292 or the transposition section 293, or both.
[0218] The flip unit 292 flips the input transformation matrix T with N rows and N columns, and outputs the transformed matrix T after the flip. flip In this derivation example, the flip unit 292 outputs the base transformation matrix T base The input is the base transformation matrix T base Flip in the row direction (horizontal direction) to obtain the transformation matrix T flip Let us consider the transformation matrix T H and outputs it to the outside of the transformation matrix derivation unit 281 (supplying it to the matrix calculation unit 282).
[0219] The transposition unit 293 transposes the input transformation matrix T with N rows and N columns, and obtains the transposed transformation matrix T transpose In this derivation example, the transposition unit 293 outputs the base transformation matrix T base The input is the base transformation matrix T base Transpose the transformation matrix T transpose Let us consider the transformation matrix T H and outputs it to the outside of the transformation matrix derivation unit 281 (supplying it to the matrix calculation unit 282).
[0220] <Primary vertical conversion section> Fig. 14 is a block diagram showing an example of the main configuration of the primary vertical transform unit 272 in Fig. 11. As shown in Fig. 14, the primary vertical transform unit 272 has a transformation matrix derivation unit 301, a matrix operation unit 302, a scaling unit 303, and a clip unit 304.
[0221] The transformation matrix derivation unit 301 calculates at least a transformation matrix T V (Transformation matrix T for one-dimensional orthogonal transformation in the vertical direction V For example, the transformation matrix derivation unit 301 receives information on a vertical transformation type index TrTypeV and the size of a transformation block. The transformation matrix derivation unit 301 derives a transformation matrix T V The transformation matrix derivation unit 301 derives the transformation matrix T V is supplied to the matrix calculation unit 302.
[0222] The matrix calculation unit 302 has at least a configuration necessary for performing processing related to matrix calculation. For example, the matrix calculation unit 302 receives the transformation matrix T V and input data X in For example, the matrix calculation unit 302 receives the transformation matrix T V Using the input data X in (i.e., the transform block of transform coefficients after the primary horizontal transform) is subjected to a one-dimensional orthogonal transform in the vertical direction to obtain intermediate data Y1. This calculation can be expressed as a determinant as in the following equation (10).
[0223]
number
[0224] The matrix calculation unit 302 supplies the intermediate data Y 1 to the scaling unit 303 .
[0225] The scaling unit 303 shifts the coefficient Y1[i,j] of each i-th row and j-th column component of the intermediate data Y1 by a predetermined shift amount S V The intermediate data Y2 is obtained by scaling the data by the following equation (11).
[0226]
number
[0227] The scaling unit 303 supplies the intermediate data Y2 to the clipping unit 304.
[0228] The clipping unit 304 clips the value of the coefficient Y2[i,j] of each i-th row and j-th column component of the intermediate data Y2, and outputs the output data X out (i.e., the transform coefficients after the primary vertical transform) are derived. This process can be expressed as in the following equation (12).
[0229]
number
[0230] The clip unit 304 clips the output data X out (the transform coefficient after the primary vertical transform) is output to the outside of the primary vertical transform unit 272 (supplied to the secondary transform unit 262) as the transform coefficient after the primary transform Coeff_P.
[0231] <Transformation matrix derivation part> Fig. 15 is a block diagram showing an example of the main configuration of the transformation matrix derivation unit 301 in Fig. 14. As shown in Fig. 15, the transformation matrix derivation unit 301 has a transformation matrix LUT 311, a flip unit 312, and a transposition unit 313. Note that although arrows indicating data exchange are omitted in Fig. 15, the transformation matrix derivation unit 301 can exchange any data between any processing units (processing blocks).
[0232] The transformation matrix LUT 311 is a lookup table for holding (storing) a transformation matrix corresponding to the vertical transformation type index TrTypeV and the size N of the transformation block. When the vertical transformation type index TrTypeIdxV and the size N of the transformation block are specified, the transformation matrix LUT 311 selects and outputs a transformation matrix corresponding to them. In the case of this derivation example, the transformation matrix LUT 311 converts the transformation matrix into a base transformation matrix T base to the flip section 312 or the transposition section 313, or to both.
[0233] The flip unit 312 flips the input transformation matrix T with N rows and N columns, and outputs the transformed matrix T after the flip. flip In this derivation example, the flip unit 312 outputs the base transformation matrix T base The input is the base transformation matrix T base Flip in the row direction (horizontal direction) to obtain the transformation matrix T flip Let us consider the transformation matrix T V and outputs the result to the outside of the transformation matrix derivation unit 301 (supplying it to the matrix calculation unit 302).
[0234] The transposition unit 313 transposes the input transformation matrix T with N rows and N columns to obtain the transposed transformation matrix T transpose In this derivation example, the transposition unit 313 outputs the base transformation matrix T base The input is the base transformation matrix T base Transpose the transformation matrix T transpose Let us consider the transformation matrix T V and outputs the result to the outside of the transformation matrix derivation unit 301 (supplying it to the matrix calculation unit 302).
[0235] <Image encoding process flow> Next, a description will be given of the flow of each process executed by the image encoding device 100 configured as above. First, an example of the flow of an image encoding process will be described with reference to the flowchart in FIG.
[0236] When the image encoding process starts, in step S201, the reordering buffer 211 is controlled by the control unit 201 to reorder the frames of the input video data from the display order to the encoding order.
[0237] In step S202, the control unit 201 sets a processing unit for the input image held by the sorting buffer 211 (performs block division).
[0238] In step S203, the control unit 201 determines (sets) coding parameters for the input image held by the reordering buffer 211.
[0239] In step S204, the control unit 201 performs an orthogonal transform control process, for example, a process related to the control of the orthogonal transform, such as setting a transform type index.
[0240] In step S205, the prediction unit 222 performs a prediction process to generate a predicted image, etc., of an optimal prediction mode. For example, in this prediction process, the prediction unit 222 performs intra prediction to generate a predicted image, etc., of an optimal intra prediction mode, performs inter prediction to generate a predicted image, etc., of an optimal inter prediction mode, and selects an optimal prediction mode from among them based on a cost function value, etc.
[0241] In step S206, the calculation unit 212 calculates the difference between the input image and the prediction image of the optimal mode selected by the prediction process in step S205. That is, the calculation unit 212 generates a prediction residual D between the input image and the prediction image. The prediction residual D thus obtained has a reduced data amount compared to the original image data. Therefore, the data amount can be compressed compared to the case where the image is encoded as it is.
[0242] In step S207, the orthogonal transform unit 213 performs an orthogonal transform process on the prediction residual D generated by the process of step S206, in accordance with the control performed in step S204, to derive a transform coefficient Coeff.
[0243] In step S208, the quantization unit 214 quantizes the transform coefficient Coeff obtained by the process of step S207 by using the quantization parameter calculated by the control unit 201, etc., to derive the quantized transform coefficient level level.
[0244] In step S209, the inverse quantization unit 217 inverse quantizes the quantized transform coefficient level generated by the process of step S208 with characteristics corresponding to the quantization characteristics of step S208, to derive the transform coefficient Coeff_IQ.
[0245] In step S210, the inverse orthogonal transform unit 218 performs inverse orthogonal transform on the transform coefficient Coeff_IQ obtained by the process of step S209 in accordance with the control performed in step S204, using a method corresponding to the orthogonal transform process of step S207, to derive 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) for the decoding side can be applied to the inverse orthogonal transform process of step S210.
[0246] In step S211, the calculation unit 219 generates a locally decoded image by adding the prediction image obtained by the prediction process in step S205 to the prediction residual D' derived in the process of step S210.
[0247] In step S212, the in-loop filter unit 220 performs an in-loop filter process on the locally decoded image derived in the process of step S211.
[0248] In step S213, the frame memory 221 stores the locally decoded image derived by the process of step S211 and the locally decoded image filtered in step S212.
[0249] In step S214, the encoding unit 215 encodes the quantized transform coefficient level LEVEL obtained by the process of step S208. For example, the encoding unit 215 encodes the quantized transform coefficient level LEVEL, which is information related to the image, by arithmetic encoding or the like to generate encoded data. At this time, the encoding unit 215 also encodes various encoding parameters (header information Hinfo, prediction mode information Pinfo, transformation information Tinfo). Furthermore, the encoding unit 215 derives residual information RInfo from the quantized transform coefficient level LEVEL, and encodes the residual information RInfo.
[0250] In step S215, the accumulation buffer 216 accumulates the encoded data thus obtained and outputs it, for example, as a bit stream, to the outside of the image encoding device 200. 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 223 performs rate control as necessary.
[0251] When the process of step S214 ends, the image encoding process ends.
[0252] <Flow of orthogonal transform control process> Next, an example of the flow of the orthogonal transform control process executed in step S204 in FIG. 16 will be described with reference to the flowchart in FIG.
[0253] When the orthogonal transform control process is started, in step S231, the transform pair number setting unit 241 of the control unit 201 sets the selectable transform pair number (the number of transform pair candidates) NumTrPair based on the coding parameters.
[0254] In step S232, the conversion pair number setting unit 241 determines whether the selectable conversion pair number NumTrPair set in step S231 is “1.” If it is determined that the selectable conversion pair number NumTrPair is not “1,” the process proceeds to step S233.
[0255] In step S233, the conversion pair number setting unit 241 determines whether the selectable conversion pair number NumTrPair set in step S231 is “2” or not. If it is determined that the selectable conversion pair number NumTrPair is not “2”, the process proceeds to step S234.
[0256] In step S234, the cMax setting unit 242 sets the maximum value cMax of the selectable number of conversion pairs NumTrPair.
[0257] In step S235, the transform pair index setting unit 251 of the transform pair identification information setting unit 243 sets an optimal transform pair index TrPairIdx based on the number of selectable transform pairs NumTrPair set in step S231 and the maximum value cMax set in step S234.
[0258] The transform pair index setting unit 251 sets candidates for transform pairs corresponding to the selectable number of transform pairs NumTrPair and the maximum value cMax, sets an optimal transform pair from among the candidates based on the RD cost, etc., and sets a transform pair index TrPairIdx that identifies the optimal transform pair.
[0259] When the process of step S235 ends, the process proceeds to step S238.
[0260] Also, if it is determined in step S232 that the number of selectable conversion pairs NumTrPair is "1", the process proceeds to step S236.
[0261] In step S236, the transform pair index setting unit 251 sets the transform pair index TrPairIdx to “0.” When the process of step S236 ends, the process proceeds to step S238.
[0262] Also, if it is determined in step S233 that the number of selectable conversion pairs NumTrPair is "2", the process proceeds to step S237.
[0263] In step S237, the transform pair index setting unit 251 sets the transform pair index TrPairIdx to “1.” When the process of step S237 ends, the process proceeds to step S238.
[0264] When the optimal transform pair index TrPairIdx is set as described above, in step S238, the transform flag setting unit 252 sets the transform flag emt_flag corresponding to the optimal transform pair index TrPairIdx. For example, when the transform pair index TrPairIdx is "0", the transform flag setting unit 252 sets the transform flag emt_flag to "0". Also, for example, when the transform pair index TrPairIdx is "1" or greater, the transform flag setting unit 252 sets the transform flag emt_flag to "1".
[0265] In step S239, the transform index setting unit 253 sets a transform index emt_idx corresponding to the optimal transform pair index TrPairIdx. For example, when the transform pair index TrPairIdx is equal to or greater than "1", the transform flag setting unit 252 sets the transform flag emt_flag to (transform pair index TrPairIdx-1).
[0266] In step S240, the transform type index setting unit 245 sets the optimal transform pair index TrPairIdx and the horizontal transform type index TrTypeH and vertical transform type index TrTypeV corresponding to the prediction mode information, based on the LUT held by the transform pair LUT 244.
[0267] When the process of step S240 ends, the orthogonal transform control process ends, and the process returns to FIG.
[0268] As described above, in the control of orthogonal transform, by controlling the number of candidates of transform pairs based on the coding parameters, the amount of code can be reduced more efficiently in a method according to the relative amount of code of the residual signal of the block to be processed and the mode information of AMT, and the reduction in coding efficiency can be suppressed (coding efficiency can be improved). In addition, by suppressing an unnecessary increase in the number of candidates of transform pairs, the increase in the load of coding processing can be suppressed.
[0269] <Flow of orthogonal transform processing> Next, an example of the flow of the orthogonal transform process executed in step S207 in FIG. 16 will be described with reference to the flowchart in FIG.
[0270] When the orthogonal transform process is started, the orthogonal transform unit 213 determines in step S251 whether the transform skip flag ts_flag is 2D_TS (indicating a two-dimensional transform skip) (for example, 1 (true)) or the transform quantization bypass flag transquant_bypass_flag is 1 (true). If it is determined that the transform skip flag ts_flag is 2D_TS (for example, 1 (true)) or the transform quantization bypass flag is 1 (true), the orthogonal transform process ends and the process returns to FIG. 16. In this case, the orthogonal transform process (primary transform or secondary transform) is omitted, and the input prediction residual D is set as the transform coefficient Coeff.
[0271] 18, if it is determined that the transform skip flag ts_flag is not 2D_TS (not a two-dimensional transform skip) (for example, 0 (false)) and the transform quantization bypass flag transquant_bypass_flag is 0 (false), the process proceeds to step S252. In this case, the primary transform process and the secondary transform process are performed.
[0272] In step S252, the primary transform unit 261 performs primary transform processing on the input prediction residual D, and derives transform coefficients Coeff_P after the primary transform.
[0273] In step S253, the secondary transform unit 262 performs a secondary transform process on the transform coefficient Coeff_P to derive a transform coefficient Coeff after the secondary transform.
[0274] When the process of step S253 ends, the orthogonal transform process ends.
[0275] <Primary conversion process flow> Next, an example of the flow of the primary conversion process executed in step S252 in FIG. 18 will be described with reference to the flowchart in FIG.
[0276] When the primary transform process starts, in step S261, the primary horizontal transform unit 271 of the primary transform unit 261 performs primary horizontal transform process on the prediction residual D to derive transform coefficients after the primary horizontal transform.
[0277] In step S262, the primary vertical transformation unit 272 of the primary transformation unit 261 performs a primary vertical transformation on the primary horizontal transformation result (transformation coefficients after the primary horizontal transformation) obtained in step S261, and derives transformation coefficients after the primary vertical transformation (transformation coefficients after the primary transformation Coeff_P).
[0278] When the process of step S262 ends, the primary conversion process ends, and the process returns to FIG.
[0279] <Primary horizontal conversion process flow> The flow of the primary horizontal transformation process executed in step S261 in FIG. 19 will be described with reference to the flowchart in FIG.
[0280] When the primary horizontal transform process is started, in step S271, the transform matrix derivation unit 281 of the primary horizontal transform unit 271 calculates the transform matrix T H Derive:
[0281] In step S272, the matrix calculation unit 282 calculates the derived transformation matrix T H Using the input data X in A horizontal one-dimensional orthogonal transform is performed on (the prediction residual D) to obtain intermediate data Y1. This process can be expressed as a determinant, as shown in the above formula (7). Furthermore, this process can be expressed as an element-by-element calculation, as shown in the following formula (13).
[0282]
number
[0283] In other words, the coefficient Y1[i,j] of the i-th row and j-th column component of the intermediate data Y1 is in The row vector X in the i-th row of in [i,:] and the transformation matrix T H The jth row vector T H Transpose matrix T of [j,:] H T Set the dot product with [:,j] (j=0,···,M-1, i=0,···,N-1), where M is the input data X in is the size in the x direction of the input data in is the size in the y direction of the pixel. M and N can be expressed as in the following equation (14).
[0284]
number
[0285] Returning to FIG. 20, in step S273, the scaling unit 283 scales the coefficient Y1[i,j] of each i-th row and j-th column component of the intermediate data Y1 derived by the process of step S272 by a shift amount S H The intermediate data Y2 is derived by scaling using the above-mentioned equation (8).
[0286] In step S274, the clipping unit 284 clips the value of the coefficient Y2[i,j] of each i-th row and j-th column component of the intermediate data Y2 derived in the process of step S273, and obtains the output data X out (i.e., the transform coefficients after the primary horizontal transform) are obtained. This process can be expressed as in the above equation (9).
[0287] When the process of step S274 ends, the primary horizontal transformation process ends, and the process returns to FIG.
[0288] <Flow of transformation matrix derivation process> Next, an example of the flow of the transformation matrix derivation process executed in step S271 in FIG. 20 will be described with reference to the flowchart in FIG.
[0289] When the transformation matrix derivation process is started, the transformation matrix derivation unit 281 determines the base transformation type BaseTrType corresponding to the horizontal transformation type index TrTypeH in step S281. This process can be expressed mathematically, for example, as shown in equation (15). The transformation matrix derivation unit 281 reads the transformation matrix of N rows and N columns of the determined base transformation type from the transformation matrix LUT, and converts it into the base transformation matrix T base Set to.
[0290]
number
[0291] Moreover, the transformation matrix derivation unit 281 sets a value corresponding to the horizontal transformation type index TrTypeH to the flip flag FlipFlag as shown in the following equation (17). Moreover, the transformation matrix derivation unit 281 sets a value corresponding to the transformation type identifier TrTypeIdxH to the transpose flag TransposeFlag as shown in the following equation (18).
[0292]
number
[0293] In step S282, the transformation matrix derivation unit 281 determines whether or not the flip flag FlipFlag and the transpose flag TransposeFlag satisfy a condition (ConditionA1) expressed by the following equation (19).
[0294]
number
[0295] If it is determined that the above condition (ConditionA1) is satisfied (if both the flip flag FlipFlag and the transpose flag TransposeFlag are false (0)), the process proceeds to step S283.
[0296] In step S283, the transformation matrix derivation unit 281 calculates the transformation matrix T base Transform the matrix T H Set it to.
[0297]
number
[0298] When the process of step S283 ends, the transformation matrix derivation process ends, and the process returns to Fig. 20. Also, if it is determined in step S282 that the above-mentioned condition (ConditionA1) is not satisfied (if the flip flag FlipFlag or the transpose flag TransposeFlag is true (1)), the process proceeds to step S284.
[0299] In step S284, the transformation matrix derivation unit 281 determines whether or not the flip flag FlipFlag and the transpose flag TransposeFlag satisfy a condition (ConditionA2) expressed by the following equation (21).
[0300]
number
[0301] If it is determined that the above condition (ConditionA2) is satisfied (if the flip flag FlipFlag is false (0) and the transpose flag TransposeFlag is true (1)), the process proceeds to step S285.
[0302] In step S285, the transformation matrix derivation unit 281 derives the base transformation matrix T base Transpose the transformation matrix T H This process can be expressed as a determinant as shown in the following equation (22).
[0303]
number
[0304] In addition, when this process is expressed as an element-by-element calculation, the transformation matrix derivation unit 281 calculates the base transformation matrix T base The i-th row and j-th column components ((i,j) components) of the transformation matrix T H Set it to the (j,i) component of
[0305]
number
[0306] Here, the transformation matrix T H The i-th row and j-th column component ((i,j) component) of T H The notation is [i,j]. Also, the second line, "for i,j=0,...,N-1", indicates that i and j have values from 0 to N-1. H [j,i] is the N-row, N-column transformation matrix T H means to show all elements of
[0307] In this way, by expressing the process of step S285 as an element-by-element operation, the transposition operation can be realized by simply accessing a two-dimensional array. When the process of step S285 ends, the transformation matrix derivation process ends, and the process returns to FIG.
[0308] Also, if it is determined in step S284 that the above-mentioned condition (ConditionA2) is not satisfied (if the flip flag FlipFlag is true (1) or the transpose flag TransposeFlag is false (0)), the process proceeds to step S286.
[0309] In step S286, the transformation matrix derivation unit 281 flips the base transformation matrix Tbase via the flip unit 292 to obtain the transformation matrix T H This process can be expressed as a determinant as shown in the following equation (24).
[0310]
number
[0311] Here, × is an operator representing matrix multiplication. Also, the flip matrix J (Cross-Identity Matrix) is the left-right flip of the N-row, N-column unit matrix I.
[0312] Furthermore, when this process is expressed as an element-by-element calculation, the transformation matrix derivation unit 281 calculates the transformation matrix T H The base transformation matrix T base Set the (i, N-1-j) component of
[0313]
number
[0314] Here, the transformation matrix T H The i-th row and j-th column component ((i,j) component) of T HThe notation is [i,j]. Also, the second line "for i,j=0,...,N-1" indicates that i and j have values from 0 to N-1. That is, T H [i,j] is the N-row, N-column transformation matrix T H means to show all elements of
[0315] In this way, by expressing the process of step S286 as an element-by-element operation, the base transformation matrix T base The transposition operation can be realized by simply accessing a two-dimensional array, without performing a matrix operation between and the flip matrix J. Also, the flip matrix J becomes unnecessary. When the process of step S286 ends, the transformation matrix derivation process ends, and the process returns to FIG. 20.
[0316] Note that a branch as described below may be inserted between the process of step S284 and the process of step S286. That is, in that step, the transformation matrix derivation unit 281 determines whether or not the flip flag FlipFlag and the transpose flag TransposeFlag satisfy a condition (ConditionA3) expressed by the following formula (26).
[0317]
number
[0318] If the transformation matrix derivation unit 281 determines that the above condition (ConditionA3) is satisfied (if the flip flag FlipFlag is true (1) and the transpose flag TransposeFlag is false (0)), the process proceeds to step S286.
[0319] Also, if it is determined that the above-mentioned condition (Condition A3) is not satisfied (if the flip flag FlipFlag is false (0) or the transpose flag TransposeFlag is true (1)), the transformation matrix derivation process ends and the process returns to Figure 20.
[0320] <Primary vertical conversion process flow> Next, the flow of the primary vertical transformation process executed in step S262 in FIG. 19 will be described with reference to the flowchart in FIG.
[0321] When the primary vertical transformation process is started, in step S291, the transformation matrix derivation unit 301 of the primary vertical transformation unit 272 executes the transformation matrix derivation process to obtain a transformation matrix T V Derive:
[0322] The flow of this transformation matrix derivation process is the same as that of the primary horizontal transformation described with reference to the flowchart in Fig. 21, and therefore the description thereof will be omitted. For example, the horizontal transformation type index TrTypeH is replaced with the vertical transformation type index TrTypeV, and the derived transformation matrix T H Let us use the transformation matrix T V 21. For example, the horizontal direction in the description given with reference to FIG. 21 may be replaced with the vertical direction.
[0323] In step S292, the matrix calculation unit 302 calculates the derived transformation matrix T V Using the input data X in A one-dimensional orthogonal transform is performed in the vertical direction on the (transform coefficients after the primary horizontal transform) to obtain intermediate data Y1. This process can be expressed as a determinant, as shown in the above formula (10). Furthermore, this process can be expressed as an element-by-element calculation, as shown in the following formula (27).
[0324]
number
[0325] In this case, the coefficient Y1[i,j] of the i-th row and j-th column component of the intermediate data Y1 is calculated using the transformation matrix T V The row vector T of the i-th row V [i,:] and input data X in The j-th column vector X inSet the dot product with [:,j], where j=0,···,M-1, i=0,···,N-1.
[0326] In step S293, the scaling unit 303 scales the coefficient Y1[i,j] of each i-th row and j-th column component of the intermediate data Y1 derived in the process of step S292 by a shift amount S V The intermediate data Y2 is derived by scaling using the above-mentioned equation (11).
[0327] In step S294, the clipping unit 304 clips the value of the coefficient Y2[i,j] of each i-th row and j-th column component of the intermediate data Y2 derived in the process of step S293, and obtains the output data X out (i.e., transform coefficients after primary vertical transform). This process can be expressed as in equation (12) above.
[0328] When the process of step S294 ends, the primary vertical transformation process ends, and the process returns to FIG.
[0329] By executing each process as described above, the image coding device 200 can reduce the amount of code more efficiently by a method according to the relative amount of code of the residual signal of the block to be processed and the mode information of AMT, and can suppress the decrease in coding efficiency (improve coding efficiency). In addition, by suppressing an unnecessary increase in the number of candidates of the transform pair, an increase in the load of the coding process can be suppressed.
[0330] <2-5. Image Decoding Device> FIG. 23 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 400 shown in FIG. 23 is a device that decodes encoded data in which a prediction residual between an image and its predicted image is encoded, such as AVC or HEVC. For example, the image decoding device 400 implements the technology described in Non-Patent Document 1, Non-Patent Document 3, or Non-Patent Document 4, and decodes encoded data in which image data of a moving image is encoded by a method that complies with a standard described in any of these documents. For example, the image decoding device 400 decodes encoded data (bit stream) generated by the above-mentioned image encoding device 200.
[0331] Note that Fig. 23 shows the main processing units, data flows, etc., and is not limited to all that are shown in Fig. 23. In other words, in the image decoding device 400, there may be processing units not shown as blocks in Fig. 23, and there may be processing and data flows not shown as arrows, etc. in Fig. 23. This is the same in other figures explaining processing units, etc. in the image decoding device 400.
[0332] 23, the image decoding device 400 includes an accumulation buffer 411, a decoding unit 412, an inverse quantization unit 413, an inverse orthogonal transformation unit 414, a calculation unit 415, an in-loop filter unit 416, a rearrangement buffer 417, a frame memory 418, and a prediction unit 419. The prediction unit 419 includes an intra prediction unit and an inter prediction unit, not shown. The image decoding device 400 is a device for generating moving image data by decoding encoded data (bit stream).
[0333] <Accumulation buffer> The accumulation buffer 411 acquires and holds (stores) the bitstream input to the image decoding device 400. The accumulation buffer 411 supplies the accumulated bitstream to the decoding unit 412 at a predetermined timing or when a predetermined condition is met.
[0334] <Decryption section> The decoding unit 412 performs processing related to image decoding. For example, the decoding unit 412 receives the bit stream supplied from the accumulation buffer 411 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, to derive parameters.
[0335] 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, and other information. That is, the decoding unit 412 parses (analyzes and obtains) these pieces of information from the bitstream. These pieces of information will be described below.
[0336] <Header information Hinfo> The header information Hinfo includes, for example, header information such as a video parameter set (VPS), a sequence parameter set (SPS), a picture parameter set (PPS), and a slice header (SH). The header information Hinfo includes, for example, information that specifies an image size (horizontal width PicWidth, vertical width PicHeight), bit depth (luminance bitDepthY, chrominance bitDepthC), a chrominance array type ChromaArrayType, a maximum value MaxCUSize / minimum value MinCUSize of CU size, a maximum depth MaxQTDepth / minimum depth MinQTDepth of quad-tree partitioning, a maximum depth MaxBTDepth / minimum depth MinBTDepth of binary-tree partitioning, a maximum value MaxTSSize of transform skip blocks (also called maximum transform skip block size), an on / off flag (also called valid flag) of each encoding tool, and the like.
[0337] For example, the on / off flag of the encoding tool included in the header information Hinfo includes on / off flags related to the conversion and quantization processes shown below. The on / off flag of the encoding tool can also be interpreted as a flag indicating whether or not syntax related to the encoding tool is present in the encoded data. When the value of the on / off flag is 1 (true), it indicates that the encoding tool is usable, and when the value of the on / off flag is 0 (false), it indicates that the encoding tool is not usable. The interpretation of the flag value may be reversed.
[0338] Inter-component prediction enabled flag (ccp_enabled_flag): Flag information indicating whether inter-component prediction (CCP (Cross-Component Prediction), also called CC prediction) is available. For example, when this flag information is "1" (true), it indicates that it is available, and when it is "0" (false), it indicates that it is not available.
[0339] This CCP is also called component-to-component linear prediction (CCLM or CCLMP).
[0340] <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 other information.
[0341] 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.
[0342] 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 luma intra-prediction mode (IntraPredModeC) derived from these syntaxes.
[0343] 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.
[0344] The multi-class linear prediction mode flag (mclm_flag) is information on the linear prediction mode (linear prediction mode information). More specifically, the multi-class linear prediction mode flag (mclm_flag) is flag information indicating whether or not 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).
[0345] The chrominance sample location type identifier (chroma_sample_loc_type_idx) is an identifier for identifying the type of pixel location of the chrominance component (also called the chrominance sample location type). For example, when the chrominance array type (ChromaArrayType), which is information on the color format, indicates the 420 format, the chrominance sample location type identifier is assigned as shown in the following formula (28).
[0346]
number
[0347] 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()).
[0348] The chroma MPM identifier (chroma_mpm_idx) is an identifier indicating which prediction mode candidate in the chroma intra prediction mode candidate list (intraPredModeCandListC) is to be specified as the chroma intra prediction mode.
[0349] 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).
[0350] Of course, the prediction mode information Pinfo may include any information, and may include information other than the above information.
[0351] <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.
[0352] 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 with the base 2 as the logarithms). Transform skip flag (ts_flag): A flag indicating whether or not to skip the (inverse) primary transform and the (inverse) secondary transform. Scan Identifier (scanIdx) Quantization parameter (qp) Quantization matrix (scaling_matrix (e.g., JCTVC-W1005, 7.3.4 Scaling list data syntax))
[0353] <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:
[0354] cbf(coded_block_flag): Residual data presence flag last_sig_coeff_x_pos: last non-zero coefficient X coordinate last_sig_coeff_y_pos: Y coordinate of the last non-zero coefficient coded_sub_block_flag: Sub-block non-zero coefficient presence / absence flag sig_coeff_flag: Non-zero coefficient presence / absence flag gr1_flag: Flag indicating whether the level of the non-zero coefficient is greater than 1 (also called the GR1 flag) gr2_flag: Flag indicating whether the level of the non-zero coefficient is greater than 2 (also called the GR2 flag) sign_flag: The sign indicating whether a non-zero coefficient is positive or negative (also called the sign sign) coeff_abs_level_remaining: The remaining level of nonzero coefficients (also called the nonzero coefficient residual level) etc.
[0355] Of course, the information included in the residual information Rinfo is arbitrary, and information other than the above information may be included.
[0356] <Filter information Finfo> The filter information Finfo includes, for example, control information related to each of the filter processes shown below.
[0357] 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
[0358] More specifically, for example, information specifying a picture to which each filter is applied, an area within a 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 is included in the filter information Finfo, and information other than these pieces of information may be included.
[0359] Returning to the description of the decoding unit 412, the decoding unit 412 derives the quantized transform coefficient level "level" of each coefficient position in each transform block by referring to the residual information Rinfo. The decoding unit 412 supplies the quantized transform coefficient level "level" to the inverse quantization unit 413.
[0360] Furthermore, the decoding unit 412 supplies the parsed header information Hinfo, prediction mode information Pinfo, quantization transformation coefficient level level, transformation information Tinfo, and filter information Finfo to each block.
[0361] The header information Hinfo is supplied to the inverse quantization unit 413 , the inverse orthogonal transformation unit 414 , the prediction unit 419 , and the in-loop filter unit 416 . The prediction mode information Pinfo is supplied to the inverse quantization unit 413 and the prediction unit 419 . The transformation information Tinfo is supplied to the inverse quantization unit 413 and the inverse orthogonal transformation unit 414 . The filter information Finfo is supplied to the in-loop filter unit 416 .
[0362] Of course, the above example is merely an example, and the present invention is not limited to this example. For example, each encoding parameter may be supplied to an arbitrary processing unit. In addition, other information may be supplied to an arbitrary processing unit.
[0363] <Control of inverse orthogonal transformation> The decoding unit 412 also decodes and derives information related to the control of the inverse orthogonal transform. The decoding unit 412 supplies the information thus obtained to the inverse orthogonal transform unit 414 to control the inverse orthogonal transform performed by the inverse orthogonal transform unit 414.
[0364] In addition, when controlling the inverse orthogonal transform, the decoding unit 412 controls the type of inverse orthogonal transform based on the various coding parameters described above, in the same manner as described on the encoding side. More specifically, the decoding unit 412 controls the number of selectable transform pairs (the number of transform pair candidates) NumTrPair based on the various coding parameters described above.
[0365] For example, the decoding unit 412 sets the number of candidates for the type of inverse orthogonal transform (the number of selectable transform pairs NumTrPair) according to the encoding parameters, parses information regarding the type of inverse orthogonal transform contained in the encoded data based on the set number of candidates for the type of inverse orthogonal transform, and sets the type of inverse orthogonal transform based on the parsed information regarding the type of inverse orthogonal transform.
[0366] By using such control, the image decoding device 400 can reduce the amount of coding more efficiently in a manner that corresponds to the relative amount of coding of the residual signal of the block being processed and the AMT mode information, thereby suppressing a reduction in coding efficiency (improving coding efficiency).
[0367] <Inverse quantization section> The inverse quantization unit 413 has at least a necessary configuration for performing processing related to inverse quantization. For example, the inverse quantization unit 413 receives the transformation information Tinfo and the quantized transformation coefficient level level supplied from the decoding unit 412, 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.
[0368] Note that this inverse quantization is performed as an inverse process of the quantization performed by the quantization unit 214. Also, this inverse quantization is the same process as the inverse quantization performed by the inverse quantization unit 217. That is, the inverse quantization unit 217 performs the same process (inverse quantization) as the inverse quantization unit 413.
[0369] The inverse quantization unit 413 supplies the derived transformation coefficient Coeff_IQ to the inverse orthogonal transformation unit 414 .
[0370] <Inverse orthogonal transform section> The inverse orthogonal transform unit 414 performs processing related to inverse orthogonal transform. For example, the inverse orthogonal transform unit 414 receives the transform coefficient Coeff_IQ supplied from the inverse quantization unit 413 and the transform information Tinfo supplied from the decoding unit 412 as input, and performs inverse orthogonal transform processing on the transform coefficient Coeff_IQ based on the transform information Tinfo to derive a prediction residual D'.
[0371] This inverse orthogonal transform is performed as an inverse process of the orthogonal transform performed by the orthogonal transform unit 213. This inverse orthogonal transform is the same process as the inverse orthogonal transform performed by the inverse orthogonal transform unit 218. That is, the inverse orthogonal transform unit 218 performs the same process (inverse orthogonal transform) as the inverse orthogonal transform unit 414.
[0372] The inverse orthogonal transform unit 414 supplies the derived prediction residual D′ to the calculation unit 415 .
[0373] <Arithmetic section> The calculation unit 415 performs processing related to the addition of information related to an image. For example, the calculation unit 415 receives as input a prediction residual D' supplied from the inverse orthogonal transform unit 414 and a predicted image P supplied from the prediction unit 419. As shown in the following equation (29), the calculation unit 415 adds the prediction residual D' and a predicted image P (prediction signal) corresponding to the prediction residual D' to generate a locally decoded image R local Derive:
[0374]
number
[0375] The calculation unit 415 calculates the derived locally decoded image R local is supplied to the in-loop filter unit 416 and the frame memory 418.
[0376] <In-loop filter section> The in-loop filter unit 416 performs processing related to in-loop filtering. For example, the in-loop filter unit 416 uses the locally decoded image R local and filter information Finfo supplied from the decoding unit 412. Note that any information is input to the in-loop filter unit 416, and information other than the above information may also be input.
[0377] Based on the filter information Finfo, the in-loop filter unit 416 generates a locally decoded image R local Then, appropriate filtering is performed on the
[0378] For example, the in-loop filter unit 416 applies four in-loop filters, 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, as described in Non-Patent Document 1. Note that which filters are applied and in what order they are applied are arbitrary and can be appropriately selected.
[0379] The in-loop filter unit 416 performs a filter process corresponding to the filter process performed by the encoding side (for example, the in-loop filter unit 220 of the image encoding device 200). Of course, the filter process performed by the in-loop filter unit 416 is arbitrary and is not limited to the above example. For example, the in-loop filter unit 416 may apply a Wiener filter or the like.
[0380] The in-loop filter unit 416 outputs the filtered locally decoded image R localare supplied to a reordering buffer 417 and a frame memory 418.
[0381] <Sorting Buffer> The reordering buffer 417 receives the locally decoded image R local The reordering buffer 417 stores the locally decoded image R local The reordering buffer 417 reconstructs the decoded images R for each picture using the reordering buffer 417 and holds them (stores them in a buffer). The reordering buffer 417 reorders the obtained decoded images R from the decoding order to the playback order. The reordering buffer 417 outputs the reordered decoded images R to the outside of the image decoding device 400 as video data.
[0382] <Frame memory> The frame memory 418 performs processing related to storage of image-related data. For example, the frame memory 418 stores the locally decoded image R local The decoded image R is reconstructed for each picture and stored in a buffer in the frame memory 418.
[0383] The frame memory 418 also stores the in-loop filtered locally decoded image R local The prediction unit 419 receives input, reconstructs a decoded image R for each picture, and stores the reconstructed image in a buffer in the frame memory 418. The frame memory 418 appropriately supplies the stored decoded image R (or a part thereof) to the prediction unit 419 as a reference image.
[0384] The frame memory 418 may store header information Hinfo, prediction mode information Pinfo, transformation information Tinfo, filter information Finfo, and the like, which are related to the generation of a decoded image.
[0385] <Prediction Department> The prediction unit 419 performs processing related to the generation of a predicted image. For example, the prediction unit 419 receives prediction mode information Pinfo supplied from the decoding unit 412 as an input, performs prediction by 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 419 uses a pre-filter or post-filter decoded image R (or a part thereof) stored in the frame memory 418, which is specified by the prediction mode information Pinfo, as a reference image. The prediction unit 419 supplies the derived predicted image P to the calculation unit 415.
[0386] In the image decoding device 400 configured as above, the decoding unit 412 performs the process to which the present technology is applied as a decoding unit and a control unit. Also, the inverse orthogonal transform unit 414 performs the process to which the present technology is applied as an inverse orthogonal transform unit. Therefore, the image decoding device 400 can reduce the amount of code more efficiently by a method according to the relative amount of code of the residual signal of the block to be processed or the AMT mode information, and can suppress the reduction in coding efficiency (improve coding efficiency).
[0387] <Details of the Decryption Section> Fig. 24 is a block diagram showing an example of main components related to control of inverse orthogonal transform in the decoding unit 412 in Fig. 23. As shown in Fig. 24, the decoding unit 412 has a transform pair number setting unit 431, a cMax setting unit 432, a transform pair identification information decoding unit 433, a transform pair LUT 434, and a transform type index setting unit 435 as components for controlling the inverse orthogonal transform.
[0388] The number of transform pairs setting unit 431 has at least a configuration necessary for performing processing related to setting the number of selectable transform pairs NumTrPair. The number of transform pairs setting unit 431 receives coding parameters as input. These coding parameters may be extracted from the coded data, or may be supplied from outside the image decoding device 400. Furthermore, these coding parameters are information related to coding (decoding), and are not particularly limited as long as they can be used to control the orthogonal transform, but include, for example, various parameters as described with reference to FIG. 8.
[0389] The conversion pair number setting unit 431 sets the selectable conversion pair number NumTrPair based on the encoding parameters. The conversion pair number setting unit 431 supplies the set selectable conversion pair number NumTrPair to the cMax setting unit 432 and the conversion pair identification information decoding unit 433.
[0390] The cMax setting unit 432 has at least a configuration necessary for performing processing related to setting the maximum value cMax of the number of selectable conversion pairs (i.e., the number of conversion pair candidates). The cMax setting unit 432 receives the number of selectable conversion pairs NumTrPair supplied from the conversion pair number setting unit 431 as an input. The cMax setting unit 432 sets the maximum value cMax based on the number of selectable conversion pairs NumTrPair. The cMax setting unit 432 supplies the set maximum value cMax to the conversion pair identification information decoding unit 433.
[0391] The transform pair identification information decoding unit 433 has at least a configuration necessary for performing processing related to decoding of the transform pair identification information. The transform pair identification information decoding unit 433 receives the encoded data, the selectable transform pair number NumTrPair supplied from the transform pair number setting unit 431, and the maximum value cMax supplied from the cMax setting unit 432. The transform pair identification information decoding unit 433 decodes (extracts from the encoded data) the transform pair identification information based on the information. The transform pair identification information decoding unit 433 supplies the transform pair index TrPairIdx to the transform type index setting unit 435 as the decoded transform pair identification information.
[0392] As shown in FIG. 24, the transform pair identification information decoding unit 433 has a transform flag decoding unit 451, a transform index decoding unit 452, and a transform pair index setting unit 453.
[0393] The transform flag decoding unit 451 has a configuration necessary for performing processing related to decoding of the transform flag emt_flag. The transform flag decoding unit 451 receives encoded data as input, and parses and extracts (acquires) the transform flag emt_flag from the encoded data. The transform flag decoding unit 451 supplies the transform flag emt_flag acquired as described above to the transform pair index setting unit 453.
[0394] The transform index decoding unit 452 has at least a configuration necessary for performing processing related to decoding of the transform index emt_idx. The transform index decoding unit 452 receives the coded data, the number of selectable transform pairs NumTrPair supplied from the transform pair number setting unit 431, and the maximum value cMax supplied from the cMax setting unit 432 as input.
[0395] The transform index decoding unit 452 parses and extracts (obtains) the transform index emt_idx included in the coded data based on the selectable transform pair number NumTrPair and the maximum value cMax. That is, the transform index decoding unit 452 specifies and extracts the transform index emt_idx included in the coded data based on the selectable transform pair number NumTrPair and the maximum value cMax. The transform index decoding unit 452 supplies the thus obtained transform index emt_idx to the transform pair index setting unit 453.
[0396] The transform pair index setting unit 453 has at least a configuration necessary for setting a transform pair index. The transform pair index setting unit 453 receives the transform flag emt_flag supplied from the transform flag decoding unit 451 and the transform index emt_idx supplied from the transform index decoding unit 452 as input. The transform pair index setting unit 453 derives a transform pair index TrPairIdx corresponding to the transform flag emt_flag and the transform index emt_idx based on them. The transform pair index setting unit 453 supplies the derived transform pair index TrPairIdx to the transform type index setting unit 435.
[0397] The conversion pair LUT 434 has an arbitrary storage medium such as a semiconductor memory, and stores a lookup table (LUT) for selecting a conversion pair. This LUT has information such as Table 12 shown in FIG. 2. This LUT may be predetermined, or may be redesignable based on the RD cost or the like. The conversion pair LUT 434 supplies this LUT to the conversion type index setting unit 435 as necessary.
[0398] The transform type index setting unit 435 has at least a configuration necessary for performing processing related to the setting of the transform type index TrType. The transform type index setting unit 435 receives the transform pair index TrPairIdx supplied from the transform pair index setting unit 453, the LUT supplied from the transform pair LUT 434, and mode information as input. The mode information includes coding parameters such as mode information (IntraMode) of intra prediction, mode information (Inter) indicating inter prediction, and a component ID (compID). The mode information may be set by the decoding unit 412 (a configuration other than that shown in FIG. 24 of the decoding unit 412) or may be supplied from outside the image decoding device 400.
[0399] Based on these pieces of information, the transform type index setting unit 435 sets a horizontal transform type index TrTypeH and a vertical transform type index TrTypeV as the transform type index TrType. That is, the transform type index setting unit 435 selects a transform pair corresponding to the transform pair index TrPairIdx and the mode information according to the LUT supplied from the transform pair LUT 434, and sets a horizontal transform type index TrTypeH and a vertical transform type index TrTypeV that identify the transform pair.
[0400] The transform type index setting unit 435 supplies the set horizontal transform type index TrTypeH and vertical transform type index TrTypeV to the inverse orthogonal transform unit 414 as transform information Tinfo.
[0401] That is, the decoding unit 412 controls the inverse orthogonal transform by supplying the horizontal transform type index TrTypeH and the vertical transform type index TrTypeV to the inverse orthogonal transform unit 414. As described above, when setting the horizontal transform type index TrTypeH and the vertical transform type index TrTypeV, the decoding unit 412 controls the number of transform pair candidates (NumTrPair) based on the coding parameters. Therefore, the image decoding device 400 can suppress a decrease in coding efficiency (improve coding efficiency) as described above with reference to FIG. 8 and the like.
[0402] <Details of the inverse orthogonal transform section> Fig. 25 is a block diagram showing an example of the main configuration of inverse orthogonal transform unit 414 in Fig. 23. As shown in Fig. 25, inverse orthogonal transform unit 414 has an inverse secondary transform unit 461 and an inverse primary transform unit 462.
[0403] The inverse secondary transform unit 461 has at least a configuration necessary for performing processing related to inverse secondary transform, which is an inverse process of the secondary transform performed on the encoding side (for example, the secondary transform unit 262 of the image encoding device 200). For example, the inverse secondary transform unit 461 receives as input the transform coefficient Coeff_IQ and the transform information Tinfo supplied from the inverse quantization unit 413.
[0404] The inverse secondary transform unit 461 performs an inverse secondary transform on the transform coefficient Coeff_IQ based on the transform information Tinfo to derive the transform coefficient Coeff_IS after the inverse secondary transform. The inverse secondary transform unit 461 supplies the transform coefficient Coeff_IS after the inverse secondary transform to the inverse primary transform unit 462.
[0405] The inverse primary transform unit 462 performs processing related to inverse primary transform, which is the inverse processing of the primary transform performed on the encoding side (for example, the primary transform unit 261 of the image encoding device 200). For example, the inverse primary transform unit 462 receives as input the transform coefficients Coeff_IS after the inverse secondary transform and the transform type indexes (vertical transform type index TrTypeV and horizontal transform type index TrTypeH).
[0406] The inverse primary transform unit 462 performs an inverse primary transform on the transform coefficients Coeff_IS after the inverse secondary transform using a transform matrix corresponding to the horizontal transform type index TrTypeH and a transform matrix corresponding to the vertical transform type index TrTypeV, and derives transform coefficients after the inverse primary transform (i.e., prediction residuals D'). The inverse primary transform unit 462 supplies the derived prediction residuals D' to the calculation unit 415.
[0407] As shown in FIG. 25, the inverse primary transform unit 462 has an inverse primary vertical transform unit 471 and an inverse primary horizontal transform unit 472.
[0408] The inverse primary vertical transform unit 471 is configured to perform processing related to inverse primary vertical transform, which is an inverse one-dimensional orthogonal transform in the vertical direction. For example, the inverse primary vertical transform unit 471 receives the transform coefficient Coeff_IS and transformation information Tinfo (such as the vertical transform type index TrTypeV). The inverse primary vertical transform unit 471 performs an inverse primary vertical transform on the transform coefficient Coeff_IS using a transformation matrix corresponding to the vertical transform type index TrTypeV. The inverse primary vertical transform unit 471 supplies the transform coefficient after the inverse primary vertical transform to the inverse primary horizontal transform unit 472.
[0409] The inverse primary horizontal transform unit 472 is configured to perform processing related to primary horizontal transform, which is a one-dimensional orthogonal transform in the horizontal direction. For example, the inverse primary horizontal transform unit 472 receives transform coefficients after inverse primary vertical transform and transform information Tinfo (horizontal transform type index TrTypeH, etc.). The inverse primary horizontal transform unit 472 performs inverse primary horizontal transform on the transform coefficients after inverse primary vertical transform, using a transform matrix corresponding to the horizontal transform type index TrTypeH. The inverse primary horizontal transform unit 472 supplies the transform coefficients after inverse primary horizontal transform (i.e., prediction residuals D') to the calculation unit 415.
[0410] In the inverse orthogonal transform unit 414, the inverse secondary transform by the inverse secondary transform unit 461, the inverse primary transform by the inverse primary transform unit 462, or both may be skipped (omitted). Also, the inverse primary vertical transform by the inverse primary vertical transform unit 471 may be skipped (omitted). Similarly, the inverse primary horizontal transform by the inverse primary horizontal transform unit 472 may be skipped (omitted).
[0411] <Inverse primary vertical conversion section> Fig. 26 is a block diagram showing an example of the main configuration of the inverse primary vertical transform unit 471 in Fig. 25. As shown in Fig. 26, the inverse primary vertical transform unit 471 has a transformation matrix derivation unit 481, a matrix operation unit 482, a scaling unit 483, and a clip unit 484.
[0412] The transformation matrix derivation unit 481 receives information about the vertical transformation type index TrTypeV and the size of the transformation block, and derives a transformation matrix T V (Transformation matrix T for inverse 1D orthogonal transformation in the vertical direction V The transformation matrix derivation unit 481 derives the transformation matrix T V is supplied to the matrix calculation unit 482.
[0413] The matrix calculation unit 482 uses the transformation matrix T V Using the input data X in (i.e., the transform block of the transform coefficients Coeff_IS after the inverse secondary transform) is subjected to a vertical inverse one-dimensional orthogonal transform to obtain intermediate data Y1. This calculation can be expressed as a determinant as in the following equation (30).
[0414]
number
[0415] The matrix calculation unit 482 supplies the intermediate data Y 1 to the scaling unit 483 .
[0416] The scaling unit 483 shifts the coefficient Y1[i,j] of each i-th row and j-th column component of the intermediate data Y1 by a predetermined shift amount S IV This scaling can be expressed by the following equation (31):
[0417]
number
[0418] The scaling unit 483 supplies the intermediate data Y2 to the clip unit 484.
[0419] The clipping unit 484 clips the value of the coefficient Y2[i,j] of each i-th row and j-th column component of the intermediate data Y2, and outputs the output data X out (i.e., the transform coefficients after the inverse primary vertical transform) are derived. This process can be expressed as in the above-mentioned equation (12).
[0420] The clip unit 484 clips the output data X out (the transform coefficients after the inverse primary vertical transform) are output to the outside of the inverse primary vertical transform unit 471 (supplied to the inverse primary horizontal transform unit 472).
[0421] <Transformation matrix derivation part> Fig. 27 is a block diagram showing an example of the main configuration of the transformation matrix derivation unit 481 in Fig. 26. As shown in Fig. 27, the transformation matrix derivation unit 481 has a transformation matrix LUT 491, a flip unit 492, and a transposition unit 493. Note that although arrows indicating data exchange are omitted in Fig. 27, the transformation matrix derivation unit 481 can exchange any data between any processing units (processing blocks).
[0422] The transformation matrix LUT 491 is a lookup table for holding (storing) a transformation matrix corresponding to the vertical transformation type index TrTypeV and the size N of the transformation block. When the vertical transformation type index TrTypeV and the size N of the transformation block are specified, the transformation matrix LUT 491 selects and outputs a transformation matrix corresponding to them. In the case of this derivation example, the transformation matrix LUT 491 converts the transformation matrix into a base transformation matrix T base to the flip section 492 or the transposition section 493, or both.
[0423] The flip unit 492 flips the input transformation matrix T with N rows and N columns, and outputs the transformed matrix T after the flip. flip In this derivation example, the flip unit 492 outputs the base transformation matrix T base The input is the base transformation matrix T base Flip in the row direction (horizontal direction) to obtain the transformation matrix T flip Let us consider the transformation matrix T V and outputs it to the outside of the transformation matrix derivation unit 481 (supplying it to the matrix calculation unit 482).
[0424] The transposition unit 493 transposes the input transformation matrix T with N rows and N columns, and obtains the transposed transformation matrix T transpose In this derivation example, the transposition unit 493 outputs the base transformation matrix T base The input is the base transformation matrix T base Transpose the transformation matrix T transpose Let us consider the transformation matrix T Vand outputs it to the outside of the transformation matrix derivation unit 481 (supplying it to the matrix calculation unit 482).
[0425] <Inverse primary horizontal conversion section> Fig. 28 is a block diagram showing an example of the main configuration of inverse primary horizontal transform unit 472 in Fig. 25. As shown in Fig. 28, inverse primary horizontal transform unit 472 has a transformation matrix derivation unit 501, a matrix operation unit 502, a scaling unit 503, and a clip unit 504.
[0426] The transformation matrix derivation unit 501 receives information on a horizontal transformation type index TrTypeH and the size of a transformation block, and derives a transformation matrix T H (Transformation matrix T for inverse 1D orthogonal transformation in the horizontal direction H The transformation matrix derivation unit 501 derives the transformation matrix T H is supplied to the matrix calculation unit 502.
[0427] The matrix calculation unit 502 uses the transformation matrix T H Using the input data X in (i.e., the transform block of transform coefficients after the inverse primary vertical transform) is subjected to a horizontal inverse one-dimensional orthogonal transform to obtain intermediate data Y1. This calculation can be expressed as a determinant as in the following equation (32).
[0428]
number
[0429] The matrix calculation unit 502 supplies the intermediate data Y 1 to the scaling unit 503 .
[0430] The scaling unit 503 shifts the coefficient Y1[i,j] of each i-th row and j-th column component of the intermediate data Y1 by a predetermined shift amount S IH This scaling can be expressed by the following equation (33):
[0431]
number
[0432] The scaling unit 503 supplies the intermediate data Y2 to the clip unit 504.
[0433] The clipping unit 504 clips the value of the coefficient Y2[i,j] of each i-th row and j-th column component of the intermediate data Y2, and outputs the output data X out (i.e., the transform coefficients after the inverse primary horizontal transform) are derived. This process can be expressed as in the above equation (9).
[0434] The clip unit 504 clips the output data X out (The transform coefficient after the inverse primary horizontal transform (the transform coefficient after the inverse primary transform Coeff_IP)) is output to the outside of the inverse primary horizontal transform unit 472 as a prediction residual D′ (supplied to the calculation unit 415).
[0435] <Transformation matrix derivation part> Fig. 29 is a block diagram showing an example of the main configuration of the transformation matrix derivation unit 501 in Fig. 28. As shown in Fig. 29, the transformation matrix derivation unit 501 has a transformation matrix LUT 511, a flip unit 512, and a transposition unit 513. Note that although arrows indicating data exchange are omitted in Fig. 29, the transformation matrix derivation unit 501 can exchange any data between any processing units (processing blocks).
[0436] The transformation matrix LUT 511 is a lookup table for holding (storing) a transformation matrix corresponding to the horizontal transformation type index TrTypeIdxH and the size N of the transformation block. When the horizontal transformation type index TrTypeIdxH and the size N of the transformation block are specified, the transformation matrix LUT 511 selects and outputs a transformation matrix corresponding to them. In the case of this derivation example, the transformation matrix LUT 511 converts the transformation matrix into a base transformation matrix T base to the flip section 512 or the transposition section 513, or to both.
[0437] The flip unit 512 flips the input transformation matrix T with N rows and N columns, and outputs the transformed matrix T after the flip. flip In this derivation example, the flip unit 512 outputs the base transformation matrix T base The input is the base transformation matrix T base Flip in the row direction (horizontal direction) to obtain the transformation matrix T flip Let us consider the transformation matrix T H and outputs it to the outside of the transformation matrix derivation unit 501 (supplying it to the matrix calculation unit 502).
[0438] The transposition unit 513 transposes the input transformation matrix T with N rows and N columns, and obtains the transposed transformation matrix T transpose In this derivation example, the transposition unit 513 outputs the base transformation matrix T base The input is the base transformation matrix T base Transpose the transformation matrix T transpose Let us consider the transformation matrix T H and outputs it to the outside of the transformation matrix derivation unit 501 (supplying it to the matrix calculation unit 502).
[0439] <Flow of image decoding process> Next, a description will be given of the flow of each process executed by the image decoding device 400 configured as above. First, an example of the flow of an image encoding process will be described with reference to the flowchart in FIG.
[0440] When the image decoding process starts, in step S401, the accumulation buffer 411 acquires and holds (accumulates) encoded data (bit stream) supplied from outside the image decoding device 400.
[0441] In step S402, the decoding unit 412 decodes the coded data (bit stream) to obtain the quantized transform coefficient level level. Furthermore, the decoding unit 412 parses (analyzes and obtains) various coding parameters from the coded data (bit stream) through this decoding.
[0442] In step S403, the decoding unit 412 performs an inverse orthogonal transform control process for controlling the type of inverse orthogonal transform in accordance with the coding parameters.
[0443] In step S404, the inverse quantization unit 413 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 S402 to obtain a transform coefficient Coeff_IQ.
[0444] In step S405, the inverse orthogonal transform unit 414, under the control of step S403, 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 S404, to obtain a prediction residual D'.
[0445] In step S406, the prediction unit 419 performs a prediction process using a prediction method specified by the encoding side based on the information parsed in step S402, and generates a predicted image P by, for example, referring to a reference image stored in the frame memory 418.
[0446] In step S407, the calculation unit 415 adds the prediction residual D′ obtained in step S405 and the predicted image P obtained in step S406 to obtain a locally decoded image R local Derive:
[0447] In step S408, the in-loop filter unit 416 filters the locally decoded image R obtained in the process of step S407. local In-loop filtering is performed on
[0448] In step S409, the reordering buffer 417 derives decoded images R using the filtered local decoded images R obtained in step S408, and reorders the order of the decoded images R from the decoding order to the playback order. The decoded images R reordered in the playback order are output to the outside of the image decoding device 400 as a moving image.
[0449] In step S410, the frame memory 418 stores the locally decoded image R obtained in the process of step S407. local , and the locally decoded image R obtained after the filtering process in step S408. local At least one of the above is stored.
[0450] When the process of step S410 ends, the image decoding process ends.
[0451] In the image decoding process of the above flow, the process to which the present technology is applied is performed as the process of step S403. Also, as the process of step S405, an inverse orthogonal transform process is performed based on the control of step S403. Therefore, by performing this image decoding process, it is possible to suppress a decrease in coding efficiency (improve coding efficiency).
[0452] <Flow of inverse orthogonal transform control process> Next, an example of the flow of the inverse orthogonal transform control process executed in step S403 in FIG. 30 will be described with reference to the flowchart in FIG.
[0453] When the inverse orthogonal transform control process is started, in step S421, the transform flag decoding unit 451 decodes and obtains the transform flag emt_flag included in the coded data. That is, through this process, the transform flag emt_flag is extracted from the coded data.
[0454] In step S422, the decoding unit 412 decodes the coded data to obtain various coding parameters. The coding parameters include the values of syntax elements included in the coded data, as well as variables derived from the values of the syntax elements. The specific contents of the coding parameters are arbitrary and are not particularly limited, but include, for example, various parameters as described with reference to FIG. 8.
[0455] In step S423, the transform pair number setting unit 431 sets the selectable transform pair number (the number of transform pair candidates) NumTrPair based on the encoding parameters acquired in step S422.
[0456] In step S424, the conversion pair number setting unit 431 determines whether the value of the selectable conversion pair number NumTrPair set in step S423 is “1.” If it is determined that the value of the selectable conversion pair number NumTrPair is not “1,” the process proceeds to step S425.
[0457] In step S425, the conversion pair number setting unit 431 determines whether the value of the selectable conversion pair number NumTrPair set in step S423 is “2.” If it is determined that the value of the selectable conversion pair number NumTrPair is not “2,” the process proceeds to step S426.
[0458] In step S426, the cMax setting unit 432 sets the maximum value cMax of the selectable number of conversion pairs NumTrPair.
[0459] In step S427, the transform index decoding unit 452 arithmetically decodes the encoded data to obtain the bin string binString.
[0460] In step S428, the transform index decoding unit 452 derives the transform index emt_idx from the bin string binString based on the maximum value cMax set in step S426 and the inverse process of the specified binarization method (multi-value method). That is, the transform index emt_idx is extracted from the encoded data by the processes in steps S427 and S428.
[0461] In step S429, the transform pair index setting unit 453 derives (sets) a transform pair index TrPairIdx based on the transform flag emt_flag and the transform index emt_idx extracted from the coded data in steps S421 and S428. For example, the transform pair index TrPairIdx is derived as shown in the following formula (34).
[0462]
number
[0463] For example, if the transformation flag emt_flag = 0, the value of the transformation pair index TrPairIdx is set to "0". Also, if the transformation flag emt_flag = 0 is not, the value of the transformation pair index TrPairIdx is set to "transformation index emt_idx + 1". Of course, the calculation method of this transformation pair index TrPairIdx is arbitrary and is not limited to this example.
[0464] When the process of step S429 is completed, the process proceeds to step S432. Also, when it is determined in step S424 that the value of the selectable number of conversion pairs NumTrPair is "1", the process proceeds to step S430. In step S430, the conversion pair index setting unit 453 sets the value of the conversion pair index TrPairIdx to "0". When the process of step S430 is completed, the process proceeds to step S432. Also, when it is determined in step S425 that the value of the selectable number of conversion pairs NumTrPair is "2", the process proceeds to step S431. In step S431, the conversion pair index setting unit 453 sets the value of the conversion pair index TrPairIdx to "1". When the process of step S431 is completed, the process proceeds to step S432.
[0465] In step S432, the transform type index setting unit 435 sets the horizontal transform type index TrTypeH and the vertical transform type index TrTypeV corresponding to the transform pair index TrPairIdx and the prediction mode information (mode) set as described above, based on the LUT held by the transform pair LUT 434. For example, this derivation can be expressed as the following formula (35).
[0466]
number
[0467] When the process of step S432 ends, the inverse orthogonal transform control process ends, and the process returns to the process of FIG.
[0468] As described above, by controlling the number of candidate transform pairs based on the coding parameters in controlling the inverse orthogonal transform, the amount of coding can be reduced more efficiently in a manner that corresponds to the relative amount of coding of the residual signal of the block to be processed and the AMT mode information, and the reduction in coding efficiency can be suppressed (coding efficiency can be improved).
[0469] <Processing flow of inverse orthogonal transform> Next, an example of the flow of the inverse orthogonal transform process executed in step S405 of Fig. 30 will be described with reference to the flowchart of Fig. 32. When the inverse orthogonal transform process is started, the inverse orthogonal transform unit 414 determines in step S441 whether the transform skip flag ts_flag is 2D_TS (two-dimensional transform skip mode) (for example, 1 (true)) or the transform quantization bypass flag transquant_bypass_flag is 1 (true). When it is determined that the transform skip identifier ts_idx is 2D_TS or the transform quantization bypass flag is 1 (true), the inverse orthogonal transform process ends and the process returns to Fig. 30. In this case, the inverse orthogonal transform process (inverse primary transform or inverse secondary transform) is omitted, and the transform coefficient Coeff_IQ is set as the prediction residual D'.
[0470] Also, in step S441, if it is determined that the transform skip identifier ts_idx is not 2D_TS (a mode other than two-dimensional transform skip) (for example, 0 (false)) and the transform quantization bypass flag is 0 (false), the process proceeds to step S442. In this case, the inverse secondary transform process and the inverse primary transform process are performed.
[0471] In step S442, the inverse secondary transform unit 461 performs an inverse secondary transform process on the transform coefficient Coeff_IQ based on the secondary transform identifier st_idx to derive and output the transform coefficient Coeff_IS.
[0472] In step S443, the inverse primary transform unit 462 performs an inverse primary transform process on the transform coefficient Coeff_IS to derive a transform coefficient after the inverse primary transform (prediction residual D').
[0473] When the process of step S443 ends, the inverse orthogonal transform process ends, and the process returns to FIG.
[0474] <Flow of reverse primary conversion process> Next, an example of the flow of the inverse primary transformation process executed in step S443 in FIG. 32 will be described with reference to the flowchart in FIG.
[0475] When the inverse primary transform process starts, in step S451, the inverse primary vertical transform unit 471 of the inverse primary transform unit 462 performs an inverse primary vertical transform process on the transform coefficients Coeff_IS after the inverse secondary transform, to derive transform coefficients after the inverse primary vertical transform.
[0476] In step S452, the inverse primary horizontal transform unit 472 performs an inverse primary horizontal transform process on the transform coefficients after the inverse primary vertical transform, and derives transform coefficients after the inverse primary horizontal transform (that is, prediction residuals D').
[0477] When the process of step S452 ends, the inverse primary transformation process ends, and the process returns to FIG.
[0478] <Flow of inverse primary vertical transformation process> Next, an example of the flow of the inverse primary vertical transformation process executed in step S451 in FIG. 33 will be described with reference to the flowchart in FIG.
[0479] When the inverse primary vertical transform process is started, in step S461, the transform matrix derivation unit 481 of the inverse primary vertical transform unit 471 executes the transform matrix derivation process to obtain the transform matrix T corresponding to the vertical transform type index TrTypeV. V Derive:
[0480] The transformation matrix derivation process in this case is performed in the same manner as in the case of the primary horizontal transformation described with reference to the flowchart in FIG. 21. Therefore, the description thereof will be omitted. For example, the horizontal transformation type index TrTypeH is replaced with the vertical transformation type index TrTypeV, and the derived transformation matrix T H Let us use the transformation matrix T for the inverse primary vertical transformation. V 21 can be applied as an explanation of the transformation matrix derivation process in this case.
[0481] In step S462, the matrix calculation unit 482 calculates the derived transformation matrix T V Using the input data X in (That is, the transform coefficient Coeff_IS after the inverse secondary transform is subjected to a vertical inverse one-dimensional orthogonal transform to obtain intermediate data Y1. If this process is expressed as a determinant, it can be expressed as the above-mentioned equation (30).
[0482] In step S463, the scaling unit 483 scales the coefficient Y1[i,j] of each i-th row and j-th column component of the intermediate data Y1 derived in the process of step S462 by a shift amount S IVThe intermediate data Y2 is derived by scaling using the above equation (31).
[0483] In step S464, the clipping unit 484 clips the value of the coefficient Y2[i,j] of each i-th row and j-th column component of the intermediate data Y2 derived in the process of step S463, and obtains the output data X out (i.e., transform coefficients after inverse primary vertical transform) are obtained. This process can be expressed as in equation (12) above.
[0484] When the process of step S464 ends, the inverse primary vertical transform process ends, and the process returns to FIG.
[0485] <Flow of inverse primary horizontal transformation process> Next, the flow of the inverse primary horizontal transform process executed in step S452 in FIG. 33 will be described with reference to the flowchart in FIG.
[0486] When the inverse primary horizontal transform process is started, in step S471, the transform matrix derivation unit 501 of the inverse primary horizontal transform unit 472 executes the transform matrix derivation process to obtain a transform matrix T corresponding to the horizontal transform type index TrTypeH. H Derive:
[0487] The transformation matrix derivation process in this case is performed in the same manner as in the case of the primary horizontal transform described with reference to the flowchart of Fig. 21. Therefore, the description thereof will be omitted. For example, if the primary horizontal transform is replaced with an inverse primary horizontal transform, the description made with reference to Fig. 21 can be applied as the description of the transformation matrix derivation process in this case.
[0488] In step S472, the matrix calculation unit 502 calculates the derived transformation matrix T H Using the input data X in(That is, the transform coefficients after the inverse primary vertical transform) are subjected to a horizontal inverse one-dimensional orthogonal transform to obtain intermediate data Y1. If this process is expressed as a determinant, it can be expressed as in the above-mentioned equation (32).
[0489] In step S473, the scaling unit 503 scales the coefficient Y1[i,j] of each i-th row and j-th column component of the intermediate data Y1 derived in the process of step S472 by a shift amount S IH The intermediate data Y2 is derived by scaling using the above equation (33).
[0490] In step S474, the clipping unit 504 clips the value of the coefficient Y2[i,j] of each i-th row and j-th column component of the intermediate data Y2 derived in the process of step S473, and outputs the output data X out (That is, a prediction residual D' is obtained.) This process can be expressed as in the above equation (9).
[0491] When the process of step S474 ends, the inverse primary horizontal transform process ends, and the process returns to FIG.
[0492] By performing each process as described above, the image decoding device 400 can reduce the amount of code more efficiently in a manner that corresponds to the relative amount of code of the residual signal of the block to be processed and the AMT mode information, and can suppress a decrease in encoding efficiency (improve encoding efficiency).
[0493] <2-6.Other> As described above, the number of selectable transform pairs in the orthogonal transform and the inverse orthogonal transform is controlled. When this control is expressed in Table 12 (FIG. 2), it is as shown in FIG. 36, for example. In FIG. 36, frame lines 531 to 534 indicate the range of selectable transform pairs (candidate transform pairs). That is, by the above-mentioned control, the range of selectable transform pairs (the number of rows in Table 12) becomes variable, as shown by frame lines 531 to 534 in FIG. 36.
[0494] In other words, such control makes the range of possible values of the transform pair index TrPairIdx (the transform flag emt_flag and the transform index emt_idx) variable.
[0495] The transformation flag emt_flag and the transformation index emt_idx are binarized with a fixed length (FL (Fixed Length binarization)) as shown in Table 541 in A of Fig. 37. Therefore, the bit length of the transformation flag emt_flag after binarization is fixed (1 bit), but the bit length of the transformation index emt_idx after binarization depends on the maximum value cMax. In other words, it depends on the number of selectable transformation pairs NumTrPair (cMax = NumTrPair - 2).
[0496] Therefore, in the case of Table 12 in Figure 36, the amount of coding for information regarding the transform pair index (i.e., the amount of coding for AMT mode information) can be reduced more when the range surrounded by frame line 531 is used as candidates than when the range surrounded by frame line 534 is used as candidates.
[0497] However, in general, the more candidates there are, the more the amount of code for the residual signal can be reduced. In other words, when the range surrounded by frame line 534 is used as candidates, the amount of code for the residual signal can be reduced more than when the range surrounded by frame line 531 is used as candidates.
[0498] That is, as described above, in a block where the amount of code of the residual signal is greater than the amount of code of the AMT mode information, it is more efficient to reduce the amount of code of the residual signal. Conversely, in a block where the amount of code of the AMT mode information is greater than the amount of code of the residual signal, it is more efficient to reduce the amount of code of the AMT mode information.
[0499] Therefore, in order to perform such control, the image encoding device 200 and the image decoding device 400 control the number of selectable transform pairs NumTrPair based on the encoding parameters. Therefore, in a block in which the code amount of the residual signal is greater than the code amount of the AMT mode information, the code amount of the residual signal can be reduced, and in a block in which the code amount of the AMT mode information is greater than the code amount of the residual signal, the code amount of the AMT mode information can be reduced. Therefore, in either case, the code amount can be reduced more efficiently, and the reduction in the encoding efficiency can be suppressed (the encoding efficiency can be improved).
[0500] For binarization of the transformation index emt_idx, for example, variable-length truncated rice binarization (TR (Truncated Rice binarization)) may be applied, as shown in Table 542 in FIG. 37B. In this case, too, the bit length of the bin after binarization depends on the symbol value and the maximum value cMax. For example, when the value of the prefix part (prefixVal) and the Rice parameter cRiceParam, which is a parameter related to determining the TR bin of the prefix part, are set to "0" when binarizing the syntax, TR corresponds to truncated unary binarization in which the symbol value and bit length match. Therefore, the bit length of the bin depends on the symbol value.
[0501] In other words, in this case too, as in the case of fixed-length binarization, the image encoding device 200 and the image decoding device 400 can more efficiently reduce the amount of code and suppress a reduction in encoding efficiency (improve encoding efficiency) by controlling the number of selectable transform pairs NumTrPair based on encoding parameters.
[0502] In the above description, the transform pair identification information (information related to the transform pair index TrPairIdx) is divided into the transform flag emt_flag and the transform index emt_idx for encoding and decoding. In this case, the transform flag emt_flag constitutes a 1-bit prefix portion indicating whether or not to make a transform pair of index (transform pair index TrPairIdx)==0, and the transform index emt_idx constitutes a suffix portion specifying a transform pair other than index (transform pair index TrPairIdx)==0.
[0503] The conversion pair identification information may be coded and decoded in any manner, and may be coded and decoded as one syntax element using index (conversion pair index TrPairIdx) instead of being divided into a prefix part and a suffix part as described above. In this case, the maximum value cMax is "the number of conversion pairs counted from index==0-1" determined by the current coding parameters in the conversion pair candidate table (Table 12).
[0504] Furthermore, even in the multi-valued data before binarization, the transform pair index TrPairIdx (particularly the transform index emt_idx) may be variable length.
[0505] For example, in the example of Table 12 in FIG. 36 (assuming that the transformation flag emt_flag==1), when the range surrounded by frame line 531 is a candidate, the transformation index emt_idx is fixed to "0", so 0 bit is sufficient. When the range surrounded by frame line 532 is a candidate, the transformation index emt_idx is "0" or "1", so 1 bit is required. When the range surrounded by frame line 533 is a candidate, the transformation index emt_idx is any one of "0" to "3", so 2 bits are required. When the range surrounded by frame line 534 is a candidate, the transformation index emt_idx is any one of "0" to "7", so 3 bits are required.
[0506] In this way, the more the number of transformation pair candidates increases, the more the number of bits required for the transformation index emt_idx increases. That is, it is necessary to set the number of bits required for the transformation index emt_idx taking into consideration the maximum number of transformation pair candidates. However, in other words, the more the number of transformation pair candidates decreases, the more the number of bits required for the transformation index emt_idx decreases. That is, if the number of bits required for the transformation index emt_idx is set according to the maximum number of transformation pair candidates, when the number of transformation pair candidates is small, the bit length of the transformation index emt_idx becomes unnecessarily long (the amount of information increases unnecessarily).
[0507] Therefore, by making the multi-value data of the transformation index emt_idx variable length and making the bit length correspond to the encoding parameters, it is possible to suppress the increase in the amount of unnecessary information and suppress the decrease in encoding efficiency (improve encoding efficiency).
[0508] In that case, for example, the transform index setting unit 253 (Figure 10) sets the bit length of the transform index emt_idx according to the encoding parameters, and the transform index decoding unit 452 (Figure 24) parses and extracts the transform index emt_idx of the encoded data with a bit length according to the encoding parameters.
[0509] <3. First embodiment> <Method #1> Next, examples of the coding parameters used for such control will be described. Here, method #1 of table 151 in Fig. 8 will be described. In the case of method #1, the coding parameters include, for example, a value of a syntax element (e.g., component ID) related to the type of component, and the number of candidates for the type of orthogonal transform (inverse orthogonal transform) is controlled depending on whether the target of the orthogonal transform (inverse orthogonal transform) is a luminance signal or a chrominance signal.
[0510] For example, control may be performed as shown in Table 601 in Fig. 38. For example, when the transformation flag emt_flag==0, the number of selectable transformation pairs NumTrPair is set to "1." Also, when the transformation flag emt_flag==1 and the number of non-zero coefficients numSIG is equal to or less than a predetermined threshold value TH1 (numSIG <= TH1), the number of selectable transformation pairs NumTrPair is set to "2."
[0511] Also, if the transformation flag emt_flag==1, the number of non-zero coefficients numSIG is greater than a predetermined threshold TH1 (numSIG>TH1), and the signal is a luminance signal (componentID==0), the number of selectable transformation pairs NumTrPair is set to "N1". Also, if the transformation flag emt_flag==1, the number of non-zero coefficients numSIG is greater than a predetermined threshold TH1 (numSIG>TH1), and the signal is a chrominance signal (componentID>0), the number of selectable transformation pairs NumTrPair is set to "N2" (N1>=N2).
[0512] For example, TH1=2, N1=9, and N2=3 may be used. In this way, the range of possible values of the transform index emt_idx is "0" to "7" for the luminance signal, and "0" and "1" for the chrominance signal. In other words, for the chrominance signal, the number of candidates for the type of orthogonal transform (inverse orthogonal transform) can be set to be smaller than that for the luminance signal. Therefore, the amount of code can be reduced more efficiently, and the reduction in the coding efficiency can be suppressed (the coding efficiency can be improved).
[0513] <Flow of conversion pair number setting process> An example of the flow of the conversion pair number setting process executed in step S231 of FIG. 17 in this case will be described with reference to the flowchart of FIG.
[0514] When the conversion pair number setting process is started, in step S601, the conversion pair number setting unit 241 determines whether or not to set the value of the conversion flag emt_flag to “1.” If it is determined that the value of the conversion flag emt_flag is to be set to “0,” the process proceeds to step S602.
[0515] In step S602, the conversion pair number setting unit 241 sets the number of conversion pair candidates NumTrPair to “1” (NumTrPair=1). When the process of step S602 ends, the conversion pair number setting process ends, and the process returns to FIG.
[0516] Also, if it is determined in step S601 that the value of the transformation flag emt_flag is to be set to "1", the process proceeds to step S603.
[0517] In step S603, the transform pair number setting unit 241 counts the non-zero coefficients in the block to be processed, and derives the number of non-zero coefficients numSIG.
[0518] In step S604, the conversion pair number setting unit 241 determines whether the number of non-zero coefficients numSIG is greater than a predetermined threshold TH1. If it is determined that the number of non-zero coefficients numSIG is equal to or smaller than the predetermined threshold TH1 (numSIG <= TH1), the process proceeds to step S605.
[0519] In step S605, the conversion pair number setting unit 241 sets the number of conversion pair candidates NumTrPair to “2” (NumTrPair=2). When the process of step S605 ends, the conversion pair number setting process ends, and the process returns to FIG.
[0520] Also, if it is determined in step S604 that the number numSIG of non-zero coefficients is greater than the predetermined threshold value TH1 (numSIG>TH1), the process proceeds to step S606.
[0521] In step S606, the conversion pair number setting unit 241 refers to the componentID and determines whether the processing target is a luminance signal. If it is determined that the processing target is a luminance signal (Luma) (componentID==0), the process proceeds to step S607.
[0522] In step S607, the conversion pair number setting unit 241 sets the number of conversion pair candidates NumTrPair to a predetermined value "N1" (NumTrPair = N1). When the process of step S607 ends, the conversion pair number setting process ends, and the process returns to FIG.
[0523] Also, if it is determined in step S606 that the processing target is a color difference signal (Chroma) (componentID>0), the process proceeds to step S608.
[0524] In step S608, the conversion pair number setting unit 241 sets the number of conversion pair candidates NumTrPair to a predetermined value "N2" (N1>N2) (NumTrPair=N2). When the process of step S608 ends, the conversion pair number setting process ends, and the process returns to FIG.
[0525] By performing the processing as described above, the number of candidates for conversion pairs can be controlled depending on whether the processing target is a luminance signal or a color difference signal, the amount of code can be reduced more efficiently, and a reduction in coding efficiency can be suppressed (coding efficiency can be improved).
[0526] In addition, in the case of decoding (control of inverse orthogonal transform), the number of transform pairs may be set in a similar manner. That is, the number of transform pairs may be set in a similar manner in step S423 of Fig. 31. In this case, the number of transform pairs setting unit 431 executes the process instead of the number of transform pairs setting unit 241, so that the above description can be applied.
[0527] <4. Second embodiment> <Method #2> Next, a description will be given of Method #2 of Table 151 in Fig. 8. In the case of Method #2, the coding parameters include, for example, the value of a syntax element related to the mode of prediction.
[0528] <4-1. Method #2-1> In the case of method #2-1 in Table 151 of Figure 8, the number of candidates for the type of orthogonal transform (inverse orthogonal transform) is controlled depending on whether the prediction mode of the block to be processed for orthogonal transform (inverse orthogonal transform) is intra prediction (e.g., intra CU) or inter prediction (e.g., inter CU).
[0529] For example, control may be performed as shown in Table 611 in A of Fig. 40. For example, when the transformation flag emt_flag==0, the number of selectable transformation pairs NumTrPair is set to "1." Also, when the transformation flag emt_flag==1 and the number of non-zero coefficients numSIG is equal to or less than a predetermined threshold value TH1 (numSIG <= TH1), the number of selectable transformation pairs NumTrPair is set to "2."
[0530] Also, when the transform flag emt_flag==1, the number of non-zero coefficients numSIG is greater than a predetermined threshold TH1 (numSIG>TH1), and the prediction mode is intra prediction (Intra), the number of selectable transform pairs NumTrPair is set to "N1". Also, when the transform flag emt_flag==1, the number of non-zero coefficients numSIG is greater than a predetermined threshold TH1 (numSIG>TH1), and the prediction mode is inter prediction (Inter), the number of selectable transform pairs NumTrPair is set to "N2" (N1>=N2).
[0531] For example, TH1=2, N1=9, and N2=5 may be used. In this way, the range of values that the transform index emt_idx can take is "0" to "7" in the case of intra prediction, and "0" and "1" in the case of inter prediction. That is, in the case of inter prediction, the number of candidates for the type of orthogonal transform (inverse orthogonal transform) can be set to be smaller than that in the case of intra prediction. Therefore, the amount of code can be reduced more efficiently, and the reduction in the coding efficiency can be suppressed (the coding efficiency can be improved).
[0532] <Flow of conversion pair number setting process> An example of the flow of the conversion pair number setting process executed in step S231 of FIG. 17 in this case will be described with reference to the flowchart of FIG.
[0533] When the conversion pair number setting process is started, in step S621, the conversion pair number setting unit 241 determines whether or not to set the value of the conversion flag emt_flag to “1.” If it is determined that the value of the conversion flag emt_flag is to be set to “0,” the process proceeds to step S622.
[0534] In step S622, the conversion pair number setting unit 241 sets the number of conversion pair candidates NumTrPair to “1” (NumTrPair=1). When the process of step S622 ends, the conversion pair number setting process ends, and the process returns to FIG.
[0535] Also, if it is determined in step S621 that the value of the conversion flag emt_flag is to be set to "1", the process proceeds to step S623.
[0536] In step S623, the transform pair number setting unit 241 counts the non-zero coefficients in the block to be processed, and derives the number of non-zero coefficients numSIG.
[0537] In step S624, the conversion pair number setting unit 241 determines whether the number of non-zero coefficients numSIG is greater than a predetermined threshold TH1. If it is determined that the number of non-zero coefficients numSIG is equal to or smaller than the predetermined threshold TH1 (numSIG <= TH1), the process proceeds to step S625.
[0538] In step S625, the conversion pair number setting unit 241 sets the number of conversion pair candidates NumTrPair to “2” (NumTrPair=2). When the process of step S625 ends, the conversion pair number setting process ends, and the process returns to FIG.
[0539] Also, if it is determined in step S624 that the number of non-zero coefficients numSIG is greater than the predetermined threshold value TH1 (numSIG>TH1), the process proceeds to step S626.
[0540] In step S626, the conversion pair number setting unit 241 determines whether or not the prediction mode to be processed is intra prediction (Intra). If it is determined that the prediction mode to be processed is intra prediction (Intra), the process proceeds to step S627.
[0541] In step S627, the conversion pair number setting unit 241 sets the number of conversion pair candidates NumTrPair to a predetermined value "N1" (NumTrPair = N1). When the process of step S627 ends, the conversion pair number setting process ends, and the process returns to FIG.
[0542] Also, if it is determined in step S626 that the prediction mode to be processed is inter-prediction (Inter), the process proceeds to step S628.
[0543] In step S628, the conversion pair number setting unit 241 sets the number of conversion pair candidates NumTrPair to a predetermined value "N2" (N1>=N2) (NumTrPair=N2). When the process of step S628 ends, the conversion pair number setting process ends, and the process returns to FIG. 17.
[0544] By performing the processing as described above, the number of candidate transform pairs can be controlled depending on whether the prediction mode to be processed is intra-prediction or inter-prediction, thereby making it possible to reduce the amount of coding more efficiently and suppress a decrease in coding efficiency (improve coding efficiency).
[0545] In addition, in the case of decoding (control of inverse orthogonal transform), the number of transform pairs may be set in a similar manner. That is, the number of transform pairs may be set in a similar manner in step S423 of Fig. 31. In this case, the number of transform pairs setting unit 431 executes the process instead of the number of transform pairs setting unit 241, so that the above description can be applied.
[0546] <Modification> As shown in table 612 in B of Fig. 40, whether the prediction mode to be processed is intra prediction or inter prediction may be selected before the number of non-zero coefficients is determined. In other words, the order of these determinations is arbitrary.
[0547] <4-2. Method #2-2> In addition, in the case of method #2-2 of Table 151 in Figure 8, when the prediction mode to be processed by orthogonal transform (inverse orthogonal transform) is inter prediction (e.g., inter CU), the number of candidates for the type of orthogonal transform (inverse orthogonal transform) is controlled depending on whether the prediction direction is forward prediction or bi-prediction.
[0548] For example, control may be performed as shown in Table 621 in Fig. 42. For example, when the transformation flag emt_flag==0, the number of selectable transformation pairs NumTrPair is set to "1." Also, when the transformation flag emt_flag==1 and the number of non-zero coefficients numSIG is equal to or less than a predetermined threshold value TH1 (numSIG <= TH1), the number of selectable transformation pairs NumTrPair is set to "2."
[0549] Also, when the transform flag emt_flag==1, the number of non-zero coefficients numSIG is greater than a predetermined threshold TH1 (numSIG>TH1), and the prediction mode is intra prediction (Intra), the number of selectable transform pairs NumTrPair is set to "N1". Also, when the transform flag emt_flag==1, the number of non-zero coefficients numSIG is greater than a predetermined threshold TH1 (numSIG>TH1), the prediction mode is inter prediction (Inter), and forward prediction, the number of selectable transform pairs NumTrPair is set to "N2" (N1>=N2). Furthermore, when the transform flag emt_flag==1, the number of non-zero coefficients numSIG is greater than a predetermined threshold TH1 (numSIG>TH1), the prediction mode is inter prediction (Inter), and bi-prediction, the number of selectable transform pairs NumTrPair is set to "N3" (N2>=N3).
[0550] For example, TH1=2, N1=16, N2=9, and N3=3 may be used. In this way, the range of values that the transform index emt_idx can take is "0" to "14" in the case of intra prediction, "0" to "7" in the case of forward prediction of inter prediction, and "0" and "1" in the case of bi-prediction of inter prediction. That is, in the case of bi-prediction, the number of candidates for the type of orthogonal transform (inverse orthogonal transform) can be set to be smaller than that in the case of forward prediction. Therefore, the amount of code can be reduced more efficiently, and the reduction in the coding efficiency can be suppressed (the coding efficiency can be improved).
[0551] <Flow of conversion pair number setting process> An example of the flow of the conversion pair number setting process executed in step S231 of FIG. 17 in this case will be described with reference to the flowchart of FIG.
[0552] When the conversion pair number setting process is started, in step S641, the conversion pair number setting unit 241 determines whether or not to set the value of the conversion flag emt_flag to “1.” If it is determined that the value of the conversion flag emt_flag is to be set to “0,” the process proceeds to step S642.
[0553] In step S642, the conversion pair number setting unit 241 sets the number of conversion pair candidates NumTrPair to “1” (NumTrPair=1). When the process of step S642 ends, the conversion pair number setting process ends, and the process returns to FIG.
[0554] Also, if it is determined in step S641 that the value of the conversion flag emt_flag is to be set to "1", the process proceeds to step S643.
[0555] In step S643, the transform pair number setting unit 241 counts the non-zero coefficients in the block to be processed, and derives the number of non-zero coefficients numSIG.
[0556] In step S644, the conversion pair number setting unit 241 determines whether the number of non-zero coefficients numSIG is greater than a predetermined threshold TH1. If it is determined that the number of non-zero coefficients numSIG is equal to or smaller than the predetermined threshold TH1 (numSIG <= TH1), the process proceeds to step S645.
[0557] In step S645, the conversion pair number setting unit 241 sets the number of conversion pair candidates NumTrPair to “2” (NumTrPair=2). When the process of step S645 ends, the conversion pair number setting process ends, and the process returns to FIG.
[0558] Also, if it is determined in step S644 that the number of non-zero coefficients numSIG is greater than the predetermined threshold value TH1 (numSIG>TH1), the process proceeds to step S646.
[0559] In step S646, the conversion pair number setting unit 241 determines whether or not the prediction mode to be processed is intra prediction. If it is determined that the prediction mode to be processed is intra prediction, the process proceeds to step S647.
[0560] In step S647, the conversion pair number setting unit 241 sets the number of conversion pair candidates NumTrPair to a predetermined value "N1" (NumTrPair = N1). When the process of step S647 ends, the conversion pair number setting process ends, and the process returns to FIG.
[0561] Also, if it is determined in step S646 that the prediction mode to be processed is inter-prediction (Inter), the process proceeds to step S648.
[0562] In step S648, the conversion pair number setting unit 241 determines whether or not the prediction direction is bi-prediction. If it is determined that the prediction direction is forward prediction, the process proceeds to step S649.
[0563] In step S649, the conversion pair number setting unit 241 sets the number of conversion pair candidates NumTrPair to a predetermined value "N2" (N1>=N2) (NumTrPair=N2). When the process of step S649 ends, the conversion pair number setting process ends, and the process returns to FIG. 17.
[0564] Also, if it is determined in step S648 that the prediction is bi-predictive, the process proceeds to step S650.
[0565] In step S650, the conversion pair number setting unit 241 sets the number of conversion pair candidates NumTrPair to a predetermined value "N3" (N2>=N3) (NumTrPair=N3). When the process of step S650 ends, the conversion pair number setting process ends, and the process returns to FIG.
[0566] By performing the processing as described above, the number of candidates for the transform pair can be controlled depending on whether bi-prediction or forward prediction is used, the amount of coding can be reduced more efficiently, and a reduction in coding efficiency can be suppressed (coding efficiency can be improved).
[0567] In addition, in the case of decoding (control of inverse orthogonal transform), the number of transform pairs may be set in a similar manner. That is, the number of transform pairs may be set in a similar manner in step S423 of Fig. 31. In this case, the number of transform pairs setting unit 431 executes the process instead of the number of transform pairs setting unit 241, so that the above description can be applied.
[0568] <4-3. Method #2-3> In addition, in the case of method #2-3 in table 151 of FIG.8, the same control as in method #2-1 is performed. That is, the number of candidates of the type of orthogonal transform (inverse orthogonal transform) is controlled depending on whether the prediction mode of the block to be processed by orthogonal transform (inverse orthogonal transform) is a predetermined mode. For example, when the prediction mode of the block to be processed by orthogonal transform (inverse orthogonal transform) is a predetermined mode, the number of candidates of the type of orthogonal transform (inverse orthogonal transform) is set to be smaller than that of other modes.
[0569] More specifically, when the prediction mode of the block to be processed by orthogonal transform (inverse orthogonal transform) is LMChroma, which linearly predicts the color difference signal from the reconstructed luminance signal, the number of candidates for the type of orthogonal transform (inverse orthogonal transform) is set to be smaller than in the case of other modes.
[0570] The state of control in this case and the flow of the conversion pair number setting process are similar to those in method #2-1, so a description thereof will be omitted.
[0571] <5. Third embodiment> <Method #3> Next, a description will be given of method #3 in table 151 in Fig. 8. In the case of method #3, the coding parameters include, for example, a value of a syntax element related to the size of a block to be processed by orthogonal transform (inverse orthogonal transform), and the number of candidates for the type of orthogonal transform (inverse orthogonal transform) is controlled according to the size of the block to be processed by orthogonal transform (inverse orthogonal transform).
[0572] For example, control may be performed as shown in Table 631 in Fig. 44. For example, when the transformation flag emt_flag==0, the number of selectable transformation pairs NumTrPair is set to "1." Also, when the transformation flag emt_flag==1 and the number of non-zero coefficients numSIG is equal to or less than a predetermined threshold value TH1 (numSIG <= TH1), the number of selectable transformation pairs NumTrPair is set to "2."
[0573] Also, if the transformation flag emt_flag==1, the number of non-zero coefficients numSIG is greater than a predetermined threshold TH1 (numSIG > TH1), and the block size (size) is equal to or less than a predetermined threshold TH2 (size <= TH2), the number of selectable transformation pairs NumTrPair is set to "N3". Also, if the transformation flag emt_flag==1, the number of non-zero coefficients numSIG is greater than a predetermined threshold TH1 (numSIG > TH1), and the block size (size) is greater than a predetermined threshold TH2 and equal to or less than a predetermined threshold TH3 (TH2 < size <= TH3), the number of selectable transformation pairs NumTrPair is set to "N2" (N2 >= N3). Furthermore, if the transformation flag emt_flag==1, the number of non-zero coefficients numSIG is greater than a predetermined threshold TH1 (numSIG > TH1), and the block size (size) is greater than a predetermined threshold TH3 (size > TH3), the number of selectable transformation pairs NumTrPair is set to “N1” (N1 >= N2).
[0574] For example, TH1=2, TH2=32, TH3=256, N1=16, N2=9, N3=3 may be used. In this way, the range of values that the transform index emt_idx can take is "0" and "1" when the block size is small (<= TH2), "0" to "7" when the block size is medium (>TH2 && <= TH3), and "0" to "14" when the block size is large (>TH3). In other words, the smaller the block size, the fewer the number of candidates for the type of orthogonal transform (inverse orthogonal transform) can be set. Therefore, the amount of code can be reduced more efficiently, and the reduction in the coding efficiency can be suppressed (the coding efficiency can be improved).
[0575] <Flow of conversion pair number setting process> An example of the flow of the conversion pair number setting process executed in step S231 of FIG. 17 in this case will be described with reference to the flowchart of FIG.
[0576] When the conversion pair number setting process is started, in step S661, the conversion pair number setting unit 241 determines whether or not to set the value of the conversion flag emt_flag to “1.” If it is determined that the value of the conversion flag emt_flag is to be set to “0,” the process proceeds to step S662.
[0577] In step S662, the conversion pair number setting unit 241 sets the number of conversion pair candidates NumTrPair to “1” (NumTrPair=1). When the process of step S662 ends, the conversion pair number setting process ends, and the process returns to FIG.
[0578] Also, if it is determined in step S661 that the value of the conversion flag emt_flag is to be set to "1", the process proceeds to step S663.
[0579] In step S663, the transform pair number setting unit 241 counts the non-zero coefficients in the block to be processed, and derives the number of non-zero coefficients numSIG.
[0580] In step S664, the conversion pair number setting unit 241 determines whether the number of non-zero coefficients numSIG is greater than a predetermined threshold TH1. If it is determined that the number of non-zero coefficients numSIG is equal to or less than the predetermined threshold TH1 (numSIG <= TH1), the process proceeds to step S665.
[0581] In step S665, the conversion pair number setting unit 241 sets the number of conversion pair candidates NumTrPair to “2” (NumTrPair=2). When the process of step S665 ends, the conversion pair number setting process ends, and the process returns to FIG.
[0582] Also, if it is determined in step S664 that the number of non-zero coefficients numSIG is greater than the predetermined threshold value TH1 (numSIG>TH1), the process proceeds to step S666.
[0583] In step S666, the conversion pair number setting unit 241 determines whether the size (W*H) of the processing target block is greater than a predetermined threshold TH2. If it is determined that the size (W*H) of the processing target block is equal to or smaller than the predetermined threshold TH2 (W*H<=TH2), the process proceeds to step S667.
[0584] In step S667, the conversion pair number setting unit 241 sets the number of conversion pair candidates NumTrPair to a predetermined value "N3" (NumTrPair = N3). When the process of step S667 ends, the conversion pair number setting process ends, and the process returns to FIG.
[0585] Also, if it is determined in step S666 that the size of the block to be processed is larger than the predetermined threshold value TH2 (W*H>TH2), the process proceeds to step S668.
[0586] In step S668, the conversion pair number setting unit 241 determines whether the size (W*H) of the processing target block is greater than a predetermined threshold TH3 (TH3>TH2). If it is determined that the size (W*H) of the processing target block is equal to or smaller than the predetermined threshold TH3 (TH2<W*H<=TH3), the process proceeds to step S669.
[0587] In step S669, the conversion pair number setting unit 241 sets the number of conversion pair candidates NumTrPair to a predetermined value "N2" (N2>=N3) (NumTrPair=N2). When the process of step S669 ends, the conversion pair number setting process ends, and the process returns to FIG. 17.
[0588] Also, if it is determined in step S668 that the size of the block to be processed is larger than the predetermined threshold value TH3 (W*H>TH3), the process proceeds to step S670.
[0589] In step S670, the conversion pair number setting unit 241 sets the number of conversion pair candidates NumTrPair to a predetermined value "N1" (N1 >= N2) (NumTrPair = N1). When the process of step S670 ends, the conversion pair number setting process ends, and the process returns to FIG. 17.
[0590] By performing the processing as described above, the number of candidate transform pairs can be controlled according to the size of the block to be processed, the amount of coding can be reduced more efficiently, and a reduction in coding efficiency can be suppressed (coding efficiency can be improved).
[0591] In addition, in the case of decoding (control of inverse orthogonal transform), the number of transform pairs may be set in a similar manner. That is, the number of transform pairs may be set in a similar manner in step S423 of Fig. 31. In this case, the number of transform pairs setting unit 431 executes the process instead of the number of transform pairs setting unit 241, so that the above description can be applied.
[0592] <6. Fourth embodiment> <Method #4> Next, a description will be given of Method #4 of Table 151 in Fig. 8. In the case of Method #4, the coding parameters include, for example, values of syntax elements related to quantization parameters.
[0593] <6-1. Method #4-1> In the case of method #4-1 in Table 151 in FIG. 8, the number of candidates for the type of orthogonal transform (inverse orthogonal transform) is controlled according to the value of the quantization parameter QP of the block to be processed in orthogonal transform (inverse orthogonal transform).
[0594] For example, control may be performed as shown in Table 641 in Fig. 46. For example, when the transformation flag emt_flag==0, the number of selectable transformation pairs NumTrPair is set to "1." Also, when the transformation flag emt_flag==1 and the number of non-zero coefficients numSIG is equal to or less than a predetermined threshold value TH1 (numSIG <= TH1), the number of selectable transformation pairs NumTrPair is set to "2."
[0595] Also, if the transform flag emt_flag==1, the number of non-zero coefficients numSIG is greater than a predetermined threshold TH1 (numSIG > TH1), and the quantization parameter QP is equal to or less than a predetermined threshold TH2 (QP <= TH2), the number of selectable transform pairs NumTrPair is set to "N1". Also, if the transform flag emt_flag==1, the number of non-zero coefficients numSIG is greater than a predetermined threshold TH1 (numSIG > TH1), and the quantization parameter QP is greater than a predetermined threshold TH2 and equal to or less than a predetermined threshold TH3 (TH2 < QP <= TH3), the number of selectable transform pairs NumTrPair is set to "N2" (N1 >= N2). Furthermore, if the transformation flag emt_flag==1, the number of non-zero coefficients numSIG is greater than a predetermined threshold TH1 (numSIG > TH1), and the quantization parameter QP is greater than a predetermined threshold TH3 (TH3 < QP), the number of selectable transformation pairs NumTrPair is set to “N3” (N2 >= N3).
[0596] For example, TH1=2, TH2=22, TH3=37, N1=9, N2=5, and N3=3 may be used. In this way, the range of values that the transform index emt_idx can take is "0" to "7" when the quantization parameter QP is small (QP <= TH2), "0" to "3" when the quantization parameter QP is medium (TH2 < QP <= TH3), and "0" and "1" when the quantization parameter QP is large (QP > TH3). In other words, the larger the quantization parameter QP is, the fewer the number of candidates for the type of orthogonal transform (inverse orthogonal transform) can be set. Therefore, the amount of code can be reduced more efficiently, and the reduction in the coding efficiency can be suppressed (the coding efficiency can be improved).
[0597] <Flow of conversion pair number setting process> An example of the flow of the conversion pair number setting process executed in step S231 of FIG. 17 in this case will be described with reference to the flowchart of FIG.
[0598] When the conversion pair number setting process is started, in step S681, the conversion pair number setting unit 241 determines whether or not to set the value of the conversion flag emt_flag to “1.” If it is determined that the value of the conversion flag emt_flag is to be set to “0,” the process proceeds to step S682.
[0599] In step S682, the conversion pair number setting unit 241 sets the number of conversion pair candidates NumTrPair to “1” (NumTrPair=1). When the process of step S682 ends, the conversion pair number setting process ends, and the process returns to FIG.
[0600] Also, if it is determined in step S681 that the value of the conversion flag emt_flag is to be set to "1", the process proceeds to step S683.
[0601] In step S683, the transform pair number setting unit 241 counts the non-zero coefficients in the block to be processed, and derives the number of non-zero coefficients numSIG.
[0602] In step S684, the conversion pair number setting unit 241 determines whether the number of non-zero coefficients numSIG is greater than a predetermined threshold TH1. If it is determined that the number of non-zero coefficients numSIG is equal to or smaller than the predetermined threshold TH1 (numSIG <= TH1), the process proceeds to step S685.
[0603] In step S685, the conversion pair number setting unit 241 sets the number of conversion pair candidates NumTrPair to “2” (NumTrPair=2). When the process of step S685 ends, the conversion pair number setting process ends, and the process returns to FIG.
[0604] Also, if it is determined in step S684 that the number of non-zero coefficients numSIG is greater than the predetermined threshold value TH1 (numSIG>TH1), the process proceeds to step S686.
[0605] In step S686, the conversion pair number setting unit 241 determines whether the quantization parameter QP is greater than a predetermined threshold TH2. If it is determined that the quantization parameter QP is equal to or less than the predetermined threshold TH2 (QP <= TH2), the process proceeds to step S687.
[0606] In step S687, the conversion pair number setting unit 241 sets the number of conversion pair candidates NumTrPair to a predetermined value "N1" (NumTrPair = N1). When the process of step S687 ends, the conversion pair number setting process ends, and the process returns to FIG.
[0607] Also, if it is determined in step S686 that the quantization parameter QP is greater than the predetermined threshold value TH2 (QP>TH2), the process proceeds to step S688.
[0608] In step S688, the conversion pair number setting unit 241 determines whether the quantization parameter QP is greater than a predetermined threshold TH3 (TH3>TH2). If it is determined that the quantization parameter QP is equal to or less than the predetermined threshold TH3 (TH2<QP<=TH3), the process proceeds to step S689.
[0609] In step S689, the conversion pair number setting unit 241 sets the number of conversion pair candidates NumTrPair to a predetermined value "N2" (NumTrPair = N2). When the process of step S689 ends, the conversion pair number setting process ends, and the process returns to FIG.
[0610] Also, if it is determined in step S688 that the quantization parameter QP is greater than the predetermined threshold value TH3 (QP>TH3), the process proceeds to step S690.
[0611] In step S690, the conversion pair number setting unit 241 sets the number of conversion pair candidates NumTrPair to a predetermined value "N3" (N2>=N3) (NumTrPair=N3). When the process of step S690 ends, the conversion pair number setting process ends, and the process returns to FIG.
[0612] By performing the above-described processing, the number of candidates for the transform pair can be controlled according to the magnitude of the value of the quantization parameter QP, the amount of code can be reduced more efficiently, and the reduction in the coding efficiency can be suppressed (the coding efficiency can be improved).
[0613] In addition, in the case of decoding (control of inverse orthogonal transform), the number of transform pairs may be set in a similar manner. That is, the number of transform pairs may be set in a similar manner in step S423 of Fig. 31. In this case, the number of transform pairs setting unit 431 executes the process instead of the number of transform pairs setting unit 241, so that the above description can be applied.
[0614] <6-2. Method #4-2> In addition, in the case of method #4-2 in Table 151 of Figure 8, instead of the quantization parameter QP, the number of candidates for the type of orthogonal transform (inverse orthogonal transform) is controlled according to the value of the temporal ID (temporal ID) indicating the layer in the time-direction hierarchical coding of the block to be processed by the orthogonal transform (inverse orthogonal transform).
[0615] For example, control may be performed as shown in Table 651 in Fig. 48. For example, when the transformation flag emt_flag==0, the number of selectable transformation pairs NumTrPair is set to "1." Also, when the transformation flag emt_flag==1 and the number of non-zero coefficients numSIG is equal to or less than a predetermined threshold value TH1 (numSIG <= TH1), the number of selectable transformation pairs NumTrPair is set to "2."
[0616] Also, if the transformation flag emt_flag==1, the number of non-zero coefficients numSIG is greater than a predetermined threshold TH1 (numSIG > TH1), and the temporal ID (temporalID) is equal to or less than a predetermined threshold TH2 (temporalID <= TH2), the number of selectable transformation pairs NumTrPair is set to "N1". Also, if the transformation flag emt_flag==1, the number of non-zero coefficients numSIG is greater than a predetermined threshold TH1 (numSIG > TH1), and the temporal ID (temporalID) is greater than a predetermined threshold TH2 and equal to or less than a predetermined threshold TH3 (TH2 < temporalID <= TH3), the number of selectable transformation pairs NumTrPair is set to "N2" (N1 >= N2). Furthermore, if the transformation flag emt_flag==1, the number of non-zero coefficients numSIG is greater than a predetermined threshold TH1 (numSIG > TH1), and the temporal ID (temporalID) is greater than a predetermined threshold TH3 (TH3 < temporalID), the number of selectable transformation pairs NumTrPair is set to “N3” (N2 >= N3).
[0617] For example, TH1=2, TH2=1, TH3=2, N1=9, N2=5, and N3=3 may be used. In this way, the range of values that the transform index emt_idx can take is "0" to "7" when the temporal ID (temporalID) is small (temporalID <= TH2), "0" to "3" when the temporal ID (temporalID) is medium (TH2 < temporalID <= TH3), and "0" and "1" when the temporal ID (temporalID) is large (temporalID > TH3). In other words, the larger the temporal ID (temporalID), the fewer the number of candidates for the type of orthogonal transform (inverse orthogonal transform) can be set. Therefore, the amount of code can be reduced more efficiently, and the reduction in the coding efficiency can be suppressed (the coding efficiency can be improved).
[0618] <Flow of conversion pair number setting process> An example of the flow of the conversion pair number setting process executed in step S231 of FIG. 17 in this case will be described with reference to the flowchart of FIG.
[0619] When the conversion pair number setting process is started, in step S701, the conversion pair number setting unit 241 determines whether or not to set the value of the conversion flag emt_flag to “1.” If it is determined that the value of the conversion flag emt_flag is to be set to “0,” the process proceeds to step S702.
[0620] In step S702, the conversion pair number setting unit 241 sets the number of conversion pair candidates NumTrPair to “1” (NumTrPair=1). When the process of step S682 ends, the conversion pair number setting process ends, and the process returns to FIG.
[0621] Also, if it is determined in step S701 that the value of the conversion flag emt_flag is to be set to "1", the process proceeds to step S703.
[0622] In step S703, the transform pair number setting unit 241 counts the non-zero coefficients in the block to be processed, and derives the number of non-zero coefficients numSIG.
[0623] In step S704, the conversion pair number setting unit 241 determines whether the number of non-zero coefficients numSIG is greater than a predetermined threshold TH1. If it is determined that the number of non-zero coefficients numSIG is equal to or smaller than the predetermined threshold TH1 (numSIG <= TH1), the process proceeds to step S705.
[0624] In step S705, the conversion pair number setting unit 241 sets the number of conversion pair candidates NumTrPair to “2” (NumTrPair=2). When the process of step S705 ends, the conversion pair number setting process ends, and the process returns to FIG.
[0625] Also, if it is determined in step S704 that the number numSIG of non-zero coefficients is greater than the predetermined threshold value TH1 (numSIG>TH1), the process proceeds to step S706.
[0626] In step S706, the conversion pair number setting unit 241 determines whether the temporal ID (temporalID) is greater than a predetermined threshold TH2. If it is determined that the temporal ID (temporalID) is equal to or less than the predetermined threshold TH2 (temporalID <= TH2), the process proceeds to step S707.
[0627] In step S707, the conversion pair number setting unit 241 sets the number of conversion pair candidates NumTrPair to a predetermined value "N1" (NumTrPair = N1). When the process of step S707 ends, the conversion pair number setting process ends, and the process returns to FIG.
[0628] Also, if it is determined in step S706 that the temporal ID is greater than the predetermined threshold value TH2 (temporalID>TH2), the process proceeds to step S708.
[0629] In step S708, the conversion pair number setting unit 241 determines whether the temporal ID (temporalID) is greater than a predetermined threshold TH3 (TH3 > TH2). If it is determined that the temporal ID (temporalID) is equal to or less than the predetermined threshold TH3 (TH2 < temporalID <= TH3), the process proceeds to step S709.
[0630] In step S709, the conversion pair number setting unit 241 sets the number of conversion pair candidates NumTrPair to a predetermined value "N2" (NumTrPair = N2). When the process of step S709 ends, the conversion pair number setting process ends, and the process returns to FIG.
[0631] Also, if it is determined in step S708 that the temporal ID is greater than the predetermined threshold value TH3 (temporalID>TH3), the process proceeds to step S710.
[0632] In step S710, the conversion pair number setting unit 241 sets the number of conversion pair candidates NumTrPair to a predetermined value "N3" (N2>=N3) (NumTrPair=N3). When the process of step S710 ends, the conversion pair number setting process ends, and the process returns to FIG. 17.
[0633] By performing the processing as described above, the number of candidates for transform pairs can be controlled according to the magnitude of the value of the temporal ID, thereby making it possible to reduce the amount of code more efficiently and suppress a decrease in coding efficiency (improve coding efficiency).
[0634] In addition, in the case of decoding (control of inverse orthogonal transform), the number of transform pairs may be set in a similar manner. That is, the number of transform pairs may be set in a similar manner in step S423 of Fig. 31. In this case, the number of transform pairs setting unit 431 executes the process instead of the number of transform pairs setting unit 241, so that the above description can be applied.
[0635] <7. Fifth embodiment> <Method #5> Next, we will describe Method #5 of Table 151 in Figure 8. In the case of Method #5, the coding parameters include variables derived from values of syntax elements. For example, the coding parameters include variables derived from transform coefficients.
[0636] <7-1. Method #5-1> In the case of method #5-1 in Table 151 of FIG. 8, the number of candidates for the type of orthogonal transform (inverse orthogonal transform) is controlled according to the number of non-zero coefficients in the block to be processed by the orthogonal transform (inverse orthogonal transform).
[0637] For example, control may be performed as shown in Table 661 in Fig. 50. For example, when the transformation flag emt_flag==0, the number of selectable transformation pairs NumTrPair is set to "1." Also, when the transformation flag emt_flag==1 and the number of non-zero coefficients numSIG is equal to or less than a predetermined threshold value TH1 (numSIG <= TH1), the number of selectable transformation pairs NumTrPair is set to "2."
[0638] Also, when the transformation flag emt_flag==1 and the number of non-zero coefficients numSIG is greater than a predetermined threshold TH1 and is equal to or less than a predetermined threshold TH2 (TH1 < TH2) (TH1 < numSIG <= TH2), the number of selectable transformation pairs NumTrPair is set to "N2". Also, when the transformation flag emt_flag==1 and the number of non-zero coefficients numSIG is greater than the predetermined threshold TH2 (numSIG > TH2), the number of selectable transformation pairs NumTrPair is set to "N1" (N1 > N2).
[0639] For example, TH1=2, TH2=8, N1=9, and N2=5 may be used. In this way, the range of values that the transform index emt_idx can take is "0" to "3" when the number of non-zero coefficients numSIG is medium (TH1 < numSIG <= TH2), and is "0" to "7" when the number of non-zero coefficients numSIG is large (numSIG > TH2). In other words, the smaller the number of non-zero coefficients numSIG is, the fewer the number of candidates for the type of orthogonal transform (inverse orthogonal transform) can be set. Therefore, the amount of code can be reduced more efficiently, and the reduction in coding efficiency can be suppressed (coding efficiency can be improved).
[0640] <Flow of conversion pair number setting process> An example of the flow of the conversion pair number setting process executed in step S231 of FIG. 17 in this case will be described with reference to the flowchart of FIG.
[0641] When the conversion pair number setting process is started, in step S721, the conversion pair number setting unit 241 determines whether or not to set the value of the conversion flag emt_flag to “1.” If it is determined that the value of the conversion flag emt_flag is to be set to “0,” the process proceeds to step S722.
[0642] In step S722, the conversion pair number setting unit 241 sets the number of conversion pair candidates NumTrPair to “1” (NumTrPair=1). When the process of step S722 ends, the conversion pair number setting process ends, and the process returns to FIG.
[0643] Also, if it is determined in step S721 that the value of the conversion flag emt_flag is to be set to "1", the process proceeds to step S723.
[0644] In step S723, the transform pair number setting unit 241 counts the non-zero coefficients in the block to be processed, and derives the number of non-zero coefficients numSIG.
[0645] In step S724, the conversion pair number setting unit 241 determines whether the number of non-zero coefficients numSIG is greater than a predetermined threshold TH1. If it is determined that the number of non-zero coefficients numSIG is equal to or smaller than the predetermined threshold TH1 (numSIG <= TH1), the process proceeds to step S725.
[0646] In step S725, the conversion pair number setting unit 241 sets the number of conversion pair candidates NumTrPair to “2” (NumTrPair=2). When the process of step S725 ends, the conversion pair number setting process ends, and the process returns to FIG.
[0647] Also, if it is determined in step S724 that the number of non-zero coefficients numSIG is greater than the predetermined threshold value TH1 (numSIG>TH1), the process proceeds to step S726.
[0648] In step S726, the conversion pair number setting unit 241 determines whether the number of non-zero coefficients numSIG is greater than a predetermined threshold TH2 (TH2 > TH1). If it is determined that the number of non-zero coefficients numSIG is equal to or smaller than the predetermined threshold TH2 (TH1 < numSIG <= TH2), the process proceeds to step S727.
[0649] In step S727, the conversion pair number setting unit 241 sets the number of conversion pair candidates NumTrPair to "N2" (NumTrPair = N2). When the process of step S727 ends, the conversion pair number setting process ends, and the process returns to FIG.
[0650] Also, if it is determined in step S726 that the number of non-zero coefficients numSIG is greater than the predetermined threshold value TH2 (numSIG>TH2), the process proceeds to step S728.
[0651] In step S728, the conversion pair number setting unit 241 sets the number of conversion pair candidates NumTrPair to "N1" (N1>N2) (NumTrPair=N1). When the process of step S728 ends, the conversion pair number setting process ends, and the process returns to FIG.
[0652] By performing the processing as described above, the number of candidates for transform pairs can be controlled according to the number of non-zero coefficients, numSIG, and the amount of code can be reduced more efficiently, thereby suppressing a decrease in coding efficiency (improving coding efficiency).
[0653] In addition, in the case of decoding (control of inverse orthogonal transform), the number of transform pairs may be set in a similar manner. That is, the number of transform pairs may be set in a similar manner in step S423 of Fig. 31. In this case, the number of transform pairs setting unit 431 executes the process instead of the number of transform pairs setting unit 241, so that the above description can be applied.
[0654] <7-2. Method #5-2> In the case of method #5-2 in Table 151 in Fig. 8, the number of candidates for the type of orthogonal transform (inverse orthogonal transform) is controlled according to the position lastPos of the last coefficient, which is the last non-zero coefficient in the scan order in the block to be processed by the orthogonal transform (inverse orthogonal transform). Note that this position lastPos of the last coefficient is the distance from the start position of the scan to the position of the last coefficient (the distance in the scan order) (lastPos = XYtoScanOrder[Y][X]).
[0655] For example, control may be performed as shown in Table 671 in Fig. 52. For example, when the transformation flag emt_flag==0, the number of selectable transformation pairs NumTrPair is set to "1." Also, when the transformation flag emt_flag==1 and the position lastPos of the last coefficient is equal to or less than a predetermined threshold value TH1 (lastPos <= TH1), the number of selectable transformation pairs NumTrPair is set to "2."
[0656] Moreover, when the transformation flag emt_flag==1 and the position lastPos of the last coefficient is greater than a predetermined threshold TH1 and is equal to or smaller than a predetermined threshold TH2 (TH1 < TH2) (TH1 < lastPos <= TH2), the number of selectable transformation pairs NumTrPair is set to "N2". Furthermore, when the transformation flag emt_flag==1 and the position lastPos of the last coefficient is greater than the predetermined threshold TH2 (lastPos > TH2), the number of selectable transformation pairs NumTrPair is set to "N1" (N1 > N2).
[0657] For example, TH1=2, TH2=8, N1=9, and N2=5 may be used. In this way, the range of values that the transform index emt_idx can take is "0" to "3" when the position lastPos of the last coefficient is medium (TH1 < lastPos <= TH2), and is "0" to "7" when the position lastPos of the last coefficient is large (lastPos > TH2). In other words, the closer the position lastPos of the last coefficient is, the fewer the number of candidates for the type of orthogonal transform (inverse orthogonal transform) can be set. Therefore, the amount of code can be reduced more efficiently, and the reduction in the coding efficiency can be suppressed (the coding efficiency can be improved).
[0658] <Flow of conversion pair number setting process> An example of the flow of the conversion pair number setting process executed in step S231 of FIG. 17 in this case will be described with reference to the flowchart of FIG.
[0659] When the conversion pair number setting process is started, in step S741, the conversion pair number setting unit 241 determines whether or not to set the value of the conversion flag emt_flag to “1.” If it is determined that the value of the conversion flag emt_flag is to be set to “0,” the process proceeds to step S742.
[0660] In step S742, the conversion pair number setting unit 241 sets the number of conversion pair candidates NumTrPair to “1” (NumTrPair=1). When the process of step S742 ends, the conversion pair number setting process ends, and the process returns to FIG.
[0661] Also, if it is determined in step S741 that the value of the conversion flag emt_flag is to be set to "1", the process proceeds to step S743.
[0662] In step S743, the transform pair number setting unit 241 derives the XY coordinates of the last coefficient of the block to be processed, and derives its position lastPos.
[0663] In step S744, the conversion pair number setting unit 241 determines whether the position lastPos of the last coefficient is greater than a predetermined threshold TH1. If it is determined that the position lastPos of the last coefficient is equal to or smaller than the predetermined threshold TH1 (lastPos<=TH1), the process proceeds to step S745.
[0664] In step S745, the conversion pair number setting unit 241 sets the number NumTrPair of conversion pair candidates to “2” (NumTrPair=2). When the process of step S745 ends, the conversion pair number setting process ends, and the process returns to FIG.
[0665] Also, if it is determined in step S744 that the position lastPos of the last coefficient is greater than the predetermined threshold value TH1 (lastPos>TH1), the process proceeds to step S746.
[0666] In step S746, the conversion pair number setting unit 241 determines whether the position lastPos of the last coefficient is greater than a predetermined threshold TH2 (TH2 > TH1). If it is determined that the position lastPos of the last coefficient is equal to or smaller than the predetermined threshold TH2 (TH1 < lastPos <= TH2), the process proceeds to step S747.
[0667] In step S747, the conversion pair number setting unit 241 sets the number of conversion pair candidates NumTrPair to "N2" (NumTrPair = N2). When the process of step S747 ends, the conversion pair number setting process ends, and the process returns to FIG.
[0668] Also, if it is determined in step S746 that the position lastPos of the last coefficient is greater than the predetermined threshold value TH2 (lastPos>TH2), the process proceeds to step S748.
[0669] In step S748, the conversion pair number setting unit 241 sets the number of conversion pair candidates NumTrPair to "N1" (N1>N2) (NumTrPair=N1). When the process of step S748 ends, the conversion pair number setting process ends, and the process returns to FIG.
[0670] By performing the processing as described above, the number of candidates for the transform pair can be controlled according to the position lastPos of the last coefficient, the amount of coding can be reduced more efficiently, and the reduction in coding efficiency can be suppressed (coding efficiency can be improved).
[0671] In addition, in the case of decoding (control of inverse orthogonal transform), the number of transform pairs may be set in a similar manner. That is, the number of transform pairs may be set in a similar manner in step S423 of Fig. 31. In this case, the number of transform pairs setting unit 431 executes the process instead of the number of transform pairs setting unit 241, so that the above description can be applied.
[0672] <Modification> The position lastPos of the last coefficient is not limited to the above example. For example, the sum of the X coordinate and the Y coordinate of the last coefficient may be set as the position of the last coefficient (Manhattan distance: lastPos=x+y).
[0673] Furthermore, the thresholds TH1 and TH2 may each be a value according to the size of the transform block, for example, as shown in the following equation (36).
[0674]
number
[0675] <7-3. Method #5-3> In the case of method #5-3 in Table 151 in Fig. 8, the number of candidates for the type of orthogonal transform (inverse orthogonal transform) is controlled according to the sumAbsLevel of the absolute values of the non-zero coefficients in the block to be processed by the orthogonal transform (inverse orthogonal transform). Note that this sumAbsLevel of the absolute values of the non-zero coefficients is a variable derived by, for example, the following formula (37).
[0676]
number
[0677] In equation (37), qcoef[pos] denotes the amplitude of the pos-th quantized coefficient in the scan order, and pos denotes the position of the coefficient in the scan order.
[0678] For example, control may be performed as shown in Table 681 in Fig. 54. For example, when the transformation flag emt_flag==0, the number of selectable transformation pairs NumTrPair is set to "1." Also, when the transformation flag emt_flag==1 and the sum of the absolute values of the non-zero coefficients sumAbsLevel is equal to or less than a predetermined threshold value TH1 (sumAbsLevel <= TH1), the number of selectable transformation pairs NumTrPair is set to "2."
[0679] Moreover, when the transformation flag emt_flag==1 and the sum sumAbsLevel of the absolute values of the non-zero coefficients is greater than a predetermined threshold TH1 and is equal to or less than a predetermined threshold TH2 (TH1 < TH2) (TH1 < sumAbsLevel <= TH2), the number of selectable transformation pairs NumTrPair is set to "N2". Furthermore, when the transformation flag emt_flag==1 and the sum sum sumAbsLevel of the absolute values of the non-zero coefficients is greater than a predetermined threshold TH2 (sumAbsLevel > TH2), the number of selectable transformation pairs NumTrPair is set to "N1" (N1 > N2).
[0680] For example, TH1=2, TH2=8, N1=9, and N2=5 may be used. In this way, the range of values that the transform index emt_idx can take is "0" to "3" when the sum of the absolute values of the non-zero coefficients, sumAbsLevel, is medium (TH1 < sumAbsLevel <= TH2), and is "0" to "7" when the sum of the absolute values of the non-zero coefficients, sumAbsLevel, is large (sumAbsLevel > TH2). In other words, the smaller the sum of the absolute values of the non-zero coefficients, sumAbsLevel, the fewer the number of candidates for the type of orthogonal transform (inverse orthogonal transform) can be set. Therefore, the amount of code can be reduced more efficiently, and the reduction in the coding efficiency can be suppressed (the coding efficiency can be improved).
[0681] <Flow of conversion pair number setting process> An example of the flow of the conversion pair number setting process executed in step S231 of FIG. 17 in this case will be described with reference to the flowchart of FIG.
[0682] When the conversion pair number setting process is started, in step S761, the conversion pair number setting unit 241 determines whether or not to set the value of the conversion flag emt_flag to “1.” If it is determined that the value of the conversion flag emt_flag is to be set to “0,” the process proceeds to step S762.
[0683] In step S762, the conversion pair number setting unit 241 sets the number of conversion pair candidates NumTrPair to “1” (NumTrPair=1). When the process of step S762 ends, the conversion pair number setting process ends, and the process returns to FIG.
[0684] Also, if it is determined in step S761 that the value of the conversion flag emt_flag is to be set to "1", the process proceeds to step S763.
[0685] In step S763, the conversion pair number setting unit 241 derives the sum sumAbsLevel of the absolute values of the non-zero coefficients.
[0686] In step S764, the conversion pair number setting unit 241 determines whether the sum of the absolute values of the non-zero coefficients, sumAbsLevel, is greater than a predetermined threshold TH1. If it is determined that the sum of the absolute values of the non-zero coefficients, sumAbsLevel, is equal to or less than the predetermined threshold TH1 (sumAbsLevel <= TH1), the process proceeds to step S765.
[0687] In step S765, the conversion pair number setting unit 241 sets the number of conversion pair candidates NumTrPair to “2” (NumTrPair=2). When the process of step S765 ends, the conversion pair number setting process ends, and the process returns to FIG.
[0688] Also, if it is determined in step S764 that the sum of the absolute values of the non-zero coefficients, sumAbsLevel, is greater than the predetermined threshold value TH1 (sumAbsLevel>TH1), the process proceeds to step S766.
[0689] In step S766, the conversion pair number setting unit 241 determines whether the sum of the absolute values of the non-zero coefficients, sumAbsLevel, is greater than a predetermined threshold TH2 (TH2 > TH1). If it is determined that the sum of the absolute values of the non-zero coefficients, sumAbsLevel, is equal to or less than the predetermined threshold TH2 (TH1 < sumAbsLevel <= TH2), the process proceeds to step S767.
[0690] In step S767, the conversion pair number setting unit 241 sets the number of conversion pair candidates NumTrPair to "N2" (NumTrPair = N2). When the process of step S767 ends, the conversion pair number setting process ends, and the process returns to FIG.
[0691] Also, if it is determined in step S766 that the sum of the absolute values of the non-zero coefficients, sumAbsLevel, is greater than the predetermined threshold value TH2 (sumAbsLevel>TH2), the process proceeds to step S768.
[0692] In step S768, the conversion pair number setting unit 241 sets the number of conversion pair candidates NumTrPair to "N1" (N1>=N2) (NumTrPair=N1). When the process of step S768 ends, the conversion pair number setting process ends, and the process returns to FIG.
[0693] By performing the above-described processing, the number of candidates for transform pairs can be controlled according to the sumAbsLevel of the absolute values of the non-zero coefficients, the amount of code can be reduced more efficiently, and a reduction in coding efficiency can be suppressed (coding efficiency can be improved).
[0694] In addition, in the case of decoding (control of inverse orthogonal transform), the number of transform pairs may be set in a similar manner. That is, the number of transform pairs may be set in a similar manner in step S423 of Fig. 31. In this case, the number of transform pairs setting unit 431 executes the process instead of the number of transform pairs setting unit 241, so that the above description can be applied.
[0695] <Modification> The position lastPos of the last coefficient is not limited to the above example. For example, the sum of the X coordinate and the Y coordinate of the last coefficient may be set as the position of the last coefficient (Manhattan distance: lastPos=x+y).
[0696] Furthermore, the thresholds TH1 and TH2 may each be a value according to the size of the transform block, the quantization parameter QP, or the bit depth bitDepth, or a combination thereof. For example, the following formula (38) may be used.
[0697]
number
[0698] In equation (38), f() is an arbitrary function that determines the threshold value THN.
[0699] <8. Application Examples> In each of the above embodiments, examples of combinations of the numbers of conversion pairs corresponding to each condition have been described, but the combinations are arbitrary and are not limited to the above examples. Any number of conversion pairs that does not overlap can be selected within the maximum number of selectable conversion pairs.
[0700] For example, as shown in table 701 in Fig. 56, if the number of selectable transform pairs NumTrPair is 16, five types of transform pair candidates are assumed: a range surrounded by a frame 711, a range surrounded by a frame 712, a range surrounded by a frame 713, a range surrounded by a frame 714, and a range surrounded by a frame 715. Any number of these ranges may be assigned to each condition of the encoding parameters.
[0701] For example, in the case of the example of Table 601 in Fig. 38, two options (N1 and N2) can be set for the number of conversion pairs for a componentID. For example, when the range of five types in Table 701 is set as candidates, any two types out of these five types can be assigned to N1 and N2.
[0702] In addition, the number of options for the number of selectable conversion pairs in each embodiment is arbitrary and is not limited to the above example. For example, in the example of table 601 in Fig. 38, it has been described that two options (N1 and N2) are prepared for the number of conversion pairs for the componentID, but it is of course possible to prepare three or more options (N1, N2, N3, ...).
[0703] For example, in the example of Table 661 in Fig. 50, the number of options for the selectable number of conversion pairs NumTrPair is four (1, 2, N1, N2), but the number of options may be five (1, 2, N1, N2, N3) as in Table 721 in A of Fig. 57. Of course, the number of options may be three or less, or six or more.
[0704] Also, for example, in the example of table 671 in Fig. 52, the number of options for the selectable number of conversion pairs NumTrPair is four (1, 2, N1, N2), but the number of options may be five (1, 2, N1, N2, N3) as in table 722 in B in Fig. 57. Of course, the number of options may be three or less, or six or more.
[0705] Further, for example, in the example of table 681 in Fig. 54, the number of options for the selectable number of conversion pairs NumTrPair is four (1, 2, N1, N2), but the number of options may be five (1, 2, N1, N2, N3) as in table 723 in C in Fig. 57. Of course, the number of options may be three or less, or six or more.
[0706] In addition, the combination of the selectable number of transform pairs NumTrPair may be fixed in a picture, in a sequence, in a prediction mode, or in a QP, or may be variable. For example, the combination of the number of transform pairs numTrPair or the {maximum value, minimum value} of the number of transform pairs may be signaled in any data unit such as a CTU, slice, tile, picture, or sequence. That is, the number of transform pairs may be controlled for each predetermined size.
[0707] In other words, on the encoding side, the control unit may set information regarding the maximum number of selectable conversion pairs and information regarding the minimum number of selectable conversion pairs, and the encoding unit may generate encoded data including information regarding the maximum number and information regarding the minimum number.
[0708] Also, on the decoding side, the control unit (decoding unit) may parse information regarding the maximum number of selectable transform pairs and information regarding the minimum number of selectable transform pairs contained in the encoded data, and set the number of candidate types of inverse orthogonal transform according to the parsed information regarding the maximum number and information regarding the minimum number and the encoding parameters.
[0709] In this way, for simple residual signals, the maximum number of transform pairs can be reduced, thereby reducing overhead related to AMT control information. Also, on the coding side, the number of transform pair combinations to be searched is reduced, making processing lighter. On the other hand, for complex residual signals, the maximum number of transform pairs can be increased, allowing appropriate transform pairs to be selected from a larger number of transform pair candidates, improving coding efficiency.
[0710] Also, a transform enable flag indicating whether or not adaptive change of the type of orthogonal transform is permitted may be signaled (for example, for each predetermined data unit).
[0711] For example, on the encoding side, the control unit may set a transform enable flag indicating whether adaptive change of the type of orthogonal transform is permitted, and the encoding unit may generate encoded data including the transform enable flag.
[0712] Also, on the decoding side, the control unit may parse a transform enable flag included in the encoded data indicating whether adaptive change of the type of inverse orthogonal transform is permitted, and if the transform enable flag permits adaptive change of the type of inverse orthogonal transform, control the type of inverse orthogonal transform based on the encoding parameters.
[0713] In this way, when AMT is not permitted, processing related to AMT can be omitted, thereby suppressing an increase in the load of encoding and decoding.
[0714] Syntax 731 in Fig. 58 shows an example of syntax in this case. In syntax 731, emt_enabled_flag (or amt_enabled_flag) is a transform enable flag indicating whether adaptive change of the type of inverse orthogonal transform is permitted. Also, emt_max_num_trpair_minusN is a syntax element indicating "maximum number of transform pairs - N". Also, emt_min_num_trpair_minusN is a syntax element indicating "minimum number of transform pairs - N".
[0715] In this example, emt_max_num_trpair_minusN and emt_min_num_trpair_minusN are signaled when emt_enabled_flag is 1 (true). That is, when emt_enabled_flag is 1 (true), the image decoding device 400 decodes emt_max_num_trpair_minusN and emt_min_num_trpair_minusN.
[0716] The maximum number of conversion pairs is derived as in the following formula (39). Also, the minimum number of conversion pairs is derived as in the following formula (40).
[0717] [Number]
[0718] Here, for example, N may be set to 1. Note that N is not limited to 1, and it may be 2 or other values. By encoding after subtracting N from the maximum and minimum values of the number of conversion pairs in this way, an increase in the amount of code can be suppressed.
[0719] Also, the combinations of the number of conversion pairs may be derived from the maximum and minimum values of the number of conversion pairs based on a predetermined rule.
[0720] For example, assume that the combinations of the number of conversion pairs are fixed to three types: {a, b, c} (a < b < c). In this case, the maximum number of conversion pairs (maxNumTrPair) may be set for c, the minimum number of conversion pairs (= minNumTrPair) may be set for a, and the intermediate value may be set for b.
[0721] Also, for example, an average value aveLog2NumTrPair of the logarithm with base 2 of the maximum number and the logarithm with base 2 of the minimum value may be obtained, and the power of 2 thereof may be set for b. That is, a, b, and c may be derived as in the following formula (41).
[0722] [Number]
[0723] For example, a, b, and c are derived as follows. When maxNumTrPair = 8 and minNumTrPair = 1, {a, b, c} = {1, 4, 8}. If maxNumTrPair = 8, minNumTrPair = 2, {a, b, c} = {2, 4, 8}. If maxNumTrPair = 16, minNumTrPair = 1, {a, b, c} = {1, 8, 16}. If maxNumTrPair = 16, minNumTrPair = 4, {a, b, c} = {4, 8, 16}.
[0724] The derivation method is not limited to this. For example, the Ceil() function (rounding up the decimal point) may be changed to the floor() function (rounding down the decimal point). Also, b = 2**(log2(minNumTrPair) + 1) or b = 2**(log2(maxNumTrPair) - 1) may be used.
[0725] The above-described embodiments may be applied in combination. The combination may be arbitrary. For example, the method described in Non-Patent Document 1 may be applied in combination with the methods described in the first embodiment, the second embodiment, and the fifth embodiment.
[0726] <9. Notes> <Computer> The above-mentioned 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 in a computer. Here, the computer includes a computer built into dedicated hardware, and a general-purpose personal computer, etc., capable of executing various functions by installing various programs.
[0727] FIG. 59 is a block diagram showing an example of the hardware configuration of a computer that executes the above-mentioned series of processes by a program.
[0728] In a computer 800 shown in FIG. 59, 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.
[0729] 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.
[0730] 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.
[0731] In the computer configured as above, the CPU 801 performs the above-mentioned 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 and the like necessary for the CPU 801 to execute various processes as appropriate.
[0732] The program executed by the computer (CPU 801) can be applied by recording it on a removable medium 821 such as a package medium, for example. In this case, the program can be installed in the storage unit 813 via the input / output interface 810 by mounting the removable medium 821 on the drive 815.
[0733] 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.
[0734] In addition, this program can also be installed in advance in the ROM 802 or the storage unit 813.
[0735] <Unit of information processing> The data units in which the various information described above is 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, this data unit may be set for each piece of information or process, and the data units of all pieces of information and processes do not need to be unified. The storage location of these pieces of information is arbitrary, and may be stored in the header or parameter set of the above-mentioned data unit. Also, they may be stored in multiple locations.
[0736] <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 present technology described above may be transmitted. In addition, for example, control information indicating a target to which the present technology described above is applied (or a target to which it is not applied) may be transmitted. For example, control information specifying a block size (upper limit or lower limit, or both), frame, component, or layer to which the present technology is applied (or permitted or prohibited to be applied) may be transmitted.
[0737] <Target of application 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. In addition, as long as it does not conflict with the above-mentioned technology, some of these processes may be omitted.
[0738] 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 that case, this technology can be applied to the encoding / decoding of each view.
[0739] Furthermore, this technology can be applied to a hierarchical image coding (scalable coding) and decoding system that performs coding and decoding of hierarchical images that are layered to have a scalability function for a predetermined parameter. In that case, this technology can be applied to the coding and decoding of each layer.
[0740] The image encoding device 100, image decoding device 130, image encoding device 200, and image decoding device 400 of the above-mentioned embodiments can be applied to various electronic devices, such as transmitters and receivers (e.g., television sets and mobile phones) in wired broadcasting such as satellite broadcasting and cable TV, distribution over the Internet, and distribution to terminals via cellular communication, or devices (e.g., hard disk recorders and cameras) that record images on media such as optical disks, magnetic disks, and flash memories, and play back images from these storage media.
[0741] Furthermore, the present technology can also be implemented as any configuration to be installed in an apparatus constituting any device or system, 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, a set in which other functions are added to a unit (e.g., a video set), and the like (i.e., a configuration of a part of an apparatus).
[0742] Furthermore, the present technology can also be applied to a network system consisting of multiple devices, for example, a cloud service that provides image (video)-related services to any terminal such as a computer, AV (Audio Visual) device, portable information processing terminal, or IoT (Internet of Things) device.
[0743] In addition, a system, device, processing unit, 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, nature monitoring, etc. In addition, the use thereof is also arbitrary.
[0744] For example, the present technology can be applied to systems and devices used for providing ornamental content, etc. Furthermore, for example, the present technology can be applied to systems and devices used for traffic, such as monitoring traffic conditions and automatic driving control. Furthermore, for example, the present technology can be applied to systems and devices used for security. Furthermore, for example, the present technology can be applied to systems and devices used for automatic control of machines, etc. Furthermore, for example, the present technology can be applied to sys...
Claims
1. a decoding unit that decodes the encoded data to generate quantized data; an inverse quantization unit that inversely quantizes the quantized data generated by the decoding unit to generate coefficient data; a setting unit that sets an inverse orthogonal transform type for the chrominance component from candidates of inverse orthogonal transform types for the chrominance component, the number of candidates being set to be smaller than the number of candidates of inverse orthogonal transform types for the luminance component; an inverse orthogonal transform unit that performs an inverse orthogonal transform on a chrominance component of coefficient data generated by the inverse quantization unit, using a transform matrix corresponding to the inverse orthogonal transform type set by the setting unit; An image processing device comprising:
2. the setting unit sets a vertical inverse one-dimensional orthogonal transform type and a horizontal inverse one-dimensional orthogonal transform type based on the inverse orthogonal transform type; The inverse orthogonal transformation unit performing an inverse one-dimensional orthogonal transform in the vertical direction using a transform matrix corresponding to the inverse one-dimensional orthogonal transform type in the vertical direction set by the setting unit; The inverse one-dimensional orthogonal transform in the horizontal direction is performed using a transform matrix corresponding to the inverse one-dimensional orthogonal transform type in the horizontal direction set by the setting unit. The image processing device according to claim 1 .
3. The setting unit sets the vertical inverse one-dimensional orthogonal transform type and the horizontal inverse one-dimensional orthogonal transform type using a transform pair index that is an identifier for narrowing down candidates for a combination of the vertical inverse one-dimensional orthogonal transform type and the horizontal inverse one-dimensional orthogonal transform type based on the inverse orthogonal transform type. The image processing device according to claim 2 .
4. The inverse orthogonal transform type includes a transform flag indicating whether to adaptively change the inverse orthogonal transform type, and a transform index that is an identifier for narrowing down the combination candidates when the inverse orthogonal transform type is adaptively changed. The image processing device according to claim 3 .
5. decoding the encoded data to generate quantized data; inverse quantizing the generated quantized data to generate coefficient data; setting an inverse orthogonal transform type for the chrominance component from candidates of inverse orthogonal transform types for the chrominance component, the number of candidates being set to be less than the number of candidates of inverse orthogonal transform types for the luminance component; performing an inverse orthogonal transform on the color difference components of the generated coefficient data using a transform matrix corresponding to the set inverse orthogonal transform type; An image processing method comprising:
6. a setting unit that sets an orthogonal transform type for the chrominance component from candidates of orthogonal transform types for the chrominance component, the number of candidates being set to be smaller than the number of candidates of orthogonal transform types for the luminance component; an orthogonal transform unit that performs an orthogonal transform on a color difference component of image data using a transform matrix corresponding to the orthogonal transform type set by the setting unit, and generates coefficient data; a quantization unit that quantizes the coefficient data generated by the orthogonal transformation unit to generate quantized data; an encoding unit that generates encoded data by encoding the quantized data generated by the quantization unit; An image processing device comprising:
7. setting an orthogonal transform type for the chrominance component from candidates for the orthogonal transform type for the chrominance component, the number of candidates being set to be less than the number of candidates for the orthogonal transform type for the luminance component; performing an orthogonal transform on a color difference component of the image data using a transform matrix corresponding to the set orthogonal transform type to generate coefficient data; quantizing the generated coefficient data to generate quantized data; encoding the generated quantized data to generate encoded data; An image processing method comprising:
Citation Information
Patent Citations
Method and Apparatus of Adaptive Multiple Transforms for Video Coding
US20180332289A1
Enhanced multiple transforms for prediction residual
WO2016123091A1
Encoding device, decoding device, encoding method, and decoding method
WO2018021374A1
Encoding device, decoding device, encoding method and decoding method
WO2019069782A1
Cited By
Video encoding apparatus, video decoding apparatus, video encoding method, video decoding method, and image transmission system
WO2026196630A1
