Coding device, decoding device, coding method, and decoding method

By selecting appropriate transformation base and inverse transformation base according to the block size during the HEVC encoding and decoding process, the problems of compression efficiency and processing load are solved, and more efficient video encoding is achieved.

CN115190296BActive Publication Date: 2025-08-29PANASONIC INTELLECTUAL PROPERTY CORP OF AMERICA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211045200.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2017-12-28
Filing Date
2018-12-19
Publication Date
2025-08-29
Estimated Expiration
2038-12-19

AI Technical Summary

Technical Problem

The existing video encoding standard HEVC has room for improvement in compression efficiency and processing load.

Method used

By selecting the appropriate transformation base and the inverse transformation base during the encoding and decoding process, different transformation bases and inverse transformation bases are selected for processing according to the size of the encoded target block, and the transformation coefficients and inverse transformation coefficients are generated.

Benefits of technology

Further improvement of compression efficiency and reduction of processing load have been achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115190296B_ABST
    Figure CN115190296B_ABST
Patent Text Reader

Abstract

Provided are an encoding device, a decoding device, and a storage medium. The encoding device includes a circuit and a memory, wherein the circuit uses the memory to perform the following processing: determining whether a mode for selecting a transform basis based on the size of a current block to be encoded is valid; if the mode is valid, selecting a first transform basis from a plurality of transform basis candidates as a transform basis in the vertical direction when the vertical size of the current block to be encoded is larger than a threshold size; selecting a second transform basis as a transform basis in the vertical direction when the vertical size of the current block to be encoded is smaller than the threshold size, wherein the second transform basis is a fixed transform basis; and performing a first transform on a residual of the current block to be encoded using the selected transform basis in the vertical direction to generate a first transform coefficient.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an encoding device, a decoding device and a storage medium. Background Art

[0002] The video coding standard specification called HEVC (High-Efficiency Video Coding) is standardized by JCT-VC (Joint Collaborative Team on Video Coding).

[0003] Prior art literature

[0004] Non-patent literature

[0005] Non-Patent Document 1: H.265 (ISO / IEC 23008-2 HEVC (High Efficiency Video Coding))

[0006] Non-Patent Literature 2: Jianle Chen et al., Algorithm Description of Joint Exploration Test Model 5 (JEM5), Joint Video Exploration Team (JVET) of ITU-T SG16WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11 5th Meeting: Geneva, CH, Document: JVET-E1001, January 2017 Summary of the Invention

[0007] Problems to be solved by the invention

[0008] In such encoding and decoding technologies, further improvement of compression efficiency and reduction of processing load are required.

[0009] Therefore, the present invention provides an encoding device, a decoding device, an encoding method, or a decoding method that can achieve further improvement in compression efficiency and reduction in processing load.

[0010] Means for solving problems

[0011] A coding device according to a technical solution of the present invention comprises a circuit and a memory, wherein the circuit uses the memory to perform the following processing: determining whether a mode for selecting a transform base according to the size of an encoding object block is valid; if the mode is valid, when the vertical size of the encoding object block is larger than a threshold size, selecting a first transform base from a plurality of transform base candidates as a transform base in the vertical direction; when the vertical size of the encoding object block is smaller than the threshold size, selecting a second transform base as a transform base in the vertical direction, wherein the second transform base is a fixed transform base; and performing a first transform on a residual of the encoding object block using the selected transform base in the vertical direction to generate a first transform coefficient.

[0012] A decoding device according to a technical solution of the present invention comprises a circuit and a memory, wherein the circuit uses the memory to perform the following processing: determining whether a mode for selecting an inverse transform basis according to the size of a decoding object block is valid; if the mode is valid, when the vertical size of the decoding object block is larger than a threshold size, selecting a first inverse transform basis from a plurality of inverse transform basis candidates as an inverse transform basis in the vertical direction; when the vertical size of the decoding object block is smaller than the threshold size, selecting a second inverse transform basis as an inverse transform basis in the vertical direction, wherein the second inverse transform basis is a fixed inverse transform basis; and generating a prediction residual by performing a first inverse transform on coefficients of the decoding object block using the selected inverse transform basis in the vertical direction.

[0013] In addition, these general or specific technical solutions can also be implemented by systems, methods, integrated circuits, computer programs or computer-readable recording media such as CD-ROMs, or by any combination of systems, methods, integrated circuits, computer programs and recording media.

[0014] Effects of the Invention

[0015] The present invention can provide an encoding device, a decoding device, an encoding method, or a decoding method that can achieve further improvement in compression efficiency and reduction in processing load. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 This is a block diagram showing the functional structure of the encoding device related to embodiment 1.

[0017] Figure 2 This is a diagram showing an example of block division in the first embodiment.

[0018] Figure 3 This is a table showing the transformation basis functions corresponding to each transformation type.

[0019] Figure 4A FIG. 1 is a diagram showing an example of the shape of a filter used in ALF.

[0020] Figure 4B FIG. 1 is a diagram showing another example of the shape of the filter used in ALF.

[0021] Figure 4C FIG. 1 is a diagram showing another example of the shape of the filter used in ALF.

[0022] Figure 5A This diagram shows 67 intra prediction modes for intra prediction.

[0023] Figure 5B This is a flowchart for explaining an outline of the predicted image correction process based on the OBMC process.

[0024] Figure 5C This is a conceptual diagram for explaining the outline of the predicted image correction process based on the OBMC process.

[0025] Figure 5D This is a diagram showing an example of FRUC.

[0026] Figure 6 This is a diagram for explaining pattern matching (bidirectional matching) between two blocks along a motion trajectory.

[0027] Figure 7 This is a diagram used to explain pattern matching (template matching) between a template in a current picture and a block in a reference picture.

[0028] Figure 8 This is a diagram used to explain a model assuming constant velocity linear motion.

[0029] Figure 9A This is a diagram for explaining the derivation of a motion vector in a sub-block unit based on the motion vectors of a plurality of adjacent blocks.

[0030] Figure 9B This is a diagram for explaining the outline of motion vector derivation processing based on the merge mode.

[0031] Figure 9C This is a conceptual diagram used to explain the outline of DMVR processing.

[0032] Figure 9D This is a diagram for explaining an overview of a method for generating a predicted image using a brightness correction process based on an LIC process.

[0033] Figure 10 This is a block diagram showing the functional structure of the decoding device related to embodiment 1.

[0034] Figure 11A This is a block diagram showing the internal structure of the transformation unit of the encoding device according to the first aspect of the first embodiment.

[0035] Figure 11B This is a block diagram showing the internal structure of the inverse transform unit of the encoding device according to the first aspect of the first embodiment.

[0036] Figure 12A This is a flowchart showing the processing of the transform unit and the quantization unit of the encoding device according to the first aspect of the first embodiment.

[0037] Figure 12B This is a flowchart showing a modified example of the processing of the transform unit and the quantization unit of the encoding device according to the first aspect of the first embodiment.

[0038] Figure 13A This is a flowchart showing the processing of the transform unit and the quantization unit of the encoding device according to the second aspect of the first embodiment.

[0039] Figure 13B This is a flowchart showing the processing of the entropy coding unit of the coding device according to the second aspect of the first embodiment.

[0040] Figure 14 This is a diagram showing a specific example of syntax in the second aspect related to Implementation Method 1.

[0041] Figure 15 This is a table showing specific examples of the transform base used in the second aspect of the first embodiment and the presence or absence of signal coding.

[0042] Figure 16 This is a flowchart showing the processing of the transform unit and the quantization unit of the encoding device according to the third aspect of the first embodiment.

[0043] Figure 17A This is a flowchart showing the processing of the transform unit and the quantization unit of the encoding device according to the fourth aspect of the first embodiment.

[0044] Figure 17B This is a flowchart showing the processing of the entropy coding unit of the coding device according to the fourth aspect of the first embodiment.

[0045] Figure 18 This is a diagram showing a specific example of syntax in the fourth aspect of the first embodiment.

[0046] Figure 19 This is a table showing specific examples of the transform base used in the fourth aspect of the first embodiment and the presence or absence of coding of the signal.

[0047] Figure 20 This is a block diagram showing the internal structure of the inverse transform unit of the decoding device according to the fifth aspect of the first embodiment.

[0048] Figure 21 This is a flowchart showing the processing of the inverse quantization unit and the inverse transformation unit of the decoding device according to the fifth aspect of the first embodiment.

[0049] Figure 22A This is a flowchart showing the processing of the entropy decoding unit of the decoding device according to the sixth aspect of the first embodiment.

[0050] Figure 22B This is a flowchart showing the processing of the inverse quantization unit and the inverse transformation unit of the decoding device according to the sixth aspect of the first embodiment.

[0051] Figure 23 This is a flowchart showing the processing of the inverse quantization unit and the inverse transformation unit of the decoding device according to the seventh mode of implementation mode 1.

[0052] Figure 24A This is a flowchart showing the processing of the entropy decoding unit of the decoding device according to the eighth aspect of the first embodiment.

[0053] Figure 24B This is a flowchart showing the processing of the inverse quantization unit and the inverse transformation unit of the decoding device according to the eighth aspect of the first embodiment.

[0054] Figure 25 It is an overall structural diagram of the content supply system that realizes content distribution services.

[0055] Figure 26 This is a diagram showing an example of a coding structure in the case of scalable coding.

[0056] Figure 27 This is a diagram showing an example of a coding structure in the case of scalable coding.

[0057] Figure 28 This is a diagram showing an example of a display screen of a web page.

[0058] Figure 29 This is a diagram showing an example of a display screen of a web page.

[0059] Figure 30 This is a diagram showing an example of a smart phone.

[0060] Figure 31 This is a block diagram showing a configuration example of a smartphone. DETAILED DESCRIPTION

[0061] Hereinafter, embodiments will be described in detail with reference to the accompanying drawings.

[0062] In addition, the embodiments described below are all inclusive or specific examples. The numerical values, shapes, materials, components, configurations and connections of components, steps, and the order of steps shown in the following embodiments are examples and are not intended to limit the claims. In addition, components of the following embodiments that are not described in the independent claims representing the superordinate concept are described as arbitrary components.

[0063] (Implementation 1)

[0064] First, an overview of Embodiment 1 will be described as an example of an encoding device and a decoding device to which the processing and / or configuration described in each embodiment of the present invention described later can be applied. However, Embodiment 1 is merely an example of an encoding device and a decoding device to which the processing and / or configuration described in each embodiment of the present invention can be applied, and the processing and / or configuration described in each embodiment of the present invention can also be implemented in encoding devices and decoding devices different from those in Embodiment 1.

[0065] When the processing and / or configuration described in each aspect of the present invention is applied to the first embodiment, for example, any of the following may be performed.

[0066] (1) In the encoding device or decoding device of Embodiment 1, among the plurality of components constituting the encoding device or decoding device, components corresponding to components described in the respective aspects of the present invention are replaced with components described in the respective aspects of the present invention;

[0067] (2) With respect to the encoding device or decoding device of Embodiment 1, after making any changes such as addition, replacement, or deletion to the functions or processes performed by some of the multiple components constituting the encoding device or decoding device, the components corresponding to the components described in the various aspects of the present invention are replaced with the components described in the various aspects of the present invention.

[0068] (3) With respect to the method implemented by the encoding device or decoding device of Embodiment 1, after making any changes such as adding processes and / or replacing or deleting some of the multiple processes included in the method, the processes corresponding to the processes described in each aspect of the present invention are replaced with the processes described in each aspect of the present invention;

[0069] (4) implementing a method in which some of the plurality of components constituting the encoding device or decoding device of Embodiment 1 are combined with components described in the various aspects of the present invention, components having a portion of the functions possessed by the components described in the various aspects of the present invention, or components implementing a portion of the processing performed by the components described in the various aspects of the present invention;

[0070] (5) A component having a portion of the functions possessed by some of the multiple components constituting the encoding device or decoding device of Embodiment 1, or a component implementing a portion of the processing implemented by some of the multiple components constituting the encoding device or decoding device of Embodiment 1, is implemented by combining the components described in each aspect of the present invention, the components having a portion of the functions possessed by the components described in each aspect of the present invention, or the components implementing a portion of the processing implemented by the components described in each aspect of the present invention;

[0071] (6) With respect to the method implemented by the encoding device or decoding device of Embodiment 1, among the plurality of processes included in the method, the processes corresponding to the processes described in the respective aspects of the present invention are replaced with the processes described in the respective aspects of the present invention;

[0072] (7) Some of the multiple processes included in the method implemented by the encoding device or decoding device of Embodiment 1 are combined with the processes described in each aspect of the present invention and implemented.

[0073] Furthermore, the implementation of the processes and / or structures described in each embodiment of the present invention is not limited to the examples described above. For example, they may be implemented in a device used for a purpose different from that of the moving picture / image encoding device or moving picture / image decoding device disclosed in Embodiment 1. The processes and / or structures described in each embodiment may be implemented individually. Furthermore, the processes and / or structures described in different embodiments may be implemented in combination.

[0074] [Overview of Encoding Device]

[0075] First, an overview of the encoding device according to Embodiment 1 will be described. Figure 1 1 is a block diagram showing a functional structure of an encoding device 100 according to Embodiment 1. The encoding device 100 is a moving picture / image encoding device that encodes a moving picture / image in units of blocks.

[0076] like Figure 1 As shown, the encoding device 100 is a device that encodes an image in block units, and includes a segmentation unit 102, a subtraction unit 104, a transformation unit 106, a quantization unit 108, an entropy coding unit 110, an inverse quantization unit 112, an inverse transformation unit 114, an addition unit 116, a block memory 118, a loop filter unit 120, a frame memory 122, an intra-frame prediction unit 124, an inter-frame prediction unit 126 and a prediction control unit 128.

[0077] The encoding device 100 is implemented, for example, by a general-purpose processor and memory. In this case, when the processor executes a software program stored in the memory, the processor functions as the segmentation unit 102, the subtraction unit 104, the transformation unit 106, the quantization unit 108, the entropy coding unit 110, the inverse quantization unit 112, the inverse transformation unit 114, the addition unit 116, the loop filter unit 120, the intra-frame prediction unit 124, the inter-frame prediction unit 126, and the prediction control unit 128. Alternatively, the encoding device 100 may be implemented as one or more dedicated electronic circuits corresponding to the segmentation unit 102, the subtraction unit 104, the transformation unit 106, the quantization unit 108, the entropy coding unit 110, the inverse quantization unit 112, the inverse transformation unit 114, the addition unit 116, the loop filter unit 120, the intra-frame prediction unit 124, the inter-frame prediction unit 126, and the prediction control unit 128.

[0078] Hereinafter, each component included in the encoding device 100 will be described.

[0079] [Division]

[0080] The segmentation unit 102 segments each picture included in the input moving image into a plurality of blocks, and outputs each block to the subtraction unit 104. For example, the segmentation unit 102 first segments the picture into blocks of a fixed size (e.g., 128×128). The fixed-size blocks are sometimes called coding tree units (CTUs). Furthermore, the segmentation unit 102 segments each fixed-size block into blocks of a variable size (e.g., 64×64 or less) based on recursive quadtree and / or binary tree block segmentation. The variable-size blocks are sometimes called coding units (CUs), prediction units (PUs), or transform units (TUs). In addition, in the present embodiment, there is no need to distinguish between CUs, PUs, and TUs, and a part or all of the blocks in the picture may be used as processing units of CUs, PUs, or TUs.

[0081] Figure 2 : is a diagram showing an example of block division in Implementation 1. Figure 2 In the figure, the solid line represents the block boundary based on quadtree block partitioning, and the dotted line represents the block boundary based on binary tree block partitioning.

[0082] Here, the block 10 is a square block of 128×128 pixels (128×128 block). The 128×128 block 10 is first divided into four square 64×64 blocks (quadtree block division).

[0083] The 64×64 block on the upper left is further vertically divided into two rectangular 32×64 blocks, and the 32×64 block on the left is further vertically divided into two rectangular 16×64 blocks (binary tree block division). As a result, the 64×64 block on the upper left is divided into two 16×64 blocks 11 and 12 and a 32×64 block 13.

[0084] The 64×64 block in the upper right corner is horizontally partitioned into two rectangular 64×32 blocks 14 and 15 (binary tree block partitioning).

[0085] The 64×64 block on the lower left is divided into four square 32×32 blocks (quadtree block partitioning). The upper left and lower right blocks of the four 32×32 blocks are further partitioned. The upper left 32×32 block is vertically partitioned into two rectangular 16×32 blocks, and the right 16×32 block is further partitioned horizontally into two 16×16 blocks (binary tree block partitioning). The lower right 32×32 block is horizontally partitioned into two 32×16 blocks (binary tree block partitioning). As a result, the lower left 64×64 block is partitioned into a 16×32 block 16, two 16×16 blocks 17, 18, two 32×32 blocks 19, 20, and two 32×16 blocks 21, 22.

[0086] The lower right 64×64 block 23 is not split.

[0087] As above, in Figure 2 In FIG, block 10 is divided into 13 variable-size blocks 11 to 23 based on recursive quadtree and binary tree block partitioning. This type of partitioning is sometimes called QTBT (quad-tree plus binary tree) partitioning.

[0088] In addition, Figure 2 In the example above, one block is divided into four or two blocks (quadtree or binary tree block division), but the division is not limited to this. For example, one block can also be divided into three blocks (ternary tree division). Division including this ternary tree division is called MBT (multi type tree) division.

[0089] [Subtraction Department]

[0090] Subtraction unit 104 subtracts the predicted signal (predicted samples) from the original signal (original samples) in units of blocks divided by division unit 102. Specifically, subtraction unit 104 calculates a prediction error (also referred to as a residual) for the current block to be encoded (hereinafter referred to as the current block). Subtraction unit 104 then outputs the calculated prediction error to transformation unit 106.

[0091] The original signal is an input signal to the encoding device 100 and is a signal representing an image of each picture constituting a moving image (for example, a luminance (luma) signal and two color difference (chroma) signals). Hereinafter, the signal representing the image may also be referred to as a sample.

[0092] [Conversion Unit]

[0093] The transform unit 106 transforms the spatial domain prediction error into frequency domain transform coefficients and outputs the transform coefficients to the quantization unit 108. Specifically, the transform unit 106 performs a predetermined discrete cosine transform (DCT) or discrete sine transform (DST) on the spatial domain prediction error.

[0094] Alternatively, the transform unit 106 may adaptively select a transform type from a plurality of transform types and transform the prediction error into transform coefficients using a transform basis function corresponding to the selected transform type. Such a transform is sometimes referred to as an explicit multiple core transform (EMT) or an adaptive multiple transform (AMT).

[0095] The plurality of transform types include, for example, DCT-II, DCT-V, DCT-VIII, DST-I, and DST-VII. Figure 3 is a table showing the transformation basis functions corresponding to each transformation type. Figure 3 Where N represents the number of input pixels. The selection of a transform type from among these multiple transform types may depend on, for example, the type of prediction (intra-frame prediction and inter-frame prediction) or the intra-frame prediction mode.

[0096] Information indicating whether such EMT or AMT is applied (e.g., an AMT flag) and information indicating the selected transform type are signaled at the CU level. Furthermore, the signaling of this information is not limited to the CU level and can also be performed at other levels (e.g., sequence level, picture level, slice level, tile level, or CTU level).

[0097] In addition, the transform unit 106 may also re-transform the transform coefficients (transform results). Such re-transformation is sometimes called AST (adaptive secondary transform) or NSST (non-separable secondary transform). For example, the transform unit 106 re-transforms each sub-block (for example, a 4×4 sub-block) contained in the block of transform coefficients corresponding to the intra-frame prediction error. Information indicating whether NSST is applied and information related to the transform matrix used in NSST are signaled at the CU level. In addition, the signaling of this information does not need to be limited to the CU level, but can also be other levels (for example, sequence level, picture level, slice level, tile level or CTU level).

[0098] Here, separable transformation refers to a method of performing multiple transformations in each direction according to the number of dimensions of the input, and non-separable transformation refers to a method of treating two or more dimensions as one dimension when the input is multi-dimensional and performing the transformation together.

[0099] For example, as an example of non-separable transformation, when a 4×4 block is input, it is considered as an array of 16 elements, and the array is transformed using a 16×16 transformation matrix.

[0100] Similarly, a method (Hypercube Givens Transform) that considers a 4×4 input block as an array of 16 elements and then performs multiple Givens rotations on the array is also an example of a Non-Separable transformation.

[0101] [Quantitative Department]

[0102] The quantization unit 108 quantizes the transform coefficients output from the transform unit 106. Specifically, the quantization unit 108 scans the transform coefficients of the current block in a predetermined scanning order and quantizes the transform coefficients based on the quantization parameter (QP) corresponding to the scanned transform coefficients. The quantization unit 108 then outputs the quantized transform coefficients of the current block (hereinafter referred to as quantized coefficients) to the entropy coding unit 110 and the inverse quantization unit 112.

[0103] The predetermined order is the order used for quantization / inverse quantization of transform coefficients. For example, the predetermined scanning order is defined by ascending order (from low frequency to high frequency) or descending order (from high frequency to low frequency) of frequency.

[0104] The quantization parameter is a parameter that defines the quantization step size (quantization width). For example, if the value of the quantization parameter increases, the quantization step size also increases. In other words, if the value of the quantization parameter increases, the quantization error increases.

[0105] [Entropy coding unit]

[0106] The entropy coding unit 110 generates a coded signal (coded bit stream) by performing variable-length coding on the quantized coefficients input from the quantization unit 108. Specifically, the entropy coding unit 110 binarizes the quantized coefficients and performs arithmetic coding on the binary signal, for example.

[0107] [Inverse quantization unit]

[0108] The inverse quantization unit 112 inversely quantizes the quantized coefficients input from the quantization unit 108. Specifically, the inverse quantization unit 112 inversely quantizes the quantized coefficients of the current block in a predetermined scanning order. Furthermore, the inverse quantization unit 112 outputs the inversely quantized transform coefficients of the current block to the inverse transform unit 114.

[0109] [Inverse transformation unit]

[0110] The inverse transform unit 114 restores the prediction error by performing an inverse transform on the transform coefficients input from the inverse quantization unit 112. Specifically, the inverse transform unit 114 restores the prediction error for the current block by performing an inverse transform corresponding to the transform performed by the transform unit 106 on the transform coefficients. The inverse transform unit 114 then outputs the restored prediction error to the addition unit 116.

[0111] Furthermore, the restored prediction error loses information due to quantization and therefore does not match the prediction error calculated by the subtraction unit 104. In other words, the restored prediction error includes a quantization error.

[0112] [Addition Department]

[0113] The adder 116 reconstructs the current block by adding the prediction error input from the inverse transform unit 114 to the prediction sample input from the prediction control unit 128. The adder 116 then outputs the reconstructed block to the block memory 118 and the loop filter unit 120. The reconstructed block is sometimes referred to as a locally decoded block.

[0114] [Block Memory]

[0115] The block memory 118 is a storage unit for storing blocks in a current picture to be coded (hereinafter referred to as a current picture) that are referenced in intra prediction. Specifically, the block memory 118 stores the reconstructed blocks output from the adder 116 .

[0116] [Loop filter unit]

[0117] The loop filter unit 120 performs loop filtering on the block reconstructed by the adder unit 116 and outputs the filtered reconstructed block to the frame memory 122. Loop filtering refers to filtering used within the encoding loop (in-loop filtering), and includes, for example, deblocking filtering (DF), sample adaptive offset (SAO), and adaptive loop filtering (ALF).

[0118] In ALF, a least squares error filter is used to remove coding distortion. For example, for each 2×2 sub-block in the current block, one filter is selected from multiple filters based on the direction and activity of the local gradient.

[0119] Specifically, sub-blocks (e.g., 2×2 sub-blocks) are first classified into multiple classes (e.g., 15 or 25 classes). Sub-block classification is performed based on the direction and activity of the gradient. For example, using the gradient direction value D (e.g., 0 to 2 or 0 to 4) and the gradient activity value A (e.g., 0 to 4), a classification value C is calculated (e.g., C = 5D + A). Based on the classification value C, the sub-blocks are then classified into multiple classes (e.g., 15 or 25 classes).

[0120] The gradient direction value D is derived, for example, by comparing gradients in multiple directions (e.g., horizontal, vertical, and two diagonal directions). Furthermore, the gradient activity value A is derived, for example, by summing the gradients in multiple directions and quantizing the sum.

[0121] Based on the result of such classification, a filter to be used for the sub-block is determined from among a plurality of filters.

[0122] As the shape of the filter used in the ALF, for example, a circularly symmetric shape is used. Figures 4A to 4C FIG. 1 is a diagram showing a plurality of examples of filter shapes used in ALF. Figure 4A represents a 5×5 diamond-shaped filter, Figure 4B represents a 7×7 diamond-shaped filter, Figure 4C Represents a 9×9 diamond filter. Information indicating the filter shape is signaled at the picture level. Signaling of the filter shape information need not be limited to the picture level and can also be performed at other levels (e.g., sequence level, slice level, tile level, CTU level, or CU level).

[0123] The on / off of ALF is determined, for example, at the picture level or the CU level. For example, for luma, whether to use ALF is determined at the CU level, and for chroma, whether to use ALF is determined at the picture level. Information indicating whether ALF is on / off is signaled at the picture level or the CU level. Furthermore, the signaling of information indicating whether ALF is on / off is not limited to the picture level or the CU level, and may be at other levels (e.g., the sequence level, the slice level, the tile level, or the CTU level).

[0124] The coefficient sets of multiple selectable filters (e.g., up to 15 or 25 filters) are signaled at the picture level. Furthermore, the signaling of coefficient sets is not limited to the picture level and can also be performed at other levels (e.g., sequence level, slice level, tile level, CTU level, CU level, or sub-block level).

[0125] [Frame Memory]

[0126] The frame memory 122 is a storage unit for storing reference pictures used in inter-frame prediction and is sometimes referred to as a frame buffer. Specifically, the frame memory 122 stores the reconstructed blocks filtered by the loop filter unit 120 .

[0127] [Intra-frame prediction unit]

[0128] The intra prediction unit 124 performs intra prediction (also called intra-screen prediction) on the current block by referring to blocks in the current picture stored in the block memory 118, thereby generating a prediction signal (intra-prediction signal). Specifically, the intra prediction unit 124 generates the intra-prediction signal by performing intra prediction with reference to samples (e.g., luminance values ​​and chrominance values) of blocks adjacent to the current block, and outputs the intra-prediction signal to the prediction control unit 128.

[0129] For example, the intra prediction unit 124 performs intra prediction using one of a plurality of predetermined intra prediction modes. The plurality of intra prediction modes include one or more non-directional prediction modes and a plurality of directional prediction modes.

[0130] The one or more non-directional prediction modes include, for example, a Planar prediction mode and a DC prediction mode defined in the H.265 / HEVC (High-Efficiency Video Coding) standard (Non-Patent Document 1).

[0131] The plurality of directional prediction modes include, for example, 33 directional prediction modes defined by the H.265 / HEVC standard. Furthermore, the plurality of directional prediction modes may include 32 directional prediction modes in addition to the 33 directional prediction modes (a total of 65 directional prediction modes). Figure 5A This diagram shows 67 intra prediction modes (2 non-directional prediction modes and 65 directional prediction modes) in intra prediction. Solid arrows indicate the 33 directions specified by the H.265 / HEVC standard, and dotted arrows indicate the 32 additional directions.

[0132] Furthermore, the intra prediction of chrominance blocks can also refer to luma blocks. That is, the chrominance component of the current block can be predicted based on the luma component of the current block. This type of intra prediction is sometimes called CCLM (cross-component linear model) prediction. Such an intra prediction mode for chrominance blocks that refers to luma blocks (e.g., CCLM mode) can also be added as one of the intra prediction modes for chrominance blocks.

[0133] The intra-frame prediction unit 124 may also modify the intra-predicted pixel values ​​based on the gradients of reference pixels in the horizontal and vertical directions. Intra-frame prediction with such modification is sometimes called PDPC (position-dependent intraprediction combination). Information indicating whether PDPC is used (e.g., a PDPC flag) is signaled at the CU level. This information is not necessarily signaled at the CU level but may be signaled at other levels (e.g., sequence level, picture level, slice level, tile level, or CTU level).

[0134] [Inter-frame prediction unit]

[0135] The inter-frame prediction unit 126 performs inter-frame prediction (also called inter-screen prediction) on the current block with reference to a reference picture different from the current picture stored in the frame memory 122, thereby generating a prediction signal (inter-frame prediction signal). Inter-frame prediction is performed in units of the current block or sub-blocks within the current block (e.g., 4×4 blocks). For example, the inter-frame prediction unit 126 performs motion estimation on the current block or sub-block within the reference picture. Furthermore, the inter-frame prediction unit 126 performs motion compensation using the motion information (e.g., motion vector) obtained through motion estimation, thereby generating an inter-frame prediction signal for the current block or sub-block. The inter-frame prediction unit 126 then outputs the generated inter-frame prediction signal to the prediction control unit 128.

[0136] The motion information used in motion compensation is signaled. A motion vector predictor may be used to signal the motion vector. In other words, the difference between the motion vector and the motion vector predictor may be signaled.

[0137] Alternatively, an inter-frame prediction signal may be generated using not only the motion information of the current block obtained through motion estimation but also the motion information of adjacent blocks. Specifically, a prediction signal based on the motion information obtained through motion estimation and a prediction signal based on the motion information of adjacent blocks may be weighted and added together to generate an inter-frame prediction signal for each sub-block within the current block. This type of inter-frame prediction (motion compensation) is sometimes referred to as OBMC (overlapped block motion compensation).

[0138] In this OBMC mode, information indicating the size of the sub-block used for OBMC (e.g., the OBMC block size) is signaled at the sequence level. Furthermore, information indicating whether OBMC mode is used (e.g., the OBMC flag) is signaled at the CU level. The signaling level of this information is not limited to the sequence or CU level; it can also be signaled at other levels (e.g., the picture level, slice level, tile level, CTU level, or sub-block level).

[0139] The OBMC mode will be described in more detail. Figure 5B and Figure 5C This is a flowchart and a conceptual diagram for explaining the outline of the predicted image correction process based on the OBMC process.

[0140] First, a predicted image (Pred) obtained by normal motion compensation is acquired using a motion vector (MV) assigned to a current block to be encoded.

[0141] Next, a prediction image (Pred_L) is obtained for the encoding target block using the motion vector (MV_L) of the already encoded left adjacent block, and the prediction image and Pred_L are weighted and superimposed to perform the first correction of the prediction image.

[0142] Similarly, the motion vector (MV_U) of the encoded upper adjacent block is used to obtain the predicted image (Pred_U) for the encoding object block. The predicted image after the above-mentioned first correction is weighted and superimposed with Pred_U to perform a second correction on the predicted image, which is used as the final predicted image.

[0143] Furthermore, although the method of performing two-stage correction using the left neighboring block and the upper neighboring block has been described here, a configuration may be adopted in which correction is performed more times than two stages using the right neighboring block and the lower neighboring block.

[0144] Furthermore, the area to be superimposed may not be the entire pixel area of ​​the block, but may be only a partial area near the block boundary.

[0145] In addition, the prediction image correction process based on one reference image is explained here, but the same is true when the prediction image is corrected based on multiple reference images. After obtaining the corrected prediction images based on each reference image, the obtained prediction images are further superimposed to serve as the final prediction image.

[0146] Furthermore, the processing target block may be a prediction block unit or a sub-block unit obtained by further dividing the prediction block.

[0147] One method for determining whether to use OBMC involves using, for example, obmc_flag, a signal indicating whether OBMC is used. Specifically, the encoder determines whether the block being coded belongs to a complex motion region. If so, the obmc_flag is set to a value of 1 and OBMC is used for coding. If not, the obmc_flag is set to a value of 0 and OBMC is not used for coding. Meanwhile, the decoder decodes the obmc_flag described in the stream and switches whether OBMC is used based on its value.

[0148] Alternatively, motion information can be derived on the decoder side without signaling. For example, the merge mode specified in the H.265 / HEVC specification can be used. Furthermore, motion information can be derived by performing motion estimation on the decoder side. In this case, motion estimation is performed without using the pixel values ​​of the current block.

[0149] Here, a mode for performing motion estimation on the decoding device side is described. This mode for performing motion estimation on the decoding device side is called PMMVD (pattern matched motion vector derivation) mode or FRUC (frame rate up-conversion) mode.

[0150] exist Figure 5D An example of FRUC processing is shown in Figure 1. First, a list of multiple candidates, each containing a predicted motion vector, is generated (this list can also be shared with a merge list) by referring to the motion vectors of previously coded blocks that are spatially or temporally adjacent to the current block. Next, the best candidate MV is selected from the multiple candidate MVs registered in the candidate list. For example, an evaluation value is calculated for each candidate in the candidate list, and one candidate is selected based on the evaluation value.

[0151] Then, based on the selected candidate motion vector, a motion vector for the current block is derived. Specifically, for example, the selected candidate motion vector (best candidate MV) is derived as is as the motion vector for the current block. Alternatively, for example, the motion vector for the current block can be derived by performing pattern matching in the area surrounding the position in the reference picture corresponding to the selected candidate motion vector. Specifically, the area surrounding the best candidate MV can be searched using the same method, and if an MV with a better evaluation value is found, the best candidate MV is updated to the aforementioned MV, which is then used as the final MV for the current block. Alternatively, a configuration can be employed where this process is not performed.

[0152] Exactly the same processing can be performed even when processing is performed in sub-block units.

[0153] The evaluation value is calculated by pattern matching between a region in a reference picture corresponding to a motion vector and a predetermined region to obtain a difference value of the reconstructed image. The evaluation value may also be calculated using information other than the difference value.

[0154] As pattern matching, first pattern matching or second pattern matching is used. The first pattern matching and the second pattern matching are sometimes called bilateral matching and template matching, respectively.

[0155] In the first pattern matching, pattern matching is performed between two blocks in two different reference pictures that are along the motion trajectory of the current block. Therefore, in the first pattern matching, the area in the other reference pictures along the motion trajectory of the current block is used as the predetermined area for calculating the candidate evaluation value.

[0156] Figure 6 This is a diagram for explaining an example of pattern matching (bidirectional matching) between two blocks along a motion trajectory. Figure 6 As shown, in the first pattern matching, two motion vectors (MV0, MV1) are derived by searching for the best-matching pair of blocks in two different reference pictures (Ref0, Ref1) along the motion trajectory of the current block (Cur block). Specifically, for the current block, the difference between the reconstructed image at a specified position in the first coded reference picture (Ref0) specified by the candidate MV and the reconstructed image at a specified position in the second coded reference picture (Ref1) specified by the symmetric MV scaled by the display time interval is derived, and the evaluation value is calculated using the obtained difference. The candidate MV with the best evaluation value among multiple candidate MVs can be selected as the final MV.

[0157] Assuming a continuous motion trajectory, the motion vectors (MV0, MV1) indicating the two reference blocks are proportional to the temporal distance (TD0, TD1) between the current picture (Cur Pic) and the two reference pictures (Ref0, Ref1). For example, if the current picture is temporally located between the two reference pictures and the temporal distances from the current picture to the two reference pictures are equal, mirror-symmetric bidirectional motion vectors are derived in the first pattern matching.

[0158] In the second pattern matching, pattern matching is performed between a template in the current picture (a block adjacent to the current block in the current picture (e.g., an upper and / or left adjacent block)) and a block in the reference picture. Therefore, in the second pattern matching, blocks adjacent to the current block in the current picture are used as the predetermined area for calculating candidate evaluation values.

[0159] Figure 7 is a diagram for explaining an example of pattern matching (template matching) between a template in a current picture and a block in a reference picture. Figure 7 As shown, in the second pattern matching, the motion vector of the current block is derived by searching the reference picture (Ref0) for a block that best matches the block adjacent to the current block (Cur block) in the current picture (Cur Pic). Specifically, for the current block, the difference between the reconstructed image of the coded area adjacent to the left and above, or one of the two, and the reconstructed image at the same position in the coded reference picture (Ref0) specified by the candidate MV is derived. The obtained difference value is used to calculate the evaluation value, and the candidate MV with the best evaluation value among multiple candidate MVs is selected as the best candidate MV.

[0160] Such information indicating whether FRUC mode is adopted (e.g., called a FRUC flag) is signaled at the CU level. Furthermore, when FRUC mode is adopted (e.g., when the FRUC flag is true), information indicating the pattern matching method (first pattern matching or second pattern matching) (e.g., called a FRUC mode flag) is signaled at the CU level. Furthermore, the signaling of this information is not limited to the CU level and may be performed at other levels (e.g., sequence level, picture level, slice level, tile level, CTU level, or sub-block level).

[0161] Here, a mode for deriving motion vectors based on a model assuming uniform linear motion is described. This mode is sometimes called BIO (bi-directional optical flow).

[0162] Figure 8 This is a diagram used to illustrate a model assuming constant velocity linear motion. Figure 8 In (v x , v y ) represents the velocity vector, τ0 and τ1 represent the temporal distance between the current picture (Cur Pic) and the two reference pictures (Ref0, Ref1), respectively. (MVx0, MVy0) represent the motion vector corresponding to the reference picture Ref0, and (MVx1, MVy1) represent the motion vector corresponding to the reference picture Ref1.

[0163] At this time, the velocity vector (v x , v y ), (MVx0, MVy0) and (MVx1, MVy1) are expressed as (vxτ0, vyτ0) and (-vxτ1, -vyτ1), respectively, and the following optical flow equation (1) holds.

[0164] [Formula 1]

[0165]

[0166] Here, I (k) represents the luminance value of reference image k (k = 0, 1) after motion compensation. This optical flow equation states that the sum of (i) the temporal differential of the luminance value, (ii) the product of the horizontal velocity and the horizontal component of the spatial gradient of the reference image, and (iii) the product of the vertical velocity and the vertical component of the spatial gradient of the reference image is equal to zero. Based on this optical flow equation combined with Hermite interpolation, the block-level motion vector obtained from the merge list, etc., is corrected on a pixel-by-pixel basis.

[0167] Furthermore, the decoding device may derive motion vectors using a method different from the method based on a model assuming constant velocity linear motion. For example, motion vectors may be derived on a sub-block basis based on motion vectors of a plurality of adjacent blocks.

[0168] Here, a mode for deriving a motion vector in sub-block units based on motion vectors of a plurality of adjacent blocks will be described. This mode is sometimes called an affine motion compensation prediction mode.

[0169] Figure 9A This figure is used to explain the derivation of a motion vector for a sub-block unit based on the motion vectors of a plurality of adjacent blocks. Figure 9AIn the example, the current block consists of 16 4×4 sub-blocks. Here, the motion vector v0 of the upper left corner control point of the current block is derived based on the motion vectors of the adjacent blocks, and the motion vector v1 of the upper right corner control point of the current block is derived based on the motion vectors of the adjacent sub-blocks. Furthermore, using the two motion vectors v0 and v1, the motion vectors (v x , v y ).

[0170] [Formula 2]

[0171]

[0172] Here, x and y represent the horizontal position and vertical position of the sub-block, respectively, and w represents a preset weight coefficient.

[0173] Such affine motion compensation prediction modes may include several modes that differ in how the motion vectors of the upper left and upper right control points are derived. Information indicating such affine motion compensation prediction modes (e.g., an affine flag) is signaled at the CU level. Furthermore, signaling of information indicating the affine motion compensation prediction mode need not be limited to the CU level and may also be performed at other levels (e.g., sequence level, picture level, slice level, tile level, CTU level, or sub-block level).

[0174] [Prediction Control Department]

[0175] The prediction control unit 128 selects one of the intra prediction signal and the inter prediction signal, and outputs the selected signal as a prediction signal to the subtraction unit 104 and the addition unit 116 .

[0176] Here, an example of deriving a motion vector of a picture to be encoded using the merge mode will be described. Figure 9B This is a diagram for explaining the outline of motion vector derivation processing based on the merge mode.

[0177] First, a prediction MV list is generated, in which candidates for prediction MVs are registered. Examples of candidate prediction MVs include MVs belonging to multiple coded blocks spatially surrounding the current block (spatial neighbor prediction MVs), MVs belonging to blocks near the position of the current block projected in the coded reference picture (temporal neighbor prediction MVs), MVs generated by combining the MV values ​​of the spatial neighbor prediction MV and the temporal neighbor prediction MV (joint prediction MV), and MVs with a value of zero (zero prediction MV).

[0178] Next, one predicted MV is selected from a plurality of predicted MVs registered in the predicted MV list, thereby determining the MV of the current block to be encoded.

[0179] Furthermore, in the variable-length coding unit, merge_idx, which is a signal indicating which predicted MV is selected, is described in the stream and encoded.

[0180] In addition, Figure 9B The predicted MVs registered in the predicted MV list described in the figure are just examples, and may be a number different from that in the figure, or a structure that does not include some of the types of predicted MVs in the figure, or a structure that adds predicted MVs other than the types in the figure.

[0181] Alternatively, the DMVR process described later may be performed using the MV of the encoding target block derived in the merge mode to determine the final MV.

[0182] Here, an example of determining MV using DMVR processing is described.

[0183] Figure 9C This is a conceptual diagram used to explain the outline of DMVR processing.

[0184] First, the optimal MVP set for the processing object block is used as the candidate MV. According to the above candidate MV, reference pixels are obtained from the first reference image of the processed image in the L0 direction and the second reference image of the processed image in the L1 direction, and a template is generated by taking the average of each reference pixel.

[0185] Next, using the template, the surrounding areas of the candidate MVs in the first and second reference images are searched, and the MV with the lowest cost is determined as the final MV. The cost is calculated using the difference between the pixel values ​​in the template and the search area, as well as the MV value.

[0186] Note that the outline of the processing described here is basically common to both the encoding device and the decoding device.

[0187] Furthermore, even if it is not the process described here, any other process may be used as long as it can search the vicinity of the candidate MV and derive the final MV.

[0188] Here, a mode for generating a predicted image using the LIC process will be described.

[0189] Figure 9D This is a diagram for explaining an overview of a method for generating a predicted image using a brightness correction process based on an LIC process.

[0190] First, an MV for acquiring a reference image corresponding to a current block to be encoded is derived from a reference picture that is an already encoded picture.

[0191] Next, for the encoding target block, the brightness pixel values ​​of the encoded surrounding reference areas adjacent to the left and above and the brightness pixel values ​​at the same position in the reference picture specified by MV are used to extract information indicating how the brightness values ​​in the reference picture and the encoding target picture change, and calculate the brightness correction parameters.

[0192] By performing brightness correction processing on the reference image in the reference picture specified by the MV using the brightness correction parameters, a predicted image for the encoding target block is generated.

[0193] in addition, Figure 9D The shape of the peripheral reference area in the figure is an example, and shapes other than these may be used.

[0194] In addition, the process of generating a predicted image based on one reference picture is described here, but the same is true when generating a predicted image based on multiple reference pictures. The predicted image is generated after brightness correction processing is performed on the reference pictures obtained from each reference picture in the same way.

[0195] One method for determining whether to use the LIC process involves, for example, using a lic_flag, which serves as a signal indicating whether the LIC process is used. Specifically, the encoder determines whether the block being coded belongs to an area where luminance changes. If the block belongs to an area where luminance changes, the lic_flag is set to a value of 1, and coding is performed using the LIC process. If the block does not belong to an area where luminance changes, the lic_flag is set to a value of 0, and coding is performed without using the LIC process. Meanwhile, the decoder decodes the lic_flag described in the stream, switching whether to use the LIC process based on the value of the flag, and then performs decoding.

[0196] Another method for determining whether to use the LIC process is to determine whether the LIC process was used in surrounding blocks. As a specific example, when the current block is in merge mode, a determination is made as to whether the surrounding coded blocks selected during MV derivation in merge mode were coded using the LIC process. Based on the determination, whether or not to use the LIC process is switched for coding. In this example, the decoding process is also identical.

[0197] [Overview of Decoding Device]

[0198] Next, an overview of a decoding device capable of decoding the coded signal (coded bit stream) output from the coding device 100 will be described. Figure 10This is a block diagram showing the functional structure of decoding apparatus 200 according to Embodiment 1. Decoding apparatus 200 is a moving picture / image decoding apparatus that decodes a moving picture / image in units of blocks.

[0199] like Figure 10 As shown, the decoding device 200 includes an entropy decoding unit 202, an inverse quantization unit 204, an inverse transformation unit 206, an addition unit 208, a block memory 210, a loop filter unit 212, a frame memory 214, an intra-frame prediction unit 216, an inter-frame prediction unit 218 and a prediction control unit 220.

[0200] Decoding device 200 is implemented, for example, by a general-purpose processor and memory. In this case, when the processor executes a software program stored in the memory, the processor functions as an entropy decoding unit 202, an inverse quantization unit 204, an inverse transform unit 206, an addition unit 208, a loop filter unit 212, an intra-frame prediction unit 216, an inter-frame prediction unit 218, and a prediction control unit 220. Alternatively, decoding device 200 may be implemented as one or more dedicated electronic circuits corresponding to entropy decoding unit 202, inverse quantization unit 204, inverse transform unit 206, addition unit 208, loop filter unit 212, intra-frame prediction unit 216, inter-frame prediction unit 218, and prediction control unit 220.

[0201] Hereinafter, each component included in the decoding device 200 will be described.

[0202] [Entropy decoding unit]

[0203] The entropy decoding unit 202 performs entropy decoding on the coded bitstream. Specifically, the entropy decoding unit 202 arithmetically decodes the coded bitstream into a binary signal. The entropy decoding unit 202 then debinarizes the binary signal. The entropy decoding unit 202 then outputs the quantized coefficients on a block-by-block basis to the inverse quantization unit 204.

[0204] [Inverse quantization unit]

[0205] The inverse quantization unit 204 inversely quantizes the quantized coefficients of the decoding target block (hereinafter referred to as the current block) input from the entropy decoding unit 202. Specifically, the inverse quantization unit 204 inversely quantizes the quantized coefficients of the current block based on the quantization parameters corresponding to the quantized coefficients. The inverse quantization unit 204 then outputs the inversely quantized coefficients (i.e., transform coefficients) of the current block to the inverse transform unit 206.

[0206] [Inverse transformation unit]

[0207] The inverse transform unit 206 restores the prediction error by performing inverse transform on the transform coefficients input from the inverse quantization unit 204 .

[0208] For example, when the information read from the coded bitstream indicates that EMT or AMT is adopted (for example, the AMT flag is true), the inverse transform unit 206 performs an inverse transform on the transform coefficients of the current block based on the read information indicating the transform type.

[0209] Furthermore, for example, when the information decoded from the coded bit stream indicates that NSST is adopted, the inverse transform unit 206 applies inverse re-transformation to the transform coefficients.

[0210] [Addition Department]

[0211] The adder 208 reconstructs the current block by adding the prediction error input from the inverse transform unit 206 and the prediction sample input from the prediction control unit 220 . The adder 208 then outputs the reconstructed block to the block memory 210 and the loop filter unit 212 .

[0212] [Block Memory]

[0213] The block memory 210 is a storage unit for storing blocks in a decoding target picture (hereinafter referred to as a current picture) to be referenced in intra prediction. Specifically, the block memory 210 stores the reconstructed blocks output from the adding unit 208 .

[0214] [Loop filter unit]

[0215] The loop filter unit 212 performs loop filtering on the block reconstructed by the adder unit 208 and outputs the filtered reconstructed block to the frame memory 214 and a display device.

[0216] When the ALF on / off information read from the coded bitstream indicates that ALF is on, one filter is selected from a plurality of filters based on the direction and activity of the local gradient, and the selected filter is applied to the reconstructed block.

[0217] [Frame Memory]

[0218] The frame memory 214 is a storage unit for storing reference pictures used in inter-frame prediction and is sometimes referred to as a frame buffer. Specifically, the frame memory 214 stores the reconstructed blocks filtered by the loop filter unit 212.

[0219] [Intra-frame prediction unit]

[0220] The intra prediction unit 216 performs intra prediction based on the intra prediction mode read from the coded bitstream, referring to blocks in the current picture stored in the block memory 210, thereby generating a prediction signal (intra prediction signal). Specifically, the intra prediction unit 216 performs intra prediction by referring to samples (e.g., luminance values ​​and chrominance values) of blocks adjacent to the current block, thereby generating an intra prediction signal and outputting the intra prediction signal to the prediction control unit 220.

[0221] Furthermore, when an intra prediction mode that refers to a luminance block is selected in intra prediction of a chrominance block, the intra prediction unit 216 may predict the chrominance component of the current block based on the luminance component of the current block.

[0222] Furthermore, when the information read from the coded bit stream indicates the adoption of PDPC, the intra prediction unit 216 corrects the pixel value after intra prediction based on the gradient of the reference pixel in the horizontal and vertical directions.

[0223] [Inter-frame prediction unit]

[0224] The inter-frame prediction unit 218 predicts the current block by referring to the reference picture stored in the frame memory 214. Prediction is performed on the current block or on a sub-block (e.g., a 4×4 block) within the current block. For example, the inter-frame prediction unit 218 performs motion compensation using motion information (e.g., a motion vector) read from the coded bitstream to generate an inter-frame prediction signal for the current block or sub-block, and outputs the inter-frame prediction signal to the prediction control unit 220.

[0225] Furthermore, when the information read from the coded bitstream indicates that the OBMC mode is adopted, the inter prediction unit 218 generates an inter prediction signal using not only the motion information of the current block obtained by motion estimation but also the motion information of adjacent blocks.

[0226] Furthermore, when the information decoded from the coded bitstream indicates that the FRUC mode is used, the inter-frame prediction unit 218 performs motion estimation using the pattern matching method (bidirectional matching or template matching) decoded from the coded stream to derive motion information. Furthermore, the inter-frame prediction unit 218 performs motion compensation using the derived motion information.

[0227] Furthermore, when the BIO mode is used, the inter-frame prediction unit 218 derives a motion vector based on a model assuming constant-speed linear motion. Furthermore, when the information decoded from the coded bitstream indicates that the affine motion compensation prediction mode is used, the inter-frame prediction unit 218 derives a motion vector on a sub-block basis based on the motion vectors of multiple adjacent blocks.

[0228] [Prediction Control Department]

[0229] The prediction control unit 220 selects one of the intra prediction signal and the inter prediction signal, and outputs the selected signal to the addition unit 208 as a prediction signal.

[0230] (First embodiment of the first embodiment)

[0231] Next, the first aspect of the first embodiment will be described in detail with reference to the drawings.

[0232] [Internal Structure of the Transformation Unit of the Encoding Device]

[0233] First, refer to Figure 11A The internal structure of the transform unit 106 of the encoding device 100 according to this embodiment will be described. Figure 11A This is a block diagram showing the internal structure of the transformation unit 106 of the encoding device 100 according to the first mode of embodiment 1.

[0234] like Figure 11A As shown, the transformation unit 106 according to this embodiment includes a transformation mode determination unit 1061 , a size determination unit 1062 , a first transformation base selection unit 1063 , a first transformation unit 1064 , a second transformation implementation determination unit 1065 , a second transformation base selection unit 1066 , and a second transformation unit 1067 .

[0235] The transform mode determination unit 1061 determines whether the adaptive transform base selection mode is valid for the current block. The adaptive transform base selection mode is a mode for adaptively selecting a transform base from one or more first transform base candidates. The determination of whether the adaptive transform base selection mode is valid is made based on, for example, identification information of the first transform base or the adaptive transform base selection mode.

[0236] The size determination unit 1062 determines whether the horizontal size of the current block to be encoded exceeds a first horizontal threshold size. Furthermore, the size determination unit 1062 determines whether the vertical size of the current block to be encoded exceeds a first vertical threshold size. The first horizontal threshold size may be the same as or different from the first vertical threshold size. The first horizontal threshold size and the first vertical threshold size may be predefined, for example, in a standard. Furthermore, for example, the first horizontal threshold size and the first vertical threshold size may be determined based on the image or may be encoded in the bitstream.

[0237] The first transformation base selection unit 1063 selects a first transformation base. In the present invention, selecting a base includes not only selecting at least one base from a plurality of base candidates, but also determining or setting at least one base without a plurality of base candidates.

[0238] When the adaptive transform base selection mode is not valid, the first transform base selection unit 1063 selects one basic transform base as the first transform base for the horizontal and vertical directions. Furthermore, when the adaptive transform base selection mode is valid, the first transform base selection unit 1063 selects the first transform base for the horizontal and vertical directions as described in the following (1) to (4) based on the horizontal and vertical sizes of the encoding target block.

[0239] (1) When the horizontal size of the encoding target block is larger than the first horizontal threshold size, the first transform base selection unit 1063 adaptively selects a first transform base in the horizontal direction from one or more transform base candidates.

[0240] (2) When the horizontal size of the encoding target block is equal to or smaller than the first horizontal threshold size, the first transform base selection unit 1063 selects a fixed transform base in the horizontal direction as the first transform base in the horizontal direction.

[0241] (3) When the vertical size of the encoding target block is larger than the first vertical threshold size, the first transform base selection unit 1063 adaptively selects a first transform base in the vertical direction from one or more transform base candidates.

[0242] (4) When the vertical size of the encoding target block is equal to or smaller than the first vertical threshold size, the first transform base selection unit 1063 selects a fixed transform base in the vertical direction as the first transform base in the vertical direction.

[0243] The fixed transformation basis in the horizontal direction may be the same as or different from the fixed transformation basis in the vertical direction. As the fixed transformation basis in the horizontal and vertical directions, for example, the transformation basis of discrete sine transform type 7 (DST-VII) can be used.

[0244] The first transform unit 1064 performs a first transform on the residual of the encoding target block using the first transform base selected by the first transform base selection unit 1063, thereby generating first transform coefficients. Specifically, the first transform unit 1064 performs the first horizontal transform using the first horizontal transform base and performs the first vertical transform using the first vertical transform base.

[0245] The second transform execution determination unit 1065 determines whether to execute a second transform that further transforms the first transform coefficients based on whether the adaptive transform base selection mode is valid in the encoding target block. Specifically, the second transform execution determination unit 1065 executes the second transform if the adaptive transform base selection mode is not valid, and determines not to execute the second transform if the adaptive transform base selection mode is valid.

[0246] If the second transform is determined to be performed, the second transform base selector 1066 selects the second transform base. Specifically, if the adaptive transform base selection mode is not enabled, the second transform base selector 1066 selects the second transform base. Conversely, if the adaptive transform base selection mode is enabled, the second transform base selector 1066 does not select the second transform base. Specifically, if the adaptive transform base selection mode is enabled, the second transform base selector 1066 skips selecting the second transform base.

[0247] If it is determined that the second transform is to be performed, the second transform unit 1067 transforms the first transform coefficients using the second transform base selected by the second transform base selection unit 1066. That is, if the adaptive transform base selection mode is not valid, the second transform unit 1067 generates the second transform coefficients by performing the second transform on the first transform coefficients using the second transform base. Conversely, if the adaptive transform base selection mode is valid, the second transform unit 1067 does not perform the second transform on the first transform coefficients. That is, if the adaptive transform base selection mode is valid, the second transform unit 1067 skips the second transform.

[0248] [Internal Structure of the Inverse Transformation Unit of the Encoding Device]

[0249] Next, refer to Figure 11B The internal structure of the inverse transform unit 114 of the encoding device 100 according to this embodiment will be described. Figure 11B This is a block diagram showing the internal structure of the inverse transform unit 114 of the encoding device 100 according to the first aspect of the first embodiment.

[0250] like Figure 11B As shown, the inverse transform unit 114 according to this embodiment includes a second inverse transform base selection unit 1141 , a second inverse transform unit 1142 , a first inverse transform base selection unit 1143 , and a first inverse transform unit 1144 .

[0251] When the adaptive transform base selection mode is not valid in the encoding target block, the second inverse transform base selection unit 1141 selects the inverse transform base of the second transform base selected by the second transform base selection unit 1066 as the second inverse transform base.

[0252] If the adaptive transform base selection mode is not valid for the encoding target block, the second inverse transform unit 1142 generates second inverse transform coefficients by performing a second inverse transform on the inverse quantized coefficients using the second inverse transform base selected by the second inverse transform base selection unit 1141. The inverse quantized coefficients are coefficients inversely quantized by the inverse quantization unit 112.

[0253] The first inverse transform base selection unit 1143 selects an inverse transform base of the first transform base selected by the first transform base selection unit 1063 as a first inverse transform base.

[0254] If the adaptive transform base selection mode is not valid for the current block, the first inverse transform unit 1144 reconstructs the residual of the current block by performing a first inverse transform on the second inverse transform coefficients using the first inverse transform base. On the other hand, if the adaptive transform base selection mode is valid for the current block, the first inverse transform is performed on the inverse quantized coefficients using the first inverse transform base to reconstruct the residual of the current block.

[0255] [Processing of the Transformation Unit and Quantization Unit of the Encoding Device]

[0256] Next, refer to the processing of the quantization unit 108 Figure 12A The processing of the conversion unit 106 configured as above will be described. Figure 12A This is a flowchart showing the processing of the transform unit 106 and the quantization unit 108 of the encoding device 100 according to the first aspect of the first embodiment.

[0257] The transform mode determination unit 1061 determines whether the adaptive transform base selection mode is valid in the encoding target block ( S101 ).

[0258] When the adaptive transform base selection mode is not valid (No in S101 ), the first transform base selection unit 1063 selects one basic transform base as the first transform base in the horizontal and vertical directions ( S102 ).

[0259] If the adaptive transform base selection mode is valid (Yes in S101), the size determination unit 1062 determines whether the horizontal transform size exceeds a certain range (S103). In other words, the size determination unit 1062 determines whether the horizontal size of the encoding target block is larger than the first horizontal threshold size.

[0260] When the transform size in the horizontal direction exceeds a certain range (Yes in S103 ), the first transform base selection unit 1063 selects a transform base in the horizontal direction from a plurality of adaptive transform bases as a first transform base in the horizontal direction ( S104 ).

[0261] When the transform size in the horizontal direction is within a certain range (No in S103 ), the first transform base selection unit 1063 selects a fixed transform base as the first transform base in the horizontal direction ( S105 ).

[0262] Next, the size determination unit 1062 determines whether the vertical transformation size exceeds a certain range (S106). In other words, the size determination unit 1062 determines whether the vertical size of the encoding target block is larger than a first vertical threshold size.

[0263] When the transform size in the vertical direction exceeds a certain range (Yes in S106 ), the first transform base selection unit 1063 selects a transform base in the vertical direction from a plurality of adaptive transform bases as a first transform base in the vertical direction ( S107 ).

[0264] When the transform size in the vertical direction is within a certain range (No in S106 ), the first transform base selection unit 1063 selects a fixed transform base as the first transform base in the vertical direction ( S108 ).

[0265] Furthermore, the order of selecting the transformation bases in the horizontal and vertical directions may be the order of the horizontal and vertical directions, or the reverse order. Furthermore, the transformation bases in the horizontal and vertical directions may be selected simultaneously.

[0266] The first transform unit 1064 performs a first transform on the prediction residual using the first transform base selected in step S102 , S107 , or step S108 , and generates a first transform coefficient ( S109 ).

[0267] Next, the second transform execution determination unit 1065 determines whether to execute the second transform on the first transform coefficients ( S110 ). Here, the second transform execution determination unit 1065 determines whether to execute the second transform based on whether the adaptive transform base selection mode is valid in the encoding target block.

[0268] When the adaptive transform base selection mode is valid (Yes in S110), neither the selection of the second transform base nor the second transform is performed, and the quantization unit 108 generates quantized coefficients by quantizing the first transform coefficients (S113). Figure 12A Step S111 and step S112.

[0269] If the adaptive transform base selection mode is not valid (No in S110), the second transform base selection unit 1066 selects a second transform base from one or more second transform base candidates (S111). The second transform unit 1067 then performs a second transform on the first transform coefficients using the selected second transform base to generate second transform coefficients (S112). The quantization unit 108 then quantizes the second transform coefficients to generate quantized coefficients (S113).

[0270] As the basic transform basis, a predetermined transform basis can be used. In this case, whether the adaptive transform basis selection mode is enabled can be determined based on whether the first transform basis in the horizontal and vertical directions is the predetermined transform basis. Furthermore, the predetermined transform basis can be a single transform basis or two or more transform bases.

[0271] Furthermore, when the second transform is not performed (skipped), the second transform may be omitted, or a transform equivalent to not performing the transform may be performed as the second transform. In the former case, information indicating that the second transform is not performed may also be encoded in the bitstream. Furthermore, in the latter case, information indicating that the transform equivalent to not performing the transform may also be encoded in the bitstream. The same applies to the process of skipping each transform below.

[0272] also, Figure 12A The steps and the order of the steps shown are examples and are not limited thereto. Figure 12B As shown, it can also be combined Figure 12A The determination of the adaptive transformation base selection mode (S101) and the implementation determination of the second transformation (S110) are performed. Figure 12B This is a flowchart showing a modified example of the processing of the transform unit 106 and the quantization unit 108 of the encoding device 100 according to the first aspect of the first embodiment. Figure 12B The flowchart is with Figure 12A The flowchart of is essentially equivalent to the flowchart of .

[0273] exist Figure 12B In this case, the second transform execution determination unit 1065 is not required to be provided with the second transform execution determination unit 1065.

[0274] Regarding the selection of the second inverse transformation basis and the second inverse transformation in the inverse transformation unit 114, and the selection of the first inverse transformation basis and the first inverse transformation, as long as Figure 12A It can be implemented by the transformation of the transformation unit 106, so the description and illustration are omitted.

[0275] Furthermore, the first transform can be a frequency transform that adaptively selects a transform base, such as the EMT described in Non-Patent Document 2, a frequency transform that switches the transform base under certain conditions, or another general transform. For example, instead of selecting the first transform base, a fixed transform base can be set. Alternatively, a first transform base equivalent to not performing the first transform can be used. Furthermore, in the first transform, identification information indicating which of the two modes, an adaptive transform base selection mode or a fixed transform base mode using a fixed basic transform base (e.g., a transform base of type 2 discrete cosine transform (DCT-II)), is effective, can be used to select one of the two modes. In this case, the identification information can also be used to determine which of the adaptive transform base selection mode and the fixed transform base mode is effective for the current block. For example, in the EMT described in Non-Patent Document 2, identification information (emt_cu_flag) indicates whether the adaptive transform base selection mode is effective in units of CUs (Coding Units), so this identification information can be used to determine whether the adaptive transform base selection mode is effective for the current block.

[0276] In addition, the second transform may be a secondary transform process such as the NSST described in non-patent document 2, or a transform in which the transform base is switched under certain conditions, or other general transforms. For example, instead of selecting the second transform base, a fixed transform base may be set. In addition, a second transform base equivalent to not implementing the second transform may also be used. In addition, NSST may be a frequency-space transform after DCT or DST, for example, a KLT (Karhunen Loveve Transform) or a basis equivalent to KLT that represents the transform coefficients for the DCT or DST obtained offline, or a HyGT (Hypercube-Givens Transform) represented by a combination of rotation transforms.

[0277] Furthermore, this processing can be applied to both luminance and color-difference signals, and as long as the input signal is in RGB format, it can be applied to each of the R, G, and B signals. Furthermore, the bases selectable in the first or second transform can be different for the luminance and color-difference signals. For example, since the luminance signal has a wider bandwidth than the color-difference signal, a wider variety of bases can be used as candidate bases in the first or second transform of the luminance signal than for the color-difference signal to achieve optimal transformation. Furthermore, this processing can be applied to both intra-frame and inter-frame processing.

[0278] [Effects, etc.]

[0279] In the first transform (primary transform) and the second transform (secondary transform) described in Non-Patent Document 2, the optimal transform basis or transform coefficient (filter) is selected to achieve the overall optimal coding efficiency. Therefore, in order to search for the optimal combination of candidate transform bases and transform coefficients (filters) used in the first transform and the second transform, it is necessary to try the first transform and the second transform multiple times. In other words, in the transform method described in Non-Patent Document 2, it is necessary to calculate evaluation values ​​for all combinations of candidate transform bases for the first transform and candidate transform bases for the second transform, and select the combination with the smallest evaluation value. Therefore, the present inventors have discovered that the transform method described in Non-Patent Document 2 requires a large amount of processing.

[0280] Therefore, the encoding device 100 according to this embodiment does not always perform both the first transform and the second transform, but skips the second transform based on whether the adaptive transform base selection mode is valid. This allows the encoding device 100 to reduce the number of combinations of candidate transform bases for the first transform and candidate transform bases for the second transform, thereby reducing the amount of processing.

[0281] Furthermore, according to the encoding device 100 according to this embodiment, candidates for the first transform base can be limited based on conditions for the horizontal and vertical transform sizes. This reduces the amount of processing required to perform a trial search for the optimal first transform base. Furthermore, based on conditions such as the base selected in the first transform base, the amount of processing required to perform a trial search for the optimal second transform base can be reduced. Furthermore, the amount of processing required to perform a trial search for combinations of the first and second transforms can be reduced.

[0282] For example, a DCT-II transform basis can be used as the basic transform basis. DCT-II is likely to be used when the residual shape is flat or randomly used. For example, if DCT-II is used as the first transform basis, the effect of the second transform may be improved due to the tendency of increasing the degree of convergence toward low frequencies. On the other hand, with transform bases other than DCT-II, high-frequency components are likely to remain, and the effect of the second transform may be reduced.

[0283] As an example, the DST-VII transform base can be used as a fixed transform base selected when the transform size is within a certain range. In particular, in intra-frame processing, DST-VII tends to be selected with a very high probability when the residual shape is skewed and the size is small.

[0284] In addition, the basic transformation base is not limited to one predetermined transformation base, and multiple predetermined transformation bases may be used.

[0285] Furthermore, whether or not to perform the second transform base selection and the second transform can be switched according to the transform size. Furthermore, the second transform base candidates can also be switched according to the transform size.

[0286] Alternatively, it is also possible to configure the switching of whether to perform the second transform only based on whether the adaptive transform base selection mode is valid, without switching the first transform base according to the transform size. Figure 12A In the embodiment, steps S103, S105, S106 and S108 may be deleted. Here, whether the adaptive transform base selection mode is valid may be determined based on identification information indicating the use of the mode or the type of the first transform base.

[0287] Similarly, it is also possible to configure such that the switching of the second transform execution based on whether the adaptive transform base selection mode is valid is not performed, but only the switching of the first transform base according to the transform size is performed. Figure 12A In the embodiment of the present invention, step S110 may also be deleted.

[0288] Furthermore, regardless of whether the adaptive transform base selection mode is valid or not, the selection of the second transform base and the second transform may not be skipped. Furthermore, regardless of the method for selecting the first transform base, when the adaptive transform base selection mode is not valid, the selection of the second transform base and the second transform may be performed, and when the adaptive transform base selection mode is valid, the selection of the second transform base and the second transform may be skipped.

[0289] In addition, as a threshold value of a specific transformation size in the horizontal or vertical direction (i.e., the first horizontal threshold size and the first vertical threshold size) for selecting a candidate as the first transformation base from multiple adaptive transformation bases or selecting a fixed transformation base, 4, 8, 16, 32 or 64 pixels, etc. can also be used.

[0290] [Combination with other methods]

[0291] This embodiment may be implemented in combination with at least a portion of other embodiments of the present invention. In addition, a portion of the processing, a portion of the device structure, a portion of the syntax, etc. described in the flowchart of this embodiment may be implemented in combination with other embodiments.

[0292] (Second embodiment of the first embodiment)

[0293] Next, the second embodiment of the first embodiment will be described. In this embodiment, an example of encoding various signals related to the first transform and the second transform in the first embodiment will be described. Below, this embodiment will be specifically described with reference to the accompanying drawings, focusing on the differences from the first embodiment.

[0294] Note that the internal structures of the transform unit 106 and the inverse transform unit 114 of the encoding device 100 according to this embodiment are the same as those of the first embodiment, and therefore are omitted from the illustration.

[0295] [Processing by the Transformation Unit, Quantization Unit, and Entropy Coding Unit of the Coding Device]

[0296] Reference Figure 13A and Figure 13B , the processing of the transform unit 106, the quantization unit 108, and the entropy coding unit 110 of the encoding device 100 according to this embodiment is described. Figure 13A This is a flowchart showing the processing of the transform unit 106 and the quantization unit 108 of the encoding device 100 according to the second aspect of the first embodiment. Figure 13B 1 is a flowchart showing the processing of the entropy coding unit 110 of the coding device 100 according to the second aspect of the first embodiment. Figure 13A and Figure 13B In the embodiment, the same reference numerals are used for the processes that are common to the first embodiment, and the description thereof is omitted.

[0297] After quantization ( S113 ), the entropy coding unit 110 codes the adaptive transform base selection mode signal ( S201 ). The adaptive transform base selection mode signal is an example of identification information of the adaptive transform base selection mode.

[0298] Then, if the adaptive transform base selection mode is valid (Yes in S202), if the transform size in the horizontal direction exceeds a certain range (Yes in S203), the entropy coding unit 110 encodes the first base selection signal in the horizontal direction (S204). On the other hand, if the transform size in the horizontal direction is within the certain range (No in S203), the entropy coding unit 110 does not encode the first base selection signal in the horizontal direction. Furthermore, if the transform size in the vertical direction exceeds the certain range (Yes in S205), the entropy coding unit 110 encodes the first base selection signal in the vertical direction (S206). On the other hand, if the transform size in the vertical direction is within the certain range (No in S205), the entropy coding unit 110 does not encode the first base selection signal in the vertical direction.

[0299] When the adaptive transform base selection mode is not valid (No in S202 ), the encoding of the first base selection signal is skipped ( S204 , S206 ).

[0300] Next, the entropy coding unit 110 encodes the quantized coefficients ( S207 ).

[0301] Here, if the adaptive transform base selection mode is not valid (No in S208), the entropy coding unit 110 encodes the second basis selection signal (S209). On the other hand, if the adaptive transform base selection mode is valid (Yes in S208), the encoding of the second basis selection signal (S209) is skipped.

[0302] Furthermore, the order of each encoding may be preset, and various signals may be encoded in a manner different from the above-described encoding order.

[0303] When the second transformation is not performed (skipped), a signal indicating that the second transformation is not performed may be encoded, or a signal indicating that a second basis equivalent to not performing the transformation is selected may be encoded.

[0304] [grammar]

[0305] Here, the syntax of this method is explained. Figure 14 A specific example of the syntax in the second aspect of the first embodiment is shown.

[0306] exist Figure 14 For example, when the adaptive transform base selection mode signal (emt_cu_flag) is set (line 4), if the horizontal transform size (horizontal_tu_size) is greater than the first horizontal threshold size (horizontal_tu_size_th) (line 5), the first horizontal base selection signal (emt_horizontal_tridx) is encoded (line 6). Furthermore, if the vertical transform size (vertical_tu_size) is greater than the first vertical threshold size (vertical_tu_size_th) (line 11), the first vertical base selection signal (emt_vertical_tridx) is encoded (line 12). In other conditions (lines 8 and 14), encoding of the first base selection signal is skipped (lines 9 and 15).

[0307] Furthermore, when the adaptive transform base selection mode signal (emt_cu_flag) is not set (line 19), the second base selection signal (secondary_tridx) is encoded (line 20). Conversely, when the adaptive transform base selection mode signal (emt_cu_flag) is set (line 22), encoding of the second base selection signal (secondary_tridx) is skipped (line 23).

[0308] [Specific Examples of Transform Bases and Coding Signals]

[0309] Next, specific examples of the transform base and the coded signal are described. Figure 15 A specific example of the transform base used in the second aspect of the first embodiment and the presence or absence of signal coding is shown.

[0310] exist Figure 15In the adaptive transform base selection mode, if it is not enabled, the DCT-II transform basis is used as the first transform basis in the horizontal and vertical directions, regardless of the coding block size. That is, the DCT-II transform basis is used as the basic transform basis. Furthermore, when the second transform (ON) is performed, a second basis selection signal (secondary_tridx) indicating the second transform basis used in the second transform is encoded into the bitstream.

[0311] On the other hand, when the adaptive transform base selection mode is valid, a combination of the DST-VII transform base and other transform bases (index 0 to index 3) is used as a candidate for the first transform base in the horizontal and vertical directions according to the horizontal size H and vertical size V of the encoding target block. In addition, regardless of the size of the encoding target block, the second transform is not implemented (OFF). In addition, although the second base selection signal (secondary_tridx) is not encoded, the adaptive transform base selection mode signal (emt_cu_flag) is encoded in the bitstream. In addition, when the horizontal size H of the encoding target block is greater than 4 pixels, the first base selection signal in the horizontal direction (emt_horizontal_tridx) is encoded in the bitstream. In addition, when the vertical size V of the encoding target block is greater than 4 pixels, the first base selection signal in the vertical direction (emt_vertical_tridx) is encoded in the bitstream.

[0312] For example, when the horizontal size H is less than 4 pixels and the vertical size V is less than 4 pixels, only the DST-VII transform basis is used as a candidate for the first transform basis in the horizontal and vertical directions. In this case, the first basis selection signals for the horizontal and vertical directions (emt_horizontal_tridx and emt_vertical_tridx) are not encoded.

[0313] Furthermore, for example, when the horizontal size H is 4 pixels or less and the vertical size V is greater than 4 pixels, only the DST-VII transformation basis is used as a candidate for the first transformation basis in the horizontal direction, and the DST-VII transformation basis and other transformation bases are used as candidates for the first transformation basis in the vertical direction. In this case, although the first basis selection signal in the horizontal direction (emt_horizontal_tridx) is not encoded, the first basis selection signal in the vertical direction (emt_vertical_tridx) is encoded.

[0314] Furthermore, for example, when the horizontal size H is greater than 4 pixels and the vertical size V is less than or equal to 4 pixels, the DST-VII transform basis and other transform bases are used as candidates for the first transform basis in the horizontal direction, and only the DST-VII transform basis is used as a candidate for the first transform basis in the vertical direction. In this case, the first basis selection signal in the horizontal direction (emt_horizontal_tridx) is encoded, but the first basis selection signal in the vertical direction (emt_vertical_tridx) is not encoded.

[0315] Furthermore, for example, when the horizontal size H is greater than 4 pixels and the vertical size V is greater than 4 pixels, the DST-VII transform basis and other transform bases are used as candidates for the first transform bases in the horizontal and vertical directions. In this case, the first basis selection signals (emt_horizontal_tridx and emt_vertical_tridx) for the horizontal and vertical directions are encoded.

[0316] [Effects, etc.]

[0317] As described above, according to the encoding device 100 according to this embodiment, information indicating the first transform base (first base selection signal) can be encoded only when the adaptive transform base selection mode is valid and the transform size exceeds a certain range, potentially reducing the amount of code required for signaling the first transform base. Furthermore, information indicating the second transform base (second base selection signal) can be encoded only when the adaptive transform base selection mode is not valid, potentially reducing the amount of code required for signaling the second transform base. Furthermore, by encoding information for determining whether to skip the second transform (e.g., the adaptive transform base selection mode signal) before the information indicating the second transform base, it is possible to determine during decoding whether the information indicating the second transform base has been encoded.

[0318] Furthermore, regardless of the adaptive transform base selection mode, the second base selection signal may be always encoded. Furthermore, regardless of the transform size, the first base selection signal may be always encoded if the adaptive transform base selection mode is selected. Furthermore, the presence or absence of encoding of the first base selection signal may be determined independently of the horizontal and vertical dimensions, or may be determined in combination.

[0319] [Combination with other methods]

[0320] This embodiment may be implemented in combination with at least a portion of other embodiments of the present invention. In addition, a portion of the processing, a portion of the device structure, a portion of the syntax, etc. described in the flowchart of this embodiment may be implemented in combination with other embodiments.

[0321] (Third embodiment of the first embodiment)

[0322] Next, the third embodiment of the first embodiment will be described. This embodiment differs from the first embodiment described above in that, when the adaptive transform base selection mode is not enabled, a different basic transform base is used as the first transform base depending on the size of the current block to be encoded. This embodiment will be described in detail below with reference to the accompanying drawings, focusing on the differences from the first and second embodiments.

[0323] Note that the internal structures of the transform unit 106 and the inverse transform unit 114 of the encoding device 100 according to this embodiment are the same as those of the first embodiment, and therefore are omitted from the illustration.

[0324] [Processing of the Transformation Unit and Quantization Unit of the Encoding Device]

[0325] Reference Figure 16 The processing of the transform unit 106 and the quantization unit 108 of the encoding device 100 according to this embodiment will be described. Figure 16 1 is a flowchart showing the processing of the transform unit 106 and the quantization unit 108 of the encoding device 100 according to the third aspect of the first embodiment. Figure 16 In the embodiment, the same reference numerals are used for the processes that are common to the first embodiment, and the description thereof is omitted.

[0326] If the adaptive transform base selection mode is not valid (No in S101), the size determination unit 1062 determines whether the transform size is within a predetermined range (S301). Specifically, the size determination unit 1062 determines whether the size of the current block to be encoded is equal to or smaller than a second threshold size. For example, the size determination unit 1062 determines whether the product of the horizontal and vertical sizes of the current block to be encoded is equal to or smaller than a threshold, thereby determining whether the size of the current block to be encoded is equal to or smaller than the second threshold size.

[0327] Here, if the transform size is within a certain range ("Yes" in S301), the first transform base selection unit 1063 selects the second basic transform base as the first transform base for the horizontal and vertical directions (S302). On the other hand, if the transform size exceeds the certain range ("No" in S301), the first transform base selection unit 1063 selects the first basic transform base as the first transform base for the horizontal and vertical directions (S303).

[0328] As an example, a DCT-II transform basis can be used as the first basic transform basis, and a DST-VII transform basis can be used as the second basic transform basis.

[0329] In addition, the basic transformation basis can also be selected from multiple basic transformation basis candidates.

[0330] Furthermore, regardless of whether the adaptive transform base selection mode is valid or not, the selection of the second transform base and the second transform may not be skipped. Furthermore, regardless of the method for selecting the first transform base, when the adaptive transform base selection mode is not valid, the selection of the second transform base and the second transform may be performed, and when the adaptive transform base selection mode is valid, the selection of the second transform base and the second transform may be skipped.

[0331] Furthermore, when the adaptive transform base selection mode is not enabled, a second threshold size for selecting one of the first and second basic transform bases may be, for example, 4x4, 4x8, 8x4, or 8x8 pixel sizes. Furthermore, as the transform size compared with the threshold, the product of the horizontal and vertical sizes of the current block may be used, as in the present embodiment, or the horizontal and vertical sizes may be used separately.

[0332] In addition, when the adaptive transformation base selection mode is not valid, if the product of the horizontal size and the vertical size is within a certain range, the second basic transformation base can also be selected as the first transformation base in the horizontal and vertical directions, skipping the selection of the second transformation base and the second transformation.

[0333] [Effects, etc.]

[0334] As described above, according to the encoding device 100 according to this embodiment, when the adaptive transform base selection mode is not enabled, the first transform base can be switched between the first base transform base and the second base transform base according to the transform size. Therefore, the first transform can be performed using the first transform base corresponding to the transform size, thereby reducing the amount of code.

[0335] [Combination with other methods]

[0336] This embodiment may be implemented in combination with at least a portion of other embodiments of the present invention. In addition, a portion of the processing, a portion of the device structure, a portion of the syntax, etc. described in the flowchart of this embodiment may be implemented in combination with other embodiments.

[0337] (Fourth embodiment of the first embodiment)

[0338] Next, the fourth embodiment of the first embodiment will be described. In this embodiment, an example of encoding various signals related to the first transform and the second transform of the third embodiment will be described. This embodiment will be specifically described below with reference to the accompanying drawings, focusing on the differences from the first to third embodiments.

[0339] Note that the internal structures of the transform unit 106 and the inverse transform unit 114 of the encoding device 100 according to this embodiment are the same as those of the first embodiment, and therefore are omitted from the illustration.

[0340] [Processing by the Transformation Unit, Quantization Unit, and Entropy Coding Unit of the Coding Device]

[0341] Reference Figure 17A and Figure 17B , the processing of the transform unit 106, the quantization unit 108, and the entropy coding unit 110 of the encoding device 100 according to this embodiment is described. Figure 17A This is a flowchart showing the processing of the transform unit 106 and the quantization unit 108 of the encoding device 100 according to the fourth aspect of the first embodiment. Figure 17B 4 is a flowchart showing the processing of the entropy coding unit 110 of the coding device 100 according to the fourth aspect of the first embodiment. Figure 17A and Figure 17B In the present invention, the same processing as that in any of the first to third aspects is denoted by the same reference numerals and the description thereof is omitted.

[0342] After quantization (S113), the entropy coding unit 110 determines whether to skip coding the adaptive transform base selection mode signal (S401). For example, if either of the following conditions (A) and (B) is satisfied, the entropy coding unit 110 determines to skip coding the adaptive transform base selection mode signal. Otherwise, the entropy coding unit 110 determines not to skip coding the adaptive transform base selection mode signal.

[0343] (A) The adaptive transform basis selection mode is not valid.

[0344] (B) The adaptive transformation base selection mode is valid and all of the following conditions (B1) to (B4) are satisfied.

[0345] (B1) The conversion size is equal to or smaller than the second threshold size W1xH1 used in step S301.

[0346] (B2) The horizontal transformation size is equal to or smaller than the first horizontal threshold size W2 used in step S103.

[0347] (B3) The transformation size in the vertical direction is equal to or smaller than the first vertical threshold size H2 used in step S106.

[0348] (B4) The second basic transformation basis and the fixed transformation basis in the horizontal and vertical directions are the same transformation basis.

[0349] As a specific example, when the second threshold size W1xH1 is 4×4 pixels, the first horizontal threshold size W2 is 4 pixels, the first vertical threshold size H2 is 4 pixels, and the second basic transformation basis and the fixed transformation basis are both DST-VII transformation basis, if the transformation size is less than 4×4 pixels, the entropy coding unit 110 determines to skip the encoding of the adaptive transformation basis selection mode signal.

[0350] On the contrary, when any one of the above conditions (A) and (B) is not satisfied, the entropy coding unit 110 determines not to skip coding of the adaptive transform base selection mode signal.

[0351] Here, if it is determined that the encoding of the adaptive transform base selection mode signal is skipped ("Yes" in S401), the entropy coding unit 110 skips steps S201 to S206 and encodes the quantized coefficients (S207). On the other hand, if it is determined that the encoding of the adaptive transform base selection mode signal is not skipped ("No" in S401), the entropy coding unit 110 executes steps S201 to S206 in the same manner as in the second embodiment and then encodes the quantized coefficients (S207).

[0352] Furthermore, the order of each encoding may be preset, and various signals may be encoded in a manner different from the above-described encoding order.

[0353] [grammar]

[0354] Here, the syntax of this method is explained. Figure 18 A specific example of the syntax in the fourth aspect of the first embodiment is shown.

[0355] exist Figure 18 For example, when encoding of the adaptive transform base selection mode signal is skipped (line 20), encoding of the adaptive transform base selection mode signal (emt_cu_flag) and the first base selection signals (emt_horizontal_tridx and emt_vertical_tridx) is skipped (line 21). Here, encoding of the adaptive transform base selection mode signal is skipped when the horizontal transform size (horizontal_tu_size) is less than or equal to the first horizontal threshold size (horizontal_tu_size_th) and the vertical transform size (vertical_tu_size) is less than or equal to the first vertical threshold size (vertical_tu_size_th). When encoding of the adaptive transform base selection mode signal is not skipped (lines 3-4), the adaptive transform base selection mode signal (emt_cu_flag) is encoded (line 5), and similar to the second embodiment, the first base selection signals (emt_horizontal_tridx and emt_vertical_tridx) are encoded as needed (lines 7-16).

[0356] Furthermore, when the encoding of the adaptive transform base selection mode signal is skipped, the selection of the second transform base and the second transform may also be skipped.

[0357] [Specific Examples of Transform Bases and Coding Signals]

[0358] Next, specific examples of the transform base and the coded signal are described. Figure 19 A specific example of the transform base used in the fourth embodiment of the first embodiment and the presence or absence of signal coding is shown. Figure 19 In the case where both the horizontal and vertical sizes of the coding target block are less than 4 pixels, the transform base and the presence or absence of coding are different from Figure 15 Different. Figure 15 Different points as center pairs Figure 19 Provide explanation.

[0359] exist Figure 19 In the case where the adaptive transform base selection mode is not valid, if the horizontal size H and the vertical size V of the encoding object block are both less than 4 pixels, the DST-VII transform base rather than the DCT-II transform base is used as the first transform base in the horizontal and vertical directions.

[0360] Furthermore, when the adaptive transform base selection mode is valid, if both the horizontal size H and the vertical size V of the encoding target block are 4 pixels or less, the adaptive transform base selection mode signal (emt_cu_flag) is not encoded.

[0361] [Effects, etc.]

[0362] As described above, according to the encoding device 100 related to this method, when the conditions for skipping the encoding of the adaptive transform base selection mode signal are met, all encoding of the adaptive transform base selection mode signal and the first base selection signal can be omitted, and there is a possibility of reducing the amount of code.

[0363] [Combination with other methods]

[0364] This embodiment may be implemented in combination with at least a portion of other embodiments of the present invention. In addition, a portion of the processing, a portion of the device structure, a portion of the syntax, etc. described in the flowchart of this embodiment may be implemented in combination with other embodiments.

[0365] (Fifth embodiment of the first embodiment)

[0366] Next, the fifth embodiment of the first embodiment will be described. In this embodiment, a decoding device will be described. The decoding device of this embodiment corresponds to the encoding device of the first embodiment described above. That is, the decoding device of this embodiment can decode a bit stream encoded by the encoding device of the first embodiment described above. This embodiment will be described in detail below with reference to the accompanying drawings.

[0367] [Internal Configuration of the Transformation Unit and Inverse Transformation Unit of the Decoding Device]

[0368] First, the internal structure of the inverse transform unit 206 of the decoding device 200 according to this embodiment will be described. Figure 20 This is a block diagram showing the internal structure of the inverse transform unit 206 of the decoding device 200 according to the fifth aspect of the first embodiment.

[0369] like Figure 20 As shown, the inverse transformation unit 206 of this method includes a second inverse transformation implementation determination unit 2061, a second inverse transformation base selection unit 2062, a second inverse transformation unit 2063, a transformation mode determination unit 2064, a size determination unit 2065, a first inverse transformation base selection unit 2066, and a first inverse transformation unit 2067.

[0370] The second inverse transform execution determination unit 2061 determines whether to perform the second inverse transform on the inverse quantized coefficients of the current block to be decoded, output from the inverse quantization unit 204, based on whether the adaptive transform base selection mode is valid in the current block to be decoded. Specifically, the second inverse transform execution determination unit 2061 performs the second inverse transform when the adaptive transform base selection mode is not valid, and determines not to perform the second inverse transform when the adaptive transform base selection mode is valid.

[0371] If it is determined that the second inverse transform is to be performed, the second inverse transform base selection unit 2062 selects the second inverse transform base. Specifically, if the adaptive transform base selection mode is not valid, the second inverse transform base selection unit 2062 obtains a second base selection signal 2062S indicating the second inverse transform base, decoded from the bitstream by the entropy decoding unit 202. The second inverse transform base selection unit 2062 then selects the second inverse transform base based on the second base selection signal 2062S. Conversely, if the adaptive transform base selection mode is valid, the second inverse transform base selection unit 2062 does not select the second inverse transform base. In other words, when the adaptive transform base selection mode is valid, the second inverse transform base selection unit 2062 skips selecting the second inverse transform base.

[0372] If it is determined that the second inverse transform is to be performed, the second inverse transform unit 2063 performs a second inverse transform on the inverse quantized coefficients of the decoding target block using the second inverse transform base selected by the second inverse transform base selection unit 2062. That is, if the adaptive transform base selection mode is not valid, the second inverse transform unit 2063 performs a second inverse transform on the inverse quantized coefficients using the second inverse transform base to generate the second inverse transform coefficients. Conversely, if the adaptive transform base selection mode is valid, the second inverse transform unit 2063 does not perform a second inverse transform on the inverse quantized coefficients. That is, if the adaptive transform base selection mode is valid, the second inverse transform unit 2063 skips the second inverse transform.

[0373] The transform mode determination unit 2064 determines whether the adaptive transform base selection mode is valid for the current block. This determination is made based on the first base selection signal 2066S or the adaptive transform base selection mode signal 2064S decoded from the bitstream by the entropy decoding unit 202. Specifically, the determination is made based on identification information of the first inverse transform base or the adaptive transform base selection mode.

[0374] The size determination unit 2065 determines whether the horizontal size of the current block to be decoded exceeds the first horizontal threshold size. Furthermore, the size determination unit 1062 determines whether the vertical size of the current block to be decoded exceeds the first vertical threshold size. The determination of the horizontal and vertical sizes is performed based on a size signal 2065S decoded from the bitstream by the entropy decoding unit 202.

[0375] The first inverse transform base selection unit 2066 selects a first inverse transform base. Specifically, when the adaptive transform base selection mode is not valid, the first inverse transform base selection unit 2066 selects a basic transform base as the first inverse transform base in the horizontal and vertical directions. Furthermore, when the adaptive transform base selection mode is valid, the first inverse transform base selection unit 2066 selects the first inverse transform base in the horizontal and vertical directions based on the horizontal and vertical sizes of the decoding target block as described in the following (1) to (4).

[0376] (1) When the horizontal size of the decoding target block is larger than the first horizontal threshold size, the first inverse transform base selection unit 2066 obtains a first base selection signal 2066S indicating the first inverse transform base, which is decoded from the bitstream by the entropy decoding unit 202. The first inverse transform base selection unit 2066 then selects a first inverse transform base in the horizontal direction based on the first base selection signal 2066S.

[0377] (2) When the horizontal size of the decoding target block is equal to or smaller than the first horizontal threshold size, the first inverse transform base selection unit 2066 selects a fixed transform base in the horizontal direction as the first inverse transform base in the horizontal direction.

[0378] (3) When the vertical size of the decoding target block is larger than the first vertical threshold size, the first inverse transform base selection unit 2066 obtains the first base selection signal 2066S. Then, the first inverse transform base selection unit 2066 selects the first inverse transform base in the vertical direction based on the first base selection signal 2066S.

[0379] (4) When the vertical size of the decoding target block is equal to or smaller than the first vertical threshold size, the first inverse transform base selection unit 2066 selects a fixed transform base in the vertical direction as the first inverse transform base in the vertical direction.

[0380] The first inverse transform unit 2067 performs a first inverse transform on the inverse quantized coefficients of the decoding target block using the first inverse transform base selected by the first inverse transform base selection unit 2066, thereby restoring the residual of the decoding target block. Specifically, the first inverse transform unit 2067 performs the first inverse transform in the horizontal direction using the first inverse transform base in the horizontal direction, and performs the first inverse transform in the vertical direction using the first inverse transform base in the vertical direction.

[0381] [Processing by the Inverse Quantization Unit and Inverse Transformation Unit of the Decoding Device]

[0382] Next, refer to the process of the inverse quantization unit 204. Figure 21 The processing of the inverse transform unit 206 configured as described above will be described. Figure 21 This is a flowchart showing the processing of the inverse quantization unit 204 and the inverse transformation unit 206 of the decoding device 200 according to the fifth aspect of the first embodiment.

[0383] The inverse quantization unit 204 generates inverse quantization coefficients by inverse quantizing the quantized coefficients of the decoding target block decoded by the entropy decoding unit 202 ( S501 ).

[0384] The second inverse transform execution determination unit 2061 determines whether to perform the second inverse transform on the inverse quantized coefficients ( S502 ). Here, the second inverse transform execution determination unit 2061 determines whether to perform the second inverse transform based on whether the adaptive transform base selection mode is valid in the decoding target block.

[0385] Here, when the adaptive transform base selection mode is valid ("Yes" in S502), neither the selection of the second inverse transform base nor the second inverse transform is performed. That is, steps S503 and S504 are skipped.

[0386] On the other hand, if the adaptive transform base selection mode is not valid (No in S502), the second inverse transform base selection unit 2062 selects a second inverse transform base based on the second base selection signal 2062S (S503). Furthermore, the second inverse transform unit 2063 performs a second inverse transform on the inverse quantized coefficients using the selected second inverse transform base (S504).

[0387] Next, the transform mode determination unit 2064 determines whether the adaptive transform base selection mode is valid in the decoding target block (S505). For example, the transform mode determination unit 2064 determines whether the adaptive transform base selection mode is valid based on the adaptive transform base selection mode signal 2064S.

[0388] If the adaptive transform base selection mode is not valid (No in S505), the first inverse transform base selection unit 2066 selects a basic transform base as the first inverse transform base for the horizontal and vertical directions (S512). On the other hand, if the adaptive transform base selection mode is valid (Yes in S505), the size determination unit 2065 determines whether the horizontal transform size exceeds a certain range (S506). In other words, the size determination unit 2065 determines whether the horizontal size of the decoding target block is greater than the first horizontal threshold size.

[0389] If the transform size in the horizontal direction exceeds a certain range ("Yes" in S506), the first inverse transform base selection unit 2066 selects a transform base in the horizontal direction from a plurality of adaptive transform bases as the first inverse transform base in the horizontal direction (S507). On the other hand, if the transform size in the horizontal direction is within a certain range ("No" in S506), the first inverse transform base selection unit 2066 selects a fixed transform base as the first inverse transform base in the horizontal direction (S508).

[0390] The size determination unit 2065 determines whether the vertical transform size exceeds a certain range (S509). In other words, the size determination unit 2065 determines whether the vertical size of the decoding target block is larger than a first vertical threshold size.

[0391] If the transform size in the vertical direction exceeds a certain range ("Yes" in S509), the first inverse transform base selection unit 2066 selects a transform base from a plurality of adaptive transform bases as the first inverse transform base in the vertical direction (S510). If the transform size in the vertical direction is within a certain range ("No" in S509), the first inverse transform base selection unit 2066 selects a fixed transform base as the first inverse transform base in the vertical direction (S511).

[0392] The first inverse transform unit 2067 performs the first inverse transform on the inverse quantized coefficients or the second inverse transform coefficients using the first inverse transform base selected as described above, thereby restoring the residual of the decoding target block ( S513 ).

[0393] Furthermore, the order of selecting the inverse transform bases in the horizontal and vertical directions may be the order of the horizontal and vertical directions, or the reverse order. Furthermore, the inverse transform bases in the horizontal and vertical directions may be selected simultaneously.

[0394] In addition, selecting the inverse transform basis in the decoding device 200 means decoding the information representing the basis used in the inverse transform contained in the encoded bit stream, determining the inverse transform basis based on the decoded information, or determining a uniquely represented inverse transform basis based on information such as the intra-frame prediction mode, the decoding object block size, or the basis in the first inverse transform.

[0395] Alternatively, you can also use Figure 12A or Figure 12B The decoding method of the encoding method of the first embodiment shown.

[0396] [Effects, etc.]

[0397] As described above, according to the decoding device 200 according to this embodiment, it is possible to achieve the same effects as those of the encoding device 100 according to the first embodiment.

[0398] [Combination with other methods]

[0399] This embodiment may be implemented in combination with at least a portion of other embodiments of the present invention. In addition, a portion of the processing, a portion of the device structure, a portion of the syntax, etc. described in the flowchart of this embodiment may be implemented in combination with other embodiments.

[0400] (Sixth embodiment of the first embodiment)

[0401] Next, the sixth embodiment of the first embodiment will be described. This embodiment describes an example of decoding various signals related to the first and second transforms in the fifth embodiment. The decoding device of this embodiment corresponds to the encoding device of the second embodiment described above. This embodiment will be described in detail below, focusing on the differences from the fifth embodiment, with reference to the accompanying drawings.

[0402] Note that the internal structure of the inverse transform unit 206 of the decoding device 200 according to this embodiment is the same as that of the fifth embodiment, and therefore is omitted from the illustration.

[0403] [Processing by the Entropy Decoding Unit, Inverse Quantization Unit, and Inverse Transformation Unit of the Decoding Device]

[0404] Reference Figure 22A and Figure 22B , the processing of the entropy decoding unit 202, the inverse quantization unit 204, and the inverse transformation unit 206 of the decoding device 200 of this embodiment will be described. Figure 22A and Figure 22B In the embodiment, the same numbers are used for the processes that are common to the fifth embodiment and the description thereof is omitted.

[0405] First, the entropy decoding unit 202 decodes the adaptive transform base selection mode signal from the bitstream (S601). Then, the transform mode determination unit 2064 determines whether the adaptive transform base selection mode is valid in the decoding target block based on the adaptive transform base selection mode signal (S602).

[0406] If the adaptive transform base selection mode is enabled (Yes in S602), then if the horizontal transform size exceeds a certain range (Yes in S603), the entropy decoding unit 202 decodes the first horizontal base selection signal from the bitstream (S604). On the other hand, if the horizontal transform size is within the certain range (No in S603), the entropy decoding unit 202 does not decode the first horizontal base selection signal. Furthermore, if the vertical transform size exceeds the certain range (Yes in S605), the entropy decoding unit 202 decodes the first vertical base selection signal from the bitstream (S606). On the other hand, if the vertical transform size is within the certain range (No in S605), the entropy decoding unit 202 does not decode the first vertical base selection signal.

[0407] When the adaptive transform base selection mode is not valid (No in S602 ), decoding of the first base selection signal is skipped ( S604 , S606 ).

[0408] Next, the entropy decoding unit 202 decodes the quantized coefficients ( S607 ).

[0409] Here, if the adaptive transform base selection mode is not valid (No in S608), the entropy decoding unit 202 decodes the second basis selection signal from the bitstream (S609). On the other hand, if the adaptive transform base selection mode is valid (Yes in S608), the decoding of the second basis selection signal (S609) is skipped.

[0410] Furthermore, the order of decoding may be pre-set to match the encoding method, and various signals may be decoded in a manner different from the above-described decoding order. Furthermore, when the second inverse transform is not performed (skipped), the entropy decoding unit 202 may decode from the bitstream a signal indicating that the second inverse transform is not performed, or may decode from the bitstream a signal for selecting a second inverse transform basis equivalent to not performing the transform.

[0411] Alternatively, you can also use Figure 13A 、 Figure 13B as well as Figure 14 The decoding method of the encoding method of the second embodiment is shown.

[0412] [Effects, etc.]

[0413] As described above, according to the decoding device 200 according to this embodiment, it is possible to achieve the same effects as those of the encoding device 100 according to the second embodiment.

[0414] [Combination with other methods]

[0415] This embodiment may be implemented in combination with at least a portion of other embodiments of the present invention. In addition, a portion of the processing, a portion of the device structure, a portion of the syntax, etc. described in the flowchart of this embodiment may be implemented in combination with other embodiments.

[0416] (Seventh embodiment of the first embodiment)

[0417] Next, the seventh embodiment of the first embodiment will be described. This embodiment differs from the fifth embodiment described above in that, when the adaptive transform base selection mode is not enabled, a different basic transform base is used as the first inverse transform base depending on the size of the encoding target block. Furthermore, the decoding device according to this embodiment corresponds to the encoding device according to the third embodiment described above. This embodiment will be described in detail below, focusing on the differences from the fifth and sixth embodiments, with reference to the accompanying drawings.

[0418] Note that the internal structure of the inverse transform unit 206 of the decoding device 200 according to this embodiment is the same as that of the fifth embodiment, and therefore is omitted from the illustration.

[0419] [Processing by the Inverse Quantization Unit and Inverse Transformation Unit of the Decoding Device]

[0420] Reference Figure 23 The processing of the transform unit 106 and the quantization unit 108 of the encoding device 100 according to this embodiment will be described. Figure 23 1 is a flowchart showing the processing of the inverse quantization unit 204 and the inverse transformation unit 206 of the decoding device 200 according to the seventh aspect of the first embodiment. Figure 23 In the embodiment, the same numbers are used for the processes that are common to the fifth embodiment and the description thereof is omitted.

[0421] If the adaptive transform base selection mode is not valid (No in S505), the size determination unit 2065 determines whether the transform size is within a predetermined range (S701). Specifically, the size determination unit 2065 determines whether the horizontal and vertical sizes of the current block to be decoded are equal to or smaller than a second threshold size. Specifically, the size determination unit 2065 determines, for example, whether the product of the horizontal and vertical sizes of the current block to be decoded is equal to or smaller than a threshold.

[0422] Here, if the transform size is within a certain range ("Yes" in S701), the first inverse transform base selection unit 2066 selects the second basic transform base as the first inverse transform base for the horizontal and vertical directions (S702). On the other hand, if the transform size exceeds the certain range ("No" in S701), the first inverse transform base selection unit 2066 selects the first basic transform base as the first inverse transform base for the horizontal and vertical directions (S703).

[0423] Alternatively, you can also use Figure 16The decoding method of the encoding method of the third embodiment is shown.

[0424] [Effects, etc.]

[0425] As described above, according to the decoding device 200 according to this embodiment, it is possible to achieve the same effects as those of the encoding device 100 according to the third embodiment.

[0426] [Combination with other methods]

[0427] This embodiment may be implemented in combination with at least a portion of other embodiments of the present invention. In addition, a portion of the processing, a portion of the device structure, a portion of the syntax, etc. described in the flowchart of this embodiment may be implemented in combination with other embodiments.

[0428] (Eighth embodiment of implementation method 1)

[0429] Next, the eighth embodiment of the first embodiment will be described. This embodiment describes an example of decoding various signals related to the first and second transforms in the seventh embodiment. The decoding device of this embodiment corresponds to the encoding device of the fourth embodiment described above. This embodiment will be described in detail below, focusing on the differences from the fifth to seventh embodiments, with reference to the accompanying drawings.

[0430] Note that the internal structure of the inverse transform unit 206 of the decoding device 200 according to this embodiment is the same as that of the fifth embodiment, and therefore is omitted from the illustration.

[0431] [Processing by the Entropy Decoding Unit, Inverse Quantization Unit, and Inverse Transformation Unit of the Decoding Device]

[0432] Reference Figure 24A and Figure 24B The following describes the processing of the entropy decoding unit 202, the inverse quantization unit 204, and the inverse transformation unit 206 of the decoding device 200 according to this embodiment. Figure 24A and Figure 24B In the embodiment, the same processing as any one of the fifth to seventh embodiments is denoted by the same reference numerals and the description thereof is omitted.

[0433] The entropy decoding unit 202 determines whether to skip decoding of the adaptive transform base selection mode signal (S801). For example, if either of the following conditions (A) and (B) is satisfied, the entropy decoding unit 202 determines to skip decoding of the adaptive transform base selection mode signal. Otherwise, the entropy decoding unit 202 determines not to skip decoding of the adaptive transform base selection mode signal.

[0434] (A) The adaptive transform basis selection mode is not valid.

[0435] (B) The adaptive transformation base selection mode is valid and all of the following conditions (B1) to (B4) are satisfied.

[0436] (B1) The conversion size is equal to or smaller than the second threshold size W1xH1 used in step S701.

[0437] (B2) The horizontal transformation size is equal to or smaller than the first horizontal threshold size W2 used in step S506.

[0438] (B3) The transformation size in the vertical direction is equal to or smaller than the first vertical threshold size H2 used in step S509.

[0439] (B4) The second basic transformation basis and the fixed transformation basis in the horizontal and vertical directions are the same transformation basis.

[0440] As a specific example, when the second threshold size W1xH1 is 4×4 pixels, the first horizontal threshold size W2 is 4 pixels, the first vertical threshold size H2 is 4 pixels, and the second basic transform basis and the fixed transform basis are both DST-VII transform basis, if the transform size is less than 4×4 pixels, the entropy decoding unit 202 determines to skip the decoding of the adaptive transform basis selection mode signal.

[0441] On the contrary, when neither of the above conditions (A) and (B) is satisfied, the entropy decoding unit 202 determines not to skip decoding of the adaptive transform base selection mode signal.

[0442] Here, if it is determined that the decoding of the adaptive transform base selection mode signal is skipped ("Yes" in S801), the entropy decoding unit 202 skips steps S601 to S606 and decodes the quantized coefficients (S607). On the other hand, if it is determined that the decoding of the adaptive transform base selection mode signal is not skipped ("No" in S801), the entropy decoding unit 202 executes steps S601 to S606 in the same manner as in the sixth embodiment and then decodes the quantized coefficients (S207).

[0443] Alternatively, you can use Figure 17A 、 Figure 17B as well as Figure 18 The decoding method of the encoding method of the fourth embodiment is shown.

[0444] [Effects, etc.]

[0445] As described above, according to the decoding device 200 according to this embodiment, it is possible to achieve the same effects as those of the encoding device 100 according to the fourth embodiment.

[0446] [Combination with other methods]

[0447] This embodiment may be implemented in combination with at least a portion of other embodiments of the present invention. In addition, a portion of the processing, a portion of the device structure, a portion of the syntax, etc. described in the flowchart of this embodiment may be implemented in combination with other embodiments.

[0448] (Variations of Each Mode of Embodiment 1)

[0449] In addition, a signal indicating whether part or all of the processing described in any one of the first to eighth aspects is valid may be encoded and decoded. Such a signal may be encoded in units of CU (Coding Unit) or CTU (Coding Tree Unit), or may be encoded in units of SPS (Sequence Parameter Set), PPS (Picture Parameter Set), or slices equivalent to the H.265 / HEVC standard.

[0450] Based on the picture type (I, P, B), slice type (I, P, B), transform size (4×4 pixels, 8x8 pixels or other), number of non-zero coefficients, quantization parameter, Temporal_id (layer of hierarchical coding) or any combination thereof, the selection of the first transform basis and the first transform can be skipped, and the selection of the second transform basis and the second transform can also be skipped.

[0451] When the encoding device according to the first to fourth aspects performs the above-described operations, the decoding device according to the fifth to eighth aspects also performs corresponding operations. For example, when the encoding device encodes information indicating whether to enable skipping of the first transform or the second transform, the decoding device decodes this information and determines whether the first transform or the second transform is enabled and whether the information indicating the first transform or the second transform is encoded.

[0452] (Implementation Method 2)

[0453] In each of the above embodiments, each functional block can generally be implemented by an MPU and memory, etc. In addition, the processing of each functional block is generally implemented by a program execution unit such as a processor reading and executing software (program) recorded in a recording medium such as a ROM. This software can be distributed by downloading, etc., or it can be distributed by recording it in a recording medium such as a semiconductor memory. In addition, it is of course also possible to implement each functional block by hardware (dedicated circuit).

[0454] Furthermore, the processing described in each embodiment can be implemented by centralized processing using a single device (system) or by distributed processing using multiple devices. Furthermore, the processors that execute the above-mentioned programs can be either a single processor or multiple processors. That is, centralized processing or distributed processing is possible.

[0455] The aspects of the present invention are not limited to the above-described embodiments, and various modifications are possible, which are also included in the scope of the aspects of the present invention.

[0456] Furthermore, here, an application example of the moving picture encoding method (image encoding method) or moving picture decoding method (image decoding method) described in each of the above embodiments and a system using the same are described. The system is characterized by including an image encoding device using the image encoding method, an image decoding device using the image decoding method, and an image encoding and decoding device including both. Other configurations of the system can be modified as appropriate depending on the situation.

[0457] [Use Example]

[0458] Figure 25 This figure shows the overall structure of a content supply system ex100 that implements content distribution services. The area where communication services are provided is divided into cells of desired sizes, and base stations ex106, ex107, ex108, ex109, and ex110, which are fixed wireless stations, are installed in each cell.

[0459] In the content delivery system ex100, various devices, such as a computer ex111, a game console ex112, a camera ex113, a home appliance ex114, and a smartphone ex115, are connected to the Internet ex101 via an Internet service provider ex102, a communication network ex104, and base stations ex106-ex110. The content delivery system ex100 may also combine some of the aforementioned elements. Instead of using the base stations ex106-ex110, which are fixed wireless stations, the various devices may be directly or indirectly connected to each other via a telephone network or short-range wireless. Furthermore, the streaming server ex103 is connected to various devices, such as the computer ex111, the game console ex112, the camera ex113, the home appliance ex114, and the smartphone ex115, via the Internet ex101. Furthermore, the streaming server ex103 is connected to terminals, such as those in hotspots within an airplane ex117, via a satellite ex116.

[0460] Alternatively, wireless access points or hotspots may be used instead of the base stations ex106 to ex110. Furthermore, the streaming server ex103 may be connected directly to the communication network ex104 without going through the Internet ex101 or the Internet service provider ex102, or directly to the aircraft ex117 without going through the satellite ex116.

[0461] The camera ex113 is a device such as a digital camera capable of capturing both still and moving images. Furthermore, the smartphone ex115 is a smartphone, mobile phone, or PHS (Personal Handyphone System) compatible with mobile communication systems commonly referred to as 2G, 3G, 3.9G, 4G, and what will be called 5G in the future.

[0462] The home appliance ex118 is a refrigerator or equipment included in a household fuel cell cogeneration system.

[0463] In the content delivery system ex100, terminals with camera functions are connected to the streaming server ex103 via a base station ex106 or the like, enabling on-site distribution and the like. During on-site distribution, a terminal (such as a computer ex111, a game console ex112, a camera ex113, a home appliance ex114, a smartphone ex115, or a terminal inside an airplane ex117) performs the encoding process described in the above embodiments on still or moving image content captured by a user using the terminal, multiplexes the encoded video data with audio data obtained by encoding the corresponding audio, and transmits the resulting data to the streaming server ex103. In other words, each terminal functions as an image encoding device according to one aspect of the present invention.

[0464] Meanwhile, the streaming server ex103 streams content data sent by requesting clients. Clients are computers ex111, game consoles ex112, cameras ex113, home appliances ex114, smartphones ex115, and terminals inside airplanes ex117, all capable of decoding the encoded data. Each device that receives the distributed data decodes and reproduces the data. In other words, each device functions as an image decoding device according to one embodiment of the present invention.

[0465] [Distributed Processing]

[0466] Alternatively, the streaming server ex103 can consist of multiple servers or computers, distributing data by distributing processing or recording. For example, the streaming server ex103 can be implemented as a CDN (Content Delivery Network), which distributes content through a network connecting numerous edge servers distributed worldwide. In a CDN, physically close edge servers are dynamically assigned to clients. Furthermore, by caching and distributing content to these edge servers, latency can be reduced. Furthermore, if an error occurs or communication conditions change due to increased traffic, processing can be distributed across multiple edge servers, distribution can be switched to other edge servers, or delivery can be continued by bypassing a faulty portion of the network, thus achieving high-speed and stable delivery.

[0467] In addition, the encoding process of the captured data is not limited to the distributed processing itself, and can be performed by each terminal, on the server side, or shared. As an example, two processing cycles are usually performed in the encoding process. In the first cycle, the complexity or code amount of the image of the frame or scene unit is detected. In addition, in the second cycle, a process is performed to maintain the image quality and improve the encoding efficiency. For example, by performing the first encoding process by the terminal and the second encoding process by the server side that receives the content, the quality and efficiency of the content can be improved while reducing the processing load in each terminal. In this case, if there is a request for almost real-time reception and decoding, the data completed by the first encoding by the terminal can also be received and reproduced by other terminals, so more flexible real-time distribution can also be achieved.

[0468] As another example, a camera ex113 or similar device extracts features from an image, compresses the feature data as metadata, and transmits it to a server. The server, for example, determines the importance of an object based on the features and switches the quantization precision, performing compression tailored to the image's meaning. Feature data is particularly effective in improving the accuracy and efficiency of motion vector prediction during recompression in the server. Alternatively, the terminal can perform simple encoding such as VLC (Variable Length Coding), while the server performs more processing-intensive encoding such as CABAC (Context-Adaptive Binary Arithmetic Coding).

[0469] As another example, in stadiums, shopping malls, factories, and other locations, there may be multiple video data sets generated by capturing roughly the same scene using multiple terminals. In such cases, encoding can be distributed using the multiple terminals that captured the images, as well as other terminals and servers that did not capture the images as needed, for example, by allocating the encoding processing to each GOP (Group of Picture) unit, picture unit, or tile unit obtained by dividing the picture. This reduces latency and achieves better real-time performance.

[0470] Furthermore, since multiple image data sets represent roughly the same scene, the server can manage and / or instruct the image data captured by each terminal to cross-reference each other. Alternatively, the server can receive encoded data from each terminal and change the reference relationship between the multiple data sets, or modify or replace the image itself before re-encoding it. This allows the generation of a stream with improved quality and efficiency for each data set.

[0471] Furthermore, the server may also perform transcoding to change the encoding method of the video data before distributing the video data. For example, the server may convert the encoding method of the MPEG type to the VP type, or convert H.264 to H.265.

[0472] Thus, the encoding process can be performed by a terminal or one or more servers. Therefore, the following descriptions of "server" or "terminal" refer to the entity performing the processing. However, some or all of the processing performed by the server can also be performed by the terminal, and some or all of the processing performed by the terminal can also be performed by the server. Furthermore, the same applies to the decoding process.

[0473] [3D, multi-angle]

[0474] In recent years, there has been an increasing trend to combine and utilize images or videos captured by multiple devices, such as cameras ex113 and / or smartphones ex115, that are roughly synchronized with each other, capturing different scenes or capturing the same scene from different angles. The images captured by each device are combined based on the relative positional relationship between the devices, or based on areas where the images contain consistent feature points.

[0475] The server not only encodes two-dimensional moving images but can also encode still images automatically or at user-specified times based on scene analysis of moving images and transmit them to the receiving terminal. Furthermore, if the server can obtain the relative positional relationship between the shooting terminals, it can generate not only two-dimensional moving images but also three-dimensional shapes of the scene based on images of the same scene captured from different angles. Furthermore, the server can also separately encode three-dimensional data generated from point clouds, etc., and can also select or reconstruct images from images captured by multiple terminals based on the results of identifying or tracking people or objects using three-dimensional data to generate images for transmission to the receiving terminal.

[0476] This allows users to arbitrarily select the images corresponding to each camera terminal to enjoy the scene, or to enjoy content that extracts images from any viewpoint from 3D data reconstructed using multiple images or videos. Furthermore, similar to video, audio can be collected from multiple angles, with the server matching the audio to the video, multiplexing and transmitting the audio from a specific angle or space with the video.

[0477] Furthermore, content that connects the real and virtual worlds, such as Virtual Reality (VR) and Augmented Reality (AR), has become increasingly popular in recent years. In the case of VR images, the server creates separate viewpoint images for the right and left eyes. These can be encoded using techniques such as Multi-View Coding (MVC) to allow for reference between viewpoint images, or encoded as separate streams without reference to each other. When these separate streams are decoded, they can be played back in sync with the user's viewpoint, recreating a virtual three-dimensional space.

[0478] In the case of AR images, the server may overlay virtual object information in the virtual space on camera information in the real space based on the three-dimensional position or the movement of the user's viewpoint. The decoding device obtains or stores virtual object information and three-dimensional data, generates a two-dimensional image according to the movement of the user's viewpoint, and creates overlapping data by smoothly connecting them. Alternatively, the decoding device may send the movement of the user's viewpoint to the server in addition to the request for virtual object information, and the server may create overlapping data that matches the received movement of the viewpoint based on the three-dimensional data stored in the server, encode the overlapping data, and distribute it to the decoding device. In addition, the overlapping data has an alpha value indicating transmittance in addition to RGB, and the server sets the alpha value of the part other than the target produced based on the three-dimensional data to 0, etc., and encodes the part in a transparent state. Alternatively, the server may set the RGB value of a specified value as the background, as in the case of a chroma key, and generate data that sets the part other than the target as the background color.

[0479] Similarly, the decoding process of the distributed data can be performed by each terminal as a client, or on the server side, or shared by each other. As an example, a terminal may first send a reception request to the server, and other terminals may receive the content corresponding to the request and perform decoding processing, and then send the decoded signal to a device with a display. By distributing the processing regardless of the performance of the communicative terminal itself and selecting appropriate content, data with better image quality can be reproduced. In addition, as another example, large-size image data can be received by a TV, etc., and a portion of the image, such as tiles, can be decoded and displayed by the personal terminal of the viewer. In this way, while sharing the overall image, one can confirm one's own area of ​​responsibility or the area that one wants to confirm in more detail at hand.

[0480] Furthermore, it is envisioned that in the future, multiple short-range, medium-range, and long-range wireless communications will be available both indoors and outdoors, enabling seamless content reception by switching appropriate data between connected communications using distribution system standards such as MPEG-DASH. This will allow users to freely select decoding devices and display devices, such as displays installed indoors or outdoors, in real time, not only using their own terminals. Furthermore, decoding can be performed by switching between decoding and display terminals based on their location information. This will also allow users to display map information on a portion of the wall or floor of a nearby building where a display device is embedded while moving toward their destination. Furthermore, the bit rate of received data can be switched based on the ease of access to encoded data on the network, such as by caching the encoded data in a server that can be quickly accessed from the receiving terminal or by replicating the encoded data in an edge server of the content distribution service.

[0481] [Scalable Coding]

[0482] To switch content, use Figure 26 The example illustrates a scalable stream compressed and encoded using the moving picture coding method described in the above embodiments. For the server, multiple streams with the same content but different qualities can be provided as a single stream, or a structure can be employed to switch content using the temporally and spatially scalable stream characteristics achieved through layered coding, as shown. Specifically, the decoding side determines which layer to decode based on internal factors such as performance and external factors such as the state of the communication band. This allows the decoding side to freely switch between low-resolution and high-resolution content. For example, if a video viewed on a smartphone ex115 while on the go is subsequently viewed on a device such as an internet TV at home, the device can simply decode the same stream into different layers, reducing the burden on the server.

[0483] Furthermore, in addition to implementing a hierarchical structure where images are encoded per layer and enhancement layers exist above the base layer as described above, the enhancement layer may include metadata such as statistical information based on the image, and the decoding side may generate high-quality content by super-resolving the base layer image based on this metadata. Super-resolution can be either improving the SN ratio or increasing the resolution at the same resolution. Meta-information includes information that specifies linear or nonlinear filter coefficients used in the super-resolution process, as well as information that specifies parameter values ​​for filtering, machine learning, or least-squares operations used in the super-resolution process.

[0484] Alternatively, the image may be divided into tiles according to the meaning of the target in the image, and the decoding side may decode only a part of the area by selecting the tile to be decoded. In addition, by storing the attributes of the target (people, cars, balls, etc.) and the position in the image (coordinate position in the same image, etc.) as meta-information, the decoding side can determine the position of the desired target based on the meta-information and decide the tile that includes the target. For example, Figure 27 As shown, meta-information is stored using a data storage structure different from pixel data, such as SEI messages in HEVC. This meta-information indicates, for example, the position, size, or color of the main object.

[0485] Furthermore, metadata can be stored in units consisting of multiple pictures, such as streams, sequences, or random access units. This allows the decoding side to determine the time a specific person appears in an image, and by matching this with the picture-by-picture information, it can identify the picture in which the target appears and the location of the target within the picture.

[0486] [Web page optimization]

[0487] Figure 28 This is a diagram showing an example of a display screen of a web page on the computer ex111 or the like. Figure 29 1 is a diagram showing an example of a display screen of a web page on a smartphone ex115 or the like. Figure 28 and Figure 29 As shown, web pages may contain multiple link images that serve as links to image content. The way these images are viewed varies depending on the viewing device. When multiple link images are visible on the screen, the display device (decoding device) displays a still image or I-picture associated with each content as a link image, or displays an image similar to a GIF animation using multiple still images or I-pictures, or receives only the base layer, decodes, and displays the image.

[0488] When a linked image is selected by the user, the display device decodes the base layer with the highest priority. In addition, if there is information indicating that the content is scalable in the HTML constituting the web page, the display device can also decode to the enhancement layer. In addition, in order to ensure real-time performance, before selection or when the communication bandwidth is very tight, the display device can reduce the delay between the decoding time and the display time of the first picture (the delay from the start of decoding to the start of display of the content) by decoding and displaying only the pictures that are referenced forward (I pictures, P pictures, and B pictures that are only referenced forward). In addition, the display device can forcibly ignore the reference relationship between pictures and use all B pictures and P pictures as forward references to roughly decode them, and as time passes, the number of pictures received increases, and normal decoding is performed.

[0489] [Automatic driving]

[0490] Furthermore, when transmitting and receiving still images or video data, such as two-dimensional or three-dimensional map information, for autonomous driving or driving assistance, the receiving terminal may receive weather or construction information as metadata in addition to image data belonging to one or more layers, associate these metadata with each other, and decode them. Furthermore, the metadata may be part of a layer or multiplexed solely with the image data.

[0491] In this case, since the receiving terminal, such as a car, drone, or airplane, is moving, the receiving terminal can switch base stations ex106-ex110 by transmitting its location information upon receiving a request, enabling seamless reception and decoding. Furthermore, the receiving terminal can dynamically switch the level of metadata received and the level of map information updated based on user preferences, user conditions, or the state of the communication band.

[0492] As described above, in the content providing system ex100, the client can receive, decode, and reproduce the encoded information sent by the user in real time.

[0493] [Distribution of Personal Content]

[0494] Furthermore, the content delivery system ex100 can deliver not only high-quality, long-duration content provided by video distributors, but also low-quality, short-duration content provided by individuals, either unicast or multicast. Furthermore, such personal content is expected to increase in the future. To enhance personal content, the server can also perform encoding after editing. This can be achieved, for example, through the following configuration.

[0495] After taking the photos in real time or accumulating them, the server performs recognition processing such as shooting errors, scene search, meaning analysis, and target detection based on the original image or encoded data. In addition, based on the recognition results, the server manually or automatically corrects focus deviation or hand shaking, deletes less important scenes such as scenes with lower brightness than other pictures or scenes that are not in focus, emphasizes the edges of the target, or changes the color tone. The server encodes the edited data based on the editing results. In addition, it is known that the viewing rate will decrease if the shooting time is too long. The server can also automatically limit not only the less important scenes as mentioned above, but also scenes with less movement based on the image processing results, so that the content is within a specific time range. Alternatively, the server can also generate a summary based on the results of the scene's meaning analysis and encode it.

[0496] In addition, personal content may be written with content that infringes copyright, author's personality rights or portrait rights in its original state, or the scope of sharing may exceed the desired scope, which is inconvenient for individuals. Therefore, for example, the server can also forcibly change the faces of people in the peripheral part of the screen or the home to an out-of-focus image for encoding. In addition, the server can also identify whether the face of a person different from the pre-registered person is captured in the encoding object image, and if so, apply mosaics to the face part. Alternatively, as pre-processing or post-processing for encoding, from the perspective of copyright, etc., the user can specify the person or background area that he wants to process the image, and the server will replace the specified area with another image or blur the focus. If it is a person, it can track the person in the moving image while replacing the image of the face part.

[0497] Furthermore, the viewing of personal content with a small amount of data requires strong real-time performance, so although it also depends on the bandwidth, the decoding device first receives, decodes, and reproduces the base layer with the highest priority. The decoding device can also receive the enhancement layer during this period, and when the content is reproduced more than twice, such as when the reproduction is looped, the enhancement layer is also included in the reproduction of high-definition images. In this way, if the stream is scalable, it can provide an experience where the moving image is relatively rough when it is not selected or at the beginning of viewing, but the stream gradually becomes smoother and the image becomes better. In addition to scalable coding, the same experience can be provided when the relatively rough stream reproduced the first time and the second stream encoded with reference to the moving image of the first time are composed of a single stream.

[0498] [Other usage examples]

[0499] These encoding and decoding processes are typically handled by the LSI ex500 included in each terminal. The LSI ex500 can be a single chip or a multi-chip configuration. Alternatively, video encoding and decoding software can be installed on a recording medium (CD-ROM, floppy disk, hard disk, etc.) readable by a computer ex111 or the like, and encoding and decoding can be performed using this software. Furthermore, if the smartphone ex115 has a camera, video data captured by the camera can be transmitted. In this case, the video data is encoded by the LSI ex500 included in the smartphone ex115.

[0500] Alternatively, the LSIex500 can be configured to download and activate application software. In this case, the terminal first determines whether it supports the content's encoding method or has the ability to perform a specific service. If the terminal does not support the content's encoding method or does not have the ability to perform a specific service, the terminal downloads the codec or application software, then retrieves and plays the content.

[0501] Furthermore, the content delivery system ex100 is not limited to the content delivery system ex100 via the Internet ex101; at least one of the video encoding devices (image encoding devices) or video decoding devices (image decoding devices) described in the above-mentioned embodiments can also be incorporated into a digital broadcasting system. Since multiplexed data containing multiplexed video and audio is transmitted and received over broadcast radio waves using satellites, the content delivery system ex100 differs from the unicast-friendly structure of the content delivery system ex100 in that it is suitable for multicast. However, the encoding and decoding processes can be applied in the same manner.

[0502] [Hardware structure]

[0503] Figure 30 is a diagram showing a smartphone ex115. Figure 31This diagram shows an example of the configuration of a smartphone ex115. The smartphone ex115 includes an antenna ex450 for transmitting and receiving radio waves with the base station ex110, a camera unit ex465 capable of capturing both video and still images, and a display unit ex458 that displays images captured by the camera unit ex465 and decoded data such as images received by the antenna ex450. The smartphone ex115 also includes an operation unit ex466 such as a touch panel, an audio output unit ex457 such as a speaker for outputting audio and sound, an audio input unit ex456 such as a microphone for inputting audio, a memory unit ex467 capable of storing encoded or decoded data such as captured videos or still images, recorded audio, received videos or still images, and emails, and a slot unit ex464 that serves as an interface with a SIM card ex468 for identifying users and authenticating access to various data, including the network. Alternatively, an external memory card can be used in place of the memory unit ex467.

[0504] In addition, the main control unit ex460 that performs integrated control of the display unit ex458 and the operation unit ex466 is interconnected with the power circuit unit ex461, the operation input control unit ex462, the image signal processing unit ex455, the camera interface unit ex463, the display control unit ex459, the modulation / demodulation unit ex452, the multiplexing / separation unit ex453, the sound signal processing unit ex454, the slot unit ex464, and the memory unit ex467 via a bus ex470.

[0505] When the user turns on the power button, the power supply circuit unit ex461 supplies power from the battery pack to various components, thereby activating the smartphone ex115 to be operational.

[0506] The smartphone ex115 performs processes such as calls and data communications under the control of the main control unit ex460, which includes a CPU, ROM, and RAM. During a call, the voice signal collected by the voice input unit ex456 is converted into a digital voice signal by the voice signal processing unit ex454. This signal is then subjected to spread spectrum processing by the modulation / demodulation unit ex452. The transmitting / receiving unit ex451 then performs digital-to-analog conversion and frequency conversion before transmitting the signal via the antenna ex450. Furthermore, the received data is amplified, subjected to frequency conversion and analog-to-digital conversion, and then subjected to inverse spread spectrum processing by the modulation / demodulation unit ex452. The voice signal processing unit ex454 converts the signal into an analog voice signal before outputting it from the voice output unit ex457. During data communications, text, still images, or video data is sent to the main control unit ex460 via the operation input control unit ex462 through the operation unit ex466, similarly performing transmission and reception. In data communication mode, when transmitting video, still images, or both video and audio, the video signal processing unit ex455 compresses and encodes the video signal stored in the memory unit ex467 or the video signal input from the camera unit ex465 using the moving image encoding method described in the above embodiments, and then sends the encoded video data to the multiplexing / demultiplexing unit ex453. Furthermore, the audio signal processing unit ex454 encodes the audio signal collected by the audio input unit ex456 during the process of capturing video or still images with the camera unit ex465, and sends the encoded audio data to the multiplexing / demultiplexing unit ex453. The multiplexing / demultiplexing unit ex453 multiplexes the encoded video data and audio data in a predetermined format. The modulation / demodulation unit (modulation / demodulation circuit unit) ex452 and the transmission / reception unit ex451 perform modulation and conversion processing, and then transmit the data via the antenna ex450.

[0507] When receiving an image attached to an email or chat tool, or linked to a webpage, the multiplexing / demultiplexing unit ex453 demultiplexes the multiplexed data received via antenna ex450 into a bitstream of video data and a bitstream of audio data to decode the multiplexed data. The multiplexing / demultiplexing unit ex453 then supplies the encoded video data to the video signal processing unit ex455 and the encoded audio data to the audio signal processing unit ex454 via the synchronous bus ex470. The video signal processing unit ex455 decodes the video signal using a video decoding method corresponding to the video encoding method described in the above embodiments, and displays the video or still image contained in the linked video file on the display unit ex458 via the display control unit ex459. Furthermore, the audio signal processing unit ex454 decodes the audio signal and outputs the audio through the audio output unit ex457. Furthermore, with the increasing prevalence of live streaming, the reproduction of audio may be socially inappropriate depending on the user's circumstances. Therefore, it is preferable to initially reproduce only the video data without reproducing the audio signal. The sound may be reproduced in synchronization only when the user performs an operation such as clicking on the video data.

[0508] While the smartphone ex115 is used as an example in this description, three possible terminal configurations are possible: a transmitting terminal equipped with both an encoder and a decoder, a transmitting terminal equipped with only an encoder, and a receiving terminal equipped with only a decoder. Furthermore, in a digital broadcasting system, the description assumes the reception and transmission of multiplexed data, where audio data and other data are multiplexed with video data. However, the multiplexed data may also include text data associated with the video in addition to audio data, and the video data itself may be received or transmitted instead of the multiplexed data.

[0509] While the description assumes that the main control unit ex460, which includes a CPU, controls the encoding and decoding processes, many terminals also include a GPU. Therefore, a configuration can also be implemented where a memory shared by the CPU and GPU, or a memory whose addresses are managed in a mutually usable manner, allows the GPU's performance to be leveraged to process larger areas simultaneously. This can shorten encoding time, ensure real-time performance, and achieve low latency. In particular, it is more efficient if motion estimation, deblocking filtering, SAO (Sample Adaptive Offset), and transform / quantization processes are performed simultaneously on a per-picture basis, such as on the GPU, rather than on the CPU.

[0510] Industrial applicability

[0511] The present invention can be utilized in, for example, a television receiver, a digital video recorder, a car navigation system, a mobile phone, a digital camera, or a digital video camera.

[0512] Description of labels

[0513] 100 Encoding device

[0514] 102 Division

[0515] 104 Subtraction Department

[0516] 106 Transformation Unit

[0517] 108 Quantitative Department

[0518] 110 Entropy Coding Unit

[0519] 112, 204 Inverse Quantization Unit

[0520] 114, 206 Inverse transformation unit

[0521] 116, 208 Addition Department

[0522] 118, 210 block memory

[0523] 120, 212 loop filter unit

[0524] 122, 214 frame memories

[0525] 124, 216 Intra-frame prediction unit

[0526] 126, 218 Inter-frame prediction unit

[0527] 128, 220 Prediction and Control Department

[0528] 200 Decoding Device

[0529] 202 Entropy Decoding Unit

[0530] 1061, 2064 Conversion mode determination unit

[0531] 1062, 2065 Size determination unit

[0532] 1063 First conversion base selection unit

[0533] 1064 First Transformation Section

[0534] 1065 Second Transformation Implementation Judgment Unit

[0535] 1066 Second conversion base selection unit

[0536] 1067 The Second Transformation

[0537] 1141, 2062 Second inverse transformation base selection unit

[0538] 1142, 2063 Second inverse transformation unit

[0539] 1143, 2066 1st inverse transformation base selection unit

[0540] 1144, 2067 First Inverse Transformation Unit

[0541] 2061 Second inverse transformation execution determination unit

[0542] 2062S 2nd base selection signal

[0543] 2064S Adaptive transform base selection mode signal

[0544] 2065S size signal

[0545] 2066S 1st base selection signal

Claims

1. A coding device comprising a circuit and a memory, wherein: The above circuit uses the above memory to perform the following processing: Determine whether the adaptive transform base selection mode, which selects a transform base according to the size of the encoding target block, is valid, When the above adaptive transform basis selection mode is valid, When the vertical size of the encoding target block is larger than a threshold size, a first transform basis is selected from a plurality of transform basis candidates as a transform basis in the vertical direction. When the vertical size of the encoding target block is smaller than the threshold size, a second transform basis is selected as a transform basis in the vertical direction, wherein the second transform basis is a fixed transform basis. By performing a first vertical transform on the residual of the encoding target block using the selected vertical transform basis, a first transform coefficient is generated. By performing a second transform on the first transform coefficients, a second transform coefficient is generated. A bit stream including information indicating whether the adaptive transform base selection mode is valid is generated.

2. A decoding device comprising a circuit and a memory, wherein: The above circuit uses the above memory to perform the following processing: By performing a second inverse transform on the coefficients of the decoding target block, transform coefficients are generated. determining whether an adaptive transform base selection mode for selecting a transform base according to the size of the decoding target block is valid, When the above adaptive transform basis selection mode is valid, When the vertical size of the decoding target block is larger than a threshold size, a first inverse transform basis is selected from a plurality of inverse transform basis candidates as an inverse transform basis in the vertical direction. When the vertical size of the decoding target block is smaller than the threshold size, a second inverse transform basis is selected as an inverse transform basis in the vertical direction, wherein the second inverse transform basis is a fixed inverse transform basis. A prediction residual is generated by performing a first inverse transform in the vertical direction on the transform coefficients of the decoding target block using the selected inverse transform base in the vertical direction.

3. A decoding method, wherein: By performing a second inverse transform on the coefficients of the decoding target block, transform coefficients are generated. determining whether an adaptive transform base selection mode for selecting a transform base according to the size of the decoding target block is valid, When the above adaptive transform basis selection mode is valid, When the vertical size of the decoding target block is larger than a threshold size, a first inverse transform basis is selected from a plurality of inverse transform basis candidates as an inverse transform basis in the vertical direction. When the vertical size of the decoding target block is smaller than the threshold size, a second inverse transform basis is selected as an inverse transform basis in the vertical direction, wherein the second inverse transform basis is a fixed inverse transform basis. A prediction residual is generated by performing a first inverse transform in the vertical direction on the transform coefficients of the decoding target block using the selected inverse transform base in the vertical direction.

4. A coding method, wherein: Determine whether the adaptive transform base selection mode, which selects a transform base according to the size of the encoding target block, is valid, When the above adaptive transform basis selection mode is valid, When the vertical size of the encoding target block is larger than a threshold size, a first transform basis is selected from a plurality of transform basis candidates as a transform basis in the vertical direction. When the vertical size of the encoding target block is smaller than the threshold size, a second transform basis is selected as a transform basis in the vertical direction, wherein the second transform basis is a fixed transform basis. By performing a first vertical transform on the residual of the encoding target block using the selected vertical transform basis, a first transform coefficient is generated. By performing a second transform on the first transform coefficients, a second transform coefficient is generated. A bit stream including information indicating whether the adaptive transform base selection mode is valid is generated.

Citation Information

Patent Citations

  • Method of generating quantized block

    CN103096068A

  • Low complexity transform coding using adaptive DCT / DST for intra-prediction

    CN103098473A