Video encoding device, video decoding method and device for providing bitstream

By deriving bidirectional prediction weight indexes in video encoding and decoding, and using control points in the affine merging candidate list to set weight indexes, the problem of insufficient encoding efficiency for high-resolution and high-frame-rate video data is solved, achieving higher encoding and decoding efficiency.

CN121547580APending Publication Date: 2026-02-17SK TELECOM CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202610039692.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2019-12-03
Filing Date
2020-06-26
Publication Date
2026-02-17

AI Technical Summary

Technical Problem

Existing video compression technologies are insufficient in encoding and decoding efficiency when dealing with high-resolution and high-frame-rate video data, failing to meet storage and transmission requirements.

Method used

By deriving a bidirectional prediction weight index and using control points in the affine merging candidate list to set the weight index, the encoding and decoding efficiency is improved.

Benefits of technology

It improves the prediction accuracy of video encoding and decoding, and enhances encoding and decoding efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121547580A_ABST
    Figure CN121547580A_ABST
Patent Text Reader

Abstract

The invention provides a video encoding apparatus, a video decoding method, and an apparatus for providing a bitstream. According to an embodiment of the present disclosure, provided is a method for deriving a bidirectional prediction weight index, the method for deriving a bidirectional prediction weight index of a constructed candidate included in an affine merge candidate list comprising the steps of: determining whether a plurality of target control points are available among control points set in a current block; if the target control point is available, checking a predicted direction and a reference picture of the target control point; and deriving a bi-directional prediction weight index from the bi-directional prediction weight index candidate of the target control point if the prediction directions of the target control point are all bi-directional and the reference pictures are the same.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of the original application No. 202080060741.2 (International Application No. PCT / KR2020 / 008386, filed on June 26, 2020, entitled "Method for deriving bi-prediction weight index and image decoding apparatus"). TECHNICAL FIELD

[0002] The present application relates to encoding and decoding of an image, and more particularly, to a method for deriving a bi-prediction weight index and a video decoding apparatus, in which encoding and decoding efficiency is improved by deriving a bi-prediction weight index more effectively. BACKGROUND

[0003] Since the volume of video data is larger than that of voice data or still image data, storing or transmitting video data without compression processing requires a large amount of hardware resources including a memory.

[0004] Therefore, when storing or transmitting video data, an encoder is generally used to compress video data for storage or transmission. Then, a decoder receives the compressed video data and decompresses and reproduces the video data. Compression techniques for such video include H.264 / AVC and High Efficiency Video Coding (HEVC), which has an encoding efficiency of about 40% higher than H.264 / AVC.

[0005] However, the size, resolution, and frame rate of video are gradually increasing, and accordingly, the amount of data to be encoded is also increasing. Therefore, there is a need for a new compression technique having better encoding efficiency and higher image quality than the existing compression techniques. SUMMARY

[0006] TECHNICAL PROBLEM

[0007] The present application aims to provide an improved video encoding and decoding technique to meet the above needs, and in particular, one aspect of the present application relates to a technique for improving encoding and decoding efficiency by deriving a weight index of a current block according to a direction in which a weight index set for a control point is given a greater weight among two directions.

[0008] TECHNICAL SOLUTION

[0009] According to at least one aspect, the disclosure provides a method of deriving a bi-prediction weight index of a constructed candidate included in an affine merge candidate list. The method includes determining whether a plurality of target control points are available among control points set for a current block; checking a prediction direction and a reference picture of the target control points when the target control points are available; and deriving the bi-prediction weight index of the constructed candidate from a bi-prediction weight index candidate of the target control points when all prediction directions of the target control points are bi-directional and the reference pictures of the target control points are the same.

[0010] According to another aspect, the disclosure provides a video decoding apparatus. The apparatus includes a determination unit configured to determine whether a plurality of target control points are available among control points set for a current block; a checking unit configured to check a prediction direction and a reference picture of the target control points when the target control points are available; and a derivation unit configured to derive a bi-prediction weight index of a constructed candidate included in an affine merge candidate list from a bi-prediction weight index candidate of the target control points when all prediction directions of the target control points are bi-directional and the reference pictures of the target control points are the same.

[0011] Technical effects

[0012] As described above, according to the embodiment of the present application, by more accurately representing motion through the affine prediction method, it is possible to improve prediction accuracy and improve encoding and decoding efficiency. BRIEF DESCRIPTION OF DRAWINGS

[0013] Figure 1 is an exemplary block diagram of a video encoding apparatus capable of implementing the technology of the disclosure.

[0014] Figure 2 An exemplary block partitioning structure using a QTBTTT structure is illustrated.

[0015] Figure 3 Various intra prediction modes are exemplarily illustrated.

[0016] Figure 4 is an exemplary block diagram of a video decoding apparatus capable of implementing the technology of the disclosure.

[0017] Figure 5 A diagram for describing a position of a spatial / temporal candidate block is exemplified.

[0018] Figure 6 A diagram for describing a type of an affine model is exemplified.

[0019] Figure 7 is a diagram for describing a method of deriving motion information of a sub-block array using an affine mode.

[0020] Figure 8 is a diagram for describing positions of neighboring blocks used in an affine mode.

[0021] Figure 9 is an exemplary block diagram of a prediction unit capable of implementing the techniques of the present invention.

[0022] Figure 10 is a flowchart for describing an example of deriving a bi-prediction weight index.

[0023] Figures 11 to 14 is a flowchart for describing various examples of deriving a bi-prediction weight index. DETAILED DESCRIPTION

[0024] Hereinafter, some embodiments of the present disclosure will be described in detail with reference to the accompanying drawings. It should be noted that, when adding reference numerals to constituent elements in the respective drawings, similar reference numerals refer to similar elements even though the elements are shown in different drawings. Also, in the following description of the present disclosure, detailed descriptions of known functions and configurations incorporated herein will be omitted to avoid obscuring the subject matter of the present disclosure.

[0025] Figure 1 is an exemplary block diagram of a video encoding apparatus capable of implementing the techniques of the present disclosure. Hereinafter, the video encoding apparatus and elements of the apparatus will be described with reference to Figure 1

[0026] The video encoding apparatus includes a block partitioner 110, a predictor 120, a subtractor 130, a transformer 140, a quantizer 145, an encoder 150, an inverse quantizer 160, an inverse transformer 165, an adder 170, a filter unit 180, and a memory 190.

[0027] Each element of the video encoding apparatus can be implemented in hardware or software, or a combination of hardware and software. The functions of the respective elements can be implemented in software, and a microprocessor can be implemented to perform the software functions corresponding to the respective elements.

[0028] ​A video is composed of a plurality of pictures. Each picture is divided into a plurality of regions, and encoding is performed for each region. For example, a picture is divided into one or more tiles and / or slices. Here, one or more tiles can be defined as a tile group. Each tile or slice is divided into one or more coding tree units (CTUs). Each CTU is divided into one or more coding units (CUs) in a tree structure. Information applied to each CU is coded as syntax of the CU, information commonly applied to CUs included in one CTU is coded as syntax of the CTU. Furthermore, information commonly applied to all blocks in one tile is coded as syntax of the tile or as syntax of a tile group that is a set of a plurality of tiles, and information applied to all blocks constituting one picture is coded in a picture parameter set (PPS) or a picture header. Furthermore, information commonly referred to by a plurality of pictures is coded in a sequence parameter set (SPS). In addition, information commonly referred to by one or more SPSs is coded in a video parameter set (VPS).

[0029] The block partitioner 110 determines the size of a coding tree unit (CTU). Information on the size of the CTU (CTU size) is coded as syntax of the SPS or the PPS, and is transmitted to the video decoding apparatus.

[0030] The block partitioner 110 divides each picture constituting a video into a plurality of CTUs having a predetermined size, and then recursively divides the CTUs using a tree structure. In the tree structure, a leaf node is used as a coding unit (CU), which is a basic unit of encoding.

[0031] The tree structure can be a quad tree (QT) in which a node (or parent node) is divided into four child nodes (or child nodes) having the same size, a binary tree (BT) in which a node is divided into two child nodes, a ternary tree (TT) in which a node is divided into three child nodes in a ratio of 1:2:1, or a structure formed by a combination of two or more of the QT structure, the BT structure, and the TT structure. For example, a QTBT (quad tree plus binary tree) structure or a QTBTTT (quad tree plus binary tree ternary tree) structure can be used. Here, BTTT can be collectively referred to as a multi-type tree (MTT).

[0032] Figure 2 A QTBTTT partition tree structure is shown. As Figure 2As shown, a CTU can be initially partitioned in a QT structure. QT partitioning can be repeated until the size of the partitioned block reaches the minimum block size of a leaf node allowed in QT (MinQTSize). A first flag (QT_split_flag) indicating whether each node of the QT structure is partitioned into four nodes of a lower level is encoded by the encoder 150 and signaled to the video decoding device. When a leaf node of the QT is not larger than the maximum block size of a root node allowed in BT (MaxBTSize), further partitioning in one or more of a BT structure or a TT structure can be performed. In the BT structure and / or TT structure, there can be multiple partition directions. For example, there can be two directions of horizontal and vertical partitioning of the node block. As shown, when MTT partitioning starts, a second flag (mtt_split_flag) indicating whether the node is partitioned, a flag indicating the partition direction (vertical or horizontal), and / or a flag indicating the partition type (binary or ternary) are encoded by the encoder 150 and signaled to the video decoding device. Figure 2

[0033] As another example of a tree structure, when a block is partitioned using a QTBTTT structure, information about a CU split flag (split_cu_flag) indicating that the block has been partitioned and a QT split flag (split_qt_flag) indicating that the partition type is QT partitioning are encoded by the encoder 150 and signaled to the video decoding device. When the value of the split_cu_flag indicates that the block has not been partitioned, the block of the node becomes a leaf node in the partition tree structure and is used as a coding unit (CU) which is the basic unit of encoding. When the value of the split_cu_flag indicates that the block has not been partitioned, the partition type is distinguished by the value of the split_qt_flag as being QT or MTT. When the partition type is QT, there is no additional information. When the partition type is MTT, a flag (mtt_split_cu_vertical_flag) indicating the MTT partition direction (vertical or horizontal) and / or a flag (mtt_split_cu_binary_flag) indicating the MTT partition type (binary or ternary) are encoded by the encoder 150 and signaled to the video decoding device.

[0034] ​As another example of tree structure, when QTBT is used, there can be two types of partitioning, which are node's block horizontal partitioning (i.e., symmetric horizontal partitioning) and vertical partitioning (i.e., symmetric vertical partitioning) into two blocks of the same size. A split flag indicating whether each node of the BT structure is partitioned into lower level blocks and split type information indicating the type of partitioning are encoded by the encoder 150 and transmitted to the video decoding device. There can be an additional type, which is partitioning a node's block into two asymmetric blocks. The asymmetric partitioning type can include a type that partitions a block into two rectangular blocks with a size ratio of 1:3, and a type that diagonally partitions a node's block.

[0035] According to the QTBT or QTBTTT partitioning of a CTU, a CU can have various sizes. Hereinafter, a block corresponding to a CU to be encoded or decoded (i.e., a leaf node of the QTBTTT) will be referred to as a "current block".

[0036] The predictor 120 predicts the current block to generate a prediction block. The predictor 120 includes an intra predictor 122 and an inter predictor 124.

[0037] In general, each current block in a picture can be predictively coded. The prediction of the current block can be performed using an intra prediction technique (performed based on data from the picture containing the current block) or an inter prediction technique (performed based on data from pictures that were coded before the picture containing the current block). Inter prediction includes both uni-directional prediction and bi-directional prediction.

[0038] The intra predictor 122 predicts pixels in the current block using pixels (reference pixels) in the current picture containing the current block that are located around the current block. According to a prediction direction, there are a variety of intra prediction modes. For example, as shown in Figure 3 , a plurality of intra prediction modes can include non-directional modes including a planar mode and a DC mode, and 65 directional modes. For each prediction mode, neighboring pixels to be used and a formula are defined differently.

[0039] The intra predictor 122 can determine an intra prediction mode to be used in encoding the current block. In some examples, the intra predictor 122 can encode the current block using several intra prediction modes and select an appropriate intra prediction mode to use from among the tested modes. For example, the intra predictor 122 can use rate-distortion analysis of several tested intra prediction modes to calculate rate-distortion values, and can select an intra prediction mode having the best rate-distortion characteristics among the tested modes.

[0040] The intra predictor 122 selects one of a plurality of intra prediction modes and predicts the current block using neighboring pixels (reference pixels) determined according to the selected intra prediction mode and a formula. Information about the selected intra prediction mode is encoded by the encoder 150 and transmitted to the video decoding apparatus.

[0041] The inter predictor 124 generates a prediction block of the current block through a motion compensation process. The inter predictor searches for a block most similar to the current block in a reference picture that is earlier encoded and decoded than the current picture, and generates a prediction block of the current block based on the searched block. Then, the inter predictor generates a motion vector corresponding to a displacement between the current block in the current picture and the prediction block in the reference picture. Generally, motion estimation is performed for a luminance component, and for both the luminance component and the chrominance component, a motion vector calculated based on the luminance component is used. Motion information including information about a reference picture used to predict the current block and information about the motion vector is encoded by the encoder 150 and transmitted to the video decoding apparatus.

[0042] The subtracter 130 generates a residual block by subtracting the prediction block generated by the intra predictor 122 or the inter predictor 124 from the current block.

[0043] The transformer 140 transforms a residual signal in the residual block having pixel values in a spatial domain into a transform coefficient in a frequency domain. The transformer 140 can transform the residual signal in the residual block using the total size of the current block as a transform unit. Alternatively, the transformer can split the residual block into sub-blocks of a transform area and a non-transform area, and transform the residual signal using only the sub-blocks of the transform area as a transform unit. Here, the transform area sub-block can be one of two rectangular blocks having a size ratio of 1:1 based on a horizontal axis (or a vertical axis). In this case, a flag (cu_sbt_flag) indicating that only the sub-block has been transformed, direction (vertical / horizontal) information (cu_sbt_horizontal_flag), and / or position information (cu_sbt_pos_flag) are additionally encoded by the encoder 150 and signaled to the video decoding apparatus. In addition, the size of the transform area sub-block can have a size ratio of 1:3 based on a horizontal axis (or a vertical axis). In this case, a flag (cu_sbt_quad_flag) for distinguishing the split is additionally encoded by the encoder 150 and signaled to the video decoding apparatus.

[0044] The quantizer 145 quantizes the transform coefficient output from the transformer 140 and outputs the quantized transform coefficient to the encoder 150.

[0045] Encoder 150 generates a bitstream by encoding the quantized transform coefficients using an encoding method such as context-based adaptive binary arithmetic coding (CABAC). Encoder 150 encodes information related to block segmentation, such as CTU size, CU segmentation flag, QT segmentation flag, MTT segmentation direction, and MTT segmentation type, so that the video decoding device and the video encoding device segment the blocks in the same way.

[0046] In addition, encoder 150 encodes information about the prediction type that indicates whether the current block is encoded by intra-frame prediction or inter-frame prediction, and encodes intra-frame prediction information (i.e., information about the intra-frame prediction mode) or inter-frame prediction information (information about the reference picture and motion vectors) according to the prediction type.

[0047] Inverse quantizer 160 inverse quantizes the quantized transform coefficients output from quantizer 145 to generate transform coefficients. Inverse transformer 165 transforms the transform coefficients output from inverse quantizer 160 from the frequency domain to the spatial domain and reconstructs the residual block.

[0048] Adder 170 adds the reconstructed residual block to the prediction block generated by predictor 120 to reconstruct the current block. Pixels in the reconstructed current block are used as reference pixels for intra-frame prediction of the next block.

[0049] Filter unit 180 filters the reconstructed pixels to reduce block artifacts, ringing artifacts, and blur artifacts caused by block-based prediction and transform / quantization. Filter unit 180 may include a deblocking filter 182 and a sample adaptive offset (SAO) filter 184.

[0050] Deblocking filter 182 filters the boundaries between reconstructed blocks to remove block artifacts caused by block-by-block encoding / decoding, and SAO filter 184 additionally filters the deblocked video. SAO filter 184 is a filter used to compensate for the differences between reconstructed pixels and original pixels caused by lossy encoding.

[0051] The reconstructed blocks, filtered by deblocking filter 182 and SAO filter 184, are stored in memory 190. Once all blocks in an image have been reconstructed, the reconstructed image is used as a reference image for inter-frame prediction of the next image to be encoded.

[0052] Figure 4 This is an exemplary functional block diagram of a video decoding device capable of implementing the technology of this disclosure. Referring below... Figure 4 Describe the video decoding device and its components.

[0053] The video decoding device may include a decoder 410, an inverse quantizer 420, an inverse converter 430, a predictor 440, an adder 450, a filter unit 460, and a memory 470.

[0054] and Figure 1 Similar to video encoding devices, each component of a video decoding device can be implemented as hardware or software, or a combination of both. Furthermore, the function of each component can be implemented as software, and a microprocessor can be implemented to execute the software function corresponding to each component.

[0055] Decoder 410 determines the current block to be decoded by decoding the bitstream received from the video encoding device and extracting information related to block segmentation, and extracts the prediction information required to reconstruct the current block and information about the residual signal.

[0056] Decoder 410 extracts information about the CTU size from the Sequence Parameter Set (SPS) or Picture Parameter Set (PPS), determines the size of the CTU, and segments the image into CTUs of the determined size. Then, the decoder identifies the CTU as the top level (i.e., the root node of the tree structure) and extracts segmentation information about the CTU to segment the CTU using the tree structure.

[0057] For example, when segmenting a CTU using the QTBTTT structure, the first flag (QT_split_flag) associated with QT segmentation is extracted, and each node is segmented into four nodes at the lower level. Then, for the node corresponding to a leaf node of QT, the second flag (MTT_split_flag) associated with MTT segmentation and information about the segmentation direction (vertical / horizontal) and / or segmentation type (binary / ternary) are extracted, and the leaf node is segmented using the MTT structure. In this way, each node below the leaf node of QT is recursively segmented using either a BT or TT structure.

[0058] As another example, when splitting a CTU using a QTBTTT structure, the CU split flag (split_cu_flag) indicating whether a CU has been split is first extracted. If the corresponding block is split, the QT split flag (split_qt_flag) is extracted. When the split type is not QT but MTT, additionally, flags indicating the MTT split direction (vertical or horizontal) (mtt_split_cu_vertical_flag) and / or the MTT split type (binary or ternary) (mtt_split_cu_binary_flag) are extracted. During the splitting process, each node may undergo zero or more recursive QT splits, followed by zero or more recursive MTT splits. For example, a CTU may be split immediately by MTT, or it may be split multiple times by QT only.

[0059] As another example, when using a QTBT structure and a first flag (QT_split_flag) associated with QT splitting to segment the CTU, each node is split into four nodes at the lower level. For the node corresponding to a leaf node of the QT, the split_flag indicating whether the node is to be further BT-splitted and the splitting direction information are extracted.

[0060] Once the current block to be decoded is determined through tree structure segmentation, decoder 410 extracts information indicating whether the current block underwent intra-frame prediction or inter-frame prediction. When the prediction type information indicates intra-frame prediction, decoder 410 extracts the syntax elements of the intra-frame prediction information (intra-frame prediction mode) for the current block. When the prediction type information indicates inter-frame prediction, decoder 410 extracts the syntax elements of the inter-frame prediction information, namely, information indicating the motion vector and the reference image to which the motion vector is referenced.

[0061] Decoder 410 extracts information about the quantization transform coefficients of the current block as information about the residual signal.

[0062] The inverse quantizer 420 performs inverse quantization on the quantized transform coefficients and inverse transforms the inverse quantized transform coefficients from the frequency domain to the spatial domain to reconstruct the residual signal, thereby generating the residual block of the current block.

[0063] Additionally, when the inverse transformer 430 performs inverse transformation only on a local region (sub-block) of the transform block, it extracts a flag (cu_sbt_flag) indicating that only the sub-block of the transform block has been transformed, as well as orientation information (vertical / horizontal) (cu_sbt_horizontal_flag) and / or sub-block position information (cu_sbt_pos_flag) about the sub-block. Then, the residual signal is reconstructed by inverse transforming the transform coefficients of the sub-block from the frequency domain to the spatial domain. For regions that have not been inversely transformed, the residual signal is padded with "0". Thus, the final residual block of the current block is created.

[0064] Predictor 440 may include intra-predictor 442 and inter-predictor 444. Intra-predictor 442 is activated when the prediction type of the current block is intra-prediction, and inter-predictor 444 is activated when the prediction type of the current block is inter-prediction.

[0065] The intra predictor 442 determines the intra prediction mode of the current block among multiple intra prediction modes based on the syntax elements of the intra prediction mode extracted from the decoder 410, and predicts the current block based on the reference pixels around the current block according to the intra prediction mode.

[0066] The inter-frame predictor 444 determines the motion vector of the current block and the reference picture to which the motion vector is referenced based on the syntax elements of the intra-frame prediction mode extracted from the decoder 410, and predicts the current block based on the motion vector and the reference picture.

[0067] Adder 450 reconstructs the current block by adding the residual block output from the inverse transform and the prediction block output from the inter-frame predictor or intra-frame predictor. Pixels in the reconstructed current block are used as reference pixels for intra-frame prediction of blocks to be decoded later.

[0068] Filter unit 460 may include a deblocking filter 462 and a SAO filter 464. Deblocking filter 462 performs deblocking filtering on the boundaries between reconstructed blocks to remove block artifacts caused by block-by-block decoding. SAO filter 464 performs additional filtering on the reconstructed blocks after deblocking to compensate for differences between reconstructed pixels and original pixels caused by lossy encoding. The reconstructed blocks filtered by deblocking filter 462 and SAO filter 464 are stored in memory 470. When all blocks in an image have been reconstructed, the reconstructed image is used as a reference image for inter-frame prediction of blocks in subsequent images to be encoded.

[0069] Inter-frame prediction methods can be classified into skip mode, merge mode, and adaptive (or advanced) motion vector predictor (AMVP) mode.

[0070] In skip mode, the video encoding device signals any motion information candidate from the motion information candidates of neighboring blocks surrounding the current block to the video decoding device. In merge mode, any motion information candidate from the motion information candidates of neighboring blocks and information about the residual generated by prediction are encoded and signaled. In AMVP mode, the motion information of the current block and information about the residual generated by prediction are encoded and signaled.

[0071] In skip and merge modes, motion information signaled by a signal is represented as an index (merge index) value indicating any motion information candidate (in other words, any motion information candidate included in the candidate list). In AMVP mode, motion information signaled by a signal is represented as the difference between the motion information of the adjacent block and the motion information of the current block (motion vector difference (MVD)).

[0072] The video encoding device signals each flag (cu_skip_flag and merge_flag) used to distinguish between skip mode and merge mode, and signals the merge index (merge_idx) based on the flag values. The method of building the candidate list or signaling the merge index in skip mode can be performed in the same manner as in merge mode. In AMVP mode, prediction direction information (inter_pred_idc), reference picture indexes (ref_idx_l0 and ref_idx_l1), information indicating candidates for motion information to be used to predict the current block (mvp_l0_flag and mvp_l1_flag), and MVDs can be signaled. In this case, the number of MVDs signaled is determined based on the number of prediction directions. For example, one MVD is signaled in the case of unidirectional prediction, while two MVDs are signaled in the case of bidirectional prediction.

[0073] In skip mode, the current block size can be 2N×2N, while in merge mode, the current block size can be 2N×2N, 2N×N, N×2N, or an asymmetric partition. When the current block has a size of 2N×2N and all transform coefficients are zero, the current block is classified as being in skip mode. In AMVP mode, the current block size can be 2N×2N, 2N×N, N×2N, or an asymmetric partition.

[0074] The information that the video encoding device signals to the video decoding device in skip mode, merge mode, and AMVP mode is shown in Tables 1 to 3.

[0075] [Table 1]

[0076]

[0077] [Table 2]

[0078]

[0079] [Table 3]

[0080]

[0081] The candidate lists for skip and merge modes can include up to four spatial candidates, up to one temporal candidate, combined bidirectional candidates, and zero motion vector candidates. Video encoding / decoding devices can then categorize them according to spatial candidates. Time Candidate Combined bidirectional candidates The candidate list is constructed by ordering the zero motion vector candidates.

[0082] Figure 5The image illustrates the locations of candidate blocks used for spatial and temporal candidates. Figure 5 In (a), the location of the spatial candidate block adjacent to the current predicted block (PU) is illustrated, while Figure 5 (b) illustrates the location of the temporal candidate block based on the co-location PU.

[0083] Video encoding and decoding equipment can conform to A1 B1 B0 A0 B2 searches for spatial candidate blocks in sequence to set up to four spatial candidate blocks. Furthermore, video encoding / decoding devices can follow the order of H... C searches for time candidate blocks in sequence to set up to one time candidate. When a newly derived candidate has the same motion information as a candidate already included in the candidate list, that candidate's motion information cannot be included in the candidate list. In other words, duplicate data (candidates) is not allowed.

[0084] In the skip, merge, and AMVP modes described above, only a single motion vector is used to represent the movement of the current block, thus only translational motion can be represented. Therefore, these modes cannot handle complex motions such as rotational motion or expansion / contraction (scaling) motion.

[0085] To overcome such limitations, this invention proposes a motion compensation method or affine mode based on an affine model that uses two or more motion vectors to represent the motion of the current block.

[0086] Affine modes can be divided into affine skip mode, affine merge mode, and affine AMVP mode. The motion vectors used in affine modes can be called control point motion vectors (CPMV), and the control point (CP) can refer to a specific position associated with the current block used in the affine mode.

[0087] Affine models can be categorized into two types based on the number of CPMVs. In the affine model, the first affine model is a 4-parameter model using two CPMVs (x and y) (see...). Figure 6 (a) in the middle), while the second affine model is a 6-parameter model using three CPMVs (see (a) in the middle). Figure 6 (b) CPMV(x and y). Figure 6 In this context, CP0 represents the first CP set for the current block (the 0th CP based on the assignment number), CP1 represents the second CP set (the 1st CP based on the assignment number), and CP2 represents the third CP set (the 2nd CP based on the assignment number).i Represented as the i-th 905CP i CPMV settings i .

[0088] In affine mode, you can perform 1) derive CPMV based on affine skip mode, affine merge mode, or affine AMVP mode, 2) derive or generate motion vector arrays of the sub-blocks included in the current block using the derived CPMV, and 3) perform motion compensation for each sub-block using the motion vector arrays of the sub-blocks.

[0089] 1) Derive CPMV based on affine skip mode, affine merge mode, or affine AMVP mode.

[0090] In affine skip mode and affine merge mode, a signal indicating whether the mode is affine merge mode is used (merge_subblock_flag). merge_subblock_flag can be a flag indicating whether inter-frame prediction parameters based on sub-blocks are inferred from neighboring blocks. When merge_subblock_flag=1 (on), a signal indicating the index (merge_subblock_idx) of any candidate included in the specified candidate list (either a sub-block-based merge candidate list or an affine merge candidate list) is used. The CPMV of the candidate specified by the index is inferred as the CPMV of the current block. The method for constructing the candidate list is described below.

[0091] Table 4 shows the grammatical structure of the above process.

[0092] [Table 4]

[0093]

[0094] In Affine AMVP mode, a signal is used to indicate whether the Affine AMVP mode is applied (inter_affine_flag). When inter_affine_flag = 1 (on), a signal is also used to indicate the affine model (type of the affine model) flag (cu_affine_type_flag). When cu_affine_type_flag = 1, the affine model can be a 6-parameter model, and when cu_affine_type_flag = 0, the affine model can be a 4-parameter model.

[0095] In addition, motion information used for the affine AMVP model is signaled. This signaled motion information can include prediction direction information (inter_pred_idc), reference image indices (ref_idx_l0 and ref_idx_l1), MVP indices (mvp_l0_flag and mvp_l1_flag), and MVDs. The number of MVDs signaled is determined by the prediction direction and the affine model. For example, when the prediction is unidirectional and the affine model is a 4-parameter model, two MVDs are signaled, while when the prediction is unidirectional and the affine model is a 6-parameter model, three MVDs are signaled. As another example, when the prediction is bidirectional and the affine model is a 4-parameter model, four MVDs are signaled, and when the prediction is bidirectional and the affine model is a 6-parameter model, six MVDs are signaled. The method for signaling MVDs is the same as in the AMVP model.

[0096] Table 5 shows the syntactic structure of the above process.

[0097] [Table 5]

[0098]

[0099] 2) Use the derived CPMV to derive or generate the motion vector array of the sub-blocks included in the current block.

[0100] When the affine model is a 4-parameter model, two CPMVs are derived, while when the affine model is a 6-parameter model, three CPMVs are derived.

[0101] When the affine model is a 4-parameter model, the motion vectors of the sub-blocks included in the current block (CU) can be derived using two derived CPMVs (v0 and v1), such as... Figure 7 As shown, such a process can be performed using Equation 1.

[0102] [Formula 1]

[0103]

[0104] In Equation 1, mv x and MV y The motion vector of the sub-block, mv 0x and MV 0y Indicates CPMV0, mv 1x and MV 1y Let CPMV1 be an example, where x and y represent the sample position located at the top left of the sub-block, W represents the width of the current block, and H represents the height of the current block.

[0105] When the affine model is a 6-parameter model, the motion vectors of the sub-blocks included in the current block can be derived using the three derived CPMVs. This process can be performed using Equation 2.

[0106] [Equation 2]

[0107]

[0108] In Equation 2, mv 2x and MV 2y This indicates CPMV2.

[0109] 3) Perform motion compensation for each sub-block using the motion vector array of the sub-blocks.

[0110] The current block can be predicted by performing motion compensation for each sub-block using the motion vector of each sub-block. When the prediction direction is bidirectional (inter_pred_idc=bi), the final prediction value can be generated by applying bidirectional prediction weights to each bidirectional prediction value.

[0111] Equation 3 can be used to perform the process of generating the final predicted value using bidirectional prediction weights.

[0112] [Formula 3]

[0113]

[0114] In Equation 3, P bi-pred P0 represents the predicted value in the direction of list 0, P1 represents the predicted value in the direction of list 1, and w represents the bidirectional prediction weight.

[0115] The bidirectional prediction weights are set to the values ​​indicated by the bidirectional prediction weight index (bcw_idx). Table 6 shows bcw_idx and its bidirectional prediction weights.

[0116] [Table 6]

[0117]

[0118] In affine AMVP mode, the video encoding device can signal the video decoding device bcw_idx. In affine merge mode or affine skip mode, bcw_idx can be derived from the motion information of the candidates indicated by merge_subblock_idx.

[0119] 4) The process of constructing the candidate list

[0120] The candidate list for affine merging modes (including affine skipping modes) (sub-block-based merging candidate list or affine merging candidate list) may include sub-block temporal MVP (SBTMVP), inherited candidates, constructed candidates, and zero motion vector candidates.

[0121] Inherited candidates can be included in the candidate list if the current number of candidates in the candidate list is less than the maximum number of candidates the candidate list can include. Constructed candidates can also be included in the candidate list if the current number of candidates in the candidate list is less than the maximum number of candidates.

[0122] Succession candidates can refer to neighboring blocks predicted using affine patterns (or motion information of neighboring blocks already predicted using affine patterns). Video encoding / decoding devices can use blocks that have been predicted using affine patterns from the neighboring blocks of the current block as succession candidates and include these blocks in the candidate list.

[0123] Candidates to be constructed can refer to candidates derived from blocks that have already been predicted in the general inter-frame mode. The video encoding / decoding device can generate affine models from the neighboring blocks of the current block that have already been predicted in the general inter-frame mode, and can use the generated affine models as candidates to be constructed and allow the generated affine models to be included in the candidate list.

[0124] Figure 8 The example illustrates the positions of adjacent blocks used to deduce the inheritance candidate and the constructed candidate.

[0125] A video encoding / decoding device can derive a successor candidate from its left neighboring blocks A0 and A1, and a successor candidate from its top neighboring blocks B0, B1, and B2. According to A0... A1 searches for left-neighboring blocks in order, and the first neighboring block predicted by the affine pattern can be deduced as an inheritance candidate. Furthermore, it can be done according to B0... B1 B2 searches for top-neighbor blocks in sequence and can deduce the first neighbor block predicted in affine mode as an inheritance candidate. In this case, when the motion of the deduced inheritance candidate is bidirectional, bcw_idx is also included in the motion information of the corresponding inheritance candidate.

[0126] The video encoding / decoding device can 1) derive MVs (up to four MVs) for each CP set for the current block (CU); and 2) build candidates from the derived MV derivations to generate an affine model.

[0127] 1) Derive the MV for each CP set for the current block.

[0128] Video encoding / decoding devices can search for neighboring blocks of the current block in a preset order and set the motion information of the neighboring blocks predicted in a general inter-frame mode as the motion information (MV) of the corresponding CP.

[0129] The motion information for the first CP0 (top-left control point) of the current block can be set from any of the motion information of B2, B3, and A2, which are adjacent blocks located to the upper left of the current block. The motion information for the second CP1 (top-right control point) of the current block can be set from any of the motion information of B1 and B0, which are adjacent blocks located to the upper right of the current block. Furthermore, the motion information for the third CP2 (lower-left control point) of the current block can be set from any of the motion information of A1 and A0, which are adjacent blocks located to the lower left of the current block. The motion information for the fourth CP3 (lower-right control point) of the current block can be set from the motion information of block RB, which is a juxtaposed adjacent block (time-adjacent block) located to the lower right of the current block.

[0130] Specifically, in the general inter-frame mode according to B2 B3 The motion information of the first adjacent block predicted by A2 can be set as the MV (motion information) of CP0, and then processed according to B1 in a general inter-frame mode. The motion information of the first adjacent block predicted by the order of B0 can be set as the MV of CP1, and then processed according to A1 in a general inter-frame mode. The motion information of the first adjacent block of A0, whose order has been predicted, can be set as the MV of CP2, and the motion information of block RB, which is a temporally adjacent block, can be set as the MV of CP3.

[0131] Video encoding / decoding devices can enable CPs (Content Processors) that contain motion information.

[0132] 2) Candidate (affine model) models are constructed using up to four MV derivations.

[0133] Video encoding / decoding devices can derive up to six affine models (four 6-parameter models + two 4-parameter models) from a set set of CPs. The CPs used to derive up to six affine models are as follows: {CP0, CP1, and CP2}, {CP0, CP1, and CP3}, {CP0, CP2, and CP3}, {CP1, CP2, and CP3}, {CP0, and CP1}, and {CP0, and CP2}. Each of {CP0, CP1, and CP2}, {CP0, CP1, and CP3}, {CP0, CP2, and CP3}, {CP1, CP2, and CP3}, {CP0, and CP1}, and {CP0, and CP2} can be referred to as a "CP group".

[0134] When all CPs included in a CP group are available, the CPs have the same prediction direction, and the CPs have the same reference image, the affine model of the corresponding CP group can be derived or generated. The affine model of {CP0, CP1, and CP2} (the first affine model) can be derived as {CP0, CP1, and CP2}. The affine model of {CP0, CP1, and CP3} (the second affine model) can be derived as {CP0, CP1, and (CP3 + CP0 - CP1)}. The affine model of {CP0, CP2, and CP3} (the third affine model) can be derived as {CP0, (CP3 + CP0 - CP2), and CP2}. The affine model of {CP1, CP2, and CP3} (the fourth affine model) can be derived as {(CP1 + CP2 - CP3), CP1, and CP2}. The affine model of {CP0 and CP1} (the fifth affine model) can be derived as {CP0 and CP1}. Furthermore, the affine model of {CP0 and CP2} (the sixth affine model) can be derived as {CP0 and (CP2 - CP0)}.

[0135] When at least one of the CPs included in a particular CP group is unavailable or the predicted direction and the reference image are different from each other, the affine model of the corresponding CP group may not be generated.

[0136] For example, when all CPs of {CP0, CP1, CP2} are available, all prediction directions are bidirectional, and the reference image for list 0 is the first index, and the reference image for list 1 is the zeroth index, the corresponding affine model can be generated as {CP0, CP1, and CP2} as follows:

[0137] cu_affine_type_flag: 6-parameter, inter_pred_idc: bi, ref_idx_l0: 1 st idx (index 1), ref_idx_l1: 0 th idx (index 0), CPMV0:CP0, CPMV1:CP1, CPMV2:CP2, and bcw_idx:undecided.

[0138] In this case, since the bcw_idx of CP0, CP1 and CP2 can be different from each other, it is necessary to derive a bcw_idx for the corresponding affine model (the candidate being constructed).

[0139] In this invention, a method is proposed for deriving bcw_idx for candidates included in a candidate list (affine merged candidate list).

[0140] Figure 9Exemplary block diagrams of predictors 120 and 440 that can implement the technology of the present invention are illustrated. Each of predictors 120 and 440 may include a setting unit 905, a determining unit 910, a checking unit 920, and a derivation unit 930, and the derivation unit 930 may include a group determining unit 932 and an index derivation unit 934.

[0141] The setting unit 905 can use available motion information from multiple motion information of adjacent blocks of the current block to set the motion information of the CP. In addition, the setting unit 905 can set the CP with set motion information to be available.

[0142] Unit 910 can determine whether multiple CPs (Target Control Points) are available among the CPs set for the current block. Figure 10 (S1010). Here, the target CP can correspond to any CP included in any of the up to six CP groups.

[0143] When all target CPs are available, the inspection unit 920 can inspect the predicted direction and reference image of the target CPs. Figure 10 (S1020). That is, the inspection unit 920 can check or determine whether all predicted directions of the target CP are bidirectional and whether all reference images of the target CP are the same.

[0144] Figure 10 The processes S1010 and S1020 can be understood as the process of determining the above-mentioned affine model generation conditions (all CPs are available, the prediction directions are the same, and the reference images are the same).

[0145] When all target CPs are available, and the prediction directions and reference images are the same (i.e., when the corresponding affine models are generated), the derivation unit 930 can derive the corresponding constructed candidate bidirectional prediction weight index (hereinafter referred to as "bcw_idx") from the bidirectional prediction weight index (bidirectional prediction weight index candidate (bcw_idxXs)) of the target CPs. Figure 10 (S1030).

[0146] Implementation Method 1

[0147] Implementation method 1 is based on the method of deriving the candidate bcw_idx for construction by inferring the order in which the target CP is set for the current block. (See also...) Figure 11 Implementation method 1 will be described.

[0148] bcw_idxXs can represent the bidirectional predicted weight index candidates for the target CP included in the affine model. When the affine model is a 6-parameter model, {CP} a CP b and CP cWhen bcw_idxXs can include bcw_idxa, bcw_idxb, and bcw_idxc, the affine model is a 4-parameter model. a and CP b When bcw_idxX is used, it can include bcw_idxa and bcw_idxb.

[0149] The video encoding / decoding device can set bcw_idxX (S1110) according to the order in which each CP is set. Although in Figure 1 The diagram shows {CP0 and CP1} as a 4-parameter affine model, but implementation 1 can be applied to {CP0 and CP2} as another 4-parameter affine model, and can also be applied to a 6-parameter affine model.

[0150] The video encoding / decoding device can deduce the bidirectional prediction weight index candidate (bcw_idx0) of the target CP, which is the CP0 first set for the current block, as the candidate bcw_idx to be constructed (S1130). In other words, the video encoding / decoding device can set bcw_idx in bcw_idxX to bcw_idx0, where bcw_idx0 is the index of the first CP.

[0151] In some implementations, the derivation unit 930 may also include a process (S1120) for determining whether bcw_idxX are the same.

[0152] The fact that bcw_idxX is the same indicates that there are multiple CPs that apply greater weight to a specific direction in both list 0 and list 1. Therefore, the process S1120 for determining whether bcw_idxX is the same can be a process of matching the prediction direction that assigns greater weight to bcw_idx with the prediction direction that applies greater weight to the CP.

[0153] When bcw_idxX are the same (bcw_idx0 = bcw_idx1), it can be deduced that the bcw_idx0 of the CP first set for the current block in the target CP is bcw_idx (S1130). Conversely, when bcw_idxX are different (bcw_idx0 = bcw_idx1), the bcw_idx0 of the CP first set for the current block in the target CP is used as bcw_idx (S1130). When bcw_idx1), the default index (default) can be deduced as bcw_idx (bcw_idx=default(0)) (S1140). Here, the default index can be an index used to assign the same weight to the 0 direction of list and the 1 direction of list.

[0154] Implementation Method 2

[0155] Implementation method 2 is a method for classifying bcw_idxX into multiple groups based on the prediction direction assigned a larger (or fewer) weight in the list 0 direction and the list 1 direction. (See also...) Figure 12 Implementation method 2 will be described.

[0156] Groups can be divided into groups that apply the same weight to both list 0 and list 1 directions (group 0, G0), groups that apply a larger weight to list 1 directions (group 1, G1), and groups that apply a larger weight to list 0 directions (group 2, G2). Based on the weights applied to list 0 and list 1 directions, each group can be assigned or assigned a separate index (group index, bcw_group).

[0157] Table 7 shows the groups (bcw_group) and bcw_idx (bcw_idxX) that are divided into multiple groups.

[0158] [Table 7]

[0159]

[0160] In some implementations, groups can also be represented as arrays (lookup tables (LUTs)).

[0161]

[0162] The video encoding / decoding device can set bcw_idxX according to the order of setting CP (S1210). In addition, the video encoding / decoding device can set a group (bcw_idxGLut={0, 1, 2, 1 and 2}) and set the group to which bcw_idxX belongs (bcw_idxGX) (bcw_idxGX=bcw_idxGLut{bcw_idxX}) (S1210).

[0163] The video encoding / decoding device (group determination unit) can determine whether the groups to which bcw_idxGX belongs are the same (S1220). Furthermore, the video encoding / decoding device (index derivation unit) can deduce bcw_idx from any one of bcw_idxX, bcw_idxGX, and a preset index (default) based on whether the groups to which bcw_idxGX belongs are the same (S1230). Here, the preset index can be the same as the default index described in Embodiment 1.

[0164] Implementation method 2 can be applied to both 4-parameter affine models and 6-parameter affine models. However, for ease of description and understanding, Implementation method 2 will be described below focusing on examples applied to 6-parameter affine models. Furthermore, Implementation method 2 will be described focusing on the {CP0, CP1, and CP2} affine model within the 6-parameter affine model.

[0165] Implementation Method 2-1

[0166] Implementation method 2-1 derives bcw_idx by determining whether all groups (bcw_idxG0, bcw_idxG1, and bcw_idxG2) are identical to each other. (See also...) Figure 13 Implementation method 2-1 will be described.

[0167] The video encoding / decoding device can be configured with bcw_idxX (X={0, 1 and 2}), bcw_idxGLut and bcw_idxGX (X={0, 1 and 2}) (S1310).

[0168] The video encoding / decoding device can determine whether all bcw_idxGX values ​​are the same (S1320). When all three groups are the same (bcw_idxG0=bcw_idxG1=bcw_idxG2), two or more of bcw_idx0, bcw_idx1, and bcw_idx2 can be identical to each other. In this case, the video encoding / decoding device can deduce bcw_idx from the index candidates with the same value among bcw_idx0, bcw_idx1, and bcw_idx2.

[0169] For example, a video encoding / decoding device can determine whether any two of bcw_idx0, bcw_idx1, and bcw_idx2 are the same (S1330 to S1350). When bcw_idx0 = bcw_idx1 (S1330), bcw_idx0 can be deduced as bcw_idx (S1360). When bcw_idx0 = bcw_idx2 (S1340), bcw_idx0 can be deduced as bcw_idx (S1360). When bcw_idx1 = bcw_idx2 (S1350), bcw_idx1 can be deduced as bcw_idx (S1370). Processes S1330 to S1370 can be the process of setting bcw_idx as the index candidate of the CP set first for the current block among the index candidates with the same value.

[0170] In process S1320, when one or more of bcw_idxGX have different values, the default index (default(0)) can be deduced as bcw_idx (S1380).

[0171] The process S1360, which derives bcw_idx0 as bcw_idx through processes S1320 and S1330, can be a process that derives bcw_idx0 as bcw_idx when bcw_idx0 = bcw_idx1 and bcw_idx_G0 = bcw_idxG2. The process S1360, which derives bcw_idx0 as bcw_idx through processes S1320 and S1340, can also be a process that derives bcw_idx0 as bcw_idx when bcw_idx0 = bcw_idx2 and bcw_idx_G0 = bcw_idxG1. The process S1370, which derives bcw_idx1 as bcw_idx through processes S1320 and S1350, can be the process of deriving bcw_idx1 as bcw_idx when bcw_idx1 = bcw_idx2 and bcw_idx_G1 = bcw_idxG0.

[0172] Implementation method 2-1 is applied to various affine models as follows.

[0173] [Table 8]

[0174]

[0175] When the affine model is as shown in Table 8, bcw_idxG0=bcw_idxG1=bcw_idxG2=2, and bcw_idx0=bcw_idx1=4. Therefore, bcw_idx can be derived as follows: bcw_idx=bcw_idx0=4 (L0L1=10 / 8:-2 / 8).

[0176] [Table 9]

[0177]

[0178] When the affine model is as shown in Table 9, bcw_idxG0=bcw_idxG1=bcw_idxG2=2, and bcw_idx1=bcw_idx2=2. Therefore, bcw_idx can be derived as follows: bcw_idx=bcw_idx1=2 (L0:L1=5 / 8:3 / 8).

[0179] [Table 10]

[0180]

[0181] When the affine model is as shown in Table 10, bcw_idxG0=bcw_idxG1 bcw_idxG2. Therefore, bcw_idx can be deduced as follows: bcw_idx = default = 0 (L0:L1 = 4 / 8:4 / 8).

[0182] [Table 11]

[0183]

[0184] When the affine model is as shown in Table 11, bcw_idxG0 bcw_idxG1=bcw_idxG2. Therefore, bcw_idx can be derived as follows: bcw_idx=default=0 (L0:L1=4 / 8:4 / 8).

[0185] Implementation Method 2-2

[0186] Implementation method 2-2 is a method for deriving bcw_idx by determining whether all other groups besides the corresponding group are identical when any one of the groups (bcw_idxG0, bcw_idxG1, and bcw_idxG2) is a zero group. A zero group can be a group to which the same weights are applied for bidirectional prediction. (See also...) Figure 14 Implementation method 2-2 will be described.

[0187] The video encoding / decoding device can be configured with bcw_idxX (X={0, 1 and 2}), bcw_idxGLut and bcw_idxGX (X={0, 1 and 2}) (S1410).

[0188] The video encoding / decoding device can determine whether bcw_idxGX are the same as each other and whether any group of bcw_idxGX corresponds to group zero (S1420). The video encoding / decoding device can deduce bcw_idx from the same bcw_idxGX or a preset index based on the determination result in process S1420.

[0189] As an example, in process S1420, when any two groups in bcw_idxGX are the same as each other (bcw_idxG0=bcw_idxG1) and the other group is the zero group (bcw_idxG2=0), the first group index (bcw_idxG0) of the group indices (bcw_idxG0 and bcw_idxG1) assigned to the same group (bcw_idxG0=bcw_idxG1) can be derived as bcw_idx (S1450).

[0190] As another example, in process S1430, when bcw_idxG0 = bcw_idxG2 and bcw_idxG1 = 0, the first set of indices (bcw_idxG0) can be derived as bcw_idx (S1450). As yet another example, in process S1440, when bcw_idxG1 = bcw_idxG2 and bcw_idxG0 = 0, the first set of indices (bcw_idxG1) can be derived as bcw_idx (S1460).

[0191] When all bcw_idxGXs are different or when there is no zero group in bcw_idxGX, the default index (default(0)) can be deduced as bcw_idx (S1470).

[0192] When applying Embodiment 2-2 to the various affine models in Tables 8 to 11, the same results as in Embodiment 2-1 can be derived, except for Table 10. In the case of the affine models shown in Table 10, bcw_idxG0 = bcw_idxG1 = 2 and bcw_idxG2 = 0. Therefore, bcw_idx can be derived as bcw_idx = bcw_idxG0 = 2 (L0:L1 = 5 / 8:3 / 8).

[0193] Implementation Method 3

[0194] Implementation method 3 is a method of deriving bcw_idx from the median of the weights indicated by bcw_idxX or the average of the weights indicated by bcw_idxX.

[0195] The video encoding / decoding device can determine the median of the weights indicated by bcw_idxX and derive bcw_idx from the bcw_idx corresponding to the median. Furthermore, the video encoding / decoding device can determine the average of the weights indicated by bcw_idxX and derive bcw_idx from the bcw_idx corresponding to the average. When no bcw_idxX corresponds to the average of the weights, the bcw_idxX with the weights closest to the corresponding average can be derived as bcw_idx.

[0196] Implementation method 3 (using median) is applied as follows to the various affine models in Tables 8 to 11.

[0197] When the affine model is as shown in Table 8, the median of the weights indicated by bcw_idxXs is 10 / 8:-2 / 8, therefore bcw_idxX with the corresponding median values ​​are bcw_idx0 and bcw_idx1. Thus, bcw_idx can be derived as bcw_idx = bcw_idx0 / bcw_idx1 = 4.

[0198] When the affine model is as shown in Table 9, the median weights indicated by bcw_idxXs are 5 / 8:3 / 8, therefore bcw_idxX with corresponding medians are bcw_idx1 and bcw_idx2. Thus, bcw_idx can be derived as bcw_idx = bcw_idx1 / bcw_idx2 = 2.

[0199] When the affine model is as shown in Table 10, the median weights indicated by bcw_idxX are 5 / 8:3 / 8, therefore bcw_idxX with the corresponding median is bcw_idx1. Thus, bcw_idx can be derived as bcw_idx = bcw_idx1 = 2.

[0200] When the affine model is as shown in Table 11, the median weights indicated by bcw_idxX are 5 / 8:3 / 8, and therefore bcw_idxX with corresponding medians are bcw_idx1 and bcw_idx2. Thus, bcw_idx can be derived as bcw_idx = bcw_idx1 / bcw_idx2 = 2.

[0201] Although exemplary embodiments of the invention have been described for illustrative purposes, those skilled in the art will understand that various modifications and variations can be made without departing from the spirit and scope of the invention. For the sake of brevity and clarity, exemplary embodiments have been described. Therefore, those skilled in the art will understand that the scope of the invention is not limited to the embodiments explicitly described above, but includes the claims and their equivalents.

[0202] Cross-references to related applications

[0203] This application is based on and claims priority to Korean Patent Application No. 10-2019-0078381, filed on June 28, 2019, and Korean Patent Application No. 10-2019-0158986, filed on December 3, 2019, both of which are incorporated herein by reference in their entirety.

Claims

1. A video encoding apparatus for deriving bidirectional prediction weight indices of constructed candidates included in an affine merging candidate list, the video encoding apparatus comprising at least one processor configured to: Derive the motion information of the control points corresponding to the corners of the current block. in, The motion information of the control point is derived from the neighboring blocks of the corner of the current block, and each control point is set to be available when its motion information is derived. Select a portion of the control points in a predefined order as a set of target control points for the constructed candidates, and determine whether the target control points are available; When the target control point is available, check the predicted direction and reference image of the target control point; and When all the prediction directions of the target control points are bidirectional and the reference images of the target control points are the same, the bidirectional prediction weight index of the constructed candidate is set to be equal to the bidirectional prediction weight index of the target control point that has been selected first in the predefined order among the target control points belonging to the group. The bidirectional prediction weight index of the constructed candidate is an index indicating one of a plurality of predefined weights. The predefined weight is used to combine the two prediction blocks of the current block. The two prediction blocks are obtained by bidirectional prediction based on the motion information of the target control point of the constructed candidate in affine mode.

2. The video encoding device according to claim 1, wherein, The predefined order is the order of top left control point, top right control point, bottom left control point, and bottom right control point.

3. The video encoding device according to claim 1, wherein, The control points set for the current block include an upper-left control point located at the upper-left corner of the current block, an upper-right control point located at the upper-right corner of the current block, a lower-left control point located at the lower-left corner of the current block, and a lower-right control point located at the lower-right corner of the current block.

4. The video encoding device according to claim 3, wherein, The at least one processor is configured to set the motion information of the control point by: Set the first available motion information among multiple motion information of the adjacent block located to the upper left of the current block as the motion information of the upper left control point; Set the first available motion information among multiple motion information of the adjacent block located to the upper right of the current block as the motion information of the upper right control point; Set the first available motion information among multiple motion information of the adjacent block located to the lower left of the current block as the motion information of the lower left control point; as well as When the motion information of the adjacent block located to the lower right of the current block is available, the motion information of the adjacent block is set as the motion information of the lower right control point.

5. A video decoding method, comprising the following steps: Derive the motion information of the control points corresponding to the corners of the current block. The motion information of the control point is derived from the neighboring blocks of the corner of the current block, and each control point is set to be available when its motion information is derived. A portion of the control points are selected in a predefined order as a set of target control points for the constructed candidates; Determine whether the target control point is available; When the target control point is available, check the predicted direction and reference image of the target control point; and When all the prediction directions of the target control points are bidirectional and the reference images of the target control points are the same, the constructed candidate bidirectional prediction weight index is set to be equal to the bidirectional prediction weight index of the target control point that has been selected first in the predefined order among the target control points belonging to the group. The bidirectional prediction weight index of the constructed candidate is an index indicating one of a plurality of predefined weights. The predefined weight is used to combine the two prediction blocks of the current block. The two prediction blocks are obtained by bidirectional prediction based on the motion information of the target control point of the constructed candidate in affine mode.

6. The video decoding method according to claim 5, wherein, The predefined order is the order of top left control point, top right control point, bottom left control point, and bottom right control point.

7. The video decoding method according to claim 5, wherein, The control points set for the current block include an upper-left control point located at the upper-left corner of the current block, an upper-right control point located at the upper-right corner of the current block, a lower-left control point located at the lower-left corner of the current block, and a lower-right control point located at the lower-right corner of the current block.

8. The video decoding method according to claim 7, wherein, The steps for setting the motion information of the control point include: Set the first available motion information among multiple motion information of the adjacent block located to the upper left of the current block as the motion information of the upper left control point; Set the first available motion information among multiple motion information of the adjacent block located to the upper right of the current block as the motion information of the upper right control point; Set the first available motion information from multiple motion information of the adjacent block located to the lower left of the current block as the motion information of the lower left control point; and When the motion information of the adjacent block located to the lower right of the current block is available, the motion information of the adjacent block is set as the motion information of the lower right control point.

9. An apparatus for providing a bitstream comprising video data to a video decoding device, the apparatus comprising at least one processor configured to: The bitstream is generated by encoding the video data based on the bidirectional prediction weight indexes of the constructed candidates included in the derived affine merging candidate list; and The bitstream is sent to the video decoding device. in, The at least one processor is configured to derive the bidirectional prediction weight index by: Derive the motion information of the control points corresponding to the corners of the current block. The motion information of the control point is derived from the neighboring blocks of the corner of the current block, and each control point is set to be available when its motion information is derived. Select a portion of the control points in a predefined order as a set of target control points for the constructed candidates, and determine whether the target control points are available; When the target control point is available, check the predicted direction and reference image of the target control point; When all the prediction directions of the target control points are bidirectional and the reference images of the target control points are the same, the bidirectional prediction weight index of the constructed candidate is set to be equal to the bidirectional prediction weight index of the target control point that has been selected first in the predefined order among the target control points belonging to the group. When the candidate to be constructed is selected from the affine merging candidate list, two prediction blocks are generated by performing bidirectional prediction on the current block in affine mode based on the motion information of the target control point for the candidate to be constructed. A final prediction block is generated by weighting the two prediction blocks using a weight from a plurality of predefined weights indicated by the bidirectional prediction weight index of the constructed candidate; and the current block is encoded based on the final prediction block.

Citation Information

Patent Citations

  • Preparation method of super absorbent polymer

    KR1020190078381A