Image encoding device, image decoding device, image encoding method, and image decoding method

By using motion compensation, gradient processing and interpolation technology in video coding to generate predicted images, the problem of low inter-frame prediction efficiency in the existing technology is solved, and the compression efficiency and processing speed of video coding are improved.

CN118869984APending Publication Date: 2024-10-29PANASONIC INTELLECTUAL PROPERTY CORP OF AMERICA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410608017.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2018-09-13
Filing Date
2018-11-30
Publication Date
2024-10-29

AI Technical Summary

Technical Problem

In existing video coding technology, compression efficiency and processing load still need to be further improved. Especially in the inter-frame prediction function, the prediction method based on reference frames has the problem of low efficiency.

Method used

An encoder and decoder are used to generate the final predicted image by performing motion compensation, gradient image processing and interpolation processing on the reference picture to improve encoding and decoding efficiency. The system includes a processor and memory that performs motion compensation, gradient calculation and interpolation processing to generate the final predicted image for encoding and decoding.

Benefits of technology

Improves the compression efficiency of video encoding, reduces processing load, simplifies encoding/decoding processing, accelerates encoding/decoding speed, and effectively selects appropriate components and operations, such as appropriate filters, block sizes, and motion vectors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118869984A_ABST
    Figure CN118869984A_ABST
Patent Text Reader

Abstract

The present disclosure provides systems and methods for video encoding. The system, for example, includes an image encoder comprising: circuitry and a memory coupled to the circuitry, where the circuitry, in operation, predicts a first block of prediction samples of a current block of a picture, where predicting the first block of prediction samples includes at least a prediction process with motion vectors from different pictures; filling the first block of prediction samples to form a second block of prediction samples, the second block being larger than the first block; calculating a gradient using at least a second block of the prediction sample; and encoding the current block using at least the calculated gradient.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of the patent application with the same name with application number 201880078630.7 filed on November 30, 2018. Technical Field

[0002] The present disclosure relates to video coding, and more particularly to video coding and decoding systems, components, and methods for performing inter-frame prediction functions to predict a current frame based on a reference frame. Background Art

[0003] The Joint Committee on Video Coding (JCT-VC) has standardized a video coding standard called High Efficiency Video Coding (HEVC).

[0004] With the development of video coding technology, 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), there is always a need to provide improvements and optimizations to video coding technology to handle the growing amount of digital video data in various applications. The present disclosure relates to further advancements, improvements and optimizations in video coding, in particular, inter-frame prediction functions for building a prediction of a current frame based on a reference frame. Summary of the invention

[0005] [Technical issues]

[0006] There is a need to further improve compression efficiency and reduce processing load in encoding and decoding techniques.

[0007] Therefore, the present disclosure provides an encoder, a decoder, an encoding method, and a decoding method capable of achieving further improvement in compression efficiency and reduced processing load.

[0008] [Solution to the problem]

[0009] One aspect of the present disclosure is an encoder for encoding a block to be encoded in a picture using inter-frame prediction, the encoder including a processor and a memory, and the processor uses the memory to perform the following steps: acquiring two predicted images from two reference pictures by performing motion compensation using a motion vector corresponding to each of the two reference pictures; acquiring two gradient images corresponding to the two predicted images from the two reference pictures; obtaining a local motion estimation value using the two predicted images and the two gradient images in a sub-block obtained by dividing the block to be encoded; and generating a final predicted image of the block to be encoded using the two predicted images, the two gradient images, and the local motion estimation value of the sub-block.

[0010] According to another aspect of the present disclosure, an image encoder is provided, comprising a circuit and a memory coupled to the circuit. The circuit performs the following operations in operation: predicting a first block of prediction samples of a current block of a picture, wherein predicting the first block of prediction samples comprises at least a prediction process using motion vectors from different pictures; padding the first block of prediction samples to form a second block of prediction samples, wherein the second block is larger than the first block; using the second block of prediction samples to at least calculate a gradient; and encoding the current block using at least the calculated gradient.

[0011] According to another aspect of the present disclosure, an image encoder is provided, comprising a circuit and a memory coupled to the circuit. The circuit performs the following operations in operation: predicting a first block of prediction samples of a current block of a picture, wherein predicting the first block of prediction samples at least comprises a prediction process using motion vectors from different pictures; padding the first block of prediction samples to form a second block of prediction samples, wherein the second block is larger than the first block; performing an interpolation process using the second block of sample predictions; and encoding the current block using at least the block obtained by the interpolation process.

[0012] According to another aspect of the present disclosure, an image encoder is provided, comprising a circuit and a memory coupled to the circuit. The circuit performs the following operations in operation: predicting a first block of prediction samples of a current block of a picture, wherein predicting the first block of prediction samples at least includes a prediction process using a motion vector from a different picture; padding a second block of prediction samples to form a third block of prediction samples, wherein the second block is adjacent to the current block; performing an overlapped block motion compensation process using at least the first block and the third block of prediction samples; and encoding the current block using at least the block obtained by the overlapped block motion compensation process.

[0013] According to another aspect of the present disclosure, an image encoder is provided, comprising a circuit and a memory coupled to the circuit. The circuit performs the following operations in operation: predicting a first block of prediction samples of a current block of a picture, wherein predicting the first block of prediction samples at least comprises a prediction process using a first motion vector from a different picture; and using at least the first motion vector, using a dynamic motion vector refresh (DMVR) process to derive a second motion vector of the current block; using the second motion vector to perform an interpolation process for the current block, wherein the interpolation process comprises a filling process; and encoding the current block using at least the block obtained by the interpolation process.

[0014] According to another aspect of the present disclosure, an image decoder is provided, comprising a circuit and a memory coupled to the circuit. The circuit performs the following operations in operation: predicting a first block of prediction samples of a current block of a picture, wherein predicting the first block of prediction samples comprises at least a prediction process using motion vectors from different pictures; padding the first block of prediction samples to form a second block of prediction samples, wherein the second block is larger than the first block; using the second block of prediction samples to at least calculate a gradient; and decoding the current block using at least the calculated gradient.

[0015] According to another aspect of the present disclosure, an image decoder is provided, comprising a circuit and a memory coupled to the circuit. The circuit performs the following operations in operation: predicting a first block of prediction samples of a current block of a picture, wherein predicting the first block of prediction samples at least comprises a prediction process using motion vectors from different pictures; padding the first block of prediction samples to form a second block of prediction samples, wherein the second block is larger than the first block; performing an interpolation process using the second block of prediction samples; and decoding the current block using at least the block obtained by the interpolation process.

[0016] According to another aspect of the present disclosure, an image decoder is provided, comprising a circuit and a memory coupled to the circuit. The circuit performs the following operations in operation: predicting a first block of prediction samples of a current block of a picture, wherein predicting the first block of prediction samples at least includes a prediction process using a motion vector from a different picture; padding a second block of prediction samples to form a third block of prediction samples, wherein the second block is adjacent to the current block; performing an overlapped block motion compensation process using at least the first block and the third block of prediction samples; and decoding the current block using at least the block obtained by the overlapped block motion compensation process.

[0017] According to another aspect of the present disclosure, an image decoder is provided, comprising a circuit and a memory coupled to the circuit. The circuit performs the following operations in operation: predicting a first block of prediction samples of a current block of a picture, wherein predicting the first block of prediction samples at least includes a prediction process using a first motion vector from a different picture; and using at least the first motion vector, using a dynamic motion vector refresh (DMVR) process to derive a second motion vector of the current block; using the second motion vector to perform an interpolation process for the current block, wherein the interpolation process includes a filling process; and decoding the current block using at least the block obtained by the interpolation process.

[0018] According to another aspect of the present disclosure, a method for image encoding is provided, which includes steps for enabling an image encoder to perform various aspects of the present disclosure as described herein.

[0019] According to another aspect of the present disclosure, a method for decoding an image is provided, which includes enabling an image decoder to perform the steps according to various aspects of the present disclosure as described herein.

[0020] These general and specific embodiments may be implemented using a system, method, integrated circuit, computer program, or medium such as a computer readable CD-ROM, and may be implemented by a combination of systems, methods, integrated circuits, computer programs, and medium.

[0021] [Beneficial Effects of the Invention]

[0022] The present disclosure can provide an encoder, a decoder, an encoding method, and a decoding method that can achieve further improvement in compression efficiency and reduced processing load.

[0023] Some implementations of the embodiments of the present disclosure can improve coding efficiency, simplify the encoding / decoding process, speed up the encoding / decoding process, and effectively select appropriate components / operations used in encoding and decoding, such as appropriate filters, block sizes, motion vectors, reference pictures, reference blocks, etc.

[0024] Other benefits and advantages of the disclosed embodiments will become apparent from the description and drawings. Benefits and / or advantages can be obtained individually from the various embodiments and features of the description and drawings, and it is not necessary to provide all of these benefits and / or advantages in order to obtain one or more of these benefits and / or advantages.

[0025] It should be noted that the general or specific embodiments may be implemented as a system, a method, an integrated circuit, a computer program, a storage medium, or any combination thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In the drawings, like reference numerals identify similar elements. The sizes and relative positions of elements in the drawings are not necessarily drawn to scale.

[0027] Figure 1 A block diagram showing a functional configuration of an encoder according to an embodiment.

[0028] Figure 2 An example of block partitioning is shown.

[0029] Figure 3 is a table indicating transform basis functions for various transform types.

[0030] Figure 4A An example of a filter shape used in an ALF (Adaptive Loop Filter) is shown.

[0031] Figure 4B Another example of a filter shape used in ALF is shown.

[0032] Figure 4C Another example of a filter shape used in ALF is shown.

[0033] Figure 5A 67 intra prediction modes used in the example of intra prediction are shown.

[0034] Figure 5B is a flowchart showing one example of a predicted image correction process performed in an OBMC (Overlapped Block Motion Compensation) process.

[0035] Figure 5C is a conceptual diagram showing one example of a predicted image correction process performed in the OBMC process.

[0036] Figure 5D is a flowchart showing one example of FRUC (Frame Rate Up Conversion) processing.

[0037] Figure 6 An example of pattern matching between two blocks along a motion trajectory (bilateral matching) is shown.

[0038] Figure 7 An example of pattern matching (template matching) between a template in a current picture and a block in a reference picture is shown.

[0039] Figure 8 A model assuming uniform linear motion is shown.

[0040] Fig. 9A An example of obtaining the motion vector of each sub-block based on the motion vectors of neighboring blocks is shown.

[0041] Fig. 9B One example of a process for deriving motion vectors in merge mode is shown.

[0042] Fig. 9C is a conceptual diagram showing an example of DMVR (Dynamic Motion Vector Refresh) processing.

[0043] Fig.9D One example of a predicted image generation method using a brightness correction process performed by an LIC (Local Illumination Compensation) process is shown.

[0044] Fig.10 is a block diagram showing a functional configuration of a decoder according to an embodiment.

[0045] Fig.11 is a flowchart illustrating an inter-frame prediction process according to another embodiment.

[0046] Fig.12 Is used to explain the Fig.11 A conceptual diagram of inter-frame prediction of the illustrated embodiment.

[0047] Fig.13 Is used to explain the Fig.11 A conceptual diagram of an example of a reference range of a motion compensation filter and a gradient filter of an example of an embodiment is shown.

[0048] Fig.14 Is used to explain the Fig.11 A conceptual diagram of an example of a reference range of a motion compensation filter of Modification Example 1 of the embodiment shown.

[0049] Fig.15 It is used to explain Fig.11 A conceptual diagram showing an example of a reference range of a gradient filter according to Modification Example 1 of the embodiment shown.

[0050] Fig.16 It shows that according to Fig.11 A diagram showing an example of a pixel pattern referred to by deriving a local motion estimation value of Modification Example 2 of the embodiment is shown.

[0051] Fig.17 is a flowchart showing one example of an image encoding / decoding method using an inter-prediction function to generate a prediction of a current block of a picture based on a reference block in a different picture.

[0052] Fig.18A is a conceptual diagram showing an example of picture order counts for different pictures. Fig.18A In the present invention, a picture may be referred to as a current picture, and a different picture may be referred to as a first picture or a second picture.

[0053] Fig.18B is a conceptual diagram illustrating another example of a picture and a picture order count of different pictures.

[0054] Fig. 18C is a conceptual diagram illustrating still another example of a picture and a picture sequence count of different pictures.

[0055] Fig.19A Shown according to Fig.17 An example of a filling direction for filling a block with prediction samples of the example of the image encoding / decoding method shown.

[0056] Fig.19B Shown according to Fig.17 Another example of a filling direction for filling a block of prediction samples in the example of the image encoding / decoding method shown.

[0057] Fig. 20A It shows that according to Fig.17An example of an image encoding / decoding method is shown as an example of a process of filling a block of prediction samples.

[0058] Fig. 20B It shows that according to Fig.17 The example of the image encoding / decoding method shown is another example of a process of filling a block of prediction samples.

[0059] Fig. 20C It shows that according to Fig.17 The example of the image encoding / decoding method shown is another example of a process of filling a block of prediction samples.

[0060] Fig.20D Shown according to Fig.17 The example of the image encoding / decoding method shown is another example of a process of filling a block of prediction samples.

[0061] Fig.21A An example of a gradient filter for a block is shown.

[0062] Fig. 21B An example of multiple gradient filters for a block is shown.

[0063] Fig. 21C Yet another example of a gradient filter for a block is shown.

[0064] Fig.21D Yet another example of a gradient filter for a block is shown.

[0065] Fig. 22 It shows that according to Fig.17 A flowchart of an embodiment of an exemplary image encoding / decoding method is shown.

[0066] Fig.23 It shows Fig. 22 A conceptual diagram of an embodiment of an image encoding / decoding method is shown.

[0067] Fig.24 It shows that according to Fig.17 The illustrated example is a flowchart of another embodiment of an image encoding / decoding method.

[0068] Fig.25 It shows Fig.24 A conceptual diagram of an embodiment of an image encoding / decoding method is shown.

[0069] Fig.26 Shown in Fig.24 and Fig.25 An example of a block generated by padding processing in an embodiment of the image encoding / decoding method is shown.

[0070] Fig.27Ais a flowchart illustrating another alternative example of an image encoding / decoding method using an inter-prediction function to generate a prediction of a current block of a picture based on a reference block in a different picture.

[0071] Fig.27B is a flowchart illustrating another alternative example of an image encoding / decoding method using an inter-prediction function to generate a prediction of a current block of a picture based on a reference block in a different picture.

[0072] Fig.27C is a flowchart illustrating yet another alternative example of an image encoding / decoding method using an inter-prediction function to generate a prediction of a current block of a picture based on a reference block in a different picture.

[0073] Fig.28 is a conceptual diagram showing an embodiment of the image encoding / decoding method shown in Fig. 27. 27A.

[0074] Fig.29 It shows Fig.27B A conceptual diagram of an embodiment of an image encoding / decoding method is shown.

[0075] Fig.30 It shows that Fig.27C A conceptual diagram of an embodiment of an image encoding / decoding method is shown.

[0076] Fig.31 Examples of neighboring blocks of the current block are shown.

[0077] Fig.32A Shown according to Fig.27A , Fig.27B and Fig.27C An example of an image encoding / decoding method is shown as an example of a process of filling a prediction sample block.

[0078] Fig.32B Shown according to Fig.27A , Fig.27B and Fig.27C The example of the image encoding / decoding method shown is another example of a process of filling a block of prediction samples.

[0079] Fig.32C Shown according to Fig.27A , Fig.27B and Fig.27C The example of the image encoding / decoding method shown is another example of a process of filling a block of prediction samples.

[0080] Fig.33A Shown according to Fig.17 , Fig. 22 , Fig.24 , Fig.27A , Fig.27B and Fig.27C An example of a padding direction for padding blocks of an example of an image encoding / decoding method is shown.

[0081] Fig.33B Shown according to Fig.17 , Fig. 22 , Fig.24 , Fig.27A , Fig.27B and Fig.27C Another example of a padding direction for padding blocks of the example of the image encoding / decoding method shown.

[0082] Fig.33C Shown according to Fig.17 , Fig. 22 , Fig.24 , Fig.27A , Fig.27B and Fig.27C Another example of a padding direction for padding blocks of the example of the image encoding / decoding method shown.

[0083] Fig.33D Shown according to Fig.17 , Fig. 22 , Fig.24 , Fig.27A , Fig.27B and Fig.27C The example of the image encoding / decoding method shown is yet another example of a padding direction for a padding block.

[0084] Fig.34 Shown according to Fig.17 , Fig. 22 , Fig.24 , Fig.27A , Fig.27B and Fig.27C Alternative examples of blocks of prediction samples of the example of the image encoding / decoding method shown. In these alternative examples, the blocks of prediction samples are non-rectangular in shape.

[0085] Fig.35 A flow chart illustrating another alternative example of an image encoding / decoding method using an inter prediction function to generate a prediction of a current block of a picture based on a reference block in a different picture is shown.

[0086] Fig.36 It shows Fig.35 A conceptual diagram of an embodiment of an image encoding / decoding method is shown.

[0087] Fig.37A Shown is the Fig.35 An example of a process of filling a block of prediction samples according to a second motion vector of the example of the image encoding / decoding method shown.

[0088] Fig.37B Shown is the Fig.35 Another example of a process of filling a block of prediction samples according to a second motion vector of the example of the image encoding / decoding method shown.

[0089] Fig.38 A flow chart illustrating yet another alternative example of an image encoding / decoding method using an inter prediction function to generate a prediction of a current block of a picture based on a reference block in a different picture is shown. Fig.38 The flowchart is similar to Fig.35 , in addition to the dynamic motion vector refresh (DMVR) processing in step 3804, it also includes padding processing.

[0090] Fig.39 It shows Fig.38 A conceptual diagram of an embodiment of an image encoding / decoding method is shown.

[0091] Fig.40 The overall configuration of a content providing system for realizing a content distribution service is shown.

[0092] Fig.41 An example of a coding structure in scalable coding is shown.

[0093] Fig.42 An example of a coding structure in scalable coding is shown.

[0094] Fig.43 An example of a display screen of a web page is shown.

[0095] Fig.44 An example of a display screen of a web page is shown.

[0096] Fig.45 An example of a smartphone is shown.

[0097] Fig.46 is a block diagram showing a configuration example of a smartphone. DETAILED DESCRIPTION

[0098] In the following, embodiments will be described with reference to the accompanying drawings. Note that the embodiments described below all illustrate general or specific examples. The numerical values, shapes, materials, components, arrangements and connections of components, steps, relationships and sequences of steps, etc. indicated in the following embodiments are merely examples and are not intended to limit the scope of the claims. Therefore, those components disclosed in the following embodiments but not listed in any independent claim of the broadest inventive concept may be understood as optional components.

[0099] Embodiments of encoders and decoders are described below. Embodiments are examples of encoders and decoders, and the processing and / or configurations presented in the description of aspects of the present disclosure may be applied to encoders and decoders. The processing and / or configurations may also be implemented in encoders and decoders different from those according to the embodiments. For example, with respect to the processing and / or configurations applied to the embodiments, any of the following may be implemented:

[0100] (1) Any component of an encoder or a decoder according to the embodiments presented in the description of the aspects of the present disclosure may be replaced with or combined with another component presented anywhere in the description of the aspects of the present disclosure.

[0101] (2) In an encoder or decoder according to an embodiment, any changes may be made to the functions or processes performed by one or more components of the encoder or decoder, such as addition, replacement, removal, etc. of functions or processes. For example, any function or process may be replaced or combined with another function or process appearing anywhere in the description of aspects of the present disclosure.

[0102] (3) In the method implemented by the encoder or decoder according to the embodiment, any changes may be made, such as adding, replacing and removing one or more processes included in the method. For example, any process in the method may be replaced or combined with another process appearing anywhere in the description of the aspects of the present disclosure.

[0103] (4) One or more components included in an encoder or decoder according to an embodiment may be combined with components presented anywhere in the description of aspects of the present disclosure, may be combined with components including one or more functions presented anywhere in the description of aspects of the present disclosure, and may be combined with components that implement one or more processing implemented by components presented in the description of aspects of the present disclosure.

[0104] (5) Components including one or more functions of an encoder or decoder according to the embodiment, or components implementing one or more processes of an encoder or decoder according to the embodiment may be combined with or replaced with components presented anywhere in the description of the various aspects of the present disclosure, or components including one or more functions presented anywhere in the description of the various aspects of the present disclosure, or components implementing one or more processes presented anywhere in the description of the various aspects of the present disclosure.

[0105] (6) In a method implemented by an encoder or a decoder according to an embodiment, any processing included in the method may be combined with or replaced with processing presented anywhere in the description of various aspects of the present disclosure or with any corresponding or equivalent processing.

[0106] (7) One or more processes included in the method implemented by an encoder or a decoder according to the embodiment may be combined with processes presented anywhere in the description of various aspects of the present disclosure.

[0107] (8) The implementation of the processing and / or configuration presented in the description of aspects of the present disclosure is not limited to the encoder or decoder according to the embodiments. For example, the processing and / or configuration may be implemented in a device for a purpose different from the motion picture encoder or motion picture decoder disclosed in the embodiments.

[0108] (Encoder)

[0109] First, an encoder according to the embodiment will be described. Figure 1 1 is a block diagram showing a functional configuration of an encoder 100 according to an embodiment. The encoder 100 is a moving picture encoder that encodes a moving picture block by block.

[0110] like Figure 1 As shown, the encoder 100 is a device for encoding a picture block by block, and includes a divider 102, a subtractor 104, a transformer 106, a quantizer 108, an entropy encoder 110, an inverse quantizer 112, an inverse transformer 114, an adder 116, a block memory 118, a loop filter 120, a frame memory 122, an intra-frame predictor 124, an inter-frame predictor 126 and a prediction controller 128.

[0111] The encoder 100 is implemented as, for example, a general purpose processor and a memory. In this case, when the processor executes a software program stored in the memory, the processor functions as a divider 102, a subtractor 104, a transformer 106, a quantizer 108, an entropy encoder 110, an inverse quantizer 112, an inverse transformer 114, an adder 116, a loop filter 120, an intra-frame predictor 124, an inter-frame predictor 126, and a prediction controller 128. Alternatively, the encoder 100 may be implemented as one or more dedicated electronic circuits 112, corresponding to the divider 102, the subtractor 104, the transformer 106, the quantizer 108, the entropy encoder 110, the inverse quantizer 112, the inverse transformer 114, the adder 116, the loop filter 120, the intra-frame predictor 124, the inter-frame predictor 126, and the prediction controller 128.

[0112] Hereinafter, each component included in the encoder 100 will be described.

[0113] (divider)

[0114] The divider 102 divides each picture included in the input motion picture into blocks, and outputs each block to the subtractor 104. For example, the divider 102 first divides the picture into blocks of a fixed size (e.g., 128×128). The fixed-size blocks may also be referred to as coding tree units (CTUs). The divider 102 then divides each fixed-size block into blocks of a variable size (e.g., 64×64 or smaller blocks) based on, for example, recursive quadtree and / or binary tree block partitioning. Variable-size blocks may also be referred to as coding units (CUs), prediction units (PUs), or transform units (TUs). In various implementations, it may not be necessary to distinguish between CUs, PUs, and TUs; all or some blocks in a picture may be processed as CUs, PUs, or TUs.

[0115] Figure 2 An example of block partitioning according to an embodiment is shown. Figure 2 , solid lines represent block boundaries of blocks divided by quadtree block partitioning, and dotted lines represent block boundaries of blocks divided by binary tree block partitioning.

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

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

[0118] The upper right 64×64 block is horizontally divided into two rectangular 64×32 blocks 14 and 15 (binary tree block partitioning).

[0119] First, the lower left 64×64 block is divided into four square 32×32 blocks (quadtree block partitioning). Among the four 32×32 blocks, the upper left block and the lower right block are further divided. The upper left 32×32 block is divided into two rectangular 16×32 blocks in the vertical direction, and the right 16×32 block is further divided into two 16×16 blocks in the horizontal direction (binary tree block partitioning). The lower right 32×32 block is divided horizontally into two 32×16 blocks (binary tree block partitioning). As a result, the lower left 64×64 block is divided into a 16×32 block 16, two 16×16 blocks 17 and 18, two 32×32 blocks 19 and 20, and two 32×16 blocks 21 and 22.

[0120] The lower right 64×64 block 23 is not divided.

[0121] As mentioned above, in Figure 2In the embodiment of the present invention, block 10 is divided into 13 variable-sized blocks 11 to 23 based on recursive quadtree and binary tree block partitioning. This type of partitioning is also called quadtree plus binary tree (QTBT) partitioning.

[0122] Although in Figure 2 In the example, a block is divided into four or two blocks (quadtree or binary tree block partitioning), but the partitioning is not limited to these examples. For example, a block can be divided into three blocks (ternary block partitioning). The partitioning including this ternary block partitioning is also called multi-type tree (MBT) partitioning.

[0123] (Subtractor)

[0124] The subtractor 104 subtracts the prediction signal (prediction sample, input from the prediction controller 128, which will be described below) from the original signal (original sample) of each block divided and input by the divider 102. In other words, the subtractor 104 calculates the prediction error (also called "residual") of the block to be encoded (hereinafter referred to as "current block"). The subtractor 104 then outputs the calculated prediction error (residual) to the transformer 106.

[0125] The original signal is a signal input to the encoder 100, and is a signal representing an image of each picture included in a moving picture (for example, a luminance signal and two chrominance signals). Hereinafter, a signal representing an image is also referred to as a sample.

[0126] (Converter)

[0127] The transformer 106 transforms the spatial domain prediction error into frequency domain transform coefficients and outputs the transform coefficients to the quantizer 108. More specifically, the transformer 106 applies, for example, a predefined discrete cosine transform (DCT) or discrete sine transform (DST) to the spatial domain prediction error.

[0128] Note that the transformer 106 can adaptively select a transform type from a plurality of transform types and transform the prediction error into a transform coefficient by using a transform basis function corresponding to the selected transform type. This type of transform is also called explicit multi-core transform (EMT) or adaptive multi-transform (AMT).

[0129] Transform types include, for example, DCT-II, DCT-V, DCT-VIII, DST-I, and DST-VII. Figure 3 is a graph indicating the transform basis functions for each transform type. Figure 3 In , N indicates the number of input pixels. For example, selecting a transform type from a plurality of transform types may depend on a prediction type (intra prediction and inter prediction) and an intra prediction mode.

[0130] Information indicating whether 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 generally signaled at the CU level. Note that the signaling of such information does not have to be performed at the CU level, but may be performed at another level (e.g., at a bit sequence level, a picture level, a slice level, a tile level, or a CTU level).

[0131] In addition, the transformer 106 may apply a secondary transform to the transform coefficients (transform results). A secondary transform in this manner is also referred to as an adaptive secondary transform (AST) or a non-separable secondary transform (NSST). For example, the transformer 106 applies a secondary transform to each sub-block (e.g., each 4×4 sub-block) included in a block of transform coefficients corresponding to an intra prediction error. Information indicating whether NSST is applied and information about the transform matrix used in NSST are typically signaled at the CU level. Note that the signaling of such information does not have to be performed at the CU level, but can be performed at another level (e.g., at a sequence level, a picture level, a slice level, a tile level, or a CTU level).

[0132] There are separate transforms and inseparable transforms that can be applied in the transformer 106. Separate transforms are a method in which a transform is performed multiple times by performing a transform for each direction according to the number of dimensional inputs. Inseparable transforms are a method of performing a collective transform in which two or more dimensions in a multi-dimensional input are collectively treated as a single dimension.

[0133] In one example of a non-separable transform, when the input is a 4x4 block, the 4x4 block is treated as a single array containing 16 components, and the transform applies a 16x16 transform matrix to the array.

[0134] In another example of a non-separable transform, after treating the input 4×4 block as a single array including 16 components, a transform (eg, a Hypercube-Givens transform) that performs multiple Givens rotations may be applied to the array.

[0135] (Quantizer)

[0136] The quantizer 108 quantizes the transform coefficient output from the transformer 106. More specifically, the quantizer 108 scans the transform coefficient of the current block in a predetermined scanning order, and quantizes the scanned transform coefficient based on a quantization parameter (QP) corresponding to the transform coefficient. Then, the quantizer 108 outputs the quantized transform coefficient of the current block (hereinafter referred to as the quantized coefficient) to the entropy encoder 110 and the inverse quantizer 112.

[0137] The predetermined scanning order is an order for quantizing / inverse quantizing transform coefficients. For example, the predetermined scanning order is defined as an ascending order of frequency (from low frequency to high frequency) or a descending order of frequency (from high frequency to low frequency).

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

[0139] (Entropy Encoder)

[0140] The entropy encoder 110 generates an encoded signal (encoded bit stream) based on the quantization coefficient input from the quantizer 108. More specifically, for example, the entropy encoder 110 binarizes the quantization coefficient and arithmetically encodes the binary signal to output a compressed bit stream or sequence.

[0141] (Inverse Quantizer)

[0142] The inverse quantizer 112 inversely quantizes the quantized coefficients input from the quantizer 108. More specifically, the inverse quantizer 112 inversely quantizes the quantized coefficients of the current block in a predetermined scanning order. Then, the inverse quantizer 112 outputs the inversely quantized transform coefficients of the current block to the inverse transformer 114.

[0143] (Inverter)

[0144] The inverse transformer 114 restores the prediction error (residual) by inversely transforming the transform coefficients input from the inverse quantizer 112. More specifically, the inverse transformer 114 restores the prediction error of the current block by applying an inverse transform corresponding to the transform applied by the transformer 106 to the transform coefficients. The inverse transformer 114 then outputs the restored prediction error to the adder 116.

[0145] Note that since typically information is lost in quantization, the recovered prediction error does not match the prediction error calculated by subtractor 104. In other words, the recovered prediction error typically includes the quantization error.

[0146] (Adder)

[0147] The adder 116 reconstructs the current block by summing the prediction error input from the inverse transformer 114 and the prediction sample input from the prediction controller 128. The adder 116 then outputs the reconstructed block to the block memory 118 and the loop filter 120. The reconstructed block is also called a local decoded block.

[0148] (Block Storage)

[0149] The block memory 118 is a storage device for storing a block in a picture to be encoded (referred to as a “current picture”) in, for example, intra prediction. More specifically, the block memory 118 stores the reconstructed block output from the adder 116 .

[0150] (Loop Filter)

[0151] The loop filter 120 applies a loop filter to the block reconstructed by the adder 116, and outputs the filtered reconstructed block to the frame memory 122. The loop filter is a filter (loop filter) used in an encoding loop, and includes, for example, a deblocking filter (DF), a sample adaptive offset (SAO), and an adaptive loop filter (ALF).

[0152] In ALF, a least square error filter for removing compression artifacts is applied. For example, based on the direction and activity of the local gradient, a filter is selected from multiple filters for each 2×2 sub-block in the current block and applied.

[0153] Specifically, first, each sub-block (e.g., each 2×2 sub-block) is classified into one of a plurality of categories (e.g., 15 or 25 categories). The classification of the sub-block is based on gradient directionality and activity. For example, a classification index C (e.g., C=5D+A) is derived based on gradient directionality D (e.g., 0 to 2 or 0 to 4) and gradient activity A (e.g., 0 to 4). Then, based on the classification index C, each sub-block is classified into one of a plurality of categories.

[0154] For example, the gradient directivity D is calculated by comparing the gradients in multiple directions (eg, horizontal direction, vertical direction, and two diagonal directions). Also, for example, the gradient activity A is calculated by summing the gradients in multiple directions and quantizing the sum.

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

[0156] The filter shape used in the ALF is, for example, a circularly symmetric filter shape. Figure 4A , Figure 4B and Figure 4C An example of filter shape used in ALF is shown. Figure 4A A 5x5 diamond filter is shown. Figure 4B shows a 7×7 diamond filter, and Figure 4C A 9×9 diamond filter is shown. Information indicating the filter shape is typically signaled at the picture level. Note that the signaling of information indicating the filter shape does not have to be performed at the picture level, but can be performed at another level (e.g., at the sequence level, slice level, tile level, CTU level, or CU level).

[0157] The enabling or disabling of ALF may be determined at a picture level or a CU level. For example, for luma, whether to apply ALF may be determined at a CU level, and for chroma, whether to apply ALF may be determined at a picture level. Information indicating whether ALF is enabled or disabled is typically signaled at a picture level or a CU level. Note that the signaling of information indicating whether ALF is enabled or disabled does not have to be performed at a picture level or a CU level, but may be performed at another level (e.g., at a sequence level, a slice level, a tile level, or a CTU level).

[0158] The coefficients for multiple selectable filter sets (e.g., 15 or 25 filters) are typically signaled at the picture level. Note that the signaling of coefficient sets does not have to be performed at the picture level, but can be performed at another level (e.g., at the sequence level, slice level, tile level, CTU level, CU level, or sub-block level).

[0159] (Frame Memory)

[0160] The frame memory 122 is, for example, a storage device for storing a reference picture used in inter-frame prediction, and is also referred to as a frame buffer. More specifically, the frame memory 122 stores the reconstructed block filtered by the loop filter 120.

[0161] (Intra Predictor)

[0162] The intra predictor 124 generates a prediction signal (intra prediction signal) (also referred to as intra prediction) by performing intra prediction on the current block with reference to one or more blocks in the current picture stored in the block memory 118. More specifically, the intra predictor 124 generates the intra prediction signal by intra prediction with reference to samples (e.g., luminance and / or chrominance values) of one or more blocks adjacent to the current block, and then outputs the intra prediction signal to the prediction controller 128.

[0163] For example, the intra predictor 124 performs intra prediction by using one of a plurality of predefined intra prediction modes. The intra prediction modes generally include one or more non-directional prediction modes and a plurality of directional prediction modes.

[0164] The one or more non-directional prediction modes include, for example, planar prediction mode and DC prediction mode defined in the H.265 / HEVC standard.

[0165] The plurality of directional prediction modes include, for example, 33 directional prediction modes defined in the H.265 / HEVC standard. Note that the plurality of directional prediction modes may include 32 directional prediction modes in addition to the 33 directional prediction modes (for a total of 65 directional prediction modes).

[0166] Figure 5AA total of 67 intra prediction modes (two non-directional prediction modes and 65 directional prediction modes) used in intra prediction are shown. Solid arrows represent 33 directions defined in the H.265 / HEVC standard, while dashed arrows represent the other 32 directions. (In Figure 5A The two "non-directional" prediction modes are not shown.)

[0167] In various implementations, a luma block may be referenced in chroma block intra prediction. That is, the chroma component of the current block may be predicted based on the luma component of the current block. Such intra prediction is also referred to as cross-component linear model (CCLM) prediction. A chroma block intra prediction mode (e.g., referred to as CCLM mode) that references a luma block may be added as one of the chroma block intra prediction modes.

[0168] The intra predictor 124 may correct the intra predicted pixel value based on the horizontal / vertical reference pixel gradient. Intra prediction with such correction is also referred to as position dependent intra prediction combination (PDPC). Information indicating whether PDPC is applied (e.g., referred to as a PDPC flag) is typically signaled at the CU level. Note that the signaling of this information does not have to be performed at the CU level, but may be performed at another level (e.g., at a sequence level, a picture level, a slice level, a tile level, or a CTU level).

[0169] (Inter-frame predictor)

[0170] The inter-frame predictor 126 generates a prediction signal (inter-frame prediction signal) by inter-predicting the current block with reference to one or more blocks in a reference picture that is different from the current picture and stored in the frame memory 122. Inter-frame prediction is performed on each current block or each current sub-block (e.g., each 4×4 block) in the current block. For example, the inter-frame predictor 126 performs motion estimation in the reference picture for the current block or current sub-block to find a reference block or sub-block in the reference picture that best matches the current block or sub-block. Then, the inter-frame predictor 126 performs motion compensation (or motion prediction) based on the motion estimation to obtain motion information (e.g., motion vector) that compensates (or predicts) the motion or change from the reference block or sub-block to the current block or sub-block, and generates an inter-frame prediction signal for the current block or sub-block based on the motion information. The inter-frame predictor 126 then outputs the generated inter-frame prediction signal to the prediction controller 128.

[0171] The motion information used for motion compensation can be signaled in various forms as an inter-frame prediction signal. For example, a motion vector can be signaled. As another example, the difference between a motion vector and a motion vector predictor can be signaled.

[0172] Note that in addition to the motion information for the current block obtained from motion estimation, the motion information for the neighboring blocks can also be used to generate the inter prediction signal. More specifically, the inter prediction signal can be generated for each subblock in the current block by calculating a weighted sum of the prediction signal based on the motion information obtained from motion estimation (in the reference picture) and the prediction signal based on the motion information of the neighboring blocks (in the current picture). This inter prediction (motion compensation) is also called overlapped block motion compensation (OBMC).

[0173] In the OBMC mode, information indicating a sub-block size for OBMC (e.g., referred to as an OBMC block size) may be signaled at the sequence level. In addition, information indicating whether the OBMC mode is applied (e.g., referred to as an OBMC flag) may be signaled at the CU level. Note that the signaling of such information does not have to be performed at the sequence level and the CU level, but may be performed at another level (e.g., at a picture level, a slice level, a tile level, a CTU level, or a sub-block level).

[0174] Hereinafter, the OBMC mode will be described in more detail. Figure 5B is a flow chart, and Figure 5C is a conceptual diagram illustrating a predicted image correction process performed by the OBMC process.

[0175] Reference Figure 5C First, a predicted image (Pred) is obtained by typical motion compensation using the motion vector (MV) assigned to the target (current) block. Figure 5C In FIG. 8 , the arrow “MV” points to the reference picture to indicate what the current block in the current picture is referring to in order to obtain the predicted image.

[0176] Next, a predicted image (Pred_L) is obtained by applying (reusing) the motion vector (MV_L) that has been derived for the coded adjacent left block to the target (current) block, as indicated by the arrow "MV_L" starting from the current block and pointing to the reference picture to obtain the predicted image Pred_L. The two predicted images Pred and Pred_L are then superimposed to perform a first pass of correction of the predicted image, which on the one hand has the effect of blending the boundaries between adjacent blocks.

[0177] Similarly, a predicted image (Pred_U) is obtained by applying the (reused) motion vector (MV_U) to the target (current) block, which motion vector has been derived for the coded adjacent upper block, as indicated by the arrow "MV_U" starting from the current block and pointing to the reference picture to obtain the predicted image Pred_U. The predicted image Pred_U is then superimposed with the predicted images obtained from the first pass (i.e., Pred and Pred_L) to perform a second pass of correction of the predicted images, which on the one hand has the effect of blending the boundaries between adjacent blocks. The result of the second pass is the final predicted image of the current block, whose boundaries are fused (smoothed) with the adjacent blocks.

[0178] Note that the above example is a two-pass correction method using adjacent left and upper blocks, but the method may be a three-pass or higher-pass correction method also using adjacent right and / or lower blocks.

[0179] Note that the area to be superimposed may be the entire pixel area of ​​the block, and, alternatively, may be a portion of the block boundary area.

[0180] Note that here, the prediction image correction process of OBMC is described as being based on a single reference picture to derive a single prediction image Pred on which the additional prediction images Pred_L and Pred_U are superimposed, but when the prediction image is corrected based on the plurality of reference pictures, the same process can be applied to each of the plurality of reference pictures. In this case, after obtaining a plurality of corrected prediction images by performing image correction of OBMC based on the plurality of reference pictures, respectively, the obtained plurality of corrected prediction images are further superimposed to obtain a final prediction image.

[0181] Note that in OBMC, the unit of the target block may be a prediction block, and, alternatively, may be a subblock obtained by further dividing the prediction block.

[0182] One example of a method for determining whether to implement OBMC processing is to use obmc_flag, which is a signal indicating whether to implement OBMC processing. As a specific example, the encoder can determine whether the target block belongs to an area including complex motion. When the block belongs to an area including complex motion, the encoder sets obmc_flag to a value of "1" and implements OBMC processing during encoding; when the block does not belong to an area including complex motion, obmc_flag is set to a value of "0" and the block is encoded without implementing OBMC processing. The decoder switches between whether to implement OBMC processing by decoding obmc_flag in the write stream (i.e., the compressed sequence) and performing decoding according to the flag value.

[0183] Note that the motion information can be derived at the decoder side without signaling from the encoder side. For example, the merge mode defined in the H.265 / HEVC standard can be used. In addition, for example, the motion information can be derived by performing motion estimation at the decoder side. In this case, the decoder side can perform motion estimation without using the pixel values ​​of the current block.

[0184] Here, a mode for performing motion estimation at the decoder side will be described. The mode for performing motion estimation at the decoder side is also called a pattern matching motion vector derivation (PMMVD) mode or a frame rate up conversion (FRUC) mode.

[0185] An example of FRUC processing is in Figure 5D As shown in . First, a candidate list of candidates (the candidate list may be a merge list) is generated with reference to the motion vector of the coding block adjacent to the current block in space or time, each candidate including a predicted motion vector (MV). Next, the best candidate MV is selected from a plurality of candidate MVs registered in the candidate list. For example, an evaluation value of the candidate MVs included in the candidate list is calculated, and a candidate MV is selected based on the calculated evaluation value.

[0186] Next, the motion vector of the current block is derived from the motion vectors of the selected candidates. More specifically, for example, the motion vector of the current block is calculated according to the motion vector of the selected candidate (best candidate MV). Alternatively, the motion vector of the current block can be derived by pattern matching performed near the position corresponding to the motion vector of the selected candidate in the reference picture. In other words, when the vicinity of the best candidate MV is searched using pattern matching and evaluation values ​​in the reference picture, and an MV with a better evaluation value is found, the best candidate MV can be updated to the MV with the better evaluation value, and the MV with the better evaluation value can be used as the final MV of the current block. A configuration in which the process of updating the MV with a better evaluation value is not implemented is also acceptable.

[0187] In the case where processing is performed in units of sub-blocks, the same processing can be performed.

[0188] The evaluation value may be calculated in various ways. For example, a reconstructed image of an area corresponding to a motion vector in a reference picture is compared with a reconstructed image of a predetermined area (e.g., in another reference picture or in an adjacent block of a current picture, for example, as described above), and the difference in pixel values ​​between the two reconstructed images may be calculated and used as the evaluation value of the motion vector. Note that the evaluation value may be calculated by using some other information in addition to the difference.

[0189] Next, pattern matching is described in detail. First, a candidate MV included in a candidate list (e.g., a merged list) is selected as a starting point for searching by pattern matching. The pattern matching used is a first pattern matching or a second pattern matching. The first pattern matching and the second pattern matching are also referred to as bilateral matching and template matching, respectively.

[0190] In the first pattern matching, pattern matching is performed between two blocks in two different reference pictures that are both along the motion trajectory of the current block. Therefore, in the first pattern matching, for an area in a reference picture, an area in another reference picture that matches the motion trajectory of the current block is used as a predetermined area for the above calculation of the estimated value of the candidate.

[0191] Figure 6 An example of a first pattern match (bilateral matching) between two blocks in two reference pictures along a motion trajectory is shown. Figure 6 As shown, in the first pattern matching, two motion vectors (MV0, MV1) are obtained by finding the best match between two blocks in two different reference pictures (Ref0, Ref1) along the motion trajectory of the current block (Cur block). More specifically, the difference can be obtained between (i) the reconstructed image at the position specified by the candidate MV in the first encoded reference picture (Ref0) and (ii) the reconstructed image at the position specified by the candidate MV symmetrically scaled according to the display time interval in the second encoded reference picture (Ref1). Then, the difference can be used to derive the evaluation value of the current block. The candidate MV with the best evaluation value can be selected as the final MV among multiple candidate MVs.

[0192] Under the assumption of continuous motion trajectory, the motion vectors (MV0, MV1) pointing to the two reference blocks are proportional to the temporal distance (TD0, TD1) between the current picture (Cur Pic) and the two reference pictures (Ref0, Ref1). For example, when the current picture is temporally between the two reference pictures and the temporal distance from the current picture to the two reference pictures is the same, the first pattern matching results in two mirrored bilateral motion vectors.

[0193] In the second pattern matching (template matching), pattern matching is performed between a template in the current picture (a block adjacent to the current block in the current picture; for example, a top and / or left adjacent block) and a block in the reference picture. Therefore, in the second pattern matching, a block adjacent to the current block in the current picture is used as a predetermined area for the above-mentioned calculation of the candidate evaluation value.

[0194] Figure 7 An example of pattern matching (template matching) between a template in a current picture and a block in a reference picture is shown. Figure 7As shown, in the second pattern matching, the motion vector of the current block is obtained by searching in the reference picture (Ref0) to find the block that best matches the neighboring block of the current block (Cur block) in the current picture (Cur Pic). More specifically, a difference can be obtained between (i) a reconstructed image of one or both of the adjacent upper and left regions relative to the encoding of the current block and (ii) a reconstructed image of the same region relative to the block position specified by the candidate MV in the encoded reference picture (Ref0). Then, the difference can be used to derive an evaluation value of the current block. A candidate MV with the best evaluation value can be selected as the best candidate MV among multiple candidate MVs.

[0195] Information indicating whether the FRUC mode is applied (e.g., referred to as a FRUC flag) may be signaled at the CU level. In addition, when the FRUC mode is applied (e.g., when the FRUC flag is set to true), information indicating a mode applicable to the matching method (e.g., first mode matching or second mode matching) may be signaled at the CU level. Note that signaling of such information does not have to be performed at the CU level, but may be performed at another level (e.g., at a sequence level, a picture level, a slice level, a tile level, a CTU level, or a sub-block level).

[0196] Next, a method of deriving motion vectors is described. First, a description is given of a mode for deriving motion vectors based on a model assuming uniform linear motion. This mode is also called the bilateral optical flow (BIO) mode.

[0197] Figure 8 A model assuming uniform linear motion is shown. Figure 8 In (v x , v y ) represents a velocity vector, and τ0 and τ1 represent the temporal distances between the current picture (Cur Pic) and two reference pictures (Ref0, Ref1), respectively. (MVx0, MVy0) represents a motion vector corresponding to the reference picture Ref0, and (MVx1, MVy1) represents a motion vector corresponding to the reference picture Ref1.

[0198] Here, assuming that the velocity vector (v x , v y ), (MVx0, MVy0) and (MVx1, MVy1) are expressed as (v x τ0,v y τ0) and (-v x τ1, -v y τ1), and gives the following optical flow formula (Formula 1).

[0199] [Mathematics.1]

[0200]

[0201] Here, I (k) represents the luminance value of the reference picture k (k=0, 1) after motion compensation. The optical flow formula shows that the sum of (i) the temporal derivative of the luminance value, (ii) the product of the horizontal velocity and the horizontal component of the spatial gradient of the reference picture and (iii) the product of the vertical velocity and the vertical component of the spatial gradient of the reference picture is equal to zero. The motion vector of each block obtained from, for example, the merge list can be corrected pixel by pixel based on a combination of the optical flow formula and Hermitian interpolation.

[0202] Note that the motion vectors may be derived on the decoder side using methods other than deriving the motion vectors based on a model assuming uniform linear motion. For example, a motion vector may be derived for each sub-block based on the motion vectors of neighboring blocks.

[0203] Next, a description is given of a mode in which a motion vector is derived for each subblock based on motion vectors of neighboring blocks. This mode is also called an affine motion compensation prediction mode.

[0204] Fig. 9A An example of obtaining the motion vector of each sub-block based on the motion vectors of adjacent blocks is shown. Fig. 9A In the example, the current block includes 16 4×4 sub-blocks. Here, the motion vector v0 of the upper left corner control point in the current block is derived based on the motion vectors of the adjacent sub-blocks. Similarly, the motion vector v1 of the upper right corner control point in the current block is derived based on the motion vectors of the adjacent blocks. Then, using the two motion vectors v0 and v1, the motion vector (v x , v y ).

[0205] [Mathematics.2]

[0206]

[0207] Here, x and y are the horizontal position and vertical position of the sub-block, respectively, and w is a predetermined weighting coefficient.

[0208] The affine motion compensation prediction mode may include multiple modes of different methods of deriving motion vectors for the upper left and upper right control points. Information indicating the affine motion compensation prediction mode (e.g., referred to as an affine flag) may be signaled at the CU level. Note that the signaling of the information indicating the affine motion compensation prediction mode does not have to be performed at the CU level, but may be performed at another level (e.g., at a sequence level, a picture level, a slice level, a tile level, a CTU level, or a sub-block level).

[0209] (Predictive Controller)

[0210] The prediction controller 128 selects the intra prediction signal (output from the intra predictor 124 ) or the inter prediction signal (output from the inter predictor 126 ), and outputs the selected prediction signal to the subtractor 104 and the adder 116 .

[0211] like Figure 1 As shown, in various embodiments, the prediction controller 128 may output prediction parameters that are input to the entropy encoder 110. The entropy encoder 110 may generate an encoded bitstream (or sequence) based on the prediction parameters input from the prediction controller 128 and the quantized coefficients input from the quantizer 108. The prediction parameters may be used by a decoder that receives and decodes the encoded bitstream to perform the same prediction process as performed in the intra predictor 124, the inter predictor 126, and the prediction controller 128. The prediction parameters may include a selected prediction signal (e.g., a motion vector, a prediction type, or a prediction mode used in the intra predictor 124 or the inter predictor 126), or any index, flag, or value based on or indicating the prediction process performed in the intra predictor 124, the inter predictor 126, and the prediction controller 128.

[0212] In some embodiments, the prediction controller 128 operates in a merge mode to use both the intra prediction signal from the intra predictor 124 and the inter prediction signal from the inter predictor 126 to optimize the motion vector calculated for the current picture. Fig. 9B One example of a process for deriving a motion vector in a current picture in merge mode is shown.

[0213] First, a prediction MV list is generated in which prediction MV candidates are registered. Examples of prediction MV candidates include: spatial neighbor prediction MV, which is the MV of a coding block located in the spatial vicinity of the target block; temporal neighbor prediction MV, which is the MV of a block in a coding reference picture adjacent to a block located at the same position as the target block; coupled prediction MV, which is an MV generated by combining the MV values ​​of the spatial neighbor prediction MV and the temporal neighbor prediction MV; and zero prediction MV, which is an MV with a value of zero.

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

[0215] Furthermore, in the variable length encoder, merge_idx, which is a signal indicating which predicted MV is selected, is written and encoded into the stream.

[0216] Note that Fig. 9B An example of a predicted MV registered in the predicted MV list is shown in . The number of predicted MVs registered in the predicted MV list can be Fig. 9B The quantities shown vary and are Fig. 9B In the example of Fig. 9B One or more types of predicted MVs are given in the examples, and in addition to Fig. 9B outside the types given in the examples and with Fig. 9B Different from the types given in the example, the predicted MVs registered in the predicted MV list may include one or more types of predicted MVs.

[0217] The final MV can be determined by performing a DMVR (Dynamic Motion Vector Refresh) process (described later) using the MV of the target block derived in the merge mode.

[0218] Fig. 9C is a conceptual diagram illustrating an example of DMVR processing for determining MV.

[0219] First, the most appropriate MV set for the current block (for example, in merge mode) is considered as a candidate MV. Then, according to the candidate MV (L0), reference pixels are identified in the first reference picture (L0), which is a coded picture in the L0 direction. Similarly, according to the candidate MV (L1), reference pixels are identified in the second reference picture (L1), which is a coded picture along the L1 direction. The reference pixels are then averaged to form a template.

[0220] Next, using the template, search the surrounding areas of the candidate MVs of the first reference image (L0) and the second reference image (L1), and determine the MV with the lowest cost as the final MV. For example, the cost value can be calculated using the difference between each pixel value in the template and each pixel value in the searched area, using the candidate MV, etc.

[0221] Note that the configuration and operation of the processing described here are basically the same on both the encoder side and the decoder side, which will be described below.

[0222] Any processing other than the above-described processing may be used as long as the processing can derive the final MV by searching the surroundings of the candidate MVs.

[0223] Next, an example of a mode of generating a predicted image (prediction) using LIC (Local Illumination Compensation) processing is given.

[0224] Fig.9D One example of a predicted image generation method using a brightness correction process performed by the LIC process is shown.

[0225] First, the MV is derived from the encoded reference picture to obtain the reference picture corresponding to the current block.

[0226] Next, for the current block, based on the brightness pixel values ​​of the encoded adjacent left reference area and the encoded adjacent upper reference area in the current picture, and based on the brightness pixel values ​​of the same position in the reference picture specified by the MV, information indicating how the brightness value changes between the reference picture and the current picture is obtained. The information indicating how the brightness value changes is used to calculate the brightness correction parameter.

[0227] The predicted image of the current block is generated by performing a brightness correction process that applies a brightness correction parameter to a reference picture among reference pictures specified by the MV.

[0228] Please note, Fig.9D The shape of the surrounding reference area shown is only an example; the surrounding reference area may have a different shape.

[0229] In addition, although the predicted image is generated based on a single reference picture in the present example, in the case where the predicted image is generated based on multiple reference pictures, as described above, after performing brightness correction processing, the predicted image can be generated on the reference picture obtained from the reference picture.

[0230] One example of a method for determining whether to implement LIC processing is to use lic_flag, which is a signal indicating whether to implement LIC processing. As a specific example, the encoder determines whether the current block belongs to a brightness change area. When the block belongs to a brightness change area, the encoder sets lic_flag to a value of "1" and implements LIC processing during encoding. When the block does not belong to a brightness change area, the encoder sets lic_flag to "0" and performs encoding that implements LIC processing. The decoder can switch between implementing LIC processing or not implementing LIC processing by decoding lic_flag written in the bitstream and performing decoding according to the flag value.

[0231] An example of different methods of determining whether to implement LIC processing includes determining whether to determine whether LIC processing is implemented for surrounding blocks. In a specific example, when the merge mode is used on the current block, it is determined whether LIC processing is applied in the encoding of the surrounding coding blocks, which are selected when deriving the MV in the merge mode. Then, this determination is used to further determine whether LIC processing is implemented for the current block. Please note that in this example, the same situation also applies to the processing performed on the decoder side.

[0232] (Decoder)

[0233] Next, a decoder capable of decoding an encoded signal (encoded bit stream) output from the encoder 100 will be described. Fig.10is a block diagram showing a functional configuration of a decoder 200 according to an embodiment. The decoder 200 is a moving picture decoder that decodes a moving picture block by block.

[0234] like Fig.10 As shown, the decoder 200 includes an entropy decoder 202, an inverse quantizer 204, an inverse transformer 206, an adder 208, a block memory 210, a loop filter 212, a frame memory 214, an intra-frame predictor 216, an inter-frame predictor 218 and a prediction controller 220.

[0235] The decoder 200 is implemented as, for example, a general purpose processor and a memory. In this case, when the processor executes a software program stored in the memory, the processor functions are an entropy decoder 202, an inverse quantizer 204, an inverse transformer 206, an adder 208, a loop filter 212, an intra-frame predictor 216, an inter-frame predictor 218, and a prediction controller 220. Alternatively, the decoder 200 may be implemented as one or more dedicated electronic circuits corresponding to the entropy decoder 202, the inverse quantizer 204, the inverse transformer 206, the adder 208, the loop filter 212, the intra-frame predictor 216, the inter-frame predictor 218, and the prediction controller 220.

[0236] Each component included in the decoder 200 will be described below.

[0237] (Entropy Decoder)

[0238] The entropy decoder 202 entropy decodes the encoded bit stream. More specifically, for example, the entropy decoder 202 arithmetically decodes the encoded bit stream into a binary signal. The entropy decoder 202 then de-binarizes the binary signal. The entropy decoder 202 outputs the quantized coefficients of each block to the inverse quantizer 204. The entropy decoder 202 may also output the prediction parameters (which may be included in the encoded bit stream (see Figure 1 ) is output to the intra predictor 216, the inter predictor 218 and the prediction controller 220 so that they can perform the same prediction processing as that performed on the encoder side in the intra predictor 124, the inter predictor 126 and the prediction controller 128.

[0239] (Inverse Quantizer)

[0240] The inverse quantizer 204 inversely quantizes the quantized coefficients of the block to be decoded (hereinafter referred to as the current block), which are input from the entropy decoder 202. More specifically, based on the quantization parameters corresponding to the quantized coefficients, the inverse quantizer 204 inversely quantizes the quantized coefficients of the current block. The inverse quantizer 204 then outputs the inverse quantized coefficients (i.e., transform coefficients) of the current block to the inverse transformer 206.

[0241] (Inverter)

[0242] The inverse transformer 206 restores a prediction error (residual) by inversely transforming the transform coefficients, which are input from the inverse quantizer 204 .

[0243] For example, when information parsed from the encoded bitstream indicates application of EMT or AMT (eg, when the AMT flag is set to true), the inverse transformer 206 inversely transforms transform coefficients of the current block based on information indicating the parsed transform type.

[0244] Furthermore, for example, when the information parsed from the encoded bit stream indicates application of NSST, the inverse transformer 206 applies a secondary inverse transform to the transform coefficients.

[0245] (Adder)

[0246] The adder 208 reconstructs the current block by summing the prediction error input from the inverse transformer 206 and the prediction sample input from the prediction controller 220. The adder 208 then outputs the reconstructed block to the block memory 210 and the loop filter 212.

[0247] (Block Storage)

[0248] The block memory 210 stores blocks in a picture to be decoded (hereinafter referred to as a current picture) for reference in intra prediction. More specifically, the block memory 210 stores the reconstructed blocks output from the adder 208 .

[0249] (Loop Filter)

[0250] The loop filter 212 applies a loop filter to the block reconstructed by the adder 208 and outputs the filtered reconstructed block to the frame memory 214, for example, to a display device.

[0251] When the information indicating enable or disable of the ALF parsed from the encoded bitstream indicates enable, 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.

[0252] (Frame Memory)

[0253] The frame memory 214 is a memory for storing reference pictures used for inter-frame prediction, and is also referred to as a frame buffer. More specifically, the frame memory 214 stores the reconstructed blocks filtered by the loop filter 212.

[0254] (Intra Predictor)

[0255] The intra predictor 216 generates a prediction signal (intra prediction signal) by intra prediction with reference to one or more blocks in the current picture stored in the block memory 210. More specifically, the intra predictor 216 generates the intra prediction signal by intra prediction with reference to samples (e.g., luminance and / or chrominance values) of one or more blocks adjacent to the current block, and then outputs the intra prediction signal to the prediction controller 220.

[0256] Note that when the intra prediction mode of intra-predicting a chroma block from a luma block is selected, the intra predictor 216 may predict the chroma components of the current block based on the luma components of the current block.

[0257] Furthermore, when information indicating application of PDPC is parsed from the encoded bitstream (eg, in the prediction parameters output from the entropy decoder 202), the intra predictor 216 corrects the post-intra-prediction pixel value based on the horizontal / vertical reference pixel gradients.

[0258] (Inter-frame predictor)

[0259] The inter-frame predictor 218 predicts the current block with reference to the reference picture stored in the frame memory 214. Inter-frame prediction is performed on each current block or each sub-block (e.g., each 4×4 block) in the current block. For example, the inter-frame predictor 218 generates an inter-frame prediction signal of the current block or sub-block based on motion compensation using motion information (e.g., motion vector) parsed from the encoded bit stream (e.g., in the prediction parameters output from the entropy decoder 202), and outputs the inter-frame prediction signal to the prediction controller 220.

[0260] When information parsed from the encoded bitstream indicates application of the OBMC mode, the inter predictor 218 generates an inter prediction signal using motion information of neighboring blocks in addition to motion information of the current block obtained from motion estimation.

[0261] In addition, when the information parsed from the encoded bitstream indicates the application of the FRUC mode, the predictor 218 derives motion information by performing motion estimation according to the pattern matching method (bilateral matching or template matching) parsed from the encoded bitstream. The inter-frame predictor 218 then performs motion compensation (prediction) using the derived motion information.

[0262] In addition, when the BIO mode is applied, the inter-frame predictor 218 derives a motion vector based on a model assuming uniform rectilinear motion. Further, when the information parsed from the encoded bitstream indicates that the affine motion compensation prediction mode is applied, the inter-frame predictor 218 derives a motion vector for each sub-block based on the motion vectors of the neighboring blocks.

[0263] (Predictive Controller)

[0264] The prediction controller 220 selects an intra prediction signal or an inter prediction signal and outputs the selected prediction signal to the adder 208. In addition, the prediction controller 220 can perform various functions and operations, such as a merge mode (see Fig. 9B ), DMVR processing (see Fig. 9C ) and LIC treatment ( Fig.9D ), as described above, with reference to the prediction controller 128 on the encoder side. In general, the configuration, functionality, and operation of the prediction controller 220, the inter-frame predictor 218, and the intra-frame predictor 216 on the decoder side may correspond to the configuration, functionality, and operation of the prediction controller 128, the inter-frame predictor 126, and the intra-frame predictor 124 on the encoder side.

[0265] (Detailed description of inter-frame prediction)

[0266] The following describes an example according to another embodiment of inter-frame prediction consistent with the present application. This embodiment relates to inter-frame prediction in the so-called BIO mode. In this embodiment, the motion vector of the block is not corrected in pixel units, such as Figures 1 to 10 The explanation of this embodiment will focus on the correction of Figures 1 to 10 The differences are shown.

[0267] Because the configuration of the encoder and decoder in this embodiment is similar to Figures 1 to 10 The configurations in the illustrated embodiments are substantially the same, so that illustration and description of these configurations are omitted.

[0268] (Inter-frame prediction)

[0269] Fig.11 is a flowchart showing inter-frame prediction in this embodiment. Fig.12 1 is a conceptual diagram for explaining inter prediction in the present embodiment. The following processing is performed by the inter predictor 126 in the encoder 100 and the inter predictor 218 in the decoder 200.

[0270] like Fig.11 As shown, first, a block loop process (S101 to S111) is performed on a plurality of blocks in a picture to be encoded / decoded (current picture 1000). Fig.12 In the process, a block to be encoded / decoded is selected from a plurality of blocks as a current block 1001.

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

[0272] In the reference picture loop processing, the block motion vector is first derived or obtained to obtain a predicted image from the reference picture (S103). Fig.12 , a first motion vector 1110 (MV_L0) is derived or obtained for a first reference picture 1100, and a second motion vector 1210 (MV_L1) is derived or obtained for a second reference picture 1200. Examples of motion vector derivation methods that can be used include ordinary inter prediction mode, merge mode, and FRUC mode. In the case of ordinary inter prediction mode, the encoder 100 derives the motion vector using motion search, and the decoder 200 obtains the motion vector from the bitstream.

[0273] Then, motion compensation is performed using the derived or acquired motion vector to obtain a predicted image from the reference picture (S104). Fig.12 In the example, a first predicted image 1140 is obtained from a first reference picture 1100 by performing motion compensation using a first motion vector 1110. Likewise, a second predicted image 1240 is obtained from a second reference picture 1200 by performing motion compensation using a second motion vector 1210.

[0274] In motion compensation, a motion compensation filter is applied to a reference picture. A motion compensation filter is an interpolation filter that is used to obtain a predicted image with sub-pixel accuracy. Fig.12 Using the first reference picture 1100, pixels in a first interpolation range 1130, including pixels in the first prediction block 1120 and surrounding pixels, are referenced by a motion compensation filter in the first prediction block 1120 indicated by a first motion vector 1110. In addition, using the second reference picture 1200, pixels in a second interpolation range 1230, including pixels in the second prediction block 1220 and surrounding pixels, are referenced by a motion compensation filter in the second prediction block 1220 indicated by a second motion vector 1210.

[0275] Note that the first interpolation reference range 1130 and the second interpolation range 1230 include a first common reference range and a second common reference range, which are used to perform motion compensation of the current block 1001 in a common inter prediction in which a local motion estimation value is used to perform processing. The first common reference range is contained in the first reference picture 1100, and the second common reference range is contained in the second reference picture 1200. In a common inter prediction, a motion vector is derived in a block using a motion search, motion compensation is performed in a block on the derived motion vector, and a motion compensated image is used as a final predicted image. In other words, a local motion estimation value is not used for a common inter prediction. Note that the first interpolation reference range 1130 and the second interpolation reference range 1230 may match the first common reference range and the second common reference range.

[0276] Next, a gradient image corresponding to the predicted image is obtained from the reference image (S105). Each pixel in the gradient image has a gradient value indicating a spatial slope of brightness or color difference. The gradient value is obtained by applying a gradient filter to the reference image. Fig.12 In the first reference picture 1100 in FIG. 1 , pixels in a first gradient reference range 1135 including pixels in a first prediction block 1120 and surrounding pixels are referenced using a gradient filter of the first prediction block 1120. The first gradient reference range 1135 is included in the first interpolation reference range 1130. In the second reference picture 1200, pixels in a second gradient reference range 1235 including pixels in a second prediction block 1220 and surrounding pixels are referenced using a gradient filter of the second prediction block 1220. The second gradient reference range 1235 is included in the second interpolation reference range 1230.

[0277] When the predicted image and the gradient image are obtained from the first reference image and the second reference image, the reference image loop processing (S106) is terminated. Then, the loop processing is performed on the sub-blocks obtained by further dividing the block (S107 to S110). The size of each sub-block is smaller than the size of the current block (for example, the size is 4x4 pixels).

[0278] In the sub-block loop processing, firstly, a local motion estimation value 1300 is obtained using the first predicted image 1140, the second predicted image 1240, the first gradient image 1150, and the second gradient image 1250 obtained from the first reference picture 1100 and the second reference picture 1200 (S108). For example, pixels in each predicted sub-block in the first predicted image 1140, the second predicted image 1240, the first gradient image 1150, and the second gradient image 1250 are referenced, and a local motion estimation value 1300 is obtained for the sub-block. The predicted sub-block is an area in the first predicted block 1140 and the second predicted block 1240 corresponding to the sub-block in the current block 1001. The local motion estimation value is sometimes referred to as a corrected motion vector.

[0279] Next, a final prediction image 1400 of the sub-block is generated using the pixel values ​​in the first prediction image 1140 and the second prediction image 1240, the gradient values ​​in the first gradient image 1150 and the second gradient image 1250, and the local motion estimation value 1300. When the final prediction image is generated for each sub-block in the current block, the final prediction image is generated for the current block, and the sub-block loop process (S110) is terminated.

[0280] When the block loop process is completed (S111), Fig.11 The processing in is completed.

[0281] Note that by assigning the motion vector of the sub-block of the current block to each sub-block, the prediction image and the gradient image can be obtained at the sub-block level.

[0282] (Reference Ranges of Motion Compensation Filter and Gradient Filter in Example of Present Embodiment) An example of the reference ranges of the motion compensation filter and the gradient filter according to the present embodiment is described below.

[0283] Fig.13 is a conceptual diagram for explaining an example of a reference range of a motion compensation filter and a gradient filter according to an example of the present embodiment.

[0284] exist Fig.13 In , each circle represents a sample. Fig.13 In the example shown, the size of the current block is 8x8 samples and the size of the sub-block is 4x4 samples.

[0285] The reference range 1131 is a reference range (e.g., a square range of 8x8 samples) of a motion compensation filter applied to the upper left sample 1122 of the first prediction block 1120. The reference range 1231 is a reference range (e.g., a square range of 8x8 samples) of a motion compensation filter applied to the upper left sample 1222 of the second prediction block 1220.

[0286] The reference range 1132 is a reference range (e.g., a square range of 6x6 samples) of the gradient filter applied to the upper left sample 1122 of the first prediction block 1120. The reference range 1232 is a reference range (e.g., a square range of 6x6 samples) of the gradient filter applied to the upper left sample 1222 of the second prediction block 1220.

[0287] The motion compensation filter and the gradient filter are applied to other samples in the first prediction block 1120 and the second prediction block 1220, while referring to samples in a reference range of the same size at a position corresponding to each sample. Therefore, samples in the first interpolation range 1130 and the second interpolation range 1230 are referenced to obtain the first prediction image 1140 and the second prediction image 1240. In addition, samples in the first gradient range 1135 and the second gradient range 1235 are also referenced to obtain the first gradient image 1150 and the second gradient image 1250.

[0288] (Influence, etc.)

[0289] In this way, the encoder and decoder in this embodiment can derive local motion estimation values ​​in sub-blocks. Therefore, compared with deriving local motion estimation values ​​in sample units, the processing burden or processing time can be reduced, while the prediction error is reduced by using the local motion estimation values ​​in sub-sample units.

[0290] In addition, the encoder and decoder in this embodiment can use the interpolation reference range within the normal reference range. Therefore, when the final predicted image is generated using the local motion estimation value in the sub-block, new sample data does not need to be loaded from the frame memory during motion compensation, and any increase in memory capacity and memory bandwidth can be suppressed.

[0291] In addition, the encoder and decoder in this embodiment can use the gradient reference range within the normal reference range. Therefore, new sample data does not need to be loaded from the frame memory to obtain the gradient image, and any increase in memory capacity and memory bandwidth can be suppressed.

[0292] This embodiment can be combined with at least some aspects of other embodiments. In addition, some processes, some elements in the device and some syntax described in the flow chart of this embodiment can be combined with various aspects of other embodiments.

[0293] (Modification Example 1 of the present embodiment)

[0294] The following is a detailed description of modified examples of the motion compensation filter and the gradient filter according to the present embodiment. In Modified Example 1, the processing related to the second predicted image is similar to the processing related to the first predicted image, so further explanation is omitted or simplified.

[0295] (Motion Compensation Filter)

[0296] The motion compensation filter will be explained first. Fig.14 is a conceptual diagram for explaining an example of a reference range of a motion compensation filter in Modified Example 1 of the present embodiment.

[0297] In the following explanation, a motion compensation filter of 1 / 4 samples in the horizontal direction and 1 / 2 samples in the vertical direction is applied to the first prediction block 1120. The motion compensation filter is a so-called eight-beat filter and is represented by the following formula (3).

[0298] [Math.3]

[0299]

[0300] W 0.25 =(-1,4,-10,58,17,-5,1,0)

[0301] W 0.5 =(-1,4,-11,40,40,-11,4,-1)

[0302] Here, when k is 0, I k [x, y] represents the sample value in the first predicted image with subsample precision, and when k is 1, Ik [x, y] represents the sample value in the second predicted image with subsample precision. The sample value is the value of the sample, for example, the brightness value or color difference value in the predicted image. Here, w 0.25 and w 0.5 is the weighting factor of 1 / 4 sample accuracy and 1 / 2 sample accuracy. When k is 0, I0 k [x, y] represents the sample value in the first predicted image with overall sample accuracy. When k is 1, I0 k [x, y] represents the sample value in the second predicted image with full sample accuracy.

[0303] For example, when the motion compensation filter in equation (3) is applied to Fig.14 When the upper left sample 1122 in the reference range 1131A is used, the values ​​of the samples arranged in the horizontal direction of the reference range 1131A are weighted and summed on each line, and the addition results of these lines are weighted and summed.

[0304] In the present modified example, the motion compensation filter of the upper left sample 1122 refers to samples in a reference range 1131A. The reference range 1131A is a rectangular range that runs three samples to the left, four samples to the right, three samples above, and four samples below the upper left sample 1122.

[0305] The motion compensation filter is applied to all samples in the first prediction block 1120. Therefore, samples in the first interpolation reference range 1130A are referenced by the motion compensation filter of the first prediction block 1120.

[0306] The motion compensation filter is applied to the second prediction block 1220 in the same manner as the first prediction block 1120. In other words, samples in the reference range 1231A are referenced for the upper left sample 1222, while samples in the second interpolation range 1230A are referenced throughout the second prediction block 1220.

[0307] (Gradient filter)

[0308] Following is the explanation of gradient filter. Fig.15 is a conceptual diagram for explaining an example of a reference range of a gradient filter in Modified Example 1 of the present embodiment.

[0309] In the present modified example, the gradient filter is a so-called five-tower filter and is expressed by the following formula (4) and formula (5).

[0310] [Math.4]

[0311]

[0312] [Math.5]

[0313]

[0314] w = (2, 9, 0, 9, -2)

[0315] Here, when k is 0, Ixk[x, y] indicates the horizontal gradient value of each sample in the first gradient image, and when k is 1, Ixk[x, y] indicates the horizontal gradient value of each sample in the second gradient image. When k is 0, Iyk[x, y] indicates the vertical gradient value of each sample in the first gradient image, and when k is 1, Iyk[x, y] indicates the vertical gradient value of each sample in the second gradient image. In these formulas, w is a weighting factor.

[0316] For example, when the gradient filter in Equation (4) and Equation (5) is applied to Fig.15 When the upper left sample 1122 in the image is taken as the horizontal gradient sample value, the horizontal gradient sample value is the sample value of five samples arranged in the horizontal direction, including the upper left sample 1122, and is calculated by weighting and adding the sample values ​​in the predicted image with the overall sample accuracy. At this time, the weighting factor has a positive or negative value for samples above or below and to the left or right of the upper left sample 1122.

[0317] In the present modified example, the gradient filter of the upper left sample 1122 refers to samples in a reference range 1132A. The reference range 1132A is in a cross shape and extends to the left and right of the upper left sample 1122 by two samples.

[0318] The gradient filter is applied to all samples in the first prediction block 1120. Therefore, samples in the first gradient reference range 1135A are referenced by the motion compensation filter of the first prediction block 1120.

[0319] The gradient filter is applied to the second prediction block 1220 in the same manner as the first prediction block 1120. In other words, samples in the reference range 1232A are referenced for the upper left sample 1222, while samples in the second gradient range 1235A are referenced throughout the second prediction block 1220.

[0320] When the motion vector indicating the reference range indicates a sub-sample position, the sample values ​​in the reference ranges 1132A and 1232A of the gradient filter may be converted into sample values ​​having sub-sample precision, and the gradient filter may be applied to the converted sample values. In addition, a gradient filter having a coefficient value obtained by convolving the coefficient value for conversion into the sub-sample precision and a coefficient value for obtaining a gradient value may be applied to the sample value having the whole sample precision. In this case, the gradient filter is different at each sub-sample position.

[0321] (Get the local motion estimate of the sub-block)

[0322] The following is an explanation of obtaining the local motion estimation value of a sub-block. In this example, a local motion estimation value is obtained for the upper left sub-block among the sub-blocks in the current block.

[0323] In the present modified example, a horizontal local motion estimation value u and a vertical local motion estimation value v are obtained for a subblock based on the following formula (6).

[0324] [Math.6]

[0325]

[0326] Here, sG x G y , sG x 2 , sG y 2 , sG x dI and sG y dI is a value calculated in the sub-block and is obtained based on the following formula (7).

[0327] [Math.7]

[0328]

[0329] Here, Ω is the coordinate set of all samples in the prediction subblock in the region / area corresponding to the subblock in the prediction block. x [i, j] indicates the sum of the horizontal gradient values ​​of the first gradient image and the horizontal gradient values ​​of the second gradient image, and G y [i,j] indicates the sum of the vertical gradient value of the first gradient image and the vertical gradient value of the second gradient image. ΔI[i,j] indicates the difference between the first predicted image and the second predicted image. w[i,j] indicates a weighting factor that depends on the position of the sample in the predicted sub-block. However, for all samples in the predicted sub-block, a weighting factor with the same value may be used.

[0330] More specifically, G x [i,j], G y [i, j] and ΔI[i, j] are expressed by the following formula (8).

[0331] [Math.8]

[0332]

[0333] In this way, local motion estimates are derived in the sub-blocks.

[0334] (Generate the final predicted image)

[0335] The following is an explanation of the generation of the final predicted image. Each sample value p[x, y] in the final predicted image is based on the following formula (9), using the sample value I in the first predicted image 0 [x,y] is the sample value I in the second predicted image 1 [x,y].

[0336] [Math.9]

[0337] p[x,y]=(I 0 [x,y]+I 1 [x,y]+b[x,y])>>1 (9)

[0338] Here, b[x, y] indicates the correction value of each sample. In formula (9), by calculating the sample value I in the first predicted image 0 The sum of [x, y] and the sample value I in the second predicted image 1 The sum of [x, y] and the correction value b[x, y] are shifted one bit to the right to calculate each sample value p[x, y] in the final predicted image. The correction value b[x, y] is expressed by the following formula (10).

[0339] [Math.10]

[0340]

[0341] In formula (10), the horizontal local motion estimation value (u) is multiplied by the horizontal gradient value (Ix 0 [x,y]-Ix 1 The vertical local motion estimation value (v) is multiplied by the vertical gradient value (I y 0 [x,y]-I y 1 [x, y]), and add the products to calculate the correction value b[x, y].

[0342] The calculations described using Formula (6) to Formula (10) are merely examples. Formulas having the same effect may also be used.

[0343] (Effects, etc.)

[0344] In this way, in this modified example, when the motion compensation filter and the gradient filter are used, local motion estimation values ​​can be derived in the sub-blocks. When the local motion estimation values ​​in the sub-blocks derived in this way are used to generate the final predicted image of the current block, a result similar to that of the present embodiment can be obtained.

[0345] This embodiment can be combined with at least some aspects of other embodiments. Moreover, some processes described in the flowchart of this embodiment, some elements in the device, and some syntax can be combined with various aspects of other embodiments.

[0346] (Modification Example 2 of the Present Embodiment)

[0347] In this embodiment and Modification Example 1 of this embodiment, when deriving a local motion estimation value, all samples in a predicted subblock in a predicted block corresponding to a subblock in a current block are referenced. However, the present disclosure is not limited to these examples. For example, only some samples in a predicted subblock may be referenced. This scenario is described as Modification Example 2 of this embodiment in the following paragraphs.

[0348] In the explanation of this modification example, when deriving a local motion estimation value in a subblock, only some samples in the prediction subblock are referenced. For example, in formula (7) of modification example 1, a coordinate set of some samples in the prediction subblock is used instead of a coordinate set Ω of all samples in the prediction subblock. Various modes can be used as a coordinate set of some samples in the prediction subblock.

[0349] Fig.16 is a diagram showing an example of a sample pattern referred to by deriving a local motion estimation value in Modification Example 2 of the present embodiment. Fig.16 , circles with cross-hatching in the prediction block 1121 or 1221 indicate reference samples, and circles without cross-hatching indicate non-reference samples.

[0350] Fig.16 (a) to Fig.16 Each of the seven sample patterns in (g) indicates some samples in the prediction sub-block 1121 or 1221. These seven sample patterns are all different.

[0351] exist Fig.16 (a) to Fig.16 In (c), only eight of the sixteen samples in the prediction sub-block 1121 or 1221 are referenced. Fig.16 In (d) to 16(g), only four of the sixteen samples in the prediction sub-block 1121 or 1221 are referenced. In other words, Fig.16 (a) to Fig.16 In (c), eight of the sixteen samples have been thinned out, and Fig.16 (d) to Fig.16 In (g), twelve of the sixteen samples have been thinned.

[0352] More specifically, in Fig.16 In (a), eight samples, or every other sample in the horizontal and vertical directions, are referenced. Fig.16In (b), reference is made to two pairs of samples arranged horizontally (alternatively, vertically) on the left and right. Fig.16 In (c), four samples at the center and four samples at the corners are referenced in the predicted sub-block 1121 or 1221.

[0353] exist Fig.16 (d) and Fig.16 In (e), two samples are referenced horizontally and vertically in the first and third rows, respectively. Fig.16 In (f), four corner samples are referenced. Fig.16 In (g), four central samples are referenced.

[0354] The reference mode may be adaptively selected from a plurality of predetermined modes based on the two predicted images. For example, a sample mode including samples corresponding to the representative gradient values ​​in the two predicted images may be selected. More specifically, when the representative gradient value is less than a threshold value, a sample mode including four samples (e.g., any one of (d) to (g)) may be selected. When it is not less than a threshold value, a sample mode including eight samples (e.g., any one of (a) to (c)) may be selected.

[0355] When a sample mode is selected from a plurality of sample modes, samples in a prediction subblock indicating the selected sample mode are referenced, and a local motion estimation value is derived for the subblock.

[0356] Note that information indicating the selected sample mode may be written into the bitstream. In this case, the decoder may obtain the information from the bitstream and select the sample mode based on the obtained information. Information indicating the selected sample mode may be written into the header in a block, slice, picture, or stream unit.

[0357] In this way, the encoder and decoder in this embodiment can only refer to some samples in the prediction sub-block and derive the local motion estimation value in the sub-block. Therefore, compared with referring to all samples, the processing load or processing time can be reduced.

[0358] In addition, the encoder and decoder in this embodiment can only refer to samples in a sample mode selected from a plurality of sample modes and derive a local motion estimation value in a sub-block. By switching the sample mode, it is possible to refer to samples suitable for the local motion estimation value in the sub-block and reduce the prediction error.

[0359] This embodiment can be combined with at least some aspects of other embodiments. In addition, some processes, some elements in the device and some syntax described in the flow chart of this embodiment can be combined with various aspects of other embodiments.

[0360] (Other Modification Examples of the Present Embodiment)

[0361] The encoder and decoder in one or more aspects of the present disclosure are explained with reference to the modified examples of the embodiments and the embodiments. However, the present disclosure is not limited to the modified examples of these embodiments and the embodiments. Those skilled in the art can easily envision variants suitable for use in the modified examples of these embodiments and the embodiments without departing from the spirit and scope of the present disclosure, and are included in one or more aspects of the present disclosure.

[0362] For example, the number of taps in the motion compensation filter used in the example of the present embodiment and the modified example 1 of the present embodiment is 8 samples. However, the present disclosure is not limited to this example. The number of taps in the motion compensation filter can be any number of taps as long as the interpolation reference range is included in the normal reference range.

[0363] The number of taps in the gradient used in the example of this embodiment and the modified example 1 of this embodiment is five or six samples. However, the present disclosure is not limited to this example. The number of taps in the gradient filter can be any number of taps as long as the gradient reference range is included in the interpolation reference range.

[0364] In the example of the present embodiment and the modified example 1 of the present embodiment, the first gradient reference range and the second gradient reference range are included in the first interpolation reference range and the second interpolation reference range. However, the present disclosure is not limited to this example. For example, the first gradient reference range may match the first interpolation reference range, and the second gradient reference range may match the second interpolation reference range.

[0365] When a local motion estimation value is derived in a sub-block, the sample values ​​may be weighted so that priority is given to the values ​​of the samples at the center of the prediction sub-block. Specifically, when a local motion estimation value is derived, the values ​​of multiple samples in the prediction sub-block may be weighted in the first prediction block and the second prediction block. In this case, the samples at the center of the prediction sub-block may be given a greater weight. That is, the samples at the center of the prediction sub-block may be weighted to have a higher value than the samples outside the center of the prediction sub-block. More specifically, in Modification Example 1 of the present embodiment, the weighting factor w[i, j] in Formula (7) may result in a larger coordinate value closer to the center of the prediction sub-block.

[0366] When a local motion estimation value is derived in a sub-block, samples belonging to adjacent predicted sub-blocks may be referenced. Specifically, in the first predicted block and the second predicted sub-block, samples in the adjacent predicted sub-blocks may be added to samples in the predicted sub-blocks and referenced to derive the local motion estimation value in the sub-block.

[0367] The reference ranges of the motion compensation filter and the gradient filter in the present embodiment and the modification example 1 of the present embodiment are for illustrative purposes only. The present disclosure is not necessarily limited to these examples.

[0368] In Modification Example 2 of the present embodiment, seven sample patterns are provided as examples. However, the present disclosure is not limited to these sample patterns. For example, sample patterns obtained by rotating each of the seven sample patterns may be used.

[0369] The values ​​of the weighting factors in Modification Example 1 of the present embodiment are merely examples, and the present disclosure is not limited to these examples. In addition, the block sizes and sub-block sizes in the present embodiment and the two Modification Examples of these embodiments are merely examples. The present disclosure is not limited to 8x8 sample sizes and 4x4 sample sizes. Inter-frame prediction can be performed in the same manner as the examples of the present embodiment and the Modification Examples of the present embodiment using other sizes.

[0370] This embodiment can be combined with at least some aspects of other embodiments. In addition, some processes, some elements in the device and some syntax described in the flow chart of this embodiment can be combined with various aspects of other embodiments.

[0371] As described with reference to FIGS. 4 and 5 , with respect to a reference range of surrounding samples to which a gradient filter is applied to obtain a gradient value, sample values ​​in a reference block indicated by a motion vector assigned to a prediction block used in a prediction process may be compensated to other values, rather than the sample values ​​discussed with reference to FIGS. 4 and 5 .

[0372] For example, when a motion vector assigned to a prediction block indicates a decimal sample position, a sample value corresponding to the decimal sample position may be compensated and used.

[0373] However, if a filtering process that refers to surrounding samples is applied in order to obtain sample values ​​corresponding to decimal sample positions, it is not necessary to refer to surrounding samples in a range wider than that described with respect to FIGS. 4 and 5 .

[0374] In order to solve the above-mentioned problems, for example, the following method is provided in the present disclosure.

[0375] Fig.17 A flow chart is shown illustrating one example 1700 of an image encoding / decoding method using an inter-prediction function to generate a prediction for a current block of a picture based on a reference block in a different picture.

[0376] In the embodiment of this application, the encoding method is composed of Figure 1 The encoder 100 is shown as implementing and described in the corresponding description. In an embodiment, the encoding method is implemented by the inter-frame predictor 126 of the encoder 100 in cooperation with other components of the encoder 100.

[0377] Likewise, in the embodiment of this application, the decoding method is composed of Fig.10The decoder 200 shown implements and is described in the corresponding description. In an embodiment, the decoding method is implemented by the inter-frame predictor 218 of the decoder 200 in cooperation with other components of the decoder 200.

[0378] like Fig.17 As shown, the encoding method according to this example includes the following steps:

[0379] Step 1702: predicting a first block of prediction samples of a current block of a picture, wherein predicting the first block of prediction samples at least comprises a prediction process using motion vectors from different pictures;

[0380] Step 1704: Filling the first block of prediction samples to form a second block of prediction samples, wherein the second block is larger than the first block;

[0381] Step 1706: Calculate the gradient using at least the second block of prediction samples;

[0382] Step 1708: Encode the current block using at least the calculated gradient.

[0383] In an embodiment, different pictures may have different POCs than the picture order count (POC) of the picture in the temporal domain of the stream. Fig.18A , Fig.18B and Fig. 18C As shown, a picture can be referenced as a current picture, and a different picture can be referenced as a first picture or a second picture. Fig.18A In , if the different picture is the first picture, the POC of the different picture is smaller than the POC of the picture in the left time domain, and larger than the POC of the picture in the right time domain. Fig.18B In , if the different picture is the first picture, the POC of the different picture is smaller than the POC of the picture in both the left and right time domains. Fig. 18C In the example, if the different picture is the first picture, then in both the left time domain and the right time domain, the POC of the different picture is greater than the POC of the picture.

[0384] In another embodiment, a different picture may be a coded reference picture, which may be temporally and / or spatially adjacent to the picture. The coded reference picture may have a POC that is temporally and / or spatially smaller or larger than the POC of the picture.

[0385] The current block can be randomly selected in the picture. For example, the current block may be a square 4×4 sample block. The size of the current block can be modified according to the actual prediction accuracy requirements.

[0386] Similar to Figure 5C The motion vector shown in the example of the encoding method points from the current block to the possible FIG. 18A to FIG. 18CIn an embodiment, the motion vector is received by the inter predictor 126 from a different picture, in particular when the different pictures are coded reference pictures coded by the same motion vector.

[0387] At step 1702, the inter predictor 126 of the encoder 100 predicts a first block of prediction samples of a current block of a picture using motion vectors from different pictures through at least one prediction process, as described above.

[0388] In an embodiment, the first block of prediction samples may be the same as the prediction block used in the prediction process, as described in the previous description, performed for a prediction mode like merge mode or inter prediction mode.

[0389] In another embodiment, the first block of prediction samples may be the same as the reference block used for the motion compensation process, as described above, performed for a prediction mode like merge mode or inter prediction mode.

[0390] At step 1704, the inter-frame predictor 126 of the encoder 100 fills the first block of prediction samples to form a second block of prediction samples. The second block of prediction samples is larger than the first block of prediction samples. In this way, more information can be retained in the second block for subsequent processing and advantageously provide improved processing for the inter-frame prediction method, thereby reducing the memory bandwidth access of the inter-frame prediction method. This is hardware friendly.

[0391] For example, step 1704 may be performed by the inter-frame predictor 126 of the encoder 100 to pad samples on at least two sides of the first block of prediction samples, wherein at least two sides of the first block of prediction samples are not orthogonal.

[0392] In some embodiments, the inter-frame predictor 126 of the encoder 100 may pad at least both sides of the first block of prediction samples in parallel padding directions. Fig.19A As shown, the inter-frame predictor 126 of the encoder 100 may be used Fig.19A The two vertical sides of the 4×4 first block 1902 of prediction samples are filled in the manner described by the polyline in FIG. Fig.19B As shown, the inter-frame predictor 126 of the encoder 100 may be Fig.19B The two horizontal sides of the 4×4 first block 1904 of prediction samples are filled in a manner described by the polyline shown.

[0393] In some other embodiments, the inter-frame predictor 126 of the encoder 100 may fill the four sides of the first block of prediction samples, such as Fig. 20A , Fig. 20B , Fig. 20C and Fig.20D In addition, Fig. 20A , Fig. 20B , Fig. 20C and Fig.20D Four padding processes are further described, which can be used to fill the first block of prediction samples. It is easy for those skilled in the art to understand that these padding processes can be further used to fill any sample block.

[0394] In the example, Fig. 20A As shown, the filling process can be performed by Fig. 20A 2002. For example, the inter-frame predictor 126 of the encoder 100 may fill the first block of prediction samples by mirroring the first block of prediction samples 2002 in a manner symmetrical with respect to each edge of the first block 2002. The mirroring may include copying sample values ​​(e.g., "A", "B", etc.) of the first block of prediction samples 2002 to samples surrounding the first block of prediction samples 2002 in a manner symmetrical to that used to form the second block 2000 of prediction samples.

[0395] In another example, if Fig. 20B As shown, the filling process can be performed by Fig. 20B 2004 of the prediction samples 2004 to form a second block 2001 of prediction samples.

[0396] Note that the corresponding sample may be a row of samples adjacent to the first block. The fewer the number of rows of filled samples, the higher the accuracy of the second block 2001. In addition, the corresponding sample may be a plurality of sample rows including a row adjacent to the first block. Specifically, the corresponding sample is adjacent to the corresponding sample at each edge of the first block 2004. The more the number of rows of filled samples, the more the memory bandwidth can be reduced. In addition, for example, the number of rows of samples to be filled can be set based on the size of the first block, and can be predetermined according to a standard, etc.

[0397] In another example, if Fig. 20C As shown, it can be achieved by Fig. 20C The way the polyline is shown will fix the value (for example, Fig. 20CThe "Q" shown in the figure is filled to the samples of the first block around the prediction sample to perform the filling process. For example, the fixed value can be selected from at least one of the following: 0, 128, 512 positive integers, the average value of the first block of prediction samples, and the median value of the first block of prediction samples. The average value and the median value can be related to the sample values ​​of the first block of prediction samples. Fig. 20C In the example, the fixed value is a positive integer Q, and the inter-frame predictor 126 of the encoder 100 can fill the first block of prediction samples by filling the fixed value Q to samples surrounding the first block of prediction samples to form a second block 2050 of prediction samples.

[0398] In another example, the padding process may be performed by performing a function on the first block of prediction samples. Examples of functions may include filters, polynomial functions, exponential functions, and clipping functions. For simplicity, this example is not shown.

[0399] In another example, Fig.20D As shown, the padding process can be performed by performing any combination of mirroring, copying, padding the first value, and performing functions on the prediction samples, as described above. Fig.20D In the example of , the inter-frame predictor 126 of the encoder 100 can fill the first block 2008 of prediction samples to form a second block 2050 of prediction samples by performing the following combination: copying the first block 2008 of prediction samples to samples at a first specific distance from the first block 2008, and filling a fixed value Q to samples at a second specific distance from the first block 2008.

[0400] exist FIG. 20A to FIG. 20D In the example shown, the inter predictor 126 of the encoder 100 fills a 4×4 first block 2002 , 2004 , 2006 , 2008 of prediction samples to form an 8×8 second block 2000 , 2001 , 2050 , 2051 of prediction samples.

[0401] Reference again Fig.19A and Fig.19B In the example of FIG. 1 , it can be seen that the inter-frame predictor 126 of the encoder 100 fills the 4×4 first block 1902 , 1904 of prediction samples by mirroring the first block 1902 , 1904 of prediction samples to form a second block 1900 , 1901 of prediction samples. Fig.19A In , the second block 1900 of prediction samples is an 8×4 sample block. Fig.19B , the second block 1900 of prediction samples is a 4×8 sample block.

[0402] Therefore, those skilled in the art will appreciate that the size of the second block of prediction samples required from the padding process may be modified according to actual prediction accuracy requirements. Advantageously, the padding process reduces data to perform inter-frame prediction processing at a later stage.

[0403] Therefore, the padding step 1704 of the present encoding method can be carefully designed to pad the first block of prediction samples with a size of M×N to form a second block of prediction samples with any desired size (M+d1)×(N+d2) based on the actual prediction accuracy requirement based on the above relative to Fig.19A , Fig.19B and FIG. 20A to FIG. 20D The different filling directions and / or processes / techniques described. For those skilled in the art, M can be the same as or different from N, and d1 and d2 can be greater than or equal to zero.

[0404] With the help of padding, data of smaller size can be padded to a larger size so as to contain more information to produce an accurate prediction of the current block. In this way, the advantage of the encoding method is that it only requires small-sized data as input, thereby reducing the memory bandwidth access of inter-frame prediction and providing a more hardware-friendly process.

[0405] At step 1706, the inter-frame predictor 126 of the encoder 100 uses at least the second block of prediction samples to calculate the gradient. In an embodiment, when at least calculating the gradient, the inter-frame predictor 126 of the encoder 100 may apply a gradient filter to the second block of prediction samples to at least generate a differential value to be used as at least one gradient. An example of applying a gradient filter to at least generate a gradient is introduced above in the "Gradient Filter" section. In this way, data in the current block of the current picture is referenced by data from a reference block of a reference picture encoded with a corresponding gradient (i.e., a differential value) between the reference block and the current block. Such steps are advantageously conducive to reducing memory bandwidth access for inter-frame prediction and providing more hardware-friendly processing.

[0406] Fig.21A and Fig. 21B Two examples of gradient filters are shown respectively. Fig.21A In , a gradient filter {2, -9, 0, 9, -2} is applied to all sample values ​​in the second block of predicted samples, regardless of the fractional part of the motion vector. Fig.21A In , the process of applying the gradient filter {2, -9, 0, 9, -2} is similar to the process described above under the gradient filter section. Fig.21A In the example of , equations (4) and (5) are used for all motion vectors.

[0407] exist Fig. 21BIn , there are nine gradient filters: {8, -39, -3, 46, -17, 5}, {8, -32, -13, 50, -18, 5}, {7, -27, -20, 54, -19, 5}, {6, -21, -29, 57, -18, 5}, {4, -17, -36, 60, -15, 4}, {3, -9, -44, 61, -15, 4}, {1, -4, -48, 61, -13, 3}, {0, 1, -54, 60, -9, 2}, {-1, 4, -57, 57, -4, 1} are provided to be applied to sample values ​​in the second block of predicted samples according to the fractional part of the motion vector. Fig. 21B In the example of , the fractional part of the motion vector is a subsample part of the motion vector, for example, 1 / 4 sample. Therefore, different gradient filters are selected based on the subsample part of the motion vector. For example, the motion vector in the horizontal direction is 1+(1 / 4) samples, and the fractional part of the motion vector is 1 / 4. Then, the gradient filter {4, -17, -36, 60, -15, 4} is selected to calculate the horizontal gradient. Replace w[i] in formula (4) with {4, -17, -36, 60, -15, 4}. In another example, if the motion vector in the vertical direction is 4+(7 / 16), the fractional part of the motion vector is 7 / 16. In this example, the gradient filter {0, 1, -54, 60, -9, 2} is selected to calculate the vertical gradient. Replace w[i] in formula (5) with {0, 1, -54, 60, -9, 2}.

[0408] Fig. 21C and Fig.21D Two more examples of gradient filters are depicted. Fig. 21C In , a gradient filter {-1, 0, 1} is applied to all sample values ​​in the second block of prediction samples, regardless of the fractional part of the motion vector.

[0409] exist Fig.21D In , a gradient filter {-1, 1} is applied to all sample values ​​in the second block of predicted samples, regardless of the fractional part of the motion vector. Fig. 21C and Fig.21D In , the process of applying the corresponding gradient filter {-1, 0, 1} or {-1, 1} is similar to the process described above under the gradient filter section.

[0410] At step 1708, the inter predictor 126 of the encoder 100 encodes the current block of the picture using at least the calculated gradient.

[0411] like Fig.17As shown in example 1700 of , the steps in the decoding method are similar to the steps in the encoding method, except for the last step 1708, in which the encoder 100 uses at least the gradient to encode the current block, and the decoder 200 uses at least the gradient to decode the current block.

[0412] The above examples and embodiments use a prediction block (interchangeably referred to as a block of prediction samples) as input to predict the current block. Other embodiments according to the present encoding method are further described below, in which two prediction blocks are used as input to predict the current block.

[0413] When two prediction blocks (i.e., two blocks of prediction samples) are used as input to predict the current block, step 1702 as described above includes further using another motion vector from another different picture to predict another block of prediction samples of the current block. The process of predicting the other block of prediction samples is the same as the process of predicting the first block of prediction samples. In addition, the padding step 1704 as described above includes further padding the other block of prediction samples to form yet another block of prediction samples.

[0414] Fig. 22 An embodiment 2200 of an image encoding / decoding method using two reference pictures to predict a current block is shown. In this embodiment, in addition to using an additional prediction block as input, an interpolation process is also deployed for sub-sample accuracy. This embodiment includes the following steps:

[0415] Step 2202: Predict a first and a second block of prediction samples for a current block of a picture using at least a prediction process using first and second motion vectors from different pictures.

[0416] Step 2204: Fill the first and second blocks of prediction samples to form third and fourth blocks of prediction samples.

[0417] Step 2206: Perform interpolation processing on the third and fourth blocks of prediction samples.

[0418] Step 2208: Use the result of the interpolation process to calculate the gradient.

[0419] Step 2210: Encode / decode the current block using at least the result of the interpolation process and the calculated gradient.

[0420] exist Fig.23 Steps 2202 to 2210 are depicted in conceptual diagram 2300 of FIG. Figure 23 to Figure 23 The embodiment 2200 of the encoding method shown can be performed by the image encoder 100. It should be noted that the decoding method performed by the image decoder 200 is different from the decoding method performed by the image decoder 200. Fig. 22 and Fig.23 The encoding method performed by the image encoder 100 shown is the same.

[0421] In step 2202, at least a first block of prediction samples of a current block of a picture is predicted using a prediction process, wherein the prediction process predicts the samples using a first motion vector from a different picture. In an embodiment, the first motion vector may point to a first picture, wherein the first picture is different from the current picture.

[0422] Similarly, at least a second block of prediction samples of the current block of the picture is predicted using a prediction process, wherein the prediction process predicts the samples using a second motion vector from another different picture. The second motion vector may point to a second picture, wherein the second picture is different from the current picture.

[0423] In one example, the first picture may be different from the second picture. In other examples, the first picture may be the same as the second picture.

[0424] In one example, if Fig.18A As shown, at least one of the picture order counts (POCs) of the first picture and the second picture is smaller than the POC of the current picture, and at least one of the POCs of the first picture and the second picture is larger than the POC of the current picture.

[0425] In another example, if Fig.18B As shown, the POC of the first picture and the second picture may be smaller than the POC of the current picture.

[0426] In yet another example, Fig. 18C As shown, the POC of the first picture and the second picture may be greater than the POC of the current picture.

[0427] 18A to 18C The POCs of the first, second, and current pictures are shown in the time domain and depict the order in which the pictures are coded in the data stream. The coding order may be the same as or different from the order in which the pictures are played in the data stream (e.g., a video clip). It will be appreciated by those skilled in the art that POC may also refer to the order of the pictures in the spatial domain.

[0428] In one example, the first and second blocks of prediction samples predicted in step 2202 may be the same as reference blocks used in a motion compensation process performed for a prediction mode such as a merge mode, an inter prediction mode, or the like.

[0429] In one example, the first block and the second block of prediction samples may be equal to or larger than the current block.

[0430] like Fig.23 As shown, in step 2302, Fig. 222. An embodiment of the prediction step 2202 of . In this embodiment, the current block has a size of M×N, where M may be the same as or different from N. The inter-frame predictor 126 of the encoder 100 may predict a first block and a second block of prediction samples each having a size of (M+d1)×(N+d2), where d1 and d2 may be equal to or greater than zero. An example of a first block of prediction samples is shown in dashed lines. The second block of prediction samples has the same size as the first block. It can be appreciated that the size of the second block of prediction samples may be different from the size of the first block of prediction samples.

[0431] It seems to be more advantageous that the sizes of the first and second blocks of the predicted samples are larger than the size of the current block, because more information can be included in the predicted samples, which contributes to more accurate prediction results.

[0432] At step 2204, the first block of prediction samples is padded to form a third block of prediction samples, and similarly, the second block of prediction samples is padded to form a fourth block of prediction samples.

[0433] In an example, the third block of predicted samples is larger than the first block of predicted samples, and the fourth block of predicted samples is larger than the second block of predicted samples. Fig.23 As shown in the padding step 2304 of , the third block and the fourth block may each have a size of (M+d1+d3)×(N+d2+d4), where d3 and d4 are greater than zero. An example of a third block of prediction samples is shown in dashed lines. The fourth block of prediction samples has the same size as the third block. As described above, it can be appreciated that the size of the fourth block of prediction samples may be different from the size of the third block of prediction samples.

[0434] In one example, padding may include mirroring the first and second blocks of predicted samples, such as Fig. 20A In another example, padding may include copying a first block and a second block of prediction samples, such as Fig. 20B In another example, padding may include padding with a fixed value, such as Fig. 20C As shown, the fixed value can be at least one of 0, 128, 512, a positive integer, an average of the predicted samples, and a median of the predicted samples. In some examples, padding can include performing a function on the predicted samples. Examples of the function can be a filter, a polynomial function, an exponential function, and a clipping function. In some examples, padding can include any combination of mirroring, copying, padding with a fixed value, and performing a function on the predicted samples, such as Fig.20D shown.

[0435] At step 2206, an interpolation process is performed on the third and fourth blocks of prediction samples. The interpolation process may include applying an interpolation filter according to the first motion vector and the second motion vector to the third and fourth blocks of prediction samples, respectively.

[0436] In one example, the interpolation filter may be the same as the filter used in the motion compensation process performed for the prediction mode such as merge mode, inter prediction mode, etc. In other examples, the interpolation filter may be different from the filter used in the motion compensation process performed for the prediction mode as described above.

[0437] like Fig.23 As shown in step 2306, the interpolation process performed on the third and fourth blocks of prediction samples produces interpolated blocks. The interpolated blocks may each have a size of (M+d5)×(N+d6), where d5 and d6 are greater than zero. An example of an interpolated block performed on the third block of prediction samples is depicted with a dotted line. The interpolated blocks performed on the fourth block of prediction samples are similar. A portion of each interpolated block can be used to encode the current block, where the size of the portion is M×N. The portion can be the same as a motion compensated block performed for a prediction mode such as a merge mode, an inter-frame prediction mode, etc.

[0438] At step 2208, the interpolated blocks are used to calculate gradients. The gradient calculation may include applying a gradient filter to sample values ​​in the interpolated blocks to generate differential values. Fig.23 As shown in step 2308, the calculated gradients may be formed into blocks of size M×N.

[0439] In one example, if Fig.21A As shown, only one gradient filter may be applied to all sample values ​​in the interpolated block, regardless of the fractional parts of the first and second motion vectors.

[0440] In another example, if Fig. 21B As shown, nine gradient filters may be applied to the sample values ​​in the interpolated block according to the fractional parts of the first and second motion vectors.

[0441] At step 2210, the current block is encoded using at least the interpolated block and the calculated gradient. Fig.23 An example of an encoded block is shown in step 2310 of .

[0442] Note that the terms “encoding” and “encoding” used for the encoding method performed by the image encoder 100 in the description of step 2210 may be replaced at step 2210 with the term “decoding” for the decoding method performed by the image decoder 200 .

[0443] In this embodiment, by introducing padding processing into inter-frame prediction, the encoding and decoding method advantageously reduces the memory bandwidth access of the inter-frame prediction processing. In addition, by using padding processing, the present embodiment can only perform interpolation processing to produce satisfactory prediction results. In this way, the present application advantageously removes additional interpolation processing from the inter-frame prediction processing, which is hardware-friendly.

[0444] Note that in the interpolation processing performed on each of the third block and the fourth block, interpolation filters with different numbers of taps may be used. For example, in the above example, in order to obtain a block obtained by the interpolation processing of size (M+d5)×(N+d6), only an eight-tap interpolation filter is used. However, the number of taps of the interpolation filter used to obtain the first area with a size of M×N in the resulting block, and the number of taps of the interpolation filter used to obtain the second area, may be different, and the second area is the area in the resulting block other than the first area and used to generate the gradient block. For example, the number of taps of the interpolation filter used to obtain the second area may be less than the number of taps of the interpolation filter used to obtain the first area. Specifically, if the number of taps of the interpolation filter used to obtain the first area is eight, the number of taps of the interpolation filter used to obtain the second area may be less than eight. Therefore, the processing load can be reduced while preventing image quality degradation.

[0445] Fig.24 Another embodiment of an image encoding / decoding method using two reference pictures to predict a current block is shown in FIG. In this embodiment, the interpolation process in this embodiment is performed before the filling process. This embodiment includes the following steps:

[0446] Step 2402: Predict a first block and a second block of prediction samples for a current block of a picture using at least a prediction process using first and second motion vectors from different pictures.

[0447] Step 2404: Perform interpolation processing on the first and second blocks of prediction samples.

[0448] Step 2406: Fill the interpolation result to form the third and fourth blocks of prediction samples.

[0449] Step 2408: Compute the gradient using the third and fourth blocks of prediction samples.

[0450] Step 2410: Encode / decode the current block using at least the result of the interpolation process and the calculated gradient.

[0451] exist Fig.25 Steps 2402 to 2410 are depicted in the conceptual diagram of FIG. Fig.24 and Fig.25The embodiment 2400 of the encoding method shown may be performed by the image encoder 100. Note that the decoding method performed by the image decoder 200 is different from the decoding method performed by the image decoder 200. Fig.24 and Fig.25 The encoding method performed by the image encoder 100 shown is the same.

[0452] At step 2402, at least a first block of prediction samples of a current block of a picture is predicted using a prediction process, wherein the prediction process predicts samples of the current block using a first motion vector from a different picture. In an embodiment, the first motion vector may point to a first picture, wherein the first picture is different from the current picture.

[0453] Similarly, at least a second block of prediction samples of the current block of the picture is predicted using a prediction process, wherein the prediction process predicts the samples using a second motion vector from another different picture. The second motion vector may point to a second picture, wherein the second picture is different from the current picture.

[0454] In one example, the first picture may be different from the second picture. In other examples, the first picture may be the same as the second picture.

[0455] In one example, if Fig.18A As shown, at least one of the picture order counts (POCs) of the first picture and the second picture is smaller than the POC of the current picture, and at least one of the POCs of the first picture and the second picture is larger than the POC of the current picture.

[0456] In another example, if Fig.18B As shown, the POC of the first picture and the second picture may be smaller than the POC of the current picture.

[0457] In another example, Fig. 18C As shown, the POC of the first picture and the second picture may be greater than the POC of the current picture.

[0458] picture 18A to 18C The POC of the first, second, and current pictures shown in the figure are in the time domain and depict the coding order of these pictures in the data stream. The coding order may be the same as or different from the playback order of these pictures in the data stream (e.g., a video clip). It will be appreciated by those skilled in the art that POC may also refer to the order of these pictures in the spatial domain.

[0459] In one example, the first block and the second block of prediction samples predicted in step 2402 may be the same as reference blocks used in a motion compensation process performed for a prediction mode such as a merge mode, an inter prediction mode, or the like.

[0460] In one example, the first block and the second block of prediction samples may be equal to or larger than the current block.

[0461] like Fig.25 As shown, in step 2502, Fig.24 24. An embodiment of the prediction step 2402 of . In this embodiment, the current block has a size of M×N, where M may be the same as or different from N. The inter-frame predictor 126 of the encoder 100 may predict a first block and a second block of prediction samples each having a size of (M+d1)×(N+d2), where d1 and d2 may be equal to or greater than zero. An example of a first block of prediction samples is shown in dashed lines. The second block of prediction samples has the same size as the first block. As described above, it can be appreciated that the size of the second block of prediction samples may be different from the size of the first block of prediction samples.

[0462] It seems to be more advantageous that the sizes of the first and second blocks of the predicted samples are larger than the size of the current block, because more information can be included in the predicted samples, which contributes to more accurate prediction results.

[0463] At step 2404, an interpolation process is performed on the first and second blocks of prediction samples. The interpolation process may include applying an interpolation filter according to the first motion vector and the second motion vector to the first and second blocks of prediction samples, respectively.

[0464] In one example, the interpolation filter may be the same as the filter used in the motion compensation process performed for prediction modes such as merge mode, inter prediction mode, etc. In other examples, the interpolation filter may be different from the filter used in the motion compensation process for the prediction modes described above.

[0465] like Fig.25 As shown in step 2504 of , the interpolation process performed on the first and second blocks of prediction samples produces interpolated blocks. The interpolated blocks can each have a size of M×N. The interpolated blocks can be used to encode the current block and can be the same as the motion compensation blocks performed for the prediction mode such as merge mode, inter-frame prediction mode, etc.

[0466] At step 2406, the block obtained by the interpolation process performed on the first block is padded to form a third block of prediction samples, wherein the third block of prediction samples is larger than the current block. Similarly, the block obtained by the interpolation process performed on the second block is padded to form a fourth block of prediction samples, wherein the fourth block of prediction samples is larger than the current block.

[0467] As in Fig.25As shown in step 2506 of , an example of a third block of prediction samples may have a size of (M+d3)x(N+d4), where d3 and d4 are greater than zero. The fourth block of prediction samples has the same size. As described above, it can be appreciated that the size of the fourth block of prediction samples may be different than the size of the third block of prediction samples.

[0468] In one example, the padding may include mirroring the resulting block of the interpolation process, such as Fig. 20A In another example, the filling may include copying the resulting block of the interpolation process, such as Fig. 20B In another example, padding may include padding with a fixed value, such as Fig. 20C As shown, the fixed value may be at least one of 0, 128, 512, a positive integer, an average of the prediction samples, and a median of the prediction samples. In some examples, padding may include performing a function on the interpolated block. Examples of the function may be a filter, a polynomial function, an exponential function, and a clipping function. In other examples, padding may include using the prediction samples of the first and second blocks, such as Fig.26 shown.

[0469] In other examples, the padding may include applying a second interpolation filter to the first and second blocks, wherein the second interpolation filter is different from the interpolation filter performed in step 2404, and the number of taps of the second interpolation filter is less than the number of taps of the interpolation filter performed in step 2404. In other examples, the padding may include any combination of mirroring, duplication, padding with a fixed value, performing a function on the resulting block of the interpolation process, padding samples using the first block and the second block, and applying the second interpolation filter to the first and second blocks, such as Fig.20D shown.

[0470] At step 2408, a gradient is calculated using the third and fourth blocks of prediction samples. The gradient calculation may include applying a gradient filter to the sample values ​​of the third and fourth blocks of prediction samples to generate a difference value. The gradient filter is described above with respect to Fig.21A , Fig. 21B As stated in Fig.25 As shown in step 2508 of , the calculated gradients may be formed into blocks of size M×N.

[0471] At step 2410, the current block is encoded using at least the interpolated block and the calculated gradient. Fig.25 An example of an encoded block is shown in step 2510 of .

[0472] Note that the terms “encoding” and “encoding” used for the encoding method performed by the image encoder 100 in the description of step 2410 may be replaced at step 2410 with the term “decoding” for the decoding method performed by the image decoder 200 .

[0473] In this embodiment, by introducing padding processing to inter-frame prediction, the encoding and decoding method advantageously reduces the memory bandwidth access of the inter-frame prediction processing. In addition, by using padding processing, the present embodiment can perform only one interpolation process to produce a satisfactory prediction result. In this way, the present application advantageously removes the additional interpolation process from the inter-frame prediction process, which is hardware-friendly. This can keep the same number of operations of the interpolation filter used in the motion compensation process performed for prediction modes such as merge mode, inter-frame prediction mode, etc.

[0474] Fig.27A is a flow chart showing an alternative example of an image encoding / decoding method using an inter-frame prediction function to generate a prediction of a current block of a picture.

[0475] Steps 2702A to 2708A of FIG. 27 are Fig.28 Depicted in the concept map. Fig.27A The embodiment 2700A of the encoding method shown in FIG. 27 may be performed by the image encoder 100. Note that the decoding method performed by the image decoder 200 is different from the decoding method performed by the image decoder 200. Fig.27A and Fig.28 The encoding method performed by the image encoder 100 shown is the same.

[0476] As shown in example 2700A, steps 2702A and 2704A are similar to those described in relation to Fig.17 Steps 1702 and 1704 are described as being identical. An embodiment of the first block of prediction samples predicted in step 2702A of FIG. 27 is Fig.28 In the embodiment depicted in step 2802, for a current block of size M×N, a first block of prediction samples of size (M+d1)×(N+d2) is predicted. It can be appreciated by those skilled in the art that M may be the same as or different from N, and d1 and d2 may be greater than, equal to, or less than 0.

[0477] according to Fig.27A In an embodiment of step 2704A, a second prediction block is formed by filling the first block with prediction samples. Fig.28 As depicted in step 2804. Fig.28 As depicted in step 2804, Fig.27AThe padding step 2704A of can be carefully designed to pad the first block of prediction samples of size (M+d1)×(N+d2) to form a second block of prediction samples of any desired size (M+d1+d3)×(N+d2+d4) based on the actual prediction accuracy requirement based on the above relative Fig.19A , Fig.19B and FIG. 20A to FIG. 20D The different filling directions and / or processes / techniques described. A person skilled in the art will appreciate that d3 and d4 are greater than zero.

[0478] At step 2706A, an interpolation process is performed on the second block of prediction samples. The interpolation process may include applying an interpolation filter based on the first motion vector to the second block of prediction samples. In one example, the interpolation filter may be the same filter used in a motion compensation process performed for a prediction mode such as merge mode, inter prediction mode, etc. In other examples, the interpolation filter may be different from the filter used in a motion compensation process performed for a prediction mode as described above. Fig.27A An example of the result of the interpolation process performed in step 2706A is Fig.28 Depicted in step 2806.

[0479] At step 2708A, the current block is encoded using at least the block obtained by the interpolation process performed on the second block of prediction samples. Fig.27A In one embodiment of encoding the current block by interpolating the obtained block depicted in step 2708A Fig.28 Depicted in step 2808.

[0480] Note that the terms "encoding" and "encoding" used for the encoding method performed by the image encoder 100 in the description of step 2708A may be replaced by the term "decoding" used for the decoding method performed by the image decoder 200 at step 2708A.

[0481] Fig.27B is a flowchart showing another alternative example of an image encoding / decoding method of generating a prediction of a current block of a picture based on a reference block in a different picture and neighboring blocks of the current block using an inter-prediction function.

[0482] Fig.27B Steps 2702B to 2708B in Fig.29 is depicted in the concept map. Fig.27B and Fig.29 The embodiment 2700B of the encoding method shown can be performed by the image encoder 100. Note that the decoding method performed by the image decoder 200 is different from the decoding method performed by the image decoder 200. Fig.27B and Fig.29The encoding method performed by the image encoder 100 shown is the same.

[0483] At step 2701B, a first block of prediction samples of the current block of the picture is predicted, wherein the prediction at least includes a prediction process using a first motion vector from a different picture. Fig.29 As shown, in Fig.27B An embodiment of a first block of prediction samples predicted in step 2702B is depicted in step 2902 .

[0484] At step 2704B, the second block of prediction samples is filled to form a third block of prediction samples. The second block may be adjacent to the current block. Fig.29 An embodiment of the second block is depicted in step 2904 of . In this embodiment, the size of the second block is M×N, where M can be the same as N or different.

[0485] As in Fig.29 As shown in step 2906 of , the inter-frame predictor 126 of the encoder 100 can be configured to perform step 2704B to fill the second block of prediction samples to form a third block of prediction samples. The third block of prediction samples may have a size of (M+d3)×N, where d3 may be equal to or greater than zero. An example of the third block of prediction samples is shown in dashed lines.

[0486] exist Fig.29 In the example shown, the second block of prediction samples has the same size as the first block. It will be appreciated that the size of the second block of prediction samples may be different from the size of the first block of prediction samples.

[0487] In addition, Fig.29 In the example of , the second block is a left block adjacent to the first block. It can be appreciated that the second block can be at least one of a top block, a left block, a right block, a bottom block, an upper left block, an upper right block, a lower left block, and a lower right block adjacent to the first block. Fig.31 A diagram of possible positions of a second block is shown in , where the second block is adjacent to the current block.

[0488] In one example, if Fig.32A As shown, the padding in step 2704B may include mirroring the samples of the second block. In other examples, such as Fig.32B As shown, the padding in step 2704B may include duplicating samples of the second block. In other examples, such as Fig.32CAs shown, the filling in step 2704B may include filling with a fixed value, wherein the fixed value may be at least one of 0, 128, 512, a positive integer, an average value of the second block, and a median value of the second block. In other examples, the filling in step 2704B may include performing a function on the samples of the second block. Examples of the function may be a filter, a polynomial function, an exponential function, and a clipping function. In other examples, the filling in step 2704B may include any combination of mirroring, copying, filling with a first value, and performing a function on the samples of the second block.

[0489] exist Fig.29 In the example of , the filling in step 2704B may include filling only samples on one side of the second block, such as Fig.33A It will be appreciated that in other examples, the filling in step 2704B may include filling samples for both sides of the second block, where the two sides of the second block are parallel, such as Fig.33C As shown in , or orthogonal, as Fig.33B In other examples, such as Fig.33D As shown, the padding in step 2704B may include padding samples for more than two sides of the second block.

[0490] At step 2706B, overlapping block motion compensation processing is performed using at least the first and third blocks of prediction samples. Overlapping block motion compensation processing is as described in the previous paragraphs of this application. Fig.29 As shown in step 2908, the overlapped block motion compensation process generates an overlapped block motion compensation block OBMC.

[0491] At step 2708B, the current block is encoded using at least the result of the overlapped block motion compensation process. Fig.29 An example of an encoded block is shown in step 2910 of .

[0492] Note that the terms "encoding" and "encoding" used for the encoding method performed by the image encoder 100 in the description of step 2708B may be replaced at step 2708B with the term "decoding" for the decoding method performed by the image decoder 200.

[0493] In the present embodiment, by introducing a padding process into the overlapped block motion compensation process, the present encoding and decoding method advantageously reduces the memory bandwidth access of the inter-frame prediction process.

[0494] Fig.27C is a flowchart illustrating yet another alternative example of an image encoding / decoding method using an inter-prediction function to generate a prediction of a current block of a picture based on a reference block in a different picture.

[0495] Steps 2702C to 2410C of FIG. 27 are Fig.30Depicted in the concept map. Fig.27C and Fig.30 The embodiment 2700C of the encoding method shown can be performed by the image encoder 100. It should be noted that the decoding method performed by the image decoder 200 is different from the decoding method performed by the image decoder 200. Fig.24 and Fig.25 The encoding method performed by the image encoder 100 shown is the same.

[0496] As shown in example 2700C, steps 2702C and 2704C are similar to those described in relation to Fig.17 Steps 1702 and 1704 described are the same.

[0497] like Fig.30 As shown, an embodiment of the prediction step 2702C of FIG. 27 is depicted in step 3002. In this embodiment, the current block has a size of M×N, where M may be the same as or different from N. The inter-frame predictor 126 of the encoder 100 may predict a first block of prediction samples having a size of (M+d1)×(N+d2), where d1 and d2 may be equal to or greater than zero. Fig.30 As shown in step 3002, the current block may have one or more neighboring blocks, which may be used later in the example of this method.

[0498] like Fig.30 As shown in , it seems to be more advantageous to predict the size of the first block of prediction samples larger than the size of the current block, because more information can be included in the prediction samples, which contributes to a more accurate prediction result. Fig.30 An example of a first block of prediction samples is depicted in dashed lines in step 3002 of FIG.

[0499] like Fig.30 As shown in step 3004 of , the inter-frame predictor 126 of the encoder 100 may be configured to perform step 2704C to fill the first block of prediction samples to form a second block of prediction samples. The second block of prediction samples may have a size of (M+d1+d3)×(N+d2+d4), where d3 and d4 may be equal to or greater than zero. Fig.30 In step 3004 of , an example of a second block of prediction samples is depicted with a thin dashed line, wherein an example of a first block of prediction samples is depicted with a thick dashed line.

[0500] like Fig.30 As shown, it seems to be more advantageous that the size of the second prediction block of prediction samples is formed to be larger than the size of the first block, because more information can be included in the padded block of prediction samples, which contributes to a more accurate prediction result of the current block.

[0501] At step 2706C, an interpolation process is performed on the second block of prediction samples. The interpolation process may include applying an interpolation filter according to the first motion vector to the second block of prediction samples. In one example, the interpolation filter may be the same filter used in a motion compensation process performed for a prediction mode such as merge mode, inter prediction mode, etc. In other examples, the interpolation filter may be different from the filter used in a motion compensation process for a prediction mode as described above.

[0502] like Fig.30 As shown in step 3006, the interpolation process performed on the second block of prediction samples can produce an interpolated block. The size of the interpolated block can be (M+d5)×(N+d6), where d5 and d6 are greater than zero. Fig.30 An example of a block obtained by interpolation processing performed on the third block of prediction samples is shown in dotted lines in step 3006 of FIG. A portion of the block obtained by interpolation processing may be used to encode the current block, wherein the portion may have a size of M×N, such as Fig.30 As shown in step 3008. This portion may be the same as a block obtained by a motion compensation process performed for a prediction mode such as a merge mode, an inter prediction mode, and the like.

[0503] At step 2708C, the current block is encoded using at least the resulting block of interpolated samples performed on the second block of prediction samples. Fig.30 An example of an encoded block is shown in step 3008 of .

[0504] Simultaneously with step 2708C, after step 2708C or before step 2708C, an overlapped block motion compensation process is performed on one or more neighboring blocks of the current block at step 2710C. The overlapped block motion compensation process may use at least the blocks obtained by the interpolation process.

[0505] The overlapped block motion compensation process in step 2708C is as described in the previous paragraphs of this application. The overlapped block motion compensation process can generate one or more overlapped block motion compensation OBMC blocks between one or more neighboring blocks and the current block, such as Fig.29 As shown in step 2906. By using one or more overlapping block motion compensation OBMC blocks between one or more adjacent blocks and the current block generated once, the method of the present disclosure advantageously reduces the memory bandwidth access required for OBMC processing (i.e., data obtained from off-chip memory, DRAM).

[0506] Note that the terms “encoding” and “encoding” used for the encoding method performed by the image encoder 100 in the description of step 2708C may be replaced at step 2708C with the term “decoding” for the decoding method performed by the image decoder 200 .

[0507] In the present disclosure, the blocks of prediction samples described in the above examples and embodiments may be replaced by non-rectangular shape partitions of the prediction samples. Examples of non-rectangular shape partitions may be at least one of triangular partitions, L-shaped partitions, pentagonal partitions, hexagonal partitions, and polygonal partitions, such as Fig.34 shown.

[0508] Those skilled in the art will appreciate that non-rectangular partitions are not limited to Fig.34 The shape partition shown. In addition, Fig.34 The shape partitions depicted in the figure can be freely combined.

[0509] Fig.35 A flow chart illustrating another alternative example of an image encoding / decoding method using an inter prediction function to generate a prediction of a current block of a picture based on a reference block in a different picture is shown.

[0510] Fig.35 Steps 3502 to 3508 may be performed in Fig.36 As depicted in the conceptual diagram of Fig.35 and Fig.36 The embodiment 3500 of the encoding method shown may be performed by the image encoder 100. It can be appreciated that the decoding method performed by the image decoder 200 is different from the decoding method performed by the image decoder 200. Fig.35 and Fig.36 The encoding method performed by the image encoder 100 shown is the same.

[0511] At step 3502, a first block of prediction samples of a current block of a picture is predicted, wherein the prediction includes at least a prediction process using a first motion vector from a different picture. Fig.36 As shown, in Fig.35 An embodiment of a first block of prediction samples predicted in step 3502 of the encoder 100 is depicted in step 3602. In this embodiment, the current block has a size of M×N, where M may be the same as or different from N. The inter-frame predictor 126 of the encoder 100 may predict a first block of prediction samples having a size of (M+d1)×(N+d2), where d1 and d2 may be equal to or greater than zero.

[0512] At step 3504, using at least the first motion vector, a second motion vector is derived for the current block through DMVR processing as described in the previous paragraph. Fig.36 An embodiment of the second motion vector is depicted in step 3604 of . In this embodiment, the second motion vector is shown as a dotted line, which points from the current block to the first block.

[0513] At step 3506, an interpolation process may be performed for the current block using the second motion vector. The interpolation process may include a padding process. In an embodiment of step 3506, the inter-frame predictor 126 of the encoder 100 may be configured to pad the first block of prediction samples into the second block of prediction samples according to the second motion vector, and to perform an interpolation process on the second block of prediction samples using at least the second block of prediction samples. Fig.36 As depicted in step 3606 of , the second block of prediction samples may have a size of (M+d1+d3)×(N+d2+d4), where d3 and d4 may be equal to or greater than zero.

[0514] exist Fig.36 In the embodiment shown, the second block is an L-shaped partition, such as Fig.34 As shown, the second block is adjacent to the first block. It can be appreciated that the second block may also be at least one of a top block, a left block, a right block, a bottom block, an upper left block, an upper right block, a lower left block, and a lower right block adjacent to the first block. Alternatively, the second block may also be a triangle-shaped partition, an L-shaped partition, a pentagon-shaped partition, a hexagon-shaped partition, and a polygon-shaped partition adjacent to the first block.

[0515] Fig.37A and Fig.37B Two examples of the filling process in step 3506 are shown.

[0516] exist Fig.37A In the example shown, the padding process in step 3506 includes padding only samples on one side of the first block to form a second block of prediction samples using the second motion vector derived in step 3504 .

[0517] exist Fig.37B In the example shown, the padding process in step 3506 includes padding samples on both sides of the first block using the second motion vector derived in step 3504 to form a second block of prediction samples. Fig.37B In the example, the two sides of the first block are orthogonal, such as Fig.33B Alternatively, the two sides of the first block are parallel, as Fig.33C It will be appreciated that in other examples, the filling process in step 3506 may include filling samples on more than two sides of the second block, such as Fig.33D Depicted.

[0518] In some examples, such as Fig.32A As shown, the filling process in step 3506 may include mirroring the samples of the first block. In other examples, such as Fig.32B As shown, the padding process in step 3506 may include copying samples of the second block. In other examples, such as Fig.32CAs shown, the filling process in step 3506 may include filling with a fixed value, wherein the fixed value may be at least one of 0, 128, 512, a positive integer, an average value of the second block, and a median value of the second block. In other examples, the filling process in step 3506 may include performing a function on the samples of the second block. Examples of the function may be a filter, a polynomial function, an exponential function, and a clipping function. In other examples, the filling process in step 3506 may include any combination of mirroring, copying, filling with a first value, and performing a function on the samples of the second block.

[0519] As shown in step 3606, an interpolation process is performed on the second block of prediction samples. The interpolation process may include applying an interpolation filter according to the second motion vector to the second block of prediction samples. In one example, the interpolation filter may be the same filter used in a motion compensation process performed for a prediction mode such as a merge mode, an inter-prediction mode, etc. In other examples, the interpolation filter may be different from the filter used in the motion compensation process for the prediction mode as described above.

[0520] As in Fig.36 As shown in step 3606 of , the interpolation process performed on the second block of prediction samples may produce an interpolated block. The interpolated block may have a size of M×N.

[0521] At step 3508, the current block is encoded using at least the block obtained by the interpolation process performed on the second block of prediction samples at step 3506. Fig.36 An example of an encoded block is shown in step 3608 of .

[0522] Note that the terms “encoding” and “encoding” used for the encoding method performed by the image encoder 100 in the description of step 3508 may be replaced at step 3508 with the term “decoding” for the decoding method performed by the image decoder 200 .

[0523] In the present embodiment, by introducing a padding process into the overlapped block motion compensation process, the present encoding and decoding method advantageously reduces the memory bandwidth access for the DMVR process.

[0524] Fig.38 A flow chart illustrating yet another alternative example of an image encoding / decoding method using an inter prediction function to generate a prediction of a current block of a picture based on a reference block in a different picture is shown.

[0525] Fig.38 Steps 3802, 3804, 3806, and 3808 in Fig.39 As shown in the conceptual diagram. Fig.38 and Fig.39The embodiment 3800 of the encoding method shown may be performed by the image encoder 100. It will be appreciated that the decoding method performed by the image decoder 200 is similar to the decoding method performed by the image decoder 200. Fig.38 and Fig.39 The encoding method performed by the image encoder 100 shown is the same.

[0526] As mentioned above, Fig.38 Steps 3802, 3804, 3806, and 3808 are similar to Fig.35 The steps include padding processing in addition to the dynamic motion vector refresh (DMVR) processing in step 3804. Fig.38 In the illustrated embodiment, the filling process in step 3804 includes filling the first block of prediction samples according to the first motion vector. In this regard, at step 3804, a second motion vector is derived for the current block through DMVR processing based on at least the filled first block using the first motion vector as described in the previous paragraph. Fig.39 An embodiment of the second motion vector is depicted in step 3904 as a dotted line, which points from the current block to the first block.

[0527] Note that the terms “encoding” and “encoding” used for the encoding method performed by the image encoder 100 in the description of step 3808 may be replaced at step 3808 by the term “decoding” for the decoding method performed by the image decoder 200 .

[0528] In the present embodiment, by introducing a padding process into the overlapped block motion compensation process, the present encoding and decoding method advantageously reduces the memory bandwidth access for the DMVR process.

[0529] In the present application, the term "block" described in the above examples and embodiments may be replaced by the term "prediction unit". The term "block" described in each aspect may also be replaced by the term "sub-prediction unit". The term "block" described in each aspect may also be replaced by the term "coding unit".

[0530] (Implementation and Application)

[0531] As described in each of the above embodiments, each function or operation block can generally be implemented as, for example, an MPU (microprocessing unit) and a memory. Moreover, the processing performed by each function block can be implemented as a program execution unit, such as a processor that reads and executes software (programs) recorded on a recording medium such as a ROM. The software can be distributed. The software can be recorded on various recording media such as semiconductor memories. Note that each function block can of course also be implemented as hardware (dedicated circuit).

[0532] The processing described in each embodiment can be implemented by integrated processing using a single device (system), or can be implemented by distributed processing using multiple devices. In addition, the processor that executes the above program can be a single processor or multiple processors. In other words, integrated processing can be performed, and alternatively, distributed processing can be performed.

[0533] The embodiments of the present disclosure are not limited to the above exemplary embodiments; various modifications may be made to the exemplary embodiments, and the results are also included in the scope of the embodiments of the present disclosure.

[0534] Next, application examples of the motion image encoding method (image encoding method) and the motion image decoding method (image decoding method) described in each of the above embodiments and various systems that implement the application examples will be described. Such a system may be characterized by including: an image encoder that adopts the image encoding method; an image decoder that adopts the image decoding method; or an image encoder-decoder that includes both an image encoder and an image decoder. Other configurations of such a system may be modified based on specific circumstances.

[0535] (Usage example)

[0536] Fig.40 The overall configuration of a content providing system ex100 suitable for implementing content distribution services is shown. An area where communication services are provided is divided into cells of desired sizes, and base stations ex106, ex107, ex108, ex109, and ex110, which are fixed wireless stations in the shown example, are located in the respective cells.

[0537] In the content providing system ex100, devices including a computer ex111, a game device ex112, a camera ex113, a home appliance ex114, and a smart phone ex115 are connected to the Internet ex101 via an Internet service provider ex102 or a communication network ex104 and base stations ex106 to ex110. The content providing system ex100 can combine and connect any combination of the above devices. In various embodiments, the devices can be directly or indirectly connected together via a telephone network or near field communication rather than via base stations ex106 to ex110. In addition, a streaming server ex103 can be connected to devices including a computer ex111, a game device ex112, a camera ex113, a home appliance ex114, and a smart phone ex115 via, for example, the Internet ex101. The streaming server ex103 can also be connected to a terminal in a hot spot such as in an airplane ex117 via a satellite ex116.

[0538] Note that wireless access points or hotspots may be used instead of base stations ex106 to ex110. The streaming server ex103 may be directly connected to the communication network ex104 instead of being connected to the communication network ex104 via the Internet ex101 or the Internet service provider ex102, and may be directly connected to the aircraft ex117 instead of being connected to the aircraft ex117 via the satellite ex116.

[0539] The camera ex113 is a device capable of capturing still images and videos, such as a digital camera. The smartphone ex115 is a smartphone device, a cellular phone, or a Personal Handyphone System (PHS) phone that can operate under mobile communication system standards of 2G, 3G, 3.9G, and 4G systems and the next-generation 5G system.

[0540] The household appliance ex118 is, for example, a refrigerator or a device included in a household fuel cell cogeneration system.

[0541] In the content providing system ex100, a terminal including an image and / or video capturing function can perform real-time streaming, for example, by connecting to a streaming server ex103 via, for example, a base station ex106. When performing real-time streaming, a terminal (e.g., a computer ex111, a game device ex112, a camera ex113, a home appliance ex114, a smart phone ex115, or an airplane ex117) can perform the encoding process described in the above embodiments on a still image or video content captured by a user via the terminal, can multiplex video data obtained by encoding and audio data obtained by encoding audio corresponding to the video, and can send the obtained data to the streaming server ex103. In other words, according to an aspect of the present disclosure, the terminal functions as an image encoder.

[0542] The streaming server ex103 streams the transmitted content data to the client that requested the stream. Examples of the client include a computer ex111, a game device ex112, a camera ex113, a home appliance ex114, a smartphone ex115, and a terminal in an airplane ex117 that can decode the above-mentioned coded data. The device that receives the streaming data decodes and reproduces the received data. In other words, according to one aspect of the present disclosure, the devices can each function as an image decoder.

[0543] (Distributed Processing)

[0544] The streaming server ex103 may be implemented as a plurality of servers or computers between which tasks such as processing, recording, and streaming of data are divided. For example, the streaming server ex103 may be implemented as a content delivery network (CDN) that streams content through a network connecting a plurality of edge servers located around the world. In a CDN, edge servers that are physically close to a client are dynamically assigned to the client. Content is cached and streamed to the edge servers to reduce loading time. For example, if some type of error or connectivity changes due to a traffic spike, data can be stably streamed at high speed because the affected portion of the network can be avoided by, for example, dividing the processing between a plurality of edge servers, or switching the streaming responsibility to a different edge server, and then continuing streaming.

[0545] Decentralization is not limited to partitioning for streaming; the encoding of captured data can be performed between terminals on the server side or by a terminal on the server side, or both. In one example, in a typical encoding, the process is performed in two loops. The first loop is used to detect the complexity of the image on a frame-by-frame or scene-by-scene basis, or to detect the encoding load. The second loop is used for processing to maintain image quality and improve encoding efficiency. For example, the processing load of the terminal can be reduced and the quality and encoding efficiency of the content can be improved by having the terminal perform a first loop of encoding and having the server side receiving the content perform a second loop of encoding. In this case, when a decoding request is received, the encoded data is likely to cause the first loop to be performed on the receiving terminal and reproduced on another terminal in near real time. This allows for smooth, real-time streaming.

[0546] In another example, the camera ex113 or the like extracts a feature quantity from an image, compresses data related to the feature quantity into metadata, and transmits the compressed metadata to a server. For example, the server determines the importance of an object based on the feature quantity, and changes the quantization accuracy to perform compression suitable for the meaning (or content importance) of the image. The feature quantity data is particularly effective in improving the accuracy and efficiency of motion vector prediction during the second compression pass performed by the server. In addition, the terminal can process encoding with a relatively low processing load such as variable length coding (VLC), and the server can process encoding with a relatively high processing load such as context adaptive binary arithmetic coding (CABAC).

[0547] In yet another example, there are instances where multiple terminals, such as in a stadium, shopping mall, or factory, capture multiple videos of approximately the same scene. In this case, for example, the encoding can be distributed by dividing the processing tasks between multiple terminals that capture the video and, if necessary, between other terminals that do not capture the video and the server. The unit can be, for example, a group of pictures (GOP), a picture, or a tile obtained after dividing the picture. This makes it possible to reduce loading time and achieve closer to real-time streaming.

[0548] Since the videos have roughly the same scenes, the server can perform management and / or instructions so that the video captured by the terminal can be cross-referenced. In addition, the server can receive the encoded data from the terminal, change the reference relationship between the data items, or correct or replace the pictures by itself, and then perform encoding. This makes it possible to generate a higher quality and efficient stream for a single data item.

[0549] In addition, the server can stream the video data after performing code conversion to convert the encoding format of the video data. For example, the server can convert the encoding format from MPEG to VP (e.g., VP9), and can convert H.264 to H.265.

[0550] In this way, encoding can be performed by a terminal or one or more servers. Therefore, although the device performing encoding is referred to as a "server" or a "terminal" in the following description, some or all of the processing performed by the server can be performed by the terminal, and similarly, the processing that can be performed by the terminal can be performed by the server. This also applies to the decoding process.

[0551] (3D, multi-angle)

[0552] The use of images or videos that combine images or videos of different scenes captured simultaneously by multiple terminals such as the camera ex113 and / or the smart phone ex115 or images or videos of the same scene captured from different angles has increased. Videos captured by the terminals are combined based on, for example, relative positional relationships obtained separately between the terminals or areas in the videos having matching feature points.

[0553] In addition to encoding two-dimensional motion images, the server can also encode still images automatically or at a user-specified time point based on scene analysis of the motion images, and send the encoded still images to the receiving terminal. . In addition, when the server can obtain the relative position relationship between the video capture terminals, in addition to the two-dimensional motion pictures, the server can also generate the three-dimensional geometry of the scene based on videos of the same scene captured from different angles. The server can encode the three-dimensional data generated from, for example, a point cloud, respectively, and based on the results of identifying or tracking a person or object using the three-dimensional data, the server can select or reconstruct and generate a video to be sent to the receiving terminal from the videos captured by multiple terminals. .

[0554] This allows the user to enjoy the scene by freely selecting the video corresponding to the video capture terminal, and allows the user to enjoy the content obtained by extracting the video at the selected viewpoint from the three-dimensional data reconstructed from multiple images or videos. In addition, like the video, the sound can be recorded from relatively different angles, and the server can multiplex the audio from a specific angle or space with the corresponding video and send the multiplexed video and audio.

[0555] In recent years, content consisting of the real world and the virtual world, such as virtual reality (VR) and augmented reality (AR) content, has also become popular. In the case of VR images, the server can create images from the viewpoints of the left eye and the right eye, and perform encoding that allows reference between the two viewpoint images, such as multi-view coding (MVC), and alternatively can encode the image as a separate stream without reference. When the image is decoded into a separate stream, the stream can be synchronized when reproduced so that a virtual three-dimensional space can be recreated according to the user's point of view.

[0556] In the case of an AR image, the server superimposes virtual object information existing in the virtual space on camera information representing the real world space based on the three-dimensional position or movement from the user's perspective. The decoder can acquire or store virtual object information and three-dimensional data, generate a two-dimensional image based on the movement from the user's perspective, and then generate superimposed data by seamlessly connecting the images. Alternatively, in addition to the request for virtual object information, the decoder can also send movement to the server from the user's perspective. The server can generate superimposed data based on the three-dimensional data stored in the server according to the received movement, and encode the generated superimposed data and stream it to the decoder. Note that the superimposed data includes an alpha value indicating transparency in addition to the RGB value, and the server sets the alpha value of the part other than the object generated from the three-dimensional data to, for example, 0, and can perform encoding while these parts are transparent. Alternatively, the server can set the background to a predetermined RGB value (e.g., a chroma key) and generate data that sets the area other than the object as the background.

[0557] The decoding of similarly streamed data can be performed by the client (i.e., terminal) on the server side, or divided between them. In one example, a terminal can send a reception request to the server, the requested content can be received and decoded by another terminal, and the decoded signal can be sent to a device with a display. Regardless of the processing power of the communication terminal itself, high image quality data can be reproduced by distributed processing and appropriate selection of content. In another example, for example, when a TV is receiving large-size image data, an area of ​​a picture such as a tile obtained by dividing the picture can be decoded and displayed on a personal terminal or on the terminal of one or more viewers of the TV. This allows viewers to share a large picture view, and each viewer can check their assigned area or check a farther area.

[0558] In situations where multiple wireless connections are possible indoors, outdoors, at close range, medium range, and at long range, streaming system standards such as MPEG-DASH may be used to seamlessly receive content. Users can switch between data in real time while freely selecting decoders or display devices including user terminals, displays arranged indoors or outdoors, and the like. In addition, using information about the user's location, for example, decoding can be performed while switching which terminal handles the decoding and which terminal handles the display of the content. This makes it possible to map and display information while using it on the wall of a nearby building on the way to the destination, where the device capable of displaying the content is on the ground or as part of the ground. In addition, the bit rate of the received data can also be switched based on the accessibility of the encoded data on the network, for example, when the encoded data is cached on a server that can be quickly accessed from the receiving terminal, or when the encoded data is copied to an edge server in a content delivery service.

[0559] (Scalable Coding)

[0560] Reference Fig.41 The scalable flow shown in the figure is used to describe the switching of content. Fig.41 The server may have a configuration in which the content is switched while utilizing the temporal and / or spatial scalability of the stream, which is achieved by dividing and encoding the layers, such as Fig.41As shown. Note that there may be a plurality of individual streams with the same content but different qualities. In other words, by determining the layer to be decoded based on internal factors such as the processing power on the decoder side and external factors such as the communication bandwidth, the decoder side can freely switch between low-resolution content and high-resolution content at the time of decoding. For example, in the case where a user wants to continue watching a video that the user has previously watched on the smartphone ex115 while on the move, such as at home using a device such as a TV connected to the Internet, the device can simply decode the same stream into a different layer, thereby reducing the load on the server side.

[0561] In addition, in addition to the configuration described above, in which scalability is achieved by encoding the picture layer by layer when the enhancement layer is located above the base layer, the enhancement layer may also include metadata based on, for example, statistical information about the image. The decoder side can generate high image quality content by performing super-resolution imaging on the picture in the base layer based on the metadata. Super-resolution imaging can improve the SN ratio while maintaining and / or improving the resolution. The metadata includes information for identifying linear or nonlinear filter coefficients used in super-resolution processing, or information for identifying parameter values ​​of filtering processing, machine learning, or least squares method used in super-resolution processing.

[0562] Alternatively, a configuration may be provided in which a picture is divided into, for example, tiles according to the meaning of an object in the image. On the decoder side, only a partial area is decoded by selecting the tile to be decoded. In addition, by storing the properties of an object (a person, a car, a ball, etc.) and the position of the object in the video (coordinates in the same image) as metadata, the decoder side can identify the position of the desired object based on the metadata and determine which tiles contain the object. For example, Fig.42 As shown, metadata may be stored using a different data storage structure than sample data such as SEI (Supplemental Enhancement Information) messages in HEVC. The metadata indicates, for example, the position, size or color of a main object.

[0563] The metadata can be stored in units of multiple pictures (e.g., streams, sequences, or random access units). The decoder side can obtain, for example, the time when a specific person appears in the video, and by matching the time information with the picture unit information, it can identify the picture in which the object exists and the position of the object in the image.

[0564] (Web Optimization)

[0565] Fig.43 An example of a display screen of a web page on the computer ex111 is shown. For example, Fig.44 FIG. 4 shows an example of a display screen of a web page on the smartphone ex115. Fig.43and Fig.44 As shown, a web page may include multiple image links, which are links to image content, and the appearance of the web page differs depending on the device used to view the web page. When multiple image links are visible on the screen, until the user explicitly selects the image link, or until the image link is located in the approximate center of the screen, or until the entire image link is located in the screen, the display device (decoder) may display a still image included in the content or an I picture as the image link, may display a video such as an animated gif using multiple still images or I pictures, or may receive only the base layer and decode and display the video.

[0566] When the user selects an image link, the display device performs decoding while giving the highest priority to the base layer. Note that if there is information in the HTML code of the web page indicating that the content is scalable, the display device can decode up to the enhancement layer. In addition, in order to ensure real-time reproduction, before a selection is made or when bandwidth is strictly limited, the display device can reduce the delay between the time point when the leading picture is decoded and the time point when the decoded picture is displayed (i.e., the delay between the start of content decoding and the display of the content) by decoding and displaying only forward reference pictures (I pictures, P pictures, forward reference B pictures). Furthermore, the display device can intentionally ignore the reference relationship between pictures and roughly decode all B and P pictures as forward reference pictures, and then perform normal decoding as the number of pictures received over time increases.

[0567] (Autonomous Driving)

[0568] When transmitting and receiving still images or video data (e.g., two-dimensional or three-dimensional map information for autonomous or assisted driving cars), in addition to the image data belonging to one or more layers, the receiving terminal may also receive information about, for example, weather or road construction content as metadata, and associate the metadata with the image data when decoding. Note that the metadata may be allocated per layer, and alternatively may simply be multiplexed with the image data.

[0569] In this case, since the car, drone, airplane, etc. including the receiving terminal is movable, the receiving terminal can seamlessly receive and perform decoding while switching between base stations among base stations ex106 to ex110 by transmitting information indicating the location of the receiving terminal. In addition, the receiving terminal can dynamically select the degree to which metadata is received or the degree to which map information has been updated, for example, according to a user's selection, the user's condition, and / or the bandwidth of the connection.

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

[0571] (Streaming a single content)

[0572] In the content providing system ex100, in addition to high image quality, long content distributed by a video distribution entity, unicast or multicast streaming with low image quality, and short content from individuals are also possible. Such content from individuals may become more popular. The server may first perform editing processing on the content before encoding processing in order to refine the individual content. For example, this can be achieved using the following configuration.

[0573] When capturing video or image content, or after capturing and accumulating the content, the server performs recognition processing, such as capture error processing, scene search processing, meaning analysis, and / or object detection processing, based on the original data or encoded data in real time. Then, based on the results of the recognition processing, the server - when prompted or automatically - edits the content, examples of which include: corrections such as focus and / or motion blur correction; deletion of low-priority scenes, such as scenes with low brightness or unclear focus compared to other pictures; object edge adjustment; and color tone adjustment. The server encodes the edited data based on the results of the editing. It is well known that videos that are too long will receive fewer views. Therefore, in order to keep the content within a specific length proportional to the length of the original video, in addition to the above-mentioned low-priority scenes, the server can also automatically crop out scenes with less motion based on the image processing results. Alternatively, the server can generate and encode a video summary based on the analysis results of the meaning of the scene.

[0574] In some instances, individual content may include content that infringes copyright, moral rights, portrait rights, etc. Such instances may put the creator in an unfavorable situation, such as when content sharing exceeds the scope expected by the creator. Therefore, for example, before encoding, the server may, for example, edit the image to blur the faces of people on the periphery of the screen or blur the interior of the house. In addition, the server may be configured to identify the faces of people other than the registered person in the image to be encoded, and when such a face appears in the image, a mosaic filter may be applied to, for example, the face of the person. Alternatively, as pre-processing or post-processing for encoding, for copyright reasons, the user may specify an image area including a person or a background area to be processed. The server may process the specified area by, for example, replacing the area with a different image or blurring the area. If the area includes a person, the person can be tracked in a moving picture, and when the person moves, the head area of ​​the person can be replaced with another image.

[0575] Since there is a demand for viewing personally generated content in real time, which tends to reduce data size, the decoder first receives the base layer as the highest priority and performs decoding and reproduction, although this may vary depending on the bandwidth. When the content is reproduced two or more times, such as when the decoder receives the enhancement layer during the decoding and reproduction of the base layer and reproduces it in a loop, the decoder can reproduce a high-image quality video including the enhancement layer. If the stream is encoded using such scalable coding, the video may be of low quality when it is not selected or at the beginning of the video, but it can provide an experience in which the image quality of the stream gradually improves in an intelligent manner. This is not limited to scalable coding; the same experience can be provided by configuring a single stream of a low-quality stream from the first reproduction and a second stream encoded using the first stream as a reference.

[0576] (Other implementation and application examples)

[0577] Encoding and decoding can be performed by LSI ex500 (see Fig.40 ) to execute. LSI ex500 may be composed of a single chip or a plurality of chips. Software for encoding and decoding moving images may be integrated into a certain type of recording medium (e.g., a CD-ROM, a floppy disk, or a hard disk), and the computer ex111 may read the recording medium, for example, and may perform encoding and decoding using the software. Furthermore, when the smartphone ex115 is equipped with a camera, video data acquired by the camera may be transmitted. In this case, the video data is encoded by the LSI ex500 included in the smartphone ex115.

[0578] Please note that LSI ex500 can be configured to download and activate applications. In this case, the terminal first determines whether it is compatible with the scheme used to encode the content, or whether it can perform a specific service. When the terminal is not compatible with the encoding scheme of the content or when the terminal cannot perform a specific service, the terminal first downloads the codec or application software, and then acquires and reproduces the content.

[0579] In addition to the example of the content providing system ex100 using the Internet ex101, at least the moving picture encoder (image encoder) or the moving picture decoder (image decoder) described in the above embodiments can be implemented in a digital broadcasting system. The same encoding process and decoding process can be applied to, for example, transmitting and receiving broadcast radio waves superimposed with multiplexed audio and video data using a satellite, even though this is for multicast, and unicast is easier for the content providing system ex100.

[0580] (Hardware Configuration)

[0581] Fig.45 Shows Fig.40More details of the smartphone ex115 are shown in FIG. Fig.46 An example of a configuration of a smart phone ex115 is shown. The smart phone ex115 includes an antenna ex450 for receiving radio waves from and to the base station ex110, a camera ex465 capable of capturing video and still images, and a display ex458 for displaying decoded data (e.g., video captured by the camera ex465 and video received by the antenna ex450). The smart phone ex115 also includes a user interface ex466 such as a touch panel, an audio output unit ex457 such as a speaker for outputting voice or other audio, an audio input unit ex456 such as a microphone for audio input, a memory ex467 capable of storing decoded data such as captured video or still images, recorded audio, received video or still images, mails, and decoded data, and a slot ex464, which is an interface of a SIM ex468 for authorizing access to a network and various data. Note that an external memory may be used instead of ex467.

[0582] The main controller ex460 can comprehensively control the display ex458 and the user interface ex466, the power supply circuit ex461, the user interface input controller ex462, the video signal processor ex455, the camera interface ex463, the display controller ex459, the modulator / demodulator ex452, the multiplexer / demultiplexer ex453, the audio signal processor ex454, the slot ex464, and the memory ex467 are connected via the bus ex470.

[0583] When the user turns on the power button of the power circuit ex461, the smartphone ex115 enters an operable state, and each component is powered from the battery pack.

[0584] The smart phone ex115 performs processing such as calling and data transmission based on control performed by the main controller ex460 including a CPU, ROM, and RAM. When making a call, the audio signal recorded by the audio input unit ex456 is converted into a digital audio signal by the audio signal processor ex454, and spread spectrum processing is performed on it by the modulator / demodulator ex452, and digital-to-analog conversion and frequency conversion processing are applied by the transmitter / receiver ex451, and the resulting signal is transmitted through the antenna ex450. The received data is amplified, frequency-converted, and inversely spread after analog-to-digital conversion by the modulator / demodulator ex452, converted into an analog audio signal by the audio signal processor ex454, and then output from the audio output unit ex457. In the data transmission mode, for example, based on the operation of the user interface ex466 of the main body, the main controller ex460 transmits text, still image, or video data via the user interface input controller ex462. Similar transmission and reception processing is performed. In the data transmission mode, when transmitting video, still images, or video and audio, the video signal processor ex455 compression-encodes the video signal stored in the memory ex467 or the video signal input from the camera ex465 by the moving picture encoding method described in the above embodiments, and transmits the encoded video data to the multiplexer / demultiplexer ex453. The audio signal processor ex454 encodes the audio signal recorded by the audio input unit ex456 while the camera ex465 is capturing video or still images, and transmits the encoded audio data to the multiplexer / demultiplexer ex453. The multiplexer / demultiplexer ex453 multiplexes the encoded video data and the encoded audio data using a predetermined scheme, modulates and converts the data using the modulator / demodulator (modulator / demodulator circuit) ex452 and the transmitter / receiver ex451, and transmits the result via the antenna ex450.

[0585] For example, when a video attached to an e-mail or a chat or a video linked from a web page is received, in order to decode the multiplexed data received through the antenna ex450, the multiplexer / demultiplexer ex453 demultiplexes the multiplexed data to divide the multiplexed data into a bit stream of video data and a bit stream of audio data, supplies the encoded video data to the video signal processor ex455 through the synchronous bus ex470, and supplies the encoded audio data to the audio signal processor ex454 through the synchronous bus ex470. The video signal processor ex455 decodes the video signal using a moving picture decoding method corresponding to the moving picture encoding method described in the above embodiment, and the video or still image included in the linked moving picture file is displayed on the display ex458 via the display controller ex459. The audio signal processor ex454 decodes the audio signal and outputs the audio from the audio output unit ex457. Since real-time streaming is becoming more and more popular, the reproduction of audio may be socially inappropriate in some instances depending on the user's environment. Therefore, as an initial value, a configuration in which only video data is reproduced, that is, an audio signal is not reproduced is preferred. Audio can be synchronized and reproduced only when an input is received (for example, when a user clicks on video data).

[0586] Although the smartphone ex115 is used in the above example, three other implementations are conceivable: a transceiver terminal including both an encoder and a decoder; a transmitter terminal including only an encoder; and a receiver terminal including only a decoder. In the description of the digital broadcasting system, an example is given in which multiplexed data obtained by multiplexing video data with audio data is received or transmitted. However, the multiplexed data may be video data multiplexed with data other than audio data (such as text data related to the video). Furthermore, video data itself may be received or transmitted instead of the multiplexed data.

[0587] Although the main controller ex460 including the CPU is described as controlling the encoding or decoding process, various terminals generally include a GPU. Therefore, a configuration is acceptable in which a large area is processed at one time by utilizing the performance capabilities of the GPU via a memory shared by the CPU and the GPU or a memory including addresses managed to allow common use by the CPU and the GPU. This makes it possible to shorten the encoding time, maintain the real-time nature of the stream, and reduce latency. In particular, processes related to motion estimation, deblocking filtering, sample adaptive offset (SAO), and transform / quantization can be efficiently performed entirely in units of pictures by the GPU instead of the CPU, for example.

[0588] Those skilled in the art will appreciate that various changes and / or modifications may be made to the present disclosure as shown in the specific examples without departing from the spirit or scope of the present disclosure as broadly described. Therefore, the embodiments of the present invention should be considered in all aspects as illustrative and not restrictive.

[0589] According to the present disclosure, various features are provided, such as:

[0590] 1. An encoder for encoding a block to be encoded in a picture using inter-frame prediction, the encoder comprising:

[0591] processor, and

[0592] Memory;

[0593] The processor uses the memory to perform the following steps:

[0594] acquiring two predicted images from the two reference pictures by performing motion compensation using a motion vector corresponding to each of the two reference pictures;

[0595] Obtain two gradient images corresponding to the two predicted images from the two reference images;

[0596] In a subblock obtained by dividing a block to be encoded, two prediction images and two gradient images are used to obtain a local motion estimation value; and

[0597] Using the two prediction images, the two gradient images and the local motion estimation values ​​of the sub-blocks, a final prediction image of the block to be encoded is generated.

[0598] 2. An encoder according to statement 1, wherein, when the two predicted images are to be obtained (with sub-pixel accuracy in the acquisition of the two predicted images), pixels are interpolated with sub-pixel accuracy by referring to pixels in an interpolation reference range surrounding a prediction block indicated by a motion vector in each of the two reference pictures.

[0599] The interpolation reference range is included in a normal reference range that is referred to in order to perform motion compensation on a block to be encoded in normal inter prediction in which a process is performed using a local motion estimation value.

[0600] 3. An encoder according to statement 2, wherein the interpolation reference range matches the normal reference range.

[0601] 4. An encoder according to statement 2 or 3, wherein, in acquiring the two gradient images, reference pixels are made in a gradient reference range surrounding the prediction block in each of the two reference pictures, and wherein the gradient reference range is included in the interpolation reference range.

[0602] 5. An encoder according to statement 4, wherein the gradient reference range matches the interpolation reference range.

[0603] 6. An encoder according to any one of statements 1 to 5, wherein the values ​​of pixels included in the predicted sub-block in the area corresponding to the sub-block in each of the two reference pictures are weighted and used to obtain the local motion estimation value, and wherein the pixels located at the center of the area among these pixels are weighted with a value higher than the values ​​of pixels outside the center of the area.

[0604] 7. An encoder according to statement 6, wherein, in addition to the pixels in the predicted subblock in the area corresponding to the subblock in each of the two reference pictures in which the local motion estimation value is obtained, reference pixels are also made in another predicted subblock included in the prediction block indicated by the motion vector, the other predicted subblock being adjacent to the predicted subblock.

[0605] 8. An encoder according to any one of statements 6 to 7, wherein only some pixels in the predicted subblock in the area corresponding to the subblock are referenced in each of two reference pictures in deriving the local motion estimate value.

[0606] 9. An encoder according to statement 8, wherein

[0607] In obtaining the local motion estimation value,

[0608] (i) selecting a pixel pattern from a plurality of pixel patterns indicating some pixels in a predicted sub-block in each of two reference pictures, the pixel patterns being different from each other, and

[0609] (ii) indicating that pixels in a predicted sub-block of the selected pixel pattern are referenced to obtain a local motion estimation value of the sub-block, the processor being configured to write information indicating the selected pixel pattern into a bitstream.

[0610] 10. An encoder according to statement 8, wherein

[0611] In obtaining the local motion estimation value,

[0612] (i) adaptively selecting a pixel pattern from a plurality of pixel patterns indicating some pixels in the prediction sub-block based on two predicted images in each of the two reference pictures, the pixel patterns being different from each other, and

[0613] (ii) Pixels in the prediction sub-block indicating the selected pixel pattern are referenced to obtain the local motion estimation value of the sub-block.

[0614] 11. A coding method for coding a block to be coded in a picture using inter-frame prediction, the coding method comprising the following steps:

[0615] acquiring two predicted images from the two reference pictures by performing motion compensation using a motion vector corresponding to each of the two reference pictures;

[0616] Obtain two gradient images corresponding to the two predicted images from the two reference images;

[0617] In a subblock obtained by dividing a block to be encoded, two prediction images and two gradient images are used to obtain a local motion estimation value; and

[0618] Using the two prediction images, the two gradient images and the local motion estimation values ​​of the sub-blocks, a final prediction image of the block to be encoded is generated.

[0619] 12. A decoder for decoding a block to be decoded in a picture using inter-frame prediction, the decoder comprising:

[0620] processor, and

[0621] Memory;

[0622] The processor uses the memory to perform the following steps:

[0623] acquiring two predicted images from the two reference pictures by performing motion compensation using a motion vector corresponding to each of the two reference pictures;

[0624] Obtain two gradient images corresponding to the two predicted images from the two reference images;

[0625] deriving a local motion estimation value using two prediction images and two gradient images in sub-blocks obtained by dividing a block to be decoded; and

[0626] Using the local motion estimation values ​​of the sub-blocks, the two prediction images and the two gradient images, a final prediction image of the block to be decoded is generated.

[0627] 13. A decoder according to statement 12, wherein when two predicted images are to be obtained (with sub-pixel accuracy in obtaining the two predicted images), pixels are interpolated with sub-pixel accuracy by referring to pixels in an interpolation reference range surrounding a prediction block indicated by a motion vector in each of two reference pictures,

[0628] The interpolation reference range is included in a normal reference range that is referred to in order to perform motion compensation on a block to be decoded in normal inter prediction in which a process is performed using a local motion estimation value.

[0629] 14. A decoder according to statement 13, wherein the interpolation range matches the normal reference range.

[0630] 15. A decoder according to statement 13 or 14, wherein, in acquiring the two gradient images, reference pixels are made in a gradient reference range surrounding the prediction block in each of the two reference pictures, and wherein the gradient reference range is included in the interpolation reference range.

[0631] 16. A decoder according to statement 15, wherein the gradient reference range matches the interpolation reference range.

[0632] 17. A decoder according to any one of statements 12 to 16, wherein the values ​​of pixels included in a predicted sub-block in an area corresponding to a sub-block in each of the two reference pictures are weighted and used to obtain a local motion estimation value, and wherein pixels located at the center of the area among these pixels are weighted with a value higher than the values ​​of pixels outside the center of the area.

[0633] 18. A decoder according to statement 17, wherein, in addition to the pixels in the predicted subblock in the area corresponding to the subblock in each of the two reference pictures in which the local motion estimation value is obtained, reference pixels are also made in another predicted subblock included in the prediction block indicated by the motion vector, the other predicted subblock being adjacent to the predicted subblock.

[0634] 19. A decoder according to any of statements 17 to 18, wherein only some pixels in the predicted subblock in the area corresponding to the subblock are referenced in each of two reference pictures in deriving the local motion estimate value.

[0635] 20. A decoder according to statement 19, wherein

[0636] The processor obtains information indicative of a selected pixel pattern from a bitstream, and

[0637] In obtaining the local motion estimation value,

[0638] (i) selecting a pixel pattern from a plurality of pixel patterns indicating some pixels in the predicted sub-block in each of the two reference pictures based on the obtained information, the pixel patterns being different from each other, and

[0639] (ii) indicating that pixels in a predicted sub-block of the selected pixel pattern are referenced to obtain a local motion estimation value of the sub-block, the processor being configured to write information indicating the selected pixel pattern into a bitstream.

[0640] 21. A decoder according to statement 19, wherein

[0641] In obtaining the local motion estimation value,

[0642] (i) adaptively selecting a pixel pattern from a plurality of pixel patterns indicating some pixels in the prediction sub-block based on two predicted images in each of the two reference pictures, the pixel patterns being different from each other, and

[0643] (ii) Pixels in the prediction sub-block indicating the selected pixel pattern are referenced to obtain the local motion estimation value of the sub-block.

[0644] 22. A decoding method for decoding a block to be decoded in a picture using inter-frame prediction, the decoding method comprising the steps of:

[0645] acquiring two predicted images from the two reference pictures by performing motion compensation using a motion vector corresponding to each of the two reference pictures;

[0646] Obtain two gradient images corresponding to the two predicted images from the two reference images;

[0647] deriving a local motion estimation value using two prediction images and two gradient images in sub-blocks obtained by dividing a block to be decoded; and

[0648] Using the local motion estimation values ​​of the sub-blocks, the two prediction images and the two gradient images, a final prediction image of the block to be decoded is generated.

[0649] 23. An image encoder, comprising:

[0650] Circuits; and

[0651] a memory coupled to the circuit;

[0652] Among other things, the circuit performs the following operations during operation:

[0653] predicting a first block of prediction samples of a current block of a picture, wherein predicting the first block of prediction samples comprises at least a prediction process using motion vectors from different pictures;

[0654] padding the first block of prediction samples to form a second block of prediction samples, wherein the second block is larger than the first block;

[0655] computing a gradient using at least a second block of the prediction samples; and

[0656] At least the current block is encoded using the computed gradients.

[0657] 24 . The image encoder of claim 23 , wherein the first block of the prediction samples is a prediction block used in a prediction process performed for a prediction mode, wherein the prediction mode is a merge mode or an inter prediction mode.

[0658] 25 . The image encoder of claim 23 , wherein the first block of the prediction samples is a reference block used in a motion compensation process performed for a prediction mode, wherein the prediction mode is a merge mode or an inter prediction mode.

[0659] 26. The image encoder of claim 23, wherein when padding the first block of prediction samples to form the second block of prediction samples, the circuitry performs the following operations:

[0660] At least two sides of a first block of prediction samples are padded to form a second block of prediction samples, wherein at least the two sides of the first block are not orthogonal.

[0661] 27. The image encoder of claim 23, wherein the circuitry performs the following operations when calculating at least the gradient:

[0662] A gradient filter is applied to the second block of prediction samples to generate at least difference values.

[0663] 28. The image encoder of claim 23, wherein when padding the first block of prediction samples to form the second block of prediction samples, the circuitry performs the following operations:

[0664] The first block of prediction samples is mirrored to form a second block of prediction samples.

[0665] 29. The image encoder of claim 23, wherein when padding the first block of prediction samples to form the second block of prediction samples, the circuitry performs the following operations:

[0666] The first block of prediction samples is copied to form a second block of prediction samples.

[0667] 30. The image encoder of claim 23, wherein when padding the first block of prediction samples to form the second block of prediction samples, the circuitry performs the following operations:

[0668] A fixed value is filled into the first block of prediction samples to form a second block of prediction samples, wherein the fixed value may be 0, 128, a positive integer, an average value of the first block of prediction samples, or a median value of the first block of prediction samples.

[0669] 31. The image encoder of claim 23, wherein when padding the first block of prediction samples to form the second block of prediction samples, the circuitry performs the following operations:

[0670] A function is performed on the first block of prediction samples to form a second block of prediction samples.

[0671] 32. The image encoder of claim 23, wherein when padding the first block of prediction samples to form the second block of prediction samples, the circuitry performs the following operations:

[0672] At least two of mirroring, copying, filling with a fixed value, and performing a function on the first block of prediction samples are combined to form a second block of prediction samples.

[0673] 33. The image encoder of claim 23, wherein when predicting a first block of the prediction samples for a current block of the picture, the circuit further performs the following steps:

[0674] Predicting another block of prediction samples of the current block of the picture, wherein predicting the another block of prediction samples comprises a prediction process utilizing at least another motion vector from another different picture.

[0675] 34. The image encoder according to claim 33, wherein the another different picture has a picture sequence count different from a picture sequence count of the different picture and / or a picture sequence count of the picture.

[0676] 35. The image encoder of claim 34, wherein when padding the first block of prediction samples to form the second block of prediction samples, the circuit further performs the following operations:

[0677] Another block of prediction samples is padded to form yet another block of prediction samples.

[0678] 36. The image encoder of claim 23, wherein after the circuit pads the first block of prediction samples to form the second block of prediction samples, the circuit performs interpolation processing for a prediction mode, wherein the prediction mode is a merge mode or an inter-frame prediction mode.

[0679] 37. The image encoder of claim 23, wherein before the circuit pads the first block of prediction samples to form the second block of prediction samples, the circuit performs interpolation processing for a prediction mode, wherein the prediction mode is a merge mode or an inter-frame prediction mode.

[0680] 38. The image encoder of claim 23, wherein when encoding the current block using at least the calculated gradient, the circuit performs the following operations:

[0681] The current block is encoded using the resulting block of prediction samples produced by the interpolation process and at least the calculated gradients.

[0682] 39. The image encoder of claim 38, wherein when at least calculating the gradient, the circuitry performs the following operations:

[0683] One or more gradient filters are applied to the resulting block of prediction samples produced by the interpolation process to generate one or more difference values.

[0684] 40. An image encoder comprising:

[0685] Circuits; and

[0686] a memory coupled to the circuit;

[0687] The circuit performs the following operations during operation:

[0688] predicting a first block of prediction samples of a current block of a picture, wherein predicting the first block of prediction samples comprises at least a prediction process using motion vectors from different pictures;

[0689] padding the first block of prediction samples to form a second block of prediction samples, wherein the second block is larger than the first block;

[0690] performing an interpolation process using the second block of prediction samples; and

[0691] The current block is encoded using at least the interpolated block.

[0692] 41. An image encoder according to claim 40, wherein the circuit in operation performs the following operations:

[0693] An overlapped block motion compensation process is performed to predict one or more neighboring blocks of the current block, wherein the overlapped block motion compensation process uses at least the resulting blocks of the interpolation process.

[0694] 42. The image encoder of claim 40, wherein when the circuit is in operation to fill the first block of prediction samples to form the second block of prediction samples, the circuit is configured to:

[0695] The samples on both sides of a first block of prediction samples are padded, wherein the two sides of the first block are parallel to each other.

[0696] 43. The image encoder of claim 40, wherein when the circuit is in operation to fill the first block of prediction samples to form the second block of prediction samples, the circuit is configured to:

[0697] For the first block of prediction samples, there are more than two edge padding samples.

[0698] 44. An image encoder comprising:

[0699] Circuits; and

[0700] a memory coupled to the circuit;

[0701] Among other things, the circuit performs the following operations during operation:

[0702] predicting a first block of prediction samples of a current block of a picture, wherein predicting the first block of prediction samples comprises at least a prediction process of motion vectors from different pictures;

[0703] filling a second block of prediction samples to form a third block of prediction samples, wherein the second block is a neighboring block to the current block;

[0704] performing an overlapped block motion compensation process using at least the first block and the third block of prediction samples; and

[0705] The current block is encoded using at least the blocks obtained by the overlapped block motion compensation process.

[0706] 45. An image encoder comprising:

[0707] Circuits; and

[0708] a memory coupled to the circuit;

[0709] Among other things, the circuit performs the following operations during operation:

[0710] predicting a first block of prediction samples of a current block of a picture, wherein predicting the first block of prediction samples comprises at least a prediction process using a first motion vector from a different picture;

[0711] Using at least the first motion vector, deriving a second motion vector for the current block through a dynamic motion vector refresh (DMVR) process;

[0712] performing an interpolation process on the current block using the second motion vector, wherein the interpolation process includes a filling process; and

[0713] The current block is encoded using at least the interpolated block.

[0714] 46. ​​The image encoder according to claim 45, wherein when performing interpolation processing on the current block, the circuit is configured to perform the following operations:

[0715] padding the first block of prediction samples to the second block of prediction samples according to the second motion vector; and

[0716] An interpolation process is performed using at least the second block of prediction samples.

[0717] 47. The image encoder of claim 46, wherein when padding the first block of prediction samples into the second block of prediction samples, the circuit is configured to pad one or more sides of the first block of prediction samples according to the second motion vector.

[0718] 48. The image encoder according to claim 45, wherein when the second motion vector is obtained using DMVR processing, the circuit is configured to perform a padding process on the first block of the prediction samples according to the first motion vector.

[0719] 49. An image encoder comprising:

[0720] a partitioner, which receives and partitions an original picture into a plurality of blocks,

[0721] a first adder which, in operation, receives the blocks from the partitioner and the predictions from the prediction controller and subtracts each prediction from its corresponding block to output a residual,

[0722] a transformer which performs a transform on the residual output from the adder to output a transform coefficient in operation,

[0723] a quantizer, which in operation quantizes the transform coefficients to generate quantized transform coefficients,

[0724] an entropy encoder which, in operation, encodes the quantized transform coefficients to generate a bit stream,

[0725] an inverse quantizer and a transformer, which in operation inversely quantizes the quantized transform coefficients to obtain transform coefficients and inversely transforms the transform coefficients to obtain a residual,

[0726] a second adder which, in operation, adds the residual output from the inverse quantizer and the transformer to the prediction output from the prediction controller to reconstruct the block, and

[0727] a prediction controller coupled to an inter-frame predictor and to the memory, wherein the inter-frame predictor is operable to generate a prediction of a current block based on a reference block in an encoded reference picture,

[0728] Among them, when generating a prediction of the current block based on a reference block in a coded reference picture, the inter-frame predictor performs:

[0729] predicting a first block of prediction samples of the current block, wherein predicting the first block of prediction samples comprises at least a prediction process using a motion vector from an encoded reference picture;

[0730] padding the first block of prediction samples to form a second block of prediction samples, wherein the second block is larger than the first block;

[0731] computing a gradient using at least a second block of the prediction samples; and

[0732] At least the current block is encoded using the computed gradients.

[0733] 50. The image encoder of claim 49, wherein the first block of the prediction samples is a prediction block used in a prediction process performed for a prediction mode, wherein the prediction mode is a merge mode or an inter prediction mode.

[0734] 51. The image encoder of claim 49, wherein the first block of the prediction samples is a reference block used in a motion compensation process performed for a prediction mode, wherein the prediction mode is a merge mode or an inter prediction mode.

[0735] 52. The image encoder of claim 49, wherein when padding the first block of prediction samples to form the second block of prediction samples, the inter-frame predictor performs the following operations:

[0736] At least two sides of a first block of prediction samples are padded to form a second block of prediction samples, wherein at least the two sides of the first block are not orthogonal.

[0737] 53. The image encoder of claim 49, wherein the inter-frame predictor performs the following operations when calculating at least the gradient:

[0738] A gradient filter is applied to the second block of prediction samples to generate at least difference values.

[0739] 54. The image encoder of claim 49, wherein when padding the first block of prediction samples to form the second block of prediction samples, the inter-frame predictor performs the following operations:

[0740] The first block of prediction samples is mirrored to form a second block of prediction samples.

[0741] 55. The image encoder of claim 49, wherein when padding the first block of prediction samples to form the second block of prediction samples, the inter-frame predictor performs the following operations:

[0742] The first block of prediction samples is copied to form a second block of prediction samples.

[0743] 56. The image encoder of claim 49, wherein when padding the first block of prediction samples to form the second block of prediction samples, the inter-frame predictor performs the following operations:

[0744] A fixed value is filled into the first block of prediction samples to form a second block of prediction samples, wherein the fixed value may be 0, 128, a positive integer, an average value of the first block of prediction samples, or a median value of the first block of prediction samples.

[0745] 57. The image encoder of claim 49, wherein when padding the first block of prediction samples to form the second block of prediction samples, the inter-frame predictor performs the following operations:

[0746] A function is performed on the first block of prediction samples to form a second block of prediction samples.

[0747] 58. The image encoder of claim 49, wherein when padding the first block of prediction samples to form the second block of prediction samples, the inter-frame predictor performs the following operations:

[0748] Combine at least two of Mirror, Copy, Fill Fixed Value and

[0749] A function is performed on the first block of prediction samples to form a second block of prediction samples.

[0750] 59. The image encoder of claim 49, wherein when predicting a first block of the prediction samples of a current block of the picture, the inter-frame predictor further performs the following operations:

[0751] Predicting another block of prediction samples of the current block, wherein predicting the another block of prediction samples comprises a prediction process utilizing at least another motion vector from another encoded reference picture.

[0752] 60. The image encoder according to claim 59, wherein the another encoded reference picture has a picture order count different from a picture order count of the encoded reference picture and / or a picture order count of the original picture.

[0753] 61. The image encoder of claim 60, wherein when padding the first block of prediction samples to form the second block of prediction samples, the inter-frame predictor further performs the following operations:

[0754] Another block of prediction samples is padded to form yet another block of prediction samples.

[0755] 62. The image encoder of claim 49, wherein after the inter-frame predictor fills the first block of prediction samples to form a second block of prediction samples, the inter-frame predictor performs interpolation processing for a prediction mode, wherein the prediction mode is a merge mode or an inter-frame prediction mode.

[0756] 63. The image encoder of claim 49, wherein the inter-frame predictor performs interpolation processing for a prediction mode before the inter-frame predictor fills the first block of prediction samples to form a second block of prediction samples, wherein the prediction mode is a merge mode or an inter-frame prediction mode.

[0757] 64. The image encoder of claim 49, wherein when encoding the current block using at least the calculated gradient, the inter-frame predictor performs the following operations:

[0758] The current block is encoded using the resulting block of prediction samples produced by the interpolation process and at least the calculated gradients.

[0759] 65. The image encoder of claim 64, wherein the inter-frame predictor performs the following operations when at least calculating the gradient:

[0760] One or more gradient filters are applied to the resulting block of prediction samples produced by the interpolation process to generate one or more difference values.

[0761] 66. An image encoder comprising:

[0762] A partitioner, which in operation receives the original picture and partitions it into blocks,

[0763] a first adder which, in operation, receives the blocks from the partitioner and the predictions from the prediction controller and subtracts each prediction from its corresponding block to output a residual,

[0764] a transformer which performs a transform on the residual output from the adder to output a transform coefficient in operation,

[0765] a quantizer, which in operation quantizes the transform coefficients to generate quantized transform coefficients,

[0766] an entropy encoder which, in operation, encodes the quantized transform coefficients to generate a bit stream,

[0767] an inverse quantizer and a transformer, which in operation inversely quantizes the quantized transform coefficients to obtain transform coefficients and inversely transforms the transform coefficients to obtain a residual,

[0768] a second adder which, in operation, adds the residual output from the inverse quantizer and the transformer to the prediction output from the prediction controller to reconstruct the block, and

[0769] a prediction controller coupled to the inter-frame predictor and the memory, wherein the inter-frame predictor is operable to generate a prediction of the current block based on a reference block in an encoded reference picture,

[0770] Among them, when generating a prediction of the current block based on a reference block in a coded reference picture, the inter-frame predictor performs:

[0771] predicting a first block of prediction samples of a current block of a picture, wherein predicting the first block of prediction samples comprises at least a prediction process using motion vectors from different pictures;

[0772] padding the first block of prediction samples to form a second block of prediction samples, wherein the second block is larger than the first block;

[0773] performing an interpolation process using the second block of prediction samples; and

[0774] The current block is encoded using at least the interpolated block.

[0775] 67. An image encoder according to claim 66, wherein the inter-frame predictor performs the following operations in operation:

[0776] An overlapped block motion compensation process is performed to predict one or more neighboring blocks of the current block, wherein the overlapped block motion compensation process uses at least the resulting blocks of the interpolation process.

[0777] 68. An image encoder according to claim 66, wherein when the inter-frame predictor is in operation to fill a first block of prediction samples to form a second block of prediction samples, the inter-frame predictor is configured to perform the following operations:

[0778] The samples on both sides of a first block of prediction samples are padded, wherein the two sides of the first block are parallel to each other.

[0779] 69. An image encoder according to claim 66, wherein when the inter-frame predictor is in operation to fill a first block of prediction samples to form a second block of prediction samples, the inter-frame predictor is configured to perform the following operations:

[0780] Pad the first block of prediction samples with more samples on both sides.

[0781] 70. An image encoder comprising:

[0782] a partitioner which receives an original picture and partitions it into a plurality of blocks,

[0783] a first adder which in operation receives the blocks from the divider, and the predictions from the prediction controller, and subtracts each prediction from its corresponding block to output a residual,

[0784] a transformer which performs a transform on the residual output from the adder to output a transform coefficient in operation,

[0785] a quantizer, which in operation quantizes the transform coefficients to generate quantized transform coefficients,

[0786] an entropy encoder which, in operation, encodes the quantized transform coefficients to generate a bit stream,

[0787] an inverse quantizer and a transformer, which in operation inversely quantizes the quantized transform coefficients to obtain transform coefficients and inversely transforms the transform coefficients to obtain a residual,

[0788] a second adder which, in operation, adds the residual output from the inverse quantizer and the transformer to the prediction output from the prediction controller to reconstruct the block, and

[0789] a prediction controller coupled to an inter-frame predictor and a memory, wherein the inter-frame predictor is operable to generate a prediction of a current block based on a reference block in an encoded reference picture,

[0790] Among them, when generating a prediction of the current block based on a reference block in a coded reference picture, the inter-frame predictor performs:

[0791] predicting a first block of prediction samples of a current block of a picture, wherein predicting the first block of prediction samples comprises at least a prediction process using motion vectors from different pictures;

[0792] padding a second block of prediction samples to form a third block of prediction samples, wherein the second block is adjacent to the current block;

[0793] performing an overlapped block motion compensation process using at least the first block and the third block of prediction samples; and

[0794] The current block is encoded using at least the blocks obtained by the overlapped block motion compensation process.

[0795] 71. An image encoder comprising:

[0796] a partitioner which receives an original picture and partitions it into a plurality of blocks,

[0797] a first adder which, in operation, receives the blocks from the divider and the predictions from the prediction controller and subtracts each prediction from its corresponding block to output a residual,

[0798] a transformer which performs a transform on the residual output from the adder to output a transform coefficient in operation,

[0799] a quantizer, which in operation quantizes the transform coefficients to generate quantized transform coefficients,

[0800] an entropy encoder which, in operation, encodes the quantized transform coefficients to generate a bit stream,

[0801] an inverse quantizer and a transformer, which in operation inversely quantizes the quantized transform coefficients to obtain transform coefficients and inversely transforms the transform coefficients to obtain a residual,

[0802] a second adder which, in operation, adds the residual output from the inverse quantizer and the transformer to the prediction output from the prediction controller to reconstruct the block, and

[0803] a prediction controller coupled to the inter-frame predictor and the memory, wherein the inter-frame predictor is operable to generate a prediction of the current block based on a reference block in an encoded reference picture,

[0804] Among them, when generating a prediction of the current block based on a reference block in a coded reference picture, the inter-frame predictor performs:

[0805] predicting a first block of prediction samples of a current block of a picture, wherein predicting the first block of prediction samples comprises at least a prediction process using a first motion vector from a different picture;

[0806] Using at least the first motion vector, deriving a second motion vector for the current block through a dynamic motion vector refresh (DMVR) process;

[0807] performing an interpolation process on the current block using the second motion vector, wherein the interpolation process includes a filling process; and

[0808] The current block is encoded using at least the interpolated block.

[0809] 72. The image encoder according to claim 71, wherein, when performing interpolation processing on the current block, the inter-frame predictor is configured to perform the following operations:

[0810] filling the first block of prediction samples into the second block of prediction samples according to the second motion vector; and

[0811] An interpolation process is performed using at least the second block of prediction samples.

[0812] 73. An image encoder according to claim 72, wherein, when filling the first block of prediction samples into the second block of prediction samples, the inter-frame predictor is configured to fill one or more sides of the first block of prediction samples according to the second motion vector.

[0813] 74. The image encoder according to claim 71, wherein when the second motion vector is obtained using the DMVR process, the inter-frame predictor is configured to perform a padding process on the first block of prediction samples according to the first motion vector.

[0814] 75. An image decoder comprising:

[0815] Circuit;

[0816] a memory coupled to the circuit;

[0817] Among other things, the circuit performs the following operations during operation:

[0818] predicting a first block of prediction samples of a current block of a picture, wherein predicting the first block of prediction samples comprises at least a prediction process using motion vectors from different pictures;

[0819] padding the first block of prediction samples to form a second block of prediction samples, wherein the second block is larger than the first block;

[0820] computing a gradient using at least a second block of the prediction samples; and

[0821] Decode the current block using at least the computed gradients.

[0822] 76. The image decoder of claim 75, wherein the first block of the prediction samples is a prediction block used in a prediction process performed for a prediction mode, wherein the prediction mode is a merge mode or an inter prediction mode.

[0823] 77. The image decoder of claim 75, wherein the first block of the prediction samples is a reference block used in a motion compensation process performed for a prediction mode, wherein the prediction mode is a merge mode or an inter prediction mode.

[0824] 78. The image decoder of claim 75, wherein when padding the first block of prediction samples to form the second block of prediction samples, the circuitry performs the following operations:

[0825] At least two sides of a first block of prediction samples are padded to form a second block of prediction samples, wherein at least the two sides of the first block are not orthogonal.

[0826] 79. The image decoder of claim 75, wherein when at least calculating the gradient, the circuitry performs the following operations:

[0827] A gradient filter is applied to the second block of prediction samples to generate at least difference values.

[0828] 80. The image decoder of claim 75, wherein when padding the first block of prediction samples to form the second block of prediction samples, the circuitry performs the following operations:

[0829] The first block of prediction samples is mirrored to form a second block of prediction samples.

[0830] 81. The image decoder of claim 75, wherein when padding the first block of prediction samples to form the second block of prediction samples, the circuitry performs the following operations:

[0831] The first block of prediction samples is copied to form a second block of prediction samples.

[0832] 82. The image decoder of claim 75, wherein when padding the first block of prediction samples to form the second block of prediction samples, the circuitry performs the following operations:

[0833] A fixed value is filled into the first block of prediction samples to form a second block of prediction samples, wherein the fixed value may be 0, 128, a positive integer, an average value of the first block of prediction samples, or a median value of the first block of prediction samples.

[0834] 83. The image decoder of claim 75, wherein when padding the first block of prediction samples to form the second block of prediction samples, the circuitry performs the following operations:

[0835] A function is performed on the first block of prediction samples to form a second block of prediction samples.

[0836] 84. The image decoder of claim 75, wherein when padding the first block of prediction samples to form the second block of prediction samples, the circuitry performs the following operations:

[0837] At least two of mirroring, copying, filling with a fixed value, and performing a function on the first block of prediction samples are combined to form a second block of prediction samples.

[0838] 85. The image decoder of claim 75, wherein when predicting a first block of the prediction samples for a current block of the picture, the circuit further performs the following steps:

[0839] Predicting another block of prediction samples of the current block of the picture, wherein predicting the another block of prediction samples comprises a prediction process utilizing at least another motion vector from another different picture.

[0840] 86. The image decoder of claim 85, wherein the another different picture has a picture sequence count that is different from a picture sequence count of the different picture and / or a picture sequence count of the picture.

[0841] 87. The image decoder of claim 86, wherein when padding the first block of prediction samples to form the second block of prediction samples, the circuit further performs the following operations:

[0842] Another block of prediction samples is padded to form yet another block of prediction samples.

[0843] 88. An image decoder according to claim 75, wherein, after the circuit fills the first block of prediction samples to form the second block of prediction samples, the circuit performs interpolation processing for a prediction mode, wherein the prediction mode is a merge mode or an inter-frame prediction mode.

[0844] 89. An image decoder according to claim 75, wherein before the circuit fills the first block of prediction samples to form the second block of prediction samples, the circuit performs interpolation processing for a prediction mode, wherein the prediction mode is a merge mode or an inter-frame prediction mode.

[0845] 90. The image decoder of claim 75, wherein when decoding a current block using at least the calculated gradient, the circuit performs the following operations:

[0846] The current block is decoded using the resulting block of prediction samples produced by the interpolation process and at least the calculated gradients.

[0847] 91. The image decoder of claim 90, wherein when at least calculating the gradient, the circuitry performs the following operations:

[0848] One or more gradient filters are applied to the resulting block of prediction samples produced by the interpolation process to generate one or more difference values.

[0849] 92. An image decoder comprising:

[0850] Circuits; and

[0851] a memory coupled to the circuit;

[0852] Among other things, the circuit performs the following operations during operation:

[0853] predicting a first block of prediction samples of a current block of a picture, wherein predicting the first block of prediction samples comprises at least a prediction process using motion vectors from different pictures;

[0854] padding the first block of prediction samples to form a second block of prediction samples, wherein the second block is larger than the first block;

[0855] performing an interpolation process using the second block of prediction samples; and

[0856] The current block is decoded using at least the interpolated block.

[0857] 93. An image decoder according to claim 92, wherein the circuit in operation performs the following operations:

[0858] An overlapped block motion compensation process is performed to predict one or more neighboring blocks of the current block, wherein the overlapped block motion compensation process uses at least the resulting blocks of the interpolation process.

[0859] 94. The image decoder of claim 92, wherein when the circuit is in operation to fill the first block of prediction samples to form the second block of prediction samples, the circuit is configured to perform the following operations:

[0860] The samples on both sides of a first block of prediction samples are padded, wherein the two sides of the first block are parallel to each other.

[0861] 95. The image decoder of claim 92, wherein when the circuit is in operation to fill the first block of prediction samples to form the second block of prediction samples, the circuit is configured to perform the following operations:

[0862] Pad the first block of prediction samples with more samples on both sides.

[0863] 96. An image decoder comprising:

[0864] Circuits; and

[0865] a memory coupled to the circuit;

[0866] Among other things, the circuit performs the following operations during operation:

[0867] predicting a first block of prediction samples of a current block of a picture, wherein predicting the first block of prediction samples comprises at least a prediction process using motion vectors from different pictures;

[0868] padding a second block of prediction samples to form a third block of prediction samples, wherein the second block is adjacent to the current block;

[0869] performing an overlapped block motion compensation process using at least the first block and the third block of prediction samples; and

[0870] The current block is decoded using at least the resulting blocks processed by the overlapped block motion compensation.

[0871] 97. An image decoder comprising:

[0872] Circuits; and

[0873] a memory coupled to the circuit;

[0874] Among other things, the circuit performs the following operations during operation:

[0875] Predicting a first block of prediction samples of a current block of a picture, wherein predicting the first block of prediction samples comprises at least a prediction process using a first motion vector from a different picture;

[0876] Using at least the first motion vector, deriving a second motion vector for the current block through a dynamic motion vector refresh (DMVR) process;

[0877] performing an interpolation process on the current block using the second motion vector, wherein the interpolation process includes a filling process; and

[0878] The current block is decoded using at least the interpolated block.

[0879] 98. The image decoder according to claim 97, wherein when performing interpolation processing on the current block, the circuit is configured to perform the following operations:

[0880] filling the first block of prediction samples into the second block of prediction samples according to the second motion vector; and

[0881] An interpolation process is performed using at least the second block of prediction samples.

[0882] 99. An image decoder according to claim 98, wherein when filling the first block of prediction samples into the second block of prediction samples, the circuit is configured to fill one or more sides of the first block of prediction samples according to the second motion vector.

[0883] 100. The image decoder of claim 97, wherein when a second motion vector is obtained using DMVR processing, the circuit is configured to perform a padding process on a first block of the prediction samples according to the first motion vector.

[0884] 101. An image decoder comprising:

[0885] an entropy decoder which, in operation, receives the encoded bitstream and decodes it to obtain quantized transform coefficients,

[0886] an inverse quantizer and a transformer, which in operation inversely quantizes the quantized transform coefficients to obtain transform coefficients and inversely transforms the transform coefficients to obtain a residual,

[0887] an adder which, in operation, adds the residual output from the inverse quantizer and the transformer to the prediction output from the prediction controller to reconstruct the block, and

[0888] a prediction controller coupled to the inter-frame predictor and the memory, wherein the inter-frame predictor is operable to generate a prediction of a current block of the picture based on a reference block in a decoded reference picture,

[0889] Among them, when generating a prediction of the current block based on a reference block in a decoded reference picture, the inter-frame predictor performs:

[0890] predicting a first block of prediction samples of the current block, wherein predicting the first block of prediction samples comprises at least a prediction process using a motion vector from a decoded reference picture;

[0891] padding the first block of prediction samples to form a second block of prediction samples, wherein the second block is larger than the first block;

[0892] computing a gradient using at least a second block of the prediction samples; and

[0893] Decode the current block using at least the computed gradients.

[0894] 102. The image decoder of claim 101, wherein the first block of the prediction samples is a prediction block used in a prediction process performed for a prediction mode, wherein the prediction mode is a merge mode or an inter prediction mode.

[0895] 103. The image decoder of claim 101, wherein the first block of the prediction samples is a reference block used in a motion compensation process performed for a prediction mode, wherein the prediction mode is a merge mode or an inter-prediction mode.

[0896] 104. The image decoder of claim 101, wherein when padding the first block of prediction samples to form the second block of prediction samples, the inter-frame predictor performs the following operations:

[0897] At least two sides of a first block of prediction samples are padded to form a second block of prediction samples, wherein at least the two sides of the first block are not orthogonal.

[0898] 105. The image decoder of claim 101, wherein when at least calculating the gradient, the inter-frame predictor performs the following operations: The inter-frame predictor performs the following operations:

[0899] A gradient filter is applied to the second block of prediction samples to produce at least difference values.

[0900] 106. The image decoder of claim 101, wherein when padding the first block of prediction samples to form the second block of prediction samples, the inter-frame predictor performs the following operations:

[0901] The first block of prediction samples is mirrored to form a second block of prediction samples.

[0902] 107. The image decoder of claim 101, wherein when padding the first block of prediction samples to form the second block of prediction samples, the inter-frame predictor performs the following operations:

[0903] The first block of prediction samples is copied to form a second block of prediction samples.

[0904] 108. The image decoder of claim 101, wherein when padding the first block of prediction samples to form the second block of prediction samples, the inter-frame predictor performs the following operations:

[0905] A fixed value is filled into the first block of prediction samples to form a second block of prediction samples, wherein the fixed value may be 0, 128, a positive integer, an average value of the first block of prediction samples, or a median value of the first block of prediction samples.

[0906] 109. The image decoder of claim 101, wherein when padding the first block of prediction samples to form the second block of prediction samples, the inter-frame predictor performs the following operations:

[0907] A function is performed on the first block of prediction samples to form a second block of prediction samples.

[0908] 110. The image decoder of claim 101, wherein when padding the first block of prediction samples to form the second block of prediction samples, the inter-frame predictor performs the following operations:

[0909] At least two of mirroring, copying, filling with a fixed value, and performing a function on the first block of prediction samples are combined to form a second block of prediction samples.

[0910] 111. The image decoder of claim 101, wherein when predicting a first block of prediction samples of a current block of the picture, the inter-frame predictor further performs the following operations:

[0911] Predicting another block of prediction samples of the current block, wherein predicting the another block of prediction samples at least includes a prediction process using another motion vector from another decoded reference picture.

[0912] 112. The image decoder according to claim 111, wherein the another decoded reference picture has a picture order count different from a picture order count of the decoded reference picture and / or a picture order count of the picture.

[0913] 113. The image decoder of claim 112, wherein when padding the first block of prediction samples to form the second block of prediction samples, the inter-frame predictor further performs the following operations:

[0914] Another block of prediction samples is padded to form yet another block of prediction samples.

[0915] 114. An image decoder according to claim 101, wherein, after the inter-frame predictor fills the first block of prediction samples to form a second block of prediction samples, the inter-frame predictor performs interpolation processing for a prediction mode, wherein the prediction mode is a merge mode or an inter-frame prediction mode.

[0916] 115. An image decoder according to claim 101, wherein, before the inter-frame predictor fills the first block of prediction samples to form a second block of prediction samples, the inter-frame predictor performs interpolation processing for a prediction mode, wherein the prediction mode is a merge mode or an inter-frame prediction mode.

[0917] 116. The image decoder of claim 101, wherein when decoding a current block using at least the calculated gradient, the inter-frame predictor performs the following operations:

[0918] The current block is decoded using the resulting block of prediction samples produced by the interpolation process and at least the calculated gradients.

[0919] 117. The image decoder of claim 116, wherein when at least calculating the gradient, the inter-frame predictor performs the following operations:

[0920] One or more gradient filters are applied to the resulting block of prediction samples produced by the interpolation process to generate one or more difference values.

[0921] 118. An image decoder comprising:

[0922] an entropy decoder which, in operation, receives the encoded bitstream and decodes it to obtain quantized transform coefficients,

[0923] an inverse quantizer and a transformer, which in operation inversely quantizes the quantized transform coefficients to obtain transform coefficients and inversely transforms the transform coefficients to obtain a residual,

[0924] an adder which, in operation, adds the residual output from the inverse quantizer and the transformer to the prediction output from the prediction controller to reconstruct the block, and

[0925] a prediction controller coupled to the inter-frame predictor and the memory, wherein the inter-frame predictor is operable to generate a prediction of a current block of the picture based on a reference block in a decoded reference picture,

[0926] Among them, when generating a prediction of the current block based on a reference block in a decoded reference picture, the inter-frame predictor performs:

[0927] predicting a first block of prediction samples of a current block of a picture, wherein predicting the first block of prediction samples comprises at least a prediction process using motion vectors from different pictures;

[0928] padding the first block of prediction samples to form a second block of prediction samples, wherein the second block is larger than the first block;

[0929] performing an interpolation process using the second block of prediction samples; and

[0930] The current block is decoded using at least the interpolated block.

[0931] 119. An image decoder according to claim 118, wherein the circuitry, in operation, performs the following operations:

[0932] An overlapped block motion compensation process is performed to predict one or more neighboring blocks of the current block, wherein the overlapped block motion compensation process uses at least the resulting blocks of the interpolation process.

[0933] 120. The image decoder of claim 118, wherein when the circuit is in operation to fill the first block of prediction samples to form the second block of prediction samples, the circuit is configured to perform the following operations:

[0934] The samples on both sides of a first block of prediction samples are padded, wherein the two sides of the first block are parallel to each other.

[0935] 121. The image decoder of claim 118, wherein when the circuit is in operation to fill the first block of prediction samples to form the second block of prediction samples, the circuit is configured to perform the following operations:

[0936] Pad the first block of prediction samples with more samples on both sides.

[0937] 122. An image decoder comprising:

[0938] an entropy decoder which, in operation, receives the encoded bitstream and decodes it to obtain quantized transform coefficients,

[0939] an inverse quantizer and a transformer, which in operation inversely quantizes the quantized transform coefficients to obtain transform coefficients and inversely transforms the transform coefficients to obtain a residual,

[0940] an adder which, in operation, adds the residual output from the inverse quantizer and the transformer to the prediction output from the prediction controller to reconstruct the block, and

[0941] a prediction controller coupled to the inter-frame predictor and the memory, wherein the inter-frame predictor is operable to generate a prediction of a current block of the picture based on a reference block in a decoded reference picture,

[0942] Among them, when generating a prediction of the current block based on a reference block in a decoded reference picture, the inter-frame predictor performs:

[0943] predicting a first block of prediction samples of a current block of a picture, wherein predicting the first block of prediction samples comprises at least a prediction process using motion vectors from different pictures;

[0944] padding a second block of prediction samples to form a third block of prediction samples, wherein the second block is adjacent to the current block;

[0945] performing an overlapped block motion compensation process using at least the first block and the third block of prediction samples; and

[0946] The current block is decoded using at least the resulting blocks processed by the overlapped block motion compensation.

[0947] 123. An image decoder comprising:

[0948] Circuits; and

[0949] a memory coupled to the circuit;

[0950] Among other things, the circuit performs the following operations during operation:

[0951] predicting a first block of prediction samples of a current block of a picture, wherein predicting the first block of prediction samples comprises at least a prediction process using a first motion vector from a different picture;

[0952] Using at least the first motion vector, deriving a second motion vector for the current block through a dynamic motion vector refresh (DMVR) process;

[0953] performing an interpolation process on the current block using the second motion vector, wherein the interpolation process includes a filling process; and

[0954] The current block is decoded using at least the interpolated block.

[0955] 124. The image decoder according to claim 123, wherein when performing interpolation processing on the current block, the circuit is configured to perform the following operations:

[0956] filling the first block of prediction samples into the second block of prediction samples according to the second motion vector; and

[0957] An interpolation process is performed using at least the second block of prediction samples.

[0958] 125. An image decoder according to claim 124, wherein, when filling the first block of prediction samples into the second block of prediction samples, the circuit is configured to fill one or more sides of the first block of prediction samples according to the second motion vector.

[0959] 126. The image decoder of claim 123, wherein when a second motion vector is derived using DMVR processing, the circuit is configured to perform padding processing on the first block of prediction samples according to the first motion vector.

[0960] 127. A method of image encoding, comprising implementing an image encoder that performs the steps of any one of claims 1 to 48.

[0961] 128. A method of image decoding, comprising implementing an image decoder that performs the steps of any one of claims 75 to 100.

[0962] [Industrial Applicability]

[0963] The present disclosure can be applied to, for example, television receivers, digital video recorders, car navigation systems, mobile phones, digital still cameras, and digital video cameras.

[0964] 100: Encoder

[0965] 102: Split Unit

[0966] 104: Subtraction unit

[0967] 106: Conversion unit

[0968] 108: Quantitative Units

[0969] 110: Entropy coding unit

[0970] 112, 204: Inverse quantization unit

[0971] 114, 206: Inverse transformation unit

[0972] 116, 208: Add units

[0973] 118, 210: Block storage

[0974] 120, 212: Loop filter unit

[0975] 122, 214: Frame storage

[0976] 124, 216: Intra-frame predictor

[0977] 126, 218: Inter-frame predictor

[0978] 128, 220: Prediction control unit

[0979] 200: Decoder

[0980] 202: Entropy decoding unit

[0981] 1000: Current image

[0982] 1001: Current block

[0983] 1100: First reference image

[0984] 1110: First motion vector

[0985] 1120: First prediction block

[0986] 1121, 1221: predicted sub-blocks

[0987] 1122, 1222: upper left pixel

[0988] 1130, 1130A: First interpolation reference range

[0989] 1131, 1131A, 1132, 1132A, 1231, 1231A, 1232, 1232A: Reference range

[0990] 1135, 1135A: First gradient reference range

[0991] 1140: First predicted image

[0992] 1150: First gradient images

[0993] 1200: Second reference image

[0994] 1210: Second motion vector

[0995] 1220: Second prediction block

[0996] 1230, 1230A: Second interpolation reference range

[0997] 1235, 1235A: Second gradient reference range

[0998] 1240: Second predicted image

[0999] 1250: Second gradient image

[1000] 1300: Local motion estimation value

[1001] 1400: Final prediction image

Claims

1. An image encoder, comprising: Memory; as well as a circuit coupled to the memory, wherein In operation, the circuit: generating a prediction block by performing an interpolation process using values ​​of samples included in a reference picture; generating a gradient block using the prediction block, the gradient block having a size that is the same as a size of the prediction block; generating a predicted image using the gradient block; as well as The current block is encoded based on the predicted image, wherein The generation of the gradient block includes a process of calculating a gradient value indicating a difference between a value of a lower sample and a value of an upper sample, the lower sample being adjacent to a bottom of a target sample, the upper sample being adjacent to a top of the target sample, the target sample being included in the prediction block, A first gradient value located at an upper edge of the gradient block is calculated using a value of a first sample located at the same place as the first gradient value in the prediction block as a value of the upper sample, and A second gradient value adjacent to a bottom of the first gradient value is calculated using a value of the first sample as a value of the upper sample.

2. An image decoder, comprising: Memory; as well as a circuit coupled to the memory, wherein In operation, the circuit: generating a prediction block by performing an interpolation process using values ​​of samples included in a reference picture; generating a gradient block using the prediction block, the gradient block having a size that is the same as a size of the prediction block; generating a predicted image using the gradient block; as well as The current block is decoded based on the predicted image, wherein The generation of the gradient block includes a process of calculating a gradient value indicating a difference between a value of a lower sample and a value of an upper sample, the lower sample being adjacent to a bottom of a target sample, the upper sample being adjacent to a top of the target sample, the target sample being included in the prediction block, A first gradient value located at an upper edge of the gradient block is calculated using a value of a first sample located at the same place as the first gradient value in the prediction block as a value of the upper sample, and A second gradient value adjacent to a bottom of the first gradient value is calculated using a value of the first sample as a value of the upper sample.

3. A bit stream generating device, comprising: Memory; as well as a circuit coupled to the memory, wherein In operation, the circuit generates a bitstream including parameters according to which the computer executable instructions cause the decoder to: generating a prediction block by performing an interpolation process using values ​​of samples included in a reference picture; generating a gradient block using the prediction block, the gradient block having a size that is the same as a size of the prediction block; generating a predicted image using the gradient block; as well as The current block is decoded based on the predicted image, wherein The generation of the gradient block includes a process of calculating a gradient value indicating a difference between a value of a lower sample and a value of an upper sample, the lower sample being adjacent to a bottom of a target sample, the upper sample being adjacent to a top of the target sample, the target sample being included in the prediction block, A first gradient value located at an upper edge of the gradient block is calculated using a value of a first sample located at the same place as the first gradient value in the prediction block as a value of the upper sample, and A second gradient value adjacent to a bottom of the first gradient value is calculated using a value of the first sample as a value of the upper sample.