Method and apparatus for processing video signal using adaptive motion vector resolution
By introducing adaptive motion vector differential resolution and affine motion compensation technology, the motion vector differential resolution is dynamically adjusted, which solves the problem of insufficient coding efficiency in existing video signal processing methods and achieves more efficient video signal coding.
Patent Information
- Application Number
- CN202510861055.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2019-05-17
- Filing Date
- 2020-05-04
- Publication Date
- 2025-10-10
AI Technical Summary
Existing video signal processing methods have insufficient coding efficiency and cannot meet the needs of modern media and data transmission.
Adaptive motion vector differential resolution (AMVR) and affine motion compensation technology are used to dynamically adjust the motion vector differential resolution to optimize the encoding process by parsing the enable flag and flag information in the bitstream.
The coding efficiency of the video signal is improved, the flexibility and adaptability of the coding process are enhanced, and the coding efficiency is improved.
Smart Images

Figure CN120769050A_ABST
Abstract
Description
[0001] This application is a divisional application of the patent application with application number 202080040478.0 (PCT / KR2020 / 005830) filed on November 30, 2021, application date on May 4, 2020, and titled "A method and device for processing video signals using adaptive motion vector resolution". Technical Field
[0002] The present disclosure relates to a method and apparatus for processing a video signal, and more particularly, to a video signal processing method and apparatus for encoding and decoding a video signal. Background Art
[0003] Compression coding refers to a series of signal processing techniques used to transmit digitized information over communication lines or store information in a form suitable for storage media. Compression coding targets include objects such as voice, video, and text, and in particular, techniques for performing compression coding on images are referred to as video compression. Compression coding of video signals is performed by removing excess information, taking into account spatial, temporal, and random correlations. However, with the recent development of various media and data transmission media, more efficient video signal processing methods and devices are needed. Summary of the Invention
[0004] Technical issues
[0005] The purpose of the present disclosure is to increase the coding efficiency of video signals.
[0006] Technical Solution
[0007] According to an embodiment of the present disclosure, a method for processing a video signal includes the following steps: parsing an adaptive motion vector resolution (AMVR) enable flag sps_amvr_enabled_flag indicating whether adaptive motion vector differential resolution is used from a bitstream; parsing an affine enable flag sps_affine_enabled_flag indicating whether affine motion compensation is available from the bitstream; determining whether affine motion compensation is available based on the affine enable flag sps_affine_enabled_flag; when affine motion compensation is available, determining whether to use adaptive motion vector differential resolution based on the AMVR enable flag sps_amvr_enabled_flag; and when adaptive motion vector differential resolution is used, parsing an affine AMVR enable flag sps_affine_amvr_enabled_flag indicating whether adaptive motion vector differential resolution can be used for affine motion compensation from the bitstream.
[0008] In a method for processing a video signal according to an embodiment of the present disclosure, one of the AMVR enable flag sps_amvr_enabled_flag, the affine enable flag sps_affine_enabled_flag, or the affine AMVR enable flag sps_affine_amvr_enabled_flag is signaled as one of a coding tree unit, a slice, a tile, a tile group, a picture, or a sequence unit.
[0009] In the method of processing a video signal according to an embodiment of the present disclosure, when affine motion compensation is available and adaptive motion vector differential resolution is not used, the affine AMVR enable flag sps_affine_amvr_enabled_flag infers that adaptive motion vector differential resolution is not available for affine motion compensation.
[0010] In the method of processing a video signal according to an embodiment of the present disclosure, when affine motion compensation is not available, the affine AMVR enabling flag sps_affine_amvr_enabled_flag infers that adaptive motion vector differential resolution is not available for affine motion compensation.
[0011] The video signal processing method according to an embodiment of the present disclosure further includes, when the AMVR enable flag sps_amvr_enabled_flag indicates the use of adaptive motion vector difference resolution, the inter-frame affine flag inter_affine_flag obtained from the bitstream indicates that affine motion compensation is not used for the current block, and at least one of the multiple motion vector differences for the current block is non-zero, parsing information about the resolution of the motion vector difference from the bitstream, and modifying the multiple motion vector differences for the current block based on the information about the resolution of the motion vector difference.
[0012] The method for processing a video signal according to an embodiment of the present disclosure further includes, when an affine AMVR enable flag indicates that adaptive motion vector difference resolution can be used for affine motion compensation, an inter-frame affine flag inter_affine_flag obtained from a bitstream indicates that affine motion compensation is used for a current block, and at least one of a plurality of control point motion vector differences for the current block is non-zero, parsing information about the resolution of the motion vector difference from a bitstream, and modifying the plurality of control point motion vector differences for the current block based on the information about the resolution of the motion vector difference.
[0013] The video signal processing method according to an embodiment of the present disclosure further includes obtaining information inter_pred_idc about a reference picture list for a current block, when the information inter_pred_idc about a reference picture list indicates that only the zeroth reference picture list is not used, parsing a motion vector predictor index mvp_l1_flag of a first reference picture list from a bitstream, generating a motion vector predictor candidate, obtaining a motion vector predictor from the motion vector predictor candidate based on the motion vector predictor index, and predicting the current block based on the motion vector predictor.
[0014] The method for processing a video signal according to an embodiment of the present disclosure further includes obtaining, from a bitstream, a motion vector difference zero flag mvd_l1_zero_flag indicating whether the motion vector difference and the multiple control point motion vector differences are set to zero for the first reference picture list, wherein the step of parsing the motion vector predictor index mvp_l1_flag includes: the motion vector difference zero flag mvd_l1_zero_flag is 1, and regardless of whether the information inter_pred_idc about the reference picture list indicates the use of both the zeroth reference picture list and the first reference picture list, parsing the motion vector predictor index mvp_l1_flag.
[0015] According to an embodiment of the present disclosure, a method for processing a video signal includes the following steps: parsing first information six_minus_max_num_merge_cand related to the maximum number of candidates for merging motion vector prediction in units of sequences from a bitstream, obtaining the maximum number of merge candidates based on the first information, parsing second information indicating whether a block is partitioned for inter-frame prediction from the bitstream, and when the second information indicates 1 and the maximum number of merge candidates is greater than 2, parsing third information related to the maximum number of merge mode candidates for the partitioned block from the bitstream.
[0016] The method for processing a video signal according to an embodiment of the present invention further includes: when the second information indicates 1 and the maximum number of merge candidates is greater than or equal to 3, obtaining the maximum number of merge mode candidates for the partitioned block by subtracting the third information from the maximum number of merge candidates, when the second information indicates 1 and the maximum number of merge candidates is 2, setting the maximum number of merge mode candidates for the partitioned block to 2, and, when the second information is 0 or the maximum number of merge candidates is 1, setting the maximum number of merge mode candidates for the partitioned block to 0.
[0017] An apparatus for processing a video signal according to an embodiment of the present application includes a processor and a memory, wherein based on instructions stored in the memory, the processor parses an adaptive motion vector resolution (AMVR) enabling flag sps amvr enabled flag indicating whether adaptive motion vector difference resolution is used from a bitstream, parses an affine enabling flag sps affine enabled flag indicating whether affine motion compensation is available from the bitstream, determines whether affine motion compensation is available based on the affine enabling flag sps affine enabled flag, determines whether adaptive motion vector difference resolution is used based on the AMVR enabling flag sps amvr enabled flag when affine motion compensation is available, and parses an affine AMVR enabling flag sps affine amvr enabled flag indicating whether adaptive motion vector difference resolution is available for affine motion compensation from the bitstream when adaptive motion vector difference resolution is used.
[0018] In an apparatus for processing a video signal according to an embodiment of the present disclosure, one of the AMVR enabling flag sps amvr enabled flag, the affine enabling flag sps affine enabled flag, or the affine AMVR enabling flag sps affine amvr enabled flag is signaled as one of a coding tree unit, a slice, a tile, a tile group, a picture, or a sequence unit.
[0019] In an apparatus for processing a video signal according to an embodiment of the present disclosure, when affine motion compensation is available and adaptive motion vector difference resolution is not used, the affine AMVR enabling flag sps affine amvr enabled flag infers that adaptive motion vector difference resolution is not available for affine motion compensation.
[0020] In an apparatus for processing a video signal according to an embodiment of the present disclosure, when affine motion compensation is not available, the affine AMVR enabling flag sps affine amvr enabled flag infers that adaptive motion vector difference resolution is not available for affine motion compensation.
[0021] In an apparatus for processing a video signal according to an embodiment of the present disclosure, based on instructions stored in a memory, when the AMVR enable flag sps_amvr_enabled_flag indicates the use of adaptive motion vector difference resolution, the inter-frame affine flag inter_affine_flag obtained from the bitstream indicates that affine motion compensation is not used for the current block, and at least one of the multiple motion vector differences for the current block is non-zero, the processor parses information about the resolution of the motion vector difference from the bitstream and modifies the multiple motion vector differences for the current block based on the information about the resolution of the motion vector difference.
[0022] In an apparatus for processing a video signal according to an embodiment of the present disclosure, based on instructions stored in a memory, when an affine AMVR enable flag indicates that adaptive motion vector difference resolution can be used for affine motion compensation, an inter-frame affine flag inter_affine_flag obtained from a bitstream indicates that affine motion compensation is used for a current block, and at least one of a plurality of control point motion vector differences for the current block is non-zero, a processor parses information about the resolution of the motion vector difference from the bitstream, and modifies the plurality of control point motion vector differences for the current block based on the information about the resolution of the motion vector difference.
[0023] In an apparatus for processing a video signal according to an embodiment of the present disclosure, based on instructions stored in a memory, a processor obtains information inter_pred_idc about a reference picture list for a current block, and when the information inter_pred_idc about the reference picture list indicates that only the zeroth reference picture list list 0 is not used, a motion vector predictor index mvp_l1_flag of a first reference picture list list 1 is parsed from a bitstream, a motion vector predictor candidate is generated, a motion vector predictor is obtained from the motion vector predictor candidate based on the motion vector predictor index, and the current block is predicted based on the motion vector predictor.
[0024] In an apparatus for processing a video signal according to an embodiment of the present invention, based on instructions stored in a memory, a processor obtains a motion vector difference zero flag mvd_l1_zero_flag indicating whether a motion vector difference and a plurality of control point motion vector differences are set to zero for a first reference picture list from a bitstream, and the motion vector difference zero flag mvd_l1_zero_flag is 1, and regardless of whether information inter_pred_idc about a reference picture list indicates use of both the zeroth reference picture list and the first reference picture list, the motion vector predictor index mvp_l1_flag is parsed.
[0025] An apparatus for processing a video signal according to an embodiment of the present disclosure includes a processor and a memory, wherein, based on instructions stored in the memory, the processor parses first information six_minus_max_num_merge_cand related to the maximum number of candidates for merging motion vector prediction in units of sequences from a bitstream, obtains the maximum number of merge candidates based on the first information, parses second information whether a block is partitioned for inter-frame prediction from the bitstream, and when the second information indicates 1 and the maximum number of merge candidates is greater than 2, parses third information related to the maximum number of merge mode candidates for the partitioned block from the bitstream.
[0026] In an apparatus for processing a video signal according to an embodiment of the present disclosure, based on instructions stored in a memory, when the second information indicates 1 and the maximum number of merge candidates is greater than or equal to 3, the processor obtains the maximum number of merge mode candidates for a partitioned block by subtracting the third information from the maximum number of merge candidates, and when the second information indicates 1 and the maximum number of merge candidates is 2, the maximum number of merge mode candidates for the partitioned block is set to 2, and when the second information is 0 or the maximum number of merge candidates is 1, the maximum number of merge mode candidates for the partitioned block is set to 0.
[0027] According to an embodiment of the present disclosure, a method for processing a video signal includes the following steps: generating an adaptive motion vector resolution (AMVR) enable flag sps_amvr_enabled_flag indicating whether adaptive motion vector differential resolution is used, generating an affine enable flag sps_affine_enabled_flag indicating whether affine motion compensation is available; determining whether affine motion compensation is available based on the affine enable flag sps_affine_enabled_flag, and when affine motion compensation is available, determining whether to use adaptive motion vector differential resolution based on the AMVR enable flag sps_amvr_enabled_flag, and when adaptive motion vector differential resolution is used, generating an affine AMVR enable flag sps_affine_amvr_enabled_flag indicating whether adaptive motion vector differential resolution can be used for affine motion compensation; and generating a bitstream by performing entropy coding on the AMVR enable flag sps_amvr_enabled_flag, the affine enable flag sps_affine_enabled_flag, and the AMVR enable flag sps_amvr_enabled_flag.
[0028] The method for processing a video signal according to an embodiment of the disclosure further includes generating first information six_minus_max_num_merge_cand related to a maximum number of candidates for merge motion vector prediction based on the maximum number of merge candidates, generating second information indicating whether a block can be partitioned for inter prediction, generating third information related to a maximum number of merge mode candidates for a partitioned block when the second information indicates 1 and the maximum number of merge candidates is greater than 2, and performing entropy coding on the first information six_minus_max_num_merge_cand, the second information, and the third information to generate a bitstream in a sequence unit.
[0029] Advantageous Effects
[0030] According to embodiments of the disclosure, coding efficiency of a video signal can be increased. BRIEF DESCRIPTION OF DRAWINGS
[0031] Figure 1 is a schematic block diagram of a video signal encoder apparatus according to an embodiment of the disclosure.
[0032] Figure 2 is a schematic block diagram of a video signal decoder apparatus according to an embodiment of the disclosure.
[0033] Figure 3 is a diagram illustrating an embodiment of the disclosure for partitioning a coding unit.
[0034] Figure 4 is a diagram illustrating an embodiment of a method for hierarchically representing a partitioning structure of Figure 3 .
[0035] Figure 5 is a diagram illustrating yet another embodiment of the disclosure for partitioning a coding unit.
[0036] Figure 6 is a diagram illustrating a method of obtaining reference pixels for intra prediction.
[0037] Figure 7 is a diagram illustrating an embodiment of a prediction mode for intra prediction.
[0038] Figure 8 is a diagram illustrating inter prediction according to an embodiment of the disclosure.
[0039] Figure 9 is a diagram illustrating a method of signaling a motion vector according to an embodiment of the disclosure.
[0040] Figure 10 is a diagram illustrating motion vector difference syntax according to an embodiment of the disclosure.
[0041] Figure 11 is a diagram illustrating signaling of adaptive motion vector resolution according to an embodiment of the present disclosure.
[0042] Figure 12 is a diagram illustrating signaling of adaptive motion vector resolution according to an embodiment of the present disclosure.
[0043] Figure 13 is a diagram illustrating signaling of adaptive motion vector resolution according to an embodiment of the present disclosure.
[0044] Figure 14 is a diagram illustrating signaling of adaptive motion vector resolution according to an embodiment of the present disclosure.
[0045] Figure 15 is a diagram illustrating signaling of adaptive motion vector resolution according to an embodiment of the present disclosure.
[0046] Figure 16 is a diagram illustrating signaling of adaptive motion vector resolution according to an embodiment of the present disclosure.
[0047] Figure 17 is a diagram illustrating affine motion prediction according to an embodiment of the present disclosure.
[0048] Figure 18 is a diagram illustrating affine motion prediction according to an embodiment of the present disclosure.
[0049] Figure 19 is an expression illustrating a motion vector field according to an embodiment of the present disclosure.
[0050] Figure 20 is a diagram illustrating affine motion prediction according to an embodiment of the present disclosure.
[0051] Figure 21 is an expression illustrating a motion vector field according to an embodiment of the present disclosure.
[0052] Figure 22 is a diagram illustrating affine motion prediction according to an embodiment of the present disclosure.
[0053] Figure 23 is a diagram illustrating one mode of affine motion prediction according to an embodiment of the present disclosure.
[0054] Figure 24 is a diagram illustrating one mode of affine motion prediction according to an embodiment of the present disclosure.
[0055] Figure 25 is a diagram illustrating affine motion predictor derivation according to an embodiment of the present disclosure.
[0056] Figure 26is a diagram illustrating affine motion predictor derivation according to an embodiment of the present disclosure.
[0057] Figure 27 is a diagram illustrating affine motion predictor derivation according to an embodiment of the present disclosure.
[0058] Figure 28 is a diagram illustrating affine motion predictor derivation according to an embodiment of the present disclosure.
[0059] Figure 29 is a diagram illustrating a method of generating a control point motion vector according to an embodiment of the present disclosure.
[0060] Figure 30 The diagram is referenced by Figure 29 A method for determining motion vector differences is described in FIG.
[0061] Figure 31 is a diagram illustrating a method of generating a control point motion vector according to an embodiment of the present disclosure.
[0062] Figure 32 The diagram is referenced by Figure 31 A method for determining motion vector differences is described in FIG.
[0063] Figure 33 is a diagram illustrating a motion vector difference syntax according to an embodiment of the present disclosure.
[0064] Figure 34 is a diagram illustrating a higher-level signaling structure according to an embodiment of the present disclosure.
[0065] Figure 35 is a diagram illustrating a compilation unit syntax structure according to an embodiment of the present disclosure.
[0066] Figure 36 is a diagram illustrating a higher-level signaling structure according to an embodiment of the present disclosure.
[0067] Figure 37 is a diagram illustrating a higher-level signaling structure according to an embodiment of the present disclosure.
[0068] Figure 38 is a diagram illustrating a compilation unit syntax structure according to an embodiment of the present disclosure.
[0069] Figure 39 is a diagram illustrating MVD default value settings according to an embodiment of the present disclosure.
[0070] Figure 40 is a diagram illustrating MVD default value settings according to an embodiment of the present disclosure.
[0071] Figure 41is a diagram illustrating an AMVR-related syntax structure according to an embodiment of the present disclosure.
[0072] Figure 42 is a diagram illustrating an inter-prediction related syntax structure according to an embodiment of the present disclosure.
[0073] Figure 43 is a diagram illustrating an inter-prediction related syntax structure according to an embodiment of the present disclosure.
[0074] Figure 44 is a diagram illustrating an inter-prediction related syntax structure according to an embodiment of the present disclosure.
[0075] Figure 45 is a diagram illustrating inter-prediction related syntax according to an embodiment of the present invention.
[0076] Figure 46 is a diagram illustrating a triangular partitioning pattern according to an embodiment of the present invention.
[0077] Figure 47 is a diagram illustrating a merge data syntax according to an embodiment of the present invention.
[0078] Figure 48 is a diagram illustrating higher level signaling according to an embodiment of the present invention.
[0079] Figure 49 is a diagram illustrating the maximum number of candidates used in a TPM according to an embodiment of the present invention.
[0080] Figure 50 is a diagram illustrating high-level signaling related to a TPM according to an embodiment of the present invention.
[0081] Figure 51 is a diagram illustrating the maximum number of candidates used in a TPM according to an embodiment of the present invention.
[0082] Figure 52 is a diagram of TPM-related syntax elements according to an embodiment of the present invention.
[0083] Figure 53 is a diagram illustrating signaling of a TPM candidate index according to an embodiment of the present invention.
[0084] Figure 54 is a diagram illustrating signaling of a TPM candidate index according to an embodiment of the present invention.
[0085] Figure 55 is a diagram illustrating signaling of a TPM candidate index according to an embodiment of the present invention. DETAILED DESCRIPTION
[0086] Considering the functions of the present invention, the terms used in this specification may be general terms that are currently widely used, but may change according to the intentions, customs, or emergence of new technologies of those skilled in the art. In addition, in some cases, there may be terms arbitrarily selected by the applicant, and in such cases, their meanings are described in the corresponding description section of the present invention. Therefore, the terms used in this specification should be interpreted based on the substantive meaning of the terms and content throughout the specification.
[0087] In the present disclosure, the following terms may be interpreted based on the following criteria, and even undescribed terms may be interpreted according to the following purposes. Coding may be interpreted as encoding or decoding in some cases, information is a term including all values, parameters, coefficients, elements, etc. and its meaning may be interpreted differently in some cases, and therefore, the present disclosure is not limited thereto. "Unit" is used to refer to a basic unit of image (picture) processing or a specific location of a picture, and in some cases may be used interchangeably with terms such as "block", "partition" or "region". In addition, in the present specification, a unit may be used as a concept including all of a coding unit, a prediction unit, and a transform unit.
[0088] Figure 1 is a schematic block diagram of a video signal encoding apparatus according to an embodiment of the present disclosure. Figure 1 The encoding device 100 of the present disclosure mainly includes a transform unit 110, a quantization unit 115, an inverse quantization unit 120, an inverse transform unit 125, a filtering unit 130, a prediction unit 150, and an entropy coding unit 160.
[0089] The transform unit 110 transforms the pixel values of the received video signal to obtain transform coefficient values. For example, a discrete cosine transform (DCT) or a wavelet transform can be used. In particular, in the discrete cosine transform, the transform is performed by dividing the input picture signal into blocks of a predetermined size. During the transform, the coding efficiency can vary depending on the distribution and characteristics of the values in the transform area.
[0090] The quantization unit 115 quantizes the transform coefficient values output from the transform unit 110. The inverse quantization unit 120 dequantizes the transform coefficient values, and the inverse transform unit 125 reconstructs original pixel values using the dequantized transform coefficient values.
[0091] The filtering unit 130 performs filtering calculations to improve the quality of the reconstructed picture. For example, it may include a deblocking filter and an adaptive loop filter. The filtered picture is output or stored in the decoded picture buffer 156 to be used as a reference picture.
[0092] To improve coding efficiency, the picture signal is not encoded as is. Instead, the following method is used: a picture is predicted using an already coded region via prediction unit 150, and the residual value between the original picture and the predicted picture is added to the predicted picture, thereby obtaining a reconstructed picture. Intra-frame prediction unit 152 performs intra-frame prediction within the current picture, and inter-frame prediction unit 154 predicts the current picture using a reference picture stored in decoded picture buffer 156. Intra-frame prediction unit 152 performs intra-frame prediction based on the reconstructed region in the current picture and transmits the intra-frame coding information to entropy coding unit 160. Inter-frame prediction unit 154 may include motion estimation unit 154a and motion compensation unit 154b. Motion estimation unit 154a obtains a motion vector value for the current region by referencing a specific reconstructed region. Motion estimation unit 154a transmits the location information (reference frame, motion vector, etc.) of the reference region to entropy coding unit 160, allowing the location information to be included in the bitstream. Motion compensation unit 154b performs inter-frame motion compensation using the motion vector value transmitted from motion estimation unit 154a.
[0093] The entropy coding unit 160 performs entropy coding on the quantized transform coefficients, inter-frame coding information, intra-frame coding information, and reference area information input from the inter-frame prediction unit 154 to generate a video signal bitstream. Here, in the entropy coding unit 160, a variable length coding (VLC) scheme, arithmetic coding, etc. can be used. The variable length coding (VLC) scheme transforms the input symbols into continuous codewords, and the length of the codewords can be variable. For example, frequently occurring symbols are expressed as short codewords, and infrequently occurring symbols are expressed as long codewords. As a variable length coding scheme, a context-based adaptive variable length coding (CAVLC) scheme can be used. Arithmetic coding transforms continuous data symbols into a decimal, and the optimal decimal bits required to represent each symbol can be obtained in arithmetic coding. Context-based adaptive binary arithmetic coding (CABAC) can be used as arithmetic coding.
[0094] The generated bitstream is encapsulated using the Network Abstraction Layer (NAL) unit as the basic unit. A NAL unit includes a coded slice segment, and a slice segment consists of an integer number of coding tree units. In order to decode the bitstream in a video decoder, the bitstream should first be separated into NAL units, and then each separated NAL unit should be decoded.
[0095] Figure 2 FIG is a schematic block diagram of a video signal decoding apparatus 200 according to an embodiment of the present disclosure. Figure 2 The decoding device 200 of the present disclosure includes an entropy decoding unit 210, an inverse quantization unit 220, an inverse transform unit 225, a filtering unit 230 and a prediction unit 250.
[0096] The entropy decoding unit 210 performs entropy decoding on the video signal bitstream to extract the transform coefficient and motion information of each region. The inverse quantization unit 220 dequantizes the entropy-decoded transform coefficient, and the inverse transform unit 225 reconstructs the original pixel value by using the dequantized transform coefficient.
[0097] At the same time, the filtering unit 230 improves the picture quality by filtering the picture. The filtering unit may include a deblocking filter for reducing block distortion and / or an adaptive loop filter for removing distortion from the entire picture. The filtered picture is output or stored in the decoded picture buffer 256 to be used as a reference picture for the next frame.
[0098] Also, the prediction unit 250 of the present disclosure includes an intra prediction unit 252 and an inter prediction unit 254 and reconstructs a predicted picture using the encoding type, transform coefficient of each region, motion information, etc. decoded by the entropy decoding unit 210 described above.
[0099] In this regard, the intra prediction unit 252 performs intra prediction based on the decoded samples in the current picture. The inter prediction unit 254 generates a predicted picture by using the reference picture and motion information stored in the decoded picture buffer 256. The inter prediction unit 254 can be configured to include a motion estimation unit 254a and a motion compensation unit 254b. The motion estimation unit 254a obtains a motion vector indicating the positional relationship between the current block and the reference block of the reference picture used for coding, and transmits the obtained motion vector to the motion compensation unit 254b.
[0100] The predictor output from the intra prediction unit 252 or the inter prediction unit 254 is added to the pixel value output from the inverse transform unit 225 to generate a reconstructed video frame.
[0101] Hereinafter, in the operations of the encoding apparatus 100 and the decoding apparatus 200, reference will be described. Figures 3 to 5 A method for splitting coding units and prediction units.
[0102] A coding unit means a basic unit for processing a picture in the above-mentioned process of processing a video signal, for example, in the process of intra / inter prediction, transform, quantization and / or entropy coding. The size of a coding unit used to code a picture may not be constant. A coding unit may be rectangular, and one coding unit may be divided into several coding units.
[0103] Figure 3The diagram illustrates an embodiment of the present disclosure for splitting coding units. For example, a coding unit having a size of 2N×2N can be split again into four coding units having a size of N×N. This splitting of coding units can be performed recursively, and not all coding units need to be split in the same manner. However, for the convenience of the compilation and processing process, the size of the maximum coding unit and / or the size of the minimum coding unit may be limited.
[0104] For one coding unit, information indicating whether the corresponding coding unit is split may be stored. Figure 4 Diagrams are hierarchically represented using symbol values Figure 3 When the unit is split, the value "1" can be assigned to the information, and when the unit is not split, the value "0" can be assigned to it. Figure 4 , if the flag value indicating whether to split is 1, the coding unit corresponding to the corresponding node is divided into 4 coding units again. If the flag value is 0, the coding unit is no longer divided, and the processing process for the coding unit can be performed.
[0105] The structure of the coding units described above can be represented using a recursive tree structure. Specifically, a coding unit that is split into other coding units with a picture or a maximum-sized coding unit as the root has as many child nodes as the number of split coding units. Therefore, coding units that are no longer split become leaf nodes. Assuming that a coding unit can only be split into squares, since a coding unit can be split into a maximum of four other coding units, the tree representing the coding unit can be in the form of a quadtree.
[0106] In the encoder, the optimal size of the coding unit is selected according to the characteristics of the video picture (for example, resolution) or in consideration of coding efficiency, and information about the optimal size of the coding unit or information from which the optimal size of the coding unit can be derived can be included in the bitstream. For example, the size of the maximum coding unit and the maximum depth of the tree can be defined. In the case of performing square partitioning, since the height and width of the coding unit are half the height and width of the parent node coding unit, the minimum coding unit size can be obtained using the above information. Or, alternatively, the minimum coding unit size and maximum depth of the tree can be predefined and used, and the size of the maximum coding unit can be derived and used by the minimum coding unit size and the maximum depth of the tree. Because the size of the unit changes in multiples of 2 in square partitioning, the actual size of the coding unit is expressed as a logarithmic value with base 2 to increase transmission efficiency.
[0107] The decoder can obtain information indicating whether the current coding unit is split. If such information is obtained (transmitted) only under specific conditions, efficiency can be increased. For example, because the condition that the current coding unit can be split is that the size of the unit obtained by adding the current coding unit sizes at the current position is smaller than the size of the picture and the current unit size is larger than the preset minimum coding unit size, the information indicating whether the current coding unit is split can only be obtained in this case.
[0108] If the information indicates that the coding unit is split, the size of the split coding unit becomes half of the current coding unit and is split into four square coding units based on the current processing position. The above process can be repeated for each split coding unit.
[0109] Figure 5 The figure illustrates another embodiment of the present disclosure for splitting a coding unit. According to another embodiment of the present disclosure, the aforementioned quadtree-shaped coding unit can be further split into a binary tree structure with horizontal or vertical splitting. That is, a square quadtree splitting method can be first applied to the root coding unit, and then a rectangular binary tree splitting method can be applied to the leaf nodes of the quadtree. Depending on the embodiment, the binary tree splitting method can be a symmetrical horizontal splitting method or a symmetrical vertical splitting method, but the present disclosure is not limited thereto.
[0110] In each split node of the binary tree, a flag indicating the split type (i.e., horizontal split or vertical split) may be additionally signaled. According to an embodiment, when the value of the flag is "0," horizontal splitting may be indicated, and when the value of the flag is "1," vertical splitting may be indicated.
[0111] However, the partitioning method of the coding unit in the embodiment of the present disclosure is not limited to the above method, and asymmetric horizontal / vertical partitioning, ternary tree partitioning into three rectangular coding units, etc. can be applied thereto.
[0112] Picture prediction (motion compensation) for coding is performed on coding units that are no longer divided (ie, leaf nodes of the coding unit tree). A basic unit for performing such prediction is hereinafter referred to as a prediction unit or a prediction block.
[0113] Hereinafter, the term "unit" used in this specification may be used as a term to replace a prediction unit, which is a basic unit for performing prediction. However, the present disclosure is not limited thereto, and more broadly, the term may be understood to include the concept of a coding unit.
[0114] In order to reconstruct the current unit on which decoding is performed, the decoded portion of the current picture or other pictures including the current unit may be used. A picture (slice) reconstructed using only the current picture, that is, a picture (slice) on which only intra-frame prediction is performed, is called an intra-frame picture or I-picture (slice), and a picture (slice) on which both intra-frame prediction and inter-frame prediction can be performed for reconstruction is called an inter-frame picture (slice). Among inter-frame pictures (slices), a picture (slice) that uses at most one motion vector and reference index to predict each unit is called a predicted picture or P-picture (slice), and among inter-frame pictures (slices), a picture (slice) that uses at most two motion vectors and reference indices to predict each unit is called a bidirectionally predicted picture or B-picture (slice).
[0115] The intra-frame prediction unit performs intra-frame prediction for predicting the pixel value of the target unit based on the reconstructed area in the current picture. For example, the pixel value of the current unit can be predicted from the reconstructed pixels of the units located to the left and / or above the current unit. In this case, the units located to the left of the current unit may include the left unit, the upper left unit, and the lower left unit adjacent to the current unit. In addition, the units located above the current unit may include the upper unit, the upper left unit, and the upper right unit adjacent to the current unit.
[0116] Meanwhile, the inter-frame prediction unit performs inter-frame prediction for predicting the pixel value of the target unit by using information about other reconstructed pictures other than the current picture. In this case, the picture used for prediction is called a reference picture. An index indicating a reference picture including a corresponding reference region, motion vector information, etc. can be used to indicate which reference region will be used to predict the current unit during the inter-frame prediction process.
[0117] Inter-frame prediction can include L0 prediction, L1 prediction and bidirectional prediction. L0 prediction means prediction using a reference picture included in L0 (zeroth reference picture list), and L1 prediction means prediction using a reference picture included in L1 (first reference picture list). To this end, a set of motion information (e.g., motion vector and reference picture index) may be required. In the bidirectional prediction method, up to two reference areas can be used, and the two reference areas can exist in the same reference picture or in different pictures. That is, in the bidirectional prediction method, up to two sets of motion information (e.g., motion vector and reference picture index) can be used, and the two motion vectors can correspond to the same reference picture index or different reference picture indexes. In this case, the reference picture can be displayed (or output) before and after the current picture in terms of time.
[0118] The reference unit of the current unit can be obtained using a motion vector and a reference picture index. The reference unit exists in a reference picture having a reference picture index. In addition, the pixel value or interpolated value of the unit specified by the motion vector can be used as a predictor of the current unit. For motion prediction with pixel accuracy in sub-pel units, for example, an 8-tap interpolation filter can be used for a luminance signal, and a 4-tap interpolation filter can be used for a chrominance signal. However, the interpolation filter for motion prediction in sub-pel units is not limited thereto. As described above, motion compensation for predicting the texture of the current unit from a previously decoded picture is performed using motion information.
[0119] In the following, reference will be made to Figure 6 and Figure 7 The intra prediction method according to an embodiment of the present disclosure is described in more detail. As described above, the intra prediction unit predicts the pixel value of the current unit by using adjacent pixels located on the left and / or above the current unit as reference pixels.
[0120] like Figure 6 As illustrated in FIG, when the size of the current unit is N×N, a maximum of (4N+1) neighboring pixels located to the left and / or above the current unit can be used to set reference pixels. When at least some of the neighboring pixels to be used as reference pixels have not been reconstructed, the intra-frame prediction unit can perform a reference sample filling process according to a preset rule to obtain reference pixels. In addition, the intra-frame prediction unit can perform a reference sample filtering process to reduce errors in intra-frame prediction. That is, the reference pixels can be obtained by performing filtering on neighboring pixels and / or pixels obtained by the reference sample filling process. The intra-frame prediction unit uses the reference pixels obtained in this way to predict the pixels of the current unit.
[0121] Figure 7 The figure illustrates an embodiment of a prediction mode for intra-frame prediction. For intra-frame prediction, intra-frame prediction mode information indicating the intra-frame prediction direction can be signaled. When the current unit is an intra-frame prediction unit, the video signal decoding device extracts the intra-frame prediction mode information of the current unit from the bitstream. The intra-frame prediction unit of the video signal decoding device performs intra-frame prediction for the current unit based on the extracted intra-frame prediction mode information.
[0122] According to an embodiment of the present disclosure, the intra prediction mode may include a total of 67 modes. Each intra prediction mode may be indicated by a preset index (ie, an intra mode index). Figure 7As illustrated in , intra mode index 0 can indicate planar mode, intra mode index 1 can indicate DC mode, and intra mode indexes 2 to 66 can indicate different directional modes (i.e., angular modes), respectively. The intra prediction unit determines the reference pixels and / or interpolated reference pixels to be used for intra prediction of the current unit based on the intra prediction mode information of the current unit. When the intra mode index indicates a specific directional mode, the reference pixels or interpolated reference pixels corresponding to the specific direction from the current pixel of the current unit are used for prediction of the current pixel. Therefore, different reference pixels and / or interpolated reference pixel sets can be used for intra prediction according to the intra prediction mode.
[0123] After performing intra prediction of the current unit using reference pixels and intra prediction mode information, the video signal decoding apparatus reconstructs a pixel value of the current unit by adding a residual signal of the current unit obtained from the inverse transform unit and the intra predictor of the current unit.
[0124] Figure 8 is a diagram illustrating inter-frame prediction according to an embodiment of the present disclosure.
[0125] As described above, when encoding or decoding a current picture or block, it can be predicted from another picture or block. That is, the current picture or block can be encoded or decoded based on similarity with other pictures or blocks. The current picture or block can be encoded or decoded using signaling that omits portions similar to another picture or block from the current picture or block, as will be described further below. Prediction can be performed on a block-by-block basis.
[0126] refer to Figure 8 , there is a reference picture on the left and a current picture on the right, and the current picture or a part of the current picture can be predicted using similarity with the reference picture or a part of the reference picture. Figure 8 When the rectangle indicated by the solid line in the current picture is the block to be encoded and decoded, the current block can be predicted based on the rectangle indicated by the dotted line in the reference picture. In this case, there may be information indicating the block to be referenced by the current block (reference block), which can be directly sent with a signal or can be constructed by any convention to reduce signaling overhead. The information indicating the block to be referenced by the current block may include a motion vector. The motion vector may be a vector indicating the relative position between the current block and the reference block in the picture. Reference Figure 8 , there is a portion of the reference picture indicated by a dotted line, and a vector indicating how to move the current block to the block to be referenced in the reference picture may be a motion vector. That is, a block that appears when the current block moves according to the motion vector may be Figure 8 A portion indicated by a dotted line in the current picture of the reference picture, and the portion indicated by the dotted line may have the same position in the current picture as that of the reference block of the reference picture.
[0127] Furthermore, the information indicating the block to which the current block refers may include information indicating a reference picture. The information indicating the reference picture may include a reference picture list and a reference picture index. A reference picture list is a list of reference pictures, and reference blocks in the reference pictures included in the reference picture list can be used. In other words, the current block can be predicted based on the reference pictures included in the reference picture list. Furthermore, the reference picture index may be an index indicating the reference picture to be used.
[0128] Figure 9 is a diagram illustrating a method of signaling a motion vector according to an embodiment of the present disclosure.
[0129] According to an embodiment of the present disclosure, a motion vector MV may be generated based on a motion vector predictor MVP. For example, the motion vector predictor may be a motion vector as illustrated below.
[0130] MV=MVP
[0131] As another example, the motion vector may be based on a motion vector difference (MVD) as follows: A motion vector difference MVD may be added to the motion vector predictor in order to represent an accurate motion vector.
[0132] MV=MVP+MVD
[0133] In addition, in video coding, the encoder can transmit the determined motion vector information to the decoder, and the decoder can generate a motion vector and determine a prediction block based on the received motion vector information. For example, the motion vector information may include information about a motion vector predictor and a motion vector difference. In this case, the components of the motion vector information may vary depending on the mode. For example, in merge mode, the motion vector information may include information about a motion vector predictor but may not include a motion vector difference. As another example, in advanced motion vector prediction (AMVP) mode, the motion vector information may include information about a motion vector predictor and may include a motion vector difference.
[0134] In order to determine, transmit and receive information about the motion vector predictor, the encoder and the decoder may generate motion vector predictor MVP candidates (motion vector predictor candidates) in the same manner. For example, the encoder and the decoder may generate the same MVP candidates (motion vector predictor candidates) in the same order. Also, the encoder may transmit an index mvp_lx_flag indicating the MVP (motion vector predictor) determined from the generated MVP candidates (motion vector predictor candidates) to the decoder, and the decoder may find out the MVP (motion vector predictor) and MV determined based on this index mvp_lx_flag. The index mvp_lx_flag may include a motion vector predictor index mvp_l0_flag of the zeroth reference picture list list 0 and a motion vector predictor index mvp_l1_flag of the first reference picture list list 1. Figures 42 to 45 Describes the method of receiving the index mvp_lx_flag.
[0135] MVP candidates and MVP candidate generation methods may include spatial candidates, temporal candidates, and the like. A spatial candidate may be a motion vector of a block located at a predetermined distance from the current block. For example, a spatial candidate may be a motion vector corresponding to a block or position adjacent to or not adjacent to the current block. A temporal candidate may be a motion vector corresponding to a block in a picture different from the current picture. Alternatively, MVP candidates may include an affine motion vector, an ATMVP, a STMVP, a combination of the above motion vectors, an average vector of the above motion vectors, a zero motion vector, and the like.
[0136] In addition, information indicating the reference picture may be transmitted from the encoder to the decoder. In addition, when the reference picture corresponding to the MVP candidate does not correspond to the information indicating the reference picture, motion vector scaling may be performed. Motion vector scaling may be based on the picture order count (POC) of the current picture, the POC of the reference picture of the current block, the POC of the reference picture of the MVP candidate, and the calculation of the MVP candidate.
[0137] Figure 10 is a diagram illustrating a motion vector difference syntax according to an embodiment of the present disclosure.
[0138] The motion vector difference can be coded by dividing the sign and the absolute value of the motion vector difference. That is, the sign and the absolute value of the motion vector difference can be different syntaxes. In addition, the absolute value of the motion vector difference can be coded directly, but it can be Figure 10 The diagram in is compiled with a flag indicating whether the absolute value is greater than N. If the absolute value is greater than N, the value of (absolute value - N) can be signaled together. Figure 10For example, abs_mvd_greater0_flag may be transmitted, and this flag may be a flag indicating whether the absolute value is greater than 0. If abs_mvd_greater0_flag indicates that the absolute value is not greater than 0, it may be determined that the absolute value is 0. In addition, if abs_mvd_greater0_flag indicates that the absolute value is greater than 0, additional syntax may exist. For example, abs_mvd_greater1_flag may exist, and this flag may be a flag indicating whether the absolute value is greater than 1. If abs_mvd_greater1_flag indicates that the absolute value is not greater than 1, it may be determined that the absolute value is 1. If abs_mvd_greater1_flag indicates that the absolute value is greater than 1, additional syntax may exist. For example, abs_mvd_minus2 may exist, and its value may be (absolute value - 2). This indicates (absolute value -2) because the absolute value is determined to be greater than 1 (2 or more) by the above-mentioned abs_mvd_greater0_flag and abs_mvd_greater1_flag. When abs_mvd_minus2 is binarized to a variable length, it is used to signal with fewer bits. For example, there are variable length binarization methods such as Exp-Golomb, truncated unary, and truncated Rice. In addition, mvd_sign_flag can be a flag indicating the sign of the motion vector difference.
[0139] Although the coding method has been described by the motion vector difference in this embodiment, information other than the motion vector difference may be divided into signs and absolute values, and the absolute value may be coded with a flag indicating whether the absolute value is greater than a certain value and a value obtained by subtracting a certain value from the absolute value. In addition, Figure 10 The [0] and [1] in the _ can represent component indices. For example, [0] and [1] can represent the x component and the y component.
[0140] Figure 11 is a diagram illustrating signaling of adaptive motion vector resolution according to an embodiment of the present disclosure.
[0141] According to an embodiment of the present disclosure, the resolution indicating the motion vector or motion vector difference may vary. In other words, the resolution at which the motion vector or motion vector difference is coded may vary. For example, the resolution may be expressed in pixels (picture elements). For example, the motion vector or motion vector difference may be signaled in units of 1 / 4 (quarter) pixel, 1 / 2 (half) pixel, 1 (integer) pixel, 2 pixels, 4 pixels, etc. When it is desired to represent 16, it may be coded as 64 (1 / 4*64=16) so as to perform signaling in units of 1 / 4, it may be coded as 16 (1*16=16) so as to perform signaling in units of 1, and it may be coded as 4 (4*4=16) so as to perform signaling in units of 4. That is, the value may be determined as follows.
[0142] valueDetermined = resolution * valuePerResolution
[0143] Here, valueDetermined is a value to be transmitted, and in this embodiment, may be a motion vector or a motion vector difference. In addition, valuePerResolution may be a value obtained by expressing valueDetermined in units of [ / resolution].
[0144] In this case, if the value signaled as the motion vector or motion vector difference is not divisible by the resolution, an inaccurate value may be transmitted instead of the motion vector or motion vector difference with the best prediction performance due to rounding, etc. When a high resolution is used, the inaccuracy can be reduced, but because the coded value is large, many bits may be used, and when a low resolution is used, the inaccuracy may increase, but because the coded value is small, fewer bits can be used.
[0145] It is also possible to set the resolution differently in units of blocks, CUs, slices, etc. Therefore, the resolution can be adaptively applied to fit the unit.
[0146] The resolution can be signaled from the encoder to the decoder. In this case, the signaling for the resolution can be signaling using the above-mentioned variable length binarization. In this case, when signaling is performed with an index corresponding to the minimum value (the first value), signaling overhead is reduced.
[0147] In one embodiment, the signaling indexes may be matched in order from high resolution (detailed signaling) to low resolution.
[0148] Figure 11The signaling for three types of resolutions is shown in the figure. In this case, the three signalings may be 0, 10, and 11, and each of the three signalings may correspond to resolution 1, resolution 2, and resolution 3. The signaling overhead is low when resolution 1 is signaled because 1 bit is required to signal resolution 1, and 2 bits are required to signal the remaining resolutions. Figure 11 In the example, resolution 1, resolution 2, and resolution 3 are 1 / 4 pixel, 1 pixel, and 4 pixels, respectively.
[0149] In the following disclosure, motion vector resolution may mean the resolution of motion vector difference.
[0150] Figure 12 is a diagram illustrating signaling of adaptive motion vector resolution according to an embodiment of the present disclosure.
[0151] As reference Figure 11 As described above, because the number of bits required to signal a resolution may vary depending on the resolution, the signaling method can be changed depending on the situation. For example, the signaling value used to signal a certain resolution may be different depending on the situation. For example, the signaling index and resolution may be matched in a different order depending on the situation. For example, the resolutions corresponding to signaling 0, 10, 110, ... may be resolution 1, resolution 2, resolution 3, ... in one situation, respectively, and may be in a different order than resolution 1, resolution 2, resolution 3, ... in another situation. It is also possible to define two or more situations.
[0152] refer to Figure 12 , the resolutions corresponding to 0, 10, and 11 may be resolution 1, resolution 2, and resolution 3, respectively, in case 1, and may be resolution 2, resolution 1, and resolution 3, respectively, in case 2. In this case, there may be two or more cases.
[0153] Figure 13 is a diagram illustrating signaling of adaptive motion vector resolution according to an embodiment of the present disclosure.
[0154] As reference Figure 12 As described above, the motion vector resolution may be signaled differently depending on the situation. For example, assuming there are resolutions of 1 / 4, 1, and 4 pixels, in some cases, reference Figure 11 The signaling described can be used, and in some cases, can be used Figure 13 (a) or Figure 13 (b) is the signaling shown in the figure. Figure 11 、 Figure 13 (a) and Figure 13Two or all three of (b). Thus, in some cases, a resolution that is not the highest resolution can be signaled with fewer bits.
[0155] Figure 14 is a diagram illustrating signaling of adaptive motion vector resolution according to an embodiment of the present disclosure.
[0156] According to an embodiment of the present disclosure, the possible resolution may depend on the reference Figure 11 The adaptive motion vector resolution described above may be changed depending on the situation. For example, the resolution value may change depending on the situation. In one embodiment, it is possible to use a resolution value among resolution 1, resolution 2, resolution 3, resolution 4, ... in a certain situation, and use a resolution value among resolution A, resolution B, resolution C, resolution D, ... in another situation. In addition, there may be a non-empty intersection between {resolution 1, resolution 2, resolution 3, resolution 4, ...} and {resolution B, resolution C, resolution D, ...}. That is, a certain resolution value can be used in two or more situations, and the set of available resolution values may be different in the two or more situations. In addition, the number of available resolution values may be different for each situation.
[0157] refer to Figure 14 , resolution 1, resolution 2, and resolution 3 can be used in case 1, and resolution A, resolution B, and resolution C can be used in case 2. For example, resolution 1, resolution 2, and resolution 3 can be 1 / 4, 1, and 4 pixels. Also, for example, resolution A, resolution B, and resolution C can be 1 / 4, 1 / 2, and 1 pixel.
[0158] Figure 15 is a diagram illustrating signaling of adaptive motion vector resolution according to an embodiment of the present disclosure.
[0159] refer to Figure 15 , the resolution signaling can be made different depending on the motion vector candidate or motion vector predictor candidate. For example, it may be different from selecting Figures 12 to 14 or which candidate the motion vector or motion vector predictor is. A method to make the signaling different may follow Figures 12 to 14 method.
[0160] For example, a case may be defined differently depending on where it is located among the candidates. Alternatively, a case may be defined differently depending on how the candidates are constructed.
[0161] The encoder or decoder may generate a candidate list including at least one MV candidate (motion vector candidate) or at least one MVP candidate (motion vector predictor candidate). There may be a tendency that the MVP (motion vector predictor) at the front of the candidate list of MV candidates (motion vector candidates) or MVP candidates (motion vector predictor candidates) has high accuracy while the MVP candidates (motion vector predictor candidates) at the back of the candidate list have low accuracy. This can be designed so that the candidate at the front of the candidate list is signaled with fewer bits, and the MVP (motion vector predictor) at the front of the candidate list has higher accuracy. In an embodiment of the present disclosure, if the accuracy of the MVP (motion vector predictor) is high, the motion vector difference (MVD) value representing a motion vector with good prediction performance may be small, and if the accuracy of the MVP (motion vector predictor) is low, the MVD (motion vector difference) value representing a motion vector with good prediction performance may be large. Therefore, when the accuracy of the MVP is low, the bits required to represent the motion vector difference (e.g., a value representing a difference value based on resolution) can be reduced by signaling at a low resolution.
[0162] By this principle, since a low resolution can be used when the MVP (motion vector predictor) accuracy is low, according to an embodiment of the present disclosure, it is possible to signal a resolution that is not the highest resolution with the least bits according to the MVP candidate (motion vector predictor candidate). For example, when a resolution of 1 / 4, 1, or 4 pixels is possible, 1 or 4 can be signaled with the least bit (1 bit). Figure 15 , for Candidate 1 and Candidate 2, a high resolution of 1 / 4 pixel is signaled with the least bits, and for Candidate N following Candidate 1 and Candidate 2, a resolution other than 1 / 4 pixel is signaled with the least bits.
[0163] Figure 16 is a diagram illustrating signaling of adaptive motion vector resolution according to an embodiment of the present disclosure.
[0164] As reference Figure 15 As described, the motion vector resolution signaling can be made different depending on which candidate the determined motion vector or motion vector predictor is. The method of making the signaling different can follow Figures 12 to 14 method.
[0165] refer to Figure 16For some candidates, a high resolution is signaled with minimal bits, while for some candidates, a resolution other than the high resolution is signaled with minimal bits. For example, a candidate that signals a resolution other than the high resolution with minimal bits may be an incorrect candidate. For example, a candidate that signals a resolution other than the high resolution with minimal bits may be a temporal candidate, a candidate with zero motion vectors, a non-adjacent spatial candidate, a candidate that depends on the presence of refinement, etc.
[0166] A temporal candidate may be a motion vector from another picture. A zero motion vector may be a motion vector with all vector components equal to zero. A non-adjacent spatial candidate may be a motion vector referenced from a location that is not adjacent to the current block. The refinement process may be a process of refining the motion vector predictor, for example, by template matching, bilateral matching, or the like.
[0167] According to embodiments of the present disclosure, the motion vector difference can be added after the motion vector predictor is refined. This can reduce the motion vector difference by making the motion vector predictor accurate. In this case, the motion vector resolution signaling can be different for candidates that were not refined. For example, a resolution that is not the highest resolution can be signaled with the least number of bits.
[0168] According to another embodiment, a refinement process can be performed after the motion vector difference is added to the motion vector predictor. In this case, the motion vector resolution signaling can be made different for the candidates with the refinement process. For example, a resolution that is not the highest resolution can be signaled with the least bits. This is because, since the refinement process is performed after the motion vector difference is added, even if the MV difference (motion vector difference) is not signaled as accurately as possible, the prediction error can be reduced (made smaller) by the refinement process.
[0169] As another example, when a selected candidate differs from another candidate by a certain value or more, the motion vector resolution signaling may be changed.
[0170] In another embodiment, the subsequent motion vector refinement process can be made different depending on which candidate the determined motion vector or motion vector predictor is. The motion vector refinement process can be a process for finding a more accurate motion vector. For example, the motion vector refinement process can be a process for finding a block that matches the current block according to a set convention from a reference point (for example, template matching or bilateral matching). The reference point can be a position corresponding to the determined motion vector or motion vector predictor. In this case, the degree of movement from the reference point can vary according to the set convention, and making the motion vector refinement process different can make the degree of movement from the reference point different. For example, for an accurate candidate, the motion vector refinement process can start with a detailed refinement process, and for an inaccurate candidate, start with a less detailed refinement process. Accurate candidates and inaccurate candidates can be determined based on the position in the candidate list or how the candidate is generated. How the candidate is generated may be related to the position that brings the spatial candidate. In addition, reference can be made to this. Figure 16 Description. Furthermore, detailed or less detailed refinement can be performed by finding a matching block when moving a little or a lot from the reference point. Furthermore, when finding a matching block during a large movement, it is possible to add to the search process by moving a little from the closest matching block found during the large movement.
[0171] In another embodiment, the motion vector resolution signaling can be changed based on the POC of the current picture and the POC of the reference picture of the motion vector or motion vector predictor candidate. The method of making the signaling different can follow Figures 12 to 14 method.
[0172] For example, when the difference between the picture order count (POC) of the current picture and the POC of the reference picture of the motion vector or motion vector predictor candidate is large, the motion vector or motion vector predictor may be inaccurate and a resolution that is not high resolution may be signaled with the least bits.
[0173] As another example, motion vector resolution signaling can be modified based on whether motion vector scaling is required. For example, when the selected motion vector or motion vector predictor is a candidate for motion vector scaling, a resolution other than high resolution can be signaled with minimal bits. Motion vector scaling can be performed when the reference picture of the current block and the reference picture of the reference candidate are different.
[0174] Figure 17 is a diagram illustrating affine motion prediction according to an embodiment of the present disclosure.
[0175] In the reference Figure 8In the described conventional prediction method, a current block can be predicted from a block that starts from a moving position without rotation or scaling. It is possible to predict from a reference block that has the same size, shape, and angle as the current block. Figure 8 It is just a translation motion model. However, the content included in an actual image can have more complex motion, and the prediction performance can be further improved if prediction is made from various shapes.
[0176] Reference Figure 17 A current predicted block is indicated by a solid line in a current picture. The current block can be predicted by referring to a block that has a different shape, size, and angle from the current predicted block, and the reference block is indicated by a dotted line in a reference picture. A position that is the same as a position in the picture of the reference block is indicated by a dotted line in the current picture. In this case, the reference block can be a block represented by an affine transformation in the current block. In this way, it is possible to represent stretching (scaling), rotation, shear, reflection, orthogonal projection, etc.
[0177] The number of parameters representing affine motion and affine transformation can vary. If more parameters are used, it is possible to represent more various motions than when fewer parameters are used, but there is a possibility that overhead can occur in signaling or calculation, etc.
[0178] For example, an affine transformation can be represented by 6 parameters. Alternatively, an affine transformation can be represented by three control point motion vectors.
[0179] Figure 18 is a diagram illustrating affine motion prediction according to an embodiment of the disclosure.
[0180] It is possible to represent complex motion using an affine transformation as in Figure 17 However, in order to reduce signaling overhead and calculation for this, a simpler affine motion prediction or affine transformation can be used. By limiting motion, a simpler affine motion prediction can be made. Limiting movement can limit the shape of the reference block into which the current block is transformed.
[0181] Reference Figure 18 An affine motion prediction can be performed using control point motion vectors v0 and v1. Using two vectors v0 and v1 can be equivalent to using four parameters. By two vectors v0 and v1 or four parameters, it is possible to indicate the shape of the reference block from which the current block is predicted. By using such a simple affine transformation, it is possible to represent the motion of rotation and scaling (enlargement / reduction) of a block. Reference Figure 18 A current block indicated by a solid line can be predicted from a position indicated by a dotted line in Figure 18 Each point (pixel) of the current block can be mapped to another point by an affine transformation.
[0182] Figure 19is an expression illustrating a motion vector field according to an embodiment of the disclosure. Figure 18 A control point motion vector v0 in can be (v_0x, v_0y) and can be a motion vector of a top-left control point. Also, a control point motion vector v1 can be (v_1x, v_1y) and can be a motion vector of a top-right control point. In this case, a motion vector (v_x, v_y) at a (x, y) position can be illustrated as Figure 19 in. Thus, a motion vector at each pixel position or a certain position can be estimated according to an expression of Figure 19 based on v0 and v1.
[0183] Also, (x, y) in an expression of Figure 19 may be a relative coordinate within a block. For example, (x, y) can be a position when a top-left position of a block is (0, 0).
[0184] If v0 is a control point motion vector at a position (x0, y0) on a picture and v1 is a control point motion vector at a position (x1, y1) on a picture, if it intends to express a position (x, y) within a block using the same coordinates as positions of v0, v1, it can be expressed by changing x and y in an expression of Figure 19 to (x-x0) and (y-y0), respectively. Also, w (a width of a block) can be (x1-x0).
[0185] Figure 20 is a diagram illustrating affine motion prediction according to an embodiment of the disclosure.
[0186] According to an embodiment of the disclosure, affine motion can be expressed using a plurality of control point motion vectors or a plurality of parameters.
[0187] Referring to Figure 20 , affine motion prediction can be performed using control point motion vectors of v0, v1, and v2. Using three vectors v0, v1, v2 can be equivalent to using six parameters. The three vectors v0, v1, and v2 or the six parameters can indicate a shape of a reference block from which a current block is predicted. Referring to Figure 20 , a current block indicated by a solid line can be predicted from a position indicated by a dotted line in a reference picture. Each point (pixel) of the current block can be mapped to another point by an affine transformation. Figure 20
[0188] Figure 21 is an expression illustrating a motion vector field according to an embodiment of the disclosure. In Figure 20 In this case, the control point motion vector v0 may be (mv_0^x, mv_0^y) and may be the motion vector of the upper left control point, the control point motion vector v1 may be (mv_1^x, mv_1^y) and may be the motion vector of the upper right control point, and the control point motion vector v2 may be (mv_2^x, mv_2^y) and may be the motion vector of the lower left control point. In this case, the motion vector (mv^x, mv^y) of the (x, y) position may be as follows Figure 21 Therefore, according to Figure 21 The expression estimates the motion vector for each pixel position or a certain position based on v0, v1 and v2.
[0189] also, Figure 21 The (x,y) in the expression of can be relative coordinates within the block. For example, (x,y) can be the position when the upper left position of the block is (0,0). Therefore, if it is assumed that v0 is the control point motion vector of the position (x0,y0), v1 is the control point motion vector of the position (x1,y1), and v2 is the control point motion vector of the position (x2,y2) and it is intended to use the same coordinates as the positions of v0, v1 and v2 to express (x,y), it can be achieved by respectively Figure 21 In the expression, x and y are changed to (x-x0) and (y-y0). In addition, w (the width of the block) can be (x1-x0), and h (the height of the block) can be (y2-y0).
[0190] Figure 22 is a diagram illustrating affine motion prediction according to an embodiment of the present disclosure.
[0191] As mentioned above, there is a motion vector field and a motion vector can be calculated for each pixel, but for simplicity it can be calculated in Figure 22 Perform an affine transformation based on the sub-blocks shown in FIG. Figure 22 A small rectangle in (a) is a sub-block, and a representative motion vector of the sub-block can be constructed, and the representative motion vector can be used for the pixels of the sub-block. Figure 17 、 18 , 20, etc., a sub-block may correspond to a reference block by expressing such a motion, or it may be made simpler by applying only a translation motion to the sub-block. Figure 22 In (a), v0, v1 and v2 can be control point motion vectors.
[0192] In this case, the size of the sub-block can be M*N, and M and N can be Figure 22(b) is the same as that shown in FIG. And, MvPre may be the motion vector fractional accuracy. In addition, (v_0x, v_0y), (v_1x, v_1y) and (v_2x, v_2y) may be the motion vectors of the upper left, upper right and lower left control points, respectively. (v_2x, v_2y) may be the motion vector of the lower left control point of the current block, for example, in the case of 4-parameters, it may be obtained by Figure 19 The MV (motion vector) of the lower left control point is calculated using the expression.
[0193] In addition, when constructing the representative motion vector of the sub-block, the central sample position of the sub-block can be used to calculate the representative motion vector. In addition, when constructing the motion vector of the sub-block, a motion vector with higher accuracy than a normal motion vector can be used, and for this purpose, a motion compensation interpolation filter can be applied.
[0194] In another embodiment, the size of the sub-block is immutable and may be fixed to a specific size. For example, the sub-block size may be fixed to 4*4.
[0195] Figure 23 is a diagram illustrating one mode of affine motion prediction according to an embodiment of the present disclosure.
[0196] According to an embodiment of the present disclosure, there may be an affine inter mode as an example of affine motion prediction. There may be a flag indicating that it is an affine inter mode. Figure 23 , there may be blocks at positions A, B, C, D, and E near v0 and v1, and the motion vectors corresponding to these blocks may be called vA, vB, vC, vD, vE, respectively. Using this, a candidate list can be constructed for the following motion vectors or motion vector predictors.
[0197] {(v0,v1)|v0={vA,vB,vC},v1={vD,vE}}
[0198] That is, a (v0, v1) pair can be constructed with v0 selected from vA, vB, and vC, and v1 selected from vD and vE. In this case, the motion vector can be scaled based on the picture order count (POC) of the reference of the neighboring block, the POC of the reference of the current CU (current coding unit; current block), and the POC of the current CU. When the candidate list is constructed from the same motion vector pairs as described above, it is possible to signal which candidate in the candidate list is selected and whether it is selected. In addition, if the candidate list is not fully populated, the candidate list can be filled with other inter-frame prediction candidates. For example, Advanced Motion Vector Prediction (AMVP) candidates can be used for filling. In addition, instead of directly using v0 and v1 selected from the candidate list as the control point motion vectors for affine motion prediction, the difference used for correction can be signaled, thereby enabling the construction of better control point motion vectors. That is, in the decoder, v0' and v1' constructed by adding the difference to v0 and v1 selected from the candidate list can be used as the control point motion vectors for affine motion prediction.
[0199] In one embodiment, for coding units (CUs) of a certain size or larger, affine inter mode can also be used.
[0200] Figure 24 is a diagram illustrating one mode of affine motion prediction according to an embodiment of the present disclosure.
[0201] According to an embodiment of the present disclosure, there may be an affine merge mode as an example of affine motion prediction. There may be a flag indicating that it is an affine merge mode. In the affine merge mode, when affine motion prediction is used around the current block, the control point motion vector of the current block can be calculated from the motion vector of the block or the surrounding blocks. For example, when checking whether a neighboring block uses affine motion prediction, the neighboring block that becomes a candidate can be as follows. Figure 24 (a). In addition, it is possible to check whether affine motion prediction is used in the order of A, B, C, D, and E, and when a block using affine motion prediction is found, the control point motion vector of the current block can be calculated using the motion vector of the block or the motion vectors around the block. A, B, C, D, and E can be left, top, top right, bottom left, top left, respectively, as shown in FIG. Figure 24 As shown in (a).
[0202] In an embodiment, when the block at position A uses Figure 24 In the affine motion prediction shown in (b), v0 and v1 can be calculated using the motion vectors of the block or the surrounding blocks. The motion vectors of the surrounding blocks may be v2, v3, and v4.
[0203] In the previous embodiment, the order of the adjacent blocks to be referenced is determined. However, the performance of the control point motion vector derived from a specific position is not always better. Therefore, in another embodiment, it is possible to use a signal to send the block at which position the control point motion vector is derived. For example, according to Figure 24 The order of A, B, C, D, E in (a) determines the candidate positions for control point motion vector derivation, and the candidate positions to be referenced can be signaled.
[0204] In another embodiment, when deriving the control point motion vectors, the accuracy can be increased by obtaining the neighboring blocks of each control point motion vector. Figure 24 , the left block may be referenced when deriving v0, and the upper block may be referenced when deriving v1. Alternatively, A, D, or E may be referenced when deriving v0, and B or C may be referenced when deriving v1.
[0205] Figure 25 is a diagram illustrating affine motion predictor derivation according to an embodiment of the present disclosure.
[0206] Affine motion prediction may require control point motion vectors, and a motion vector field, ie, a motion vector of a sub-block or a certain position, may be calculated based on the control point motion vectors. The control point motion vectors may be referred to as seed vectors.
[0207] In this case, the control point MV (control point motion vector) can be based on the predictor. For example, the predictor can be a control point MV (control point motion vector). As another example, the control point MV can be calculated based on the predictor and the difference. Specifically, the control point MV (control point motion vector) can be calculated by adding or subtracting the difference from the predictor.
[0208] In this case, in the process of constructing the predictor of the control point MV, it can be derived from the control point MV (control point motion vector) or MV (motion vector) of the neighboring block on which affine motion prediction (affine motion compensation (MC)) is performed. For example, if a block corresponding to a preset position is subjected to affine motion prediction, the predictor for affine motion compensation of the current block can be derived from the control point MV or MV of the block. Figure 25 , the preset positions may be A0, A1, B0, B1, and B2. Alternatively, the preset positions may include positions adjacent to the current block and positions not adjacent to the current block. In addition, the control point MV (control point motion vector) or the MV (motion vector) at the preset position (space) can be referenced, and the temporal control point MV or the MV at the preset position can be referenced.
[0209] Candidates for affine motion compensation (MC) can be expressed as Figure 25The embodiment of the present invention is constructed in the same manner, and this candidate can also be called an inheritance candidate. Alternatively, such a candidate can be called a merge candidate. In addition, when referring to Figure 25 When the preset positions in the method are referenced, they can be referenced in the preset order.
[0210] Figure 26 is a diagram illustrating affine motion predictor derivation according to an embodiment of the present disclosure.
[0211] Affine motion prediction may require control point motion vectors, and a motion vector field, ie, a motion vector of a sub-block or a certain position, may be calculated based on the control point motion vectors. The control point motion vectors may also be referred to as seed vectors.
[0212] In this case, the control point MV (control point motion vector) can be based on the predictor. For example, the predictor can be the control point MV (control point motion vector). As another example, the control point MV (control point motion vector) can be calculated based on the predictor and the difference. Specifically, the control point MV (control point motion vector) can be calculated by adding or subtracting the difference from the predictor.
[0213] In this case, the predictor of the control point MV can be derived from neighboring MVs during the construction process. In this case, the neighboring MVs may include MVs (motion vectors) that have not undergone affine motion compensation (MC). For example, when deriving each control point MV (control point motion vector) of the current block, the MV at a preset position of each control point MV may be used as the predictor of the control point MV. For example, the preset position may be a portion included in a block adjacent to the portion at the preset position.
[0214] refer to Figure 26 , the control point MVs (control point motion vectors) mv0, mv1, and mv2 can be determined. In this case, according to an embodiment of the present disclosure, the MVs (motion vectors) corresponding to the preset positions A, B, and C can be used as predictors for mv0. In addition, the MVs (motion vectors) corresponding to the preset positions D and E can be used as predictors for mv1. The MVs (motion vectors) corresponding to the preset positions F and G can be used as predictors for mv2.
[0215] In addition, when based on Figure 26 When determining each predictor of control point motion vectors (MVs) mv0, mv1, and mv2, an embodiment of the present invention may determine an order in which preset positions are referenced for each control point position. Furthermore, for each control point, there may be multiple preset positions referenced as predictors of the control point MV, and possible combinations of the preset positions may be determined.
[0216] Candidates for affine MC (affine motion compensation) can be obtained with Figure 26 In the same manner as in the embodiment of , this candidate may also be referred to as a constructed candidate. Alternatively, this candidate may be referred to as an inter-frame candidate or a virtual candidate. In addition, when referring to Figure 41 When the preset positions in the method are referenced, they can be referenced in the preset order.
[0217] According to an embodiment of the present disclosure, using reference Figures 23 to 26 The described embodiments or a combination thereof may generate a candidate list of affine MC (affine motion compensation) or a control point MV candidate list of affine MC (affine motion compensation).
[0218] Figure 27 is a diagram illustrating affine motion predictor derivation according to an embodiment of the present disclosure.
[0219] As reference Figures 24 to 25 As described, the control point MV (control point motion vector) for affine motion prediction of the current block can be derived from the neighboring blocks that have undergone affine motion prediction. In this case, the control point MV (control point motion vector) can be used to predict the affine motion of the current block. Figure 27 The same method. Figure 27 In the expression of , the upper left, upper right, and lower left MVs or control point MVs (motion vectors) of the neighboring block undergoing affine motion prediction are (v_E0x, v_E0y), (v_E1x, v_E1y), and (v_E2x, v_E2y), respectively. In addition, the upper left, upper right, and lower left coordinates of the neighboring block undergoing affine motion prediction may be (x_E0, y_E0), (x_E1, y_E1), and (x_E2, y_E2), respectively. In this case, (v_0x, v_0y) and (v_1x, v_1y) of the predictor or control point MV (control point motion vector) of the current block may be calculated according to 27.
[0220] Figure 28 is a diagram illustrating affine motion predictor derivation according to an embodiment of the present disclosure.
[0221] As described above, affine motion compensation may require multiple control motion MVs (control point motion vectors) or multiple control point MV predictors (control point motion vector predictors). In this case, another control motion MV (control point motion vector) or control point MV predictor (control point motion vector predictor) can be derived from a certain control motion MV (control point motion vector) or control point MV predictor (control point motion vector predictor).
[0222] For example, when two control point MVs (control point motion vectors) or two control point MV predictors (control point motion vector predictors) are constructed by the method described in the previous figures, another control point MV (control point motion vector) or another control point MV predictor (control point motion vector predictor) can be generated based on this.
[0223] refer to Figure 28 , illustrates a method of generating mv0, mv1, and mv2 as control point MV predictors (control point motion vector predictors) or control point MVs (control point motion vectors) for the upper left, upper right, and lower left. In the drawings, x and y represent x and y components, respectively, and the current block size may be w*h.
[0224] Figure 29 is a diagram illustrating a method of generating a control point motion vector according to an embodiment of the present disclosure.
[0225] According to an embodiment of the present disclosure, it is possible to determine a control point MV (control point motion vector) by constructing a predictor of the control point MV (control point motion vector) so as to perform affine MC (affine motion compensation) on the current block and add a difference thereto. Figures 23 to 26 The described method constructs the predictor of the control point MV. The difference can be signaled from the encoder to the decoder.
[0226] refer to Figure 29 , there may be a difference in the control point MV (control point motion vector). In addition, the difference in the control point MV (control point motion vector) can be sent separately using signals. Figure 29 (a) illustrates a method for determining mv0 and mv1 as the control point MVs of a 4-parameter model, and Figure 29 (b) illustrates a method for determining mv0, mv1, and mv2, which are control point MVs of a 6-parameter model. The control point MVs (control point motion vectors) are determined by adding mvd0, mvd1, and mvd2, which are differences of the control point MVs (control point motion vectors), to the predictors.
[0227] pass Figure 29 The terms indicated by the upper horizontal line in may be predictors of the control point MV (control point motion vector).
[0228] Figure 30 The diagram is referenced by Figure 29 A method for determining motion vector differences is described in FIG.
[0229] As an example, one can refer to Figure 10 The method described herein signals the motion vector difference. Also, the motion vector difference determined by the signaling method may be Figure 30 Moreover, such as in Figure 29 The values of the motion vector differences mvd signaled in , i.e., values such as mvd0, mvd1, mvd2 may be Figure 30 lMvd in. As reference Figure 29 As described above, the signaled mvd (motion vector difference) may be determined as a difference from the predictor of the control point MV (control point motion vector), and the determined difference may be Figure 30 MvdL0 and MvdL1. L0 may indicate reference list 0 (zeroth reference picture list), and L1 may indicate reference list 1 (first reference picture list). compIdx is a component index and may indicate x, y components, etc.
[0230] Figure 31 is a diagram illustrating a method of generating a control point motion vector according to an embodiment of the present disclosure.
[0231] According to an embodiment of the present disclosure, it is possible to determine a control point MV (control point motion vector) by constructing a predictor of the control point MV so as to perform affine MC (affine motion compensation) on the current block and adding a difference thereto. Figures 23 to 26 The described method constructs a predictor of a control point MV (control point motion vector). The difference can be signaled from the encoder to the decoder.
[0232] refer to Figure 31 , there may be a predictor for the difference of each control point MV (control point motion vector). For example, the difference of a certain control point MV (control point motion vector) may be determined based on the difference of another control point MV (control point motion vector). This may be based on the similarity between the differences of the control point MVs (control point motion vectors). Because the differences are similar, if a predictor is determined, a slight difference from the predictor can be generated. In this case, the difference predictor of the control point MV (control point motion vector) may be signaled, and the difference from the difference predictor of the control point MV (control point motion vector) may be signaled.
[0233] Figure 31 (a) illustrates a method of determining mv0 and mv1 of the control point MV (control point motion vector) as a 4-parameter model, and Figure 31 (a) illustrates a method of determining mv0, mv1, and mv2 as control point MVs (control point motion vectors) of a 6-parameter model.
[0234] refer to Figure 31 , for each difference of the control point MV, the difference of the control point MV and the control point MV are determined based on the difference mvd0 of mv0 which is the control point MV0. Figure 31 The mvd0, mvd1, and mvd2 shown in the figure can be sent from the encoder to the decoder using signals. Figure 29 Compared to the method described in Figure 31 In the method, even with Figure 29 If the same mv0, mv1 and mv2 and the same predictors are used, the values of mvd1 and mvd2 signaled may also be different. If the differences with the predictors of the control points MVmv0, mv1 and mv2 are similar, then when using Figure 31 When the absolute value of mvd1 and mvd2 is less than Figure 29 The method is possible and thus can reduce the signaling overhead of mvd1 and mvd2. Figure 31 , the difference from the predictor of mv1 can be determined as (mvd1+mvd0), and the difference from the predictor of mv2 can be determined as (mvd2+mvd0).
[0235] pass Figure 31 The terms indicated by the upper horizontal line in may be predictors of the control point MV.
[0236] Figure 32 The diagram is referenced by Figure 31 A method for determining motion vector differences is described in FIG.
[0237] As an example, one can refer to Figure 10 or Figure 33 The method described signals the motion vector difference. Furthermore, the motion vector difference determined based on the signaled parameters may be Figure 32 In addition, Figure 31 The values of mvd signaled in , i.e., mvd0, mvd1, mvd2, can be Figure 32 lMvd in.
[0238] Figure 32 The MvdLX can be the difference between each control point MV (control point motion vector) and the predictor. That is, it can be (mv-mvp). In this case, as shown in the reference Figure 31 As described, for the control point MV 0mv_0, the motion vector difference sent by the signal can be directly used for the difference MvdLX of the control point MV, and for the other control points MV (mv_1, mv_2), the motion vector difference sent by the signal can be used based on the difference MvdLX of the control point MV. Figure 31 mvd1 and mvd2 in ) and the motion vector difference ( mvd1 and mvd2 in ) for the control point MV 0mv_0 signaled Figure 31 mvd0) in to determine and use MvdLX as the difference of the control point MV.
[0239] Figure 32LX in can indicate a reference list X (reference picture list X). compIdx is a component index, and can indicate x, y component, etc. cpIdx can indicate a control point index. cpIdx can mean Figure 31 0, 1, or 0, 1, 2 illustrated in
[0240] The resolution of the motion vector difference in the values illustrated in Figure 10 , Figure 12 , Figure 13 etc. can be considered. For example, when the resolution is R, a value of lMvd*R can be used for lMvd in the drawing.
[0241] Figure 33 is a diagram illustrating a motion vector difference syntax according to an embodiment of the disclosure.
[0242] Referring to Figure 33 , the motion vector difference can be coded in a similar manner as described with reference to Figure 10 . In this case, the coding can be performed individually according to the control point index cpIdx.
[0243] Figure 34 is a diagram illustrating a higher level signaling structure according to an embodiment of the disclosure.
[0244] According to an embodiment of the disclosure, there can be one or more higher level signaling. The higher level signaling can mean signaling at a higher level. The higher level can be a unit including any unit. For example, the higher level of the current block or the current coding unit can include a CTU, a slice, a tile, a tile group, a picture, a sequence, etc. The higher level signaling can affect lower levels of the corresponding higher level. For example, if the higher level is a sequence, it can affect CTU, slice, tile, tile group, and picture units, which are lower levels of the sequence. Here, the influence is that the higher level signaling affects the encoding or decoding of the lower level.
[0245] In addition, the higher level signaling can include signaling indicating which mode can be used. Referring to Figure 34, the higher-level signaling may include sps_modeX_enabled_flag. According to an embodiment, whether mode modeX can be used may be determined based on sps_modeX_enabled_flag. For example, when sps_modeX_enabled_flag is a certain value, mode modeX may not be used. In addition, when sps_modeX_enabled_flag is any other value, mode modeX can also be used. In addition, when sps_modeX_enabled_flag is any other value, whether mode modeX is used may be determined based on additional signaling. For example, a certain value may be 0, and other values may be 1. However, the present disclosure is not limited thereto, and a certain value may be 1, and other values may be 0.
[0246] According to an embodiment of the present disclosure, there may be signaling indicating whether affine motion compensation can be used. For example, this signaling may be higher-level signaling. Figure 34 , this signaling can be sps_affine_enabled_flag (affine enabled flag). Figure 2 and Figure 7 , signaling can mean a signal transmitted from an encoder to a decoder through a bitstream. The decoder can parse the affine enable flag from the bitstream.
[0247] For example, if sps_affine_enabled_flag is 0, the syntax may be restricted so that affine motion compensation is not used. In addition, when sps_affine_enabled_flag is 0, inter_affine_flag and cu_affine_type_flag may not exist.
[0248] For example, inter_affine_flag (inter-frame affine flag) may be signaling indicating whether affine MC (affine motion compensation) is used in a block. Figure 2 and Figure 7 Signaling may refer to a signal transmitted from an encoder to a decoder via a bitstream. A decoder may parse the inter_affine_flag (inter-frame affine flag) from the bitstream.
[0249] In addition, cu_affine_type_flag (coding unit affine type flag) can be a signal indicating which type of affine MC (affine motion compensation) is used in the block. In addition, here, the type can indicate whether it is a 4-parameter affine model or a 6-parameter affine model. In addition, when sps_affine_enabled_flag (affine enable flag) is 1, affine motion compensation can be used.
[0250] Affine motion compensation may mean affine model-based motion compensation or affine model-based motion compensation for inter prediction.
[0251] In addition, according to an embodiment of the present disclosure, there may be a specific type of signaling indicating which mode can be used. For example, there may be signaling indicating whether a specific type of affine motion compensation can be used. For example, this signaling may be higher level signaling. Figure 34 , this signaling can be sps_affine_type_flag. Furthermore, the specific type may imply a 6-parameter affine model. For example, if sps_affine_type_flag is 0, the syntax may be restricted so that the 6-parameter affine model is not used. Furthermore, when sps_affine_type_flag is 0, cu_affine_type_flag may not exist. Furthermore, if sps_affine_type_flag is 1, a 6-parameter affine model may be used. If sps_affine_type_flag is not present, its value may be inferred to be 0.
[0252] In addition, according to an embodiment of the present disclosure, when there is signaling indicating that a certain mode can be used, there may be signaling of a specific type indicating that a certain mode can be used. For example, when the signaling value indicating whether a certain mode can be used is 1, it is possible to parse the signaling of a specific type indicating whether a certain mode can be used. For example, when the signaling value indicating whether a certain mode can be used is 0, it is possible not to parse the signaling of a specific type indicating whether a certain mode can be used. For example, the signaling indicating whether a certain mode can be used may include sps_affine_enabled_flag (affine enable flag). In addition, the signaling indicating the specific type of use of a certain mode may include sps_affine_type_flag (affine enable flag). Reference Figure 34When sps affine enabled flag is 1, sps affine type flag can be parsed. Otherwise, when sps affine enabled flag is 0, sps affine type flag can not be parsed and its value can be inferred to be 0.
[0253] Further, adaptive motion vector resolution (AMVR) as described above can be used. Resolution sets of AMVR can be used differently depending on the situation. For example, resolution sets of AMVR can be used differently depending on the prediction mode. For example, AMVR resolution sets can be different when regular inter prediction such as AMVP is used and when affine MC (motion compensation) is used. Further, AMVR applied to regular inter prediction such as AMVP can be applied to motion vector differences. Alternatively, AMVR applied to regular inter prediction such as advanced motion vector prediction (AMVP) can be applied to motion vector predictors. Further, AMVR applied to affine MC (motion compensation) can be applied to control point motion vectors or control point motion vector differences.
[0254] Further, according to embodiments of the disclosure, there can be signaling indicating whether AMVR can be used or not. This signaling can be higher level signaling. Referring to Figure 34 , sps amvr enabled flag (AMVR enabled flag) can be present. Referring to Figure 2 and Figure 7 , the signaling can mean a signal transmitted from an encoder to a decoder through a bitstream. The decoder can parse the AMVR enabled flag from the bitstream.
[0255] According to an embodiment of the present disclosure, the sps_amvr_enabled_flag (AMVR enable flag) may indicate whether adaptive motion vector differential resolution is used. Furthermore, according to an embodiment of the present disclosure, the sps_amvr_enabled_flag (AMVR enable flag) may indicate whether adaptive motion vector differential resolution may be used. For example, according to an embodiment of the present disclosure, when the sps_amvr_enabled_flag (AMVR enable flag) is 1, AMVR may be used for motion vector coding. Furthermore, according to an embodiment of the present disclosure, when the sps_amvr_enabled_flag (AMVR enable flag) is 1, AMVR may be used for motion vector coding. Furthermore, when the sps_amvr_enabled_flag (AMVR enable flag) is 1, additional signaling may be present to indicate which resolution is used. Furthermore, when the sps_amvr_enabled_flag (AMVR enable flag) is 0, AMVR may not be used for motion vector coding. Furthermore, when the sps_amvr_enabled_flag (AMVR enable flag) is 0, AMVR may not be used for motion vector coding. According to an embodiment of the present disclosure, the AMVR corresponding to sps_amvr_enabled_flag (AMVR enabled flag) may mean that it is used for conventional inter-frame prediction. For example, the AMVR corresponding to sps_amvr_enabled_flag (AMVR enabled flag) may not mean that it is used for affine MC. In addition, whether affine MC (affine motion compensation) is used can be indicated by inter_affine_flag (inter-frame affine flag). That is, the AMVR corresponding to sps_amvr_enabled_flag (AMVR enabled flag) means that it is used when inter_affine_flag (inter-frame affine flag) is 0, or may not mean that it is used when inter_affine_flag (inter-frame affine flag) is 1.
[0256] In addition, according to an embodiment of the present disclosure, there may be signaling indicating whether AMVR can be used for affine MC (affine motion compensation). This signaling may be higher level signaling. Figure 34 There may be a signaling flag sps_affine_amvr_enabled_flag (affine AMVR enabled flag) indicating whether AMVR can be used for affine MC (affine motion compensation). Figure 2 and Figure 7 , signaling may mean a signal transmitted from an encoder to a decoder through a bitstream. The decoder may parse the affine AMVR enable flag from the bitstream.
[0257] sps_affine_amvr_enabled_flag can indicate whether adaptive motion vector difference resolution is used for affine motion compensation. In addition, sps_affine_amvr_enabled_flag can indicate whether adaptive motion vector difference resolution is available for affine motion compensation. According to an embodiment, when sps_affine_amvr_enabled_flag is 1, AMVR can be enabled for affine inter mode motion vector coding. In addition, when sps_affine_amvr_enabled_flag is 1, AMVR can be available for affine inter mode motion vector coding. In addition, when sps_affine_amvr_enabled_flag is 0, AMVR can not be enabled for affine inter mode motion vector coding. When sps_affine_amvr_enabled_flag is 0, AMVR can not be available for affine inter mode motion vector coding.
[0258] For example, when sps_affine_amvr_enabled_flag is 1, AMVR corresponding to the case where inter_affine_flag is 1 can be used. In addition, when sps_affine_amvr_enabled_flag is 1, there can be additional signaling for indicating which resolution to use. In addition, when sps_affine_amvr_enabled_flag is 0, AMVR corresponding to the case where inter_affine_flag is 1 can not be used for affine inter mode motion vector coding.
[0259] Figure 35 FIG. 1 is a diagram illustrating a coding unit syntax structure according to an embodiment of the disclosure.
[0260] As described with reference to Figure 34 , there can be additional signaling for indicating resolution based on higher level signaling using AMVR. With reference to Figure 34 , the additional signaling for indicating resolution can include amvr_flag or amvr_precision_flag. amvr_flag or amvr_precision_flag can be information on resolution of a motion vector difference.
[0261] Depending on the embodiment, there may be signaling indicating when amvr_flag is 0. In addition, when amvr_flag is 1, amvr_precision_flag may be present. In addition, when amvr_flag is 1, the resolution may also be determined based on amvr_precision_flag. For example, if amvr_flag is 0, it may be 1 / 4 resolution. In addition, if amvr_flag is not present, the amvr_flag value may be inferred based on CuPredMode. For example, when CuPredMode is MODE_IBC, the amvr_flag value may be inferred to be equal to 1, and when CuPredMode is not MODE_IBC or CuPredMode (coding unit prediction mode) is MODE_INTER, the amvr_flag value may be inferred to be equal to 0.
[0262] In addition, when inter_affine_flag is 0 and amvr_precision_flag is 0, 1 pixel resolution can be used. In addition, when inter_affine_flag is 1 and amvr_precision_flag is 0, 1 / 16 pixel resolution can be used. In addition, when inter_affine_flag is 0 and amvr_precision_flag is 1, 4 pixel resolution can be used. In addition, when inter_affine_flag is 1 and amvr_precision_flag is 1, 1 pixel resolution can be used.
[0263] If amvr_precision_flag is 0, its value can be inferred to be equal to 0.
[0264] According to an embodiment, the resolution can be applied by the MvShift value. In addition, MvShift can be determined by amvr_flag and amvr_precision_flag, which are information about the resolution of the motion vector difference. For example, when inter_affine_flag is 0, the MvShift value can be determined as follows.
[0265] MvShift=(amvr_flag+amvr_precision_flag)<<1
[0266] In addition, the motion vector difference Mvd value can be shifted based on the MvShift value. For example, Mvd (motion vector difference) can be shifted as follows, and thus, the resolution of AMVR can be applied.
[0267] MvdLX=MvdLX<<(MvShift+2)
[0268] As another example, when inter_affine_flag is 1, the MvShift value may be determined as follows.
[0269] MvShift=amvr_precision_flag? (amvr_precision_flag<<1): (-(amvr_flag<<1))
[0270] In addition, the control point motion vector difference MvdCP value can be shifted based on the MvShift value. MvdCP can be the control point motion vector difference or the control point motion vector. For example, MvdCp (control point motion vector difference) is shifted as follows, and thus, the resolution of AMVR can be applied.
[0271] MvdCpLX=MvdCpLX<<(MvShift+2)
[0272] In addition, Mvd or MvdCp may be a value signaled by mvd_coding.
[0273] refer to Figure 35 When CuPredMode is MODE_IBC, amvr_flag, which is information about the resolution of the motion vector difference, may not exist. In addition, when CuPredMode is MODE_INTER, amvr_flag, which is information about the resolution of the motion vector difference, may exist. In this case, amvr_flag can be parsed if certain conditions are met.
[0274] According to an embodiment of the present disclosure, whether to parse AMVR-related syntax elements may be determined based on a higher-level signaling value indicating whether AMVR can be used. For example, when the higher-level signaling value indicating whether AMVR can be used is 1, AMVR-related syntax elements can be parsed. In addition, when the higher-level signaling value indicating whether AMVR can be used is 0, AMVR-related syntax elements may not be parsed. Figure 35 When CuPredMode is MODE_IBC and sps_amvr_enabled_flag (AMVR enabled flag) is 0, amvr_precision_flag, which is information about the resolution of motion vector differences, may not be parsed. Alternatively, when CuPredMode is MODE_IBC and sps_amvr_enabled_flag (AMVR enabled flag) is 1, amvr_precision_flag, which is information about the resolution of motion vector differences, may be parsed. In this case, additional parsing conditions may be considered.
[0275] For example, when there is at least one non-zero value among the MvdLX (multiple motion vector differences) values, amvr_precision_flag may be parsed. MvdLX may be the Mvd value of the reference list LX. In addition, Mvd (motion vector difference) may be signaled through mvd_coding. LX may include L0 (zeroth reference picture list) and L1 (first reference picture list). In addition, in MvdLX, there may be a component corresponding to each of the x-axis and the y-axis. For example, the x-axis may correspond to the horizontal axis of the picture, and the y-axis may correspond to the vertical axis of the picture. Reference Figure 35 , you can indicate that [0] and [1] in MvdLX[x0][y0][0] and MvdLX[x0][y0] are used for the x-axis and y-axis components respectively. In addition, when CuPredMode is MODE_IBC, only L0 can be used. Figure 35 , amvr_precision_flag may be parsed when 1) sps_amvr_enabled_flag is 1 and 2) MvdL0[x0][y0][0] or MvdL0[x0][y0][1] is not 0. Furthermore, amvr_precision_flag may not be parsed when 1) sps_amvr_enabled_flag is 0 or 2) MvdL0[x0][y0][0] and MvdL0[x0][y0][1] are both 0.
[0276] In addition, there may be cases where CuPredMode is not MODE_IBC. In this case, refer to Figure 35 , when sps_amvr_enabled_flag is 1, inter_affine_flag (inter-frame affine flag) is 0, and there is at least one non-zero value among the MvdLX (multiple motion vector differences) values, amvr_flag can be parsed. Here, amvr_flag can be information about the resolution of the motion vector difference. In addition, as already described, sps_amvr_enabled_flag (AMVR enabled flag) is 1 can indicate the use of adaptive motion vector difference resolution. In addition, inter_affine_flag (inter-frame affine flag) is 0 can indicate that affine motion compensation is not used for the current block. In addition, as described in reference Figure 34 As described, multiple motion vector differences of the current block may be corrected based on information about the resolution of the motion vector difference such as amvr_flag. This condition may be referred to as condition A.
[0277] In addition, when sps_affine_amvr_enabled_flag (affine AMVR enable flag) is 1, inter_affine_flag (inter-frame affine flag) is 1, and there is at least one non-zero value in the MvdCpLX (multiple control motion vector differences) value, amvr_flag can be parsed. Here, amvr_flag can be information about the resolution of the motion vector difference. In addition, as already described, sps_affine_amvr_enabled_flag (affine AMVR enable flag) is 1, which can indicate that adaptive motion vector difference resolution can be used for affine motion compensation. In addition, inter_affine_flag (inter-frame affine flag) is 1, which can indicate that affine motion compensation is used for the current block. In addition, as described in reference Figure 34 As described above, multiple control point motion vector differences of the current block can be corrected based on information about the resolution of the motion vector difference such as amvr_flag. This condition can be referred to as condition B.
[0278] Furthermore, if condition A or condition B is met, amvr_flag may be parsed. Furthermore, if condition A and condition B are not met, amvr_flag, which is information about the resolution of motion vector differences, may not be parsed. Specifically, if 1) sps_amvr_enabled_flag (AMVR enabled flag) is 0, inter_affine_flag (inter-frame affine flag) is 1, or MvdLX (multiple motion vector differences) are all 0, and 2) sps_affine_amvr_enabled_flag is 0, inter_affine_flag (inter-frame affine flag) is 0, or MvdCpLX (multiple control point motion vector differences) values are all 0, amvr_flag may not be parsed.
[0279] It is also possible to determine whether to parse amvr_precision_flag based on the amvr_flag value. For example, when the amvr_flag value is 1, the amvr_precision_flag may be parsed. In addition, when the amvr_flag value is 0, the amvr_precision_flag may not be parsed.
[0280] Furthermore, MvdCpLX (Multiple Control Motion Vector Differences) may refer to differences for control point motion vectors. Furthermore, MvdCpLX (Multiple Control Motion Vector Differences) may be signaled via mvd_coding. LX may include L0 (zeroth reference picture list) and L1 (first reference picture list). Furthermore, in MvdCpLX, there may be components corresponding to control point motion vectors 0, 1, 2, and so on. For example, control point motion vectors 0, 1, 2, and so on may be control point motion vectors corresponding to preset positions based on the current block.
[0281] refer to Figure 35 , it can be indicated that [0], [1], and [2] in MvdCpLX[x0][y0][0][], MvdCpLX[x0][y0][1][], and MvdCpLX[x0][y0][2][] correspond to control point motion vectors 0, 1, and 2, respectively. In addition, the MvdCpLX (multiple control point motion vector differences) value corresponding to control point motion vector 0 can be used for other control point motion vectors. For example, control point motion vector 0 can be used, such as Figure 47 In addition, in MvdCpLX (multiple control point motion vector differences), there may be components corresponding to the x-axis and the y-axis, respectively. For example, the x-axis may correspond to the horizontal axis of the picture, and the y-axis may correspond to the vertical axis of the picture. Figure 35 , which may indicate that [0] and [1] in MvdCpLX[x0][y0][][0] and MvdCpLX[x0][y0][][1] are the x-axis and y-axis components, respectively.
[0282] Figure 36 is a diagram illustrating a higher-level signaling structure according to an embodiment of the present disclosure.
[0283] As reference Figures 34 to 35 The described higher-level signaling may exist. For example, there may be sps_affine_enabled_flag (affine enabled flag), sps_affine_amvr_enabled_flag, sps_amvr_enabled_flag (AMVR enabled flag), sps_affine_type_flag, etc.
[0284] According to an embodiment of the present disclosure, the above-mentioned higher-level signaling may have parsing dependency. For example, whether to parse other higher-level signaling may be determined based on which higher-level signaling value.
[0285] According to embodiments of this disclosure, whether affine AMVR can be used can be determined based on whether affine MC (affine motion compensation) can be used. For example, whether affine AMVR can be used can be determined based on higher level signaling indicating whether affine MC can be used. More specifically, whether to parse higher level signaling indicating whether affine AMVR can be used can be determined based on higher level signaling indicating whether affine MC can be used.
[0286] In one embodiment, affine AMVR can be used when affine MC can be used. Further, affine AMVR can not be usable when affine MC cannot be used.
[0287] More specifically, if the higher level signaling indicating whether affine MC can be used is 1, affine AMVR can be usable. In this case, there can be additional signaling. Further, when the high level signaling indicating whether affine MC can be used is 0, affine AMVR can not be usable. For example, when the higher level signaling indicating whether affine MC can be used is 1, high level signaling indicating whether affine AMVR can be used can be parsed. Further, when the high level signaling indicating whether affine MC can be used is 0, the higher level signaling indicating whether affine AMVR can be used can not be parsed. Further, when the higher level signaling indicating whether affine AMVR can be used is not present, its value can be inferred. For example, the value can be inferred to be equal to 0. As another example, it can be inferred based on the higher level signaling indicating whether affine MC can be used. As another example, it can be inferred based on higher level signaling indicating whether AMVR can be used.
[0288] According to embodiments, affine AMVR can be used for reference Figures 34 to 35 The AMVR of affine MC described. For example, the high level signaling indicating whether affine MC can be used can be sps affine enabled flag. Further, the higher level signaling indicating whether affine AMVR can be used can be sps affine amvr enabled flag.
[0289] Reference Figure 36 When sps affine enabled flag is 1, sps affine amvr enabled flag can be parsed. Further, when sps affine enabled flag is 0, sps affine amvr enabled flag can not be parsed. Further, when sps affine amvr enabled flag is not present, its value can be inferred to be equal to 0.
[0290] This may be because, in embodiments of the present disclosure, affine AMVR may be meaningful when using affine MC.
[0291] Figure 37 is a diagram illustrating a higher-level signaling structure according to an embodiment of the present disclosure.
[0292] As reference Figures 34 to 35 The described higher-level signaling may exist. For example, sps_affine_enabled_flag (affine enabled flag), sps_affine_amvr_enabled_flag (affine AMVR enabled flag), sps_amvr_enabled_flag (AMVR enabled flag), sps_affine_type_flag, etc. may exist.
[0293] According to an embodiment of the present disclosure, higher-level signaling may have parsing dependencies. For example, whether to parse other higher-level signaling may be determined based on a certain higher-level signaling value.
[0294] According to an embodiment of the present disclosure, whether affine AMVR can be used can be determined based on whether AMVR can be used. For example, whether affine AMVR can be used can be determined based on higher-level signaling indicating whether AMVR can be used. More specifically, whether to parse higher-level signaling indicating whether affine AMVR can be used can be determined based on higher-level signaling indicating whether AMVR can be used.
[0295] In one embodiment, when AMVR can be used, affine AMVR can be used. In addition, when AMVR cannot be used, affine AMVR may not be used.
[0296] More specifically, when the higher-level signaling indicating whether AMVR can be used is 1, affine AMVR can be used. In this case, additional signaling may exist. In addition, when the higher-level signaling indicating whether AMVR can be used is 0, affine AMVR may not be available. For example, when the higher-level signaling indicating whether AMVR can be used is 1, the higher-level signaling indicating whether affine AMVR can be used can be parsed. In addition, when the higher-level signaling indicating whether AMVR can be used is 0, the higher-level signaling indicating whether affine AMVR can be used may not be parsed. In addition, if there is no higher-level signaling indicating whether affine AMVR can be used, its value can be inferred. For example, it can be inferred that the value is equal to 0. As another example, it can be inferred based on the higher-level signaling indicating whether affine MC can be used. As another example, it can be inferred based on the higher-level signaling indicating whether AMVR can be used.
[0297] According to an embodiment, the affine AMVR may be used for reference Figures 34 to 35 Affine MC (affine motion compensation) AMVR described. For example, the high-level signaling indicating whether AMVR can be used may be sps_amvr_enabled_flag (AMVR enabled flag). In addition, the higher-level signaling indicating whether affine AMVR can be used may be sps_affine_amvr_enabled_flag (affine AMVR enabled flag).
[0298] refer to Figure 37 (a) When sps_amvr_enabled_flag is 1, sps_affine_amvr_enabled_flag may be interpreted. Alternatively, when sps_amvr_enabled_flag is 0, sps_affine_amvr_enabled_flag may not be interpreted. Furthermore, when sps_affine_amvr_enabled_flag is not present, its value may be inferred to be 0.
[0299] This may be because, in embodiments of the present disclosure, whether adaptive resolution is effective may vary depending on the sequence.
[0300] In addition, whether affine AMVR can be used can be determined by considering both whether affine MC can be used and whether AMVR can be used. For example, it is possible to determine whether to parse the higher-level signaling indicating whether affine AMVR can be used based on the higher-level signaling indicating whether affine MC can be used and the higher-level signaling indicating whether AMVR can be used. According to an embodiment, when the higher-level signaling indicating whether affine MC can be used and the higher-level signaling indicating whether AMVR can be used are both 1, the higher-level signaling indicating whether affine AMVR can be used can be parsed. In addition, when the higher-level signaling indicating whether affine MC can be used or the higher-level signaling indicating whether AMVR can be used is 0, the higher-level signaling indicating whether affine AMVR can be used may not be parsed. In addition, if there is no higher-level signaling indicating whether affine AMVR can be used, its value can be inferred.
[0301] refer to Figure 37(b) When both sps_affine_enabled_flag and sps_amvr_enabled_flag are 1, sps_affine_amvr_enabled_flag may be interpreted. Furthermore, when at least one of sps_affine_enabled_flag and sps_amvr_enabled_flag is 0, sps_affine_amvr_enabled_flag may not be interpreted. Furthermore, when sps_affine_amvr_enabled_flag is not present, its value may be inferred to be 0.
[0302] More specifically, refer to Figure 37 (b) Whether affine motion compensation can be used can be determined based on sps_affine_enabled_flag (affine enable flag) at line 3701. Figures 34 to 35 As described above, when sps_affine_enabled_flag (affine enable flag) is 1, it may mean that affine motion compensation can be used. In addition, when sps_affine_enabled_flag (affine enable flag) is 0, it may mean that affine motion compensation cannot be used.
[0303] When Figure 37 When it is determined at line 3701 of (b) that affine motion compensation is used, it can be determined at line 3702 whether adaptive motion vector differential resolution is used based on sps_amvr_enabled_flag (AMVR enabled flag). Figures 34 to 35 As described above, when sps_amvr_enabled_flag (AMVR enable flag) is 1, it may mean that adaptive motion vector differential resolution is used. When sps_amvr_enabled_flag (AMVR enable flag) is 0, it may mean that adaptive motion vector differential resolution is not used.
[0304] When it is determined at line 3701 that affine motion compensation is not used, whether to use adaptive motion vector differential resolution may not be determined based on sps_amvr_enabled_flag (AMVR enabled flag). Figure 37Line 3702 of (b) may not be executed. Specifically, when affine motion compensation is not used, the sps_affine_amvr_enabled_flag may not be transmitted from the encoder to the decoder. That is, the decoder may not receive the sps_affine_amvr_enabled_flag, and the sps_affine_amvr_enabled_flag may not be parsed by the decoder. In this case, because the sps_affine_amvr_enabled_flag does not exist, it can be inferred to be equal to 0. As already described, when the sps_affine_amvr_enabled_flag is 0, it may indicate that adaptive motion vector difference resolution cannot be used for affine motion compensation.
[0305] When Figure 37 When it is determined at line 3702 of (b) that adaptive motion vector differential resolution is used, sps_affine_amvr_enabled_flag indicating whether adaptive motion vector differential resolution can be used for affine motion compensation can be parsed from the bitstream at line 3703.
[0306] When it is determined at line 3702 that adaptive motion vector differential resolution is not used, sps_affine_amvr_enabled_flag (affine AMVR enabled flag) may not be parsed from the bitstream. Figure 37 Line 3703 of (b) may not be executed. More specifically, when affine motion compensation is used and adaptive motion vector differential resolution is not used, sps_affine_amvr_enabled_flag (affine AMVR enable flag) may not be transmitted from the encoder to the decoder. That is, the decoder may not receive sps_affine_amvr_enabled_flag (affine AMVR enable flag). The decoder may not parse sps_affine_amvr_enabled_flag (affine AMVR enable flag) from the bitstream. In this case, because sps_affine_amvr_enabled_flag (affine AMVR enable flag) does not exist, it can be inferred that it is equal to 0. As already described, when sps_affine_amvr_enabled_flag (affine AMVR enable flag) is 0, it may indicate that adaptive motion vector differential resolution cannot be used for affine motion compensation.
[0307] By first checking sps_affine_enabled_flag (affine enabled flag) and then checking sps_amvr_enabled_flag (AMVR enabled flag), as Figure 37 As shown in (b), unnecessary processes can be reduced and efficiency can be increased. For example, when sps_amvr_enabled_flag is checked first and then sps_affine_enabled_flag is checked, sps_affine_enabled_flag may need to be checked again to derive sps_affine_type_flag in line 7. However, by checking sps_affine_enabled_flag first and then checking sps_amvr_enabled_flag, this unnecessary process can be reduced.
[0308] Figure 38 is a diagram illustrating a compilation unit syntax structure according to an embodiment of the present disclosure.
[0309] As reference Figure 35 As described above, whether to parse the AMVR-related syntax can be determined based on whether there is at least one non-zero value in MvdLX or MvdCpLX. However, MvdLX (motion vector difference) or MvdCpLX (control point motion vector difference) may be different depending on which reference list (reference picture list) is used, how many parameters are used for the affine model, etc. If the initial value of MvdLX or MvdCpLX is not 0, since MvdLX or MvdCpLX not used in the current block is not 0, unnecessary AMVR-related syntax elements are signaled, and mismatch between the encoder and decoder can occur. Figures 38 to 39 A method can be described that does not generate mismatch between the encoder and the decoder.
[0310] Depending on the embodiment, inter_pred_idc (information about the reference picture list) may indicate which reference list is used or what the prediction direction is. For example, inter_pred_idc (information about the reference picture list) may be a value of PRED_L0, PRED_L1, or PRED_BI. If inter_pred_idc (information about the reference picture list) is PRED_L0, only reference list 0 (the zeroth reference picture list) may be used. Furthermore, when inter_pred_idc (information about the reference picture list) is PRED_L1, only reference list 1 (the first reference picture list) may be used. Furthermore, when inter_pred_idc (information about the reference picture list) is PRED_BI, both reference list 0 (the zeroth reference picture list) and reference list 1 (the first reference picture list) may be used. When inter_pred_idc (information about the reference picture list) is PRED_L0 or PRED_L1, unidirectional prediction may be used. Furthermore, when inter_pred_idc (information about the reference picture list) is PRED_BI, bidirectional prediction may be used.
[0311] It is also possible to determine the affine model to be used based on the MotionModelIdc value. It is also possible to determine whether to use affine MC based on the value of MotionModelIdc. For example, MotionModelIdc can indicate translational motion, 4-parameter affine motion, or 6-parameter affine motion. For example, when the MotionModelIdc values are 0, 1, and 2, translational motion, 4-parameter affine motion, and 6-parameter affine motion can be indicated, respectively. In addition, according to an embodiment, MotionModelIdc can be determined based on inter_affine_flag (inter-frame affine flag) and cu_affine_type_flag. For example, when merge_flag is 0 (non-merge mode), MotionModelIdc can be determined based on inter_affine_flag (inter-frame affine flag) and cu_affine_type_flag. For example, MotionModelIdx can be (inter_affine_flag+cu_affine_type_flag). According to another embodiment, MotionModelIdc can be determined by merge_subblock_flag. For example, when merge_flag is 1 (merge mode), MotionModelIdc can be determined by merge_subblock_flag. For example, the MotionModelIdc value can be set to the merge_subblock_flag value.
[0312] For example, when inter_pred_idc (information about the reference picture list) is PRED_L0 or PRED_BI, the value corresponding to L0 in MvdLX (motion vector difference) or MvdCpLX (control point motion vector difference) can be used. Therefore, when parsing the AMVR-related syntax, MvdL0 or MvdCpL0 can be considered only when inter_pred_idc (information about the reference picture list) is PRED_L0 or PRED_BI. That is, when inter_pred_idc (information about the reference picture list) is PRED_L1, MvdL0 (motion vector difference for the zeroth reference picture list) or MvdCpL0 (control point motion vector difference for the zeroth reference picture list) can be ignored.
[0313] Furthermore, when inter_pred_idc (information about the reference picture list) is PRED_L1 or PRED_BI, the value corresponding to L1 in MvdLX or MvdCpLX can be used. Therefore, when parsing AMVR-related syntax, MvdL1 (motion vector difference for the first reference picture list) or MvdCpL1 (control point motion vector difference for the first reference picture list) can be considered only when inter_pred_idc (information about the reference picture list) is PRED_L1 or PRED_BI. That is, when inter_pred_idc (information about the reference picture list) is PRED_L0, MvdL1 or MvdCpL1 can be ignored.
[0314] refer to Figure 38 For MvdL0 and MvdCpL0, only when inter_pred_idc is not PRED_L1 can the determination of whether to parse the AMVR-related syntax be based on whether their values are non-0. That is, when inter_pred_idc is PRED_L1, even if there is a non-zero value in MvdL0 or MvdCpL0, the AMVR-related syntax may not be parsed.
[0315] Furthermore, when MotionModelIdc is 1, only MvdCpLX[x0][y0][0][], MvdCpLX[x0][y0][1][], and MvdCpLX[x0][y0][2][] may be considered. That is, when MotionModelIdc is 1, MvdCpLX[x0][y0][2][] may not be considered. For example, when MotionModelIdc is 1, whether or not MvdCpLX[x0][y0][2][] has a non-zero value may not affect whether or not AMVR-related syntax is parsed.
[0316] In addition, when MotionModelIdc is 2, all of MvdCpLX[x0][y0][0][], MvdCpLX[x0][y0][1][], and MvdCpLX[x0][y0][2][] can be considered. That is, when MotionModelIdc is 2, MvdCpLX[x0][y0][2][] can be considered.
[0317] In the above embodiment, the expression of MotionModelIdc 1 or 2 can be represented by cu_affine_type_flag being 0 or 1. This may be because it can determine whether affine MC is used. For example, whether affine MC is used can be determined by inter_affine_flag (inter-frame affine flag).
[0318] refer to Figure 38 , whether there is a non-zero value in MvdCpLX[x0][y0][2][] can be considered only when MotionModelIdc is 2. When MvdCpLX[x0][y0][0][] and MvdCpLX[x0][y0][1][] are all 0 and there is a non-zero value in MvdCpLX[x0][y0][2][] (according to the previous embodiment, by dividing L0 and L1, only one of L0 and L1 can be considered here), if MotionModelIdc is not 2, the AMVR-related syntax may not be parsed.
[0319] Figure 39 is a diagram illustrating MVD default value settings according to an embodiment of the present disclosure.
[0320] As described above, MvdLX (motion vector difference) or MvdCpLX (control point motion vector difference) may be signaled through mvd_coding. In addition, the lMvd value may be signaled through mvd_coding, and MvdLX or MvdCpLX may be set to the lMvd value. Figure 39 When MotionModelIdc is 0, MvdLX can be set by the lMvd value. In addition, when MotionModelIdc is not 0, MvdCpLX can be set by the lMvd value. In addition, depending on the refList value, it is possible to determine the operation corresponding to any one of the LXs to be executed.
[0321] In addition, there may be references to Figure 10 or Figure 33 、 Figure 34 as well as Figure 35 Furthermore, mvd_coding may include the steps of parsing or determining abs_mvd_greater0_flag, abs_mvd_greater1_flag, abs_mvd_minus2, mvd_sign_flag, etc. Furthermore, lMvd may be determined by abs_mvd_greater0_flag, abs_mvd_greater1_flag, abs_mvd_minus2, mvd_sign_flag, etc.
[0322] refer to Figure 39 , lMvd can be set as follows.
[0323] lMvd=abs_mvd_greater0_flag*(abs_mvd_minus2+2)*(1-2*mvd_sign_flag)
[0324] The default value of MvdLX (motion vector difference) or MvdCpLX (control point motion vector difference) can be set to a preset value. According to an embodiment of the present disclosure, the default value of MvdLX or MvdCpLX can be set to 0. Alternatively, the default value of lMvd can be set to a preset value. Alternatively, the default value of the relevant syntax element can be set so that the value of lMvd, MvdLX, or MvdCpLX becomes a preset value. The default value of a syntax element may mean a value to be inferred when the syntax element does not exist. The preset value may be 0.
[0325] According to an embodiment of the present disclosure, abs_mvd_greater0_flag may indicate whether the absolute value of MVD is greater than 0. Furthermore, according to an embodiment of the present disclosure, when abs_mvd_greater0_flag is absent, its value may be inferred to be 0. In this case, the lMvd value may be set to 0. Furthermore, in this case, the MvdLX or MvdCpLX value may be set to 0.
[0326] Alternatively, according to an embodiment of the present disclosure, when the value of lMvd, MvdLX or MvdCpLX is not set, its value can be set to a preset value. For example, the value can be set to 0.
[0327] In addition, according to an embodiment of the present disclosure, when abs_mvd_greater0_flag does not exist, the corresponding lMvd, MvdLX or MvdCpLX value can be set to 0.
[0328] In addition, abs_mvd_greater1_flag may indicate whether the absolute value of the MVD is greater than 1. Furthermore, when abs_mvd_greater1_flag is not present, its value may be inferred to be equal to 0.
[0329] Furthermore, (abs_mvd_minus2+2) may indicate the absolute value of MVD. Additionally, when the value of abs_mvd_minus2 does not exist, it may be inferred to be equal to -1.
[0330] In addition, mvd_sign_flag can indicate the sign of the MVD. When mvd_sign_flag is 0 and 1, it may indicate that the corresponding MVD has positive and negative values, respectively. If mvd_sign_flag does not exist, it can be inferred that its value is equal to 0.
[0331] Figure 40 is a diagram illustrating MVD default value settings according to an embodiment of the present disclosure.
[0332] By setting the initial value of MvdLX or MvdCpLX to 0, the MvdLX (multiple motion vector differences) or MvdCpLX (multiple control point motion vector differences) value can be initialized, as shown in the reference Figure 39 In this case, the initialization value may be 0 so as not to cause mismatch between the encoder and the decoder. Figure 40 This is described in more detail in the embodiments.
[0333] According to an embodiment of the present disclosure, the MvdLX (multiple motion vector differences) or MvdCpLX (multiple control point motion vector differences) value may be initialized to a preset value. In addition, the initialization position may be before the position of the AMVR related syntax element is parsed. The AMVR related syntax element may include Figure 40 amvr_flag, amvr_precision_flag, etc. amvr_flag or amvr_precision_flag may be information about the resolution of the motion vector difference.
[0334] In addition, the resolution of MVD (motion vector difference) or MV (motion vector) or the resolution of MVD or MV sent by signal may be determined by AMVR related syntax elements. In addition, the preset value used for initialization in the embodiment of the present disclosure may be 0.
[0335] Because the MvdLX and MvdCpLX values between the encoder and decoder can be the same when parsing AMVR-related syntax elements by performing initialization, mismatch between the encoder and decoder may not occur. In addition, by performing initialization set to a value of 0, AMVR-related syntax elements may not be unnecessarily included in the bitstream.
[0336] According to an embodiment of the present disclosure, MvdLX may be defined for a reference list (L0, L1, etc.), an x- or y-component, etc. Furthermore, MvdCpLX may be defined for a reference list (L0, L1, etc.), an x- or y-component, a control point 0, 1, or 2, etc.
[0337] According to an embodiment of the present disclosure, both MvdLX and MvdCpLX values can be initialized. Furthermore, the initialization location can be before the location where mvd_coding of the corresponding MvdLX or MvdCpLX is performed. For example, even in a prediction block using only L0, MvdLX or MvdCpLX corresponding to L0 can be initialized. Conditional checks may be required to initialize only those necessary for initialization, but by performing initialization indiscriminately in this manner, the burden of conditional checks can be reduced.
[0338] According to another embodiment of the present disclosure, it is possible to initialize a value corresponding to an unused value in MvdLX or MvdCpLX. Here, an unused value may mean that the value is not used in the current block. For example, a value corresponding to a currently unused reference list in MvdLX or MvdCpLX may be initialized. For example, when L0 is not used, a value corresponding to MvdL0 or MvdCpL0 may be initialized. When inter_pred_idc is PRED_L1, L0 may not be used. In addition, when L1 is not used, a value corresponding to MvdL1 or MvdCpL1 may be initialized. When inter_pred_idc is PRED_L0, L1 may not be used. L0 may be used when inter_pred_idc is PRED_L0 or PRED_BI, and L1 may be used when inter_pred_idc is PRED_L1 or PRED_BI. Reference Figure 40 When inter_pred_idc is PRED_L1, MvdL0[x0][y0][0], MvdL0[x0][y0][1], MvdCpL0[x0][y0][0][0], MvdCpL0[x0][y0][0][1], MvdCpL0[x0][y0][1][0], MvdCpL0[x0][y0][1][1], MvdCpL0[x0][y0][2][0], and MvdCpL0[x0][y0][2][1] may be initialized. Furthermore, the initialization value may be 0. In addition, when inter_pred_idc is PRED_L0, MvdL1[x0][y0][0], MvdL1[x0][y0][1], MvdCpL1[x0][y0][0][0], MvdCpL1[x0][y0][0][1], MvdCpL1[x0][y0][1][0], MvdCpL1[x0][y0][1][1], MvdCpL1[x0][y0][2][0], and MvdCpL1[x0][y0][2][1] may be initialized. In addition, the initialization value may be 0.
[0339] MvdLX[x][y][compIdx] may be the motion vector difference between the (x, y) position of the reference list LX and the component index compIdx. MvdCpLX[x][y][cpIdx][compIdx] may be the motion vector difference between the reference list LX. In addition, MvdCpLX[x][y][cpIdx][compIdx] may be the motion vector difference between the position (x, y), the control point motion vector index cpIdx, and the component index compIdx. Here, component may indicate an x or y component.
[0340] In addition, according to an embodiment of the present disclosure, whether MvdLX (motion vector difference) or MvdCpLX (control point motion vector difference) is used may depend on whether affine motion compensation is used. For example, when affine motion compensation is used, MvdLX may be initialized. In addition, when affine motion compensation is not used, MvdCpLX may be initialized. For example, there may be signaling indicating whether affine motion compensation is used. Reference Figure 40 inter_affine_flag (inter-frame affine flag) may be signaling indicating whether affine motion compensation is used. For example, when inter_affine_flag (inter-frame affine flag) is 1, affine motion compensation may be used. Alternatively, MotionModelIdc may be signaling indicating whether affine motion compensation is used. For example, when MotionModelIdc is not 0, affine motion compensation may be used.
[0341] In addition, according to an embodiment of the present disclosure, which of MvdLX or MvdCpLX is not used may be related to which affine motion model is used. For example, depending on whether a 4-parameter affine model or a 6-parameter affine model is used, the unused MvdLX or MvdCpLX may be different. For example, depending on which affine motion model is used, the MvdCpLX not used for the cpIdx of MvdCpLX[x][y][cpIdx][compIdx] may be different. For example, when a 4-parameter affine model is used, only a portion of MvdCpLX[x][y][cpIdx][compIdx] may be used. Alternatively, when a 6-parameter affine model is not used, only a portion of MvdCpLX[x][y][cpIdx][compIdx] may be used. Therefore, the unused MvdCpLX may be initialized to a preset value. In this case, the unused MvdCpLX may correspond to cpIdx that is used in the 6-parameter affine model and is not used in the 4-parameter affine model. For example, when a 4-parameter affine model is used, the value in which cpIdx of MvdCpLX[x][y][cpIdx][compIdx] is 2 may not be used and may be initialized to a preset value. In addition, as described above, there may be signaling or parameters indicating whether a 4-parameter affine model or a 6-parameter affine model is used. For example, whether a 4-parameter affine model or a 6-parameter affine model is used may be known through MotionModelIdc or cu_affine_type_flag. MotionModelIdc values of 1 and 2 may indicate the use of a 4-parameter affine model and a 6-parameter affine model, respectively. Reference Figure 40When MotionModelIdc is 1, MvdCpL0[x0][y0][2][0], MvdCpL0[x0][y0][2][1], MvdCpL1[x0][y0][2][0], and MvdCpL1[x0][y0][2][1] can be initialized to preset values. In addition, in this case, when MotionModelIdc is not 2, the condition when MotionModelIdc is 1 can be used instead. The preset value can be 0.
[0342] In addition, according to an embodiment of the present disclosure, whether MvdLX or MvdCpLX is not used can be based on the value of mvd_l1_zero_flag (motion vector difference zero flag of the first reference picture list). For example, when mvd_l1_zero_flag is 1, MvdL1 and MvdCpL1 can be initialized to preset values. In addition, in this case, additional conditions can be considered. For example, whether MvdLX or MvdCpLX is not used can be determined based on mvd_l1_zero_flag and inter_pred_idc (information about the reference picture list). For example, when mvd_l1_zero_flag is 1 and inter_pred_idc is PRED_BI, MvdL1 and MvdCpL1 can be initialized to preset values. For example, mvd_l1_zero_flag (motion vector difference zero flag for the first reference picture list) may be higher-level signaling that may indicate that the MVD value (e.g., MvdLX or MvdCpLX) of reference list L1 is 0. Signaling may refer to a signal transmitted from an encoder to a decoder via a bitstream. A decoder may parse mvd_l1_zero_flag (motion vector difference zero flag for the first reference picture list) from the bitstream.
[0343] According to another embodiment of the present disclosure, all Mvd and MvdCp values can be initialized to preset values before performing mvd_coding on a block. In this case, mvd_coding may refer to all mvd_coding values for a particular CU. Therefore, the need to parse the mvd_coding syntax and initialize the determined Mvd or MvdCp values can be avoided, and the aforementioned problem can be solved by initializing all Mvd and MvdCp values.
[0344] Figure 41 is a diagram illustrating an AMVR-related syntax structure according to an embodiment of the present disclosure.
[0345] Figure 41 The embodiments can be based on Figure 38 Example of .
[0346] As reference Figure 38 As described, it is possible to check whether there is at least one non-zero value in MvdLX (motion vector difference) and MvdCpLX (control point motion vector difference). In this case, MvdLX or MvdCpLX to be checked can be determined based on mvd_l1_zero_flag (motion vector difference zero flag for the first reference picture list). Therefore, it is possible to determine whether to parse the AMVR-related syntax based on mvd_l1_zero_flag. As described above, when mvd_l1_zero_flag is 1, it can be indicated that the MVD (motion vector difference) of the reference list L1 is 0, and therefore, in this case, MvdL1 (motion vector difference of the first reference picture list) or MvdCpL1 (control point motion vector difference of the first reference picture list) may not be considered. For example, when mvd_l1_zero_flag is 1, regardless of whether MvdL1 or MvdCpL1 is 0, the AMVR-related syntax list can be parsed based on whether at least one value equal to 0 exists in MvdL0 (the motion vector difference of the zeroth reference picture list) or MvdCpL0 (the control point motion vector difference of the zeroth reference picture list). According to an additional embodiment, mvd_l1_zero_flag, which indicates that the MVD for reference list L1 is 0, can be used only for blocks that are bidirectionally predicted. Therefore, the AMVR-related syntax can be parsed based on mvd_l1_zero_flag and inter_pred_idc (information about the reference picture list). For example, the determination of whether MvdLX or MvdCpLX exists based on mvd_l1_zero_flag and inter_pred_idc (information about the reference picture list) is non-zero can be determined. For example, MvdL1 or MvdCpL1 may be disregarded based on mvd_l1_zero_flag and inter_pred_idc. For example, when mvd_l1_zero_flag is 1 and inter_pred_idc is PRED_BI, MvdL1 or MvdCpL1 may be disregarded. For example, when mvd_l1_zero_flag is 1 and inter_pred_idc is PRED_BI, AMVR-related syntax may be parsed based on whether at least one value of 0 exists in MvdL0 or MvdCpL0, regardless of whether MvdL1 or MvdCpL1 is 0.
[0347] refer to Figure 41, when mvd_l1_zero_flag is 1 and inter_pred_idc[x0][y0]=PRED_BI, the operation can be performed regardless of whether there are non-zero values in MvdL1[x0][y0][0], MvdL1[x0][y0][1], MvdCpL1[x0][y0][0][0], MvdCpL1[x0][y0][0][1], MvdCpL1[x0][y0][1][0], MvdCpL1[x0][y0][1][1], MvdCpL1[x0][y0][2][0] and MvdCpL1[x0][y0][2][1]. For example, when mvd_l1_zero_flag is 1 and inter_pred_idc[x0][y0] = PRED_BI, if there is no non-zero value in MvdL0 or MvdCpL0, even if there are non-zero values in MvdL1[x0][y0][0], MvdL1[x0][y0][1], MvdCpL1[x0][y0][0][0], MvdCpL1[x0][y0][0][1], MvdCpL1[x0][y0][1][0], MvdCpL1[x0][y0][1][1], MvdCpL1[x0][y0][2][0], and MvdCpL1[x0][y0][2][1], the AMVR-related syntax may not be parsed.
[0348] In addition, when mvd_l1_zero_flag is 0 or inter_pred_idc[x0][y0]!= PRED_BI, whether there is a non-zero value among MvdL1[x0][y0][0], MvdL1[x0][y0][1], MvdCpL1[x0][y0][0][0], MvdCpL1[x0][y0][0][1], MvdCpL1[x0][y0][1][0], MvdCpL1[x0][y0][1][1], MvdCpL1[x0][y0][2][0], and MvdCpL1[x0][y0][2][1] can be considered. For example, when mvd_l1_zero_flag is 0 or inter_pred_idc[x0][y0]!= PRED_BI, if there is a non-zero value among MvdL1[x0][y0][0], MvdL1[x0][y0][1], MvdCpL1[x0][y0][0][0], MvdCpL1[x0][y0][0][1], MvdCpL1[x0][y0][1][0], MvdCpL1[x0][y0][1][1], MvdCpL1[x0][y0][2][0], MvdCpL1[x0][y0][2][1], the AMVR related syntax can be parsed. For example, when mvd_l1_zero_flag is 0 or inter_pred_idc[x0][y0]!= PRED_BI, if there is a non-zero value among MvdL1[x0][y0][0], MvdL1[x0][y0][1], MvdCpL1[x0][y0][0][0], MvdCpL1[x0][y0][0][1], MvdCpL1[x0][y0][1][0], MvdCpL1[x0][y0][1][1], MvdCpL1[x0][y0][2][0], and MvdCpL1[x0][y0][2][1], the AMVR related syntax can be parsed even if MvdL0 and MvdCpL0 are both 0.
[0349] Figure 42 is a diagram illustrating an inter prediction related syntax structure according to an embodiment of the disclosure.
[0350] According to an embodiment of the present disclosure, mvd_l1_zero_flag (motion vector difference zero flag for the first reference picture list) may be signaling indicating that the Mvd (motion vector difference) value of reference list L1 (the first reference picture list) is 0. Furthermore, this signaling may be signaled at a higher level than the current block. Therefore, based on the mvd_l1_zero_flag value, the Mvd values of reference list L1 in multiple blocks may be 0. For example, when the mvd_l1_zero_flag value is 1, the Mvd value of reference list L1 may be 0. Alternatively, based on mvd_l1_zero_flag and inter_pred_idc (information about the reference picture list), the Mvd value of reference list L1 may be 0. For example, when mvd_l1_zero_flag is 1 and inter_pred_idc is PRED_BI, the Mvd value of reference list L1 may be 0. In this case, the Mvd value may be MvdL1[x][y][compIdx]. Furthermore, in this case, the Mvd value may not mean the control point motion vector difference. That is, in this case, the Mvd value may not mean the MvdCp value.
[0351] According to another embodiment of the present disclosure, mvd_l1_zero_flag may be signaling indicating that the Mvd and MvdCp values of the reference list L1 are 0. Furthermore, this signaling may be signaled at a higher level than the current block. Thus, the Mvd and MvdCp values of the reference list L1 in multiple blocks may be 0. For example, when the mvd_l1_zero_flag value is 1, the Mvd and MvdCp values of the reference list L1 may be 0 based on the mvd_l1_zero_flag value. Alternatively, the Mvd and MvdCp values of the reference list L1 may be 0 based on mvd_l1_zero_flag and inter_pred_idc. For example, when mvd_l1_zero_flag is 1 and inter_pred_idc is PRED_BI, the Mvd and MvdCp values of the reference list L1 may be 0. In this case, the Mvd value may be MvdL1[x][y][compIdx]. In addition, the MvdCp value may be MvdCpL1[x][y][cpIdx][compIdx].
[0352] Alternatively, an Mvd or MvdCp value of 0 may mean that the corresponding mvd_coding syntax structure is not parsed. That is, for example, when the value of mvd_l1_zero_flag is 1, the mvd_coding syntax structure corresponding to MvdL1 or MvdCpL1 may not be parsed. In addition, when the value of mvd_l1_zero_flag is 0, the mvd_coding syntax structure corresponding to MvdL1 or MvdCpL1 may be parsed.
[0353] According to an embodiment of the present disclosure, when the Mvd or MvdCp value based on mvd_l1_zero_flag is 0, the signaling indicating the MVP may not be parsed. The signaling indicating the MVP may include mvp_l1_flag. In addition, according to the above description of mvd_l1_zero_flag, the signaling of mvd_l1_zero_flag may mean indicating that it is 0 for both Mvd and MvdCp. For example, when the condition indicating that the Mvd or MvdCp value of the reference list L1 is 0 is met, the signaling indicating the MVP may not be parsed. In this case, the signaling indicating the MVP may be inferred to be a preset value. For example, when the signaling indicating the MVP does not exist, its value may be inferred to be equal to 0. In addition, when the condition indicating that the Mvd or MvdCp value is 0 based on the mvd_l1_zero_flag is not met, the signaling indicating the MVP may be parsed. However, in this embodiment, when the Mvd or MvdCp value is 0, the freedom of selecting the MVP may be lost, and thus the coding efficiency may be reduced.
[0354] More specifically, when the condition that the Mvd or MvdCp value indicating reference list L1 is 0 is met and affine MC is used, the signaling indicating MVP may not be parsed. In this case, the signaling indicating MVP may be inferred as a preset value.
[0355] refer to Figure 42 , when mvd_l1_zero_flag is 1 and the inter_pred_idc value is PRED_BI, mvp_l1_flag may not be parsed. In this case, the value of mvp_l1_flag may be inferred to be equal to 0. Alternatively, when mvd_l1_zero_flag is 0 or the inter_pred_idc value is not PRED_BI, mvp_l1_flag may be parsed.
[0356] In this embodiment, it can be determined whether to parse the signaling indicating MVP based on mvd_l1_zero_flag when a specific condition is met. For example, the specific condition may include a condition in which general_merge_flag is 0. For example, general_merge_flag may have the same meaning as the above-mentioned merge_flag. In addition, the specific condition may include a condition based on CuPredMode. More specifically, the specific condition may include a condition in which CuPredMode is not MODE_IBC. Alternatively, the specific condition may include a condition in which CuPredMode is MODE_INTER. When CuPredMode is MODE_IBC, prediction using the current picture as a reference can be used. In addition, when CuPredMode is MODE_IBC, there may be a block vector or motion vector corresponding to the block. When CuPredMode is MODE_INTER, prediction using a picture other than the current picture as a reference can be used. When CuPredMode is MODE_INTER, there may be a motion vector corresponding to the block.
[0357] Therefore, according to an embodiment of the present disclosure, when general_merge_flag is 0, CuPredMode is not MODE_IBC, mvd_l1_zero_flag is 1, and inter_pred_idc is PRED_BI, mvp_l1_flag may not be parsed. In addition, when mvp_l1_flag does not exist, its value may be inferred to be 0.
[0358] More specifically, when general_merge_flag is 0, CuPredMode is not MODE_IBC, mvd_l1_zero_flag is 1, inter_pred_idc is PRED_BI, and affine MC is used, mvp_l1_flag may not be parsed. In addition, when mvp_l1_flag does not exist, its value may be inferred to be equal to 0.
[0359] refer to Figure 42sym_mvd_flag may be signaling indicating a symmetric MVD. In the case of a symmetric MVD, another MVD may be determined based on a certain MVD. In the case of a symmetric MVD, another MVD may be determined based on an explicitly signaled MVD. For example, in the case of a symmetric MVD, the MVD of one reference list may be determined based on the MVD of another reference list. For example, in the case of a symmetric MVD, the MVD of reference list L1 may be determined based on the MVD of reference list L0. When determining another MVD based on a certain MVD, a value obtained by inverting the sign of the certain MVD may be determined as the other MVD.
[0360] Figure 43 is a diagram of an inter-frame prediction related syntax structure according to an embodiment of the present disclosure.
[0361] Figure 43 The embodiment can be used to solve the reference Figure 42 An example of the problem described.
[0362] According to an embodiment of the present disclosure, when the Mvd (motion vector difference) or MvdCp (control point motion vector difference) value based on the mvd_l1_zero_flag (motion vector difference zero flag for the first reference picture list) is 0, signaling indicating the MVP (motion vector predictor) can be parsed. The signaling indicating the MVP may include the mvp_l1_flag (motion vector predictor index for the first reference picture list). In addition, according to the description of the mvd_l1_zero_flag above, the mvd_l1_zero_flag signaling may mean indicating that both Mvd and MvdCp are 0. For example, when the condition indicating that the Mvd or MvdCp value of reference list L1 (first reference picture list) is 0 is met, the signaling indicating the MVP can be parsed. Therefore, the signaling indicating the MVP may not be inferred. Therefore, even when the Mvd or MvdCp value based on the mvd_l1_zero_flag is 0, the freedom to select the MVP can be obtained. Therefore, coding efficiency can be improved. Furthermore, even when a condition indicating that the Mvd or MvdCp value is 0 is not satisfied based on mvd_l1_zero_flag, signaling indicating the MVP can be parsed.
[0363] More specifically, when a condition that the Mvd or MvdCp value indicating the reference list L1 is 0 is satisfied and the affine MC is used, signaling indicating the MVP can be parsed.
[0364] refer to Figure 43In line 4301, information inter_pred_idc about the reference picture list of the current block can be obtained. Referring to line 4302, when the information inter_pred_idc about the reference picture list indicates that only the zeroth reference picture list list 0 is not used, the motion vector predictor index mvp_l1_flag of the first reference picture list list 1 can be parsed from the bitstream at line 4303.
[0365] The mvd_l1_zero_flag (motion vector difference zero flag) can be obtained from the bitstream. The mvd_l1_zero_flag (motion vector difference zero flag) can indicate whether MvdLX (motion vector difference) and MvdCpLX (multiple control point motion vector differences) are set to 0 for the first reference picture list. Signaling can refer to a signal transmitted from the encoder to the decoder via the bitstream. The decoder can parse the mvd_l1_zero_flag (motion vector difference zero flag) from the bitstream.
[0366] When mvd_l1_zero_flag (motion vector difference zero flag) is 1 and inter_pred_idc (information about reference picture lists) is PRED_BI, mvp_l1_flag (motion vector predictor index) can be parsed. Here, PRED_BI can indicate that both List 0 (the zeroth reference picture list) and List 1 (the first reference picture list) are used. Alternatively, when mvd_l1_zero_flag (motion vector difference zero flag) is 0 or inter_pred_idc (information about reference picture lists) is not PRED_BI, mvp_l1_flag (motion vector predictor index) can be parsed. That is, when mvd_l1_zero_flag (motion vector difference zero flag) is 1, mvp_l1_flag (motion vector predictor index) can be parsed regardless of whether inter_pred_idc (information about reference picture lists) indicates that both the zeroth reference picture list and the first reference picture list are used.
[0367] In this embodiment, when specific conditions are met, determining Mvd and MvdCp based on mvd_l1_zero_flag (motion vector difference zero flag for the first reference picture list) and parsing the signaling indicating MVP may occur. For example, the specific conditions may include a condition in which general_merge_flag is 0. For example, general_merge_flag may have the same meaning as the merge_flag described above. In addition, the specific conditions may include a condition based on CuPredMode. More specifically, the specific conditions may include a condition in which CuPredMode is not MODE_IBC. Alternatively, the specific conditions may include a condition in which CuPredMode is MODE_INTER. When CuPredMode is MODE_IBC, prediction using the current picture as a reference can be used. In addition, when CuPredMode is MODE_IBC, a block vector or motion vector corresponding to the block may exist. If CuPredMode is MODE_INTER, prediction using a picture other than the current picture as a reference may be used. When CuPredMode is MODE_INTER, a motion vector corresponding to the block may exist.
[0368] Therefore, according to an embodiment of the present disclosure, when general_merge_flag is 0, CuPredMode is not MODE_IBC, mvd_l1_zero_flag is 1, and inter_pred_idc is PRED_BI, mvp_l1_flag may be parsed. Therefore, mvp_l1_flag (motion vector predictor index of the first reference picture list) exists and its value may not be inferred.
[0369] More specifically, when general_merge_flag is 0, CuPredMode is not MODE_IBC, mvd_l1_zero_flag (motion vector difference zero flag for the first reference picture list) is 1, inter_pred_idc (information about the reference picture list) is PRED_BI, and affine MC is used, mvp_l1_flag can be parsed. In addition, mvp_l1_flag (motion vector predictor index for the first reference picture list) exists and its value may not be inferred.
[0370] We can also achieve together Figure 43 and Figure 40 For example, mvp_l1_flag can be parsed after initializing Mvd or MvdCp. In this case, the initialization of Mvd or MvdCp can be referenced Figure 40The initialization described. In addition, the mvp_l1_flag parsing can follow the description of Figure 43 For example, when the Mvd and MvdCp values of the reference list L1 based on mvd_l1_zero_flag are not 0, if the MotionModelIdc value is 1, the MvdCpL1 value of the control point index 2 can be initialized and the mvp_l1_flag can be parsed.
[0371] Figure 44 is a diagram illustrating an inter prediction related syntax structure according to an embodiment of the disclosure.
[0372] Figure 44 The embodiment of Figure 44 The embodiment of Figure 43 The embodiment described can be an embodiment in which coding efficiency is increased by not removing the degree of freedom in selecting an MVP. In addition, Figure 43 The embodiment described can be an embodiment obtained by describing a reference The description redundant to the embodiment of
[0373] In the embodiment of Figure 44 When the Mvd or MvdCp value is indicated to be 0 based on mvd_l1_zero_flag, the signaling indicating the MVP can be parsed. The signaling indicating the MVP can include mvp_l1_flag.
[0374] Figure 45 is a diagram illustrating an inter prediction related syntax according to an embodiment of the disclosure.
[0375] According to an embodiment of the disclosure, the inter prediction method can include a skip mode, a merge mode, an inter mode, etc. According to an embodiment, a residual signal can not be transmitted in the skip mode. In addition, an MV determination method such as the merge mode can be used in the skip mode. Whether to use the skip mode can be determined according to a skip flag. Referring to Figure 33 Whether to use the skip mode can be determined according to the value of cu_skip_flag.
[0376] According to an embodiment, a motion vector difference can not be used in the merge mode. The motion vector can be determined based on a motion candidate index. Whether to use the merge mode can be determined according to a merge flag. Referring to Figure 33 Whether to use the merge mode can be determined according to the value of merge_flag. In addition, the merge mode can be used when the skip mode is not used.
[0377] In skip mode or merge mode, one or more candidate list types can be selectively used. For example, merge candidates or sub-block merge candidates can be used. In addition, merge candidates may include spatial neighboring candidates, temporal candidates, and the like. In addition, merge candidates may include candidates using motion vectors for the entire current block (CU; coding unit). That is, the motion vectors of each sub-block belonging to the current block may include the same candidate. In addition, sub-block merge candidates may include temporal MVs based on sub-blocks, affine merge candidates, and the like. In addition, sub-block merge candidates may include candidates that can use different motion vectors for each sub-block of the current block (CU). Affine merge candidates may be a method constructed by determining the control point motion vectors of affine motion prediction when determining the control point motion vectors without using a motion vector difference method. In addition, sub-block merge candidates may include a method for determining motion vectors in units of sub-blocks in the current block. For example, in addition to the above-mentioned temporal MVs and affine merge candidates based on sub-blocks, sub-block merge candidates may include planar MVs, regression-based MVs, STMVPs, and the like.
[0378] According to an embodiment, a motion vector difference may be used in inter-frame mode. A motion vector predictor may be determined based on a motion candidate index, and a motion vector may be determined based on the difference between the motion vector predictor and the motion vector difference. Whether to use inter-frame mode may be determined based on whether other modes are used. In another embodiment, whether to use inter-frame mode may be determined by a flag. Figure 45 This diagram illustrates an example of using the inter mode when the skip mode and merge mode, which are other modes, are not used.
[0379] Inter mode may include AMVP mode, affine inter mode, etc. Inter mode may be a mode for determining a motion vector based on a motion vector predictor and a motion vector difference. Affine inter mode may be a method for using motion vector differences when determining control point motion vectors for affine motion prediction.
[0380] refer to Figure 45 , it is possible to determine whether to use a sub-block merge candidate or a merge candidate after determining the skip mode or merge mode. For example, when a specific condition is met, merge_subblock_flag indicating whether to use a sub-block merge candidate can be parsed. In addition, the specific condition can be a condition related to the block size. For example, it can be a condition related to width, height, area, etc., and a combination of these can be used. Reference Figure 45, for example, it can be a condition when the width and height of the current block (CU) are greater than or equal to specific values. When parsing merge_subblock_flag, its value can be inferred to be equal to 0. If merge_subblock_flag is 1, the sub-block merge candidate can be used, and if merge_subblock_flag is 0, the merge candidate can be used. When using the sub-block merge candidate, merge_subblock_idx as the candidate index can be parsed, and when using the merge candidate, merge_idx as the candidate index can be parsed. In this case, when the maximum number of candidate lists is 1, parsing may not be performed. When merge_subblock_idx or merge_idx is not parsed, it can be inferred to be equal to 0.
[0381] Figure 45 Figure 2.1 shows the coding_unit function, where intra prediction related content can be omitted, and Figure 45 The diagram shows how inter-frame prediction is determined.
[0382] Figure 46 is a diagram illustrating a triangle partitioning mode according to an embodiment of the present disclosure.
[0383] The triangle partition mode (TPM) mentioned in this disclosure may be referred to by various names, such as triangle partition mode, triangle prediction, triangle-based prediction, triangle motion compensation, triangle prediction, triangle inter-frame prediction, triangle merge mode, and triangle merge mode. Furthermore, the TPM may be included in the geometric partition mode (GPM).
[0384] like Figure 46 As shown in FIG, TPM can be a method of dividing a rectangular block into two triangles. However, GPM can divide a block into two blocks in various ways. For example, GPM can divide a rectangular block into two triangular blocks, such as Figure 46 As shown in the figure. Furthermore, the GPM can split a rectangular block into a pentagonal block and a triangular block. Furthermore, the GPM can split a rectangular block into two quadrilateral blocks. Here, the rectangle can include a square. Below, for convenience, the description is based on the TPM, which is a simplified version of the GPM, but should be understood to include the GPM.
[0385] According to an embodiment of the present disclosure, unidirectional prediction may be used as a prediction method. Unidirectional prediction may be a prediction method using one reference list. Multiple reference lists may exist, and according to an embodiment, two reference lists, L0 and L1, may exist. When unidirectional prediction is used, one reference list can be used in one block. In addition, when unidirectional prediction is used, one motion information can be used to predict one pixel. In the present disclosure, a block may refer to a coding unit (CU) or a prediction unit (PU). In addition, in the present disclosure, a block may refer to a transform unit (TU).
[0386] According to another embodiment of the present disclosure, bidirectional prediction may be used as a prediction method. Bidirectional prediction may be a prediction method that uses multiple reference lists. In an embodiment, bidirectional prediction may be a prediction method that uses two reference lists. For example, bidirectional prediction may use the L0 and L1 reference lists. When bidirectional prediction is used, multiple reference lists can be used in a block. For example, when bidirectional prediction is used, two reference lists can be used in a block. In addition, when bidirectional prediction is used, multiple motion information can be used to predict a pixel.
[0387] The motion information may include a motion vector, a reference index, and a prediction list usage flag.
[0388] The reference list may be a reference picture list.
[0389] In the present disclosure, motion information corresponding to unidirectional prediction or bidirectional prediction may be defined as one motion information set.
[0390] According to an embodiment of the present disclosure, multiple motion information sets can be used when TPM is used. For example, when TPM is used, two motion information sets can be used. For example, when TPM is used, up to two motion information sets can be used. In addition, the method in which two motion information sets are applied within a block using TPM can be based on position. For example, within a block using TPM, one motion information set for a preset position can be used and another motion information set for another preset position can be used. In addition, for another preset position, two motion information sets can be used together. For example, for another preset position, prediction 3 based on prediction 1 based on one motion information set and prediction 2 based on another motion information set can be used for prediction. For example, prediction 3 may be a weighted sum of prediction 1 and prediction 2.
[0391] refer to Figure 46 , Partition 1 and Partition 2 can schematically represent the preset location and other preset locations. When using TPM, one of two partitioning methods can be used, such as Figure 46As shown in FIG. Two partitioning methods may include diagonal partitioning and anti-diagonal partitioning. A block may also be divided into two triangular partitions by partitioning. As previously described, the TPM may be included in the GPM. Since the GPM has already been described, redundant descriptions will be omitted.
[0392] According to an embodiment of the present disclosure, when using TPM, only unidirectional prediction can be used for each partition. That is, only one piece of motion information can be used for each partition. This may be to reduce memory access and complexity, such as computational complexity. Therefore, only two pieces of motion information can be used for each CU.
[0393] Each motion information can also be determined from a candidate list. According to an embodiment, the candidate list for TPM can be based on a merged candidate list. In another embodiment, the candidate list for TPM can be based on an AMVP candidate list. Thus, the candidate index can be signaled to facilitate the use of TPM. In addition, for blocks using TPM, it is possible to encode, decode, and parse as many candidate indexes as the number of partitions in the TPM or the maximum number of partitions.
[0394] Furthermore, even if a block is predicted based on a plurality of motion information through TPM, it is possible to perform transform and quantization on the entire block.
[0395] Figure 47 is a diagram illustrating a merge data syntax according to an embodiment of the present disclosure.
[0396] According to an embodiment of the present disclosure, the merge data syntax may include signaling related to various modes. The various modes may include a regular merge mode, a merge with MVD (MMVD), a sub-block merge mode, a combined intra-frame and inter-frame prediction (CIIP), TPM, etc. The regular merge mode may be the same mode as the merge mode in HEVC. In addition, there may be signaling indicating whether various modes are used in a block. In addition, these signalings may be parsed as syntax elements or may be implicitly signaled. Reference Figure 47 The signaling indicating whether to use regular merge mode, MMVD, sub-block merge mode, CIIP and TPM can be regular_merge_flag, mmvd_merge_flag (or mmvd_flag), merge_subblock_flag, ciip_flag (or mh_intra_flag), MergeTriangleFlag (or merge_triangle_flag), respectively.
[0397] According to embodiments of the present disclosure, when merge mode is used, if it is signaled that all modes except a certain mode among various modes are not used, it can be determined that a certain mode is used. Furthermore, when merge mode is used, if it is signaled that at least one mode among various modes except a certain mode is used, it can be determined that a certain mode is not used. Furthermore, higher-level signaling may be present to indicate whether a mode can be used. The higher-level signaling may be a unit including blocks. The higher-level signaling may be a sequence, picture, slice, tile group, tile, CTU, etc. If the higher-level signaling indicating whether a mode can be used indicates that it can be used, additional signaling may be present to indicate whether the mode is used, and the mode may or may not be used. If the higher-level signaling indicating whether a mode can be used indicates that it cannot be used, the mode may not be used. For example, when merge mode is used, if it is signaled that normal merge mode, MMVD, sub-block merge mode, and CIIP are not used, it can be determined that TPM is used. Furthermore, when merge mode is used, if it is signaled that at least one of normal merge mode, MMVD, sub-block merge mode, and CIIP is used, it can be determined that TPM is not used. In addition, there may be a signaling indicating whether the merge mode is used. For example, the signaling indicating whether the merge mode is used may be general_merge_flag or merge_flag. If the merge mode is used, then Figure 47 The merge data syntax illustrated in can be parsed.
[0398] In addition, the block size that can be used with TPM may be limited. For example, TPM can be used when both the width and height are 8 or more.
[0399] If TPM is used, the syntax elements related to TPM can be parsed. The syntax elements related to TPM may include signaling indicating the segmentation method and signaling indicating the candidate index. The segmentation method may mean the segmentation direction. For blocks using TPM, there may be multiple signalings (for example, two signalings) indicating the candidate index. Figure 47 , the signaling indicating the splitting method may be merge_triangle_split_dir. In addition, the signaling indicating the candidate index may be merge_triangle_idx0 and merge_triangle_idx1.
[0400] In the present disclosure, the candidate indexes for TPM may be m and n. For example, Figure 46 The candidate indexes of partition 1 and partition 2 of the partition 1 and partition 2 may be m and n respectively. According to an embodiment, m and n may be based on the reference Figure 47According to an embodiment of the present disclosure, one of m and n may be determined based on one of merge_triangle_idx0 and merge_triangle_idx1, and the other of m and n may be determined based on both merge_triangle_idx0 and merge_triangle_idx1.
[0401] Alternatively, one of m and n may be determined based on one of merge_triangle_idx0 and merge_triangle_idx1, and the other of m and n may be determined based on the other of merge_triangle_idx0 and merge_triangle_idx1.
[0402] More specifically, it is possible to determine m based on merge_triangle_idx0 and determine n based on merge_triangle_idx0 (or m) and merge_triangle_idx1. For example, m and n may be determined as follows.
[0403] m=merge_triangle_idx0
[0404] n=merge_triangle_idx1+(merge_triangle_idx1>=m)? 1:0
[0405] According to embodiments of the present disclosure, m and n can be different. This is because, in TPM, when two candidate indices are the same, that is, when two pieces of motion information are the same, the partitioning effect may not be achieved. Therefore, the above signaling method can be used to reduce the number of signaling bits when n>m is signaled. Because m will not be n among all candidates, it can be excluded from signaling.
[0406] If the candidate list used in the TPM is mergeCandList, mergeCandList[m] and mergeCandList[n] may be used as motion information in the TPM.
[0407] Figure 48 is a diagram illustrating higher-level signaling according to an embodiment of the present disclosure.
[0408] According to embodiments of the present disclosure, multiple higher-level signaling may exist. Higher-level signaling may be signaling transmitted in a higher-level unit. A higher-level unit may include one or more lower-level units. Higher-level signaling may be signaling applied to one or more lower-level units. For example, a slice or sequence may be a higher-level unit such as a CU, PU, or TU. Conversely, a CU, PU, or TU may be a lower-level unit of a slice or sequence.
[0409] According to an embodiment of the present disclosure, higher-level signaling may include signaling indicating the maximum number of candidates. For example, higher-level signaling may include signaling indicating the maximum number of merge candidates. For example, higher-level signaling may include signaling indicating the maximum number of candidates used in TPM. When inter-frame prediction is allowed, signaling indicating the maximum number of merge candidates or signaling indicating the maximum number of candidates used in TPM may be signaled and parsed. Whether inter-frame prediction is allowed may be determined by the slice type. Slice types may include I, P, B, etc. For example, when the slice type is I, inter-frame prediction may not be allowed. For example, when the slice type is I, only intra-frame prediction or intra-block copy (IBC) may be used. Furthermore, when the slice type is P or B, inter-frame prediction may be allowed. Furthermore, when the slice type is P or B, intra-frame prediction, IBC, etc. may be allowed. Furthermore, when the slice type is P, a maximum of one reference list can be used to predict a pixel. Furthermore, when the slice type is B, multiple reference lists can be used to predict a pixel. For example, when the slice type is B, two reference lists can be used to predict a pixel.
[0410] According to an embodiment of the present disclosure, when a maximum number is signaled, it can be signaled based on a reference value. For example, (reference value - maximum number) can be signaled. Thus, the maximum number can be derived based on a value parsed by the decoder and the reference value. For example, (reference value - parsed value) can be determined as the maximum number.
[0411] According to an embodiment, a reference value in the signaling indicating the maximum number of merging candidates may be 6.
[0412] According to an embodiment, the reference value in the signaling indicating the maximum number of candidates used in the TPM may be the maximum number of merge candidates.
[0413] refer to Figure 48 , the signaling indicating the maximum number of merge candidates may be six_minus_max_num_merge_cand. Here, the merge candidate may mean a candidate for merging motion vector prediction. Hereinafter, for the convenience of description, six_minus_max_num_merge_cand is also referred to as the first information. Figure 2 and Figure 7 The signaling can mean a signal transmitted from the encoder to the decoder through a bitstream. The six_minus_max_num_merge_cand (first information) can be signaled in units of a sequence. The decoder can parse the six_minus_max_num_merge_cand (first information) from the bitstream.
[0414] In addition, the signaling indicating the maximum number of candidates used in the TPM can be max_num_merge_cand_minus_max_num_triangle_cand. Referring to Figure 2 and Figure 7 The signaling can mean a signal transmitted from the encoder to the decoder through a bitstream. The max_num_merge_cand_minus_max_num_triangle_cand (third information) can be parsed by the decoder from the bitstream. The max_num_merge_cand_minus_max_num_triangle_cand (third information) can be information about the maximum number of merge mode candidates of a block of a partition.
[0415] In addition, the maximum number of merge candidates can be MaxNumMergeCand (maximum number of merge candidates), and the value can be based on the six_minus_max_num_merge_cand (first information). In addition, the maximum number of candidates used in the TPM can be MaxNumTriangleMergeCand, and the value can be based on the max_num_merge_cand_minus_max_num_triangle_cand. The MaxNumMergeCand (maximum number of merge candidates) can be used for the merge mode, and is information that can be used when a block is partitioned or not partitioned for motion compensation. In the above, it has been described based on the TPM, but the GPM can also be described in the same manner.
[0416] According to an embodiment of the disclosure, there can be higher level signaling indicating whether the TPM mode can be used. Referring to Figure 48 The higher level signaling indicating whether the TPM mode can be used can be sps_triangle_enabled_flag (second information). The information indicating whether the TPM mode can be used can be the same as information indicating whether a block can be partitioned as Figure 46The information indicating whether the block can be partitioned for inter-frame prediction is the same as the information shown in . Because GPM includes TPM, the information indicating whether the block can be partitioned can be the same as the information indicating whether the GPM mode is used. Performing inter-frame prediction can indicate the performance of motion compensation. That is, sps_triangle_enabled_flag (second information) can be information indicating whether the block can be partitioned for inter-frame prediction. When the second information indicating whether the block can be partitioned is 1, it can indicate that TPM or GPM can be used. In addition, when the second information is 0, it can indicate that TPM or GPM cannot be used. However, the present disclosure is not limited to this, and when the second information is 0, it can indicate that TPM or GPM can be used. In addition, when the second information is 1, it can indicate that TPM or GPM cannot be used.
[0417] refer to Figure 2 and Figure 7 Signaling may refer to a signal transmitted from an encoder to a decoder through a bitstream. The decoder may parse sps_triangle_enabled_flag (second information) from the bitstream.
[0418] According to an embodiment of the present disclosure, TPM can be used only when there are candidates for use in TPM that are greater than or equal to the number of partitions of TPM. For example, when TPM is partitioned into two partitions, TPM can be used only when there are two or more candidates for use in TPM. According to an embodiment, the candidates used in TPM can be based on merged candidates. Therefore, according to an embodiment of the present disclosure, TPM can be used when the maximum number of merged candidates is 2 or more. Therefore, when the maximum number of merged candidates is 2 or more, signaling related to TPM can be parsed. Signaling related to TPM may be signaling indicating the maximum number of candidates used in TPM.
[0419] refer to Figure 48 When sps_triangle_enabled_flag is 1 and MaxNumMergeCand is 2 or more, max_num_merge_cand_minus_max_num_triangle_cand can be parsed. In addition, when sps_triangle_enabled_flag is 0 or MaxNumMergeCand is less than 2, max_num_merge_cand_minus_max_num_triangle_cand may not be parsed.
[0420] Figure 49 is a diagram illustrating the maximum number of candidates used in a TPM according to an embodiment of the present disclosure.
[0421] refer to Figure 49 , the maximum number of candidates used in TPM may be MaxNumTriangleMergeCand. In addition, the signaling indicating the maximum number of candidates used in TPM may be max_num_merge_cand_minus_max_num_triangle_cand. In addition, referring to Figure 48 The description content can be omitted.
[0422] According to an embodiment of the present disclosure, the maximum number of candidates used in the TPM may be within a range from "the number of partitions of the TPM" to "a reference value in signaling indicating the maximum number of candidates used in the TPM", inclusive. Therefore, when the number of partitions of the TPM is 2 and the reference value is the maximum number of merge candidates, MaxNumTriangleMergeCand may be within a range from 2 to MaxNumMergeCand (including 2 and MaxNumMergeCand), as shown in FIG. Figure 49 As shown in the figure.
[0423] According to an embodiment of the present disclosure, when signaling indicating the maximum number of candidates used in the TPM does not exist, it is possible to infer the signaling indicating the maximum number of candidates used in the TPM or to infer the maximum number of candidates used in the TPM. For example, when signaling indicating the maximum number of candidates used in the TPM does not exist, it can be inferred that the maximum number of candidates used in the TPM is equal to 0. Alternatively, when signaling indicating the maximum number of candidates used in the TPM does not exist, the signaling indicating the maximum number of candidates used in the TPM can be inferred as a reference value.
[0424] Furthermore, when there is no signaling indicating the maximum number of candidates used in the TPM, the TPM can be not used. Alternatively, when the maximum number of candidates used in the TPM is less than the number of partitions in the TPM, the TPM can be not used. Alternatively, when the maximum number of candidates used in the TPM is 0, the TPM can be not used.
[0425] However, according to Figures 48 to 49 In an embodiment, when the number of partitions of the TPM and the “reference value in the signaling indicating the maximum number of candidates used in the TPM” are the same, there may be only one possible value as the maximum number of candidates used in the TPM. However, according to Figures 48 to 49 Even in this case, the signaling indicating the maximum number of candidates to use in the TPM can be parsed, which may be unnecessary. Figure 49 , as the possible value of MaxNumTriangleMergeCand can be only 2. However, referring to Figure 48 , max_num_merge_cand_minus_max_num_triangle_cand can be parsed even in this case.
[0426] refer to Figure 49 , MaxNumTriangleMergeCand can be determined as (MaxNumMergeCand-max_num_merge_cand_minus_max_num_triangle_cand).
[0427] Figure 50 is a diagram illustrating higher-level signaling related to a TPM according to an embodiment of the present disclosure.
[0428] According to an embodiment of the present disclosure, when the number of TPM partitions and the "reference value in the signaling indicating the maximum number of candidates used in the TPM" are the same, the signaling indicating the maximum number of candidates used in the TPM may not be parsed. Furthermore, according to the above embodiment, the number of TPM partitions may be 2. Furthermore, the "reference value in the signaling indicating the maximum number of candidates used in the TPM" may be the maximum number of merge candidates. Therefore, when the maximum number of merge candidates is 2, the signaling indicating the maximum number of candidates used in the TPM may not be parsed.
[0429] Alternatively, when the "reference value in the signaling indicating the maximum number of candidates used in the TPM" is less than or equal to the number of partitions in the TPM, the signaling indicating the maximum number of candidates used in the TPM may not be parsed. Therefore, when the maximum number of merge candidates is 2 or less, the signaling indicating the maximum number of candidates used in the TPM may not be parsed.
[0430] refer to Figure 50In row 5001, when MaxNumMergeCand (the maximum number of merge candidates) is 2 or MaxNumMergeCand (the maximum number of merge candidates) is 2 or less, max_num_merge_cand_minus_max_num_triangle_cand (third information) may not be parsed. In addition, when sps_triangle_enabled_flag (second information) is 1 and MaxNumMergeCand (the maximum number of merge candidates) is greater than 2, max_num_merge_cand_minus_max_num_triangle_cand (third information) may be parsed. In addition, when sps_triangle_enabled_flag (second information) is 0, max_num_merge_cand_minus_max_num_triangle_cand (third information) may not be parsed. Therefore, when sps_triangle_enabled_flag (second information) is 0 or MaxNumMergeCand (maximum number of merge candidates) is 2 or less, max_num_merge_cand_minus_max_num_triangle_cand (third information) may not be parsed.
[0431] Figure 51 is a diagram illustrating the maximum number of candidates used in a TPM according to an embodiment of the present disclosure.
[0432] Figure 51 The embodiment can be used with Figure 50 In addition, the description of the above-mentioned embodiments may be omitted in this figure.
[0433] According to an embodiment of the present disclosure, when the “reference value in the signaling indicating the maximum number of candidates used in the TPM” is the number of partitions in the TPM, the maximum number of candidates used in the TPM can be inferred and set to the number of partitions in the TPM. In addition, the inference and setting can be performed in the absence of the signaling indicating the maximum number of candidates used in the TPM. Figure 50 In an embodiment, when the "reference value in the signaling indicating the maximum number of candidates used in the TPM" is the number of partitions in the TPM, the signaling indicating the maximum number of candidates used in the TPM may not be parsed, and when the signaling indicating the maximum number of candidates used in the TPM does not exist, the value of the maximum number of candidates used in the TPM may be inferred to be the number of partitions in the TPM. Inference and setting can also be performed when additional conditions are met. The additional condition may be a condition in which a higher-level signaling indicating whether TPM mode can be used is 1.
[0434] In addition, in this embodiment, although it has been described that the maximum number of candidates used in the TPM is inferred and set, signaling indicating the maximum number of candidates used in the TPM can also be inferred and set so that the maximum number of candidates used in the described TPM is derived, instead of inferring and setting the maximum number of candidates used in the TPM.
[0435] Referring to Figure 50 When sps_triangle_enabled_flag (second information) indicates 1 and MaxNumMergeCand (maximum number of merge candidates) is greater than 2, max_num_merge_cand_minus_max_num_triangle_cand (third information) can be received. In this case, referring to line 5101 of Figure 51 , MaxNumTriangleMergeCand (maximum number of merge mode candidates for a block of a partition) can be obtained using max_num_merge_cand_minus_max_num_triangle_cand (third information) which is clearly signaled. In summary, when sps_triangle_enabled_flag (second information) is 1 and MaxNumMergeCand (maximum number of merge candidates) is greater than or equal to 3, MaxNumTriangleMergeCand (maximum number of merge mode candidates for a block of a partition) can be obtained by subtracting the third information (max_num_merge_cand_minus_max_num_triangle_cand) from MaxNumMergeCand (maximum number of merge candidates).
[0436] Referring to Figure 51triangle enabled flag (second information) is 1 and MaxNumMergeCand (maximum number of merge candidates) is 2, MaxNumTriangleMergeCand (maximum number of merge mode candidates for a partitioned block) can be set to 2. More specifically, as already described, when the sps_triangle_enabled_flag (second information) indicates 1 and MaxNumMergeCand (maximum number of merge candidates) is greater than 2, max_num_merge_cand_minus_max_num_triangle_cand (third information) can be received, and thus, as at line 5102, when the sps_triangle_enabled_flag (second information) is 1 and MaxNumMergeCand (maximum number of merge candidates) is 2, max_num_merge_cand_minus_max_num_triangle_cand (third information) can not be received. In this case, umTriangleMergeCand (maximum number of merge mode candidates for a partitioned block) can be determined without max_num_merge_cand_minus_max_num_triangle_cand (third information).
[0437] Further, with reference to Figure 51 triangle enabled flag (second information) is 0 or MaxNumMergeCand (maximum number of merge candidates) is not 2, MaxNumTriangleMergeCand (maximum number of merge mode candidates for a partitioned block) can be inferred and set to 0. In this case, as already described with reference to line 5101, when the sps_triangle_enabled_flag (second information) indicates 1 and MaxNumMergeCand (maximum number of merge candidates) is greater than or equal to 3, max_num_merge_cand_minus_max_num_triangle_cand (third information) can be signaled, and thus, the case where MaxNumMergeCand is inferred and set to 0 can be the case where the second information is 0 or the maximum number of merge candidates is 1. In summary, when the sps_triangle_enabled_flag (second information) is 0 or MaxNumMergeCand (maximum number of merge candidates) is 1, MaxNumTriangleMergeCand (maximum number of merge mode candidates for a partitioned block) can be set to 0.
[0438] MaxNumMergeCand (maximum number of merge candidates) and MaxNumTriangleMergeCand (maximum number of merge mode candidates for a partitioned block) can be used for different purposes. For example, MaxNumMergeCand (maximum number of merge candidates) can be used when a block is partitioned or not partitioned for motion compensation. However, MaxNumTriangleMergeCand (maximum number of merge mode candidates for a partitioned block) is information that can be used when a block is partitioned. The number of candidates for a partitioned block in merge mode cannot exceed MaxNumTriangleMergeCand (maximum number of merge mode candidates for a partitioned block).
[0439] Another embodiment can also be used. Figure 51 In this embodiment, the case where MaxNumMergeCand is not 2 includes the case where MaxNumMergeCand is greater than 2. In this case, the meaning of inferring and setting MaxNumTriangleMergeCand to 0 may be unclear. However, in this case, because signaling indicating the maximum number of candidates used in the TPM exists, inference is not performed, and therefore, there is no problem in operation. However, in this embodiment, inference can be performed using meaning.
[0440] If sps_triangle_enabled_flag (second information) is 1 and MaxNumMergeCand (maximum number of merge candidates) is 2 or more, MaxNumTriangleMergeCand can be inferred and set to 2 (or MaxNumMergeCand). Otherwise (ie, when sps_triangle_enabled_flag is 0 or MaxNumMergeCand is less than 2), MaxNumTriangleMergeCand can be inferred and set to 0.
[0441] Alternatively, if sps_triangle_enabled_flag is 1 and MaxNumMergeCand is 2, then MaxNumTriangleMergeCand may be inferred and set to 2. Otherwise, if sps_triangle_enabled_flag is 0, then MaxNumTriangleMergeCand may be inferred and set to 0.
[0442] Therefore, according to the above embodiment Figure 50In an embodiment, when MaxNumMergeCand is 0, 1, or 2, there may be no signaling indicating the maximum number of candidates used in the TPM, and when MaxNumMergeCand is 0 or 1, the maximum number of candidates used in the TPM may be inferred and set to 0. When MaxNumMergeCand is 2, the maximum number of candidates used in the TPM may be inferred and set to 2.
[0443] Figure 52 is a diagram illustrating syntax elements related to a TPM according to an embodiment of the present disclosure.
[0444] As described above, a maximum number of candidates used in a TPM may exist, and the number of partitions of the TPM may be preset. In addition, the candidate index used in the TPM may be different.
[0445] According to an embodiment of the present disclosure, when the maximum number of candidates used in the TPM is the same as the number of partitions in the TPM, signaling different from the case where they are different can be performed. For example, when the maximum number of candidates used in the TPM is the same as the number of partitions in the TPM, signaling different from the case where they are different can be performed. Therefore, it is possible to send a signal with fewer bits. Alternatively, when the maximum number of candidates used in the TPM is less than or equal to the number of partitions of the TPM, signaling different from the case where the maximum number of candidates is greater than the number of partitions can be performed (among these, when the number of partitions is less than the number of partitions of the TPM, it may be a case where the TPM cannot be used).
[0446] When a TPM has two partitions, two candidate indexes can be signaled. If the maximum number of candidates used in the TPM is 2, there are only two possible candidate index combinations. These two combinations can be a combination where m and n are 0 and 1, respectively, and a combination where m and n are 1 and 0, respectively. Therefore, the two candidate indexes can be signaled using only 1 bit of signaling.
[0447] refer to Figure 52 , when MaxNumTriangleMergeCand is 2, candidate index signaling different from the case where it is not (otherwise, when TPM is used, the case where MaxNumTriangleMergeCand is greater than 2) may be performed. Alternatively, when MaxNumTriangleMergeCand is 2 or less, candidate index signaling different from the case where it is not (otherwise, when TPM is used, the case where MaxNumTriangleMergeCand is greater than 2) may be performed. When referring to Figure 52In some embodiments, different candidate index signaling can be signaled as merge_triangle_idx_indicator. Different candidate index signaling can be a signaling method that does not signal merge_triangle_idx0 or merge_triangle_idx1. This will be referred to as Figure 53 Further described.
[0448] Figure 53 FIG. 1 is a diagram illustrating signaling of TPM candidate indices according to embodiments of the disclosure.
[0449] According to embodiments of the disclosure, when using different index signaling than described in Figure 52
[0450] According to embodiments of the disclosure, when the maximum number of candidates used in TPM is the same as the number of partitions in TPM, TPM candidate indices can be determined based on merge_triangle_idx_indicator. Further, this can be the case when using blocks of TPM.
[0451] More specifically, when MaxNumTriangleMergeCand is 2 (or when MaxNumTriangleMergeCand is 2 and MergeTriangleFlag is 1), TPM candidate indices can be determined based on merge_triangle_idx_indicator. In this case, if merge_triangle_idx_indicator is 0, m and n as TPM candidate indices can be set to 0 and 1, respectively, and if merge_triangle_idx_indicator is 1, m and n as TPM candidate indices can be set to 1 and 0, respectively. Alternatively, merge_triangle_idx0 or merge_triangle_idx1 as values (syntax elements) that can be signaled such that m and n are the same as those described can be inferred and set.
[0452] Figure 47 Figure 53 , when merge_triangle_idx0 does not exist, if MaxNumTriangleMergeCand is 2 and merge_triangle_idx_indicator is 1 (or if MaxNumTriangleMergeCand is 2 and MergeTriangleFlag is 1), then the value of merge_triangle_idx0 may be inferred to be equal to 1. Otherwise, the value of merge_triangle_idx0 may be inferred to be equal to 0. Additionally, when merge_triangle_idx1 does not exist, merge_triangle_idx1 may be inferred to be equal to 0. Therefore, if MaxNumTriangleMergeCand is 2, when merge_triangle_idx_indicator is 0, merge_triangle_idx0 and merge_triangle_idx1 may be 0 and 0, respectively, and accordingly, m and n may be 0 and 1, respectively. In addition, if MaxNumTriangleMergeCand is 2, when merge_triangle_idx_indicator is 1, merge_triangle_idx0 and merge_triangle_idx1 are 1 and 0, respectively, and accordingly, m and n may be 1 and 0, respectively.
[0453] Figure 54 is a diagram illustrating signaling of a TPM candidate index according to an embodiment of the present disclosure.
[0454] Already referenced Figure 47 Describes a method for determining TPM candidate indices, but in Figure 54 Another determination method and signaling method are described in the embodiment of FIG. The redundant description with the above description can be omitted. In addition, m and n can be represented as shown in FIG. Figure 47 The candidate index being described.
[0455] According to an embodiment of the present disclosure, the smaller value of m and n can be signaled to a preset syntax element between merge_triangle_idx0 and merge_triangle_idx1. In addition, a value based on the difference between m and n can be signaled to the other of merge_triangle_idx0 and merge_triangle_idx1. In addition, a value indicating the magnitude relationship between m and n can be signaled.
[0456] For example, merge_triangle_idx0 can be the smaller value of m and n. In addition, merge_triangle_idx1 can be a value based on |mn|. merge_triangle_idx1 can be (|mn|-1). This is because m and n may be different. In addition, the value representing the size relationship between m and n can be Figure 54 merge_triangle_bigger.
[0457] Using this relationship, m and n can be determined based on merge_triangle_idx0, merge_triangle_idx1, and merge_triangle_bigger. Figure 54 , another operation can be performed based on the merge_triangle_bigger value. For example, when merge_triangle_bigger is 0, n may be greater than m. In this case, m can be merge_triangle_idx0. Alternatively, n can be (merge_triangle_idx1+m+1). Furthermore, when merge_triangle_bigger is 1, m may be greater than n. In this case, n can be merge_triangle_idx0. Alternatively, m can be (merge_triangle_idx1+n+1).
[0458] and Figure 47 Compared with the method in Figure 54 The advantage of the method in is that when the smaller value of m and n is not 0 (or greater), the signaling overhead can be reduced. For example, when m and n are 3 and 4 respectively, Figure 47 In the method, merge_triangle_idx0 and merge_triangle_idx1 may need to be signaled as 3 and 3 respectively. However, in Figure 54 In the method of , when m and n are 3 and 4 respectively, merge_triangle_idx0 and merge_triangle_idx1 may need to be signaled as 3 and 0 respectively (in addition, signaling indicating the size relationship may be required). Therefore, when variable length signaling is used, fewer bits can be used because the size of the encoded and decoded values is reduced.
[0459] Figure 55 is a diagram illustrating signaling of a TPM candidate index according to an embodiment of the present disclosure.
[0460] Already referenced Figure 47 Describes a method for determining TPM candidate indices, but Figure 55Another determination method and signaling method will be described in the embodiment of FIG. The redundant description with the above description can be omitted. In addition, m and n can be represented as shown in FIG. Figure 47 The candidate index being described.
[0461] According to an embodiment of the present disclosure, a value based on the larger value of m and n can be signaled to the preset syntax elements in merge_triangle_idx0 and merge_triangle_idx1. In addition, a value based on the smaller value of m and n can be signaled to the other of merge_triangle_idx0 and merge_triangle_idx1. In addition, a value indicating the size relationship of m and n can be signaled.
[0462] For example, merge_triangle_idx0 can be based on the larger value of m and n. According to an embodiment, because m and n are not equal, the larger value of m and n will be greater than or equal to 1. Therefore, considering that the larger value of m and n excludes 0, it can be signaled with fewer bits. For example, merge_triangle_idx0 can be ((the larger value of m and n)-1). In this case, the maximum value of merge_triangle_idx0 can be (MaxNumTriangleMergeCand-1-1) (-1 because it is a value starting from 0, and -1 because the larger value can be excluded as 0). The maximum value can be used for binarization, and when the maximum value decreases, there may be a situation where fewer bits are used. In addition, merge_triangle_idx1 can be the smaller value between m and n. In addition, the maximum value of merge_triangle_idx1 can be merge_triangle_idx0. Therefore, there may be a situation where fewer bits are used than setting the maximum value to MaxNumTriangleMergeCand. In addition, when merge_triangle_idx0 is 0, that is, when the larger value of m and n is 1, the smaller value of m and n is 0, and thus there may be no additional signaling. For example, when merge_triangle_idx0 is 0, that is, when the larger value of m and n is 1, the smaller value of m and n may be determined to be 0. Alternatively, when merge_triangle_idx0 is 0, that is, when the larger value of m and n is 1, merge_triangle_idx1 may be inferred to be equal and determined to be 0. Reference Figure 22, it is possible to determine whether to parse merge_triangle_idx1 based on merge_triangle_idx0. For example, when merge_triangle_idx0 is greater than 0, merge_triangle_idx1 may be parsed, and when merge_triangle_idx0 is 0, merge_triangle_idx1 may not be parsed.
[0463] In addition, the value representing the magnitude relationship between m and n can be Figure 55 merge_triangle_bigger.
[0464] Using this relationship, m and n can be determined based on merge_triangle_idx0, merge_triangle_idx1, and merge_triangle_bigger. Figure 55 , another operation can be performed based on the value of merge_triangle_bigger. For example, when merge_triangle_bigger is 0, m may be greater than n. In this case, m can be (merge_triangle_idx0+1). Alternatively, n can be merge_triangle_idx1. Furthermore, when merge_triangle_bigger is 1, n may be greater than m. In this case, n can be (merge_triangle_idx0+1). Alternatively, m can be merge_triangle_idx1. Furthermore, when merge_triangle_idx1 does not exist, its value can be inferred to be 0.
[0465] and Figure 47 Compared with the method in Figure 55 The advantage of the method in is that it can reduce the signaling overhead according to the values of m and n. For example, when m and n are 1 and 0 respectively, Figure 47 In the method, merge_triangle_idx0 and merge_triangle_idx1 may need to be signaled as 1 and 0, respectively. However, in Figure 55 In the method of , when m and n are 1 and 0 respectively, merge_triangle_idx0 and merge_triangle_idx1 may need to be signaled as 0 and 0 respectively, but merge_triangle_idx1 can be inferred without encoding or parsing (other than that, signaling indicating the size relationship may be required). Therefore, when variable length signaling is used, fewer bits can be used because the size of the encoded and decoded values is reduced. Alternatively, when m and n are 2 and 1 respectively, in Figure 47 In the method, it may be necessary to signal merge_triangle_idx0 and merge_triangle_idx1 as 2 and 1 respectively, and Figure 55 In the method of , merge_triangle_idx0 and merge_triangle_idx1 are signaled as 1 and 1 respectively. However, in this case, Figure 55 In the method of , since the maximum value of merge_triangle_idx1 is (3–1–1)=1, 1 can be signaled with fewer bits than when the maximum value is larger. For example, Figure 55 The method may be a method that has an advantage when the difference between m and n is small, for example, when the difference is 1.
[0466] It has also been described that reference merge_triangle_idx0 is used to determine whether to resolve Figure 55 Although merge_triangle_idx1 is not included in the syntax structure of the idx1 header, it is also possible to determine whether to parse merge_triangle_idx1 based on the larger value of m and n. That is, it can be classified into the case where the larger value of m and n is 1 or greater and the case where it is not 1. However, in this case, merge_triangle_bigger parsing may need to occur before determining whether to parse merge_triangle_idx1.
[0467] In the above description, the configuration has been described through specific embodiments, but those skilled in the art can make modifications and changes without departing from the spirit and scope of the present disclosure. Therefore, the content that can be easily inferred from the detailed description and embodiments of the present disclosure by those skilled in the art to which the present disclosure belongs is interpreted as falling within the scope of the rights of the present disclosure.
Claims
1. A decoding device for processing a video signal, the decoding device comprising: processor, Wherein, the processor is configured to: Parsing a first syntax element indicating whether adaptive motion vector differential resolution is enabled, Parsing a second syntax element indicating whether affine motion compensation is enabled, determining whether to parse a third syntax element indicating whether the adaptive motion vector differential resolution is enabled for the affine motion compensation based on at least one of the parsing results of the first syntax element and the second syntax element, Parsing a fourth syntax element related to a reference picture list for the current block, When the fourth syntax element indicates that a reference picture list other than reference picture list 0 is available, parsing a fifth syntax element indicating a motion vector predictor index for reference picture list 1, parsing a sixth syntax element indicating whether the motion vector difference and the plurality of control point motion vector differences are set to zero for the reference picture list 1, and The fifth syntax element is parsed independently of the sixth syntax element.
2. The decoding device according to claim 1, When the value of the first syntax element indicates that the adaptive motion vector differential resolution is enabled and the value of the second syntax element indicates that the affine motion compensation is enabled, The third syntax element is parsed.
3. The decoding device according to claim 1, in, At least one of the first syntax element, the second syntax element, and the third syntax element is signaled as a sequence unit.
4. The decoding device according to claim 1, When the value of the first syntax element indicates that the adaptive motion vector differential resolution is not enabled and the value of the second syntax element indicates that the affine motion compensation is enabled, The third syntax element is not parsed and a value of the third syntax element is inferred to be a value indicating that the adaptive motion vector differential resolution is not enabled for the affine motion compensation.
5. The decoding device according to claim 1, When the value of the second syntax element indicates that the affine motion compensation is not enabled, The third syntax element is not parsed and a value of the third syntax element is inferred to be a value indicating that the adaptive motion vector differential resolution is not enabled for the affine motion compensation. The decoding device according to claim 1 , in, The processor is further configured to: parsing a seventh syntax element indicating whether affine motion compensation is used for the current block, When the first syntax element indicates that the adaptive motion vector difference resolution is enabled, the seventh syntax element indicates that the affine motion compensation is not used for the current block, and at least one of the plurality of motion vector differences for the current block is non-zero, parsing the eighth syntax element indicating the resolution of the motion vector difference, and The plurality of motion vector differences for the current block are modified based on the eighth syntax element.
7. The decoding device according to claim 1, in, The processor is further configured to: parsing a seventh syntax element indicating whether affine motion compensation is used for the current block, When the third syntax element indicates that the adaptive motion vector difference resolution is enabled for the affine motion compensation, the seventh syntax element indicates that the affine motion compensation is used for the current block, and at least one of the plurality of control point motion vector differences for the current block is non-zero, parsing the eighth syntax element indicating the resolution of the motion vector difference, and The plurality of control point motion vector differences for the current block are modified based on the eighth syntax element.
8. A non-transitory computer-readable medium storing a bitstream, wherein the bitstream is decoded by a decoding method, the decoding method comprising: parsing a first syntax element indicating whether adaptive motion vector differential resolution is enabled; parsing a second syntax element indicating whether affine motion compensation is enabled; determining whether to parse a third syntax element indicating whether the adaptive motion vector differential resolution is enabled for the affine motion compensation based on at least one of the parsing results of the first syntax element and the second syntax element; Parsing a fourth syntax element related to a reference picture list for the current block, When the fourth syntax element indicates that a reference picture list other than reference picture list 0 is available, parsing a fifth syntax element indicating a motion vector predictor index for reference picture list 1, parsing a sixth syntax element indicating whether, for the reference picture list 1, motion vector differences and a plurality of control point motion vector differences are set to zero, The fifth syntax element is parsed independently of the sixth syntax element.
9. The non-transitory computer-readable medium storing the bitstream according to claim 8, When the value of the first syntax element indicates that the adaptive motion vector differential resolution is enabled and the value of the second syntax element indicates that the affine motion compensation is enabled, The third syntax element is parsed.
10. The non-transitory computer-readable medium storing the bitstream according to claim 8, in, At least one of the first syntax element, the second syntax element, and the third syntax element is signaled as a sequence unit.
11. The non-transitory computer-readable medium storing the bitstream according to claim 8, When the value of the first syntax element indicates that the adaptive motion vector differential resolution is not enabled and the value of the second syntax element indicates that the affine motion compensation is enabled, The third syntax element is not parsed and a value of the third syntax element is inferred to be a value indicating that the adaptive motion vector differential resolution is not enabled for the affine motion compensation.
12. The non-transitory computer-readable medium storing the bitstream according to claim 8, When the value of the second syntax element indicates that the affine motion compensation is not enabled, The third syntax element is not parsed and a value of the third syntax element is inferred to be a value indicating that the adaptive motion vector differential resolution is not enabled for the affine motion compensation.
13. The non-transitory computer-readable medium storing the bitstream according to claim 8, the decoding method further comprising: parsing a seventh syntax element indicating whether affine motion compensation is used for the current block; When the first syntax element indicates that the adaptive motion vector difference resolution is enabled, the seventh syntax element indicates that the affine motion compensation is not used for the current block, and at least one of the plurality of motion vector differences for the current block is non-zero, parsing an eighth syntax element indicating a resolution of a motion vector difference; as well as The plurality of motion vector differences for the current block are modified based on the eighth syntax element.
14. The non-transitory computer-readable medium storing the bitstream according to claim 8, the decoding method further comprising: parsing a seventh syntax element indicating whether affine motion compensation is used for the current block; When the third syntax element indicates that the adaptive motion vector difference resolution is enabled for the affine motion compensation, the seventh syntax element indicates that the affine motion compensation is used for the current block, and at least one of the plurality of control point motion vector differences for the current block is non-zero, parsing the eighth syntax element indicating the resolution of the motion vector difference, and The plurality of control point motion vector differences for the current block are modified based on the eighth syntax element.
15. An encoding device for processing a video signal, the encoding device comprising: processor, Wherein, the processor is configured to: The processor is configured to obtain a bit stream to be decoded by a decoder using a decoding method, the decoding method comprising: parsing a first syntax element indicating whether adaptive motion vector differential resolution is enabled; parsing a second syntax element indicating whether affine motion compensation is enabled; determining whether to parse a third syntax element indicating whether the adaptive motion vector differential resolution is enabled for the affine motion compensation based on at least one of the parsing results of the first syntax element and the second syntax element; Parsing a fourth syntax element related to a reference picture list for the current block, When the fourth syntax element indicates that a reference picture list other than reference picture list 0 is available, parsing a fifth syntax element indicating a motion vector predictor index for reference picture list 1; and parsing a sixth syntax element indicating whether, for the reference picture list 1, motion vector differences and a plurality of control point motion vector differences are set to zero, The fifth syntax element is parsed independently of the sixth syntax element.
16. The encoding device according to claim 15, When the value of the first syntax element indicates that the adaptive motion vector differential resolution is enabled and the value of the second syntax element indicates that the affine motion compensation is enabled, The third syntax element is parsed.
17. The encoding device according to claim 15, in, At least one of the first syntax element, the second syntax element, and the third syntax element is signaled as a sequence unit.
18. The encoding device according to claim 15, When the value of the first syntax element indicates that the adaptive motion vector differential resolution is not enabled and the value of the second syntax element indicates that the affine motion compensation is enabled, The third syntax element is not parsed and a value of the third syntax element is inferred to be a value indicating that the adaptive motion vector differential resolution is not enabled for the affine motion compensation.
19. The encoding device according to claim 15, When the value of the second syntax element indicates that the affine motion compensation is not enabled, The third syntax element is not parsed and a value of the third syntax element is inferred to be a value indicating that the adaptive motion vector differential resolution is not enabled for the affine motion compensation.
20. A method for processing a video signal, the method comprising: parsing a first syntax element indicating whether adaptive motion vector differential resolution is enabled; parsing a second syntax element indicating whether affine motion compensation is enabled; as well as determining whether to parse a third syntax element indicating whether the adaptive motion vector differential resolution is enabled for the affine motion compensation based on at least one of the parsing results of the first syntax element and the second syntax element; Parsing a fourth syntax element related to a reference picture list for the current block, When the fourth syntax element indicates that a reference picture list other than reference picture list 0 is available, parsing a fifth syntax element indicating a motion vector predictor index for reference picture list 1; as well as parsing a sixth syntax element indicating whether, for the reference picture list 1, motion vector differences and a plurality of control point motion vector differences are set to zero, The fifth syntax element is parsed independently of the sixth syntax element.