Encoding device and decoding device

By using reference pictures different from the picture to which the current block belongs, in video encoding and decoding, and applying deblocking filtering processing as needed, the problem of improving video encoding efficiency and image quality in the prior art is solved, and more efficient processing and lower circuit scale are achieved.

CN113383544BActive Publication Date: 2025-05-30PANASONIC INTELLECTUAL PROPERTY CORP OF AMERICA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202080012690.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2019-02-08
Filing Date
2020-02-06
Publication Date
2025-05-30
Estimated Expiration
2040-02-06

AI Technical Summary

Technical Problem

When existing video encoding technology processes moving images, it is difficult to effectively improve encoding efficiency, picture quality, processing quantity and circuit scale, and at the same time appropriately select elements and actions in encoding and decoding.

Method used

An encoding and decoding device is designed to derive the motion vector of the current block by referring to at least one reference picture different from the picture to which the current block belongs, and search and correct the surrounding area of ​​the motion vector in the sub-block unit, determine whether the deblocking filtering process is applied, and apply the deblocking filtering process based on the judgment result.

Benefits of technology

Improve coding efficiency, simplify and speed up encoding/decoding processing, reduce processing volume and circuit scale, improve picture quality and processing speed, and appropriately select elements and actions in encoding and decoding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113383544B_ABST
    Figure CN113383544B_ABST
Patent Text Reader

Abstract

The encoding device (100) includes a circuit (160) and a memory (162) connected to the circuit (160). During operation, the circuit (160) refers to at least one reference picture different from the picture to which the current block belongs, derives a motion vector of the current block, executes a mode of searching for a peripheral area of the motion vector in units of sub-blocks obtained by dividing the current block and correcting the motion vector, determines for each of the boundaries of adjacent sub-blocks whether to apply deblocking filtering processing, and based on the determination result, applies deblocking filtering processing to the boundary.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to video coding, for example, systems, components, and methods in the encoding and decoding of moving images, etc. Background Art

[0002] Video coding technologies have 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, in order to handle the continuously increasing amount of digital video data in various applications, there has always been a need to provide improvements and optimizations to video coding technologies.

[0003] Prior Art Documents

[0004] Non-Patent Documents

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

[0006] Problems to be Solved by the Invention

[0007] Regarding the above-mentioned coding methods, new methods are desired for improving coding efficiency, improving image quality, reducing processing volume, reducing circuit scale, or appropriately selecting elements or operations such as filters, blocks, sizes, motion vectors, reference pictures, or reference blocks.

[0008] The present invention provides a structure or method that can contribute to one or more of, for example, improving coding efficiency, improving image quality, reducing processing volume, reducing circuit scale, improving processing speed, and appropriately selecting elements or operations. In addition, the present invention may include a structure or method that can contribute to benefits other than the above.

[0009] Means for Solving the Problems

[0010] An encoding device according to an aspect of the present invention encodes a moving image, and includes: a circuit; and a memory connected to the circuit. In operation, the circuit derives a motion vector of a current block by referring to at least one reference picture different from a picture to which the current block belongs, executes a mode of searching a peripheral area of the motion vector in units of sub-blocks obtained by dividing the current block and correcting the motion vector, determines for each boundary of adjacent sub-blocks whether to apply a deblocking filter process, and applies the deblocking filter process to the boundary based on the determination result.

[0011] A decoding device according to an aspect of the present invention decodes a moving image, and includes: a circuit; and a memory connected to the circuit. In operation, the circuit derives a motion vector of a current block by referring to at least one reference picture different from a picture to which the current block belongs, executes a mode of searching a peripheral area of the motion vector in units of sub-blocks obtained by dividing the current block and correcting the motion vector, determines for each boundary of adjacent sub-blocks whether to apply a deblocking filter process, and applies the deblocking filter process to the boundary based on the determination result.

[0012] The installation of several embodiments of the present invention can improve the encoding efficiency, simplify the encoding / decoding process, accelerate the encoding / decoding process speed, and also efficiently select appropriate components / actions used in encoding and decoding, such as appropriate filters, block sizes, motion vectors, reference pictures, reference blocks, etc.

[0013] According to the specification and the drawings, further advantages and effects in an aspect of the present invention are clarified. These advantages and / or effects are obtained by several embodiments and the features described in the specification and the drawings respectively, but it is not necessary to provide all of them in order to obtain one or more advantages and / or effects.

[0014] In addition, these general or specific aspects can also be implemented by a system, a method, an integrated circuit, a computer program, a recording medium, or any combination thereof.

[0015] Advantages of the Invention

[0016] The structure or method according to an aspect of the present invention can contribute to one or more of, for example, improvement of encoding efficiency, improvement of image quality, reduction of processing amount, reduction of circuit scale, improvement of processing speed, and appropriate selection of elements or actions. In addition, the structure or method according to an aspect of the present invention can also contribute to benefits other than the above. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 It is a block diagram showing a functional structure of an encoding device according to an embodiment.

[0018] Figure 2 It is a flowchart showing an example of the overall encoding process performed by an encoding device.

[0019] Figure 3 It is a conceptual diagram showing an example of block segmentation.

[0020] Figure 4A It is a conceptual diagram showing an example of the structure of a slice.

[0021] Figure 4B It is a conceptual diagram showing an example of the structure of a tile.

[0022] Figure 5A It is a table showing transform basis functions corresponding to various transform types.

[0023] Figure 5B It is a conceptual diagram showing an example of SVT (Spatially Varying Transform).

[0024] Figure 6A It is a conceptual diagram showing an example of the shape of a filter used in ALF (adaptive loop filter).

[0025] Figure 6B It is a conceptual diagram showing another example of the shape of a filter used in ALF.

[0026] Figure 6C It is a conceptual diagram showing another example of the shape of a filter used in ALF.

[0027] Figure 7 It is a block diagram showing an example of the detailed structure of a loop filtering unit that functions as a DBF (deblocking filter).

[0028] Figure 8 It is a conceptual diagram showing an example of deblocking filtering with filtering characteristics symmetric with respect to a block boundary.

[0029] Figure 9 It is a conceptual diagram for explaining a block boundary where deblocking filtering processing is performed.

[0030] Figure 10 It is a conceptual diagram showing an example of a Bs value.

[0031] Figure 11 It is a flowchart showing an example of the processing performed by the prediction processing unit of an encoding device.

[0032] Figure 12 It is a flowchart showing another example of the processing performed by the prediction processing unit of an encoding device.

[0033] Figure 13 It is a flowchart showing another example of the processing performed by the prediction processing unit of the encoding device.

[0034] Figure 14 It is a conceptual diagram showing an example of 67 intra prediction modes in the intra prediction of the embodiment.

[0035] Figure 15 It is a flowchart showing an example of the process of the basic processing of inter prediction.

[0036] Figure 16 It is a flowchart showing an example of motion vector derivation.

[0037] Figure 17 It is a flowchart showing another example of motion vector derivation.

[0038] Figure 18 It is a flowchart showing another example of motion vector derivation.

[0039] Figure 19 It is a flowchart showing an example of inter prediction based on the normal inter mode.

[0040] Figure 20 It is a flowchart showing an example of inter prediction based on the merge mode.

[0041] Figure 21 It is a conceptual diagram showing an example for explaining the motion vector derivation process based on the merge mode.

[0042] Figure 22 It is a flowchart showing an example of the FRUC (frame rate up conversion) process.

[0043] Figure 23 It is a conceptual diagram showing an example for explaining the pattern matching (bidirectional matching) between two blocks along the motion trajectory.

[0044] Figure 24 It is a conceptual diagram showing an example for explaining the pattern matching (template matching) between a template in the current picture and a block in the reference picture.

[0045] Figure 25A It is a conceptual diagram showing an example for explaining the derivation of the motion vector in sub - block units based on the motion vectors of multiple adjacent blocks.

[0046] Figure 25B It is a conceptual diagram showing an example for explaining the derivation of the motion vector in sub - block units in the affine mode with three control points.

[0047] Figure 26A It is a conceptual diagram for explaining the affine merge mode.

[0048] Figure 26B It is a conceptual diagram for explaining the affine merge mode with 2 control points.

[0049] Figure 26C It is a conceptual diagram for explaining the affine merge mode with 3 control points.

[0050] Figure 27 It is a flowchart showing an example of the process of the affine merge mode.

[0051] Figure 28A It is a conceptual diagram for explaining the affine inter-frame mode with 2 control points.

[0052] Figure 28B It is a conceptual diagram for explaining the affine inter-frame mode with 3 control points.

[0053] Figure 29 It is a flowchart showing an example of the process of the affine inter-frame mode.

[0054] Figure 30A It is a conceptual diagram for explaining the affine inter-frame mode where the current block has 3 control points and the adjacent block has 2 control points.

[0055] Figure 30B It is a conceptual diagram for explaining the affine inter-frame mode where the current block has 2 control points and the adjacent block has 3 control points.

[0056] Figure 31A It is a flowchart showing the merge mode including DMVR (decoder motion vector refinement).

[0057] Figure 31B It is a conceptual diagram for explaining an example of the DMVR process.

[0058] Figure 32 It is a flowchart showing an example of the generation of a predicted image.

[0059] Figure 33 It is a flowchart showing another example of the generation of a predicted image.

[0060] Figure 34 It is a flowchart showing another example of the generation of a predicted image.

[0061] Figure 35 It is a flowchart for explaining an example of the predicted image correction process based on OBMC (overlapped block motion compensation) processing.

[0062] Figure 36 This is a conceptual diagram for explaining an example of predictive image correction processing based on OBMC processing.

[0063] Figure 37 This is a conceptual diagram for explaining the generation of predictive images of two triangles.

[0064] Figure 38 This is a conceptual diagram for explaining a model assuming uniform linear motion.

[0065] Figure 39 This is a conceptual diagram for explaining an example of a predictive image generation method using luminance correction processing based on LIC (local illumination compensation) processing.

[0066] Figure 40 This is a block diagram showing an installation example of an encoding device.

[0067] Figure 41 This is a block diagram showing the functional structure of a decoding device according to an embodiment.

[0068] Figure 42 This is a flowchart showing an example of the overall decoding process performed by the decoding device.

[0069] Figure 43 This is a flowchart showing an example of the process performed by the prediction processing unit of the decoding device.

[0070] Figure 44 This is a flowchart showing another example of the process performed by the prediction processing unit of the decoding device.

[0071] Figure 45 This is a flowchart showing an example of inter-frame prediction based on a normal inter-frame mode in the decoding device.

[0072] Figure 46 This is a block diagram showing an installation example of the decoding device.

[0073] Figure 47 This is a diagram showing an example of the motion search process on the decoding device side in DMVR processing.

[0074] Figure 48A This is a diagram showing an example of the search algorithm in the motion search process on the decoding device side in DMVR processing.

[0075] Figure 48B This is a diagram showing an example of the search algorithm in the motion search process on the decoding device side in DMVR processing.

[0076] Figure 48CIt is a diagram showing an example of a search algorithm in the motion search process on the decoder side during DMVR processing.

[0077] Figure 49 It is an explanatory diagram of the DMVR processing in units of sub - blocks in the first form.

[0078] Figure 50 It is a diagram showing the processing flow of the de - blocking filter processing in the encoder and decoder in the first form.

[0079] Figure 51 It is a diagram showing an example of the application conditions of the de - blocking filter processing for sub - block boundaries in the first form.

[0080] Figure 52 It is a diagram showing the processing flow of the de - blocking filter processing in the encoder and decoder in the first form.

[0081] Figure 53 It is a diagram showing Figure 52 an example of the corrected MVs for adjacent sub - blocks and reference blocks in the processing flow.

[0082] Figure 54 It is a block diagram showing an installation example of the encoder in the embodiment.

[0083] Figure 55 It is a diagram showing Figure 54 a flowchart of the operation example of the encoder shown.

[0084] Figure 56 It is a block diagram showing an installation example of the decoder in the embodiment.

[0085] Figure 57 It is a diagram showing Figure 56 a flowchart of the operation example of the decoder shown.

[0086] Figure 58 It is a block diagram showing the overall structure of the content supply system for realizing the content distribution service.

[0087] Figure 59 It is a conceptual diagram showing an example of the coding structure during scalable coding.

[0088] Figure 60 It is a conceptual diagram showing an example of the coding structure during scalable coding.

[0089] Figure 61 It is a conceptual diagram showing an example of the display screen of a web page.

[0090] Figure 62 It is a conceptual diagram showing an example of the display screen of a web page.

[0091] Figure 63It is a block diagram showing an example of a smart phone.

[0092] Figure 64 It is a block diagram showing a structural example of a smart phone. Detailed implementation manners

[0093] For example, an encoding device according to an aspect of the present invention encodes a moving image, and includes: a circuit; and a memory connected to the circuit. During operation, the circuit refers to at least one reference picture different from the picture to which the current block belongs, derives a motion vector of the current block, executes a mode of searching a peripheral area of the motion vector in units of sub-blocks obtained by dividing the current block and correcting the motion vector, determines whether to apply deblocking filtering processing to each of boundaries of adjacent sub-blocks, and based on the determination result, applies the deblocking filtering processing to the boundary.

[0094] Therefore, even if distortion in which pixel values are discontinuous may occur at the boundary of sub-blocks, it is possible for the encoding device to reduce the distortion through deblocking filtering processing and improve the image quality.

[0095] In addition, for example, the mode is DMVR (Dynamic Motion Vector Refreshing) processing in units of sub-blocks.

[0096] In addition, for example, the size of the sub-blocks in units of sub-blocks is 16×16 pixels.

[0097] In addition, for example, the circuit determines the intensity of the deblocking filtering processing based on whether a difference value of motion vectors of the adjacent sub-blocks is equal to or greater than a threshold value.

[0098] In addition, for example, the determined intensity of the deblocking filtering processing includes an intensity of not performing the deblocking filtering processing.

[0099] In addition, for example, when the circuit applies the deblocking filtering processing to the boundary, the intensity of the deblocking filtering processing applied to the boundary is the same as the intensity of the deblocking filtering processing applied to the block boundary of the current block.

[0100] In addition, a decoding device according to an aspect of the present invention decodes a moving image, and includes: a circuit; and a memory connected to the circuit. During operation, the circuit refers to at least one reference picture different from the picture to which the current block belongs, derives a motion vector of the current block, executes a mode of searching a peripheral area of the motion vector in units of sub-blocks obtained by dividing the current block and correcting the motion vector, determines whether to apply deblocking filtering processing to each of boundaries of adjacent sub-blocks, and based on the determination result, applies the deblocking filtering processing to the boundary.

[0101] Therefore, even if distortion such as pixel value discontinuity may occur at the boundary of the sub-blocks, it is possible for the decoding device to reduce such distortion through deblocking filter processing and improve the image quality.

[0102] In addition, for example, the mode is DMVR (Dynamic Motion Vector Refreshing) processing in units of sub-blocks.

[0103] In addition, for example, the size of the sub-blocks in the unit of sub-blocks is 16×16 pixels.

[0104] In addition, for example, the circuit determines the intensity of the deblocking filter processing based on whether the difference value of the motion vectors of the adjacent sub-blocks is above a threshold value.

[0105] In addition, for example, the intensity of the deblocking filter processing includes the intensity of not performing the deblocking filter processing.

[0106] In addition, for example, when applying the deblocking filter processing to the boundary, the intensity of the deblocking filter processing applied to the boundary is the same as the intensity of the deblocking filter processing applied to the block boundary of the current block.

[0107] In addition, for example, an encoding method according to an aspect of the present invention encodes a moving image, wherein, referring to at least one reference picture different from the picture to which the current block belongs, a motion vector of the current block is derived, a mode of searching a peripheral area of the motion vector and correcting the motion vector in units of sub-blocks obtained by dividing the current block is executed, for each of the boundaries of adjacent sub-blocks, it is determined whether to apply the deblocking filter processing, and based on the determination result, the deblocking filter processing is applied to the boundary.

[0108] Therefore, even if distortion such as pixel value discontinuity may occur at the boundary of the sub-blocks, it is possible for the encoding method to reduce such distortion through deblocking filter processing and improve the image quality.

[0109] In addition, for example, a decoding method according to an aspect of the present invention decodes a moving image, wherein, referring to at least one reference picture different from the picture to which the current block belongs, a motion vector of the current block is derived, a mode of searching a peripheral area of the motion vector and correcting the motion vector in units of sub-blocks obtained by dividing the current block is executed, for each of the boundaries of adjacent sub-blocks, it is determined whether to apply the deblocking filter processing, and based on the determination result, the deblocking filter processing is applied to the boundary.

[0110] Therefore, even if distortion such as pixel value discontinuity may occur at the boundary of the sub-blocks, it is possible for the decoding method to reduce such distortion through deblocking filter processing and improve the image quality.

[0111] Moreover, these inclusive or specific forms can also be implemented by a system, device, method, integrated circuit, computer program, or non-transitory recording medium such as a computer-readable CD-ROM, or can be implemented by any combination of a system, device, method, integrated circuit, computer program, and recording medium.

[0112] Hereinafter, embodiments will be specifically described with reference to the drawings. In addition, the embodiments described below all represent inclusive or specific examples. The numerical values, shapes, materials, constituent elements, arrangement positions and connection forms of the constituent elements, steps, relationships and orders of the steps, etc. shown in the following embodiments are examples and are not intended to limit the claims.

[0113] Hereinafter, embodiments of an encoding device and a decoding device will be described. The embodiments are examples of an encoding device and a decoding device that can apply the processes and / or structures described in the various forms of the present invention. The processes and / or structures can also be implemented in encoding devices and decoding devices different from the embodiments. For example, regarding the processes and / or structures applied to the embodiments, for example, any of the following can be performed.

[0114] (1) Among a plurality of constituent elements of the encoding device or decoding device of the embodiment described in each form of the present invention, a certain one can be replaced with other constituent elements described in a certain one of the forms of the present invention, or they can be combined;

[0115] (2) In the encoding device or decoding device of the embodiment, arbitrary changes such as addition, replacement, deletion, etc. of functions or processes performed by a part of the constituent elements of the encoding device or decoding device can also be made. For example, any function or process can be replaced with other functions or processes described in a certain one of the forms of the present invention, or they can be combined;

[0116] (3) In the method implemented by the encoding device or decoding device of the embodiment, arbitrary changes such as addition, replacement, deletion, etc. can also be made to a part of the processes included in the method. For example, any process in the method can be replaced with other processes described in a certain one of the forms of the present invention, or they can be combined;

[0117] (4) A part of the constituent elements of the encoding device or decoding device constituting the embodiment can be combined with the constituent elements described in a certain one of the forms of the present invention, can also be combined with the constituent elements having a part of the functions described in a certain one of the forms of the present invention, or can be combined with the constituent elements performing a part of the processes implemented by the constituent elements described in the forms of the present invention;

[0118] (5) A component that is part of the function of the encoding device or decoding device of the embodiment, or a component that processes part of the processing of the encoding device or decoding device of the embodiment, is combined with or replaced by a component described in a certain one of the various aspects of the present invention, a component that is part of the function described in a certain one of the various aspects of the present invention, or a component that processes part of the processing described in a certain one of the various aspects of the present invention;

[0119] (6) In the method implemented by the encoding device or decoding device of the embodiment, one of the multiple processes included in the method is replaced by a process described in a certain one of the various aspects of the present invention or a similar process, or they are combined;

[0120] (7) Part of the processes included in the method implemented by the encoding device or decoding device of the embodiment can also be combined with the processes described in any one of the various aspects of the present invention.

[0121] (8) The manner of implementing the processes and / or structures described in the various aspects of the present invention is not limited to the encoding device or decoding device of the embodiment. For example, the processes and / or structures can also be implemented in a device used for a purpose different from the motion image encoding or motion image decoding disclosed in the embodiment.

[0122] [Encoding Device]

[0123] First, the encoding device of the embodiment will be described. Figure 1 It is a block diagram showing the functional structure of the encoding device 100 of the embodiment. The encoding device 100 is a motion image encoding device that encodes motion images in units of blocks.

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

[0125] 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 a splitting unit 102, a subtraction unit 104, a transformation unit 106, a quantization unit 108, an entropy encoding unit 110, an inverse quantization unit 112, an inverse transformation unit 114, an addition unit 116, a loop filtering unit 120, an intra prediction unit 124, an inter prediction unit 126, and a prediction control unit 128. In addition, the encoding device 100 may also be implemented as one or more dedicated electronic circuits corresponding to the splitting unit 102, the subtraction unit 104, the transformation unit 106, the quantization unit 108, the entropy encoding unit 110, the inverse quantization unit 112, the inverse transformation unit 114, the addition unit 116, the loop filtering unit 120, the intra prediction unit 124, the inter prediction unit 126, and the prediction control unit 128.

[0126] Hereinafter, after explaining the overall processing flow of the encoding device 100, each component included in the encoding device 100 will be described.

[0127] [Overall Flow of Encoding Processing]

[0128] Figure 2 It is a flowchart showing an example of the overall encoding process performed by the encoding device 100.

[0129] First, the splitting unit 102 of the encoding device 100 splits each picture included in the input image, which is a moving image, into a plurality of blocks of a fixed size (for example, 128×128 pixels) (step Sa_1). Then, the splitting unit 102 selects a splitting pattern (also referred to as a block shape) for the block of the fixed size (step Sa_2). That is, the splitting unit 102 further splits the block with a fixed size into a plurality of blocks constituting the selected splitting pattern. Then, for each of the plurality of blocks, the encoding device 100 performs the processing of steps Sa_3 to Sa_9 on the block (i.e., the encoding target block).

[0130] That is, a prediction processing unit composed of all or a part of the intra prediction unit 124, the inter prediction unit 126, and the prediction control unit 128 generates a prediction signal (also referred to as a prediction block) of the encoding target block (also referred to as the current block) (step Sa_3).

[0131] Next, the subtraction unit 104 generates a difference between the encoding target block and the prediction block as a prediction residue (also referred to as a difference block) (step Sa_4).

[0132] Next, the transformation unit 106 and the quantization unit 108 generate a plurality of quantization coefficients by performing transformation and quantization on the difference block (step Sa_5). In addition, the block composed of the plurality of quantization coefficients is also referred to as a coefficient block.

[0133] Next, the entropy encoding unit 110 generates an encoded signal (specifically, entropy encoding) by encoding the coefficient block and the prediction parameters related to the generation of the prediction signal (step Sa_6). Additionally, the encoded signal is also referred to as an encoded bitstream, a compressed bitstream, or a stream.

[0134] Next, the inverse quantization unit 112 and the inverse transform unit 114 restore a plurality of prediction residuals (i.e., difference blocks) by performing inverse quantization and inverse transform on the coefficient block (step Sa_7).

[0135] Next, the addition 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 restored difference block to the prediction block (step Sa_8). Thereby, a reconstructed image is generated.

[0136] When generating the reconstructed image, the loop filtering unit 120 filters the reconstructed image as needed (step Sa_9).

[0137] Then, the encoding device 100 determines whether the encoding of the entire picture has been completed (step Sa_10), and in the case where it is determined that the encoding is not completed (No in step Sa_10), the processing starting from step Sa_2 is repeated.

[0138] Additionally, in the above example, the encoding device 100 selects one segmentation pattern for blocks of a fixed size and encodes each block according to the segmentation pattern, but each block can also be encoded according to each of multiple segmentation patterns. In this case, the encoding device 100 can evaluate the cost for each of the multiple segmentation patterns, and for example, can select the encoded signal obtained by encoding according to the segmentation pattern with the minimum cost as the output encoded signal.

[0139] As shown in the figure, the processing of these steps Sa_1 to Sa_10 is sequentially performed by the encoding device 100. Alternatively, some of these multiple processes can be performed in parallel, or the order of these processes can be swapped.

[0140] [Segmentation Unit]

[0141] The splitting unit 102 splits each picture included in the input motion picture into a plurality of blocks, and outputs each block to the subtraction unit 104. For example, the splitting unit 102 first splits the picture into blocks of a fixed size (e.g., 128×128). Other fixed block sizes may also be used. Such blocks of the fixed size are sometimes referred to as coding tree units (CTUs). Further, the splitting unit 102 splits each block of the fixed size into blocks of a variable size (e.g., 64×64 or less), for example, based on recursive quadtree and / or binary tree block splitting. That is, the splitting unit 102 selects a splitting pattern. Such blocks of the variable size are sometimes referred to as coding units (CUs), prediction units (PUs), or transform units (TUs). Additionally, in various processing examples, it is not necessary to distinguish between CUs, PUs, and TUs, and a part or all of the blocks within the picture may be used as the processing units for CUs, PUs, and TUs.

[0142] Figure 3 FIG. is a conceptual diagram showing an example of block splitting in an embodiment. In Figure 3 FIG., solid lines represent block boundaries based on quadtree block splitting, and dashed lines represent block boundaries based on binary tree block splitting.

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

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

[0145] The upper right 64×64 block is horizontally split into two rectangular 64×32 blocks 14, 15 (binary tree block splitting).

[0146] The lower left 64×64 block is split into four square 32×32 blocks (quadtree block splitting). The upper left block and the lower right block among the four 32×32 blocks are further split. The upper left 32×32 block is vertically split into two rectangular 16×32 blocks, and the right 16×32 block is further horizontally split into two 16×16 blocks (binary tree block splitting). The lower right 32×32 block is horizontally split into two 32×16 blocks (binary tree block splitting). As a result, the lower left 64×64 block is split 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.

[0147] The 64×64 block 23 in the lower right is not divided.

[0148] As described above, in Figure 3 , the block 10 is divided into 13 variable-sized blocks 11 to 23 based on recursive quadtree and binary tree block partitioning. Such partitioning is sometimes referred to as QTBT (quad - tree plus binary tree) partitioning.

[0149] In addition, in Figure 3 , one block is divided into 4 or 2 blocks (quadtree or binary tree block partitioning), but the partitioning is not limited to these. For example, one block can also be divided into 3 blocks (ternary tree partitioning). The partitioning including such ternary tree partitioning is sometimes referred to as MBT (multi type tree) partitioning.

[0150] [Structural Slices / Tiles of the Picture]

[0151] To decode a picture in parallel, the picture is sometimes constructed in units of slices or tiles. The picture constructed in units of slices or tiles can be formed by the partitioning unit 102.

[0152] A slice is the basic encoding unit that makes up a picture. A picture consists of, for example, one or more slices. In addition, a slice consists of one or more consecutive CTUs (Coding Tree Units).

[0153] Figure 4A 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 (Slice 1 to Slice 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 one of the slices. The shape of the slice becomes the shape of dividing the picture in the horizontal direction. The boundary of the slice does not need to be the edge of the screen and can be any position among the boundaries of the CTUs within the screen. The processing order (encoding order or decoding order) of the CTUs in the slice is, for example, the raster scan order. In addition, the slice contains header information and encoded data. In the header information, the characteristics of the slice such as the address of the first CTU of the slice and the slice type can also be described.

[0154] A tile is the unit of a rectangular area that makes up a picture. Numbers called TileId can also be assigned to each tile in the raster scan order.

[0155] Figure 4BThis is a conceptual diagram showing an example of the structure of tiles. For example, the picture includes 11×8 CTUs and is divided into tiles (tiles 1 to 4) in 4 rectangular regions. When using tiles, the processing order of CTUs is changed compared to the case of not using tiles. When not using tiles, multiple CTUs within the picture are processed in raster scan order. When using tiles, in each of the multiple tiles, at least 1 CTU is processed in raster scan order. For example, as Figure 4B shown, the processing order of the multiple CTUs included in tile 1 is from the left end of the first row of tile 1 to the right end of the first row of tile 1, and then from the left end of the second row of tile 1 to the right end of the second row of tile 1.

[0156] In addition, one tile sometimes contains more than one slice, and one slice sometimes contains more than one tile.

[0157] [Subtraction Unit]

[0158] The subtraction 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 block units input from and segmented by the segmentation unit 102. That is, the subtraction unit 104 calculates the prediction error (also called the residual) of the block to be encoded (hereinafter referred to as the current block). And the subtraction unit 104 outputs the calculated prediction error (residual) to the transformation unit 106.

[0159] The original signal is the input signal of the encoding device 100 and is a signal representing the images of each picture constituting the moving image (for example, a luminance (luma) signal and two chroma signals). Hereinafter, there are also cases where a signal representing an image is called a sample.

[0160] [Transformation Unit]

[0161] The transformation unit 106 transforms the prediction error in the spatial domain into transform coefficients in the frequency domain and outputs the transform coefficients to the quantization unit 108. Specifically, the transformation unit 106, for example, performs a prescribed discrete cosine transform (DCT) or discrete sine transform (DST) on the prediction error in the spatial domain. The prescribed DCT or DST can also be determined in advance.

[0162] In addition, the transformation unit 106 can also adaptively select a transformation type from multiple transformation types and use a transform basis function corresponding to the selected transformation type to transform the prediction error into transform coefficients. Such a transformation is called EMT (explicit multiple core transform, multi-core transform) or AMT (adaptive multiple transform, adaptive multi-transform) in some cases.

[0163] Multiple transform types include, for example, DCT-II, DCT-V, DCT-VIII, DST-I, and DST-VII. Figure 5A is a table representing transform basis functions corresponding to transform type examples. In Figure 5A where N represents the number of input pixels. The selection of a transform type from among these multiple transform types can depend, for example, on the type of prediction (intra prediction and inter prediction), or on the intra prediction mode.

[0164] Information indicating whether such EMT or AMT is applied (e.g., referred to as an EMT flag or an AMT flag) and information indicating the selected transform type are typically signaled at the CU level. In addition, the signaling of this information need not be limited to the CU level and may also be at other levels (e.g., bit sequence level, picture level, slice level, tile level, or CTU level).

[0165] In addition, the transform unit 106 may also perform a re-transformation on the transform coefficients (transformation results). Such a re-transformation is sometimes referred to as AST (adaptive secondary transform) or NSST (non-separable secondary transform). For example, the transform unit 106 performs a re-transformation on each sub-block (e.g., 4×4 sub-block) included in a block of transform coefficients corresponding to the intra prediction error. Information indicating whether NSST is applied and information related to the transform matrix used in NSST are typically signaled at the CU level. In addition, the signaling of this information need not be limited to the CU level and may also be at other levels (e.g., sequence level, picture level, slice level, tile level, or CTU level).

[0166] In the transform unit 106, a separable transform and a non-separable transform may also be applied. A separable transform is a method in which multiple transforms are performed separately in each direction according to the number of dimensions of the input, and a non-separable transform is a method in which when the input is multi-dimensional, two or more dimensions are regarded as one dimension and transformed together.

[0167] For example, as an example of a non-separable transform, in the case where the input is a 4×4 block, it is regarded as a permutation having 16 elements, and a transform process is performed on this permutation using a 16×16 transform matrix.

[0168] In addition, in a further example of the Non-Separable transform, after regarding a 4×4 input block as a permutation having 16 elements, a transform (Hypercube Givens Transform) that performs Givens rotations on the permutation multiple times can be performed.

[0169] In the transform in the transform unit 106, the type of basis to be transformed into the frequency domain can be switched according to the region within the CU. As an example, there is SVT (Spatially Varying Transform). In SVT, as Figure 5B shown, the CU is bisected in the horizontal or vertical direction, and only one of the regions is transformed into the frequency domain. The type of transform basis can be set for each region. For example, DST7 and DCT8 are used. In this example, only one of the two regions within the CU is transformed, and the other is not transformed, but both regions can also be transformed. In addition, the splitting method is not limited to bisection and can be more flexible. For example, it can be quartered or the information indicating the split is encoded separately and signaled in the same way as CU splitting. In addition, SVT is sometimes also referred to as SBT (Sub-block Transform).

[0170] [Quantization Unit]

[0171] 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 prescribed scan order, and quantizes the transform coefficients based on the quantization parameter (QP) corresponding to the scanned transform coefficients. Then, the quantization unit 108 outputs the quantized transform coefficients (hereinafter referred to as quantization coefficients) of the current block to the entropy coding unit 110 and the inverse quantization unit 112. The prescribed scan order can also be determined in advance.

[0172] The prescribed scan order is the order used for quantization / inverse quantization of the transform coefficients. For example, the prescribed scan order can be defined in ascending order of frequency (from low frequency to high frequency) or descending order of frequency (from high frequency to low frequency).

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

[0174] In addition, in quantization, a quantization matrix is sometimes used. For example, sometimes multiple quantization matrices are used corresponding to frequency transform sizes such as 4×4 and 8×8, prediction modes such as intra prediction and inter prediction, and pixel components such as luminance and chrominance. In addition, quantization refers to digitizing the values sampled at a specified interval by associating them with specified levels. In this technical field, other expressions such as rounding, truncation, and scaling can also be used for reference, and rounding, truncation, and scaling can also be adopted. The specified interval and levels can also be determined in advance.

[0175] As methods 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 amount of coding increases due to the coding of the quantization matrix.

[0176] On the other hand, there is also a method of quantizing in such a way that the coefficients of high-frequency components and the coefficients of low-frequency components are the same without using a quantization matrix. In addition, this method is equivalent to a method of using a quantization matrix (flat matrix) in which all coefficients are the same value.

[0177] The quantization matrix can be specified by, for example, SPS (Sequence Parameter Set) or PPS (Picture Parameter Set). SPS contains parameters used for a sequence, and PPS contains parameters used for a picture. SPS and PPS are sometimes simply referred to as parameter sets.

[0178] [Entropy Coding Unit]

[0179] The entropy coding unit 110 generates an encoded signal (encoded bitstream) based on the quantized coefficients input from the quantization unit 108. Specifically, the entropy coding unit 110, for example, binarizes the quantized coefficients, performs arithmetic coding on the binary signal, and outputs a compressed bitstream or sequence.

[0180] [Inverse Quantization Unit]

[0181] The inverse quantization unit 112 performs inverse quantization on the quantized coefficients input from the quantization unit 108. Specifically, the inverse quantization unit 112 performs inverse quantization on the quantized coefficients of the current block in a specified scan order. And the inverse quantization unit 112 outputs the inverse-transformed transform coefficients of the current block to the inverse transform unit 114. The specified scan order can also be determined in advance.

[0182] [Inverse Transform Unit]

[0183] The inverse transform unit 114 restores the prediction error (residual) by performing an inverse transform on the transform coefficients input from the inverse quantization unit 112. Specifically, the inverse transform unit 114 restores the prediction error of the current block by performing an inverse transform on the transform coefficients corresponding to the transform of the transform unit 106. Then, the inverse transform unit 114 outputs the restored prediction error to the addition unit 116.

[0184] In addition, since information is usually lost due to quantization in the restored prediction error, it is inconsistent with the prediction error calculated by the subtraction unit 104. That is, the restored prediction error usually contains quantization error.

[0185] [Addition unit]

[0186] The addition unit 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 addition unit 116 outputs the reconstructed block to the block memory 118 and the loop filter unit 120. The reconstructed block is sometimes referred to as a local decoded block.

[0187] [Block memory]

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

[0189] [Frame memory]

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

[0191] [Loop filter unit]

[0192] The loop filter unit 120 applies loop filtering to the block reconstructed by the addition unit 116 and outputs the filtered reconstructed block to the frame memory 122. Loop filtering refers to filtering used within the coding loop (in-loop filtering), and includes, for example, deblocking filtering (DF or DBF), sample adaptive offset (SAO), and adaptive loop filtering (ALF).

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

[0194] Specifically, sub-blocks (e.g., 2×2 sub-blocks) are first 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 is calculated (e.g., C = 5D + A). And based on the classification value C, the sub-blocks are classified into multiple classes.

[0195] The direction value D of the gradient is derived, for example, by comparing the gradients in multiple directions (e.g., horizontal, vertical, and two diagonal directions). In addition, the activity value A of the gradient is derived, for example, by adding the gradients in multiple directions and quantifying the addition result.

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

[0197] As the shape of the filter used in the ALF, for example, a circularly symmetric shape is used. Figures 6A - 6C It is a diagram showing multiple examples of the shape of the filter used in the ALF. Figure 6A It represents a 5×5 diamond-shaped filter, Figure 6B It represents a 7×7 diamond-shaped filter, Figure 6C It represents a 9×9 diamond-shaped filter. The information indicating the shape of the filter is usually signaled at the picture level. In addition, the signaling of the information indicating the shape of the filter 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, or CU level).

[0198] The on / off of the ALF can also be determined, for example, at the picture level or the CU level. For example, regarding luminance, it can be determined at the CU level whether to adopt the ALF, and regarding chrominance difference, it can be determined at the picture level whether to adopt the ALF. The information indicating the on / off of the ALF is usually signaled at the picture level or the CU level. In addition, the signaling of the information indicating the on / off of the ALF does not need to be limited to the picture level or the CU level and can also be other levels (e.g., sequence level, slice level, tile level, or CTU level).

[0199] The coefficient sets of multiple selectable filters (e.g., up to 15 or 25 filters) are usually signaled at the picture level. In addition, the signaling of the coefficient sets 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).

[0200] [Loop Filtering Section > Deblocking Filter]

[0201] In the deblocking filter, the loop filtering section 120 reduces the distortion generated at the block boundary by performing filtering processing on the block boundary of the reconstructed image.

[0202] Figure 7 It is a block diagram showing an example of the detailed structure of the loop filter unit 120 that functions as a deblocking filter.

[0203] The loop filter unit 120 includes a boundary determination unit 1201, a filtering determination unit 1203, a filtering processing unit 1205, a processing determination unit 1208, a filtering characteristic determination unit 1207, and switches 1202, 1204, and 1206.

[0204] The boundary determination unit 1201 determines whether there are pixels (i.e., target pixels) for which deblocking filtering processing is to be performed near the block boundary. Then, the boundary determination unit 1201 outputs the determination result to the switch 1202 and the processing determination unit 1208.

[0205] When it is determined by the boundary determination unit 1201 that target pixels exist near the block boundary, the switch 1202 outputs the image before filtering processing to the switch 1204. On the contrary, when it is determined by the boundary determination unit 1201 that target pixels do not exist near the block boundary, the switch 1202 outputs the image before filtering processing to the switch 1206.

[0206] The filtering determination unit 1203 determines whether to perform deblocking filtering processing on the target pixels based on the pixel values of at least one surrounding pixel located around the target pixels. Then, the filtering determination unit 1203 outputs the determination result to the switch 1204 and the processing determination unit 1208.

[0207] When it is determined by the filtering determination unit 1203 that deblocking filtering processing is to be performed on the target pixels, the switch 1204 outputs the image before filtering processing obtained via the switch 1202 to the filtering processing unit 1205. On the contrary, when it is determined by the filtering determination unit 1203 that deblocking filtering processing is not to be performed on the target pixels, the switch 1204 outputs the image before filtering processing obtained via the switch 1202 to the switch 1206.

[0208] When the image before filtering processing is obtained via the switches 1202 and 1204, the filtering processing unit 1205 performs deblocking filtering processing with the filtering characteristics determined by the filtering characteristic determination unit 1207 on the target pixels. Then, the filtering processing unit 1205 outputs the pixels after the filtering processing to the switch 1206.

[0209] Under the control of the processing determination unit 1208, the switch 1206 selectively outputs the pixels that have not been subjected to deblocking filtering processing and the pixels that have been subjected to deblocking filtering processing by the filtering processing unit 1205.

[0210] The processing determination unit 1208 controls the switch 1206 based on the respective determination results of the boundary determination unit 1201 and the filtering determination unit 1203. That is, when the boundary determination unit 1201 determines that the target pixel exists near the block boundary and the filtering determination unit 1203 determines that deblocking filtering processing is to be performed on the target pixel, the processing determination unit 1208 outputs the pixel after the deblocking filtering processing from the switch 1206. In addition, in other cases 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 filtered image is output from the switch 1206.

[0211] Figure 8 It is a conceptual diagram showing an example of deblocking filtering having a filtering characteristic symmetric with respect to a block boundary.

[0212] In the deblocking filtering process, for example, using the pixel value and the quantization parameter, either one of two deblocking filters with different characteristics, namely, a strong filter and a weak filter, is selected. In the strong filter, as Figure 8 shown, when there are pixels p0 to p2 and pixels q0 to q2 across the block boundary, the pixel values of the pixels q0 to q2 are changed to pixel values q'0 to q'2, for example, by performing the operations shown in the following equations.

[0213] q'0 = (p1 + 2×p0 + 2×q0 + 2×q1 + q2 + 4) / 8

[0214] q'1 = (p0 + q0 + q1 + q2 + 2) / 4

[0215] q'2 = (p0 + q0 + q1 + 3×q2 + 2×q3 + 4) / 8

[0216] In addition, in the above equations, p0 to p2 and q0 to q2 are the pixel values of the pixels p0 to p2 and the pixels q0 to q2, respectively. In addition, q3 is the pixel value of the pixel q3 adjacent to the 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 filtering process is the filtering coefficient.

[0217] Furthermore, in the deblocking filtering process, clipping processing may also be performed in such a way that the pixel value after the operation is set not to exceed the threshold value. In this clipping processing, using the threshold value determined according to the quantization parameter, the pixel value after the operation based on the above equation is clipped to "operation target pixel value ± 2×threshold value". Thereby, excessive smoothing can be prevented.

[0218] Figure 9 It is a conceptual diagram for explaining the block boundary where the deblocking filtering process is performed. Figure 10 It is a conceptual diagram showing an example of the Bs value.

[0219] The block boundaries for performing deblocking filtering are, for example, Figure 9 the boundaries of the PU (Prediction Unit) or TU (Transform Unit) of the 8×8 pixel block shown. The deblocking filtering process can be performed in units of 4 rows or 4 columns. First, for Figure 9 the blocks P and Q shown, as Figure 10 such, the Bs (Boundary Strength) value is determined.

[0220] According to Figure 10 the Bs value, it is determined whether to perform deblocking filtering with different strengths even for block boundaries belonging to the same image. When the Bs value is 2, deblocking filtering for the chrominance signal is performed. When the Bs value is 1 or more and a specified condition is satisfied, deblocking filtering for the luminance signal is performed. The specified condition can also be determined in advance. In addition, the determination condition of the Bs value is not limited to Figure 10 the conditions shown, and can also be determined based on other parameters.

[0221] [Prediction processing unit (intra prediction unit / inter prediction unit / prediction control unit)]

[0222] Figure 11 is a flowchart showing an example of the processing performed by the prediction processing unit of the encoding device 100. In addition, 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.

[0223] The prediction processing unit generates a predicted image of the current block (step Sb_1). This predicted image is also referred to as a prediction signal or a prediction block. In addition, in the prediction signal, there are, for example, an intra prediction signal or an inter prediction signal. Specifically, the prediction processing unit uses the reconstructed image that has been obtained by generating a prediction block, a differential block, a coefficient block, restoring the differential block, and generating a decoded image block to generate a predicted image of the current block.

[0224] The reconstructed image can be, for example, an image of a reference picture, or an image of an encoded block within the current picture that includes the current block, i.e., the current picture. The encoded blocks within the current picture are, for example, adjacent blocks of the current block.

[0225] Figure 12 is a flowchart showing another example of the processing performed by the prediction processing unit of the encoding device 100.

[0226] The prediction processing unit generates a prediction image by a first method (step Sc_1a), generates a prediction image by a second method (step Sc_1b), and generates a prediction image by a third method (step Sc_1c). The first method, the second method, and the third method are different methods for generating a prediction image, and may be, for example, an inter-frame prediction method, an intra-frame prediction method, and other prediction methods, respectively. In such prediction methods, the above-mentioned reconstructed image may also be used.

[0227] Next, the prediction processing unit selects any one of the plurality of prediction images generated in steps Sc_1a, Sc_1b, and Sc_1c (step Sc_2). The selection of this prediction image, that is, the selection of the method or mode for obtaining the final prediction image, may also calculate the cost for each generated prediction image and be based on this cost. In addition, the selection of this prediction image may be performed based on the parameters for the encoding process. The encoding device 100 may signal the information for determining the selected prediction image, method, or mode as an encoded signal (also referred to as an encoded bitstream). This information may be, for example, a flag or the like. Thus, the decoding device can generate a prediction image based on this information in the manner or mode selected in the encoding device 100. In addition, in Figure 12 the example shown, after generating the prediction images by each method, the prediction processing unit selects any one of the prediction images. However, before generating these prediction images, the prediction processing unit may select a method or mode based on the parameters for the above-mentioned encoding process, and may generate a prediction image according to this method or mode.

[0228] For example, the first method and the second method are intra-frame prediction and inter-frame prediction, respectively, and the prediction processing unit may select the final prediction image for the current block from the prediction images generated according to these prediction methods.

[0229] Figure 13 is a flowchart showing another example of the processing performed by the prediction processing unit of the encoding device 100.

[0230] First, the prediction processing unit generates a prediction image by intra-frame prediction (step Sd_1a), and generates a prediction image by inter-frame prediction (step Sd_1b). In addition, the prediction image generated by intra-frame prediction is also referred to as an intra-frame prediction image, and the prediction image generated by inter-frame prediction is also referred to as an inter-frame prediction image.

[0231] Next, the prediction processing unit evaluates each of the intra-predicted image and the inter-predicted image (step Sd_2). Cost can also be used in this evaluation. That is, the prediction processing unit calculates the cost C for each of the intra-predicted image and the inter-predicted image. This cost C can be calculated by an equation of the R-D optimization model such as C = D + λ × R. In this equation, D is the coding distortion of the predicted image and is represented, for example, by the sum of the absolute differences between the pixel values of the current block and the pixel values of the predicted image. In addition, R is the coding amount generated for the predicted image. Specifically, it is the coding amount required for coding motion information, etc. used to generate the predicted image. In addition, λ is, for example, the undetermined multiplier of Lagrange.

[0232] Then, the prediction processing unit selects, as the final predicted image of the current block, the predicted image that calculates the minimum cost C from the intra-predicted image and the inter-predicted image (step Sd_3). That is, the prediction method or mode used to generate the predicted image of the current block is selected.

[0233] [Intra-Prediction Unit]

[0234] The intra-prediction unit 124 performs intra-prediction (also called intra-frame 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 an intra-prediction signal by performing intra-prediction with reference to the samples (e.g., luminance values, chrominance difference values) of the blocks adjacent to the current block, and outputs the intra-prediction signal to the prediction control unit 128.

[0235] For example, the intra-prediction unit 124 performs intra-prediction using one of a plurality of prescribed intra-prediction modes. The plurality of intra-prediction modes usually include one or more non-directional prediction modes and a plurality of directional prediction modes. The plurality of prescribed modes can also be determined in advance.

[0236] One or more non-directional prediction modes include, for example, the Planar (plane) prediction mode and the DC prediction mode specified by the H.265 / HEVC standard.

[0237] The plurality of directional prediction modes include, for example, 33-direction prediction modes specified by the H.265 / HEVC standard. In addition, the plurality of directional prediction modes can also include 32-direction prediction modes in addition to the 33 directions (a total of 65 directional prediction modes). Figure 14 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. The solid arrows indicate 33 directions specified by the H.265 / HEVC standard, and the dashed arrows indicate the additional 32 directions (the 2 non-directional prediction modes are not Figure 14 shown in the figure).

[0238] In various processing examples, in the intra prediction of a chrominance block, a luminance block may also be referred to. That is, the chrominance component of the current block may also be predicted based on the luminance component of the current block. Such intra prediction is sometimes called CCLM (cross-component linear model) prediction. The intra prediction mode of a chrominance block that refers to a luminance block in this way (for example, called the CCLM mode) may be added as one of the intra prediction modes of the chrominance block.

[0239] The intra prediction unit 124 may also correct the pixel value after intra prediction based on the gradient of reference pixels in the horizontal / vertical direction. Intra prediction accompanied by such correction is sometimes called PDPC (position dependent intraprediction combination). Information indicating whether PDPC is used (for example, called the PDPC flag) is generally signaled at the CU level. In addition, the signaling of this information is not limited to the CU level and may also be at other levels (for example, sequence level, picture level, slice level, tile level, or CTU level).

[0240] [Inter prediction unit]

[0241] The inter prediction unit 126 performs inter prediction (also called inter-picture prediction) of the current block by referring to a reference picture different from the current picture stored in the frame memory 122, thereby generating a prediction signal (inter prediction signal). Inter prediction is performed in units of the current block or the current sub-block (for example, 4×4 block) within the current block. For example, for the current block or the current sub-block, the inter prediction unit 126 performs a motion search (motion estimation) within the reference picture to find the reference block or sub-block that most matches the current block or the current sub-block. And the inter prediction unit 126 obtains motion information (for example, a motion vector) that compensates for the motion or change from the reference block or sub-block to the current block or sub-block. The inter prediction unit 126 performs motion compensation (or motion prediction) based on this motion information, thereby generating an inter prediction signal for the current block or sub-block. And the inter prediction unit 126 outputs the generated inter prediction signal to the prediction control unit 128.

[0242] The motion information used in motion compensation is signaled as an inter prediction signal in various forms. For example, a motion vector may also be signaled. As another example, the difference between a motion vector and a predicted motion vector (motion vector predictor) may also be signaled.

[0243] [Basic process of inter prediction]

[0244] Figure 15 It is a flowchart showing an example of the basic process of inter-frame prediction.

[0245] First, the inter-frame prediction unit 126 generates a prediction image (steps Se_1 to Se_3). Next, the subtraction unit 104 generates a difference between the current block and the prediction image as a prediction residual (step Se_4).

[0246] Here, in the generation of the prediction image, the inter-frame prediction unit 126 generates the prediction 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 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 for regions of the reference picture indicated by the candidate MV for each of the selected at least one candidate MVs. In addition, the action of searching for the region of the reference picture may also be referred to as motion search.

[0247] In addition, in the above example, steps Se_1 to Se_3 are performed by the inter-frame prediction unit 126, but for example, the processing of step Se_1 or step Se_2 may also be performed by other components included in the encoding device 100.

[0248] [Flowchart of the derivation of the motion vector]

[0249] Figure 16 It is a flowchart showing an example of the derivation of the motion vector.

[0250] The inter-frame prediction unit 126 derives the MV of the current block in a mode where the motion information (e.g., MV) is encoded. In this case, for example, the motion information is encoded as a prediction parameter and signaled. That is, the encoded motion information is included in the encoded signal (also referred to as the encoded bitstream).

[0251] Alternatively, the inter-frame prediction unit 126 derives the MV in a mode where the motion information is not encoded. In this case, the motion information is not included in the encoded signal.

[0252] Here, the modes for MV derivation can also include the following ordinary inter-frame modes, merge modes, FRUC modes, affine modes, etc. Among these modes, the modes for encoding motion information include ordinary inter-frame modes, merge modes, and affine modes (specifically, affine inter-frame modes and affine merge modes), etc. In addition, the motion information can include not only MVs but also the predicted motion vector selection information described later. In addition, the modes that do not encode motion information include FRUC modes, etc. The inter-frame prediction unit 126 selects a mode for deriving the MV of the current block from these multiple modes and uses the selected mode to derive the MV of the current block.

[0253] Figure 17 It is a flowchart showing another example of motion vector derivation.

[0254] The inter-frame prediction unit 126 derives the MV of the current block in the mode of encoding the differential MV. In this case, for example, the differential MV is encoded as a prediction parameter and signaled. That is, the encoded differential MV is included in the encoded signal. This differential MV is the difference between the MV of the current block and its predicted MV.

[0255] Alternatively, the inter-frame prediction unit 126 derives the MV in the mode of not encoding the differential MV. In this case, the encoded differential MV is not included in the encoded signal.

[0256] Here, as described above, the modes for MV derivation include the following ordinary inter-frame modes, merge modes, FRUC modes, affine modes, etc. Among these modes, the modes for encoding the differential MV include ordinary inter-frame modes and affine modes (specifically, affine inter-frame modes), etc. In addition, the modes that do not encode the differential MV include FRUC modes, merge modes, and affine modes (specifically, affine merge modes), etc. The inter-frame prediction unit 126 selects a mode for deriving the MV of the current block from these multiple modes and uses the selected mode to derive the MV of the current block.

[0257] [Flow of Motion Vector Derivation]

[0258] Figure 18It 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 classified into a mode for encoding differential MVs and a mode for not encoding differential motion vectors. The modes for not encoding differential MVs include the merge mode, the FRUC mode, and the affine mode (specifically, the affine merge mode). The detailed content of these modes will be described later. Briefly, the merge mode is a mode in which the MV of the current block is derived by selecting a motion vector from the surrounding encoded blocks, and the FRUC mode is a mode in which the MV of the current block is derived by searching between the encoded regions. In addition, the affine mode is a mode in which, assuming an affine transformation, the motion vectors of the respective sub-blocks constituting the current block are derived as the MV of the current block.

[0259] 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 the motion vector based on the merge mode (Sf_2). In addition, when the inter-frame prediction mode information indicates 1 (1 in Sf_1), the inter-frame prediction unit 126 derives the motion vector according to the FRUC mode (Sf_3). In addition, when the inter-frame prediction mode information indicates 2 (2 in Sf_1), the inter-frame prediction unit 126 derives the motion vector according to the affine mode (specifically, the affine merge mode) (Sf_4). In addition, when the inter-frame prediction mode information indicates 3 (3 in Sf_1), the inter-frame prediction unit 126 derives the motion vector according to the mode for encoding differential MVs (e.g., the normal inter-frame mode) (Sf_5).

[0260] [MV Derivation > Normal Inter-Frame Mode]

[0261] The normal inter-frame mode is an inter-frame prediction mode in which the MV of the current block is derived based on a block in the region of the reference picture represented by the candidate MV that is similar to the image of the current block. In addition, in this normal inter-frame mode, the differential MV is encoded.

[0262] Figure 19 It is a flowchart showing an example of inter-frame prediction based on the normal inter-frame mode.

[0263] First, the inter-frame prediction unit 126 obtains multiple candidate MVs for the current block based on information such as the MVs of multiple encoded blocks located around the current block in time or space (step Sg_1). That is, the inter-frame prediction unit 126 creates a candidate MV list.

[0264] Next, the inter-frame prediction unit 126 extracts N (N is an integer of 2 or more) candidate MVs from the plurality of candidate MVs obtained in step Sg_1 as prediction motion vector candidates (also referred to as prediction MV candidates) in a prescribed priority order (step Sg_2). Additionally, this priority order may be predetermined for each of the N candidate MVs.

[0265] 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 the prediction MV) for 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. Additionally, the stream is the above-described encoded signal or encoded bitstream.

[0266] Next, the inter-frame prediction unit 126 derives the MV of the current block with reference to the encoded reference picture (step Sg_4). At this time, the inter-frame prediction unit 126 also encodes the difference value between the derived MV and the prediction motion vector as the differential MV into the stream. Additionally, the encoded reference picture is a picture composed of a plurality of blocks reconstructed after encoding.

[0267] 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). Additionally, the predicted image is the above-described inter-frame prediction signal.

[0268] Furthermore, information indicating the inter-frame prediction mode (in the above example, the normal inter-frame mode) used in the generation of the predicted image included in the encoded signal is encoded as, for example, prediction parameters.

[0269] Additionally, the candidate MV list may also be used in common with the lists used in other modes. Furthermore, the processing related to the candidate MV list can be applied to the processing related to the lists used in other modes. The processing related to this candidate MV list is, for example, extracting or selecting candidate MVs from the candidate MV list, rearranging candidate MVs, or deleting candidate MVs, etc.

[0270] [MV Derivation > Merge Mode]

[0271] The merge mode is an inter-frame prediction mode in which the MV of the current block is derived by selecting a candidate MV from the candidate MV list.

[0272] Figure 20 It is a flowchart showing an example of inter-frame prediction based on the merge mode.

[0273] First, the inter-frame prediction unit 126 obtains a plurality of candidate MVs for the current block based on information such as the MVs of a plurality of encoded blocks located around the current block in time or space (step Sh_1). That is, the inter-frame prediction unit 126 creates a candidate MV list.

[0274] Next, the inter-frame prediction unit 126 derives the MV of the current block by selecting one candidate MV from the plurality of candidate MVs obtained in step Sh_1 (step Sh_2). At this time, the inter-frame prediction unit 126 encodes the MV selection information for identifying the selected candidate MV into the stream.

[0275] 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).

[0276] In addition, information indicating the inter-frame prediction mode (in the above example, the merge mode) used in the generation of the predicted image included in the encoded signal is encoded as, for example, a prediction parameter.

[0277] Figure 21 is a conceptual diagram for explaining an example of the motion vector derivation process of the current picture based on the merge mode.

[0278] First, a predicted MV list registering candidates for predicted MVs is generated. As candidates for predicted MVs, there are: a spatially adjacent predicted MV, which is the MV possessed by a plurality of encoded blocks located in the spatial vicinity of the target block; a temporally adjacent predicted MV, which is the MV possessed by a nearby block obtained by projecting the position of the target block in the encoded reference picture; a combined predicted MV, which is an MV generated by combining the MV values of the spatially adjacent predicted MV and the temporally adjacent predicted MV; and a zero predicted MV, which is an MV with a value of zero, etc.

[0279] Next, by selecting one predicted MV from the plurality of predicted MVs registered in the predicted MV list, the MV for the target block is determined.

[0280] Moreover, in the variable-length coding unit, the signal indicating which predicted MV is selected, that is, merge_idx, is described in the stream and encoded.

[0281] In addition, the predicted MVs registered in the predicted MV list described in Figure 21 are an example, and the number may be different from that in the figure, or the structure may not include some of the predicted MVs in the figure, or the structure may be appended with predicted MVs other than the types of predicted MVs in the figure.

[0282] The MV of the object block exported through the merge mode can also be used, and the final MV is determined by performing the following DMVR (decode motion vector refinement) process.

[0283] In addition, the candidate for the predicted MV is the above-mentioned candidate MV, and the predicted MV list is the above-mentioned candidate MV list. In addition, the candidate MV list may also be referred to as the candidate list. In addition, merge_idx is MV selection information.

[0284] [MV Export>FRUC Mode]

[0285] The motion information may not be signaled from the encoding device side, but may be derived on the decoding device side. In addition, as described above, the merge mode defined by the H.265 / HEVC standard can also be used. In addition, for example, the motion information can also be derived by performing a motion search on the decoding device side. In the embodiment, the motion search is performed on the decoding device side without using the pixel values of the current block.

[0286] Here, the mode of performing motion estimation on the decoding device side will be described. The mode of performing motion estimation on the decoding device side is called PMMVD (pattern matched motion vector derivation) mode or FRUC (frame rate up-conversion) mode.

[0287] In the form of a flowchart in Figure 22This represents an example of FRUC processing. First, referring to the motion vectors of the encoded blocks adjacent to the current block in space or time, a plurality of candidates each having a predicted motion vector (MV) are generated (i.e., it is a candidate MV list and can also be shared with the merge list) (step Si_1). Next, the best candidate MV is selected from among the plurality of 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 directly derived 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 peripheral region of the position in the reference picture corresponding to the motion vector of the selected candidate. That is, it is also possible to search the peripheral region of the best candidate MV by using pattern matching and evaluation values in the reference picture, and if there is an MV with a better evaluation value, update the best candidate MV to the above MV and use it as the final MV of the current block. It is also possible to configure it so as not to perform the process of updating to an MV with a better evaluation value.

[0288] Finally, the inter-frame prediction unit 126 generates a predicted image of the current block by performing motion compensation on the current block by using the derived MV and the encoded reference picture (step Si_5).

[0289] The same process can also be performed when processing is performed in units of sub-blocks.

[0290] The evaluation value can also be calculated by various methods. For example, the reconstructed image of the region in the reference picture corresponding to the motion vector is compared with the reconstructed image of a specified region (for example, as shown below, this region can be a region of another reference picture or a neighboring block of the current picture). The specified region can also be determined in advance.

[0291] Then, the difference between the pixel values of the two reconstructed images can also be calculated for use as the evaluation value of the motion vector. In addition, it can also be that other information is used in addition to the difference value to calculate the evaluation value.

[0292] Next, an example of pattern matching will be described in detail. First, one candidate MV included in the candidate MV list (for example, the merge list) is selected as the starting point for the search based on pattern matching. For example, as the pattern matching, the first pattern matching or the second pattern matching can be used. The first pattern matching and the second pattern matching are sometimes referred to as bilateral matching and template matching, respectively.

[0293] [MV Derivation>FRUC>Two-way Matching]

[0294] 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 specified region for calculating the evaluation value for the above candidates, the region in other reference pictures along the motion trajectory of the current block is used. The specified region can also be determined in advance.

[0295] Figure 23 It is a conceptual diagram showing an example of the first pattern matching (two-way matching) between two blocks in two reference pictures along the motion trajectory. As Figure 23 shown, in the first pattern matching, by searching for the most 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), two motion vectors (MV0, MV1) are derived. Specifically, for the current block, the difference between the reconstructed image at the specified position in the first encoded reference picture (Ref0) specified by the candidate MV and the reconstructed image at the specified position in the second encoded reference picture (Ref1) specified by the symmetric MV obtained by scaling the candidate MV by the display time interval is derived, and the evaluation value is calculated using the obtained difference value. It is possible to select the candidate MV with the best evaluation value among multiple candidate MVs as the final MV, and good results can be obtained.

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

[0297] [MV Derivation>FRUC>Template Matching]

[0298] In the second pattern matching (template matching), pattern matching is performed between the template in the current picture (the block adjacent to the current block in the current picture (e.g., the upper and / or left adjacent block)) and the block in the reference picture. Therefore, in the second pattern matching, as the specified region for calculating the evaluation value for the above candidates, the block adjacent to the current block in the current picture is used.

[0299] Figure 24This is a conceptual diagram showing an example of pattern matching (template matching) between a template in the current picture and a block in a reference picture. As Figure 24 shown, in the second pattern matching, the motion vector of the current block is derived by searching for the block in the reference picture (Ref0) 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 encoded region on either or both of the left and upper adjacent sides and the reconstructed image at the same position in the encoded reference picture (Ref0) specified by the candidate MV is derived, and the evaluation value is calculated using the obtained difference value, and the candidate MV with the best evaluation value among multiple candidate MVs can be selected as the best candidate MV.

[0300] Information indicating whether to adopt the FRUC mode (e.g., called the FRUC flag) is signaled at the CU level. In addition, in the case of adopting the FRUC mode (e.g., when the FRUC flag is true), information indicating the pattern matching method that can be adopted (the first pattern matching or the second pattern matching) is signaled at the CU level. Additionally, the signaling of this information does not need to be limited to the CU level and can also be at other levels (e.g., sequence level, picture level, slice level, tile level, CTU level, or sub-block level).

[0301] [MV Derivation > Affine Mode]

[0302] Next, the affine mode of deriving the motion vector in sub-block units based on the motion vectors of multiple adjacent blocks will be described. This mode is sometimes called the affine motion compensation prediction mode.

[0303] Figure 25A This is a conceptual diagram showing an example of the derivation of the motion vector in sub-block units based on the motion vectors of multiple adjacent blocks. In Figure 25A , the current block includes 16 4×4 sub-blocks. Here, the motion vector v 0 of the upper left control point of the current block is derived based on the motion vectors of adjacent blocks. Similarly, the motion vector v 1 of the upper right control point of the current block is derived based on the motion vectors of adjacent sub-blocks. Then, according to the following equation (1A), the two motion vectors v 0 and v 1 can be projected, and the motion vectors (v x , v y ) of each sub-block within the current block can also be derived.

[0304]

Equation 1

[0305]

[0306] Here, x and y represent the horizontal position and vertical position of the sub-block respectively, and w represents a prescribed weight coefficient. The prescribed weight coefficient can also be determined in advance.

[0307] The information indicating such an affine mode (e.g., called an affine flag) can be signaled as a signal at the CU level. In addition, the signaling of the information indicating the affine mode does not need to be limited to the CU level and can be at other levels (e.g., sequence level, picture level, slice level, tile level, CTU level, or sub-block level).

[0308] In addition, in such an affine mode, several modes in which the derivation methods of the motion vectors of the upper left and upper right control points are different can also be included. For example, in the affine mode, there are two modes: an affine inter-frame (also called an affine ordinary inter-frame) mode and an affine merge mode.

[0309] [MV Derivation > Affine Mode]

[0310] Figure 25B is a conceptual diagram for explaining an example of the derivation of the motion vector of a sub-block unit in an affine mode with three control points. In Figure 25B , the current block includes 16 4×4 sub-blocks. Here, based on the motion vectors of adjacent blocks, the motion vector v 0 of the upper left control point of the current block is derived. Similarly, based on the motion vectors of adjacent blocks, the motion vector v 1 of the upper right control point of the current block is derived, and based on the motion vectors of adjacent blocks, the motion vector v 2 of the lower left control point of the current block is derived. Then, according to the following equation (1B), the three motion vectors v 0 , v 1 and v 2 can be projected, and the motion vectors (v x , v y ) of each sub-block within the current block can also be derived.

[0311]

Equation 2

[0312]

[0313] 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.

[0314] Affine modes with different numbers of control points (e.g., two and three) can also be switched and signaled at the CU level. In addition, the information indicating the number of control points of the affine mode used at the CU level can be signaled at other levels (e.g., sequence level, picture level, slice level, tile level, CTU level, or sub-block level).

[0315] In addition, in such an affine mode with three control points, several modes with different methods for deriving the motion vectors of the upper-left, upper-right, and lower-left control points may also be included. For example, in the affine mode, there are two modes: the affine inter-frame (also referred to as the affine normal inter-frame) mode and the affine merge mode.

[0316] [MV Derivation > Affine Merge Mode]

[0317] Figure 26A 、 Figure 26B and Figure 26C are conceptual diagrams for explaining the affine merge mode.

[0318] In the affine merge mode, as shown in Figure 26A , for example, based on a plurality of motion vectors corresponding to the blocks encoded in the affine mode in 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, these blocks are checked in the order of the encoded blocks A (left), B (upper), C (upper-right), D (lower-left), and E (upper-left), and the first valid block encoded in the affine mode is determined. The predicted motion vector of the control point of the current block is calculated based on the plurality of motion vectors corresponding to the determined block.

[0319] For example, as shown in Figure 26B , when encoding the block A adjacent to the left side of the current block in the affine mode with two control points, the motion vectors v 3 and v 4 projected to the positions of the upper-left corner and the upper-right corner of the encoded block containing the block A are derived. Then, based on the derived motion vectors v 3 and v 4 , the predicted motion vector v 0 of the upper-left control point of the current block and the predicted motion vector v 1 of the upper-right control point are calculated.

[0320] For example, as shown in Figure 26C , when encoding the block A adjacent to the left side of the current block in the affine mode with three control points, the motion vectors v 3 , v 4 and v 5 projected to the positions of the upper-left corner, the upper-right corner, and the lower-left corner of the encoded block containing the block A are derived. Then, based on the derived motion vectors v 3 , v 4 and v 5 , the predicted motion vector v 0 of the upper-left control point of the current block and the predicted motion vector v1 and the predicted motion vector v of the control point at the lower left corner 2 .

[0321] In addition, in the derivation of the predicted motion vector of each control point of the current block in step Sj_1 described later, this predicted motion vector derivation method can also be used. Figure 29

[0322] Figure 27 is a flowchart showing an example of the affine merge mode.

[0323] 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). The control points are, as Figure 25A shown, the upper left and upper right points of the current block, or, as Figure 25B shown, the upper left, upper right, and lower left points of the current block.

[0324] That is, as Figure 26A shown, the inter-frame prediction unit 126 checks these blocks in the order of the encoded blocks A (left), B (upper), C (upper right), D (lower left), and E (upper left), and determines the initial valid block encoded in the affine mode.

[0325] Then, when block A is determined and block A has two control points, as Figure 26B shown, the inter-frame prediction unit 126 calculates the motion vector v 3 and v 4 of the encoded block containing block A for the motion vector of the control point at the upper left corner of the current block 0 and the motion vector v 1 of the control point at the upper right corner. For example, by projecting the motion vectors v 3 and v 4 of the upper left and upper right corners of the encoded block onto the current block, the inter-frame prediction unit 126 calculates the predicted motion vector v 0 of the control point at the upper left corner of the current block and the predicted motion vector v 1 .

[0326] Or, when block A is determined and block A has three control points, as Figure 26C shown, the inter-frame prediction unit 126 calculates the motion vector v 3 、v 4 and v 5 of the encoded block containing block A for the motion vector of the control point at the upper left corner of the current block 0 、the motion vector v 1 ​and the motion vector v of the control point at the lower left corner 2 . For example, by projecting the motion vectors v 3 , v 4 and v 5 of the upper left corner, upper right corner, and lower left corner of the encoded block onto the current block, the inter-frame prediction unit 126 calculates the predicted motion vector v 0 of the control point at the upper left corner of the current block, the predicted motion vector v 1 of the control point at the upper right corner, and the motion vector v 2 of the control point at the lower left corner.

[0327] Next, the inter-frame prediction unit 126 performs motion compensation on each of the multiple sub-blocks included in the current block. That is, for each of the multiple sub-blocks, the inter-frame prediction unit 126 uses two predicted motion vectors v 0 and v 1 and the above formula (1A), or three predicted motion vectors v 0 , v 1 and v 2 and the above formula (1B) 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, motion compensation is performed on the current block, and a predicted image of the current block is generated.

[0328] [MV Derivation>Affine Inter-frame Mode]

[0329] Figure 28A is a conceptual diagram for explaining the affine inter-frame mode with two control points.

[0330] In this affine inter-frame mode, as Figure 28A shown, the motion vector selected from the motion vectors of the encoded blocks A, B, and C adjacent to the current block is used as the predicted motion vector v 0 of the control point at the upper left corner of the current block. Similarly, the motion vector selected from the motion vectors of the encoded blocks D and E adjacent to the current block is used as the predicted motion vector v 1 of the control point at the upper right corner of the current block.

[0331] Figure 28B is a conceptual diagram for explaining the affine inter-frame mode with three control points.

[0332] In this affine inter-frame mode, as Figure 28B shown, the motion vector selected from the motion vectors of the encoded blocks A, B, and C adjacent to the current block is used as the predicted motion vector v 0Similarly, a motion vector selected from the motion vectors of the encoded blocks D and E adjacent to the current block is used as the predicted motion vector v of the control point at the upper right corner of the current block 1 In addition, a motion vector selected from the motion vectors of the encoded blocks F and G adjacent to the current block is used as the predicted motion vector v of the control point at the lower left corner of the current block 2 。

[0333] Figure 29 is a flowchart showing an example of the affine inter-frame mode

[0334] As shown in the figure, in the affine inter-frame mode, first, the inter-frame prediction unit 126 derives the predicted MV (v 0 , v 1 ) or (v 0 , v 1 , v 2 ) for each of the two or three control points of the current block (step Sj_1). As Figure 25A or Figure 25B shown, the control points are the points at the upper left corner, upper right corner, or lower left corner of the current block

[0335] That is, the inter-frame prediction unit 126 derives the predicted motion vector (v Figure 28A or Figure 28B ) of the control point of the current block by selecting the motion vector of a certain block in the encoded blocks near each control point of the current block as shown in 0 , v 1 ) or (v 0 , v 1 , v 2 ). At this time, the inter-frame prediction unit 126 encodes the prediction motion vector selection information used to identify the two selected motion vectors into the stream

[0336] For example, the inter-frame prediction unit 126 can determine which block's motion vector to select from the encoded blocks adjacent to the current block as the predicted motion vector of the control point by using cost evaluation, etc., and can describe a flag indicating which predicted motion vector is selected in the bitstream

[0337] Next, the inter-frame prediction unit 126 performs motion search (steps Sj_3 and Sj_4) while selecting or deriving the predicted motion vector selected or derived in the update step Sj_1 (step Sj_2). That is, the inter-frame prediction unit 126 uses the motion vectors of the respective sub-blocks corresponding to the predicted motion vector to be updated as the affine MVs, and calculates using the above formula (1A) or formula (1B) (step Sj_3). Then, the inter-frame prediction unit 126 performs motion compensation on each sub-block using these affine MVs and the encoded reference picture (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 the stream.

[0338] 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).

[0339] [MV Derivation>Affine Inter-frame Mode]

[0340] When signaling in an affine mode that switches different numbers of control points (e.g., 2 and 3) at the CU level, sometimes the number of control points in the encoded block and the current block is different. Figure 30A And Figure 30B is a conceptual diagram for explaining a method for deriving a predicted vector of a control point in the case where the number of control points in the encoded block and the current block is different.

[0341] For example, as Figure 30A shown, when the current block has three control points at the upper left corner, upper right corner, and lower left corner, and the block A adjacent to the left side of the current block is encoded in an affine mode with two control points, a motion vector v projected onto the positions of the upper left corner and upper right corner of the encoded block including block A is derived 3 and v 4 . Then, based on the derived motion vectors v 3 and v 4 , the predicted motion vector v of the upper left corner control point of the current block is calculated 0 and the predicted motion vector v of the upper right corner control point 1 . In addition, based on the derived motion vectors v 0 and v 1 the predicted motion vector v of the lower left corner control point is calculated 2 .

[0342] For example, as Figure 30BAs shown, when the current block has two control points at 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 with three control points, a motion vector v is derived that projects to the positions of the upper left corner, the upper right corner, and the lower left corner of the encoded block containing block A. 3 , v 4 and v 5 . Then, based on the derived motion vectors v 3 , v 4 and v 5 , the predicted motion vector v 0 of the control point at the upper left corner of the current block and the predicted motion vector v 1 of the control point at the upper right corner are calculated.

[0343] In Figure 29 the derivation of each predicted motion vector of the control points of the current block in step Sj_1, this predicted motion vector derivation method can also be used.

[0344] [MV Derivation > DMVR]

[0345] Figure 31A is a flowchart showing the relationship between the merge mode and DMVR.

[0346] The inter-frame prediction unit 126 derives the motion vector of the current block in the merge mode (step Sl_1). Next, the inter-frame prediction unit 126 determines whether to perform a motion vector search, i.e., a motion search (step Sl_2). Here, when it is determined not to perform a motion search (No in step Sl_2), the inter-frame prediction unit 126 determines the motion vector derived in step Sl_1 as the final motion vector for the current block (step Sl_4). That is, in this case, the motion vector of the current block is determined in the merge mode.

[0347] On the other hand, when it is determined in step Sl_1 to perform a motion search (Yes in step Sl_2), the inter-frame prediction unit 126 derives the final motion vector for the current block by searching the peripheral region of the reference picture represented by the motion vector derived in step Sl_1 (step Sl_3). That is, in this case, the motion vector of the current block is determined by DMVR.

[0348] Figure 31B is a conceptual diagram for explaining an example of the DMVR process for determining the MV.

[0349] First, set the best MVP set for the current block (e.g., in the merge mode) as the candidate MV. Then, according to the candidate MV (L0), determine the reference pixels based on the encoded picture in the L0 direction, i.e., the first reference picture (L0). Similarly, according to the candidate MV (L1), determine the reference pixels based on the encoded picture in the L1 direction, i.e., the second reference picture (L1). Generate a template by taking the average of these reference pixels.

[0350] Next, using the above template, search the surrounding areas of the candidate MVs of the first reference picture (L0) and the second reference picture (L1) respectively, and determine the MV with the minimum cost as the final MV. In addition, the cost value can also be calculated using, for example, the difference values between the pixel values of the template and the pixel values of the search area, as well as the candidate MV values, etc.

[0351] In addition, typically, in the encoding device and the decoding device described later, the structures and operations of the processes described here are basically common.

[0352] Even if it is not the processing example itself described here, as long as it is a process that can search the surrounding area of the candidate MV to derive the final MV, any process can be used.

[0353] [Motion Compensation > BIO / OBMC]

[0354] In motion compensation, there is a mode of generating a prediction image and correcting the prediction image. This mode is, for example, BIO and OBMC described later.

[0355] Figure 32 It is a flowchart showing an example of the generation of a prediction image.

[0356] The inter-frame prediction unit 126 generates a prediction image (step Sm_1), and corrects the prediction image by, for example, any of the above modes (step Sm_2).

[0357] Figure 33 It is a flowchart showing another example of the generation of a prediction image.

[0358] 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 prediction image (step Sn_2), and determines whether to perform a correction process (step Sn_3). Here, when it is determined to perform the correction process (Yes in step Sn_3), the inter-frame prediction unit 126 generates a final prediction image by correcting the prediction image (step Sn_4). On the other hand, when it is determined not to perform the correction process (No in step Sn_3), the inter-frame prediction unit 126 outputs the prediction image without correcting it as the final prediction image (step Sn_5).

[0359] In addition, in motion compensation, there is a mode of correcting the luminance when generating a predicted image. This mode is, for example, LIC described later.

[0360] Figure 34 It is a flowchart showing another example of generating a predicted image.

[0361] 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 luminance correction processing (step So_2). Here, when it is determined to perform luminance correction processing (Yes in step So_2), the inter-frame prediction unit 126 generates a predicted image while performing luminance correction (step So_3). That is, a predicted image is generated by LIC. On the other hand, when it is determined not to perform luminance correction processing (No in step So_2), the inter-frame prediction unit 126 generates a predicted image by normal motion compensation without performing luminance correction (step So_4).

[0362] [Motion Compensation > OBMC]

[0363] Not only the motion information of the current block obtained by motion search can be used, but also the motion information of adjacent blocks can be used to generate an inter-frame prediction signal. Specifically, an inter-frame prediction signal can also be generated in units of sub-blocks within the current block by weighted addition of a prediction signal based on the motion information obtained by motion search (within the reference picture) and a prediction signal based on the motion information of adjacent blocks (within the current picture). Such inter-frame prediction (motion compensation) is sometimes called OBMC (overlapped block motion compensation).

[0364] In the OBMC mode, information indicating the size of the sub-blocks used for OBMC (for example, called the OBMC block size) can also be signaled at the sequence level. And information indicating whether to apply the OBMC mode (for example, called the OBMC flag) can also be signaled at the CU level. In addition, the level of signaling of this information does not need to be limited to the sequence level and the CU level, and can also be other levels (for example, picture level, slice level, tile level, CTU level, or sub-block level).

[0365] A more specific example of the OBMC mode will be described. Figure 35 and Figure 36 are a flowchart and a conceptual diagram for explaining the outline of the predicted image correction processing based on OBMC processing.

[0366] First, as Figure 36 shown, using the motion vector (MV) assigned to the block to be processed (current), a predicted image (Pred) based on normal motion compensation is obtained. In Figure 36In it, the arrow "MV" points to the reference picture and indicates which block the current block of the current picture refers to for obtaining the predicted image.

[0367] Next, the motion vector (MV_L) already derived for the encoded left adjacent block is applied (reused) to the block to be encoded, and the predicted image (Pred_L) is obtained. The motion vector (MV_L) is represented by the 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.

[0368] Similarly, the motion vector (MV_U) already derived for the encoded upper adjacent block is applied (reused) to the block to be encoded, and the predicted image (Pred_U) is obtained. The motion vector (MV_U) is represented by the arrow "MV_U" pointing from the current block to the reference picture. Then, the second correction of the predicted image is performed by overlapping the predicted image Pred_U with the predicted image that has undergone the first correction (e.g., Pred and Pred_L). This has the effect of blending the boundaries between adjacent blocks. The predicted image obtained through the second correction is the final predicted image of the current block where the boundaries with adjacent blocks are blended (smoothed).

[0369] In addition, the above example is a two-path correction method using the left adjacent and upper adjacent blocks, but this correction method can also be a three-path or more path correction method that also uses the right adjacent and / or lower adjacent blocks.

[0370] In addition, the area for overlapping can also be not the pixel area of the whole block, but only a part of the area near the block boundary.

[0371] In addition, the prediction image correction process of OBMC is described here. The prediction image correction process of OBMC is used to obtain one predicted image Pred by overlapping one reference picture with the additional predicted images Pred_L and Pred_U. However, in the case of correcting the predicted image based on multiple reference images, the same process can also be applied to each of the multiple reference pictures. In this case, through the OBMC image correction based on multiple reference pictures, after obtaining the corrected predicted images from each reference picture, the final predicted image is obtained by further overlapping the obtained multiple corrected predicted images.

[0372] In addition, in OBMC, the unit of the object block can be the prediction block unit or the sub-block unit obtained by further dividing the prediction block.

[0373] As a method for determining whether to apply OBMC processing, for example, there is a method of using a signal indicating whether to apply OBMC processing, i.e., obmc_flag. As a specific example, the encoding device can also determine whether the target block belongs to a region with complex motion. When the encoding device determines that the block belongs to a region with complex motion, it sets the obmc_flag value to 1 and applies OBMC processing for encoding. When the block does not belong to a region with complex motion, it sets the obmc_flag value to 0 and encodes the block without applying OBMC processing. On the other hand, in the decoding device, by decoding the obmc_flag described in the stream (e.g., the compressed sequence), it switches whether to apply OBMC processing according to this value for decoding.

[0374] 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 can generate multiple prediction images with shapes different from the rectangle for the rectangular current block, and can generate the final rectangular prediction image by combining these multiple prediction images. Shapes different from the rectangle can also be triangles, for example.

[0375] Figure 37 It is a conceptual diagram for explaining the generation of two triangular prediction images.

[0376] The inter-frame prediction unit 126 generates a triangular prediction image by performing motion compensation on the first triangular partition within 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 identical to the current block by combining these prediction images.

[0377] In addition, in Figure 37 the example shown, the first partition and the second partition are triangles respectively, but they can also be trapezoids, or they can be of different shapes respectively. Moreover, in Figure 37 the example shown, the current block is composed of two partitions, but it can also be composed of three or more partitions.

[0378] In addition, the first partition and the second partition can also be repeated. That is, the first partition and the second partition can also include the same pixel region. In this case, the prediction image in the first partition and the prediction image in the second partition can be used to generate the prediction image of the current block.

[0379] In addition, in this example, an example is shown where prediction images are generated for both partitions through inter-frame prediction, but prediction images can also be generated for at least one partition through intra-frame prediction.

[0380] [Motion Compensation > BIO]

[0381] 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 the BIO (bi-directional optical flow) mode.

[0382] Figure 38 is a conceptual diagram for explaining a model assuming uniform linear motion. In Figure 38 , (v x , v y ) represents the velocity vector, and τ 0 , τ 1 respectively represent the temporal distances between the current picture (Cur Pic) and two reference pictures (Ref 0 , Ref 1 ). (MVx 0 , MVy 0 ) represents the motion vector corresponding to the reference picture Ref 0 , and (MVx 1 , MVy 1 ) represents the motion vector corresponding to the reference picture Ref 1 .

[0383] At this time, it can also be that, under the assumption of uniform linear motion of the velocity vector (v x , v y ), (MVx 0 , MVy 0 ) and (MVx 1 , MVy 1 ) are respectively represented as (vxτ 0 , vyτ 0 ) and (-vxτ 1 , -vyτ 1 ), and the following optical flow equation (2) is adopted.

[0384]

Equation 3

[0385]

[0386] Here, I(k) represents the luminance value of the reference image k (k = 0, 1) after motion compensation. This optical flow equation indicates that the sum of (i) the temporal differential of the luminance value, (ii) the product of the horizontal velocity and the horizontal component of the spatial gradient of the reference image, and (iii) the product of the vertical velocity and the vertical component of the spatial gradient of the reference image is equal to zero. Alternatively, based on the combination of this optical flow equation and Hermite interpolation, the motion vector in block units obtained from a merge list or the like can be corrected in pixel units.

[0387] In addition, the motion vector can 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 can be derived in sub-block units based on the motion vectors of multiple adjacent blocks.

[0388] [Motion Compensation > LIC]

[0389] Next, an example of a mode for generating a predicted image (prediction) using LIC (local illumination compensation) processing will be described.

[0390] Figure 39 It is a conceptual diagram for explaining an example of a method for generating a predicted image using a luminance correction process based on LIC processing.

[0391] First, the MV is derived from the encoded reference picture, and the reference image corresponding to the current block is obtained.

[0392] Next, information indicating how the luminance value changes in the reference picture and the current picture is extracted for the current block. This extraction is based on the luminance pixel values of the encoded left adjacent reference region (peripheral reference region) and the encoded upper adjacent reference region (peripheral reference region) in the current picture, and the luminance pixel values at the same position in the reference picture specified by the derived MV. Then, the luminance correction parameter is calculated using the information indicating how the luminance value changes.

[0393] The predicted image for the current block is generated by applying the above luminance correction parameter to the reference image in the reference picture specified by the MV for luminance correction processing.

[0394] In addition, Figure 39 The shape of the above peripheral reference region in

[0395] In addition, the process of generating a predicted image based on one reference picture has been described here. However, the same applies to the case of generating a predicted image based on multiple reference pictures. A predicted image can also be generated after performing brightness correction processing on the reference images obtained from each reference picture in the same manner as described above.

[0396] As a method for determining whether to adopt LIC processing, for example, there is a method of using lic_flag, which is a signal indicating whether to adopt LIC processing. As a specific example, in an encoding device, it is determined whether the current block belongs to a region where a brightness change has occurred. If it belongs to a region where a brightness change has occurred, the value 1 is set as lic_flag, and encoding is performed using LIC processing. If it does not belong to a region where a brightness change has occurred, the value 0 is set as lic_flag, and encoding is performed without using LIC processing. On the other hand, in a decoding device, it is also possible to decode lic_flag described in the stream and switch whether to adopt LIC processing according to its value for decoding.

[0397] As another method for determining whether to adopt LIC processing, for example, there is also a method of determining according to whether LIC processing has been adopted in neighboring blocks. As a specific example, when the current block is in the merge mode, it is determined whether the neighboring encoded blocks selected during the derivation of the MV in the merge mode processing have been encoded using LIC processing, and encoding is switched according to the result whether to adopt LIC processing. In addition, in the case of this example, the same processing also applies to the decoding device side.

[0398] Use Figure 39 The form of LIC processing (brightness correction processing) has been described. Hereinafter, the detailed content thereof will be described.

[0399] First, the inter-frame prediction unit 126 derives a motion vector for obtaining a reference image corresponding to the encoding target block from a reference picture that is an encoded picture.

[0400] Next, for the encoding target block, the inter-frame prediction unit 126 uses the luminance pixel values of the left adjacent and upper adjacent encoded peripheral reference regions and the luminance pixel values at the same positions in the reference picture specified by the motion vector to extract information indicating how the luminance values change in the reference picture and the encoding target picture, and calculates a brightness correction parameter. For example, let the luminance pixel value of a certain pixel in the peripheral reference region within the encoding target picture be p0, and let the luminance pixel value of the pixel at the same position in the peripheral reference region within the reference picture be 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 peripheral reference region.

[0401] Next, the inter-frame prediction unit 126 generates a prediction image for the coding 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 prediction image after the brightness correction process is set to p3. The inter-frame prediction unit 126 generates the prediction image after the brightness correction process by calculating A×p2 + B = p3 for each pixel in the reference image.

[0402] In addition, Figure 39 The shape of the peripheral reference area in Figure 39 is an example, and other shapes may also be used. Additionally, a part of the peripheral reference area shown in

[0403] In addition, in Figure 39 the example shown, the peripheral reference area in the reference picture is the area specified by the motion vector of the coding target picture from the peripheral reference area in the coding target picture, but it may also be the area specified by other motion vectors. For example, this other motion vector may also be the motion vector of the peripheral reference area in the coding target picture.

[0404] Here, the operations in the coding device 100 have been described, but typically, the operations in the decoding device 200 are the same.

[0405] In addition, the LIC process can be applied not only to luminance but also to color difference. In this case, correction parameters can be derived individually for each of Y, Cb, and Cr, or a common correction parameter can be used for any one of them.

[0406] In addition, the LIC process can also be applied in units of sub-blocks. For example, correction parameters can be derived using the peripheral reference area of the current sub-block and the peripheral reference area of the reference sub-block in the reference picture specified by the MV of the current sub-block.

[0407] [Prediction control unit]

[0408] The prediction control unit 128 selects one of the intra-frame prediction signal (the signal output from the intra-frame prediction unit 124) and the inter-frame prediction signal (the signal output from the inter-frame prediction unit 126), and outputs the selected signal as the prediction signal to the subtraction unit 104 and the addition unit 116.

[0409] As in Figure 1As shown, in various coding 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 bitstream (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 the decoding device. The decoding device may also receive the coded bitstream and perform decoding, and perform the same processing as the prediction processing performed in the intra-frame prediction unit 124, the inter-frame prediction unit 126, and the prediction control unit 128. The prediction parameters may include a selected prediction signal (e.g., a motion vector, a prediction type, or a prediction mode used by the intra-frame prediction unit 124 or the inter-frame prediction unit 126), or any index, flag, or value based on or representing the prediction processing performed in the intra-frame prediction unit 124, the inter-frame prediction unit 126, and the prediction control unit 128.

[0410] [Installation Example of Coding Device]

[0411] Figure 40 is a block diagram showing an installation example of the coding device 100. The coding device 100 includes a processor a1 and a memory a2. For example, Figure 1 a plurality of components of the coding device 100 shown are implemented by Figure 40 the processor a1 and the memory a2 shown.

[0412] The processor a1 is a circuit that performs information processing and is a circuit that can access the memory a2. For example, the processor a1 is a dedicated or general-purpose electronic circuit for encoding moving images. The processor a1 may also be a processor such as a CPU. In addition, the processor a1 may also be an aggregate of multiple electronic circuits. In addition, for example, the processor a1 may also function as Figure 1 multiple components among the multiple components of the coding device 100 shown, such as.

[0413] The memory a2 is a dedicated or general-purpose memory that stores information for the processor a1 to encode moving images. The memory a2 may be an electronic circuit or may be connected to the processor a1. In addition, the memory a2 may also be included in the processor a1. In addition, the memory a2 may also be an aggregate of multiple electronic circuits. In addition, the memory a2 may be a magnetic disk or an optical disk, etc., or may be represented as a storage or a recording medium, etc. In addition, the memory a2 may be a non-volatile memory or a volatile memory.

[0414] For example, the memory a2 may store the encoded moving images or may store the bit string corresponding to the encoded moving images. In addition, a program for the processor a1 to encode moving images may also be stored in the memory a2.

[0415] In addition, for example, the memory A2 can also function as Figure 1 a component for storing information among the multiple components of the encoding device 100 shown, for example, as Figure 1 the block memory 118 and the frame memory 122 shown. More specifically, the memory A2 can store the reconstructed blocks, reconstructed pictures, etc.

[0416] In addition, in the encoding device 100, all of the multiple components shown, for example, as Figure 1 may not be installed, and all of the above-mentioned multiple processes may not be performed. Figure 1 A part of the multiple components shown, for example, as

[0417] [Decoding Device]

[0418] Next, a decoding device capable of decoding an encoded signal (encoded bitstream) output from, for example, the above-mentioned encoding device 100 will be described. Figure 41 FIG. is a block diagram showing the functional structure of the decoding device 200 according to an embodiment. The decoding device 200 is a moving image decoding device that decodes a moving image in units of blocks.

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

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

[0421] Hereinafter, after explaining the overall processing flow of the decoding device 200, each component included in the decoding device 200 will be described.

[0422] [Overall Flow of Decoding Processing]

[0423] Figure 42This is a flowchart showing an example of the overall decoding process performed by the decoding device 200.

[0424] First, the entropy decoding unit 202 of the decoding device 200 determines the segmentation pattern of a fixed-size block (e.g., 128×128 pixels) (step Sp_1). This segmentation pattern is the one 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 this segmentation pattern.

[0425] That is, the entropy decoding unit 202 decodes (specifically, entropy decodes) the encoded quantization coefficients and prediction parameters of the block to be decoded (also referred to as the current block) (step Sp_2).

[0426] Next, the inverse quantization unit 204 and the inverse transform unit 206 restore multiple prediction residuals (i.e., differential blocks) by performing inverse quantization and inverse transform on the multiple quantization coefficients (step Sp_3).

[0427] Next, the prediction processing unit, which is composed of all or part of the intra-frame prediction unit 216, the inter-frame prediction unit 218, and the prediction control unit 220, generates a prediction signal (also referred to as a prediction block) for the current block (step Sp_4).

[0428] Next, the addition unit 208 reconstructs the current block into a reconstructed image (also referred to as a decoded image block) by adding the differential block to the prediction block (step Sp_5).

[0429] Moreover, when generating this reconstructed image, the loop filtering unit 212 filters this reconstructed image (step Sp_6).

[0430] Then, the decoding device 200 determines whether the decoding of the entire picture has been completed (step Sp_7). If it is determined that the decoding is not completed (No in step Sp_7), the processing from step Sp_1 is repeated.

[0431] As shown in the figure, the processing of steps Sp_1 to Sp_7 is sequentially performed by the decoding device 200, or multiple of these processes can be performed in parallel, or the order can be swapped, etc.

[0432] [Entropy Decoding Unit]

[0433] The entropy decoding unit 202 performs entropy decoding on the encoded bitstream. Specifically, the entropy decoding unit 202 arithmetic-decodes the encoded bitstream into a binary signal, for example. Then, the entropy decoding unit 202 de-binarizes the binary signal. As a result, the entropy decoding unit 202 outputs the quantization coefficients to the inverse quantization unit 204 in block units. The entropy decoding unit 202 may also output the encoded bitstream to the intra prediction unit 216, the inter prediction unit 218, and the prediction control unit 220 in the embodiment (see Figure 1 ). The prediction parameters included therein. 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.

[0434] [Inverse Quantization Unit]

[0435] The inverse quantization unit 204 performs inverse quantization on the quantization coefficients of the decoding target block (hereinafter referred to as the current block) that is the input from the entropy decoding unit 202. Specifically, the inverse quantization unit 204 performs inverse quantization on the quantization coefficients of the current block based on the quantization parameters corresponding to the quantization coefficients, respectively. Then, the inverse quantization unit 204 outputs the inverse-quantized quantization coefficients (i.e., transform coefficients) of the current block to the inverse transform unit 206.

[0436] [Inverse Transform Unit]

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

[0438] For example, when the information read from the encoded bitstream indicates the use of EMT or AMT (e.g., the AMT flag is true), the inverse transform unit 206 performs inverse transform on the transform coefficients of the current block based on the read information indicating the transform type.

[0439] In addition, for example, when the information read from the encoded bitstream indicates the use of NSST, the inverse transform unit 206 applies inverse re-transformation to the transform coefficients.

[0440] [Addition Unit]

[0441] The addition unit 208 reconstructs the current block by adding the prediction error that is the input from the inverse transform unit 206 and the prediction sample that is the input from the prediction control unit 220. Then, the addition unit 208 outputs the reconstructed block to the block memory 210 and the loop filter unit 212.

[0442] [Block Memory]

[0443] The block memory 210 is a storage unit for storing blocks within a decoded picture to be predicted (hereinafter referred to as the current picture) that are referenced in intra prediction. Specifically, the block memory 210 stores the reconstructed blocks output from the adder 208.

[0444] [Loop Filtering Unit]

[0445] The loop filtering unit 212 performs loop filtering on the blocks reconstructed by the adder 208, and outputs the filtered reconstructed blocks to the frame memory 214, the display device, and the like.

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

[0447] [Frame Memory]

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

[0449] [Prediction Processing Unit (Intra Prediction Unit / Inter Prediction Unit / Prediction Control Unit)]

[0450] Figure 43 is a flowchart showing an example of the processing performed by the prediction processing unit of the decoding device 200. In addition, the prediction processing unit is composed of all or some of the constituent elements of the intra prediction unit 216, the inter prediction unit 218, and the prediction control unit 220.

[0451] The prediction processing unit generates a predicted image of the current block (step Sq_1). This predicted image is also referred to as a prediction signal or a predicted block. In addition, in the prediction signal, there are, for example, an intra prediction signal or an inter prediction signal. Specifically, the prediction processing unit uses the reconstructed image that has been obtained by generating a predicted block, a differential block, a coefficient block, restoring the differential block, and generating a decoded image block, to generate a predicted image of the current block.

[0452] The reconstructed image can be, for example, an image of a reference picture, or an image of a decoded block within the current picture that includes the current block, i.e., the current picture. The decoded blocks within the current picture are, for example, adjacent blocks of the current block.

[0453] Figure 44 is a flowchart showing another example of the processing performed by the prediction processing unit of the decoding device 200.

[0454] The prediction processing unit determines a method or mode for generating a prediction image (step Sr_1). For example, this method or mode can be determined based on, for example, prediction parameters, etc.

[0455] When it is determined that the first method is the mode for generating a prediction image, the prediction processing unit generates a prediction image according to the first method (step Sr_2a). In addition, when it is determined that the second method is the mode for generating a prediction image, the prediction processing unit generates a prediction image according to the second method (step Sr_2b). In addition, when it is determined that the third method is the mode for generating a prediction image, the prediction processing unit generates a prediction image according to the third method (step Sr_2c).

[0456] The first method, the second method, and the third method are different methods for generating a prediction image, and can be, for example, an inter-frame prediction method, an intra-frame prediction method, and other prediction methods. In such prediction methods, the above-mentioned reconstructed image can also be used.

[0457] [Intra-frame prediction unit]

[0458] The intra-frame prediction unit 216 performs intra-frame prediction with reference to the blocks within the current picture stored in the block memory 210 based on the intra-frame prediction mode read from the encoded bitstream, thereby generating a prediction signal (intra-frame prediction signal). Specifically, the intra-frame prediction unit 216 generates an intra-frame prediction signal by performing intra-frame prediction with reference to the samples (e.g., luminance values, chrominance differences) of the blocks adjacent to the current block, and outputs the intra-frame prediction signal to the prediction control unit 220.

[0459] In addition, when the intra-frame prediction mode of referring to the luminance block is selected in the intra-frame prediction of the chrominance block, the intra-frame prediction unit 216 can also predict the chrominance component of the current block based on the luminance component of the current block.

[0460] In addition, when the information read from the encoded bitstream indicates the adoption of PDPC, the intra-frame prediction unit 216 corrects the pixel value after intra-frame prediction based on the gradients of the reference pixels in the horizontal / vertical directions.

[0461] [Inter-frame prediction unit]

[0462] The inter-frame prediction unit 218 predicts the current block with reference to the reference pictures stored in the frame memory 214. The prediction is performed in units of the current block or sub-blocks (e.g., 4×4 blocks) within the current block. For example, the inter-frame prediction unit 218 performs motion compensation using the motion information (e.g., motion vector) read from the encoded bitstream (e.g., the prediction parameters output from the entropy decoding unit 202), thereby generating an inter-frame prediction signal for the current block or sub-block, and outputs the inter-frame prediction signal to the prediction control unit 220.

[0463] When the information read from the encoded bitstream indicates the use of the OBMC mode, the inter-frame prediction unit 218 generates an inter-frame prediction signal using not only the motion information of the current block obtained by motion estimation but also the motion information of adjacent blocks.

[0464] In addition, when the information read from the encoded bitstream indicates the use of the FRUC mode, the inter-frame prediction unit 218 performs motion estimation according to the pattern matching method (bidirectional matching or template matching) read from the encoded stream, thereby deriving motion information. And the inter-frame prediction unit 218 uses the derived motion information for motion compensation (prediction).

[0465] In addition, when the BIO mode is adopted, the inter-frame prediction unit 218 derives a motion vector based on a model assuming uniform linear motion. In addition, when the information read from the encoded bitstream indicates the use of the affine motion compensation prediction mode, the inter-frame prediction unit 218 derives a motion vector in sub-block units based on the motion vectors of multiple adjacent blocks.

[0466] [MV Derivation > Normal Inter-frame Mode]

[0467] When the information read from the encoded bitstream indicates the application of the normal inter-frame mode, the inter-frame prediction unit 218 derives an MV based on the information read from the encoded bitstream and uses the MV for motion compensation (prediction).

[0468] Figure 45 It is a flowchart showing an example of inter-frame prediction based on the normal inter-frame mode in the decoding device 200.

[0469] 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 the MVs of multiple decoded blocks temporally or spatially around the current block (step Ss_1). That is, the inter-frame prediction unit 218 creates a candidate MV list.

[0470] Next, the inter-frame prediction unit 218 extracts N (N is an integer of 2 or more) candidate MVs from the multiple candidate MVs obtained in step Ss_1 as prediction motion vector candidates (also referred to as prediction MV candidates) in a prescribed priority order (step Ss_2). In addition, this priority order may also be predetermined for each of the N prediction MV candidates.

[0471] Next, the inter-frame prediction unit 218 decodes the prediction motion vector selection information from the input stream (i.e., the encoded bitstream), and uses the decoded prediction motion vector selection information to select 1 prediction MV candidate from the N prediction MV candidates as the prediction motion vector (also referred to as the prediction MV) of the current block (step Ss_3).

[0472] Next, the inter-frame prediction unit 218 decodes the differential MV from the input stream, and derives the MV of the current block by adding the difference value, which is the decoded differential MV, to the selected predicted motion vector (step Ss_4).

[0473] 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).

[0474] [Prediction control unit]

[0475] The prediction control unit 220 selects one of the intra-frame prediction signal and the inter-frame prediction signal, uses the selected signal as the prediction signal, and outputs it to the adder 208. Generally, the structures, functions, and processes of the prediction control unit 220, the intra-frame prediction unit 216, and the inter-frame prediction unit 218 on the decoding device side can correspond to the structures, functions, and processes of the prediction control unit 128, the intra-frame prediction unit 124, and the inter-frame prediction unit 126 on the encoding device side.

[0476] [Installation example of decoding device]

[0477] Figure 46 is a block diagram showing an installation example of the decoding device 200. The decoding device 200 includes a processor b1 and a memory b2. For example, Figure 41 the multiple components of the decoding device 200 shown are installed by Figure 46 the processor b1 and the memory b2 shown.

[0478] The processor b1 is a circuit that performs information processing and is a circuit that can access the memory b2. For example, the processor b1 is a dedicated or general-purpose electronic circuit that decodes the encoded moving image (i.e., the encoded bitstream). The processor b1 can also be a processor such as a CPU. In addition, the processor b1 can also be an aggregate of multiple electronic circuits. In addition, for example, the processor b1 can also play the role of Figure 41 multiple components among the multiple components of the decoding device 200 shown.

[0479] The memory b2 is a dedicated or general-purpose memory that stores information for the processor b1 to decode the encoded bitstream. The memory b2 can be an electronic circuit or can be connected to the processor b1. In addition, the memory b2 can also be included in the processor b1. In addition, the memory b2 can also be an aggregate of multiple electronic circuits. In addition, the memory b2 can be a magnetic disk or an optical disk, etc., and can also be represented as a storage or a recording medium, etc. In addition, the memory b2 can be either a non-volatile memory or a volatile memory.

[0480] For example, the memory b2 can store moving images or encoded bitstreams. Additionally, a program for the processor b1 to decode the encoded bitstream can also be stored in the memory b2.

[0481] Additionally, for example, the memory b2 can serve as Figure 41 the element for storing information among the multiple elements of the decoding device 200 shown, etc. Specifically, the memory b2 can serve as Figure 41 the block memory 210 and the frame memory 214 shown. More specifically, the memory b2 can store the reconstructed blocks, reconstructed pictures, etc.

[0482] Additionally, in the decoding device 200, all of the multiple elements shown, etc. may not be installed, or all of the above-mentioned multiple processes may not be performed. Figure 41 Figure 41 A part of the multiple elements shown, etc. may be included in other devices, or a part of the above-mentioned multiple processes may be performed by other devices.

[0483] [Definitions of Terms]

[0484] As an example, each term may be defined as follows.

[0485] A picture is an arrangement of multiple luminance samples in a monochrome format, or an arrangement of multiple luminance samples and two corresponding arrangements of multiple chrominance samples in a color format of 4:2:0, 4:2:2, and 4:4:4. A picture can be a frame or a field.

[0486] A frame is a combination of a top field that generates multiple sample lines 0, 2, 4,... and a bottom field that generates multiple sample lines 1, 3, 5,....

[0487] A slice is an integer number of coding tree units including one independent slice segment and all subsequent dependent slice segments (if any) before the next independent slice segment (if any) within the same access unit.

[0488] A tile is a rectangular area of multiple coding tree blocks within a specific tile column and a specific tile row in a picture. A tile may still apply a loop filter that spans the tile's edge, or it may be a rectangular area of a frame intended to be decoded and encoded independently.

[0489] A block is an MxN (N rows and M columns) arrangement of multiple samples, or an MxN arrangement of multiple transform coefficients. A block may also be a square or rectangular area of multiple pixels composed of multiple matrices of one luminance and two chrominances.

[0490] ​A CTU (Coding Tree Unit) can be a coding tree block of multiple luma samples of a picture with 3 sample arrangements, or two corresponding coding tree blocks of multiple chroma samples. Alternatively, a CTU can also be a coding tree block of any multiple samples in a monochrome picture and a picture encoded using syntax constructs used in the encoding of 3 separate color planes and multiple samples.

[0491] A superblock constitutes one or two mode information blocks, or can also be a 64×64 pixel square block that is recursively divided into 4 32×32 blocks and can thus be divided.

[0492] [Explanation of DMVR Processing]

[0493] As a method of MV derivation, there is DMVR (Dynamic Motion Vector Refreshing) processing.

[0494] For example, in the DMVR processing illustrated using FIGS. 30 and 31, the inter-frame prediction unit 126 first derives the MV of the current block in the merge mode without encoding the differential MV in the inter-picture prediction mode. Additionally, in the inter-picture prediction mode, instead of using the merge mode, a mode that encodes the differential MV can be used. Further, for example, the MV selected from the list generated in the merge mode or the mode that encodes the differential MV can be corrected, such as through the BIO (bi-directional optical flow) mode, etc., to derive the MV of the current block. Here, the inter-picture prediction mode refers to a prediction derived by a method that depends on data elements (e.g., sampled values or motion vectors) of one or more reference pictures. Then, the inter-frame prediction unit 126 searches the peripheral area of the derived MV (also referred to as the initial MV) and derives the MV with the minimum cost as the final MV. Thus, in the DMVR processing, in the inter-picture prediction mode, the MV of the current block is derived as the initial MV, the motion search is performed on the peripheral area of the derived initial MV, and the initial MV is corrected.

[0495] Hereinafter, the operation of the decoding device 200 will be described as a representative, but the operation of the encoding device 100 is the same.

[0496] Figure 47 It is a diagram showing an example of the motion search processing on the decoding device 200 side in the DMVR processing.

[0497] In Figure 47 In the example shown, based on the initial MV of the current block derived in the merge mode, the reference blocks in the first reference picture (L0) and the second reference picture (L1) located in the L0 direction and the LI direction are determined from the current picture, and the periphery of the determined reference blocks is searched.

[0498] In addition, the initial MV of the current block is derived on the side of the decoding device 200 based on the information read from the bitstream. In addition, Figure 47 InitMV_L0 and InitMV_L1 in Figure 47 represent the initial MVs for the reference block (L0) in the first reference picture (L0) and the reference block (L1) in the second reference picture (L1). More specifically, Figure 47 InitMV_L0 shown in

[0499] represents the initial MV starting from the position of the upper left pixel of the current block and ending at the position of the upper left pixel of the reference block (L0) in the first reference picture (L0) corresponding to the position of the upper left pixel of the current block. Similarly, Figure 47 InitMV_L1 shown in

[0500] represents the initial MV starting from the position of the upper left pixel of the current block and ending at the position of the upper left pixel of the reference block (L1) in the second reference picture (L1) corresponding to the position of the upper left pixel of the current block.

[0501] Figures 48A - 48C is a diagram showing an example of the search algorithm in the motion search process on the side of the decoding device 200 in the DMVR process. In the case of dividing the motion search process into three stages (Steps 1 to 3) of processing, Figure 48A represents the search algorithm for performing the processing of Step 1, Figure 48B represents the search algorithm for performing the processing of Step 2, Figure 48C represents the search algorithm for performing the processing of Step 3.

[0502] In Figure 48A In, the initial position (pixel position) within the reference block (L0) represented by the derived initial MV is indicated by a black circle. As the peripheral area of the reference block (L0), the eight surrounding positions (pixel positions) adjacent to the initial position are indicated by eight slanted circles.

[0503] That is, in Figure 48A In the process of step 1 shown, the inter-frame prediction unit 218 calculates the costs at the eight surrounding pixel positions adjacent to the initial pixel position within the reference block represented by the initial MV. In Figure 48A In the example shown, the inter-frame prediction unit 218 calculates the sum of the differences (SAD) of the pixel values within the block at the eight pixel positions as the cost. The inter-frame prediction unit 218 moves the center of the search position in the direction of the pixel position with the minimum cost among these eight pixel positions.

[0504] In addition, when the pixel position with the minimum cost is the initial pixel position, skip Figure 48B the process of step 2 shown and enter Figure 48C the process of step 3 shown.

[0505] In Figure 48B In, the center (pixel position) of the moved search position is indicated by a black circle, and the eight surrounding positions (pixel positions) adjacent to the center of the search position are indicated by eight slanted circles.

[0506] That is, in Figure 48B In the process of step 2 shown, the inter-frame prediction unit 218 uses the position (pixel position) after the movement in the result of the process of step 1 as the center of the search position, and calculates the costs at the eight surrounding pixel positions adjacent thereto. The inter-frame prediction unit 218 further moves the center of the search position in the direction of the pixel position with the minimum cost among the eight pixel positions, and performs the process of step 2 again, thereby searching for the center (pixel position) of the search position with the minimum cost. On the other hand, when the pixel position with the minimum cost is the center of the search position, the inter-frame prediction unit 218 determines the difference between the position indicated by the initial MV and the center of the search position with the minimum cost as the difference vector, and enters the process of step 3.

[0507] In Figure 48C In, the pixel position of the center of the search position with the minimum cost is indicated by a black circle, and the pixel positions with the minimum cost at the fractional precision pixel positions located above, below, left, and right of the center are indicated by slanted circles.

[0508] That is, in Figure 48CIn the processing of step 3 shown, the inter-frame prediction unit 218 calculates the costs at four fractional-pixel positions that are above, below, to the left, and to the right of the center (pixel position with integer precision) of the search position determined by the processing of step 3. Then, the inter-frame prediction unit 218 determines the fractional-pixel position with the minimum cost among the four fractional-pixel positions as the pixel position of the final search result. In addition, the costs of the four fractional-pixel positions can be calculated as follows: The four vectors indicating the positions above, below, to the left, and to the right ((0, 1), (0, -1), (-1, 0), (1, 0)) are weighted and added with 1 / 16-pixel precision, using the cost value of the center calculated by the processing of step 2 as the weight. Then, the fractional-pixel position with the minimum cost is determined by evaluating the weighted result.

[0509] In addition, Figure 47 and Figures 48A - 48C is an example of the details of the DMVR processing. Of course, different processing can also be performed.

[0510] [DMVR Processing in Sub-Block Units of the First Form]

[0511] Figure 49 is an explanatory diagram of the DMVR processing in sub-block units of the first form. In Figure 49 , the reference sub-block obtained as a result of the motion search for each sub-block is shown by a dashed box, and the final MV (hereinafter referred to as the corrected MV) obtained by correcting the initial MV with the obtained reference block is shown.

[0512] Here, in the DMVR processing in sub-block units, in the inter-picture prediction mode, the MV (initial MV) of the current block is derived, the peripheral area of the initial MV is searched in sub-block units that divide the current block, and the initial MV in sub-block units is corrected. In addition, the DMVR processing in sub-block units is applied to the case where the size of the sub-block in sub-block units is 16×16 pixels or more.

[0513] In addition, the DMVR processing in sub-block units can also be applied to the case where the horizontal or vertical size of the CU is N pixels (for example, N = 16) or more. The initial MV in sub-block units can directly use the initial MV of the derived CU or the current block, or can be further derived based on the initial MV of the derived CU or the current block.

[0514] In addition, the method of searching the peripheral area of the initial MV in sub-block units is the same as the method of searching the peripheral area of the initial MV in block units. For example, the processing described using Figure 47 and Figures 48A - 48C can be performed, or other processing can be performed.

[0515] In this way, motion prediction in the DMVR processing performed in units of sub-blocks in the first form is carried out for each sub-block, and motion compensation is performed for each sub-block to generate a predicted image.

[0516] [First Example of Prediction Processing in the First Form]

[0517] Figure 50 It is a diagram showing the processing flow of the deblocking filter processing of the encoding device 100 and the decoding device 200 in the first form.

[0518] In this form, in the inter-picture prediction mode, by applying DMVR processing in units of sub-blocks (sub-CU units) to the CU to be processed, the initial MV of the CU to be processed that is derived is corrected in units of sub-blocks. The following description of the processing is only different in whether the signals required for this processing are encoded into a stream or decoded from a stream, and is basically common to the encoding device 100 and the decoding device 200.

[0519] As Figure 50 shown, the encoding device 100 or the decoding device 200 first determines whether a mode in which the initial MV is corrected by performing motion search on the peripheral area of the initial MV in units of sub-blocks in the inter-picture prediction mode is applied to the CU to be processed (S10). Here, as described above, the processing in the mode of correcting the initial MV by performing motion search on the peripheral area of the initial MV in units of sub-blocks in the inter-picture prediction mode is, for example, DMVR processing. In addition, hereinafter, the corrected initial MV will be referred to as the corrected MV.

[0520] In the case where it is determined in step S10 that this mode is applied (yes in S10), the encoding device 100 or the decoding device 200 determines whether the corrected MVs in the two sub-blocks separated by the boundary between adjacent sub-blocks satisfy a specified condition (S11). Here, for example, the encoding device 100 or the decoding device 200 can derive the initial MV in units of sub-blocks in each of the adjacent sub-blocks, and use the corrected MV obtained by correcting the initial MV by performing DMVR processing in units of sub-blocks to make the determination in step S11.

[0521] In step S11, in the case where it is determined that the corrected MVs in the two sub-blocks separated by the boundary satisfy the specified condition (yes in S10), the encoding device 100 or the decoding device 200 applies a deblocking filter with a specified strength to this boundary (also referred to as a sub-block boundary) (S12).

[0522] In this way, Figure 50The processing flow shown in shows an operation of determining whether to apply a deblocking filter in an inter-picture prediction mode, for example, based on a mode (DMVR processing) of correcting an initial MV by applying motion prediction in units of sub-blocks on the decoding device 200 side, depending on whether or not it is applied.

[0523] In addition, in Figure 50 the processing flow shown in , when it is determined that the corrected MVs in two sub-blocks across the boundary satisfy a specified condition and it is decided to apply a deblocking filter, an operation of determining the strength of the deblocking filter to be applied may also be included. For example, it may be that when determining whether to apply deblocking filter processing in step S11, it is determined whether a difference value of MVs of adjacent sub-blocks is equal to or greater than a threshold value, and the strength of the deblocking filter processing to be applied to the boundary determined to have a difference value equal to or greater than the threshold value in this boundary is determined. Then, when applying deblocking filter processing to this boundary, deblocking filter processing may be performed on the boundary determined to have a difference value equal to or greater than the threshold value in this boundary with the determined strength.

[0524] In addition, in the case of performing an inter-picture prediction mode in units of another sub-block such as a CU boundary or affine prediction, the encoding device 100 or the decoding device 200 may determine whether to apply deblocking filter processing based on a process (operation) different from Figure 50 the processing flow shown in .

[0525] In addition, the encoding device 100 or the decoding device 200 may switch whether to apply deblocking filter processing to a sub-block boundary according to the size of the sub-block, etc. For example, if the size of the sub-block is 16×16 pixels or more, the encoding device 100 or the decoding device 200 may apply deblocking filter processing to all sub-block boundaries based on Figure 50 the processing flow shown in . On the other hand, if the size of the sub-block is less than 16×16 pixels, the encoding device 100 or the decoding device 200 may apply block filter processing only to the boundaries (i.e., block boundaries) on the 16×16 pixel grid within the picture.

[0526] In addition, the initial MV of the processing target CU may also be the initial MV of the current block. That is, in step S10, the encoding device 100 or the decoding device 200 may determine whether a mode (DMVR processing) of correcting the initial MV by performing a motion search on a peripheral area of the initial MV in units of sub-blocks in the inter-picture prediction mode is applied to the current block.

[0527] Here, the encoding device 100 or the decoding device 200 can also switch whether to apply deblocking filtering processing to the sub-block boundary according to the size of the current block. The encoding device 100 or the decoding device 200 can skip the determination of whether to apply deblocking filtering processing (the determination in step S11) according to the size of the current block, and decide not to perform filtering processing. For example, when performing DMVR processing, if the size of the current block in the horizontal or vertical direction exceeds N pixels, the encoding device 100 or the decoding device 200 can divide the current block into sub-blocks so that the size in the direction exceeding N pixels is N pixels or less, and perform DMVR processing. On the other hand, when performing DMVR processing, if the size of the current block in the horizontal or vertical direction is N pixels or less, the encoding device 100 or the decoding device 200 can perform DMVR processing without dividing the current block into sub-blocks. Moreover, in this case, the encoding device 100 or the decoding device 200 can skip the determination in step S11.

[0528] In addition, Figure 50 The processing flow shown is an example, and part of the processing described Figure 50 can also be removed, or Figure 50 processing or conditional determination not described in

[0529] [Example of application conditions for deblocking filtering processing]

[0530] Figure 51 is a diagram showing an example of the application conditions for deblocking filtering processing for the sub-block boundary in the first form. In addition, Figure 51 also shows Figure 10 an example of the application conditions for deblocking filtering processing for the CU (block) boundary shown in Figure 10 For the part shown in

[0531] The Bs value represents the value of the boundary strength, that is, the strength of the deblocking filter. Figure 51 The Bs value shown in

[0532] can take three values: 2, 1, and 0. When the Bs value is 2, the smoothing effect obtained by applying deblocking filtering processing is high. When the Bs value is 1, the smoothing effect obtained by applying deblocking filtering processing is low. On the other hand, when the Bs value is 0, it means that deblocking filtering processing is not applied. Figure 51In the example shown, it is 1 pixel, but it is not limited thereto. In addition, the strength of the deblocking filter processing in this case may be the same as the strength of the deblocking filter processing applied to the block boundary of the current CU (or current block). Additionally, in Figure 51 In the example shown, the Bs value in this case is the same as the Bs value when the absolute value of the difference between the motion vectors of two blocks across the block boundary is 1 pixel or more, and is 1.

[0533] On the other hand, for the sub-block boundary, when it is other than the above, that is, when the absolute value of the difference between the MVs (motion vectors) of two sub-blocks (sub-block 1 and 2) across the boundary is less than the threshold value, it is sufficient not to apply the deblocking filter processing.

[0534] [Second Example of Prediction Processing in the First Form]

[0535] Figure 52 is a diagram showing the processing flow of the deblocking filter processing of the encoding device 100 and the decoding device 200 in the first form. Figure 52 The processing flow shown corresponds to the processing flow of Figure 50 detailed. Hereinafter, the case of performing DMVR processing on the initial MV of the derived current block will be described. Figure 53 is a diagram showing Figure 52 an example of the corrected MVs for adjacent sub-blocks and reference blocks in the processing flow of

[0536] As shown in Figure 52 , first, the encoding device 100 or the decoding device 200 determines whether a mode in which the initial MV is corrected by performing motion search on the peripheral area of the initial MV in units of sub-blocks in the inter-picture prediction mode is applied to the current block (S20). That is, the encoding device 100 or the decoding device 200 determines in step S20 whether DMVR processing in units of sub-blocks is applied to the current block.

[0537] When it is determined in step S20 that this mode is applied (Yes in S20), the encoding device 100 or the decoding device 200 selects two sub-blocks obtained by dividing the current block (S21). Here, it is assumed that the encoding device 100 or the decoding device 200 selects, for example, Figure 53 sub1 and sub2 shown in

[0538] as the two sub-blocks. Among them, sub1 represents sub-block 1 and sub1 represents sub-block 2. Figure 53 Next, the encoding device 100 or the decoding device 200 determines whether the two sub-blocks selected in step S21 are adjacent sub-blocks to each other (S22). Here, since the encoding device 100 or the decoding device 200 selects

[0539] In step S22, when it is determined that the two selected sub-blocks are adjacent to each other (Yes in S22), the encoding device 100 or the decoding device 200 obtains the corrected MV in the adjacent sub-blocks (S23). Here, the encoding device 100 or the decoding device 200 obtains, for example, MVsub1_L0, MVsub2_L0, MVsub1_L1, and MVsub2_L1 as the corrected MVs in the adjacent sub-blocks. MVsub1_L0 represents the corrected MV of the reference sub-block in the first reference picture (L0) in the L0 direction for sub-block 1, and MVsub1_L1 represents the corrected MV of the reference sub-block in the second reference picture (L1) in the L1 direction for sub-block 1. MVsub2_L0 represents the corrected MV of the reference sub-block in the first reference picture (L0) in the L0 direction for sub-block 2, and MVsub2_L1 represents the corrected MV of the reference sub-block in the second reference picture (L1) in the L1 direction for sub-block 1. Further, in step S22, when it is determined that the two selected sub-blocks are not adjacent to each other (No in S22), the process returns to step S21.

[0540] Next, the encoding device 100 or the decoding device 200 determines whether the corrected MVs in the two sub-blocks across the boundary of the two adjacent sub-blocks satisfy a specified condition (S24). More specifically, the encoding device 100 or the decoding device 200 determines whether the difference between the corrected MVs in sub-block 1 and sub-block 2 in the L0 direction or in the L1 direction is equal to or greater than a threshold value. In Figure 52 and Figure 53 the example shown, the encoding device 100 or the decoding device 200 determines whether either the difference between MVsub1_L0 and MVsub2_L0 or the difference between MVsub1_L1 and MVsub2_L1 is equal to or greater than the threshold value. Further, in Figure 52 the example shown, the threshold value is one pixel, but it is not limited thereto. The threshold value can be appropriately determined as long as it represents a value where the difference in luminance or precision between adjacent sub-blocks is not zero but not a close relationship.

[0541] When it is determined in step S24 that one of the above differences is equal to or greater than the threshold value (Yes in S24), the encoding device 100 or the decoding device 200 applies deblocking filtering processing with a specified strength to the sub-block boundary (S25). Here, when it is determined in step S24 that the difference value between the horizontal component or the vertical component of the corrected MVs in the adjacent sub-blocks is one pixel or more, as Figure 51 shown, the encoding device 100 or the decoding device 200 can apply deblocking filtering processing by setting the Bs value to 1.

[0542] Next, the encoding device 100 or the decoding device 200 confirms whether all the sub-blocks constituting the current block have been selected and determined (S26).

[0543] In step S26, when all the sub-blocks constituting the current block have been selected and determined (Yes in S26), the process ends. Otherwise (No in S26), the process returns to step S21.

[0544] On the other hand, in step S24, when it is determined that none of the above differences is greater than or equal to the threshold value (No in S24), the process proceeds to step S26.

[0545] In addition, as the determination process in step S24, it is also possible to determine whether the difference value of the horizontal component of the corrected MV in sub-block 1 and sub-block 2 in the L0 direction or the L1 direction is greater than or equal to the threshold value. In addition, it is also possible to determine whether the difference value of the vertical component of the corrected MV in sub-block 1 and sub-block 2 in the L0 direction or the L1 direction is greater than or equal to the threshold value. That is, the encoding device 100 or the decoding device 200 can determine whether the difference value between the horizontal component (or vertical component) of MVsub1_L0 and the horizontal component (or vertical component) of MVsub2_L0 is greater than or equal to the threshold value. In addition, the encoding device 100 or the decoding device 200 can determine whether the difference value between the horizontal component (or vertical component) of MVsub1_L1 and the horizontal component (or vertical component) of MVsub2_L1 is greater than or equal to the threshold value.

[0546] Furthermore, as the determination process in step S24, it is also possible to determine whether the difference value of the horizontal component (or vertical component) of the corrected MV of sub-block 1 in the L0 direction and the L1 direction is greater than or equal to the threshold value. That is, the encoding device 100 or the decoding device 200 can determine whether the difference value between the horizontal component (or vertical component) of MVsub1_L0 and the horizontal component (or vertical component) of MVsub1_L1 is greater than or equal to the threshold value.

[0547] In addition, as the determination process in step S24, it is also possible to determine whether the difference value of the horizontal component (or vertical component) of the corrected MV of sub-block 2 in the L0 direction and the L1 direction is greater than or equal to the threshold value. That is, the encoding device 100 or the decoding device 200 can determine whether the difference value between the horizontal component (or vertical component) of MVsub2_L0 and the horizontal component (or vertical component) of MVsub2_L1 is greater than or equal to the threshold value.

[0548] [Effect of the First Embodiment]

[0549] When performing DMVR processing in units of sub-blocks, motion prediction or motion compensation is performed in units of sub-blocks, and motion vectors that vary for each sub-block are obtained. Therefore, due to the magnitude of the difference between them, distortion in which pixel values are discontinuous may occur at sub-block boundaries.

[0550] In contrast, according to the encoding device 100 and the decoding device 200 in this embodiment, even if distortion in which pixel values are discontinuous may occur at sub-block boundaries, by applying deblocking filter processing, it may be possible to reduce such distortion and improve the image quality.

[0551] [Installation example of encoding device]

[0552] Figure 54 It is a block diagram showing an installation example of the encoding device 100 according to the embodiment. The encoding device 100 includes a circuit 160 and a memory 162. For example, Figure 1 Multiple components of the encoding device 100 shown are installed by Figure 54 the circuit 160 and the memory 162 shown.

[0553] The circuit 160 is a circuit that performs information processing and is a circuit that can access the memory 162. For example, the circuit 160 is a dedicated or general-purpose electronic circuit that encodes moving images. The circuit 160 may also be a processor such as a CPU. In addition, the circuit 160 may also be an aggregate of multiple electronic circuits. In addition, for example, the circuit 160 may also function as Figure 1 multiple components of the encoding device 100 shown other than the components for storing information.

[0554] The memory 162 is a dedicated or general-purpose memory that stores information for encoding moving images by the circuit 160. The memory 162 may be an electronic circuit or may be connected to the circuit 160. In addition, the memory 162 may also be included in the circuit 160. In addition, the memory 162 may also be an aggregate of multiple electronic circuits. In addition, the memory 162 may be a magnetic disk or an optical disk, etc., and may also be represented as a memory (storage) or a recording medium, etc. In addition, the memory 162 may be a non-volatile memory or a volatile memory.

[0555] For example, the memory 162 may store the encoded moving image or may store the bit string corresponding to the encoded moving image. In addition, a program for encoding moving images by the circuit 160 may also be stored in the memory 162.

[0556] In addition, for example, the memory 162 may also function as Figure 1The functions of the components for storing information among the multiple components of the encoding device 100 shown, etc. Specifically, the memory 162 can function as Figure 1 the block memory 118 and the frame memory 122 shown. More specifically, the memory 162 can store the reconstructed blocks, the reconstructed pictures, etc.

[0557] In addition, in the encoding device 100, all of the multiple components shown, etc. may not be installed, and all of the above-mentioned multiple processes may not be performed. Figure 1 A part of the multiple components shown, etc. may be included in other devices, or a part of the above-mentioned multiple processes may be performed by other devices. And, in the encoding device 100, a part of the multiple components shown, etc. is installed, and by performing a part of the above-mentioned multiple processes, the prediction process in the inter-frame prediction mode is efficiently performed. Figure 1 A part of the multiple components shown, etc. may be included in other devices, or a part of the above-mentioned multiple processes may be performed by other devices. And, in the encoding device 100, a part of the multiple components shown, etc. is installed, and by performing a part of the above-mentioned multiple processes, the prediction process in the inter-frame prediction mode is efficiently performed. Figure 1 A part of the multiple components shown, etc. may be included in other devices, or a part of the above-mentioned multiple processes may be performed by other devices. And, in the encoding device 100, a part of the multiple components shown, etc. is installed, and by performing a part of the above-mentioned multiple processes, the prediction process in the inter-frame prediction mode is efficiently performed.

[0558] The following shows Figure 54 an operation example of the encoding device 100 shown in. Figure 55 is a flowchart showing Figure 54 an operation example of the encoding device 100 shown. For example, Figure 54 when encoding a moving image, the encoding device 100 shown performs Figure 55 the operations shown.

[0559] Specifically, the circuit 160 of the encoding device 100 performs the following processes during operation. That is, first, the circuit 160 refers to at least one reference picture different from the picture to which the current block belongs, derives the motion vector of the current block, and executes a mode of searching the peripheral area of the motion vector in units of sub-blocks obtained by dividing the current block and correcting the motion vector (S311). Next, the circuit 160 determines whether to apply the deblocking filter process to each of the boundaries of the adjacent sub-blocks (S312). Next, the circuit 160 applies the deblocking filter process to the boundary based on the determination result (S313).

[0560] Therefore, even if distortion such as pixel value discontinuity may occur at the boundary of the sub-blocks, the encoding device 100 may be able to reduce the distortion through the deblocking filter process and may be able to improve the image quality.

[0561] [Installation example of the decoding device]

[0562] Figure 56 is a block diagram showing an installation example of the decoding device 200 according to the embodiment. The decoding device 200 includes a circuit 260 and a memory 262. For example, Figure 41 the multiple components of the decoding device 200 shown pass through Figure 56It is installed by the circuit 260 and the memory 262 shown.

[0563] The circuit 260 is a circuit that processes information and is a circuit that can access the memory 262. For example, the circuit 260 is a dedicated or general-purpose electronic circuit that decodes moving images. The circuit 260 can also be a processor such as a CPU. In addition, the circuit 260 can also be an aggregate of multiple electronic circuits. In addition, for example, the circuit 260 can also play the role of Figure 41 multiple components of the decoding device 200 shown, etc., except for the components used to store information.

[0564] The memory 262 is a dedicated or general-purpose memory that stores information for the circuit 260 to decode moving images. The memory 262 can be an electronic circuit or can be connected to the circuit 260. In addition, the memory 262 can also be included in the circuit 260. In addition, the memory 262 can also be an aggregate of multiple electronic circuits. In addition, the memory 262 can be a magnetic disk or an optical disk, etc., and can also be represented as a memory or a recording medium, etc. In addition, the memory 262 can be a non-volatile memory or a volatile memory.

[0565] For example, the memory 262 can store a bit string corresponding to the encoded moving image, or can store a moving image corresponding to the decoded bit string. In addition, a program for the circuit 260 to decode moving images can also be stored in the memory 262.

[0566] In addition, for example, the memory 262 can play the role of Figure 41 the components for storing information among the multiple components of the decoding device 200 shown, etc. Specifically, the memory 262 can play the role of Figure 10 the block memory 210 and the frame memory 214 shown. More specifically, the memory 262 can store the reconstructed blocks and the reconstructed pictures, etc.

[0567] In addition, in the decoding device 200, all of the multiple components shown, etc. may not be installed, Figure 41 nor may all of the above-mentioned multiple processes be performed. Figure 41 A part of the multiple components shown, etc. can be included in other devices, or a part of the above-mentioned multiple processes can be performed by other devices. Then, in the decoding device 200, a part of the multiple components shown, etc. is installed, and by performing a part of the above-mentioned multiple processes, motion compensation is efficiently performed. Figure 41

[0568] Figure 56 The following shows Figure 56 an operation example of the decoding device 200 shown. [[ID=277It represents ​ a flowchart showing an operation example of the decoding device 200 shown. For example, ​ when decoding a moving image, the decoding device 200 shown performs ​ the operations shown.

[0569] Specifically, the circuit 260 of the decoding device 200 performs the following processing during operation. That is, first, the circuit 260 refers to at least one reference picture different from the picture to which the current block belongs, derives the motion vector of the current block, and executes a mode of searching the peripheral area of the motion vector in units of sub-blocks obtained by dividing the current block and correcting the motion vector (S411). Next, the circuit 260 determines whether to apply deblocking filtering processing to each of the boundaries of adjacent sub-blocks (S412). Next, the circuit 260 applies the deblocking filtering processing to the boundary based on the determination result (S413).

[0570] Therefore, even if distortion such as pixel value discontinuity may occur at the boundary of sub-blocks, the decoding device 200 may be able to reduce the distortion through deblocking filtering processing and may be able to improve the image quality.

[0571] [Supplement]

[0572] In addition, the encoding device 100 and the decoding device 200 in the present embodiment can be used as an image encoding device and an image decoding device, respectively, or can be used as a moving image encoding device and a moving image decoding device.

[0573] Further, in the present embodiment, each component is constituted by dedicated hardware, but it 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.

[0574] Specifically, each of the encoding device 100 and the decoding device 200 may include a processing circuit and a storage device that is electrically connected to the processing circuit and accessible from the processing circuit. For example, the processing circuit corresponds to the circuit 160 or 260, and the storage device corresponds to the memory 162 or 262.

[0575] The processing circuit includes at least one of dedicated hardware and a program execution unit, and uses the storage device to perform processing. In addition, when the processing circuit includes a program execution unit, the storage device stores a software program executed by the program execution unit.

[0576] Here, the software for implementing the encoding device 100 or the decoding device 200 of the present embodiment is as follows.

[0577] That is, the program causes a computer to execute an encoding method, which is an encoding method for encoding a moving image. With reference to at least one reference picture different from the picture to which the current block belongs, a motion vector of the current block is derived, a mode of searching for a peripheral area of the motion vector in units of sub-blocks obtained by dividing the current block and correcting the motion vector is executed, for each of the boundaries of adjacent sub-blocks, it is determined whether to apply a deblocking filter process, and based on the determination result, the deblocking filter process is applied to the boundary.

[0578] Alternatively, the program causes a computer to execute a decoding method, which is a decoding method for decoding a moving image. With reference to at least one reference picture different from the picture to which the current block belongs, a motion vector of the current block is derived, a mode of searching for a peripheral area of the motion vector in units of sub-blocks obtained by dividing the current block and correcting the motion vector is executed, for each of the boundaries of adjacent sub-blocks, it is determined whether to apply a deblocking filter process, and based on the determination result, the deblocking filter process is applied to the boundary.

[0579] In addition, as described above, each component may also be a circuit. These circuits may either form one circuit as a whole or be separate different circuits. In addition, each component may be implemented by a general-purpose processor or a dedicated processor.

[0580] In addition, the processing performed by a specific component may be executed by other components. In addition, the order of executing the processing may be changed, or multiple processes may be executed simultaneously. In addition, it may be that the encoding / decoding device includes an encoding device 100 and a decoding device 200.

[0581] The ordinal numbers such as the first and the second used in the description may also be appropriately changed. In addition, for components and the like, ordinal numbers may be newly assigned or the ordinal numbers may be removed.

[0582] As described above, the forms of the encoding device 100 and the decoding device 200 have been described based on the embodiments, but the forms of the encoding device 100 and the decoding device 200 are not limited to this embodiment. As long as it does not deviate from the gist of the present invention, forms obtained by various deformations that those skilled in the art can think of for this embodiment and forms constructed by combining components in different embodiments may also be included in the scope of the forms of the encoding device 100 and the decoding device 200.

[0583] One or more forms disclosed herein may also be implemented in combination with at least a part of other forms in the present invention. In addition, a part of the processing recorded in the flowchart of one or more forms disclosed herein, a part of the structure of the device, a part of the syntax, etc. may be combined with other forms for implementation.

[0584] In the above-described embodiments, each functional block or operative block can generally be implemented by an MPU (microprocessing unit), a memory, and the like. In addition, it can also be that the processing of each functional block is implemented by a program execution unit such as a processor that reads and executes software (program) recorded in a recording medium such as a ROM. This software can be distributed. This software can also be recorded in various recording media such as a semiconductor memory. In addition, each functional block can also be implemented by hardware (a dedicated circuit). Various combinations of hardware and software can be adopted.

[0585] The processing described in each embodiment can be implemented either by centralized processing using a single device (system) or by distributed processing using multiple devices. In addition, the processor that executes the above program can be either single or multiple. That is, either centralized processing or distributed processing can be performed.

[0586] The form of the present invention is not limited to the above embodiments, and various modifications can be made, and they are also included in the scope of the form of the present invention.

[0587] Furthermore, application examples of the moving image encoding method (image encoding method) or the moving image decoding method (image decoding method) described in the above embodiments and various systems for implementing such application examples are described here. It can also be that such a system is 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 / decoding device having both. Regarding other structures of such a system, they can be appropriately modified according to circumstances.

[0588] [Usage Example]

[0589] ​ FIG. is a diagram showing the overall structure of a suitable content supply system ex100 for implementing a content distribution service. The provision of the communication service is divided into desired sizes, and in each unit, base stations ex106, ex107, ex108, ex109, ex110 that are fixed wireless stations in the illustrated example are provided respectively.

[0590] In the content supply system ex100, devices such as a computer ex111, a game console ex112, a camera ex113, home appliances ex114, and a smart phone ex115 are connected via the Internet ex101 through an Internet service provider ex102 or a communication network ex104, and base stations ex106 to ex110. The content supply system ex100 can also connect by combining some of the above devices. In various implementations, the devices can be directly or indirectly connected to each other via a telephone network or short-range wireless without going through the base stations ex106 to ex110. Moreover, the streaming media server ex103 can also be connected to devices such as the computer ex111, the game console ex112, the camera ex113, the home appliances ex114, and the smart phone ex115 via the Internet ex101 and the like. In addition, the streaming media server ex103 can also be connected to terminals in a hotspot within an aircraft ex117 via a satellite ex116.

[0591] In addition, a wireless access point or a hotspot can be used instead of the base stations ex106 to ex110. Moreover, the streaming media server ex103 can be directly connected to the communication network ex104 without going through the Internet ex101 or the Internet service provider ex102, or can be directly connected to the aircraft ex117 without going through the satellite ex116.

[0592] The camera ex113 is a device such as a digital camera that can perform still image photography and moving image photography. In addition, the smart phone ex115 is a smart phone, a mobile phone, or a PHS (Personal Handy-phone System) corresponding to the modes of mobile communication systems known as 2G, 3G, 3.9G, 4G, and those to be known as 5G in the future.

[0593] The home appliances ex114 are a refrigerator or devices included in a household fuel cell cogeneration system.

[0594] In the content supply system ex100, a terminal with a photography function is connected to the streaming media server ex103 via the base station ex106 and the like, thereby enabling live distribution and the like. In live distribution, terminals (such as the computer ex111, the game console ex112, the camera ex113, the home appliances ex114, the smart phone ex115, and the terminals in the aircraft ex117) can perform the encoding process described in the above embodiments on still image or moving image content captured by the user using the terminal, can also multiplex the video data obtained by encoding and the audio data obtained by encoding the sound corresponding to the video, and can send the obtained data to the streaming media server ex103. That is, each terminal functions as an image encoding device according to one aspect of the present invention.

[0595] On the other hand, the streaming server ex103 will stream-distribute the content data sent by the requesting client. The client is a computer ex111, a game console ex112, a camera ex113, a home appliance ex114, a smart phone ex115, or a terminal in an aircraft ex117, etc., that can decode the data after the above encoding process. Each device that receives the distributed data can also perform a decoding process on the received data and reproduce it. That is, each device can also function as an image decoding device according to one aspect of the present invention.

[0596] [Decentralized processing]

[0597] In addition, the streaming server ex103 can also be multiple servers or multiple computers, which perform decentralized processing or recording and distribution of data. For example, the streaming server ex103 can be implemented by a CDN (Content Delivery Network), and content distribution is achieved through a network that connects many edge servers dispersed around the world to each other. In a CDN, it is possible to dynamically allocate a physically closer edge server according to the client. Also, by caching and distributing the content to this edge server, latency can be reduced. In addition, in the case of several types of errors occurring or when the communication state changes due to an increase in traffic, etc., it is possible to decentralize the processing with multiple edge servers, or switch the distribution entity to another edge server, or bypass a faulty part of the network and continue the distribution, so high-speed and stable distribution can be achieved.

[0598] In addition, not limited to the decentralized processing of the distribution itself, the encoding process of the captured data can be performed by each terminal, or on the server side, or can be shared between them. As an example, usually two processing loops are performed in the encoding process. In the first loop, the complexity or encoding amount of the image in units of frames or scenes is detected. In addition, in the second loop, a process of improving the encoding efficiency while maintaining the image quality is performed. For example, by performing the first encoding process by the terminal and the second encoding process by the server side that receives the content, it is possible to improve the quality and efficiency of the content while reducing the processing load in each terminal. In this case, if there is a request to receive and decode almost in real time, the data completed by the first encoding performed by the terminal can also be received and reproduced by other terminals, so more flexible real-time distribution can also be performed.

[0599] As other examples, a camera ex113 or the like extracts feature amounts (features or amounts of features) from an image, compresses data on the feature amounts as metadata, and sends the data to a server. The server, for example, switches the quantization precision or the like according to the importance of a target determined from the feature amounts, and performs compression corresponding to the meaning of the image (or the importance of the content). The feature amount data is particularly effective for improving the precision and efficiency of motion vector prediction during re-compression in the server. In addition, simple encoding such as VLC (Variable Length Coding) may be performed by a terminal, and encoding with a large processing load such as CABAC (Context Adaptive Binary Arithmetic Coding) may be performed by the server.

[0600] As other examples, in a stadium, a shopping mall, a factory, or the like, there are cases where there are a plurality of image data obtained by a plurality of terminals photographing substantially the same scene. In this case, a plurality of terminals that have performed photographing and, if necessary, other terminals and a server that have not performed photographing are used, and distributed processing is performed by respectively allocating encoding processing in units of GOP (Group of Picture), picture units, or tile units obtained by dividing a picture, for example. As a result, it is possible to reduce latency and better achieve real-time performance.

[0601] Since the plurality of image data are of substantially the same scene, the server may also manage and / or instruct so as to mutually refer to the image data photographed by each terminal. In addition, the server may receive the encoded data from each terminal and change the reference relationship between the plurality of data, or may correct or replace the picture itself and re-encode it. As a result, it is possible to generate a stream with improved quality and efficiency of each piece of data.

[0602] Moreover, the server may also perform transcoding to change the encoding method of the image data and then distribute the image data. For example, the server may change an MPEG-like encoding method to a VP-like (e.g., VP9) method, or may change H.264 to H.265 or the like.

[0603] In this way, the encoding process can be performed by a terminal or one or more servers. Therefore, hereinafter, descriptions using "server" or "terminal" or the like as the main body of processing are used, but a part or all of the processing performed by the server may be performed by the terminal, and a part or all of the processing performed by the terminal may be performed by the server. In addition, the same applies to the decoding process regarding these.

[0604] [3D, Multi-angle]

[0605] The cases of merging images or videos of different scenes captured by multiple terminals such as a plurality of cameras ex113 and / or smartphones ex115 that are roughly synchronized with each other, or images of the same scene captured from different angles are increasing. The videos captured by each terminal can be merged based on the relative positional relationship between the terminals obtained separately, or the regions where the feature points included in the videos match.

[0606] The server not only encodes two-dimensional moving images, but can also automatically or at a user-specified time encode still images based on scene analysis of the moving images and send them to the receiving terminals. When the server can obtain the relative positional relationship between the shooting terminals, it can not only generate the three-dimensional shape of the scene based on videos of the same scene captured from different angles, in addition to two-dimensional moving images. The server can also separately encode the three-dimensional data generated from point clouds, etc., and can also select or reconstruct from the videos captured by multiple terminals based on the results of identifying or tracking people or objects using the three-dimensional data, and generate and send the videos to the receiving terminals.

[0607] In this way, the user can not only arbitrarily select each video corresponding to each shooting terminal to view the scene, but also view the content of the video cut from the selected viewing point from the three-dimensional data reconstructed using multiple images or videos. Furthermore, together with the video, sound can also be collected from multiple different angles, and the server multiplexes the sound from a specific angle or space with the corresponding video, and sends the multiplexed video and sound.

[0608] In addition, in recent years, content that establishes a correspondence between the real world and the virtual world such as Virtual Reality (VR) and Augmented Reality (AR) has also been popularizing. In the case of VR images, the server separately produces viewpoint images for the right eye and the left eye, and can either perform encoding that allows reference between the viewpoint videos through Multi-View Coding (MVC) or the like, or encode them as different streams without mutual reference. When decoding different streams, they can be reproduced synchronously according to the user's viewpoint to reproduce a virtual three-dimensional space.

[0609] In the case of an AR image, it is also possible that the server overlaps virtual object information in a virtual space with camera information in the real space based on the three-dimensional position or the movement of the user's viewpoint. The decoding device acquires or holds virtual object information and three-dimensional data, generates a two-dimensional image according to the movement of the user's viewpoint, and creates overlapping data by smoothly connecting them. Alternatively, it is also possible that the decoding device sends the movement of the user's viewpoint to the server in addition to delegating the virtual object information. It is also possible that the server creates overlapping data in accordance with the received movement of the viewpoint based on the three-dimensional data held in the server, encodes the overlapping data, and distributes it to the decoding device. Additionally, typically, the overlapping data has an α value representing transmittance in addition to RGB, and the server sets the α value of the part other than the target created based on the three-dimensional data to 0 or the like, and encodes it in a state where it is transmitted through that part. Alternatively, the server can also set the RGB value of a specified value as the background like chroma keying, and generate data with the part other than the target set as the background color. The RGB value of the specified value can also be determined in advance.

[0610] Similarly, the decoding process of the distributed data can be performed by the client (e.g., the terminal), on the server side, or they can be shared with each other. As an example, it is also possible that a certain terminal first sends a reception request to the server, and another terminal receives the content corresponding to the request and performs the decoding process, and sends the decoded signal to a device with a display. By dispersing the processing regardless of the performance of the communicable terminal itself and selecting appropriate content, it is possible to reproduce data with better image quality. In addition, as another example, it is also possible that a TV or the like receives large-size image data, and a personal terminal of the viewer decodes and displays a part of the area such as tiles after the picture is segmented. Thus, it is possible to share the overall image while confirming one's own responsible area or the area that one wants to confirm in more detail at hand.

[0611] In a situation where multiple short-range, medium-range, or long-range wireless communications indoors and outdoors can be used, it may be possible to receive content seamlessly using a distribution system standard such as MPEG-DASH. The user can freely select the user's terminal, decoding devices or display devices such as displays configured indoors and outdoors, and switch in real time. In addition, it is possible to use one's own location information, etc., to switch the decoding terminal and the display terminal and perform decoding. Thus, it is also possible to map and display information on a part of the wall surface or the ground of a building next to a device that can be displayed during the user's movement 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 by the receiving terminal in a short time, or the encoded data being replicated in an edge server of the content distribution service.

[0612] [Scalable Encoding]

[0613] Regarding the switching of content, use ​ The scalable stream shown, which is compression-encoded using the moving image encoding method represented in the above-described respective embodiments, will be described. For the server, there may be multiple streams with the same content but different qualities as separate streams, or it may be a structure that switches content by utilizing the characteristics of a temporally / spatially scalable stream achieved by hierarchical encoding as shown in the figure. That is, the decoding side can freely switch between low-resolution content and high-resolution content for decoding by determining which layer to decode based on internal factors such as performance and external factors such as the state of the communication band. For example, when a user wants to view a video that was viewed on a smartphone ex115 while on the move on a device such as an Internet TV after returning home, the device only needs to decode the same stream to different layers, so the burden on the server side can be reduced.

[0614] Furthermore, in addition to the structure in which pictures are encoded for each layer as described above and the scalability of the enhancement layer above the base layer is realized, the enhancement layer may include meta-information such as based on the statistical information of the image. It is also possible that the decoding side generates high-quality content by super-resolution of the pictures in the base layer based on the meta-information. Super-resolution can improve the signal-to-noise ratio while maintaining and / or expanding the resolution. The meta-information includes information for determining linear or non-linear filter coefficients used in the super-resolution process, or information for determining parameter values in the filter process, machine learning, or least squares operation used in the super-resolution process, etc.

[0615] Alternatively, a structure may be provided in which a picture is segmented into tiles, etc. according to the meaning of an object, etc. within the image. The decoding side decodes only a part of the region by selecting the tiles to be decoded. Moreover, by saving the attributes of the object (person, car, ball, etc.) and the position within the image (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 decide on the tiles including the object. For example, as ​ shown, a data storage structure different from the pixel data, such as the SEI (supplemental enhancement information) message in HEVC, may be used to store the meta-information. This meta-information represents, for example, the position, size, or color of the main object.

[0616] Meta-information can also be saved in units composed of multiple pictures, such as streams, sequences, or random access units. On the decoding side, it is possible to obtain the time when a specific person appears in the video, etc. By matching with the information of the picture unit and the time information, it is possible to determine the picture in which the target exists and to determine the position of the target within the picture.

[0617] [Optimization of Web Pages]

[0618] ​ It is a diagram showing an example of a display screen of a web page in a computer ex111 or the like. ​ It is a diagram showing an example of a display screen of a web page in a smartphone ex115 or the like. As ​ and ​ shown, there are cases where a web page includes multiple linked images that are links to image content, and the visible manner thereof may be different depending on the viewing device. When multiple linked images can be seen on the screen, before the user explicitly selects a linked image, or before the linked image approaches near the center of the screen or the whole of the linked image enters the screen, the display device (decoding device) may display the still image or I picture that each content has as a linked image, may also display an image such as a gif animation using multiple still images or I pictures, etc., or may only receive the base layer and decode and display the image.

[0619] When a linked image is selected by the user, the display device, for example, gives the highest priority to the base layer and decodes it. In addition, if there is information in the HTML constituting the web page indicating that it is scalable content, the display device may also decode up to the enhancement layer. Moreover, in order to ensure real-time performance or when the communication bandwidth is very tight before selection, the display device can reduce the delay between the decoding time and the display time of the first picture (the delay from the start of content decoding to the start of display) by only decoding and displaying the pictures that are forward-referenced (I pictures, P pictures, B pictures that are only forward-referenced). Furthermore, the display device may also forcibly ignore the reference relationship of the pictures and roughly decode all B pictures and P pictures as forward-referenced, and as the pictures received over time increase, perform normal decoding.

[0620] [Autonomous Driving]

[0621] In addition, when receiving or transmitting still image or video data such as two-dimensional or three-dimensional map information for the automatic driving or driving assistance of a vehicle, the receiving terminal may also receive information such as weather or construction information as meta-information in addition to the image data belonging to one or more layers, and decode them in correspondence. In addition, the meta-information may belong to a layer or may only be multiplexed with the image data.

[0622] In this case, since vehicles, drones, airplanes, etc. that include the receiving terminal are moving, the receiving terminal can perform seamless reception and decoding while switching between base stations ex106 to ex110 by transmitting the location information of the receiving terminal. In addition, the receiving terminal can dynamically switch the degree of receiving meta-information or updating map information according to the user's selection, the user's situation, and / or the state of the communication band.

[0623] In the content supply system ex100, the client can receive, decode, and reproduce the encoded information sent by the user in real time.

[0624] [Distribution of Personal Content]

[0625] In addition, in the content supply system ex100, not only high-quality, long-duration content provided by video distribution providers but also unicast or multicast distribution of low-quality, short-duration content provided by individuals can be performed. It is conceivable that such personal content will increase in the future. In order to make personal content better, the server can also perform encoding processing after editing. This can be achieved, for example, with the following structure.

[0626] During or after shooting in real time or cumulatively, the server performs recognition processing such as shooting error, scene search, meaning analysis, and target detection based on the original image data or the encoded data. And based on the recognition result, the server manually or automatically performs editing such as correcting focus deviation or camera shake, deleting scenes with low importance such as scenes with lower brightness or out-of-focus compared to other pictures, emphasizing the edges of the target, or changing the color tone. Based on the editing result, the server encodes the edited data. In addition, it is known that the viewing rate decreases if the shooting time is too long, and the server can also automatically limit not only scenes with low importance as described above but also scenes with little movement based on the image processing result to make the content within a specific time range. Or, the server can also generate a summary based on the result of scene meaning analysis and encode it.

[0627] In the original state, personal content may be invaded by content that infringes copyright, the author's personality rights, or portrait rights, etc. There may also be inconvenient situations for individuals, such as the sharing scope exceeding the desired scope. Therefore, for example, the server can also encode by forcibly changing the faces of people in the peripheral part of the screen or in places such as at home into out-of-focus images. Moreover, the server can also identify whether a face of a person different from the pre-registered person is captured in the image to be encoded, and in the case of capture, perform processing such as applying mosaics to the face part. Or, as pre-processing or post-processing of encoding, from the perspective of copyright, etc., the user can specify the person or background area for which the image is desired to be processed. The server can also perform processing such as replacing the specified area with another image or blurring the focus. If it is a person, the person can be tracked in the moving image and the image of the face part of the person can be replaced.

[0628] The real-time requirement for viewing and listening to personal content with a small data volume is relatively strong. Therefore, although it also depends on the bandwidth, the decoding device can also first receive and decode and reproduce the basic layer with the highest priority. The decoding device can also receive the enhancement layer during this period, and in the case of being reproduced more than 2 times, such as when the reproduction is looped, reproduce the high-quality image including the enhancement layer. In this way, if it is a scalable-encoded stream, an experience can be provided that the moving image is rough at the stage of not being selected or just starting to watch, but the stream gradually becomes smooth and the image quality improves. In addition to scalable encoding, the same experience can also be provided when the first rough stream and the second stream encoded with reference to the first moving image form one stream.

[0629] [Other implementation application examples]

[0630] In addition, these encoding or decoding processes are usually processed in the LSIex500 provided in each terminal. The LSI (large-scale integration circuitry) ex500 (refer to ​ ) can be either a single chip or a structure composed of multiple chips. In addition, software for encoding or decoding moving images can also be loaded into a certain recording medium (CD-ROM, floppy disk, hard disk, etc.) that can be read by a computer ex111, etc., and the encoding process and decoding process can be performed using this software. Furthermore, in the case where the smart phone ex115 is equipped with a camera, the moving image data obtained by this camera can also be sent. The moving image data at this time can also be the data after being encoded by the LSIex500 provided in the smart phone ex115.

[0631] In addition, the LSIex500 may also be configured to download and activate 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 acquire and reproduce the content.

[0632] In addition, not limited to the content supply system ex100 via the Internet ex101, at least one of the moving image encoding device (image encoding device) or the moving image decoding device (image decoding device) of the above-described embodiments can be incorporated into a digital broadcast system. Since the broadcast wave is used to carry multiplexed data that multiplexes video and audio by using a satellite or the like and is transmitted and received, there is a difference suitable for multicast compared to the structure of the content supply system ex100 that is easy to perform unicast, but the encoding process and the decoding process can be applied in the same way.

[0633] [Hardware Structure]

[0634] ​ is a further detailed representation ​ of the smart phone ex115 shown in the figure. In addition, ​ is a diagram showing a structural example of the smart phone ex115. The smart phone ex115 includes an antenna ex450 for transmitting and receiving radio waves to and from the base station ex110, a camera unit ex465 capable of capturing video and still images, and a display unit ex458 for displaying the video captured by the camera unit ex465 and decoding the data such as the video received by the antenna ex450. The smart phone 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 the captured video or still images, the recorded sound, the received video or still images, the encoded or decoded data of emails, etc., or a slot unit ex464 as an interface unit with the SIMex468, and the SIMex468 is used to identify the user and perform authentication for accessing various data represented by the network. In addition, an external memory may be used instead of the memory unit ex467.

[0635] The main control unit ex460 that can comprehensively control the display unit ex458, the operation unit ex466, etc. is interconnected with the power supply circuit unit ex461, the operation input control unit ex462, the video signal processing unit ex455, the camera interface unit ex463, the display control unit ex459, the modulation / demodulation unit ex452, the multiplexing / demultiplexing unit ex453, the audio signal processing unit ex454, the slot unit ex464, and the memory unit ex467 synchronously via the bus ex470.

[0636] If the power key is turned on by the user's operation, the power supply circuit unit ex461 starts the smart phone ex115 to an operable state and supplies power to each unit from the battery pack.

[0637] The smart phone ex115 performs processes such as calls and data communications under the control of the main control unit ex460 having a CPU, ROM, RAM, etc. During a call, the audio signal processing unit ex454 converts the audio signal collected by the audio input unit ex456 into a digital audio signal, the modulation / demodulation unit ex452 performs spread spectrum processing, and the transmission / reception unit ex451 performs digital-to-analog conversion processing and frequency conversion processing. The signal of the result is transmitted via the antenna ex450. In addition, the received data is amplified and frequency conversion processing and analog-to-digital conversion processing are performed. The modulation / demodulation unit ex452 performs inverse spread spectrum processing, and the audio signal processing unit ex454 converts it into an analog audio signal and outputs it from the audio output unit ex457. During data communication, text, still images, or video data can be sent under the control of the main control unit ex460 via the operation input control unit ex462 based on operations of the operation unit ex466 of the main body unit. The same transmission and reception processing is performed. In the data communication mode, when sending video, still images, 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 by the moving image encoding method shown 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 the camera unit ex465 shooting video or still images, 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 specified manner, and the modulation / demodulation unit (modulation / demodulation circuit unit) ex452 and the transmission / reception unit ex451 perform modulation processing and conversion processing and transmit it via the antenna ex450. The specified manner can also be determined in advance.

[0638] When an image attached to an email or a chat tool, or an image linked on a web page is received, in order to decode the multiplexed data received via the antenna ex450, the multiplexing / demultiplexing unit ex453 demultiplexes the multiplexed data to divide it into a bitstream of video data and a bitstream of audio data, supplies the encoded video data to the video signal processing unit ex455 via the synchronization bus ex470, and supplies the encoded audio data to the audio signal processing unit ex454. The video signal processing unit ex455 decodes the video signal by a video decoding method corresponding to the moving image encoding method described in each of the above embodiments, and displays the video or still image included in the linked moving image file from the display unit ex458 via the display control unit ex459. The audio signal processing unit ex454 decodes the audio signal and outputs the sound from the audio output unit ex457. Since real-time streaming media is becoming increasingly popular, depending on the user's situation, there may also be cases where the reproduction of sound is inappropriate in society. Therefore, it may also be a structure in which, as an initial value, it is preferable not to reproduce the audio signal but only reproduce the video data, and the audio is reproduced synchronously only when the user performs an operation such as clicking on the video data.

[0639] In addition, here, the smart phone ex115 has been described as an example, but as a terminal, other installation forms such as a transmitting terminal having only an encoder and a receiving terminal having only a decoder can be considered in addition to the transceiver terminal having both an encoder and a decoder. In the digital broadcast system, it has been described assuming that multiplexed data in which audio data is multiplexed in video data is received and transmitted. However, in the multiplexed data, character data associated with the video, etc. can also be multiplexed in addition to the audio data. Alternatively, instead of the multiplexed data, the video data itself can be received or transmitted.

[0640] In addition, it has been described assuming that the main control unit ex460 including the CPU controls the encoding or decoding process, but many types of terminals also have a GPU. Therefore, it can also be configured to use the performance of the GPU to process a larger area together through a memory shared by the CPU and the GPU, or a memory that manages addresses in a shared manner. As a result, 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 the processes of motion estimation, deblocking filtering, SAO (Sample Adaptive Offset), and transform / quantization are performed not by the CPU but by the GPU together in units of pictures or the like.

[0641] Industrial Applicability

[0642] The present invention can be applied to, 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 conferencing system, or an endoscope, etc.

[0643] Description of Reference Numerals

[0644] 100 Encoding device

[0645] 102 Splitting unit

[0646] 104 Subtraction unit

[0647] 106 Transformation unit

[0648] 108 Quantization unit

[0649] 110 Entropy encoding unit

[0650] 112, 204 Inverse quantization unit

[0651] 114, 206 Inverse transformation unit

[0652] 116, 208 Addition unit

[0653] 118, 210 Block memory

[0654] 120, 212 Loop filtering unit

[0655] 122, 214 Frame memory

[0656] 124, 216 Intra prediction unit

[0657] 126, 218 Inter prediction unit

[0658] 128, 220 Prediction control unit

[0659] 200 Decoding device

[0660] 202 Entropy decoding unit

[0661] 1201 Boundary determination unit

[0662] 1202, 1204, 1206 Switch

[0663] 1203 Filtering determination unit

[0664] 1205 Filtering processing unit

[0665] 1207 Filtering characteristic determination unit

[0666] 1208 Processing determination unit

[0667] a1, b1 Processor

[0668] a2, b2 Memory

Claims

1. An encoding device that encodes a moving image, wherein, it includes: a circuit; and a memory connected to the circuit, during operation, the circuit derives a motion vector of the current block in units of blocks by referring to at least one reference picture different from the picture to which the current block belongs, performs a DMVR process of searching a peripheral area of the motion vector and correcting the motion vector in units of sub-blocks obtained by dividing the current block, and the DMVR process is a dynamic motion vector refresh process, respectively determines whether to apply a deblocking filter process to boundaries between two adjacent sub-blocks among a plurality of sub-blocks for which the DMVR process has been performed, and based on the determination result, applies the deblocking filter process to the boundary.

2. A decoding device that decodes a moving image, wherein, it includes: a circuit; and a memory connected to the circuit, during operation, the circuit derives a motion vector of the current block in units of blocks by referring to at least one reference picture different from the picture to which the current block belongs, performs a DMVR process of searching a peripheral area of the motion vector and correcting the motion vector in units of sub-blocks obtained by dividing the current block, and the DMVR process is a dynamic motion vector refresh process, respectively determines whether to apply a deblocking filter process to boundaries between two adjacent sub-blocks among a plurality of sub-blocks for which the DMVR process has been performed, and based on the determination result, applies the deblocking filter process to the boundary.