Image encoding / decoding method, storage medium, and transmission method
By using a motion compensation method based on sub-blocks, the image encoding/decoding process is optimized, solving the problem of low efficiency of traditional methods in high-resolution and high-quality images, and achieving more efficient image compression and decoding.
Patent Information
- Application Number
- CN202311147523.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2018-09-18
- Filing Date
- 2019-03-13
- Publication Date
- 2026-11-27
- Estimated Expiration
- 2039-03-13
AI Technical Summary
Traditional image encoding/decoding methods and devices are inefficient in processing high-resolution and high-quality images, especially in motion compensation, and cannot effectively compress image data.
An encoding/decoding method that performs motion compensation on a sub-block basis is adopted. By generating corrected motion information, the distortion value is calculated using bilateral templates and search regions to optimize the motion information, and the prediction block is generated by merging candidate lists.
It improves the efficiency of image encoding and decoding, reduces computational complexity, and enhances compression efficiency.
Smart Images

Figure CN116962717B_ABST
Abstract
Description
[0001] This application is a divisional application of the original patent application No. 201980019167.3 (International Application No.: PCT / KR2019 / 002875, Application Date: March 13, 2019, Invention Title: Method and Apparatus for Encoding / Decoding Images and Recording Medium for Storing Bit Streams). Technical Field
[0002] This invention relates to an image encoding / decoding method and apparatus, as well as a recording medium for storing bitstreams. More specifically, this invention relates to an image encoding / decoding method and apparatus that performs motion compensation by modifying motion information. Background Technology
[0003] Recently, the demand for high-resolution and high-quality images, such as high-definition (HD) and ultra-high-definition (UHD) images, has increased across various application areas. However, higher resolution and quality image data involve significantly more data volume compared to traditional image data. Therefore, the costs of transmission and storage increase when transmitting image data using media such as traditional wired and wireless broadband networks, or when storing image data using traditional storage media. To address these issues arising from the increasing resolution and quality of image data, efficient image encoding / decoding technologies are needed for higher resolution and higher quality images.
[0004] Image compression techniques encompass a variety of methods, including: inter-frame prediction techniques that predict pixel values included in the current frame from previous or subsequent frames; intra-frame prediction techniques that predict pixel values included in the current frame using pixel information from the current frame; transformation and quantization techniques for compressing residual signals based on energy; entropy coding techniques that assign short codes to values with high frequency of occurrence and long codes to values with low frequency of occurrence; and so on. Image data can be effectively compressed using such image compression techniques, and this image data can be transmitted or stored.
[0005] Traditional image encoding / decoding methods and devices have limitations in improving encoding efficiency because they perform motion compensation for the target block being encoded / decoded based on motion information from spatially / temporally neighboring blocks.
[0006] Furthermore, traditional image encoding / decoding methods and devices have limitations in improving encoding efficiency because they perform motion compensation on a block-by-block basis. Summary of the Invention
[0007] Technical issues
[0008] This invention provides an encoding / decoding method and device for performing motion compensation by modifying motion information.
[0009] This invention provides an encoding / decoding method and device for performing motion compensation on a sub-block basis.
[0010] Technical solution
[0011] According to a method for decoding an image according to the present invention, the method may include: deriving initial motion information of the current block from at least one of motion information of spatially neighboring blocks, motion information of temporally neighboring blocks, and predefined motion information; generating corrected motion information by performing motion information correction on the initial motion information; and generating a predicted block of the current block by using the corrected motion information.
[0012] In a method for decoding an image, the step of generating corrected motion information includes: generating a bilateral template based on the initial motion information; calculating a distortion value by comparing the bilateral template with a search region within a reference image indicated by the initial motion information; and generating the corrected motion information by correcting the initial motion information based on the distortion value.
[0013] In a method for decoding an image, in the step of generating corrected motion information, the corrected motion information is generated in units of sub-blocks of the current block.
[0014] In the method for decoding an image, the search region is a square-shaped region and is defined as a pixel range in predefined integer pixel units in the horizontal and vertical directions, starting from the pixel indicated by the initial motion information.
[0015] In the method for decoding an image, when the current block has a bidirectional predictive merging mode, a step of generating corrected motion information is performed.
[0016] In a method for decoding an image, a step of generating corrected motion information is determined based on the size of the current block.
[0017] In a method for decoding an image, a step of generating corrected motion information is performed based on information determined by the motion correction mode.
[0018] In a method for decoding an image, the distortion value is calculated based on at least one of the following: sum of absolute differences (SAD), sum of absolute transform differences (SATD), sum of squared errors (SSE), mean of squared errors (MSE), and mean of de-SAD (MR-SAD).
[0019] In a method for decoding an image, in the step of generating corrected motion information, the initial motion information is corrected within a search area.
[0020] In a method for decoding an image, the search area is cross-shaped.
[0021] In the method for decoding an image, when the current block has a merging mode, a step of generating corrected motion information is performed.
[0022] In a method for decoding an image, when correcting the initial motion information, the initial motion information is corrected based on at least one of information about the search direction and information about the search distance within the search area.
[0023] According to a method for decoding an image according to the present invention, the method may include: determining a co-image of a current block; determining a co-block in the co-image by using at least one motion information of a block spatially adjacent to the current block; deriving a merging candidate in units of sub-blocks from sub-blocks obtained by dividing the co-blocks; and generating a merging candidate list by using the merging candidates.
[0024] In a method for decoding an image, the step of determining the co-image of the current block is performed based on information indicating the co-image, wherein the information indicating the co-image is transmitted by signal in units of at least one of sequence, frame, and strip group.
[0025] In a method for decoding an image, when the size of the current block is equal to or greater than a preset value, the merging candidates in units of sub-blocks are derived.
[0026] In a method for decoding an image, the sub-block has a square shape, wherein the square shape has a preset size.
[0027] According to a method for encoding an image according to the present invention, the method may include: determining a co-image of a current block; determining a co-block in the co-image by using at least one motion information of a block spatially adjacent to the current block; deriving a merge candidate in units of sub-blocks from sub-blocks obtained by dividing the co-blocks; and generating a merge candidate list by using the merge candidates in units of sub-blocks.
[0028] According to a non-transitory storage medium of the present invention, the non-transitory storage medium includes a bitstream generated by using an image encoding method, wherein the image encoding method includes: determining a co-location image of a current block; determining a co-location block in the co-location image by using at least one motion information of a block spatially adjacent to the current block; deriving a merge candidate in units of sub-blocks from sub-blocks obtained by dividing the co-location blocks; and generating a merge candidate list by using the merge candidates in units of sub-blocks.
[0029] Beneficial effects
[0030] According to the present invention, an image encoding / decoding method and apparatus with improved compression efficiency can be provided.
[0031] According to the present invention, the encoding efficiency and decoding efficiency of images can be improved.
[0032] According to the present invention, the computational complexity of textures in image encoders and image decoders can be reduced. Attached Figure Description
[0033] Figure 1 This is a block diagram illustrating the configuration of an encoding device according to an embodiment of the present invention.
[0034] Figure 2 This is a block diagram illustrating the configuration of a decoding device according to an embodiment of the present invention.
[0035] Figure 3 It is a schematic diagram illustrating the partitioning structure of an image when it is encoded and decoded.
[0036] Figure 4 This is a diagram illustrating inter-frame prediction processing.
[0037] Figure 5 This is a flowchart illustrating an image encoding method according to an embodiment of the present invention.
[0038] Figure 6 This is a flowchart illustrating an image decoding method according to an embodiment of the present invention.
[0039] Figure 7 This is a flowchart illustrating an image encoding method according to another embodiment of the present invention.
[0040] Figure 8 This is a flowchart illustrating an image decoding method according to another embodiment of the present invention.
[0041] Figure 9 This is a diagram illustrating an exemplary method for deriving candidates for the spatial motion vector of the current block.
[0042] Figure 10This is a diagram illustrating an exemplary method for deriving candidates for the time motion vector of the current block.
[0043] Figure 11 This is a diagram illustrating an example of spatial merge candidates being added to the merge candidate list.
[0044] Figure 12 This is a diagram illustrating an example of time merging candidates being added to the merge candidate list.
[0045] Figure 13 This is a diagram illustrating a method for predicting motion information using a first sub-block as a unit, according to an embodiment of the present invention.
[0046] Figure 14 This is a diagram illustrating a method for predicting motion information using a second sub-block as a unit according to an embodiment of the present invention.
[0047] Figure 15 This is a diagram illustrating bilateral template matching.
[0048] Figures 16 to 21 This is a diagram showing the region used to search for corrected motion vectors in bilateral template matching.
[0049] Figure 22 This is a flowchart illustrating an image decoding method according to an embodiment of the present invention.
[0050] Figure 23 This is a flowchart illustrating an image decoding method according to an embodiment of the present invention. Detailed Implementation
[0051] Various modifications can be made to this invention, and various embodiments and examples of the invention are present and will now be described in detail with reference to the accompanying drawings. However, while exemplary embodiments may be construed as including all modifications, equivalents, or substitutions within the technical concept and scope of the invention, the invention is not limited thereto. Similar reference numerals denote the same or similar functions in various aspects. In the drawings, the shapes and sizes of elements may be exaggerated for clarity. In the following detailed description of the invention, reference is made to the accompanying drawings, which illustrate specific embodiments in which the invention can be practiced. These embodiments are described in sufficient detail to enable those skilled in the art to implement this disclosure. It should be understood that the various embodiments of this disclosure, while different, are not necessarily mutually exclusive. For example, specific features, structures, and characteristics described herein in connection with one embodiment may be implemented in other embodiments without departing from the spirit and scope of this disclosure. Furthermore, it should be understood that the position or arrangement of various elements within each disclosed embodiment may be modified without departing from the spirit and scope of this disclosure. Therefore, the following detailed description should not be considered limiting, and the scope of this disclosure is defined only by the appended claims as properly interpreted and the full scope of the equivalents claimed.
[0052] The terms "first," "second," etc., used in this specification may be used to describe various components, but a component should not be construed as limited to these terms. These terms are used only to distinguish one component from others. For example, without departing from the scope of the invention, a "first" component may be referred to as a "second" component, and a "second" component may similarly be referred to as a "first" component. The term "and / or" includes a combination of multiple items or any one of multiple terms.
[0053] It will be understood that when an element is simply referred to in this specification as "connected to" or "coupled to" another element rather than "directly connected to" or "directly coupled to" another element, it may be "directly connected to" or "directly coupled to" another element, or connected to or coupled to another element, wherein there are other elements in between. Conversely, it should be understood that when an element is referred to as "directly coupled to" or "directly connected to" another element, there are no intermediate elements.
[0054] Furthermore, the components shown in the embodiments of the present invention are illustrated independently to represent different functional characteristics. Therefore, this does not imply that the individual components are constructed as separate hardware or software units. In other words, for convenience, each component includes every one of the listed components. Thus, at least two of the individual components can be combined to form one component, or a component can be divided into multiple components to perform each function. Embodiments combining individual components and embodiments dividing a component are also included within the scope of the present invention without departing from its spirit.
[0055] The terminology used in this specification is used only to describe particular embodiments and is not intended to limit the invention. Expressions used in the singular form encompass those used in the plural form unless they have a distinct meaning in the context. It should be understood in this specification that terms such as “comprising,” “having,” etc., are intended to indicate the presence of features, numbers, steps, actions, elements, components, or combinations thereof disclosed in the specification, and are not intended to exclude the possibility that one or more other features, numbers, steps, actions, elements, components, or combinations thereof may be present or added. In other words, when a particular element is referred to as “comprising,” it does not exclude elements other than the corresponding element, but rather includes additional elements within the embodiments of the invention or the scope of the invention.
[0056] Furthermore, some components may not be essential for performing the necessary functions of the invention, but rather selective components that only improve its performance. The invention can be implemented by including only the essential constituent parts necessary for realizing the essence of the invention, excluding those for improving performance. Structures that include only essential components other than those selectively used for improving performance are also included within the scope of the invention.
[0057] In the following, embodiments of the present invention will be described in detail with reference to the accompanying drawings. In describing exemplary embodiments of the present invention, well-known functions or structures may unnecessarily obscure the understanding of the invention; therefore, well-known functions or structures will not be described in detail. The same constituent elements in the drawings are indicated by the same reference numerals, and repeated descriptions of the same elements will be omitted.
[0058] In the following text, an image may refer to a frame of a configured video or the video itself. For example, "encoding or decoding of an image, or both" may mean "encoding or decoding of a moving image, or both encoding and decoding," and may also mean "encoding or decoding of one image from a plurality of moving images, or both encoding and decoding."
[0059] In the following text, the terms "moving image" and "video" may be used as having the same meaning and are interchangeable.
[0060] In the following text, the target image can be an encoded target image that serves as the target of encoding and / or a decoded target image that serves as the target of decoding. Furthermore, the target image can be an input image input to an encoding device and an input image input to a decoding device. Here, the target image may have the same meaning as the current image.
[0061] In the following text, the terms “image,” “picture,” “frame,” and “screen” may be used as having the same meaning and interchangeably with each other.
[0062] In the following text, a target block can be an encoding target block that serves as the target of encoding and / or a decoding target block that serves as the target of decoding. Furthermore, a target block can be the current block that serves as the target of the current encoding and / or decoding. For example, the terms "target block" and "current block" can be used to mean the same thing and are interchangeable.
[0063] In the following text, the terms “block” and “unit” may be used as having the same meaning and interchangeably. Optionally, “block” may refer to a specific unit.
[0064] In the following text, the terms “region” and “fragment” may be used interchangeably.
[0065] In the following text, a specific signal can be a signal representing a specific block. For example, the original signal can be a signal representing the target block. The prediction signal can be a signal representing the prediction block. The residual signal can be a signal representing the residual block.
[0066] In this embodiment, each of the specific information, data, flags, indexes, elements, and attributes may have a value. A value of "0" for information, data, flags, indexes, elements, and attributes may represent logical false or a first predefined value. In other words, the values "0", false, logical false, and the first predefined value can be substituted for each other. A value of "1" for information, data, flags, indexes, elements, and attributes may represent logical true or a second predefined value. In other words, the values "1", true, logical true, and the second predefined value can be substituted for each other.
[0067] When variables i or j are used to represent columns, rows, or indices, the value of i can be an integer equal to or greater than 0 or equal to or greater than 1. That is, columns, rows, indices, etc., can be counted starting from 0 or starting from 1.
[0068] Description of terms
[0069] Encoder: Represents the device that performs encoding. That is, it represents the encoding device.
[0070] Decoder: Represents the device that performs decoding. That is, it represents the decoding device.
[0071] A block is an M×N array of samples. Here, M and N can represent positive integers, and a block can represent a two-dimensional array of samples. A block can refer to a unit. The current block can represent a coding target block that becomes the target during encoding, or a decoding target block that becomes the target during decoding. Furthermore, the current block can be at least one of a coding block, a prediction block, a residual block, and a transform block.
[0072] Sample: The basic unit that makes up a block. Samples can be expressed from 0 to 2 based on the bit depth (Bd). Bd The value is -1. In this invention, a sample point can be used to represent a pixel. That is, a sample point, a pel, and a pixel can have the same meaning.
[0073] Unit: Can refer to encoding unit and decoding unit. When encoding and decoding an image, a unit can be a region generated by partitioning a single image. Furthermore, a unit can represent a subdivided unit when a single image is partitioned into subdivided units during encoding or decoding. That is, an image can be partitioned into multiple units. When encoding and decoding an image, predetermined processing can be performed for each unit. A single unit can be partitioned into sub-units with sizes smaller than the unit's size. Depending on the function, a unit can represent a block, macroblock, coding tree unit, coding tree block, coding unit, coding block, prediction unit, prediction block, residual unit, residual block, transform unit, transform block, etc. Furthermore, to distinguish a unit from a block, a unit can include a luma component block, a chroma component block associated with the luma component block, and syntax elements for each chroma component block. Units can have various sizes and forms, and in particular, the form of a unit can be a two-dimensional geometric shape such as a square, rectangle, trapezoid, triangle, pentagon, etc. In addition, the cell information may include at least one of the following: cell type indicating coding cell, prediction cell, transform cell, etc., cell size, cell depth, and the order of encoding and decoding of the cell.
[0074] A coding tree unit is a single coding tree block configured with the luminance component Y and two coding tree blocks associated with the chrominance components Cb and Cr. Furthermore, a coding tree unit can represent a block and the syntax elements for each block. Each coding tree unit can be partitioned using at least one of quadtree partitioning, binary tree partitioning, and ternary tree partitioning methods to configure lower-level units such as coding units, prediction units, transform units, etc. A coding tree unit can be used as a term to specify a sample block, which becomes a processing unit when encoding / decoding an image, as the input image. Here, a quadtree can represent a quaternary tree.
[0075] If the size of the coded block is within a predetermined range, it can be partitioned into a quadtree only. Here, the predetermined range can be defined as at least one of the maximum and minimum sizes of coded blocks that can be partitioned into quadtrees only. Information indicating the maximum / minimum size of the coded blocks that allow quadtree-type partitioning can be transmitted via a bitstream signal, and this information can be represented in units of at least one of sequence, frame parameter, parallel block group, or stripe. Optionally, the maximum / minimum size of the coded block can be a fixed size preset in the codec. For example, if the size of the coded block corresponds to 256×256 to 64×64, it can be partitioned into a quadtree only. If the size of the coded block is greater than the size of the maximum transform block, it can be partitioned into a quadtree only. In this case, the block to be partitioned can be at least one of a coded block and a transform block. In this case, the information indicating the partitioning of the coded block (e.g., split_flag) can be a flag indicating whether it is partitioned into a quadtree. When the size of the coded block falls within the predetermined range, it can be partitioned into a binary tree or a ternary tree only. In this case, the above description of quadtrees can be applied to binary or ternary trees in the same way.
[0076] Encoding block: can be used as a term to specify any one of the Y encoding block, Cb encoding block, and Cr encoding block.
[0077] Neighboring blocks: These can represent blocks adjacent to the current block. A block adjacent to the current block can be a block that touches the boundary of the current block, or a block within a predetermined distance of the current block. A neighboring block can also represent a block adjacent to a vertex of the current block. Here, a block adjacent to a vertex of the current block can be a block that is vertically adjacent to a block that is horizontally adjacent to a neighboring block that is horizontally adjacent to a block that is vertical ... neighboring block that is vertically adjacent to a neighboring block.
[0078] Reconstructed neighboring blocks: These can represent neighboring blocks that are adjacent to the current block and have already been spatially / temporally encoded or decoded. Here, reconstructed neighboring blocks can represent reconstructed neighboring units. Reconstructed spatial neighboring blocks can be blocks within the current frame that have already been reconstructed through encoding or decoding, or both. Reconstructed temporally neighboring blocks are blocks within the reference image at the location corresponding to the current block in the current frame, or neighboring blocks of that block.
[0079] Cell depth: Represents the degree of cell partitioning. In a tree structure, the highest node (root node) corresponds to the first cell that is not partitioned. Furthermore, the highest node can have the minimum depth value. In this case, the highest node can have a depth of level 0. A node with a depth of level 1 represents a cell generated by partitioning the first cell once. A node with a depth of level 2 represents a cell generated by partitioning the first cell twice. A node with a depth of level n represents a cell generated by partitioning the first cell n times. Leaf nodes can be the lowest node and nodes that cannot be further partitioned. The depth of a leaf node can be the highest level. For example, the predefined value for the highest level can be 3. The root node can have the lowest depth, and the leaf nodes can have the deepest depth. Additionally, when cells are represented as a tree structure, the level at which the cell belongs can represent the cell depth.
[0080] Bitstream: A bitstream that can represent encoded image information.
[0081] Parameter set: Corresponds to the header information in the configuration within the bitstream. At least one of the video parameter set, sequence parameter set, frame parameter set, and adaptive parameter set may be included in the parameter set. In addition, the parameter set may include strip header and parallel block header information.
[0082] Explanation: This could mean determining the value of a syntax element by performing entropy decoding, or it could mean entropy decoding itself.
[0083] Symbols: can represent at least one of the syntax elements, encoding parameters, and transform coefficient values of the encoding / decoding target unit. Additionally, symbols can represent entropy encoding targets or entropy decoding results.
[0084] Prediction mode: This can be information indicating the mode of encoding / decoding using intra-frame prediction or the mode of encoding / decoding using inter-frame prediction.
[0085] Prediction Unit: A basic unit that can be represented when performing prediction (such as inter-frame prediction, intra-frame prediction, inter-frame compensation, intra-frame compensation, and motion compensation). A single prediction unit can be partitioned into multiple partitions with smaller sizes, or it can be partitioned into multiple lower-level prediction units. Multiple partitions can be the basic units when performing prediction or compensation. Partitions generated by dividing prediction units can also be prediction units.
[0086] Prediction unit partitioning: can be represented by the form obtained by partitioning prediction units.
[0087] Reference frame list: This can refer to a list of one or more reference frames used for inter-frame prediction or motion compensation. There are several types of available reference frame lists, including LC (list combination), L0 (list 0), L1 (list 1), L2 (list 2), and L3 (list 3).
[0088] Inter-frame prediction indicator: This can indicate the direction of inter-frame prediction (one-way prediction, two-way prediction, etc.) for the current block. Optionally, the inter-frame prediction indicator can indicate the number of reference frames used to generate the prediction blocks for the current block. Optionally, the inter-frame prediction indicator can indicate the number of prediction blocks used when performing inter-frame prediction or motion compensation on the current block.
[0089] Prediction list utilization flag: Indicates whether at least one reference frame from a specific reference frame list is used to generate a prediction block. The prediction list utilization flag can be used to derive an inter-frame prediction indicator, and conversely, the inter-frame prediction indicator can be used to derive the prediction list utilization flag. For example, when the prediction list utilization flag has a first value of zero (0), this indicates that reference frames in the reference frame list are not used to generate a prediction block. On the other hand, when the prediction list utilization flag has a second value of one (1), this indicates that the reference frame list is used to generate a prediction block.
[0090] Reference screen index: can refer to the index of a specific reference screen in the reference screen list.
[0091] Reference frame: This can refer to a reference frame that is referenced by a specific block for the purpose of inter-frame prediction or motion compensation. Optionally, the reference frame can be a frame that includes a reference block referenced by the current block for inter-frame prediction or motion compensation. In the following text, the terms "reference frame" and "reference image" have the same meaning and are interchangeable.
[0092] Motion vector: This can be a two-dimensional vector used for inter-frame prediction or motion compensation. The motion vector represents the offset between the encoded / decoded target block and the reference block. For example, (mvX, mvY) can represent a motion vector. Here, mvX can represent the horizontal component, and mvY can represent the vertical component.
[0093] Search range: This can be a two-dimensional region searched during inter-frame prediction to retrieve motion vectors. For example, the size of the search range can be M×N. Here, M and N are both integers.
[0094] Motion vector candidate: This can refer to a prediction candidate block or the motion vector of a prediction candidate block when making predictions about motion vectors. Additionally, motion vector candidates can be included in a motion vector candidate list.
[0095] Candidate list of motion vectors: can represent a list consisting of one or more candidates of motion vectors.
[0096] Motion vector candidate index: This can represent an indicator that points to a motion vector candidate in the motion vector candidate list. Optionally, the motion vector candidate index can be an index of a motion vector predictor.
[0097] Motion information: may represent information including at least one of the following: motion vectors, reference frame index, inter-frame prediction indicator, prediction list utilization flag, reference frame list information, reference frame, motion vector candidate, motion vector candidate index, merge candidate and merge index.
[0098] Merge candidate list: can represent a list consisting of one or more merge candidates.
[0099] Merge Candidates: These can represent spatial merge candidates, temporal merge candidates, combined merge candidates, combined double prediction merge candidates, or zero merge candidates. Merge candidates may include information such as inter-frame prediction indicators, reference frame indices for each list, motion vectors, prediction list utilization flags, and motion information from inter-frame prediction indicators.
[0100] Merge Index: This can represent an indicator pointing to a merge candidate in the merge candidate list. Optionally, the merge index can indicate a block among the reconstructed blocks that are spatially / temporally adjacent to the current block and from which a merge candidate has been derived. Optionally, the merge index can indicate at least one piece of motion information for a merge candidate.
[0101] Transform unit: This can represent the basic unit used when performing encoding / decoding (such as transforming, inverse transforming, quantizing, dequantizing, and encoding / decoding transform coefficients of residual signals). A single transform unit can be partitioned into multiple lower-level transform units with smaller sizes. Here, the transform / inverse transform may include at least one of first transform / first inverse transform and second transform / second inverse transform.
[0102] Scaling: This refers to the process of multiplying the quantization level by a factor. Transform coefficients can be generated by scaling the quantization level. Scaling can also be called inverse quantization.
[0103] Quantization parameters: These represent the values used when transform coefficients are used to generate quantization levels during quantization. Quantization parameters can also represent the values used when transform coefficients are generated by scaling the quantization levels during dequantization. Quantization parameters can be values mapped to the quantization step size.
[0104] Incremental quantization parameter: can represent the difference between the predicted quantization parameter and the quantization parameter of the encoding / decoding target unit.
[0105] Scan: This can refer to a method of sorting coefficients within a cell, block, or matrix. For example, changing a two-dimensional matrix of coefficients into a one-dimensional matrix can be called a scan, and changing a one-dimensional matrix of coefficients into a two-dimensional matrix can be called a scan or inverse scan.
[0106] Transform coefficients: These represent the coefficient values generated after a transform is performed in the encoder. Transform coefficients also represent the coefficient values generated after at least one of entropy decoding and dequantization is performed in the decoder. The quantization level, or the level of the quantized transform coefficients, obtained by quantizing the transform coefficients or the residual signal, can also fall within the meaning of transform coefficients.
[0107] Quantization level: This can represent the value generated by quantizing the transform coefficients or residual signal in the encoder. Optionally, the quantization level can represent the value of the dequantization target that undergoes dequantization in the decoder. Similarly, the quantization level of the transform coefficients, as a result of transform and quantization, can also fall within the meaning of quantization level.
[0108] Non-zero transform coefficients: can represent transform coefficients with values other than zero, or transform coefficient levels or quantization levels with values other than zero.
[0109] Quantization matrix: A matrix used in quantization or dequantization processes performed to improve the quality of subjective or objective images. The quantization matrix can also be referred to as a scaling list.
[0110] Quantization matrix coefficients: These represent each element within the quantization matrix. Quantization matrix coefficients can also be called matrix coefficients.
[0111] Default matrix: can represent a predefined quantization matrix in the encoder or decoder.
[0112] Non-default matrix: can represent a quantization matrix that is not predefined in the encoder or decoder but is sent by the user via a signal.
[0113] Statistical value: For at least one of the following, a variable, coding parameter, constant value, etc., that has a computable specific value, a statistical value can be one or more of the following: mean, weighted average, weighted sum, minimum, maximum, most frequent value, median, interpolation value.
[0114] Figure 1 This is a block diagram illustrating the configuration of an encoding device according to an embodiment of the present invention.
[0115] Encoding device 100 may be an encoder, a video encoding device, or an image encoding device. The video may include at least one image. Encoding device 100 may encode at least one image sequentially.
[0116] Reference Figure 1The encoding device 100 may include a motion prediction unit 111, a motion compensation unit 112, an intra-frame prediction unit 120, a switcher 115, a subtractor 125, a transform unit 130, a quantization unit 140, an entropy coding unit 150, an inverse quantization unit 160, an inverse transform unit 170, an adder 175, a filter unit 180, and a reference frame buffer 190.
[0117] Encoding device 100 can encode the input image using intra-frame mode, inter-frame mode, or both. Furthermore, encoding device 100 can generate a bitstream including encoded information by encoding the input image and output the generated bitstream. The generated bitstream can be stored in a computer-readable recording medium or streamed via a wired / wireless transmission medium. When intra-frame mode is used as the prediction mode, switcher 115 can be switched to intra-frame mode. Optionally, when inter-frame mode is used as the prediction mode, switcher 115 can be switched to inter-frame mode. Here, intra-frame mode can refer to intra-frame prediction mode, and inter-frame mode can refer to inter-frame prediction mode. Encoding device 100 can generate prediction blocks for input blocks of the input image. Furthermore, encoding device 100 can encode residual blocks using the residuals of the input blocks and the prediction blocks after the prediction blocks are generated. The input image can be referred to as the current image as the current encoding target. The input block can be referred to as the current block as the current encoding target, or as the encoding target block.
[0118] When the prediction mode is intra-frame mode, the intra-frame prediction unit 120 can use samples from blocks that have been encoded / decoded and are adjacent to the current block as reference samples. The intra-frame prediction unit 120 can generate prediction samples for the input block by performing spatial prediction for the current block using the reference samples, or by performing spatial prediction. Here, intra-frame prediction can refer to intra-prediction.
[0119] When the prediction mode is inter-frame mode, the motion prediction unit 111 can retrieve the region that best matches the input block from the reference image during motion prediction and derive the motion vector using the retrieved region. In this case, the search region can be used as the region. The reference image can be stored in the reference frame buffer 190. Here, the reference image can be stored in the reference frame buffer 190 when encoding / decoding is performed on the reference image.
[0120] The motion compensation unit 112 can generate a prediction block by performing motion compensation on the current block using motion vectors. Here, inter-frame prediction can refer to inter-frame prediction or motion compensation.
[0121] When the value of the motion vector is not an integer, the motion prediction unit 111 and the motion compensation unit 112 can generate prediction blocks by applying an interpolation filter to a portion of the reference frame. To perform inter-frame prediction or motion compensation on the coding unit, it can be determined which of the following modes—skip mode, merge mode, Advanced Motion Vector Prediction (AMVP) mode, and current frame reference mode—is used for motion prediction and motion compensation of the prediction unit included in the corresponding coding unit. Then, inter-frame prediction or motion compensation can be performed differently depending on the determined mode.
[0122] Subtractor 125 can generate a residual block using the residual of the input block and the prediction block. The residual block can be referred to as a residual signal. The residual signal can represent the difference between the original signal and the prediction signal. Furthermore, the residual signal can be a signal generated by transforming or quantizing, or transforming and quantizing, the difference between the original signal and the prediction signal. The residual block can be the residual signal of a block cell.
[0123] Transform unit 130 can generate transform coefficients by performing a transform on the residual block and output the generated transform coefficients. Here, the transform coefficients can be coefficient values generated by performing a transform on the residual block. When a transform skip mode is applied, transform unit 130 can skip the transform on the residual block.
[0124] A quantization level can be generated by applying quantization to the transform coefficients or the residual signal. In the following examples, the quantization level may also be referred to as the transform coefficients.
[0125] The quantization unit 140 can generate a quantization level by quantizing the transform coefficients or residual signal according to parameters, and output the generated quantization level. Here, the quantization unit 140 can quantize the transform coefficients using a quantization matrix.
[0126] Entropy coding unit 150 can generate a bitstream by performing entropy coding on values calculated by quantization unit 140 according to a probability distribution or on coding parameter values calculated during encoding, and output the generated bitstream. Entropy coding unit 150 can perform entropy coding on sample information of the image and information for decoding the image. For example, the information for decoding the image may include syntax elements.
[0127] When entropy coding is applied, symbols are represented such that a smaller number of bits are allocated to symbols with a high generation chance and a larger number of bits are allocated to symbols with a low generation chance, thus reducing the size of the bitstream for the symbols to be encoded. The entropy coding unit 150 can use coding methods for entropy coding, such as exponential Golomb, context-adaptive variable-length coding (CAVLC), context-adaptive binary arithmetic coding (CABAC), etc. For example, the entropy coding unit 150 can perform entropy coding by using a variable-length code / code (VLC) table. Furthermore, the entropy coding unit 150 can derive a binarization method for the target symbol and a probability model for the target symbol / bits, and perform arithmetic coding by using the derived binarization method and context model.
[0128] In order to encode the transform coefficient levels (quantization levels), the entropy coding unit 150 can change the two-dimensional block form coefficients into a one-dimensional vector form by using a transform coefficient scanning method.
[0129] Encoding parameters may include information such as syntax elements (flags, indices, etc.) encoded in the encoder and signaled to the decoder, as well as information derived during encoding or decoding. Encoding parameters can represent information required when encoding or decoding an image. For example, at least one value or combination of the following may be included in the encoding parameters: cell / block residual, cell / block depth, cell / block partitioning information, cell / block shape, cell / block partitioning structure, whether quadtree partitioning is performed, whether binary tree partitioning is performed, binary tree partitioning direction (horizontal or vertical), binary tree partitioning type (symmetric or asymmetric), whether the current coding unit is partitioned using ternary tree partitioning, ternary tree partitioning direction (horizontal or vertical), ternary tree partitioning type (symmetric or asymmetric), whether the current coding unit is partitioned using multi-type tree partitioning, and multi-type... The document outlines the following: partitioning direction (horizontal or vertical), type of multi-type tree partitions (symmetric or asymmetric), tree structure (binary or ternary), prediction mode (intra-frame prediction or inter-frame prediction), intra-frame prediction mode / direction for luma, intra-frame prediction mode / direction for chroma, intra-frame partitioning information, inter-frame partitioning information, coded block partitioning flag, prediction block partitioning flag, transform block partitioning flag, reference sample filtering method, reference sample filter taps, reference sample filter coefficients, prediction block filtering method, prediction block filter taps, prediction block filter coefficients, prediction block boundary filtering method, prediction block boundary filter taps, prediction block boundary filter coefficients, and frame... Intra-prediction mode, inter-frame prediction mode, motion information, motion vector, motion vector difference, reference frame index, inter-frame prediction angle, inter-frame prediction indicator, prediction list utilization flag, reference frame list, reference frame, motion vector predictor index, motion vector predictor candidate, motion vector candidate list, whether to use merge mode, merge index, merge candidate, merge candidate list, whether to use skip mode, interpolation filter type, interpolation filter taps, interpolation filter coefficients, motion vector magnitude, motion vector representation accuracy, transform type, transform size, whether to use primary (first) transform information, whether to use secondary transform information, primary transform index, secondary transform Index, information on the presence of residual signals, coded block pattern, coded block flag (CBF), quantization parameters, quantization parameter residuals, quantization matrix, whether an intra-loop filter is applied, intra-loop filter coefficients, intra-loop filter taps, intra-loop filter shape / form, whether a deblocking filter is applied, deblocking filter coefficients, deblocking filter taps, deblocking filter strength, deblocking filter shape / form, whether adaptive sample offset is applied, adaptive sample offset value, adaptive sample offset category, adaptive sample offset type, whether an adaptive loop filter is applied, adaptive loop filter coefficients, adaptive loop filter taps, adaptive loop filter shape / form.Binarization / inverse binarization method, context model determination method, context model update method, whether to execute normal mode, whether to execute bypass mode, context binary bits, bypass binary bits, valid coefficient flag, last valid coefficient flag, encoding flag for the unit of the coefficient group, position of the last valid coefficient, flag for whether the coefficient value is greater than 1, flag for whether the coefficient value is greater than 2, flag for whether the coefficient value is greater than 3, information about the remaining coefficient values, symbol information, reconstructed luminance samples, reconstructed chrominance samples, residual luminance samples, residual chrominance samples, luminance transformation coefficient, chrominance transformation coefficient, quantized luminance level, quantized chrominance level, transformation coefficient level scanning method, in The size of the motion vector search region on the decoder side, the shape of the motion vector search region on the decoder side, the number of motion vector searches on the decoder side, information about the CTU size, information about the minimum block size, information about the maximum block size, information about the maximum block depth, information about the minimum block depth, image display / output order, stripe identification information, stripe type, stripe partition information, parallel block identification information, parallel block type, parallel block partition information, picture type, bit depth of input samples, bit depth of reconstructed samples, bit depth of residual samples, bit depth of transform coefficients, bit depth of quantization levels, and information about the luminance signal or information about the chrominance signal.
[0130] Here, sending a signal flag or index can indicate that the corresponding flag or index is entropy encoded by the encoder and included in the bitstream, and can also indicate that the corresponding flag or index is entropy decoded by the decoder from the bitstream.
[0131] When the encoding device 100 performs encoding via inter-frame prediction, the encoded current image can be used as a reference image for another image that is subsequently processed. Therefore, the encoding device 100 can reconstruct or decode the encoded current image, or store the reconstructed or decoded image as a reference image in the reference frame buffer 190.
[0132] The quantization level can be dequantized in dequantization unit 160, or inverse transformed in inverse transform unit 170. The dequantization coefficients or inverse transform coefficients, or both, can be added to the prediction block via adder 175. A reconstructed block can be generated by adding the dequantization coefficients or inverse transform coefficients, or both, to the prediction block. Here, the dequantization coefficients or inverse transform coefficients, or both, can represent coefficients from at least one of dequantization and inverse transform, and can represent the reconstructed residual block.
[0133] The reconstructed block can be passed through filter unit 180. Filter unit 180 can apply at least one of deblocking filter, sample adaptive offset (SAO), and adaptive loop filter (ALF) to the reconstructed sample, reconstructed block, or reconstructed image. Filter unit 180 may be referred to as an in-loop filter.
[0134] Deblocking filters remove block distortion generated at the boundaries between blocks. To determine whether to apply a deblocking filter, the selection can be based on samples included in several rows or columns contained within the block. When a deblocking filter is applied to a block, another filter can be applied based on the desired deblocking filtering intensity.
[0135] To compensate for encoding errors, an appropriate offset value can be added to the sample value using a sample-adaptive offset. The sample-adaptive offset corrects the offset between the deblocked image and the original image on a sample-unit basis. Methods such as dividing the image's samples into a predetermined number of regions, determining the regions to which the offset will be applied, and applying the offset to the determined regions, or considering edge information about each sample point when applying the offset, can be used.
[0136] An adaptive loop filter (ALF) performs filtering based on a comparison between the filtered reconstructed image and the original image. Samples included in the image can be partitioned into predetermined groups, a filter to be applied to each group can be determined, and differential filtering can be performed for each group. Information regarding whether an ALF is applied can be sent by coding unit (CU), and the form and coefficients of the ALF to be applied to each block can vary.
[0137] The reconstructed blocks or reconstructed image processed by filter unit 180 can be stored in reference frame buffer 190. The reconstructed blocks processed by filter unit 180 can be a portion of the reference image. That is, the reference image is a reconstructed image composed of reconstructed blocks processed by filter unit 180. The stored reference image can be used later in inter-frame prediction or motion compensation.
[0138] Figure 2 This is a block diagram illustrating the configuration of a decoding device according to an embodiment and to which the present invention is applied.
[0139] Decoding device 200 can be a decoder, video decoding device, or image decoding device.
[0140] Reference Figure 2 The decoding device 200 may include an entropy decoding unit 210, an inverse quantization unit 220, an inverse transform unit 230, an intra-frame prediction unit 240, a motion compensation unit 250, an adder 225, a filter unit 260, and a reference frame buffer 270.
[0141] Decoding device 200 can receive bitstreams output from encoding device 100. Decoding device 200 can receive bitstreams stored in a computer-readable recording medium, or bitstreams streamed via wired / wireless transmission media. Decoding device 200 can decode the bitstreams using intra-frame mode or inter-frame mode. Furthermore, decoding device 200 can generate a reconstructed image or a decoded image through decoding, and output the reconstructed image or the decoded image.
[0142] When the prediction mode used during decoding is intra-frame mode, the switcher can be switched to intra-frame mode. Alternatively, when the prediction mode used during decoding is inter-frame mode, the switcher can be switched to inter-frame mode.
[0143] Decoding device 200 can obtain reconstructed residual blocks and generate prediction blocks by decoding the input bitstream. When the reconstructed residual blocks and prediction blocks are obtained, decoding device 200 can generate a reconstructed block that becomes the decoding target by adding the reconstructed residual blocks and the prediction blocks. The decoding target block can be referred to as the current block.
[0144] The entropy decoding unit 210 can generate symbols by performing entropy decoding on the bitstream according to a probability distribution. The generated symbols may include symbols in quantized hierarchical form. Here, the entropy decoding method can be the inverse process of the entropy encoding method described above.
[0145] In order to decode the transform coefficient levels (quantization levels), the entropy decoding unit 210 can change the unidirectional vector form coefficients into two-dimensional block form by using the transform coefficient scanning method.
[0146] The quantization level can be dequantized in dequantization unit 220 or inverse transformed in inverse transform unit 230. The quantization level can be the result of dequantization, inverse transform, or both, and can be generated as a reconstructed residual block. Here, dequantization unit 220 can apply the quantization matrix to the quantization level.
[0147] When the intra-frame mode is used, the intra-frame prediction unit 240 can generate a prediction block by performing spatial prediction for the current block using the sample values of a block that is adjacent to and has been decoded and is already in use with the target block.
[0148] When the inter-frame mode is used, the motion compensation unit 250 can generate a prediction block by performing motion compensation for the current block using motion vectors and a reference image stored in the reference frame buffer 270.
[0149] Adder 225 generates a reconstructed block by adding the reconstructed residual block to the prediction block. Filter unit 260 can apply at least one of a deblocking filter, a sample adaptive offset, and an adaptive loop filter to the reconstructed block or reconstructed image. Filter unit 260 can output a reconstructed image. The reconstructed block or reconstructed image can be stored in a reference frame buffer 270 and used when performing inter-frame prediction. The reconstructed block processed by filter unit 260 can be a portion of the reference image. That is, the reference image is a reconstructed image composed of the reconstructed blocks processed by filter unit 260. The stored reference image can be used later in inter-frame prediction or motion compensation.
[0150] Figure 3 It is a schematic diagram illustrating the partitioning structure of an image when it is encoded and decoded. Figure 3 An example of partitioning a single cell into multiple lower-level cells is illustrated schematically.
[0151] To efficiently partition an image, coding units (CUs) can be used during encoding and decoding. When encoding / decoding an image, a coding unit can be used as a basic unit. Furthermore, when encoding / decoding an image, a coding unit can be used to distinguish between intra-frame prediction modes and inter-frame prediction modes. A coding unit can be a basic unit used for prediction, transformation, quantization, inverse transform, dequantization, or encoding / decoding processing of transform coefficients.
[0152] Reference Figure 3 Image 300 is partitioned sequentially according to Maximum Coding Units (LCUs), and LCUs are defined as the partitioning structure. Here, LCU can be used in the same sense as Coding Tree Units (CTUs). A unit partition can represent partitioning of the block associated with that unit. The block partitioning information may include information about the unit depth. Depth information may represent the number or degree to which the unit is partitioned, or both. A single unit can be partitioned hierarchically into multiple lower-level units associated with depth information based on a tree structure. In other words, the unit and the lower-level units generated by partitioning that unit may correspond to a node and the node's child nodes, respectively. Each of the partitioned lower-level units may have depth information. The depth information may be information representing the size of the CU and may be stored in each CU. The unit depth represents the number and / or degree associated with partitioning the unit. Therefore, the partitioning information for a lower-level unit may include information about the size of the lower-level unit.
[0153] The partitioning structure represents the distribution of coding units (CUs) within the LCU 310. This distribution can be determined by whether a single CU is partitioned into multiple CUs (positive integers equal to or greater than 2, including 2, 4, 8, 16, etc.). The horizontal and vertical dimensions of the CUs generated through partitioning can be half the horizontal and vertical dimensions of the CUs before partitioning, respectively, or they can have dimensions smaller than the horizontal and vertical dimensions before partitioning, depending on the number of partitions. CUs can be recursively partitioned into multiple CUs. Through recursive partitioning, at least one of the height and width of the CU after partitioning can be reduced compared to at least one of the height and width of the CU before partitioning. CU partitioning can be performed recursively until a predefined depth or predefined size is reached. For example, the depth of the LCU can be 0, and the depth of the minimum coding unit (SCU) can be a predefined maximum depth. Here, as mentioned above, the LCU can be the coding unit with the maximum coding unit size, and the SCU can be the coding unit with the minimum coding unit size. Starting from partitioning the LCU 310, the CU depth increases by 1 as the horizontal or vertical dimension of the CU, or both the horizontal and vertical dimensions, decreases through partitioning. For example, for each depth, an unpartitioned CU can have a size of 2N×2N. Furthermore, in the case of partitioned CUs, a CU of size 2N×2N can be partitioned into four CUs of size N×N. The size of N can be halved as the depth increases by 1.
[0154] Furthermore, partition information of a CU can be used to indicate whether a CU is partitioned. Partition information can be 1 bit. All CUs except SCUs can include partition information. For example, when the partition information value is 1, the CU may not be partitioned, and when the partition information value is 2, the CU may be partitioned.
[0155] Reference Figure 3 An LCU with a depth of 0 can be a 64×64 block. 0 can be the minimum depth. An SCU with a depth of 3 can be an 8×8 block. 3 can be the maximum depth. CUs with a 32×32 block and a 16×16 block can be represented as depth 1 and depth 2, respectively.
[0156] For example, when a single coding unit is partitioned into four coding units, the horizontal and vertical dimensions of the four partitioned coding units can be half the horizontal and vertical dimensions of the original CU before partitioning. In one embodiment, when a 32×32 coding unit is partitioned into four coding units, each of the four partitioned coding units can have a size of 16×16. When a single coding unit is partitioned into four coding units, the coding unit can be said to be partitioned into a quadtree form.
[0157] For example, when a coding unit is partitioned into two sub-coding units, the horizontal or vertical dimension (width or height) of each of the two sub-coding units can be half the horizontal or vertical dimension of the original coding unit. For example, when a coding unit of size 32×32 is vertically partitioned into two sub-coding units, each of the two sub-coding units can have a size of 16×32. For example, when a coding unit of size 8×32 is horizontally partitioned into two sub-coding units, each of the two sub-coding units can have a size of 8×16. When a coding unit is partitioned into two sub-coding units, it can be said that the coding unit is binary partitioned or partitioned according to a binary tree partitioning structure.
[0158] For example, when a coding unit is divided into three sub-coding units, the horizontal or vertical dimensions of the coding unit can be divided in a 1:2:1 ratio, resulting in three sub-coding units with a horizontal or vertical dimension ratio of 1:2:1. For example, when a 16×32 coding unit is horizontally divided into three sub-coding units, these three sub-coding units can have dimensions of 16×8, 16×16, and 16×8 respectively, from the topmost sub-coding unit to the bottommost sub-coding unit. Similarly, when a 32×32 coding unit is vertically divided into three sub-coding units, these three sub-coding units can have dimensions of 8×32, 16×32, and 8×32 respectively, from the leftmost sub-coding unit to the rightmost sub-coding unit. When a coding unit is divided into three sub-coding units, it can be said that the coding unit is tri-partitioned or partitioned according to a ternary tree partitioning structure.
[0159] exist Figure 3 In this context, the coding tree unit (CTU) 320 is an example of a CTU that applies quadtree partitioning, binary tree partitioning, and ternary tree partitioning structures.
[0160] As described above, to partition a CTU, at least one of a quadtree partitioning structure, a binary tree partitioning structure, and a ternary tree partitioning structure can be applied. Various tree partitioning structures can be applied sequentially to the CTU according to a predetermined priority order. For example, a quadtree partitioning structure can be preferentially applied to the CTU. Encoding units that cannot be further partitioned using a quadtree partitioning structure can correspond to leaf nodes of a quadtree. Encoding units corresponding to leaf nodes of a quadtree can be used as root nodes of binary and / or ternary tree partitioning structures. That is, encoding units corresponding to leaf nodes of a quadtree can be further partitioned using a binary or ternary tree partitioning structure, or they can be left unpartitioned. Therefore, by preventing the encoded blocks generated by binary or ternary tree partitioning of encoding units corresponding to leaf nodes of a quadtree from undergoing further quadtree partitioning, block partitioning and / or signaling of partition information can be performed efficiently.
[0161] Four-partition information can be used to signal that the coding unit corresponding to a node in a quadtree is partitioned. A four-partition message with a first value (e.g., "1") indicates that the current coding unit is partitioned according to the quadtree partitioning structure. A four-partition message with a second value (e.g., "0") indicates that the current coding unit is not partitioned according to the quadtree partitioning structure. The four-partition message can be a flag with a predetermined length (e.g., one bit).
[0162] There may be no priority between binary tree partitions and ternary tree partitions. That is, the coding unit corresponding to the leaf node of the quadtree can further undergo any partition in either binary tree or ternary tree partitions. Furthermore, the coding unit generated by binary tree partitions or ternary tree partitions may undergo further binary tree partitions or further ternary tree partitions, or it may not be further partitioned.
[0163] A tree structure in which there is no priority between binary tree partitions and ternary tree partitions is called a multi-type tree structure. The coding unit corresponding to the leaf node of a quadtree can be used as the root node of a multi-type tree. At least one of multi-type tree partition indication information, partition direction information, and partition tree information can be used to signal whether to partition the coding unit corresponding to a node in the multi-type tree. For partitioning the coding unit corresponding to a node in the multi-type tree, the multi-type tree partition indication information, partition direction, and partition tree information can be signaled sequentially.
[0164] A multi-type tree partitioning indication with a first value (e.g., "1") indicates that the current coding unit will undergo a multi-type tree partition. A multi-type tree partitioning indication with a second value (e.g., "0") indicates that the current coding unit will not undergo a multi-type tree partition.
[0165] When further partitioning the coding units corresponding to the nodes of the multi-type tree according to the multi-type tree partitioning structure, the coding units may include partitioning direction information. The partitioning direction information indicates in which direction the current coding unit will be partitioned for the multi-type tree partition. Partitioning direction information with a first value (e.g., "1") indicates that the current coding unit will be vertically partitioned. Partitioning direction information with a second value (e.g., "0") indicates that the current coding unit will be horizontally partitioned.
[0166] When the coding units corresponding to nodes of the multi-type tree are further partitioned according to the multi-type tree partitioning structure, the current coding unit may include partition tree information. The partition tree information may indicate the tree partitioning structure that will be used for partitioning nodes of the multi-type tree. Partition tree information with a first value (e.g., "1") may indicate that the current coding unit will be partitioned according to a binary tree partitioning structure. Partition tree information with a second value (e.g., "0") may indicate that the current coding unit will be partitioned according to a ternary tree partitioning structure.
[0167] Partition indication information, partition tree information, and partition direction information can all be flags with a predetermined length (e.g., one bit).
[0168] At least one of the following—quadtree partitioning indication information, multi-type tree partitioning indication information, partitioning direction information, and partitioning tree information—can be entropy encoded / decoded. For entropy encoding / decoding of these types of information, information about neighboring coding units adjacent to the current coding unit can be used. For example, the partitioning type (partitioned or non-partitioned, partitioning tree, and / or partitioning direction) of the left and / or upper neighboring coding units of the current coding unit is likely similar to the partitioning type of the current coding unit. Therefore, contextual information for entropy encoding / decoding of information about the current coding unit can be derived from information about neighboring coding units. Information about neighboring coding units may include at least one of the following: quadtree partitioning information, multi-type tree partitioning indication information, partitioning direction information, and partitioning tree information.
[0169] As another example, in binary tree partitioning and ternary tree partitioning, binary tree partitioning can be performed first. That is, the current coding unit can first undergo binary tree partitioning, and then the coding unit corresponding to the leaf node of the binary tree can be set as the root node for ternary tree partitioning. In this case, quadtree partitioning or binary tree partitioning can be omitted from the coding units corresponding to the nodes of the ternary tree.
[0170] Encoding units that cannot be partitioned according to quadtree, binary tree, and / or ternary tree partitioning structures become the basic units used for encoding, prediction, and / or transformation. That is, the encoding unit cannot be further partitioned for prediction and / or transformation. Therefore, the partitioning structure information and partitioning information used to partition the encoding unit into prediction and / or transformation units may not exist in the bitstream.
[0171] However, when the size of the coding unit (i.e., the basic unit used for partitioning) is larger than the size of the maximum transform block, the coding unit can be recursively partitioned until the size of the coding unit is reduced to be equal to or smaller than the size of the maximum transform block. For example, when the size of the coding unit is 64×64 and the size of the maximum transform block is 32×32, the coding unit can be partitioned into four 32×32 blocks for transformation. For example, when the size of the coding unit is 32×64 and the size of the maximum transform block is 32×32, the coding unit can be partitioned into two 32×32 blocks for transformation. In this case, the partitioning of the coding unit used for transformation is not transmitted separately by signal and can be determined by comparing the horizontal or vertical dimensions of the coding unit with the horizontal or vertical dimensions of the maximum transform block. For example, when the horizontal dimension (width) of the coding unit is greater than the horizontal dimension (width) of the maximum transform block, the coding unit can be vertically bisected. For example, when the vertical dimension (length) of the coding unit is greater than the vertical dimension (length) of the maximum transform block, the coding unit can be horizontally bisected.
[0172] Information regarding the maximum and / or minimum size of the coding unit and the maximum and / or minimum size of the transform block can be transmitted by signals or determined at a higher layer than the coding unit. The higher layer can be, for example, a sequence layer, a picture layer, a stripe layer, etc. For example, the minimum size of the coding unit can be determined to be 4×4. For example, the maximum size of the transform block can be determined to be 64×64. For example, the minimum size of the transform block can be determined to be 4×4.
[0173] Information regarding the minimum size of the coding unit corresponding to the leaf node of the quadtree (minimum size of the quadtree) and / or the maximum depth from the root node to the leaf node of the multi-type tree (maximum depth of the multi-type tree) can be transmitted by signals or determined at a higher level than the coding unit. For example, the higher level could be a sequence layer, a frame layer, a stripe layer, etc. The minimum size of the quadtree and / or the maximum depth of the multi-type tree can be transmitted by signals or determined for each of the intra-frame stripes and inter-frame stripes.
[0174] The difference between the size of the CTU and the maximum size of the transform block can be transmitted by a signal or determined at a higher layer than the coding unit. For example, the higher layer could be a sequence layer, a frame layer, a stripe layer, etc. The maximum size of the coding unit corresponding to each node of the binary tree (hereinafter referred to as the maximum size of the binary tree) can be determined based on the size and difference information of the coding tree units. The maximum size of the coding unit corresponding to each node of the ternary tree (hereinafter referred to as the maximum size of the ternary tree) can vary depending on the type of stripe. For example, for an intra-frame stripe, the maximum size of the ternary tree could be 32×32. For example, for an inter-frame stripe, the maximum size of the ternary tree could be 128×128. For example, the minimum size of the coding unit corresponding to each node of the binary tree (hereinafter referred to as the minimum size of the binary tree) and / or the minimum size of the coding unit corresponding to each node of the ternary tree (hereinafter referred to as the minimum size of the ternary tree) can be set as the minimum size of the coding block.
[0175] As another example, the maximum size of a binary tree and / or a ternary tree can be sent by a signal or determined at a stripe layer. Alternatively, the minimum size of a binary tree and / or a ternary tree can be sent by a signal or determined at a stripe layer.
[0176] Based on the size and depth information of the various blocks mentioned above, the four-partition information, multi-type tree partition indication information, partition tree information and / or partition direction information may or may not be included in the bitstream.
[0177] For example, when the size of the coding unit is not greater than the minimum size of the quadtree, the coding unit does not contain four-partition information. Therefore, the four-partition information can be derived from the second value.
[0178] For example, when the size (horizontal and vertical dimensions) of the coding unit corresponding to a node of a multi-type tree is greater than the maximum size (horizontal and vertical dimensions) of a binary tree and / or a ternary tree, the coding unit may not be divided into two or three partitions. Therefore, the multi-type tree partition indication information may not be sent by signal, but can be derived from a second value.
[0179] Optionally, when the size (horizontal and vertical dimensions) of the coding unit corresponding to a node of a multi-type tree is the same as the maximum size (horizontal and vertical dimensions) of a binary tree and / or twice the maximum size (horizontal and vertical dimensions) of a ternary tree, the coding unit may not be further divided into two or three partitions. Therefore, the multi-type tree partitioning indication information may not be sent by signal, but can be derived from the second value. This is because when coding units are partitioned according to a binary tree partitioning structure and / or a ternary tree partitioning structure, coding units smaller than the minimum size of a binary tree and / or a ternary tree are generated.
[0180] Optionally, when the depth of the coding unit corresponding to a node in the multi-type tree is equal to the maximum depth of the multi-type tree, the coding unit may not be further divided into two and / or three partitions. Therefore, the multi-type tree partition indication information may not be transmitted by signal, but can be derived from the second value.
[0181] Optionally, multi-type tree partitioning indication information may be signaled only if it is possible to perform at least one of vertical binary tree partitioning, horizontal binary tree partitioning, vertical ternary tree partitioning, and horizontal ternary tree partitioning on the coding unit corresponding to the node of the multi-type tree. Otherwise, the coding unit may not be partitioned into two and / or three partitions. Therefore, multi-type tree partitioning indication information may not be signaled, but may be derived from a second value.
[0182] Optionally, partitioning direction information may be signaled only if it is possible to perform both vertical binary tree partitioning and horizontal binary tree partitioning, or both vertical ternary tree partitioning and horizontal ternary tree partitioning, on the coding unit corresponding to a node of a multi-type tree. Otherwise, partitioning direction information may not be signaled, but may be derived from values indicating possible partitioning directions.
[0183] Optionally, partition tree information may be signaled only if it is possible to perform both vertical binary tree partitioning and vertical ternary tree partitioning or both horizontal binary tree partitioning and horizontal ternary tree partitioning for the coding unit corresponding to the node of the multi-type tree. Otherwise, partition tree information may not be signaled, but may be derived from values indicating possible partition tree structures.
[0184] Figure 4 This is a diagram illustrating an embodiment of in-screen prediction processing.
[0185] exist Figure 4 In this context, rectangles can represent the image. Figure 4 In the image, the arrow indicates the prediction direction. Images can be classified according to their encoding type into in-frame (I-frame), predictive (P-frame), and dual-predictive (B-frame).
[0186] I-frames can be encoded using intra-frame prediction without inter-frame prediction. P-frames can be encoded using inter-frame prediction with reference frames present in one direction (i.e., forward or backward) for the current block. B-frames can be encoded using inter-frame prediction with reference frames present in both directions (i.e., forward and backward) for the current block. When using inter-frame prediction, the encoder can perform inter-frame prediction or motion compensation, and the decoder can perform the corresponding motion compensation.
[0187] Below, an embodiment of inter-screen prediction will be described in detail.
[0188] Reference frames and motion information can be used to perform inter-frame prediction or motion compensation.
[0189] Motion information of the current block can be inferred by each of the encoding device 100 and the decoding device 200 during inter-frame prediction. Motion information of the current block can be inferred using motion information of reconstructed neighboring blocks, co-located blocks (also called col blocks or co-position blocks), and / or motion information of blocks adjacent to co-position blocks. A co-position block can represent a previously reconstructed co-located block that is spatially located at the same position as the current block within a frame (also called a col frame or co-position frame). A co-position frame can be one of one or more reference frames included in a list of reference frames.
[0190] The method for deriving motion information for the current block can vary depending on the prediction mode of the current block. For example, prediction modes used for inter-frame prediction may include AMVP mode, merge mode, skip mode, and current frame reference mode. The merge mode can be called the motion merge mode.
[0191] For example, when AMVP is used as a prediction mode, at least one of the motion vectors of reconstructed neighboring blocks, co-located blocks, blocks adjacent to co-located blocks, and (0,0) motion vectors can be identified as motion vector candidates for the current block, and a motion vector candidate list is generated using these motion vector candidates. Motion vector candidates for the current block can be derived using the generated motion vector candidate list. Motion information for the current block can be determined based on the derived motion vector candidates. The motion vectors of co-located blocks or blocks adjacent to co-located blocks can be referred to as temporal motion vector candidates, and the motion vectors of reconstructed neighboring blocks can be referred to as spatial motion vector candidates.
[0192] Encoding device 100 can calculate the motion vector difference (MVD) between the motion vector of the current block and motion vector candidates, and can perform entropy encoding on the motion vector difference (MVD). Furthermore, encoding device 100 can perform entropy encoding on the motion vector candidate index and generate a bitstream. The motion vector candidate index indicates the optimal motion vector candidate among those included in the motion vector candidate list. Decoding device 200 can perform entropy decoding on the motion vector candidate index included in the bitstream, and can select motion vector candidates for the target block to be decoded from those included in the motion vector candidate list by using the entropy-decoded motion vector candidate index. Additionally, decoding device 200 can add the entropy-decoded MVD to the motion vector candidate extracted through entropy decoding, thereby deriving the motion vector of the target block to be decoded.
[0193] The bitstream may include a reference frame index indicating a reference frame. The reference frame index may be entropy encoded by the encoding device 100 and then transmitted as a bitstream to the decoding device 200. The decoding device 200 may generate a predicted block for the decoded target block based on the derived motion vectors and the reference frame index information.
[0194] Another example of a method for deriving motion information for the current block could be a merge pattern. A merge pattern can represent a method for merging the motion of multiple blocks. A merge pattern can represent a pattern for deriving motion information for the current block from the motion information of neighboring blocks. When a merge pattern is applied, the motion information of reconstructed neighboring blocks and / or blocks at the same location can be used to generate a list of merge candidates. Motion information may include at least one of motion vectors, reference frame indices, and inter-frame prediction indicators. Prediction indicators may indicate unidirectional prediction (L0 prediction or L1 prediction) or bidirectional prediction (L0 prediction and L1 prediction).
[0195] The merge candidate list can be a list of stored motion information. The motion information included in the merge candidate list can be at least one of the following: zero merge candidate, motion information of a neighboring block adjacent to the current block (spatial merge candidate), motion information of a block in the same position within the reference frame of the current block (temporal merge candidate), and new motion information that is a combination of motion information existing in the merge candidate list.
[0196] Encoding device 100 can generate a bitstream by performing entropy encoding on at least one of a merge flag and a merge index, and can transmit the bitstream as a signal to decoding device 200. The merge flag may be information indicating whether a merge mode is performed for each block, and the merge index may be information indicating which of the current block's neighboring blocks is the target block for merging. For example, the neighboring blocks of the current block may include the left neighboring block to the left of the current block, the upper neighboring block positioned above the current block, and the time neighboring block that is temporally adjacent to the current block.
[0197] The skip mode can be a mode in which motion information of neighboring blocks is applied to the current block as is. When the skip mode is applied, the encoding device 100 can perform entropy encoding on information about which block's motion information will be used as the current block's motion information to generate a bitstream, and can send the bitstream to the decoding device 200 as a signal. The encoding device 100 may not send syntax elements regarding at least one of motion vector difference information, coded block flags, and transform coefficient levels to the decoding device 200 as a signal.
[0198] The current frame reference mode can represent the prediction mode used for the prediction of the previously reconstructed region within the current frame to which the current block belongs. Here, a vector can be used to specify the previously reconstructed region. Information indicating whether the current block will be encoded in the current frame reference mode can be encoded using the reference frame index of the current block. A flag or index indicating whether the current block is encoded in the current frame reference mode can be sent by a signal and can be derived based on the reference frame index of the current block. When the current block is encoded in the current frame reference mode, the current frame can be added to the reference frame list for the current block at a fixed or random position in the reference frame list. A fixed position can be, for example, the position indicated by reference frame index 0 or the last position in the list. When the current frame is added to the reference frame list at a random position, a reference frame index indicating the random position can be sent by a signal.
[0199] Based on the above description, the image encoding method and image decoding method according to embodiments of the present invention will be described in detail below.
[0200] Figure 5 This is a flowchart illustrating an image encoding method according to an embodiment of the present invention, and Figure 6 This is a flowchart illustrating an image decoding method according to an embodiment of the present invention.
[0201] Reference Figure 5 The encoding device can deduce motion vector candidates (step S501) and generate a motion vector candidate list based on the derived motion vector candidates (step S502). After generating the motion vector candidate list, motion vectors can be determined based on the generated motion vector candidate list (step S503), and motion compensation can be performed based on the determined motion vectors (step S504). Subsequently, the encoding device can encode the information associated with motion compensation (step S505).
[0202] Reference Figure 6 The decoding device can perform entropy decoding on the motion compensation-related information received from the encoding device (step S601) and deduce motion vector candidates (step S602). The decoding device can generate a motion vector candidate list based on the deduced motion vector candidates (step S603) and use the generated motion vector candidate list to determine the motion vector (step S604). Subsequently, the decoding device can perform motion compensation by using the determined motion vector (step S605).
[0203] Figure 7 This is a flowchart illustrating an image encoding method according to another embodiment of the present invention, and Figure 8 This is a flowchart illustrating an image decoding method according to another embodiment of the present invention.
[0204] Reference Figure 7 The encoding device can deduce merging candidates (step S701) and generate a merging candidate list based on the deduced merging candidates. After generating the merging candidate list, the encoding device can use the generated merging candidate list to determine motion information (step S702), and can use the determined motion information to perform motion compensation on the current block (step S703). Subsequently, the encoding device can perform entropy encoding on the information associated with motion compensation (step S704).
[0205] Reference Figure 8 The decoding device performs entropy decoding (S801) on the motion compensation-related information received from the encoding device, derives merging candidates (S802), and generates a merging candidate list based on the derived merging candidates. After generating the merging candidate list, the decoding device can determine the motion information of the current block by using the generated merging candidate list (S803). Subsequently, the decoding device can use the motion information to perform motion compensation (S804).
[0206] Figure 5 and Figure 6 Show application Figure 4 The example of AMVP shown, and Figure 7 and Figure 8 Show application Figure 4 An example of the merge pattern shown.
[0207] In the following text, it will be described Figure 5 and Figure 6 Each step in the description Figure 7 and Figure 8 Each step in the process will be described. However, the motion compensation steps corresponding to S504, S605, S703, and S804, and the entropy encoding / entropy decoding steps corresponding to S505, S601, S704, and S801 will be described together.
[0208] The following will describe it in detail. Figure 5 and Figure 6 Each step in the process.
[0209] First, the steps for deriving the motion vector candidates will be described in detail (S501, S602).
[0210] The motion vector candidates for the current block may include at least one of spatial motion vector candidates and temporal motion vector candidates, or both of spatial motion vector candidates and temporal motion vector candidates.
[0211] The temporal motion vector of the current block can be derived from the reconstructed blocks adjacent to it. For example, the motion vectors of the reconstructed blocks adjacent to the current block can be used as candidates for the spatial motion vector of the current block.
[0212] Figure 9 This is a diagram illustrating an example of deriving the spatial motion vector candidates for the current block.
[0213] Reference Figure 9 The spatial motion vector candidate of the current block can be derived from the neighboring blocks adjacent to the current block X. Here, the neighboring blocks adjacent to the current block may include at least one of the following: block B1 above the current block, block A1 to the left of the current block, block B0 to the upper right corner of the current block, block B2 to the upper left corner of the current block, block A0 to the lower left corner of the current block, block A2 to the upper left of the current block, and block B3 to the upper left of the current block. In addition, the neighboring blocks adjacent to the current block may include at least one of the blocks located between B3 and B1 and the blocks located between A2 and A1.
[0214] Furthermore, neighboring blocks adjacent to the current block can have a square shape or a non-square shape. When a motion vector exists in a neighboring block adjacent to the current block, the motion vector of the neighboring block can be determined as a spatial motion vector candidate for the current block. The existence of a motion vector in a neighboring block or its suitability as a spatial motion vector candidate for the current block can be determined based on whether the neighboring block exists or whether it is encoded through inter-frame prediction. Here, the existence of a motion vector in a neighboring block or its suitability as a spatial motion vector candidate for the current block can be determined according to a predetermined priority. In the example, in Figure 9 In the example shown, availability can be determined in the order of the blocks at positions A0, A1, B0, B1, B2, B3, and A2.
[0215] When the reference image of the current block differs from the reference images of neighboring blocks with motion vectors, the motion vectors of the neighboring blocks can be used to determine the motion vector candidates of the current block by performing scaling on the motion vectors of the neighboring blocks. Here, scaling can be performed based on at least one of the distance between the current image and the reference image referenced by the current block, and the distance between the current image and the reference image referenced by the neighboring blocks. In one example, the spatial motion vector candidates of the current block can be derived by performing scaling on the motion vectors of the neighboring blocks according to the ratio of the distance between the current image and the reference image referenced by the current block to the distance between the current image and the reference image referenced by the neighboring blocks.
[0216] Furthermore, when the reference image index of the current block differs from the reference image index of neighboring blocks with motion vectors, the motion vectors of neighboring blocks can be determined as spatial motion vector candidates for the current block by performing scaling on the motion vectors of neighboring blocks. Here, scaling can be performed based on at least one of the distance between the current image and the reference image referenced by the current block, and the distance between the current image and the reference image referenced by neighboring blocks.
[0217] Regarding scaling, spatial motion vector candidates can be determined by scaling the motion vectors of neighboring blocks based on a reference image indicated by a reference image index with a predefined value. Here, the predefined value can be a positive integer including 0. In one example, spatial motion vector candidates for the current block can be derived by scaling the motion vectors of neighboring blocks according to the ratio of the distance between the current image and the reference image of the current block indicated by the reference image index with a predefined value to the distance between the current image and the reference image of neighboring blocks indicated by the reference image index with a predefined value.
[0218] Furthermore, spatial motion vector candidates for the current block can be derived based on at least one encoding parameter of the current block.
[0219] The temporal motion vector candidate of the current block can be derived from the reconstructed blocks included in the co-image (co-picture) of the current image. Here, the co-image can be an image that has been encoded / decoded before the current image, and can be an image with a different temporal order than the current image.
[0220] Figure 10 This is a diagram illustrating an example of deriving the candidate time motion vector for the current block.
[0221] Reference Figure 10 In the co-location image of the current image, a temporal motion vector candidate for the current block can be derived from either a block whose outer position includes a block associated with the same spatial position as the current block X, or a block whose inner position includes a block associated with the same spatial position as the current block X. Here, the temporal motion vector candidate can represent the motion vector of the co-location block. In one example, the temporal motion vector candidate for the current block can be derived from at least one of the following: block H adjacent to the lower right corner of block C, blocks C1 and C3 including the center point of block C, blocks C0, C4, C5, and C6 adjacent to the inner corner of block C, block D0 adjacent to the upper right side of block C, and block D1 adjacent to the lower left side of block C, wherein block C is associated with the same spatial position as the current block. The blocks H, C1, C3, C0, C4, C5, C6, D0, and D1 used to derive the temporal motion vector candidate for the current block are referred to as "co-location blocks". When temporal motion vector candidates are not derived from at least one of the blocks H, C1, C3, C0, C4, C5, C6, D0, and D1 described above (when intra-frame coding is performed), temporal motion vector candidates can be derived by using the remaining blocks excluding the above blocks.
[0222] In addition, at least one of the following can be derived based on at least one encoding parameter: temporal motion vector candidate, co-location image, co-location block, prediction list using flag, and reference image index.
[0223] When the distance between the current image (including the current block) and its reference image differs from the distance between the co-image (including the co-block) and its reference image, a temporal motion vector candidate for the current block can be obtained by scaling the motion vector of the co-block. Here, scaling can be performed based on at least one of the distance between the current image and the reference image referenced by the current block, and the distance between the co-image and the reference image referenced by the co-block. In one example, the temporal motion vector candidate for the current block can be derived by scaling the motion vector of the co-block according to the ratio of the distance between the current image and the reference image referenced by the current block to the distance between the co-image and the reference image referenced by the co-block.
[0224] The additional motion vector candidate for the current block can represent at least one of the following: a modified spatial motion vector candidate, a modified temporal motion vector candidate, a combined motion vector candidate, a candidate with a predetermined motion vector value, and a motion vector candidate on a sub-block basis. Here, deriving an additional motion vector candidate can mean deriving an additional motion vector candidate and adding it to the motion vector candidate list.
[0225] Here, the modified spatial motion vector candidate can represent a motion vector obtained by modifying the aforementioned spatial motion vector candidate. Furthermore, the modified temporal motion vector candidate can represent a motion vector obtained by modifying the aforementioned temporal motion vector candidate. Additionally, the combined motion vector candidate can represent a motion vector obtained by combining at least one of the motion information of spatial motion vector candidates, temporal motion vector candidates, modified spatial motion vector candidates, modified temporal motion vector candidates, and motion vector candidates with predetermined motion vector values existing in the motion vector candidate list.
[0226] Furthermore, the combined motion vector candidate can represent a combined dual-prediction motion vector candidate. The combined dual-prediction motion vector candidate can be a motion vector candidate using dual prediction, and can represent a motion vector candidate having L0 motion vectors and L1 motion vectors. Furthermore, the combined motion vector candidate can be a motion vector candidate having a statistical value of at least one of spatial motion vector candidates, temporal motion vector candidates, modified spatial motion vector candidates, modified temporal motion vector candidates, and motion vector candidates with predetermined motion vector values. Here, the statistical value can represent an average value. Moreover, an average value can be calculated for each of the L0 and L1 motion vectors.
[0227] Furthermore, a motion vector candidate with a predetermined motion information value can represent a zero-merged motion vector with motion vector (0,0).
[0228] Furthermore, at least one of the following can be derived for each sub-block: a modified spatial motion vector candidate, a modified temporal motion vector candidate, a combined motion vector candidate, and a candidate with a predetermined motion vector value. The aforementioned motion vectors derived for each sub-block can be referred to as sub-block-level motion vector candidates and can be added to the motion vector candidate list. Here, "sub-block" can be used to have the same meaning as "lower-level block" or "sub-block," and they can be used interchangeably.
[0229] We will utilize it later. Figure 13 and Figure 14 Describe in detail the motion vector candidates at the sub-block level.
[0230] Next, the steps for generating a motion vector candidate list based on the derived motion vector candidates will be described (S502, S603).
[0231] The steps of generating a motion vector candidate list may include processes for adding motion vector candidates to or removing motion vector candidates from the motion vector candidate list, as well as processes for adding combined motion vector candidates to the motion vector candidate list.
[0232] First, the process of adding or removing derived motion vector candidates from the motion vector candidate list will be described. The encoding and decoding devices can add derived motion vector candidates to the motion vector candidate list in the order in which they are derived.
[0233] Suppose that the motion vector candidate list mvpListLX can represent the motion vector candidate lists corresponding to the reference frame lists L0, L1, L2, and L3. That is, the motion vector candidate list corresponding to the reference frame list L0 can be represented by mvpListL0.
[0234] In addition to spatial motion vector candidates and temporal motion vector candidates, motion vectors with predetermined values can also be added to the motion vector candidate list. For example, when the number of motion vector candidates in the motion vector list is less than the maximum number of motion vector candidates that can be included in the motion vector list, motion vectors with a value of zero can be added to the motion vector candidate list.
[0235] Next, the process of adding combined motion vector candidates to the motion vector candidate list will be described.
[0236] When the number of motion vector candidates in the motion vector candidate list is less than the maximum number of motion vector candidates that can be included in the motion vector candidate list, one or more motion vector candidates in the motion vector candidate list are combined to generate one or more combined motion vector candidates, and the generated combined motion vector candidates can be added to the motion vector candidate list. For example, at least one or more of the spatial motion vector candidates, temporal motion vector candidates, and zero motion vector candidates included in the motion vector candidate list can be used to generate combined motion vector candidates, and the generated combined motion vector candidates can be added to the motion vector candidate list.
[0237] Optionally, a combined motion vector candidate can be generated based on at least one of the encoding parameters, and the combined motion vector candidate generated based on at least one of the encoding parameters can be added to the motion vector candidate list.
[0238] Next, the steps for selecting the predicted motion vector of the current block from the motion vector candidate list will be described below (S503, S604).
[0239] Among the motion vector candidates included in the motion vector candidate list, the motion vector candidate indicated by the motion vector candidate index can be determined as the predicted motion vector for the current block.
[0240] The encoding device calculates the difference between the motion vector of the current block and the predicted motion vector, thus generating the motion vector difference. The decoding device generates the motion vector of the current block by adding the predicted motion vector to the motion vector difference.
[0241] Here, motion information correction can be applied to any of the following: motion vector candidates included in the motion vector candidate list, predicted motion vectors, or motion vectors calculated by adding the predicted motion vector to the difference between the two motion vectors. A detailed description of motion information correction will be provided later.
[0242] We will describe them together later. Figure 5 and Figure 6 The steps shown are: performing motion compensation (S504, S605) and entropy encoding / decoding of information associated with motion compensation (S505, S601). Figure 7 and Figure 8 The steps for performing motion compensation (S703, S804) and entropy encoding / decoding (S704, S801) are shown.
[0243] The following text will describe it in detail. Figure 7 and 8 Each step shown.
[0244] First, the steps for deriving the candidate merge will be described (S701, 802).
[0245] The merge candidates for the current block may include at least one of spatial merge candidates, temporal merge candidates, and additional merge candidates. Here, the expression "derive spatial merge candidate" refers to the process of deriving spatial merge candidates and adding the derived merge candidates to the merge candidate list.
[0246] Reference Figure 9 The spatial merge candidates for the current block can be derived from the neighboring blocks adjacent to the current block X. The neighboring blocks adjacent to the current block may include at least one of the following: block B1 above the current block, block A1 to the left of the current block, block B0 to the upper right corner of the current block, block B2 to the upper left corner of the current block, block A0 to the lower left corner of the current block, block A2 to the upper left of the current block, and block B3 to the upper left of the current block. Furthermore, the neighboring blocks adjacent to the current block may include at least one of the blocks located between B3 and B1 and between A2 and A1.
[0247] To derive spatial merge candidates for the current block, it can be determined whether neighboring blocks adjacent to the current block are available for deriving spatial merge candidates. Here, the availability of neighboring blocks adjacent to the current block can be determined based on a predetermined priority. In one example, in... Figure 9 In the example shown, the availability of derivation space merge candidates is determined according to the order of the blocks at positions A0, A1, B0, B1, B2, B3, and A2. Space merge candidates determined based on the above priority setting are then added sequentially to the merge candidate list of the current block.
[0248] Figure 11 This is a diagram illustrating an example of the process of adding spatial merge candidates to the merge candidate list.
[0249] Reference Figure 11 Four spatial merge candidates are derived from four neighboring blocks A1, B0, A0 and B2, and the derived spatial merge candidates can be added sequentially to the merge candidate list.
[0250] Alternatively, spatial merging candidates can be derived based on at least one of the encoding parameters.
[0251] Here, the motion information of the spatial merging candidate may include three or more motion information, wherein the three or more motion information includes L2 motion information and L3 motion information in addition to L0 motion information and L1 motion information. Here, there may be at least one list of reference frames, for example, including L0, L1, L2 and L3.
[0252] Next, we will describe the method for deriving the time merge candidates for the current block.
[0253] Temporal merging candidates for the current block can be derived from the reconstructed blocks included in the co-frames of the current frame. The co-frame can be a frame that was encoded / decoded before the current frame and may differ from the current frame in temporal order.
[0254] The expression "derive time merging candidate" refers to the process of deriving time merging candidates and adding the derived time merging candidates to the merging candidate list.
[0255] Reference Figure 10 In the co-location image of the current image, a temporal motion vector candidate for the current block can be derived from either a block whose outer position includes a block associated with the same spatial position as the current block X, or a block whose inner position includes a block associated with the same spatial position as the current block X. Here, the temporal motion vector candidate can represent the motion vector of the co-location block. In one example, the temporal motion vector candidate for the current block can be derived from at least one of the following: block H adjacent to the lower right corner of block C associated with the same spatial position as the current block; blocks C1 and C3 including the center point of block C; blocks C0, C4, C5, and C6 adjacent to the inner corner of block C; block D0 adjacent to the upper right side of block C; and block D1 adjacent to the lower left side of block C. The blocks H, C1, C3, C0, C4, C5, C6, D0, and D1 used to derive the temporal motion vector candidate for the current block are referred to as "co-location blocks".
[0256] When the timing merge candidate for the current block can be derived from block H, which is located outside block C, block H is set as the co-occurring block of the current block. In this case, the timing merge candidate for the current block can be derived based on the motion information of block H. Conversely, when the timing merge candidate for the current block cannot be derived from block H, at least one of blocks C1, C3, C0, C4, C5, C6, D0, and D1 can be set as the co-occurring block of the current block. When no timing merge candidate for the current block can be derived from either block H or block C3 (e.g., these blocks are intra-coded blocks), the timing merge candidate for the current block can be derived from blocks other than these blocks.
[0257] In another example, time merge candidates for the current block can be derived from multiple blocks within the same image. In one example, multiple time merge candidates for the current block can be derived from block H, block C1, block C3, block C0, block C4, block C5, block C6, block D0, or block D1.
[0258] Figure 12 This is a diagram illustrating an example of the process of adding time merging candidates to the merge candidate list.
[0259] Reference Figure 12When a time merge candidate is derived from the co-occurring block at position H1, the derived time merge candidate can be added to the merge candidate list.
[0260] When the distance between the current frame (including the current block) and its reference frame differs from the distance between the co-frame (including the co-block) and its reference frame, the motion vector of the current block can be obtained by scaling the motion vector of the co-frame. Here, the scaling of the motion vector can be performed based on at least one of the distance between the current frame and its reference frame, and the distance between the co-frame and its reference frame. For example, the motion vector of the current block can be derived by scaling the motion vector of the co-frame according to the ratio of the distance between the current frame and its reference frame to the distance between the co-frame and its reference frame.
[0261] In addition, at least one of the following can be derived based on the encoding parameters of the current block, neighboring block, or co-occurring block: time merging candidate, co-occurring picture, co-occurring block, prediction list, flag, and reference picture index.
[0262] A merge candidate list can be generated by generating at least one of spatial merge candidates and temporal merge candidates and adding the derived merge candidates to the merge candidate list in the order they were derived.
[0263] Next, we will describe the method for deriving additional merge candidates for the current block.
[0264] Additional merge candidates can represent at least one of the following: modified spatial merge candidates, modified temporal merge candidates, combined merge candidates, merge candidates with predetermined motion information values, and merge candidates based on sub-blocks. Here, deriving additional merge candidates can mean adding additional merge candidates to the merge candidate list.
[0265] The modified spatial merging candidate can be represented as a merging candidate obtained by modifying at least one motion information of the derived spatial merging candidate.
[0266] The modified time merging candidate can be represented as a merging candidate obtained by modifying at least one motion information of the derived time merging candidate.
[0267] A combined merge candidate can be a merge candidate derived by combining the motion information of at least one of the following: spatial merge candidates, temporal merge candidates, modified spatial merge candidates, modified temporal merge candidates, combined merge candidates, and merge candidates with predetermined motion information values, which exist in the merge candidate list.
[0268] Optionally, a combined merge candidate may represent a merge candidate derived by combining motion information of at least one of the following: a spatial merge candidate and a temporal merge candidate not included in the merge candidate list but derived from a block of deducible spatial merge candidates and temporal merge candidates; a modified spatial merge candidate and a modified temporal merge candidate generated based on a spatial merge candidate and a temporal merge candidate not included in the merge candidate list but derived from a block of deducible spatial merge candidates and temporal merge candidates; a combined merge candidate; and a merge candidate having a predetermined motion information value.
[0269] Alternatively, the decoder can deduce the combined merging candidates by using motion information decoded from the bitstream entropy. Here, the motion information used by the decoder to deduce the combined merging candidates can be entropy encoded into the bitstream.
[0270] Combined merging candidates can represent combined dual-prediction merging candidates. Combined dual-prediction merging candidates can be merging candidates using dual predictions, and represent merging candidates with L0 motion information and L1 motion information.
[0271] Merging candidates with predetermined motion information values can represent zero merging candidates with motion vector (0,0). Furthermore, merging candidates with predetermined motion information values can be preset to have the same value in both the encoding and decoding devices.
[0272] In addition, at least one of the following can be derived for each sub-block: a modified spatial merging candidate, a modified temporal merging candidate, a combined merging candidate, and a merging candidate with a predetermined motion information value. The motion information derived for each sub-block is called a merging candidate on a sub-block basis and is added to the merging candidate list.
[0273] We will utilize it later. Figure 13 and Figure 14 Provide a detailed description of the merge candidates at the sub-block level.
[0274] At least one of the following can be derived or generated based on at least one of the encoding parameters of the current block, neighboring blocks, and co-blocks: a modified spatial merge candidate, a modified temporal merge candidate, a combined merge candidate, a merge candidate with a predetermined motion information value, and a merge candidate at the sub-block level. Furthermore, at least one of the following can be added to the merge candidate list based on at least one of the encoding parameters of the current block, neighboring blocks, and co-blocks: a modified spatial merge candidate, a modified temporal merge candidate, a combined merge candidate, a merge candidate with a predetermined motion information value, and a merge candidate at the sub-block level.
[0275] Furthermore, the size of the candidate list for merging can be determined based on the encoding parameters of the current block, neighboring blocks, or co-occurring blocks, and its size can vary based on the encoding parameters.
[0276] Next, the steps for determining the motion information of the current block using the generated list of merge candidates will be described (S702, S803).
[0277] The encoder can select merge candidates from the merge candidate list that will be used for motion compensation of the current block through motion estimation, and encode the merge candidate index merge_idx, which indicates the determined merge candidate, into a bit stream.
[0278] To generate a prediction block for the current block, the encoder selects a merge candidate from a merge candidate list using a merge candidate index and determines the motion information for the current block. The encoder then performs motion compensation based on the determined motion information to generate the prediction block for the current block.
[0279] The decoder decodes the merge candidate indices in the received bitstream and determines the merge candidates included in the merge candidate list and indicated by the merge candidate indices. The determined merge candidates can be used as motion information for the current block. The determined motion information is used for motion compensation for the current block. Here, the term "motion compensation" may have the same meaning as inter-frame prediction.
[0280] Furthermore, motion information correction can be applied to motion information determined based on the merge candidate index or to any of the merge candidates included in the merge candidate list. A detailed description of motion information correction will be provided later.
[0281] Next, the steps for performing motion compensation using motion vectors or motion information will be described (S504, S605, S703, S804).
[0282] The encoding and decoding devices can calculate the motion vector of the current block using the predicted motion vector and the motion vector difference. After calculating the motion vector, the encoding and decoding devices can use the calculated motion vector to perform inter-frame prediction or motion compensation (S504, S605).
[0283] The encoding and decoding devices can use the determined motion information to perform inter-frame prediction or motion compensation (S703, S804). Here, the current block may have motion information of the determined merging candidates.
[0284] Based on the prediction direction of the current block, the current block can have one (minimum) to N (maximum) motion vectors. One to N motion vectors can be used to generate one (minimum) to N (maximum) prediction blocks, and the final prediction block can be selected from the generated prediction blocks.
[0285] For example, when the current block has a motion vector, the predicted block generated using that motion vector (or motion information) is determined as the final predicted block for the current block.
[0286] Furthermore, when the current block has multiple motion vectors (or multiple pieces of motion information), multiple prediction blocks are generated using these multiple motion vectors (or multiple pieces of motion information), and the final prediction block of the current block is determined based on the weighted sum of the multiple prediction blocks. Multiple reference frames, each including multiple prediction blocks indicated by multiple motion vectors (or multiple pieces of motion information), can be listed in different reference frame lists or in a single reference frame list.
[0287] For example, multiple prediction blocks for the current block can be generated based on at least one of spatial motion vector candidates, temporal motion vector candidates, motion vectors with predetermined values, and combined motion vector candidates, and then the final prediction block for the current block can be determined based on the weighted sum of the multiple prediction blocks.
[0288] Optionally, for example, multiple prediction blocks for the current block can be generated based on motion vector candidates indicated by a preset motion vector candidate index, and then the final prediction block for the current block can be determined based on the weighted sum of the multiple prediction blocks. Alternatively, multiple prediction blocks can be generated based on motion vector candidates indicated by indices within a predetermined range of motion vector candidate indices, and then the final prediction block for the current block can be determined based on the weighted sum of the multiple prediction blocks.
[0289] The weighting factor for each prediction block can be equal to 1 / N (where N is the number of prediction blocks generated). For example, when two prediction blocks are generated, the weighting factor for each prediction block is 1 / 2. Similarly, when three prediction blocks are generated, the weighting factor for each prediction block is 1 / 3. When four prediction blocks are generated, the weighting factor for each prediction block can be 1 / 4. Optionally, the final prediction block for the current block can be determined by applying different weighting factors to each prediction block.
[0290] The weighting factors for a prediction block can be variable rather than fixed. The weighting factors for a prediction block can be unequal and different. For example, when generating two prediction blocks, the weighting factors for the two blocks, such as (1 / 2, 1 / 2), can be equal, or they can be unequal, such as (1 / 3, 2 / 3), (1 / 4, 3 / 4), (2 / 5, 3 / 5), or (3 / 8, 5 / 8). The weighting factors can be positive or negative real values. That is, the values of the weighting factors can include negative real values such as (-1 / 2, 3 / 2), (-1 / 3, 4 / 3), or (-1 / 4, 5 / 4).
[0291] To apply a variable weighting factor, one or more weighting factor messages for the current block can be signaled via a bitstream. The weighting factor information can be signaled block-by-block or frame-by-frame. Optionally, multiple prediction blocks can share a single weighting factor.
[0292] The encoding and decoding devices can determine whether to use the predicted motion vector (or predicted motion information) based on the prediction block list utilization flag. For example, for each reference frame list, when the prediction block list utilization flag has a first value of 1 (1), the encoding and decoding devices can use the predicted motion vector for the current block to perform inter-frame prediction or motion compensation for the current block. However, when the prediction block list utilization flag has a second value of 0 (0), the encoding and decoding devices may not use the predicted motion vector for the current block to perform inter-frame prediction or motion compensation for the current block. The first and second values of the prediction block list utilization flag can be set to 0 and 1 respectively, respectively. Expressions 3 to 5 are examples of methods for generating the final predicted block of the current block when the inter-frame prediction indicator of the current block is PRED_BI, PRED_TRI, or PRED_QUAD and when the prediction direction for each reference frame list is unidirectional.
[0293] [Expression 1]
[0294] P_BI=(WF_L0*P_L0+OFFSET_L0+WF_L1*P_L1+OFFSET_L1+RF)>>1
[0295] [Expression 2]
[0296] P_TRI=(WF_L0*P_L0+OFFSET_L0+WF_L1*P_L1+OFFSET_L1+WF_L2*P_L2+OFFSET_L2+RF) / 3
[0297] [Expression 3]
[0298] P_QUAD=(WF_L0*P_L0+OFFSET_L0+WF_L1*P_L1+OFFSET_L1+WF_L2*P_L2+OFFSET_L2+WF_L3*P_L3+OFFSET_L3+RF)>>2
[0299] In expressions 1 through 3, each of P_BI, P_TRI, and P_QUAD represents the final predicted block of the current block, and LX (X = 0, 1, 2, 3) represents the reference frame list. WF_LX represents the weighting factor of the predicted block generated using the LX reference frame list. OFFSET_LX represents the offset value for the predicted block generated using the LX reference frame list. P_LX represents the predicted block generated using the motion vectors (or motion information) of the LX reference frame list of the current block. RF represents the rounding factor, and it can be set to 0, a positive integer, or a negative integer. The LX reference frame list may include at least one of the following: long-term reference frames, reference frames that have not undergone deblocking filtering, reference frames that have not undergone sample adaptive offset, reference frames that have not undergone adaptive loop filtering, reference frames that have only undergone deblocking filtering and adaptive offset, reference frames that have only undergone deblocking filtering and adaptive loop filtering, reference frames that have undergone sample adaptive offset and adaptive loop filtering, and reference frames that have undergone both deblocking filtering, sample adaptive offset, and adaptive loop filtering. In this case, the LX reference screen list can be at least one of the L2 reference screen list and the L3 reference screen list.
[0300] Even when there are multiple prediction directions for a predetermined list of reference screens, the final prediction block for the current block can be obtained based on the weighted sum of the prediction blocks. In this case, the weighting factors for multiple prediction blocks derived using a single list of reference screens can be equal or different from each other.
[0301] At least one of the weighting factor WF_LX or offset OFFSET_LX of multiple prediction blocks can be an encoding parameter that will be entropy encoded / entropy decoded. Optionally, for example, the weighting factor and offset can be derived from previously encoded / decoded neighboring blocks adjacent to the current block. Here, neighboring blocks adjacent to the current block may include at least one of blocks used to derive spatial motion vector candidates for the current block and blocks used to derive temporal motion vector candidates for the current block.
[0302] Further optionally, for example, the weighting factor and offset can be determined based on the display order of the current frame (Frame Order Count (POC)) and the POC of each of the reference frames. In this case, the value of the weighting factor or offset can decrease as the distance between the current frame and the reference frame increases. That is, when the current frame and the reference frame are close to each other, a larger value can be set for the weighting factor or offset. For example, when the difference between the POC of the current frame and the POC of the L0 reference frame is 2, the value of the weighting factor applied to the prediction block generated using the L0 reference frame can be set to 1 / 3. Furthermore, when the difference between the POC of the current frame and the POC of the L0 reference frame is 1, the value of the weighting factor applied to the prediction block generated using the L0 reference frame can be set to 2 / 3. As described above, the weighting factor or offset can be inversely proportional to the difference between the display order (POC) of the current frame and the reference frame. Optionally, the weighting factor or offset can be directly proportional to the difference between the display order of the current frame and the reference frame.
[0303] Optionally, for example, at least one of the weighting factor and the offset can be entropy encoded / entropy decoded based on at least one encoding parameter. Furthermore, a weighted sum of the prediction block can be calculated based on at least one encoding parameter.
[0304] The weighted sum of multiple prediction blocks can be applied only to a portion of the prediction block. This portion can be a boundary region adjacent to the boundary of each prediction block. To apply the weighted sum only to the portion described above, the weighted sum can be calculated block by block within each prediction block.
[0305] In a block with a block size indicated by region information, inter-frame prediction or motion compensation can be performed for sub-blocks smaller than that block by using the same prediction block or the same final prediction block.
[0306] In a block with a block depth indicated by region information, inter-frame prediction or motion compensation can be performed for sub-blocks with a block depth greater than that of the block by using the same prediction block or the same final prediction block.
[0307] Furthermore, when calculating the weighted sum of the predicted blocks using motion vector prediction, at least one of the motion vector candidates included in the motion vector candidate list can be used to calculate the weighted sum, and the calculation result can be used as the final predicted block for the current block.
[0308] For example, a prediction block can be generated using only spatial motion vector candidates, a weighted sum of the prediction blocks can be calculated, and the calculated weighted sum can be used as the final prediction block for the current block.
[0309] For example, spatial motion vector candidates and temporal motion vector candidates can be used to generate prediction blocks, a weighted sum of the prediction blocks can be calculated, and the calculated weighted sum can be used as the final prediction block of the current block.
[0310] For example, a prediction block can be generated using only combined motion vector candidates, a weighted sum of the prediction blocks can be calculated, and the calculated weighted sum can be used as the final prediction block for the current block.
[0311] For example, a prediction block can be generated using only motion vector candidates indicated by a specific index, a weighted sum of the prediction blocks can be calculated, and the calculated weighted sum can be used as the final prediction block for the current block.
[0312] For example, a prediction block can be generated using only motion vector candidates indicated by indices within a predetermined index range, a weighted sum of the prediction blocks can be calculated, and the calculated weighted sum can be used as the final prediction block for the current block.
[0313] When using a merge mode to compute a weighted sum of predicted blocks, at least one merge candidate from the merge candidate list can be used to compute the weighted sum, and the computed result can be used as the final predicted block for the current block.
[0314] For example, a prediction block can be generated using only spatial merging candidates, a weighted sum of the prediction blocks can be calculated, and the calculated weighted sum can be used as the final prediction block for the current block.
[0315] For example, spatial merge candidates and temporal merge candidates can be used to generate prediction blocks, a weighted sum of the prediction blocks can be calculated, and the calculated weighted sum can be used as the final prediction block for the current block.
[0316] For example, a prediction block can be generated using only the combined candidate blocks, a weighted sum of the prediction blocks can be generated, and the calculated weighted sum can be used as the final prediction block for the current block.
[0317] For example, a prediction block can be generated using only merge candidates indicated by a specific index, a weighted sum of the prediction blocks can be generated, and the calculated weighted sum can be used as the final prediction block for the current block.
[0318] For example, a prediction block can be generated using only merge candidates indicated by an index within a predetermined index range, a weighted sum of the prediction blocks can be calculated, and the calculated weighted sum can be used as the final prediction block for the current block.
[0319] In the encoder and decoder, motion compensation can be performed using the motion vector or motion information of the current block. At this point, at least one prediction block can be used to determine the final prediction block as a result of the motion compensation. Here, the current block can represent at least one of the current encoded block and the current prediction block.
[0320] The final predicted block of the current block can be generated by performing overlapping block motion compensation on the boundary region of the current block.
[0321] The boundary region of the current block can be a region located within the current block and adjacent to the boundaries between the current block and its neighboring blocks. The boundary region of the current block can include at least one of the following: top boundary region, left boundary region, bottom boundary region, right boundary region, top-right corner region, bottom-right corner region, top-left corner region, and bottom-left corner region. The boundary region of the current block can also be a region corresponding to a portion of the predicted block of the current block.
[0322] Overlapping block motion compensation can be represented as a motion compensation process performed by calculating a weighted sum of the predicted blocks corresponding to the boundary regions of the current block and the predicted blocks generated using motion information from the encoded / decoded blocks adjacent to the current block.
[0323] The weighted sum can be calculated block by block by dividing the current block into multiple sub-blocks. In other words, motion compensation for the current block can be performed block by block using motion information from the encoded / decoded sub-blocks adjacent to the current block. A sub-block can represent a lower-level block of the current block.
[0324] Furthermore, in the weighted sum calculation, a first prediction block generated using the motion information of the current block for each sub-block of the current block, and a second prediction block generated using the motion information of spatially adjacent neighboring sub-blocks of the current block, can be used. In this case, the expression "using motion information" means "deriving motion information." The first prediction block can represent a prediction block generated using the motion information of the encoded / decoded target sub-block within the current block. The second prediction block can be a prediction block generated using the motion information of neighboring sub-blocks spatially adjacent to the encoded / decoded target sub-block within the current block.
[0325] The final predicted block for the current block can be generated by using a weighted sum of the first and second predicted blocks. In other words, overlapping block motion compensation uses the motion information of the current block and the motion information of the other block to find the final predicted block for the current block.
[0326] Furthermore, when at least one of the Advanced Motion Vector Prediction (AMVP) mode, Merging mode, Affine Motion Compensation mode, Decoder-Side Motion Vector Derivation mode, Adaptive Motion Vector Resolution mode, Local Illumination Compensation mode, and Bidirectional Optical Flow mode is used, the current block can be divided into multiple sub-blocks, and overlapping block motion compensation can be performed on a sub-block-by-sub-block basis.
[0327] When the merging mode is used for motion compensation, overlapping block motion compensation can be performed on at least one of the Advanced Temporal Motion Vector Predictor (ATMVP) candidates and the Spatial-Temporal Motion Vector Predictor (STMVP) candidates.
[0328] Next, the process of performing entropy encoding / entropy decoding on the information associated with motion compensation will be described (S505, S601, S704, S801).
[0329] The encoding device can entropy encode information associated with motion compensation into a bitstream, and the decoding device can decode the motion compensation-related information included in the bitstream. The motion compensation-related information that is the target of entropy encoding or entropy decoding may include inter-frame prediction indicator inter_pred_idc, reference frame indices ref_idx_l0, ref_idx_l1, ref_idx_l2, and ref_idx_l3, motion vector candidate indices mvp_l0_idx, mvp_l1_idx, mvp_l2_idx, and mvp_l3_idx, motion vector difference, skip mode use / disuse information cu_skip_flag, merge mode use / disuse information merge_flag, merge index information merge_index, weighting factors wf_l0, wf_l1, wf_l2, and wf_l3, and offset values offset_l0, offset_l1, offset_l2, and offset_l3, at least one of these.
[0330] When encoding / decoding the current block using inter-frame prediction, the inter-frame prediction indicator can indicate the prediction direction, the number of prediction directions, or both. For example, the inter-frame prediction indicator can indicate unidirectional or multidirectional prediction, such as bidirectional, tridirectional, and quaddirectional prediction. The inter-frame prediction indicator can also indicate the number of reference frames used to generate the prediction blocks for the current block. Optionally, a reference frame can be used for prediction in multiple directions. In this case, M reference frames are used to perform prediction in N directions (where N > M). The inter-frame prediction indicator can also indicate the number of prediction blocks used for inter-frame prediction or motion compensation for the current block.
[0331] The reference screen indicator can indicate one direction PRED_LX, two directions PRED_BI, three directions PRED_TRI, four directions PRED_QUAD, or more directions, depending on the number of predicted directions for the current block.
[0332] The prediction list for a specific reference screen list uses flags to indicate whether to use that reference screen list to generate prediction blocks.
[0333] For example, when the prediction list utilization flag of a specific reference screen list has a first value (1), this indicates that the reference screen list is used to generate prediction blocks. When the prediction list utilization flag has a second value (0), this indicates that the reference screen list is not used to generate prediction blocks. Here, the first and second values of the prediction list utilization flag can be set to 0 and 1 respectively.
[0334] In other words, when the prediction list of a specific reference frame list has a first value, the motion information corresponding to that reference frame list can be used to generate the prediction block for the current block.
[0335] A reference frame index indicates a specific reference frame that exists in the reference frame list and is referenced by the current block. For each reference frame list, one or more reference frame indices can be entropy encoded / entropy decoded. One or more reference frame indices can be used for motion compensation of the current block.
[0336] The motion vector candidate index indicates the motion vector candidate for the current block among the motion vector candidates included in each reference frame list or a motion vector candidate list prepared for each reference frame index. Entropy encoding / decoding can be performed on at least one or more motion vector candidate indices for each motion vector candidate list. Motion compensation for the current block can be performed using at least one or more motion vector candidate indices.
[0337] Motion vector difference represents the difference between the current motion vector and the predicted motion vector. For each motion vector candidate list generated for each reference frame list or each reference frame index for the current block, one or more motion vector differences can be entropy encoded / entropy decoded. One or more motion vector differences can be used for motion compensation of the current block.
[0338] Regarding the skip mode use / disuse information cu_skip_flag, skip mode can be used when it has a first value of 1 (1). Conversely, skip mode can be disused when it has a second value of 0 (0). Skip mode can be used to perform motion compensation for the current block based on the skip mode use / disuse information.
[0339] Regarding the merge mode use / disuse information `merge_flag`, the merge mode can be used when it has a first value of 1 (1). Conversely, the merge mode can be disused when it has a second value of 0 (0). The merge mode can be used to perform motion compensation on the current block based on the merge mode use / disuse information.
[0340] The merge index information, merge_index, can indicate information about merge candidates within the merge candidate list.
[0341] Optionally, merge index information may represent information about the merge index.
[0342] In addition, the merge index information can indicate the reconstructed blocks that are spatially / temporally adjacent to the current block for deriving merge candidates.
[0343] The merge index information can indicate one or more motion information items possessed by a merge candidate. For example, when the merge index information has a first value of zero (0), the merge index information can indicate the first merge candidate listed as the first entry in the merge candidate list; when the merge index information has a second value of one (1), the merge index information can indicate the second merge candidate listed as the second entry in the merge candidate list; and when the merge index information has a third value of two (2), the merge index information indicates the third merge candidate listed as the third entry in the merge candidate list. Similarly, when the merge index information has values from the fourth value to the Nth value, the merge index information can indicate the merge candidates listed in the merge candidate list at the positions in order of that value. Here, N can be 0 or a positive integer.
[0344] Motion compensation can be performed on the current block using the merge mode index information.
[0345] When two or more prediction blocks are generated during motion compensation of the current block, the final prediction block of the current block can be determined based on the weighted sum of the prediction blocks. When calculating the weighted sum, a weighting factor, an offset, or both a weighting factor and an offset can be applied to each prediction block. The weighting factor used to calculate the weighted sum (e.g., weighting factor and offset) can be entropy-encoded / entropy-decoded by at least some of the following or corresponding to at least one of the following: a list of reference frames, reference frames, motion vector candidate indices, motion vector differences, motion vectors, skip mode use / disuse information, merge mode use / disuse information, and merge index information. Furthermore, the weighting factor for each prediction block can be entropy-encoded / entropy-decoded based on an inter-frame prediction indicator. The weighting factor can include at least one of a weighting factor and an offset.
[0346] Information associated with motion compensation can be entropy-encoded / entropy-decoded block by block, or it can be entropy-encoded / entropy-decoded at a higher level. For example, information associated with motion compensation can be entropy-encoded / entropy-decoded block by block (e.g., per CTU, per CU, or per PU). Alternatively, information associated with motion compensation can be entropy-encoded / entropy-decoded at a higher level (such as video parameter sets, sequence parameter sets, picture parameter sets, adaptive parameter sets, or strip headers).
[0347] Information associated with motion compensation can be entropy encoded / decoded based on the motion compensation information difference, wherein the motion compensation information difference indicates the difference between the information associated with motion compensation and the predicted value of the information associated with motion compensation.
[0348] Information associated with motion compensation of the coded / decoded blocks adjacent to the current block can be used as information associated with motion compensation of the current block, without entropy encoding / entropy decoding of the information associated with motion compensation of the current block.
[0349] At least one piece of information associated with motion compensation can be derived based on at least one encoding parameter.
[0350] A bitstream can be decoded based on at least one encoding parameter to generate at least one piece of information associated with motion compensation. Conversely, at least one piece of information associated with motion compensation can be entropy encoded into a bitstream based on at least one encoding parameter.
[0351] At least one piece of information associated with motion compensation may include at least one of the following: motion vector, motion vector candidate, motion vector candidate index, motion vector difference, motion vector prediction value, skip mode use / disuse information skip_flag, merge mode use / disuse information merge_flag, merge index information merge_index, motion vector resolution information, overlapping block motion compensation information, local illumination compensation information, affine motion compensation information, decoder-side motion vector derivation information, and bidirectional optical flow information. Here, decoder-side motion vector derivation may represent pattern matching motion vector derivation.
[0352] Motion vector resolution information can be information indicating which specific resolution is used for at least one of the motion vector and the motion vector difference. Here, resolution can represent precision. A specific resolution can be set to at least one of 16-pixel (16-pel) units, 8-pixel (8-pel) units, 4-pixel (4-pel) units, integer-pixel (integer-pel) units, 1 / 2-pixel (1 / 2-pel) units, 1 / 4-pixel (1 / 4-pel) units, 1 / 8-pixel (1 / 8-pel) units, 1 / 16-pixel (1 / 16-pel) units, 1 / 32-pixel (1 / 32-pel) units, and 1 / 64-pixel (1 / 64-pel) units.
[0353] Overlapping block motion compensation information can be information indicating whether, during the motion compensation of the current block, the motion vectors of spatially adjacent neighboring blocks are used to calculate the weighted sum of the predicted blocks for the current block.
[0354] Local illumination compensation information can be information indicating whether one of a weighting factor and an offset is applied when generating the prediction block for the current block. Here, at least one of the weighting factor and the offset can be a value calculated based on a reference block.
[0355] Affine motion compensation information can be information indicating whether to use an affine motion model for motion compensation of the current block. Here, an affine motion model can be a model that uses multiple parameters to divide a block into multiple sub-blocks and uses representative motion vectors to calculate the motion vectors of these sub-blocks.
[0356] Decoder-side motion vector derivation information can indicate whether the motion vectors required for motion compensation are derived by the decoder and subsequently used in the decoder. Based on the decoder-side motion vector derivation information, entropy encoding / decoding of information associated with the motion vectors may not be performed. When the decoder-side motion vector derivation information indicates that the motion vectors are derived by the decoder and subsequently used in the decoder, entropy encoding / decoding of information associated with the merging mode may be performed. In other words, decoder-side motion vector derivation information can indicate whether a merging mode is used in the decoder.
[0357] Bidirectional optical flow information can indicate whether motion vectors are modified pixel-by-pixel or sub-block-by-subblock and subsequently used for motion compensation. Based on bidirectional optical flow information, entropy encoding / decoding of motion vectors can be performed without modifying them pixel-by-pixel or sub-block-by-subblock. Modifying motion vectors means converting block-based motion vector values to pixel-based or sub-block-based motion vector values.
[0358] Motion compensation can be performed on the current block based on at least one piece of information associated with motion compensation, and entropy encoding / decoding can be performed on at least one piece of information associated with motion compensation.
[0359] When entropy encoding / decoding information associated with motion compensation, binarization methods can be used, such as truncated Rice binarization, K-order exponential Golomb binarization, finite K-order exponential Golomb binarization, fixed-length binarization, univariate binarization, and truncated univariate binarization.
[0360] When entropy encoding / decoding information associated with motion compensation, the context model can be determined based on at least one of the following: information associated with motion information or region information of neighboring blocks adjacent to the current block; previously encoded / decoded motion compensation-related information or previously encoded / decoded region information; information about the depth of the current block; and information about the size of the current block.
[0361] Furthermore, when entropy encoding / decoding is performed on information associated with motion compensation, entropy encoding / decoding can be performed by using at least one of the following: information associated with motion compensation of neighboring blocks, previously encoded / decoded information associated with motion compensation, information about the depth of the current block, and information about the size of the current block as a prediction of the information associated with motion compensation of the current block.
[0362] In the following text, reference will be made to Figure 13 and Figure 14 This section provides a detailed description of motion vector candidates at the sub-block level or merged candidates at the sub-block level. Here, motion vector candidates and merged candidates at the sub-block level can be determined using the following methods for predicting motion information at the sub-block level.
[0363] When the current block is divided into multiple sub-blocks and motion information is derived on a sub-block basis, the following two methods for predicting motion information on a sub-block basis can be used. In these two methods, examples of predicting motion vectors are shown, and by using the sub-block-based method, at least one piece of information in the motion information and the motion vector can be predicted. In the following examples, for convenience, motion vectors on a sub-block basis are shown instead of motion information on a sub-block basis.
[0364] Furthermore, motion information determined at the sub-block level using at least one of the following methods can be included in the additional merge candidates. In other words, motion information determined at the sub-block level can be included as a merge candidate at the sub-block level in the merge / skip candidate list. Additionally, motion information of sub-block units determined using at least one of the following methods can be included in the additional merge candidates in the sub-block merge candidate list. In other words, motion information determined at the sub-block level can be included as a merge candidate at the sub-block level in the sub-block merge / skip candidate list.
[0365] Furthermore, motion information of sub-block units determined using at least one of the following methods can be included in the time merging candidates. In other words, motion information determined on a sub-block basis can be included as a time merging candidate in the merge / skip candidate list. Furthermore, motion information of sub-block units determined using at least one of the following methods can be included in the time merging candidates of the sub-block merge candidate list. In other words, motion information determined on a sub-block basis can be included as a time merging candidate on a sub-block basis in the merge / skip candidate list.
[0366] Furthermore, the motion vectors of the sub-block units determined above can be included in the motion vector candidate list as additional motion vector candidates (i.e., motion vector candidates on a sub-block basis), or as time motion vector candidates.
[0367] Figure 13 This is a diagram illustrating a method for predicting motion information in units of a first sub-block according to an embodiment of the present invention.
[0368] The method of predicting motion information on a first sub-block basis can be described as a method of predicting the motion information of sub-blocks within the current block by using the motion information of sub-blocks existing within a co-block in a reference image. In other words, this can be described as determining the motion information of sub-blocks obtained by dividing the current block based on the motion information of sub-blocks obtained by dividing the co-block. Here, the motion information may include at least one of motion vectors, reference image indexes, and inter-frame prediction directions.
[0369] A method for predicting motion information on a first sub-block basis can be performed in two steps. In the first step, at least one of a reference image and a co-location block can be identified. In the second step, the current block can be divided into multiple sub-blocks, and motion information can be determined from the sub-blocks within the co-location block on a per-sub-block basis within the current block.
[0370] In the first step, at least one of a co-location image and a co-location block can be determined using motion information from at least one of the blocks spatially adjacent to the current block. Here, the co-location image can be an image that includes the co-location block. The information indicating the co-location image can be information transmitted by signal in units of at least one of a sequence, frame, strip, parallel block group, and parallel block, and can be represented in index form.
[0371] For example, in the motion information of blocks spatially adjacent to the current block, the motion vector can be determined as a temporal motion vector, and the reference image index can be determined as an index indicating a co-located image.
[0372] Furthermore, at least one of the co-op image and co-op block can be determined by using at least one encoding parameter with a specific value. The specific value can be a fixed value predefined in the encoder / decoder, or it can be a variable value encoded from the encoder and transmitted as a signal.
[0373] For example, when a candidate image in the merge candidate list has at least two motion vectors and at least two reference image indices, the difference can be calculated by comparing the POC of the reference image indicated by the at least two reference image indices with the POC of the current image. The reference image with the smallest difference between its POC and the current image's POC can be determined as the co-position image for predicting motion information on a sub-block basis. Here, a small difference between POCs can indicate that the reference image and the current image are temporally adjacent.
[0374] For example, when a merge candidate in the merge candidate list has at least two motion vectors and at least two reference image indices, the reference image in the L0 direction indicated by the reference image index can be determined as the co-position image for predicting motion information on a sub-block basis.
[0375] For example, when a merge candidate in the merge candidate list has at least two motion vectors and at least two reference image indices, the reference image in the L1 direction indicated by the reference image index can be determined as the co-position image for predicting motion information on a sub-block basis.
[0376] For example, the motion vector of a merge candidate in the merge candidate list can be determined as the temporal motion vector indicating the co-location block, and the reference image index indicating the co-location image can be determined as a specific value. This specific value can be a fixed value predefined in the encoder / decoder, or it can be a variable value encoded from the encoder and transmitted as a signal. For example, the specific value can be 0. Here, the merge candidate with the motion vector indicating the co-location block can be a merge candidate with the same reference image index as the POC of the determined co-location image.
[0377] For example, a co-position image can be determined by using the reference image index of a merge candidate within the merge candidate list, and the motion vector can be determined as a specific value. This specific value can be a fixed value predefined in the encoder / decoder, or it can be a variable value encoded from the encoder and transmitted as a signal. For example, the specific value could be (0,0).
[0378] For example, co-position images and co-position blocks can be determined based on motion information included in the first merge candidate in the merge candidate list. The motion vector of the first merge candidate can be determined as a temporal motion vector, and the reference image index of the first merge candidate can be used as an index to indicate the co-position image.
[0379] In the second step, the corresponding block can be determined by adding the coordinates of the current block to the time motion vector determined in the first step. The motion information present at each sub-block obtained by dividing the determined corresponding block can be determined as the motion information of each sub-block unit obtained by dividing the current block. Here, the motion information of the sub-blocks in the current block can be determined from the sub-blocks spatially associated with the sub-block units within the corresponding block. Here, by using the determined time motion vector, the motion information of the sub-blocks in the current block can be determined as the motion information of the sub-blocks within the corresponding block associated with at least one of the upper-left, lower-left, upper-right, lower-right, and center positions included in the sub-blocks of the current block.
[0380] Here, scaling can be performed on the motion vector within the motion information of each sub-block unit in the current block.
[0381] Here, the merge candidates in the merge candidate list can be motion information derived from the reconstructed blocks adjacent to the current block, and can represent at least one piece of motion information that may be included in the merge candidate list as a merge candidate. For example, the merge candidates in the merge candidate list can be motion vectors derived from the reconstructed blocks adjacent to the current block, and can represent motion vectors that may be included in the merge candidate list as a merge candidate.
[0382] Figure 14 This is a diagram illustrating a method for predicting motion information in units of a second sub-block according to an embodiment of the present invention.
[0383] The method for predicting motion information on a second sub-block basis refers to a method for predicting the motion information of sub-blocks within the current block by using at least one of the motion information of sub-blocks obtained by dividing the block into co-location blocks and the motion information of sub-blocks adjacent to the sub-blocks within the current block. In other words, the calculation result obtained by using at least one of the motion information of sub-blocks obtained by dividing the block into co-location blocks and the motion information of sub-blocks adjacent to the sub-blocks within the current block can be determined as the motion information of the sub-blocks obtained by dividing the current block. Here, the calculation result can be a statistical value result of at least one of the median, minimum, maximum, average, weighted average, and mode.
[0384] In methods for predicting motion information on a second-sub-block basis, motion information can be recursively derived in a specific order, unit by unit, within the current block. Here, the specific order can be at least one of a raster scan order, a horizontal scan order, a vertical scan order, a zigzag scan order, and a diagonal scan order. The specific order can be a fixed order predefined in the encoder / decoder, or it can be an order determined by information determined in the encoder and transmitted as a signal in the decoder.
[0385] For example, when the current block is divided into N sub-blocks and the current sub-block corresponds to one of the N sub-blocks, it can be determined whether the block above the current sub-block is available and whether inter-frame prediction has been performed for the block above. Furthermore, it can be determined whether the block to the left of the current sub-block is available and whether inter-frame prediction has been performed for the block to the left. As a result, when the block above or the block to the left is available and inter-frame prediction has been performed for the block above or the block to the left, spatial motion information can be determined from the corresponding block. Temporal motion information can be determined from co-located blocks within a co-located image associated with a block at the location of at least one of the N sub-blocks within the current block. Here, scaling can be performed on the derived spatial motion information or the derived temporal motion information based on at least one encoding parameter of the current block. Furthermore, the motion information of the current sub-block can be determined by using a statistical value of at least one of the derived spatial motion information and the derived temporal motion information. Here, N can be a positive integer, for example, 4.
[0386] Here, spatial motion information can be derived by using motion information based on at least one neighboring sub-block of the current sub-block, and temporal motion information can be derived by using motion information based on at least one neighboring sub-block of the current sub-block.
[0387] Furthermore, the number of sub-blocks within the current block can be determined based on at least one encoding parameter of the current block.
[0388] For example, the number of child blocks can vary depending on the size of the current block. When the current block size is 32×32, the number of child blocks can be 16, and when the current block size is 64×64, the number of child blocks can be 4.
[0389] For example, the number of child blocks can vary depending on the shape of the current block. When the current block is a non-square with a vertical length of 16×32, the number of child blocks can be 8, and when the current block is a square with a vertical length of 32×32, the number of child blocks can be 16.
[0390] Furthermore, child blocks within the current block can be fixed to have a square shape, regardless of the shape of the current block.
[0391] Furthermore, the shape of the sub-blocks within the current block can be determined in the same way as the block shape of the current block.
[0392] For example, when the current block has a vertically elongated non-square shape, the shape of the child block can be determined to be a vertically elongated non-square shape.
[0393] The motion information of sub-block units determined by using at least one of the methods described above for predicting motion information in units of the first sub-block and the second sub-block can be included as merge candidates in the merge candidate list. Here, the merge index can be used to indicate the motion information of the determined sub-block units.
[0394] Furthermore, the motion information of the sub-block units determined by using at least one of the methods described above for predicting motion information in units of the first and second sub-blocks can be included as merge candidates in the merge candidate list in units of sub-blocks. Here, the merge index in the merge candidate list in units of sub-blocks can be used to indicate the motion information of the determined sub-block units.
[0395] Furthermore, additional encoded information can be used to indicate the use of motion information for sub-block units determined by using at least one of the methods described above for predicting motion information in units of the first and second sub-blocks. Here, the encoded information can be transmitted from the encoder to the decoder by signal and can be flag or index information.
[0396] Furthermore, when the size of the current block, including its sub-blocks, is equal to or greater than a preset value, motion information prediction of the sub-block units can be applied. Here, the preset value can be 8×8.
[0397] Furthermore, motion information of sub-block units can be stored in motion information at the sub-block level and later used for inter-frame prediction of blocks to be encoded / decoded.
[0398] In addition, at least one of adaptive sample offset, deblocking filtering, and adaptive loop filtering can be performed based on the motion information of the sub-block units.
[0399] Furthermore, to reduce memory access bandwidth, sub-blocks can have a size unit of M×N. M and N can be positive integers, and M and N can have different values. For example, each of M and N can be 8.
[0400] The size of a sub-block can be determined in units of at least one of sequence, frame, strip, parallel block group, parallel block, and CTU. In other words, the size of a sub-block can be defined in units of at least one of sequence, frame, strip, parallel block group, parallel block, and CTU.
[0401] For example, the size of a sub-block, in units of parallel block groups, can be 4×4 or 8×8.
[0402] For example, the size of a sub-block, measured in pixels, can be 8×8 or 16×16.
[0403] For example, the size of a sub-block, measured in strips, can be 8×8 or 16×16.
[0404] Here, information indicating the size of sub-blocks in units of sequence, frame, strip, parallel block, parallel block group, and CTU can be entropy encoded / entropy decoded.
[0405] Furthermore, to reduce memory access bandwidth, motion information of the same image can be stored in units of M×N. Here, M and N can be positive integers, and M and N can have different values. For example, each of M and N can be 8. The fact that M and N have different values indicates that motion information of the same image can be stored in non-square units. When M and N have fixed values within the image, this indicates that the units of motion information within the image are the same.
[0406] When the current image is divided into sub-image units such as parallel blocks or stripes, the shape of the unit storing motion information of the corresponding sub-image unit can be determined based on the shape of the sub-image unit. For example, if the current sub-image has a non-square shape, the unit storing motion information of the corresponding sub-image unit can also have a non-square shape.
[0407] Furthermore, when the current image is divided into sub-image units such as parallel blocks or stripes, the size of the non-square unit storing motion information of the corresponding sub-image can be determined based on the aspect ratio of its horizontal and vertical lengths. For example, when the aspect ratio of the current sub-image unit's horizontal and vertical lengths is 2:1, the size of the non-square unit storing motion information of the reference image can be determined such that the aspect ratio is 2:1.
[0408] Motion information in a co-located image can be stored not in M×N units, but in units of encoded / decoded blocks. Here, storing motion information in units of encoded / decoded blocks means that the motion information is stored according to the size of the blocks used during image encoding / decoding. In other words, the unit used to store motion information within the image can vary.
[0409] Here, the stored motion information of the co-location image can be used later in another image as a temporal motion vector, a temporal merging candidate, or in at least one of the methods for predicting motion information on a sub-block basis. When the motion information of the co-location image is stored in M×N units, the motion information stored in M×N units can be used as the motion information of the current block by using at least one of the coordinates of the current block, the coordinates of the co-location block, and size information in M×N units.
[0410] The corrected motion information of the sub-block unit can be derived by performing the above-described method of predicting motion information in units of two sub-blocks, and then by performing the motion information correction method, which will be described later, on the motion information of the determined sub-block unit.
[0411] Furthermore, in motion correction mode, the corrected motion information of the sub-block unit can be calculated by performing the above-described method of predicting motion information in units of two sub-blocks, and then by performing bilateral template matching (described later) on the motion information of the determined sub-block unit.
[0412] In the following text, reference will be made to Figures 15 to 21 The motion information correction method is described in detail. Here, motion information correction can refer to the process of correcting at least one piece of motion information. That is, the information to be corrected can be at least one piece of motion information including: motion vector, reference frame index, reference frame, inter-frame prediction indicator, prediction list utilization flag, weighting factor, offset, etc. Motion information correction means correcting the value of at least one of the following: motion vector, reference frame index, reference frame, inter-frame prediction indicator, prediction list utilization flag, weighting factor, and offset.
[0413] The information to be corrected for motion information can be information such as at least one of various encoding parameters. In this case, motion information correction means correcting the value of information such as at least one of the encoding parameters.
[0414] Motion information correction generates corrected motion information. This corrected motion information can be used for motion compensation of the current block to be encoded / decoded (hereinafter also referred to as the encoding / decoding target block). Figure 5 S504 in Figure 6 S605 in Figure 7 S703 in Figure 8 (S804 in the text).
[0415] Regarding the timing of motion information correction, it can be performed before motion compensation. That is, before performing motion compensation on the encoded / decoded target block, motion information correction is performed first to generate corrected motion information, and then the generated corrected motion information is used to perform motion compensation.
[0416] For example, in the AMVP mode, the step of determining the motion vector can be ( Figure 5 S503 and Figure 6 Motion information correction is performed in S604. In this case, motion information correction can be applied to any of the following information types: motion vector candidates included in the motion vector candidate list, predicted motion vectors, and motion vectors calculated by adding the predicted motion vector to the difference between the motion vectors.
[0417] For example, for the merging mode, in the step of determining motion information ( Figure 7 S702 and Figure 8 Motion information correction is performed in S803. In this case, motion information correction can be applied to the motion information of the merge candidates included in the merge candidate list or extracted from the merge candidate list based on the merge candidate index.
[0418] On the other hand, motion information correction can be performed even for skip mode. In this case, motion information correction can be applied to skip candidates included in the skip candidate list or to motion information extracted from the skip candidate list based on the skip index.
[0419] Regarding the timing used to perform motion information correction, it can be found during motion compensation ( Figure 5 S504 in Figure 6 S605 in Figure 7 S703 in Figure 8 Motion information correction is performed during S804. That is, when performing motion compensation on the encoded / decoded target block, motion information correction is performed to generate corrected motion information, and the corrected motion information is used to perform motion compensation.
[0420] For example, the encoder / decoder can be based on the motion vector determination step or the motion information determination step ( Figure 5 S503 in Figure 6 604 in Figure 7 702 and Figure 8 The encoder / decoder uses the motion information determined in S803 to generate a prediction block, and can generate corrected motion information by performing motion information correction using the generated prediction block. Here, the encoder / decoder can use the corrected motion information to generate the final prediction block.
[0421] Motion information can be corrected on both the encoder and decoder sides according to the same rules. Since the motion information is corrected on both the encoder and decoder sides according to the same rules, entropy encoding / decoding of the "information on the use of motion information correction" (hereinafter referred to as motion information correction utilization information) is not required.
[0422] In the following text, refer to Figures 15 to 21 The description will focus on bilateral template matching as an example of motion information correction.
[0423] Bilateral template matching is an embodiment of a method for correcting motion vectors in motion information. At least one of two motion vectors used for bidirectional prediction can be corrected using bilateral template matching. Here, the bilateral template can represent a prediction block computed during bidirectional prediction by performing a weighted summation on prediction blocks generated using the two motion vectors. Bidirectional can represent dual prediction. Furthermore, at least one of the following included in the motion information—reference image index, reference image, inter-frame prediction indicator, prediction list utilization flag, weighting factor, and offset—can be corrected in a form similar to that of the motion vectors using a correction method such as bilateral template matching.
[0424] In detail, when performing bilateral template matching for a bidirectional prediction block, at least one of the first motion vector corresponding to reference image list 0 and the second motion vector corresponding to reference image list 1 can be corrected. Here, the corrected motion vector may have a different motion vector value than the motion vector before correction. Furthermore, a search for the corrected motion vector can be performed within a restricted area of the reference image, which will be described later.
[0425] Figure 15 This is a diagram illustrating bilateral template matching.
[0426] Reference Figure 15 Bilateral template matching may include: 1) generating a bilateral template by using an initial motion vector; and 2) correcting the motion vector by comparing the samples within the bilateral template with the reconstructed samples within the reference image.
[0427] 1) Generate a bilateral template
[0428] The encoder / decoder can generate a bilateral template using prediction blocks generated from a first motion vector corresponding to reference image list 0 and a second motion vector corresponding to reference image list 1. Furthermore, the encoder / decoder can generate a bilateral template using prediction blocks generated from a first motion vector corresponding to reference image list 0 and a second motion vector corresponding to reference image list 1. Here, the bilateral template can be generated by performing a weighted summation on the prediction blocks, and the weighting factor used in the weighted summation can be 0.5:0.5.
[0429] Furthermore, the motion vector used to generate the bilateral template can be referred to as the initial motion vector. The initial motion vector can represent a motion vector derived by means of a method that derives motion information using at least one of the following: merging mode, AMVP mode, and skip mode.
[0430] 2) Motion vector correction
[0431] The encoder / decoder can correct each motion vector corresponding to each list of reference images by comparing the values of samples within the bilateral template with the reconstructed samples within the reference images.
[0432] The motion vector indicating the position with the least distortion relative to the bilateral template within the reference image representing reference image list 0 can be determined as the first corrected motion vector. Furthermore, the motion vector indicating the position with the least distortion relative to the bilateral template within the reference image representing reference image list 1 can be determined as the second corrected motion vector.
[0433] Specifically, the first motion vector can be corrected when the distortion value between the region in the reference image indicated by the initial first motion vector and the bilateral template is greater than the distortion value between the region in the reference image indicated by the corrected first motion vector and the bilateral template. Similarly, the second motion vector can be corrected when the distortion value between the region in the reference image indicated by the initial second motion vector and the bilateral template is greater than the distortion value between the region in the reference image indicated by the corrected second motion vector and the bilateral template.
[0434] Here, when comparing the values between samples within the bilateral template and reconstructed samples within the reference image, the encoder / decoder can determine the corrected motion vector by using methods for calculating distortion between samples (such as SAD (Sum of Absolute Differences), SATD (Sum of Absolute Transform Differences), SSE (Sum of Squared Errors), MSE (Mean of Squared Errors), MR-SAD (Mean of De-SAD), etc.). Distortion can be calculated for at least one of the luminance and chrominance components.
[0435] Furthermore, when comparing the values of samples within the bilateral template with the reconstructed samples in the reference image, distortion can be calculated by performing an XOR operation between the samples within the bilateral template and the reconstructed samples in the reference image.
[0436] For example, after performing an XOR operation on at least one sample point within the bilateral template and at least one reconstructed sample point within the reference image, the distortion can be calculated by summing the results obtained by performing an XOR operation on each sample point.
[0437] Furthermore, when comparing the values of samples within the bilateral template and reconstructed samples within the reference image, distortion can be calculated by reducing the bit depth of each sample by a specific value K. Here, K can have values ranging from 0 to the bit depth of the sample and can be a positive integer including 0.
[0438] For example, when the bit depth of the samples in the bilateral template and the reconstructed samples in the reference image is 10 bits, the bit depth of the samples in the bilateral template and the reconstructed samples in the reference image can be reduced by 4, and the distortion can be calculated by using methods for calculating the distortion between samples (such as SAD, SATD, SSE, MSE, etc.).
[0439] Furthermore, when comparing the values of samples within the bilateral template and reconstructed samples within the reference image, the reconstructed sample positions representing the minimum rate distortion value within the reference image can be used as the corrected motion vector by employing a method for calculating the distortion between samples and a method for calculating the rate of at least one piece of information included in the motion information. Here, the rate can be calculated by performing entropy encoding on at least one of the initial motion vector value and the corrected motion vector value. Additionally, the rate can be calculated by performing entropy encoding on the difference between the initial motion vector value and the corrected motion vector value. Here, entropy encoding can represent at least one of the binarization methods.
[0440] Furthermore, when the SAD value between the regions within the reference image indicated by the initial first motion vector and the initial second motion vector is greater than a predefined value, bilateral template matching can be performed to correct the initial first motion vector and the initial second motion vector. Conversely, when the SAD value between the regions within the reference image indicated by the initial first motion vector and the initial second motion vector is less than a predefined value, bilateral template matching may not be performed.
[0441] Furthermore, in the case of bidirectional prediction, when the value of the initial first motion vector corresponding to the first prediction direction (e.g., the L0 prediction direction) is the same as the value of the corrected first motion vector after applying motion information correction, motion information correction may not be performed for the initial second motion vector corresponding to the second prediction direction (e.g., the L1 prediction direction).
[0442] In addition, bilateral template matching can be performed recursively.
[0443] In detail, after generating a second bilateral template using the modified first motion vector and the modified second motion vector, the modified first motion vector and the modified second motion vector can be re-modified by performing bilateral template matching using the generated second bilateral template. Here, the method of determining the re-modified motion vector through bilateral template matching can be repeated up to M times. Here, M can be a positive integer (e.g., 2), M can be a fixed value predefined in the encoder / decoder, or it can be a variable value encoded from the encoder and transmitted as a signal. Optionally, M can be determined based on the size of the encoded / decoded target block. Furthermore, the modified motion vector can be re-modified within a restricted area of the reference image, which will be described later.
[0444] In one example, M can be set to 2 when the height or width of the target block being encoded / decoded is less than 8.
[0445] In addition, M can be set to 2 when the height and width of the encoded / decoded target block are 8.
[0446] In addition, M can be set to 4 when the width of the encoded / decoded target block is 8 and the height is 16, or vice versa.
[0447] Alternatively, M can be set to 8. Here, four bilateral template matchings can be performed for the first reference image (e.g., the L0 reference image) and four bilateral template matchings can be performed for the second reference image (e.g., the L1 reference image).
[0448] Furthermore, when bilateral template matching is performed recursively on a subpixel basis, it can also be performed recursively on an integer pixel basis.
[0449] The corrected motion vector generated by bilateral template matching can be replaced with the initial motion vector and used for motion compensation of the target block during encoding / decoding. Furthermore, bilateral template matching can be performed in both the encoder and decoder using the same rules.
[0450] When performing bilateral template matching, a search for the corrected motion vector can be performed within a restricted area of the reference image.
[0451] Figures 16 to 21 This is a diagram illustrating the region (hereinafter referred to as the search region) used to search for the corrected motion vector in bilateral template matching. Here, searching for the corrected motion vector in the search region means that the motion vector can be corrected such that it is corrected to have a predetermined value within the search region.
[0452] Furthermore, at least one of the integer pixel range and the sub-pixel range of the search region can be a range pre-set in the encoder and decoder.
[0453] Reference Figures 16 to 21 The search region can be defined as a pixel range from -M to +N in the horizontal / vertical direction, in units of integer pixels (pel). Here, M and N can be positive integers. Alternatively, the search region can be defined as a sub-pixel range from -O to +P in the horizontal / vertical direction, in units of sub-pixels (pel). Here, O and P can be decimal values. In one example, sub-pixel units can represent 1 / 2 pixel, 1 / 4 pixel, 1 / 8 pixel, 1 / 16 pixel, 1 / 32 pixel, etc. Furthermore, O and P can have integer values to represent sub-pixels.
[0454] When performing a search for the corrected motion vector on a sub-pixel basis, neighboring sub-pixels spatially adjacent to the integer pixels indicated by the motion vector on an integer pixel basis can become the motion vector search target. Figures 16 to 21 In the image, the sub-pixel unit shows an example of a 1 / 2 pixel unit.
[0455] Furthermore, within the search area, the horizontal pixel range and the vertical pixel range in integer pixel units can be different.
[0456] For example, to reduce memory access bandwidth, the vertical pixel range of integer pixel units in the search region can be determined to be smaller than the horizontal pixel range. For example, the vertical pixel range of integer pixel units can be determined to be -1 to +1, and the horizontal pixel range of integer pixel units can be determined to be -2 to +2.
[0457] Furthermore, within the search area, the horizontal and vertical subpixel ranges of a subpixel unit can be different from each other.
[0458] For example, to reduce memory access bandwidth, the vertical subpixel range of a subpixel unit in the search region can be determined to be smaller than the horizontal subpixel range. For example, the vertical subpixel range can be determined to be -1 / 4 to +1 / 4, and the horizontal subpixel range can be determined to be -1 / 2 to +1 / 2.
[0459] Furthermore, to reduce memory access bandwidth, the search area for sub-pixel units can be limited. For example, the search area for sub-pixel units can be limited to be included within the search area for integer pixel units. Therefore, the search for the modified motion vector can be performed on at least one sub-pixel unit that belongs to the search area for integer pixel units.
[0460] Figure 17 This is a diagram illustrating an embodiment in which the search area for sub-pixel units is limited to be included in the search area for integer pixel units.
[0461] Reference Figure 17 The subpixels of the shaded lines represent subpixels not included in the search region of integer pixel units, and the search-corrected motion vector can be restricted to the corresponding subpixel units. In other words, the search-corrected motion vector can be restricted to be performed on the subpixel units without shaded lines, and the integer pixels used to generate the subpixels of the shaded lines are not additionally loaded from memory, thus reducing memory access bandwidth.
[0462] In addition, the search area for integer units may include at least one of the center point, top point, bottom point, left point, and right point.
[0463] Here, a search for at least one point can be further performed based on the distortion values of the center point, top point, bottom point, left point, and right point. Here, the at least one point can be at least one of the top-left point, bottom-left point, top-right point, and bottom-right point. Here, a search area in sub-pixel units can be set among at least one of the center point, top point, bottom point, left point, right point, top-left point, bottom-left point, top-right point, and bottom-right point. In one example, a search area in sub-pixel units can be set among the center point, top point, bottom point, left point, and right point.
[0464] Furthermore, the shape of the search area can be a graphical shape that can be represented in two dimensions by pixels indicated by the initial motion vector, such as a square, rectangle, rhombus / diamond, and cross. The search area can have a fixed shape predefined in the encoder / decoder, or the shape of the search area can be specified by information encoded from the encoder and transmitted as a signal.
[0465] Furthermore, the range of motion vector values for at least one of the initial and corrected motion vectors can be limited so that the search area does not exceed the image boundary within a specific range. Limiting the range of motion vector values can be achieved through amplitude limiting.
[0466] Here, the range of motion vector values can be defined as a range predetermined in the encoder and decoder. The predetermined range can represent a threshold used to limit the motion vector values, and the threshold can be implemented by at least one of a minimum value and a maximum value. Furthermore, the range of motion vector values can be a variable range encoded from the encoder and transmitted as a signal.
[0467] Furthermore, the image boundary of at least one of the search regions in integer pixel units and the search regions in sub-pixel units can be restricted so that the image boundary does not exceed a predetermined range.
[0468] Furthermore, after performing motion information correction at the integer pixel level, motion information correction at the sub-pixel level is permitted.
[0469] Furthermore, entropy encoding / decoding can be performed on information regarding whether to perform a search for corrected motion vectors in integer pixel units, based on at least one of the following: video parameter set, sequence parameter set, picture parameter set, adaptive parameter set, parallel block header, CTU, and block. The encoder / decoder can determine whether to perform a search for motion vectors in integer pixel units based on this information.
[0470] Furthermore, entropy encoding / decoding can be performed on information regarding whether to perform a search for corrected motion vectors on a subpixel basis, based on at least one of the following: video parameter set, sequence parameter set, picture parameter set, adaptive parameter set, parallel block header, CTU, and block. The encoder / decoder can determine whether to perform a search for motion vectors on a subpixel basis based on this information.
[0471] Furthermore, entropy encoding / decoding can be performed on the search region information for at least one of the following: video parameter set, sequence parameter set, picture parameter set, adaptive parameter set, parallel block group header, CTU, and block, for at least one of the pixel ranges in integer pixel units and the subpixel ranges in subpixel units. Motion vector correction can be performed identically in both the encoder and decoder using both integer pixel range information and subpixel range information.
[0472] Furthermore, the maximum pixel range for integer pixel units and the maximum sub-pixel range for sub-pixel units of the search region can be predetermined in the encoder and decoder. Here, entropy encoding / entropy decoding can be performed based on at least one of the following: video parameter set, sequence parameter set, picture parameter set, adaptive parameter set, parallel block header, CTU, and block, for the difference between the maximum pixel range and the difference between the maximum sub-pixel range.
[0473] Here, in both the encoder and decoder, motion vector correction can be performed identically using at least one of the information from the maximum pixel range and the difference between the maximum pixel ranges. Furthermore, in both the encoder and decoder, motion vector correction can be performed identically using at least one of the information from the difference between the maximum sub-pixel ranges and the maximum sub-pixel range.
[0474] Furthermore, at least one piece of information, based on whether the search correction of the motion vector is performed in integer pixel units, can be entropy encoded / entropy decoded for the difference between the pixel range in integer pixel units for the search region and the maximum pixel range in integer pixel units for the search region.
[0475] Furthermore, at least one piece of information, based on whether the search correction motion vector is performed on a sub-pixel unit basis, can be entropy encoded / entropy decoded for the difference between the sub-pixel range of the sub-pixel unit for the search region and the maximum sub-pixel range of the sub-pixel unit for the search region.
[0476] Furthermore, the information of sub-pixel units can be entropy encoded / decoded based on whether the search for the corrected motion vector is performed on a sub-pixel basis. Here, sub-pixel units can represent 1 / 2 pixel, 1 / 4 pixel, 1 / 8 pixel, 1 / 16 pixel, 1 / 32 pixel, etc.
[0477] Furthermore, motion vector correction can be performed identically in both the encoder and decoder by using information at the sub-pixel unit level.
[0478] Furthermore, entropy encoding / decoding can be performed on information from multiple sub-pixel units. When information from multiple sub-pixel units is entropy encoded / decoded, motion vector correction can be performed for each sub-pixel unit corresponding to the information from the multiple encoded units.
[0479] To reduce memory access bandwidth, at least one of an integer pixel unit search region and a sub-pixel unit search region can be determined based on the size of the current block. Here, the size of the current block can represent at least one of a horizontal dimension, a vertical dimension, and a surface area. N, M, I, R, J, K, S, and T below can be positive integers including 0.
[0480] As the size of the current block increases, at least one size of the search region in integer pixel units and the search region in sub-pixel units can be increased.
[0481] When the current block has a size of N*M and N*M is equal to or less than I, at least one of the search region in integer pixel units and the search region in sub-pixel units can be determined to be -R to +R.
[0482] For example, when N*M is 32 (4*8 or 8*4) and I is 64, R can be determined to be 1.
[0483] For example, when N*M is 256 (16*16) and I is 512, R can be determined to be 2.
[0484] For example, when N*M is 16384 (128*128) and I is 16384, R can be determined to be 3.
[0485] Similarly, when the current block has a size of N*M and N*M is greater than I, at least one of the search region in integer pixel units and the search region in sub-pixel units can be determined to be -R to +R.
[0486] For example, when N*M is 64 (8*8) and I is 32, R can be determined to be 1.
[0487] For example, when N*M is 256 (16*16) and I is 64, R can be determined to be 2.
[0488] For example, when N*M is 16384 (128*128) and I is 256, R can be determined to be 4.
[0489] When the current block has a size of N*M and N is equal to or less than J, at least one of the search region in integer pixel units and the search region in sub-pixel units can be determined as -S to +S.
[0490] For example, when N is 8 and J is 8, S can be determined to be 1.
[0491] For example, when N is 16 and J is 32, S can be determined to be 2.
[0492] For example, when N is 64 and J is 64, S can be determined to be 3.
[0493] Similarly, when the current block has a size of N*M and N is greater than J, at least one of the search region in integer pixel units and the search region in sub-pixel units can be determined to be -S to +S.
[0494] For example, when N is 16 and J is 8, S can be determined to be 1.
[0495] For example, when N is 32 and J is 16, S can be determined to be 2.
[0496] For example, when N is 128 and J is 32, S can be determined to be 4.
[0497] When the current block has a size of N×M and M is equal to or less than K, at least one of the search region in integer pixel units and the search region in sub-pixel units can be determined to be -T to +T.
[0498] For example, when M is 8 and K is 16, T can be determined to be 1.
[0499] For example, when M is 16 and K is 64, T can be determined to be 2.
[0500] For example, when M is 128 and K is 128, T can be determined to be 3.
[0501] Similarly, when the current block has a size of N×M and M is greater than K, at least one of the search region in integer pixel units and the search region in sub-pixel units can be determined to be -T to +T.
[0502] For example, when M is 8 and K is 4, T can be determined to be 1.
[0503] For example, when M is 32 and K is 8, T can be determined to be 2.
[0504] For example, when M is 128 and K is 64, T can be determined to be 4.
[0505] Furthermore, when the current block has a size of N×M, at least one of the search region in integer pixel units and the search region in sub-pixel units can be determined to be between -N×M / D and +N×M / D. Here, D can be a positive integer equal to or greater than 1, and can be a predefined value.
[0506] For example, when N*M is 32 (8*4) and D is 64, at least one of the search region in integer pixel units and the search region in sub-pixel units can be determined to be -1 / 2 to +1 / 2.
[0507] For example, when N*M is 64 (8*8) and D is 64, at least one of the search region in integer pixel units and the search region in sub-pixel units can be determined to be -1 to +1.
[0508] For example, when N*M is 128 (16*8) and D is 64, at least one of the search region in integer pixel units and the search region in subpixel units can be determined to be -2 to +2.
[0509] When the current block has a size of N×M and N is greater than M, at least one of the search region in integer pixel units and the search region in sub-pixel units can be determined to be -N / D to +N / D.
[0510] For example, when N*M is 8*4 and D is 16, at least one of the search region in integer pixel units and the search region in sub-pixel units can be determined to be -1 / 2 to +1 / 2.
[0511] For example, when N*M is 16*8 and D is 16, at least one of the search region in integer pixel units and the search region in subpixel units can be determined to be -1 to +1.
[0512] When the current block has a size of N×M and M is greater than N, at least one of the search region in integer pixel units and the search region in sub-pixel units can be determined to be -M / D to +M / D.
[0513] For example, when N*M is 8*16 and D is 32, at least one of the search region in integer pixel units and the search region in sub-pixel units can be determined to be -1 / 2 to +1 / 2.
[0514] For example, when N*M is 16*32 and D is 32, at least one of the search region in integer pixel units and the search region in sub-pixel units can be determined to be -1 to +1.
[0515] When the current block has a size of N×M and N and M are the same, at least one of the search area in integer pixel units and the search area in sub-pixel units can be determined to be -M / D to +M / D.
[0516] For example, when N*M is 8*8 and D is 16, at least one of the search region in integer pixel units and the search region in sub-pixel units can be determined to be -1 / 2 to +1 / 2.
[0517] For example, when N*M is 16*16 and D is 16, at least one of the search region in integer pixel units and the search region in subpixel units can be determined to be -1 to +1.
[0518] For example, when N*M is 32*32 and D is 16, at least one of the search region in integer pixel units and the search region in subpixel units can be determined to be -2 to +2.
[0519] When bilateral template matching is used as described above, motion vectors can be improved in the decoder without sending additional syntax elements. Furthermore, bilateral template matching can be applied in bidirectional prediction merging mode or decoder motion vector derivation mode.
[0520] According to the embodiment, bilateral template matching can be performed when the current block does not correspond to any of the one-way prediction merging candidate mode, local illumination compensation mode, affine motion compensation mode, and sub-CU merging mode.
[0521] The following sections will describe motion correction patterns related to motion information correction. Here, a motion correction pattern can refer to a prediction pattern used to derive motion information for inter-frame prediction. For example, a motion correction pattern could be a merging pattern performed based on the motion information correction using bilateral template matching described above.
[0522] Motion correction modes can be used to effectively encode areas in an image that have zero or minimal motion.
[0523] The motion correction mode is a motion information derivation scheme based on the above motion information correction, and the above motion information correction method can be applied to the motion correction mode.
[0524] On the other hand, the availability or applicability of a motion correction mode can be determined based on information transmitted via signals through a bitstream. This information can be transmitted unit by unit, where a unit can be video, sequence, frame, strip, parallel block, coding tree unit (CTU), coding unit (CU), prediction unit (PU), transform unit (TU), or block. Whether a motion correction mode is available indicates whether the motion correction mode is available for the corresponding unit. Whether a motion correction mode is applicable indicates whether the motion correction mode is applicable to the corresponding unit.
[0525] The motion correction mode may include the following steps: (1) deriving motion information, and (2) generating corrected motion information by performing motion information correction on the derived motion information. Here, the motion information correction method may include the bilateral template matching described above. The corrected motion information obtained by performing the motion correction mode may be used for motion compensation of the current block to be encoded / decoded (also known as the encoding / decoding target block).
[0526] In addition, the motion information that can be corrected by the motion correction mode may include at least one of motion vectors, reference frames, inter-frame indicators, reference frame indexes, prediction list utilization flags, weighting factors, and offsets.
[0527] 1) Derivation of motion information
[0528] In motion correction mode, motion information can be derived from at least one of the following information types: spatially adjacent neighboring blocks, temporally adjacent neighboring blocks, predefined motion information, and motion information that appears most frequently in the reference frame. Here, the derived motion information can be recorded as motion correction candidates in a list of motion correction modes (motion correction mode list). Motion information derived from the motion information of spatially adjacent neighboring blocks is called spatial motion correction candidate, and motion information derived from the motion information of temporally adjacent neighboring blocks is called temporal motion correction candidate.
[0529] The method for deriving a motion vector as a piece of motion information will be described in detail below.
[0530] In motion correction mode, motion vectors can be derived from the motion vectors of spatially adjacent neighboring blocks, the motion vectors of temporally adjacent neighboring blocks, predefined motion vectors, and the motion vectors that appear most frequently in the reference frame.
[0531] A. Spatially adjacent neighboring blocks
[0532] In motion correction mode, a motion vector can be derived from the motion vectors of at least one spatially adjacent neighboring block. Here, spatially adjacent neighboring blocks may include... Figure 9 The neighboring blocks shown in the image.
[0533] In motion correction mode, motion vectors can be derived from multiple motion vectors of neighboring blocks that satisfy at least one of the following conditions:
[0534] - Blocks with a coded block flag of 0 (i.e., blocks without residual signals),
[0535] - The block corresponding to the merge skip mode
[0536] - Blocks in spatially adjacent neighboring blocks whose motion vector difference is zero (e.g., MVD = (0,0)).
[0537] - The block corresponding to the merge pattern,
[0538] - Blocks with inter-frame prediction indicators of PRED_LX (where X is an integer including zero) and
[0539] - The inter-frame prediction indicator is any one of PRED_BI, PRED_TRI, and PRED_QUAD for the block.
[0540] In motion correction mode, motion vectors can be derived from multiple motion vectors that skip / merge at least one of the candidates in space.
[0541] For example, when the reference frame of the spatial skip / merge candidate is different from the reference frame of the encoding / decoding target block (i.e., when the frame order count (POC) of the reference frame of the spatial skip / merge candidate is different from the frame order count (POC) of the reference frame of the encoding / decoding target block), the motion vector can be derived based on the POC value of the frame by scaling the motion vector derived from multiple motion vectors of spatially adjacent neighboring blocks.
[0542] B. Temporally adjacent neighboring blocks
[0543] In motion correction mode, motion vectors can be derived from multiple motion vectors of at least one of temporally adjacent neighboring blocks. Here, temporally adjacent neighboring blocks may include co-position blocks within a reference frame and co-position blocks within a co-position frame.
[0544] Here, the corresponding block in the reference image can be at least one of the following blocks:
[0545] -Refer to the corresponding block in the reference frame at the top left position (0,0) of the target block being encoded / decoded (hereinafter referred to as the corresponding reference block).
[0546] -Refer to the corresponding block in the image ( Figure 10 C3 in the middle),
[0547] -Refer to the corresponding block in the image ( Figure 10 C1 in the middle),
[0548] -Refer to the corresponding block in the image ( Figure 10 H in the middle, and
[0549] -Refer to the corresponding block in the image ( Figure 10 (at least one of C4, C5, C6, C0, D0, and D1).
[0550] Here, the corresponding block in the same frame can be at least one of the following blocks:
[0551] - The corresponding block in the same frame at the top left position (0,0) of the encoded / decoded target block.
[0552] -Coordinate blocks in the same frame ( Figure 10 C3 in the middle),
[0553] -Coordinate blocks in the same frame ( Figure 10 C1 in the middle),
[0554] -Coordinate blocks in the same frame ( Figure 10 H in the middle, and
[0555] -Coordinate blocks in the same frame ( Figure 10 (at least one of C4, C5, C6, C0, D0, and D1).
[0556] In motion correction mode, motion vectors can be derived from multiple motion vectors of neighboring blocks that satisfy at least one of the following conditions:
[0557] - Blocks whose coded block flag is 0 (i.e., blocks without residual signals) are placed in blocks within and outside the same block.
[0558] - Blocks corresponding to the merge skip pattern placed within and outside of sibling blocks.
[0559] - A block whose motion vector difference is zero (e.g., MVD = (0,0)) is placed between blocks inside and outside the same block.
[0560] - Blocks corresponding to the merge pattern placed within and outside of sibling blocks.
[0561] - Blocks with an inter-frame prediction indicator of PRED_LX (where X is an integer including zero), and
[0562] - A block whose inter-frame prediction indicator is any one of PRED_BI, PRED_TRI, and PRED_QUAD and is placed in blocks within or outside the same block.
[0563] In motion correction mode, motion vectors can be derived from multiple motion vectors of at least one of the time skip / merge candidates.
[0564] For example, when the reference frame or co-position frame of the time skip / merge candidate is different from the reference frame of the encoding / decoding target block (i.e., when the frame order count (POC) of the time skip / merge candidate and the reference frame of the encoding / decoding target block are different from each other), the motion vector can be derived based on the POC value of the frame by scaling the motion vector derived from multiple motion vectors of temporally adjacent neighboring blocks.
[0565] Additionally, reference screen indices indicating temporally adjacent neighboring blocks and co-located blocks can be derived from the reference screen indices of spatially adjacent neighboring blocks.
[0566] C. Predefined motion vectors
[0567] In motion correction mode, a zero motion vector with a value of (0,0) can be derived as a motion vector.
[0568] D. The motion vector that appears most frequently in the reference frame.
[0569] In motion correction mode, the motion vectors that appear most frequently in the reference frame can be derived.
[0570] In this scenario, the motion vectors are arranged in order of frequency of appearance in the reference frame, and the maximum number of L motion vectors can be derived based on this frequency order. Here, L is a positive integer. In this case, L can be a fixed value preset in the encoder / decoder, or it can be a variable value encoded by the encoder and transmitted as a signal.
[0571] On the other hand, in motion correction mode, motion vectors can be derived in the order of items A, B, C, and D. In this case, the derivation of motion vectors can be repeated until a total of M motion vectors are derived. Furthermore, motion vectors can be derived sequentially in the order described above. When a newly derived motion vector already exists among the previously derived motion vectors, the derivation of motion vectors stops, and thus a maximum of M motion vectors can be derived and used in motion correction mode. Here, M is a positive integer, and it can be a fixed value preset in the encoder / decoder or a variable value encoded by the encoder and transmitted as a signal. Here, when multiple spatially adjacent neighboring blocks exist, bidirectionally predicted motion vectors can be derived first and inserted into the motion correction mode list, and subsequently, unidirectionally predicted motion vectors can be derived and inserted into the motion correction mode list.
[0572] The motion vector derivation under the above motion correction mode can be performed according to the processing described below.
[0573] For example, motion vectors can be derived in the order of spatially adjacent neighboring blocks, temporally adjacent neighboring blocks, and the zero motion vector (0,0). For example, they can be derived according to... Figure 9 B0, A0, B2 and Figure 10 The sequential derivation of motion vectors from C3, C0, and the zero motion vector (0,0).
[0574] As another example, motion vectors can be derived in the order of motion vectors of temporally adjacent neighboring blocks, motion vectors of spatially adjacent neighboring blocks, and zero motion vector (0,0).
[0575] Here, the motion vectors of spatially adjacent neighboring blocks can be derived in the order of deriving spatial skip / merge candidates, and the motion vectors of temporally adjacent neighboring blocks can be derived in the order of deriving temporal skip / merge candidates.
[0576] In motion correction mode, the derived motion vector can only be used if the value of the motion vector derived by the above method is not (0,0).
[0577] For example, when using bidirectional prediction in motion correction mode, the derived motion vector can only be used if the values of the derived first and second motion vectors are not (0,0).
[0578] When using N-direction prediction (N is an integer of 2 or greater) in motion correction mode, the derived motion vectors can only be used if the values of the N derived motion vectors are not (0,0).
[0579] In N-direction prediction (N is an integer of 2 or greater), only some motion vectors with values other than (0,0) can be used for motion vectors in motion correction mode among the derived motion vectors.
[0580] Additionally, when using bidirectional prediction in motion correction mode, if the derived first motion vector and the derived second motion vector are not equal to each other, one or both of the derived first motion vector and the derived second motion vector can be used in motion correction mode.
[0581] On the other hand, when the inter-frame prediction indicator of spatially adjacent neighboring blocks or temporally adjacent neighboring blocks indicates at least one of bidirectional, tridirectional, and quadridirectional prediction, the derived motion vector can be used in motion correction mode. That is, when the inter-frame prediction indicator of spatially adjacent neighboring blocks or temporally adjacent neighboring blocks does not indicate unidirectional prediction, the derived motion vector can be used in motion correction mode.
[0582] When the inter-frame prediction indicator of spatially or temporally adjacent neighboring blocks indicates unidirectional prediction, the inter-frame prediction indicator is changed to indicate bidirectional prediction, and the sign of the motion vector for the unidirectional prediction is reversed. Therefore, a motion vector for a unidirectional prediction with a direction opposite to the previous (original) unidirectional prediction is derived and used as the motion vector in the motion correction mode.
[0583] For example, when the inter-frame prediction indicator for spatially or temporally adjacent neighboring blocks indicates L0 unidirectional prediction and the motion vector of the spatially or temporally adjacent neighboring blocks is (-4, 6), the inter-frame prediction indicator is changed to indicate bidirectional prediction, and the motion vector (4, -6) is derived for L1 directional prediction. Therefore, the two motion vectors (-4, 6) and (4, -6) can be used as motion vectors in the motion correction mode. In this case, a reference frame located at a first distance from the current frame can be determined as the reference frame for L1 unidirectional prediction, wherein the first distance is the same as or proportional to a second distance, which is the distance between the current frame and the reference frame for L0 unidirectional prediction.
[0584] In motion correction mode using N-direction prediction (N being an integer of 2 or greater), when the number of derived motion vectors is not N, one or more motion vectors can be further derived from one or more previously derived motion vectors to obtain a total of N motion vectors. Specifically, multiple motion vectors can be generated by scaling the previously derived motion vector(s) generated based on the frame sequence count of the current frame and / or reference frame.
[0585] For example, when using bidirectional prediction in motion correction mode and only the previously derived first motion vector exists, the first motion vector is scaled based on reference frames in reference frame list 1 to generate a second motion vector. Therefore, the previously derived first motion vector and the newly generated second motion vector can be used as motion vectors in motion correction mode.
[0586] Optionally, when bidirectional prediction is used in motion correction mode and only the previously derived second motion vector exists, the second motion vector is scaled based on reference frames in reference frame list 0 to generate a first motion vector. Therefore, the previously derived second motion vector and the newly generated first motion vector can be used as motion vectors in motion correction mode.
[0587] The following text will describe in detail the method of deriving a reference image that also serves as a piece of motion information.
[0588] In motion correction mode, at least one of the following methods can be used to derive the reference frame.
[0589] For example, a reference frame with reference frame index 0 can be derived from the reference frames included in reference frame list 0 and the reference frames included in reference frame list 1, and used as a reference frame for motion correction mode. Among the reference frames included in reference frame list 0 and reference frame list 1, there may be cases where the reference frame with reference frame index 0 in reference frame list 0 and reference frame list 1 are the same. In this case, among the reference frames included in reference frame list 1, a reference frame different from the reference frame included in reference frame list 0 with reference frame index 0 can be derived as a reference frame for use in motion correction mode. Again, among the reference frames included in reference frame list 0 and reference frame list 1, there may be cases where the reference frame with reference frame index 0 in reference frame list 0 and reference frame list 1 are the same. In this case, among the reference frames included in reference frame list 0, a reference frame different from the reference frame included in reference frame list 1 with reference frame index 0 can be derived as a reference frame for use in motion correction mode.
[0590] To derive the reference frame to be used in motion correction mode as described above, reference frame index 0 can be used. However, the invention is not limited thereto, and a reference frame index with a non-zero value can be used to derive the reference frame to be used in motion correction mode.
[0591] The method for deriving the reference image for the motion correction mode by using a non-zero reference image index can be as follows.
[0592] In one example, the median of the reference image index can be determined from the reference image indices of at least one of the reference image indices belonging to positions A1, B1, B0, A0, B2, B3, and A2 that are spatially adjacent to the encoded / decoded target block. Here, various statistical values (such as minimum, maximum, average, weighted average, mode, etc.) can be used instead of the median. The reference image indicated by the determined reference image index can be used to deduce the reference image for the motion correction mode. Here, the reference image index can be determined for each list of reference images using the method described above.
[0593] Furthermore, when a block exists at location A1 and the corresponding block has an inter-frame prediction mode, the reference image index belonging to location A1 can be determined as the reference image index.
[0594] Furthermore, when a block exists at location B1 and the corresponding block has an inter-frame prediction mode, the reference image index belonging to location B1 can be determined as the reference image index.
[0595] Furthermore, when a block exists at location B0 and the corresponding block has an inter-frame prediction mode, the reference image index belonging to location B0 can be determined as the reference image index.
[0596] Furthermore, when a block exists at location A0 and the corresponding block has an inter-frame prediction mode, the reference image index belonging to location A0 can be determined as the reference image index.
[0597] Furthermore, when a block exists at location B2 and the corresponding block has an inter-frame prediction mode, the reference image index belonging to location B2 can be determined as the reference image index.
[0598] Furthermore, when a block exists at position B3 and the corresponding block has an inter-frame prediction mode, the reference image index belonging to position A0 can be determined as the reference image index.
[0599] Furthermore, when a block exists at position A2 and the corresponding block has an inter-frame prediction mode, the reference image index belonging to position B2 can be determined as the reference image index.
[0600] The motion information correction method can be applied to the reference frame derived by the above method to generate a corrected reference frame, and the corrected reference frame can be used as a reference frame for the motion correction mode.
[0601] In the above embodiment, it is assumed that two reference screen lists will be used. However, the number of reference screen lists is not limited to this. There may be N reference screen lists. In this case, N can be an integer of 2 or greater. When there are N reference screen lists, the derivation of reference screens can be performed in a similar manner to the method described above (i.e., based on the determination of the consistency of reference screens in the N reference screen lists). That is, N distinct reference screens can be derived.
[0602] In another embodiment, among the reference frames included in the reference frame list i (i = 0, ..., or N, where N is an integer of 0 or greater), the reference frame that has the smallest difference in frame order count (POC) with the encoded / decoded target frame can be derived as the reference frame for the motion correction mode.
[0603] Optionally, among the reference frames included in the reference frame list i (i = 0, ..., or N, where N is an integer of 1 or greater), the reference frame with the smallest difference in frame sequence count (POC) with the encoded / decoded target frame and / or with the smallest time layer identifier value can be deduced as the reference frame for motion correction mode.
[0604] Alternatively, the reference image of spatially adjacent neighboring blocks can be derived as the reference image for the motion correction mode.
[0605] Alternatively, reference frames of temporally adjacent neighboring blocks can be derived as reference frames for the motion correction mode.
[0606] Further, alternatively, one or more reference frames selected from the skip / merge candidates can be derived as reference frames for the motion correction mode.
[0607] Further, optionally, motion information correction processing is performed on all or part of the reference frames included in the reference frame list, and then the reference frame that presents the minimum distortion value after the correction processing is derived as the reference frame of the motion correction mode.
[0608] The following section will describe in detail the method for deriving an inter-frame prediction indicator as a piece of motion information.
[0609] In motion correction mode, at least one of the following methods can be used to derive the inter-frame prediction indicator.
[0610] For example, in motion correction mode, the inter-frame prediction indicator can be fixed to one of unidirectional prediction, bidirectional prediction, tridirectional prediction, quadridirectional prediction, and N-directional prediction.
[0611] As another example, the inter-frame prediction indicator for spatially adjacent neighboring blocks can be derived as the inter-frame prediction indicator to be used in motion correction mode.
[0612] As another example, the inter-frame prediction indicator for temporally adjacent neighboring blocks can be derived as the inter-frame prediction indicator to be used in motion correction mode.
[0613] As another example, one or more inter-frame prediction indicators from the skip / merge candidates can be derived as inter-frame prediction indicators that will be used in motion correction mode.
[0614] As another example, an inter-frame prediction indicator can be derived based on the number of available reference frames derived using the method described above. This inter-frame prediction indicator will be used in motion compensation mode. Specifically, when only one available reference frame exists, the inter-frame prediction indicator can be derived using unidirectional prediction. Specifically, when two available reference frames exist, the inter-frame prediction indicator can be derived using bidirectional prediction.
[0615] A modified inter-frame prediction indicator is generated by applying the motion information correction method to the previously derived inter-frame prediction indicator, and the modified inter-frame prediction indicator can be used as the inter-frame prediction indicator in the motion correction mode of the current block.
[0616] 2) Correction of motion information
[0617] The encoder / decoder generates a corrected reference frame by performing motion information correction on the reference frame derived using the method described above, and uses the corrected motion information as motion information in the motion correction mode. Specifically, motion compensation can be performed by generating a prediction block using at least one of the corrected motion vector, the corrected reference frame, and the corrected inter-frame prediction indicator. Similarly, the encoder / decoder generates a corrected reference frame index, a corrected prediction list utilization flag, a corrected weighting factor, and a corrected offset by applying the motion information correction method to at least one of the previously derived reference frame index, a previously derived prediction list utilization flag, a previously derived weighting factor, and a previously derived offset, and creates a prediction block using at least one of the corrected reference frame index, the corrected prediction list utilization flag, the corrected weighting factor, and the corrected offset. Here, the motion information correction method may include the bilateral template matching described above. In this case, a weighted sum of the prediction blocks is calculated based on the frame order count between the encoded / decoded target frame and each reference frame to obtain the final prediction block, and thus motion compensation can be performed.
[0618] On the other hand, when motion information correction processing is applied to previously derived motion vectors, the previously derived motion vectors can be used to determine the initial motion search position. The corrected motion vectors can then be determined based on the initial motion search position.
[0619] The encoder / decoder can perform motion information correction on up to M derived motion information pieces. In this case, M can be a fixed value preset in the encoder / decoder, or it can be a variable value encoded by the encoder and transmitted by a signal. For example, at least one motion information piece among the first, second, ..., and Nth motion information pieces can be corrected. In this case, M is an integer equal to or greater than 4.
[0620] Furthermore, without applying motion information correction to all or part of the previously derived motion information, the previously derived motion information can be used as the motion information for the motion correction mode. Specifically, motion compensation can be performed by generating a prediction block using at least one of the derived motion vectors, derived reference frames, and derived inter-frame prediction indicators.
[0621] In addition, motion information correction can be selectively applied in motion correction mode (in one example, bilateral template matching).
[0622] According to the embodiment, motion information correction can be performed when the current block does not correspond to any of the unidirectional prediction merging candidate mode, local illumination compensation mode, affine motion compensation mode, and sub-CU merging mode.
[0623] In addition, motion information correction can be performed when the current block corresponds to the bidirectional prediction merging mode.
[0624] Furthermore, the difference between the POC of the first reference image associated with the first prediction direction (e.g., the L0 prediction direction) and the POC of the encoded / decoded target image (POC) ref0 –POC curr The difference between the POC of the second reference image associated with the second prediction direction (e.g., the L1 prediction direction) and the POC of the encoded / decoded target image (POC) ref1 –POC curr When any one of the values in () has a negative value, motion information correction can be performed.
[0625] Furthermore, the difference between the POC of the first reference image associated with the first prediction direction (e.g., the L0 prediction direction) and the POC of the encoded / decoded target image (POC) ref0 –POC curr The difference between the POC of the second reference image associated with the second prediction direction (e.g., the L1 prediction direction) and the POC of the encoded / decoded target image (POC) ref1 –POC curr If they are the same, motion information can be corrected.
[0626] In addition, it can be determined whether to perform motion information correction based on the current block size (width, height, or surface area).
[0627] In one example, motion information correction can be performed when the width, height, or surface area of the current block is equal to or greater than N. Here, N can be 8.
[0628] In one example, motion information correction can be performed when the surface area of the current block is equal to or greater than M. Here, M can be 64.
[0629] Furthermore, motion information correction can be performed when the first prediction direction and the second prediction direction are different from each other.
[0630] The encoder / decoder can perform bilateral template matching on at least one derived motion information obtained through the above method, generate a prediction block using the motion information with the least distortion, and perform motion compensation. In this case, the at least one motion information may include at least one of L0 motion information and L1 motion information.
[0631] The encoder / decoder can perform bilateral template matching on one or more candidates that exist in the skip candidate list or merge candidate list, generate a prediction block using the candidate with the least distortion, and perform motion compensation.
[0632] The encoder / decoder can perform bilateral template matching on at least one derived motion information obtained through the above method, generate M prediction blocks using M motion information pieces, each with minimum distortion, calculate the weighted sum of the M prediction blocks, and use the weighted sum as the final prediction block for encoding / decoding the target block. Here, M can be a positive integer and can be equal to or greater than 2.
[0633] The encoder / decoder can perform bilateral template matching on one or more candidates included in the skip candidate list or merge candidate list, generate M prediction blocks using the M candidates that all have the minimum distortion, calculate the weighted sum of the M prediction blocks, and use the weighted sum as the final prediction block for encoding / decoding the target block. Here, M can be a positive integer and can be equal to or greater than 2.
[0634] The encoder / decoder can perform entropy encoding / decoding on the skip index or merge index of a unidirectional prediction candidate that exists in a skip candidate list or merge candidate list, and can perform motion compensation by generating a prediction block using at least one candidate with the minimum distortion from M or more bidirectional prediction candidates. In this case, an entropy encoding / decoding is performed on a flag or an index to indicate M or more bidirectional prediction candidates. That is, a skip index or merge index is assigned to each unidirectional prediction candidate, while a single skip index or a single merge index is shared among the M or more bidirectional prediction candidates. For M or more bidirectional prediction candidates, since at least one candidate representing the minimum distortion can be determined using bilateral template matching, it is not necessary to assign a skip index or a merge index to each bidirectional prediction candidate.
[0635] Whether to use a motion correction mode can be determined based on the motion correction mode utilization information. Here, at least one of the flag information and index information can be used to entropy encode / decode the motion correction mode utilization information.
[0636] The motion correction mode utilization information can be encoded / decoded based on the value of the skip flag. The encoding / decoding timing of the motion correction mode utilization information can be determined based on the encoding / decoding timing of the skip flag. For example, when the skip flag is 1 (i.e., when skip mode is used), the motion correction mode utilization information can be entropy encoded / decoded. In this case, the motion correction mode utilization information can be entropy encoded / decoded after the skip flag is entropy encoded / decoded.
[0637] Conversely, the skip flag can be encoded / decoded based on the value of the motion correction mode utilization information. For example, when the motion correction mode utilization information is 1 (i.e., when the motion correction mode is used), the skip flag can be entropy-decoded / entropy-decoded. In this case, the motion correction mode utilization information can be entropy-coded / entropy-decoded before the skip flag is entropy-coded / entropy-decoded.
[0638] Encoding / decoding of motion correction mode utilization information can be performed based on the value of the merge flag. The encoding / decoding timing of the motion correction mode utilization information can be determined based on the encoding / decoding timing of the merge flag. For example, when the merge flag is 1 (i.e., when the merge mode is used), entropy encoding / decoding of the motion correction mode utilization information can be performed. In this case, entropy encoding / decoding of the motion correction mode utilization information can be performed after entropy encoding / decoding of the merge flag.
[0639] Conversely, encoding / decoding of the merge flag can be performed based on the value of the motion correction mode utilization information. For example, when the motion correction mode utilization information is 1 (i.e., when the motion correction mode is used), entropy encoding / decoding of the merge flag can be performed. In this case, entropy encoding / decoding of the motion correction mode utilization information can be performed before entropy encoding / decoding of the merge flag.
[0640] The motion correction mode can be encoded / decoded using information based on a specific motion compensation mode. For example, when an affine motion compensation mode is not used, the motion correction mode can be entropy encoded / decoded using information.
[0641] The motion vector derivation mode flag of the decoder can be encoded / decoded based on the value of the motion correction mode utilization information. That is, when the motion correction mode utilization information is 0 (i.e., when the motion correction mode is not used), the motion vector derivation mode flag on the decoder side can be entropy encoded / entropy decoded.
[0642] The motion correction mode utilization information can be entropy encoded / decoded based on at least one of the video parameter set, sequence parameter set, picture parameter set, adaptive parameter set, and parallel block group header, which is entropy encoded / decoded to perform entropy encoding / decoding of the motion correction mode utilization information.
[0643] For example, when the motion correction mode at a higher level uses information to indicate a first value, the motion correction mode can be entropy encoded / entropy decoded using that information. Furthermore, motion correction modes can be used within the corresponding level.
[0644] For example, when the motion correction mode at a higher level uses information to indicate a second value, entropy encoding / decoding of the motion correction mode's information is not required. Furthermore, motion correction modes may not be used within the corresponding level.
[0645] Furthermore, when motion correction mode utilization information is not transmitted via signal, it can be derived based on motion correction mode utilization information of one or more neighboring blocks of the encoded / decoded target block. One or more neighboring blocks of the encoded / decoded target block may include one or more spatially adjacent blocks and / or temporally adjacent blocks. One or more spatially adjacent blocks may include blocks located to the left of the encoded / decoded target block and / or blocks located above the encoded / decoded target block.
[0646] When at least one of the blocks spatially adjacent to the target block being encoded / decoded uses a skip mode, the motion correction mode can be entropy encoded / decoded using information.
[0647] When at least one of the blocks spatially adjacent to the target block being encoded / decoded uses a merge mode, the motion correction mode can be entropy encoded / decoded using information.
[0648] When at least one of the blocks spatially adjacent to the target block being encoded / decoded uses an inter-frame mode, the motion correction mode can be entropy encoded / decoded using information.
[0649] Bypass mode can be used to entropy encode / decode information from motion correction modes.
[0650] When using motion correction mode and skip mode together, entropy encoding / decoding of the residual signal is not required.
[0651] When used together with motion correction mode and merge mode, the residual signal can be entropy encoded / entropy decoded.
[0652] In motion correction mode, only a portion of the residual signal can be entropy encoded / decoded for use. In this case, this portion of the residual signal can be a DC quantization level (DC transform coefficient).
[0653] When using motion correction mode, entropy encoding / decoding of information other than that used by the motion correction mode is not required. Here, the information other than that used by the motion correction mode can be at least one piece of information about motion compensation.
[0654] The motion correction modes related to motion information correction have been described above. The following section will describe the motion correction candidates derived from these motion correction modes.
[0655] Motion correction candidates can be motion information including at least one of the following: derived motion vectors derived through motion correction modes, derived reference frames, and derived inter-frame prediction indicators. The encoder / decoder can add motion correction candidates as skip candidates to the skip candidate list or as merge candidates to the merge candidate list in skip or merge modes.
[0656] An example of adding motion correction candidates to the skip / merge candidate list will be described below.
[0657] If a candidate for skipping / merging that is identical to a motion correction candidate already exists in the skip / merge candidate list, the motion correction candidate may not be added to the skip / merge candidate list.
[0658] Motion correction candidates can be derived earlier than space skip / merge candidates, and motion correction candidates can be added to the skip / merge candidate list.
[0659] Motion correction candidates can be derived earlier than spatial skip / merge candidates derived from a specific location, and these motion correction candidates can then be added to the skip / merge candidate list. Here, the specific location can be... Figure 10 At least one of the positions A1, B1, B0, A0, B2, B3 and A2 in the diagram.
[0660] Furthermore, a motion correction candidate can be derived earlier than at least one of the time skip / merge candidates, combined merge candidates, and merge candidates with predetermined motion information values, and the motion correction candidate can be added to the skip / merge candidate list.
[0661] The encoder / decoder can identify motion information, including at least one of the following: a corrected motion vector obtained through motion information correction via motion correction mode, a corrected reference frame, and a corrected inter-frame prediction indicator, as motion correction candidates. The encoder / decoder can add motion correction candidates as skip candidates to the skip candidate list in skip mode or as merge candidates to the merge candidate list in merge mode.
[0662] Motion correction mode can be used instead of skip mode. In other words, the image can be encoded / decoded using motion correction mode instead of skip mode. Motion correction mode can also be used instead of merge mode. In other words, the image can be encoded / decoded using motion correction mode instead of merge mode.
[0663] At least one of the overlapping block motion compensation mode, local illuminance compensation mode, and bidirectional optical flow mode can be applied to the final prediction block generated using the motion correction mode.
[0664] Furthermore, in motion correction mode, the motion information correction method can be applied to only one piece of motion information or a part of motion information, without generating a list of motion information candidates.
[0665] The conditions for performing motion information correction in Motion Correction Mode (MRM) will be described below.
[0666] Whether to perform motion information correction can be determined based on the frame sequence count (POC) of the reference frame of the motion vector.
[0667] For example, a motion information correction method can be performed when the following two motion vectors exist: a first motion vector indicating a reference frame whose frame sequence count is smaller than the frame sequence count of the encoded / decoded target frame; and a second motion vector indicating a reference frame whose frame sequence count is larger than the frame sequence count of the encoded / decoded target frame.
[0668] Optionally, when there are two motion vectors of a reference frame whose frame sequence count is smaller than the frame sequence count of the target frame being encoded / decoded, a motion information correction method may be performed.
[0669] Further optionally, when there are two motion vectors of a reference frame whose frame sequence count is greater than the frame sequence count of the encoded / decoded target frame, a motion information correction method may be performed.
[0670] Motion information correction can be performed on the encoded / decoded target block when at least one of the affine motion compensation mode, decoder motion vector derivation mode, and local illumination compensation mode is not used.
[0671] Motion information correction can be performed when the difference between the frame sequence count of the encoded / decoded target frame and the frame sequence count of the first reference frame, or the difference between the frame sequence count of the encoded / decoded target frame and the frame sequence count of the second reference frame, is less than N (N is an integer greater than or equal to 0). In this case, the first reference frame may refer to the reference frame indicated by the first motion vector, and the second reference frame may refer to the reference frame indicated by the second motion vector.
[0672] Motion information correction can be performed based on a first motion vector and a second motion vector, which serve as the target for motion information correction.
[0673] For example, motion information correction may not be performed when the first motion vector and the second motion vector are the same, and when the reference frame indicated by the first motion vector and the reference frame indicated by the second motion vector are the same. In other words, motion information correction may be performed only when the first motion information and the second motion information are different from each other and / or when the reference frames indicated by the first motion information and the second motion information are different from each other. Furthermore, motion information correction may not be performed when the first motion vector and the second motion vector are the same. In other words, motion information correction may be performed only when the first motion vector and the second motion vector are different from each other.
[0674] Optionally, motion information correction can be performed only when the reference frame indicated by the first motion vector is the same as the reference frame indicated by the second motion vector. Conversely, motion information correction can be performed only when the reference frame indicated by the first motion vector is different from the reference frame indicated by the second motion vector.
[0675] As another example, motion information correction can be performed on motion vectors whose values are not (0,0). Here, motion information correction can be performed when the inter-frame prediction indicator indicates bidirectional and when the values of both the first and second motion vectors are not (0,0). Furthermore, motion information correction can be omitted when the inter-frame prediction indicator indicates N directions (N is an integer equal to or greater than 2) and when the values of all or a predetermined number of N motion vectors are not (0,0).
[0676] Motion information correction can only be performed when the inter-frame prediction indicator indicates a specific number of directions. For example, motion information correction can only be performed when the inter-frame prediction indicator for skip / merge candidates indicates two-way.
[0677] Motion information correction may be performed only when the reference frame index of the reference frame indicated by the first motion vector is 0 and the reference frame index of the reference frame indicated by the second motion vector is 0. Optionally, motion information correction may be performed only when the reference frame index of the reference frame indicated by each motion vector has a specific value.
[0678] Motion information correction can be performed for at least one of spatial skip / merge candidates, temporal skip / merge candidates, combined skip / merge candidates, and skip / merge candidates with predetermined motion information values.
[0679] Motion information correction can be performed on a sub-block basis, where the target block for encoding / decoding is divided into sub-blocks.
[0680] Furthermore, when the encoded / decoded target block has motion information or motion vectors at the sub-block level, motion information correction can be performed on a sub-block basis to improve encoding efficiency. Here, the sub-blocks of the encoded / decoded target block may have different motion information or motion vectors from each other, or they may have the same motion information or motion vectors. When the sub-blocks of the encoded / decoded target block have different motion information or motion vectors from each other, motion information correction can be performed.
[0681] Furthermore, when the encoded / decoded target block has motion information or motion vectors at the sub-block level, motion information correction may not be performed on the sub-block level motion information or motion vectors to reduce computational complexity. Optionally, to reduce computational complexity, motion information correction may be performed when all sub-blocks of the encoded / decoded target block have the same motion information or motion vectors.
[0682] When the method of correcting motion information is performed on a sub-block basis as described above, the initial motion information of each sub-block can be determined as the motion information of the encoding / decoding target block to which the sub-block belongs.
[0683] Furthermore, when performing the motion information correction method on a sub-block basis, the initial motion information of each sub-block can be determined by adding a predetermined offset value to the motion information of the encoded / decoded target block to which the sub-block belongs. The motion information correction method is then performed on sub-block units, and the initial motion information of each sub-block can be corrected using the corrected motion information of each sub-block.
[0684] Furthermore, when the motion information correction method is performed on a sub-block basis, in order to reduce memory access bandwidth, the sub-block can have cells of size M×N. M and N can be positive integers, and M and N can have different values from each other. For example, each of M and N can be 8.
[0685] Furthermore, when performing motion information correction on a sub-block basis, the size of the sub-block can be determined based on the size of the current block. For example, if the size of the current block is greater than P×P, the size of the sub-block can be determined to be P×P. Here, P can be a positive integer and can be 16.
[0686] Furthermore, when the motion information correction method is performed on a sub-block basis, the number of sub-blocks can be determined based on at least one encoding parameter of the current block.
[0687] For example, the number of child blocks can vary depending on the size of the current block. When the current block has a size of 32×32, the number of child blocks can be 16, and when the current block has a size of 64×64, the number of child blocks can be 4.
[0688] For example, the number of child blocks can vary depending on the shape of the current block. When the current block is a non-square with a vertical length of 16×32, the number of child blocks can be 8, and when the current block is a square with a vertical length of 32×32, the number of child blocks can be 16.
[0689] Furthermore, when the motion information correction method is performed on a sub-block basis, the shape of the sub-block can be fixed as a square, regardless of the shape of the current block.
[0690] Furthermore, when the motion information correction method is performed on a sub-block basis, the shape of the sub-block can be determined to be the same as the shape of the current block.
[0691] For example, when the current block is a vertically elongated non-square, the shape of the child block can be determined to be a vertically elongated non-square.
[0692] Furthermore, when performing motion information correction methods on a sub-block basis, the information indicating whether to perform the method on a sub-block basis can be determined based on information transmitted via signals through the bitstream. Here, the information indicating whether to perform the method on a sub-block basis can be transmitted via signals at least one of the following: video, sequence, frame, strip, parallel block group, parallel block, coding tree unit, coding unit, prediction unit, transform unit, and block. The information indicating whether to perform the method on a sub-block basis indicates whether to perform the motion information correction method on a sub-block basis for the corresponding unit.
[0693] Furthermore, a motion information correction method can be performed on a sub-block basis for the motion information of the sub-block unit determined by using at least one of the sub-block-based motion information prediction methods.
[0694] In addition, motion information correction methods can be performed on a unit of at least one of the sample points and blocks.
[0695] When the target block being encoded / decoded is an N-directional prediction such as three-directional or four-directional prediction, motion information correction can be performed by using N motion vectors to calculate templates, such as three motion vectors or four motion vectors. Here, N can be a positive integer equal to or greater than 3.
[0696] At least one of the motion information corrected by the motion information correction method can be used for motion compensation. Here, the corrected motion information may include the corrected motion vector.
[0697] At least one of the motion information corrected by the motion information correction method can be used as a motion vector for storing a time motion vector. Here, the corrected motion information may include the corrected motion vector. Here, when the corrected motion information is stored as a motion vector for a time motion vector, the corrected motion vector stored in the current frame of a frame / strip / parallel block / parallel block group other than the current frame / strip / parallel block / parallel block group can be used as a time motion vector.
[0698] Furthermore, the motion information correction method can be operated in the encoder / decoder with specific rules in a first motion information correction mode that can be executed, without having to send additional motion information correction information via signal.
[0699] Furthermore, a motion information correction method can be executed in the encoder, and then the motion information correction method can be operated in a second motion information correction mode. This second motion information correction mode can entropy encode / entropy decode at least one of the following: information related to the motion information correction method (information on whether motion information correction is used, initial motion indication information that is the target of motion information correction, information on the search direction, and information on the search distance), and send this information to the decoder. Here, the decoder can calculate the corrected motion information using the information related to the motion information correction method, without using additional motion information correction.
[0700] When bilateral template matching is used for motion information correction, new motion information can be generated by scaling the already derived motion information.
[0701] In one example, when a single first motion information or a single first motion vector exists in spatially adjacent neighboring blocks or temporally adjacent neighboring blocks, second motion information or a second motion vector can be generated by scaling based on the corresponding first motion information or first motion vector, and thus motion information correction can be performed.
[0702] Similarly, when a single second motion information or a single second motion vector exists in spatially adjacent neighboring blocks or temporally adjacent neighboring blocks, the first motion information or the first motion vector can be generated by scaling based on the corresponding second motion information or the second motion vector, and thus motion information correction can be performed.
[0703] In another example, when the reference image indicated by the initial motion vector and the reference image indicated by the corrected motion vector candidate are different, the corrected motion vector candidate can be computed by scaling the initial motion vector based on the POC value of each reference image. Here, the corrected motion vector candidate may represent the motion vector indicating the region used to search for the corrected motion vector, and bilateral template matching can be performed by comparing the distortion value in the location indicated by the initial motion vector with another corrected motion vector candidate.
[0704] Furthermore, the corrected motion vector can be calculated by using motion information from at least one of the single luminance component motion vector and two chrominance component motion vectors.
[0705] Furthermore, after performing motion information correction on all or part of the reference images in the reference image list, the reference image with the least distortion can be derived as the corrected reference image.
[0706] When performing motion information correction in motion vector derivation mode (decoder-side motion vector derivation mode), the conditions for performing the above motion information correction can be applied to the decoder.
[0707] In addition, it can be based on Figures 16 to 21 The search area is used to perform motion information correction.
[0708] In detail, it can be found Figures 16 to 21 Within the search area, the initial motion vector derived from the merged candidate list or the motion vector candidate list is modified.
[0709] In one example, the initial motion vector can be corrected within the search area based on at least one of the search direction information and the search distance information. Here, the search direction information and the search distance information can be information sent from the encoder to the decoder, and can be sent in the form of flags or indexes.
[0710] In one example, the motion vector to be corrected can be derived using at least one of the search direction and search distance information, and the corrected motion vector can be derived by adding the derived motion vector to the initial motion vector. Here, the motion vector to be corrected can be added to the initial motion vector by scaling the motion vector to be corrected based on the POC difference between the current frame and the reference frame.
[0711] Figure 22 This is a flowchart illustrating an image decoding method according to an embodiment of the present invention.
[0712] Reference Figure 22In S2201, the decoder can deduce the initial motion information of the current block from at least one of the motion information of spatially neighboring blocks, the motion information of temporally neighboring blocks, and predefined motion information.
[0713] Subsequently, in S2202, the decoder can generate corrected motion information by performing motion information correction on the initial motion information.
[0714] The step of generating the corrected motion information (S2202) described above may include: generating a bilateral template based on the initial motion information; calculating a distortion value by comparing the bilateral template with a search area in a reference image indicated by the initial motion information; and generating the corrected motion information by correcting the initial motion information based on the distortion value.
[0715] Furthermore, in the step (S2202) of generating the corrected motion information described above, the corrected motion information can be generated on a per-sub-block basis for the current block.
[0716] Here, the search area can be a square-shaped area, wherein the area is defined by a pixel range of predefined integer pixel units in the horizontal and vertical directions, starting from the pixel indicated by the initial motion information.
[0717] Furthermore, when the current block has a bidirectional prediction merging mode, the above-described step of generating corrected motion information (S2202) can be performed.
[0718] Furthermore, it can be determined whether to perform the step of generating the corrected motion information as described above (S2202) based on the size of the current block.
[0719] Furthermore, the step of generating the corrected motion information described above can be performed based on the motion correction mode information (S2202).
[0720] Furthermore, the distortion value used in S2202 can be calculated based on at least one of the sum of absolute differences (SAD), sum of absolute transformation differences (SATD), sum of squared errors (SSE), mean of squared errors (MSE), and mean of de-SAD (MR-SAD).
[0721] Furthermore, in the step (S2202) above that generates the corrected motion information, the initial motion information can be corrected within the search area.
[0722] Here, the search area can be cross-shaped.
[0723] Furthermore, the step of generating the corrected motion information described above (S2202) can be performed when the current block has a merging mode.
[0724] Furthermore, in the step (S2202) of generating the corrected motion information described above, the initial motion vector can be corrected within the search area based on at least one of the information of the search direction and the information of the search distance.
[0725] Figure 23 This is a flowchart illustrating an image decoding method according to an embodiment of the present invention.
[0726] Reference Figure 23 In S2301, the decoder can determine the co-image of the current block.
[0727] Specifically, in the step of determining the corresponding image of the current block (S2301), the corresponding image can be determined based on information indicating the corresponding image. Here, the information indicating the corresponding image can be information transmitted by signal in units of at least one of sequence, screen, and parallel block group.
[0728] Subsequently, in S2302, the decoder can determine the co-occurring block in the co-occurring image by using motion information of at least one block that is spatially adjacent to the block.
[0729] Subsequently, in S2303, the decoder can deduce merge candidates in units of sub-blocks from the sub-blocks obtained by dividing the co-occurring blocks.
[0730] Here, when the size of the current block is equal to or greater than a preset value, merge candidates can be derived on a sub-block basis. Here, the preset value can be 8×8.
[0731] Furthermore, the sub-blocks may have a square shape, wherein the square shape has a preset size. Here, the preset size may be 8×8.
[0732] Subsequently, in S2304, the decoder can generate a list of merge candidates by using merge candidates in units of sub-blocks.
[0733] An image decoding method according to the present invention has been described. Each step of the image decoding method described above can be performed identically in the image encoding method. Furthermore, a bitstream can be generated using the image encoding method.
[0734] The above embodiments can be performed in the same way in both the encoder and decoder.
[0735] At least one or a combination of the above embodiments can be used to encode / decode images.
[0736] The order in which the above embodiments are applied may differ between the encoder and the decoder, or the order in which the above embodiments are applied may be the same in the encoder and the decoder.
[0737] The above embodiments can be performed on each luminance signal and chrominance signal, or the above embodiments can be performed on both luminance and chrominance signals in the same way.
[0738] The block shape of the above embodiments of the present invention can be square or non-square.
[0739] The above embodiments of the present invention can be applied based on the size of at least one of the coding block, prediction block, transform block, block, current block, coding unit, prediction unit, transform unit, unit, and current unit. Here, size can be defined as the minimum size or maximum size, or both, for which the above embodiments are applied, or it can be defined as a fixed size to which the above embodiments are applied. Furthermore, in the above embodiments, a first embodiment can be applied to a first size, and a second embodiment can be applied to a second size. In other words, the above embodiments can be applied in combination based on sizes. Furthermore, the above embodiments can be applied when the size is equal to or greater than the minimum size and equal to or less than the maximum size. In other words, the above embodiments can be applied when the block size is included within a specific range.
[0740] For example, the above embodiments can be applied when the size of the current block is 8×8 or larger. For example, the above embodiments can be applied when the size of the current block is 4×4 or larger. For example, the above embodiments can be applied when the size of the current block is 16×16 or larger. For example, the above embodiments can be applied when the size of the current block is equal to or greater than 16×16 and equal to or less than 64×64.
[0741] The above embodiments of the present invention can be applied according to time layers. To identify the time layer to which the above embodiments can be applied, an identifier specifying the designated time layer can be signaled, and the above embodiments can be applied to the designated time layer identified by the corresponding identifier. Here, the identifier can be defined as the lowest or highest layer to which the above embodiments can be applied, or both, or it can be defined as indicating a specific layer to which the embodiment is applied. Furthermore, a fixed time layer to which the embodiments are applied can be defined.
[0742] For example, the above embodiments can be applied when the time layer of the current image is the lowest layer. For example, the above embodiments can be applied when the time layer identifier of the current image is 1. For example, the above embodiments can be applied when the time layer of the current image is the highest layer.
[0743] The strip types to which the above embodiments of the present invention are applied can be defined, and the above embodiments can be applied according to the corresponding strip types.
[0744] According to the present invention described above, when calculating the boundary strength in the deblocking filter, the motion information before correction can be used.
[0745] According to the invention mentioned above, the motion vector may have at least one of the following: 16-pixel (16-pel) units, 8-pixel (8-pel) units, 4-pixel (4-pel) units, integer-pixel (integer-pel) units, 1 / 2-pixel (1 / 2-pel) units, 1 / 4-pixel (1 / 4-pel) units, 1 / 8-pixel (1 / 8-pel) units, 1 / 16-pixel (1 / 16-pel) units, 1 / 32-pixel (1 / 32-pel) units, and 1 / 64-pixel (1 / 64-pel) units.
[0746] The embodiments of the present invention can be applied to inter-frame prediction and motion compensation methods using motion vector prediction, as well as to inter-frame prediction and motion compensation methods using skip mode, merge mode, etc.
[0747] Embodiments of the present invention can be applied to use block vectors to employ the reconstructed region within the current image as an intra-block copying mode for the prediction block.
[0748] In the above embodiments, the method is described based on a flowchart having a series of steps or units. However, the present invention is not limited to the order of these steps, but some steps may be performed simultaneously with other steps or in a different order. Furthermore, those skilled in the art should understand that the steps in the flowchart are not mutually exclusive, and other steps may be added to the flowchart or some steps may be deleted from the flowchart without affecting the scope of the present invention.
[0749] The embodiments include various aspects of the examples. Not all possible combinations of the aspects may be described, but those skilled in the art will recognize different combinations. Therefore, the invention may include all substitutions, modifications, and alterations within the scope of the claims.
[0750] Embodiments of the present invention can be implemented in the form of program instructions, which can be executed by various computer components and recorded in a computer-readable recording medium. The computer-readable recording medium may individually include program instructions, data files, data structures, etc., or may include a combination of program instructions, data files, data structures, etc. The program instructions recorded in the computer-readable recording medium may be specifically designed and constructed for the present invention or are well known to those skilled in the art of computer software. Examples of computer-readable recording media include magnetic recording media (such as hard disks, floppy disks, and magnetic tapes), optical data storage media (such as CD-ROMs or DVD-ROMs), magneto-optical media (such as floppy disks), and hardware devices specifically configured to store and implement program instructions (such as read-only memory (ROM), random access memory (RAM), flash memory, etc.). Examples of program instructions include not only machine language code formatted by a compiler but also high-level language code that can be implemented by a computer using an interpreter. The hardware device may be configured to be operated by one or more software modules or vice versa to implement the processing according to the present invention.
[0751] Although the invention has been described with respect to specific items (such as detailed elements) and limited embodiments and drawings, these are provided only to aid in a more complete understanding of the invention, and the invention is not limited to the embodiments described above. Those skilled in the art will understand that various modifications and changes can be made to the above description.
[0752] Therefore, the spirit of the present invention should not be limited to the above embodiments, and the entire scope of the appended claims and their equivalents shall fall within the scope and spirit of the present invention.
[0753] Industrial applicability
[0754] This invention can be used when encoding / decoding images.
Claims
1. An image decoding method performed by a decoding device, the image decoding method comprising the following steps: Derive the motion information of the current block; The sub-blocks of the current block are derived by partitioning the current block; Based on the motion information of the current block, the corrected motion information of each sub-block is derived; as well as The predicted block for the current block is derived based on the corrected motion information of each sub-block. The corrected motion information for each sub-block of the current block includes the corrected L0 motion vector and the corrected L1 motion vector for each sub-block. Specifically, the process of searching for the corrected L0 motion vector within an integer pixel unit search area in the L0 reference frame is performed. Specifically, the process of searching for the corrected L0 motion vector of the sub-pixel unit is performed within the search area of the sub-pixel unit in the L0 reference frame, which is derived from the integer pixels represented by the corrected L0 motion vector of the searched integer pixel unit. Specifically, it is determined whether the integer pixel represented by the corrected L0 motion vector of the searched integer pixel unit is located at the boundary of the search region of the integer pixel unit, and Wherein, the integer pixel, represented by the corrected L0 motion vector of the searched integer pixel unit, is located at the boundary of the search region of the integer pixel unit, and the search region of the sub-pixel unit is restricted to be included in the search region of the integer pixel unit.
2. An image encoding method performed by an encoding device, the image encoding method comprising the following steps: Derive the motion information of the current block; The sub-blocks of the current block are derived by partitioning the current block; Based on the motion information of the current block, the corrected motion information of each sub-block is derived; The predicted block of the current block is derived based on the corrected motion information of each sub-block; as well as Image information related to the prediction of the motion information of the current block is encoded. The corrected motion information for each sub-block of the current block includes the corrected L0 motion vector and the corrected L1 motion vector for each sub-block. Specifically, the process of searching for the corrected L0 motion vector within an integer pixel unit search area in the L0 reference frame is performed. Specifically, the process of searching for the corrected L0 motion vector of the sub-pixel unit is performed within the search area of the sub-pixel unit in the L0 reference frame, which is derived from the integer pixels represented by the corrected L0 motion vector of the searched integer pixel unit. Specifically, it is determined whether the integer pixel represented by the corrected L0 motion vector of the searched integer pixel unit is located at the boundary of the search region of the integer pixel unit, and Wherein, the integer pixel, represented by the corrected L0 motion vector of the searched integer pixel unit, is located at the boundary of the search region of the integer pixel unit, and the search region of the sub-pixel unit is restricted to be included in the search region of the integer pixel unit.
3. A method for transmitting image data, the method comprising the following steps: Obtaining a bitstream of encoded image information, wherein the encoded image information is generated based on the following steps: deriving motion information of the current block; deriving sub-blocks of the current block by partitioning the current block; deriving corrected motion information of each sub-block based on the motion information of the current block; deriving a prediction block of the current block based on the corrected motion information of each sub-block; and encoding the image information including prediction-related information of the motion information of the current block; and Send the image data including the bitstream. The corrected motion information for each sub-block of the current block includes the corrected L0 motion vector and the corrected L1 motion vector for each sub-block. Specifically, the process of searching for the corrected L0 motion vector within an integer pixel unit search area in the L0 reference frame is performed. Specifically, the process of searching for the corrected L0 motion vector of the sub-pixel unit is performed within the search area of the sub-pixel unit in the L0 reference frame, which is derived from the integer pixels represented by the corrected L0 motion vector of the searched integer pixel unit. Specifically, it is determined whether the integer pixel represented by the corrected L0 motion vector of the searched integer pixel unit is located at the boundary of the search region of the integer pixel unit, and Wherein, the integer pixel, represented by the corrected L0 motion vector of the searched integer pixel unit, is located at the boundary of the search region of the integer pixel unit, and the search region of the sub-pixel unit is restricted to be included in the search region of the integer pixel unit.
Citation Information
Patent Citations
Moving picture coding apparatus
CN1671209A
