Video encoding device using inter prediction, video decoding device, and method for providing video data
Affine motion prediction and sample adjustments, combined with illumination compensation, enhance video encoding by addressing complex motions and optimizing encoding tools, resulting in improved compression efficiency and reduced data needs.
Patent Information
- Application Number
- JP2023076009
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2020-06-15
- Filing Date
- 2023-05-02
- Publication Date
- 2024-08-29
- Estimated Expiration
- 2040-06-15
AI Technical Summary
Existing video encoding techniques struggle to efficiently compress video data due to increasing data sizes with higher resolutions and frame rates, particularly in inter-prediction methods that do not adequately address complex object motions beyond translation.
The implementation of affine motion prediction and sample-by-sample adjustments in video encoding and decoding processes, along with illumination compensation techniques, to enhance compression performance by accurately modeling various motions, including rotation and zoom, and optimizing encoding tools through high-level syntax signaling.
Improves video compression efficiency by effectively handling diverse motions, reducing data requirements, and minimizing computational complexity while maintaining image quality.
Smart Images

Figure 0007541688000022 
Figure 0007541688000023 
Figure 0007541688000024
Abstract
Description
[Technical field]
[0001] The present invention relates to video encoding and decoding, and more particularly to a coding tool for improving compression performance of inter prediction. [Background technology]
[0002] Video data has a larger amount of data than audio data, still image data, etc., and therefore requires a large amount of hardware resources including memory to store or transmit the video data without compression processing.
[0003] Therefore, in general, when video data is stored or transmitted, the video data is compressed using an encoder and then stored or transmitted, and the compressed video data is received by a decoder, decompressed, and played back. Examples of such video compression technologies include H.264 / AVC and High Efficiency Video Coding (HEVC), which has an encoding efficiency improved by about 40% compared to H.264 / AVC.
[0004] However, as video size, resolution, and frame rate gradually increase, the amount of data to be encoded also increases, and so new compression technologies that have better encoding efficiency and greater image quality improvement effects than conventional compression technologies are required.
[0005] In video coding, predictive coding is mainly used to improve compression performance. There are two types of prediction: intra prediction, which predicts a target block to be coded using already reconstructed samples in the current picture, and inter prediction, which predicts a current block using a previously reconstructed reference picture. Inter prediction, in particular, has better compression performance than intra prediction and is therefore widely used in video coding.
[0006] The present invention proposes a coding tool that improves the compression performance of existing inter prediction. Summary of the Invention [Problem to be solved by the invention]
[0007] The present invention relates to a coding tool that improves compression performance of inter prediction, and in one aspect, to a coding tool that can compensate for various object movements as well as translation motion. [Means for solving the problem]
[0008] One aspect of the present invention provides an image decoding method for decoding a sequence of coded pictures on a block-by-block basis, the method comprising: setting at a sequence level whether affine motion prediction is allowed by decoding a first high level syntax element from a bitstream; and setting at a picture level whether each of at least one coding tool is allowed by decoding one or more second high level syntax elements for each of at least one coding tool from the bitstream depending on the first high level syntax element, where the at least one coding tool includes a sample-by-sample adjustment of affine motion prediction samples, and further setting a plurality of control point motion vectors of a current block coded using the affine motion prediction when the sequence level setting indicates that the affine motion prediction is allowed. and performing sub-block-wise affine motion prediction using the control point motion vector to generate affine prediction samples for each sub-block in the current block. When it is determined based on the picture level setting that sample-by-sample adjustment of the affine motion prediction samples is allowed for a current picture including the current block, modifying sample values of the affine prediction samples by compensating for motion according to positions of samples in each sub-block based on the control point motion vector of the current block.
[0009] Another aspect of the present disclosure provides an image decoding device for decoding a sequence of coded pictures on a block-by-block basis. The device includes a decoder for determining whether affine motion prediction is permitted at a sequence level by decoding a first high level syntax element from a bitstream, and for determining whether each of at least one coding tool is permitted at a picture level by decoding one or more second high level syntax elements for each of the at least one coding tool from the bitstream depending on the first high level syntax element. Here, the at least one coding tool includes a sample-by-sample adjustment of affine motion prediction samples. The device further includes a predictor for determining a plurality of control point motion vectors for a current block coded using the affine motion prediction, and for performing the sub-block-by-subblock affine motion prediction using the control point motion vectors to generate affine prediction samples for each sub-block in the current block when the sequence level determination indicates that the affine motion prediction is permitted. When the prediction unit identifies, based on the picture level setting, that sample-by-sample adjustment of the affine motion prediction sample is permitted for the current picture including the target block, the prediction unit modifies the sample value of the affine prediction sample by compensating for motion according to the sample position within each sub-block based on the control point motion vector of the target block.
[0010] Another aspect of the present disclosure provides a method for block-wise coding of a sequence of coded pictures, the method including the steps of: encoding a sequence-level first high level syntax element in a header of the sequence for indicating whether affine motion prediction and at least one coding tool are all disabled, where the at least one coding tool includes a sample-by-sample adjustment of affine motion prediction samples, and further encoding one or more second high level syntax elements dependent on the first high level syntax element for each of the at least one coding tool for indicating a sequence-level or picture-level setting for whether the coding tool is allowed; and, if the first high level syntax element indicates that the at least one coding tool is not all disabled, encoding a control point motion vector for a current block to be coded. and generating affine prediction samples for each sub-block by determining a control point motion vector and performing sub-block-based affine motion prediction using the control point motion vector. If sample-by-sample adjustment of the affine motion prediction samples is allowed for a current picture including the target block, modifying sample values of the affine prediction samples by compensating for motion according to sample positions in each sub-block based on the control point motion vector of the target block. [Brief description of the drawings]
[0011] [Figure 1] 1 is an exemplary block diagram of a video encoding device capable of implementing the techniques of the present invention; [Diagram 2] FIG. 13 is a diagram for explaining a method of dividing blocks using the QTBTTT structure. [Diagram 3]FIG. 2 is a diagram illustrating multiple intra-prediction modes. [Figure 4] FIG. 2 is a diagram illustrating an example of neighboring blocks of a current block; [Diagram 5] 1 is an exemplary block diagram of a video decoding device capable of implementing the techniques of the present invention; [Figure 6] FIG. 2 is an exemplary diagram for explaining the concept of bi-prediction optical flow provided by the present invention. [Figure 7] 11 is an exemplary diagram illustrating a method for deriving a gradient for block boundary samples in a bidirectional optical flow; FIG. [Figure 8] 1 is an exemplary diagram illustrating affine motion prediction provided by the present invention; [Figure 9] 1 is an exemplary diagram illustrating affine motion prediction provided by the present invention; [Figure 10] 11 is an exemplary diagram illustrating a method of deriving merge candidates for affine motion prediction from translation motion vectors of neighboring blocks; [Figure 11a] 4 is an exemplary diagram illustrating a method of deriving illumination compensation parameters according to an embodiment of illumination compensation provided by the present invention; [Figure 11b] 4 is an exemplary diagram illustrating a method of deriving illumination compensation parameters according to an embodiment of illumination compensation provided by the present invention; [Figure 11c] 4 is an exemplary diagram illustrating a method of deriving illumination compensation parameters according to an embodiment of illumination compensation provided by the present invention; [Figure 12] 11 is an exemplary diagram illustrating a method for dividing a target block into a plurality of regions according to another embodiment of illumination compensation provided by the present invention; [Figure 13]11 is an exemplary diagram illustrating a method for determining reference samples to be used for deriving compensation parameters when a target block is divided into four regions according to another embodiment of illumination compensation provided by the present invention. FIG. [Figure 14] 11 is an exemplary diagram illustrating a method of performing illumination compensation using illumination compensation parameters for four regions when a target block is divided into four regions, according to another embodiment of illumination compensation provided by the present invention. [Figure 15] 11 is an exemplary diagram illustrating a method of performing illumination compensation using illumination compensation parameters for four regions when a target block is divided into four regions, according to another embodiment of illumination compensation provided by the present invention. [Figure 16] 11 is an exemplary diagram illustrating a method of performing illumination compensation for each region when a target block is divided into two regions according to another embodiment of illumination compensation provided by the present invention; FIG. [Figure 17] 11 is an exemplary diagram illustrating a method of performing illumination compensation for each region when a target block is divided into two regions according to another embodiment of illumination compensation provided by the present invention; FIG. [Figure 18] 11 is an exemplary diagram illustrating a method of performing illumination compensation for each region when a target block is divided into four or more regions according to another embodiment of illumination compensation provided by the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0012] Hereinafter, some embodiments of the present invention will be described in detail with reference to the drawings. When identifying elements in each drawing, attention should be paid to the fact that the same elements are given the same reference numerals as much as possible even if they are displayed in different drawings. In addition, when it is determined that a detailed description of related known configurations or functions in the description of the present invention will obscure the gist of the present invention, the detailed description will be omitted.
[0013] 1 is an exemplary block diagram of a video encoding device embodying the techniques of this disclosure. In the following, the video encoding device and sub-components of this device will be described with reference to FIG.
[0014] The video encoding device includes a picture division unit 110, a prediction unit 120, a subtractor 130, a transformation unit 140, a quantization unit 145, a rearrangement unit 150, an entropy encoding unit 155, an inverse quantization unit 160, an inverse transformation unit 165, an adder 170, a loop filter unit 180, and a memory 190.
[0015] Each component of the video encoding device may be implemented as hardware or software, or a combination of hardware and software. Further, the function of each component may be implemented as software, and a microprocessor may execute the software function corresponding to each component.
[0016] An image (video) is composed of one or more sequences including multiple pictures. Each picture is divided into multiple regions, and coding is performed for each region. For example, one picture is divided into one or more tiles and / or slices. Here, one or more tiles are defined as a tile group. Each tile and / or slice is divided into one or more coding tree units (CTUs). Each CTU is then divided into one or more coding units (CUs) according to a tree structure. Information applied to each CU is coded as the syntax of the CU, and information commonly applied to CUs included in one CTU is coded as the syntax of the CTU. Information commonly applied to all blocks in one slice is coded as the syntax of a slice header, and information commonly applied to all blocks constituting one or more pictures is coded in a picture parameter set (PPS) or a picture header. Furthermore, information commonly referred to in a sequence of multiple pictures is coded in a sequence parameter set (SPS). Furthermore, information commonly applied to one tile or tile group may be coded as syntax in a tile or tile group header. The syntax included in the SPS, PPS, slice header, tile or tile group header is called high level syntax.
[0017] The picture division unit 110 determines the size of a coding tree unit (CTU). Information on the size of the CTU (CTU size) is coded as an SPS or PPS syntax and transmitted to a video decoding apparatus.
[0018] The picture division unit 110 divides each picture constituting a video into a plurality of CTUs (coding tree units) having a predetermined size, and then recursively divides the CTUs using a tree structure. Leaf nodes in the tree structure become coding units (CUs), which are basic units of encoding.
[0019] The tree structure may be a quad tree (QT) in which an upper node (or parent node) is divided into four lower nodes (or child nodes) of the same size, a binary tree (BT) in which an upper node is divided into two lower nodes, a ternary tree (TT) in which an upper node is divided into three lower nodes in a ratio of 1:2:1, or a structure that combines two or more of the QT, BT, and TT structures. For example, a QTBT (QuadTree plus BinaryTree) structure may be used, or a QTBTTT (QuadTree plus BinaryTree TernaryTree) structure may be used. Here, BTTT and ternary tree are collectively referred to as MTT (Multiple-Type Tree).
[0020] FIG. 2 shows a QTBTTT splitting tree structure. As shown in FIG. 2, the CTU is first split into a QT structure. The mask quad tree split is repeated until the size of the splitting block reaches the minimum block size (MinQTSize) of the leaf node allowed by QT. A first flag (QT_split_flag) indicating whether each node of the QT structure is split into four nodes of the lower layer is coded by the entropy coding unit 155 and signaled to the video decoding device. If the leaf node of the QT is not larger than the maximum block size (MaxBTSize) of the root node allowed by BT, it is further split into one or more of the BT structure or the TT structure. In the BT structure and / or the TT structure, there are multiple splitting directions. For example, there are two directions, that is, the direction in which the block of the corresponding node is split horizontally and the direction in which it is split vertically. As shown in FIG. 2, when MTT splitting is started, a second flag (mtt_split_flag) indicating whether or not a node has been split, and a flag indicating a split direction (vertical or horizontal) and / or a flag indicating a split type (Binary or Ternary) if splitting is performed are coded by the entropy coding unit 155 and signaled to the video decoding device. Alternatively, a CU split flag (split_cu_flag) indicating whether or not a node is split may be coded before coding a first flag (QT_split_flag) indicating whether or not each node is split into four nodes in a lower layer. When the CU split flag (split_cu_flag) value indicates that no splitting is to be performed, the block of the node becomes a leaf node in the split tree structure and becomes a CU (coding unit), which is a basic unit of coding. When the CU split flag (split_cu_flag) value indicates that splitting is to be performed, the video encoding device starts coding from the first flag as described above.
[0021] When QTBT is used as another example of a tree structure, there are two types: a type in which a block of a corresponding node is split horizontally into two blocks of the same size (i.e., symmetric horizontal splitting) and a type in which a block of a corresponding node is split vertically (i.e., symmetric vertical splitting). A split flag (split_flag) indicating whether each node of the BT structure is split into a block of a lower layer and split type information indicating the type of splitting are coded by the entropy coding unit 155 and transmitted to the video decoding device. Meanwhile, there may be an additional type in which a block of a corresponding node is split into two blocks that are asymmetric with respect to each other. The asymmetric type may include a form in which a block of a corresponding node is split into two rectangular blocks having a size ratio of 1:3, or a form in which a block of a corresponding node is split in a diagonal direction.
[0022] CUs have various sizes depending on the QTBT or QTBTTT division from the CTU. Hereinafter, a block corresponding to a CU to be encoded or decoded (i.e., a leaf node of QTBTTT) is referred to as a "current block". Depending on the adoption of QTBTTT division, the shape of the current block may be not only square but also rectangular.
[0023] The prediction unit 120 predicts the current block to generate a predicted block. The prediction unit 120 includes an intra prediction unit 122 and an inter prediction unit .
[0024] The intra prediction unit 122 predicts samples in a current block using samples (reference samples) located around the current block in a current picture including the current block. There are a plurality of intra prediction modes depending on the prediction direction. For example, as shown in FIG. 3, the plurality of intra prediction modes include two non-directional modes including a planar mode and a DC mode, and 65 directional modes. Different neighboring samples and calculation formulas are defined to be used depending on each prediction mode.
[0025] The intra prediction unit 122 determines the intra prediction mode to use for encoding the current block. In some examples, the intra prediction unit 122 may encode the current block using various intra prediction modes and select an appropriate intra prediction mode to use from the tested modes. For example, the intra prediction unit 122 may calculate a rate-distortion value using a rate-distortion analysis for the various tested intra prediction modes and select the intra prediction mode with the best rate-distortion characteristics from among the tested modes.
[0026] The intra prediction unit 122 selects one intra prediction mode from among a plurality of intra prediction modes, and predicts a current block using surrounding samples (reference samples) and an arithmetic formula determined according to the selected intra prediction mode. Information about the selected intra prediction mode is encoded by the entropy encoding unit 155 and transmitted to the video decoding device.
[0027] The inter prediction unit 124 generates a prediction block for the current block through a motion compensation process. The inter prediction unit 124 searches for a block most similar to the current block in a reference picture that has been encoded and decoded before the current picture, and generates a prediction block for the current block using the searched block. Then, it generates a motion vector corresponding to a displacement between the current block in the current picture and the prediction block in the reference picture. In general, motion estimation is performed on a luma component, and a motion vector calculated based on the luma component is used for both the luma component and the chroma component. Motion information including information on the reference picture and information on the motion vector used to predict the current block is coded by the entropy coding unit 155 and transmitted to the video decoding device.
[0028] The inter prediction unit 124 may perform interpolation on the reference picture or the reference block to improve the accuracy of prediction. That is, a sub-sample between two consecutive integer samples is interpolated by applying a filter coefficient to a plurality of consecutive integer samples including the two integer samples. When a process of searching for a block most similar to the current block is performed on the interpolated reference picture, the motion vector is expressed up to a precision of a decimal unit, not a precision of an integer sample unit. The precision or resolution of the motion vector is set differently for each unit of the target region to be encoded, such as a slice, a tile, a CTU, a CU, etc. When applying such adaptive motion vector resolution, information on the motion vector resolution applied to each target region must be signaled for each target region. For example, when the target region is a CU, information on the motion vector resolution applied for each CU is signaled. The information on the motion vector resolution is information indicating the precision of a differential motion vector, which will be described later.
[0029] Meanwhile, the inter prediction unit 124 performs inter prediction using bi-prediction. In the case of bi-prediction, two reference pictures and two motion vectors representing the position of a block most similar to the current block in each reference picture are used. The inter prediction unit 124 selects a first reference picture and a second reference picture from a reference picture list 0 (RefPicList0) and a reference picture list 1 (RefPicList1), respectively, and searches for a block similar to the current block in each reference picture to generate a first reference block and a second reference block. Then, the inter prediction unit 124 averages or weightedly averages the first reference block and the second reference block to generate a prediction block for the current block. Then, the inter prediction unit 124 transmits motion information including information on the two reference pictures used to predict the current block and information on the two motion vectors to the coding unit 150. Here, the reference picture list 0 may be configured with pictures before the current picture in display order from among the already restored pictures, and the reference picture list 1 may be configured with pictures after the current picture in display order from among the already restored pictures. However, this is not necessarily limited to this. A reconstructed picture that is after the current picture in the display order may be included in reference picture list 0, and conversely, a reconstructed picture that is before the current picture may be included in reference picture list 1.
[0030] Various methods are used to minimize the amount of bits required to code the motion information.
[0031] For example, if the reference picture and motion vector of the current block are the same as those of a neighboring block, the motion information of the current block can be transmitted to the decoding device by encoding information that can identify the neighboring block. This method is called a "merge mode."
[0032] In the merge mode, the inter prediction unit 124 selects a predetermined number of merge candidate blocks (hereinafter, referred to as "merge candidates") from the neighboring blocks of the current block.
[0033] As shown in Fig. 4, the neighboring blocks for deriving the merging candidates are all or some of the left block L, the top block A, the top right block AR, the bottom left block BL, and the top left block AL adjacent to the current block in the current picture. Furthermore, a block located in a reference picture (which may be the same as or different from the reference picture used to predict the current block) rather than the current picture in which the current block is located may be used as a merging candidate. For example, a block located in the same position as the current block in the reference picture (co-located block) or a block adjacent to the co-located block may be additionally used as a merging candidate.
[0034] The inter prediction unit 124 uses the neighboring blocks to construct a merge list including a predetermined number of merge candidates. The inter prediction unit 124 selects a merge candidate to be used as motion information of the current block from among the merge candidates included in the merge list, and generates merge index information for identifying the selected candidate. The generated merge index information is encoded by the entropy encoding unit 155 and transmitted to the decoding device.
[0035] Yet another method for encoding motion information is the AMVP mode.
[0036] In the AMVP mode, the inter prediction unit 124 derives a predicted motion vector candidate for the motion vector of the current block using a peripheral block of the current block. As peripheral blocks used to derive a predicted motion vector candidate, all or some of the left block L, upper block A, upper right block AR, lower left block BL, and upper left block AL adjacent to the current block in the current picture shown in FIG. 4 are used. Furthermore, a block located in a reference picture (which may be the same as or different from the reference picture used to predict the current block) instead of the current picture in which the current block is located may be used as a peripheral block used to derive a predicted motion vector candidate. For example, a block located at the same position as the current block in the reference picture (co-located block), or a block adjacent to the block at the same position, may be used.
[0037] The inter prediction unit 124 derives motion vector predictor candidates using the motion vectors of the surrounding blocks, determines a motion vector predictor for the motion vector of the current block using the motion vector predictor candidates, and calculates a difference motion vector by subtracting the motion vector predictor from the motion vector of the current block.
[0038] The motion vector predictor is obtained by applying a predefined function (e.g., median, average calculation, etc.) to the motion vector predictor candidate. In this case, the video decoding device also knows the predefined function. In addition, since the neighboring blocks used to derive the motion vector predictor candidate are blocks that have already been encoded and decoded, the video decoding device also already knows the motion vectors of the neighboring blocks. Therefore, the video encoding device does not need to encode information for identifying the motion vector predictor candidate. Therefore, in this case, information on the differential motion vector and information on the reference picture used to predict the current block are encoded.
[0039] Alternatively, the motion vector predictor may be determined by selecting one of the motion vector predictor candidates, in which case information for identifying the selected motion vector predictor candidate is additionally encoded together with information on the differential motion vector and information on the reference picture used to predict the current block.
[0040] The subtractor 130 subtracts the predicted block generated by the intra predictor 122 or the inter predictor 124 from the current block to generate a residual block.
[0041] The transform unit 140 divides the residual block into one or more sub-blocks and applies a transform to the one or more sub-blocks to transform the residual values of the transform block from the sample domain to the frequency domain. In the frequency domain, the transformed block is called a coefficient block or a transform block that includes one or more transform coefficient values. The transform may use a two-dimensional transform kernel, or may use one-dimensional transform kernels in the horizontal and vertical directions, respectively. The transform kernel may be based on a discrete cosine transform (DCT), a discrete sine transform (DST), etc.
[0042] The transform unit 140 transforms the residual signal in the residual block by using the entire size of the residual block as a transform unit, or may divide the residual block into a plurality of sub-blocks and transform the residual signal in the sub-block by using the sub-blocks as a transform unit.
[0043] Meanwhile, the transform unit 140 performs transforms on the residual block in the horizontal and vertical directions separately. Various types of transform functions or transform matrices are used for the transform. For example, a pair of transform functions for horizontal and vertical transforms is defined as an MTS (Multiple Transform Set). The transform unit 140 selects one transform function pair with the highest transform efficiency from the MTS, and transforms the residual block in the horizontal and vertical directions, respectively. Information (mts_idx) on the transform function pair selected from the MTS is coded by the entropy coding unit 155 and signaled to the video decoding device.
[0044] The quantization unit 145 quantizes the transform coefficients output from the transform unit 140 using a quantization parameter, and outputs the quantized transform coefficients to the entropy coding unit 155. The quantization unit 145 may directly quantize an associated residual block for any block or frame without transforming it. The quantization unit 145 may apply different quantization coefficients (scaling values) depending on the position of the transform coefficient within the transform block. A matrix of quantization coefficients to be applied to the two-dimensionally arranged quantized transform coefficients is coded and signaled to a video decoding device.
[0045] The sorting unit 150 sorts coefficient values for the quantized residual values. The sorting unit 150 changes a two-dimensional coefficient array into a one-dimensional coefficient sequence through coefficient scanning. For example, the sorting unit 150 uses a zig-zag scan or a diagonal scan to scan from a DC coefficient to a high-frequency region coefficient and outputs a one-dimensional coefficient sequence. Depending on the size of the transform unit and the intra prediction mode, a vertical scan that scans a two-dimensional coefficient array in the column direction and a horizontal scan that scans a two-dimensional block shape coefficient in the row direction may be used instead of the zig-zag scan. That is, depending on the size of the transform unit and the intra prediction mode, a scan method to be used may be determined from among the zig-zag scan, the diagonal scan, the vertical scan, and the horizontal scan.
[0046] The entropy coding unit 155 generates a bitstream by coding the sequence of one-dimensional quantized transform coefficients output by the reordering unit 150 using various coding schemes such as Context-based Adaptive Binary Arithmetic Code (CABAC) or Exponential Golomb.
[0047] The entropy coding unit 155 also codes information such as a CTU size, a CU division flag, a QT division flag, an MTT division type, and an MTT division direction related to block division, so that the video decoding device can divide the block in the same manner as the video coding device. The entropy coding unit 155 also codes information related to a prediction type indicating whether the current block is coded by intra prediction or inter prediction, and codes intra prediction information (i.e., information related to an intra prediction mode) or inter prediction information (information related to a merge index in the case of a merge mode, and information related to a reference picture index and a difference motion vector in the case of an AMVP mode) according to the prediction type. The entropy coding unit 155 also codes information related to quantization, i.e., information related to a quantization parameter and information related to a quantization matrix.
[0048] The inverse quantization unit 160 generates transform coefficients by inverse quantizing the quantized transform coefficients output from the quantization unit 145. The inverse transform unit 165 transforms the transform coefficients output from the inverse quantization unit 160 from the frequency domain to the spatial domain to reconstruct the residual block.
[0049] The adder 170 reconstructs the current block by adding the reconstructed residual block and the predicted block generated by the predictor 120. Samples in the reconstructed current block are used as reference samples when intra-predicting the next block.
[0050] The loop filter unit 180 performs filtering on the reconstructed samples to reduce blocking artifacts, ringing artifacts, blurring artifacts, etc., that occur due to block-based prediction and transform / quantization. The loop filter unit 180 includes one or more of a deblocking filter 182, a sample adaptive offset (SAO) filter 184, and an adaptive loop filter (ALF) 186.
[0051] The deblocking filter 182 filters the boundaries between reconstructed blocks to remove blocking artifacts caused by block-based encoding / decoding, and the SAO filter 184 performs additional filtering on the deblocking filtered image. The SAO filter 184 is a filter used to compensate for differences between reconstructed samples and original samples caused by lossy coding, and is performed by adding a corresponding offset to each reconstructed sample. The ALF 186 applies filter coefficients to a target sample to be filtered and its surrounding samples to perform filtering on the target sample. The ALF 186 divides samples included in an image into predetermined groups, and then determines one filter to be applied to the corresponding group to perform differential filtering for each group. Information regarding the filter coefficients used in the ALF is coded and signaled to the video decoder.
[0052] The reconstructed blocks filtered through the loop filter unit 180 are stored in a memory 190. Once all blocks in a picture are reconstructed, the reconstructed picture is used as a reference picture for inter-predicting blocks in a picture to be coded later.
[0053] 5 is an exemplary functional block diagram of a video decoding device embodying the techniques of the present disclosure. In the following, the video decoding device and its lower components will be described with reference to FIG.
[0054] The video decoding apparatus includes an entropy decoding unit 510 , a reordering unit 515 , an inverse quantization unit 520 , an inverse transform unit 530 , a prediction unit 540 , an adder 550 , a loop filter unit 560 , and a memory 570 .
[0055] Like the video encoding device of Fig. 1, each component of the video decoding device may be implemented in hardware or software, or in a combination of hardware and software. Furthermore, the function of each component may be implemented in software, and a microprocessor may execute the software function corresponding to each component.
[0056] The entropy decoding unit 510 determines a current block to be decoded by decoding a bitstream generated by a video encoding device and extracting information related to block division, and extracts prediction information and information related to a residual signal required to restore the current block.
[0057] The entropy decoding unit 510 extracts information about the CTU size from a sequence parameter set (SPS) or a picture parameter set (PPS) to determine the size of the CTU, and divides the picture into CTUs of the determined size. The entropy decoding unit 510 then determines the CTU as the top layer of a tree structure, i.e., the root node, and divides the CTU using the tree structure by extracting division information for the CTU.
[0058] For example, when splitting a CTU using the QTBTTT structure, first, the first flag (QT_split_flag) related to the split of QT is extracted and each node is split into four nodes in the lower layer. Then, for a node that corresponds to a leaf node of QT, the second flag (MTT_split_flag) related to the split of MTT and the split direction (vertical / horizontal) and / or split type (binary / ternary) information are extracted and the leaf node is split into an MTT structure. As a result, each node below the leaf node of QT is recursively split into a BT or TT structure.
[0059] As another example, when splitting a CTU using the QTBTTT structure, first, a CU split flag (split_cu_flag) indicating whether or not to split a CU may be extracted, and if the corresponding block is split, a first flag (QT_split_flag) may be extracted. During the splitting process, each node may undergo zero or more repeated QT splits followed by zero or more repeated MTT splits. For example, a CTU may undergo an immediate MTT split, or conversely, may undergo only multiple QT splits.
[0060] As another example, when splitting a CTU using the QTBT structure, the first flag (QT_split_flag) related to the split of the QT is extracted and each node is split into four nodes in the lower layer. Then, for nodes that correspond to leaf nodes of the QT, the split flag (split_flag) instructing whether to further split into BTs and the split direction information are extracted.
[0061] Meanwhile, when the entropy decoding unit 510 determines the current block to be decoded through the division of the tree structure, it extracts information on a prediction type indicating whether the current block is intra-predicted or inter-predicted. If the prediction type information indicates intra-prediction, the entropy decoding unit 510 extracts syntax elements for intra-prediction information (intra-prediction mode) of the current block. If the prediction type information indicates inter-prediction, the entropy decoding unit 510 extracts syntax elements for the inter-prediction information, i.e., information indicating a motion vector and a reference picture to which the motion vector refers.
[0062] In addition, the entropy decoding unit 510 extracts information related to quantization and information related to the quantized transform coefficients of the current block as information related to the residual signal.
[0063] The reordering unit 515 rearranges the sequence of one-dimensional quantized transform coefficients entropy decoded by the entropy decoding unit 510 back into a two-dimensional coefficient array (i.e., a block) in the reverse order of the coefficient scanning performed by the video coding apparatus.
[0064] The inverse quantization unit 520 inverse quantizes the quantized transform coefficients using the quantization parameter. The inverse quantization unit 520 may apply different quantization coefficients (scaling values) to the two-dimensionally arranged quantized transform coefficients. The inverse quantization unit 520 performs inverse quantization by applying a matrix of quantization coefficients (scaling values) from the video encoding device to the two-dimensional array of quantized transform coefficients.
[0065] The inverse transform unit 530 inversely transforms the dequantized transform coefficients from the frequency domain to the spatial domain to restore the residual signal, thereby generating a restored residual block for the current block. In addition, when MTS is applied, the inverse transform unit 530 determines transform functions or transform matrices to be applied in the horizontal and vertical directions, respectively, using MTS information (mts_idx) signaled from the video encoding device, and performs inverse transform on the transform coefficients in the transform block in the horizontal and vertical directions using the determined transform functions.
[0066] The prediction unit 540 includes an intra prediction unit 542 and an inter prediction unit 544. The intra prediction unit 542 is activated when the prediction type of the current block is intra prediction, and the inter prediction unit 544 is activated when the prediction type of the current block is inter prediction.
[0067] The intra prediction unit 542 determines an intra prediction mode of the current block from among a plurality of intra prediction modes from a syntax element for the intra prediction mode extracted from the entropy decoding unit 510, and predicts the current block using reference samples surrounding the current block according to the intra prediction mode.
[0068] The inter prediction unit 544 determines a motion vector of the current block and a reference picture to which the motion vector refers using a syntax element for the intra prediction mode extracted from the entropy decoding unit 510, and predicts the current block using the motion vector and the reference picture.
[0069] The adder 550 reconstructs a current block by adding a residual block output from the inverse transform unit and a predicted block output from the inter prediction unit or the intra prediction unit. Samples in the reconstructed current block are used as reference samples when intra predicting a block to be decoded later.
[0070] The loop filter unit 560 includes at least one of a deblocking filter 562, an SAO filter 564, and an ALF 566. The deblocking filter 562 performs deblocking filtering on the boundaries between reconstructed blocks to remove blocking artifacts caused by block-by-block decoding. The SAO filter 564 performs filtering in a manner in which a deblocking filtering is added to a corresponding offset of a reconstructed block after deblocking filtering to compensate for a difference between a reconstructed sample and an original sample caused by lossy coding. The ALF 566 applies filter coefficients to a target sample to be filtered and samples surrounding the target sample, and performs filtering on the target sample. The ALF 566 divides samples included in an image into predetermined groups, and then determines one filter to be applied to the corresponding group to perform differential filtering for each group. The filter coefficients of the ALF are determined using information on the filter coefficients decoded from the bitstream.
[0071] The reconstructed blocks filtered through the loop filter unit 560 are stored in the memory 570. When all blocks in a picture are reconstructed, the reconstructed picture is used as a reference picture for inter-predicting blocks in a picture to be coded later.
[0072] The following disclosure relates to a coding tool for improving compression performance of inter prediction, and is performed in the inter prediction unit 124 of the video encoding device and the inter prediction unit 544 of the video decoding device. The term "target block" used below may be used synonymously with the current block or coding unit CU used above, or may refer to a portion of a coding unit.
[0073] I. Bi-directional Optical Flow Bidirectional optical flow is a technique that further compensates for the motion of samples predicted using bidirectional motion prediction, based on the assumption that samples or objects constituting an image move at a constant speed and sample values hardly change.
[0074] FIG. 6 is a reference diagram for explaining the basic concept of BIO.
[0075] A bidirectional motion vector MV that points to the most similar corresponding area (i.e., reference block) to the current picture's current block to be coded in the reference pictures Ref0 and Ref1 by (normal) bidirectional motion prediction for the current block. 0 , M.V. 1 Assume that the two motion vectors are determined. The two motion vectors are values that represent the motion of the entire target block. In the example of FIG. 6, the motion vector MV 0 The reference picture pointed to by Ref 0 The sample in P 0 and the motion vector MV corresponding to the sample P in the current block 1 The reference picture pointed to by Ref 1 The sample in P 1 Now, suppose that the motion for sample P in Fig. 6 is slightly different from the overall motion of the target block. For example, Ref 0 An object located at sample A in the target block of the current picture passes through sample P in the target block of the current picture and 1 If we move to sample B in the target block, samples A and B have very similar values. In this case, the most similar sample to sample P in the target block is Ref 0 The points in the 0 P pointed to by 0 Instead, P 0 Let v be the given displacement vector. x t 0 , v y t 1 A is moved by 1, and the Ref most similar to sample P in the target block is 1 The points in the 1 P pointed to by1 Instead, P 1 Let v be the given displacement vector. x t 0 , -v y t 1 B is moved by t 0 and 1 are based on the current picture, respectively. 0 and Ref 1 This means the time axis distance to the current time, and is calculated based on POC (Picture Order Count). x , v y ) is called "optical flow."
[0076] When predicting the value of sample P of the current block in the current picture, the values of two reference samples A and B are used to obtain a bidirectional motion vector MV 0 , M.V. 1 Reference sample P 0 , P 1 This allows for more accurate predictions than using
[0077] The reference picture Ref that corresponds to the sample i, j in the target block and is pointed to by the motion vector MV0 0 The value of the sample in I (0) (i,j) and the motion vector MV 1 The reference picture pointed to by Ref 1 The values of the samples in I (1) Define it as (i,j).
[0078] BIO motion vector v x , v y The reference picture Ref indicates that the sample in the current block corresponds to 0 The value of sample A in I (0) (i+v x t 0 , j+v y t 0 ) and the reference picture Ref 1 The value of sample B in I (1) (i-vx t 1 , j-v y t 1 ) Here, if we perform a linear approximation using only the first-order term of the Taylor series, A and B can be expressed as in [Equation 1].
[0079]
number
[0080] Here, I x (k) and I y (k) (k=0,1) is Ref 0 and Ref 1 The horizontal and vertical gradient values at the (i,j) position of t 0 and t 1 are based on the current picture, respectively. 0 and Ref 1 It is calculated based on POC (Picture Order Count). 0 = POC(current) - POC(Ref 0 ), t 1 = POC(Ref 1 )‐POC(current).
[0081] The bidirectional optical flow (v x , v y ) is determined as the solution that minimizes Δ, which is defined as the difference between sample A and sample B. Δ is defined as [Equation 2] using the linear approximation of A and B derived in [Equation 1].
[0082]
number
[0083] For simplicity, the sample positions (i,j) in each term of Equation 2 above are omitted.
[0084] For a more robust optical flow estimation, we introduce the assumption that the motion is locally consistent with the surrounding samples. The BIO motion vector for the currently predicted sample (i,j) takes into account the difference value Δ of [Equation 2] for all samples (i',j') present in a mask Ω of a certain size centered on the sample (i,j). That is, the optical flow for the current sample (i,j) is determined as a vector that minimizes the objective function Φ(vx,vy), which is the sum of the squares of the difference values Δ[i',j'] obtained for each sample in the mask Ω, as shown in the following [Equation 3].
[0085]
number
[0086] The bidirectional optical flow of the present disclosure is applied when one of the two reference pictures used for bidirectional prediction precedes the current picture in display order and the other is later than the current picture, and the distances from the two reference pictures to the current picture are the same, that is, the difference in POC (picture order count) between each reference picture and the current picture is the same. Therefore, t 0 and 1 can be ignored.
[0087] Furthermore, the bidirectional optical flow of the present disclosure may be applied only to the luma component.
[0088] The bidirectional optical flow of the present disclosure is performed on a sub-block basis, not on a pixel basis, for a target block to which bidirectional prediction is applied. The size of the sub-block may be various, such as 2×2, 4×4, or 8×8, but for convenience of explanation, the size of the sub-block is assumed to be 4×4.
[0089] Before performing the optical flow, the inter prediction unit 124 of the video encoding device generates two reference blocks for the current block using the bidirectional prediction described above. The first of the two reference blocks is a first motion vector MV 0 Reference picture Ref 0 The second reference block is a block of predicted samples generated from the second motion vector MV 1 Reference picture Ref 1 Here, we mean a block of predicted samples generated from
[0090] The inter prediction unit 124 uses horizontal and vertical gradient values of predicted samples in the first and second reference blocks to calculate an optical flow (v x , v y ) is calculated. x , v y ) is the reference picture Ref 0 Predicted samples and reference picture Ref 1 The inter prediction unit 124 determines the difference between the predicted samples from the 4×4 sub-blocks (v x , v y ) uses gradients of predicted samples within a 4×4 sub-block to derive sample offsets for modifying the bidirectional predicted samples for the sub-block.
[0091] Specifically, the inter prediction unit 124 calculates the horizontal and vertical gradients of the sample value at the (i, j) position using [Mathematical Expression 4].
[0092]
number
[0093] k is 0 or 1, and I (0) (i,j) and I (1)(i,j) means the sample value at the (i,j) position in the first reference block and the second reference block, respectively. Shift1 is a value derived from the bit-depth for the luma component, such as shift1 = max(6, bitDepth-6).
[0094] To derive the gradients of samples located at the boundary of each reference block, samples on the boundary between the first and second reference blocks are required. Therefore, as shown in FIG. 6, each reference block is extended by one column on the left and one row on the top and bottom. To reduce the amount of calculations, each sample in the extended part is padded with the nearest sample or integer sample in the reference block. Furthermore, the gradients at the sample positions on the boundary of each reference block are also padded with the gradients corresponding to the nearest sample.
[0095] The inter prediction unit 124 uses horizontal and vertical gradients within a 6×6 window covering a 4×4 sub-block as shown in FIG. 7 to calculate S1, S2, S3, S5, and S6, which correspond to the auto-correlation and cross-correlation of the gradients.
[0096]
number
[0097] Here, Ω denotes a window that covers a subblock. Also, as shown in [Equation 6] below, Ψ x (i,j) is the sum of the lateral gradient values at the (i,j) position in the first and second reference blocks, and Ψ y (i,j) means the sum of the vertical gradient values at position (i,j) in the first reference block and the second reference block, and θ(i,j) means the difference between the sample value at position (i,j) in the second reference block and the sample value at position (i,j) in the first reference block.
[0098]
number
[0099] where n a and b is a value derived from the bit depth and has values min(1, bitDepth-11) and min(4, bitDepth-8).
[0100] The inter prediction unit 124 uses S1, S2, S3, S5, and S6 to calculate the optical flow (vx, vy) for the 4×4 sub-block via [Mathematical Expression 7].
[0101]
number
[0102] Where: TIFF0007541688000008.tif8128, TIFF0007541688000009.tif8128, The file is TIFF0007541688000010.tif8128. TIFF0007541688000011.tif8128 is the truncation function. The file is TIFF0007541688000012.tif8128.
[0103] The sample offset for correcting the predicted sample at each sample position (x, y) in the 4×4 sub-block of the target block is calculated using the optical flow calculated for the 4×4 sub-block and the gradient value at the sample position (x, y) as shown in [Equation 8]. In Equation 8, rnd() means round-off operation.
[0104]
number
[0105] The inter prediction unit 124 calculates a sample offset b(x, y) at the (x, y) position and a predicted sample I(x, y) in the first reference block and the second reference block. (0) (x, y) and I (1) Using (x, y), the final predicted sample pred(x, y) is generated as shown in [Equation 9].
[0106]
number
[0107] Here, shift is Max(3, 15-BitDepth) and O offset is the value for the rounding operation and is half the shift.
[0108] As described above, the bidirectional optical flow technique uses the values of predicted samples predicted using the motion information (two motion vectors and two reference pictures) used in bidirectional prediction. Therefore, the inter prediction unit 544 of the video decoding device also performs bidirectional optical flow in the same manner as the video encoding device, using the motion information (motion vectors, reference pictures) used in bidirectional prediction received from the video encoding device. No additional information for the bidirectional optical flow process is required to be signaled from the video encoding device to the video decoding device.
[0109] II. Affine Motion Prediction The inter prediction described above is a motion prediction that reflects a translation motion model. That is, it is a technique for predicting motion in the horizontal direction (x-axis direction) and vertical direction (y-axis direction). However, in reality, there are various types of motion such as rotation, zoom-in, and zoom-out other than translation motion. One aspect of the present disclosure provides affine motion prediction that covers such various types of motion.
[0110] FIG. 8 is an example diagram illustrating affine motion prediction.
[0111] There are two types of models for affine motion prediction. One is a model that uses the motion vectors of two control points, the top-left corner and the top-right corner of a current target block to be coded, i.e., four parameters, as shown in FIG. 8A. The other is a model that uses the motion vectors of three control points, the top-left corner, the top-right corner, and the bottom-left corner of a current target block, i.e., six parameters, as shown in FIG. 8B.
[0112] The four-parameter affine model is expressed as in [Equation 10]. The movement at the sample position (x, y) in the target block is calculated using [Equation 10]. Here, the position of the upper left sample in the target block is assumed to be (0,0).
[0113]
number
[0114] The six-parameter affine model is expressed as in [Equation 11]. The movement at the sample position (x, y) in the target block is calculated by [Equation 11].
[0115]
number
[0116] Here, (mv 0x , mv 0y ) is the motion vector of the upper left corner control point, (mv 1x , mv 1y ) is the motion vector of the upper right corner control point, (mv 2x , mv 2y ) is the motion vector of the bottom left corner control point. W is a constant determined from the horizontal length of the target block, and H is a constant determined from the vertical length of the target block.
[0117] Affine motion prediction is performed for each sample in the current block using the motion vector calculated via [Equation 10] or [Equation 11].
[0118] Alternatively, in order to reduce the complexity of the calculation, the prediction may be performed in units of sub-blocks divided from the target block, as shown in Fig. 9. Exemplarily, the size of the sub-block may be 4x4, 2x2, or 8x8. In the following, an example will be described in which affine motion prediction is performed on the target block in units of 4x4 sub-blocks. This example is provided for convenience of explanation only and is not intended to limit the present invention.
[0119] In subblock-based affine motion prediction, the motion vector (affine motion vector) of each subblock is calculated by substituting the center position of each subblock for (x, y) in [Equation 10] or [Equation 11]. Here, the center position may be the actual center point of the subblock, or the sample position at the lower right of the center point. For example, in the case of a 4×4 subblock in which the coordinates of the sample at the lower left are (0,0), the center position of the subblock may be (1.5, 1.5) or (2,2). The predicted block for each subblock is calculated by substituting the affine motion vector (mv x , mv y ) to generate it.
[0120] Motion vector (mv x , mv y ) is set to have 1 / 16 sample precision. In this case, the motion vector (mv x , mv y ) is rounded off to the nearest 1 / 16 sample. On the other hand, adaptive motion vector resolution is also applied to affine motion prediction, as in general inter prediction. In this case, the motion vector resolution of the current block, i.e., information regarding the accuracy of the motion vector, is signaled for each current block.
[0121] Affine motion prediction is performed not only on the luma component but also on the chroma component. In the case of 4:2:0 video format, affine motion prediction is performed on the luma component in 4x4 subblock units, and then affine motion prediction is performed on the chroma component in 2x2 subblock units. The motion vector (mv x , mv y ) is derived from the motion vector of the corresponding luminance component. Alternatively, the size of the sub-block for affine motion prediction of the chrominance component may be the same as that of the luminance component. After affine motion prediction is performed in 4×4 sub-block units for the luminance component, affine motion prediction is also performed for the chrominance component in 4×4 sub-block size. In this case, since a 4×4 size sub-block for the chrominance component corresponds to four 4×4 sub-blocks for the luminance component, the motion vector (mvx, mvy) for the sub-block of the chrominance component is calculated by averaging the motion vectors of the four corresponding sub-blocks of the luminance component.
[0122] The video encoding device performs intra prediction, inter prediction (translational motion prediction), affine motion prediction, etc., and selects an optimal prediction method by calculating RD (rate-distortion) cost. To perform affine motion prediction, the inter prediction unit 124 of the video encoding device determines which of two types of models to use, and determines two or three control points depending on the determined type. The inter prediction unit 1214 calculates motion vectors (mvx, mvy) for each of the 4×4 sub-blocks in the target block using the motion vectors of the control points. Then, a prediction block for each sub-block in the target block is generated by performing motion compensation in the reference picture on a sub-block basis using the motion vectors (mvx, mvy) of each sub-block.
[0123] The entropy coding unit 155 of the video coding device codes affine-related syntax elements including a flag indicating whether affine motion prediction is applied to the target block, type information indicating the type of affine model, and motion information indicating the motion vector of each control point, and transmits the coded syntax elements to the video decoding device. The type information and the motion information of the control points are signaled when affine motion prediction is performed, and the number of motion vectors of the control points determined by the type information are signaled. In addition, when adaptive motion vector resolution is applied, motion vector resolution information for the affine motion vector of the target block is signaled.
[0124] The video decoder determines the type of affine model and the control point motion vector using the signaled syntax, and calculates the motion vector (mv x , mv y If motion vector resolution information for the affine motion vector of the current block is signaled, the motion vector (mv x , mv y ) is modified through operations such as rounding to an accuracy identified by the motion vector resolution information.
[0125] The video decoding device calculates a motion vector (mv x , mv y ) to generate a prediction block for each subblock by performing motion compensation within the reference picture.
[0126] In order to reduce the amount of bits required for encoding the motion vectors of the control points, a method such as the general intra prediction (translational motion prediction) described above is applied.
[0127] As an example, in the case of merge mode, the inter prediction unit 124 of the video encoding device derives motion vectors of each control point from the neighboring blocks of the target block. The inter prediction unit 124 generates a merge candidate list by deriving a predefined number of merge candidates from the neighboring samples L, BL, A, AR, and AL of the target block shown in Fig. 4, for example. Each of the merge candidates included in the list corresponds to a pair of motion vectors of two or three control points.
[0128] First, the inter prediction unit 124 derives merge candidates from the control point motion vectors of the surrounding blocks predicted in affine mode among the surrounding blocks determined in affine mode. In some embodiments, the number of merge candidates derived from the surrounding blocks predicted in affine mode is limited. For example, the inter prediction unit 124 derives a total of two merge candidates, one of L and BL, and one of A, AR, and AL, from the surrounding blocks predicted in affine mode. The order of priority is L, BL, and A, AR, AL.
[0129] On the other hand, if the total number of merging candidates is three or more, the inter predictor 124 derives an insufficient number of merging candidates from the translational motion vectors of the surrounding blocks.
[0130] FIG. 10 is an example diagram illustrating a method of deriving merging candidates for affine motion prediction from translation motion vectors of neighboring blocks.
[0131] The inter prediction unit 124 derives one control point motion vector CPMV1, CPMV2, and CPMV3 from each of the surrounding block groups {B2, B3, A2}, {B1, B0}, and {A1, A0}. As an example, the order of priority within each surrounding block group is B2, B3, A2, B1, B0, and A1, A0. Also, one control point motion vector CPMV4 is derived from the same collocated block T in the reference picture. The inter prediction unit 124 generates the missing number of merge candidates by combining two or three of the four control point motion vectors. The combination priority order is as follows. The elements in each group are arranged in the order of the motion vectors of the upper left corner, upper right corner, and lower left corner control points.
[0132] {CPMV1, CPMV2, CPMV3}, {CPMV1, CPMV2, CPMV4}, {CPMV1, CPMV3, CPMV4}, {CPMV2, CPMV3, CPMV4}, {CPMV1, CPMV2}, {CPMV1, CPMV3}
[0133] The inter prediction unit 124 selects a merge candidate from the merge candidate list and performs affine motion prediction on the current block. If the selected candidate consists of two control point motion vectors, the affine motion prediction is performed using a four-parameter model. On the other hand, if the selected candidate consists of three control point motion vectors, the affine motion prediction is performed using a six-parameter model. The entropy coding unit 155 of the video coding device codes index information indicating the selected merge candidate from among the merge candidates in the merge candidate list, and signals the coded information to the video decoding device.
[0134] The entropy decoding unit 510 of the video decoding device decodes the index information signaled from the video encoding device. The inter prediction unit 544 of the video decoding device constructs a merge candidate list in the same manner as the video encoding device, and performs affine motion prediction using the control point motion vectors corresponding to the merge candidates indicated by the index information.
[0135] As another example, in the case of the AMVP mode, the inter prediction unit 124 of the video encoding device determines the type of affine model and the control point motion vector for the target block. Then, a differential motion vector (motion vector difference) is calculated, which is the difference between the actual control point motion vector of the target block and the predicted motion vector of each control point, and the differential motion vector for each control point is coded and transmitted. To this end, the inter prediction unit 124 of the video encoding device configures a predefined number of affine AMVP lists. When the target block is a four-parameter type, each of the candidates included in the list is made up of a pair of two control point motion vectors. On the other hand, when the target block is a six-parameter type, each of the candidates included in the list is made up of a pair of three control point motion vectors. The affine AMVP list is derived using the control point motion vectors or translation motion vectors of the surrounding blocks, similar to the method of configuring the merge candidate list described above.
[0136] However, there is a constraint that only the neighboring blocks in FIG. 4 that refer to the same reference picture as the target block are considered to derive candidates to be included in the affine AMVP list.
[0137] In addition, in AMVP mode, the affine model type of the target block must be taken into consideration. If the affine model type of the target block is a four-parameter type, the video encoding device derives two control point motion vectors (the upper left and upper right corner control point motion vectors of the target block) using the affine models of the surrounding blocks. If the affine model type of the target block is a six-parameter type, the video encoding device derives three control point motion vectors (the upper left, upper right and lower left corner control point motion vectors of the target block) using the affine models of the surrounding blocks.
[0138] When the neighboring block is a four-parameter type, two control point motion vectors of the neighboring block are used to predict two or three control point motion vectors depending on the affine model type of the target block. For example, the affine model of the neighboring block expressed by [Equation 10] is used. In [Equation 10], (mv 0x , mv 0y ) and (mv 1x , mv 1y ) are replaced with the motion vectors of the top-left and top-right corner control points of the neighboring blocks, respectively. W is replaced with the horizontal length of the neighboring blocks. The predicted motion vector for each control point of the target block is derived by inputting the difference between the position of the corresponding control point of the target block and the position of the top-left corner of the neighboring block into (x, y).
[0139] When the neighboring block is a 6-parameter type, three control point motion vectors of the neighboring block are used to predict two or three control point motion vectors depending on the affine model type of the target block. For example, the affine model of the neighboring block expressed by [Equation 11] is used. In [Equation 11], (mv 0x , mv 0y ), (mv 1x , mv 1y ), and (mv 2x , mv 2y) are replaced with the control point motion vectors of the upper left, upper right, and lower left corners of the surrounding block, respectively. W and H are replaced with the width and height of the surrounding block, respectively. The predicted motion vector for each control point of the target block is derived by inputting the difference between the position of the corresponding control point of the target block and the position of the upper left corner of the surrounding block into (x, y).
[0140] The inter prediction unit 124 of the video encoding device selects one candidate from the affine AMVP list, and generates a differential motion vector between the motion vector of each actual control point and the predicted motion vector of the control point corresponding to the selected candidate. The entropy encoding unit 155 of the video encoding device encodes type information indicating the affine model type of the current block, index information indicating the candidate selected from the candidates in the affine AMVP list, and the differential motion vector corresponding to each control point, and transmits the encoded information to the video decoding device.
[0141] The inter prediction unit 544 of the video decoding device determines the affine model type using the information signaled from the video encoding device, and generates a differential motion vector for each control point. Then, it generates an affine AMVP list in the same manner as the video encoding device, and selects a candidate indicated by the index information signaled in the affine AMVP list. The inter prediction unit 544 of the video decoding device calculates the motion vector for each control point by adding the predicted motion vector for each control point of the selected candidate to the corresponding differential motion vector.
[0142] III. Sample-wise adjustment of affine motion estimation samples The sub-block-based affine motion prediction for a current block has been described. Another aspect of the present disclosure relates to adjusting sample values of predicted samples generated from the sub-block-based affine motion prediction on a sample-by-sample basis, and additionally compensating for motion according to the position of each sample within a sub-block, which is a unit in which the affine motion prediction is performed.
[0143] When a sample value in one of the sub-blocks generated as a result of the sub-block-based affine motion prediction for the current block is I(x,y), the video encoding device calculates horizontal and vertical gradients g x (i,j) and g y Calculate (i,j). Use [Math. 12] for the gradient calculation.
[0144]
number
[0145] A sample offset ΔI(i,j) for adjusting a predicted sample is calculated as follows:
[0146]
number
[0147] Here, Δmv(i,j) means the difference between the affine motion vector at sample (i,j) and the affine motion vector at the center position of the subblock, i.e., the motion offset, and is calculated by applying [Equation 10] or [Equation 11] depending on the affine model type of the target block. That is, it is calculated by subtracting the motion vector when the subblock center position is input to (x, y) from the motion vector when (x, y) = (i,j) in [Equation 10] or [Equation 11] is input. In other words, Δmv(i,j) is calculated by replacing (x, y) in [Equation 10] and [Equation 11] with the horizontal and vertical offsets from the center position of the subblock to the sample position (i,j), and adding the last term, "+mv 0x " and "+mv 0y The center position may be the actual center point of the sub-block, or may be the sample position at the lower right of the center point.
[0148] Meanwhile, the motion vectors of each control point of the current block used to calculate Δmv(i,j) and the difference between the sample position (i,j) and the subblock center position are the same for all subblocks, so the Δmv(i,j) value is calculated only for one subblock, for example the first subblock, and can be reused for other subblocks.
[0149] The technique disclosed herein is based on the assumption that the object moves at a constant speed and the change in sample value is constant (smooth). Therefore, the x-component of Δmv(i,j) (Δmv x ) and y component (Δmv y ) is multiplied by the sample gradient value in the horizontal and vertical directions to obtain the sample change in the horizontal and vertical directions, and the two changes are added to calculate the sample offset ΔI(i,j).
[0150] Finally, the predicted sample value is calculated as follows:
[0151]
number
[0152] When applying the sample-by-sample adjustment to the affine motion prediction sample, the inter prediction unit 124 of the video encoding device and the inter prediction unit 544 of the video decoding device perform the above-mentioned process to correct the sample value of the prediction sample generated through affine motion prediction. The gradient value is derived from the prediction sample generated through affine motion prediction, and Δmv(i,j) is derived from the control point motion vector of the current block. Therefore, no additional information signaling for the process of the present technique is required from the video encoding device to the video decoding device.
[0153] IV. Local Illumination Compensation for Affine Motion Estimation Samples The regional illumination compensation technique is a coding technique that compensates for the amount of change using a linear model related to the illumination change of the current block and the predicted block. The inter-prediction unit 124 of the video coding device determines a reference block in a reference picture using a motion vector (translational motion vector) of a target block, and obtains parameters of a linear model for illumination compensation using reconstructed samples around the reference block (upper and left sides) and reconstructed samples around the target block (upper and left sides).
[0154] Let x denote the reconstructed sample around the reference block, and y denote the corresponding reconstructed sample around the target block. Then, we derive the parameters (A, b) that minimize the sum of squares of the difference between y and (Ax+b) as shown in [Equation 15].
[0155]
number
[0156] The final predicted sample is generated by applying a weight of A and an offset of b to a sample in a predicted block (reference block) generated by the motion vector of the target block, as shown in [Equation 16]. In [Equation 16], pred[x][y] is a predicted sample at the (x, y) position generated by the motion vector of the target block, and predLIC[x][y] is the final predicted sample after illumination compensation.
[0157]
number
[0158] Yet another aspect of this disclosure relates to techniques that combine such illumination compensation techniques with affine motion prediction.
[0159] As described above, when applying subblock-based affine motion prediction to a target block, a motion vector is generated for each subblock. When illumination compensation parameters are derived for each subblock using the corresponding motion vector to perform illumination compensation, not only does the computational complexity increase, but also a serious delay problem occurs. Because the restored samples in each subblock are necessary for illumination compensation of the next subblock, the illumination compensation process for the next subblock must be suspended until the adjacent subblocks are restored (i.e., until both the prediction block and the residual block for the subblock are restored). The present disclosure relates to an improvement to such a problem.
[0160] 11a-c show various examples of determining the position of a reference block to derive illumination compensation parameters according to one embodiment of the present disclosure. This embodiment derives one illumination compensation parameter set (A, b) for a target block and applies the same parameters to all sub-blocks in the target block, i.e., the entire target block is modified via one illumination compensation parameter.
[0161] As shown in FIG. 11a, the inter prediction unit 124 of the video encoding device determines the position of a reference block in a reference picture using an affine motion vector of a sub-block located in the upper left part of a target block or a motion vector of an upper left corner control point of the target block. Reconstructed samples around the determined reference block are used to derive parameters. Alternatively, as shown in FIG. 11b, the affine motion vector of a central sub-block in the target block is used to determine the position of the reference block. After determining the position of the reference block, illumination compensation parameters are derived using reconstructed samples adjacent to the upper and left sides of the reference block and corresponding reconstructed samples adjacent to the upper and left sides of the target block.
[0162] As another example, a plurality of sub-blocks in the target block may be used. As shown in FIG. 11c, the inter prediction unit 124 uses affine motion vectors of sub-blocks (border sub-blocks) located at the boundaries of the target block to determine reference sub-blocks corresponding to each of the boundary sub-blocks. Samples for deriving illumination compensation parameters are extracted from reconstructed samples adjacent to the boundary sub-blocks and the corresponding reference sub-blocks in the target block. For a sub-block located at the upper boundary of the target block and its corresponding reference sub-block, samples are extracted from reconstructed samples adjacent to the upper side, and for a sub-block located at the left boundary of the target block and its corresponding reference sub-block, samples are extracted from reconstructed samples adjacent to the left side.
[0163] In this embodiment, the illumination compensation parameters are derived using reconstructed samples around the target block and reconstructed samples around the reference block, so that the delay problem described above can be solved. However, applying only one illumination compensation parameter to the target block to which subblock-based affine motion prediction is applied may potentially reduce coding efficiency. Another embodiment described below provides increased coding efficiency as a trade-off for a slight increase in complexity.
[0164] According to another embodiment of the present disclosure, the inter prediction unit 124 of the video encoding device divides a current block into a plurality of regions. Each region includes one or more sub-blocks, which are units for performing affine motion prediction. The inter prediction unit 124 calculates illumination compensation parameters for the plurality of regions, and performs illumination compensation for each region or sub-block in the current block using the calculated illumination compensation parameters.
[0165] 1. Target block division The inter prediction unit 124 of the video encoding device divides the current block into a plurality of regions including one or more sub-blocks, which are units in which affine motion prediction is performed.
[0166] The target block is divided using the control point motion vector of the target block. FIG. 12 shows an example of target block division using the control point motion vector. Referring to FIG. 12(A), the upper left corner control point motion vector MV 0 and the upper right corner control point motion vector MV 1 If the angle between the upper left corner control point motion vector MV is obtuse (greater than 90 degrees), the target block is split vertically. For example, the target block is bisected into two regions. Otherwise, the target block is not split vertically. Also, referring to FIG. 12B, the upper left corner control point motion vector MV 0 and the bottom left corner control point motion vector MV 2 If the angle between is obtuse, the target block is split horizontally, for example, into two equal parts. Otherwise, the target block is not split horizontally. If the affine model type of the target block is four parameters, the bottom-left corner control point motion vector MV 2 is derived by inputting the bottom left corner sample coordinates of the target block into (x, y) in [Equation 1].
[0167] In this way, based on the angle formed by the control point motion vectors, the inter prediction unit 124 divides the current block into two regions (left and right regions in the case of horizontal division, and upper and lower regions in the case of vertical division) or into four regions, or does not divide the current block into two regions (left and right regions in the case of horizontal division, and upper and lower regions in the case of vertical division). If the dot product of two vectors is less than 0, it is an obtuse angle, so the inter prediction unit 124 determines whether the angle between the control point motion vectors is an obtuse angle by calculating the dot product between the two vectors.
[0168] In the above example, the target block is divided when the angle between the two control point motion vectors is an obtuse angle, but conversely, the target block may be divided when the angle is an acute angle (an angle smaller than 90 degrees).
[0169] In addition, the size of the target block is taken into consideration for dividing the target block. For example, if the horizontal length exceeds a preset threshold, the target block is divided vertically, and if the vertical length exceeds a preset threshold, the target block is divided horizontally. In order to divide the target block, the size of the target block may be used together with the angle between the control point motion vector and the target block. For example, the video encoding device may determine whether to divide the target block using the angle between the control point motion vectors only if the horizontal length and / or vertical length of the target block are greater than a preset threshold. As another example, if the horizontal length exceeds a preset threshold, the video encoding device determines whether to divide the target block vertically using the angle between the upper left corner and upper right corner control point motion vectors of the target block. Then, if the vertical length exceeds a preset threshold, the video encoding device determines whether to divide the target block vertically using the angle between the upper left corner and lower left corner control point motion vectors of the target block.
[0170] Meanwhile, although the present invention has been described as dividing a target block into a plurality of regions using the control point motion vector of the target block, the present invention is not limited to this. For example, the upper left corner control point motion vector MV 0 , the upper right corner control point motion vector MV 1 , and the bottom left corner control point motion vector MV 2 Alternatively, the affine motion vectors of the upper left sub-block, the upper right sub-block, and the lower left sub-block in the current block may be used.
[0171] In FIG. 12, the target block is divided into two equal parts horizontally or vertically, but the present invention is not limited to this. For example, the target block may be divided into a plurality of parts horizontally and / or a plurality of parts vertically (n is 1 or more). Alternatively, the target block may be divided into sub-block units for which affine motion prediction has been performed. In this case, one sub-block constitutes one region.
[0172] Each region divided from the target block must be equal to or larger than the size of the sub-block for which affine motion prediction is performed. In other words, each region must be composed of one or more sub-blocks. For example, if the size of the sub-block is 4×4, the size of the region is 2m×2n (m and n are integers equal to or larger than 2).
[0173] If the target block is not divided, the illumination compensation parameters are derived according to the above-described first embodiment. In the following, a method for deriving the illumination compensation parameters when the target block is divided will be described.
[0174] 2. Illumination compensation parameter derivation and illumination compensation The video encoding device calculates illumination compensation parameters for a plurality of regions. The video encoding device performs illumination compensation on a region or sub-block basis within a target block using the plurality of illumination compensation parameters. The video encoding device determines reconstructed samples (reference samples) in a current picture and a reference picture to be used for deriving compensation parameters for each of the plurality of regions. The reference samples in the current picture are selected from reconstructed samples adjacent to the target block. For a region away from the left boundary of the target block, a reconstructed sample adjacent to the left side of the target block is selected as the reference sample. For a region away from the top boundary of the target block, a reconstructed sample adjacent to the top of the target block is selected as the reference sample.
[0175] Meanwhile, the reference sample in the reference picture is selected using the control point motion vector of the target block or one or more motion vectors derived from the control point motion vector. Hereinafter, a method of deriving illumination compensation parameters according to various division forms of the target block and performing illumination compensation will be described.
[0176] 2.1 When the target block is divided into four regions First, an example will be described in which a target block having horizontal and vertical lengths W and H, respectively, is divided horizontally and vertically to form a total of four regions.
[0177] The video encoder determines which reconstructed samples (reference samples) in the current and reference pictures are used to derive compensation parameters for each region.
[0178] FIG. 13 is an exemplary diagram for explaining a method for determining a reference sample used to derive a compensation parameter.
[0179] In the case of the upper left region of the target block, the video coding device selects T 0 ~T w / 2‐1 and the adjacent L on the left 0 ~L H / 2‐1 is selected as a reference sample for deriving compensation parameters. Then, a reference area corresponding to the upper left area in the reference picture is determined using the representative motion vector of the upper left area, and the reconstructed samples adjacent to the upper and left sides of the reference area are selected as reference samples. Here, the representative motion vector of the upper left area is the upper left corner control point motion vector MV 0 It is.
[0180] In the case of the upper right region, the video encoding device w / 2 ~T w-1 As at least a part of the reference samples for deriving the compensation parameters, L 0 ~L H / 2-1 As there is no adjacent restored sample on the left side of the upper right region, L on the left side of the target block is selected as the reference sample. 0 ~L H / 2-1 The video encoding apparatus then uses the representative motion vector of the upper right region to determine a reference region corresponding to the upper right region in the reference picture, and selects the reconstructed sample adjacent to the upper side of the reference region as a reference sample for deriving the compensation parameters. 0 ~L H / 2-1When selecting an additional reference sample, the video encoding apparatus additionally selects the reconstructed sample adjacent to the left of the reference sample. Here, the representative motion vector of the upper right region is the upper right corner control point motion vector MV1 of the target block.
[0181] In the case of the lower left region, the video coding device H / 2 ~L H‐1 As at least a part of the reference samples, T 0 ~T w / 2-1 Then, the video encoding apparatus uses the representative motion vector of the lower left region to determine a reference region corresponding to the lower left region in the reference picture, and selects a reconstructed sample adjacent to the left of the reference region as a reference sample. 0 ~T w / 2-1 is further selected, the video encoding apparatus may additionally select a reconstructed sample adjacent to the upper side of the reference area, where the representative motion vector of the upper left area is the lower left corner control point motion vector MV1 of the current block.
[0182] After determining the reference samples for the upper left, upper right, and lower left regions of the target block, the video encoding device uses [Mathematical Expression 15] to input a reference sample selected from the reference picture to x and a reference sample selected from the current picture to y, and derives illumination compensation parameters for each region.
[0183] The illumination compensation parameters for the lower right region are derived from the illumination compensation parameters for the upper left, upper right, and lower left regions, e.g., the illumination compensation parameters for the lower right region are set to the average of the illumination compensation parameters for the upper right and lower left regions.
[0184] Alternatively, the video encoding device may determine a representative motion vector for the lower right region, and derive the illumination compensation parameters for the lower right region using the representative motion vector. The representative motion vector for the lower right region is the lower right corner control point motion vector of the target block. The video encoding device can derive the movement vector of the lower right corner control point of the target block by substituting the coordinates (W-1, H-1) of the lower right corner sample (the lower right corner sample of the lower right region) in the target block for (x, y) in [Equation 10] or [Equation 11]. There are no previously restored samples adjacent to the lower right region of the target block. Therefore, the T w / 2 ~T w‐1 and L H / 2 ~L H‐1 is used as a reference sample for deriving compensation parameters. Then, a reference area in the reference picture is determined using the bottom-right corner control point motion vector of the target block, and the reconstructed samples adjacent to the upper and left sides of the reference area are selected as reference samples. The video coding device uses the selected reference samples to derive illumination compensation parameters for the bottom-right area via [Mathematical formula 15].
[0185] In the above example, the representative motion vector of each region is used to determine the reference sample in the reference picture for deriving the compensation parameter, and the control point motion vector of the target block (i.e., the parameter for affine motion prediction) is used as an example. However, the present invention is not limited thereto, and the representative motion vector of each region may be a motion vector derived from the motion vector of the control point of the target block.
[0186] As an example, the representative motion vector of each region is a motion vector at a predefined position derived from the motion vector of the control point of the target block. As an example, the affine motion vectors of the upper left, upper right, lower left, and lower right 4×4 sub-blocks in the target block, which are generated in advance by affine motion prediction, are used as the representative motion vectors of the upper left, upper right, lower left, and lower right regions, respectively. As another example, the affine motion vectors at the center points of the upper left, upper right, lower left, and lower right regions may be used as the representative motion vectors of each region. The affine motion vector at the center point of each region is generated by substituting the center position of each region for (x, y) in [Equation 10] or [Equation 11].
[0187] As another example, the average value of the affine motion vectors of the sub-blocks in each region may be used as the representative motion vector for that region.
[0188] Meanwhile, as a method for determining a reference sample in a reference picture to be used for deriving compensation parameters, an affine motion vector of a sub-block in each region may be used instead of the representative motion vector of each region. That is, a 4×4 reference block at a position indicated by an affine motion vector of a 4×4 sub-block in each region is determined in the reference picture, and reconstructed pixels adjacent to the upper and left sides of the 4×4 reference block are selected as reference pixels.
[0189] FIG. 14 is an exemplary diagram illustrating a method of performing illumination compensation using illumination compensation parameters for four regions of a target block.
[0190] Each region includes one or more sub-blocks, which are units for performing affine transformation. In the example of FIG. 14, the upper left region TL, upper right region TR, lower left region BL, and lower right region BR of the target block each include four sub-blocks (4×4 sub-blocks). The video encoding device uses the illumination compensation parameters of each region to perform illumination compensation on the prediction samples (prediction samples generated through affine motion prediction) within that region. Each sub-block is compensated using the illumination compensation parameters of the region to which it belongs. For example, the four sub-blocks included in the upper left region are compensated using the illumination compensation parameters of the upper left region (A 0 , b 0 ) is used to compensate.
[0191] In some other embodiments, the video encoding apparatus may use the illumination compensation parameters of the four regions (TL, TR, BL, BR) to interpolate illumination compensation parameters corresponding to subblocks in each region, and perform illumination compensation for each subblock using the interpolated illumination compensation parameters. As described above, the illumination compensation parameters of each region are derived from the representative motion vector of the corresponding region. However, the representative motion vector may not reflect the motion of all subblocks in the corresponding region. For example, the illumination compensation parameters of each region are derived as the control point motion vectors of the upper left corner, upper right corner, lower left corner, and lower right corner of the target block, or the affine motion vectors of the upper left, upper right, lower left, and lower right 4×4 subblocks of the target block. In this case, the motion of the upper left, upper right, lower left, and lower right 4×4 subblocks may have more influence on the derivation of the illumination compensation parameters. Therefore, the video encoding apparatus may derive the illumination compensation parameters of each subblock through interpolation using the illumination compensation parameters of each region.
[0192] FIG. 15 is a diagram illustrating an example of a method for interpolating illumination compensation parameters of sub-blocks using illumination compensation parameters of each region.
[0193] (A 0 , b 0 ) to (A 3 , b 3) are the illumination compensation parameters for each region derived from the control point motion vectors of the upper left, upper right, lower left, and lower right corners of the target block, or the affine motion vectors of the upper left, upper right, lower left, and lower right 4x4 sub-blocks of the target block. (A 0 , b 0 ) is assumed to be the illumination compensation parameter of the top left 4×4 sub-block in the top left region of the target block. Similarly, (A 1 , b 1 ) to (A 3 , b 3 ) are assumed to be the illumination compensation parameters of the upper right 4×4 sub-block in the upper right region, the lower left 4×4 sub-block in the lower left region, and the lower right 4×4 sub-block in the lower right region, respectively. That is, (A 0 , b 0 ) to (A 3 , b 3 ) are assumed to be the compensation parameters of the four corner sub-blocks of the target block.
[0194] The video encoding apparatus uses the compensation parameters of the four corner sub-blocks to interpolate the compensation parameters of the other sub-blocks. Bi-linear interpolation using the four corner sub-blocks may be used, or one-dimensional interpolation may be used. For example, the first row of the sub-block in the current block is (A 0 , b 0 ) and (A 1 , b 1 ) is used to interpolate. The first column of the subblock in the target block is 0 , b 0 ) and (A 2 , b 2 In this manner, the compensation parameters for all the sub-blocks are derived.
[0195] Here, the filter coefficients or weights used for the interpolation are set according to the difference between the position of the corner sub-block and the position of the target sub-block (or the distance between the corner sub-block and the target sub-block). The smaller the position difference, the larger the weight is given.
[0196] Alternatively, the filter coefficients or weights used for the interpolation may be set according to the difference between the motion vectors used to derive the compensation parameters of the corner sub-blocks (the control point motion vectors of the upper left, upper right, lower left, and lower right corners of the target block, or the affine motion vectors of the upper left, upper right, lower left, and lower right 4×4 sub-blocks of the target block) and the affine motion vectors of the target sub-block. The smaller the difference between the motion vectors, the larger the weight is given.
[0197] 2.2 When the target block is divided into two regions Even when the target block is divided into two regions, the illumination compensation parameters for each region are derived in the same manner as when the target block is divided into four regions. For example, referring to FIG. 16, the video encoding apparatus uses the reconstructed sample T 0 ~T w-1 and the reconstructed sample adjacent to the left of the upper region (L 0 ~L H / 2-1 ) is selected. A reference area in the reference picture is determined using the representative motion vector of the upper area, and the reconstructed samples adjacent to the upper and left sides of the reference area are selected as reference samples.
[0198] The representative motion vector of the upper region is the upper left corner control point motion vector of the target block. Alternatively, it is a motion vector derived from the control point motion vector of the target block. For example, the affine motion vector of the upper left 4×4 sub-block in the upper region may be used, or the affine motion vector corresponding to the center point of the upper region. As another example, the average value of the affine motion vectors of the sub-blocks in each region may be used as the representative motion vector of the corresponding region.
[0199] The video encoding device uses the reconstructed sample T 0 ~T w‐1 and the already restored sample adjacent to the left of the lower region (L H / 2 ~L H-1 ) is selected. A reference area in the reference picture is determined using the representative motion vector of the lower area, and the reconstructed samples adjacent to the upper and left sides of the reference area are selected as reference samples.
[0200] The representative motion vector of the lower region is the lower left corner control point motion vector of the target block. Alternatively, it is a motion vector derived from the control point motion vector of the target block. For example, the affine motion vector of the lower left 4×4 sub-block in the lower region may be used, or it may be an affine motion vector corresponding to the center point of the lower region. As another example, the average value of the affine motion vectors of the sub-blocks in the lower region may be used as the representative motion vector of the lower region.
[0201] In the above, the representative motion vector of each region is used as a method for determining a reference sample in the reference picture to be used for deriving the compensation parameters, but the affine motion vector of the sub-block in each region may be used instead of the representative motion vector of each region. That is, for each region, a 4×4 reference block at a position indicated by the affine motion vector of the 4×4 sub-block is determined in the reference picture, and adjacent pixels already restored to the upper and left of the 4×4 reference block are selected as reference pixels.
[0202] The video encoding apparatus derives compensation parameters for each region by inputting a reference sample selected in a reference picture and a reference sample selected in a current picture to x and y in [Equation 15], respectively. Then, the video encoding apparatus performs illumination compensation on a predicted sample (a predicted sample generated through affine motion prediction) in the region using the illumination compensation parameter of the region. Each sub-block is compensated using the illumination compensation parameter of the region to which it belongs.
[0203] Alternatively, the video encoding device may interpolate illumination compensation parameters for each sub-block using illumination compensation parameters for each region, as in the case of dividing the target block into four regions, and perform illumination compensation for each sub-block using the interpolated parameters.
[0204] Interpolation is applied when the representative motion vectors of each region used to derive the compensation parameters relate to a specific position of each region, for example, the control point motion vectors of the upper left and lower left corners of the target block, or the affine motion vectors of the upper left and lower left 4×4 sub-blocks of the target block, etc. are used as the representative motion vectors. In this case, the compensation parameters of the two regions are regarded as the illumination compensation parameters of the upper left and lower left corner sub-blocks TL and BL in the target block, as shown in FIG.
[0205] The video coding device uses the compensation parameters (A 0 , b 0 ) and the compensation parameters in the lower region (A2 , b 2 ) to interpolate the compensation parameters of the target subblock. In this case, the weights are assigned according to the distance between the upper left and lower left corner subblocks in the target block and the target subblock. Alternatively, they may be set according to the difference between the motion vectors used to derive the compensation parameters of the two regions (the control point motion vectors of the upper left and lower left corners of the target block, or the affine motion vectors of the upper left and lower left 4×4 subblocks of the target block) and the affine motion vector of the target subblock. The smaller the difference between the motion vectors, the larger the weight is assigned.
[0206] Even when the target block is divided vertically into two regions, the same method as when it is divided horizontally into two regions is applied. In this case, the representative motion vectors of the two regions (left region and right region) are, for example, the motion vectors of the control points of the upper left and upper right corners of the target block, or the affine motion vectors of the upper left and upper right 4×4 sub-blocks of the target block. Alternatively, the affine motion vector of the center point of each region, or the average value of the affine motion vectors of the sub-blocks of each region, may be used as the representative motion vector of each region. Other operations are the same as those in the horizontal division described above, or can be derived trivially therefrom, and therefore further detailed description will be omitted.
[0207] 2.3 Dividing the target block into more than four subblocks As described above, the target block may be divided into 2m and 2n (m and n are integers equal to or greater than 2) in the horizontal and vertical directions, respectively. Alternatively, the target block may be divided into sub-blocks, which are units for performing affine motion prediction of the target block. Such an example is shown in FIG. 18.
[0208] Referring to FIG. 18, the video encoding device derives illumination compensation parameters for the upper left region TL, upper right region TR, lower left region BL, and lower right region BR of the target block using the method described in 2.1.
[0209] For the remaining regions excluding these four regions, the interpolation described in 2.1 is applied to derive the illumination compensation parameters for the remaining regions.
[0210] Alternatively, the illumination compensation parameters for the remaining regions may be derived in the same manner as for the upper left region TL, the upper right region TR, the lower left region BL, and the lower right region BR. For example, for region A, the video encoding apparatus selects a reconstructed sample located at the upper side of region A and adjacent to the target block and a reconstructed sample located at the left side of region A and adjacent to the target block as reference pixels in the current picture. Then, a reference sample in the reference picture is selected using a motion vector of the upper left corner control point of region A, an affine motion vector of a 4×4 sub-block located at the upper left of region A, or an affine motion vector of the center point of region A. The selected reference sample is used to derive the illumination compensation parameters for region A.
[0211] The illumination compensation technique described above uses a motion vector that can be obtained through affine motion prediction and a reconstructed sample. Therefore, the video decoder performs illumination compensation in the same manner as the video encoder. No additional information for the illumination compensation process is required to be signaled from the video encoder to the video decoder.
[0212] Meanwhile, the above-mentioned illumination compensation technique may be used with other coding tools that compensate for motion on a sub-block basis for a target block other than affine motion prediction. For example, it may be applied to bidirectional optical flow. The video encoding and decoding apparatus performs sub-block-based bidirectional optical flow on a target block to generate prediction samples for each sub-block, and additionally performs the above-mentioned illumination compensation technique on the prediction samples in the target block. The illumination compensation technique applied to the bidirectional optical flow is the same as the above-mentioned illumination compensation technique, except for the following.
[0213] In the above-mentioned illumination compensation technique, the control point motion vector of the target block or the affine motion vector of the sub-block is used to divide the target block and calculate the representative motion vector of each region divided from the target block. However, in the case of bidirectional optical flow, the control point motion vector or the affine motion vector does not exist. Therefore, the illumination compensation technique applied to the bidirectional optical flow uses the optical flow (vx, vy) of the sub-block instead of the control point motion vector or the affine motion vector of the sub-block.
[0214] V. Syntax Signaling Yet another aspect of the present disclosure relates to high-level syntax signaling techniques for controlling the on / off of the various tools mentioned above.
[0215] The above-mentioned affine motion prediction, sample-by-sample adjustment for affine motion prediction samples, adaptive motion vector resolution, and illumination compensation are coding tools for improving the efficiency of video coding. However, in the case of certain content, such as screen content, the above-mentioned various coding tools may not contribute to improving compression performance. Therefore, signaling whether each coding tool can be applied or determining whether to apply each coding tool for each coding unit to be coded would rather reduce coding efficiency or increase computational complexity. The present disclosure provides a signaling technique for efficiently controlling the above-mentioned coding tools.
[0216] The video coding apparatus encodes a first high level syntax element at a sequence level for indicating whether to disable all of the above-mentioned coding tools for coding a sequence of pictures, the first high level syntax element being encoded in a header of the sequence, i.e., an SPS, where the coding tools include affine motion prediction and at least one of sample-wise adjustment to affine motion prediction samples, adaptive motion vector resolution, and illumination compensation.
[0217] If the first syntax element indicates that all coding tools are disabled, then no coding tools are applied to the coding of the sequence, i.e., none of the coding tools are applied to any pictures in the sequence.
[0218] When the first high level syntax element indicates that multiple coding tools are not disabled, multiple coding tools can be used to encode the corresponding sequence. For example, affine motion prediction can be applied to all pictures in the sequence. Thus, the video encoding apparatus encodes a coding unit flag indicating whether or not affine motion prediction is applied to each coding unit, and transmits the encoded coding unit flag to the video decoding apparatus. When the coding unit flag indicates that affine motion prediction is applied to the coding unit, the video decoding apparatus performs the above-mentioned affine motion prediction on the coding unit.
[0219] On the other hand, when the first high level syntax element indicates that the multiple coding tools are not disabled, the video encoding device encodes one or more second high level syntax elements that indicate, for at least some of the multiple coding tools, whether each coding tool is allowed at the sequence level or the picture level.
[0220] In some embodiments for encoding one or more second high level syntax elements, the video encoding apparatus encodes, for each coding tool, a sequence level flag in the SPS indicating whether the coding tool is allowed. If the sequence level flag indicates that the coding tool is not allowed, the coding tool is not used to encode a picture belonging to the sequence. Then, the video encoding apparatus encodes a picture level flag indicating whether the coding tool is allowed in a picture header (i.e., PPS) of each picture belonging to the sequence depending on a value of the sequence level flag. For example, if the sequence level flag indicates that the coding tool is allowed at the sequence level, the video encoding apparatus encodes a picture level flag to indicate whether the coding tool is allowed at the picture level. If the first high level syntax element indicates that all of the coding tools are disabled or if the sequence level flag indicates that the coding tool is not allowed at the sequence level, the picture level flag is not separately encoded. In this case, the video decoding apparatus automatically sets the picture level flag to a value indicating that the coding tool is not allowed.
[0221] Meanwhile, picture level flags for other coding tools other than affine motion prediction may be signaled depending on the picture level flag for affine motion prediction. When the picture level flag for affine motion prediction indicates that affine motion prediction is not allowed at the picture level, the picture level flags for other coding tools are not coded and the other coding tools are not allowed at the picture level. If the picture level flags for other coding tools are not included in the bitstream, the video decoding apparatus sets the respective picture level flags to a value indicating that the corresponding coding tool is not allowed at the picture level.
[0222] The video decoder can set whether or not a corresponding coding tool is acceptable at a picture level based on a picture level flag signaled from the video encoder or a picture level flag whose value is automatically set.
[0223] Alternatively, the second high level syntax element for affine motion prediction may be omitted. In this case, the affine motion prediction is controlled at the sequence level by the first high level syntax. After decoding the first high level syntax from the video encoder, the video decoder determines at the sequence level whether affine motion prediction is allowed.
[0224] According to the above-mentioned syntax structure, the video encoder adaptively determines whether to allow a coding tool at either the sequence level or the picture level, and the video decoder adaptively determines whether to allow a coding tool at either the sequence level or the picture level by decoding the syntax signaled from the video encoder.
[0225] In some other embodiments for encoding one or more second high level syntax elements, the picture level flags of the above embodiments may be replaced with slice level flags. That is, when the sequence level flag indicates that a corresponding coding tool is permitted at the sequence level, the video encoding apparatus encodes a slice level flag in the slice header to indicate whether the corresponding coding tool is permitted at the slice level. When the sequence level flag indicates that the corresponding coding tool is not permitted, the slice level flag is not encoded. The video encoding apparatus may adaptively determine whether the coding tool is permitted at the sequence level and the slice level. The video decoding apparatus may determine whether each tool is permitted at the slice level via the slice level flag.
[0226] In some or other embodiments for encoding one or more second high level syntax elements, the sequence level flag may be omitted. The picture level flag or slice level flag is signaled depending on the first high level syntax element. When the first high level syntax element indicates that multiple coding tools are allowed, the picture level flag or slice level flag is encoded in the picture header or slice header.
[0227] It should be understood that the exemplary embodiments described above can be embodied in many different ways. The functionality described in one or more examples can be embodied in hardware, software, firmware, or any combination thereof. It should be understood that the functional components described herein are labeled as "units" to specifically emphasize their implementation independence.
[0228] Meanwhile, various functions or methods described in this disclosure may be embodied in instructions stored on a non-transitory recording medium that can be read and executed by one or more processors. Non-transitory recording media include, for example, any type of recording device that stores data in a format readable by a computer system. For example, non-transitory recording media include storage media such as erasable programmable read only memory (EPROM), flash drives, optical drives, magnetic hard drives, solid state drives (SSD), etc.
[0229] The above description is merely an illustrative example of the technical idea of the present embodiment, and a person having ordinary skill in the art to which the present embodiment belongs may make various modifications and variations without departing from the essential characteristics of the present embodiment. Therefore, the present embodiment is intended to illustrate, rather than limit, the technical idea of the present embodiment, and the scope of the technical idea of the present embodiment is not limited by such an embodiment. The scope of protection of the present embodiment should be interpreted according to the claims, and all technical ideas within the scope equivalent thereto should be interpreted as being included in the scope of the present embodiment.
[0230] Claiming priority This patent application claims priority to patent application number 10-2019-0070633, filed in Korea on June 14, 2019, patent application number 10-2019-0082010, filed in Korea on July 8, 2019, and patent application number 10-2020-0072332, filed in Korea on June 15, 2020, the entireties of which are incorporated herein by reference. [Explanation of symbols]
[0231] 110 Picture division section 120, 540 Prediction Department 122, 542 Intra prediction section 124, 544 Inter Prediction Section 130 Subtractor 140 Conversion unit 145 Quantization section 150, 515 Sorting section 155 Entropy coding unit 160, 520 Inverse quantization section 165, 530 Reverse conversion unit 170, 550 Adder 180, 560 Loop filter section 182, 562 Deblocking Filter 184, 564 SAO filter 186,566 ALF 190,570 Memory 510 Entropy Decoding Unit
Claims
1. A video decoding device for decoding a sequence of coded pictures in a block unit, comprising: The video decoding device comprises: Decoding a first high level syntax element from the bitstream to set, at a sequence level, whether affine motion prediction is allowed; determining at a picture level whether each of the at least one coding tool is allowed by decoding one or more second high level syntax elements for each of the at least one coding tool from the bitstream depending on the first high level syntax element; wherein the at least one coding tool includes sample-by-sample adjustment of affine motion prediction samples; Furthermore, when the sequence level setting indicates that the affine motion prediction is allowed, the prediction device determines a plurality of control point motion vectors (affine motion predictions) of the current block encoded using the affine motion prediction, and performs affine motion prediction in units of sub-blocks having a size of 4×4 or 8×8 using the control point motion vectors to generate affine prediction samples for each sub-block in the current block; When it is determined based on the picture level setting that sample-by-sample adjustment of the affine motion prediction sample is allowed for the current picture including the target block, the prediction device modifies the sample value of the affine prediction sample by compensating for motion according to the sample position within each sub-block based on the control point motion vector of the target block.
2. 2. The video decoding apparatus according to claim 1, wherein the first high level syntax element is decoded from a header of the sequence.
3. a decoding device for decoding the one or more second high level syntax elements for sample-by-sample adjustment of the affine motion prediction samples, when the first high level syntax element indicates that the affine motion prediction is allowed, decoding a sequence level flag from a header of the sequence indicating whether sample-by-sample adjustments to the affine motion prediction samples are allowed; 3. The video decoding device of claim 2, further comprising: a picture level flag indicating whether sample-by-sample adjustment of the affine motion prediction samples is allowed or not from the picture header of each picture belonging to the sequence, depending on the sequence level flag.
4. 4. The video decoding device of claim 3, wherein when the first high level syntax element indicates that the affine motion prediction is not allowed or the sequence level flag indicates that the sample-based adjustment is not allowed, the picture level flag is not decoded from the picture header and is set to a value indicating that the sample-based adjustment is not allowed.
5. 2. The video decoding apparatus of claim 1 , wherein when the first high level syntax element indicates that the affine motion prediction is not allowed, the affine motion prediction and all of the at least one coding tool are not allowed for all pictures in the sequence.
6. said prediction device for modifying sample values of said affine prediction samples, generating a motion offset using the control point motion vectors of the target block, the motion offset being due to a difference between a sample position in the target sub-block to be modified and a center of the target sub-block; generating horizontal and vertical gradients for sample positions within the target sub-block; generating sample offsets for affine prediction samples corresponding to sample positions within the current sub-block using the horizontal and vertical gradients and the motion offsets; 2. The video decoding apparatus according to claim 1, further comprising: adding the sample offset to a sample value of an affine predicted sample corresponding to the sample position.
7. 7. The video decoding apparatus of claim 6, wherein the motion offset generated for a sample position in the current sub-block is reused as a motion offset for the same sample position in another sub-block of the current block.
8. 1. An apparatus for block-by-block coding of a sequence of coded pictures, comprising: The encoding device encoding a first high level syntax element at a sequence level in a header of the sequence for indicating whether affine motion prediction and at least one coding tool are all disabled; wherein the at least one coding tool includes sample-by-sample adjustment of affine motion prediction samples; further encoding one or more second high level syntax elements dependent on the first high level syntax element, for each of the at least one coding tool, for indicating a sequence level or picture level setting for whether the coding tool is allowed; The prediction device, when the first high level syntax element indicates that all of the at least one coding tool are not disabled, determines a plurality of control point motion vectors for a current block to be coded by affine motion prediction, and generates affine prediction samples for each sub-block by performing affine motion prediction in units of sub-blocks having a size of 4×4 or 8×8 using the control point motion vectors; When sample-by-sample adjustment of the affine motion prediction sample is allowed for a current picture including the target block, the prediction device corrects the sample value of the affine prediction sample by compensating for motion according to a sample position within each of the sub-blocks based on a control point motion vector of the target block.
9. Encoding the one or more second high level syntax elements for sample-by-sample adjustment of the affine motion prediction samples comprises: when the first high level syntax element indicates that the affine motion prediction is allowed, encoding a sequence level flag in a header of the sequence indicating whether sample-by-sample adjustments to the affine motion prediction samples are allowed; 9. The video encoding device according to claim 8, further comprising: encoding a picture level flag indicating whether the sample-by-sample adjustment is permitted or not in a picture header of each picture belonging to the sequence, the picture level flag being dependent on the sequence level flag.
10. In the prediction device, the step of correcting the sample values of the affine prediction samples comprises: using the control point motion vectors of the current block to generate a motion offset due to the difference between a sample position in the current block to be modified and the center of the current block; generating horizontal and vertical gradients for sample positions within the target sub-block; using the horizontal and vertical gradients and the motion offsets to generate sample offsets for affine prediction samples that correspond to sample positions within the current sub-block; and 9. The video encoding apparatus according to claim 8, further comprising: adding the sample offset to a sample value of an affine predicted sample corresponding to the sample position.
11. A method for providing video data to a video decoding device, comprising: encoding the video data into a bitstream; and transmitting the bitstream to the video decoding device, The method for encoding video data comprises: encoding a first high level syntax element at a sequence level in a header of the sequence for indicating whether affine motion prediction and at least one coding tool are all disabled; wherein the at least one coding tool includes sample-by-sample adjustment of affine motion prediction samples; further encoding one or more second high level syntax elements dependent on the first high level syntax element, for each of the at least one coding tool, for indicating a sequence level or picture level setting for whether the coding tool is allowed; When the first high level syntax element indicates that all of the at least one coding tool are not disabled, determining a plurality of control point motion vectors for a current block to be coded by affine motion prediction, and performing affine motion prediction in units of sub-blocks having a size of 4×4 or 8×8 using the control point motion vectors to generate affine prediction samples for each sub-block; A method for providing video data, characterized in that when sample-by-sample adjustment of the affine motion prediction samples is allowed for a current picture including the target block, sample values of the affine prediction samples are modified by compensating for motion according to sample positions within each of the sub-blocks based on a control point motion vector of the target block.
Citation Information
Patent Citations
Method and apparatus for video coding
WO2020191034A1
Adaptive motion vector difference resolution for affine mode
WO2020233659A1
