Encoding device, decoding device, encoding method, and decoding method
By introducing a flexible transformation basic selection mechanism in encoding and decoding devices, HEVC's improvement space in compression efficiency and processing load is solved, and a more efficient video encoding and decoding process is achieved.
Patent Information
- Application Number
- JP2023179468
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2017-12-28
- Filing Date
- 2023-10-18
- Publication Date
- 2025-05-12
- Estimated Expiration
- 2038-12-19
AI Technical Summary
Existing video encoding standards such as HEVC have room for improvement in compression efficiency and processing load.
By introducing a flexible transformation basis selection mechanism in the encoding and decoding devices, the appropriate transformation basis is selected according to the block size for horizontal and vertical transformations, and non-separated transformations and inverse transformations, if necessary, to generate and process transformation coefficients.
Improves the compression efficiency of video encoding, reduces processing load, and optimizes resource utilization during encoding and decoding.
Smart Images

Figure 0007675150000003 
Figure 0007675150000004 
Figure 0007675150000005
Abstract
Description
[Technical field]
[0001] The present disclosure relates to an encoding device, a decoding device, an encoding method, and a decoding method. [Background technology]
[0002] A video coding standard called High-Efficiency Video Coding (HEVC) has been standardized by the Joint Collaborative Team on Video Coding (JCT-VC). [Prior art documents] [Non-patent literature]
[0003] [Non-Patent Document 1] H.265 (ISO / IEC 23008-2 HEVC(High Efficiency Video Coding)) [Non-Patent Document 2] Jianle Chen et al., Algorithm Description of Joint Exploration Test Model 5 (JEM 5), Joint Video Exploration Team (JVET) of ITU-T SG 16 WP 3and ISO / IEC JTC 1 / SC 29 / WG 11 5th Meeting: Geneva, CH, Document: JVET-E1001, January 2017 Summary of the Invention [Problem to be solved by the invention]
[0004] In such encoding and decoding techniques, there is a demand for further improvement in compression efficiency and reduction in processing load.
[0005] Therefore, the present disclosure 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. [Means for solving the problem]
[0006] According to an embodiment of the present disclosure, there is provided an encoding device including a circuit and a memory, and when the circuit determines to perform a horizontal transform and a vertical transform on a current block to be encoded, the circuit uses a horizontal transform base and a vertical transform base, respectively, to perform the horizontal transform and the vertical transform on a residual of the current block to be encoded, thereby generating a first transform coefficient. 、( i) when it is determined that a transformation base is selected for the encoding target block based on a size of the encoding target block, before performing the horizontal transformation and the vertical transformation, the circuit selects a first transformation base as the horizontal transformation base from among the transformation base candidates when the horizontal size of the encoding target block is a first horizontal size that is larger than a threshold size, and selects a second transformation base as the horizontal transformation base from among the transformation base candidates when the horizontal size of the encoding target block is the threshold size. Less than Sometimes, A fixed transformation basis a second transformation base is selected as the transformation base in the horizontal direction, and when the vertical size of the block to be coded is a first vertical size that is larger than the threshold size, the first transformation base is selected from among the candidates of the transformation base as the transformation base in the vertical direction, and when the vertical size of the block to be coded is the first vertical size that is larger than the threshold size, Less than Sometimes ,before selecting the second transformation basis as a transformation basis for the vertical direction; generating a bitstream based on quantized coefficients obtained by quantizing the first transform coefficients; (ii) the block to be coded Not separation (non-separable) When performing a transformation, a fundamental transformation base is selected as the vertical transformation base and the horizontal transformation base. performing the non-separable transform on the first transform coefficients to generate second transform coefficients; and generating a bitstream based on quantized coefficients obtained by quantizing the second transform coefficients. .
[0007] A decoding device according to an embodiment of the present disclosure includes a circuit and a memory, the circuit using the memory: (i) inverse quantizing the quantized coefficients of the block to be decoded to generate second transform coefficients; When it is determined that a non-separable inverse transform is to be performed on the block to be decoded, The aboveWhen it is determined that the non-separable inverse transform is performed on the second transform coefficient to generate a first transform coefficient, and a horizontal inverse transform and a vertical inverse transform are performed on the decoding target block, A basic transformation basis is selected as an inverse transformation basis in the vertical direction and an inverse transformation basis in the horizontal direction; Horizontal inverse transformation basis and The above performing the inverse horizontal transform and the inverse vertical transform on the first transform coefficients using the inverse horizontal transform bases and the inverse vertical transform bases, respectively, to generate a residual of the block to be decoded; ii ) if it is determined that the selection of the transformation base for the block to be decoded is performed based on the size of the block to be decoded, the circuit ,before When the horizontal size of the block to be decoded is a first horizontal size larger than a threshold size, a first inverse transformation base is selected as an inverse transformation base in the horizontal direction from among candidates of the inverse transformation base, and when the horizontal size of the block to be decoded is the threshold size, Less than Sometimes, A fixed transformation basis A second inverse transformation base is selected as the inverse transformation base in the horizontal direction, and when the vertical size of the block to be decoded is a first vertical size that is larger than the threshold size, the first inverse transformation base is selected as the inverse transformation base in the vertical direction from among the candidates of the inverse transformation base, and when the vertical size of the block to be decoded is a first vertical size that is larger than the threshold size, Less than Sometimes ,before selecting the second inverse transformation basis as the vertical inverse transformation basis; generating a residual of the block to be decoded by performing the inverse horizontal transform and the inverse vertical transform on the second transform coefficients using the selected inverse horizontal transform base and the selected inverse vertical transform base, respectively; .
[0008] Furthermore, these general or specific aspects may be realized by a system, a method, an integrated circuit, a computer program, or a recording medium such as a computer-readable CD-ROM, or may be realized by any combination of a system, a method, an integrated circuit, a computer program, and a recording medium. Effect of the Invention
[0009] The present disclosure 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]
[0010] [Figure 1] FIG. 1 is a block diagram showing a functional configuration of a coding device according to the first embodiment. [Diagram 2] FIG. 2 is a diagram showing an example of block division according to the first embodiment. [Diagram 3] FIG. 3 is a table showing the transform basis functions corresponding to each transform type. [Figure 4A] FIG. 4A is a diagram showing an example of the shape of a filter used in ALF. [Figure 4B] FIG. 4B is a diagram showing another example of the shape of the filter used in the ALF. [Figure 4C] FIG. 4C is a diagram showing another example of the shape of the filter used in the ALF. [Figure 5A] FIG. 5A is a diagram showing 67 intra prediction modes in intra prediction. [Figure 5B] FIG. 5B is a flowchart for explaining an outline of the predicted image correction process by the OBMC process. [Figure 5C] FIG. 5C is a conceptual diagram for explaining an overview of the predicted image correction process by the OBMC process. [Figure 5D] FIG. 5D is a diagram showing an example of FRUC. [Figure 6] FIG. 6 is a diagram for explaining pattern matching (bilateral matching) between two blocks along a motion trajectory. [Figure 7] FIG. 7 is a diagram for explaining pattern matching (template matching) between a template in a current picture and a block in a reference picture. [Figure 8] FIG. 8 is a diagram for explaining a model assuming uniform linear motion. [Figure 9A] FIG. 9A is a diagram for explaining derivation of a motion vector for each sub-block based on motion vectors of a plurality of adjacent blocks. [Figure 9B] FIG. 9B is a diagram for explaining an overview of the motion vector derivation process in the merge mode. [Figure 9C] FIG. 9C is a conceptual diagram for explaining an overview of the DMVR process. [Figure 9D] FIG. 9D is a diagram for explaining an outline of a predicted image generating method using luminance correction processing by LIC processing. [Figure 10] FIG. 10 is a block diagram showing a functional configuration of a decoding device according to the first embodiment. As shown in FIG. [Figure 11A] FIG. 11A is a block diagram showing an internal configuration of a conversion unit of a coding device according to the first aspect of the first embodiment. [Figure 11B] FIG. 11B is a block diagram showing an internal configuration of an inverse transform unit of a coding device according to the first aspect of the first embodiment. [Figure 12A] FIG. 12A is a flowchart showing the processes of a transform unit and a quantization unit of the encoding device according to the first aspect of the first embodiment. [Figure 12B] FIG. 12B is a flowchart showing a modification of the process of the transform unit and the quantization unit of the encoding device according to the first aspect of the first embodiment. [Figure 13A] FIG. 13A is a flowchart showing the processes of a transform unit and a quantization unit of the encoding device according to the second aspect of the first embodiment. [Figure 13B] FIG. 13B is a flowchart showing the process of the entropy coding unit of the coding device according to the second aspect of the first embodiment. [Figure 14] FIG. 14 is a diagram showing a specific example of syntax in the second aspect of the first embodiment. [Figure 15] FIG. 15 is a table showing specific examples of the transformation bases and the presence or absence of signal coding used in the second mode of the first embodiment. [Figure 16] FIG. 16 is a flowchart showing the process of the transform unit and the quantization unit of the encoding device according to the third aspect of the first embodiment. [Figure 17A] FIG. 17A is a flowchart showing the processes of a transform unit and a quantization unit of the encoding device according to the fourth aspect of the first embodiment. [Figure 17B]FIG. 17B is a flowchart showing the process of the entropy coding unit of the coding device according to the fourth aspect of the first embodiment. [Figure 18] FIG. 18 is a diagram showing a specific example of syntax in the fourth aspect of the first embodiment. [Figure 19] FIG. 19 is a table showing specific examples of the transformation bases and the presence or absence of signal coding used in the fourth aspect of the first embodiment. [Figure 20] FIG. 20 is a block diagram showing an internal configuration of an inverse transform unit of a decoding device according to the fifth aspect of the first embodiment. In FIG. [Figure 21] FIG. 21 is a flowchart showing the process of the inverse quantization unit and the inverse transform unit of the decoding device according to the fifth aspect of the first embodiment. [Figure 22A] FIG. 22A is a flowchart showing the process of the entropy decoding unit of the decoding device according to the sixth aspect of the first embodiment. [Figure 22B] FIG. 22B is a flowchart showing the processes of the inverse quantization unit and the inverse transform unit of the decoding device according to the sixth aspect of the first embodiment. [Diagram 23] FIG. 23 is a flowchart showing the process of the inverse quantization unit and the inverse transform unit of the decoding device according to the seventh aspect of the first embodiment. [Figure 24A] FIG. 24A is a flowchart showing the process of the entropy decoding unit of the decoding device according to the eighth aspect of the first embodiment. [Figure 24B] FIG. 24B is a flowchart showing the processes of the inverse quantization unit and the inverse transform unit of the decoding device according to the eighth aspect of the first embodiment. [Diagram 25] FIG. 25 is a diagram showing the overall configuration of a content supply system that realizes a content distribution service. [Figure 26] FIG. 26 is a diagram showing an example of a coding structure in scalable coding. [Figure 27] FIG. 27 is a diagram showing an example of a coding structure in scalable coding. [Figure 28] FIG. 28 is a diagram showing an example of a display screen of a web page. [Figure 29]FIG. 29 is a diagram showing an example of a display screen of a web page. [Diagram 30] FIG. 30 is a diagram illustrating an example of a smartphone. [Diagram 31] FIG. 31 is a block diagram showing an example of the configuration of a smartphone. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0011] Hereinafter, the embodiment will be described in detail with reference to the drawings.
[0012] The embodiments described below are all comprehensive or specific examples. The numerical values, shapes, materials, components, component arrangement and connection forms, steps, and order of steps shown in the following embodiments are merely examples and are not intended to limit the scope of the claims. Furthermore, among the components in the following embodiments, components that are not described in an independent claim showing a top concept are described as optional components.
[0013] (Embodiment 1) First, an overview of the first embodiment will be described as an example of an encoding device and a decoding device to which the processes and / or configurations described in each aspect of the present disclosure can be applied. However, the first embodiment is merely an example of an encoding device and a decoding device to which the processes and / or configurations described in each aspect of the present disclosure can be applied, and the processes and / or configurations described in each aspect of the present disclosure can also be implemented in encoding devices and decoding devices different from the first embodiment.
[0014] When applying the processing and / or configurations described in each aspect of the present disclosure to the first embodiment, for example, any of the following may be performed.
[0015] (1) For the encoding device or the decoding device of the first embodiment, among the multiple components constituting the encoding device or the decoding device, components corresponding to the components described in each aspect of the present disclosure are replaced with the components described in each aspect of the present disclosure. (2) To the encoding device or decoding device of the first embodiment, any modification such as addition, replacement, or deletion of functions or processes performed by some of the components constituting the encoding device or decoding device is made, and then the components corresponding to the components described in each aspect of the present disclosure are replaced with the components described in each aspect of the present disclosure. (3) Adding a process to the method implemented by the encoding device or decoding device of the first embodiment, and / or replacing or deleting some of the processes included in the method, and then replacing the process corresponding to the process described in each aspect of the present disclosure with the process described in each aspect of the present disclosure. (4) Some of the components constituting the encoding device or decoding device of the first embodiment may be implemented in combination with components described in each aspect of the present disclosure, components having some of the functions of the components described in each aspect of the present disclosure, or components performing some of the processing performed by the components described in each aspect of the present disclosure. (5) Implementing a component having some of the functions of some of the multiple components constituting the encoding device or decoding device of embodiment 1, or a component that performs some of the processing performed by some of the multiple components constituting the encoding device or decoding device of embodiment 1, in combination with a component described in each aspect of the present disclosure, a component having some of the functions of the component described in each aspect of the present disclosure, or a component that performs some of the processing performed by the component described in each aspect of the present disclosure. (6) In the method implemented by the encoding device or the decoding device of the first embodiment, among a plurality of processes included in the method, a process corresponding to a process described in each aspect of the present disclosure is replaced with a process described in each aspect of the present disclosure. (7) Some of the processes included in the method implemented by the encoding device or the decoding device of the first embodiment may be implemented in combination with the processes described in each aspect of the present disclosure. The manner of implementing the processes and / or configurations described in each aspect of the present disclosure is not limited to the above examples. For example, the processes and / or configurations may be implemented in a device used for a purpose different from the video / image encoding device or video / image decoding device disclosed in the first embodiment, or the processes and / or configurations described in each aspect may be implemented alone. Furthermore, the processes and / or configurations described in different aspects may be implemented in combination.
[0016] [Outline of the encoding device] First, a description will be given of an overview of a coding device according to embodiment 1. Fig. 1 is a block diagram showing a functional configuration of a coding device 100 according to embodiment 1. The coding device 100 is a video / image coding device that codes a video / image on a block-by-block basis.
[0017] As shown in FIG. 1, the encoding device 100 is a device that encodes an image on a block-by-block basis, and includes a division unit 102, a subtraction unit 104, a transformation unit 106, a quantization unit 108, an entropy encoding 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 prediction unit 124, an inter prediction unit 126, and a prediction control unit 128.
[0018] The encoding device 100 is realized by, for example, a general-purpose processor and a memory. In this case, when the software program stored in the memory is executed by the processor, the processor functions as the division 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 prediction unit 124, the inter prediction unit 126, and the prediction control unit 128. The encoding device 100 may also be realized as one or more dedicated electronic circuits corresponding to the division 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 prediction unit 124, the inter prediction unit 126, and the prediction control unit 128.
[0019] Each component included in the encoding device 100 will be described below.
[0020] [Divided part] The division unit 102 divides each picture included in the input video into a plurality of blocks, and outputs each block to the subtraction unit 104. For example, the division unit 102 first divides a picture into blocks of a fixed size (e.g., 128x128). These fixed-size blocks may be called coding tree units (CTUs). The division unit 102 then divides each of the fixed-size blocks into blocks of a variable size (e.g., 64x64 or less) based on recursive quadtree and / or binary tree block division. These variable-size blocks may be called coding units (CUs), prediction units (PUs), or transform units (TUs). Note that in this embodiment, it is not necessary to distinguish between CUs, PUs, and TUs, and some or all of the blocks in a picture may be the processing units of CUs, PUs, and TUs.
[0021] Fig. 2 is a diagram showing an example of block division according to embodiment 1. In Fig. 2, solid lines represent block boundaries based on quadtree block division, and dashed lines represent block boundaries based on binary tree block division.
[0022] Here, the block 10 is a square block of 128x128 pixels (128x128 block). This 128x128 block 10 is first divided into four square 64x64 blocks (quadtree block division).
[0023] The top-left 64x64 block is further divided vertically into two rectangular 32x64 blocks, and the left 32x64 block is further divided vertically into two rectangular 16x64 blocks (binary tree block division). As a result, the top-left 64x64 block is divided into two 16x64 blocks 11 and 12 and a 32x64 block 13.
[0024] The top right 64x64 block is divided horizontally into two rectangular 64x32 blocks 14, 15 (binary tree block division).
[0025] The bottom left 64x64 block is divided into four square 32x32 blocks (quadtree block division). Of the four 32x32 blocks, the top left and bottom right blocks are further divided. The top left 32x32 block is divided vertically into two rectangular 16x32 blocks, and the right 16x32 block is further divided horizontally into two 16x16 blocks (binary tree block division). The bottom right 32x32 block is divided horizontally into two 32x16 blocks (binary tree block division). As a result, the bottom left 64x64 block is divided into a 16x32 block 16, two 16x16 blocks 17, 18, two 32x32 blocks 19, 20, and two 32x16 blocks 21, 22.
[0026] The bottom right 64x64 block 23 is not split.
[0027] 2, the block 10 is divided into 13 variable-sized blocks 11 to 23 based on recursive quad-tree and binary tree block division. Such division is sometimes called QTBT (quad-tree plus binary tree) division.
[0028] In Fig. 2, 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 may be divided into three blocks (ternary tree block division). Division including such ternary tree block division is sometimes called MBT (multi type tree) division.
[0029] [Subtraction section] The subtraction unit 104 subtracts a prediction signal (prediction sample) from an original signal (original sample) for each block divided by the division unit 102. That is, the subtraction unit 104 calculates a prediction error (also called a residual error) of a block to be coded (hereinafter, referred to as a current block). Then, the subtraction unit 104 outputs the calculated prediction error to the conversion unit 106.
[0030] 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.
[0031] [Conversion section] The transform unit 106 transforms the prediction error in the spatial domain into transform coefficients in the frequency domain, and outputs the transform coefficients to the quantization unit 108. Specifically, the transform unit 106 performs, for example, a predetermined discrete cosine transform (DCT) or discrete sine transform (DST) on the prediction error in the spatial domain.
[0032] The transform unit 106 may adaptively select a transform type from among a plurality of transform types, and transform the prediction errors into transform coefficients using a transform basis function corresponding to the selected transform type. Such a transform may be called an explicit multiple core transform (EMT) or an adaptive multiple transform (AMT).
[0033] The multiple transform types include, for example, DCT-II, DCT-V, DCT-VIII, DST-I, and DST-VII. Figure 3 is a table showing the transform basis functions corresponding to each transform type. In Figure 3, N indicates the number of input pixels. The selection of the transform type from among the multiple transform types may depend on, for example, the type of prediction (intra prediction and inter prediction) or the intra prediction mode.
[0034] Such information indicating whether EMT or AMT is applied (e.g., called an AMT flag) and information indicating the selected transformation type are signaled at the CU level. Note that the signaling of such information does not need to be limited to the CU level, and may be at other levels (e.g., sequence level, picture level, slice level, tile level, or CTU level).
[0035] Furthermore, the transform unit 106 may retransform the transform coefficients (transformation results). Such retransformation may be called AST (adaptive secondary transform) or NSST (non-separable secondary transform). For example, the transform unit 106 performs retransformation for each subblock (e.g., 4x4 subblock) included in a block of transform coefficients corresponding to intra-prediction errors. Information indicating whether or not to apply NSST and information regarding a transform matrix used in NSST are signaled at a CU level. Note that signaling of these pieces of information does not need to be limited to the CU level, and may be at other levels (e.g., sequence level, picture level, slice level, tile level, or CTU level).
[0036] Here, a separable transformation is a method in which the transformation is performed multiple times by separating the input into directions equal to the number of dimensions, and a non-separable transformation is a method in which when the input is multidimensional, two or more dimensions are treated as one dimension and the transformation is performed together.
[0037] For example, one example of a non-separable transformation is when the input is a 4x4 block, it is treated as a single array with 16 elements, and a 16x16 transformation matrix is used to transform the array.
[0038] Another example of a non-separable transformation is the Hypercube Givens Transform, which treats a 4x4 input block as a single array with 16 elements and then performs Givens rotations on that array multiple times.
[0039] [Quantization section] 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 a quantization parameter (QP) corresponding to the scanned transform coefficients. Then, the quantization unit 108 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.
[0040] The predetermined order is an order for quantization / dequantization of the transform coefficients. For example, the predetermined scanning order is defined as ascending (low to high) or descending (high to low) frequency order.
[0041] The quantization parameter is a parameter that defines the quantization step (quantization width). For example, if the value of the quantization parameter increases, the quantization step also increases. In other words, if the value of the quantization parameter increases, the quantization error increases.
[0042] [Entropy coding part] The entropy coding unit 110 generates a coded signal (coded bit stream) by variable-length coding the quantized coefficients input from the quantization unit 108. Specifically, the entropy coding unit 110, for example, binarizes the quantized coefficients and arithmetically codes the binary signal.
[0043] [Dequantization section] The inverse quantization unit 112 inverse quantizes the quantized coefficients input from the quantization unit 108. Specifically, the inverse quantization unit 112 inverse quantizes the quantized coefficients of the current block in a predetermined scanning order. Then, the inverse quantization unit 112 outputs the inverse quantized transform coefficients of the current block to the inverse transform unit 114.
[0044] [Inverse conversion section] The inverse transform unit 114 restores the prediction error by inverse transforming the transform coefficients that are input from the inverse quantization unit 112. Specifically, the inverse transform unit 114 restores the prediction error of the current block by performing an inverse transform on the transform coefficients that corresponds to the transform performed by the transform unit 106. Then, the inverse transform unit 114 outputs the restored prediction error to the adder unit 116.
[0045] Note that the restored prediction error does not match the prediction error calculated by the subtraction unit 104 because information has been lost due to quantization. That is, the restored prediction error includes a quantization error.
[0046] [Addition section] The adder 116 reconstructs the current block by adding the prediction error input from the inverse transformer 114 and 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 called a local decoded block.
[0047] [Block memory] The block memory 118 is a storage unit for storing blocks that are referenced in intra prediction and are in a picture to be coded (hereinafter, referred to as a current picture). Specifically, the block memory 118 stores the reconstructed blocks output from the adder 116.
[0048] [Loop filter section] The loop filter unit 120 applies a loop filter to the block reconstructed by the adder unit 116, and outputs the filtered reconstructed block to the frame memory 122. The loop filter is a filter (in-loop filter) used in the encoding loop, and includes, for example, a deblocking filter (DF), a sample adaptive offset (SAO), and an adaptive loop filter (ALF).
[0049] In ALF, a least squared error filter is applied to remove coding artifacts. For example, for each 2x2 sub-block in the current block, one filter is selected from among multiple filters based on local gradient direction and activity.
[0050] Specifically, first, sub-blocks (e.g., 2x2 sub-blocks) are classified into a plurality of classes (e.g., 15 or 25 classes). The classification of the sub-blocks is performed based on the gradient direction and activity. For example, a classification value C (e.g., C=5D+A) is calculated using a gradient direction value D (e.g., 0 to 2 or 0 to 4) and a gradient activity value A (e.g., 0 to 4). Then, based on the classification value C, the sub-blocks are classified into a plurality of classes (e.g., 15 or 25 classes).
[0051] The gradient direction value D is derived, for example, by comparing gradients in multiple directions (e.g., horizontal, vertical, and two diagonal directions), and the gradient activity value A is derived, for example, by adding gradients in multiple directions and quantizing the sum.
[0052] Based on the result of such classification, a filter for the sub-block is determined from among a plurality of filters.
[0053] The shape of the filter used in the ALF is, for example, a circularly symmetric shape. FIGS. 4A to 4C are diagrams showing a number of examples of the shape of the filter used in the ALF. FIG. 4A shows a 5×5 diamond-shaped filter, FIG. 4B shows a 7×7 diamond-shaped filter, and FIG. 4C shows a 9×9 diamond-shaped filter. Information indicating the shape of the filter is signaled at the picture level. Note that the signaling of the information indicating the shape of the filter does not need to be limited to the picture level, and may be at other levels (for example, the sequence level, slice level, tile level, CTU level, or CU level).
[0054] The on / off of ALF is determined, for example, at the picture level or the CU level. For example, whether or not to apply ALF is determined for luminance at the CU level, and whether or not to apply ALF is determined for chrominance at the picture level. Information indicating whether or not to apply ALF is signaled at the picture level or the CU level. Note that the signaling of information indicating whether or not to apply ALF is not limited to the picture level or the CU level, and may be at another level (for example, the sequence level, the slice level, the tile level, or the CTU level).
[0055] The coefficient sets of multiple selectable filters (e.g., up to 15 or 25 filters) are signaled at the picture level. Note that the signaling of the coefficient sets does not need to be limited to the picture level, but may be at other levels (e.g., sequence level, slice level, tile level, CTU level, CU level, or sub-block level).
[0056] [Frame memory] The frame memory 122 is a storage unit for storing reference pictures used in inter prediction, and may be called a frame buffer. Specifically, the frame memory 122 stores the reconstructed block filtered by the loop filter unit 120.
[0057] [Intra prediction section] The intra prediction unit 124 generates a prediction signal (intra prediction signal) by performing intra prediction (also called intra-screen prediction) of the current block with reference to a block in the current picture stored in the block memory 118. Specifically, the intra prediction unit 124 generates an intra prediction signal by performing intra prediction with reference to samples (e.g., luminance values, chrominance values) of blocks adjacent to the current block, and outputs the intra prediction signal to the prediction control unit 128.
[0058] For example, the intra prediction unit 124 performs intra prediction using one of a plurality of predefined intra prediction modes. The plurality of intra prediction modes includes one or more non-directional prediction modes and a plurality of directional prediction modes.
[0059] 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 / High-Efficiency Video Coding (HEVC) standard (Non-Patent Document 1).
[0060] The multiple directional prediction modes include, for example, 33 prediction modes defined in the H.265 / HEVC standard. The multiple directional prediction modes may include 32 prediction modes in addition to the 33 directions (a total of 65 directional prediction modes). FIG. 5A is a diagram showing 67 intra prediction modes (2 non-directional prediction modes and 65 directional prediction modes) in intra prediction. The solid arrows represent the 33 directions defined in the H.265 / HEVC standard, and the dashed arrows represent the additional 32 directions.
[0061] In addition, in the intra prediction of the chrominance block, the luminance block may be referenced. That is, the chrominance component of the current block may be predicted based on the luminance component of the current block. Such intra prediction may be called CCLM (cross-component linear model) prediction. An intra prediction mode of the chrominance block that refers to such a luminance block (for example, called a CCLM mode) may be added as one of the intra prediction modes of the chrominance block.
[0062] The intra prediction unit 124 may correct pixel values after intra prediction based on the gradient of reference pixels in the horizontal / vertical directions. Intra prediction with such correction may be called position dependent intra prediction combination (PDPC). Information indicating whether or not PDPC is applied (e.g., called a PDPC flag) is signaled, for example, at a CU level. Note that the signaling of this information does not need to be limited to the CU level, and may be at other levels (e.g., sequence level, picture level, slice level, tile level, or CTU level).
[0063] [Inter prediction section] The inter prediction unit 126 generates a prediction signal (inter prediction signal) by performing inter prediction (also called inter prediction) of the current block with reference to a reference picture stored in the frame memory 122 and different from the current picture. The inter prediction is performed in units of the current block or a sub-block (e.g., 4x4 block) in the current block. For example, the inter prediction unit 126 performs motion estimation in the reference picture for the current block or the sub-block. Then, the inter prediction unit 126 generates an inter prediction signal of the current block or the sub-block by performing motion compensation using motion information (e.g., a motion vector) obtained by the motion estimation. Then, the inter prediction unit 126 outputs the generated inter prediction signal to the prediction control unit 128.
[0064] The motion information used for the motion compensation is signaled. For the signaling of the motion vector, a motion vector predictor may be used, i.e. the difference between the motion vector and the motion vector predictor may be signaled.
[0065] In addition, the inter prediction signal may be generated using not only the motion information of the current block obtained by motion search, but also the motion information of the adjacent block. Specifically, the inter prediction signal may be generated for each sub-block in the current block by performing weighted addition of the prediction signal based on the motion information obtained by motion search and the prediction signal based on the motion information of the adjacent block. Such inter prediction (motion compensation) may be called OBMC (overlapped block motion compensation).
[0066] In such an OBMC mode, information indicating the size of a sub-block for OBMC (e.g., called OBMC block size) is signaled at the sequence level. Also, information indicating whether or not to apply the OBMC mode (e.g., called OBMC flag) is signaled at the CU level. Note that the signaling level of these pieces of information does not need to be limited to the sequence level and CU level, and may be other levels (e.g., picture level, slice level, tile level, CTU level, or sub-block level).
[0067] The OBMC mode will now be described in more detail. Figures 5B and 5C are a flowchart and a conceptual diagram for explaining an overview of the predicted image correction process in the OBMC process.
[0068] First, a predicted image (Pred) is obtained by normal motion compensation using a motion vector (MV) assigned to a block to be coded.
[0069] Next, the motion vector (MV_L) of the already-encoded left adjacent block is applied to the block to be encoded to obtain a predicted image (Pred_L), and the predicted image is weighted and superimposed with Pred_L to perform a first correction of the predicted image.
[0070] Similarly, the motion vector (MV_U) of the already-encoded adjacent block above is applied to the block to be encoded to obtain a predicted image (Pred_U), and the predicted image that has been corrected the first time is weighted and overlaid with Pred_U to perform a second correction of the predicted image, which is then used as the final predicted image.
[0071] Although a two-stage correction method using the left adjacent block and the upper adjacent block has been described here, it is also possible to configure a method in which more than two stages of correction are performed using the right adjacent block or the lower adjacent block.
[0072] The area in which overlapping is performed does not have to be the entire pixel area of the block, but may be only a part of the area near the block boundary.
[0073] Note that although the above describes the process of correcting a predicted image from one reference picture, the process is similar when correcting a predicted image from multiple reference pictures. After obtaining corrected predicted images from each reference picture, the obtained predicted images are then overlaid to obtain the final predicted image.
[0074] The block to be processed may be a prediction block unit, or a sub-block unit obtained by further dividing the prediction block.
[0075] As a method of determining whether or not to apply OBMC processing, for example, there is a method of using obmc_flag, which is a signal indicating whether or not to apply OBMC processing. As a specific example, in an encoding device, it is determined whether or not the encoding target block belongs to an area with complex motion, and if it belongs to an area with complex motion, a value of 1 is set as obmc_flag and encoding is performed by applying OBMC processing, and if it does not belong to an area with complex motion, a value of 0 is set as obmc_flag and encoding is performed without applying OBMC processing. On the other hand, in a decoding device, by decoding obmc_flag described in a stream, decoding is performed by switching whether or not to apply OBMC processing according to the value.
[0076] In addition, the motion information may be derived on the decoding device side without being signaled. For example, a merge mode defined in the H.265 / HEVC standard may be used. Also, for example, the motion information may be derived by performing motion estimation on the decoding device side. In this case, the motion estimation is performed without using pixel values of the current block.
[0077] Here, a mode in which motion estimation is performed on the decoding device side will be described. This mode in which motion estimation is performed on the decoding device side is sometimes called a pattern matched motion vector derivation (PMMVD) mode or a frame rate up-conversion (FRUC) mode.
[0078] An example of the FRUC process is shown in FIG. 5D. First, a list of multiple candidates (which may be the same as the merge list) each having a predicted motion vector is generated by referring to the motion vectors of encoded blocks spatially or temporally adjacent to the current block. Next, a best candidate MV is selected from multiple candidate MVs registered in the candidate list. For example, an evaluation value of each candidate included in the candidate list is calculated, and one candidate is selected based on the evaluation value.
[0079] Then, based on the motion vector of the selected candidate, a motion vector for the current block is derived. Specifically, for example, the motion vector of the selected candidate (best candidate MV) is derived as it is as the motion vector for the current block. Also, for example, the motion vector for the current block may be derived by performing pattern matching in the surrounding area of the position in the reference picture corresponding to the motion vector of the selected candidate. That is, a search is performed in the surrounding area of the best candidate MV in the same manner, and if there is an MV with a better evaluation value, the best candidate MV may be updated to the MV, and the MV may be set as the final MV of the current block. It is also possible to configure the system without performing this process.
[0080] The same processing may be performed when processing is performed in sub-block units.
[0081] The evaluation value is calculated by finding a difference value of the reconstructed image by pattern matching between an area in a reference picture corresponding to the motion vector and a predetermined area. The evaluation value may be calculated using information other than the difference value.
[0082] As the pattern matching, a first pattern matching or a second pattern matching is used. The first pattern matching and the second pattern matching are sometimes called bilateral matching and template matching, respectively.
[0083] 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, an area in another reference picture along the motion trajectory of the current block is used as a predetermined area for calculating the evaluation value of the above-mentioned candidate.
[0084] FIG. 6 is a diagram for explaining an example of pattern matching (bilateral matching) between two blocks along a motion trajectory. As shown in FIG. 6, in the first pattern matching, two motion vectors (MV0, MV1) are derived by searching for a pair of two blocks that are along the motion trajectory of a current block (Cur block) and are in two different reference pictures (Ref0, Ref1) that best match each other. Specifically, for the current block, a difference is derived between a reconstructed image at a designated position in a first coded reference picture (Ref0) designated by a candidate MV and a reconstructed image at a designated position in a second coded reference picture (Ref1) designated by a symmetric MV obtained by scaling the candidate MV by a display time interval, and an evaluation value is calculated using the obtained difference value. It is preferable to select the candidate MV with the best evaluation value among a plurality of candidate MVs as the final MV.
[0085] Under the assumption of continuous motion trajectories, the motion vectors (MV0, MV1) pointing to two reference blocks are proportional to the temporal distances (TD0, TD1) between the current picture (Cur Pic) and the two reference pictures (Ref0, Ref1). For example, if the current picture is located between two reference pictures in time and the temporal distances from the current picture to the two reference pictures are equal, the first pattern matching derives bidirectional motion vectors that are mirror-symmetric.
[0086] 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, a block adjacent to the current block in the current picture is used as a predetermined area for calculating the evaluation value of the above-mentioned candidate.
[0087] Fig. 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. As shown in Fig. 7, in the second pattern matching, a motion vector of a current block is derived by searching in a reference picture (Ref0) for a block that best matches a block adjacent to a current block (Cur block) in a current picture (Cur Pic). Specifically, for the current block, a difference is derived between a reconstructed image of both or either of the left adjacent and upper adjacent coded areas and a reconstructed image at the same position in a coded reference picture (Ref0) specified by a candidate MV, an evaluation value is calculated using the obtained difference value, and a candidate MV with the best evaluation value among a plurality of candidate MVs is selected as a best candidate MV.
[0088] Information indicating whether such a FRUC mode is applied (e.g., when the FRUC flag is true) is signaled at the CU level. Also, when the FRUC mode is applied (e.g., when the FRUC flag is true), information indicating a pattern matching method (first pattern matching or second pattern matching) (e.g., when the FRUC mode flag is true) is signaled at the CU level. Note that the signaling of such information does not need to be limited to the CU level, and may be at other levels (e.g., sequence level, picture level, slice level, tile level, CTU level, or subblock level).
[0089] Here, we will explain a mode in which a motion vector is derived based on a model that assumes uniform linear motion. This mode is called BIO (bi-directional optical This is sometimes called "flow" mode.
[0090] FIG. 8 is a diagram for explaining a model assuming uniform linear motion. In FIG. x ,v y ) denotes the velocity vector, and τ 0 , τ 1respectively represent the current picture (Cur Pic) and two reference pictures (Ref 0 ,Ref 1 ) indicates the time distance between (MVx 0 ,MVy 0 ) is the reference picture Ref 0 Let us denote the motion vector corresponding to (MVx 1 , M.V.y. 1 ) is the reference picture Ref 1 The motion vector corresponding to
[0091] At this time, the velocity vector (v x ,v y Under the assumption of uniform linear motion of (MVx 0 ,MVy 0 ) and (MVx 1 ,MVy 1 ) are respectively, (v x τ 0 ,v y τ 0 ) and (-v x τ 1 ,-v y τ 1 ) and the following optical flow equation (1) holds:
[0092]
number
[0093] Here, I (k) denotes the luminance value of reference image k (k=0,1) after motion compensation. This optical flow equation indicates that the sum of (i) the time derivative 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 a combination of this optical flow equation and Hermite interpolation, block-wise motion vectors obtained from a merge list or the like are corrected pixel by pixel.
[0094] Note that the decoding device may derive a motion vector using a method other than the method based on a model assuming uniform linear motion. For example, a motion vector may be derived for each sub-block based on the motion vectors of multiple adjacent blocks.
[0095] Here, a mode in which a motion vector is derived for each sub-block based on the motion vectors of a plurality of adjacent blocks will be described. This mode is sometimes called an affine motion compensation prediction mode.
[0096] 9A is a diagram for explaining derivation of a motion vector for each sub-block based on the motion vectors of multiple adjacent blocks. In FIG. 9A, the current block includes 16 4x4 sub-blocks. Here, the motion vector v of the upper left corner control point of the current block is derived based on the motion vectors of the adjacent blocks. 0 is derived, and the motion vector v of the upper right corner control point of the current block is calculated based on the motion vectors of the neighboring sub-blocks. 1 Then, two motion vectors v 0 and v 1 Using the above, the motion vector (v x ,v y ) is derived.
[0097]
number
[0098] Here, x and y respectively indicate the horizontal and vertical positions of the sub-block, and w indicates a predetermined weighting factor.
[0099] Such affine motion compensation prediction mode may include several modes with different methods of deriving the motion vectors of the upper left and upper right corner control points. Information indicating such affine motion compensation prediction mode (e.g., called affine flag) is signaled at the CU level. Note that the signaling of the information indicating this affine motion compensation prediction mode does not need to be limited to the CU level, and may be at other levels (e.g., sequence level, picture level, slice level, tile level, CTU level, or subblock level).
[0100] [Predictive control unit] The prediction control unit 128 selects either the intra-prediction signal or the inter-prediction signal, and outputs the selected signal to the subtraction unit 104 and the addition unit 116 as a prediction signal.
[0101] Here, an example of deriving a motion vector for a picture to be coded in the merge mode will be described. Fig. 9B is a diagram for explaining an overview of a motion vector derivation process in the merge mode.
[0102] First, a prediction MV list is generated in which prediction MV candidates are registered. The prediction MV candidates include spatially adjacent prediction MVs, which are MVs held by multiple coded blocks located spatially around the coding target block, temporally adjacent prediction MVs, which are MVs held by nearby blocks projected from the position of the coding target block in a coded reference picture, joint prediction MVs, which are MVs generated by combining the MV values of spatially adjacent prediction MVs and temporally adjacent prediction MVs, and zero prediction MVs, which are MVs with a value of zero.
[0103] Next, one prediction MV is selected from the multiple prediction MVs registered in the prediction MV list, and is determined as the MV for the block to be coded.
[0104] Furthermore, the variable length coding unit writes merge_idx, which is a signal indicating which predicted MV has been selected, into the stream and codes it.
[0105] Note that the predicted MVs registered in the predicted MV list described in Figure 9B are just an example, and the number may be different from the number shown in the figure, the configuration may not include some of the types of predicted MVs shown in the figure, or the configuration may include additional predicted MVs other than the types of predicted MVs shown in the figure.
[0106] Note that the final MV may be determined by performing DMVR processing, which will be described later, using the MV of the block to be coded derived in the merge mode.
[0107] Here, an example of determining the MV using the DMVR process will be described.
[0108] FIG. 9C is a conceptual diagram for explaining an overview of the DMVR process.
[0109] First, the optimal MVP set for the block to be processed is set as a candidate MV, and reference pixels are obtained from the first reference picture, which is a processed picture in the L0 direction, and the second reference picture, which is a processed picture in the L1 direction, according to the candidate MV, and a template is generated by taking the average of each reference pixel.
[0110] Next, the template is used to search the surrounding areas of the candidate MVs of the first and second reference pictures, and the MV with the smallest cost is determined as the final MV. The cost value is calculated using the difference value between each pixel value of the template and each pixel value of the search area, the MV value, etc.
[0111] The outline of the processing described here is basically the same for the encoding device and the decoding device.
[0112] Note that other processing may be used instead of the processing described here, as long as it is processing that can search the vicinity of the candidate MV and derive the final MV.
[0113] Here, a mode in which a predicted image is generated using LIC processing will be described.
[0114] FIG. 9D is a diagram for explaining an outline of a predicted image generating method using luminance correction processing by LIC processing.
[0115] First, a MV for obtaining a reference image corresponding to a block to be coded from a reference picture that is a coded picture is derived.
[0116] Next, for the block to be coded, the luminance pixel values of the coded surrounding reference areas adjacent to the left and above and the luminance pixel values at the equivalent positions in the reference picture specified by the MV are used to extract information indicating how the luminance values have changed between the reference picture and the picture to be coded, and a luminance correction parameter is calculated.
[0117] A luminance correction process is performed on a reference image in a reference picture specified by the MV using the luminance correction parameter, thereby generating a predicted image for the block to be coded.
[0118] It should be noted that the shape of the peripheral reference region in FIG. 9D is just an example, and other shapes may be used.
[0119] Although the process of generating a predicted image from one reference picture has been described here, the process is similar when generating a predicted image from multiple reference pictures, and a luminance correction process is performed in a similar manner on the reference images obtained from each reference picture before generating a predicted image.
[0120] As a method of determining whether or not to apply LIC processing, for example, there is a method of using lic_flag, which is a signal indicating whether or not to apply LIC processing. As a specific example, in an encoding device, it is determined whether or not the encoding target block belongs to an area where a luminance change occurs, and if it belongs to an area where a luminance change occurs, a value of 1 is set as lic_flag and encoding is performed by applying LIC processing, and if it does not belong to an area where a luminance change occurs, a value of 0 is set as lic_flag and encoding is performed without applying LIC processing. On the other hand, a decoding device decodes lic_flag described in a stream, and switches whether or not to apply LIC processing depending on the value and performs decoding.
[0121] Another method of determining whether to apply LIC processing is, for example, a method of determining according to whether LIC processing is applied to surrounding blocks.As a specific example, when the block to be coded is in merge mode, determine whether the surrounding coded block selected when deriving MV in merge mode processing is coded by applying LIC processing, and switch whether to apply LIC processing according to the result and perform coding.In addition, in this example, the process in decoding is exactly the same.
[0122] [Overview of the Decryption Device] Next, a description will be given of an overview of a decoding device capable of decoding the coded signal (coded bit stream) output from the above coding device 100. Fig. 10 is a block diagram showing a functional configuration of a decoding device 200 according to the first embodiment. The decoding device 200 is a video / image decoding device that decodes a video / image on a block-by-block basis.
[0123] As shown in FIG. 10, the decoding device 200 includes an entropy decoding unit 202, an inverse quantization unit 204, an inverse transform unit 206, an addition unit 208, a block memory 210, a loop filter unit 212, a frame memory 214, an intra prediction unit 216, an inter prediction unit 218, and a prediction control unit 220.
[0124] The decoding device 200 is realized by, for example, a general-purpose processor and a memory. In this case, when the software program stored in the memory is executed by the processor, the processor functions as the entropy decoding unit 202, the inverse quantization unit 204, the inverse transform unit 206, the addition unit 208, the loop filter unit 212, the intra prediction unit 216, the inter prediction unit 218, and the prediction control unit 220. The decoding device 200 may also be realized as one or more dedicated electronic circuits corresponding to the entropy decoding unit 202, the inverse quantization unit 204, the inverse transform unit 206, the addition unit 208, the loop filter unit 212, the intra prediction unit 216, the inter prediction unit 218, and the prediction control unit 220.
[0125] Each component included in the decoding device 200 will be described below.
[0126] [Entropy Decoding Part] The entropy decoding unit 202 entropy decodes the coded bit stream. Specifically, the entropy decoding unit 202 arithmetically decodes the coded bit stream into a binary signal, for example. The entropy decoding unit 202 then debinarizes the binary signal. As a result, the entropy decoding unit 202 outputs quantized coefficients to the inverse quantization unit 204 on a block-by-block basis.
[0127] [Dequantization section] The inverse quantization unit 204 inverse quantizes the quantized coefficients of a block to be decoded (hereinafter, referred to as a current block) that is input from the entropy decoding unit 202. Specifically, the inverse quantization unit 204 inverse quantizes each quantized coefficient of the current block based on a quantization parameter corresponding to the quantized coefficient. Then, the inverse quantization unit 204 outputs the inverse quantized quantized coefficients (i.e., transform coefficients) of the current block to the inverse transform unit 206.
[0128] [Inverse conversion section] The inverse transform unit 206 restores the prediction error by inverse transforming the transform coefficients input from the inverse quantization unit 204 .
[0129] For example, if the information interpreted from the encoded bitstream indicates that EMT or AMT is to be applied (e.g., the AMT flag is true), the inverse transform unit 206 inverse transforms the transform coefficients of the current block based on the interpreted information indicating the transform type.
[0130] Also for example, if the information interpreted from the coded bitstream indicates to apply NSST, then inverse transform unit 206 applies an inverse re-transform to the transform coefficients.
[0131] [Addition section] The adder 208 reconstructs the current block by adding the prediction error, which is an input from the inverse transformer 206, and the prediction sample, which is an 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.
[0132] [Block memory] The block memory 210 is a storage unit for storing blocks that are referenced in intra prediction and are in a picture to be decoded (hereinafter, referred to as a current picture). Specifically, the block memory 210 stores the reconstructed block output from the adder 208.
[0133] [Loop filter section] The loop filter unit 212 applies a loop filter to the block reconstructed by the adder unit 208, and outputs the filtered reconstructed block to a frame memory 214, a display device, or the like.
[0134] If the information indicating ALF on / off read from the encoded bitstream indicates ALF on, one filter is selected from among multiple filters based on the local gradient direction and activity, and the selected filter is applied to the reconstructed block.
[0135] [Frame memory] The frame memory 214 is a storage unit for storing reference pictures used in inter prediction, and may be called a frame buffer. Specifically, the frame memory 214 stores the reconstructed blocks filtered by the loop filter unit 212.
[0136] [Intra prediction section] The intra prediction unit 216 generates a prediction signal (intra prediction signal) by performing intra prediction with reference to a block in the current picture stored in the block memory 210 based on an intra prediction mode interpreted from the encoded bit stream. Specifically, the intra prediction unit 216 generates an intra prediction signal by performing intra prediction with reference to samples (e.g., luminance values, chrominance values) of blocks adjacent to the current block, and outputs the intra prediction signal to the prediction control unit 220.
[0137] Note that, when an intra prediction mode that references a luminance block in intra prediction of a chrominance block is selected, the intra prediction unit 216 may predict the chrominance component of the current block based on the luminance component of the current block.
[0138] Furthermore, when information interpreted from the encoded bitstream indicates the application of PDPC, the intra prediction unit 216 corrects pixel values after intra prediction based on the gradients of reference pixels in the horizontal / vertical directions.
[0139] [Inter prediction section] The inter prediction unit 218 predicts the current block by referring to a reference picture stored in the frame memory 214. The prediction is performed in units of the current block or sub-blocks (e.g., 4x4 blocks) in the current block. For example, the inter prediction unit 218 generates an inter prediction signal of the current block or sub-block by performing motion compensation using motion information (e.g., motion vectors) interpreted from the encoded bitstream, and outputs the inter prediction signal to the prediction control unit 220.
[0140] In addition, when the information interpreted from the encoded bitstream indicates that the OBMC mode is to be applied, the inter prediction unit 218 generates an inter prediction signal using not only the motion information of the current block obtained by motion search, but also the motion information of adjacent blocks.
[0141] Also, if the information interpreted from the encoded bitstream indicates that the FRUC mode is applied, the inter prediction unit 218 derives motion information by performing motion search according to the pattern matching method (bilateral matching or template matching) interpreted from the encoded bitstream. Then, the inter prediction unit 218 performs motion compensation using the derived motion information.
[0142] In addition, when the BIO mode is applied, the inter prediction unit 218 derives a motion vector based on a model assuming uniform linear motion. In addition, when information interpreted from the encoded bitstream indicates that an affine motion compensation prediction mode is applied, the inter prediction unit 218 derives a motion vector on a sub-block basis based on the motion vectors of multiple adjacent blocks.
[0143] [Predictive control unit] The prediction control unit 220 selects either the intra-prediction signal or the inter-prediction signal, and outputs the selected signal to the addition unit 208 as a prediction signal.
[0144] (First aspect of first embodiment) Next, the first aspect of the first embodiment will be specifically described with reference to the drawings.
[0145] [Internal configuration of the conversion unit of the encoding device] First, the internal configuration of the conversion unit 106 of the encoding device 100 according to this aspect will be described with reference to Fig. 11A. Fig. 11A is a block diagram showing the internal configuration of the conversion unit 106 of the encoding device 100 according to the first aspect of the first embodiment.
[0146] As shown in FIG. 11A, the conversion unit 106 according to this embodiment includes a conversion mode determination unit 1061, a size determination unit 1062, a first conversion base selection unit 1063, a first conversion unit 1064, a second conversion implementation determination unit 1065, a second conversion base selection unit 1066, and a second conversion unit 1067.
[0147] The transformation mode determination unit 1061 determines whether or not the adaptive transformation base selection mode is valid for the block to be coded. The adaptive transformation base selection mode is a mode in which a transformation base is adaptively selected from one or more first transformation base candidates. The determination of whether or not the adaptive transformation base selection mode is valid is performed based on, for example, identification information of the first transformation base or the adaptive transformation base selection mode.
[0148] The size determination unit 1062 determines whether the horizontal size of the block to be coded exceeds a first horizontal threshold size. Also, the size determination unit 1062 determines whether the vertical size of the block to be coded exceeds a first vertical threshold size. The first horizontal threshold size may be the same as the first vertical threshold size, or may be different. The first horizontal threshold size and the first vertical threshold size may be predefined, for example, by a standard. Also, for example, the first horizontal threshold size and the first vertical threshold size may be sizes determined based on an image, and may be coded in a bitstream.
[0149] The first transformation basis selection unit 1063 selects a first transformation basis. In the present disclosure, selecting a basis includes selecting at least one basis from among a plurality of basis candidates, as well as determining or setting at least one basis without a plurality of basis candidates.
[0150] When the adaptive transformation base selection mode is not enabled, the first transformation base selection unit 1063 selects one basic transformation base as the first transformation base in the horizontal and vertical directions. When the adaptive transformation base selection mode is enabled, the first transformation base selection unit 1063 selects the first transformation base in the horizontal and vertical directions as shown in the following (1) to (4) based on the horizontal and vertical sizes of the encoding target block.
[0151] (1) When the horizontal size of the block to be coded is larger than a first horizontal threshold size, the first transformation base selection unit 1063 adaptively selects a first transformation base in the horizontal direction from one or more transformation base candidates.
[0152] (2) When the horizontal size of the block to be coded is equal to or smaller than the first horizontal threshold size, the first transformation base selection unit 1063 selects a fixed transformation base in the horizontal direction as a first transformation base in the horizontal direction.
[0153] (3) When the vertical size of the block to be coded is larger than a first vertical threshold size, the first transformation base selection unit 1063 adaptively selects a first transformation base in the vertical direction from one or more transformation base candidates.
[0154] (4) If the vertical size of the block to be coded is equal to or smaller than the first vertical threshold size, the first transformation base selection unit 1063 selects a fixed transformation base in the vertical direction as a first transformation base in the vertical direction.
[0155] The fixed horizontal transformation basis may be the same as or different from the fixed vertical transformation basis, and may be, for example, the type 7 discrete sine transform (DST-VII) transformation basis.
[0156] The first transform unit 1064 generates first transform coefficients by performing a first transform on the residual of the current block to be coded using the first transform base selected by the first transform base selection unit 1063. Specifically, the first transform unit 1064 performs a first transform in the horizontal direction using the first transform base in the horizontal direction, and performs a first transform in the vertical direction using the first transform base in the vertical direction.
[0157] The second transform execution determination unit 1065 determines whether to execute a second transform for further transforming the first transform coefficients, based on whether the adaptive transform base selection mode is enabled for the block to be coded. Specifically, the second transform execution determination unit 1065 executes the second transform when the adaptive transform base selection mode is not enabled, and determines not to execute the second transform when the adaptive transform base selection mode is enabled.
[0158] The second transformation base selection unit 1066 selects the second transformation base when it is determined that the second transformation is to be performed. That is, the second transformation base selection unit 1066 selects the second transformation base when the adaptive transformation base selection mode is not enabled. Conversely, when the adaptive transformation base selection mode is enabled, the second transformation base selection unit 1066 does not select the second transformation base. That is, the second transformation base selection unit 1066 skips the selection of the second transformation base when the adaptive transformation base selection mode is enabled.
[0159] When it is determined that the second transform is to be performed, the second transform unit 1067 transforms the first transform coefficient using the second transform base selected by the second transform base selection unit 1066. That is, when the adaptive transform base selection mode is not enabled, the second transform unit 1067 performs the second transform on the first transform coefficient using the second transform base to generate the second transform coefficient. Conversely, when the adaptive transform base selection mode is enabled, the second transform unit 1067 does not perform the second transform on the first transform coefficient. That is, when the adaptive transform base selection mode is enabled, the second transform unit 1067 skips the second transform.
[0160] [Internal configuration of the inverse transform unit of the encoding device] Next, the internal configuration of the inverse transform unit 114 of the encoding device 100 according to this aspect will be described with reference to Fig. 11B. Fig. 11B is a block diagram showing the internal configuration of the inverse transform unit 114 of the encoding device 100 according to the first aspect of the first embodiment.
[0161] As shown in FIG. 11B, the inverse transformation unit 114 according to this embodiment includes a second inverse transformation basis selection unit 1141, a second inverse transformation unit 1142, a first inverse transformation basis selection unit 1143, and a first inverse transformation unit 1144.
[0162] When the adaptive transformation base selection mode is not enabled for the block to be coded, the second inverse transformation base selection unit 1141 selects the inverse transformation base of the second transformation base selected by the second transformation base selection unit 1066 as the second inverse transformation base.
[0163] When the adaptive transform base selection mode is not enabled for the block to be coded, the second inverse transform unit 1142 generates second inverse transform coefficients by performing a second inverse transform on the inverse quantization coefficients using the second inverse transform base selected by the second inverse transform base selection unit 1141. The inverse quantization coefficients refer to coefficients that have been inverse quantized by the inverse quantization unit 112.
[0164] The first inverse transformation basis selection unit 1143 selects an inverse transformation basis of the first transformation basis selected by the first transformation basis selection unit 1063 as the first inverse transformation basis.
[0165] When the adaptive transformation base selection mode is not enabled for the block to be coded, the first inverse transform unit 1144 performs a first inverse transform on the second inverse transform coefficients using the first inverse transform base to reconstruct the residual of the block to be coded. On the other hand, when the adaptive transformation base selection mode is enabled for the block to be coded, the first inverse transform unit 1144 performs a first inverse transform on the inverse quantization coefficients using the first inverse transform base to reconstruct the residual of the block to be coded.
[0166] [Processing of the conversion section and quantization section of the encoding device] Next, the processing of the transform unit 106 configured as above will be described together with the processing of the quantization unit 108 with reference to Fig. 12A. Fig. 12A 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.
[0167] The transform mode determination unit 1061 determines whether or not the adaptive transform basis selection mode is enabled for the current block to be coded (S101).
[0168] If the adaptive transformation basis selection mode is not enabled (NO in S101), the first transformation basis selection unit 1063 selects one basic transformation basis as the first transformation basis in the horizontal and vertical directions (S102).
[0169] When the adaptive transformation basis selection mode is enabled (YES in S101), the size determination unit 1062 determines whether the horizontal transformation size exceeds a certain range (S103). That is, the size determination unit 1062 determines whether the horizontal size of the encoding target block is larger than the first horizontal threshold size.
[0170] If the horizontal transformation size exceeds a certain range (YES in S103), the first transformation base selection unit 1063 selects a horizontal transformation base from the multiple adaptive transformation bases as a first horizontal transformation base (S104).
[0171] If the transformation size in the horizontal direction is within a certain range (NO in S103), the first transformation base selection unit 1063 selects a fixed transformation base as the first transformation base in the horizontal direction (S105).
[0172] Next, the size determination unit 1062 determines whether or not the vertical transformation size exceeds a certain range (S106). That is, the size determination unit 1062 determines whether or not the vertical size of the encoding target block is larger than the first vertical threshold size.
[0173] If the vertical transformation size exceeds a certain range (YES in S106), the first transformation base selection unit 1063 selects a vertical transformation base from the multiple adaptive transformation bases as a first vertical transformation base (S107).
[0174] If the transformation size in the vertical direction is within a certain range (NO in S106), the first transformation base selection unit 1063 selects a fixed transformation base as the first transformation base in the vertical direction (S108).
[0175] The selection order of the horizontal and vertical transformation bases may be the horizontal and vertical order, or the reverse order. Also, the horizontal transformation base and the vertical transformation base may be selected simultaneously.
[0176] The first transform unit 1064 performs a first transform on the prediction residual using the first transform basis selected in step S102, S107, or step S108, to generate first transform coefficients (S109).
[0177] Next, the second transform execution determination unit 1065 determines whether or not to execute the second transform on the first transform coefficient (S110). Here, the second transform execution determination unit 1065 determines whether or not to execute the second transform based on whether or not the adaptive transform basis selection mode is enabled for the coding target block.
[0178] When the adaptive transformation basis selection mode is enabled (YES in S110), neither the selection of the second transformation basis nor the second transformation is performed, and the quantization unit 108 generates quantized coefficients by quantizing the first transformation coefficients (S113). That is, steps S111 and S112 in FIG. 12A are skipped.
[0179] If the adaptive transform base selection mode is not enabled (NO in S110), the second transform base selection unit 1066 selects a second transform base from one or more second transform base candidates (S111). Then, the second transform unit 1067 performs a second transform on the first transform coefficients using the selected second transform base to generate second transform coefficients (S112). After that, the quantization unit 108 performs quantization on the second transform coefficients to generate quantized coefficients (S113).
[0180] A predetermined transformation base can be used as the basic transformation base. In this case, it may be determined whether the adaptive transformation base selection mode is enabled or not based on whether the first transformation bases in the horizontal and vertical directions are the predetermined transformation bases. In addition, the predetermined transformation base may be one transformation base or two or more transformation bases.
[0181] Furthermore, when the second conversion is not performed (skipped), the second conversion may not be performed, or a conversion equivalent to not performing the conversion may be performed as the second conversion. In the former case, information indicating that the second conversion is not performed may be coded in the bit stream. In the latter case, information indicating a conversion equivalent to not performing the conversion may be coded in the bit stream. The same can be said for the process of skipping each conversion below.
[0182] Note that the steps and the order of steps shown in Fig. 12A are merely examples and are not limited thereto. For example, as shown in Fig. 12B, the adaptive transformation basis selection mode decision (S101) and the second transformation execution decision (S110) in Fig. 12A may be integrated. Fig. 12B is a flowchart showing a modified example of the process of the transform unit 106 and the quantization unit 108 of the encoding device 100 according to the first aspect of the first embodiment. The flowchart in Fig. 12B is substantially the same as the flowchart in Fig. 12A.
[0183] 12B, the step of determining whether to perform the second transform (S110) is deleted, and the first transform (S109) is divided into two (S109A, S109B). In this case, the transform unit 106 of the encoding device 100 does not need to include the second transform execution determining unit 1065.
[0184] The selection of the second inverse transformation base and the second inverse transformation in the inverse transformation unit 114, as well as the selection of the first inverse transformation base and the first inverse transformation, may be performed in accordance with the transformation of the transformation unit 106 in Figure 12A, and therefore description and illustration thereof will be omitted.
[0185] The first transform may be a frequency transform capable of adaptively selecting a transform base, such as EMT described in Non-Patent Document 2, or may be a frequency transform in which a transform base is switched under a certain condition, or may be any other general transform. For example, a fixed transform base may be set instead of the first transform base being selected. A first transform base equivalent to not performing the first transform may be used. In addition, in the first transform, one of the two modes may be selected using identification information indicating whether an adaptive transform base selection mode or a transform base fixed mode using a fixed basic transform base (for example, a transform base of type 2 discrete cosine transform (DCT-II)) is effective. In this case, it is also possible to determine whether an adaptive transform base selection mode or a transform base fixed mode is effective for a block to be coded, using the identification information. For example, in the EMT described in non-patent document 2, there is identification information (emt_cu_flag) that indicates whether the adaptive transformation base selection mode is enabled or not in units such as CU (Coding Unit), and this identification information can be used to determine whether the adaptive transformation base selection mode is enabled or not for the block to be coded.
[0186] The second transform may be a secondary transform process such as NSST described in Non-Patent Document 2, may be a transform that switches the transform base under a certain condition, or may be any other general transform. For example, a fixed transform base may be set instead of selecting the second transform base. Also, a second transform base equivalent to not performing the second transform may be used. Also, the NSST may be a frequency space transform after the DCT or DST, for example, the KLT (Karhunen Loveve Transform) for transform coefficients of the DCT or DST obtained offline, or the HyGT (Hypercube-Givens Transform) that expresses a base equivalent to the KLT and is expressed by a combination of rotation transforms.
[0187] This process can be applied to both luminance and color difference signals, and if the input signal is in RGB format, it may be applied to each of the R, G, and B signals. Furthermore, the bases selectable in the first conversion or the second conversion may be different between the luminance signal and the color difference signal. For example, since the frequency band of the luminance signal is wider than that of the color difference signal, in order to perform optimal conversion, more types of bases may be used as selection candidates in the first conversion or the second conversion of the luminance signal than for the color difference signal. Furthermore, this process can be applied to both intra processing and inter processing.
[0188] [Effects, etc.] In the first transform (primary transform) and the second transform (secondary transform) described in Non-Patent Document 2, an optimal transform base or transform coefficient (filter) is selected, and optimal coding efficiency is realized overall. Therefore, in order to search for an optimal combination of candidates for the transform base and transform coefficient (filter) used in the first transform and the second transform, it is necessary to try the first transform and the second transform many times. That is, in the transform method described in Non-Patent Document 2, it is necessary to calculate evaluation values for all combinations of candidates for the transform base of the first transform and candidates for the transform base of the second transform, and to select a combination with the minimum evaluation value. Therefore, the present inventors have found a problem that the transform method described in Non-Patent Document 2 requires an enormous amount of processing.
[0189] 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 enabled. This allows the encoding device 100 to reduce the number of combinations of the transform base candidates for the first transform and the transform base candidates for the second transform, thereby reducing the amount of processing.
[0190] Furthermore, according to the encoding device 100 of this embodiment, it is possible to limit candidates for the first transform base based on the conditions of the horizontal and vertical transform sizes. This makes it possible to reduce the amount of processing required to search for the best first transform base through trials. It is also possible to reduce the amount of processing required to search for the best second transform base through trials based on conditions such as the base selected as the first transform base. Furthermore, it is possible to reduce the amount of processing required to search for combinations of the first transform and the second transform.
[0191] As an example, the DCT-II transformation basis can be used as the basic transformation basis. DCT-II is likely to be adopted when the residual shape is flat or random. For example, when DCT-II is used as the first transformation basis, the effect of the second transformation may be increased because the concentration in the low frequency range tends to increase. On the other hand, when a transformation basis other than DCT-II is used, the high frequency components tend to remain, and the effect of the second transformation may be reduced.
[0192] As an example, the DST-VII transformation bases can be used as fixed transformation bases selected when the transformation size is within a certain range. DST-VII tends to be selected with a very high probability when the residual shape is slanted and small in size, especially in intra processing.
[0193] The fundamental transformation base is not limited to one predetermined transformation base, and a plurality of predetermined transformation bases may be used.
[0194] In addition, whether to select the second transformation base and to perform the second transformation may be switched depending on the transformation size. In addition, candidates for the second transformation base may be switched depending on the transformation size.
[0195] Also, it is possible to only switch whether to perform the second transformation based on whether the adaptive transformation basis selection mode is enabled, and not to switch the first transformation basis according to the transformation size. That is, in Fig. 12A, steps S103, S105, S106, and S108 may be deleted. Here, whether the adaptive transformation basis selection mode is enabled may be determined based on identification information indicating the use of the mode, or the type of the first transformation basis.
[0196] Similarly, the second transformation may be performed without being switched based on whether the adaptive transformation basis selection mode is enabled, and only the first transformation basis may be switched according to the transformation size. That is, in FIG. 12A, step S110 may be deleted.
[0197] In addition, regardless of whether the adaptive transformation base selection mode is enabled or not, the selection of the second transformation base and the second transformation may not be skipped. Also, regardless of the selection method of the first transformation base, when the adaptive transformation base selection mode is not enabled, the selection of the second transformation base and the second transformation may be performed, and when the adaptive transformation base selection mode is enabled, the selection of the second transformation base and the second transformation may be skipped.
[0198] In addition, the specific horizontal or vertical transformation size threshold (i.e., the first horizontal threshold size and the first vertical threshold size) for selecting a candidate from multiple adaptive transformation bases as the first transformation base or selecting a fixed transformation base may be 4, 8, 16, 32, or 64 pixels, etc.
[0199] [Combination with other aspects] This aspect may be implemented in combination with at least a part of other aspects of the present disclosure. Also, some of the processes, some of the configurations of the device, and some of the syntax described in the flowcharts of this aspect may be implemented in combination with other aspects.
[0200] (Second aspect of first embodiment) Next, a second aspect of the first embodiment will be described. In this aspect, an example of encoding various signals related to the first transform and the second transform in the first aspect will be described. Below, this aspect will be specifically described with reference to the drawings, focusing on the differences from the first aspect.
[0201] It should be noted that the internal configurations 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 in the first embodiment, and therefore are not shown in the drawings.
[0202] [Processing of the transform unit, quantization unit, and entropy coding unit of the coding device] The processing of the transform unit 106, the quantization unit 108, and the entropy coding unit 110 of the coding device 100 according to this aspect will be described with reference to Fig. 13A and Fig. 13B. Fig. 13A is a flowchart showing the processing of the transform unit 106 and the quantization unit 108 of the coding device 100 according to the second aspect of the first embodiment. Fig. 13B 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. In Figs. 13A and 13B, processing common to the first aspect is denoted by the same reference numerals, and description thereof will be omitted.
[0203] After performing quantization (S113), the entropy coding unit 110 codes an adaptive transformation basis selection mode signal (S201). The adaptive transformation basis selection mode signal is an example of identification information of an adaptive transformation basis selection mode.
[0204] Then, if the adaptive transform base selection mode is enabled (YES in S202), and if the horizontal transform size exceeds a certain range (YES in S203), the entropy coding unit 110 codes the first base selection signal in the horizontal direction (S204). On the other hand, if the horizontal transform size is within a certain range (NO in S203), the entropy coding unit 110 does not code the first base selection signal in the horizontal direction. Furthermore, if the vertical transform size exceeds a certain range (YES in S205), the entropy coding unit 110 codes the first base selection signal in the vertical direction (S206). On the other hand, if the vertical transform size is within a certain range (NO in S205), the entropy coding unit 110 does not code the first base selection signal in the vertical direction.
[0205] If the adaptive transformation basis selection mode is not enabled (NO in S202), the encoding of the first basis selection signal (S204, S206) is skipped.
[0206] Next, the entropy coding unit 110 codes the quantized coefficients (S207).
[0207] Here, if the adaptive transformation basis selection mode is not enabled (NO in S208), the entropy coding unit 110 codes the second basis selection signal (S209). On the other hand, if the adaptive transformation basis selection mode is enabled (YES in S208), the coding of the second basis selection signal (S209) is skipped.
[0208] It should be noted that the encoding order may be determined in advance, and various signals may be encoded in an order different from the above encoding order.
[0209] When the second transform is not performed (skip), a signal indicating that the second transform is not performed may be coded, or a signal selecting a second basis equivalent to no transform may be coded.
[0210] [Syntax] Here, the syntax in this aspect will be described. Fig. 14 shows a specific example of the syntax in the second aspect of the first embodiment.
[0211] In Fig. 14, for example, when the adaptive transform basis selection mode signal (emt_cu_flag) is set (line 4), if the horizontal transform size (horizontal_tu_size) is larger than the first horizontal threshold size (horizontal_tu_size_th) (line 5), the first horizontal basis selection signal (emt_horizontal_tridx) is coded (line 6). Also, if the vertical transform size (vertical_tu_size) is larger than the first vertical threshold size (vertical_tu_size_th) (line 11), the first vertical basis selection signal (emt_vertical_tridx) is coded (line 12). Under other conditions (lines 8 and 14), coding of the first basis selection signal is skipped (lines 9 and 15).
[0212] Furthermore, if the adaptive transformation basis selection mode signal (emt_cu_flag) is not set (line 19), the second basis selection signal (secondary_tridx) is encoded (line 20). Conversely, if the adaptive transformation basis selection mode signal (emt_cu_flag) is set (line 22), the encoding of the second basis selection signal (secondary_tridx) is skipped (line 23).
[0213] [Specific examples of transformation bases and encoded signals] Next, specific examples of the transformation bases and the encoded signals will be described. Fig. 15 shows specific examples of the transformation bases used in the second aspect of the first embodiment and whether or not the signals are encoded.
[0214] In Fig. 15, when the adaptive transform basis selection mode is not enabled, the transform basis of DCT-II is used as the first transform basis in the horizontal and vertical directions regardless of the size of the coding block. That is, the transform basis of DCT-II is used as the basic transform basis. In addition, the second transform is performed (ON), and a second basis selection signal (secondary_tridx) indicating the second transform basis used in the second transform is coded in the bitstream.
[0215] On the other hand, when the adaptive transformation basis selection mode is enabled, a combination (index0 to index3) of the transformation basis of DST-VII and other transformation basis is used as a candidate for the first transformation basis in the horizontal and vertical directions according to the horizontal size H and vertical size V of the block to be coded. Moreover, regardless of the size of the block to be coded, the second transformation is not performed (OFF). Moreover, the second basis selection signal (secondary_tridx) is not coded, but the adaptive transformation basis selection mode signal (emt_cu_flag) is coded in the bitstream. Furthermore, when the horizontal size H of the block to be coded is larger than 4 pixels, the first basis selection signal in the horizontal direction (emt_horizontal_tridx) is coded in the bitstream. Moreover, when the vertical size V of the block to be coded is larger than 4 pixels, the first basis selection signal in the vertical direction (emt_vertical_tridx) is coded in the bitstream.
[0216] For example, when the horizontal size H is 4 pixels or less and the vertical size V is 4 pixels or less, only the transformation bases of DST-VII are used as candidates for the first transformation bases in the horizontal and vertical directions. In this case, the first basis selection signals in the horizontal and vertical directions (emt_horizontal_tridx and emt_vertical_tridx) are not coded.
[0217] Also, for example, when the horizontal size H is 4 pixels or less and the vertical size V is more than 4 pixels, only the transformation bases of DST-VII are used as candidates for the first transformation base in the horizontal direction, and the transformation bases of DST-VII and other transformation bases are used as candidates for the first transformation base in the vertical direction. In this case, the first basis selection signal in the horizontal direction (emt_horizontal_tridx) is not coded, but the first basis selection signal in the vertical direction (emt_vertical_tridx) is coded.
[0218] Also, for example, when the horizontal size H is greater than 4 pixels and the vertical size V is equal to or less than 4 pixels, the transformation base of DST-VII and other transformation bases are used as candidates for the first transformation base in the horizontal direction, and only the transformation base of DST-VII is used as a candidate for the first transformation base in the vertical direction. In this case, the first basis selection signal in the horizontal direction (emt_horizontal_tridx) is coded, but the first basis selection signal in the vertical direction (emt_vertical_tridx) is not coded.
[0219] Also, for example, when the horizontal size H is greater than 4 pixels and the vertical size V is greater than 4 pixels, the transformation bases of DST-VII and other transformation bases are used as candidates for the first transformation bases in the horizontal and vertical directions, respectively. At this time, the first basis selection signals (emt_horizontal_tridx and emt_vertical_tridx) in the horizontal and vertical directions are coded.
[0220] [Effects, etc.] As described above, according to the encoding device 100 according to this embodiment, only when the adaptive transformation base selection mode is enabled and the transformation size exceeds a certain range, the information indicating the first transformation base (first base selection signal) can be encoded, and the amount of code required for signaling the first transformation base may be reduced. Also, only when the adaptive transformation base selection mode is not enabled, the information indicating the second transformation base (second base selection signal) can be encoded, and the amount of code required for signaling the second transformation base may be reduced. Also, by encoding information for determining whether to skip the second transformation (such as an adaptive transformation base selection mode signal) before the information indicating the second transformation base, it is possible to determine whether the information indicating the second transformation base has been encoded during decoding.
[0221] The second basis selection signal may be always encoded regardless of the adaptive transformation basis selection mode. The first basis selection signal may be always encoded in the adaptive transformation basis selection mode regardless of the transformation size. The first basis selection signal may be encoded independently or in combination depending on the horizontal size and the vertical size.
[0222] [Combination with other aspects] This aspect may be implemented in combination with at least a part of other aspects of the present disclosure. Also, some of the processes, some of the configurations of the device, and some of the syntax described in the flowcharts of this aspect may be implemented in combination with other aspects.
[0223] (Third aspect of the first embodiment) Next, the third aspect of the first embodiment will be described. This aspect is different from the first aspect in that when the adaptive transformation basis selection mode is not enabled, a different basic transformation basis is used as the first transformation basis according to the size of the block to be coded. Below, this aspect will be specifically described with reference to the drawings, focusing on the differences from the first and second aspects.
[0224] It should be noted that the internal configurations 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 in the first embodiment, and therefore are not shown in the drawings.
[0225] [Processing of the conversion section and quantization section of the encoding device] The processing of the transform unit 106 and the quantization unit 108 of the encoding device 100 according to this aspect will be described with reference to Fig. 16. Fig. 16 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. In Fig. 16, the same reference numerals are used for the processing common to the first aspect, and the description thereof will be omitted.
[0226] When the adaptive transformation basis selection mode is not enabled (NO in S101), the size determination unit 1062 determines whether the transformation size is within a certain range (S301). That is, the size determination unit 1062 determines whether the size of the encoding target block is equal to or smaller than the second threshold size. For example, the size determination unit 1062 determines whether the product of the horizontal size and the vertical size of the encoding target block is equal to or smaller than the threshold, thereby determining whether the size of the encoding target block is equal to or smaller than the second threshold size.
[0227] Here, if the transformation size is within a certain range (YES in S301), the first transformation base selection unit 1063 selects the second basic transformation base as the first transformation base in the horizontal and vertical directions (S302). On the other hand, if the transformation size exceeds the certain range (NO in S301), the first transformation base selection unit 1063 selects the first basic transformation base as the first transformation base in the horizontal and vertical directions (S303).
[0228] As an example, a transform basis of DCT-II can be used as the first fundamental transform basis, and a transform basis of DST-VII can be used as the second fundamental transform basis.
[0229] The fundamental transformation base may be selected from a plurality of fundamental transformation base candidates.
[0230] In addition, regardless of whether the adaptive transformation base selection mode is enabled or not, the selection of the second transformation base and the second transformation may not be skipped. Also, regardless of the selection method of the first transformation base, when the adaptive transformation base selection mode is not enabled, the selection of the second transformation base and the second transformation may be performed, and when the adaptive transformation base selection mode is enabled, the selection of the second transformation base and the second transformation may be skipped.
[0231] In addition, when the adaptive transformation base selection mode is not enabled, the second threshold size for selecting one of the first basic transformation base and the second basic transformation base can be, for example, 4x4, 4x8, 8x4, 8x8 pixel size, etc. In addition, the transformation size compared with the threshold can be the product of the horizontal size and vertical size of the block to be coded as in this embodiment, or each of the horizontal size and the vertical size can be used.
[0232] In addition, when the adaptive transformation base selection mode is not enabled, if the product of the horizontal size and the vertical size is within a certain range, the second basic transformation base may be selected as the first transformation base in the horizontal and vertical directions, and the selection of the second transformation base and the second transformation may be skipped.
[0233] [Effects, etc.] As described above, according to the encoding device 100 of this embodiment, when the adaptive transformation base selection mode is not enabled, the first transformation base can be switched between the first basic transformation base and the second basic transformation base according to the transformation size. Therefore, the first transformation can be performed using the first transformation base corresponding to the transformation size, and the amount of code can be reduced.
[0234] [Combination with other aspects] This aspect may be implemented in combination with at least a part of other aspects of the present disclosure. Also, some of the processes, some of the configurations of the device, and some of the syntax described in the flowcharts of this aspect may be implemented in combination with other aspects.
[0235] (Fourth aspect of the first embodiment) Next, the fourth aspect of the first embodiment will be described. In this aspect, an example of encoding of various signals related to the first transform and the second transform according to the third aspect will be described. Below, this aspect will be specifically described with reference to the drawings, focusing on the differences from the first to third aspects.
[0236] It should be noted that the internal configurations 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 in the first embodiment, and therefore are not shown in the drawings.
[0237] [Processing of the transform unit, quantization unit, and entropy coding unit of the coding device] The processing of the transform unit 106, the quantization unit 108, and the entropy coding unit 110 of the coding device 100 according to this aspect will be described with reference to Fig. 17A and Fig. 17B. Fig. 17A is a flowchart showing the processing of the transform unit 106 and the quantization unit 108 of the coding device 100 according to the fourth aspect of the first embodiment. Fig. 17B 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. In Fig. 17A and Fig. 17B, processing common to any of the first to third aspects is denoted by the same reference numerals, and description thereof will be omitted.
[0238] After performing quantization (S113), the entropy coding unit 110 determines whether or not to skip coding of the adaptive transformation basis selection mode signal (S401). For example, the entropy coding unit 110 determines to skip coding of the adaptive transformation basis selection mode signal when either of the following conditions (A) and (B) is satisfied, and determines not to skip coding of the adaptive transformation basis selection mode signal when the following conditions (A) and (B) are satisfied.
[0239] (A) The adaptive transformation basis selection mode is not enabled.
[0240] (B) The adaptive transformation basis selection mode is enabled, and all of the following conditions (B1) to (B4) are satisfied.
[0241] (B1) The transformation size is equal to or smaller than the second threshold size W1xH1 used in step S301.
[0242] (B2) The horizontal transformation size is equal to or smaller than the first horizontal threshold size W2 used in step S103.
[0243] (B3) The vertical transformation size is equal to or smaller than the first vertical threshold size H2 used in step S106.
[0244] (B4) The second fundamental transformation base and the fixed transformation bases in the horizontal and vertical directions are the same transformation base.
[0245] As a specific example, when the second threshold size W1xH1 is 4x4 pixels, the first horizontal threshold size W2 is 4 pixels, the first vertical threshold size H2 is 4 pixels, and the second basic transformation base and the fixed transformation base are both DST-VII transformation bases, if the transformation size is 4x4 pixels or less, the entropy coding unit 110 determines to skip coding of the adaptive transformation base selection mode signal.
[0246] Conversely, if neither of the above conditions (A) nor (B) is satisfied, the entropy coding unit 110 determines not to skip coding of the adaptive transformation basis selection mode signal.
[0247] Here, if it is determined that the coding of the adaptive transformation base selection mode signal is to be skipped (YES in S401), the entropy coding unit 110 skips steps S201 to S206 and codes the quantization coefficients (S207). On the other hand, if it is determined that the coding of the adaptive transformation base selection mode signal is not to be skipped (NO in S401), the entropy coding unit 110 executes steps S201 to S206 as in the second aspect, and then codes the quantization coefficients (S207).
[0248] It should be noted that the encoding order may be determined in advance, and various signals may be encoded in an order different from the above encoding order.
[0249] [Syntax] Here, the syntax in this aspect will be described. Fig. 18 shows a specific example of the syntax in the fourth aspect of the first embodiment.
[0250] 18, for example, when the coding of the adaptive transformation basis selection mode signal is skipped (line 20), the coding of the adaptive transformation basis selection mode signal (emt_cu_flag) and the first basis selection signal (emt_horizontal_tridx and emt_vertical_tridx) is skipped (line 21). Here, when the horizontal transformation size (horizontal_tu_size) is equal to or smaller than the first horizontal threshold size (horizontal_tu_size_th) and the vertical transformation size (vertical_tu_size) is equal to or smaller than the first vertical threshold size (vertical_tu_size_th), the coding of the adaptive transformation basis selection mode signal is skipped. If the encoding of the adaptive transformation basis selection mode signal is not skipped (lines 3 to 4), the adaptive transformation basis selection mode signal (emt_cu_flag) is encoded (line 5), and the first basis selection signals (emt_horizontal_tridx and emt_vertical_tridx) are encoded as necessary, as in the second aspect (lines 7 to 16).
[0251] It should be noted that, when the coding of the adaptive transform basis selection mode signal is skipped, the selection of the second transform basis and the second transform may be skipped.
[0252] [Specific examples of transformation bases and encoded signals] Next, specific examples of transform bases and encoded signals will be described. Fig. 19 shows specific examples of transform bases and whether or not to encode signals used in the fourth aspect of the first embodiment. In Fig. 19, the transform bases and whether or not to encode when the horizontal and vertical sizes of the encoding target block are both 4 pixels or less are different from Fig. 15. Fig. 19 will be described focusing on the differences from Fig. 15.
[0253] In FIG. 19, when the adaptive transformation basis selection mode is not enabled, if the horizontal size H and vertical size V of the block to be encoded are both 4 pixels or less, the transformation basis of DST-VII is used as the first transformation basis in the horizontal and vertical directions, rather than the transformation basis of DCT-II.
[0254] Furthermore, when the adaptive transformation basis selection mode is enabled, if the horizontal size H and vertical size V of the encoding target block are both 4 pixels or less, the adaptive transformation basis selection mode signal (emt_cu_flag) is not encoded.
[0255] [Effects, etc.] As described above, according to the encoding device 100 of this embodiment, when the conditions for skipping the encoding of the adaptive transformation basis selection mode signal are met, all encoding of the adaptive transformation basis selection mode signal and the first basis selection signal can be omitted, which may reduce the amount of code.
[0256] [Combination with other aspects] This aspect may be implemented in combination with at least a part of other aspects of the present disclosure. Also, some of the processes, some of the configurations of the device, and some of the syntax described in the flowcharts of this aspect may be implemented in combination with other aspects.
[0257] (Fifth aspect of the first embodiment) Next, the fifth aspect of the first embodiment will be described. In this aspect, a decoding device will be described. The decoding device according to this aspect corresponds to the encoding device according to the first aspect. That is, the decoding device according to this aspect can decode a bit stream encoded by the encoding device according to the first aspect. Hereinafter, this aspect will be specifically described with reference to the drawings.
[0258] [Internal configuration of the transform unit and inverse transform unit of the decoding device] First, a description will be given of the internal configuration of the inverse transform unit 206 of the decoding device 200 according to this embodiment. Fig. 20 is a block diagram showing the internal configuration of the inverse transform unit 206 of the decoding device 200 according to the fifth embodiment of the first embodiment.
[0259] As shown in FIG. 20, the inverse transformation unit 206 according to this embodiment 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.
[0260] The second inverse transform execution determination unit 2061 determines, based on whether the adaptive transform base selection mode is enabled for the block to be decoded, whether to execute the second inverse transform on the inverse quantization coefficients of the block to be decoded output from the inverse quantization unit 204. Specifically, the second inverse transform execution determination unit 2061 executes the second inverse transform when the adaptive transform base selection mode is not enabled, and determines not to execute the second inverse transform when the adaptive transform base selection mode is enabled.
[0261] The second inverse transform base selection unit 2062 selects a second inverse transform base when it is determined that the second inverse transform is performed. Specifically, when the adaptive transform base selection mode is not enabled, the second inverse transform base selection unit 2062 acquires a second base selection signal 2062S indicating a second inverse transform base decoded from the bitstream by the entropy decoding unit 202. Then, the second inverse transform base selection unit 2062 selects a second inverse transform base based on the second base selection signal 2062S. Conversely, when the adaptive transform base selection mode is enabled, the second inverse transform base selection unit 2062 does not select a second inverse transform base. That is, when the adaptive transform base selection mode is enabled, the second inverse transform base selection unit 2062 skips the selection of the second inverse transform base.
[0262] When 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 quantization coefficients of the block to be decoded, using the second inverse transform base selected by the second inverse transform base selection unit 2062. That is, when the adaptive transform base selection mode is not enabled, the second inverse transform unit 2063 performs a second inverse transform on the inverse quantization coefficients using the second inverse transform base to generate the second inverse transform coefficients. Conversely, when the adaptive transform base selection mode is enabled, the second inverse transform unit 2063 does not perform the second inverse transform on the inverse quantization coefficients. That is, when the adaptive transform base selection mode is enabled, the second inverse transform unit 2063 skips the second inverse transform.
[0263] The transform mode determination unit 2064 determines whether the adaptive transform base selection mode is valid for the block to be decoded. The determination of whether the adaptive transform base selection mode is valid is performed 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. That is, the determination is performed based on the identification information of the first inverse transform base or the adaptive transform base selection mode.
[0264] The size determination unit 2065 determines whether the horizontal size of the block to be decoded exceeds a first horizontal threshold size. The size determination unit 1062 determines whether the vertical size of the block to be decoded exceeds a first vertical threshold size. The horizontal size and vertical size are determined based on a size signal 2065S decoded from the bitstream by the entropy decoding unit 202.
[0265] The first inverse transformation base selection unit 2066 selects a first inverse transformation base. Specifically, when the adaptive transformation base selection mode is not enabled, the first inverse transformation base selection unit 2066 selects one basic transformation base as the first inverse transformation base in the horizontal and vertical directions. Also, when the adaptive transformation base selection mode is enabled, the first inverse transformation base selection unit 2066 selects the first inverse transformation base in the horizontal and vertical directions as shown in the following (1) to (4) based on the horizontal and vertical sizes of the block to be decoded.
[0266] (1) When the horizontal size of the block to be decoded is larger than the first horizontal threshold size, the first inverse transform base selection unit 2066 acquires a first base selection signal 2066S indicating a first inverse transform base decoded from the bitstream by the entropy decoding unit 202. Then, the first inverse transform base selection unit 2066 selects a first inverse transform base in the horizontal direction based on the first base selection signal 2066S.
[0267] (2) When the horizontal size of the block to be decoded 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 a first inverse transform base in the horizontal direction.
[0268] (3) When the vertical size of the block to be decoded is larger than the first vertical threshold size, the first inverse transform basis selection unit 2066 acquires a first basis selection signal 2066S. Then, the first inverse transform basis selection unit 2066 selects a first inverse transform basis in the vertical direction based on the first basis selection signal 2066S.
[0269] (4) If the vertical size of the block to be decoded 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 a first inverse transform base in the vertical direction.
[0270] The first inverse transform unit 2067 restores the residual of the block to be decoded by performing a first inverse transform on the inverse quantization coefficients of the block to be decoded using the first inverse transform base selected by the first inverse transform base selection unit 2066. Specifically, the first inverse transform unit 2067 performs a first inverse transform in the horizontal direction using the first inverse transform base in the horizontal direction, and performs a first inverse transform in the vertical direction using the first inverse transform base in the vertical direction.
[0271] [Processing of the inverse quantization unit and inverse transform unit of the decoding device] Next, the processing of the inverse transform unit 206 configured as above will be described together with the processing of the inverse quantization unit 204 with reference to Fig. 21. Fig. 21 is a flowchart showing the processing of the inverse quantization unit 204 and the inverse transform unit 206 in the decoding device 200 according to the fifth aspect of the first embodiment.
[0272] The inverse quantization unit 204 inverse quantizes the quantized coefficients of the current block decoded by the entropy decoding unit 202 to generate inverse quantized coefficients (S501).
[0273] The second inverse transform execution determination unit 2061 determines whether or not to execute the second inverse transform on the inverse quantization coefficients (S502). Here, the second inverse transform execution determination unit 2061 determines whether or not to execute the second inverse transform based on whether or not the adaptive transform basis selection mode is enabled in the block to be decoded.
[0274] Here, if the adaptive transformation basis selection mode is enabled (YES in S502), neither the selection of the second inverse transformation basis nor the second inverse transformation is performed, i.e., steps S503 and S504 are skipped.
[0275] On the other hand, if the adaptive transformation basis selection mode is not enabled (NO in S502), the second inverse transformation basis selection unit 2062 selects a second inverse transformation basis based on the second basis selection signal 2062S (S503). Furthermore, the second inverse transformation unit 2063 performs a second inverse transformation on the inverse quantization coefficients using the selected second inverse transformation basis (S504).
[0276] Next, the transform mode determination unit 2064 determines whether or not the adaptive transform basis selection mode is enabled for the block to be decoded (S505). For example, the transform mode determination unit 2064 determines whether or not the adaptive transform basis selection mode is enabled based on the adaptive transform basis selection mode signal 2064S.
[0277] If the adaptive transformation base selection mode is not enabled (NO in S505), the first inverse transformation base selection unit 2066 selects one basic transformation base as the first inverse transformation base in the horizontal and vertical directions (S512). On the other hand, if the adaptive transformation base selection mode is enabled (YES in S505), the size determination unit 2065 determines whether the horizontal transformation 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 larger than the first horizontal threshold size.
[0278] If the horizontal transformation size exceeds a certain range (YES in S506), the first inverse transformation base selection unit 2066 selects a horizontal transformation base from a plurality of adaptive transformation bases as the first inverse transformation base in the horizontal direction (S507). On the other hand, if the horizontal transformation size is within a certain range (NO in S506), the first inverse transformation base selection unit 2066 selects a fixed transformation base as the first inverse transformation base in the horizontal direction (S508).
[0279] The size determination unit 2065 determines whether or not the transformation size in the vertical direction exceeds a certain range (S509). That is, the size determination unit 2065 determines whether or not the vertical size of the block to be decoded is larger than the first vertical threshold size.
[0280] If the vertical transformation size exceeds a certain range (YES in S509), the first inverse transformation base selection unit 2066 selects a transformation base from a plurality of adaptive transformation bases as the first inverse transformation base in the vertical direction (S510). If the vertical transformation size is within a certain range (NO in S509), the first inverse transformation base selection unit 2066 selects a fixed transformation base as the first inverse transformation base in the vertical direction (S511).
[0281] The first inverse transform unit 2067 uses the first inverse transform base selected as described above to perform a first inverse transform on the inverse quantization coefficients or the second inverse transform coefficients to restore the residual of the block to be decoded (S513).
[0282] The selection order of the inverse transformation bases in the horizontal and vertical directions may be the horizontal and vertical order, or the reverse order. Also, the inverse transformation bases in the horizontal direction and the inverse transformation bases in the vertical direction may be selected simultaneously.
[0283] In addition, selecting an inverse transform base in the decoding device 200 means decoding information indicating the base to be used for the inverse transform contained in the encoded bitstream and determining the inverse transform base based on the decoded information, or determining an inverse transform base that is uniquely indicated based on information such as the intra prediction mode, the size of the block to be decoded, or the base in the first inverse transform.
[0284] It should be noted that a decoding method in accordance with the encoding method of the first aspect shown in FIG. 12A or FIG. 12B may be adopted.
[0285] [Effects, etc.] As described above, the decoding device 200 according to this embodiment can achieve the same effects as the encoding device 100 according to the first embodiment.
[0286] [Combination with other aspects] This aspect may be implemented in combination with at least a part of other aspects of the present disclosure. Also, some of the processes, some of the configurations of the device, and some of the syntax described in the flowcharts of this aspect may be implemented in combination with other aspects.
[0287] (Sixth aspect of the first embodiment) Next, the sixth aspect of the first embodiment will be described. In this aspect, an example of decoding of various signals related to the first transform and the second transform in the fifth aspect will be described. The decoding device according to this aspect corresponds to the encoding device according to the second aspect. Below, this aspect will be specifically described with reference to the drawings, focusing on the differences from the fifth aspect.
[0288] It should be noted that the internal configuration 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 not shown in the figure.
[0289] [Processing of the entropy decoding unit, inverse quantization unit, and inverse transform unit of the decoding device] The processes of the entropy decoding unit 202, the inverse quantization unit 204, and the inverse transform unit 206 of the decoding device 200 according to this embodiment will be described with reference to Fig. 22A and Fig. 22B. In Fig. 22A and Fig. 22B, the processes common to the fifth embodiment will be denoted by the same reference numerals, and the description thereof will be omitted.
[0290] First, the entropy decoding unit 202 decodes an adaptive transformation basis selection mode signal from a bitstream (S601). Then, the transformation mode determination unit 2064 determines whether or not the adaptive transformation basis selection mode is enabled for the block to be decoded based on the adaptive transformation basis selection mode signal (S602).
[0291] If the adaptive transform basis selection mode is enabled (YES in S602), and if the horizontal transform size exceeds a certain range (YES in S603), the entropy decoding unit 202 decodes the first basis selection signal in the horizontal direction from the bit stream (S604). On the other hand, if the horizontal transform size is within a certain range (NO in S603), the entropy decoding unit 202 does not decode the first basis selection signal in the horizontal direction. Furthermore, if the vertical transform size exceeds a certain range (YES in S605), the entropy decoding unit 202 decodes the first basis selection signal in the vertical direction from the bit stream (S606). On the other hand, if the vertical transform size is within a certain range (NO in S605), the entropy decoding unit 202 does not decode the first basis selection signal in the vertical direction.
[0292] If the adaptive transformation basis selection mode is not enabled (NO in S602), the decoding of the first basis selection signal (S604, S606) is skipped.
[0293] Next, the entropy decoding unit 202 decodes the quantized coefficients (S607).
[0294] Here, if the adaptive transformation basis selection mode is not enabled (NO in S608), the entropy decoding unit 202 decodes the second basis selection signal from the bit stream (S609). On the other hand, if the adaptive transformation basis selection mode is enabled (YES in S608), the decoding of the second basis selection signal (S609) is skipped.
[0295] In addition, the order of decoding may be determined in advance in conjunction with the encoding method, and various signals may be decoded in a different order from the above-mentioned decoding order. In addition, when the second inverse transform is not performed (skip), the entropy decoding unit 202 may decode a signal indicating that the second inverse transform is not performed from the bit stream, or may decode a signal for selecting a second inverse transform base equivalent to no transform from the bit stream.
[0296] Note that a decoding method in accordance with the encoding method of the second aspect shown in Figs. 13A, 13B, and 14 may be adopted.
[0297] [Effects, etc.] As described above, the decoding device 200 according to this embodiment can achieve the same effects as the encoding device 100 according to the second embodiment.
[0298] [Combination with other aspects] This aspect may be implemented in combination with at least a part of other aspects of the present disclosure. Also, some of the processes, some of the configurations of the device, and some of the syntax described in the flowcharts of this aspect may be implemented in combination with other aspects.
[0299] (Seventh aspect of the first embodiment) Next, the seventh aspect of the first embodiment will be described. This aspect is different from the fifth aspect in that when the adaptive transformation base selection mode is not enabled, a different basic transformation base is used as the first inverse transformation base according to the size of the block to be coded. The decoding device according to this aspect corresponds to the coding device according to the third aspect. Below, this aspect will be specifically described with reference to the drawings, focusing on the differences from the fifth and sixth aspects.
[0300] It should be noted that the internal configuration 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 not shown in the figure.
[0301] [Processing of the inverse quantization unit and inverse transform unit of the decoding device] The processing of the transform unit 106 and the quantization unit 108 of the encoding device 100 according to this aspect will be described with reference to Fig. 23. Fig. 23 is a flowchart showing the processing of the inverse quantization unit 204 and the inverse transform unit 206 of the decoding device 200 according to the seventh aspect of the first embodiment. In Fig. 23, the processing common to the fifth aspect is denoted by the same reference numerals and the description thereof will be omitted.
[0302] When the adaptive transformation basis selection mode is not enabled (NO in S505), the size determination unit 2065 determines whether the transformation size is within a certain range (S701). That is, the size determination unit 2065 determines whether the horizontal size and vertical size of the block to be decoded are equal to or smaller than a second threshold size. Specifically, the size determination unit 2065 determines whether the product of the horizontal size and vertical size of the block to be decoded is equal to or smaller than a threshold, for example.
[0303] Here, if the transformation size is within a certain range (YES in S701), the first inverse transformation base selection unit 2066 selects the second basic transformation base as the first inverse transformation base in the horizontal and vertical directions (S702). On the other hand, if the transformation size exceeds the certain range (NO in S701), the first inverse transformation base selection unit 2066 selects the first basic transformation base as the first inverse transformation base in the horizontal and vertical directions (S703).
[0304] It should be noted that a decoding method in accordance with the encoding method of the third aspect shown in FIG. 16 may be adopted.
[0305] [Effects, etc.] As described above, the decoding device 200 according to this embodiment can achieve the same effects as the encoding device 100 according to the third embodiment.
[0306] [Combination with other aspects] This aspect may be implemented in combination with at least a part of other aspects of the present disclosure. Also, some of the processes, some of the configurations of the device, and some of the syntax described in the flowcharts of this aspect may be implemented in combination with other aspects.
[0307] (Eighth aspect of the first embodiment) Next, the eighth aspect of the first embodiment will be described. In this aspect, an example of decoding of various signals related to the first transform and the second transform in the seventh aspect will be described. The decoding device according to this aspect corresponds to the encoding device according to the fourth aspect. Below, this aspect will be specifically described with reference to the drawings, focusing on the differences from the fifth to seventh aspects.
[0308] It should be noted that the internal configuration 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 not shown in the figure.
[0309] [Processing of the entropy decoding unit, inverse quantization unit, and inverse transform unit of the decoding device] The processes of the entropy decoding unit 202, the inverse quantization unit 204, and the inverse transform unit 206 of the decoding device 200 according to this embodiment will be described with reference to Fig. 24A and Fig. 24B. In Fig. 24A and Fig. 24B, the processes common to any of the fifth to seventh embodiments are denoted by the same reference numerals, and the description thereof will be omitted.
[0310] The entropy decoding unit 202 determines whether to skip decoding of the adaptive transformation basis selection mode signal (S801). For example, the entropy decoding unit 202 determines to skip decoding of the adaptive transformation basis selection mode signal when either of the following conditions (A) and (B) is satisfied, and determines not to skip decoding of the adaptive transformation basis selection mode signal when the following conditions (A) and (B) are satisfied.
[0311] (A) The adaptive transformation basis selection mode is not enabled.
[0312] (B) The adaptive transformation basis selection mode is enabled, and all of the following conditions (B1) to (B4) are satisfied.
[0313] (B1) The transformation size is equal to or smaller than the second threshold size W1xH1 used in step S701.
[0314] (B2) The horizontal transformation size is equal to or smaller than the first horizontal threshold size W2 used in step S506.
[0315] (B3) The vertical transformation size is equal to or smaller than the first vertical threshold size H2 used in step S509.
[0316] (B4) The second fundamental transformation base and the fixed transformation bases in the horizontal and vertical directions are the same transformation base.
[0317] As a specific example, when the second threshold size W1xH1 is 4x4 pixels, the first horizontal threshold size W2 is 4 pixels, the first vertical threshold size H2 is 4 pixels, and the second basic transformation base and the fixed transformation base are both DST-VII transformation bases, if the transformation size is 4x4 pixels or less, the entropy decoding unit 202 determines to skip decoding of the adaptive transformation base selection mode signal.
[0318] Conversely, when neither the above condition (A) nor (B) is satisfied, the entropy decoding unit 202 determines not to skip decoding of the adaptive transformation basis selection mode signal.
[0319] Here, if it is determined that the decoding of the adaptive transformation basis selection mode signal is to be skipped (YES in S801), the entropy decoding unit 202 skips steps S601 to S606 and decodes the quantization coefficients (S607). On the other hand, if it is determined that the decoding of the adaptive transformation basis selection mode signal is not to be skipped (NO in S801), the entropy decoding unit 202 executes steps S601 to S606 as in the sixth aspect, and then decodes the quantization coefficients (S207).
[0320] It should be noted that a decoding method in accordance with the encoding method of the fourth aspect shown in Figs. 17A, 17B, and 18 may be adopted.
[0321] [Effects, etc.] As described above, the decoding device 200 according to this aspect can achieve the same effects as the encoding device 100 according to the fourth aspect.
[0322] [Combination with other aspects] This aspect may be implemented in combination with at least a part of other aspects of the present disclosure. Also, some of the processes, some of the configurations of the device, and some of the syntax described in the flowcharts of this aspect may be implemented in combination with other aspects.
[0323] (Modifications of each aspect of the first embodiment) A signal indicating whether or not to enable a part or all of the processes described in any of the first to eighth aspects may be coded and decoded. Such a signal may be coded in units of CU (Coding Unit) or CTU (Coding Tree Unit), or may be coded in units of SPS (Sequence Parameter Set), PPS (Picture Parameter Set), or slice, which correspond to the H.265 / HEVC standard.
[0324] Based on the picture type (I, P, B), slice type (I, P, B), transform size (4x4 pixels, 8x8 pixels, or other), the number of non-zero coefficients, the quantization parameter, Temporal_id (layer of hierarchical coding), or any combination thereof, the selection of the first transform base and the first transform may be skipped, and the selection of the second transform base and the second transform may be skipped.
[0325] When the encoding devices according to the first to fourth aspects perform the above-mentioned operations, the decoding devices according to the fifth to eighth aspects also perform corresponding operations. For example, when the encoding device encodes information indicating whether to enable a process for skipping the first transform or the second transform, the decoding device decodes the information and determines whether the first transform or the second transform is enabled and whether information indicating the first transform or the second transform has been encoded.
[0326] (Embodiment 2) In each of the above embodiments, each of the functional blocks can usually be realized by an MPU, a memory, etc. Furthermore, the processing by each of the functional blocks is usually realized by a program execution unit such as a processor reading and executing software (programs) recorded on a recording medium such as a ROM. The software may be distributed by downloading, etc., or may be recorded on a recording medium such as a semiconductor memory and distributed. Of course, each functional block can also be realized by hardware (dedicated circuitry).
[0327] Furthermore, the processes described in each embodiment may be realized by centralized processing using a single device (system), or may be realized by distributed processing using multiple devices. The processor that executes the above program may be either single or multiple. That is, centralized processing or distributed processing may be performed.
[0328] The aspects of the present disclosure are not limited to the above examples, and various modifications are possible, which are also included within the scope of the aspects of the present disclosure.
[0329] Further, here, application examples of the video coding method (image coding method) or video decoding method (image decoding method) shown in each of the above embodiments and a system using the same will be described. The system is characterized by having an image coding device using the image coding method, an image decoding device using the image decoding method, and an image coding / decoding device equipped with both. Other configurations in the system can be appropriately changed depending on the case.
[0330] [Usage example] 25 is a diagram showing the overall configuration of a content supply system ex100 that realizes a content distribution service. The area where communication services are provided is divided into cells of a desired size, and base stations ex106, ex107, ex108, ex109, and ex110, which are fixed wireless stations, are installed in each cell.
[0331] In this content supply system ex100, devices such as a computer ex111, a game machine ex112, a camera ex113, a home appliance ex114, and a smartphone ex115 are connected to the Internet ex101 via an Internet service provider ex102 or a communication network ex104, and base stations ex106 to ex110. The content supply system ex100 may be configured to connect any of the above elements in combination. Each device may be directly or indirectly connected to each other via a telephone network or short-distance wireless communication, without going through the base stations ex106 to ex110, which are fixed wireless stations. In addition, the streaming server ex103 is connected to each device such as a computer ex111, a game machine ex112, a camera ex113, a home appliance ex114, and a smartphone ex115 via the Internet ex101, etc. In addition, the streaming server ex103 is connected to a terminal in a hot spot in an airplane ex117, etc., via a satellite ex116.
[0332] Instead of the base stations ex106 to ex110, wireless access points or hot spots may be used. The streaming server ex103 may be directly connected to the communication network ex104 without going through the Internet ex101 or the Internet service provider ex102, or may be directly connected to an airplane ex117 without going through a satellite ex116.
[0333] The camera ex113 is a device capable of taking still images and videos, such as a digital camera. The smartphone ex115 is a smartphone, a mobile phone, or a PHS (Personal Handyphone System) that is compatible with a mobile communication system generally called 2G, 3G, 3.9G, 4G, and 5G in the future.
[0334] The home appliance ex118 is a refrigerator or an appliance included in a home fuel cell cogeneration system.
[0335] In the content supply system ex100, a terminal having a photographing function is connected to a streaming server ex103 via a base station ex106 or the like, thereby enabling live distribution and the like. In live distribution, a terminal (such as a computer ex111, a game machine ex112, a camera ex113, a home appliance ex114, a smartphone ex115, and a terminal in an airplane ex117) performs the encoding process described in each of the above embodiments on still image or video content photographed by a user using the terminal, multiplexes the video data obtained by the encoding with audio data obtained by encoding audio corresponding to the video, and transmits the obtained data to the streaming server ex103. That is, each terminal functions as an image encoding device according to one aspect of the present disclosure.
[0336] Meanwhile, the streaming server ex103 streams the transmitted content data to the requesting client. The client is a computer ex111, a game machine ex112, a camera ex113, a home appliance ex114, a smartphone ex115, a terminal in an airplane ex117, or the like, capable of decoding the encoded data. Each device that receives the distributed data decodes and plays back the received data. That is, each device functions as an image decoding device according to one aspect of the present disclosure.
[0337] [Distributed processing] The streaming server ex103 may be a plurality of servers or computers that process, record, and distribute data in a distributed manner. For example, the streaming server ex103 may be realized by a CDN (Contents Delivery Network), and content distribution may be realized by a network that connects a large number of edge servers distributed around the world. In a CDN, an edge server that is physically close to the client is dynamically assigned according to the client. The content is cached and distributed to the edge server, thereby reducing delays. In addition, when an error occurs or the communication state changes due to an increase in traffic, the processing can be distributed among multiple edge servers, the distribution entity can be switched to another edge server, or distribution can be continued by bypassing the part of the network where a failure has occurred, thereby realizing high-speed and stable distribution.
[0338] In addition to the distributed processing of the distribution itself, the encoding processing of the captured data may be performed by each terminal, may be performed by the server side, or may be shared among the terminals. As an example, in the encoding processing, a processing loop is generally performed twice. In the first loop, the complexity of the image or the amount of code is detected for each frame or scene. In the second loop, processing is performed to maintain the image quality and improve the encoding efficiency. For example, the terminal performs the first encoding processing, and the server side that receives the content performs the second encoding processing, thereby improving the quality and efficiency of the content while reducing the processing load on each terminal. In this case, if there is a request to receive and decode almost in real time, the data encoded once by the terminal can be received and played back by other terminals, making it possible to perform more flexible real-time distribution.
[0339] As another example, the camera ex113 etc. extracts features from an image, compresses data related to the features as metadata, and transmits the compressed data to the server. The server performs compression according to the meaning of the image, for example, by determining the importance of an object from the features and switching the quantization precision. The feature data is particularly effective in improving the precision and efficiency of motion vector prediction when the server performs recompression. Alternatively, the terminal may perform simple encoding such as VLC (variable length coding), and the server may perform encoding with a large processing load such as CABAC (context-adaptive binary arithmetic coding).
[0340] As another example, in a stadium, a shopping mall, a factory, etc., there may be a plurality of video data in which almost the same scene has been shot by a plurality of terminals. In this case, using the plurality of terminals that shot the video and, as necessary, other terminals and servers that did not shoot the video, coding processing is assigned to each of them, for example, in units of GOPs (Group of Pictures), in units of pictures, or in units of tiles obtained by dividing a picture, for distributed processing. This reduces delays and realizes better real-time performance.
[0341] In addition, since the multiple video data are of almost the same scene, the server may manage and / or instruct the video data shot by each terminal to be mutually referenced. Alternatively, the server may receive the encoded data from each terminal and change the reference relationship between the multiple data, or correct or replace the pictures themselves and re-encode them. This makes it possible to generate a stream with improved quality and efficiency for each piece of data.
[0342] The server may also perform transcoding to change the encoding format of the video data before distributing it. For example, the server may convert an MPEG-based encoding format into a VP-based encoding format, or convert H.264 into H.265.
[0343] In this way, the encoding process can be performed by a terminal or one or more servers. Therefore, in the following, descriptions such as "server" or "terminal" are used to indicate the entity performing the processing, but some or all of the processing performed by the server may be performed by the terminal, and some or all of the processing performed by the terminal may be performed by the server. The same applies to the decoding process.
[0344] [3D, multi-angle] In recent years, it has become common to integrate and use images or videos of different scenes or the same scene taken from different angles by multiple devices such as cameras ex113 and / or smartphones ex115 that are almost synchronized with each other. The videos taken by the devices are integrated based on the relative positional relationship between the devices that is obtained separately, or on areas where feature points included in the videos match.
[0345] The server may not only encode 2D video, but also encode still images automatically or at a time specified by the user based on scene analysis of the video and transmit them to the receiving terminal. If the server can obtain the relative positional relationship between the shooting terminals, the server may generate a 3D shape of the scene based on not only 2D video but also images of the same scene captured from different angles. The server may separately encode 3D data generated by point clouds, etc., or may generate images to be transmitted to the receiving terminal by selecting or reconstructing images from images captured by multiple terminals based on the results of recognizing or tracking people or objects using the 3D data.
[0346] In this way, the user can enjoy a scene by selecting any video corresponding to each shooting terminal, or can enjoy content in which a video from any viewpoint is cut out from 3D data reconstructed using multiple images or videos. Furthermore, sound may be collected from multiple different angles, just like the video, and the server may multiplex the sound from a specific angle or space with the video and transmit it in accordance with the video.
[0347] In recent years, content that associates the real world with a virtual world, such as Virtual Reality (VR) and Augmented Reality (AR), has also become popular. In the case of VR images, the server creates viewpoint images for the right eye and the left eye, respectively, and may perform encoding that allows reference between each viewpoint video using Multi-View Coding (MVC) or the like, or may encode them as separate streams without mutual reference. When decoding the separate streams, it is preferable to play them in synchronization with each other so that a virtual three-dimensional space is reproduced according to the user's viewpoint.
[0348] In the case of an AR image, the server superimposes 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 may obtain or hold virtual object information and three-dimensional data, generate a two-dimensional image according to the movement of the user's viewpoint, and smoothly connect them to create superimposed data. Alternatively, the decoding device may transmit the movement of the user's viewpoint to the server in addition to a request for virtual object information, and the server may create superimposed data according to the movement of the viewpoint received from the three-dimensional data held by the server, encode the superimposed data, and deliver it to the decoding device. Note that the superimposed data has an α value indicating the transparency in addition to RGB, and the server may set the α value of the part other than the object created from the three-dimensional data to 0, etc., and encode the data in a state in which the part is transparent. Alternatively, the server may generate data in which a predetermined value of RGB value is set to the background like a chromakey, and the part other than the object is the background color.
[0349] Similarly, the decoding process of the distributed data may be performed by each client terminal, or may be performed by the server side, or may be shared among them. As an example, a certain terminal may once send a reception request to the server, and the content corresponding to the request may be received by other terminals, decoded, and the decoded signal may be transmitted to a device having a display. By distributing the processing and selecting appropriate content regardless of the performance of the communication-enabled terminals themselves, data with good image quality can be reproduced. In another example, while large-sized image data is received by a TV or the like, a part of the area, such as tiles into which the picture is divided, may be decoded and displayed on the viewer's personal terminal. This allows the viewer to share the overall picture while checking his / her own area of responsibility or the area he / she wants to check in more detail at hand.
[0350] In the future, it is expected that content will be seamlessly received by switching appropriate data for the currently connected communication using delivery system standards such as MPEG-DASH under circumstances where multiple short-distance, medium-distance, or long-distance wireless communication is available, regardless of whether indoors or outdoors. This allows users to freely select and switch in real time not only their own terminals but also decoding devices or display devices such as displays installed indoors and outdoors. In addition, decoding can be performed while switching the decoding device and the display device based on the user's location information, etc. This makes it possible to move while displaying map information on the wall or part of the ground of a neighboring building where a displayable device is embedded while moving to a destination. It is also possible to switch the bit rate of the received data based on the accessibility of the encoded data on the network, such as when the encoded data is cached on a server that can be accessed from the receiving terminal in a short time, or when it is copied to an edge server in a content delivery service.
[0351] [Scalable Coding] The switching of contents will be described using a scalable stream compressed and coded by applying the video coding method shown in each of the above embodiments, as shown in FIG. 26. The server may have multiple streams with the same content but different qualities as individual streams, but may be configured to switch contents by taking advantage of the characteristics of a temporal / spatial scalable stream realized by coding in layers as shown in the figure. In other words, the decoding side can freely switch between low-resolution content and high-resolution content by determining which layer to decode according to an internal factor such as performance and an external factor such as the state of the communication band. For example, if you want to continue watching a video you were watching on your smartphone ex115 while on the move on a device such as an Internet TV after you get home, the device can decode the same stream up to a different layer, reducing the burden on the server side.
[0352] Furthermore, as described above, in addition to the configuration that realizes scalability in which pictures are coded for each layer and an enhancement layer exists above a base layer, the enhancement layer may include meta-information based on image statistics, etc., and the decoding side may generate high-quality content by super-resolving pictures of the base layer based on the meta-information. Super-resolution may be either an improvement in the signal-to-noise ratio at the same resolution or an increase in resolution. The meta-information includes information for specifying linear or nonlinear filter coefficients used in the super-resolution process, or information for specifying parameter values in the filter process, machine learning, or least squares calculation used in the super-resolution process.
[0353] Alternatively, a picture may be divided into tiles or the like according to the meaning of an object in an image, and the decoding side may select a tile to decode to decode only a part of the area. Also, by storing the attribute of an object (person, car, ball, etc.) and its position in a video (coordinate position in the same image, etc.) as meta information, the decoding side can identify the position of a desired object based on the meta information and determine the tile containing the object. For example, as shown in FIG. 27, the meta information is stored using a data storage structure different from pixel data such as an SEI message in HEVC. This meta information indicates, for example, the position, size, or color of the main object.
[0354] Meta information may also be stored in units consisting of multiple pictures, such as streams, sequences, or random access units, etc. This allows the decoding side to obtain the time when a specific person appears in the video, and by combining this with picture-by-picture information, it is possible to identify the picture in which an object exists and the position of the object within the picture.
[0355] [Web page optimization] FIG. 28 is a diagram showing an example of a display screen of a web page in a computer ex111 or the like. FIG. 29 is a diagram showing an example of a display screen of a web page in a smartphone ex115 or the like. As shown in FIG. 28 and FIG. 29, a web page may include multiple link images that are links to image content, and the appearance of the web page differs depending on the device used to view the page. When multiple link images are visible on the screen, the display device (decoding device) displays a still image or I-picture that each content has as a link image, displays a video such as a gif animation using multiple still images or I-pictures, or receives only the base layer to decode and display the video, until the user explicitly selects the link image, or until the link image approaches the center of the screen or the entire link image enters the screen.
[0356] When a link image is selected by a user, the display device gives top priority to decoding the base layer. If the HTML constituting the web page contains information indicating that the content is scalable, the display device may decode up to the enhancement layer. In order to ensure real-time performance, before selection or when the communication bandwidth is very tight, the display device decodes and displays only forward-reference pictures (I-pictures, P-pictures, and B-pictures with forward reference only), thereby reducing the delay between the decoding time of the first picture and the display time (the delay from the start of decoding the content to the start of display). The display device may also ignore the reference relationship between pictures and roughly decode all B-pictures and P-pictures with forward reference, and perform normal decoding as the number of received pictures increases over time.
[0357] [Automatic driving] Furthermore, when transmitting and receiving still image or video data such as 2D or 3D map information for automatic driving or driving assistance of a vehicle, the receiving terminal may receive weather or construction information as meta information in addition to image data belonging to one or more layers, and may associate and decode these. Note that the meta information may belong to a layer, or may simply be multiplexed with the image data.
[0358] In this case, since a car, drone, or airplane including a receiving terminal moves, the receiving terminal can realize seamless reception and decoding while switching between base stations ex106 to ex110 by transmitting the location information of the receiving terminal at the time of a reception request. Also, the receiving terminal can dynamically switch how much meta information to receive or how much to update map information according to the user's selection, the user's situation, or the state of the communication band.
[0359] In this manner, in the content supply system ex100, the client can receive, decode, and play back encoded information transmitted by the user in real time.
[0360] [Distribution of personal content] Furthermore, the content supply system ex100 allows not only high-quality, long-duration content from video distributors, but also low-quality, short-duration content from individuals via unicast or multicast distribution. It is expected that such personal content will continue to increase in the future. To improve the quality of personal content, the server may perform editing processing before encoding processing. This can be achieved, for example, by the following configuration.
[0361] During shooting, in real time or after accumulating, the server performs recognition processing such as shooting errors, scene search, semantic analysis, and object detection from the original image or encoded data. Then, based on the recognition result, the server manually or automatically corrects out-of-focus or camera shake, deletes less important scenes such as scenes that are less bright than other pictures or are out of focus, emphasizes object edges, changes color, and performs other editing. The server encodes the edited data based on the editing result. It is also known that if the shooting time is too long, the viewer rating will decrease, and the server may automatically clip not only scenes of less importance as described above but also scenes with little movement based on the image processing result so that the content will be within a specific time range depending on the shooting time. Alternatively, the server may generate a digest based on the result of the semantic analysis of the scene and encode it.
[0362] In addition, there are cases where personal contents contain images that infringe copyrights, moral rights, portrait rights, etc., and the scope of sharing may exceed the intended scope, which may be inconvenient for individuals. Therefore, for example, the server may change the image to an unfocused image of a person's face on the periphery of the screen, or the inside of a house, and encode it. The server may also recognize whether the image to be encoded contains a face of a person other than a person registered in advance, and if so, may perform processing such as blurring the face. Alternatively, as pre-processing or post-processing of encoding, the user may specify a person or background area that he or she wishes to process in the image from the viewpoint of copyright, etc., and the server may replace the specified area with another image or blur the focus. If it is a person, the image of the face part can be replaced while tracking the person in the video.
[0363] In addition, since viewing of personal content with a small amount of data requires real-time performance, the decoding device first receives the base layer as a top priority, and performs decoding and playback, although this depends on the bandwidth. The decoding device may receive an enhancement layer during this time, and when playback is looped or otherwise played two or more times, play high-quality video including the enhancement layer. In this way, if the stream is scalably encoded, it is possible to provide an experience in which the video is rough when not selected or when viewing begins, but the stream gradually becomes smarter and the image quality improves. In addition to scalable encoding, a similar experience can be provided even if a rough stream played the first time and a second stream encoded with reference to the first video are configured as one stream.
[0364] [Other use cases] Moreover, these encoding or decoding processes are generally processed in an LSIex500 possessed by each terminal. The LSIex500 may be a single chip or may be configured with multiple chips. Note that software for encoding or decoding moving images may be incorporated into some kind of recording medium (such as a CD-ROM, a flexible disk, or a hard disk) that can be read by the computer ex111 or the like, and the encoding or decoding process may be performed using the software. Furthermore, if the smartphone ex115 has a camera, video data captured by the camera may be transmitted. The video data in this case is data that has been encoded by the LSIex500 possessed by the smartphone ex115.
[0365] The LSIex500 may be configured to download and activate application software. In this case, the terminal first determines whether the terminal supports the encoding method of the content or has the ability to execute a specific service. If the terminal does not support the encoding method of the content or does not have the ability to execute a specific service, the terminal downloads a codec or application software, and then acquires and plays the content.
[0366] Furthermore, at least one of the video encoding device (image encoding device) or video decoding device (image decoding device) of each of the above embodiments can be incorporated into a digital broadcasting system, not limited to the content supply system ex100 via the Internet ex101. Since multiplexed data in which video and audio are multiplexed is carried and transmitted over broadcasting radio waves using a satellite or the like, there is a difference in that it is more suitable for multicast compared to the content supply system ex100, which has a configuration that is easy to use for unicast, but similar applications are possible with regard to the encoding process and decoding process.
[0367] [Hardware configuration] FIG. 30 is a diagram showing a smartphone ex115. FIG. 31 is a diagram showing a configuration example of the smartphone ex115. The smartphone ex115 includes an antenna ex450 for transmitting and receiving radio waves to and from the base station ex110, a camera unit ex465 capable of taking videos and still images, and a display unit ex458 for displaying the video captured by the camera unit ex465 and the decoded data of the video received by the antenna ex450. The smartphone ex115 further includes an operation unit ex466 such as a touch panel, an audio output unit ex457 such as a speaker for outputting audio or sound, an audio input unit ex456 such as a microphone for inputting audio, a memory unit ex467 capable of storing encoded data such as captured video or still images, recorded audio, received video or still images, and e-mail, or decoded data, and a slot unit ex464 which is an interface unit with a SIMex468 for identifying a user and authenticating access to various data including a network. In addition, an external memory may be used instead of the memory unit ex467.
[0368] In addition, a main control unit ex460, which comprehensively controls the display unit ex458 and the operation unit ex466, etc., is connected to a power supply circuit unit ex461, an operation input control unit ex462, a video signal processing unit ex455, a camera interface unit ex463, a display control unit ex459, a modulation / demodulation unit ex452, a multiplexing / separation unit ex453, an audio signal processing unit ex454, a slot unit ex464, and a memory unit ex467 via a bus ex470.
[0369] When the power key is turned on by a user's operation, the power supply circuit unit ex461 starts up the smartphone ex115 into an operational state by supplying power to each unit from the battery pack.
[0370] The smartphone ex115 performs processes such as telephone calls and data communications under the control of a main control unit ex460 having a CPU, a ROM, and a RAM. During a telephone call, a voice signal collected by a voice input unit ex456 is converted into a digital voice signal by a voice signal processing unit ex454, which is then subjected to spectrum spreading processing by a modulation / demodulation unit ex452, and the digital-to-analog conversion processing and frequency conversion processing by a transmission / reception unit ex451 is then transmitted via an antenna ex450. In addition, the received data is amplified, and subjected to frequency conversion processing and analog-to-digital conversion processing, and the spectrum inverse spreading processing by a modulation / demodulation unit ex452 is then performed, and the analog voice signal is converted into an analog voice signal by a voice signal processing unit ex454, which is then output from a voice output unit ex457. During a data communication mode, text, still images, or video data is sent to the main control unit ex460 via an operation input control unit ex462 by operating an operation unit ex466 or the like of the main unit, and transmission and reception processing is performed in the same manner. When transmitting video, still images, or video and audio in the data communication mode, 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 by the moving image encoding method shown in each of the above embodiments, and sends the encoded video data to the multiplexing / separation unit ex453. The audio signal processing unit ex454 also encodes the audio signal collected by the audio input unit ex456 while the camera unit ex465 is capturing the video or still images, and sends the encoded audio data to the multiplexing / separation unit ex453. The multiplexing / separation unit ex453 multiplexes the encoded video data and the encoded audio data by a predetermined method, and performs modulation and conversion processing in the modulation / demodulation unit (modulation / demodulation circuit unit) ex452 and the transmission / reception unit ex451, and transmits the data via the antenna ex450.
[0371] When receiving a video attached to an e-mail or chat, or a video linked to a web page, etc., in order to decode the multiplexed data received via the antenna ex450, the multiplexing / separation unit ex453 separates the multiplexed data into a bit stream of video data and a bit stream of audio data by separating the multiplexed data, and supplies the encoded video data to the video signal processing unit ex455 via the synchronization bus ex470, and supplies the encoded audio data to the audio signal processing unit ex454. The video signal processing unit ex455 decodes the video signal by a video decoding method corresponding to the video encoding method shown in each of 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. The audio signal processing unit ex454 also decodes the audio signal, and audio is output from the audio output unit ex457. Note that since real-time streaming is widespread, there may be cases where audio playback is socially inappropriate depending on the user's situation. Therefore, as an initial value, a configuration in which only video data is played without playing audio signals is preferable. The audio may be played in sync only when the user performs an operation such as clicking on the video data.
[0372] In addition, although the smartphone ex115 has been described as an example here, three types of implementation formats are possible for the terminal: a transmitting / receiving terminal having both an encoder and a decoder, a transmitting terminal having only an encoder, and a receiving terminal having only a decoder. Furthermore, in the digital broadcasting system, multiplexed data in which audio data and the like are multiplexed with video data is received or transmitted, but the multiplexed data may include text data related to the video in addition to audio data, or the video data itself may be received or transmitted instead of the multiplexed data.
[0373] Although the main control unit ex460 including the CPU controls the encoding or decoding process, terminals often have a GPU. Therefore, a configuration may be used in which a wide area is processed collectively by utilizing the performance of the GPU using a memory shared by the CPU and GPU, or a memory whose addresses are managed so that they can be used in common. This can shorten the encoding time, ensure real-time performance, and achieve low latency. In particular, it is efficient to perform the processing of motion search, deblocking filter, SAO (Sample Adaptive Offset), and transformation and quantization collectively in units such as pictures by the GPU, rather than by the CPU. [Industrial Applicability]
[0374] The present disclosure is applicable to, for example, television receivers, digital video recorders, car navigation systems, mobile phones, digital cameras, digital video cameras, and the like. [Explanation of symbols]
[0375] 100 Encoding device 102 Division 104 Subtraction section 106 Conversion unit 108 Quantization section 110 Entropy coding unit 112, 204 Inverse quantization section 114, 206 Inverse conversion unit 116, 208 Addition section 118, 210 Block Memory 120, 212 Loop filter section 122, 214 frame memory 124, 216 Intra prediction section 126, 218 Inter prediction section 128, 220 Predictive control unit 200 Decryption device 202 Entropy Decoding Unit 1061, 2064 Conversion mode determination section 1062, 2065 Size determination section 1063 First transformation basis selection section 1064 First conversion unit 1065 Second conversion execution determination unit 1066 Second transformation basis selection section 1067 Second conversion section 1141, 2062 Second inverse transformation basis selection part 1142, 2063 Second inverse transform unit 1143, 2066 First inverse transformation basis selection part 1144, 2067 First inverse transform unit 2061 Second inverse conversion execution decision unit 2062S Second base selection signal 2064S Adaptive transformation basis selection mode signal 2065S size signal 2066S First base selection signal
Claims
1. An encoding device comprising a circuit and a memory, The circuit uses the memory to When it is determined that a horizontal transform and a vertical transform are to be performed on the encoding target block, a horizontal transform base and a vertical transform base are used to perform the horizontal transform and the vertical transform on a residual of the encoding target block, respectively, to generate a first transform coefficient; (i) when it is determined that a transform base is selected for the current block based on a size of the current block, before performing the horizontal transform and the vertical transform, the circuit: When the horizontal size of the block to be coded is a first horizontal size that is larger than a threshold size, a first transformation base is selected as a transformation base in the horizontal direction from among transformation base candidates; When the horizontal size of the encoding target block is smaller than the threshold size, a second transformation base which is a fixed transformation base is selected as a transformation base in the horizontal direction; When a vertical size of the encoding target block is a first vertical size that is larger than the threshold size, the first transformation base is selected as a transformation base in the vertical direction from among the candidates of the transformation base; When the vertical size of the encoding target block is smaller than the threshold size, the second transformation basis is selected as a transformation basis in the vertical direction; generating a bitstream based on quantized coefficients obtained by quantizing the first transform coefficients; (ii) when performing a non-separable transform on the encoding target block, selecting a fundamental transform base as the vertical transform base and the horizontal transform base, and performing the non-separable transform on the first transform coefficients to generate second transform coefficients; generating a bitstream based on quantized coefficients obtained by quantizing the second transform coefficients; Encoding device.
2. A decoding device comprising a circuit and a memory, The circuit uses the memory to Inverse quantizing the quantized coefficients of the block to be decoded to generate second transform coefficients; (i) generating first transform coefficients by performing the non-separable inverse transform on the second transform coefficients when it is determined that a non-separable inverse transform is to be performed on the block to be decoded; When it is determined that an inverse horizontal transform and an inverse vertical transform are to be performed on the block to be decoded, a basic transform base is selected as an inverse vertical transform base and an inverse horizontal transform base, and a residual of the block to be decoded is generated by performing the inverse horizontal transform and the inverse vertical transform on the first transform coefficients using the inverse horizontal transform base and the inverse vertical transform base, respectively; (ii) when it is determined that a conversion basis is selected for the block to be decoded based on a size of the block to be decoded, the circuit When the horizontal size of the block to be decoded is a first horizontal size that is larger than a threshold size, a first inverse transformation base is selected as an inverse transformation base in the horizontal direction from among candidates of the inverse transformation base; When the horizontal size of the block to be decoded is smaller than the threshold size, a second inverse transformation base, which is a fixed transformation base, is selected as an inverse transformation base in the horizontal direction; When a vertical size of the block to be decoded is a first vertical size that is larger than the threshold size, the first inverse transformation base is selected as an inverse transformation base in the vertical direction from among the candidates of the inverse transformation base; When the vertical size of the block to be decoded is smaller than the threshold size, the second inverse transformation basis is selected as an inverse transformation basis in the vertical direction; performing the inverse horizontal transform and the inverse vertical transform on the second transform coefficients using the selected inverse horizontal transform base and the selected inverse vertical transform base, respectively, to generate a residual of the block to be decoded; Decryption device.
3. 1. A method for encoding an image, comprising the steps of: When it is determined that a horizontal transform and a vertical transform are to be performed on the encoding target block, a horizontal transform base and a vertical transform base are used to perform the horizontal transform and the vertical transform on a residual of the encoding target block, respectively, to generate a first transform coefficient; (i) when it is determined that a transformation base is selected for the current block to be coded based on a size of the current block to be coded, before performing the horizontal transformation and the vertical transformation, When the horizontal size of the block to be coded is a first horizontal size that is larger than a threshold size, a first transformation base is selected as a transformation base in the horizontal direction from among transformation base candidates; When the horizontal size of the encoding target block is smaller than the threshold size, a second transformation base which is a fixed transformation base is selected as a transformation base in the horizontal direction; When a vertical size of the encoding target block is a first vertical size that is larger than the threshold size, the first transformation base is selected as a transformation base in the vertical direction from among the candidates of the transformation base; When the vertical size of the encoding target block is smaller than the threshold size, the second transformation basis is selected as a transformation basis in the vertical direction; generating a bitstream based on quantized coefficients obtained by quantizing the first transform coefficients; (ii) when performing a non-separable transform on the encoding target block, selecting a fundamental transform base as the vertical transform base and the horizontal transform base, and performing the non-separable transform on the first transform coefficients to generate second transform coefficients; generating a bitstream based on quantized coefficients obtained by quantizing the second transform coefficients; Encoding method.
4. 1. A method for decoding an image, comprising the steps of: Inverse quantizing the quantized coefficients of the block to be decoded to generate second transform coefficients; (i) generating first transform coefficients by performing the non-separable inverse transform on the second transform coefficients when it is determined that a non-separable inverse transform is to be performed on the block to be decoded; When it is determined that an inverse horizontal transform and an inverse vertical transform are to be performed on the block to be decoded, a basic transform base is selected as an inverse vertical transform base and an inverse horizontal transform base, and a residual of the block to be decoded is generated by performing the inverse horizontal transform and the inverse vertical transform on the first transform coefficients using the inverse horizontal transform base and the inverse vertical transform base, respectively; (ii) when it is determined that a transformation base is selected for the decoding target block based on the size of the decoding target block, When the horizontal size of the block to be decoded is a first horizontal size that is larger than a threshold size, a first inverse transformation base is selected as an inverse transformation base in the horizontal direction from among candidates of the inverse transformation base; When the horizontal size of the block to be decoded is smaller than the threshold size, a second inverse transformation base, which is a fixed transformation base, is selected as an inverse transformation base in the horizontal direction; When a vertical size of the block to be decoded is a first vertical size that is larger than the threshold size, the first inverse transformation base is selected as an inverse transformation base in the vertical direction from among the candidates of the inverse transformation base; When the vertical size of the block to be decoded is smaller than the threshold size, the second inverse transformation basis is selected as an inverse transformation basis in the vertical direction; performing the inverse horizontal transform and the inverse vertical transform on the second transform coefficients using the selected inverse horizontal transform base and the selected inverse vertical transform base, respectively, to generate a residual of the block to be decoded; Decryption method.
Citation Information
Patent Citations
Enhanced multiple transforms for prediction residual
US20160219290A1
Non-separable secondary transform for video coding
US20170094313A1
Method and Apparatus of Adaptive Multiple Transforms for Video Coding
US20180332289A1
Image decoding device and image encoding device
WO2017195555A1