Decoder, coding device, and bit stream generation device

The decoding apparatus improves compression efficiency and reduces processing load by using sub-pixel accurate prediction and motion compensation in video encoding and decoding.

JP2025109812AActive Publication Date: 2025-07-25PANASONIC INTELLECTUAL PROPERTY CORP OF AMERICA
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
JP2025079161
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2017-04-27
Filing Date
2025-05-12
Publication Date
2025-07-25
Estimated Expiration
2038-04-24

AI Technical Summary

Technical Problem

Existing video encoding and decoding technologies require further improvement in compression efficiency and reduction of processing load.

Method used

A decoding apparatus that uses two reference pictures to obtain predicted pictures with sub-pixel accuracy, deriving motion compensation values based on horizontal gradient values, and generating output predicted pictures using specified motion vectors within a normal reference range.

Benefits of technology

Enhances compression efficiency and reduces processing load in video encoding and decoding processes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025109812000001_ABST
    Figure 2025109812000001_ABST
Patent Text Reader

Abstract

To provide a decoder which can improve the compression efficiency and can reduce processing load.SOLUTION: The decoder obtains two prediction images by performing interpolation at sub-pixel accuracy using two reference pictures, obtains a plurality of horizontal gradient values respectively corresponding to second pixels in a sub-block, using the pixel values of a plurality of first pixels in the two prediction images, derives a motion correction value of the sub-block on the basis of the horizontal gradient values, and generates an output prediction image corresponding to the sub-block by using the motion correction value when an inter-prediction using the plurality of horizontal gradient values is ended. The two prediction images are specified by using two motion vectors. The reference range for the interpolation matches a normal reference range referred to obtain a prediction image of sub-pixel accuracy for a decoding target block in a normal inter-prediction which does not use the horizontal gradient values.SELECTED DRAWING: Figure 10
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to encoding and decoding of images using inter prediction.

Background Art

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

Prior Art Documents

Non-Patent Documents

[0003]

Non-Patent Document 1

Summary of the Invention

Problems to be Solved by the Invention

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

[0005] Therefore, the present disclosure provides an encoding device, a decoding device, or a bitstream generation device capable of achieving further improvement in compression efficiency and reduction of processing load.

Means for Solving the Problems

[0006] A decoding apparatus according to one aspect of the present disclosure is a decoding apparatus that decodes a decoding target block included in a decoding target picture, and includes a processor and a memory. The processor uses the memory to obtain two prediction pictures by interpolating with sub-pixel accuracy using two reference pictures associated with the decoding target block for bidirectional prediction, and uses pixel values of a plurality of first pixels included in the two prediction pictures to obtain a plurality of horizontal gradient values corresponding to a plurality of second pixels included in a sub-block obtained by dividing the decoding target block. Based on the plurality of horizontal gradient values, a motion compensation value of the sub-block is derived. At the end of inter prediction using the plurality of horizontal gradient values, an output prediction picture corresponding to the sub-block is generated using the motion compensation value of the sub-block. The two prediction pictures are specified using two motion vectors, and a reference range for the interpolation coincides with a normal reference range referred to for obtaining a prediction picture with sub-pixel accuracy corresponding to the decoding target block in normal inter prediction that does not use the plurality of horizontal gradient values.

[0007] Note that these general or specific aspects may be implemented 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 implemented by any combination of a system, a method, an integrated circuit, a computer program, and a recording medium.

Advantages of the Invention

[0008] The present disclosure can provide an encoding apparatus, a decoding apparatus, 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

[0009]

Figure 1

Figure 2

Figure 3

Figure 4A

Figure 4B

Figure 4C

Figure 5A

Figure 5B

Figure 5C

Figure 5D

Figure 6

Figure 7

Figure 8

Figure 9A

Figure 9B

Figure 9C

Figure 9D

Figure 10

Figure 11

Figure 12

Figure 13

Figure 14

Figure 15

Figure 16

Figure 17

Figure 18

Figure 19

Figure 20

Figure 21

Figure 22

Figure 23

Embodiments for Carrying Out the Invention

[0010] Hereinafter, embodiments will be specifically described with reference to the drawings.

[0011] Note that all of the embodiments described below show inclusive or specific examples. The numerical values, shapes, materials, components, arrangement positions and connection forms of the components, steps, order of steps, etc. shown in the following embodiments are merely examples and are not intended to limit the scope of the claims. In addition, among the components in the following embodiments, the components not described in the independent claims indicating the most general concept are described as optional components.

[0012] (Embodiment 1) First, 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 to be described later are applicable, an outline of Embodiment 1 will be described. However, Embodiment 1 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 are applicable, 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 Embodiment 1.

[0013] When applying the processes and / or configurations described in each aspect of the present disclosure to Embodiment 1, for example, any of the following may be performed.

[0014] (1) With respect to the encoding device or decoding device of Embodiment 1, among the plurality of components constituting the encoding device or decoding device, the component corresponding to the component described in each aspect of the present disclosure is replaced with the component described in each aspect of the present disclosure. (2) With respect to the encoding device or decoding device of Embodiment 1, after performing any changes such as addition, replacement, deletion, etc. of the functions or processes implemented for some of the plurality of components constituting the encoding device or decoding device, the component corresponding to the component described in each aspect of the present disclosure is replaced with the component described in each aspect of the present disclosure. For the method implemented by the encoding device or decoding device of Embodiment 1, after adding processing and / or making any changes such as replacement or deletion to some of the multiple processes included in the method, replace the processes corresponding to the processes described in each aspect of the present disclosure with the processes described in each aspect of the present disclosure. (4) Implement a combination of some of the components that make up the encoding device or decoding device of Embodiment 1 with the components described in each aspect of the present disclosure, components that have a part of the functions provided by the components described in each aspect of the present disclosure, or components that implement a part of the processes implemented by the components described in each aspect of the present disclosure. (5) Implement a combination of components that have a part of the functions provided by some of the components that make up the encoding device or decoding device of Embodiment 1, or components that implement a part of the processes implemented by some of the components that make up the encoding device or decoding device of Embodiment 1, with the components described in each aspect of the present disclosure, components that have a part of the functions provided by the components described in each aspect of the present disclosure, or components that implement a part of the processes implemented by the components described in each aspect of the present disclosure. (6) For the method implemented by the encoding device or decoding device of Embodiment 1, replace, among the multiple processes included in the method, the processes corresponding to the processes described in each aspect of the present disclosure with the processes described in each aspect of the present disclosure. (7) Implement a combination of some of the multiple processes included in the method implemented by the encoding device or decoding device of Embodiment 1 with the processes described in each aspect of the present disclosure.

[0015] Note that the ways of implementing the processes and / or configurations described in each aspect of the present disclosure are not limited to the above examples. For example, it may be implemented in a device used for a purpose different from the moving image / image encoding device or moving image / image decoding device disclosed in Embodiment 1, or the processes and / or configurations described in each aspect may be implemented alone. Also, the processes and / or configurations described in different aspects may be implemented in combination.

[0016] [Overview of the Encoding Device] First, the overview of the encoding device according to Embodiment 1 will be described. FIG. 1 is a block diagram showing the functional configuration of the encoding device 100 according to Embodiment 1. The encoding device 100 is a moving image / image encoding device that encodes moving images / images in block units.

[0017] As shown in FIG. 1, the encoding device 100 is a device that encodes an image in block units, and includes a splitting unit 102, a subtraction unit 104, a conversion unit 106, a quantization unit 108, an entropy encoding unit 110, an inverse quantization unit 112, an inverse conversion 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 a software program stored in the memory is executed by the processor, the processor functions as the splitting unit 102, the subtraction unit 104, the conversion unit 106, the quantization unit 108, the entropy encoding unit 110, the inverse quantization unit 112, the inverse conversion 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. Further, the encoding device 100 may be realized as one or more dedicated electronic circuits corresponding to the splitting unit 102, the subtraction unit 104, the conversion unit 106, the quantization unit 108, the entropy encoding unit 110, the inverse quantization unit 112, the inverse conversion 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] Hereinafter, each component included in the encoding device 100 will be described.

[0020] [Splitting Unit] The splitting unit 102 splits each picture included in the input moving image into a plurality of blocks and outputs each block to the subtraction unit 104. For example, the splitting unit 102 first splits the picture into blocks of a fixed size (e.g., 128x128). These blocks of fixed size are sometimes called Coding Tree Units (CTUs). Then, the splitting unit 102 splits each of the fixed-size blocks into variable-size blocks (e.g., 64x64 or smaller) based on recursive quadtree and / or binary tree block splitting. These variable-size blocks are sometimes called Coding Units (CUs), Prediction Units (PUs), or Transformation 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 the picture may be the processing units of CUs, PUs, and TUs.

[0021] FIG. 2 is a diagram showing an example of block splitting in Embodiment 1. In FIG. 2, solid lines represent block boundaries by quadtree block splitting, and dashed lines represent block boundaries by binary tree block splitting.

[0022] Here, block 10 is a square block of 128x128 pixels (128x128 block). This 128x128 block 10 is first split into four square 64x64 blocks (quadtree block splitting).

[0023] The upper-left 64x64 block is further vertically split into two rectangular 32x64 blocks, and the left 32x64 block is further vertically split into two rectangular 16x64 blocks (binary tree block splitting). As a result, the upper-left 64x64 block is split into two 16x64 blocks 11, 12 and a 32x64 block 13.

[0024] The upper-right 64x64 block is horizontally split into two rectangular 64x32 blocks 14, 15 (binary tree block splitting).

[0025] The 64x64 block in the lower left is divided into four square 32x32 blocks (quad-tree block division). Among the four 32x32 blocks, the upper left block and the lower right block are further divided. The upper left 32x32 block is vertically divided into two rectangular 16x32 blocks, and the right 16x32 block is further horizontally divided into two 16x16 blocks (binary-tree block division). The lower right 32x32 block is horizontally divided into two 32x16 blocks (binary-tree block division). As a result, the 64x64 block in the lower left is divided into 16 16x32 blocks, two 16x16 blocks 17 and 18, two 32x32 blocks 19 and 20, and two 32x16 blocks 21 and 22.

[0026] The 64x64 block 23 in the lower right is not divided.

[0027] As described above, in FIG. 2, the block 10 is divided into 13 variable-size 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 (quad-tree 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). The division including such ternary-tree block division is sometimes called MBT (multi type tree) division.

[0029] [Subtraction unit] The subtraction unit 104 subtracts the prediction signal (predicted sample) from the original signal (original sample) in units of the blocks divided by the division unit 102. That is, the subtraction unit 104 calculates the prediction error (also called the residual) of the block to be encoded (hereinafter referred to as the current block). Then, the subtraction unit 104 outputs the calculated prediction error to the conversion unit 106.

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

[0031] [Transformation unit] The transformation unit 106 transforms the prediction error in the spatial domain into transformation coefficients in the frequency domain, and outputs the transformation coefficients to the quantization unit 108. Specifically, the transformation 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] Note that the transformation unit 106 may adaptively select a transformation type from a plurality of transformation types, and transform the prediction error into transformation coefficients using a transform basis function corresponding to the selected transformation type. Such a transformation may be called EMT (explicit multiple core transform) or AMT (adaptive multiple transform).

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

[0034] Information indicating whether or not to apply such EMT or AMT (for example, called an AMT flag) and information indicating the selected transformation type are signaled at the CU level. Note that the signaling of this information does not have to be limited to the CU level, and may be at other levels (for example, sequence level, picture level, slice level, tile level, or CTU level).

[0035] Further, the conversion unit 106 may re-convert the conversion coefficient (conversion result). Such re-conversion may be referred to as AST (adaptive secondary transform) or NSST (non-separable secondary transform). For example, the conversion unit 106 performs re-conversion for each sub-block (e.g., 4x4 sub-block) included in the block of conversion coefficients corresponding to the intra prediction error. Information indicating whether to apply NSST and information regarding the conversion matrix used for NSST are signaled at the CU level. Note that the signaling of these pieces of information is not necessarily 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 transform is a method in which multiple conversions are performed separately for each direction by the number of dimensions of the input, and a non-separable transform is a method in which when the input is multi-dimensional, two or more dimensions are regarded as one dimension and the conversion is performed collectively.

[0037] For example, as an example of a non-separable transform, when the input is a 4×4 block, it is regarded as an array having 16 elements, and a conversion process is performed on the array with a 16×16 conversion matrix.

[0038] Similarly, after regarding a 4×4 input block as an array having 16 elements, a method in which a plurality of Givens rotations are performed on the array (Hypercube Givens Transform) is also an example of a non-separable transform.

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

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

[0041] The quantization parameter is a parameter that defines the quantization step (quantization width). For example, as the value of the quantization parameter increases, the quantization step also increases. That is, as the value of the quantization parameter increases, the quantization error increases.

[0042] [Entropy Encoding Unit] The entropy encoding unit 110 generates an encoded signal (encoded bit stream) by performing variable-length encoding on the quantization coefficients that are the input from the quantization unit 108. Specifically, the entropy encoding unit 110, for example, binarizes the quantization coefficients and performs arithmetic encoding on the binary signal.

[0043] [Inverse Quantization Unit] The inverse quantization unit 112 inverse-quantizes the quantization coefficients that are the input from the quantization unit 108. Specifically, the inverse quantization unit 112 inverse-quantizes the quantization coefficients of the current block in a predetermined scanning order. Then, the inverse quantization unit 112 outputs the inverse-quantized conversion coefficients of the current block to the inverse conversion unit 114.

[0044] [Inverse Conversion Unit] The inverse transform unit 114 restores the prediction error by inversely transforming the transform coefficients that are the input from the inverse quantization unit 112. Specifically, the inverse transform unit 114 performs an inverse transform corresponding to the transform by the transform unit 106 on the transform coefficients, thereby restoring the prediction error of the current block. Then, the inverse transform unit 114 outputs the restored prediction error to the addition unit 116.

[0045] Note that since information is lost due to quantization, the restored prediction error does not match the prediction error calculated by the subtraction unit 104. That is, the restored prediction error includes a quantization error.

[0046] [Addition unit] The addition unit 116 reconstructs the current block by adding the prediction error that is the input from the inverse transform unit 114 and the prediction sample that is the input from the prediction control unit 128. Then, the addition unit 116 outputs the reconstructed block to the block memory 118 and the loop filter unit 120. The reconstructed block may also be called a local decoding block.

[0047] [Block memory] The block memory 118 is a storage unit for storing blocks within the coded target picture (hereinafter referred to as the current picture), which are blocks referred to in intra prediction. Specifically, the block memory 118 stores the reconstructed block output from the addition unit 116.

[0048] [Loop filter unit] The loop filter unit 120 applies a loop filter to the block reconstructed by the addition unit 116 and outputs the filtered reconstructed block to the frame memory 122. The loop filter is a filter (in-loop filter) used within the coding 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-squares error filter for removing encoding distortion is applied. For example, for each 2x2 sub-block within a current block, one filter selected from a plurality of filters is applied based on the direction and activity of the local gradient.

[0050] Specifically, first, a sub-block (e.g., a 2x2 sub-block) is classified into a plurality of classes (e.g., 15 or 25 classes). The classification of the sub-block is performed based on the direction and activity of the gradient. For example, a classification value C (e.g., C = 5D + A) is calculated using the gradient direction value D (e.g., 0 to 2 or 0 to 4) and the gradient activity value A (e.g., 0 to 4). Then, based on the classification value C, the sub-block is classified into a plurality of classes (e.g., 15 or 25 classes).

[0051] The gradient direction value D is derived, for example, by comparing the gradients in a plurality of directions (e.g., horizontal, vertical, and two diagonal directions). Also, the gradient activity value A is derived, for example, by adding the gradients in a plurality of directions and quantizing the addition result.

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

[0053] As the shape of the filter used in ALF, for example, a circularly symmetric shape is utilized. FIGS. 4A to 4C are diagrams showing a plurality of examples of the shape of the filter used in ALF. FIG. 4A shows a 5x5 diamond-shaped filter, FIG. 4B shows a 7x7 diamond-shaped filter, and FIG. 4C shows a 9x9 diamond-shaped filter. The 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 is not necessarily limited to the picture level and may be at other levels (e.g., 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, for luminance, it is determined whether to apply ALF at the CU level, and for chrominance, it is determined whether to apply ALF at the picture level. The information indicating the on / off of ALF is signaled at the picture level or the CU level. Note that the signaling of the information indicating the on / off of ALF does not have to be limited to the picture level or the CU level, and it may be at other levels (e.g., sequence level, slice level, tile level, or CTU level).

[0055] The coefficient sets of a plurality of selectable filters (e.g., filters up to 15 or 25) are signaled at the picture level. Note that the signaling of the coefficient sets does not have to be limited to the picture level, and it 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 for inter prediction, and is sometimes called a frame buffer. Specifically, the frame memory 122 stores the reconstructed blocks filtered by the loop filter unit 120.

[0057] [Intra Prediction Unit] The intra prediction unit 124 generates a prediction signal (intra prediction signal) by performing intra prediction (also called in-picture prediction) of the current block with reference to the blocks 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 the samples (e.g., luminance values, chrominance values) of the 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 include 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, the Planar prediction mode and the DC prediction mode defined in the H.265 / HEVC (High-Efficiency Video Coding) standard (Non-Patent Document 1).

[0060] The plurality of directional prediction modes include, for example, the 33-direction prediction mode defined in the H.265 / HEVC standard. Note that the plurality of directional prediction modes may further include a 32-direction prediction mode (a total of 65 directional prediction modes) in addition to the 33 directions. 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 the intra prediction of the color difference block, a luminance block may be referred to. That is, based on the luminance component of the current block, the color difference component of the current block may be predicted. Such intra prediction is sometimes called CCLM (cross-component linear model) prediction. An intra prediction mode of a color difference block that refers to such a luminance block (for example, called the CCLM mode) may be added as one of the intra prediction modes of the color difference block.

[0062] The intra prediction unit 124 may correct the pixel value after intra prediction based on the gradient of reference pixels in the horizontal / vertical direction. Intra prediction with such correction is sometimes called PDPC (position dependent intra prediction combination). Information indicating the presence or absence of PDPC application (for example, called a PDPC flag) is signaled at, for example, the CU level. Note that the signaling of this information does not have to be limited to the CU level and may be at other levels (for example, sequence level, picture level, slice level, tile level, or CTU level).

[0063] [Inter prediction unit] The inter prediction unit 126 generates a prediction signal (inter prediction signal) by performing inter prediction (also called inter-picture prediction) of the current block with reference to a reference picture stored in the frame memory 122 and different from the current picture. Inter prediction is performed in units of the current block or sub-blocks (for example, 4x4 blocks) within the current block. For example, the inter prediction unit 126 performs motion estimation within the reference picture for the current block or sub-block. Then, the inter prediction unit 126 generates an inter prediction signal for the current block or sub-block by performing motion compensation using the motion information (for example, 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 motion compensation is signaled. A motion vector predictor may be used for the signaling of the motion vector. That is, the difference between the motion vector and the predicted motion vector may be signaled.

[0065] In addition to the motion information of the current block obtained by motion search, the motion information of adjacent blocks may also be used to generate an inter prediction signal. Specifically, an inter prediction signal may be generated for each sub-block in the current block by weighted addition of a prediction signal based on the motion information obtained by motion search and a prediction signal based on the motion information of adjacent blocks. Such inter prediction (motion compensation) is sometimes referred to as OBMC (overlapped block motion compensation).

[0066] In such an OBMC mode, information indicating the size of the sub-blocks for OBMC (for example, called OBMC block size) is signaled at the sequence level. Also, information indicating whether or not to apply the OBMC mode (for example, called OBMC flag) is signaled at the CU level. Note that the signaling levels of these pieces of information do not necessarily have to be limited to the sequence level and the CU level, and may be other levels (for example, picture level, slice level, tile level, CTU level, or sub-block level).

[0067] The OBMC mode will be described in more detail. FIGS. 5B and 5C are a flowchart and a conceptual diagram for explaining the outline of the prediction image correction process by OBMC processing.

[0068] First, a prediction image (Pred) by normal motion compensation is obtained using the motion vector (MV) assigned to the block to be coded.

[0069] Next, the motion vector (MV_L) of the encoded left adjacent block is applied to the block to be coded to obtain a prediction image (Pred_L), and the first correction of the prediction image is performed by weighting and superimposing the prediction image and Pred_L.

[0070] Similarly, the motion vector (MV_U) of the encoded upper adjacent block is applied to the block to be encoded to obtain a predicted image (Pred_U). The predicted image after the first correction and Pred_U are weighted and superimposed to perform the second correction of the predicted image, which is used as the final predicted image.

[0071] Here, a two-stage correction method using the left adjacent block and the upper adjacent block has been described. However, it is also possible to configure to perform more corrections than two stages using the right adjacent block or the lower adjacent block.

[0072] Note that the area for superposition may be only a partial area near the block boundary, rather than the pixel area of the entire block.

[0073] Here, the predicted image correction process from a single reference picture has been described. However, the same applies to the case of correcting the predicted image from multiple reference pictures. After obtaining the predicted images corrected from each reference picture, the obtained predicted images are further superimposed to obtain the final predicted image.

[0074] Note that the block to be processed may be in units of prediction blocks or in units of sub-blocks obtained by further dividing the prediction blocks.

[0075] As a method for determining whether to apply the OBMC process, for example, there is a method using an obmc_flag which is a signal indicating whether to apply the OBMC process. As a specific example, in an encoding device, it is determined whether the block to be encoded belongs to a region with complex motion. If it belongs to a region with complex motion, the value 1 is set as the obmc_flag and the OBMC process is applied for encoding. If it does not belong to a region with complex motion, the value 0 is set as the obmc_flag and encoding is performed without applying the OBMC process. On the other hand, in a decoding device, by decoding the obmc_flag described in the stream, decoding is performed by switching whether to apply the OBMC process according to the value.

[0076] Note that the motion information may be derived on the decoder side without being signaled. For example, the merge mode defined in the H.265 / HEVC standard may be used. Also, for example, the motion information may be derived by performing motion search on the decoder side. In this case, the motion search is performed without using the pixel values of the current block.

[0077] Here, the mode of performing motion search on the decoder side will be described. The mode of performing motion search on the decoder side may be called the PMMVD (pattern matched motion vector derivation) mode or the FRUC (frame rate up-conversion) mode.

[0078] An example of the FRUC process is shown in FIG. 5D. First, by referring to the motion vectors of the encoded blocks adjacent to the current block spatially or temporally, a list of a plurality of candidates (which may be common to the merge list) each having a predicted motion vector is generated. Next, the best candidate MV is selected from among the plurality of candidate MVs registered in the candidate list. For example, the 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, the motion vector for the current block is derived. Specifically, for example, the motion vector of the selected candidate (best candidate MV) is directly derived as the motion vector for the current block. Also, for example, by performing pattern matching in the peripheral region of the position in the reference picture corresponding to the motion vector of the selected candidate, the motion vector for the current block may be derived. That is, search is performed in the same way for the region around the best candidate MV, and if there is an MV with a better evaluation value, the best candidate MV may be updated to the MV, and that may be used as the final MV of the current block. Note that it is also possible to adopt a configuration in which the said process is not performed.

[0080] When performing processing in sub-block units, the same processing may be performed.

[0081] The evaluation value is calculated by obtaining the difference value of the reconstructed image through pattern matching between the region in the reference picture corresponding to the motion vector and a predetermined region. In addition to the difference value, other information may be used to calculate the evaluation value.

[0082] As the pattern matching, the first pattern matching or the second pattern matching is used. The first pattern matching and the second pattern matching may be 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, as the predetermined region for calculating the evaluation value of the candidate described above, the region in another reference picture along the motion trajectory of the current block is used.

[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 the most matching pair among pairs of two blocks in two different reference pictures (Ref0, Ref1) that are two blocks along the motion trajectory of the current block (Cur block). Specifically, for the current block, the difference between the reconstructed image at the specified position in the first encoded reference picture (Ref0) specified by the candidate MV and the reconstructed image at the specified position in the second encoded reference picture (Ref1) specified by the symmetric MV obtained by scaling the candidate MV by the display time interval is derived, and an evaluation value is calculated using the obtained difference value. It is advisable to select the candidate MV with the best evaluation value among the plurality of candidate MVs as the final MV.

[0085] Under the assumption of a continuous motion trajectory, the motion vectors (MV0, MV1) indicating the 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, when the current picture is temporally located between the two reference pictures and the temporal distances from the current picture to the two reference pictures are equal, in the first pattern matching, mirror-symmetric bidirectional motion vectors are derived.

[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., the 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 the predetermined region for calculating the evaluation value of the above-described 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, the motion vector of the current block is derived by searching in the reference picture (Ref0) for the block that most closely matches the block adjacent to the current block (Cur block) within the current picture (Cur Pic). Specifically, for the current block, the difference between the reconstructed image of the encoded region of both or either one of the left and upper adjacent blocks and the reconstructed image at the equivalent position in the encoded reference picture (Ref0) specified by the candidate MV is derived, an evaluation value is calculated using the obtained difference value, and the candidate MV with the best evaluation value among the plurality of candidate MVs is selected as the best candidate MV.

[0088] Information indicating whether or not to apply such a FRUC mode (for example, called a FRUC flag) is signaled at the CU level. Also, when the FRUC mode is applied (for example, when the FRUC flag is true), information indicating the pattern matching method (the first pattern matching or the second pattern matching) (for example, called a FRUC mode flag) is signaled at the CU level. Note that the signaling of this information does not necessarily have to be limited to the CU level and may be at other levels (for example, sequence level, picture level, slice level, tile level, CTU level, or sub-block level).

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

[0090] FIG. 8 is a diagram for explaining a model assuming uniform linear motion. In FIG. 8, (vx, vy) represents a velocity vector, and τ0 and τ1 respectively represent the temporal distances between the current picture (Cur Pic) and two reference pictures (Ref0, Ref1). (MVx0, MVy0) represents the motion vector corresponding to the reference picture Ref0, and (MVx1, MVy1) represents the motion vector corresponding to the reference picture Ref1.

[0091] At this time, under the assumption of uniform linear motion of the velocity vector (vx, vy), (MVx0, MVy0) and (MVx1, MVy1) are respectively represented as (vxτ0, vyτ0) and (-vxτ1, -vyτ1), and the following optical flow equation (1) holds.

[0092]

Equation

[0093] Here, I(k) represents the luminance value of the reference image k (k = 0, 1) after motion compensation. This optical flow equation indicates that the sum of (i) the temporal 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 the combination of this optical flow equation and Hermite interpolation, the motion vectors in block units obtained from the merge list or the like are corrected in pixel units.

[0094] Note that the motion vector may be derived on the decoder side by a method different from the derivation of the motion vector based on the model assuming uniform linear motion. For example, the motion vector may be derived in sub-block units based on the motion vectors of a plurality of adjacent blocks.

[0095] Here, a mode of deriving motion vectors in units of sub-blocks based on the motion vectors of a plurality of adjacent blocks will be described. This mode may be called an affine motion compensation prediction mode.

[0096] FIG. 9A is a diagram for explaining the derivation of motion vectors in units of sub-blocks based on the motion vectors of a plurality of adjacent blocks. In FIG. 9A, the current block includes 16 4x4 sub-blocks. Here, based on the motion vectors of the adjacent blocks, the motion vector v0 of the upper left control point of the current block is derived, and based on the motion vectors of the adjacent sub-blocks, the motion vector v1 of the upper right control point of the current block is derived. Then, using the two motion vectors v0 and v1, the motion vectors (vx, vy) of each sub-block within the current block are derived by the following equation (2).

[0097] [Equation]

[0098] Here, x and y indicate the horizontal position and vertical position of the sub-block, respectively, and w indicates a predetermined weight coefficient.

[0099] Such an affine motion compensation prediction mode may include several modes in which the methods for deriving the motion vectors of the upper left and upper right control points are different. Information indicating such an affine motion compensation prediction mode (for example, called an affine flag) is signaled at the CU level. Note that the signaling of the information indicating this affine motion compensation prediction mode does not have to be limited to the CU level, and may be at other levels (for example, sequence level, picture level, slice level, tile level, CTU level, or sub-block level).

[0100] [Prediction control unit] The prediction control unit 128 selects either an intra prediction signal or an inter prediction signal, and outputs the selected signal as a prediction signal to the subtraction unit 104 and the addition unit 116.

[0101] Here, an example of deriving the motion vector of the picture to be coded in the merge mode will be described. FIG. 9B is a diagram for explaining the outline of the motion vector derivation process in the merge mode.

[0102] First, a prediction MV list in which candidates for the prediction MV are registered is generated. As candidates for the prediction MV, there are a spatial adjacent prediction MV which is the MV of a plurality of coded blocks located spatially adjacent to the block to be coded, a temporal adjacent prediction MV which is the MV of a nearby block obtained by projecting the position of the block to be coded in the coded reference picture, a combined prediction MV which is an MV generated by combining the MV values of the spatial adjacent prediction MV and the temporal adjacent prediction MV, and a zero prediction MV whose value is zero, and the like.

[0103] Next, one prediction MV is selected from among the plurality of prediction MVs registered in the prediction MV list, and is determined as the MV of the block to be coded.

[0104] Furthermore, in the variable length coding unit, a merge_idx which is a signal indicating which prediction MV has been selected is described in the stream and coded.

[0105] Note that the prediction MVs registered in the prediction MV list described in FIG. 9B are just an example, and the number may be different from that in the figure, the configuration may not include some of the types of prediction MVs in the figure, or the configuration may include prediction MVs other than the types of prediction MVs in the figure.

[0106] Note that the final MV may be determined by performing the DMVR process 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 the outline of DMVR processing.

[0109] First, using the optimal MVP set for the processing target block as a candidate MV, according to the candidate MV, reference pixels are respectively obtained from the first reference picture which is the processed picture in the L0 direction and the second reference picture which is the processed picture in the L1 direction, and a template is generated by taking the average of each reference pixel.

[0110] Next, using the template, the peripheral areas of the candidate MVs of the first reference picture and the second reference picture are respectively searched, and the MV with the minimum cost is determined as the final MV. Note that 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] Note that in the encoding device and the decoding device, the outline of the processing described here is basically common.

[0112] Note that even if it is not the processing itself described here, other processing may be used as long as it is a processing that can search the periphery of the candidate MV to derive the final MV.

[0113] Here, the mode of generating a predicted image using the LIC processing will be described.

[0114] FIG. 9D is a diagram for explaining the outline of a predicted image generation method using the luminance correction processing by the LIC processing.

[0115] First, an MV for obtaining a reference image corresponding to the block to be encoded is derived from the reference picture which is the encoded picture.

[0116] Next, for the block to be encoded, information indicating how the luminance values change between the reference picture and the picture to be encoded is extracted using the luminance pixel values of the left and upper adjacent encoded peripheral reference regions and the luminance pixel values at the equivalent positions in the reference picture specified by the MV, and the luminance correction parameter is calculated.

[0117] By performing luminance correction processing on the reference image in the reference picture specified by the MV using the luminance correction parameter, a predicted image for the block to be encoded is generated.

[0118] Note that the shape of the peripheral reference region in FIG. 9D is an example, and other shapes may be used.

[0119] Also, although the process of generating a predicted image from one reference picture has been described here, the same applies when generating a predicted image from a plurality of reference pictures. After performing luminance correction processing on the reference images obtained from each reference picture in the same manner, a predicted image is generated.

[0120] As a method for determining whether to apply the LIC process, for example, there is a method of using lic_flag, which is a signal indicating whether to apply the LIC process. As a specific example, in the encoding device, it is determined whether the block to be encoded belongs to a region where a luminance change has occurred. If it belongs to a region where a luminance change has occurred, the value 1 is set as lic_flag and encoding is performed by applying the LIC process. If it does not belong to a region where a luminance change has occurred, the value 0 is set as lic_flag and encoding is performed without applying the LIC process. On the other hand, in the decoding device, by decoding the lic_flag described in the stream, decoding is performed by switching whether to apply the LIC process according to the value.

[0121] As another method for determining whether to apply LIC processing, for example, there is also a method of determining according to whether LIC processing is applied to peripheral blocks. As a specific example, when the block to be encoded is in merge mode, it is determined whether the selected peripheral encoded block in the derivation of the MV in the merge mode process was encoded by applying LIC processing, and encoding is performed by switching whether to apply LIC processing according to the result. Note that in the case of this example, the processing in decoding is exactly the same.

[0122] [Outline of Decoder] Next, an outline of a decoder capable of decoding the encoded signal (encoded bit stream) output from the above-described encoder 100 will be described. FIG. 10 is a block diagram showing the functional configuration of a decoder 200 according to Embodiment 1. The decoder 200 is a moving image / image decoder that decodes moving images / images in units of blocks.

[0123] As shown in FIG. 10, the decoder 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 decoder 200 is realized by, for example, a general-purpose processor and a memory. In this case, when a 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. Further, the decoder 200 may 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 decoder 200 will be described below.

[0126] [Entropy Decoding Unit] The entropy decoding unit 202 entropy-decodes the encoded bit stream. Specifically, the entropy decoding unit 202, for example, arithmetically decodes the encoded bit stream into a binary signal. Then, the entropy decoding unit 202 de-binarizes the binary signal. As a result, the entropy decoding unit 202 outputs quantization coefficients in block units to the inverse quantization unit 204.

[0127] [Inverse Quantization Unit] The inverse quantization unit 204 inverse-quantizes the quantization coefficients of the block to be decoded (hereinafter referred to as the current block), which is the input from the entropy decoding unit 202. Specifically, for each quantization coefficient of the current block, the inverse quantization unit 204 inverse-quantizes the quantization coefficient based on the quantization parameter corresponding to the quantization coefficient. Then, the inverse quantization unit 204 outputs the inverse-quantized quantization coefficients (i.e., transform coefficients) of the current block to the inverse transform unit 206.

[0128] [Inverse Transform Unit] The inverse transform unit 206 restores the prediction error by inverse-transforming the transform coefficients that are the input from the inverse quantization unit 204.

[0129] For example, when the information decoded from the encoded bit stream indicates that EMT or AMT is to be applied (for example, the AMT flag is true), the inverse transform unit 206 inverse-transforms the transform coefficients of the current block based on the information indicating the decoded transform type.

[0130] Also, for example, when the information decoded from the encoded bit stream indicates that NSST is to be applied, the inverse transform unit 206 applies inverse reverse transformation to the transform coefficients.

[0131] [Addition Unit] The adder 208 reconstructs the current block by adding the prediction error, which is the input from the inverse transform unit 206, and the prediction sample, which is the input from the predictive control unit 220. Then, the adder 208 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 within the decoded target picture (hereinafter referred to as the current picture), which are blocks referenced in intra prediction. Specifically, the block memory 210 stores the reconstructed block output from the adder 208.

[0133] [Loop Filter Unit] The loop filter unit 212 applies a loop filter to the block reconstructed by the adder 208 and outputs the filtered reconstructed block to the frame memory 214 and a display device, etc.

[0134] When the information indicating the on / off of the ALF read from the encoded bitstream indicates that the ALF is on, one filter is selected from a plurality of 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 is sometimes called a frame buffer. Specifically, the frame memory 214 stores the reconstructed block filtered by the loop filter unit 212.

[0136] [Intra Prediction Unit] The intra prediction unit 216 generates a prediction signal (intra prediction signal) by performing intra prediction with reference to a block within the current picture stored in the block memory 210 based on the intra prediction mode decoded from the encoded bitstream. Specifically, the intra prediction unit 216 generates an intra prediction signal by performing intra prediction with reference to samples (e.g., luminance values, chrominance difference 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 refers to a luminance block in the 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] Also, when the information decoded from the encoded bitstream indicates the application of PDPC, the intra prediction unit 216 corrects the pixel value after intra prediction based on the gradients of the reference pixels in the horizontal / vertical directions.

[0139] [Inter prediction unit] The inter prediction unit 218 predicts the current block with reference to the reference pictures stored in the frame memory 214. The prediction is performed in units of the current block or sub-blocks (e.g., 4x4 blocks) within the current block. For example, the inter prediction unit 218 generates an inter prediction signal for the current block or sub-block by performing motion compensation using the motion information (e.g., motion vector) decoded from the encoded bitstream, and outputs the inter prediction signal to the prediction control unit 220.

[0140] Note that when the information decoded from the encoded bitstream indicates the application of the OBMC mode, 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, when the information decoded from the encoded bitstream indicates that the FRUC mode is applicable, the inter prediction unit 218 derives motion information by performing motion search according to the pattern matching method (bilateral matching or template matching) decoded from the encoded stream. Then, the inter prediction unit 218 performs motion compensation using the derived motion information.

[0142] In addition, when the BIO mode is applicable, the inter prediction unit 218 derives a motion vector based on a model assuming uniform linear motion. Also, when the information decoded from the encoded bitstream indicates that the affine motion compensation prediction mode is applicable, the inter prediction unit 218 derives a motion vector in sub-block units based on the motion vectors of a plurality of adjacent blocks.

[0143] [Prediction control unit] The prediction control unit 220 selects either the intra prediction signal or the inter prediction signal, and outputs the selected signal as a prediction signal to the addition unit 208.

[0144] (Embodiment 2) Next, Embodiment 2 will be described. This embodiment relates to inter prediction in the so-called BIO mode. In this embodiment, it is different from Embodiment 1 in that the motion vector in block units is corrected in sub-block units instead of pixel units. Hereinafter, this embodiment will be described centering on the differences from Embodiment 1.

[0145] Note that since the configurations of the encoding device and the decoding device according to this embodiment are substantially the same as those of Embodiment 1, the illustration and description thereof are omitted.

[0146] [Inter prediction] FIG. 11 is a flowchart showing inter prediction in Embodiment 2. FIG. 12 is a conceptual diagram for explaining inter prediction in Embodiment 2. The following processing is performed by the inter prediction unit 126 of the encoding device 100 or the inter prediction unit 218 of the decoding device 200.

[0147] As shown in FIG. 11, first, loop processing is performed on a plurality of blocks in the encoding / decoding target picture (current picture 1000) in block units (S101 to S111). In FIG. 12, an encoding / decoding target block is selected as the current block 1001 from among the plurality of blocks.

[0148] In the loop processing in block units, loop processing is performed on the first reference picture 1100 (L0) and the second reference picture 1200 (L1), which are processed pictures, in reference picture units (S102 to S106).

[0149] In the loop processing in reference picture units, first, a motion vector in block units for obtaining a predicted image from the reference picture is derived or obtained (S103). In FIG. 12, a first motion vector 1110 (MV_L0) is derived or obtained for the first reference picture 1100, and a second motion vector 1210 (MV_L1) is derived or obtained for the second reference picture 1200. As methods for deriving the motion vector, there are a normal inter prediction mode, a merge mode, a FRUC mode, etc. For example, in the case of the normal inter prediction mode, the encoding device 100 derives the motion vector by motion search, and the decoding device 200 obtains the motion vector from the bit stream.

[0150] Next, motion compensation is performed using the derived or obtained motion vector to obtain a predicted image from the reference picture (S104). In FIG. 12, the first predicted image 1140 is obtained from the first reference picture 1100 by performing motion compensation using the first motion vector 1110. Also, the second predicted image 1240 is obtained from the second reference picture 1200 by performing motion compensation using the second motion vector 1210.

[0151] In motion compensation, a motion compensation filter is applied to a reference picture. The motion compensation filter is an interpolation filter for obtaining a predicted picture with sub-pixel accuracy. In the first reference picture 1100 of FIG. 12, pixels in a first interpolation reference range 1130 including the pixels of the first prediction block 1120 and the pixels around it are referred to by the motion compensation filter for the first prediction block 1120 specified by the first motion vector 1110. Also, in the second reference picture 1200, pixels in a second interpolation reference range 1230 including the pixels of the second prediction block 1220 and the pixels around it are referred to by the motion compensation filter for the second prediction block 1220 specified by the second motion vector 1210.

[0152] Note that the first interpolation reference range 1130 and the second interpolation reference range 1230 are included in a first normal reference range and a second normal reference range that are referred to for motion compensation of the current block 1001 in normal inter prediction that does not perform processing using local motion estimation values. The first normal reference range is included in the first reference picture 1100, and the second normal reference range is included in the second reference picture 1200. In normal inter prediction, for example, a motion vector is derived in block units by motion search, motion compensation is performed in block units using the derived motion vector, and the motion-compensated image is adopted as the final predicted image as it is. That is, in normal inter prediction, local motion estimation values are not used. Note that the first interpolation reference range 1130 and the second interpolation reference range 1230 may coincide with the first normal reference range and the second normal reference range.

[0153] Subsequently, a gradient image corresponding to the predicted image is obtained from the reference picture (S105). Each pixel of the gradient image has a gradient value indicating the spatial gradient of luminance or color difference. The gradient value is obtained by applying a gradient filter to the reference picture. In the first reference picture 1100 of FIG. 12, pixels in the first gradient reference range 1135 including the pixels of the first prediction block 1120 and the pixels around it are referred to by the gradient filter for the first prediction block 1120. This first gradient reference range 1135 is included in the first interpolation reference range 1130. Also, in the second reference picture 1200, the gradient filter refers to the pixels in the second gradient reference range 1235 including the pixels of the second prediction block 1220 and the pixels around it. This second gradient reference range 1235 is included in the second interpolation reference range 1230.

[0154] If the acquisition of the predicted image and the gradient image from each of the first reference picture and the second reference picture is completed, the loop process for each reference picture is completed (S106). Thereafter, a loop process is performed in units of sub-blocks obtained by further dividing the blocks (S107 to S110). Each of the plurality of sub-blocks has a size smaller than that of the current block (for example, 4x4 pixel size).

[0155] In the loop process in units of sub-blocks, first, a local motion estimation value 1300 of the sub-block is derived using the first predicted image 1140 and the second predicted image 1240, and the first gradient image 1150 and the second gradient image 1250 obtained from the first reference picture 1100 and the second reference picture 1200 (S108). For example, in each of the first predicted image 1140 and the second predicted image 1240, and the first gradient image 1150 and the second gradient image 1250, one local motion estimation value 1300 is derived for the sub-block by referring to the pixels included in the predicted sub-block. The predicted sub-block is an area in the first prediction block 1120 and the second prediction block 1220 corresponding to the sub-block in the current block 1001. The local motion estimation value may also be called a corrected motion vector.

[0156] Subsequently, using the pixel values of the first predicted image 1140 and the second predicted image 1240, the gradient values of the first gradient image 1150 and the second gradient image 1250, and the local motion estimation value 1300, a final predicted image 1400 of the sub-block is generated (S109). When the generation of the final predicted image is completed for each of the sub-blocks included in the current block, the final predicted image of the current block is generated, and the loop process in units of sub-blocks ends (S110).

[0157] Furthermore, when the loop process in units of blocks ends (S111), the process of FIG. 11 ends.

[0158] Note that it is also possible to obtain the predicted image and the gradient image in units of sub-blocks by directly assigning the motion vector in units of blocks of the current block to each of the sub-blocks.

[0159] [Reference Range of Motion Compensation Filter and Gradient Filter] Here, the reference ranges of the motion compensation filter and the gradient filter will be described.

[0160] FIG. 13 is a conceptual diagram for explaining an example of the reference ranges of the motion compensation filter and the gradient filter in Embodiment 2.

[0161] In FIG. 13, each of the plurality of circles represents a pixel. Also, in FIG. 13, as an example, the size of the current block is 8x8 pixels, and the size of the sub-block is 4x4 pixels.

[0162] The reference range 1131 indicates the reference range (a rectangular range of 8x8 pixels as an example) of the motion compensation filter applied to the upper left pixel 1122 of the first predicted block 1120. The reference range 1231 indicates the reference range (a rectangular range of 8x8 pixels as an example) of the motion compensation filter applied to the upper left pixel 1222 of the second predicted block 1220.

[0163] Further, the reference range 1132 indicates the reference range of the gradient filter (e.g., a rectangular range of 6x6 pixels) applied to the upper left pixel 1122 of the first prediction block 1120. The reference range 1232 indicates the reference range of the gradient filter (e.g., a rectangular range of 6x6 pixels) applied to the upper left pixel 1222 of the second prediction block 1220.

[0164] For other pixels within the first prediction block 1120 and the second prediction block 1220, the motion compensation filter and the gradient filter are applied while referring to the pixels in the reference range of the same size at the position corresponding to the position of each pixel. As a result, in order to obtain the first prediction image 1140 and the second prediction image 1240, the pixels in the first interpolation reference range 1130 and the second interpolation reference range 1230 are referred to. Also, in order to obtain the first gradient image 1150 and the second gradient image 1250, the pixels in the first gradient reference range 1135 and the second gradient reference range 1235 are referred to.

[0165] [Effects, etc.] As described above, according to the encoding device and the decoding device according to the present embodiment, a local motion estimation value can be derived in units of sub-blocks. Therefore, while reducing the prediction error using the local motion estimation value in units of sub-blocks, the processing load or processing time can be reduced compared to the case of deriving the local motion estimation value in units of pixels.

[0166] Also, according to the encoding device and the decoding device according to the present embodiment, the interpolation reference range can be included in the normal reference range. Therefore, in generating the final prediction image using the local motion estimation value in units of sub-blocks, it is not necessary to load new pixel data from the frame memory for motion compensation, and an increase in memory capacity and memory bandwidth can be suppressed.

[0167] Also, according to the encoding device and the decoding device according to the present embodiment, the gradient reference range can be included in the interpolation reference range. Therefore, it is not necessary to load new pixel data from the frame memory for obtaining the gradient image, and an increase in memory capacity and memory bandwidth can be suppressed.

[0168] This aspect may be implemented in combination with at least a part of other aspects in the present disclosure. Also, some processes described in the flowchart of this aspect, some configurations of the apparatus, some syntax, etc. may be implemented in combination with other aspects.

[0169] (Modification Example 1 of Embodiment 2) Next, modification examples of the motion compensation filter and the gradient filter will be specifically described with reference to the drawings. In the following Modification Example 1, since the processing related to the second predicted image is similar to the processing related to the first predicted image, the description will be appropriately omitted or simplified as appropriate.

[0170] [Motion Compensation Filter] First, the motion compensation filter will be described. FIG. 14 is a conceptual diagram for explaining an example of the reference range of the motion compensation filter in Modification Example 1 of Embodiment 2.

[0171] Here, the case where a motion compensation filter with 1 / 4 pixel in the horizontal direction and 1 / 2 pixel in the vertical direction is applied to the first prediction block 1120 will be described as an example. The motion compensation filter is a so-called 8-tap filter and is represented by the following equation (3).

[0172] [Equation]]

[0173] Here, Ik[x,y] represents the pixel value of the first predicted image with sub-pixel accuracy when k = 0, and the pixel value of the second predicted image with sub-pixel accuracy when k = 1. The pixel value is the value that a pixel has, and in the predicted image, for example, it is a luminance value or a color difference value, etc. w0.25 and w0.5 represent the weight coefficients with 1 / 4 pixel accuracy and 1 / 2 pixel accuracy. I0k[x,y] represents the pixel value of the first predicted image with integer pixel accuracy when k = 0, and the pixel value of the second predicted image with integer pixel accuracy when k = 1.

[0174] For example, when the motion compensation filter of Equation (3) is applied to the upper left pixel 1122 in FIG. 14, the values of the pixels arranged horizontally within the reference range 1131A are weighted and added row by row, and the addition results of the plurality of rows are further weighted and added.

[0175] Thus, in this modification example, the motion compensation filter for the upper left pixel 1122 refers to the pixels in the reference range 1131A. The reference range 1131A is a rectangular range of 3 pixels to the left, 4 pixels to the right, 3 pixels above, and 4 pixels below from the upper left pixel 1122.

[0176] Such a motion compensation filter is applied to all the pixels in the first prediction block 1120. Therefore, in the motion compensation filter for the first prediction block 1120, the pixels in the first interpolation reference range 1130A are referred to.

[0177] A motion compensation filter is applied to the second prediction block 1220 in the same manner as to the first prediction block 1120. That is, the pixels in the reference range 1231A are referred to for the upper left pixel 1222, and the pixels in the second interpolation reference range 1230A are referred to for the entire second prediction block 1220.

[0178] [Gradient Filter] Next, the gradient filter will be described. FIG. 15 is a conceptual diagram for explaining an example of the reference range of the gradient filter in Modification Example 1 of Embodiment 2.

[0179] The gradient filter in this modification example is a so-called 5-tap filter and is represented by the following Equations (4) and (5).

[0180] [Equation]]

[0181] [Equation]]

[0182] Here, Ixk[x,y] represents the horizontal gradient value of each pixel in the first gradient image when k is 0, and represents the horizontal gradient value of each pixel in the second gradient image when k is 1. Iyk[x,y] represents the vertical gradient value of each pixel in the first gradient image when k is 0, and represents the vertical gradient value of each pixel in the second gradient image when k is 1. w represents a weight coefficient.

[0183] For example, when the gradient filters of formulas (4) and (5) are applied to the upper left pixel 1122 in FIG. 15, the horizontal gradient value is calculated by weighted addition of the pixel values of 5 pixels arranged horizontally including the upper left pixel 1122, which are the pixel values of the prediction image with integer pixel accuracy. Also, the vertical gradient value is calculated by weighted addition of the pixel values of 5 pixels arranged vertically including the upper left pixel 1122, which are the pixel values of the prediction image with integer pixel accuracy. At this time, the weight coefficient has values with opposite signs for the pixels above and below or to the left and right with the upper left pixel 1122 as the symmetry point.

[0184] Thus, in this modification example, the gradient filter for the upper left pixel 1122 refers to the pixels in the reference range 1132A. The reference range 1132A has a cross shape extending 2 pixels up, down, left, and right from the upper left pixel 1122.

[0185] Such a gradient filter is applied to all the pixels within the first prediction block 1120. Therefore, in the motion compensation filter for the first prediction block 1120, the pixels in the first gradient reference range 1135A are referred to.

[0186] The gradient filter is applied to the second prediction block 1220 in the same manner as the first prediction block 1120. That is, the pixels in the reference range 1232A are referred to for the upper left pixel 1222, and the pixels in the second gradient reference range 1235A are referred to for the entire second prediction block 1220.

[0187] In addition, when the motion vector specifying the reference range indicates a fractional pixel position, the pixel values of the reference ranges 1132A and 1232A of the gradient filter may be converted into pixel values with fractional pixel accuracy, and the gradient filter may be applied to the converted pixel values. Alternatively, a gradient filter having, as a coefficient value, a value obtained by convolving a coefficient value for conversion into fractional pixel accuracy and a coefficient value for deriving a gradient value may be applied to pixel values with integer pixel accuracy. In this case, the gradient filter varies for each fractional pixel position.

[0188] [Derivation of local motion estimation value in sub-block unit] Next, the derivation of the local motion estimation value in sub-block unit will be described. Specifically, the derivation of the local motion estimation value of the upper left sub-block among a plurality of sub-blocks included in the current block will be described as an example.

[0189] In this modification example, based on the following formula (6), the horizontal local motion estimation value u and the vertical local motion estimation value v of the sub-block are derived.

[0190]

Equation

[0191] Here, sGxGy, sGx2, sGy2, sGxdI, and sGydI are values calculated in sub-block units, and are calculated based on the following formulas (7), respectively.

[0192]

Equation

[0193] Here, Ω is the set of coordinates of all pixels included in a prediction sub-block, which is a region corresponding to a sub-block within a prediction block. Gx[i, j] represents the sum of the horizontal gradient value of the first gradient image and the horizontal gradient value of the second gradient image, and Gy[i, j] represents the sum of the vertical gradient value of the first gradient image and the vertical gradient value of the second gradient image. △I[i, j] represents the difference value between the first prediction image and the second prediction image. w[i, j] represents a weight coefficient that depends on the pixel position within the prediction sub-block. For example, a weight coefficient with the same value for all pixels within the prediction sub-block may be used.

[0194] Specifically, Gx[i, j], Gy[i, j], and △I[i, j] are represented by the following formula (8).

[0195]

Equation

[0196] As described above, the local motion estimation value is calculated in units of sub-blocks.

[0197] [Generation of the final prediction image] Next, the generation of the final prediction image will be described. Each pixel value p[x, y] of the final prediction image is calculated based on the following formula (9) using the pixel value I0[x, y] of the first prediction image and the pixel value I1[x, y] of the second prediction image.

[0198]

Equation

[0199] Here, b[x, y] represents the correction value for each pixel. In formula (9), each pixel value p[x, y] of the final prediction image is calculated by right-shifting by 1 bit the sum of the pixel value I0[x, y] of the first prediction image, the pixel value I1[x, y] of the second prediction image, and the correction value b[x, y]. Note that the correction value b[x, y] is represented by the following formula (10).

[0200]

Equation

[0201] In Equation (10), the correction value b[x, y] is calculated by adding the result of multiplying the difference value (Ix0[x, y] - Ix1[x, y]) of the horizontal gradient values between the first gradient image and the second gradient image by the horizontal local motion estimation value (u) and the result of multiplying the difference value (Iy0[x, y] - Iy1[x, y]) of the vertical gradient values between the first gradient image and the second gradient image by the vertical local motion estimation value (v).

[0202] Note that the arithmetic expressions described using Equations (6) to (10) are just examples, and even an arithmetic expression different from these may be used as long as it has the same effect.

[0203] [Effects, etc.] As described above, even when using the motion compensation filter and the gradient filter according to this modification example, the local motion estimation value can be derived in units of sub-blocks. If the final predicted image of the current block is generated using the local motion estimation value in units of sub-blocks derived in this way, the same effects as those in the above-described Embodiment 2 can be obtained.

[0204] This aspect may be implemented in combination with at least a part of other aspects in the present disclosure. Also, a part of the processing described in the flowchart of this aspect, a part of the configuration of the apparatus, a part of the syntax, etc. may be implemented in combination with other aspects.

[0205] (Modification Example 2 of Embodiment 2) In the above-described Embodiment 2 and its Modification Example 1, in the derivation of the local motion estimation value, all the pixels included in the predicted sub-block in the predicted block corresponding to the sub-block in the current block were referred to, but it is not limited to this. For example, only a part of the pixels among the plurality of pixels included in the predicted sub-block may be referred to.

[0206] Therefore, in this modified example, a case where only some of the pixels among the plurality of pixels included in the prediction sub-block are referred to in deriving the local motion estimation value in sub-block units will be described. For example, in Equation (7) of the above-described modified example 1, instead of Ω which is a set of the coordinates of all the pixels included in the prediction sub-block, a set of the coordinates of some of the pixels within the prediction sub-block is used. As the set of the coordinates of some of the pixels within the prediction sub-block, various patterns can be used.

[0207] FIG. 16 is a diagram showing an example of a pixel pattern referred to in deriving the local motion estimation value in Modified Example 2 of Embodiment 2. In FIG. 16, the hatched circles within the prediction sub-blocks 1121 or 1221 indicate the pixels to be referred to, and the non-hatched circles indicate the pixels not to be referred to.

[0208] Each of the seven pixel patterns in FIGS. 16(a) to (g) indicates some of the plurality of pixels included in the prediction sub-block 1121 or 1221. Further, the seven pixel patterns are different from each other.

[0209] In FIGS. 16(a) to (c), only 8 out of the 16 pixels included in the prediction sub-block 1121 or 1221 are referred to. Also, in FIGS. 16(d) to (g), only 4 out of the 16 pixels included in the prediction sub-block 1121 or 1221 are referred to. That is, in FIGS. 16(a) to (c), 8 out of 16 pixels are thinned out, and in FIGS. 16(d) to (g), 12 out of 16 pixels are thinned out.

[0210] More specifically, in FIG. 16(a), 8 pixels arranged with a 1-pixel shift in the horizontal / vertical directions with respect to each other are referred to. In FIG. 16(b), the left pair and the right pair of 2 pixels arranged in the horizontal direction are alternately referred to in the vertical direction. In FIG. 16(c), the central 4 pixels and the four corner 4 pixels within the prediction sub-block 1121 or 1221 are referred to.

[0211] In addition, in FIGS. 16(d) and (e), the pixels in the first column and the third column from the left are each referenced by two pixels. In FIG. 16(f), the four corner pixels are referenced. In FIG. 16(g), the four central pixels are referenced.

[0212] From among such a plurality of predetermined pixel patterns, a pixel pattern may be adaptively selected based on two prediction images. For example, a pixel pattern including a number of pixels corresponding to the representative gradient values of the two prediction images may be selected. Specifically, when the representative gradient value is smaller than a threshold value, a pixel pattern including four pixels (for example, any one of (d) to (g)) may be selected, and when not, a pixel pattern including eight pixels (for example, any one of (a) to (c)) may be selected.

[0213] When a pixel pattern is selected from among a plurality of pixel patterns, a local motion estimation value of the sub-block is derived by referring to the pixels within the prediction sub-block indicated by the selected pixel pattern.

[0214] Note that information indicating the selected pixel pattern may be written into a bit stream. In this case, the decoding device may acquire the information from the bit stream and select a pixel pattern based on the acquired information. Information indicating the selected pixel pattern can be written, for example, in a header in units of blocks, slices, pictures, or streams.

[0215] As described above, according to the encoding device and the decoding device according to the present embodiment, a local motion estimation value can be derived in units of sub-blocks by referring to only some of the plurality of pixels included in the prediction sub-block. Therefore, the processing load or the processing time can be reduced as compared with the case where all of the plurality of pixels are referenced.

[0216] Further, according to the encoding device and the decoding device according to the present embodiment, local motion estimation values can be derived in sub-block units by referring only to the pixels included in the pixel pattern selected from among a plurality of pixel patterns. Therefore, by switching the pixel pattern, it becomes possible to refer to pixels suitable for deriving the local motion estimation value of the sub-block, and it is possible to reduce the prediction error.

[0217] This aspect may be implemented in combination with at least a part of other aspects in the present disclosure. Further, a part of the processing described in the flowchart of this aspect, a part of the configuration of the device, a part of the syntax, etc. may be implemented in combination with other aspects.

[0218] (Another modification of Embodiment 2) As described above, the encoding device and the decoding device according to one or more aspects of the present disclosure have been described based on the embodiments and their modifications. However, the present disclosure is not limited to these embodiments and their modifications. As long as the gist of the present disclosure is not deviated from, various modifications conceived by those skilled in the art applied to this embodiment or its modifications may also be included within the scope of one or more aspects of the present disclosure.

[0219] For example, in the above-described Embodiment 2 and its modification 1, the number of taps of the motion compensation filter was 8 pixels, but it is not limited to this. The number of taps of the motion compensation filter may be other numbers as long as the interpolation reference range is included in the normal reference range.

[0220] In the above-described Embodiment 2 and its modification 1, the number of taps of the gradient filter was 6 pixels or 5 pixels, but it is not limited to this. The number of taps may be other numbers as long as the gradient reference range is included in the interpolation reference range.

[0221] In the above-described Second Embodiment and Modification Example 1 thereof, the first gradient reference range and the second gradient reference range were included in the first interpolation reference range and the second interpolation reference range, but the present invention is not limited thereto. For example, the first gradient reference range may coincide with the first interpolation reference range, and the second gradient reference range may coincide with the second interpolation reference range.

[0222] Note that when deriving the local motion estimation value in units of sub-blocks, weights may be assigned to the pixel values so that the value of the pixel at the center of the predicted sub-block is more preferentially reflected. That is, in the derivation of the local motion estimation value, in each of the first prediction block and the second prediction block, the values of a plurality of pixels included in the predicted sub-block may be weighted and used. In that case, the pixel located at the center of the predicted sub-block among the plurality of pixels may have a larger weight. More specifically, for example, in Modification Example 1 of the Second Embodiment, the weight coefficient w[i,j] in Expression (7) may have a larger value as the coordinate value is closer to the center of the predicted sub-block.

[0223] Note that when deriving the local motion estimation value in units of sub-blocks, pixels in other adjacent predicted sub-blocks belonging to the same prediction block may also be referred to. That is, in each of the first prediction block and the second prediction block, in addition to the plurality of pixels included in the predicted sub-block, pixels included in other predicted sub-blocks adjacent to the predicted sub-block within the prediction block are referred to, and the local motion estimation value in units of sub-blocks may be derived.

[0224] Note that the reference ranges of the motion compensation filter and the gradient filter in the above-described Second Embodiment and Modification Example 1 thereof are examples, and it is not necessary to be limited thereto.

[0225] Note that in Modification Example 2 of the above-described Second Embodiment, seven pixel patterns were exemplified, but the present invention is not limited thereto. For example, pixel patterns obtained by rotating each of the seven pixel patterns may be used.

[0226] Note that the values of the weight coefficients in Modification 1 of Embodiment 2 above are merely examples and are not limited thereto. Also, the block size and sub-block size in Embodiment 2 and its respective modifications above are merely examples and are not limited to an 8x8 pixel size and a 4x4 pixel size. Inter-prediction can be performed in the same manner as in Embodiment 2 and its respective modifications even with other sizes.

[0227] This aspect may be implemented in combination with at least a part of other aspects in the present disclosure. Also, a part of the processing described in the flowchart of this aspect, a part of the configuration of the apparatus, a part of the syntax, etc. may be implemented in combination with other aspects.

[0228] (Embodiment 3) In each of the above embodiments, each of the functional blocks can usually be realized by an MPU, a memory, etc. Also, the processing by each of the functional blocks is usually realized by a program execution unit such as a processor reading and executing software (program) recorded on a recording medium such as a ROM. The software may be distributed by download or the like, or may be recorded on a recording medium such as a semiconductor memory and distributed. Of course, it is also possible to realize each functional block by hardware (a dedicated circuit).

[0229] Also, the processing described in each embodiment may be realized by centralized processing using a single device (system), or may be realized by distributed processing using a plurality of devices. Also, the processor that executes the above program may be singular or plural. That is, centralized processing or distributed processing may be performed.

[0230] Aspects of the present disclosure are not limited to the above embodiments, and various modifications are possible, and these are also included within the scope of the aspects of the present disclosure.

[0231] Furthermore, here, application examples of the moving image encoding method (image encoding method) or the moving image 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 including an image encoding device using the image encoding method, an image decoding device using the image decoding method, and an image encoding / decoding device including both. Other configurations in the system can be appropriately changed as needed.

[0232] [Usage Example] FIG. 17 is a diagram showing the overall configuration of a content supply system ex100 that realizes a content distribution service. The communication service providing area is divided into a desired size, and base stations ex106, ex107, ex108, ex109, and ex110, which are fixed wireless stations, are installed in each cell.

[0233] 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 connected by combining any of the above elements. The devices may be directly or indirectly connected to each other via a telephone network or short-range wireless without going through the base stations ex106 to ex110, which are fixed wireless stations. Also, the streaming server ex103 is connected to devices such as a computer ex111, a game machine ex112, a camera ex113, a home appliance ex114, and a smartphone ex115 via the Internet ex101 or the like. Further, the streaming server ex103 is connected to terminals within a hotspot in an airplane ex117 via a satellite ex116.

[0234] Note that instead of the base stations ex106 to ex110, a wireless access point, a hot spot, or the like may be used. Also, 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 the airplane ex117 without going through the satellite ex116.

[0235] The camera ex113 is a device capable of taking still images and videos such as a digital camera. Also, the smartphone ex115 is generally a smartphone device, a mobile phone, or a PHS (Personal Handyphone System) or the like that supports the mobile communication system standards generally called 2G, 3G, 3.9G, 4G, and in the future 5G.

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

[0237] In the content supply system ex100, a terminal having a photographing function is connected to the streaming server ex103 through the base station ex106 or the like, enabling live distribution and the like. In live distribution, the terminal (the computer ex111, the game machine ex112, the camera ex113, the home appliance ex114, the smartphone ex115, and the terminal in the airplane ex117, etc.) performs the encoding process described in each of the above embodiments on the still image or video content photographed by the user using the terminal, multiplexes the video data obtained by encoding with the audio data obtained by encoding the sound 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 an aspect of the present disclosure.

[0238] On one hand, the streaming server ex103 streams the transmitted content data to the requested client. The client is a computer ex111, a game console ex112, a camera ex113, a home appliance ex114, a smartphone ex115, or a terminal in an airplane ex117, etc. that can decode 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.

[0239] [Distributed Processing] Also, the streaming server ex103 may be a plurality of servers or a plurality of computers that distribute, process, and record data. For example, the streaming server ex103 may be realized by a CDN (Content Delivery Network), and content delivery may be realized by a network connecting a large number of edge servers distributed around the world. In a CDN, an edge server physically close to the client is dynamically assigned according to the client. By caching and distributing the content to the edge server, the delay can be reduced. Also, when an error occurs or the communication state changes due to an increase in traffic, etc., the processing can be distributed among multiple edge servers, the distribution entity can be switched to another edge server, or the part of the network with a failure can be bypassed to continue the distribution, so high-speed and stable distribution can be realized.

[0240] Moreover, not limited to the distributed processing of the distribution itself, the encoding process of the captured data may be performed on each terminal, on the server side, or shared between them. As an example, generally in the encoding process, the processing loop is performed twice. In the first loop, the complexity of the image or the amount of code is detected in units of frames or scenes. In the second loop, processing is performed to improve the encoding efficiency while maintaining the image quality. For example, by having the terminal perform the first encoding process and the server side that receives the content perform the second encoding process, it is possible to improve the quality and efficiency of the content while reducing the processing load on each terminal. In this case, if there is a requirement to receive and decode in almost real time, the already encoded data from the first encoding performed by the terminal can also be received and played back by other terminals, enabling more flexible real-time distribution.

[0241] As another example, cameras such as ex113 perform feature extraction from the image, compress the data related to the features as metadata, and transmit it to the server. The server performs compression according to the meaning of the image, such as judging the importance of the object from the features and switching the quantization accuracy. Feature data is particularly effective in improving the accuracy and efficiency of motion vector prediction during re-compression on the server. Also, simple encoding such as VLC (Variable Length Coding) may be performed on the terminal, and encoding with a large processing load such as CABAC (Context Adaptive Binary Arithmetic Coding) may be performed on the server.

[0242] As yet another example, in a stadium, shopping mall, factory, etc., there may be a case where there are multiple video data in which substantially the same scene is captured by a plurality of terminals. In this case, using the plurality of terminals that performed the shooting, and other terminals and servers that did not perform shooting as necessary, encoding processing is assigned and distributed processing is performed in units such as GOP (Group of Picture), picture unit, or tile unit obtained by dividing the picture. This can reduce the delay and achieve more real-time performance.

[0243] In addition, since the multiple video data is of almost the same scene, the server may manage and / or give instructions so that the video data captured by each terminal can be referenced to each other. Alternatively, the server may receive the encoded data from each terminal and change the reference relationship among the multiple data, or correct or replace the picture itself and re-encode it. Thereby, a stream with improved quality and efficiency of each piece of data can be generated.

[0244] In addition, the server may perform transcoding to change the encoding method of the video data and then distribute the video data. For example, the server may convert the MPEG-based encoding method to the VP-based one, or convert H.264 to H.265.

[0245] In this way, the encoding process can be performed by the terminal or one or more servers. Therefore, hereinafter, descriptions such as "server" or "terminal" are used as the subject performing the process, but part or all of the processes performed by the server may be performed by the terminal, or part or all of the processes performed by the terminal may be performed by the server. Also, regarding these, the same applies to the decoding process.

[0246] [3D, Multi-angle] In recent years, it has also become increasingly common to integrate and use different scenes captured by terminals such as a plurality of cameras ex113 and / or smartphones ex115 that are almost synchronized with each other, or images or videos of the same scene captured from different angles. The videos captured by each terminal are integrated based on the relative positional relationship between the terminals obtained separately, or the regions where the feature points included in the videos match.

[0247] The server may not only encode two-dimensional moving images, but also automatically encode still images based on scene analysis of the moving images or at a time specified by the user, and transmit them to the receiving terminal. Further, when the server can obtain the relative positional relationship between the imaging terminals, it can generate the three-dimensional shape of the scene based not only on two-dimensional moving images, but also on videos taken from different angles of the same scene. Note that the server may separately encode three-dimensional data generated by a point cloud or the like, or select or reconstruct the video transmitted to the receiving terminal from the videos taken by a plurality of terminals based on the result of recognizing or tracking a person or an object using the three-dimensional data.

[0248] In this way, the user can arbitrarily select each video corresponding to each imaging terminal to enjoy the scene, or enjoy the content obtained by cutting out a video from an arbitrary viewpoint from the three-dimensional data reconstructed using a plurality of images or videos. Further, similar to the video, sound is also collected from a plurality of different angles, and the server may multiplex and transmit the sound from a specific angle or space together with the video according to the video.

[0249] In recent years, content associating the real world and the virtual world, such as Virtual Reality (VR) and Augmented Reality (AR), has also become widespread. In the case of VR images, the server may create viewpoint images for the right eye and the left eye respectively, and perform encoding that allows reference between each viewpoint video by Multi-View Coding (MVC) or the like, or encode them as separate streams without referring to each other. At the time of decoding the separate streams, they may be played back in synchronization with each other so that a virtual three-dimensional space is reproduced according to the user's viewpoint.

[0250] In the case of an AR image, the server superimposes virtual object information in the virtual space on the camera information in the real space based on the three-dimensional position or the movement of the user's viewpoint. The decoding device may acquire or hold the virtual object information and the three-dimensional data, generate a two-dimensional image according to the movement of the user's viewpoint, and create superimposed data by smoothly connecting them. Alternatively, in addition to requesting the virtual object information, the decoding device transmits the movement of the user's viewpoint to the server, and the server creates superimposed data according to the movement of the viewpoint received from the three-dimensional data held by the server, encodes the superimposed data, and distributes it to the decoding device. Note that the superimposed data has an α value indicating transparency in addition to RGB, and the server may set the α value of the portion other than the object created from the three-dimensional data to 0 or the like and encode it in a state where the portion is transparent. Alternatively, the server may set the RGB value of a predetermined value as the background like chroma key and generate data with the portion other than the object as the background color.

[0251] Similarly, the decoding process of the distributed data may be performed on each client terminal, on the server side, or shared between them. As an example, a certain terminal may once send a reception request to the server, receive the content corresponding to the request on another terminal, perform the decoding process, and transmit the decoded signal to the device having a display. By dispersing the process regardless of the performance of the communicable terminal itself and selecting appropriate content, it is possible to reproduce data with good image quality. As another example, while receiving large-size image data on a TV or the like, a part of the area such as a tile in which the picture is divided may be decoded and displayed on the personal terminal of the viewer. Thereby, while sharing the overall image, it is possible to check the area to be in charge of or the area to be confirmed in more detail at hand.

[0252] In the future, in a situation where multiple short-range, medium-range, or long-range wireless communications can be used regardless of indoors or outdoors, by utilizing a distribution system standard such as MPEG-DASH, it is expected to seamlessly receive content while switching appropriate data for the ongoing communication. As a result, the user can freely select not only their own terminal but also a decoding device or display device such as a display installed indoors or outdoors and switch in real time. Also, based on their own location information, etc., decoding can be performed while switching the terminal to be decoded and the terminal to be displayed. This enables, while moving to a destination, to move while displaying map information on a part of the wall surface or ground of the neighboring building where a displayable device is embedded. Also, based on the ease of access to the encoded data on the network, such as the encoded data being cached in a server that can be accessed from the receiving terminal in a short time, or being copied to an edge server in a content delivery service, etc., it is also possible to switch the bitrate of the received data.

[0253] [Scalable Encoding] Regarding the switching of content, it will be described using a scalable stream that is compression-encoded by applying the moving image encoding method shown in each of the above embodiments as shown in FIG. 18. The server may have a plurality of streams with the same content but different qualities as individual streams, but by taking advantage of the characteristics of the temporally / spatially scalable stream realized by encoding in layers as shown in the figure, a configuration for switching content may be used. That is, by determining up to which layer to decode according to internal factors such as the performance on the decoding side and external factors such as the state of the communication bandwidth, the decoding side can freely switch between low-resolution content and high-resolution content for decoding. For example, when you want to watch the continuation of a video that you were watching on a smartphone ex115 while moving on a device such as an Internet TV after returning home, the device only needs to decode the same stream to a different layer, thus reducing the burden on the server side.

[0254] Furthermore, as described above, pictures are encoded layer by layer. In addition to the configuration that realizes scalability where an enhancement layer exists above the base layer, the enhancement layer may include meta-information based on statistical information of an image or the like, and the decoding side may generate high-quality content by super-resolving the picture 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 non-linear filter coefficients used in super-resolution processing, or information for specifying parameter values in filter processing, machine learning, or least-squares operation used in super-resolution processing, etc.

[0255] Alternatively, the picture may be divided into tiles or the like according to the meaning of an object or the like in the image, and the decoding side may decode only a part of the region by selecting the tile to be decoded. Also, by storing the attributes of the object (such as a person, a car, a ball) and the position in the video (such as the coordinate position in the same image) as meta-information, the decoding side can specify the position of the desired object based on the meta-information and determine the tile including the object. For example, as shown in FIG. 19, the meta-information is stored using a data storage structure different from pixel data such as the SEI message in HEVC. This meta-information indicates, for example, the position, size, or color of the main object.

[0256] Also, the meta-information may be stored in units composed of a plurality of pictures, such as a stream, a sequence, or a random access unit. Thereby, the decoding side can obtain the time when a specific person appears in the video, etc., and by combining with the information in picture units, can specify the picture in which the object exists and the position of the object in the picture.

[0257] [Optimization of Web Page] FIG. 20 is a diagram showing an example of a display screen of a web page on a computer ex111 or the like. FIG. 21 is a diagram showing an example of a display screen of a web page on a smartphone ex115 or the like. As shown in FIGS. 20 and 21, a web page may include a plurality of link images that are links to image content, and the appearance thereof may vary depending on the device being viewed. When a plurality of link images are visible on the screen, until the user explicitly selects a link image, or until the link image approaches the vicinity of the center of the screen or the entire link image enters the screen, the display device (decoding device) may display a still image or an I picture that each content has as a link image, display a video like a gif animation with a plurality of still images or I pictures, etc., or receive only the base layer and decode and display the video.

[0258] When a link image is selected by the user, the display device decodes the base layer with the highest priority. If there is information indicating that the HTML constituting the web page is scalable content, the display device may decode up to the enhancement layer. Also, in order to ensure real-time performance, before being selected or when the communication bandwidth is very strict, the display device can reduce the delay between the decoding time and the display time of the leading picture (the delay from the start of content decoding to the start of display) by decoding and displaying only the forward reference pictures (I pictures, P pictures, B pictures with only forward reference). Further, the display device may boldly ignore the reference relationship of the pictures and roughly decode all B pictures and P pictures with forward reference, and perform normal decoding as the received pictures increase over time.

[0259] [Autonomous Driving] Also, when transmitting and receiving still image or video data such as two-dimensional or three-dimensional map information for autonomous driving or driving support of a vehicle, the receiving terminal may receive, in addition to the image data belonging to one or more layers, weather or construction information, etc. as meta information, and decode these in association with each other. Note that the meta information may belong to a layer or may simply be multiplexed with the image data.

[0260] In this case, since vehicles, drones, airplanes, etc. including the receiving terminal move, the receiving terminal can achieve seamless reception and decoding by transmitting the position information of the receiving terminal at the time of a reception request, while switching between the base stations ex106 to ex110. Further, the receiving terminal can dynamically switch how much meta information to receive or how much to update the map information according to the user's selection, the user's situation, or the state of the communication band.

[0261] As described above, in the content supply system ex100, the client can receive, decode, and play back the encoded information transmitted by the user in real time.

[0262] [Delivery of Personal Content] Further, in the content supply system ex100, not only high-quality and long-duration content by video delivery providers but also unicast or multicast delivery of low-quality and short-duration content by individuals is possible. Also, it is considered that such personal content will increase in the future. In order to make personal content into better content, the server may perform an encoding process after performing an editing process. This can be realized, for example, with the following configuration.

[0263] During shooting in real-time or accumulating and after shooting, the server performs recognition processing such as shooting error, scene search, semantic analysis, and object detection on the original image or encoded data. Then, based on the recognition results, the server manually or automatically corrects issues such as out-of-focus or camera shake, deletes less important scenes such as those with lower brightness or out-of-focus compared to other pictures, emphasizes the edges of objects, or performs editing such as changing the color tone. The server encodes the edited data based on the editing results. Also, it is known that if the shooting time is too long, the viewing rate will decrease. The server may automatically clip scenes with little movement as well as less important scenes as described above so that the content is within a specific time range according to the shooting time, based on the image processing results. Or, the server may generate and encode a digest based on the result of semantic analysis of the scene.

[0264] Note that there are cases where personal content may inadvertently contain elements that, as they are, would infringe copyright, moral rights of the author, or portrait rights, etc., and may be inconvenient for individuals, such as the sharing scope exceeding the intended range. Therefore, for example, the server may deliberately change the image to be out of focus for the faces of people in the peripheral part of the screen or inside a house and then encode it. Also, the server may recognize whether a face of a person different from the pre-registered person appears in the image to be encoded, and if it does, perform processing such as applying a mosaic to the face part. Or, as pre-processing or post-processing of encoding, the user designates a person or background area that the user wants to process the image from the perspective of copyright, etc., and the server can perform processing such as replacing the designated area with another video or blurring the focus. For a person, the video of the face part can be replaced while tracking the person in the moving image.

[0265] In addition, since viewing personal content with a small data volume has a strong requirement for real-time performance, depending on the bandwidth, the decoding device first receives the base layer with the highest priority and decodes and plays it. During this time, the decoding device receives the enhancement layer, and when the playback is looped or played more than twice, for example, it may play a high-quality video including the enhancement layer. For a stream encoded in a scalable manner like this, the video is rough when not selected or at the beginning of viewing, but it can provide an experience where 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 for the first time and a second stream encoded with reference to the first video are configured as one stream.

[0266] [Other usage examples] In addition, these encoding or decoding processes are generally processed in the LSIex500 that each terminal has. The LSIex500 may be a one-chip configuration or a configuration consisting of multiple chips. Note that software for moving image encoding or decoding may be incorporated into some recording medium (such as a CD-ROM, flexible disk, or hard disk) readable by a computer ex111 or the like, and the encoding or decoding process may be performed using that software. Further, when the smartphone ex115 has a camera, the video data acquired by the camera may be transmitted. The video data at this time is data encoded by the LSIex500 that the smartphone ex115 has.

[0267] Note that the LSIex500 may be configured to download and activate application software. In this case, the terminal first determines whether the terminal supports the content encoding method or has the ability to execute a specific service. If the terminal does not support the content encoding method or does not have the ability to execute a specific service, the terminal downloads the codec or application software and then acquires and plays the content.

[0268] Moreover, not only the content supply system ex100 via the Internet ex101, but also a digital broadcast system can incorporate at least either the moving image encoding device (image encoding device) or the moving image decoding device (image decoding device) of each of the above embodiments. Since multiplexed data in which video and audio are multiplexed is transmitted and received by loading it on a broadcast radio wave using a satellite or the like, there is a difference in that it is suitable for multicast as opposed to the unicast-friendly configuration of the content supply system ex100, but the same application is possible for the encoding process and the decoding process.

[0269] [Hardware Configuration] FIG. 22 is a diagram showing a smartphone ex115. FIG. 23 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 a base station ex110, a camera unit ex465 capable of capturing video and still images, and a display unit ex458 for displaying data obtained by decoding video captured by the camera unit ex465 and 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 captured video or still images, recorded audio, received video or still images, encoded data such as emails, or decoded data, and a slot unit ex464 which is an interface unit with a SIM ex468 for identifying the user and authenticating access to various data including the network. Note that an external memory may be used instead of the memory unit ex467.

[0270] In addition, a main control unit ex460 that comprehensively controls the display unit ex458, the operation unit ex466, etc., 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 / demultiplexing unit ex453, an audio signal processing unit ex454, a slot unit ex464, and a memory unit ex467 are connected via a bus ex470.

[0271] When the power key is turned on by the user's operation, the power supply circuit unit ex461 supplies power to each unit from the battery pack to activate the smartphone ex115 in an operable state.

[0272] The smartphone ex115 performs processes such as calls and data communication based on the control of the main control unit ex460 having a CPU, ROM, RAM, etc. During a call, the voice signal picked up by the voice input unit ex456 is converted into a digital voice signal by the voice signal processing unit ex454, spectrally spread by the modulation / demodulation unit ex452, and after performing digital-to-analog conversion processing and frequency conversion processing by the transmission / reception unit ex451, it is transmitted via the antenna ex450. Also, the received data is amplified, frequency conversion processing and analog-to-digital conversion processing are performed, spectral inverse spreading processing is performed by the modulation / demodulation unit ex452, and after being converted into an analog voice signal by the voice signal processing unit ex454, it is output from the voice output unit ex457. In the data communication mode, text, still images, or video data is sent to the main control unit ex460 via the operation input control unit ex462 by operating the operation unit ex466 of the main body, etc., and the same transmission and reception processing is performed. 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 / demultiplexing unit ex453. Also, the voice signal processing unit ex454 encodes the voice signal picked up by the voice input unit ex456 while the camera unit ex465 is capturing video or still images, etc., and sends the encoded voice data to the multiplexing / demultiplexing unit ex453. The multiplexing / demultiplexing unit ex453 multiplexes the encoded video data and the encoded voice data in a predetermined manner, performs modulation processing and conversion processing by the modulation / demodulation unit (modulation / demodulation circuit unit) ex452 and the transmission / reception unit ex451, and transmits it via the antenna ex450.

[0273] When receiving a video attached to an email or chat, or a video linked to a web page or the like, in order to decode the multiplexed data received via the antenna ex450, the multiplexing / demultiplexing 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, 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 moving image encoding method shown in each of the above embodiments, and a video or a still image included in the linked moving image file is displayed from the display unit ex458 via the display control unit ex459. Also, the audio signal processing unit ex454 decodes the audio signal, and audio is output from the audio output unit ex457. Since real-time streaming has become widespread, depending on the user's situation, there may be a situation where it is not socially appropriate to play audio. Therefore, as an initial value, it is desirable to have a configuration that plays only video data without playing the audio signal. The audio may be played synchronously only when the user performs an operation such as clicking on the video data.

[0274] Also, although the smartphone ex115 has been described as an example here, as the terminal, in addition to a transmission / reception type terminal having both an encoder and a decoder, there are three possible implementation forms: a transmission terminal having only an encoder and a reception terminal having only a decoder. Further, in the digital broadcast system, although it has been described that multiplexed data in which video data and audio data are multiplexed is received or transmitted, in the multiplexed data, in addition to audio data, character data related to the video may be multiplexed, or the video data itself may be received or transmitted instead of the multiplexed data.

[0275] Although the main control unit ex460 including the CPU has been described as controlling the encoding or decoding process, the terminal often has a GPU. Therefore, a configuration in which a wide area is processed in a batch by taking advantage of the performance of the GPU using a memory shared by the CPU and the GPU, or a memory whose address is managed so that it can be used in common, may be adopted. Thereby, the encoding time can be shortened, real-time performance can be ensured, and low latency can be realized. In particular, it is efficient to perform motion search, deblocking filter, SAO (Sample Adaptive Offset), and transform / quantization processes in units such as pictures using the GPU instead of the CPU.

Industrial Applicability

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

Explanation of Signs

[0277] 100 Encoding device 102 Splitting unit 104 Subtraction unit 106 Transformation unit 108 Quantization unit 110 Entropy encoding unit 112, 204 Inverse quantization unit 114, 206 Inverse transformation unit 116, 208 Addition unit 118, 210 Block memory 120, 212 Loop filter unit 122, 214 Frame memory 124, 216 Intra prediction unit 126, 218 Inter prediction unit 128, 220 Prediction control unit 200 Decoding device 202 Entropy decoding unit 1000 Current picture 1001 Current block 1100 First reference picture 1110 First Motion Vector 1120 First Prediction Block 1121, 1221 Prediction Sub - blocks 1122, 1222 Top - left Pixel 1130, 1130A First Interpolation Reference Range 1131, 1131A, 1132, 1132A, 1231, 1231A, 1232, 1232A Reference Ranges 1135, 1135A First Gradient Reference Range 1140 First Prediction Image 1150 First Gradient Image 1200 Second Reference Picture 1210 Second Motion Vector 1220 Second Prediction Block 1230, 1230A Second Interpolation Reference Range 1235, 1235A Second Gradient Reference Range 1240 Second Prediction Image 1250 Second Gradient Image 1300 Local Motion Estimation Value 1400 Final Prediction Image

Claims

1. A decoding device for decoding a decoding target block included in a decoding target picture, comprising: a processor; a memory, and the processor uses the memory to obtain two prediction pictures by interpolation with sub-pixel accuracy using two reference pictures associated with the decoding target block for bidirectional prediction; obtain a plurality of horizontal gradient values corresponding to a plurality of second pixels included in a sub-block obtained by dividing the decoding target block, using the pixel values of the plurality of first pixels included in the two prediction pictures; derive a motion compensation value of the sub-block based on the plurality of horizontal gradient values; at the end of inter prediction using the plurality of horizontal gradient values, generate an output prediction picture corresponding to the sub-block using the motion compensation value of the sub-block; the two prediction pictures are specified using two motion vectors; the reference range for the interpolation is the same as the normal reference range referred to for obtaining a prediction picture with sub-pixel accuracy corresponding to the decoding target block in normal inter prediction that does not use the plurality of horizontal gradient values; a decoding device.

2. An encoding device for encoding an encoding target block included in an encoding target picture, comprising: a processor; a memory, and the processor uses the memory to obtain two prediction pictures by interpolation with sub-pixel accuracy using two reference pictures associated with the encoding target block for bidirectional prediction; obtain a plurality of horizontal gradient values corresponding to a plurality of second pixels included in a sub-block obtained by dividing the encoding target block, using the pixel values of the plurality of first pixels included in the two prediction pictures; derive a motion compensation value of the sub-block based on the plurality of horizontal gradient values; at the end of inter prediction using the plurality of horizontal gradient values, generate an output prediction picture corresponding to the sub-block using the motion compensation value of the sub-block; the two prediction pictures are specified using two motion vectors; the reference range for the interpolation is the same as the normal reference range referred to for obtaining a prediction picture with sub-pixel accuracy corresponding to the encoding target block in normal inter prediction that does not use the plurality of horizontal gradient values; an encoding device.

3. A bitstream generation device for generating a bitstream, comprising: a processor; and a memory, wherein the processor generates a bitstream including motion information indicating a reference picture used in inter prediction using the memory; the inter prediction includes: obtaining two prediction images by interpolating with sub-pixel accuracy using two reference pictures associated with the block to be coded for bidirectional prediction; obtaining a plurality of horizontal gradient values corresponding to a plurality of second pixels included in a sub-block obtained by dividing the block to be coded, using pixel values of a plurality of first pixels included in the two prediction images; deriving a motion compensation value of the sub-block based on the plurality of horizontal gradient values; including, at the end of inter prediction using the plurality of horizontal gradient values, generating an output prediction image corresponding to the sub-block using the motion compensation value of the sub-block; the two prediction images are specified using two motion vectors; a reference range for the interpolation coincides with a normal reference range referred to for obtaining a prediction image with sub-pixel accuracy corresponding to the block to be coded in normal inter prediction that does not use the plurality of horizontal gradient values; a bitstream generation device.

Citation Information

Patent Citations

  • Decoding device and encoding device

    JP7114773B2

  • Motion vector derivation in video coding

    US20160286229A1

  • Bi-directional optical flow for video coding

    US20170094305A1