Encoding device, decoding device, and recording medium
Through bidirectional optical flow technology and parameter calculation optimization, the problem of improving the coding efficiency and image quality in video encoding is solved, the processing volume and circuit scale are reduced, and the overall performance of video encoding is improved.
Patent Information
- Application Number
- CN202410824664.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2018-09-14
- Filing Date
- 2019-09-06
- Publication Date
- 2024-11-22
AI Technical Summary
The existing video encoding technology has shortcomings in coding efficiency, image quality, processing volume and circuit scale optimization when processing moving images, especially in the selection of motion vectors, reference pictures and block sizes, which are difficult to achieve the best results.
Bidirectional optical flow (BDOF) technology is used to generate high-precision predicted images, and optimize the encoding and decoding processing to reduce the calculation amount and circuit scale through specific parameter calculations and filter selection.
It improves encoding efficiency and picture quality, reduces processing volume and circuit scale, improves processing speed, and appropriately selects key elements and actions in encoding and decoding, thereby optimizing the video encoding process.
Smart Images

Figure CN119011854A_ABST
Abstract
Description
[0001] This application is a division of an invention patent application with an application date of September 6, 2019, application number 201980059142.6, and invention name “Encoding device, decoding device, encoding method and decoding method”. Technical Field
[0002] The present invention relates to video coding, for example, to systems, components, and methods for encoding and decoding moving images. Background Art
[0003] Video coding technology has advanced from H.261 and MPEG-1 to H.264 / AVC (Advanced Video Coding), MPEG-LA, H.265 / HEVC (High Efficiency Video Coding), and H.266 / VVC (Versatile Video Codec). Along with this progress, there is a constant need to provide improvements and optimizations in video coding technology in order to handle the ever-increasing amount of digital video data in various applications.
[0004] Furthermore, Non-Patent Document 1 relates to an example of existing standards related to the above-mentioned video encoding technology.
[0005] Prior art literature
[0006] Non-patent literature
[0007] Non-patent document 1: H.265 (ISO / IEC 23008-2HEVC) / HEVC (High Efficiency Video Coding) Summary of the invention
[0008] Problems to be solved by the invention
[0009] Regarding the encoding method as described above, it is expected to propose a new method to improve the encoding efficiency, improve the image quality, reduce the processing amount, reduce the circuit scale, or appropriately select elements or actions such as filters, blocks, sizes, motion vectors, reference pictures or reference blocks.
[0010] The present invention provides a structure or method that can contribute to one or more of, for example, improvement of coding efficiency, improvement of image quality, reduction of processing volume, reduction of circuit scale, improvement of processing speed, and appropriate selection of elements or actions. In addition, the present invention may include a structure or method that can contribute to benefits other than the above.
[0011] Means for solving problems
[0012] For example, an encoding device according to one aspect of the present invention includes:
[0013] Memory; and
[0014] A processor, connected to the memory, generates a predicted image for encoding the current block based on the first parameter and the second parameter derived from the BDOF process, wherein the BDOF represents a bidirectional optical flow,
[0015] The first parameter above is based on
[0016] [Formula 1]
[0017] ∑ [i,j]∈Ω abs(I x 1 +I x 0 )
[0018] Export,
[0019] The second parameter above is based on
[0020] [Formula 2]
[0021] ∑ [i,j]∈Ω (-sign(I x 1 +I x 0 )×(I 0 +I 1 ))
[0022] Export,
[0023] Ω represents a set of multiple relative pixel positions,
[0024] [i, j] represents the relative pixel position defined by the horizontal position i and the vertical position j in the set Ω,
[0025] I x 0 represents the horizontal gradient value of the relative pixel position [i, j] in the first reference block of the first reference image corresponding to the current block, I x 1 represents the horizontal gradient value of the relative pixel position [i, j] in the second reference block of the second reference image corresponding to the current block,
[0026] I 0 represents the pixel value of the relative pixel position [i, j] in the first reference block,
[0027] I 1 represents the pixel value of the relative pixel position [i, j] in the second reference block,
[0028] The abs function outputs the absolute value of a variable.
[0029] The sign function outputs the positive and negative signs of the variables.
[0030] I x 0 It means I 0 The difference between the two adjacent pixel values on the left and right.
[0031] The installation of several embodiments of the present invention can improve coding efficiency, simplify coding / decoding processing, speed up coding / decoding processing, and efficiently select appropriate components / actions used in coding and decoding such as appropriate filters, block sizes, motion vectors, reference pictures, reference blocks, etc.
[0032] According to the specification and the drawings, further advantages and effects in one form of the present invention are clarified. The advantages and / or effects are obtained respectively by several embodiments and the features described in the specification and the drawings, but in order to obtain one or more advantages and / or effects, it is not necessarily necessary to provide all of them.
[0033] Furthermore, these general or specific aspects may be implemented through systems, methods, integrated circuits, computer programs, recording media, or any combination thereof.
[0034] Effects of the Invention
[0035] The structure or method of one aspect of the present invention can contribute to one or more of the following, for example, improvement of coding efficiency, improvement of image quality, reduction of processing load, reduction of circuit scale, improvement of processing speed, and appropriate selection of elements or actions. In addition, the structure or method of one aspect of the present invention can also contribute to benefits other than the above. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 It is a block diagram showing the functional structure of the encoding device according to the embodiment.
[0037] Figure 2 This is a flowchart showing an example of the overall encoding process performed by the encoding device.
[0038] Figure 3 This is a conceptual diagram showing an example of block division.
[0039] Figure 4A This is a conceptual diagram showing an example of the structure of a slice.
[0040] Figure 4B This is a conceptual diagram showing an example of a tile structure.
[0041] Figure 5AThis is a table showing transformation basis functions corresponding to various transformation types.
[0042] Figure 5B This is a conceptual diagram showing an example of SVT (Spatially Varying Transform).
[0043] Fig. 6A This is a conceptual diagram showing an example of the shape of a filter used in an ALF (adaptive loop filter).
[0044] Figure 6B This is a conceptual diagram showing another example of the shape of the filter used in ALF.
[0045] Figure 6C This is a conceptual diagram showing another example of the shape of the filter used in ALF.
[0046] Figure 7 This is a block diagram showing an example of a detailed configuration of a loop filter unit that functions as a DBF (deblocking filter).
[0047] Figure 8 This is a conceptual diagram showing an example of a deblocking filter having a filter characteristic that is symmetric with respect to a block boundary.
[0048] Fig. 9 This is a conceptual diagram for explaining the block boundary on which the deblocking filtering process is performed.
[0049] Fig.10 This is a conceptual diagram showing an example of the Bs value.
[0050] Fig.11 This is a flowchart showing an example of processing performed by the prediction processing unit of the encoding device.
[0051] Fig.12 This is a flowchart showing another example of the processing performed by the prediction processing unit of the encoding device.
[0052] Fig.13 This is a flowchart showing another example of the processing performed by the prediction processing unit of the encoding device.
[0053] Fig.14 This is a conceptual diagram showing an example of 67 intra prediction modes in the intra prediction according to the embodiment.
[0054] Fig.15 This is a flowchart showing an example of the basic processing flow of inter-frame prediction.
[0055] Fig.16 This is a flowchart showing an example of motion vector derivation.
[0056] Fig.17 This is a flowchart showing another example of motion vector derivation.
[0057] Fig.18 This is a flowchart showing another example of motion vector derivation.
[0058] Fig.19 is a flowchart showing an example of inter-frame prediction based on the normal inter-frame mode.
[0059] Fig. 20 is a flowchart showing an example of inter-frame prediction based on merge mode.
[0060] Fig.21 This is a conceptual diagram for explaining an example of motion vector derivation processing based on the merge mode.
[0061] Fig. 22 This is a flowchart showing an example of FRUC (frame rate up conversion) processing.
[0062] Fig.23 This is a conceptual diagram for explaining an example of pattern matching (bidirectional matching) between two blocks along a motion trajectory.
[0063] Fig.24 This is a conceptual diagram for explaining an example of pattern matching (template matching) between a template in a current picture and a block in a reference picture.
[0064] Fig.25A This is a conceptual diagram for explaining an example of derivation of a motion vector in sub-block units based on motion vectors of a plurality of adjacent blocks.
[0065] Fig.25B This is a conceptual diagram for explaining an example of derivation of a motion vector in sub-block units in an affine mode having three control points.
[0066] Fig.26A This is a conceptual diagram for explaining the affine merge mode.
[0067] Fig.26B A conceptual diagram for explaining the affine merge mode with two control points.
[0068] Fig.26C This is a conceptual diagram for explaining the affine merge mode with three control points.
[0069] Fig. 27 This is a flowchart showing an example of processing in the affine merge mode.
[0070] Fig.28AThis is a conceptual diagram for explaining the affine inter-frame mode having two control points.
[0071] Fig.28B This is a conceptual diagram for explaining the affine inter-frame mode having three control points.
[0072] Fig.29 This is a flowchart showing an example of processing in the affine inter mode.
[0073] Fig. 30A It is a conceptual diagram used to illustrate the affine inter-frame mode in which the current block has 3 control points and the adjacent block has 2 control points.
[0074] Fig. 30B It is a conceptual diagram used to illustrate the affine inter-frame mode in which the current block has 2 control points and the adjacent block has 3 control points.
[0075] Fig.31A This is a flowchart showing the merge mode including DMVR (decoder motion vector refinement).
[0076] Fig.31B This is a conceptual diagram for explaining an example of DMVR processing.
[0077] Fig.32 This is a flowchart showing an example of generating a predicted image.
[0078] Fig.33 This is a flowchart showing another example of generating a predicted image.
[0079] Fig.34 This is a flowchart showing another example of generating a predicted image.
[0080] Fig.35 This is a flowchart for explaining an example of a predicted image correction process based on an OBMC (overlapped block motion compensation) process.
[0081] Fig.36 This is a conceptual diagram for explaining an example of predicted image correction processing based on OBMC processing.
[0082] Fig.37 This is a conceptual diagram for explaining the generation of predicted images of two triangles.
[0083] Fig.38 This is a conceptual diagram for explaining a model assuming uniform linear motion.
[0084] Fig.39This is a conceptual diagram for explaining an example of a method of generating a predicted image using a brightness correction process based on a LIC (local illumination compensation) process.
[0085] Fig.40 This is a block diagram showing an installation example of an encoding device.
[0086] Fig.41 It is a block diagram showing the functional structure of a decoding device according to an embodiment.
[0087] Fig.42 This is a flowchart showing an example of the overall decoding process performed by the decoding device.
[0088] Fig.43 This is a flowchart showing an example of processing performed by the prediction processing unit of the decoding device.
[0089] Fig.44 This is a flowchart showing another example of the processing performed by the prediction processing unit of the decoding device.
[0090] Fig.45 This is a flowchart showing an example of inter-frame prediction based on the normal inter-frame mode in a decoding device.
[0091] Fig.46 This is a block diagram showing an implementation example of a decoding device.
[0092] Fig.47 This is a flowchart showing a first specific example of the BIO-based decoding process in the embodiment.
[0093] Fig.48 It is a conceptual diagram showing an example of calculation of a horizontal gradient value in the embodiment.
[0094] Fig.49 It is a conceptual diagram showing an example of calculation of a vertical gradient value in an embodiment.
[0095] Fig.50 This is a flowchart showing the operation of the encoding device according to the embodiment.
[0096] Fig.51 This is a flowchart showing the operation of the decoding device according to the embodiment.
[0097] Fig.52 This is a block diagram showing the overall structure of a content provision system that implements content distribution services.
[0098] Fig.53 This is a conceptual diagram showing an example of a coding structure in the case of scalable coding.
[0099] Fig.54This is a conceptual diagram showing an example of a coding structure in the case of scalable coding.
[0100] Fig.55 This is a conceptual diagram showing an example of a display screen of a web page.
[0101] Fig.56 This is a conceptual diagram showing an example of a display screen of a web page.
[0102] Fig.57 This is a block diagram showing an example of a smart phone.
[0103] Fig.58 This is a block diagram showing a structural example of a smart phone. DETAILED DESCRIPTION
[0104] In recent years, the use of bidirectional optical flow to encode moving images has been studied. Bidirectional optical flow is also called BIO or BDOF. For example, in bidirectional optical flow, a predicted image whose predicted value is adjusted in pixel units is generated using parameters derived based on pixel values of a reference image in block units and gradient values of the reference image in block units.
[0105] The encoding device is likely to be able to generate a high-precision prediction image using the bidirectional optical flow. Similarly, the decoding device is likely to be able to generate a high-precision prediction image using the bidirectional optical flow.
[0106] For example, the encoding device encodes the difference image between the predicted image and the original image. Then, the decoding device decodes the difference image and adds the difference image and the predicted image to generate a reconstructed image. By using a high-precision predicted image, the amount of code for the difference image can be reduced. That is, by using bidirectional optical flow, there is a high possibility that the amount of code for the moving image can be reduced.
[0107] On the other hand, the parameters for the bidirectional optical flow are derived based on the pixel values and gradient values at each pixel position of the reference image. Therefore, in order to derive the parameters for the bidirectional optical flow, the amount of calculation may increase due to the calculation performed for each pixel position.
[0108] Therefore, for example, an encoding device involved in one embodiment of the present invention includes: a circuit; and a memory connected to the above-mentioned circuit, wherein the above-mentioned circuit, in operation, derives gradients and absolute values for multiple relative pixel positions, respectively, and the above-mentioned multiple relative pixel positions are multiple pixel positions that are commonly and relatively determined for a first range of a first reference block including a current block and a second range of a second reference block including the above-mentioned current block, and are multiple pixel positions in each of the above-mentioned first range and the above-mentioned second range, and the above-mentioned gradients and absolute values are the absolute values of the sum of the gradient values of the relative pixel positions in the above-mentioned first range and the gradient values of the relative pixel positions in the above-mentioned second range, and the sum of the multiple gradients and absolute values derived for the above-mentioned multiple relative pixel positions is used as the first reference A number is derived, for each of the above-mentioned multiple relative pixel positions, the difference between the pixel value of the relative pixel position in the above-mentioned first range and the pixel value of the relative pixel position in the above-mentioned second range, that is, the pixel differential value is derived; for each of the above-mentioned multiple relative pixel positions, according to the positive and negative signs of the gradient value of the relative pixel position in the above-mentioned first range and the gradient value of the relative pixel position in the above-mentioned second range, that is, the sum of the gradient sum, the positive and negative signs of the above-mentioned pixel differential value derived for the relative pixel position are reversed or maintained, the sum of the multiple pixel differential values respectively derived for the above-mentioned multiple relative pixel positions and with the positive and negative signs respectively reversed or maintained is derived as the second parameter, and the first parameter and the second parameter are used to generate a predicted image used in the encoding of the above-mentioned current block.
[0109] This allows the encoding device to reduce substantial multiplications with a large amount of computation in the computation performed for each pixel position, and to derive a plurality of parameters for generating a predicted image with a low amount of computation. Therefore, the encoding device can reduce the amount of processing in encoding.
[0110] In addition, for example, for each of the above-mentioned multiple relative pixel positions, the gradient value of the relative pixel position in the above-mentioned first range is the horizontal gradient value of the relative pixel position in the above-mentioned first range, and the gradient value of the relative pixel position in the above-mentioned second range is the horizontal gradient value of the relative pixel position in the above-mentioned second range.
[0111] Thus, the encoding device can use the horizontal gradient value to derive multiple parameters with a low amount of calculation.
[0112] In addition, for example, the circuit derives the first parameter through the equation (4.1) described later, and derives the second parameter through the equation (4.2) described later, where Ω represents the set of the plurality of relative pixel positions, [i, j] represents each of the plurality of relative pixel positions, and for each of the plurality of relative pixel positions, I x 0 represents the horizontal gradient value of the relative pixel position in the first range, I x1 represents the horizontal gradient value of the relative pixel position in the second range, I 0 represents the pixel value of the relative pixel position in the first range, I 1 represents the pixel value of the relative pixel position in the second range, abs(I x 1 +I x 0 ) indicates I x 1 +I x 0 The absolute value of sign(I x 1 +I x 0 ) indicates I x 1 +I x 0 The positive and negative signs of .
[0113] Thus, the encoding device can appropriately derive multiple parameters using pixel values and horizontal gradient values.
[0114] In addition, for example, for each of the above-mentioned multiple relative pixel positions, the gradient value of the relative pixel position in the above-mentioned first range is the vertical gradient value of the relative pixel position in the above-mentioned first range, and the gradient value of the relative pixel position in the above-mentioned second range is the vertical gradient value of the relative pixel position in the above-mentioned second range.
[0115] Thus, the encoding device can use the vertical gradient value to derive multiple parameters with a low amount of calculation.
[0116] In addition, for example, the circuit derives the first parameter through the equation (4.5) described later, and derives the second parameter through the equation (4.6) described later, where Ω represents the set of the plurality of relative pixel positions, [i, j] represents each of the plurality of relative pixel positions, and for each of the plurality of relative pixel positions, I y 0 represents the vertical gradient value of the relative pixel position in the first range, I y 1 represents the vertical gradient value of the relative pixel position in the second range, I 0 represents the pixel value of the relative pixel position in the first range, I 1 represents the pixel value of the relative pixel position in the second range, abs(I y 1 +I y 0 ) indicates I y 1 +Iy 0 The absolute value of sign(I y 1 +I y 0 ) indicates I y 1 +I y 0 The positive and negative signs of .
[0117] Thus, the encoding device can appropriately derive multiple parameters using pixel values and vertical gradient values.
[0118] In addition, for example, the circuit derives, for each of the plurality of relative pixel positions, an absolute value of the sum of the horizontal gradient value of the relative pixel position in the first range and the horizontal gradient value of the relative pixel position in the second range, that is, a horizontal gradient and an absolute value; derives the sum of the plurality of horizontal gradients and absolute values derived for the plurality of relative pixel positions; for each of the plurality of relative pixel positions, derives an absolute value of the sum of the vertical gradient value of the relative pixel position in the first range and the vertical gradient value of the relative pixel position in the second range, that is, a vertical gradient and an absolute value; derives the sum of the plurality of vertical gradients and absolute values derived for the plurality of relative pixel positions; and when the sum of the plurality of horizontal gradients and absolute values is greater than the sum of the plurality of vertical gradients and absolute values, the circuit derives the sum of the plurality of horizontal gradients and absolute values. When the sum of the values is large, for each of the multiple relative pixel positions, the horizontal gradient value of the relative pixel position in the first range is applied to the gradient value of the relative pixel position in the first range, and the horizontal gradient value of the relative pixel position in the second range is applied to the gradient value of the relative pixel position in the second range; when the sum of the multiple horizontal gradients and the absolute values is not greater than the sum of the multiple vertical gradients and the absolute values, for each of the multiple relative pixel positions, the vertical gradient value of the relative pixel position in the first range is applied to the gradient value of the relative pixel position in the first range, and the vertical gradient value of the relative pixel position in the second range is applied to the gradient value of the relative pixel position in the second range.
[0119] Thus, the encoding device can apply the horizontal gradient value or the vertical gradient value to the derivation of multiple parameters based on the comparison of the sum associated with the horizontal gradient value and the sum associated with the vertical gradient value. In other words, the encoding device can apply the gradient value with a large influence to the derivation of multiple parameters.
[0120] Furthermore, for example, the circuit derives a third parameter using the first parameter as a denominator and the second parameter as a numerator, and generates the predicted image using the third parameter.
[0121] This allows the encoding device to appropriately generate a predicted image using parameters derived based on the relationship between a plurality of parameters.
[0122] In addition, for example, for each of the above-mentioned multiple relative pixel positions, the above-mentioned circuit derives the gradient value of the relative pixel position in the above-mentioned first range and the gradient value of the relative pixel position in the above-mentioned second range through a 3-tap filter having a filter coefficient set of [-1, 0, 1].
[0123] This allows the encoding device to easily and appropriately derive the gradient value at each pixel position.
[0124] Furthermore, for example, the current block is a sub-block determined in a coding unit with a size of 4×4 pixels, and the circuit derives the first parameter and the second parameter in units of the sub-block.
[0125] This allows the encoding device to appropriately generate a predicted image using a plurality of parameters determined in a 4×4 pixel size.
[0126] In addition, for example, a decoding device according to one aspect of the present invention comprises: a circuit; and a memory connected to the above circuit, wherein the above circuit, in operation, derives gradients and absolute values for a plurality of relative pixel positions, respectively, the plurality of relative pixel positions being a plurality of pixel positions commonly and relatively determined for a first range of a first reference block including a current block and a second range of a second reference block including the current block, and being a plurality of pixel positions in each of the first range and the second range, the gradients and absolute values being the absolute values of the sum of the gradient values of the relative pixel positions in the first range and the gradient values of the relative pixel positions in the second range, and using the sum of the plurality of gradients and absolute values derived for the plurality of relative pixel positions as a first parameter derivative. For each of the plurality of relative pixel positions, a difference between the pixel value of the relative pixel position in the first range and the pixel value of the relative pixel position in the second range, i.e., a pixel differential value, is derived; for each of the plurality of relative pixel positions, according to the positive and negative signs of the gradient value of the relative pixel position in the first range and the gradient value of the relative pixel position in the second range, i.e., the sum of the gradient sum, i.e., the positive and negative signs of the pixel differential value derived for the relative pixel position, is reversed or maintained; the sum of the plurality of pixel differential values respectively derived for the plurality of relative pixel positions and having their positive and negative signs reversed or maintained is derived as a second parameter; and a predicted image used in decoding the current block is generated using the first parameter and the second parameter.
[0127] This allows the decoding device to reduce substantial multiplications with a large amount of calculation in calculations performed for each pixel position, and to derive a plurality of parameters for generating a predicted image with a low amount of calculation. Therefore, the decoding device can reduce the amount of processing in decoding.
[0128] In addition, for example, for each of the above-mentioned multiple relative pixel positions, the gradient value of the relative pixel position in the above-mentioned first range is the horizontal gradient value of the relative pixel position in the above-mentioned first range, and the gradient value of the relative pixel position in the above-mentioned second range is the horizontal gradient value of the relative pixel position in the above-mentioned second range.
[0129] Thus, the decoding device can derive a plurality of parameters with a low amount of calculation using the horizontal gradient value.
[0130] In addition, for example, the circuit derives the first parameter through the equation (4.1) described later, and derives the second parameter through the equation (4.2) described later, where Ω represents the set of the plurality of relative pixel positions, [i, j] represents each of the plurality of relative pixel positions, and for each of the plurality of relative pixel positions, I x 0 represents the horizontal gradient value of the relative pixel position in the first range, I x 1 represents the horizontal gradient value of the relative pixel position in the second range, I 0 represents the pixel value of the relative pixel position in the first range, I 1 represents the pixel value of the relative pixel position in the second range, abs(I x 1 +I x 0 ) indicates I x 1 +I x 0 The absolute value of sign(I x 1 +I x 0 ) indicates I x 1 +I x 0 The positive and negative signs of .
[0131] Thus, the decoding device can appropriately derive multiple parameters using pixel values and horizontal gradient values.
[0132] In addition, for example, for each of the above-mentioned multiple relative pixel positions, the gradient value of the relative pixel position in the above-mentioned first range is the vertical gradient value of the relative pixel position in the above-mentioned first range, and the gradient value of the relative pixel position in the above-mentioned second range is the vertical gradient value of the relative pixel position in the above-mentioned second range.
[0133] Thus, the decoding device can use the vertical gradient value to derive multiple parameters with a low amount of calculation.
[0134] In addition, for example, the circuit derives the first parameter through the equation (4.5) described later, and derives the second parameter through the equation (4.6) described later, where Ω represents the set of the plurality of relative pixel positions, [i, j] represents each of the plurality of relative pixel positions, and for each of the plurality of relative pixel positions, I y 0 represents the vertical gradient value of the relative pixel position in the first range, I y 1 represents the vertical gradient value of the relative pixel position in the second range, I 0 represents the pixel value of the relative pixel position in the first range, I 1 represents the pixel value of the relative pixel position in the second range, abs(I y 1 +I y 0 ) indicates I y 1 +I y 0 The absolute value of sign(I y 1 +I y 0 ) indicates I y 1 +I y 0 The positive and negative signs of .
[0135] Thus, the decoding device can appropriately derive multiple parameters using pixel values and vertical gradient values.
[0136] In addition, for example, the circuit derives, for each of the plurality of relative pixel positions, an absolute value of the sum of the horizontal gradient value of the relative pixel position in the first range and the horizontal gradient value of the relative pixel position in the second range, that is, a horizontal gradient and an absolute value; derives the sum of the plurality of horizontal gradients and absolute values derived for the plurality of relative pixel positions; for each of the plurality of relative pixel positions, derives an absolute value of the sum of the vertical gradient value of the relative pixel position in the first range and the vertical gradient value of the relative pixel position in the second range, that is, a vertical gradient and an absolute value; derives the sum of the plurality of vertical gradients and absolute values derived for the plurality of relative pixel positions; and when the sum of the plurality of horizontal gradients and absolute values is greater than the sum of the plurality of vertical gradients and absolute values, the circuit derives the sum of the plurality of horizontal gradients and absolute values. When the sum of the values is large, for each of the multiple relative pixel positions, the horizontal gradient value of the relative pixel position in the first range is applied to the gradient value of the relative pixel position in the first range, and the horizontal gradient value of the relative pixel position in the second range is applied to the gradient value of the relative pixel position in the second range; when the sum of the multiple horizontal gradients and the absolute values is not greater than the sum of the multiple vertical gradients and the absolute values, for each of the multiple relative pixel positions, the vertical gradient value of the relative pixel position in the first range is applied to the gradient value of the relative pixel position in the first range, and the vertical gradient value of the relative pixel position in the second range is applied to the gradient value of the relative pixel position in the second range.
[0137] Thus, the decoding device can apply the horizontal gradient value or the vertical gradient value to the derivation of multiple parameters based on the comparison of the sum associated with the horizontal gradient value and the sum associated with the vertical gradient value. In other words, the decoding device can apply the gradient value with a large influence to the derivation of multiple parameters.
[0138] Furthermore, for example, the circuit derives a third parameter using the first parameter as a denominator and the second parameter as a numerator, and generates the predicted image using the third parameter.
[0139] Thereby, the decoding device can appropriately generate a predicted image using parameters derived based on the relationship between a plurality of parameters.
[0140] In addition, for example, for each of the above-mentioned multiple relative pixel positions, the above-mentioned circuit derives the gradient value of the relative pixel position in the above-mentioned first range and the gradient value of the relative pixel position in the above-mentioned second range through a 3-tap filter having a filter coefficient set of [-1, 0, 1].
[0141] This allows the decoding device to easily and appropriately derive the gradient value at each pixel position.
[0142] Furthermore, for example, the current block is a sub-block determined in a coding unit with a size of 4×4 pixels, and the circuit derives the first parameter and the second parameter in units of the sub-block.
[0143] This allows the decoding device to appropriately generate a predicted image using a plurality of parameters determined in a 4×4 pixel size.
[0144] In addition, for example, in an encoding method of one aspect of the present invention, a gradient and an absolute value are respectively derived for a plurality of relative pixel positions, the plurality of relative pixel positions being a plurality of pixel positions commonly and relatively determined for a first range of a first reference block including a current block and a second range of a second reference block including the current block, and being a plurality of pixel positions in each of the first range and the second range, the gradient and the absolute value being an absolute value of the sum of the gradient value of the relative pixel position in the first range and the gradient value of the relative pixel position in the second range, the sum of the plurality of gradients and the absolute values derived for the plurality of relative pixel positions being derived as a first parameter, and the plurality of relative pixel positions being derived for the plurality of relative pixel positions. For each of the plurality of relative pixel positions, a difference between the pixel value of the relative pixel position in the first range and the pixel value of the relative pixel position in the second range, i.e., a pixel differential value, is derived; for each of the plurality of relative pixel positions, according to the positive and negative signs of the gradient value of the relative pixel position in the first range and the gradient value of the relative pixel position in the second range, i.e., the gradient sum, the positive and negative signs of the pixel differential value derived for the relative pixel position are reversed or maintained; the sum of the plurality of pixel differential values respectively derived for the plurality of relative pixel positions and having their positive and negative signs reversed or maintained is derived as a second parameter; and a predicted image used in encoding the current block is generated using the first parameter and the second parameter.
[0145] This makes it possible to reduce substantial multiplications with a large amount of calculation in calculations performed at each pixel position, and to derive a plurality of parameters for generating a predicted image with a low amount of calculation. Therefore, the amount of processing in encoding can be reduced.
[0146] In addition, for example, a decoding method according to one aspect of the present invention derives gradients and absolute values for a plurality of relative pixel positions, respectively. The plurality of relative pixel positions are a plurality of pixel positions that are commonly and relatively determined for a first range of a first reference block including a current block and a second range of a second reference block including the current block, and are a plurality of pixel positions in each of the first range and the second range. The gradients and absolute values are the absolute values of the sum of the gradient values of the relative pixel positions in the first range and the gradient values of the relative pixel positions in the second range. The sum of the plurality of gradients and absolute values derived for the plurality of relative pixel positions is derived as a first parameter. For each of the plurality of relative pixel positions, a difference between the pixel value of the relative pixel position in the first range and the pixel value of the relative pixel position in the second range, i.e., a pixel differential value, is derived; for each of the plurality of relative pixel positions, according to the positive and negative signs of the gradient value of the relative pixel position in the first range and the gradient value of the relative pixel position in the second range, i.e., the gradient sum, the positive and negative signs of the pixel differential value derived for the relative pixel position are reversed or maintained; the sum of the plurality of pixel differential values respectively derived for the plurality of relative pixel positions and having their positive and negative signs reversed or maintained is derived as a second parameter; and the first parameter and the second parameter are used to generate a predicted image used in decoding the current block.
[0147] This makes it possible to reduce substantial multiplications with a large amount of calculation in calculations performed at each pixel position, and to derive a plurality of parameters for generating a predicted image with a low amount of calculation. Therefore, the amount of processing in decoding can be reduced.
[0148] Alternatively, for example, an encoding device according to one aspect of the present invention is an encoding device that encodes a moving image using a predicted image, and includes a partitioning unit, an intra-frame prediction unit, an inter-frame prediction unit, a transform unit, a quantization unit, and an entropy encoding unit.
[0149] The segmentation unit segments a target picture constituting the moving image into a plurality of blocks. The intra prediction unit performs intra prediction for generating the predicted image of the target block in the target picture using a reference image in the target picture. The inter prediction unit performs inter prediction for generating the predicted image of the target block using a reference image in a reference picture different from the target picture.
[0150] The transform unit transforms a prediction error signal between the prediction image generated by the intra prediction unit or the inter prediction unit and the image of the encoding target block to generate a transform coefficient signal of the encoding target block. The quantization unit quantizes the transform coefficient signal. The entropy coding unit encodes the quantized transform coefficient signal.
[0151] In addition, for example, the inter-frame prediction unit derives gradients and absolute values for a plurality of relative pixel positions, respectively. The plurality of relative pixel positions are a plurality of pixel positions that are commonly and relatively determined for a first range of a first reference block including a current block and a second range of a second reference block including the current block, and are a plurality of pixel positions in each of the first range and the second range. The gradients and absolute values are absolute values of the sum of the gradient values of the relative pixel positions in the first range and the gradient values of the relative pixel positions in the second range. The sum of the plurality of gradients and absolute values derived for the plurality of relative pixel positions is derived as a first parameter, and for each of the plurality of relative pixel positions, the first parameter is derived. , derive the difference between the pixel value of the relative pixel position in the first range and the pixel value of the relative pixel position in the second range, that is, the pixel differential value; for each of the plurality of relative pixel positions, according to the positive and negative signs of the gradient value of the relative pixel position in the first range and the gradient value of the relative pixel position in the second range, that is, the gradient sum, reverse or maintain the positive and negative signs of the pixel differential value derived for the relative pixel position; derive the sum of the plurality of pixel differential values respectively derived for the plurality of relative pixel positions and with the positive and negative signs reversed or maintained as the second parameter; and generate a predicted image used in encoding the current block using the first parameter and the second parameter.
[0152] Alternatively, for example, a decoding device according to one embodiment of the present invention is a decoding device that decodes a moving image using a predicted image, and includes an entropy decoding unit, an inverse quantization unit, an inverse transform unit, an intra-frame prediction unit, an inter-frame prediction unit, and an addition unit (reconstruction unit).
[0153] The entropy decoding unit decodes a quantized transform coefficient signal of a decoding target block in a decoding target picture constituting the moving image. The inverse quantization unit inversely quantizes the quantized transform coefficient signal. The inverse transform unit inversely transforms the transform coefficient signal to obtain a prediction error signal of the decoding target block.
[0154] The intra prediction unit performs intra prediction for generating the predicted image of the decoding target block using a reference image in the decoding target picture. The inter prediction unit performs inter prediction for generating the predicted image of the decoding target block using a reference image in a reference picture different from the decoding target picture. The adding unit adds the predicted image generated by the intra prediction unit or the inter prediction unit and the prediction error signal to reconstruct the image of the decoding target block.
[0155] In addition, for example, the inter-frame prediction unit derives gradients and absolute values for a plurality of relative pixel positions, respectively. The plurality of relative pixel positions are a plurality of pixel positions that are commonly and relatively determined for a first range of a first reference block including a current block and a second range of a second reference block including the current block, and are a plurality of pixel positions in each of the first range and the second range. The gradients and absolute values are absolute values of the sum of the gradient values of the relative pixel positions in the first range and the gradient values of the relative pixel positions in the second range. The sum of the plurality of gradients and absolute values derived for the plurality of relative pixel positions is derived as a first parameter, and for each of the plurality of relative pixel positions, the first parameter is derived. , derive the difference between the pixel value of the relative pixel position in the first range and the pixel value of the relative pixel position in the second range, that is, the pixel differential value; for each of the plurality of relative pixel positions, according to the positive and negative signs of the gradient value of the relative pixel position in the first range and the gradient value of the relative pixel position in the second range, that is, the gradient sum, reverse or maintain the positive and negative signs of the pixel differential value derived for the relative pixel position; derive the sum of the plurality of pixel differential values respectively derived for the plurality of relative pixel positions and with the positive and negative signs respectively reversed or maintained as the second parameter; and generate a predicted image used in decoding the current block using the first parameter and the second parameter.
[0156] Moreover, these inclusive or specific forms may also be implemented by systems, devices, methods, integrated circuits, computer programs, or non-temporary recording media such as computer-readable CD-ROMs, or by any combination of systems, devices, methods, integrated circuits, computer programs, and recording media.
[0157] The following embodiments are described in detail with reference to the accompanying drawings. In addition, the embodiments described below all represent inclusive or specific examples. The numerical values, shapes, materials, components, configuration positions and connection forms of components, steps, relationships and sequences of steps, etc. shown in the following embodiments are examples and are not intended to limit the claims.
[0158] The following describes implementations of a coding device and a decoding device. The implementations are examples of coding devices and decoding devices to which the processing and / or structures described in each form of the present invention can be applied. The processing and / or structures can also be implemented in coding devices and decoding devices different from the implementations. For example, with respect to the processing and / or structures applied to the implementations, for example, one of the following can also be performed.
[0159] (1) Any of the multiple components of the encoding device or decoding device of the embodiment described in each aspect of the present invention may be replaced by another component described in any of the aspects of the present invention, or these components may be combined;
[0160] (2) In the coding device or decoding device of the embodiment, any changes such as addition, replacement, deletion, etc. of functions or processes performed by some of the multiple components of the coding device or decoding device may be made. For example, any function or process may be replaced by another function or process described in any of the embodiments of the present invention, or they may be combined;
[0161] (3) In the method implemented by the encoding device or decoding device of the embodiment, any changes such as addition, replacement, deletion, etc. may be made to a part of the multiple processes included in the method. For example, any process in the method may be replaced by another process described in any of the various aspects of the present invention, or they may be combined;
[0162] (4) Some of the multiple components constituting the encoding device or decoding device of the embodiment may be combined with a component described in any of the aspects of the present invention, may be combined with a component having a part of the function described in any of the aspects of the present invention, or may be combined with a component that implements a part of the processing implemented by the component described in any of the aspects of the present invention.
[0163] (5) A component having a part of the functions of the encoding device or decoding device of the embodiment, or a component implementing a part of the processing of the encoding device or decoding device of the embodiment, is combined with or replaced with a component described in any of the aspects of the present invention, a component having a part of the functions described in any of the aspects of the present invention, or a component implementing a part of the processing described in any of the aspects of the present invention;
[0164] (6) In a method implemented by an encoding device or a decoding device of an embodiment, one of a plurality of processes included in the method is replaced with one of the processes described in each aspect of the present invention or a similar process, or a combination of these processes;
[0165] (7) Some of the multiple processes included in the method implemented by the encoding device or decoding device of the embodiment may be combined with the process described in any of the aspects of the present invention.
[0166] (8) The implementation of the processing and / or structure described in each aspect of the present invention is not limited to the encoding device or decoding device of the embodiment. For example, the processing and / or structure may also be implemented in a device used for a purpose different from the motion picture encoding or motion picture decoding disclosed in the embodiment.
[0167] [Encoding device]
[0168] First, the encoding device according to the embodiment will be described. Figure 1 1 is a block diagram showing a functional structure of a coding device 100 according to an embodiment. The coding device 100 is a moving picture coding device that codes a moving picture in units of blocks.
[0169] like Figure 1 As shown, the encoding device 100 is a device that encodes an image in block units, and includes a segmentation unit 102, a subtraction unit 104, a transformation unit 106, a quantization unit 108, an entropy coding unit 110, an inverse quantization unit 112, an inverse transformation unit 114, an addition unit 116, a block memory 118, a loop filter unit 120, a frame memory 122, an intra-frame prediction unit 124, an inter-frame prediction unit 126 and a prediction control unit 128.
[0170] The encoding device 100 is implemented by, for example, a general-purpose processor and a memory. In this case, when the software program stored in the memory is executed by the processor, the processor functions as the segmentation unit 102, the subtraction unit 104, the transformation unit 106, the quantization unit 108, the entropy coding unit 110, the inverse quantization unit 112, the inverse transformation unit 114, the addition unit 116, the loop filter unit 120, the intra-frame prediction unit 124, the inter-frame prediction unit 126, and the prediction control unit 128. In addition, the encoding device 100 may be implemented as one or more dedicated electronic circuits corresponding to the segmentation unit 102, the subtraction unit 104, the transformation unit 106, the quantization unit 108, the entropy coding unit 110, the inverse quantization unit 112, the inverse transformation unit 114, the addition unit 116, the loop filter unit 120, the intra-frame prediction unit 124, the inter-frame prediction unit 126, and the prediction control unit 128.
[0171] Hereinafter, after describing the overall processing flow of the encoding device 100 , each component included in the encoding device 100 will be described.
[0172] [Overall flow of encoding processing]
[0173] Figure 2 : is a flowchart showing an example of the overall encoding process performed by the encoding device 100.
[0174] First, the segmentation unit 102 of the encoding device 100 segments each picture included in the input image as a moving image into a plurality of fixed-size blocks (for example, 128×128 pixels) (step Sa_1). Then, the segmentation unit 102 selects a segmentation pattern (also referred to as a block shape) for the fixed-size block (step Sa_2). That is, the segmentation unit 102 further segments the fixed-size block into a plurality of blocks constituting the selected segmentation pattern. Then, the encoding device 100 performs the processing of steps Sa_3 to Sa_9 on each of the plurality of blocks (that is, the encoding target block).
[0175] That is, the prediction processing unit composed of all or part of the intra-frame prediction unit 124, the inter-frame prediction unit 126 and the prediction control unit 128 generates a prediction signal (also called a prediction block) of the encoding object block (also called the current block) (step Sa_3).
[0176] Next, the subtraction unit 104 generates a difference between the encoding target block and the prediction block as a prediction residual (also referred to as a difference block) (step Sa_4).
[0177] Next, the transform unit 106 and the quantization unit 108 transform and quantize the difference block to generate a plurality of quantized coefficients (step Sa_5). In addition, a block composed of a plurality of quantized coefficients is also called a coefficient block.
[0178] Next, the entropy coding unit 110 generates a coded signal by encoding the coefficient block and prediction parameters related to the generation of the prediction signal (specifically, entropy coding) (step Sa_6). In addition, the coded signal is also called a coded bit stream, a compressed bit stream or a stream.
[0179] Next, the inverse quantization unit 112 and the inverse transformation unit 114 restore a plurality of prediction residuals (ie, difference blocks) by inverse quantizing and inverse transforming the coefficient blocks (step Sa_7).
[0180] Next, the adding unit 116 reconstructs the current block into a reconstructed image (also referred to as a reconstructed block or a decoded image block) by adding the prediction block to the restored difference block (step Sa_8). Thus, a reconstructed image is generated.
[0181] When the reconstructed image is generated, the loop filter unit 120 filters the reconstructed image as necessary (step Sa_9).
[0182] Then, the encoding device 100 determines whether encoding of the entire picture is completed (step Sa_10 ), and when it is determined that encoding is not completed (No in step Sa_10 ), it repeats the processing from step Sa_2 .
[0183] In addition, in the above example, the encoding device 100 selects one partition pattern for a block of a fixed size and encodes each block according to the partition pattern, but each block may be encoded according to each of a plurality of partition patterns. In this case, the encoding device 100 may evaluate the cost for each of the plurality of partition patterns, and may select, for example, a coded signal obtained by encoding according to the partition pattern with the minimum cost as the output coded signal.
[0184] As shown in the figure, the processes of steps Sa_1 to Sa_10 are sequentially performed by the encoding device 100. Alternatively, a part of a plurality of these processes may be performed in parallel, or the order of these processes may be reversed.
[0185] [Division]
[0186] The segmentation unit 102 segments each picture included in the input motion image into a plurality of blocks, and outputs each block to the subtraction unit 104. For example, the segmentation unit 102 first segments the picture into blocks of a fixed size (e.g., 128×128). Other fixed block sizes may also be used. The fixed-size block is sometimes called a coding tree unit (CTU). Furthermore, the segmentation unit 102 segments each fixed-size block into blocks of a variable size (e.g., less than 64×64) based on, for example, recursive quadtree and / or binary tree block segmentation. That is, the segmentation unit 102 selects a segmentation pattern. The variable-size block is sometimes called a coding unit (CU), a prediction unit (PU), or a transform unit (TU). In addition, in various processing examples, it is not necessary to distinguish between CU, PU, and TU, and a part or all of the blocks in the picture may be used as processing units of CU, PU, or TU.
[0187] Figure 3 1 is a conceptual diagram showing an example of block division in an implementation mode. Figure 3 In FIG, the solid line represents the block boundary based on the quadtree block partition, and the dotted line represents the block boundary based on the binary tree block partition.
[0188] Here, the block 10 is a square block of 128×128 pixels (128×128 block). The 128×128 block 10 is first divided into four square 64×64 blocks (quadtree block division).
[0189] The upper left 64×64 block is further divided vertically into two rectangular 32×64 blocks, and the left 32×64 block is further divided vertically into two rectangular 16×64 blocks (binary tree block division). As a result, the upper left 64×64 block is divided into two 16×64 blocks 11, 12 and a 32×64 block 13.
[0190] The upper right 64×64 block is horizontally partitioned into two rectangular 64×32 blocks 14 and 15 (binary tree block partitioning).
[0191] The 64×64 block at the bottom left is divided into four square 32×32 blocks (quadtree block division). The upper left block and the lower right block of the four 32×32 blocks are further divided. The upper left 32×32 block is vertically divided into two rectangular 16×32 blocks, and the 16×32 block on the right is further horizontally divided into two 16×16 blocks (binary tree block division). The lower right 32×32 block is horizontally divided into two 32×16 blocks (binary tree block division). As a result, the lower left 64×64 block is divided into a 16×32 block 16, two 16×16 blocks 17, 18, two 32×32 blocks 19, 20, and two 32×16 blocks 21, 22.
[0192] The lower right 64×64 block 23 is not split.
[0193] As above, in Figure 3 In FIG. 1 , block 10 is divided into 13 blocks 11 to 23 of variable size based on recursive quad-tree and binary tree block division. This type of division is sometimes called QTBT (quad-tree plus binary tree) division.
[0194] In addition, Figure 3 In the example, one block is divided into four or two blocks (quadtree or binary tree block division), but the division is not limited to these. For example, one block can also be divided into three blocks (ternary tree division). The division including such ternary tree division is called MBT (multi type tree) division.
[0195] [Structural slices / tiles of the image]
[0196] In order to decode pictures in parallel, pictures may be constructed in slice units or tile units. Pictures constructed in slice units or tile units may be constructed by the partitioning unit 102.
[0197] A slice is a basic coding unit constituting a picture. A picture is composed of, for example, one or more slices. In addition, a slice is composed of one or more continuous CTUs (Coding Tree Units).
[0198] Figure 4AThis is a conceptual diagram showing an example of the structure of a slice. For example, a picture includes 11×8 CTUs and is divided into 4 slices (slices 1 to 4). Slice 1 consists of 16 CTUs, slice 2 consists of 21 CTUs, slice 3 consists of 29 CTUs, and slice 4 consists of 22 CTUs. Here, each CTU in the picture belongs to any slice. The shape of the slice becomes a shape that divides the picture in the horizontal direction. The boundary of the slice does not need to be the end of the picture, but can be any position in the boundary of the CTU in the picture. The processing order (encoding order or decoding order) of the CTU in the slice is, for example, a raster scan order. In addition, the slice includes header information and encoded data. The header information may also record the characteristics of the slice, such as the CTU address at the beginning of the slice and the slice type.
[0199] A tile is a unit of a rectangular area constituting a picture, and a number called TileId may be assigned to each tile in a raster scan order.
[0200] Figure 4B This is a conceptual diagram showing an example of a tile structure. For example, a picture includes 11×8 CTUs and is divided into four rectangular area tiles (tiles 1 to 4). When tiles are used, the processing order of CTUs is changed compared to when tiles are not used. When tiles are not used, multiple CTUs in a picture are processed in raster scan order. When tiles are used, at least one CTU in each of the multiple tiles is processed in raster scan order. For example, Figure 4B As shown, the processing order of multiple CTUs included in tile 1 is from the left end of the 1st row of tile 1 to the right end of the 1st row of tile 1, and then from the left end of the 2nd row of tile 1 to the right end of the 2nd row of tile 1.
[0201] In addition, one tile may include more than one slice, and one slice may include more than one tile.
[0202] [Subtraction Department]
[0203] The subtracting unit 104 subtracts the prediction signal (the prediction sample input from the prediction control unit 128 shown below) from the original signal (original sample) in units of blocks input from the dividing unit 102 and divided by the dividing unit 102. That is, the subtracting unit 104 calculates the prediction error (also referred to as residual) of the encoding target block (hereinafter referred to as the current block). Then, the subtracting unit 104 outputs the calculated prediction error (residual) to the transforming unit 106.
[0204] The original signal is an input signal of the encoding device 100 and is a signal representing an image of each picture constituting a moving image (for example, a luminance (luma) signal and two color difference (chroma) signals). Hereinafter, the signal representing an image may be referred to as a sample.
[0205] [Conversion Department]
[0206] The transform unit 106 transforms the prediction error in the spatial domain into a transform coefficient in the frequency domain, and outputs the transform coefficient to the quantization unit 108. Specifically, the transform unit 106 performs a predetermined discrete cosine transform (DCT) or discrete sine transform (DST) on the prediction error in the spatial domain. The predetermined DCT or DST may be predetermined.
[0207] In addition, the transform unit 106 may adaptively select a transform type from a plurality of transform types, and transform the prediction error into a transform coefficient using a transform basis function corresponding to the selected transform type. Such a transform is sometimes called EMT (explicit multiple core transform) or AMT (adaptive multiple transform).
[0208] The plurality of transform types include, for example, DCT-II, DCT-V, DCT-VIII, DST-I, and DST-VII. Figure 5A is a table showing the transformation basis functions corresponding to the transformation type examples. Figure 5A In , N represents the number of input pixels. The selection of a transform type from among these multiple transform types may depend on the type of prediction (intra-frame prediction and inter-frame prediction) or the intra-frame prediction mode, for example.
[0209] Information indicating whether such EMT or AMT is applied (e.g., called an EMT flag or an AMT flag) and information indicating the selected transform type are usually signaled at the CU level. In addition, the signaling of such information is not necessarily limited to the CU level, but may be other levels (e.g., a bit sequence level, a picture level, a slice level, a tile level, or a CTU level).
[0210] In addition, the transformation unit 106 may also re-transform the transformation coefficients (transformation results). Such re-transformation is sometimes called AST (adaptive secondary transform) or NSST (non-separable secondary transform). For example, the transformation unit 106 re-transforms each sub-block (for example, 4×4 sub-blocks) contained in the block of transformation coefficients corresponding to the intra-frame prediction error. Information indicating whether NSST is applied and information related to the transformation matrix used in NSST are usually signaled at the CU level. In addition, the signaling of this information does not need to be limited to the CU level, but can also be other levels (for example, sequence level, picture level, slice level, tile level or CTU level).
[0211] Separable transformation and Non-Separable transformation can also be applied in the transformation unit 106. Separable transformation refers to a method of performing multiple transformations in each direction equivalent to the number of dimensions of the input. Non-Separable transformation refers to a method of treating two or more dimensions as one dimension and transforming them together when the input is multi-dimensional.
[0212] For example, as an example of Non-Separable transformation, when a 4×4 block is input, it is considered as an array having 16 elements, and the array is transformed using a 16×16 transformation matrix.
[0213] In a further example of the Non-Separable transformation, a 4×4 input block may be regarded as an array of 16 elements, and then a transformation (Hypercube Givens Transform) may be performed by performing a plurality of Givens rotations on the array.
[0214] In the transformation in the transformation unit 106, the type of basis to be transformed into the frequency domain can be switched according to the region in the CU. As an example, there is SVT (Spatially Varying Transform). In SVT, Figure 5BAs shown, the CU is divided into two equal parts in the horizontal or vertical direction, and only the area on one side is transformed into the frequency area. The type of transformation base can be set for each area, for example, DST7 and DCT8 are used. In this example, only one of the two areas in the CU is transformed, and the other is not transformed, but both areas can also be transformed. In addition, the division method is not limited to two equal parts, but can be more flexible, such as four equal parts or encoding the information representing the division separately, and signaling it in the same way as the CU division. In addition, SVT is sometimes referred to as SBT (Sub-block Transform).
[0215] [Quantitative Department]
[0216] The quantization unit 108 quantizes the transform coefficients output from the transform unit 106. Specifically, the quantization unit 108 scans the transform coefficients of the current block in a predetermined scanning order, and quantizes the transform coefficients based on the quantization parameters (QP) corresponding to the scanned transform coefficients. In addition, the quantization unit 108 outputs the quantized transform coefficients of the current block (hereinafter referred to as quantized coefficients) to the entropy coding unit 110 and the inverse quantization unit 112. The predetermined scanning order may also be predetermined.
[0217] The predetermined scanning order is the order used for quantization / inverse quantization of transform coefficients. For example, the predetermined scanning order may be defined in ascending order (from low frequency to high frequency) or descending order (from high frequency to low frequency) of frequency.
[0218] The quantization parameter (QP) refers to a parameter that defines the quantization step size (quantization width). For example, if the value of the quantization parameter increases, the quantization step size also increases. That is, if the value of the quantization parameter increases, the quantization error increases.
[0219] In addition, quantization matrices are sometimes used in quantization. For example, multiple quantization matrices are sometimes used corresponding to frequency transform sizes such as 4×4 and 8×8, prediction modes such as intra-frame prediction and inter-frame prediction, and pixel components such as brightness and color difference. In addition, quantization refers to digitizing values sampled at specified intervals in correspondence with specified levels. In this technical field, other expressions such as rounding, rounding, and scaling can also be used for reference, and rounding, rounding, and scaling can also be used. The specified intervals and levels can also be predetermined.
[0220] As a method of using a quantization matrix, there are a method of using a quantization matrix directly set on the encoding device side and a method of using a default quantization matrix (default matrix). On the encoding device side, by directly setting the quantization matrix, a quantization matrix corresponding to the characteristics of the image can be set. However, in this case, there is a disadvantage that the encoding amount increases due to the encoding of the quantization matrix.
[0221] On the other hand, there is also a method of performing quantization so that the coefficients of high-frequency components and low-frequency components are the same without using a quantization matrix. This method is equivalent to a method of using a quantization matrix (flat matrix) in which all coefficients have the same value.
[0222] The quantization matrix can be specified by, for example, an SPS (Sequence Parameter Set) or a PPS (Picture Parameter Set). The SPS contains parameters used for a sequence, and the PPS contains parameters used for a picture. The SPS and PPS are sometimes referred to as parameter sets.
[0223] [Entropy coding unit]
[0224] The entropy coding unit 110 generates a coded signal (coded bit stream) based on the quantization coefficient input from the quantization unit 108. Specifically, the entropy coding unit 110 binarizes the quantization coefficient, performs arithmetic coding on the binary signal, and outputs a compressed bit stream or sequence.
[0225] [Inverse Quantization Unit]
[0226] The inverse quantization unit 112 inversely quantizes the quantized coefficients input from the quantization unit 108. Specifically, the inverse quantization unit 112 inversely quantizes the quantized coefficients of the current block in a predetermined scanning order. Furthermore, the inverse quantization unit 112 outputs the inversely quantized transform coefficients of the current block to the inverse transform unit 114. The predetermined scanning order may also be predetermined.
[0227] [Inverse transformation unit]
[0228] The inverse transform unit 114 restores the prediction error (residual) by inverse transforming the transform coefficients input from the inverse quantization unit 112. Specifically, the inverse transform unit 114 restores the prediction error of the current block by performing an inverse transform corresponding to the transform performed by the transform unit 106 on the transform coefficients. Then, the inverse transform unit 114 outputs the restored prediction error to the addition unit 116.
[0229] In addition, the restored prediction error usually loses information due to quantization, and therefore does not match the prediction error calculated by the subtraction unit 104. In other words, the restored prediction error usually includes a quantization error.
[0230] [Addition Department]
[0231] The adder 116 reconstructs the current block by adding the prediction error input from the inverse transform unit 114 and the prediction sample input from the prediction control unit 128. Then, the adder 116 outputs the reconstructed block to the block memory 118 and the loop filter unit 120. The reconstructed block is sometimes called a local decoding block.
[0232] [Block Memory]
[0233] The block memory 118 is a storage unit for storing blocks in a picture to be coded (referred to as a current picture) to be referred to in intra prediction, for example. Specifically, the block memory 118 stores the reconstructed blocks output from the adder 116 .
[0234] [Frame Memory]
[0235] The frame memory 122 is a storage unit for storing reference pictures used in inter-frame prediction, and is sometimes referred to as a frame buffer. Specifically, the frame memory 122 stores the reconstructed blocks filtered by the loop filter unit 120 .
[0236] [Loop filter section]
[0237] The loop filter unit 120 performs loop filtering on the block reconstructed by the adder unit 116, and outputs the filtered reconstructed block to the frame memory 122. Loop filtering refers to filtering used within a coding loop (in-loop filtering), such as deblocking filtering (DF or DBF), sample adaptive offset (SAO), and adaptive loop filtering (ALF).
[0238] In ALF, a least square error filter is used to remove coding distortion. For example, for each 2×2 sub-block in the current block, one filter is selected from a plurality of filters based on the direction and activity of the local gradient.
[0239] Specifically, first, the sub-blocks (e.g., 2×2 sub-blocks) are classified into multiple classes (e.g., 15 or 25 classes). The classification of the sub-blocks is performed based on the direction and activity of the gradient. For example, using the direction value D of the gradient (e.g., 0 to 2 or 0 to 4) and the activity value A of the gradient (e.g., 0 to 4), the classification value C (e.g., C=5D+A) is calculated. And, based on the classification value C, the sub-blocks are classified into multiple classes.
[0240] The gradient direction value D is derived, for example, by comparing gradients in multiple directions (eg, horizontal, vertical, and two diagonal directions). In addition, the gradient activity value A is derived, for example, by adding the gradients in multiple directions and quantizing the added result.
[0241] Based on the result of such classification, a filter to be used for a sub-block is determined from among a plurality of filters.
[0242] As the shape of the filter used in the ALF, for example, a circularly symmetric shape is used. Figure 6A to Figure 6C The diagrams show a plurality of examples of filter shapes used in ALF. Fig. 6Arepresents a 5×5 diamond-shaped filter, Figure 6B represents a 7×7 diamond shape filter, Figure 6C Represents a 9×9 diamond shape filter. The information representing the shape of the filter is usually signaled at the picture level. In addition, the signaling of the information representing the shape of the filter does not need to be limited to the picture level, and can also be other levels (for example, sequence level, slice level, tile level, CTU level or CU level).
[0243] The on / off of ALF can also be determined at the picture level or CU level. For example, regarding brightness, whether to use ALF can be determined at the CU level, and regarding color difference, whether to use ALF can be determined at the picture level. Information indicating whether ALF is on / off is usually signaled at the picture level or CU level. In addition, the signaling of information indicating whether ALF is on / off does not need to be limited to the picture level or CU level, and can also be other levels (for example, sequence level, slice level, tile level, or CTU level).
[0244] The coefficient sets of the selectable multiple filters (e.g., filters up to 15 or 25) are usually signaled at the picture level. In addition, the signaling of the coefficient set does not need to be limited to the picture level, and can also be other levels (e.g., sequence level, slice level, tile level, CTU level, CU level, or sub-block level).
[0245] [Loop filter section > Deblocking filter]
[0246] In the deblocking filter, the loop filter unit 120 performs filtering processing on block boundaries of the reconstructed image to reduce distortion generated at the block boundaries.
[0247] Figure 7 1 is a block diagram showing an example of a detailed configuration of the loop filter unit 120 that functions as a deblocking filter.
[0248] The loop filter unit 120 includes a boundary determination unit 1201 , a filter determination unit 1203 , a filter processing unit 1205 , a processing determination unit 1208 , a filter characteristic determination unit 1207 , and switches 1202 , 1204 , and 1206 .
[0249] The boundary determination unit 1201 determines whether there is a pixel (ie, a target pixel) to be subjected to the deblocking filtering process near the block boundary, and then outputs the determination result to the switch 1202 and the process determination unit 1208 .
[0250] When the boundary determination unit 1201 determines that the target pixel exists near the block boundary, the switch 1202 outputs the image before filtering to the switch 1204. On the other hand, when the boundary determination unit 1201 determines that the target pixel does not exist near the block boundary, the switch 1202 outputs the image before filtering to the switch 1206.
[0251] The filter determination unit 1203 determines whether to perform deblocking filtering on the target pixel based on the pixel value of at least one surrounding pixel located around the target pixel, and then outputs the determination result to the switch 1204 and the processing determination unit 1208 .
[0252] When the filter determination unit 1203 determines that the deblocking filter process is to be performed on the target pixel, the switch 1204 outputs the image before the filtering process obtained via the switch 1202 to the filtering process unit 1205. On the contrary, when the filter determination unit 1203 determines that the deblocking filter process is not to be performed on the target pixel, the switch 1204 outputs the image before the filtering process obtained via the switch 1202 to the switch 1206.
[0253] When the image before filtering is obtained via switches 1202 and 1204 , the filter processing unit 1205 performs a deblocking filter process on the target pixel using the filter characteristics determined by the filter characteristic determination unit 1207 . Then, the filter processing unit 1205 outputs the filtered pixel to the switch 1206 .
[0254] According to the control of the processing determination unit 1208 , the switch 1206 selectively outputs pixels that have not been processed by the deblocking filter and pixels that have been processed by the deblocking filter by the filter processing unit 1205 .
[0255] The processing determination unit 1208 controls the switch 1206 based on the respective determination results of the boundary determination unit 1201 and the filter determination unit 1203. That is, when the boundary determination unit 1201 determines that the target pixel exists near the block boundary and the filter determination unit 1203 determines that the deblocking filter process is performed on the target pixel, the processing determination unit 1208 outputs the pixel after the deblocking filter process from the switch 1206. In addition, in cases other than the above, the processing determination unit 1208 outputs the pixel that has not been deblocked / filtered from the switch 1206. By repeatedly outputting such pixels, the image after the filtering process is output from the switch 1206.
[0256] Figure 8 This is a conceptual diagram showing an example of a deblocking filter having a filter characteristic that is symmetric with respect to a block boundary.
[0257] In the deblocking filter processing, for example, using the pixel value and the quantization parameter, one of two deblocking filters with different characteristics, that is, a strong filter and a weak filter, is selected. Figure 8 As shown, when pixels p0 to p2 and pixels q0 to q2 exist across a block boundary, the pixel values of pixels q0 to q2 are changed to pixel values q'0 to q'2 by performing calculations shown in the following equations, for example.
[0258] q'0=(p1+2×p0+2×q0+2×q1+q2+4) / 8
[0259] q'1=(p0+q0+q1+q2+2) / 4
[0260] q'2=(p0+q0+q1+3×q2+2×q3+4) / 8
[0261] In the above equations, p0 to p2 and q0 to q2 are pixel values of pixels p0 to p2 and pixels q0 to q2, respectively. In addition, q3 is the pixel value of pixel q3 adjacent to pixel q2 on the side opposite to the block boundary. In addition, on the right side of each of the above equations, the coefficient multiplied by the pixel value of each pixel used in the deblocking filter processing is the filter coefficient.
[0262] Furthermore, in the deblocking filter process, a clipping process may be performed in a manner that the pixel value after the operation does not exceed a threshold value. In the clipping process, the pixel value after the operation based on the above formula is clipped to "the pixel value of the operation object ± 2 × the threshold value" using a threshold value determined according to the quantization parameter. This can prevent excessive smoothing.
[0263] Fig. 9 This is a conceptual diagram for explaining the block boundary on which the deblocking filtering process is performed. Fig.10 This is a conceptual diagram showing an example of the Bs value.
[0264] The block boundary for deblocking filtering is, for example, Fig. 9 The PU (Prediction Unit) or TU (Transform Unit) boundary of the 8×8 pixel block shown in FIG. Deblocking filtering can be performed in units of 4 rows or 4 columns. First, for Fig. 9 The block P and block Q shown are as follows: Fig.10 That determines the Bs (Boundary Strength) value.
[0265] according to Fig.10The Bs value determines whether to perform deblocking filtering of different strengths even at block boundaries belonging to the same image. When the Bs value is 2, deblocking filtering is performed on the color difference signal. When the Bs value is 1 or more and meets the specified conditions, deblocking filtering is performed on the brightness signal. The specified conditions can also be predetermined. In addition, the determination condition of the Bs value is not limited to Fig.10 The conditions shown may also be determined based on other parameters.
[0266] [Prediction processing unit (intra-frame prediction unit / inter-frame prediction unit / prediction control unit)]
[0267] Fig.11 1 is a flowchart showing an example of processing performed by the prediction processing unit of the encoding device 100. The prediction processing unit is composed of all or part of the components of the intra prediction unit 124, the inter prediction unit 126, and the prediction control unit 128.
[0268] The prediction processing unit generates a prediction image of the current block (step Sb_1). The prediction image is also called a prediction signal or a prediction block. In addition, the prediction signal includes, for example, an intra-frame prediction signal or an inter-frame prediction signal. Specifically, the prediction processing unit generates a prediction image of the current block using a reconstructed image obtained by generating a prediction block, generating a difference block, generating a coefficient block, restoring a difference block, and generating a decoded image block.
[0269] The reconstructed image may be, for example, an image of a reference picture, or may be a picture including the current block, that is, an image of an encoded block in the current picture. The encoded block in the current picture may be, for example, an adjacent block of the current block.
[0270] Fig.12 This is a flowchart showing another example of the processing performed by the prediction processing unit of the encoding device 100.
[0271] The prediction processing unit generates a prediction image by the first method (step Sc_1a), generates a prediction image by the second method (step Sc_1b), and generates a prediction image by the third method (step Sc_1c). The first method, the second method, and the third method are different methods for generating prediction images, and may be, for example, an inter-frame prediction method, an intra-frame prediction method, and other prediction methods. In such a prediction method, the above-mentioned reconstructed image may also be used.
[0272] Next, the prediction processing unit selects any one of the multiple prediction images generated in steps Sc_1a, Sc_1b and Sc_1c (step Sc_2). The selection of the prediction image, that is, the selection of the method or mode for obtaining the final prediction image, may also be performed by calculating the cost for each prediction image generated and based on the cost. In addition, the selection of the prediction image may be performed based on the parameters used for the encoding process. The encoding device 100 may signal information for determining the selected prediction image, method or mode as a coded signal (also referred to as a coded bit stream). The information may be, for example, a flag, etc. Thus, the decoding device can generate a prediction image in accordance with the method or mode selected in the encoding device 100 based on the information. In addition, in Fig.12 In the example shown, the prediction processing unit selects any one of the prediction images after generating the prediction images by each method. However, before generating these prediction images, the prediction processing unit can select a method or mode based on the parameters used for the above-mentioned encoding process, and can generate the prediction image according to the method or mode.
[0273] For example, the first method and the second method are intra prediction and inter prediction, respectively, and the prediction processing unit may select a final prediction image for the current block from prediction images generated according to these prediction methods.
[0274] Fig.13 This is a flowchart showing another example of the processing performed by the prediction processing unit of the encoding device 100.
[0275] First, the prediction processing unit generates a prediction image by intra prediction (step Sd_1a), and generates a prediction image by inter prediction (step Sd_1b). In addition, the prediction image generated by intra prediction is also called intra prediction image, and the prediction image generated by inter prediction is also called inter prediction image.
[0276] Next, the prediction processing unit evaluates each of the intra-frame prediction image and the inter-frame prediction image (step Sd_2). The cost can also be used in this evaluation. That is, the prediction processing unit calculates the cost C of each of the intra-frame prediction image and the inter-frame prediction image. The cost C can be calculated by an equation of the RD optimization model, such as C=D+λ×R. In this equation, D is the coding distortion of the predicted image, and is represented by, for example, the absolute value of the difference between the pixel value of the current block and the pixel value of the predicted image. In addition, R is the amount of code generated for the predicted image, specifically, the amount of code required for encoding motion information, etc. for generating the predicted image. In addition, λ is, for example, an undetermined multiplier of Lagrange.
[0277] Then, the prediction processing unit selects the prediction image with the minimum cost C calculated from the intra prediction image and the inter prediction image as the final prediction image of the current block (step Sd_3). In other words, the prediction method or mode for generating the prediction image of the current block is selected.
[0278] [Intra-frame prediction unit]
[0279] The intra prediction unit 124 performs intra prediction (also referred to as intra-screen prediction) of the current block with reference to the block in the current picture stored in the block memory 118, thereby generating a prediction signal (intra prediction signal). Specifically, the intra prediction unit 124 generates the intra prediction signal by performing intra prediction with reference to samples (e.g., brightness values and color difference values) of blocks adjacent to the current block, and outputs the intra prediction signal to the prediction control unit 128.
[0280] For example, the intra prediction unit 124 performs intra prediction using one of a plurality of predetermined intra prediction modes. The plurality of intra prediction modes generally include one or more non-directional prediction modes and a plurality of directional prediction modes. The plurality of predetermined modes may also be determined in advance.
[0281] The one or more non-directional prediction modes include, for example, a Planar prediction mode and a DC prediction mode defined in the H.265 / HEVC standard.
[0282] The plurality of directional prediction modes include, for example, 33 directional prediction modes defined by the H.265 / HEVC standard. In addition, the plurality of directional prediction modes may include 32 directional prediction modes in addition to the 33 directional prediction modes (a total of 65 directional prediction modes). Fig.14 This is a conceptual diagram showing all 67 intra prediction modes (2 non-directional prediction modes and 65 directional prediction modes) that can be used in intra prediction. Solid arrows indicate 33 directions specified by the H.265 / HEVC specification, and dotted arrows indicate 32 additional directions (2 non-directional prediction modes in the H.265 / HEVC specification). Fig.14 (not shown in the figure).
[0283] In various processing examples, the luminance block may be referenced in the intra prediction of the chrominance block. That is, the chrominance component of the current block may be predicted based on the luminance component of the current block. Such intra prediction is called CCLM (cross-component linear model) prediction. Such an intra prediction mode of the chrominance block with reference to the luminance block (for example, CCLM mode) may be added as one of the intra prediction modes of the chrominance block.
[0284] The intra prediction unit 124 may also modify the pixel value after intra prediction based on the gradient of the reference pixel in the horizontal / vertical direction. Intra prediction accompanied by such modification is called PDPC (position dependent intraprediction combination). Information indicating whether PDPC is used (e.g., called a PDPC flag) is usually signaled at the CU level. In addition, the signaling of this information does not need to be limited to the CU level, but may also be other levels (e.g., sequence level, picture level, slice level, tile level, or CTU level).
[0285] [Inter-frame prediction unit]
[0286] The inter-frame prediction unit 126 performs inter-frame prediction (also called inter-screen prediction) of the current block with reference to a reference picture different from the current picture stored in the frame memory 122, thereby generating a prediction signal (inter-frame prediction signal). Inter-frame prediction is performed in units of the current block or the current sub-block (e.g., 4×4 block) in the current block. For example, the inter-frame prediction unit 126 performs motion search (motion estimation) in the reference picture for the current block or the current sub-block, and searches for the reference block or sub-block that is most consistent with the current block or the current sub-block. In addition, the inter-frame prediction unit 126 obtains motion information (e.g., motion vector) for compensating for the motion or change from the reference block or sub-block to the current block or sub-block. The inter-frame prediction unit 126 performs motion compensation (or motion prediction) based on the motion information, thereby generating an inter-frame prediction signal for the current block or sub-block. In addition, the inter-frame prediction unit 126 outputs the generated inter-frame prediction signal to the prediction control unit 128.
[0287] The motion information used in motion compensation is signaled as an inter-frame prediction signal in various forms. For example, a motion vector may be signaled. As another example, the difference between a motion vector and a predicted motion vector (motion vector predictor) may be signaled.
[0288] [Basic process of inter-frame prediction]
[0289] Fig.15 This is a flowchart showing an example of a basic flow of inter-frame prediction.
[0290] The inter prediction unit 126 first generates a predicted image (steps Se_1 to Se_3). Next, the subtraction unit 104 generates a difference between the current block and the predicted image as a prediction residual (step Se_4).
[0291] Here, in the generation of the predicted image, the inter-frame prediction unit 126 generates the predicted image by determining the motion vector (MV) of the current block (steps Se_1 and Se_2) and performing motion compensation (step Se_3). In addition, in the determination of the MV, the inter-frame prediction unit 126 determines the MV by selecting a candidate motion vector (candidate MV) (step Se_1) and deriving the MV (step Se_2). The selection of the candidate MV is performed, for example, by selecting at least one candidate MV from a candidate MV list. In addition, in the derivation of the MV, the inter-frame prediction unit 126 may further select at least one candidate MV from the at least one candidate MV and determine the selected at least one candidate MV as the MV of the current block. Alternatively, the inter-frame prediction unit 126 may determine the MV of the current block by searching the area of the reference picture indicated by the candidate MV for each of the selected at least one candidate MV. In addition, the action of searching the area of the reference picture may also be referred to as motion estimation.
[0292] In the above example, steps Se_1 to Se_3 are performed by the inter-frame prediction unit 126 , but processing such as step Se_1 or step Se_2 may be performed by other components included in the encoding device 100 .
[0293] [Flow of deriving motion vectors]
[0294] Fig.16 This is a flowchart showing an example of motion vector derivation.
[0295] The inter-frame prediction unit 126 derives the MV of the current block in a mode of encoding motion information (e.g., MV). In this case, for example, the motion information is encoded as a prediction parameter and is signaled. That is, the encoded motion information is included in the encoded signal (also referred to as an encoded bitstream).
[0296] Alternatively, the inter prediction unit 126 derives the MV in a mode in which the motion information is not encoded. In this case, the motion information is not included in the encoded signal.
[0297] Here, the modes for deriving the MV may also include the normal inter mode, merge mode, FRUC mode, and affine mode described later. Among these modes, the modes for encoding motion information include the normal inter mode, merge mode, and affine mode (specifically, affine inter mode and affine merge mode). In addition, the motion information may include not only the MV but also the predicted motion vector selection information described later. In addition, the modes for not encoding the motion information include the FRUC mode, etc. The inter prediction unit 126 selects a mode for deriving the MV of the current block from these multiple modes, and derives the MV of the current block using the selected mode.
[0298] Fig.17 This is a flowchart showing another example of motion vector derivation.
[0299] The inter-frame prediction unit 126 derives the MV of the current block in a mode of encoding the differential MV. In this case, for example, the differential MV is encoded as a prediction parameter and is signaled. That is, the encoded differential MV is included in the encoded signal. The differential MV is the difference between the MV of the current block and its predicted MV.
[0300] Alternatively, the inter-frame prediction unit 126 derives the MV in a mode in which the difference MV is not encoded. In this case, the encoded difference MV is not included in the encoded signal.
[0301] Here, as described above, the MV derivation modes include the normal inter mode, merge mode, FRUC mode, and affine mode described later. Among these modes, the modes for encoding the differential MV include the normal inter mode and the affine mode (specifically, the affine inter mode). In addition, the modes for not encoding the differential MV include the FRUC mode, the merge mode, and the affine mode (specifically, the affine merge mode). The inter prediction unit 126 selects a mode for deriving the MV of the current block from these multiple modes, and derives the MV of the current block using the selected mode.
[0302] [Flow of deriving motion vectors]
[0303] Fig.18 This is a flowchart showing another example of motion vector derivation. There are multiple modes for MV derivation, i.e., inter-frame prediction modes, which are roughly divided into a mode for encoding the differential MV and a mode for not encoding the differential motion vector. The modes for not encoding the differential MV include the merge mode, the FRUC mode, and the affine mode (specifically, the affine merge mode). The details of these modes will be described later. In short, the merge mode is a mode for deriving the MV of the current block by selecting a motion vector from the surrounding coded blocks, and the FRUC mode is a mode for deriving the MV of the current block by searching between coded areas. In addition, the affine mode is a mode for deriving the motion vectors of each of the multiple sub-blocks constituting the current block as the MV of the current block assuming an affine transformation.
[0304] Specifically, as shown in the figure, when the inter-frame prediction mode information indicates 0 (0 in Sf_1), the inter-frame prediction unit 126 derives a motion vector (Sf_2) based on the merge mode. In addition, when the inter-frame prediction mode information indicates 1 (1 in Sf_1), the inter-frame prediction unit 126 derives a motion vector (Sf_3) according to the FRUC mode. In addition, when the inter-frame prediction mode information indicates 2 (2 in Sf_1), the inter-frame prediction unit 126 derives a motion vector (Sf_4) according to the affine mode (specifically, the affine merge mode). In addition, when the inter-frame prediction mode information indicates 3 (3 in Sf_1), the inter-frame prediction unit 126 derives a motion vector (Sf_5) according to the mode for encoding the differential MV (for example, the normal inter-frame mode).
[0305] [MV export > Normal interframe mode]
[0306] The normal inter mode is an inter prediction mode that derives the MV of the current block from a block similar to the image of the current block in an area of the reference picture indicated by the candidate MV. In addition, in the normal inter mode, the differential MV is encoded.
[0307] Fig.19 is a flowchart showing an example of inter-frame prediction based on the normal inter-frame mode.
[0308] First, the inter prediction unit 126 obtains a plurality of candidate MVs for the current block based on information such as MVs of a plurality of coded blocks temporally or spatially located around the current block (step Sg_1). That is, the inter prediction unit 126 creates a candidate MV list.
[0309] Next, the inter-frame prediction unit 126 extracts N (N is an integer greater than or equal to 2) candidate MVs from the multiple candidate MVs obtained in step Sg_1 as predicted motion vector candidates (also referred to as predicted MV candidates) in a predetermined priority order (step Sg_2). In addition, the priority order may be predetermined for each of the N candidate MVs.
[0310] Next, the inter-frame prediction unit 126 selects one prediction motion vector candidate from the N prediction motion vector candidates as the prediction motion vector (also referred to as prediction MV) of the current block (step Sg_3). At this time, the inter-frame prediction unit 126 encodes prediction motion vector selection information for identifying the selected prediction motion vector into the stream. In addition, the stream is the above-mentioned coded signal or coded bit stream.
[0311] Next, the inter-frame prediction unit 126 refers to the coded reference picture and derives the MV of the current block (step Sg_4). At this time, the inter-frame prediction unit 126 also encodes the difference between the derived MV and the predicted motion vector as a difference MV to the stream. In addition, the coded reference picture is a picture composed of multiple blocks reconstructed after encoding.
[0312] Finally, the inter-frame prediction unit 126 generates a predicted image of the current block by performing motion compensation on the current block using the derived MV and the encoded reference picture (step Sg_5). Note that the predicted image is the above-mentioned inter-frame prediction signal.
[0313] Furthermore, information indicating the inter prediction mode (in the above example, the normal inter mode) used in generating the predicted image contained in the encoded signal is encoded as, for example, a prediction parameter.
[0314] In addition, the candidate MV list can also be used together with the list used in other modes. In addition, the processing related to the candidate MV list can be applied to the processing related to the list used in other modes. The processing related to the candidate MV list is, for example, extracting or selecting candidate MVs from the candidate MV list, rearranging candidate MVs, or deleting candidate MVs.
[0315] [MV Export > Merge Mode]
[0316] The merge mode is an inter-frame prediction mode that derives a candidate MV from a candidate MV list as the MV of the current block.
[0317] Fig. 20 is a flowchart showing an example of inter-frame prediction based on merge mode.
[0318] First, the inter prediction unit 126 obtains a plurality of candidate MVs for the current block based on information on a plurality of coded block MVs located around the current block in time or space (step Sh_1). That is, the inter prediction unit 126 creates a candidate MV list.
[0319] Next, the inter prediction unit 126 selects one candidate MV from the plurality of candidate MVs acquired in step Sh_1 to derive the MV of the current block (step Sh_2). At this time, the inter prediction unit 126 encodes MV selection information for identifying the selected candidate MV into the stream.
[0320] Finally, the inter-frame prediction unit 126 generates a predicted image of the current block by performing motion compensation on the current block using the derived MV and the encoded reference picture (step Sh_3).
[0321] Furthermore, information indicating the inter prediction mode (in the above example, the merge mode) used in generating the predicted image contained in the encoded signal is encoded as, for example, a prediction parameter.
[0322] Fig.21 This is a conceptual diagram used to illustrate an example of motion vector derivation processing for the current picture based on the merge mode.
[0323] First, a prediction MV list is generated in which candidates for prediction MVs are registered. Candidates for prediction MVs include: spatial neighbor prediction MVs, which are MVs of multiple coded blocks located in the spatial periphery of the object block; temporal neighbor prediction MVs, which are MVs of blocks near the position of the object block in the coded reference picture that are projected; combined prediction MVs, which are MVs generated by combining the MV values of the spatial neighbor prediction MV and the temporal neighbor prediction MV; and zero prediction MVs, which are MVs with a value of zero, etc.
[0324] Next, one predicted MV is selected from a plurality of predicted MVs registered in the predicted MV list to determine the MV of the target block.
[0325] Then, in the variable length coding unit, merge_idx, which is a signal indicating which predicted MV is selected, is described in the stream and coded.
[0326] In addition, Fig.21 The predicted MVs registered in the predicted MV list described in the figure are just examples, and may be a number different from that in the figure, or a structure that does not include some types of predicted MVs in the figure, or a structure that adds predicted MVs other than the types of predicted MVs in the figure.
[0327] The final MV may be determined by performing a DMVR (decoder motion vector refinement) process described later using the MV of the target block derived by the merge mode.
[0328] In addition, the candidate of the predicted MV is the candidate MV mentioned above, and the predicted MV list is the candidate MV list mentioned above. In addition, the candidate MV list can also be called a candidate list. In addition, merge_idx is MV selection information.
[0329] [MV Export > FRUC Mode]
[0330] The motion information may also be derived on the decoding device side instead of being signaled on the encoding device side. In addition, as described above, a merge mode specified by the H.265 / HEVC specification may also be used. In addition, for example, the motion information may also be derived by performing a motion search on the decoding device side. In an embodiment, the motion search is performed on the decoding device side without using the pixel value of the current block.
[0331] Here, a mode for performing motion estimation on the decoding device side is described. The mode for performing motion estimation on the decoding device side is called PMMVD (pattern matched motion vector derivation) mode or FRUC (frame rate up-conversion) mode.
[0332] In the form of a flow chart Fig. 22 An example of FRUC processing is shown in FIG. First, with reference to the motion vectors of the coded blocks that are spatially or temporally adjacent to the current block, a list of multiple candidates each having a predicted motion vector (MV) is generated (that is, a candidate MV list, which can also be shared with a merge list) (step Si_1). Next, the best candidate MV is selected from the multiple candidate MVs registered in the candidate MV list (step Si_2). For example, the evaluation value of each candidate MV included in the candidate MV list is calculated, and one candidate is selected based on the evaluation value. And, based on the motion vector of the selected candidate, the motion vector for the current block is derived (step Si_4). Specifically, for example, the motion vector of the selected candidate (the best candidate MV) is derived as it is as the motion vector for the current block. In addition, for example, the motion vector for the current block can also be derived by performing pattern matching in the surrounding area of the position in the reference picture corresponding to the motion vector of the selected candidate. That is, the surrounding area of the best candidate MV can also be searched by using pattern matching and evaluation values in the reference picture. When there is an MV with a better evaluation value, the best candidate MV is updated to the above MV and used as the final MV of the current block. A configuration may be adopted in which the process of updating to an MV having a better evaluation value is not performed.
[0333] Finally, the inter-frame prediction unit 126 generates a predicted image of the current block by performing motion compensation on the current block using the derived MV and the encoded reference picture (step Si_5).
[0334] Completely the same processing can be performed even when processing is performed in sub-block units.
[0335] The evaluation value may also be calculated by various methods. For example, a reconstructed image of a region in a reference picture corresponding to a motion vector is compared with a reconstructed image of a predetermined region (for example, as shown below, the region may be a region of another reference picture or a region of an adjacent block of the current picture). The predetermined region may also be predetermined.
[0336] Then, the difference between the pixel values of the two reconstructed images may be calculated and used for the evaluation value of the motion vector. Alternatively, the evaluation value may be calculated using other information in addition to the difference value.
[0337] Next, an example of pattern matching is described in detail. First, a candidate MV included in a candidate MV list (e.g., a merge list) is selected as a starting point for a search based on pattern matching. For example, as pattern matching, a first pattern matching or a second pattern matching can be used. The first pattern matching and the second pattern matching are respectively called bilateral matching and template matching.
[0338] [MV Export > FRUC > Bidirectional Matching]
[0339] In the first pattern matching, pattern matching is performed between two blocks along the motion trajectory of the current block in two different reference pictures. Therefore, in the first pattern matching, as the prescribed area for calculating the candidate evaluation value, an area in another reference picture along the motion trajectory of the current block is used. The prescribed area may also be predetermined.
[0340] Fig.23 : is a conceptual diagram for explaining an example of the first pattern matching (bidirectional matching) between two blocks in two reference pictures along the motion trajectory. Fig.23 As shown, in the first pattern matching, two motion vectors (MV0, MV1) are derived by searching for the best matching pair among the pairs of two blocks in two different reference pictures (Ref0, Ref1) along the motion trajectory of the current block (Cur block). Specifically, for the current block, the difference between the reconstructed image at a specified position in the first coded reference picture (Ref0) specified by the candidate MV and the reconstructed image at a specified position in the second coded reference picture (Ref1) specified by the symmetric MV after scaling the candidate MV with the display time interval is derived, and the evaluation value is calculated using the obtained difference value. The candidate MV with the best evaluation value can be selected as the final MV from among multiple candidate MVs, and good results can be obtained.
[0341] Under the assumption of a continuous motion trajectory, the motion vectors (MV0, MV1) indicating the two reference blocks are proportional to the temporal distance (TD0, TD1) between the current picture (Cur Pic) and the two reference pictures (Ref0, Ref1). For example, 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.
[0342] [MV Export > FRUC > Template Matching]
[0343] In the second pattern matching (template matching), pattern matching is performed between a template in the current picture (a block adjacent to the current block in the current picture (e.g., an upper and / or left adjacent block)) and a block in the reference picture. Therefore, in the second pattern matching, a block adjacent to the current block in the current picture is used as the prescribed area for calculating the candidate evaluation value described above.
[0344] Fig.24 : is a conceptual diagram for explaining an example of pattern matching (template matching) between a template in a current picture and a block in a reference picture. Fig.24 As shown, in the second pattern matching, the motion vector of the current block is derived by searching the reference picture (Ref0) for the block that best matches the block adjacent to the current block (Cur block) in the current picture (Cur Pic). Specifically, for the current block, the difference between the reconstructed image of the coded area of both or one of the left adjacent and upper adjacent areas and the reconstructed image at the same position in the coded reference picture (Ref0) specified by the candidate MV is derived, and the evaluation value is calculated using the obtained difference value, so that the candidate MV with the best evaluation value can be selected as the best candidate MV among multiple candidate MVs.
[0345] Such information indicating whether the FRUC mode is adopted (for example, called a FRUC flag) is signaled at the CU level. In addition, when the FRUC mode is adopted (for example, when the FRUC flag is true), information indicating the method of pattern matching that can be adopted (first pattern matching or second pattern matching) is signaled at the CU level. In addition, the signaling of this information does not need to be limited to the CU level, and can also be other levels (for example, sequence level, picture level, slice level, tile level, CTU level or sub-block level).
[0346] [MV Export > Affine Mode]
[0347] Next, the affine mode for deriving a motion vector in sub-block units based on motion vectors of a plurality of adjacent blocks will be described. This mode is sometimes referred to as an affine motion compensation prediction mode.
[0348] Fig.25A 1 is a conceptual diagram for explaining an example of deriving a motion vector in sub-block units based on motion vectors of a plurality of adjacent blocks. Fig.25A In the example, the current block includes 16 4×4 sub-blocks. Here, the motion vector v0 of the upper left corner control point of the current block is derived based on the motion vectors of the adjacent blocks. Similarly, the motion vector v1 of the upper right corner control point of the current block is derived based on the motion vectors of the adjacent sub-blocks. Then, according to the following formula (1A), the two motion vectors v0 and v1 can be projected, and the motion vectors (v x , v y ).
[0349]
Formula 1
[0350]
[0351] Here, x and y represent the horizontal position and vertical position of the sub-block, respectively, and w represents a predetermined weight coefficient. The predetermined weight coefficient may also be determined in advance.
[0352] The information indicating such an affine mode (e.g., called an affine flag) may be signaled as a CU-level signal. In addition, the signaling of the information indicating the affine mode need not be limited to the CU-level, but may be other levels (e.g., sequence level, picture level, slice level, tile level, CTU level, or sub-block level).
[0353] In addition, such an affine mode may include several modes in which the motion vectors of the upper left and upper right control points are derived in different ways. For example, the affine mode includes two modes: the affine inter-frame (also called affine normal inter-frame) mode and the affine merge mode.
[0354] [MV Export > Affine Mode]
[0355] Fig.25B : is a conceptual diagram for explaining an example of derivation of motion vectors in sub-block units in an affine mode having three control points. Fig.25BIn the example, the current block includes 16 4×4 sub-blocks. Here, the motion vector v0 of the upper left corner control point of the current block is derived based on the motion vector of the adjacent block. Similarly, the motion vector v1 of the upper right corner control point of the current block is derived based on the motion vector of the adjacent block, and the motion vector v2 of the lower left corner control point of the current block is derived based on the motion vector of the adjacent block. Then, according to the following formula (1B), the three motion vectors v0, v1 and v2 can be projected, and the motion vectors (v x , v y ).
[0356]
Formula 2
[0357]
[0358] Here, x and y represent the horizontal position and vertical position of the center of the sub-block, respectively, w represents the width of the current block, and h represents the height of the current block.
[0359] Affine modes with different numbers of control points (e.g., 2 and 3) may also be switched and signaled at the CU level. In addition, information indicating the number of control points of the affine mode used at the CU level may also be signaled at other levels (e.g., sequence level, picture level, slice level, tile level, CTU level, or sub-block level).
[0360] In addition, in such an affine mode with three control points, several modes with different methods of deriving motion vectors of the upper left, upper right and lower left control points may be included. For example, in the affine mode, there are two modes, namely, the affine inter-frame (also called affine normal inter-frame) mode and the affine merge mode.
[0361] [MV Export > Affine Merge Mode]
[0362] Fig.26A , Fig.26B and Fig.26C This is a conceptual diagram for explaining the affine merge mode.
[0363] In affine merge mode, such as Fig.26A As shown, for example, based on a plurality of motion vectors corresponding to blocks encoded in an affine mode among the encoded blocks A (left), B (upper), C (upper right), D (lower left), and E (upper left) adjacent to the current block, the predicted motion vector of each of the control points of the current block is calculated. Specifically, the encoded blocks A (left), B (upper), C (upper right), D (lower left), and E (upper left) are checked in this order to determine the first valid block encoded in the affine mode. The predicted motion vectors of the control points of the current block are calculated based on the plurality of motion vectors corresponding to the determined blocks.
[0364] For example, Fig.26B As shown in FIG. 1 , when a block A adjacent to the left side of the current block is encoded in an affine mode having two control points, motion vectors v3 and v4 projected to the positions of the upper left corner and the upper right corner of the encoded block including the block A are derived. Then, based on the derived motion vectors v3 and v4, a predicted motion vector v0 of the control point at the upper left corner of the current block and a predicted motion vector v1 of the control point at the upper right corner are calculated.
[0365] For example, Fig.26C As shown in FIG. 1 , when a block A adjacent to the left side of a current block is encoded in an affine mode having three control points, motion vectors v3, v4, and v5 are derived that are projected to the positions of the upper left corner, the upper right corner, and the lower left corner of the encoded block containing block A. Then, based on the derived motion vectors v3, v4, and v5, a predicted motion vector v0 of the control point at the upper left corner, a predicted motion vector v1 of the control point at the upper right corner, and a predicted motion vector v2 of the control point at the lower left corner of the current block are calculated.
[0366] In addition, in the following Fig.29 This predicted motion vector derivation method can also be used in the derivation of the predicted motion vectors of each control point of the current block in step Sj_1.
[0367] Fig. 27 This is a flowchart showing an example of the affine merge mode.
[0368] In the affine merge mode, as shown in the figure, first, the inter-frame prediction unit 126 derives the predicted MV of each control point of the current block (step Sk_1). Fig.25A As shown, it is the upper left and upper right corner points of the current block, or as Fig.25B As shown, these are the points at the upper left corner, upper right corner, and lower left corner of the current block.
[0369] That is to say, Fig.26A As shown, the inter-frame prediction unit 126 checks the encoded blocks A (left), block B (top), block C (top right), block D (bottom left) and block E (top left) in this order, and determines the initial valid block encoded in the affine mode.
[0370] Then, when block A is determined and block A has 2 control points, as Fig.26B As shown, the inter-frame prediction section 126 calculates the motion vector v0 of the control point at the upper left corner and the motion vector v1 of the control point at the upper right corner of the current block based on the motion vectors v3 and v4 of the upper left corner and the upper right corner of the coded block including the block A. For example, by projecting the motion vectors v3 and v4 of the upper left corner and the upper right corner of the coded block to the current block, the inter-frame prediction section 126 calculates the predicted motion vector v0 of the control point at the upper left corner and the predicted motion vector v1 of the control point at the upper right corner of the current block.
[0371] Alternatively, if block A is determined and block A has 3 control points, Fig.26C As shown, the inter-frame prediction unit 126 calculates the motion vector v0 of the control point at the upper left corner, the motion vector v1 of the control point at the upper right corner, and the motion vector v2 of the control point at the lower left corner of the current block based on the motion vectors v3, v4, and v5 of the upper left corner, the upper right corner, and the lower left corner of the coded block including the block A. For example, by projecting the motion vectors v3, v4, and v5 of the upper left corner, the upper right corner, and the lower left corner of the coded block onto the current block, the inter-frame prediction unit 126 calculates the predicted motion vector v0 of the control point at the upper left corner, the predicted motion vector v1 of the control point at the upper right corner, and the motion vector v2 of the control point at the lower left corner of the current block.
[0372] Next, the inter-frame prediction unit 126 performs motion compensation on each of the multiple sub-blocks included in the current block. That is, the inter-frame prediction unit 126 uses two predicted motion vectors v0 and v1 and the above-mentioned formula (1A), or three predicted motion vectors v0, v1 and v2 and the above-mentioned formula (1B) for each of the multiple sub-blocks to calculate the motion vector of the sub-block as an affine MV (step Sk_2). Then, the inter-frame prediction unit 126 uses these affine MVs and the encoded reference picture to perform motion compensation on the sub-block (step Sk_3). As a result, the current block is motion compensated and a predicted image of the current block is generated.
[0373] [MV Export > Affine Inter-frame Mode]
[0374] Fig.28A This is a conceptual diagram for explaining the affine inter-frame mode having two control points.
[0375] In this affine inter-frame mode, if Fig.28A As shown, a motion vector selected from the motion vectors of the coded blocks A, B, and C adjacent to the current block is used as the prediction motion vector v0 of the control point at the upper left corner of the current block. Similarly, a motion vector selected from the motion vectors of the coded blocks D and E adjacent to the current block is used as the prediction motion vector v1 of the control point at the upper right corner of the current block.
[0376] Fig.28B This is a conceptual diagram for explaining the affine inter-frame mode having three control points.
[0377] In this affine inter-frame mode, if Fig.28BAs shown in FIG. 1 , a motion vector selected from the motion vectors of the coded blocks A, B, and C adjacent to the current block is used as the prediction motion vector v0 of the control point at the upper left corner of the current block. Similarly, a motion vector selected from the motion vectors of the coded blocks D and E adjacent to the current block is used as the prediction motion vector v1 of the control point at the upper right corner of the current block. Furthermore, a motion vector selected from the motion vectors of the coded blocks F and G adjacent to the current block is used as the prediction motion vector v2 of the control point at the lower left corner of the current block.
[0378] Fig.29 This is a flowchart showing an example of the affine inter mode.
[0379] As shown in the figure, in the affine inter mode, first, the inter prediction unit 126 derives the predicted MV (v0, v1) or (v0, v1, v2) of each of the two or three control points of the current block (step Sj_1). Fig.25A or Fig.25B As shown, the control point is the point at the upper left corner, upper right corner, or lower left corner of the current block.
[0380] That is, the inter-frame prediction unit 126 selects Fig.28A or Fig.28B The motion vector of a block in the coded blocks near each control point of the current block shown is used to derive the predicted motion vector (v0, v1) or (v0, v1, v2) of the control point of the current block. At this time, the inter-frame prediction unit 126 encodes the predicted motion vector selection information for identifying the two selected motion vectors into the stream.
[0381] For example, the inter-frame prediction unit 126 can determine which block's motion vector to select as the predicted motion vector of the control point from the encoded blocks adjacent to the current block by using cost evaluation, etc., and can record a flag indicating which predicted motion vector is selected in the bit stream.
[0382] Next, the inter-frame prediction unit 126 performs motion search (steps Sj_3 and Sj_4) while updating the predicted motion vector selected or derived in step Sj_1 (step Sj_2). That is, the inter-frame prediction unit 126 uses the motion vector of each sub-block corresponding to the predicted motion vector to be updated as an affine MV, and calculates it using the above-mentioned formula (1A) or formula (1B) (step Sj_3). Then, the inter-frame prediction unit 126 uses these affine MVs and the encoded reference picture to perform motion compensation on each sub-block (step Sj_4). As a result, in the motion search loop, the inter-frame prediction unit 126 determines, for example, the predicted motion vector that can obtain the minimum cost as the motion vector of the control point (step Sj_5). At this time, the inter-frame prediction unit 126 also encodes the difference value between the determined MV and the predicted motion vector as a differential MV into a stream.
[0383] Finally, the inter-frame prediction unit 126 generates a predicted image of the current block by performing motion compensation on the current block using the determined MV and the encoded reference picture (step Sj_6).
[0384] [MV Export > Affine Inter-frame Mode]
[0385] When affine modes with different numbers of control points (for example, 2 and 3) are switched at the CU level for signaling, the number of control points may be different between the coded block and the current block. Fig. 30A as well as Fig. 30B This is a conceptual diagram for explaining a method of deriving a prediction vector of a control point when the number of control points in an already coded block and a current block is different.
[0386] For example, Fig. 30A As shown in FIG. 1 , when the current block has three control points, namely, the upper left corner, the upper right corner, and the lower left corner, and the block A adjacent to the left side of the current block is encoded in an affine mode having two control points, motion vectors v3 and v4 projected to the positions of the upper left corner and the upper right corner of the encoded block including the block A are derived. Then, based on the derived motion vectors v3 and v4, the predicted motion vector v0 of the control point of the upper left corner of the current block and the predicted motion vector v1 of the control point of the upper right corner are calculated. In addition, the predicted motion vector v2 of the control point of the lower left corner is calculated based on the derived motion vectors v0 and v1.
[0387] For example, Fig. 30B As shown in FIG. 1 , when the current block has two control points, namely, the upper left corner and the upper right corner, and the block A adjacent to the left side of the current block is encoded in an affine mode having three control points, motion vectors v3, v4, and v5 projected to the positions of the upper left corner, the upper right corner, and the lower left corner of the encoded block including the block A are derived. Then, based on the derived motion vectors v3, v4, and v5, the predicted motion vector v0 of the control point of the upper left corner of the current block and the predicted motion vector v1 of the control point of the upper right corner are calculated.
[0388] exist Fig.29 This predicted motion vector derivation method can also be used in the derivation of each predicted motion vector of the control point of the current block in step Sj_1.
[0389] [MV Export>DMVR]
[0390] Fig.31A It is a flowchart showing the relationship between the merge mode and DMVR.
[0391] The inter-frame prediction unit 126 derives the motion vector of the current block in the merge mode (step S1_1). Next, the inter-frame prediction unit 126 determines whether to perform a motion vector search, that is, a motion search (step S1_2). Here, when it is determined that the motion search is not to be performed (No in step S1_2), the inter-frame prediction unit 126 determines the motion vector derived in step S1_1 as the final motion vector for the current block (step S1_4). That is, in this case, the motion vector of the current block is determined in the merge mode.
[0392] On the other hand, when it is determined in step S1_1 that motion search is to be performed (Yes in step S1_2), the inter-frame prediction unit 126 derives a final motion vector for the current block by searching the surrounding area of the reference picture represented by the motion vector derived in step S1_1 (step S1_3). That is, in this case, the motion vector of the current block is determined by DMVR.
[0393] Fig.31B This is a conceptual diagram for explaining an example of DMVR processing for determining MV.
[0394] First, the best MVP set for the current block (for example, in merge mode) is set as a candidate MV. Then, according to the candidate MV (L0), the reference pixel is determined from the first reference picture (L0) which is the coded picture in the L0 direction. Similarly, according to the candidate MV (L1), the reference pixel is determined from the second reference picture (L1) which is the coded picture in the L1 direction. The template is generated by taking the average of these reference pixels.
[0395] Next, the above template is used to search the surrounding areas of the candidate MVs of the first reference image (L0) and the second reference image (L1), respectively, and the MV with the minimum cost is determined as the final MV. In addition, the cost value can also be calculated using, for example, the difference between the pixel values of the template and the pixel values of the search area and the candidate MV value.
[0396] In addition, typically, the configuration and operation of the processing described here are basically common in the encoding device and the decoding device described later.
[0397] Even if it is not the processing example described here, any processing can be used as long as it is a processing that can search the vicinity of the candidate MV and derive the final MV.
[0398] [Motion compensation > BIO / OBMC]
[0399] In motion compensation, there is a mode of generating a predicted image and correcting the predicted image. Examples of such modes are BIO and OBMC described below.
[0400] Fig.32This is a flowchart showing an example of generating a predicted image.
[0401] The inter prediction unit 126 generates a predicted image (step Sm_1 ), and corrects the predicted image using, for example, any of the above-described modes (step Sm_2 ).
[0402] Fig.33 This is a flowchart showing another example of generating a predicted image.
[0403] The inter-frame prediction unit 126 determines the motion vector of the current block (step Sn_1). Next, the inter-frame prediction unit 126 generates a predicted image (step Sn_2), and determines whether to perform a correction process (step Sn_3). Here, when it is determined that the correction process is to be performed (yes in step Sn_3), the inter-frame prediction unit 126 generates a final predicted image by correcting the predicted image (step Sn_4). On the other hand, when it is determined that the correction process is not to be performed (no in step Sn_3), the inter-frame prediction unit 126 outputs the predicted image as the final predicted image without correcting the predicted image (step Sn_5).
[0404] In motion compensation, there is a mode for correcting brightness when generating a predicted image. This mode is, for example, LIC which will be described later.
[0405] Fig.34 This is a flowchart showing another example of generating a predicted image.
[0406] The inter-frame prediction unit 126 derives the motion vector of the current block (step So_1). Next, the inter-frame prediction unit 126 determines whether to perform brightness correction processing (step So_2). Here, when it is determined that brightness correction processing is to be performed (yes in step So_2), the inter-frame prediction unit 126 generates a predicted image while performing brightness correction (step So_3). In other words, the predicted image is generated by LIC. On the other hand, when it is determined that brightness correction processing is not to be performed (no in step So_2), the inter-frame prediction unit 126 generates a predicted image by normal motion compensation without performing brightness correction (step So_4).
[0407] [Motion Compensation > OBMC]
[0408] Not only the motion information of the current block obtained by motion search, but also the motion information of the adjacent blocks can be used to generate the inter-frame prediction signal. Specifically, the inter-frame prediction signal can be generated in sub-block units within the current block by weighted addition of the prediction signal based on the motion information obtained by motion search (within the reference picture) and the prediction signal based on the motion information of the adjacent blocks (within the current picture). Such inter-frame prediction (motion compensation) is sometimes called OBMC (overlapped block motion compensation).
[0409] In the OBMC mode, information indicating the size of the sub-block used for OBMC (e.g., OBMC block size) may also be signaled at the sequence level. Furthermore, information indicating whether the OBMC mode is applied (e.g., OBMC flag) may also be signaled at the CU level. In addition, the signaling level of such information need not be limited to the sequence level and the CU level, but may be other levels (e.g., picture level, slice level, tile level, CTU level, or sub-block level).
[0410] An example of the OBMC mode will be described in more detail. Fig.35 and Fig.36 It is a flowchart and a conceptual diagram for explaining the outline of the predicted image correction process based on the OBMC process.
[0411] First, if Fig.36 As shown, the motion vector (MV) assigned to the processing object (current) block is used to obtain the predicted image (Pred) based on the usual motion compensation. Fig.36 In FIG. 1 , the arrow “MV” points to the reference picture and indicates which block the current block of the current picture refers to to obtain a predicted image.
[0412] Next, the motion vector (MV_L) derived for the coded left adjacent block is applied (reused) to the coded target block to obtain a predicted image (Pred_L). The motion vector (MV_L) is represented by an arrow "MV_L" pointing from the current block to the reference picture. Then, the first correction of the predicted image is performed by overlapping the two predicted images Pred and Pred_L. This has the effect of blending the boundaries between adjacent blocks.
[0413] Similarly, the motion vector (MV_U) derived for the encoded upper adjacent block is applied (reused) to the encoding target block to obtain a predicted image (Pred_U). The motion vector (MV_U) is represented by an arrow "MV_U" pointing from the current block to the reference picture. Then, the second correction of the predicted image is performed by superimposing the predicted image Pred_U with the predicted image (for example, Pred and Pred_L) that has been corrected for the first time. This has the effect of blending the boundaries between adjacent blocks. The predicted image obtained by the second correction is the final predicted image of the current block with the boundaries with the adjacent blocks blended (smoothed).
[0414] In addition, the above example is a two-path correction method using left-adjacent and upper-adjacent blocks, but the correction method may also be a three-path correction method or more than three-path correction method using right-adjacent and / or lower-adjacent blocks.
[0415] Furthermore, the region to be overlapped may not be the pixel region of the entire block, but may be only a partial region near the block boundary.
[0416] In addition, the prediction image correction processing of OBMC is described here, which is used to obtain one prediction image Pred by superimposing one reference image with the additional prediction images Pred_L and Pred_U. However, in the case of correcting the prediction image based on multiple reference images, the same processing can be applied to each of the multiple reference images. In this case, after the corrected prediction images are obtained from each reference image by performing image correction of OBMC based on multiple reference images, the final prediction image is obtained by further superimposing the obtained multiple corrected prediction images.
[0417] In OBMC, the unit of the target block may be a prediction block unit or a sub-block unit obtained by further dividing the prediction block.
[0418] As a method for determining whether to apply the OBMC process, there is a method using, for example, obmc_flag, a signal indicating whether the OBMC process is applied. As a specific example, the encoding device may also determine whether the target block belongs to a region with complex motion. When the target block belongs to a region with complex motion, the encoding device sets the value of obmc_flag to 1 and applies the OBMC process to perform encoding. When the target block does not belong to a region with complex motion, the encoding device sets the value of obmc_flag to 0 and does not apply the OBMC process to perform encoding of the block. On the other hand, in the decoding device, by decoding obmc_flag described in the stream (for example, a compressed sequence), whether to apply the OBMC process is switched according to the value to perform decoding.
[0419] In the above example, the inter-frame prediction unit 126 generates one rectangular prediction image for the rectangular current block. However, the inter-frame prediction unit 126 may generate a plurality of prediction images having shapes different from the rectangle for the rectangular current block, and may generate a final rectangular prediction image by combining these plurality of prediction images. The shape different from the rectangle may be, for example, a triangle.
[0420] Fig.37 This is a conceptual diagram for explaining the generation of predicted images of two triangles.
[0421] The inter-frame prediction unit 126 generates a triangular prediction image by performing motion compensation on the first triangular partition in the current block using the first MV of the first partition. Similarly, the inter-frame prediction unit 126 generates a triangular prediction image by performing motion compensation on the second triangular partition in the current block using the second MV of the second partition. Then, the inter-frame prediction unit 126 generates a rectangular prediction image that is the same as the current block by combining these prediction images.
[0422] In addition, Fig.37 In the example shown, the first partition and the second partition are each a triangle, but they may also be a trapezoid or may be different shapes from each other. Fig.37 In the example shown, the current block is composed of 2 partitions, but it can also be composed of 3 or more partitions.
[0423] In addition, the first partition and the second partition may also be repeated. That is, the first partition and the second partition may also include the same pixel region. In this case, the predicted image in the first partition and the predicted image in the second partition may be used to generate the predicted image of the current block.
[0424] In addition, although this example shows an example in which predicted images are generated by inter-frame prediction for both of the two partitions, a predicted image may be generated by intra-frame prediction for at least one partition.
[0425] [Motion compensation>BIO]
[0426] Next, a method for deriving a motion vector will be described. First, a mode for deriving a motion vector based on a model assuming uniform linear motion will be described. This mode is sometimes referred to as a BIO (bidirectional optical flow) mode.
[0427] Fig.38 This is a conceptual diagram used to explain a model that assumes uniform linear motion. Fig.38 In (v x , v y) represents the velocity vector, τ0 and τ1 represent the temporal distance between the current picture (Cur Pic) and the two reference pictures (Ref0, Ref1), respectively. (MVx0, MVy0) represents the motion vector corresponding to the reference picture Ref0, and (MVx1, MVy1) represents the motion vector corresponding to the reference picture Ref1.
[0428] At this time, it can also be that the velocity vector (v x , v y ) is assumed to be a uniform linear motion, (MVx0, MVy0) and (MVx1, MVy1) are expressed as (vxτ0, vyτ0) and (-vxτ1, -vyτ1) respectively, using the following optical flow equation (2).
[0429]
Formula 3
[0430]
[0431] Here, I(k) represents the brightness value of the reference image k (k=0, 1) after motion compensation. The optical flow equation indicates that the sum of (i) the temporal differential of the brightness 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. Alternatively, the motion vector of the block unit obtained from the merge list or the like may be corrected in pixel units based on a combination of the optical flow equation and Hermite interpolation.
[0432] In addition, the motion vector may be derived on the decoding device 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.
[0433] [Motion Compensation > LIC]
[0434] Next, an example of a mode for generating a predicted image (prediction) using LIC (local illumination compensation) processing will be described.
[0435] Fig.39 This is a conceptual diagram for explaining an example of a method for generating a predicted image using a brightness correction process based on an LIC process.
[0436] First, MV is derived from the encoded reference picture to obtain the reference image corresponding to the current block.
[0437] Next, information indicating how the brightness value changes in the reference picture and the current picture is extracted for the current block. This extraction is based on the brightness pixel values of the encoded left adjacent reference area (peripheral reference area) and the encoded upper adjacent reference area (peripheral reference area) in the current picture, and the brightness pixel values at the same position in the reference picture specified by the derived MV. Then, using the information indicating how the brightness value changes, the brightness correction parameter is calculated.
[0438] The brightness correction parameter is applied to perform brightness correction processing on the reference image in the reference picture specified by the MV, thereby generating a predicted image for the current block.
[0439] in addition, Fig.39 The shape of the peripheral reference area described above is just an example, and shapes other than this may also be used.
[0440] In addition, the process of generating a predicted image based on one reference picture is described here, but the same is true when generating a predicted image based on multiple reference pictures. The predicted image can also be generated after brightness correction processing is performed on the reference images obtained from each reference picture in the same way as described above.
[0441] As a method for determining whether to use LIC processing, for example, there is a method using lic_flag, which is a signal indicating whether to use LIC processing. As a specific example, in the encoding device, it is determined whether the current block belongs to an area where brightness changes, and if it belongs to an area where brightness changes, the value 1 is set as lic_flag, and encoding is performed using LIC processing. If it does not belong to an area where brightness changes, the value 0 is set as lic_flag, and encoding is performed without using LIC processing. On the other hand, in the decoding device, by decoding lic_flag described in the stream, it is also possible to switch whether to use LIC processing according to its value and perform decoding.
[0442] As another method for determining whether to use the LIC process, there is a method of determining whether the LIC process is used in the surrounding blocks. As a specific example, when the current block is in the merge mode, it is determined whether the surrounding coded blocks selected when deriving the MV in the merge mode process are coded using the LIC process, and based on the result, it is switched whether to use the LIC process for coding. In addition, in the case of this example, the same process is also applied to the decoding device side.
[0443] use Fig.39 The form of the LIC process (luminance correction process) has been described, and the details thereof will be described below.
[0444] First, the inter prediction unit 126 derives a motion vector for acquiring a reference image corresponding to a current block to be encoded from a reference picture that is an already encoded picture.
[0445] Next, the inter-frame prediction unit 126 uses the brightness pixel values of the encoded surrounding reference areas adjacent to the left and above and the brightness pixel values at the same position in the reference picture specified by the motion vector to extract information indicating how the brightness values in the reference picture and the encoding target picture change, and calculates the brightness correction parameter. For example, the brightness pixel value of a certain pixel in the surrounding reference area in the encoding target picture is set to p0, and the brightness pixel value of the pixel in the surrounding reference area in the reference picture at the same position as the pixel is set to p1. The inter-frame prediction unit 126 calculates the coefficients A and B for optimizing A×p1+B=p0 as brightness correction parameters for multiple pixels in the surrounding reference area.
[0446] Next, the inter-frame prediction unit 126 generates a predicted image for the encoding target block by performing a brightness correction process on the reference image in the reference picture specified by the motion vector using the brightness correction parameter. For example, the brightness pixel value in the reference image is set to p2, and the brightness pixel value of the predicted image after the brightness correction process is set to p3. The inter-frame prediction unit 126 generates a predicted image after the brightness correction process by calculating A×p2+B=p3 for each pixel in the reference image.
[0447] also, Fig.39 The shape of the peripheral reference area in is an example, and other shapes may also be used. Fig.39 A portion of the peripheral reference area shown. For example, an area including a predetermined number of pixels thinned out from the upper adjacent pixels and the left adjacent pixels may be used as the peripheral reference area. In addition, the peripheral reference area is not limited to an area adjacent to the encoding object block, and may also be an area not adjacent to the encoding object block. The predetermined number related to the pixel may also be predetermined.
[0448] In addition, Fig.39 In the example shown, the peripheral reference area in the reference picture is an area specified by the motion vector of the encoding target picture from the peripheral reference area in the encoding target picture, but it may also be an area specified by another motion vector. For example, the other motion vector may also be the motion vector of the peripheral reference area in the encoding target picture.
[0449] Here, the operation in the encoding device 100 is described, but typically, the operation in the decoding device 200 is also the same.
[0450] The LIC process is not only applied to brightness but also to color difference. In this case, correction parameters may be derived separately for each of Y, Cb, and Cr, or a common correction parameter may be used for any of them.
[0451] Furthermore, the LIC process may be applied in sub-block units. For example, the modification parameters may be derived using the surrounding reference area of the current sub-block and the surrounding reference area of the reference sub-block in the reference picture specified by the MV of the current sub-block.
[0452] [Prediction Control Department]
[0453] The prediction control unit 128 selects one of the intra prediction signal (the signal output from the intra prediction unit 124) and the inter prediction signal (the signal output from the inter prediction unit 126), and outputs the selected signal as the prediction signal to the subtraction unit 104 and the addition unit 116.
[0454] like Figure 1 As shown, in various encoding device examples, the prediction control unit 128 may also output prediction parameters input to the entropy coding unit 110. The entropy coding unit 110 may generate a coded bit stream (or sequence) based on the prediction parameters input from the prediction control unit 128 and the quantization coefficients input from the quantization unit 108. The prediction parameters may also be used in a decoding device. The decoding device may also receive and decode the coded bit stream and perform the same process as the prediction process performed in the intra prediction unit 124, the inter prediction unit 126, and the prediction control unit 128. The prediction parameters may include a selection prediction signal (e.g., a motion vector, a prediction type, or a prediction mode used by the intra prediction unit 124 or the inter prediction unit 126), or any index, flag, or value based on the prediction process performed in the intra prediction unit 124, the inter prediction unit 126, and the prediction control unit 128 or indicating the prediction process.
[0455] [Encoding device installation example]
[0456] Fig.40 1 is a block diagram showing an implementation example of the coding device 100. The coding device 100 includes a processor a1 and a memory a2. Figure 1 The multiple components of the encoding device 100 shown are Fig.40 The processor a1 and the memory a2 shown are installed and implemented.
[0457] Processor a1 is a circuit that performs information processing and is a circuit that can access memory a2. For example, processor a1 is a dedicated or general-purpose electronic circuit that encodes moving images. Processor a1 can also be a processor such as a CPU. In addition, processor a1 can also be a collection of multiple electronic circuits. In addition, for example, processor a1 can also play a role in Figure 1The functions of multiple components of the encoding device 100 shown in the figure etc.
[0458] The memory a2 is a dedicated or general-purpose memory for storing information used by the processor a1 to encode motion images. The memory a2 can be an electronic circuit or connected to the processor a1. In addition, the memory a2 can also be included in the processor a1. In addition, the memory a2 can also be a collection of multiple electronic circuits. In addition, the memory a2 can be a magnetic disk or an optical disk, or can be expressed as a storage or a recording medium. In addition, the memory a2 can be a non-volatile memory or a volatile memory.
[0459] For example, the memory a2 may store the encoded moving image, or may store a bit string corresponding to the encoded moving image. In addition, the memory a2 may store a program for the processor a1 to encode the moving image.
[0460] In addition, for example, memory a2 can also serve Figure 1 The memory a2 may be used as a component for storing information among the multiple components of the encoding device 100 shown in FIG. Figure 1 The functions of the block memory 118 and the frame memory 122 are shown. More specifically, the memory a2 can store reconstructed blocks and reconstructed pictures, etc.
[0461] In addition, in the encoding device 100, it is not necessary to install Figure 1 All of the multiple constituent elements shown above may not perform all of the multiple processes described above. Figure 1 Part of the plurality of components shown in the figure may be included in other devices, and part of the plurality of processes described above may be executed by other devices.
[0462] [Decoding device]
[0463] Next, a decoding device that can decode a coded signal (coded bit stream) output from, for example, the above-described coding device 100 will be described. Fig.41 2 is a block diagram showing a functional structure of a decoding device 200 according to an embodiment. The decoding device 200 is a moving picture decoding device that decodes a moving picture in units of blocks.
[0464] like Fig.41 As shown, the decoding device 200 includes an entropy decoding unit 202, an inverse quantization unit 204, an inverse transformation unit 206, an addition unit 208, a block memory 210, a loop filter unit 212, a frame memory 214, an intra-frame prediction unit 216, an inter-frame prediction unit 218 and a prediction control unit 220.
[0465] The decoding device 200 is implemented by, for example, a general-purpose processor and a memory. In this case, when the processor executes a software program stored in the memory, the processor functions as an entropy decoding unit 202, an inverse quantization unit 204, an inverse transformation unit 206, an addition unit 208, a loop filter unit 212, an intra-frame prediction unit 216, an inter-frame prediction unit 218, and a prediction control unit 220. In addition, the decoding device 200 may be implemented as one or more dedicated electronic circuits corresponding to the entropy decoding unit 202, the inverse quantization unit 204, the inverse transformation unit 206, the addition unit 208, the loop filter unit 212, the intra-frame prediction unit 216, the inter-frame prediction unit 218, and the prediction control unit 220.
[0466] Hereinafter, after describing the overall processing flow of the decoding device 200 , each component included in the decoding device 200 will be described.
[0467] [Overall flow of decoding processing]
[0468] Fig.42 This is a flowchart showing an example of the overall decoding process performed by the decoding device 200.
[0469] First, the entropy decoding unit 202 of the decoding device 200 determines a partition pattern of a fixed-size block (e.g., 128×128 pixels) (step Sp_1). This partition pattern is the partition pattern selected by the encoding device 100. Then, the decoding device 200 performs the processing of steps Sp_2 to Sp_6 on each of the multiple blocks constituting the partition pattern.
[0470] That is, the entropy decoding unit 202 decodes (specifically, entropy decodes) the encoded quantization coefficients and prediction parameters of the decoding target block (also referred to as the current block) (step Sp_2).
[0471] Next, the inverse quantization unit 204 and the inverse transformation unit 206 restore a plurality of prediction residuals (ie, difference blocks) by performing inverse quantization and inverse transformation on the plurality of quantized coefficients (step Sp_3).
[0472] Next, the prediction processing unit composed of all or part of the intra prediction unit 216, the inter prediction unit 218 and the prediction control unit 220 generates a prediction signal (also referred to as a prediction block) of the current block (step Sp_4).
[0473] Next, the adding unit 208 reconstructs the current block into a reconstructed image (also referred to as a decoded image block) by adding the prediction block to the differential block (step Sp_5).
[0474] Then, when generating the reconstructed image, the loop filter unit 212 filters the reconstructed image (step Sp_6).
[0475] Then, the decoding device 200 determines whether the decoding of the entire picture has been completed (step Sp_7 ), and when it is determined that the decoding has not been completed (No in step Sp_7 ), the processing from step Sp_1 is repeatedly executed.
[0476] As shown in the figure, the processing of steps Sp_1 to Sp_7 is sequentially performed by the decoding device 200, or a plurality of processing of some of these processing may be performed in parallel, or the order may be reversed.
[0477] [Entropy decoding unit]
[0478] The entropy decoding unit 202 performs entropy decoding on the coded bit stream. Specifically, the entropy decoding unit 202 arithmetically decodes the coded bit stream into a binary signal, for example. Then, the entropy decoding unit 202 debinarizes the binary signal. Thus, the entropy decoding unit 202 outputs the quantized coefficients to the inverse quantization unit 204 in units of blocks. The entropy decoding unit 202 may also output the coded bit stream to the intra-frame prediction unit 216, the inter-frame prediction unit 218, and the prediction control unit 220 in the embodiment (see Figure 1 The intra prediction unit 216, the inter prediction unit 218, and the prediction control unit 220 can perform the same prediction processing as that performed by the intra prediction unit 124, the inter prediction unit 126, and the prediction control unit 128 on the encoding device side.
[0479] [Inverse Quantization Unit]
[0480] The inverse quantization unit 204 inversely quantizes the quantized coefficients of the decoding target block (hereinafter referred to as the current block) as the input from the entropy decoding unit 202. Specifically, the inverse quantization unit 204 inversely quantizes the quantized coefficients of the current block based on the quantization parameters corresponding to the quantized coefficients. In addition, the inverse quantization unit 204 outputs the inversely quantized quantized coefficients (i.e., transform coefficients) of the current block to the inverse transform unit 206.
[0481] [Inverse transformation unit]
[0482] The inverse transform unit 206 restores the prediction error by performing inverse transform on the transform coefficients which are input from the inverse quantization unit 204 .
[0483] For example, when the information read from the encoded bit stream indicates that EMT or AMT is adopted (for example, the AMT flag is true), the inverse transform unit 206 performs an inverse transform on the transform coefficients of the current block based on the read information indicating the transform type.
[0484] Furthermore, for example, when the information read out from the encoded bit stream indicates that NSST is adopted, the inverse transform unit 206 applies an inverse re-transform to the transform coefficients.
[0485] [Addition Department]
[0486] The adding unit 208 reconstructs the current block by adding the prediction error input from the inverse transform unit 206 and the prediction sample input from the prediction control unit 220 . The adding unit 208 outputs the reconstructed block to the block memory 210 and the loop filter unit 212 .
[0487] [Block Memory]
[0488] The block memory 210 is a storage unit for storing blocks in a decoding target picture (hereinafter referred to as a current picture) to be referenced in intra prediction. Specifically, the block memory 210 stores the reconstructed blocks output from the adding unit 208 .
[0489] [Loop filter section]
[0490] The loop filter unit 212 performs loop filtering on the block reconstructed by the adder unit 208 , and outputs the reconstructed block after filtering to the frame memory 214 , a display device, and the like.
[0491] When the information indicating the on / off of ALF read from the coded bit stream indicates that ALF is on, one filter is selected from a plurality of filters based on the direction and activity of the local gradient, and the selected filter is applied to the reconstructed block.
[0492] [Frame Memory]
[0493] The frame memory 214 is a storage unit for storing reference pictures used in inter-frame prediction, and is sometimes referred to as a frame buffer. Specifically, the frame memory 214 stores the reconstructed blocks filtered by the loop filter unit 212 .
[0494] [Prediction processing unit (intra-frame prediction unit / inter-frame prediction unit / prediction control unit)]
[0495] Fig.43 2 is a flowchart showing an example of processing performed by the prediction processing unit of the decoding device 200. The prediction processing unit is composed of all or part of the components of the intra prediction unit 216, the inter prediction unit 218, and the prediction control unit 220.
[0496] The prediction processing unit generates a prediction image of the current block (step Sq_1). The prediction image is also called a prediction signal or a prediction block. In addition, the prediction signal includes, for example, an intra-frame prediction signal or an inter-frame prediction signal. Specifically, the prediction processing unit generates a prediction image of the current block using a reconstructed image obtained by generating a prediction block, generating a difference block, generating a coefficient block, restoring a difference block, and generating a decoded image block.
[0497] The reconstructed image may be, for example, an image of a reference picture, or may be a picture including the current block, that is, an image of a decoded block in the current picture. The decoded block in the current picture may be, for example, an adjacent block of the current block.
[0498] Fig.44 This is a flowchart showing another example of the processing performed by the prediction processing unit of the decoding device 200.
[0499] The prediction processing unit determines a method or mode for generating a prediction image (step Sr_1). For example, the method or mode can be determined based on prediction parameters or the like.
[0500] When it is determined that the first mode is a mode for generating a predicted image, the prediction processing unit generates a predicted image according to the first mode (step Sr_2a). In addition, when it is determined that the second mode is a mode for generating a predicted image, the prediction processing unit generates a predicted image according to the second mode (step Sr_2b). In addition, when it is determined that the third mode is a mode for generating a predicted image, the prediction processing unit generates a predicted image according to the third mode (step Sr_2c).
[0501] The first method, the second method, and the third method are different methods for generating a predicted image, and may be, for example, an inter-frame prediction method, an intra-frame prediction method, or other prediction methods. In such a prediction method, the above-mentioned reconstructed image may also be used.
[0502] [Intra-frame prediction unit]
[0503] The intra prediction unit 216 performs intra prediction based on the intra prediction mode read from the coded bit stream, and refers to the block in the current picture stored in the block memory 210, thereby generating a prediction signal (intra prediction signal). Specifically, the intra prediction unit 216 performs intra prediction by referring to samples (e.g., luminance values, color difference values) of blocks adjacent to the current block, thereby generating an intra prediction signal, and outputs the intra prediction signal to the prediction control unit 220.
[0504] Furthermore, when an intra prediction mode that refers to a luminance block is selected in intra prediction of a chrominance block, the intra prediction unit 216 may predict the chrominance component of the current block based on the luminance component of the current block.
[0505] Furthermore, when the information read from the coded bit stream indicates the adoption of PDPC, the intra prediction unit 216 corrects the pixel value after intra prediction based on the gradient of the reference pixel in the horizontal and vertical directions.
[0506] [Inter-frame prediction unit]
[0507] The inter-frame prediction unit 218 predicts the current block with reference to the reference picture stored in the frame memory 214. The prediction is performed in units of the current block or a sub-block (e.g., a 4×4 block) in the current block. For example, the inter-frame prediction unit 218 performs motion compensation using motion information (e.g., a motion vector) read from the coded bit stream (e.g., prediction parameters output from the entropy decoding unit 202), thereby generating an inter-frame prediction signal of the current block or sub-block, and outputs the inter-frame prediction signal to the prediction control unit 220.
[0508] When the information read from the encoded bit stream indicates that the OBMC mode is adopted, the inter prediction unit 218 generates an inter prediction signal using not only the motion information of the current block obtained by motion estimation but also the motion information of the neighboring blocks.
[0509] Furthermore, when the information read from the coded bit stream indicates that the FRUC mode is adopted, the inter-frame prediction unit 218 performs motion estimation according to the pattern matching method (bidirectional matching or template matching) read from the coded stream, thereby deriving motion information. Furthermore, the inter-frame prediction unit 218 performs motion compensation (prediction) using the derived motion information.
[0510] In addition, when the BIO mode is adopted, the inter-frame prediction unit 218 derives the motion vector based on the model assuming uniform linear motion. In addition, when the information read from the encoded bit stream indicates that the affine motion compensation prediction mode is adopted, the inter-frame prediction unit 218 derives the motion vector in sub-block units based on the motion vectors of multiple adjacent blocks.
[0511] [MV export > Normal interframe mode]
[0512] When the information read from the encoded bit stream indicates that the normal inter mode is applied, the inter prediction section 218 derives an MV based on the information read from the encoded bit stream, and performs motion compensation (prediction) using the MV.
[0513] Fig.45 This is a flowchart showing an example of inter prediction based on the normal inter mode in the decoding device 200 .
[0514] The inter-frame prediction unit 218 of the decoding device 200 performs motion compensation for each block. The inter-frame prediction unit 218 obtains multiple candidate MVs for the current block based on information such as MVs of multiple decoded blocks that are temporally or spatially around the current block (step Ss_1). In other words, the inter-frame prediction unit 218 creates a candidate MV list.
[0515] Next, the inter-frame prediction unit 218 extracts N (N is an integer greater than or equal to 2) candidate MVs from the multiple candidate MVs obtained in step Ss_1 as predicted motion vector candidates (also referred to as predicted MV candidates) in a predetermined priority order (step Ss_2). In addition, the priority order may be predetermined for each of the N predicted MV candidates.
[0516] Next, the inter-frame prediction unit 218 decodes the predicted motion vector selection information from the input stream (i.e., the encoded bit stream), and uses the decoded predicted motion vector selection information to select one predicted MV candidate from the N predicted MV candidates as the predicted motion vector (also called predicted MV) of the current block (step Ss_3).
[0517] Next, the inter prediction section 218 decodes the difference MV from the input stream, and derives the MV of the current block by adding the difference value that is the decoded difference MV to the selected prediction motion vector (step Ss_4).
[0518] Finally, the inter-frame prediction unit 218 generates a predicted image of the current block by performing motion compensation on the current block using the derived MV and the decoded reference picture (step Ss_5).
[0519] [Prediction Control Department]
[0520] The prediction control unit 220 selects one of the intra prediction signal and the inter prediction signal, and outputs the selected signal as a prediction signal to the adder 208. In general, the structures, functions, and processes of the prediction control unit 220, the intra prediction unit 216, and the inter prediction unit 218 on the decoding device side may correspond to the structures, functions, and processes of the prediction control unit 128, the intra prediction unit 124, and the inter prediction unit 126 on the encoding device side.
[0521] [Decoding device installation example]
[0522] Fig.46 2 is a block diagram showing an implementation example of the decoding device 200. The decoding device 200 includes a processor b1 and a memory b2. Fig.41 The components of the decoding device 200 are shown in FIG. Fig.46 The processor b1 and the memory b2 are installed as shown.
[0523] Processor b1 is a circuit that performs information processing and is a circuit that can access memory b2. For example, processor b1 is a dedicated or general electronic circuit that decodes the encoded moving image (i.e., the encoded bit stream). Processor b1 can also be a processor such as a CPU. In addition, processor b1 can also be a collection of multiple electronic circuits. In addition, for example, processor b1 can also play a role in Fig.41 The functions of multiple components of the decoding device 200 shown in the figure etc.
[0524] The memory b2 is a dedicated or general memory for storing information used by the processor b1 to decode the coded bit stream. The memory b2 may be an electronic circuit, or may be connected to the processor b1. In addition, the memory b2 may be included in the processor b1. In addition, the memory b2 may be a collection of multiple electronic circuits. In addition, the memory b2 may be a magnetic disk or an optical disk, or may be a storage device or a recording medium. In addition, the memory b2 may be a non-volatile memory or a volatile memory.
[0525] For example, the memory b2 may store moving images or coded bit streams. In addition, the memory b2 may also store a program for the processor b1 to decode the coded bit stream.
[0526] In addition, for example, memory b2 can serve as Fig.41 The memory b2 can be used as a component for storing information among the multiple components of the decoding device 200 shown in FIG. Fig.41 The functions of the block memory 210 and the frame memory 214 are shown. More specifically, the memory b2 can store reconstructed blocks and reconstructed pictures, etc.
[0527] In addition, in the decoding device 200, it is not necessary to install Fig.41 All of the multiple constituent elements shown above may not perform all of the multiple processes described above. Fig.41 Part of the plurality of components shown in the figure may be included in other devices, and part of the plurality of processes described above may be executed by other devices.
[0528] [Definition of terms]
[0529] As an example, each term may be defined as follows.
[0530] A picture is an arrangement of multiple luma samples in monochrome format, or an arrangement of multiple luma samples and 2 corresponding arrangements of multiple color difference samples in color formats of 4:2:0, 4:2:2, and 4:4:4. A picture can be a frame or a field.
[0531] A frame is a composition of a top field that generates a plurality of sample rows 0, 2, 4, ... and a bottom field that generates a plurality of sample rows 1, 3, 5, ...
[0532] A slice is an integer number of coding tree units contained in 1 independent slice segment and all subsequent dependent slice segments before the next independent slice segment (if any) in the same access unit.
[0533] A tile is a rectangular region of multiple coding tree blocks within a specific tile column and a specific tile row in a picture. A tile can still apply a loop filter across the edge of the tile, but can also be a rectangular region of a frame that is intended to be independently decodable and coded.
[0534] A block is an MxN (N rows and M columns) arrangement of multiple samples, or an MxN arrangement of multiple transform coefficients. A block can also be a square or rectangular area of multiple pixels consisting of multiple matrices of 1 luminance and 2 chrominance.
[0535] A CTU (Coding Tree Unit) can be a coding tree block of multiple luma samples of a picture with 3 sample arrangements, or 2 corresponding coding tree blocks of multiple chrominance samples. Alternatively, a CTU can be a coding tree block of any number of samples in a monochrome picture and a picture encoded using the syntax structure used in the encoding of 3 separate color planes and multiple samples.
[0536] A super block is composed of one or two mode information blocks, or may be recursively divided into four 32×32 blocks, or further divided into a square block of 64×64 pixels.
[0537] [First specific example of BIO]
[0538] Next, use Fig.47 , Fig.48 as well as Fig.49 A first specific example of the decoding process based on BIO will be described. For example, the decoding apparatus 200 calculates BIO parameters based on two reference blocks subjected to motion compensation, and decodes the current block using the calculated BIO parameters.
[0539] Fig.47 This is a flowchart showing a first specific example of the decoding process based on BIO. Fig.48 It is a conceptual diagram showing an example of calculating the horizontal gradient value. Fig.49 This is a conceptual diagram showing an example of calculating a vertical gradient value.
[0540] First, the decoding apparatus 200 calculates the first sum using the horizontal gradient value of the first reference block and the horizontal gradient value of the second reference block for the current block (S1001). The current block may be Fig.48 and Fig.49 The sub-blocks of the current coding unit (current CU) are shown.
[0541] The first reference block is a block referenced in the encoding of the current block, and is a block determined in the reference picture L0 based on the first motion vector of the current block or the current CU. The second reference block is a block referenced in the encoding of the current block, and is a block determined in the reference picture L1 based on the second motion vector of the current block or the current CU.
[0542] Basically, the reference picture L0 and the reference picture L1 are two different reference pictures, and the first reference block and the second reference block are two different reference blocks. In addition, here, the first reference block and the second reference block are respectively adjusted with fractional pixel accuracy by a motion compensation filter, and they have the same size as the current block.
[0543] When the current block is a subblock of the current coding unit, the first reference block and the second reference block may be subblocks of the reference block of the current coding unit.
[0544] Right now, Fig.48 as well as Fig.49 The multiple pixel values in the reference picture L0 in may also be multiple pixel values of a block determined as a reference block of the current coding unit with respect to the reference picture L0. Fig.48 as well as Fig.49 The multiple pixel values in the reference picture L1 in may also be multiple pixel values of a block determined as a reference block of the current coding unit with respect to the reference picture L1.
[0545] The decoding device 200 calculates the first sum using the horizontal gradient value of the first reference block and the horizontal gradient value of the second reference block. The decoding device 200 is not limited to the horizontal gradient value of the first reference block and the horizontal gradient value of the second reference block, and can also calculate the first sum using the horizontal gradient value of the periphery of the first reference block and the horizontal gradient value of the periphery of the second reference block. The following equations (3.1) and (3.2) represent examples of the calculation processing method of the first sum.
[0546]
Formula 4
[0547] G x =I x 0 +I x 1 (3.1)
[0548]
Formula 5
[0549] sG x =∑ [i,j]∈Ω sign(G x [i, j])×G x [i, j] (3.2)
[0550] Here, × represents multiplication, and + represents addition. In addition, sign represents a positive or negative sign, and for example, represents the following.
[0551]
Formula 6
[0552]
[0553] As a result, sign(G x [i, j])×G x [i, j] in G x When [i, j] is positive, it becomes G directly x [i, j], in G x If [i, j] is negative, it becomes -G x [i, j], that is, with the derived G x The absolute values (abs) of [i, j] are equal.
[0554] In formula (3.1), I x 0 represents the horizontal gradient value in the first reference block of the reference picture L0, I x 1 Indicates the horizontal gradient value in the second reference block of the reference picture L1.
[0555] An example of a horizontal gradient filter for obtaining horizontal gradient values is a 3-tap filter having a filter coefficient set of [-1, 0, 1]. The horizontal gradient value in the first reference block is calculated by applying the horizontal gradient filter to a plurality of reference pixels in the first reference block. The horizontal gradient value in the second reference block is calculated by applying the horizontal gradient filter to a plurality of reference pixels in the second reference block.
[0556] exist Fig.48 In the example shown, the horizontal gradient value I of the pixel located at [3, 2] of the first reference block is x 0 is calculated as the matrix product [-1, 0, 1] T [2, 3, 5], whose value is 3. The horizontal gradient value I of the pixel located at [3, 2] of the second reference block x 1 is calculated as the matrix product [-1, 0, 1] T [5, 3, 2] has a value of -3. In addition, [a, b, c] represents a matrix with 3 rows and 1 column.
[0557] In formula (3.2), sG x represents the first sum, calculated as G over the window represented by Ω x The absolute value of Ω and Ω. The size of Ω can also be the same as the current block. In addition, the size of Ω can also be larger than the size of the current block. In the latter case, the G at the adjacent position of the current blockx The value of is included in the calculation process of the 1st and .
[0558] In addition, the decoding apparatus 200 calculates the second sum (S1002) for the current block using the vertical gradient value of the first reference block and the vertical gradient value of the second reference block, similarly to the first sum which is the sum of the horizontal gradient values. The following equations (3.3) and (3.4) represent examples of the calculation processing method of the second sum.
[0559]
Formula 7
[0560] G y =I y 0 +I y 1 (3.3)
[0561]
Formula 8
[0562] sGy=∑ [i,j]∈Ω sign(G y [i, j])×G y [i, j] (3.4)
[0563] In formula (3.3), I y 0 represents the vertical gradient value in the first reference block of the reference picture L0, I y 1 Indicates the vertical gradient value in the second reference block of the reference picture L1.
[0564] An example of a vertical gradient filter for obtaining a vertical gradient value is a 3-tap filter having a filter coefficient set of [-1, 0, 1]. The vertical gradient value in the first reference block is calculated by applying the vertical gradient filter to a plurality of reference pixels in the first reference block. The vertical gradient value in the second reference block is calculated by applying the vertical gradient filter to a plurality of reference pixels in the second reference block.
[0565] exist Fig.49 In the example shown, the vertical gradient value I of the pixel located at [3, 2] of the first reference block is y 0 is calculated as the matrix product [-1, 0, 1] T [2, 3, 5], its value is 3. The vertical gradient value I of the pixel at [3, 2] of the second reference block is y 1 is calculated as the matrix product [-1, 0, 1] T [5, 3, 2], whose value is -3.
[0566] In formula (3.4), sG y represents the second sum, calculated as G over the window represented by Ωy The absolute value and. When the size of Ω is larger than the size of the current block, the G at the adjacent position of the current block y The value of is included in the calculation process of the second sum.
[0567] Next, the decoding device 200 determines whether the first sum is greater than the second sum (S1003). When it is determined that the first sum is greater than the second sum (Yes in S1003), the decoding device 200 determines the BIO parameter for the current block without using the vertical gradient value (S1004). Equations (3.5) to (3.9) represent examples of calculation processing for determining the BIO parameter in this case. In these equations, the BIO parameter represented by u is calculated using the horizontal gradient value.
[0568]
Formula 9
[0569] sG x dI=∑ [i,j]∈Ω -sign(G x [i,j])×(I 0 i,j -I 1 i,j ) (3.5)
[0570]
Formula 10
[0571] denominator=sG x (3.6)
[0572]
Formula 11
[0573] numerator=sG x dI (3.7)
[0574]
Formula 12
[0575] shift=Bits(denominator)-6 (3.8)
[0576]
Formula 13
[0577] u=Clip(((numerator>>(shift-12))×BIOShift[demoninator>>shift])>>27) (3.9)
[0578] Here, - indicates subtraction, and >> indicates shift operation. Bits, BIOShift, and Clip indicate the following, respectively. In the following, ceil indicates rounding up of a small number, and floor indicates dropping of a small number.
[0579]
Formula 14
[0580]
[0581] In formula (3.5), sG x dI as I throughout the window Ω 0 i,j and I 1 i,j The difference and -sign(G x [i, j]) is calculated. 0 i,j represents the pixel value at position [i, j] in the first reference block of the reference picture L0, I 1 i,j I represents the pixel value at position [i, j] in the second reference block of the reference picture L1. 0 i,j and I 1 i,j Sometimes only I 0 and I 1 The BIO parameter u is obtained by equations (3.6) to (3.9), using sG x dI and sG x to calculate.
[0582] When it is determined that the first sum is not greater than the second sum (No in S1003), the decoding device 200 determines the BIO parameter u for the current block without using the horizontal gradient value (S1005). Equations (3.10) to (3.14) represent examples of calculation processing for determining the BIO parameter u in this case. Equations (3.10) to (3.14) are basically the same as equations (3.5) to (3.9), but in equations (3.10) to (3.14), the BIO parameter u is calculated using the vertical gradient value.
[0583]
Formula 15
[0584] sG y dI=∑ [i,j]∈Ω -sign(G y [i,j])×(I 0 i,j -I 1 i,j ) (3.10)
[0585]
Formula 16
[0586] denominator=sG y (3.11)
[0587]
Formula 17
[0588] numerator=sG y dI (3.12)
[0589]
Formula 18
[0590] shift=Bits(denominator)-6 (3.13)
[0591]
Formula 19
[0592] u=Clip(((numerator>>(shift-12))×BIOShift[demoninator>>shift])>>27) (3.14)
[0593] In formula (3.10), sG y dI as I throughout the window Ω 0 i,j with I 1 i,j The difference and -sign(G y [i, j]). The BIO parameter u is calculated by using equations (3.11) to (3.14) using sG y dI and sG y to calculate.
[0594] Then, the decoding device 200 decodes the current block using the BIO parameter u (S1006). Specifically, the decoding device 200 generates a prediction sample using the BIO parameter u, and decodes the current block using the prediction sample. Equations (3.15) and (3.16) represent examples of arithmetic processing for generating prediction samples.
[0595]
Formula 20
[0596] prediction sample=(I 0 +I 1 +u×(I x 0 -I x 1 ))>>1 (3.15)
[0597]
Formula 21
[0598] prediction sample=(I 0 +I 1 +u×(I y 0 -I y 1 ))>>1 (3.16)
[0599] When it is determined that the first sum is greater than the second sum (Yes in S1003), equation (3.15) is used. When it is determined that the first sum is not greater than the second sum (No in S1003), equation (3.16) is used.
[0600] The decoding apparatus 200 may repeatedly perform the above-described process ( S1001 to S1006 ) on all sub-blocks of the current CU.
[0601] By using BIO, the decoding device 200 can improve the accuracy of the prediction sample in the current block. In addition, when calculating the BIO parameter, the decoding device 200 uses only one of the horizontal gradient value and the vertical gradient value, thereby suppressing the increase in the amount of calculation.
[0602] In addition, the above formula is an example, and the formula for calculating the BIO parameter is not limited to the above formula. For example, a formula equivalent to the above formula can be used. In addition, the positive and negative signs contained in the above formula can also be appropriately changed. Specifically, as a formula corresponding to the above formula (3.1) and (3.2), the following formula (4.1) can also be used.
[0603]
Formula 22
[0604] sG x =∑ [i,j]∈Ω abs(I x 1 +I x 0 ) (4.1)
[0605] In addition, for example, as an equation corresponding to the above-mentioned equation (3.5), the following equation (4.2) may be used.
[0606]
Formula 23
[0607] sG x dI=∑ [i,j]∈Ω (-sign(I x 1 +I x 0 )×(I 0 -I 1 )) (4.2)
[0608] In addition, for example, as an equation corresponding to the above-mentioned equation (3.15), the following equation (4.3) may be used.
[0609]
Formula 24
[0610] prediction sample=(I 1 +I 0 -u×(I x1 -I x 0 ))>>1 (4.3)
[0611] In addition, since equations (3.6) to (3.9) actually represent division, they can also be expressed as the following equation (4.4).
[0612]
Formula 25
[0613]
[0614] These formulas (4.1) to (4.4) are substantially the same as the above-mentioned formulas (3.1), (3.2), (3.5) to (3.9) and (3.15).
[0615] Similarly, specifically, as an equation corresponding to the above-mentioned equations (3.3) and (3.4), the following equation (4.5) can also be used.
[0616]
Formula 26
[0617] sG y =∑ [i,j]∈Ω abs(I y 1 +I y 0 ) (4.5)
[0618] In addition, for example, as an equation corresponding to the above-mentioned equation (3.10), the following equation (4.6) may be used.
[0619]
Formula 27
[0620] sG y dI=∑ [i,j]∈Ω (-sign(I y 1 +I y 0 )×(I 0 -I 1 )) (4.6)
[0621] In addition, for example, as an equation corresponding to the above-mentioned equation (3.16), the following equation (4.7) may be used.
[0622]
Formula 28
[0623] prediction sample=(I 1 +I 0 -u×(I y 1 -I y 0 ))>>1 (4.7)
[0624] In addition, since equations (3.11) to (3.14) actually represent division, they can also be expressed as the following equation (4.8).
[0625]
Formula 29
[0626]
[0627] These equations (4.5) to (4.8) are substantially the same as the above-mentioned equations (3.3), (3.4), (3.10) to (3.14) and (3.16).
[0628] In addition, in the above process, based on the comparison between the first sum and the second sum, the horizontal gradient value or the vertical gradient value is used, but the process of the decoding process is not limited to the above process. It is also possible to predetermine whether to use the horizontal gradient value or the vertical gradient value based on other encoding parameters. Moreover, it is also possible not to compare the first sum with the second sum, but to use the horizontal gradient value to derive the BIO parameter, and it is also possible to use the vertical gradient value to derive the BIO parameter. In addition, it is also possible to calculate only one of the first sum and the second sum.
[0629] Even without comparing the first sum and the second sum, the decoding device 200 can reduce substantial multiplications that require a large amount of computation in the computation performed at each pixel position by using the above equation, and can derive a plurality of parameters for generating a predicted image with a low amount of computation. Specifically, the decoding device 200 can calculate sG with a low amount of computation. x , sG x dI、sG y and sG y Therefore, the decoding apparatus 200 can reduce the amount of processing in decoding.
[0630] In the above description, the decoding process is shown, but the same process as above can also be applied to the encoding process. In other words, the decoding in the above description can also be replaced by encoding.
[0631] [Second specific example of BIO]
[0632] Next, a second specific example of the decoding process based on BIO will be described. For example, similar to the first specific example, the decoding apparatus 200 calculates BIO parameters based on two reference blocks subjected to motion compensation, and decodes the current block using the calculated BIO parameters.
[0633] In this specific example, prediction samples for decoding the current block are generated by the following equations (5.1) to (5.8).
[0634]
Formula 30
[0635] s1=∑[i,j]∈Ω (I x 1 +I x 0 )×(I x 1 +I x 0 ) (5.1)
[0636] [Formula 31]
[0637] s2=Σ [i,j]∈Ω (I y 1 +I y 0 )×(I y 1 +I y 0 )) (5.2)
[0638] [Formula 32]
[0639] s3=Σ [i,j]∈Ω (-(I x 1 +I x 0 )×(I 0 -I 1 )) (5.3)
[0640] [Formula 33]
[0641] s4=Σ [i,j]∈Ω (-(I y 1 +I y 0 )×(I 0 -I 1 )) (5.4)
[0642] [Formula 34]
[0643]
[0644] [Formula 35]
[0645]
[0646] [Formula 36]
[0647]
[0648] [Formula 37]
[0649]
[0650] S1 in the formula (5.1) in this specific example and sG in the formula (3.2) in the first specific example x In addition, S2 in the formula (5.2) in this specific example corresponds to sG in the formula (3.5) in the first specific example. x In addition, S3 of the formula (5.3) in this specific example corresponds to sG of the formula (3.4) in the first specific example. y In addition, S4 in the formula (5.4) in this specific example corresponds to sG in the formula (3.10) in the first specific example. y dI corresponds.
[0651] Furthermore, v in equations (5.5) to (5.7) in this specific example is x and v y They correspond to the BIO parameters respectively, and correspond to u in equations (3.9) and (3.14) in the first specific example.
[0652] In the first specific example, in sG x , sG x dI、sG y and sG y In the calculation of dI, the positive and negative signs are changed, and no substantial multiplication is performed. On the other hand, in this specific example, substantial multiplication is performed for the calculation of S1, S2, S3, and S4. As a result, the amount of calculation increases, but the prediction samples are generated with higher accuracy. In contrast, in the first specific example, the amount of calculation is reduced.
[0653] [Representative examples of structure and processing]
[0654] The following is a representative example of the configuration and processing of the encoding device 100 and the decoding device 200 described above. This representative example mainly corresponds to the first specific example described above.
[0655] Fig.50 1 is a flowchart showing the operation performed by the coding device 100. For example, the coding device 100 includes a circuit and a memory connected to the circuit. The circuit and memory included in the coding device 100 may also be connected to Fig.40 The processor a1 and the memory a2 shown correspond to each other. The circuit of the encoding device 100 performs the following operations during operation.
[0656] For example, the circuit of the encoding device 100 derives, for each relative pixel position, a gradient sum absolute value, which is the absolute value of the sum of the gradient value of the relative pixel position in the first range and the gradient value of the relative pixel position in the second range (S1101). Here, the first range includes the first reference block of the current block, and the second range includes the second reference block of the current block. Each relative pixel position is a pixel position that is determined relatively and commonly with respect to both the first range and the second range, and is a pixel position in each of the first range and the second range. Here, determined relatively and commonly means that the pixel position in the first range and the pixel position in the second range used when calculating a gradient sum absolute value are located at relatively the same position. For example, a gradient sum absolute value is derived using the gradient value for the pixel at the upper leftmost position in the first range and the gradient value for the pixel at the upper leftmost position in the second range.
[0657] Then, the circuit of the encoding device 100 derives the sum of the plurality of gradients and absolute values derived for the plurality of relative pixel positions as the first parameter ( S1102 ).
[0658] In addition, the circuit of the encoding device 100 derives, for each relative pixel position, a pixel difference value which is a difference between a pixel value at the relative pixel position in the first range and a pixel value at the relative pixel position in the second range (S1103). For example, at this time, the circuit of the encoding device 100 derives, for each relative pixel position, a pixel difference value with a positive or negative sign by subtracting a pixel value at the relative pixel position in the first range from a pixel value at the relative pixel position in the second range.
[0659] Then, the circuit of the encoding device 100 reverses or maintains the sign of the pixel difference value derived for each relative pixel position according to the sign of the gradient sum (S1104). Here, for each relative pixel position, the gradient sum is the sum of the gradient value of the relative pixel position in the first range and the gradient value of the relative pixel position in the second range.
[0660] Then, the circuit of the encoding device 100 derives the sum of the plurality of pixel difference values derived for the plurality of relative pixel positions and having their positive and negative signs inverted or maintained as the second parameter ( S1105 ).
[0661] Then, the circuit of the encoding device 100 generates a predicted image used for encoding the current block using the first parameter and the second parameter ( S1106 ).
[0662] Thus, the encoding device 100 can reduce substantial multiplications with a large amount of calculation in calculations performed at each pixel position, and can derive a plurality of parameters for generating a predicted image with a low amount of calculation. Therefore, the encoding device 100 can reduce the amount of processing in encoding.
[0663] In addition, for example, for each relative pixel position, the gradient value of the relative pixel position in the first range may be the horizontal gradient value of the relative pixel position in the first range. Furthermore, for each relative pixel position, the gradient value of the relative pixel position in the second range may be the horizontal gradient value of the relative pixel position in the second range. Thus, the encoding device 100 can derive a plurality of parameters with a low amount of computation using the horizontal gradient value.
[0664] In addition, for example, the circuit of the encoding device 100 may derive the first parameter by the above-mentioned equation (4.1). Furthermore, the circuit of the encoding device 100 may derive the second parameter by the above-mentioned equation (4.2).
[0665] Here, Ω represents a set of multiple relative pixel positions, and [i, j] represents each relative pixel position. x 0 represents the horizontal gradient value of each relative pixel position in the first range, I x 1 represents the horizontal gradient value of each relative pixel position in the second range, I 0 represents the pixel value of each relative pixel position in the first range, I 1 Indicates the pixel value of each relative pixel position in the second range. In addition, abs(I x 1 +I x 0 ) indicates I x 1 +I x 0 The absolute value of sign(I x 1 +I x 0 ) indicates I x 1 +I x 0 The positive and negative signs of .
[0666] Thus, the encoding device 100 can appropriately derive a plurality of parameters using pixel values and horizontal gradient values.
[0667] In addition, for example, for each relative pixel position, the gradient value of the relative pixel position in the first range may be the vertical gradient value of the relative pixel position in the first range. Furthermore, for each relative pixel position, the gradient value of the relative pixel position in the second range may be the vertical gradient value of the relative pixel position in the second range. Thus, the encoding device 100 can derive a plurality of parameters with a low amount of computation using the vertical gradient value.
[0668] In addition, for example, the circuit of the encoding device 100 may derive the first parameter by the above-mentioned equation (4.5). Furthermore, the circuit of the encoding device 100 may derive the second parameter by the above-mentioned equation (4.6).
[0669] Here, Ω represents a set of multiple relative pixel positions, and [i, j] represents each relative pixel position. y 0 represents the vertical gradient value of each relative pixel position in the first range, I y 1 represents the vertical gradient value of each relative pixel position in the second range, I 0 represents the pixel value of each relative pixel position in the first range, I 1 Indicates the pixel value of each relative pixel position in the second range. In addition, abs(I y 1 +I y 0 ) indicates I y 1 +I y 0 The absolute value of sign(I y 1 +I y 0 ) indicates I y 1 +I y 0 The positive and negative signs of .
[0670] Thus, the encoding device 100 can appropriately derive a plurality of parameters using pixel values and vertical gradient values.
[0671] In addition, for example, the circuit of the encoding device 100 may derive, for each relative pixel position, a horizontal gradient sum absolute value which is an absolute value of the sum of the horizontal gradient value of the relative pixel position in the first range and the horizontal gradient value of the relative pixel position in the second range. Furthermore, the circuit of the encoding device 100 may derive the sum of a plurality of horizontal gradient sum absolute values derived for a plurality of relative pixel positions.
[0672] Furthermore, the circuit of the encoding device 100 may derive, for each relative pixel position, a vertical gradient sum absolute value, which is an absolute value of the sum of the vertical gradient value of the relative pixel position in the first range and the vertical gradient value of the relative pixel position in the second range. Furthermore, the circuit of the encoding device 100 may derive a sum of a plurality of vertical gradient sum absolute values derived for a plurality of relative pixel positions.
[0673] Here, when the sum of the multiple horizontal gradients and absolute values is greater than the sum of the multiple vertical gradients and absolute values, the circuit of the encoding device 100 may also apply the horizontal gradient value to the gradient value. That is, in this case, the circuit of the encoding device 100 may also apply the horizontal gradient value of the relative pixel position in the first range to the gradient value of each relative pixel position in the first range. In addition, in this case, the circuit of the encoding device 100 may also apply the horizontal gradient value of the relative pixel position in the second range to the gradient value of each relative pixel position in the second range.
[0674] On the other hand, when the sum of the multiple horizontal gradients and absolute values is not greater than the sum of the multiple vertical gradients and absolute values, the circuit of the encoding device 100 may also apply the vertical gradient value to the gradient value. That is, in this case, the circuit of the encoding device 100 may also apply the vertical gradient value of the relative pixel position in the first range to the gradient value of each relative pixel position in the first range. And, in this case, the circuit of the encoding device 100 may also apply the vertical gradient value of the relative pixel position in the second range to the gradient value of each relative pixel position in the second range.
[0675] Thus, the encoding device 100 can apply the horizontal gradient value or the vertical gradient value to the derivation of multiple parameters based on the comparison of the sum associated with the horizontal gradient value and the sum associated with the vertical gradient value. That is, the encoding device 100 can apply the gradient value with a large influence to the derivation of multiple parameters.
[0676] In addition, for example, the circuit of the encoding device 100 may use the first parameter for the denominator and the second parameter for the numerator to derive a third parameter, and generate a predicted image using the third parameter. Thus, the encoding device 100 can appropriately generate a predicted image using parameters derived based on the relationship between multiple parameters.
[0677] In addition, for example, the circuit of the encoding device 100 may derive the gradient value of the relative pixel position in the first range and the gradient value of the relative pixel position in the second range by using a 3-tap filter having a filter coefficient set of [-1, 0, 1] for each relative pixel position. In this way, the encoding device 100 can simply and appropriately derive the gradient value of each pixel position.
[0678] In addition, for example, the current block may be a sub-block determined in a 4×4 pixel size in the coding unit. Furthermore, the circuit of the coding device 100 may derive the first parameter and the second parameter in units of sub-blocks. Thus, the coding device 100 can appropriately generate a predicted image using a plurality of parameters determined in a 4×4 pixel size.
[0679] In addition, for example, the circuit of the encoding device 100 may also use the first parameter and the second parameter to derive the parameter of the bidirectional optical flow, and use the parameter of the bidirectional optical flow and the bidirectional optical flow to generate a predicted image. Thus, the encoding device 100 can appropriately generate a predicted image. The parameter of the bidirectional optical flow may also be the third parameter mentioned above.
[0680] Furthermore, the inter-frame prediction unit 126 of the encoding device 100 may perform the above-described operation as a circuit of the encoding device 100 .
[0681] Fig.51 2 is a flowchart showing the operation performed by the decoding device 200. For example, the decoding device 200 includes a circuit and a memory connected to the circuit. The circuit and memory included in the decoding device 200 may also be connected to Fig.46 The processor b1 and the memory b2 shown correspond to each other. The circuit of the decoding device 200 performs the following operations.
[0682] For example, the circuit of the decoding device 200 derives, for each relative pixel position, the absolute value of the sum of the gradient value of the relative pixel position in the first range and the gradient value of the relative pixel position in the second range, that is, the gradient sum absolute value (S1201). Here, the first range includes the first reference block of the current block, and the second range includes the second reference block of the current block. Each relative pixel position is a pixel position that is determined relatively and commonly with respect to both the first range and the second range, and is a pixel position in each of the first range and the second range.
[0683] Then, the circuit of the decoding device 200 derives the sum of the plurality of gradients and absolute values derived for the plurality of relative pixel positions as the first parameter ( S1202 ).
[0684] In addition, the circuit of the decoding device 200 derives, for each relative pixel position, a pixel difference value which is a difference between a pixel value at the relative pixel position in the first range and a pixel value at the relative pixel position in the second range (S1203). For example, at this time, the circuit of the decoding device 200 derives, for each relative pixel position, a pixel difference value with a positive or negative sign by subtracting a pixel value at the relative pixel position in the first range from a pixel value at the relative pixel position in the second range.
[0685] Then, the circuit of the decoding device 200 reverses or maintains the sign of the pixel difference value derived for each relative pixel position according to the sign of the gradient sum (S1204). Here, for each relative pixel position, the gradient sum is the sum of the gradient value of the relative pixel position in the first range and the gradient value of the relative pixel position in the second range.
[0686] Then, the circuit of the decoding device 200 derives the sum of the plurality of pixel difference values derived for the plurality of relative pixel positions and having their positive and negative signs inverted or maintained as the second parameter ( S1205 ).
[0687] Then, the circuit of the decoding device 200 generates a predicted image used for decoding the current block using the first parameter and the second parameter ( S1206 ).
[0688] Thus, the decoding device 200 can reduce substantial multiplications with a large amount of calculations in calculations performed at each pixel position, and can derive a plurality of parameters for generating a predicted image with a low amount of calculations. Therefore, the decoding device 200 can reduce the amount of processing in decoding.
[0689] In addition, for example, for each relative pixel position, the gradient value of the relative pixel position in the first range may be the horizontal gradient value of the relative pixel position in the first range. Furthermore, for each relative pixel position, the gradient value of the relative pixel position in the second range may be the horizontal gradient value of the relative pixel position in the second range. Thus, the decoding apparatus 200 can derive a plurality of parameters with a low amount of computation using the horizontal gradient value.
[0690] In addition, for example, the circuit of the decoding device 200 may derive the first parameter by the above-mentioned equation (4.1). Furthermore, the circuit of the decoding device 200 may derive the second parameter by the above-mentioned equation (4.2).
[0691] Here, Ω represents a set of multiple relative pixel positions, and [i, j] represents each relative pixel position. x 0 represents the horizontal gradient value of each relative pixel position in the first range, I x 1 represents the horizontal gradient value of each relative pixel position in the second range, I 0 represents the pixel value of each relative pixel position in the first range, I 1 Indicates the pixel value of each relative pixel position in the second range. In addition, abs(I x 1 +I x 0 ) indicates I x 1 +I x 0 The absolute value of sign(I x 1 +I x 0 ) indicates I x 1 +I x 0 The positive and negative signs of .
[0692] Thus, the decoding apparatus 200 can appropriately derive a plurality of parameters using pixel values and horizontal gradient values.
[0693] In addition, for example, for each relative pixel position, the gradient value of the relative pixel position in the first range may be the vertical gradient value of the relative pixel position in the first range. Furthermore, for each relative pixel position, the gradient value of the relative pixel position in the second range may be the vertical gradient value of the relative pixel position in the second range. Thus, the decoding apparatus 200 can derive a plurality of parameters with a low amount of computation using the vertical gradient value.
[0694] In addition, for example, the circuit of the decoding device 200 may derive the first parameter by the above-mentioned equation (4.5). Furthermore, the circuit of the decoding device 200 may derive the second parameter by the above-mentioned equation (4.6).
[0695] Here, Ω represents a set of multiple relative pixel positions, and [i, j] represents each relative pixel position. y 1 represents the vertical gradient value of each relative pixel position in the second range, I 0 represents the pixel value of each relative pixel position in the first range, I 1 Indicates the pixel value of each relative pixel position in the second range. In addition, abs(I y 1 +I y 0 ) indicates I y 1 +I y 0 The absolute value of sign(I y 1 +I y 0 ) indicates I y 1 +I y 0 And, I y 0 Indicates the vertical gradient value of each relative pixel position in the first range.
[0696] Thus, the decoding apparatus 200 can appropriately derive a plurality of parameters using pixel values and vertical gradient values.
[0697] In addition, for example, the circuit of the decoding device 200 may derive, for each relative pixel position, a horizontal gradient sum absolute value which is an absolute value of the sum of the horizontal gradient value of the relative pixel position in the first range and the horizontal gradient value of the relative pixel position in the second range. Furthermore, the circuit of the decoding device 200 may derive a sum of a plurality of horizontal gradient sum absolute values derived for a plurality of relative pixel positions.
[0698] Furthermore, the circuit of the decoding device 200 may derive, for each relative pixel position, a vertical gradient sum absolute value, which is an absolute value of the sum of the vertical gradient value of the relative pixel position in the first range and the vertical gradient value of the relative pixel position in the second range. Then, the circuit of the decoding device 200 may derive a sum of a plurality of vertical gradient sum absolute values derived for a plurality of relative pixel positions.
[0699] Here, when the sum of the multiple horizontal gradients and absolute values is greater than the sum of the multiple vertical gradients and absolute values, the circuit of the decoding device 200 may also apply the horizontal gradient value to the gradient value. That is, in this case, the circuit of the decoding device 200 may also apply the horizontal gradient value of the relative pixel position in the first range to the gradient value of each relative pixel position in the first range. In addition, in this case, the circuit of the decoding device 200 may also apply the horizontal gradient value of the relative pixel position in the second range to the gradient value of each relative pixel position in the second range.
[0700] On the other hand, when the sum of the multiple horizontal gradients and absolute values is not greater than the sum of the multiple vertical gradients and absolute values, the circuit of the decoding device 200 may also apply the vertical gradient value to the gradient value. That is, in this case, the circuit of the decoding device 200 may also apply the vertical gradient value of the relative pixel position in the first range to the gradient value of each relative pixel position in the first range. And, in this case, the circuit of the decoding device 200 may also apply the vertical gradient value of the relative pixel position in the second range to the gradient value of each relative pixel position in the second range.
[0701] Thus, the decoding device 200 can apply the horizontal gradient value or the vertical gradient value to the derivation of multiple parameters based on the comparison of the sum associated with the horizontal gradient value and the sum associated with the vertical gradient value. That is, the decoding device 200 can apply the gradient value with a large influence to the derivation of multiple parameters.
[0702] In addition, for example, the circuit of the decoding device 200 may use the first parameter for the denominator and the second parameter for the numerator to derive the third parameter, and generate the predicted image using the third parameter. Thus, the decoding device 200 can appropriately generate the predicted image using the parameters derived based on the relationship between the plurality of parameters.
[0703] In addition, for example, the circuit of the decoding device 200 may derive the gradient value of the relative pixel position in the first range and the gradient value of the relative pixel position in the second range using a 3-tap filter having a filter coefficient set of [-1, 0, 1] for each relative pixel position. In this way, the decoding device 200 can simply and appropriately derive the gradient value of each pixel position.
[0704] In addition, for example, the current block may be a sub-block determined in a coding unit with a size of 4×4 pixels. Furthermore, the circuit of the decoding device 200 may derive the first parameter and the second parameter in units of sub-blocks. Thus, the decoding device 200 can appropriately generate a predicted image using a plurality of parameters determined in a size of 4×4 pixels.
[0705] In addition, for example, the circuit of the decoding device 200 may also use the first parameter and the second parameter to derive the parameter of the bidirectional optical flow, and use the parameter of the bidirectional optical flow and the bidirectional optical flow to generate a predicted image. Thus, the decoding device 200 can appropriately generate a predicted image. The parameter of the bidirectional optical flow may also be the third parameter mentioned above.
[0706] Furthermore, the inter prediction unit 218 of the decoding device 200 may perform the above-described operation as a circuit of the decoding device 200 .
[0707] [Other examples]
[0708] The encoding device 100 and the decoding device 200 in the above-mentioned examples can be used as an image encoding device and an image decoding device, respectively, or can be used as a moving picture encoding device and a moving picture decoding device, respectively.
[0709] Alternatively, the encoding device 100 and the decoding device 200 may be used as prediction devices, respectively. That is, the encoding device 100 and the decoding device 200 may correspond to only the inter-frame prediction unit 126 and the inter-frame prediction unit 218, respectively. Furthermore, other components may be included in other devices.
[0710] In addition, at least a part of each of the above examples may be used as an encoding method, may be used as a decoding method, may be used as a prediction method, or may be used as other methods.
[0711] In addition, each component is constituted by dedicated hardware, but can also be implemented by executing a software program suitable for each component. Each component can be implemented by a program execution unit such as a CPU or a processor reading and executing a software program recorded in a recording medium such as a hard disk or a semiconductor memory.
[0712] Specifically, each of the encoding device 100 and the decoding device 200 may include a processing circuit and a storage device electrically connected to the processing circuit and accessible from the processing circuit. For example, the processing circuit corresponds to the processor a1 or b1, and the storage device corresponds to the memory a2 or b2.
[0713] The processing circuit includes at least one of dedicated hardware and a program execution unit, and uses the storage device to execute the processing. In addition, when the processing circuit includes the program execution unit, the storage device stores a software program executed by the program execution unit.
[0714] Here, the software that realizes the above-mentioned encoding device 100 or decoding device 200 is the following program.
[0715] For example, the program may also cause a computer to execute the following encoding method: deriving gradients and absolute values for a plurality of relative pixel positions, respectively, the plurality of relative pixel positions being a plurality of pixel positions commonly and relatively determined for a first range of a first reference block including a current block and a second range of a second reference block including the current block, and being a plurality of pixel positions in each of the first range and the second range, the gradients and absolute values being the absolute values of the sums of the gradient values of the relative pixel positions in the first range and the gradient values of the relative pixel positions in the second range, deriving the sums of the plurality of gradients and absolute values derived for the plurality of relative pixel positions as a first parameter, and deriving the plurality of relative pixel positions for the plurality of relative pixels. For each of the plurality of relative pixel positions, a difference between the pixel value of the relative pixel position in the first range and the pixel value of the relative pixel position in the second range, i.e., a pixel differential value, is derived; for each of the plurality of relative pixel positions, according to the positive and negative signs of the gradient value of the relative pixel position in the first range and the gradient value of the relative pixel position in the second range, i.e., the sum of the gradient sum, i.e., the plurality of pixel differential values derived for the plurality of relative pixel positions and with the positive and negative signs respectively reversed or maintained, is derived as a second parameter; and a predicted image used in encoding the current block is generated using the first parameter and the second parameter.
[0716] In addition, for example, the program may cause a computer to execute the following decoding method: deriving gradients and absolute values for a plurality of relative pixel positions, respectively, the plurality of relative pixel positions being a plurality of pixel positions commonly and relatively determined for a first range of a first reference block including a current block and a second range of a second reference block including the current block, and being a plurality of pixel positions in each of the first range and the second range, the gradients and absolute values being the absolute values of the sum of the gradient values of the relative pixel positions in the first range and the gradient values of the relative pixel positions in the second range, deriving the sum of the plurality of gradients and absolute values derived for the plurality of relative pixel positions as a first parameter, and deriving the plurality of relative pixel positions for ... For each pixel position, a difference between a pixel value of the relative pixel position in the first range and a pixel value of the relative pixel position in the second range, i.e., a pixel differential value, is derived; for each of the plurality of relative pixel positions, based on the positive and negative signs of the gradient value of the relative pixel position in the first range and the gradient value of the relative pixel position in the second range, i.e., the gradient sum, the positive and negative signs of the pixel differential value derived for the relative pixel position are reversed or maintained; the sum of the plurality of pixel differential values respectively derived for the plurality of relative pixel positions and having their positive and negative signs reversed or maintained is derived as a second parameter; and a predicted image used in decoding the current block is generated using the first parameter and the second parameter.
[0717] In addition, as described above, each component may also be a circuit. These circuits may constitute one circuit as a whole, or they may be different circuits. In addition, each component may be implemented by a general-purpose processor or a dedicated processor.
[0718] In addition, the processing performed by a specific component may be performed by other components. In addition, the order of performing the processing may be changed, and a plurality of processing may be performed simultaneously. In addition, the encoding and decoding device may include the encoding device 100 and the decoding device 200.
[0719] In addition, the ordinal numbers such as 1 and 2 used in the description may be replaced as appropriate. In addition, ordinal numbers may be newly assigned to components and the like, or ordinal numbers may be removed.
[0720] The above describes the forms of the encoding device 100 and the decoding device 200 based on multiple examples, but the forms of the encoding device 100 and the decoding device 200 are not limited to these examples. As long as it does not depart from the gist of the present invention, various modified forms that can be thought of by those skilled in the art are implemented on each example, and forms constructed by combining constituent elements in different examples can also be included in the scope of the forms of the encoding device 100 and the decoding device 200.
[0721] It is also possible to implement by combining at least a portion of one or more methods disclosed herein with other methods of the present invention. In addition, it is also possible to implement by combining a portion of the processing, a portion of the structure of the device, a portion of the grammar, etc. recorded in the flowchart of one or more methods disclosed herein with other methods.
[0722] [Implementation and Application]
[0723] In each of the above embodiments, each functional block or active block can usually be implemented by an MPU (microprocessing unit) and a memory. In addition, the processing of each functional block can also be implemented by a program execution unit such as a processor that reads and executes the software (program) recorded in a recording medium such as a ROM. The software can be distributed. The software can also be recorded in various recording media such as semiconductor memories. In addition, each functional block can also be implemented by hardware (dedicated circuit). Various combinations of hardware and software can be used.
[0724] The processing described in each embodiment can be implemented by centralized processing using a single device (system), or can be implemented by distributed processing using multiple devices. In addition, the processor that executes the above program can be single or multiple. That is, centralized processing can be performed or distributed processing can be performed.
[0725] The aspects of the present invention are not limited to the above-described embodiments, and various modifications can be made, which are also included in the scope of the aspects of the present invention.
[0726] Furthermore, here, an application example of the moving picture encoding method (image encoding method) or the moving picture decoding method (image decoding method) shown in each of the above embodiments and various systems implementing the application example are described. Such a system may also be characterized by having an image encoding device using the image encoding method, an image decoding device using the image decoding method, or an image encoding and decoding device having both. Other structures of such a system can be appropriately changed according to circumstances.
[0727] [Example of use]
[0728] Fig.52 The figure shows the overall structure of a content supply system ex100 for realizing content distribution service. The communication service providing area is divided into desired sizes, and base stations ex106, ex107, ex108, ex109, and ex110, which are fixed wireless stations in the example shown in the figure, are respectively installed in each cell.
[0729] In the 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 also connect some of the above devices in combination. In various embodiments, the devices may be directly or indirectly connected to each other via a telephone network or short-range wireless instead of via base stations ex106 to ex110. Furthermore, the streaming server ex103 may be connected to the devices such as the computer ex111, the game machine ex112, the camera ex113, the home appliance ex114, and the smartphone ex115 via the Internet ex101. Furthermore, the streaming server ex103 may be connected to a terminal in a hotspot in an airplane ex117 via a satellite ex116.
[0730] Alternatively, wireless access points or hotspots may be used instead of the base stations ex106 to ex110. Furthermore, 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 directly connected to the aircraft ex117 without going through the satellite ex116.
[0731] The camera ex113 is a device such as a digital camera capable of taking still images and moving images. The smartphone ex115 is a smartphone, a mobile phone, or a PHS (Personal Handy-phone System) that supports mobile communication systems such as 2G, 3G, 3.9G, 4G, and 5G in the future.
[0732] The household appliance ex114 is a refrigerator or a device included in a household fuel cell cogeneration system.
[0733] In the content supply system ex100, a terminal having a camera function is connected to the streaming server ex103 via the base station ex106, etc., so that on-site distribution can be performed. In on-site distribution, a terminal (computer ex111, game machine ex112, camera ex113, home appliance ex114, smartphone ex115, terminal in airplane ex117, etc.) can perform the encoding process described in the above-mentioned embodiments on the still image or moving image content captured by the user using the terminal, multiplex the image data obtained by encoding and the sound data obtained by encoding the sound corresponding to the image, and transmit the obtained data to the streaming server ex103. That is, each terminal functions as an image encoding device according to one aspect of the present invention.
[0734] On the other hand, the streaming server ex103 streams the content data sent by the client that requested it. The client is a computer ex111, a game machine ex112, a camera ex113, a home appliance ex114, a smartphone ex115, or a terminal in an airplane ex117 that can decode the coded data. Each device that receives the distributed data can also decode and reproduce the received data. That is, each device can also function as an image decoding device according to one aspect of the present invention.
[0735] [Distributed processing]
[0736] In addition, the streaming media server ex103 can also be a plurality of servers or a plurality of computers, which distributes the data by distributing the processing or recording. For example, the streaming media server ex103 can also be implemented by CDN (Contents Delivery Network), which implements content distribution by connecting many edge servers scattered in the world to the network between the edge servers. In CDN, it is possible to dynamically allocate physically closer edge servers according to the client. And, by caching and distributing content to the edge server, it is possible to reduce delay. In addition, in the case of several types of errors or when the communication state changes due to the increase in the amount of communication, it is possible to distribute the processing by using a plurality of edge servers, or switch the distribution subject to other edge servers, or bypass the part of the network where the failure occurs and continue to distribute, so that high-speed and stable distribution can be achieved.
[0737] In addition, the encoding process of the captured data is not limited to the distributed processing itself, and the encoding process can be performed by each terminal, on the server side, or shared. As an example, two processing cycles are usually performed in the encoding process. In the first cycle, the complexity or encoding amount of the image of the frame or scene unit is detected. In addition, in the second cycle, processing is performed to maintain the image quality and improve the encoding efficiency. For example, by performing the first encoding process by the terminal and the second encoding process by the server side that receives the content, the quality and efficiency of the content can be improved while reducing the processing load in each terminal. In this case, if there is a request for receiving and decoding almost in real time, the data completed by the first encoding by the terminal can also be received and reproduced by other terminals, so more flexible real-time distribution can also be performed.
[0738] As another example, the camera ex113 or the like extracts feature quantities (features or feature quantities) from an image, compresses data on the feature quantities as metadata, and transmits the data to the server. The server determines the importance of an object based on the feature quantities, switches the quantization accuracy, and performs compression corresponding to the meaning of the image (or the importance of the content). The feature quantity data is particularly effective in improving the accuracy and efficiency of motion vector prediction during re-compression in the server. Alternatively, the terminal may perform simple encoding such as VLC (variable length coding), and the server may perform encoding with a large processing load such as CABAC (context adaptive binary arithmetic coding).
[0739] As another example, in a stadium, shopping mall, or factory, there are multiple video data obtained by shooting roughly the same scene by multiple terminals. In this case, multiple terminals that have shot, and other terminals and servers that have not shot as needed, are used to distribute the encoding processing, such as GOP (Group of Picture) units, picture units, or tile units obtained by dividing pictures, so as to perform distributed processing. This can reduce delays and better achieve real-time performance.
[0740] Since the multiple image data are substantially the same scene, the server can also manage and / or instruct the image data taken by each terminal to refer to each other. In addition, the server can receive the encoded data from each terminal and change the reference relationship between the multiple data, or modify or replace the image itself and re-encode it. In this way, a stream with improved quality and efficiency of each data can be generated.
[0741] Furthermore, the server may perform transcoding to change the encoding method of the video data and distribute the video data. For example, the server may convert the encoding method of the MPEG class to the VP class (such as VP9), or convert H.264 to H.265, etc.
[0742] Thus, the encoding process can be performed by a terminal or one or more servers. Therefore, the following uses "server" or "terminal" as the subject of the process, but part or all of the process performed by the server can also be performed by the terminal, and part or all of the process performed by the terminal can also be performed by the server. In addition, the same is true for the decoding process.
[0743] [3D, multi-angle]
[0744] There are more and more cases where images or videos taken by terminals such as multiple cameras ex113 and / or smartphones ex115 that are roughly synchronized with each other, or the same scene taken from different angles, are combined and used. The images taken by each terminal can be combined based on the relative position relationship between the terminals obtained separately, or the area with the same feature points contained in the images.
[0745] The server not only encodes two-dimensional moving images, but also can encode still images automatically or at a user-specified time based on scene analysis of moving images and send them to the receiving terminal. When the server is able to obtain the relative position relationship between the shooting terminals, it can generate not only two-dimensional moving images but also three-dimensional shapes of the scene based on images of the same scene shot from different angles. The server can also encode three-dimensional data generated by point clouds, etc. separately, and can also select or reconstruct images from images shot by multiple terminals based on the results of identifying or tracking people or targets using three-dimensional data to generate images sent to the receiving terminal.
[0746] In this way, the user can arbitrarily select each image corresponding to each shooting terminal to enjoy the scene, and can also enjoy the content of the image of the selected viewpoint cut out from the three-dimensional data reconstructed using multiple images or images. Furthermore, along with the image, the sound can also be collected from multiple different angles, and the server multiplexes the sound from a specific angle or space with the corresponding image and sends the multiplexed image and sound.
[0747] In addition, in recent years, content that establishes correspondence between the real world and the virtual world, such as Virtual Reality (VR) and Augmented Reality (AR), has also become popular. In the case of VR images, the server produces viewpoint images for the right eye and the left eye respectively, and can be encoded to allow reference between viewpoint images through Multi-View Coding (MVC) or the like, or encoded as different streams without reference to each other. When decoding different streams, they can be reproduced synchronously with each other according to the user's viewpoint to reproduce a virtual three-dimensional space.
[0748] In the case of AR images, the server may also overlap the virtual object information in the virtual space with the camera information in the real space based on the three-dimensional position or the movement of the user's viewpoint. The decoding device obtains or maintains the virtual object information and three-dimensional data, generates a two-dimensional image according to the movement of the user's viewpoint, and produces overlapping data by smoothly connecting. Alternatively, the decoding device may send the movement of the user's viewpoint to the server in addition to the commission of the virtual object information. Alternatively, the server may produce overlapping data according to the three-dimensional data maintained in the server, matching the movement of the received viewpoint, encoding the overlapping data and distributing it to the decoding device. In addition, typically, the overlapping data has an alpha value indicating the transmittance other than RGB, and the server sets the alpha value of the part other than the target produced according to the three-dimensional data to 0, etc., and encodes it in a state where the part is transparent. Alternatively, the server may set the RGB value of a specified value as the background, as in a chroma key, and generate data that sets the part other than the target as the background color. The RGB value of the specified value may also be predetermined.
[0749] Similarly, the decoding process of the distributed data can be performed by the client (for example, the terminal), can be performed on the server side, or can be shared. As an example, a terminal may first send a receiving request to the server, and other terminals may receive the content corresponding to the request and perform decoding processing, and send the decoded signal to a device with a display. By distributing the processing regardless of the performance of the communicative terminal itself and selecting appropriate content, data with better image quality can be reproduced. In addition, as another example, large-size image data can also be received by a TV, etc., and a portion of the image such as tiles after being divided can be decoded and displayed by the personal terminal of the viewer. In this way, while making the overall image shared, it is possible to confirm one's own area of responsibility or the area that one wants to confirm in more detail at hand.
[0750] In a situation where multiple short-range, medium-range or long-range wireless communications can be used indoors and outdoors, it may be possible to receive content seamlessly using distribution system standards such as MPEG-DASH. The user can also switch in real time while freely selecting the user's terminal, decoding devices or display devices such as displays configured indoors and outdoors. In addition, it is possible to switch the decoding terminal and the display terminal and perform decoding using its own location information, etc. As a result, it is also possible to map and display information on a part of the wall or ground of a building next to a displayable device while the user is moving to the destination. In addition, it is also possible to switch the bit rate of the received data 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 the encoded data being copied in an edge server of the content distribution service.
[0751] [Scalable Coding]
[0752] To switch content, use Fig.53 1. The scalable stream compressed and coded using the moving picture coding method described in the above embodiments is described as shown. For the server, a plurality of streams having the same content but different qualities may be provided as a single stream, or a structure in which the content is switched by utilizing the characteristics of a temporally / spatially scalable stream coded by layered coding as shown in the figure. That is, the decoding side determines which layer to decode based on internal factors such as performance and external factors such as the state of the communication band, so that the decoding side can freely switch between low-resolution content and high-resolution content for decoding. For example, when a user wants to watch a video that he / she has watched on the smartphone ex115 while on the move, for example, on an Internet TV or the like after returning home, the device only needs to decode the same stream into different layers, thereby reducing the burden on the server side.
[0753] Furthermore, in addition to the hierarchical structure of encoding the picture for each layer and realizing the enhancement layer above the base layer as described above, the enhancement layer may also include meta-information such as statistical information based on the image. Alternatively, the decoding side may generate high-definition content by super-resolving the picture of the base layer based on the meta-information. Super-resolution can improve the SN ratio while maintaining and / or expanding the resolution. The meta-information includes information for determining linear or nonlinear filter coefficients such as those used in the super-resolution processing, or information for determining parameter values in the filter processing, machine learning, or least squares operation used in the super-resolution processing.
[0754] Alternatively, a structure may be provided for dividing a picture into tiles according to the meaning of an object in the image. The decoding side decodes only a part of the area by selecting tiles to be decoded. Furthermore, by storing the attributes of the object (a person, a car, a ball, etc.) and the position in the image (the coordinate position in the same image, etc.) as meta-information, the decoding side can determine the position of the desired object based on the meta-information and determine the tile that includes the object. For example, Fig.54 As shown, the meta-information may be stored using a data storage structure different from the pixel data, such as SEI (supplemental enhancement information) messages in HEVC. The meta-information indicates, for example, the position, size, or color of the main object.
[0755] Meta information may also be stored in units consisting of multiple pictures, such as streams, sequences, or random access units. The decoding side can obtain the time when a specific person appears in the image, and by matching the information of the picture unit and the time information, it can determine the picture where the target exists and the position of the target in the picture.
[0756] [Web page optimization]
[0757] Fig.55 This is a diagram showing an example of a display screen of a web page on the computer ex111 or the like. Fig.56 1 is a diagram showing an example of a display screen of a web page on a smartphone ex115 or the like. Fig.55 and Fig.56 As shown, there are cases where a web page includes a plurality of link images that are links to image contents, and the visible form of the link images may differ depending on the device being browsed. When a plurality of link images are visible on the screen, before a user explicitly selects a link image, or before a link image approaches the center of the screen, or before the entire link image enters the screen, the display device (decoding device) may display a still image or I picture of each content as a link image, or may display an image such as a GIF animation using a plurality of still images or I pictures, or may receive only a base layer and decode and display the image.
[0758] When a linked image is selected by the user, the display device, for example, sets the base layer as the top priority and decodes it. In addition, if there is information indicating that the content is scalable in the HTML constituting the web page, the display device can also decode to the enhancement layer. Moreover, in order to ensure real-time performance, before selection or when the communication band is very tight, the display device can reduce the delay between the decoding time and the display time of the head picture (the delay from the start of decoding of the content to the start of display) by decoding and displaying only the pictures that are forward referenced (I pictures, P pictures, and B pictures that are only forward referenced). Furthermore, the display device can also forcibly ignore the reference relationship of the pictures and set all B pictures and P pictures as forward references and roughly decode them, and perform normal decoding as the number of pictures received increases over time.
[0759] [Automatic driving]
[0760] Furthermore, when still images or video data such as two-dimensional or three-dimensional map information are transmitted and received for the purpose of automatic driving or driving assistance of a vehicle, the receiving terminal may receive weather or construction information as meta-information in addition to image data belonging to one or more layers, and decode them by establishing a correspondence between them. Furthermore, the meta-information may belong to a layer or may be multiplexed with image data alone.
[0761] In this case, since the car, drone, or airplane including the receiving terminal is moving, the receiving terminal can transmit the location information of the receiving terminal to achieve seamless reception and decoding while switching the base stations ex106 to ex110. In addition, the receiving terminal can dynamically switch the degree to which meta-information is received or the degree to which map information is updated according to the user's selection, the user's condition, and / or the state of the communication band.
[0762] In the content providing system ex100, the client can receive, decode and reproduce the encoded information sent by the user in real time.
[0763] [Distribution of Personal Content]
[0764] Furthermore, in the content supply system ex100, not only high-quality, long-duration contents provided by video distributors but also low-quality, short-duration contents provided by individuals can be unicasted or multicasted. Such personal contents are expected to increase in the future. In order to make personal contents better, the server may perform encoding after editing. This can be achieved, for example, with the following structure.
[0765] After taking pictures in real time or accumulating them, the server performs recognition processing such as shooting errors, scene search, meaning analysis and target detection based on the original image data or encoded data. In addition, based on the recognition results, the server manually or automatically corrects focus deviation or hand shaking, deletes scenes of low importance such as scenes with lower brightness than other pictures or scenes that are not in focus, or emphasizes the edges of the target, or changes the color tone. The server encodes the edited data based on the editing results. In addition, it is known that if the shooting time is too long, the viewing rate will decrease. The server can also automatically limit not only the scenes of low importance as mentioned above, but also the scenes with less movement based on the image processing results according to the shooting time, so as to become content within a specific time range. Alternatively, the server can also generate a summary based on the results of the scene's meaning analysis and encode it.
[0766] Personal content may be written with content that infringes copyright, author's personality rights or portrait rights in its original state, or it may be shared beyond the desired scope, which is inconvenient for individuals. Therefore, for example, the server may forcibly change the faces of people in the peripheral part of the screen or the home to an out-of-focus image for encoding. In addition, the server may also identify whether the face of a person different from the pre-registered person is captured in the encoded image, and if so, apply mosaics to the face part. Alternatively, as a pre-processing or post-processing of the encoding, the user may specify the person or background area that he wants to process the image from the perspective of copyright, etc. The server may also replace the specified area with another image, or blur the focus, etc. If it is a person, it is possible to track the person in the moving image and replace the image of the face part of the person.
[0767] The viewing and listening of personal content with a small amount of data has a strong requirement for real-time performance, so although it also depends on the bandwidth, the decoding device may first receive the basic layer with the highest priority and perform decoding and reproduction. The decoding device may also receive the enhancement layer during this period, and when the reproduction is repeated more than twice, the enhancement layer may be included to reproduce the high-definition image. In this way, if the stream is scalably encoded, it is possible to provide an experience in which the stream gradually becomes smoother and the image becomes better, although the moving image is relatively rough when it is not selected or at the beginning of viewing. In addition to scalable encoding, the same experience can be provided when the rougher stream reproduced for the first time and the second stream encoded with reference to the moving image of the first time are composed of one stream.
[0768] [Other application examples]
[0769] In addition, these encoding and decoding processes are usually processed in the LSI ex500 of each terminal. LSI (large scale integration circuitry) ex500 (refer to Fig.52 ) may be a single chip or a multi-chip structure. Alternatively, software for encoding or decoding moving images may be loaded into a recording medium (CD-ROM, floppy disk, hard disk, etc.) readable by the computer ex111 or the like, and the encoding or decoding may be performed using the software. Furthermore, if the smartphone ex115 has a camera, moving image data acquired by the camera may be transmitted. In this case, the moving image data may be data encoded by the LSI ex500 of the smartphone ex115.
[0770] In addition, LSIex500 may also be a structure that downloads and activates application software. In this case, the terminal first determines whether the terminal corresponds to the encoding method of the content or has the ability to execute a specific service. If the terminal does not correspond to the encoding method of the content or does not have the ability to execute a specific service, the terminal may also download a codec or application software and then obtain and reproduce the content.
[0771] Furthermore, the content supply system ex100 is not limited to the content supply system ex100 via the Internet ex101, and at least one of the video encoding device (video encoding device) or video decoding device (video decoding device) in each of the above-mentioned embodiments can be incorporated into a digital broadcasting system. Since multiplexed data in which video and audio are multiplexed is transmitted and received by using broadcasting radio waves such as satellites, the content supply system ex100 is different from the structure that is easy for unicast in that it is suitable for multicast, but the same application can be made to the encoding process and the decoding process.
[0772] [Hardware structure]
[0773] Fig.57 It is further detailed Fig.52 FIG. 115 is a diagram of a smartphone ex115 shown in FIG. Fig.58 1 is a diagram showing a configuration example of a smartphone ex115. The smartphone ex115 includes an antenna ex450 for transmitting and receiving radio waves with the base station ex110, a camera unit ex465 capable of shooting video and still images, and a display unit ex458 for displaying decoded data such as the video shot by the camera unit ex465 and the video received by the antenna ex450. The smartphone ex115 further includes an operation unit ex466 such as a touch panel, a sound output unit ex457 such as a speaker for outputting sound or audio, a sound input unit ex456 such as a microphone for inputting sound, a memory unit ex467 capable of storing coded data or decoded data such as shot video or still images, recorded sound, received video or still images, and mails, and a slot unit ex464 as an interface unit with a SIM ex468 for identifying a user and authenticating access to various data such as a network. In addition, an external memory may be used instead of the memory unit ex467.
[0774] The main control unit ex460, which can perform integrated control over the display unit ex458 and the operation unit ex466, is synchronously connected to the power circuit unit ex461, the operation input control unit ex462, the image signal processing unit ex455, the camera interface unit ex463, the display control unit ex459, the modulation / demodulation unit ex452, the multiplexing / separation unit ex453, the sound signal processing unit ex454, the slot unit ex464 and the memory unit ex467 via a bus ex470.
[0775] When the power key is turned on by a user's operation, the power circuit unit ex461 activates the smartphone ex115 to be operable and supplies power to each unit from the battery pack.
[0776] The smartphone ex115 performs processes such as calls and data communications under the control of a main control unit ex460 including a CPU, ROM, and RAM. During a call, the voice signal collected by the voice input unit ex456 is converted into a digital voice signal by the voice signal processing unit ex454, subjected to spectrum diffusion processing by the modulation / demodulation unit ex452, and subjected to digital-to-analog conversion processing and frequency conversion processing by the transmission / reception unit ex451, and the resulting signal is transmitted via the antenna ex450. In addition, the received data is amplified and subjected to frequency conversion processing and analog-to-digital conversion processing, subjected to spectrum inverse diffusion processing by the modulation / demodulation unit ex452, and converted into an analog voice signal by the voice signal processing unit ex454, and then output from the voice output unit ex457. During data communications, text, still image, or video data can be sent out through the operation input control unit ex462 under the control of the main control unit ex460 based on the operation of the operation unit ex466 of the main unit. The same transmission and reception processes are performed. In the data communication mode, when transmitting video, still image, or video and audio, the video signal processing unit ex455 compresses and encodes the video signal stored in the memory unit ex467 or the video signal input from the camera unit ex465 using the moving image encoding method described in the above embodiments, and sends the encoded video data to the multiplexing / demultiplexing unit ex453. The audio signal processing unit ex454 encodes the audio signal collected by the audio input unit ex456 during the process of capturing video or still image by the camera unit ex465, and sends the encoded audio data to the multiplexing / demultiplexing unit ex453. The multiplexing / demultiplexing unit ex453 multiplexes the encoded video data and the encoded audio data in a predetermined manner, and performs modulation and conversion processing on the modulation / demodulation unit (modulation / demodulation circuit unit) ex452 and the transmission / reception unit ex451, and transmits the data via the antenna ex450. The predetermined manner may be predetermined.
[0777] When receiving an image attached to an e-mail or a chat tool, or an image linked to a web page, etc., 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 image data and a bit stream of audio data, and supplies the encoded image data to the image signal processing unit ex455 and the encoded audio data to the audio signal processing unit ex454 via the synchronous bus ex470. The image signal processing unit ex455 decodes the image signal using a moving image decoding method corresponding to the moving image encoding method shown in the above-mentioned embodiments, and displays the image or still image included in the linked moving image file on the display unit ex458 via the display control unit ex459. The audio signal processing unit ex454 decodes the audio signal and outputs the audio from the audio output unit ex457. As real-time streaming media becomes more and more popular, the reproduction of audio may become socially inappropriate depending on the user's situation. Therefore, as an initial value, it is preferable that the configuration is such that only the video data is reproduced without reproducing the audio signal, and the audio is reproduced synchronously only when the user performs an operation such as clicking on the video data.
[0778] In the description here, the smartphone ex115 is used as an example. However, as a terminal, in addition to a transmitting and receiving terminal having both an encoder and a decoder, there may be other installation forms such as a transmitting terminal having only an encoder and a receiving terminal having only a decoder. In the digital broadcasting system, it is assumed that multiplexed data in which audio data is multiplexed with video data is received and transmitted. However, in addition to audio data, character data associated with the video may be multiplexed in the multiplexed data. In addition, the video data itself may be received or transmitted instead of the multiplexed data.
[0779] In addition, although the main control unit ex460 including a CPU is assumed to control the encoding or decoding process, various terminals are often equipped with a GPU. Therefore, a structure can also be made to use the performance of the GPU to process a larger area together through a memory shared by the CPU and GPU, or a memory that manages addresses in a way that can be used together. In this way, the encoding time can be shortened, real-time performance can be ensured, and low latency can be achieved. In particular, it is more effective if motion estimation, deblocking filtering, SAO (Sample Adaptive Offset) and transformation / quantization processing are performed together in units such as pictures by the GPU instead of the CPU.
[0780] Industrial Applicability
[0781] The present invention can be utilized in, for example, a television receiver, a digital video recorder, a car navigation system, a mobile phone, a digital camera, a digital video camera, a video conference system, or an electronic mirror.
[0782] Description of Reference Numerals
[0783] 100 Encoding device
[0784] 102 Division
[0785] 104 Subtraction Department
[0786] 106 Transformation Department
[0787] 108 Quantitative Department
[0788] 110 Entropy Coding Unit
[0789] 112, 204 Inverse Quantization Unit
[0790] 114, 206 Inverse transformation unit
[0791] 116, 208 Addition Department
[0792] 118, 210 memory blocks
[0793] 120, 212 loop filter unit
[0794] 122, 214 frame memory
[0795] 124, 216 Intra-frame prediction unit
[0796] 126, 218 Inter-frame prediction unit
[0797] 128, 220 Prediction and Control Department
[0798] 200 decoding device
[0799] 202 Entropy Decoding Unit
[0800] 1201 Boundary Judgment Department
[0801] 1202, 1204, 1206 switches
[0802] 1203 Filter determination unit
[0803] 1205 Filter Processing Unit
[0804] 1207 Filter characteristic determination unit
[0805] 1208 Processing and Judgment Unit
[0806] a1, b1 processor
[0807] a2, b2 memory
Claims
1. A coding device, wherein: have: Memory; as well as A processor, connected to the memory, generates a predicted image for encoding the current block based on the first parameter and the second parameter derived from the BDOF process, wherein the BDOF represents a bidirectional optical flow, The first parameter above is based on [Formula 1] ∑ [i,j]∈Ω abs(I x 1 +I x 0 ) Export, The second parameter above is based on [Formula 2] ∑ [i,j]∈Ω (-sign(I x 1 +I x 0 )×(I 0 -I 1 )) Export, Ω represents a set of multiple relative pixel positions, [i, j] represents the relative pixel position defined by the horizontal position i and the vertical position j in the set Ω, I x 0 represents the horizontal gradient value of the relative pixel position [i, j] in the first reference block of the first reference image corresponding to the current block, I x 1 represents the horizontal gradient value of the relative pixel position [i, j] in the second reference block of the second reference image corresponding to the current block, I 0 represents the pixel value of the relative pixel position [i, j] in the first reference block, I 1 represents the pixel value of the relative pixel position [i, j] in the second reference block, The abs function outputs the absolute value of a variable. The sign function outputs the positive and negative signs of the variables. I x 0 It means I 0 The difference between the two adjacent pixel values on the left and right.
2. The encoding device according to claim 1, wherein: The sign function outputs -1 or 1 as the positive or negative sign mentioned above.
3. The encoding device according to claim 1, wherein: Each of the plurality of relative pixel positions is relative to the position of the current block.
4. A decoding device, wherein: have: Memory; as well as A processor connected to the memory generates a predicted image for decoding the current block based on the first parameter and the second parameter derived from the BDOF process, wherein the BDOF represents a bidirectional optical flow, The first parameter above is based on [Formula 3] ∑ [i,j]∈Ω abs(I x 1 +I x 0 ) Export, The second parameter above is based on [Formula 4] ∑ [i,j]∈Ω (-sign(I x 1 +I x 0 )×(I 0 -I 1 ) Export, Ω represents a set of multiple relative pixel positions, [i, j] represents the relative pixel position defined by the horizontal position i and the vertical position j in the set Ω, I x 0 represents the horizontal gradient value of the relative pixel position [i, j] in the first reference block of the first reference image corresponding to the current block, I x 1 represents the horizontal gradient value of the relative pixel position [i, j] in the second reference block of the second reference image corresponding to the current block, I 0 represents the pixel value of the relative pixel position [i, j] in the first reference block, I 1 represents the pixel value of the relative pixel position [i, j] in the second reference block, The abs function outputs the absolute value of a variable. The sign function outputs the positive and negative signs of the variables. I x 0 It means I 0 The difference between the two adjacent pixel values on the left and right.
5. The decoding device according to claim 4, wherein: The sign function outputs -1 or 1 as the positive or negative sign mentioned above.
6. The decoding device according to claim 4, wherein: Each of the plurality of relative pixel positions is relative to the position of the current block.
7. A recording medium is a non-transitory computer-readable recording medium storing a bit stream, wherein: The bit stream includes the coded signal and parameters used by the decoding device to perform the following processing in inter-frame prediction: The processing is a processing in which the decoding device generates a predicted image for decoding the current block in the bit stream based on the first parameter and the second parameter derived in the BDOF processing in the inter-frame prediction, wherein the BDOF represents a bidirectional optical flow. The first parameter above is based on [Formula 5] ∑ [i,j]∈Ω abs(I x 1 +I x 0 ) Export, The second parameter above is based on [Formula 6] ∑ [i,j]∈Ω (-sign(I x 1 +I x 0 )×(I 0 -I 1 )) Export, Ω represents a set of multiple relative pixel positions, [i, j] represents the relative pixel position defined by the horizontal position i and the vertical position j in the set Ω, I x 0 represents the horizontal gradient value of the relative pixel position [i, j] in the first reference block of the first reference image corresponding to the current block, I x 1 represents the horizontal gradient value of the relative pixel position [i, j] in the second reference block of the second reference image corresponding to the current block, I 0 represents the pixel value of the relative pixel position [i, j] in the first reference block, I 1 represents the pixel value of the relative pixel position [i, j] in the second reference block, The abs function outputs the absolute value of a variable. The sign function outputs the positive and negative signs of the variables. I x 0 It means I 0 The difference between the two adjacent pixel values on the left and right.
8. The recording medium according to claim 7, wherein The sign function outputs -1 or 1 as the positive or negative sign mentioned above.
9. The recording medium according to claim 7, wherein Each of the plurality of relative pixel positions is relative to the position of the current block.
