Video signal processing method and apparatus using adaptive motion vector resolution
By parsing flags for adaptive motion vector resolution and affine motion compensation in video signal processing, the method optimizes encoding and decoding, addressing inefficiencies and enhancing coding efficiency.
Patent Information
- Application Number
- JP2024131112
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2019-05-17
- Filing Date
- 2024-08-07
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2040-05-04
AI Technical Summary
Existing video signal processing methods lack efficiency in encoding and decoding video signals, particularly in handling adaptive motion vector resolution and affine motion compensation, which affects coding performance.
The method involves parsing flags from a bitstream to determine the use of adaptive motion vector resolution (AMVR) and affine motion compensation, setting these flags at various levels such as Coding Tree Units, slices, tiles, tile groups, or sequences, and modifying motion vector differences based on these flags to optimize encoding and decoding processes.
This approach enhances coding efficiency by adaptively managing motion vector resolution, improving the encoding and decoding of video signals, particularly in scenarios involving affine motion compensation.
Smart Images

Figure 2024144765000001_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to a method and apparatus for processing a video signal, and more particularly to a method and apparatus for processing a video signal for encoding or decoding a video signal based on intra prediction. [Background technology]
[0002] Compression coding refers to a series of signal processing techniques for transmitting digitized information via a communication line or storing it in a form suitable for a storage medium. The objects of compression coding include voice, video, text, etc., and the technology for compressing and coding video in particular is called video compression. Compression coding of video signals is performed by removing redundant information by considering spatial correlation, temporal correlation, probabilistic correlation, etc. However, with the recent development of various media and data transmission media, there is a demand for more efficient video signal processing methods and devices. Summary of the Invention [Problem to be solved by the invention]
[0003] An object of the present disclosure is to increase the coding efficiency of video signals. [Means for solving the problem]
[0004] A method for processing a video signal according to one embodiment of the present disclosure includes the steps of parsing an AMVR (Adaptive Motion Vector Resolution) enabled flag (sps_amvr_enabled_flag) indicating whether adaptive motion vector differential resolution is used from a bitstream, parsing an affine enabled flag (sps_affine_enabled_flag) indicating whether affine motion compensation is enabled from the bitstream, determining whether affine motion compensation is enabled based on the affine enabled flag (sps_affine_enabled_flag), and if affine motion compensation is enabled, determining whether adaptive motion vector differential resolution is used based on the AMVR enabled flag (sps_amvr_enabled_flag), and if adaptive motion vector differential resolution is used, parsing an affine AMVR enabled flag (sps_affine_amvr_enabled_flag) indicating whether adaptive motion vector differential resolution is enabled for affine motion compensation from the bitstream.
[0005] In a method for processing a video signal according to one embodiment of the present disclosure, one of the AMVR enabled flag (sps_amvr_enabled_flag), the affine enabled flag (sps_affine_enabled_flag), or the affine AMVR enabled flag (sps_affine_amvr_enabled_flag) is signaled in one of a Coding Tree Unit, slice, tile, tile group, picture, or sequence unit.
[0006] In a method for processing a video signal according to one embodiment of the present disclosure, when affine motion compensation is enabled and adaptive motion vector differential resolution is not used, the affine AMVR enabled flag (sps_affine_amvr_enabled_flag) implies that adaptive motion vector differential resolution is disabled for affine motion compensation.
[0007] In a method for processing a video signal according to one embodiment of the present disclosure, when affine motion compensation is disabled, the affine AMVR enabled flag (sps_affine_amvr_enabled_flag) infers that adaptive motion vector differential resolution for affine motion compensation is disabled.
[0008] A method for processing a video signal according to one embodiment of the present disclosure is characterized in that it includes a step of parsing information regarding the resolution of the motion vector differentials from the bitstream if an AMVR enabled flag (sps_amvr_enabled_flag) indicates use of adaptive motion vector differential resolution, an inter-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 a plurality of motion vector differentials for the current block is not 0, and a step of modifying the plurality of motion vector differentials for the current block based on the information regarding the resolution of the motion vector differentials.
[0009] A method for processing a video signal according to one embodiment of the present disclosure is characterized in that it includes a step of parsing information regarding the resolution of the motion vector difference from the bitstream if the affine AMVR possible flag indicates that adaptive motion vector difference resolution is available for affine motion compensation, an inter-affine flag (inter_affine_flag) obtained from the bitstream indicates the use of affine motion compensation for the current block, and at least one of the plurality of control point motion vector difference for the current block is not 0, and a step of modifying the plurality of control point motion vector difference for the current block based on the information regarding the resolution of the motion vector difference.
[0010] A method for processing a video signal according to one embodiment of the present disclosure includes the steps of: acquiring information (inter_pred_idc) about a reference picture list for a current block; if the information (inter_pred_idc) about the reference picture list indicates that not only the 0th reference picture list (list 0) is used, parsing a motion vector predictor index (mvp_l1_flag) of the first reference picture list (list 1) from the bitstream; generating motion vector predictor candidates; acquiring a motion vector predictor from the motion vector predictor candidates based on the motion vector predictor index; and predicting the current block based on the motion vector predictor.
[0011] A method for processing a video signal according to one embodiment of the present disclosure further includes a step of obtaining a motion vector difference zero flag (mvd_l1_zero_flag) from a bitstream indicating whether a motion vector difference and multiple control point motion vector difference are set to 0 for a first reference picture list, and a step of parsing a motion vector predictor index (mvp_l1_flag) includes a step of parsing the motion vector predictor index (mvp_l1_flag) regardless of whether the motion vector difference zero flag (mvd_l1_zero_flag) is 1 and information on reference picture lists (inter_pred_idc) indicates the use of both the 0th reference picture list and the first reference picture list.
[0012] A method for processing a video signal according to one embodiment of the present disclosure includes the steps of parsing first information (six_minus_max_num_merge_cand) regarding the maximum number of candidates for merge motion vector prediction from a bitstream on a sequence-by-sequence basis, obtaining the maximum number of merge candidates based on the first information, parsing second information indicating whether the block can be partitioned for inter prediction from the bitstream, and if the second information indicates 1 and the maximum number of merge candidates is greater than 2, parsing third information regarding the maximum number of merge mode candidates for the partitioned block from the bitstream.
[0013] The method for processing a video signal according to an embodiment of the present disclosure further includes the steps of: obtaining a maximum number of merge mode candidates for the partitioned block by subtracting the third information from the maximum number of merge candidates if the second information indicates 1 and the maximum number of merge candidates is greater than or equal to 3; setting the maximum number of merge mode candidates for the partitioned block to 2 if the second information indicates 1 and the maximum number of merge candidates is 2; and setting the maximum number of merge mode candidates for the partitioned block to 0 if the second information is 0 or the maximum number of merge candidates is 1.
[0014] An apparatus for processing a video signal according to one embodiment of the present disclosure includes a processor and a memory, and the processor parses an AMVR (Adaptive Motion Vector Resolution) enabled flag (sps_amvr_enabled_flag) indicating whether adaptive motion vector differential resolution is used from a bitstream based on an instruction word stored in the memory, parses an affine enabled 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 enabled flag (sps_affine_enabled_flag), and if affine motion compensation is available, determines whether adaptive motion vector differential resolution is used based on the AMVR enabled flag (sps_amvr_enabled_flag), and if adaptive motion vector differential resolution is used, parses an affine AMVR enabled flag (sps_affine_amvr_enabled_flag) indicating whether adaptive motion vector differential resolution is available for affine motion compensation from the bitstream based on an instruction word stored in the memory.
[0015] In an apparatus for processing a video signal according to one embodiment of the present disclosure, one of the AMVR enabled flag (sps_amvr_enabled_flag), the affine enabled flag (sps_affine_enabled_flag), or the affine AMVR enabled flag (sps_affine_amvr_enabled_flag) is signaled in one of a Coding Tree Unit, slice, tile, tile group, picture, or sequence unit.
[0016] In an apparatus for processing a video signal according to one embodiment of the present disclosure, when affine motion compensation is enabled and adaptive motion vector differential resolution is not used, the affine AMVR enabled flag (sps_affine_amvr_enabled_flag) implies that adaptive motion vector differential resolution is disabled for affine motion compensation.
[0017] In an apparatus for processing a video signal according to one embodiment of the present disclosure, when affine motion compensation is disabled, the affine AMVR enabled flag (sps_affine_amvr_enabled_flag) infers that adaptive motion vector differential resolution is disabled for affine motion compensation.
[0018] In an apparatus for processing a video signal according to one embodiment of the present disclosure, the processor is characterized in that, based on an instruction word stored in a memory, if an AMVR enabled flag (sps_amvr_enabled_flag) indicates the use of adaptive motion vector differential resolution, an inter-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 a plurality of motion vector differentials for the current block is not 0, parses information regarding the resolution of the motion vector differentials from the bitstream, and modifies a plurality of motion vector differentials for the current block based on the information regarding the resolution of the motion vector differentials.
[0019] In an apparatus for processing a video signal according to one embodiment of the present disclosure, the processor is characterized in that, based on an instruction stored in a memory, if the affine AMVR possible flag indicates that adaptive motion vector differential resolution is available for affine motion compensation, the inter-affine flag (inter_affine_flag) obtained from the bitstream indicates the use of affine motion compensation for the current block, and at least one of the multiple control point motion vector differentials for the current block is not 0, parses information regarding the resolution of the motion vector differentials from the bitstream, and modifies the multiple control point motion vector differentials for the current block based on the information regarding the resolution of the motion vector differentials.
[0020] In an apparatus for processing a video signal according to one embodiment of the present disclosure, a processor acquires information (inter_pred_idc) regarding a reference picture list for a current block based on an instruction word stored in a memory, and if the information (inter_pred_idc) regarding the reference picture list indicates that not only the 0th reference picture list (list 0) is used, parses a motion vector predictor index (mvp_l1_flag) of the first reference picture list (list 1) from the bitstream to generate motion vector predictor candidates, acquires a motion vector predictor from the motion vector predictor candidates based on the motion vector predictor index, and predicts the current block based on the motion vector predictor.
[0021] In an apparatus for processing a video signal according to one embodiment of the present disclosure, a processor acquires a motion vector difference zero flag (mvd_l1_zero_flag) indicating whether a motion vector difference and multiple control point motion vector difference are set to 0 for a first reference picture list from a bitstream based on an instruction word stored in a memory, and parses a motion vector predictor index (mvp_l1_flag) regardless of whether the motion vector difference zero flag (mvd_l1_zero_flag) is 1 and information on the reference picture list (inter_pred_idc) indicates that both the 0th reference picture list and the first reference picture list are used.
[0022] An apparatus for processing a video signal according to one embodiment of the present disclosure includes a processor and a memory, and the processor parses first information (six_minus_max_num_merge_cand) regarding a maximum number of candidates for merge motion vector prediction from a bitstream on a sequence basis based on an instruction word stored in the memory, obtains the maximum number of merge candidates based on the first information, parses second information indicating whether a block can be partitioned for inter prediction from the bitstream, and if the second information indicates 1 and the maximum number of merge candidates is greater than 2, parses third information regarding the maximum number of merge mode candidates for the partitioned block from the bitstream.
[0023] In an apparatus for processing a video signal according to an embodiment of the present disclosure, a processor, based on an instruction word stored in a memory, subtracts the third information from the maximum number of merge candidates to obtain a maximum number of merge mode candidates for the partitioned block if the second information indicates 1 and the maximum number of merge candidates is greater than or equal to 3, sets the maximum number of merge mode candidates for the partitioned block to 2 if the second information indicates 1 and the maximum number of merge candidates is 2, and sets the maximum number of merge mode candidates for the partitioned block to 0 if the second information is 0 or the maximum number of merge candidates is 1.
[0024] A method for processing a video signal according to an embodiment of the present disclosure includes the steps of generating an adaptive motion vector resolution (AMVR) enabled flag (sps_amvr_enabled_flag) indicating whether adaptive motion vector differential resolution is used, generating an affine enabled flag (sps_affine_enabled_flag) indicating whether affine motion compensation is enabled, determining whether affine motion compensation is enabled based on the affine enabled flag (sps_affine_enabled_flag), and if affine motion compensation is enabled, determining whether adaptive motion vector differential resolution is used based on the AMVR enabled flag (sps_amvr_enabled_flag). The method includes the steps of: generating an affine AMVR enabled flag (sps_affine_amvr_enabled_flag) indicating whether adaptive motion vector differential resolution is available for affine motion compensation if adaptive motion vector differential resolution is used; and entropy coding the AMVR enabled flag (sps_amvr_enabled_flag), the affine enabled flag (sps_affine_enabled_flag), and the AMVR enabled flag (sps_amvr_enabled_flag) to generate a bitstream.
[0025] A method for processing a video signal according to one embodiment of the present disclosure includes the steps of generating first information (six_minus_max_num_merge_cand) regarding 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; if the second information indicates 1 and the maximum number of merge candidates is greater than 2, generating third information regarding the maximum number of merge mode candidates for the partitioned block; and entropy coding the first information (six_minus_max_num_merge_cand), the second information, and the third information to generate a bitstream on a sequence basis. Effect of the Invention
[0026] According to the embodiments of the present disclosure, the coding efficiency of the video signal is increased. [Brief description of the drawings]
[0027] [Figure 1] 1 is a schematic block diagram of a video signal encoder device according to an embodiment of the present disclosure. [Diagram 2] FIG. 2 is a schematic block diagram of a video signal decoder device according to an embodiment of the present disclosure. [Diagram 3] FIG. 2 illustrates an embodiment of the present disclosure for splitting a coding unit. [Figure 4] FIG. 4 is a diagram showing an embodiment of a method for hierarchically displaying the division structure of FIG. 3. [Diagram 5] FIG. 13 illustrates a further embodiment of the present disclosure for splitting coding units. [Figure 6] FIG. 2 illustrates a method for obtaining reference pixels for intra-screen prediction. [Figure 7] FIG. 13 is a diagram showing an example of a prediction mode used for intra-screen prediction. [Figure 8] FIG. 13 is a diagram illustrating inter prediction according to an embodiment of the present disclosure. [Figure 9]FIG. 2 illustrates a motion vector signaling method according to one embodiment of the present disclosure. [Figure 10] FIG. 1 is a diagram illustrating a motion vector difference syntax according to an embodiment of the present disclosure. [Figure 11] FIG. 1 illustrates signaling of adaptive motion vector resolution according to one embodiment of the present disclosure. [Figure 12] FIG. 1 illustrates signaling of adaptive motion vector resolution according to one embodiment of the present disclosure. [Figure 13] FIG. 1 illustrates signaling of adaptive motion vector resolution according to one embodiment of the present disclosure. [Figure 14] FIG. 1 illustrates signaling of adaptive motion vector resolution according to one embodiment of the present disclosure. [Figure 15] FIG. 1 illustrates signaling of adaptive motion vector resolution according to one embodiment of the present disclosure. [Figure 16] FIG. 1 illustrates signaling of adaptive motion vector resolution according to one embodiment of the present disclosure. [Figure 17] FIG. 13 is a diagram illustrating affine motion prediction according to one embodiment of the present disclosure. [Figure 18] FIG. 13 is a diagram illustrating affine motion prediction according to one embodiment of the present disclosure. [Figure 19] 1 is an equation showing a motion vector field according to one embodiment of the present disclosure. [Figure 20] FIG. 13 is a diagram illustrating affine motion prediction according to one embodiment of the present disclosure. [Figure 21] 1 is an equation showing a motion vector field according to one embodiment of the present disclosure. [Figure 22]FIG. 13 is a diagram illustrating affine motion prediction according to one embodiment of the present disclosure. [Diagram 23] FIG. 13 illustrates a mode of affine motion prediction according to one embodiment of the present disclosure. [Figure 24] FIG. 13 illustrates a mode of affine motion prediction according to one embodiment of the present disclosure. [Diagram 25] FIG. 1 illustrates an affine motion predictor derivation according to one embodiment of the present disclosure. [Figure 26] FIG. 1 illustrates an affine motion predictor derivation according to one embodiment of the present disclosure. [Figure 27] FIG. 1 illustrates an affine motion predictor derivation according to one embodiment of the present disclosure. [Figure 28] FIG. 1 illustrates an affine motion predictor derivation according to one embodiment of the present disclosure. [Figure 29] A diagram showing a method for generating a control point motion vector according to one embodiment of the present disclosure. [Diagram 30] FIG. 30 is a diagram showing a method of determining a motion vector difference according to the method described in FIG. 29. [Diagram 31] A diagram showing a method for generating a control point motion vector according to one embodiment of the present disclosure. [Diagram 32] FIG. 32 is a diagram showing a method of determining a motion vector difference according to the method described in FIG. 31. [Diagram 33] FIG. 1 is a diagram illustrating a motion vector difference syntax according to an embodiment of the present disclosure. [Diagram 34] A diagram showing a structure of higher level signaling according to one embodiment of the present disclosure. [Diagram 35]FIG. 2 is a diagram showing the structure of a coding unit syntax according to one embodiment of the present disclosure. [Diagram 36] A diagram showing a structure of higher level signaling according to one embodiment of the present disclosure. [Figure 37] A diagram showing a structure of higher level signaling according to one embodiment of the present disclosure. [Figure 38] FIG. 2 is a diagram showing the structure of a coding unit syntax according to one embodiment of the present disclosure. [Figure 39] A diagram showing the setting of the MVD base value according to one embodiment of the present disclosure. [Diagram 40] A diagram showing the setting of the MVD base value according to one embodiment of the present disclosure. [Diagram 41] A diagram showing the structure of syntax related to AMVR according to one embodiment of the present disclosure. [Diagram 42] FIG. 13 is a diagram showing a structure of syntax related to inter prediction according to one embodiment of the present disclosure. [Diagram 43] FIG. 13 is a diagram showing a structure of syntax related to inter prediction according to one embodiment of the present disclosure. [Diagram 44] FIG. 13 is a diagram showing a structure of syntax related to inter prediction according to one embodiment of the present disclosure. [Diagram 45] FIG. 13 is a diagram illustrating syntax related to inter prediction according to an embodiment of the present disclosure. [Diagram 46] FIG. 13 is a diagram illustrating a triangle partitioning mode according to an embodiment of the present disclosure. [Figure 47] FIG. 1 illustrates a merge data syntax according to one embodiment of the present disclosure. [Figure 48] FIG. 2 illustrates higher level signaling according to one embodiment of the present disclosure. [Figure 49] FIG. 13 is a diagram showing the maximum number of candidates used in a TPM according to an embodiment of the present disclosure. [Figure 50]FIG. 2 illustrates higher level signaling for a TPM according to one embodiment of the present disclosure. [Figure 51] FIG. 13 is a diagram showing the maximum number of candidates used in a TPM according to an embodiment of the present disclosure. [Figure 52] FIG. 2 is a diagram showing syntax elements related to a TPM according to one embodiment of the present disclosure. [Diagram 53] FIG. 13 is a diagram illustrating signaling of a TPM candidate index according to one embodiment of the present disclosure. [Figure 54] FIG. 13 is a diagram illustrating signaling of a TPM candidate index according to one embodiment of the present disclosure. [Figure 55] FIG. 13 is a diagram illustrating signaling of a TPM candidate index according to one embodiment of the present disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0028] The terms used in this specification are selected from currently widely used general terms as much as possible while taking into consideration the functions in the present invention, but this may vary depending on the intentions of the engineers in this field, customs, or the emergence of new technologies. In addition, in certain cases, the applicant may arbitrarily select terms, and in this case, the meanings of the terms will be described in the corresponding embodiment of the invention. Therefore, it is made clear that the terms used in this specification should be interpreted based on the substantial meanings of the terms and the contents of this specification as a whole, rather than simply the names of the terms.
[0029] In the present disclosure, the following terms are interpreted according to the following criteria, and even terms not described are interpreted according to the following intent. Coding may be interpreted as encoding or decoding in some cases, and information is a term including values, parameters, coefficients, elements, etc., and may be interpreted differently in some cases, so the present disclosure is not limited thereto. The term "unit" is used to mean a basic unit of image (picture) processing or a specific position in a picture, and may be used interchangeably with terms such as "block," "partition," or "region." In addition, in this specification, the term "unit" is used as a concept including coding units, prediction units, and transform units.
[0030] 1 is a schematic block diagram of a video signal encoding device according to an embodiment of the present disclosure. Referring to FIG. 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.
[0031] The transform unit 110 transforms pixel values of the input video signal to obtain transform coefficient values. For example, a discrete cosine transform (DCT) or a wavelet transform is used. In particular, the discrete cosine transform divides the input picture signal into blocks of a certain size and performs the transform. In the transform, the coding efficiency may vary depending on the distribution and characteristics of values in the transform domain.
[0032] The quantization unit 115 quantizes the transform coefficient values output from the transform unit 110. The inverse quantization unit 120 inverse quantizes the transform coefficient values, and the inverse transform unit 125 uses the inverse quantized transform coefficient values to restore the original pixel values.
[0033] The filtering unit 130 performs calculations to improve the quality of the reconstructed picture, including, for example, a deblocking filter and an adaptive loop filter, etc. The filtered picture is stored in a decoded picture buffer 156 to be output or used as a reference picture.
[0034] In order to improve coding efficiency, a method is used in which a picture signal is not coded as it is, but a picture is predicted using an already coded area in the prediction unit 150, and a residual value between the original picture and the predicted picture is added to the predicted picture to obtain a restored picture. The intra prediction unit 152 performs intra prediction within the current picture, and the inter prediction unit 154 predicts the current picture using a reference picture stored in the decoded picture buffer 156. The intra prediction unit 152 performs intra prediction from a restored area in the current picture, and transmits intra coding information to the entropy coding unit 160. The inter prediction unit 154 may further include a motion estimation unit 154a and a motion compensation unit 154b. The motion estimation unit 154a obtains a motion vector value of the current area by referring to a specific restored area. The motion estimation unit 154a transmits position information (reference frame, motion vector, etc.) of the reference area to the entropy coding unit 160 so that it can be included in the bitstream. Using the motion vector values transmitted from the motion estimation unit 154a, the motion compensation unit 154b performs inter-frame motion compensation.
[0035] The entropy coding unit 160 performs entropy coding on the quantized transform coefficients, the inter-picture coding information, the intra-picture coding information, and the reference region information input from the inter prediction unit 154 to generate a video signal bit stream. Here, the entropy coding unit 160 uses a variable length coding (VLC) scheme and an arithmetic coding scheme. The variable length coding (VLC) scheme converts input symbols into continuous code words, and the length of the code words is variable. For example, frequently occurring symbols are represented by short code words, and infrequently occurring symbols are represented by long code words. As the variable length coding scheme, a context-based adaptive variable length coding (CAVLC) scheme is used. The arithmetic coding converts continuous data symbols into one prime number, and the arithmetic coding obtains optimal prime number bits required to represent each symbol. As the arithmetic coding, a context-based adaptive binary arithmetic coding (CABAC) scheme is used.
[0036] The generated bitstream is encapsulated in a basic unit of Network Abstraction Layer (NAL) units. An NAL unit includes coded slice segments, and each slice segment is made up of an integer number of coding tree units. In order for a video decoder to decode the bitstream, the bitstream must first be separated into NAL units, and then each separated NAL unit must be decoded.
[0037] 2 is a schematic block diagram of a video signal decoding device 200 according to an embodiment of the present disclosure. Referring to FIG. 2, the decoding device 200 of the present disclosure mainly 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.
[0038] The entropy decoding unit 210 entropy decodes the video signal bitstream to extract transformation coefficients for each region, motion information, etc. The inverse quantization unit 220 inverse quantizes the entropy decoded transformation coefficients, and the inverse transform unit 225 restores original pixel values using the inverse quantized transformation coefficients.
[0039] Meanwhile, the filtering unit 230 performs filtering on the picture to improve image quality, including a deblocking filter for reducing block distortion and / or an adaptive loop filter for removing distortion of the entire picture, etc. The filtered picture is output or stored in a decoded picture buffer 256 to be used as a reference picture for the next frame.
[0040] In addition, 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 coding type, transform coefficients for each region, motion information, etc. decoded via the above-mentioned entropy decoding unit 210.
[0041] In this regard, the intra prediction unit 252 performs intra prediction from decoded samples in the current picture. The inter prediction unit 254 generates a predicted picture using reference pictures and motion information stored in a composite picture buffer 256. The inter prediction unit 254 further includes a motion estimation unit 254a and a motion compensation unit 254b. The motion estimation unit 254a obtains a motion vector indicating a positional relationship between the current block and a reference block of a reference picture used for coding, and transmits the motion vector to the motion compensation unit 254b.
[0042] The predicted value output from the intra-prediction unit 252 or the inter-prediction unit 254 and the pixel value output from the inverse transform unit 225 are added together to generate a reconstructed video frame.
[0043] Hereinafter, a method of dividing a coding unit and a prediction unit in the operation of the encoding apparatus 100 and the decoding apparatus 200 will be described with reference to FIGS.
[0044] A coding unit refers to a basic unit for processing a picture in the above-mentioned video signal processing process, for example, intra / inter prediction, transform, quantization, and / or entropy coding. The size of a coding unit used to code one picture is not fixed. A coding unit has a rectangular shape, and one coding unit is further divided into several coding units.
[0045] 3 is a diagram illustrating an embodiment of the present disclosure for dividing a coding unit. For example, one coding unit having a size of 2N×2N is further divided into four coding units having a size of N×N. The division of the coding units is performed recursively, but it is not necessary that all coding units are divided in the same manner. However, for convenience in the coding and processing process, there may be restrictions on the maximum coding unit size and / or the minimum coding unit size.
[0046] For one coding unit, information indicating whether the coding unit is divided or not is stored. FIG. 4 is a diagram showing an embodiment of a method for hierarchically indicating the division structure of the coding unit shown in FIG. 3 using Bragg values. The information indicating whether the coding unit is divided or not is assigned a value of "1" if the corresponding unit is divided, and a value of "0" if it is not divided. As shown in FIG. 4, if the flag value indicating whether or not the coding unit is divided is 1, the coding unit corresponding to the corresponding node is further divided into four coding units, and if it is 0, the coding unit is not further divided and the processing process for the corresponding coding unit is performed.
[0047] The coding unit structure described above is represented using a recursive tree structure. That is, with one picture or a coding unit of maximum size as the root, the coding units that are divided into other coding units have child nodes equal to the number of divided coding units. Thus, coding units that are not further divided become leaf nodes. Assuming that only square division is possible for one coding unit, one coding unit is divided into a maximum of four other coding units, so the tree representing the coding units is in the form of a quad tree.
[0048] In the encoder, an optimal coding unit size is selected according to the characteristics of the video picture (e.g., resolution) or in consideration of coding efficiency, and information about the optimal coding unit size or information for guiding the optimal coding unit size is included in the bitstream. For example, the maximum coding unit size and the maximum tree depth are defined. When performing square division, the height and width of a coding unit are half the height and width of the coding unit of the parent node, so the minimum coding unit size can be obtained by using the above information. Conversely, the minimum coding unit size and the maximum tree depth can be defined and used in advance, and the maximum coding unit size can be induced and used by using the previously defined size. In square division, the unit size changes to a multiple of 2, so the actual coding unit size can be expressed as a logarithmic value with base 2 to improve transmission efficiency.
[0049] The decoder obtains information indicating whether the current coding unit is divided. If such information is obtained (transmitted) only under certain conditions, efficiency can be improved. For example, the current coding unit can be divided when the size of the current coding unit plus the current position is smaller than the picture size and the size of the current unit is larger than the size of the minimum coding unit set in advance. Therefore, only in this case, the decoder can obtain information indicating whether the current coding unit is divided.
[0050] If the information indicates that the coding unit is divided, the size of the divided coding units is half of the current coding unit, and the coding unit is divided into four square coding units based on the current processing position. The above process is repeated for each of the divided coding units.
[0051] 5 illustrates a further embodiment of the present disclosure for splitting a coding unit. According to a further embodiment of the present disclosure, the above-mentioned quad-tree-like coding unit is further split into a binary tree structure with horizontal or vertical splitting. That is, a square quad-tree split is first applied to the root coding unit, and a rectangular binary tree split is further applied at the leaf nodes of the quad-tree. According to one embodiment, the binary tree split is a symmetric horizontal split or a symmetric vertical split, but the present disclosure is not limited thereto.
[0052] At each split node of the binary tree, a flag is further signaled indicating the type of split (i.e., horizontal or vertical split). According to one embodiment, a flag value of '0' indicates a horizontal split, and a flag value of '1' indicates a vertical split.
[0053] However, in the embodiments of the present disclosure, the method of dividing the coding unit is not limited to the above-mentioned method, and asymmetric horizontal / vertical division, a triple tree divided into three rectangular coding units, etc. may also be applied.
[0054] Picture prediction (motion compensation) for coding is performed on coding units that cannot be further divided (i.e., leaf nodes of a coding unit tree). The basic unit for performing such prediction is hereinafter referred to as a prediction unit or a prediction block.
[0055] Hereinafter, the term "unit" used in this specification is used as an alternative term to the prediction unit, which is a basic unit for performing prediction. However, the present disclosure is not limited thereto, and in a broader sense, the term "unit" is understood as a concept including the coding unit.
[0056] To restore the current unit to be decoded, the current picture including the current unit or a decoded part of another picture is used. A picture (slice) that uses only the current picture for restoration, i.e., performs only intra-frame prediction, is called an intra picture or I picture (slice), and a picture (slice) that can perform both intra-frame prediction and inter-frame prediction is called an inter picture (slice). Among inter pictures (slices), a picture (slice) that uses up to one motion vector and reference index to predict each unit is called a predictive picture or P picture (slice), and a picture (slice) that uses up to two motion vectors and reference indexes is called a bi-predictive picture or B picture (slice).
[0057] The intra prediction unit performs intra prediction, which predicts pixel values of a target unit from a restored area in a current picture. For example, the pixel values of the current unit are predicted from restored pixels of units located to the left and / or top of the current unit. In this case, the units located to the left of the current unit include the left unit, the top left unit, and the bottom left unit adjacent to the current unit. In addition, the units located to the top of the current unit include the top unit, the top left unit, and the top right unit adjacent to the current unit.
[0058] Meanwhile, the inter prediction unit performs inter prediction, which predicts pixel values of a target unit using information of a restored picture other than the current picture. In this case, a picture used for prediction is called a reference picture. In the inter prediction process, which reference area is used to predict the current unit is indicated using an index indicating a reference picture including the reference area, motion vector information, etc.
[0059] Inter-prediction includes L0 prediction, L1 prediction, and bi-prediction. L0 prediction is prediction using one reference picture included in L0 (0th reference picture list), and L1 prediction is prediction using one reference picture included in L1 (1st reference picture list). For this purpose, one set of motion information (e.g., motion vector and reference picture index) is required. In the bi-prediction method, up to two reference regions are used, and these two reference regions may exist in the same reference picture or may exist in different pictures. That is, in the bi-prediction method, up to two sets of motion information (e.g., motion vector and reference picture index) are used, and the two motion vectors may correspond to the same reference picture index or may correspond to different reference picture indexes. In this case, the reference picture is displayed (or output) both before and after the current picture in terms of time.
[0060] A reference unit of the current unit is obtained using the motion vector and the reference picture index. The reference unit exists in a reference picture having a reference picture index. In addition, a pixel value or an interpolated value of the unit specified by the motion vector is used as a predictor of the current unit. For motion prediction with pixel accuracy in sub-pel units, for example, an 8-tab interpolation filter is used for a luminance signal, and a 4-tab interpolation filter is used for a chrominance signal. However, the interpolation filter for sub-pel unit motion prediction is not limited thereto. In this way, motion compensation is performed to predict the texture of the current unit from a previously decoded picture using motion information.
[0061] Hereinafter, the intra prediction method according to the embodiment of the present disclosure will be described in more detail with reference to Figures 6 and 7. As described above, the intra prediction unit predicts pixel values of a current unit using adjacent pixels located to the left and / or top of the current unit as reference pixels.
[0062] As shown in FIG. 6, if the size of the current unit is N×N, the reference pixels are set using adjacent pixels of up to 4N+1 children located to the left and / or top of the current unit. If at least some adjacent pixels used as reference pixels have not yet been restored, the intra prediction unit performs a reference sample padding process according to a preset rule to obtain reference pixels. In addition, the intra prediction unit performs a reference sample filtering process to reduce an error in intra prediction. That is, the reference pixels are obtained by filtering adjacent pixels and / or pixels obtained by the reference sample padding process. The intra prediction unit predicts pixels of the current unit using the reference pixels obtained in this manner.
[0063] 7 is a diagram illustrating an example of a prediction mode used for intra prediction. For intra prediction, intra prediction mode information indicating an intra prediction direction is signaled. If the current unit is an intra prediction unit, the video signal decoding device extracts intra prediction mode information of the current unit from a bitstream. An intra prediction unit of the video signal decoding device performs intra prediction on the current unit based on the extracted intra prediction mode information.
[0064] According to an embodiment of the present disclosure, the intra prediction mode includes a total of 67 modes. Each intra prediction mode is indicated by a preset index (i.e., intra mode index). For example, as shown in FIG. 7, intra mode index 0 indicates a planar mode, intra mode index 1 indicates a DC mode, and intra mode indexes 2 to 66 indicate different direction modes (i.e., angle modes). The intra prediction unit determines reference pixels and / or interpolated reference pixels to be used for intra prediction of the current unit based on intra prediction mode information of the current unit. If the intra mode index indicates a specific direction mode, reference pixels or interpolated reference pixels corresponding to the specific direction from the current pixel of the current unit are used for predicting the current pixel. Thus, different sets of reference pixels and / or interpolated reference pixels are used for intra prediction according to the intra prediction mode.
[0065] After intra-prediction of the current block is performed using the reference pixels and intra-prediction mode information, the video signal decoding device adds the residual signal of the current unit obtained from the inverse transform unit to the intra-prediction value of the current unit to restore the pixel value of the current unit.
[0066] FIG. 8 is a diagram illustrating inter prediction according to one embodiment of the present disclosure. As described above, when encoding and decoding a current picture or block, it is predicted from other pictures or blocks. That is, it can be encoded and decoded based on similarity with other pictures or blocks. It can be encoded and decoded with signaling that omits parts of the current picture or block that are similar to other pictures or blocks, which will be described further below. It can perform block-based prediction.
[0067] Referring to FIG. 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 is predicted using similarity with the reference picture or a part of the reference picture. If the solid-lined rectangle in the current picture in FIG. 8 is a block to be currently encoded or decoded, the current block is predicted from the dotted-lined rectangle in the reference picture. At this time, there is information indicating a block (reference block) to be referenced by the current block, which may be directly signaled or may be created according to a certain rule to reduce signaling overhead. The information indicating a block to be referenced by the current block includes a motion vector, which is a vector indicating the relative position between the current block and the reference block in a picture. Referring to FIG. 8, there is a dotted-lined portion of the reference picture, and the motion vector is a vector indicating how the current block should move to move to the block to be referenced in the reference picture. In other words, the block that results when the current block is moved according to the motion vector is the part shown by the dotted line in the current picture in Figure 8, and the position of this part shown by the dotted line in the current picture is the same as the position of the reference block in the reference picture.
[0068] In addition, the information indicating a block to be referenced by the current block includes information indicating a reference picture. The information indicating the reference picture includes a reference picture list and a reference picture index. The reference picture list is a list including reference pictures, and a reference block can be used from a reference picture included in the reference picture list. That is, the current block can be predicted from a reference picture included in the reference picture list. In addition, the reference picture index is an index for indicating a reference picture to be used.
[0069] FIG. 9 is a diagram illustrating a motion vector signaling method according to one embodiment of the present disclosure. According to an embodiment of the present disclosure, a motion vector (MV) is generated based on a motion vector predictor (MVP). For example, the motion vector predictor is the motion vector as follows:
[0070] MV=MVP. Another example is that the motion vector is based on the motion vector difference (MVD), e.g., as shown below. To provide the motion vector predictor with the exact motion vector, we add the motion vector difference (MVD).
[0071] MV=MVP+MVD. In video coding, motion vector information determined by an encoder is transmitted to a decoder, and the decoder generates a motion vector from the received motion vector information to determine a prediction block. For example, the motion vector information includes information about a motion vector predictor and a motion vector difference. In this case, components of the motion vector information may differ depending on the mode. For example, in a merge mode, the motion vector information includes information about a motion vector predictor, but does not include a motion vector difference. As another example, in an advanced motion vector prediction (AMVP) mode, the motion vector information includes information about a motion vector predictor and includes a motion vector difference.
[0072] In order to determine, transmit, and receive information about a motion vector predictor, the encoder and the decoder generate MVP candidates in the same manner. For example, the encoder and the decoder generate the same MVP candidates in the same order. Then, the encoder transmits an index (mvp_lx_flag) indicating an MVP determined from the generated MVP candidates to the decoder, and the decoder determines the determined MVP and MV based on the index (mvp_lx_flag). The index (mvp_lx_flag) includes a motion vector predictor index (mvp_l0_flag) of the 0th reference picture list (list 0) and a motion vector predictor index (mvp_l1_flag) of the 1st reference picture list (list 1). A method of receiving the index (mvp_lx_flag) will be described in Figures 56 to 59.
[0073] The MVP candidate and the method of generating the MVP candidate include a spatial candidate, a temporal candidate, etc. The spatial candidate is a motion vector for a block at a certain position from the current block. For example, it is a motion vector corresponding to a block or position adjacent or not adjacent to the current block. The temporal candidate is a motion vector corresponding to a block in a picture different from the current block. Alternatively, the MVP candidate includes an affine motion vector, an ATMVP, an STMVP, a combination of the above-mentioned motion vectors, an average vector of the above-mentioned motion vectors, a zero motion vector, etc.
[0074] In addition, information indicating the above-mentioned reference picture is also transmitted from the encoder to the decoder. In addition, if the reference picture corresponding to the MVP candidate does not correspond to the information indicating the reference picture, motion vector scaling is performed. Motion vector scaling is a calculation based on the POC (picture order count) 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 MVP candidate.
[0075] FIG. 10 is a diagram illustrating a motion vector difference syntax according to one embodiment of the present disclosure.
[0076] The motion vector difference is coded by separating the sign and absolute value of the motion vector difference. That is, the sign and absolute value of the motion vector difference are different syntaxes. The absolute value of the motion vector difference may be coded directly or may be coded including a flag indicating whether the absolute value is greater than N as shown in FIG. 10. If the absolute value is greater than N, the value of (absolute-N) is also signaled. In the example of FIG. 10, abs_mvd_greater0_flag is transmitted, which is a flag indicating whether the absolute value is greater than 0. If abs_mvd_greater0_flag is indicated when the absolute value is not greater than 0, it is determined that the absolute value is 0. If abs_mvd_greater0_flag is indicated when the absolute value is greater than 0, an additional syntax may exist. For example, abs_mvd_greater1_flag exists, which indicates whether the absolute value is greater than 1. If abs_mvd_greater1_flag is indicated when the absolute value is not greater than 1, it is determined that the absolute value is 1. If abs_mvd_greater1_flag is indicated when the absolute value is greater than 1, additional syntax may exist. For example, abs_mvd_minus2 exists, which has a value of (absolute value-2). It indicates (absolute value-2) because it has been determined that the absolute value is greater than 1 (2 or more) through the abs_mvd_greater0_flag and abs_mvd_greater1_flag mentioned above.This is because when abs_mvd_minus2 is binarized to a variable length, signaling is performed with fewer bits. For example, there are binarization methods with variable lengths such as Exp-Golomb, truncated unary, and truncated Rice. Also, mvd_sign_flag is a flag indicating the sign of the motion vector difference.
[0077] In this embodiment, the coding method has been described using the motion vector difference, but information other than the motion vector difference can also be divided into a sign and an absolute value, and the absolute value can be coded into a flag indicating whether the absolute value is greater than a certain value, and a value obtained by subtracting the certain value from the absolute value. Also, in Figure 10, [0] and [1] indicate component indexes. For example, they indicate the x-component and the y-component.
[0078] FIG. 11 is a diagram illustrating adaptive motion vector resolution signaling according to one embodiment of the present disclosure. According to an embodiment of the present disclosure, the resolution indicating a motion vector or a motion vector difference is various. In other words, the resolution at which a motion vector or a motion vector difference is coded is various. For example, the resolution is indicated based on pixels (pels). For example, a motion vector or a motion vector difference is signaled in units of 1 / 4 (quarter), 1 / 2 (half), 1 (integer), 2, 4 pixels, etc. For example, when it is desired to indicate 16, in units of 1 / 4, it is coded as 64 (1 / 4*64=16), in units of 1, it is coded as 16 (1*16=16), and in units of 4, it is coded as 4 (4*4=16). In other words, the values are defined as follows:
[0079] valueDetermined=resolution*valuePerResolution
[0080] Here, valueDetermined is a value to be transmitted, which is a motion vector or a motion vector difference in this embodiment, and valuePerResolution is a value indicating valueDetermined in [ / resolution] units. In this case, if the value signaled by the motion vector or motion vector difference is not divisible by the resolution, an inaccurate value other than the motion vector or motion vector difference with the best prediction performance is sent due to rounding, etc. Using high reolution reduces the inaccuracy but uses more bits since the coded value is large, and using low reolution increases the inaccuracy but uses fewer bits since the coded value is small.
[0081] In addition, the resolution can be set differently for each unit such as block, CU, slice, etc. Therefore, the resolution can be adaptively applied according to the unit.
[0082] The resolution is signaled from the encoder to the decoder. In this case, the signaling for the resolution is binarized to the variable length as described above. In this case, if the signaling is performed using an index corresponding to the smallest value (the value located at the front), the signaling overhead can be reduced.
[0083] In one embodiment, the signaling index is matched from high resolution (detailed signaling) to low resolution.
[0084] Figure 11 shows signaling for three resolutions. In this case, the three signalings are 0, 10, and 11, which correspond to resolution 1, resolution 2, and resolution 3, respectively. There is less signaling overhead when signaling resolution 1, since one bit is required to signal resolution 1 and two bits are required to signal the remaining resolutions. In the example of Figure 11, resolution 1, resolution 2, and resolution 3 are 1 / 4, 1, and 4 pels, respectively.
[0085] In the following disclosure, motion vector resolution means the resolution of motion vector difference.
[0086] FIG. 12 is a diagram illustrating signaling of adaptive motion vector resolution according to one embodiment of the present disclosure.
[0087] As described in FIG. 11, the number of bits required to signal a resolution may vary depending on the resolution, so the signaling method is changed depending on the situation. For example, the signaling value for signaling a certain resolution may vary depending on the situation. For example, the signaling index and the 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, and may be in another order other than resolution 1, resolution 2, resolution 3, ... in another situation. Also, more than two situations may be defined. Referring to FIG. 12, the resolutions corresponding to 0, 10, and 11 are resolution 1, resolution 2, and resolution 3, respectively, in Case 1, and resolution 2, resolution 1, and resolution 3, respectively, in Case 2. In this case, there are two or more cases.
[0088] FIG. 13 is a diagram illustrating signaling of adaptive motion vector resolution according to one embodiment of the present disclosure.
[0089] As explained in Figure 12, the motion vector resolution is signaled differently depending on the situation. For example, if there are resolutions of 1 / 4, 1, and 4 pel, in some situations the signaling as explained in Figure 11 is used, and in other situations the signaling as shown in Figure 13(a) or Figure 13(b) is used. Only two cases of Figure 11, Figure 13(a), and Figure 13(b) may exist, or all three may exist. Therefore, in some situations, a resolution that is not the highest resolution can be signaled with fewer bits.
[0090] FIG. 14 is a diagram illustrating signaling of adaptive motion vector resolution according to one embodiment of the present disclosure.
[0091] According to an embodiment of the present disclosure, in the adaptive motion vector resolution described in FIG. 11, the available resolution may change depending on the situation. For example, the resolution value may change depending on the situation. As an example, in one situation, one of resolution 1, resolution 2, resolution 3, resolution 4, ... is used, and in another situation, one of resolution A, resolution B, resolution C, resolution D, ... is used. Also, {resolution 1, resolution 2, resolution 3, resolution 4, ...} and {resolution A, resolution B, resolution C, resolution D, ...} may have an intersection set rather than an empty set. That is, a certain resolution value is used in two or more situations, but the two or more situations may have different sets of available resolution values. Also, the number of available resolution values may differ depending on the situation.
[0092] Referring to Figure 14, resolution 1, resolution 2, and resolution 3 are used in Case 1, and resolution A, resolution B, and resolution C are used in Case 2. For example, resolution 1, resolution 2, and resolution 3 are 1 / 4, 1, and 4 pel, respectively. Also, for example, resolution A, resolution B, and resolution C are 1 / 4, 1 / 2, and 1 pel, respectively.
[0093] FIG. 15 is a diagram illustrating signaling of adaptive motion vector resolution according to one embodiment of the present disclosure.
[0094] Referring to Fig. 15, the resolution signaling is made different depending on the motion vector candidate or the motion vector predictor candidate. For example, the case described in Fig. 12 to Fig. 14 is selected, and the signaled motion vector or motion vector predictor is which candidate. The method of making the signaling different is according to the method in Fig. 12 to Fig. 14.
[0095] For example, define different situations depending on the position of the candidate, or define different situations depending on how the candidate was created.
[0096] An encoder or decoder generates a candidate list including at least one MV candidate or at least one MVP candidate. The MVP (motion vector predictor) at the front of the candidate list for the MV candidate or MVP candidate tends to have high accuracy, and the MVP (motion vector predictor) at the back of the candidate list tends to have low accuracy. This may be because 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 may be designed to have higher accuracy. In one embodiment of the present disclosure, if the accuracy of the MVP (motion vector predictor) is high, the MVD (motion vector difference) value for indicating a motion vector with good prediction performance is small, and if the accuracy of the MVP (motion vector predictor) is low, the MVD (motion vector difference) value for indicating a motion vector with good prediction performance is large. Therefore, if the accuracy of the MVP (motion vector predictor) is low, it is possible to signal at a low resolution and reduce the bits required to represent the motion vector difference value (e.g., the value that represents the difference value based on the resolution).
[0097] According to this principle, low resolution can be used when the accuracy of the MVP (motion vector predictor) is low, so that according to an embodiment of the present disclosure, it is possible to promise that the resolution is signaled with the fewest bits, not the highest resolution, depending on the MVP candidate (motion vector predictor candidate). For example, if 1 / 4, 1, and 4pel are possible resolutions, 1 or 4 is signaled with the fewest bits (1-bit). With reference to FIG. 15, 1 / 4pel, which is high resolution, is signaled with the fewest bits for Candidate 1 and Candidate 2, and a resolution other than 1 / 4pel is signaled with the fewest bits for Candidate N, which is behind Candidate 1 and Candidate 2.
[0098] FIG. 16 is a diagram illustrating signaling of adaptive motion vector resolution according to one embodiment of the present disclosure.
[0099] As explained in Fig. 15, the motion vector resolution is made different depending on which candidate the determined motion vector or motion vector predictor is. The method of making the signaling different is according to the method of Fig. 12 to Fig. 14.
[0100] Referring to FIG. 16, for some candidates, high resolution is signaled with the fewest bits, and for some candidates, resolution that is not high resolution is signaled with the fewest bits. For example, a candidate that signals resolution that is not high resolution with the fewest bits is an inaccurate candidate. For example, candidates that signal high resolution with the fewest bits are temporal candidates, zero motion vectors, non-adjacent spatial candidates, and candidates depending on whether or not there is a refinement process.
[0101] A temporal candidate is a motion vector from another picture. A zero motion vector is a motion vector whose vector components are all 0. A non-adjacent spatial candidate is a motion vector referenced from a position that is not adjacent to the current block. The refinement process is a process of refining a motion vector predictor, for example, through template matching, bilateral matching, etc.
[0102] According to an embodiment of the present disclosure, after refining the motion vector predictor, the motion vector difference is added. This is to make the motion vector predictor more accurate and reduce the motion vector difference value. In this case, the motion vector resolution signaling is made different for candidates that have not undergone the refinement process. For example, a resolution that is not the highest resolution is signaled with the fewest bits.
[0103] According to another embodiment, a refinement process is performed after adding a motion vector difference to a motion vector predictor. In this case, the motion vector resolution signaling is made different for candidates that undergo a refinement process. For example, a resolution that is not the highest resolution is signaled with the fewest bits. This is because, since the refinement process is performed after adding a motion vector difference, it is possible to reduce errors through the refinement process without signaling the MV difference as accurately as possible (to reduce prediction errors).
[0104] As another example, if the selected candidate differs from other candidates by a certain value or more, the motion vector resolution signaling is changed.
[0105] As another example, the motion vector refinement process is performed differently depending on which candidate the determined motion vector or motion vector predictor is. The motion vector refinement process is a process for finding a more accurate motion vector. For example, it is a process for finding a block matching with the current block according to a predetermined rule from a reference point (for example, template matching or bilateral matching). The reference point is a position corresponding to the determined motion vector or motion vector predictor. In this case, the degree of movement from the reference point may differ according to the predetermined rule, and performing different motion vector refinement processes means that the degree of movement from the reference point is different. For example, a detailed refinement process is performed for an accurate candidate, and a less detailed refinement process is performed for an inaccurate candidate. Whether a candidate is accurate or inaccurate is determined by its position in a candidate list, or by the method by which the candidate is generated. The method by which a candidate is generated is determined by the position from which the spatial candidate is brought. For more information, see the explanation of FIG. 16. A more detailed and less detailed refinement is whether a matching block is found by moving it little by little from a reference point, or by moving it a lot. In the case of finding a matching block by moving it a lot, a process of finding the matching block by moving it little by little from the most matching block found by moving it a lot is added.
[0106] In yet another embodiment, the motion vector resolution signaling is changed based on the POC of the current picture and the POC of the reference picture of the motion vector or the motion vector predictor candidate. The method of differentiating the signaling is according to the method of FIG.
[0107] For example, if there is a large 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, the motion vector or motion vector predictor may be inaccurate, and a resolution that is not high resolution is signaled with the fewest bits.
[0108] As another example, the motion vector resolution signaling is changed depending on whether motion vector scaling should be performed. For example, if the selected motion vector or motion vector predictor is a candidate for motion vector scaling, a resolution other than high resolution is signaled with the fewest bits. Motion vector scaling is performed when the reference picture for the current block and the reference picture of the referenced candidate are different.
[0109] FIG. 17 is a diagram illustrating affine motion prediction according to one embodiment of the present disclosure.
[0110] In the conventional prediction method as described in FIG. 8, the current block is predicted from a block from a position to which it has simply been moved without rotation or scaling. It is predicted from a reference block of the same size, shape, and angle as the current block. FIG. 8 is simply a translation motion model. However, content contained in real video has more complex motion, and prediction performance can be further improved by predicting from various patterns.
[0111] Referring to FIG. 17, a block to be currently predicted is shown in a solid line in the current picture. The current block is predicted by referring to a block having a different shape, size, and angle from the block to be currently predicted, and the reference block is shown in a dotted line in the reference picture. The same position as the position of the reference block in the picture is shown in a dotted line in the current picture. In this case, the reference block is a block that is indicated by affine transformation to the current block. This can indicate stretching (scaling), rotation, shearing, reflection, orthogonal projection, etc.
[0112] The number of parameters that indicate affine motion and affine transformation varies. Using more parameters can indicate more diverse motions than using fewer parameters, but it may cause overhead in signaling and calculation.
[0113] For example, an affine transformation can be described by six parameters, or an affine transformation can be described by three control point motion vectors.
[0114] FIG. 18 is a diagram illustrating affine motion prediction according to one embodiment of the present disclosure.
[0115] As shown in Figure 17, complex motion can be expressed using affine transformation, but to reduce the signaling overhead and calculation required, simpler affine motion prediction or affine transformation is used. Simpler affine motion prediction can be performed by constraining the motion. When the motion is constrained, the shape in which the current block is transformed into the reference block is restricted.
[0116] Referring to FIG. 18, affine motion prediction is performed using control point motion vectors v0 and v1. Using two vectors v0 and v1 is the same as using four parameters. The two vectors v0 and v1 or four parameters indicate the shape of the reference block from which the current block is predicted. Using this simple affine transformation, the rotation and scaling (zoom in / out) movements of the block can be indicated. Referring to FIG. 18, the current block shown by the solid line is predicted from the position shown by the dotted line in FIG. 18 in the reference picture. Each point (pixel) of the current block is mapped to another point through the affine transformation.
[0117] FIG. 19 is an equation showing a motion vector field according to an embodiment of the present disclosure. The control point motion vector v0 in FIG. 18 is (v_0x, v_0y), which is the motion vector of the top-left corner control point. Also, the control point motion vector v1 is (v_1x, v_1y), which is the motion vector of the top-right corner control point. In this case, the motion vector (v_x, v_y) at the (x, y) position is as shown in FIG. 19. Therefore, the motion vector for each pixel position or a certain position is estimated according to the equation in FIG. 19, which is based on v0 and v1.
[0118] In addition, in the formula in Fig. 19, (x, y) is a relative coordinate within a block. For example, (x, y) is a position when the left top position of a block is (0, 0).
[0119] If v0 is a control point motion vector for position (x0, y0) on the picture, and v1 is a control point motion vector for position (x1, y1) on the picture, then to express the position (x, y) in a block using the same coordinates as the positions of v0 and v1, change x and y to (x-x0, y-y0) in the formula in Figure 19, respectively, and w (the width of the block) is (x1-x0).
[0120] FIG. 20 is a diagram illustrating affine motion prediction according to one embodiment of the present disclosure.
[0121] According to one embodiment of the present disclosure, multiple control point motion vectors or multiple parameters are used to indicate affine motion.
[0122] Referring to FIG. 20, affine motion prediction is performed using control point motion vectors v0, v1, and v2. Using three vectors v0, v1, and v2 is the same as using six parameters. The three vectors v0, v1, and v2 or six parameters indicate the shape of the reference block from which the current block is predicted. Referring to FIG. 20, the current block shown by the solid line is predicted from the position shown by the dotted line in FIG. 20 in the reference picture. Each point (pixel) of the current block is mapped to another point through affine transformation.
[0123] FIG. 21 is an equation showing a motion vector field according to an embodiment of the present disclosure. In FIG. 20, the control point motion vector v0 is (mv_0^x, mv_0^y), which is the motion vector of the top-left corner control point, the control point motion vector v1 is (mv_1^x, mv_1^y), which is the motion vector of the top-right corner control point, and the control point motion vector v2 is (mv_2^x, mv_2^y), which is the motion vector of the bottom-left corner control point. In this case, the motion vector (mv^x, mv^y) at the (x, y) position is as shown in FIG. 21. Therefore, the motion vector for each pixel position or a certain position is estimated according to the equation in FIG. 21, which is based on v0, v1, and v2.
[0124] In addition, in the formula in FIG. 21, (x, y) is a relative coordinate within a block. For example, (x, y) is a position when the left top position of a block is (0, 0). Therefore, if v0 is a control point motion vector for position (x0, y0), v1 is a control point motion vector for position (x1, y1), and v2 is a control point motion vector for position (x2, y2), and (x, y) is expressed using the same coordinates as the positions of v0, v1, and v2, x and y in the formula in FIG. 21 are changed to (x-x0, y-y0), respectively. In addition, w (width of block) is (x1-x0), and h (height of block) is (y2-y0).
[0125] FIG. 22 is a diagram illustrating affine motion prediction according to one embodiment of the present disclosure.
[0126] As described above, a motion vector field exists and a motion vector is calculated for each pixel, but to make it easier, affine transformation is performed on a subblock basis as shown in FIG. 22. For example, the small square in FIG. 22(a) is a subblock, and a representative motion vector is created for the subblock, and the representative motion vector is used for the pixels of the subblock. Also, as in FIG. 17, FIG. 18, FIG. 20, etc., complex motions are expressed, and the subblock can represent such motion and correspond to the reference block, or it can be made easier by applying only translation motion to the subblock. In FIG. 22(a), v0, v1, and v2 are control point motion vectors.
[0127] In this case, the size of a subblock is M*N, where M and N are as shown in FIG. 22(b). And, MvPre is the motion fraction accuracy. And, (v_0x,v_0y), (v_1x,v_1y), (v_2x,v_2y) are the motion vectors of the top-left, top-right, and bottom-left control points, respectively. (v_2x,v_2y) is the motion vector of the bottom-left control point of the current block, and for example, in the case of 4-parameter, it is the MV (motion vector) for bottom-left calculated by the formula in FIG. 19.
[0128] In addition, when creating a representative motion vector for a subblock, the representative motion vector is calculated using the sample position at the center of the subblock. In addition, when creating a motion vector for a subblock, a motion vector with higher accuracy than a normal motion vector is used, and motion compensation interpolation filters are applied to achieve this.
[0129] In another embodiment, the size of a subblock may not be variable but may be fixed to a specific size, for example, 4*4 size.
[0130] FIG. 23 is a diagram illustrating a mode of affine motion prediction according to one embodiment of the present disclosure.
[0131] According to an embodiment of the present disclosure, an example of affine motion prediction is affine inter mode. There is a flag that indicates affine inter mode. Referring to FIG. 23, there are blocks at positions A, B, C, D, and E near v0 and v1, and the motion vectors corresponding to each block are vA, vB, vC, vD, and vE. Using this, a candidate list for the motion vector or motion vector predictor is created as follows.
[0132] {(v0,v1)|v0={vA,vB,vC}, v1={vD,vE}} That is, a (v0, v1) pair is created with v0 selected from vA, vB, and vC, and v1 selected from vD and vE. At this time, the motion vector is scaled by the POC (picture order count) of the reference of the neighbor block, the POC of the reference for the current CU (current coding unit; current block), and the POC of the current CU (current coding unit; current block). When a candidate list is created with the motion vector pair as described above, it is possible to signal which of the candidate list has been selected or has been selected. Also, if the candidate list is not sufficiently filled, it can be filled with other inter prediction candidates. For example, it may be filled by utilizing AMVP (Advanced Motion Vector Prediction) candidates. Also, instead of immediately using v0 and v1 selected from the candidate list as the control point motion vector for affine motion prediction, it is possible to signal a difference to correct for them, thereby creating a better control point motion vector. In other words, the decoder adds the difference to v0 and v1 selected from the candidate list, and uses v0' and v1' created as the control point motion vector for affine motion prediction.
[0133] As an example, an affine inter mode may be used for coding units (CUs) that are equal to or larger than a certain size.
[0134] FIG. 24 is a diagram illustrating a mode of affine motion prediction according to one embodiment of the present disclosure.
[0135] According to an embodiment of the present disclosure, an example of affine motion prediction is affine merge mode. There is a flag that indicates affine merge mode. In affine merge mode, when affine motion prediction is used around the current block, the control point motion vector of the current block is calculated from the motion vector of the surrounding block. For example, when checking whether the surrounding block uses affine motion prediction, the candidate surrounding blocks are as shown in FIG. 24(a). In addition, it is checked whether affine motion prediction is used in the order of A, B, C, D, and E, and if a block using affine motion prediction is found, the control point motion vector of the current block is calculated using the motion vector of that block or the block around it. A, B, C, D, and E are left, above, above right, left bottom, and above left, respectively, as shown in Figure 24(a).
[0136] As an example, when the block at position A uses affine motion prediction as shown in FIG. 24(b), v0 and v1 are calculated using the motion vector of the block or its surroundings. The motion vectors of the block or its surroundings are v2, v3, and v4.
[0137] In one embodiment, the order of the neighboring blocks to be referenced is determined. However, a control point motion vector derived from a specific position does not always have better performance. Therefore, in another embodiment, a block at a certain position is referenced to signal whether to derive a control point motion vector. For example, the candidate positions of the control point motion vector derivation are determined in the order of A, B, C, D, and E in FIG. 24(a), and which of them is to be referenced is signaled.
[0138] In another embodiment, when deriving a control point motion vector, the control point motion vector can be derived from a block close to the control point motion vector to improve accuracy. For example, referring to FIG. 24, the left block is referenced when deriving v0, and the above block is 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.
[0139] FIG. 25 is a diagram illustrating affine motion predictor derivation according to one embodiment of the present disclosure.
[0140] For affine motion prediction, control point motion vectors are required, and based on the control point motion vectors, a motion vector field, i.e., a motion vector for a subblock or a certain position, is calculated. The control point motion vector is also called a seed vector.
[0141] In this case, the control point MV is based on the predictor. For example, the predictor can be the control point MV. As another example, the control point MV may be calculated based on the predictor and the difference. In detail, the control point MV is calculated by adding or subtracting the difference from the predictor.
[0142] In this case, in the process of creating a predictor for a control point MV, it is derived from control point MVs or MVs of surrounding blocks that have undergone affine motion prediction (affine motion compensation (MC)). For example, if a block at a preset position is affine motion predicted, the control point MVs of the block derive a predictor for affine motion compensation of the current block from the MVs. Referring to FIG. 25, the preset positions are A0, A1, B0, B1, and B2. Alternatively, the preset positions include positions adjacent to and not adjacent to the current block. Also, the control point MVs or MVs of the preset positions are referenced (spatial), and the temporal control point MVs or MVs of the preset positions are referenced.
[0143] A candidate for affine MC (affine motion compensation) can be created by the method of the embodiment of Fig. 25, and such a candidate may be called an inherited candidate. Alternatively, such a candidate may be called a merge candidate. In addition, in the method of Fig. 25, when referring to a preset position, the reference is made in a preset order.
[0144] FIG. 26 is a diagram illustrating affine motion predictor derivation according to one embodiment of the present disclosure.
[0145] For affine motion prediction, control point motion vectors are required, and based on the control point motion vectors, a motion vector field, i.e., a motion vector for a subblock or a certain position, is calculated. The control point motion vector is also called a seed vector.
[0146] In this case, the control point MV is based on the predictor. For example, the predictor can be the control point MV. As another example, the control point MV may be calculated based on the predictor and the difference. In detail, the control point MV is calculated by adding or subtracting the difference from the predictor.
[0147] In this case, in the process of creating a control point MV, it is derived from surrounding MVs. In this case, the surrounding MVs include MVs (motion vectors) that are not affine MC (affine motion compensation) MVs (motion vectors). For example, when deriving each control point MV (control point motion vector) of the current block, an MV at a preset position for each control point MV is used as a predictor of the control point MV. For example, the preset position is a part included in a block adjacent to that part.
[0148] Referring to Fig. 26, control point MVs (control point motion vectors) mv0, mv1, and mv2 are determined. In this case, according to an embodiment of the present disclosure, MVs (motion vectors) corresponding to preset positions A, B, and C are used as predictors for mv0. Also, MVs (motion vectors) corresponding to preset positions D and E are used as predictors for mv1. MVs (motion vectors) corresponding to preset positions F and G are used as predictors for mv2.
[0149] In addition, when determining each predictor of control point MV (control point motion vector) mv0, mv1, and mv2 according to the embodiment of Fig. 26, the order of referring to the preset positions for each control point position is determined. Also, there may be many preset positions for each control point to be referred to as predictors of the control point MV, and possible combinations of preset positions may be determined.
[0150] A candidate of affine MC (affine motion compensation) can be made by the method of the embodiment of Fig. 26, and such a candidate may be called a constructed candidate. Alternatively, such a candidate may be called an inter candidate or a vertical candidate. Also, in the method of Fig. 41, when referring to a preset position, the position is referred to in a preset order.
[0151] According to one embodiment of the present disclosure, an affine MC (affine motion compensation) candidate list or an affine MC (affine motion compensation) control point MV candidate list can be generated using the embodiments described in Figures 23 to 26 or a combination thereof.
[0152] FIG. 27 is a diagram illustrating affine motion predictor derivation according to one embodiment of the present disclosure.
[0153] As described in Fig. 24 and Fig. 25, a control point MV (control point motion vector) for affine motion prediction of a current block is derived from neighboring affine motion predicted blocks. In this case, the same method as in Fig. 27 is used. In the formula in Fig. 27, the MVs (motion vectors) or control point MVs (control point motion vectors) of the top-left, top-right, and bottom-left of the neighboring affine motion predicted blocks are (v_E0x, v_E0y), (v_E1x, v_E1y), and (v_E2x, v_E2y), respectively. In addition, the coordinates of the top-left, top-right, and bottom-left of the neighboring affine motion predicted blocks are (x_E0, y_E0), (x_E1, y_E1), and (x_E2, y_E2), respectively. At this time, the predictor of the control point MV (control point motion vector) of the current block or the control point MV (v_0x, v_0y), (v_1x, v_1y) are calculated according to FIG.
[0154] FIG. 28 is a diagram illustrating affine motion predictor derivation according to one embodiment of the present disclosure.
[0155] As mentioned above, multiple control point MVs or multiple control point MV predictors are required for affine motion compensation, and one control point MV or control point MV predictor is used to derive another control point MV or control point MV predictor.
[0156] For example, when two control point MVs (control point motion vectors) or two control point MV predictors (control point motion vector predictors) are created using the method described in the above drawings, another control point MV (control point motion vector) or another control point MV predictor (control point motion vector predictor) is generated based on the two control point MVs or two control point MV predictors (control point motion vector predictors).
[0157] 28 shows a method for generating top-left, top-right, and bottom-left control point MV predictors or control point MVs mv0, mv1, and mv2. In the figure, x and y respectively indicate the x-component and y-component, and the current block size is w*h.
[0158] FIG. 29 is a diagram illustrating a method of generating a control point motion vector according to one embodiment of the present disclosure.
[0159] According to an embodiment of the present disclosure, in order to perform affine MC (affine motion compensation) on the current block, a predictor for the control point MV is created and the difference is added to the predictor to determine the control point MV. According to an embodiment, the predictor for the control point MV can be created by the method described in Figures 23 to 26. The difference is signaled from the encoder to the decoder.
[0160] Referring to FIG. 29, there is a difference for each control point MV (control point motion vector). Also, the difference for each control point MV (control point motion vector) is signaled. FIG. 29(a) shows a method for determining mv0 and mv1, which are control point MVs of a 4-parameter model, and FIG. 29(b) shows a method for determining mv0, mv1, and mv2, which are control point MVs of a 6-parameter model. The control point MV (control point motion vector) is determined by adding mvd0, mvd1, and mvd2, which are differences for each control point MV (control point motion vector), to the predictor.
[0161] In FIG. 29, the bar at the top indicates a predictor of the control point MV (control point motion vector).
[0162] FIG. 30 is a diagram showing a method of determining the motion vector difference by the method described with reference to FIG.
[0163] As an example, a motion vector difference is signaled by the method described in FIG. 10. The motion vector difference determined by the signaled method is lMvd in FIG. 30. The same values as the signaled mvd (motion vector difference) shown in FIG. 29, that is, mvd0, mvd1, and mvd2, are lMvd in FIG. 30. As described in FIG. 29, the signaled mvd (motion vector difference) is determined as a difference with the predictor of the control point MV (control point motion vector), and the determined difference is MvdL0 and MvdL1 in FIG. 30. L0 indicates reference list 0 (0th reference picture list), and L1 indicates reference list 1 (first reference picture list). compIdx is a component index, indicating x, y component, etc.
[0164] FIG. 31 is a diagram illustrating a method of generating a control point motion vector according to one embodiment of the present disclosure.
[0165] According to an embodiment of the present disclosure, in order to perform affine MC (affine motion compensation) on the current block, a predictor for the control point MV is created and a difference is added to the predictor to determine the control point MV. According to an embodiment, a predictor for the control point MV can be created by the method described in Figures 23 to 26. The difference is signaled from the encoder to the decoder.
[0166] Referring to FIG. 31, there is a predictor for the difference for each control point MV. For example, based on the difference of a control point MV, the difference of another control point MV is determined. This is based on the similarity between the differences for the control point MV. Because they are similar, once a predictor is determined, the difference with the predictor can be reduced. At this time, the difference predictor for the control point MV is signaled, and the difference between the difference predictor for the control point MV is signaled.
[0167] FIG. 31(a) shows a method for determining control point MVs (control point motion vectors), mv0 and mv1, of a 4-parameter model, and FIG. 31(b) shows a method for determining control point MVs (control point motion vectors), mv0, mv1, and mv2, of a 6-parameter model.
[0168] Referring to FIG. 31, the difference for each control point MV is determined based on the difference (mvd0) of mv0, which is control point MV 0, and the control point MV is determined. mvd0, mvd1, and mvd2 shown in FIG. 31 are signaled from the encoder to the decoder. Compared to the method described in FIG. 29, the method of FIG. 31 may have different values of mvd1 and mvd2 to be signaled even if the same mv0, mv1, and mv2 and the same predictor are used as in FIG. 29. If the difference between the predictors of the control point MVs mv0, mv1, and mv2 is similar, the absolute values of mvd1 and mvd2 may be smaller when the method of FIG. 31 is used than when the method of FIG. 29 is used, thereby reducing the signaling overhead of mvd1 and mvd2. Referring to FIG. 31, the difference between mv1 and the predictor is determined to be (mvd1+mvd0), and the difference between mv2 and the predictor is determined to be (mvd2+mvd0).
[0169] In FIG. 31, the bar at the top indicates the predictor of the control point MV.
[0170] FIG. 32 is a diagram showing a method of determining the motion vector difference by the method described with reference to FIG.
[0171] As an example, a motion vector difference is signaled by the method described in Fig. 10 or Fig. 33. Then, the motion vector difference determined based on the signaled parameters is lMvd in Fig. 32. Also, the same value as the signaled mvd shown in Fig. 31, that is, mvd0, mvd1, and mvd2, is lMvd in Fig. 32.
[0172] MvdLX in FIG. 32 is the difference between each control point MV (control point motion vector) and a predictor. That is, it is (mv-mvp). In this case, as described in FIG. 31, for control point MV 0 (mv_0), the signaled motion vector difference is immediately used as the difference (MvdLX) for the control point MV, and for other control point MVs (mv_1, mv_2), the signaled motion vector difference (mvd1, mvd2 in FIG. 31) and for control point MV 0 (mv_0), the signaled motion vector difference (mvd0 in FIG. 31) is used as the difference of the control point MV, MvdLX.
[0173] 32, LX indicates a reference list (reference picture list X). compIdx is a component index, indicating x, y component, etc. cpIdx indicates a control point index. cpIdx means 0, 1, or 0, 1, 2 as shown in FIG. 31. Consider the resolution of the motion vector difference in the values shown in Figures 10, 12, 13, etc. For example, if the resolution is R, use the value of lMvd*R for lMvd in the drawing.
[0174] FIG. 33 is a diagram illustrating a motion vector difference syntax according to one embodiment of the present disclosure.
[0175] Referring to Figure 33, the motion vector difference is coded in a similar manner to that described in Figure 10. At this time, coding is performed separately according to cpIdx and control point index.
[0176] FIG. 34 is a diagram illustrating a structure of higher level signaling according to an embodiment of the present disclosure. According to an embodiment of the present disclosure, there are one or more higher level signalings. Higher level signaling means signaling at a higher level. A higher level is a unit that includes a certain unit. For example, a higher level of a current block or a current coding unit includes CTU, slice, tile, tile group, picture, sequence, etc. The higher level signaling affects a lower level of the corresponding higher level. For example, if the higher level is a sequence, it affects the CTU, slice, tile, tile group, and picture units that are lower than the sequence. Here, affecting means that the higher level signaling affects the encoding or decoding of the lower level.
[0177] Alternatively, the higher level signaling includes signaling indicating whether a certain mode is available. Referring to FIG. 34, the higher level signaling includes sps_modeX_enabled_flag. According to an embodiment, it is determined whether mode modeX is available based on sps_modeX_enabled_flag. For example, when sps_modeX_enabled_flag is a certain value, mode modeX cannot be used. Also, when sps_modeX_enabled_flag is another certain value, mode modeX can be used. Also, when sps_modeX_enabled_flag is another certain value, it is determined whether mode modeX is used based on further signaling. For example, the certain value may be 0, and the other certain value may be 1. However, the present invention is not limited thereto, and the certain value may be 1, and the other certain value may be 0.
[0178] According to one embodiment of the present disclosure, there is signaling that indicates whether affine motion compensation is enabled. For example, this signaling is higher level signaling. With reference to FIG. 34, this signaling is sps_affine_enabled_flag. With reference to FIG. 2 and FIG. 7, the signaling refers to a signal transmitted from the encoder to the decoder via the bitstream. The decoder parses the affine enabled flag from the bitstream.
[0179] For example, if sps_affine_enabled_flag is 0, the syntax is restricted so that affine motion compensation is not used. Also, if sps_affine_enabled_flag is 0, inter_affine_flag and cu_affine_type_flag do not exist.
[0180] For example, inter_affine_flag is a signaling indicating whether affine MC (affine motion compensation) is used in a block. With reference to Figures 2 and 7, the signaling refers to a signal transmitted from an encoder to a decoder via a bitstream. The decoder parses inter_affine_flag from the bitstream. In addition, cu_affine_type_flag (coding unit affine type flag) is signaling indicating which type of affine MC (affine motion compensation) is used from block. Here, type indicates whether it is a 4-parameter affine model or a 6-parameter affine model. In addition, if sps_affine_enabled_flag (affine enabled flag) is 1, affine model compensation (affine motion compensation) is available.
[0181] Affine motion compensation means affine model based motion compensation or affine model based motion compensation for inter prediction.
[0182] Also, according to an embodiment of the present disclosure, there is signaling indicating which mode specific type can be used. For example, there is signaling indicating whether a specific type of affine motion compensation can be used. For example, this signaling is higher level signaling. Referring to FIG. 34, this signaling is sps_affine_type_flag. Also, the specific type means a 6-parameter affine model. For example, if sps_affine_type_flag is 0, the syntax is restricted so that the 6-parameter affine model is not used. Also, if sps_affine_type_flag is 0, cu_affine_type_flag does not exist. Also, if sps_affine_type_flag is 1, the 6-parameter affine model is used. If sps_affine_type_flag does not exist, its value is inferred to 0.
[0183] Also, according to an embodiment of the present disclosure, the signaling indicating which mode's specific type is available exists when the signaling indicating which mode is available exists. For example, if the signaling indicating which mode is available is 1, the signaling indicating which mode's specific type is available is parsed. Also, if the signaling indicating which mode is available is 0, the signaling indicating which mode's specific type is available is not parsed. For example, the signaling indicating which mode is available includes sps_affine_enabled_flag. Also, the signaling indicating which mode's specific type is available includes sps_affine_type_flag. Referring to FIG. 34, if sps_affine_enabled_flag is 1, sps_affine_type_flag is parsed. Also, if sps_affine_enabled_flag is 0, sps_affine_type_flag is not parsed and its value is inferred to 0.
[0184] Also, as described above, adaptive motion vector resolution (AMVR) is used. The resolution set of AMVR is used differently depending on the situation. For example, the resolution set of AMVR is used differently depending on the prediction mode. For example, the AMVR resolution set may be different when using regular inter prediction such as AMVP and when using affine MC (affine motion compensation). Also, the AMVR applied to regular inter prediction such as AMVR is applied to the motion vector difference. Or, the AMVR applied to regular inter prediction such as AMVP (Advanced Motion Vector Prediction) is applied to the motion vector predictor. Also, the AMVR applied to affine MC (affine motion compensation) is applied to the control point motion vector or the control point motion vector difference.
[0185] Also, according to one embodiment of the present disclosure, there is signaling indicating whether AMVR is available. This signaling is higher level signaling. Referring to Figure 34, there is sps_amvr_enabled_flag (AMVR enabled flag). Referring to Figures 2 and 7, the signaling means a signal transmitted from the encoder to the decoder via the bitstream. The decoder parses the AMVR enabled flag from the bitstream.
[0186] According to an embodiment of the present disclosure, sps_amvr_enabled_flag indicates whether adaptive motion vector differential resolution is used. According to an embodiment of the present disclosure, sps_amvr_enabled_flag indicates whether adaptive motion vector differential resolution is available. For example, according to an embodiment of the present disclosure, if sps_amvr_enabled_flag is 1, AMVR is available for motion vector coding. According to an embodiment of the present disclosure, if sps_amvr_enabled_flag is 1, AMVR is used for motion vector coding. If sps_amvr_enabled_flag is 1, there is further signaling to indicate which resolution is used. If sps_amvr_enabled_flag is 0, AMVR is not used for motion vector coding. Also, if sps_amvr_enabled_flag (AMVR enabled flag) is 0, AMVR cannot be used for motion vector coding. According to an embodiment of the present disclosure, AMVR corresponding to sps_amvr_enabled_flag (AMVR enabled flag) means to be used for regular inter prediction. For example, AMVR corresponding to sps_amvr_enabled_flag (AMVR enabled flag) does not mean to be used for affine MC (affine motion compensation). Also, whether or not affine MC (affine motion compensation) can be used is indicated by inter_affine_flag (inter-affine flag). That is, AMVR corresponding to sps_amvr_enabled_flag (AMVR enabled flag) means to be used when inter_affine_flag (inter-affine flag) is 0, or does not mean to be used when inter_affine_flag (inter-affine flag) is 1.
[0187] According to an embodiment of the present disclosure, there is signaling indicating whether AMVR is available for affine MC (Affine Motion Compensation). This signaling is higher level signaling. Referring to FIG. 34, there is sps_affine_amvr_enabled_flag (Affine AMVR enabled flag) which is signaling indicating whether AMVR is available for affine MC (Affine Motion Compensation). Referring to FIG. 2 and FIG. 7, the signaling means a signal transmitted from the encoder to the decoder via the bitstream. The decoder parses the Affine AMVR enabled flag from the bitstream.
[0188] sps_affine_amvr_enabled_flag indicates whether adaptive motion vector differential resolution is used for affine motion compensation. Also, sps_affine_amvr_enabled_flag indicates whether adaptive motion vector differential resolution is available for affine motion compensation. According to one embodiment, if sps_affine_amvr_enabled_flag is 1, AMVR can be used for affine inter mode motion vector coding. Also, if sps_affine_amvr_enabled_flag is 1, AMVR is used for affine inter mode motion vector coding. Also, if sps_affine_amvr_enabled_flag is 0, AMVR cannot be used for affine inter mode motion vector coding. If sps_affine_amvr_enabled_flag (affine AMVR enabled flag) is 0, AMVR is not used for affine inter mode motion vector coding.
[0189] For example, if sps_affine_amvr_enabled_flag (affine AMVR enabled flag) is 1, then the AMVR corresponding to when inter_affine_flag (inter-affine flag) is 1 is used. Also, if sps_affine_amvr_enabled_flag (affine AMVR enabled flag) is 1, then there is further signaling to indicate which resolution is used. Also, if sps_affine_amvr_enabled_flag (affine AMVR enabled flag) is 0, then the AMVR corresponding to when inter_affine_flag (inter-affine flag) is 1 cannot be used.
[0190] FIG. 35 is a diagram showing a structure of a coding unit syntax according to one embodiment of the present disclosure.
[0191] As described in Figure 34, there is further signaling for indicating resolution based on higher level signaling using AMVR. Referring to Figure 34, the further signaling for indicating resolution includes amvr_flag or amvr_precision_flag. amvr_flag or amvr_precision_flag is information about the resolution of motion vector differential.
[0192] According to one embodiment, there is signaling indicating that amvr_flag is 0. Also, if amvr_flag is 1, amvr_precision_flag is present. Also, if amvr_flag is 1, the resolution is determined based on amvr_precision_flag as well. For example, if amvr_flag is 0, it is 1 / 4 resolution. Also, if amvr_flag is not present, the amvr_flag value is inferred based on CuPredMode. For example, if CuPredMode is MODE_IBC, the value of amvr_flag is inferred to 1, and if CuPredMode is not MODE_IBC or CuPredMode (coding unit prediction mode) is MODE_INTER, the value of amvr_flag is inferred to 0.
[0193] Also, if inter_affine_flag is 0 and amvr_precision_flag is 0, 1-pel resolution is used. Also, if inter_affine_flag is 1 and amvr_precision_flag is 0, 1 / 16-pel resolution is used. Also, if inter_affine_flag is 0 and amvr_precision_flag is 1, 4-pel resolution is used. Also, if inter_affine_flag is 1 and amvr_precision_flag is 1, 1-pel resolution is used.
[0194] If amvr_precision_flag is 0, infer its value to 0.
[0195] According to an embodiment, the resolution is applied according to the MvShift value. The MvShift is determined by amvr_flag and amvr_precision_flag, which are information about the resolution of the motion vector difference. For example, if inter_affine_flag is 0, the MvShift value is determined as follows:
[0196] MvShift=(amvr_flag+amvr_precision_flag)<<1
[0197] In addition, the Mvd (motion vector difference) value is shifted based on the MvShift value. For example, the Mvd (motion vector difference) is shifted as follows, whereby the resolution of the AMVR is applied.
[0198] MvdLX = MvdLX << (MvShift + 2)
[0199] As another example, if inter_affine_flag is 1, the MvShift value is determined as follows:
[0200] MvShift=amvr_precision_flag?(amvr_precision_flag<<1):(-(amvr_flag<<1))
[0201] In addition, the MvdCp (control point motion vector difference) value is shifted based on the MvShift value. MvdCp is control point motion vector difference or control point motion vector. For example, MvdCp (control point motion vector difference) is shifted as follows, whereby the resolution of AMVR is applied.
[0202] MvdCpLX=MvdCpLX<<(MvShift+2)
[0203] Also, Mvd or MvdCp is a value signaled by mvd_coding.
[0204] 35, if CuPredMode is MODE_IBC, amvr_flag, which is information about the resolution of the motion vector difference, does not exist. Also, if CuPredMode is MODE_INTER, amvr_flag, which is information about the resolution of the motion vector difference, exists, but in this case, amvr_flag can be parsed if certain conditions are satisfied.
[0205] According to an embodiment of the present disclosure, whether to parse syntax elements related to AMVR is determined based on a higher level signaling value indicating whether AMVR is used. For example, if the higher level signaling value indicating whether AMVR is used is 1, the syntax elements related to AMVR are parsed. Also, if the higher level signaling value indicating whether AMVR is used is 0, the syntax elements related to AMVR are not parsed. With reference to FIG. 35, when CuPredMode is MODE_IBC, if sps_amvr_enabled_flag (AMVR enabled flag) is 0, amvr_precision_flag, which is information related to the resolution of motion vector difference, is not parsed. Also, when CuPredMode is MODE_IBC, if sps_amvr_enabled_flag (AMVR enabled flag) is 1, amvr_precision_flag, which is information related to the resolution of motion vector difference, is parsed. At this time, further conditions for parsing are taken into consideration.
[0206] For example, if there is at least one non-zero one among MvdLX (plural motion vector differentials), amvr_precision_flag is parsed. MvdLX is an Mvd value for reference list LX. Also, Mvd (motion vector differential) is signaled via mvd_coding. LX includes L0 (0th reference picture list) and L1 (1st reference picture list). Also, MvdLX has components corresponding to the x-axis and y-axis. For example, the x-axis corresponds to the horizontal axis of a picture, and the y-axis corresponds to the vertical axis of a picture. Referring to FIG. 35, in MvdLX[x0][y0][0] and MvdLX[x0][y0][1], [0] and [1] indicate that they correspond to the x-axis and y-axis components, respectively. Also, if CuPredMode is MODE_IBC, only L0 is used. 35, amvr_precision_flag is parsed if 1) sps_amvr_enabled_flag is 1, and 2) MvdL0[x0][y0][0] or MvdL0[x0][y0][1] is not 0. Also, amvr_precision_flag is not parsed if 1) sps_amvr_enabled_flag (AMVR enabled flag) is 0, or 2) MvdL0[x0][y0][0] and MvdL0[x0][y0][1] are both 0.
[0207] Also, there may be a case where CuPredMode is not MODE_IBC. In this case, referring to FIG. 35, if sps_amvr_enabled_flag (AMVR enabled flag) is 1, inter_affine_flag (inter affine flag) is 0, and there is at least one non-zero MvdLX (multiple motion vector differential) value, amvr_flag is parsed. Here, amvr_flag is information on the resolution of the motion vector differential. Also, as described above, sps_amvr_enabled_flag (AMVR enabled flag) being 1 indicates the use of adaptive motion vector differential resolution. Also, inter_affine_flag (inter affine flag) being 0 indicates that affine motion compensation is not used for the current block. Also, as described in FIG. 34, the multiple motion vector differentials for the current block are modified based on information on the resolution of the motion vector differential such as amvr_flag. This condition is called condition A. Also, if sps_affine_amvr_enabled_flag (affine AMVR enabled flag) is 1, inter_affine_flag (inter affine flag) is 1, and there is at least one non-zero MvdCpLX (multiple control point motion vector difference) value, amvr_flag is parsed. Here, amvr_flag is information on the resolution of the motion vector difference. Also, as described above, sps_affine_amvr_enabled_flag (affine AMVR enabled flag) being 1 indicates that an adaptive motion vector difference resolution is used for affine motion compensation. Also, inter_affine_flag (inter affine flag) being 1 indicates that affine motion compensation is used for the current block. Also, as described in FIG. 34, the multiple control point motion vector difference for the current block is modified based on information on the resolution of the motion vector difference such as amvr_flag. This condition is called condition B.
[0208] Also, if condition A or condition B is satisfied, amvr_flag is parsed. Also, if neither condition A nor condition B is satisfied, amvr_flag, which is information about the resolution of motion vector differentials, is not parsed. In other words, if 1) sps_amvr_enabled_flag (AMVR enabled flag) is 0, inter_affine_flag (inter affine flag) is 1, or MvdLX (multiple motion vector differentials) are all 0, or 2) sps_affine_amvr_enabled_flag is 0, inter_affine_flag (inter affine flag) is 0, or MvdCpLX (multiple control point motion vector differentials) values are all 0, amvr_flag is not parsed.
[0209] Also, it decides whether or not to parse amvr_precision_flag based on the amvr_flag value. For example, if the amvr_flag value is 1, it parses amvr_precision_flag. Also, if the amvr_flag value is 0, it does not parse amvr_precision_flag.
[0210] Also, MvdCpLX (multiple control point motion vector difference) means difference with respect to a control point motion vector. Also, MvdCpLX (multiple control point motion vector difference) is signaled via mvd_coding. LX includes L0 (0th reference picture list) and L1 (1st reference picture list). Also, MvdCpLX has components corresponding to control point motion vectors 0, 1, 2, etc. For example, control point motion vectors 0, 1, 2, etc. are control point motion vectors corresponding to preset positions based on the current block.
[0211] Referring to FIG. 35, in MvdCpLX[x0][y0][0][], MvdCpLX[x0][y0][1][], and MvdCpLX[x0][y0][2][], [0], [1], and [2] indicate that they correspond to control point motion vectors 0, 1, and 2, respectively. Also, the MvdCpLX (multiple control point motion vector difference) value corresponding to control point motion vector 0 is also used for other control point motion vectors. For example, as used in FIG. 47, control point motion vector 0 may be used. Also, MvdCpLX (multiple control point motion vector difference) has components corresponding to the x-axis and y-axis. For example, the x-axis corresponds to the horizontal axis of the picture, and the y-axis corresponds to the vertical axis of the picture. Referring to FIG. 35, in MvdCpLX[x0][y0][][0] and MvdCpLX[x0][y0][][1], [0] and [1] indicate the x-axis and y-axis components, respectively.
[0212] FIG. 36 is a diagram illustrating a structure of higher level signaling according to one embodiment of the present disclosure. There is higher level signaling as described in Figures 34 and 35. For example, there are sps_affine_enabled_flag (affine enabled flag), sps_affine_amvr_enabled_flag, sps_amvr_enabled_flag (AMVR enabled flag), sps_affine_type_flag, etc.
[0213] According to one embodiment of the present disclosure, the higher level signaling has a parsing dependency, for example, determining whether to parse other higher level signaling based on which higher level signaling value.
[0214] According to an embodiment of the present disclosure, whether affine AMVR can be used is determined based on whether affine MC (affine motion compensation) can be used. For example, whether affine AMVR can be used is determined based on higher level signaling indicating whether affine MC can be used. More specifically, whether parsing of higher level signaling indicating whether affine AMVR can be used is determined based on higher level signaling indicating whether affine MC can be used.
[0215] As an example, if affine MC is available, then it is possible that affine AMVR is available, and if affine MC is not available, then it is possible that affine AMVR is not available.
[0216] More specifically, if the higher level signaling indicating whether affine MC can be used is 1, then affine AMVR can be used. In this case, further signaling is present. Also, if the higher level signaling indicating whether affine MC can be used is 0, then affine AMVR cannot be used. For example, if the higher level signaling indicating whether affine MC can be used is 1, then parsing is performed on the higher level signaling indicating whether affine AMVR can be used. Also, if the higher level signaling indicating whether affine MC can be used is 0, then parsing is not performed on the higher level signaling indicating whether affine AMVR can be used. Also, if there is no higher level signaling indicating whether affine AMVR can be used, then the value is inferred. For example, inferring to 0. As another example, inferring is performed based on the higher level signaling indicating whether affine MC can be used. As another example, inferring is performed based on the higher level signaling indicating whether AMVR can be used.
[0217] According to one embodiment, the affine AMVR is the AMVR used for the affine MC described in Figures 34 and 35. For example, higher level signaling indicating whether affine MC is available is sps_affine_enabled_flag. Also, higher level signaling indicating whether affine AMVR is available is sps_affine_amvr_enabled_flag.
[0218] 36, if sps_affine_enabled_flag (affine enable flag) is 1, sps_affine_amvr_enabled_flag is parsed. Also, if sps_affine_enabled_flag (affine enable flag) is 0, sps_affine_amvr_enabled_flag is not parsed. Also, if sps_affine_amvr_enabled_flag does not exist, its value is inferred to 0.
[0219] In the embodiments of the present disclosure, affine AMVR is meaningful when using affine MC.
[0220] FIG. 37 is a diagram illustrating a structure of higher level signaling according to one embodiment of the present disclosure. There is higher level signaling as described in Figures 34 and 35. For example, there are 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.
[0221] According to one embodiment of the present disclosure, the higher level signaling has a parsing dependency, for example, determining whether to parse other higher level signaling based on which higher level signaling value. According to an embodiment of the present disclosure, it is determined whether affine AMVR is available based on whether AMVR is available. For example, it is determined whether affine AMVR is available based on higher level signaling indicating whether AMVR is available. More specifically, it is determined whether parsing of higher level signaling indicating whether affine AMVR is available is performed based on higher level signaling indicating whether AMVR is available.
[0222] As an example, if AMVR is available, then affine AMVR may be available, and if AMVR is not available, then affine AMVR may not be available.
[0223] More specifically, if the higher level signaling indicating whether AMVR is available is 1, affine AMVR is available. In this case, there may be additional signaling. Also, if the higher level signaling indicating whether AMVR is available is 0, affine AMVR is not available. For example, if the higher level signaling indicating whether AMVR is available is 1, parsing is performed on the higher level signaling indicating whether affine AMVR is available. Also, if the higher level signaling indicating whether AMVR is available is 0, parsing is not performed on the higher level signaling indicating whether affine AMVR is available. Also, if there is no higher level signaling indicating whether affine MC is available, the value is inferred. For example, inferring to 0. As another example, inferring is performed based on the higher level signaling indicating whether affine MC is available. As another example, inferring is performed based on the higher level signaling indicating whether AMVR is available.
[0224] According to one embodiment, the affine AMVR is an AMVR used for affine MC (affine motion compensation) described in Figures 34 and 35. For example, higher level signaling indicating whether the AMVR is available is sps_amvr_enabled_flag (AMVR enabled flag). Also, higher level signaling indicating whether the affine AMVR is available is sps_affine_amvr_enabled_flag (affine AMVR enabled flag).
[0225] 37(a), if sps_amvr_enabled_flag (AMVR enabled flag) is 1, sps_affine_amvr_enabled_flag (affine AMVR enabled flag) is parsed. Also, if sps_amvr_enabled_flag (AMVR enabled flag) is 0, sps_affine_amvr_enabled_flag (affine AMVR enabled flag) is not parsed. Also, if sps_affine_amvr_enabled_flag (affine AMVR enabled flag) does not exist, its value is inferred to 0.
[0226] In one embodiment of the present disclosure, the effectiveness of adaptive resolution may vary depending on the sequence.
[0227] Also, whether or not affine AMVR can be used is determined taking into consideration whether or not affine MC can be used and whether or not AMVR can be used. For example, whether or not to parse the higher level signaling indicating whether affine AMVR can be used is determined 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 one embodiment, if 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 is parsed. Also, if the higher level signaling indicating whether affine MC can be used or the higher level signaling indicating whether AMVR can be used are both 0, the higher level signaling indicating whether affine AMVR can be used is not parsed. Also, if there is no higher level signaling indicating whether affine MC can be used, the value is inferred.
[0228] 37(b), if sps_affine_enabled_flag (affine enabled flag) and sps_amvr_enabled_flag (AMVR enabled flag) are both 1, sps_affine_amvr_enabled_flag (affine AMVR enabled flag) is parsed. Also, if at least one of sps_affine_enabled_flag (affine enabled flag) and sps_amvr_enabled_flag (AMVR enabled flag) is 0, sps_affine_amvr_enabled_flag (affine AMVR enabled flag) is not parsed. Also, if sps_affine_amvr_enabled_flag (affine AMVR enabled flag) does not exist, its value is inferred to 0.
[0229] Explaining Fig. 37(b) in more detail, in line 3701, it is determined whether or not affine motion compensation can be used based on sps_affine_enabled_flag. As already explained in Fig. 34 and Fig. 35, if sps_affine_enabled_flag is 1, it means that affine motion compensation can be used. Also, if sps_affine_enabled_flag is 0, it means that affine motion compensation cannot be used.
[0230] If it is determined at line 3701 in Figure 37(b) that affine motion compensation is to be used, then it is determined at line 3702 whether adaptive motion vector differential resolution is to be used based on sps_amvr_enabled_flag (AMVR enabled flag). As already described with reference to Figures 34 and 35, if sps_amvr_enabled_flag (AMVR enabled flag) is 1, it means that adaptive motion vector differential resolution is to be used. If sps_amvr_enabled_flag (AMVR enabled flag) is 0, it means that adaptive motion vector differential resolution is not to be used.
[0231] If it is determined in line 3701 that affine motion compensation is not used, then it is not determined whether or not to use adaptive motion vector differential resolution based on sps_amvr_enabled_flag. That is, line 3702 in FIG. 37(b) is not performed. In particular, if affine motion compensation is not used, sps_affine_amvr_enabled_flag is not transmitted from the encoder to the decoder. That is, the decoder does not receive sps_affine_amvr_enabled_flag, and sps_affine_amvr_enabled_flag is not parsed. In this case, sps_affine_amvr_enabled_flag does not exist, so it is inferred to 0. As described above, sps_affine_amvr_enabled_flag, when set to 0, indicates that adaptive motion vector differential resolution is not available for affine motion compensation.
[0232] If it is determined at line 3072 of Figure 37(b) that adaptive motion vector differential resolution is to be used, at line 3703, sps_affine_amvr_enabled_flag (affine AMVR enabled flag), which indicates whether adaptive motion vector differential resolution for affine motion compensation can be used, is parsed from the bitstream.
[0233] If it is determined in line 3072 that adaptive motion vector differential resolution is not used, sps_affine_amvr_enabled_flag is not parsed from the bitstream. That is, line 3703 in FIG. 37(b) is not performed. More specifically, if affine motion compensation is used and adaptive motion vector differential resolution is not performed, sps_affine_amvr_enabled_flag is not transmitted from the encoder to the decoder. That is, the decoder does not receive sps_affine_amvr_enabled_flag. The decoder does not parse sps_affine_amvr_enabled_flag from the bitstream. In this case, sps_affine_amvr_enabled_flag does not exist and is therefore inferred to 0. As described above, sps_affine_amvr_enabled_flag, when set to 0, indicates that adaptive motion vector differential resolution is not available for affine motion compensation.
[0234] As shown in Figure 37(b), by checking sps_affine_enabled_flag first and then checking sps_amvr_enabled_flag, unnecessary processing steps can be reduced, thereby improving efficiency. For example, if sps_amvr_enabled_flag is checked first and then sps_affine_enabled_flag is checked, sps_affine_enabled_flag must be checked again to derive sps_affine_type_flag from the seventh line. However, by checking sps_affine_enabled_flag first and then checking sps_amvr_enabled_flag, such unnecessary processing can be reduced.
[0235] FIG. 38 is a diagram showing a structure of a coding unit syntax according to one embodiment of the present disclosure.
[0236] As described in FIG. 35, whether to perform syntax parsing related to AMVR is determined depending 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) to be used may differ depending on which reference list is used, how many parameters the affine model uses, etc. If the initial value of MvdLX or MvdCpLX is not 0, unnecessary syntax elements related to AMVR are signaled because MvdLX or MvdCpLX not used in the current block is not 0, which may cause a missmatch between the encoder and the decoder. FIGs. 38 to 39 explain a method of preventing a missmatch between the encoder and the decoder.
[0237] According to one embodiment, inter_pred_idc (information on reference picture list) indicates which reference list is used or what the direction of prediction is. For example, inter_pred_idc (information on reference picture list) is a value of PRED_L0, PRED_L1, or PRED_BI. If inter_pred_idc (information on reference picture list) is PRED_L0, only reference list 0 (0th reference picture list) is used. Also, if inter_pred_idc (information on reference picture list) is PRED_L1, only reference list 1 (1st reference picture list) is used. Also, if inter_pred_idc (information on reference picture list) is PRED_BI, both reference list 0 (0th reference picture list) and reference list 1 (1st reference picture list) are used. If inter_pred_idc (information on reference picture list) is PRED_L0 or PRED_L1, it is uni-prediction. Also, if inter_pred_idc (information regarding the reference picture list) is PRED_BI, it is bi-prediction.
[0238] Also, it determines which affine model to use based on the MotionModelIdc value. Also, it determines which affine MC to use based on the MotionModelIdc value. For example, MotionModelIdc indicates translation motion, 4-parameter affine motion, or 6-parameter affine motion. For example, if the translation motion value of MotionModelIdc is 0, 1, or 2, it indicates translation motion, 4-parameter affine motion, or 6-parameter affine motion, respectively. Also, according to one embodiment, MotionModelIdc is determined based on inter_affine_flag (inter-affine flag) and cu_affine_type_flag. For example, if merge_flag is 0 (not merge mode), MotionModelIdc is determined based on inter_affine_flag (inter-affine flag) and cu_affine_type_flag. For example, MotionModelIdc is (inter_affine_flag+cu_affine_type_flag). According to another embodiment, MotionModelIdc is determined by merge_subblock_flag. For example, if merge_flag is 1 (merge mode), MotionModelIdc is determined by merge_subblock_flag. For example, the MotionModelIdc value is set to the merge_subblock_flag value.
[0239] For example, if inter_pred_idc (information on reference picture list) is PRED_L0 or PRED_BI, a value corresponding to L0 in MvdLX (motion vector difference) or MvdCpLX (control point motion vector difference) is used. Therefore, when parsing syntax related to AMVR, MvdL0 or MvdCpL0 is considered only when inter_pred_idc (information on reference picture list) is PRED_L0 or PRED_BI. In other words, if inter_pred_idc (information on reference picture list) is PRED_L1, MvdL0 (motion vector difference for the 0th reference picture list) or MvdCpL0 (control point motion vector difference for the 0th reference picture list) does not need to be considered.
[0240] Also, if inter_pred_idc (information on reference picture list) is PRED_L1 or PRED_BI, a value corresponding to L1 in MvdLX or MvdCPLX is used. Therefore, when parsing syntax related to AMVR, MvdL1 (motion vector difference for the first reference picture list) or MvdCpL1 (control point motion vector difference for the first reference picture list) is considered only when inter_pred_idc (information on reference picture list) is PRED_L1 or PRED_BI. In other words, if inter_pred_idc (information on reference picture list) is PRED_L0, MvdL1 or MvdCpL1 does not need to be considered.
[0241] 38, MvdL0 and MvdCpL0 determine whether to parse the syntax related to AMVR only when inter_pred_idc is not PRED_L1, depending on whether its value is non-zero. In other words, if inter_pred_idc is PRED_L1, the syntax related to AMVR is not parsed even if MvdL0 has a non-zero value or MvdCpL0 has a non-zero value.
[0242] Also, if MotionModelIdc is 1, only MvdCpLX[x0][y0][0][] and MvdCpLX[x0][y0][1][] are considered among MvdCpLX[x0][y0][0][], MvdCpLXx0][y0][1][], and MvdCpLX[x0][y0][2][]. In other words, if MotionModelIdc is 1, MvdCpLX[x0][y0][2][] is not considered. For example, if MotionModelIdc is 1, whether or not there is a non-zero value among MvdCpLX[x0][y0][2][] does not affect whether or not syntax related to AMVR can be parsed.
[0243] Also, if MotionModelIdc is 2, then MvdCpLX[x0][y0][0][], MvdCpLX[x0][y0][1][], and MvdCpLX[x0][y0][2][] are all taken into consideration. In other words, if MotionModelIdc is 2, then MvdCpLX[x0][y0][2][] is taken into consideration.
[0244] In the above embodiment, MotionModelIdc indicated as 1 or 2 can also be expressed as cu_affine_type_flag being 0 or 1. This is because it is possible to determine whether or not affine MC can be used. For example, whether or not affine MC can be used is determined by inter_affine_flag (inter-affine flag).
[0245] 38, whether there is a non-zero value among MvdCpLX[x0][y0][2][] is considered only when MotionModelIdc is 2. If MvdCpLX[x0][y0][0][] and MvdCpLX[x0][y0][1][] are both 0 and there is at least one non-zero value among MvdCpLX[x0][y0][2][] (in accordance with the above-mentioned embodiment, L0 and L1 may be separated here and only one of L0 and L1 may be considered), and MotionModelIdc is not 2, the syntax related to AMVR is not parsed.
[0246] FIG. 39 is a diagram illustrating the setting of the MVD base value according to one embodiment of the present disclosure. As described above, MvdLX (motion vector difference) or MvdCpLX (control point motion vector difference) is signaled by mvd_coding. Also, the IMvd value is signaled by mvd_coding, and MvdLX or MvdCpLX is set to the IMvd value. Referring to FIG. 39, if MotionModelIdc is 0, MvdLX is set according to the IMvd value. Also, if MotionModelIdc is not 0, MvdCpLX is set according to the IMvd value. Also, it is determined which of LXs an operation is to be performed according to the refList value. Also, as described in Figure 10, 23, 34, 35, etc., there is mvd_coding. Also, mvd_coding includes a step of parsing or a step of determining abs_mvd_greater0_flag, abs_mvd_greater1_flag, abs_mvd_minus2, mvd_sign_flag, etc. Also, IMvd is determined by abs_mvd_greater0_flag, abs_mvd_greater1_flag, abs_mvd_minus2, mvd_sign_flag, etc.
[0247] Referring to FIG. 39, IMvd is set as follows: IMvd=abs_mvd_greater0_flag*(abs_mvd_minus2+2)*(1-2*mvd_sign_flag)
[0248] A base value of MvdLX (motion vector difference) or MvdCpLX (control point motion vector difference) is set to a preset value. According to an embodiment of the present disclosure, a base value of MvdLX or MvdCpLX is set to 0. Alternatively, a base value of IMvd is set to a preset value. Alternatively, a base value of a related syntax element is set so that the value of IMvd, MvdLX, or MvdCpLX becomes a preset value. The basic syntax element refers to a value that is inferred if the syntax element does not exist. The preset value is 0.
[0249] According to an embodiment of the present disclosure, abs_mvd_greater0_flag indicates whether the absolute value of MVD is greater than 0. Also, according to an embodiment of the present disclosure, if abs_mvd_greater0_flag is not present, its value is inferred to 0. In such a case, the IMvd value is set to 0. Also, in such a case, the MvdLX or MvdCpLX value is set to 0. Alternatively, according to one embodiment of the present disclosure, if the IMvd or MvdLX or MvdCpLX value is not set, the value is set to a pre-defined value, for example, set to 0.
[0250] Also, according to one embodiment of the present disclosure, if abs_mvd_greater0_flag is not present, the corresponding IMvd or MvdLX or MvdCpLX value is set to 0.
[0251] According to one embodiment of the present disclosure, abs_mvd_greater1_flag indicates whether the absolute value of the MVD is greater than 1. If abs_mvd_greater1_flag does not exist, the value is inferred to 0. Also, abs_mvd_minus2+2 indicates the absolute value of the MVD. If the abs_mvd_minus2 value does not exist, it infers its value to -1.
[0252] Also, mvd_sign_flag indicates the sign of the MVD. If mvd_sign_flag is 0 or 1, it indicates that the corresponding MVD is a positive or negative value, respectively. If mvd_sign_flag does not exist, its value is inferred to 0.
[0253] Figure 40 is a diagram showing the setting of the MVD base value according to an embodiment of the present disclosure. As described in Figure 39, the initial value of MvdLX or MvdCpLX is set to 0, and the MvdLX (multiple motion vector differences) or MvdCpLX (multiple control point motion vector differences) value is initialized so as not to cause a missmatch between the encoder and the decoder. In this case, the initialized value is 0. The embodiment of Figure 40 will explain this in more detail.
[0254] According to an embodiment of the present disclosure, the MvdLX (multiple motion vector differentials) or MvdCpLX (multiple control point motion vector differentials) value is initialized to a preset value. The initialization position is prior to the position where the AMVR-related syntax elements are parsed. The AMVR-related syntax elements include amvr_flag, amvr_precision_flag, etc. in FIG. 40. amvr_flag or amvr_precision_flag is information regarding the resolution of the motion vector differentials.
[0255] The resolution of MVD (motion vector difference) or MV (motion vector), or the signaling resolution of MVD or MV is determined by the syntax elements related to the AMVR. Also, in the embodiment of the present disclosure, the preset value to be initialized is 0.
[0256] By staggering the archive, when parsing syntax elements related to AMVR, the MvdLX and MvdCpLX values between the encoder and decoder are the same, so there is no mismatch between the encoder and decoder. Also, by setting the initial value to 0, unnecessary syntax elements related to AMVR are not included in the bitstream.
[0257] According to one embodiment of the present disclosure, MvdLX is defined for a reference list (L0, L1, etc.), an x- or y-component, etc. Also, MvdCpLX is defined for a reference list (L0, L1, etc.), an x- or y-component, control point 0, 1, 2, etc.
[0258] According to an embodiment of the present disclosure, both MvdLX and MvdCpLX values are initialized. Also, the initialization position is before performing mvd_coding for the corresponding MvdLX or MvdCpLX. For example, even in a precision block that uses only L0, MvdLX and MvdCpLX corresponding to L0 can be initialized. In order to initialize only those that are absolutely required to be initialized, it is necessary to check the conditions, but by performing initialization without distinction in this way, the burden of checking the conditions can be reduced.
[0259] According to another embodiment of the present disclosure, a value corresponding to an unused MvdLX or MvdCpLX value is initialized. Here, unused means not used in the current block. For example, a value corresponding to a reference list not currently used in MvdLX or MvdCpLX is initialized. For example, if L0 is not used, values corresponding to MvdL0 and MvdCpL0 are initialized. L0 is not used when inter_pred_idc is PRED_L1. Also, if L1 is not used, values corresponding to MvdL1 and MvdCpL1 are initialized. L1 is not used when inter_pred_idc is PRED_L0. L0 is used when inter_pred_idc is PRED_L0 or PRED_BI. Also, L1 is used when inter_pred_idc is PRED_L1 or PRED_BI. 40, if 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], MvdCpL0[x0][y0][2][1] are initialized. The initialized value is 0. Also, if inter_pred_idc is PRED_L0, initialize 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]. Also, the initialized value is 0.
[0260] MvdLX[x][y][compIdx] is the (x,y) position relative to the reference list LX, and the motion vector difference relative to the component index compIdx. MvdCpLX[x][y][cpIdx][compIdx] is the motion vector difference relative to the reference list LX. Also, MvdCpLX[x][y][cpIdx][compIdx] is the motion vector difference relative to the position (x,y), the control point motion vector cpIdx, and the component index compIdx. Here, component indicates the x or y component.
[0261] Also, according to an embodiment of the present disclosure, which of MvdLX (motion vector difference) or MvdCpLX (control point motion vector difference) is not used depends on whether affine motion compensation is used. For example, if affine motion compensation is used, MvdLX is initialized. Also, if affine motion compensation is not used, MvdCpLX is initialized. For example, there is signaling indicating whether affine motion compensation is used. Referring to FIG. 40, inter_affine_flag is signaling indicating whether affine motion compensation is used. For example, if inter_affine_flag is 1, affine motion compensation is used. Or, MotionModelIdc is signaling indicating whether affine motion compensation is used. For example, if MotionModelIdc is not 0, affine motion compensation is used.
[0262] Also, according to an embodiment of the present disclosure, the unused MvdLX or MvdCpLX relates to which affine motion compensation is used. For example, the unused MvdLX or MvdCpLX may differ depending on whether a 4-parameter affine model or a 6-parameter affine model is used. For example, the unused cpIdx of MvdCpLX[x][y][cpIdx][compIdx] may differ depending on which affine motion compensation is used. For example, when a 4-parameter affine model is used, only a part of MvdCpLX[x][y][cpIdx][compIdx] is used. Or, when a 6-parameter affine model is not used, only a part of MvdCpLX[x][y][cpIdx][compIdx] is used. Therefore, the unused MvdCpLX is initialized to a preset value. In this case, the unused MvdCpLX corresponds to cpIdx that is used in the 6-parameter affine model and unused in the 4-parameter affine model. For example, if the 4-parameter affine model is used, the value of cpIdx of MvdCpLX[x][y][cpIdx][compIdx] is not used and is initialized to a preset value. Also, as described above, there is signaling or a parameter that indicates whether the 4-parameter affine model or the 6-parameter affine model is used. For example, it is possible to know whether the 4-parameter affine model or the 6-parameter affine model is used by MotionModelIdc or cu_affine_type_flag. MotionModelIdc values of 1 and 2 indicate the use of the 4-parameter affine model and the 6-parameter affine model, respectively.40, if MotionModelIdc is 1, MvdCpL0[x0][y0][2][0], MvdCpL0[x0][y0][2][1], MvdCpL1[x0][y0][2][0], and MvdCpL1[x0][y0][2][1] are initialized to preset values. Also, in this case, instead of the case where MotionModelIdc is 1, a condition where MotionModelIdc is not 2 can be used. The preset value is 0.
[0263] Also, according to an embodiment of the present disclosure, which of MvdLX or MvdCpLX is not used is determined based on mvd_l1_zero_flag (motion vector difference zero flag for the first reference picture list). For example, if mvd_l1_zero_flag is 1, MvdL1 and MvdCpL1 are initialized to a preset value. In addition, at this time, further conditions are considered. For example, which of MvdLX or MvdCpLX is not used is determined based on mvd_l1_zero_flag and inter_pred_idc (information on the reference picture list). For example, if mvd_l1_zero_flag is 1 and inter_pred_idc is PRED_BI, MvdL1 and MvdCpL1 are initialized to a preset value. For example, mvd_l1_zero_flag (motion vector difference zero flag for the first reference picture list) is higher level signaling indicating that the MVD value for reference list L1 (e.g., MvdLX or MvdCpLX) is 0. The signaling refers to a signal transmitted from the encoder to the decoder via the bitstream. The decoder parses mvd_l1_zero_flag (motion vector difference zero flag for the first reference picture list) from the bitstream.
[0264] According to another embodiment of the present disclosure, before performing mvd_coding on a certain block, all Mvd and MvdCp are initialized to a preset value. In this case, mvd_coding means all mvd_coding for a certain CU. Therefore, the above problem is solved by initializing all Mvd and MvdCP values, so that the mvd_coding syntax is parsed and the determined Mvd or MvdCp value does not need to be initialized.
[0265] 41 is a diagram showing a structure of syntax related to AMVR according to one embodiment of the present disclosure. The embodiment of FIG. 41 is based on the embodiment of FIG.
[0266] As described in FIG. 38, it is checked whether there is at least one non-zero value among MvdLX (motion vector difference) or MvdCpLX (control point motion vector difference). In this case, MvdLX or MvdCpLX to be checked is determined based on mvd_l1_zero_flag (motion vector difference zero flag for the first reference picture list). Therefore, whether or not to parsing syntax related to AMVR is determined based on mvd_l1_zero_flag. As described above, if mvd_l1_zero_flag is 1, it indicates that MVD (motion vector difference) for reference list L1 is 0, so in this case, MvdL1 (motion vector difference for the first reference picture list) or MvdCpL1 (control point motion vector difference for the first reference picture list) is not considered. For example, if mvd_l1_zero_flag is 1, the syntax associated with the AMVR is parsed based on whether there is at least one value that is 0 among MvdL0 (motion vector difference for the 0th reference picture list) or MvdCpL0 (control point motion vector difference for the 0th reference picture list), regardless of whether MvdL1 or MvdCpL1 is 0. According to a further embodiment, it is only for bi-prediction blocks that mvd_l1_zero_flag indicates that the MVD for the reference list L1 is 0. Therefore, the syntax associated with the AMVR is parsed based on mvd_l1_zero_flag and inter_pred_idc (information on the reference picture list). For example, MvdLX or MvdCpLX is determined based on mvd_l1_zero_flag and inter_pred_idc (information on the reference picture list) to determine whether there is at least one value that is not 0. For example, MvdL1 or MvdCpL1 may not be considered based on mvd_l1_zero_flag and inter_pred_idc. For example, if mvd_l1_zero_flag is 1 and inter_pred_idc is PRED_BI, MvdL1 or MvdCpL1 is not considered.For example, if mvd_l1_zero_flag is 1 and inter_pred_idc is PRED_BI, the syntax associated with AMVR is parsed based on whether there is at least one value that is 0 among MvdL0 or MvdCpL0, regardless of whether MvdL1 or MvdCpL1 is 0 or not.
[0267] Referring to Figure 41, if mvd_l1_zero_flag is 1 and inter_pred_idc[x0][y0] == PRED_BI, operation is performed regardless of whether there are any non-zero values 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]. For example, if mvd_l1_zero_flag is 1 and inter_pred_idc[x0][y0] == PRED_BI, if there are no non-zero values in MvdL0 or MvdCpL0, AMVR-related syntax will not be parsed 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].
[0268] Also, if mvd_l1_zero_flag is 0 or inter_pred_idc[x0][y0] != PRED_BI, consider whether there are any non-zero values 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]. For example, if 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 syntax related to AMVR is parsed. For example, if mvd_l1_zero_flag is 0 or inter_pred_idc[x0][y0] != PRED_BI, then 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], or MvdCpL1[x0][y0][2][1], then the syntax associated with AMVR is parsed even if MvdL0 or MvdCpL0 are both 0.
[0269] FIG. 42 is a diagram illustrating a structure of syntax related to inter prediction according to one embodiment of the present disclosure.
[0270] According to an embodiment of the present disclosure, mvd_l1_zero_flag (motion vector difference zero flag for the first reference picture list) is signaling indicating that the Mvd (motion vector difference) value for the reference list L1 (first reference picture list) is 0. This signaling is also signaled at a higher level than the current block. Thus, the Mvd value for the reference list L1 may be 0 in multiple blocks based on the mvd_l1_zero_flag value. For example, if the mvd_l1_zero_flag value is 1, the Mvd value for the reference list L1 is 0. Or, the Mvd value for the reference list L1 is 0 based on the mvd_l1_zero_flag and inter_pred_idc (information on the reference picture list). For example, if the mvd_l1_zero_flag value is 1 and inter_pred_idc is PRED_BI, the Mvd value for the reference list L1 is 0. In this case, the Mvd value is MvdL1[x][y][compIdx]. In addition, in this case, the Mvd value does not mean the control point motion vector difference. In other words, in this case, the Mvd value does not mean the MvdCp value.
[0271] According to another embodiment of the present disclosure, mvd_l1_zero_flag is signaling indicating that the Mvd and MvdCp values for the reference list L1 are 0. This signaling is also signaled at a higher level than the current block. Therefore, the Mvd and MvdCp values for the reference list L1 may be 0 in multiple blocks based on the mvd_l1_zero_flag value. For example, if the mvd_l1_zero_flag value is 1, the Mvd and MvdCp values for the reference list L1 are 0. Or, the Mvd and MvdCp values for the reference list L1 are 0 based on the mvd_l1_zero_flag and the inter_pred_idc. For example, if the mvd_l1_zero_flag value is 1 and the inter_pred_idc is PRED_BI, the Mvd and MvdCp values for the reference list L1 are 0. In this case, the Mvd value is MvdL1[x][y][compIdx], and the MvdCp value is MvdCpL1[x][y][cpIdx][compIdx].
[0272] Also, an Mvd or MvdCp value of 0 means that the corresponding mvd_coding syntax structure is not parsed. That is, for example, if the mvd_l1_zero_flag value is 1, the mvd_coding syntax structure corresponding to MvdL1 or MvdCpL1 is not parsed. Also, if the mvd_l1_zero_flag value is 0, the mvd_coding syntax structure corresponding to MvdL1 or MvdCpL1 is parsed.
[0273] According to an embodiment of the present disclosure, if the MvdCp value is 0 based on the mvd_l1_zero_flag, the signaling indicating MVP is not parsed. The signaling indicating MVP includes the mvp_l1_flag. Also, according to the above description of the mvd_l1_zero_flag, the mvd_l1_zero_flag signaling means that both Mvd and MvdCp are 0. For example, if a condition indicating that the Mvd or MvdCp value for the reference list L1 is 0 is satisfied, the signaling indicating MVP is not parsed. In such a case, the signaling indicating MVP is inferred to a preset value. For example, if there is no signaling indicating MVP, the value is inferred to 0. Also, if a condition indicating that the Mvd or MvdCp value is 0 based on the mvd_l1_zero_flag is not satisfied, the signaling indicating MVP is parsed. However, in such an embodiment, if the Mvd or MvdCp value is zero, there may be no freedom in selecting the MVP, which may reduce coding efficiency.
[0274] More specifically, if the condition indicating that the Mvd and MvdCp values for reference list L1 are 0 is satisfied and affine MC is used, the signaling indicating MVP is not parsed. In such a case, the signaling indicating MVP is inferred to a preset value.
[0275] 42, if mvd_l1_zero_flag is 1 and the inter_pred_idc value is PRED_BI, mvp_l1_flag is not parsed. In this case, the mvp_l1_flag value is inferred to 0. Alternatively, if mvd_l1_zero_flag is 0 and the inter_pred_idc value is not PRED_BI, mvp_l1_flag is parsed.
[0276] In this embodiment, determining whether to parsing the signaling indicating MVP based on mvd_l1_zero_flag occurs when a specific condition is satisfied. For example, the specific condition includes a condition in which general_merge_flag is 0. For example, general_merge_flag has the same meaning as the above-mentioned merge_flag. The specific condition also includes a condition based on CuPerdMode. More specifically, the specific condition includes a condition in which CuPerdMode is not MODE_IBC. The specific condition also includes a condition in which CuPerdMode is MODE_INTER. If CuPerdMode is MODE_IBC, a prediction with the current picture as a reference is used. If CuPerdMode is MODE_IBC, a block vector or a motion vector corresponding to the block exists. If CuPerdMode is MODE_INTER, a prediction with a picture other than the current picture as a reference is used. If CuPerdMode is MODE_INTER, a motion vector corresponding to the block exists. Therefore, according to one embodiment of the present disclosure, if general_merge_flag is 0, CuPerdMode is not MODE_IBC, mvd_l1_zero_flag is 1, and inter_pred_idc is PRED_BI, then mvp_l1_flag is not parsed. Also, if mvp_l1_flag does not exist, its value is inferred to 0.
[0277] More specifically, if general_merge_flag is 0, CuPerdMode is not MODE_IBC, mvd_l1_zero_flag is 1, inter_pred_idc is PRED_BI, and affine MC is used, do not parsing mvp_l1_flag. Also, if mvp_l1_flag does not exist, infer its value to 0.
[0278] Referring to Figure 42, sym_mvd_flag is signaling indicating symmetric MVD. In the case of symmetric MVD, another MVD is determined based on a certain MVD. In the case of symmetric MVD, the other MVD is determined based on an explicitly signaled MVD. For example, in the case of symmetric MVD, the MVD for another reference list is determined based on the MVD for one reference list. For example, in the case of symmetric MVD, the MVD for another reference list L1 is determined based on the MVD for reference list L0. When determining the other MVD based on a certain MVD, a value with the sign of the certain MVD is determined as the other MVD.
[0279] FIG. 43 is a diagram illustrating a structure of syntax related to inter prediction according to one embodiment of the present disclosure.
[0280] The embodiment of FIG. 43 is an embodiment for solving the problem described in FIG. 42. According to an embodiment of the present disclosure, if the Mvd (motion vector difference) or MvdCp (control point motion vector difference) value is 0 based on mvd_l1_zero_flag (motion vector difference zero flag for the first reference picture list), the signaling indicating MVP (motion vector predictor) is parsed. The signaling indicating MVP includes mvp_l1_flag (motion vector predictor index for the first reference picture list). Also, according to the above description of mvd_l1_zero_flag, the mvd_l1_zero_flag signaling means indicating that both Mvd and MvdCp are 0. For example, if a condition indicating that the Mvd or MvdCp value for the reference list L1 (first reference picture list) is 0 is satisfied, the signaling indicating MVP is parsed. Therefore, the signaling indicating MVP is not inferred. This allows the freedom to select MVP even if the Mvd or MvdCp value is 0 based on the mvd_l1_zero_flag, thereby improving coding efficiency. Also, even if the condition indicating that the Mvd or MvdCp value is 0 based on the mvd_l1_zero_flag is not satisfied, the signaling indicating MVP is parsed.
[0281] More specifically, if the condition indicating that the Mvd or MvdCp value for reference list L1 is 0 is satisfied and affine MC is used, signaling indicating MVP is parsed.
[0282] Referring to line 4301 in Figure 43, information about reference picture lists (inter_pred_idc) is obtained for the current block. Referring to line 4302, if the information about reference picture lists (inter_pred_idc) does not indicate that only the 0th reference picture list (list 0) is not used, then in line 4303, the motion vector predictor index (mvp_l1_flag) of the first reference picture list (list 1) is parsed from the bitstream.
[0283] mvd_l1_zero_flag (motion vector difference zero flag) is obtained from the bitstream. mvd_l1_zero_flag (motion vector difference zero flag) indicates whether MvdLX (motion vector difference) and MvdCpLX (multiple control point motion vector difference) are set to 0 for the first reference picture list. Signaling means a signal transmitted from the encoder to the decoder via the bitstream. The decoder parses mvd_l1_zero_flag (motion vector difference zero flag) from the bitstream.
[0284] If mvd_l1_zero_flag (motion vector zero difference flag) is 1 and the value of inter_pred_idc (information about reference picture list) is PRED_BI, then parse mvp_l1_flag (motion vector predictor index), where PRED_BI indicates that both List 0 (0th reference picture list) and List 1 (1st reference picture list) are used. Or, if mvd_l1_zero_flag (motion vector zero difference flag) is 0 and the value of inter_pred_idc (information about reference picture list) is not PRED_BI, then parse mvp_l1_flag (motion vector predictor index). In other words, mvp_l1_flag (motion vector predictor index) is parsed regardless of whether mvd_l1_zero_flag (motion vector differential zero flag) is 1 and inter_pred_idc (information about reference picture lists) indicates the use of both the 0th reference picture list and the 1st reference picture list.
[0285] In this embodiment, it is possible to determine Mvd and MvdCp based on mvd_l1_zero_flag (motion vector difference zero flag of the first reference picture list) and to parsing the signaling indicating MVP when a specific condition is satisfied. For example, the specific condition includes a condition that general_merge_flag is 0. For example, general_merge_flag has the same meaning as the above-mentioned merge_flag. The specific condition also includes a condition based on CuPerdMode. More specifically, the specific condition includes a condition that CuPerdMode is not MODE_IBC. The specific condition also includes a condition that CuPerdMode is MODE_INTER. If CuPerdMode is MODE_IBC, a prediction with the current picture as a reference is used. Also, if CuPerdMode is MODE_IBC, a block vector or a motion vector corresponding to the block exists. If CuPerdMode is MODE_INTER, a prediction with a picture other than the current picture as a reference is used. If CuPerdMode is MODE_INTER, there is a motion vector for that block.
[0286] Thus, according to one embodiment of the present disclosure, if general_merge_flag is 0, CuPerdMode is not MODE_IBC, mvd_l1_zero_flag is 1, and inter_pred_idc is PRED_BI, then mvp_l1_flag (motion vector predictor index for the first reference picture list) is parsed. Thus, mvp_l1_flag (motion vector predictor index for the first reference picture list) exists and its value is not inferred.
[0287] More specifically, if general_merge_flag is 0, CuPerdMode 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 on the reference picture list) is PRED_BI, and affine MC is used, then mvp_l1_flag is parsed. Also, if mvp_l1_flag (motion vector predictor index for the first reference picture list) exists, then the value is not inferred.
[0288] The embodiments of Fig. 43 and Fig. 40 may be implemented together. For example, after Mvd or MvdCp is initialized, mvp_l1_flag is parsed. At this time, the initialization of Mvd or MvdCp is the initialization described in Fig. 40. Also, the parsing of mvp_l1_flag follows the explanation of Fig. 43. For example, if the Mvd and MvdCp values for reference list L1 are not 0 based on mvd_l1_zero_flag, and if the MotionModelIdc value is 1, the MvdCpL1 value of control point index 2 is initialized and mvp_l1_flag is parsed.
[0289] FIG. 44 is a diagram illustrating a structure of syntax related to inter prediction according to one embodiment of the present disclosure.
[0290] The embodiment of Fig. 44 is an embodiment for increasing coding efficiency by eliminating the freedom of selecting MVP. Also, the embodiment of Fig. 44 expresses the embodiment described in Fig. 43 in a different manner. Therefore, the description overlapping with the embodiment of Fig. 43 will be omitted. In the embodiment of Figure 44, if the Mvd or MvdCp value indicates 0 based on the mvd_l1_zero_flag, the signaling indicating MVP is parsed. The signaling indicating MVP includes the mvp_l1_flag.
[0291] FIG. 45 is a diagram illustrating syntax related to inter prediction according to one embodiment of the present disclosure.
[0292] According to an embodiment of the present disclosure, the inter prediction method includes skip mpde, merge mode, inter mode, etc. According to an embodiment, in the skip mode, a residual signal is not transmitted. Also, in the skip mode, a MV determination method such as the merge mode may be used. Whether or not the skip mode is available is determined by the skip flag. Referring to FIG. 33, whether or not the skip mode is available is determined by the value of cu_skip_flag.
[0293] According to one embodiment, the merge mode does not use a motion vector difference. A motion vector is determined based on a motion candidate index. Whether or not the merge mode can be used is determined by a merge flag. Referring to FIG. 33, whether or not the merge mode can be used is determined by a merge_flag value. Also, if the skip mode is not used, the merge mode can be used.
[0294] In the skip mode or merge mode, one or more types of candidate list are selectively used. For example, a merge candidate or a subblock merge candidate is used. Alternatively, the merge candidate includes a candidate selected from signal neighboring, a temporal candidate, etc. Also, the merge candidate includes a candidate using a motion vector for the entire current block (CU: coding unit). That is, the motion vector of each subblock belonging to the current block is included as a candidate. Also, the subblock merge candidate includes a subblock-based temporal MV, an affine merge candidate, etc. Also, the subblock merge candidate includes a candidate that can use a different motion vector for each subblock of the current block (CU). The affine merge candidate is a method created by determining a control point motion vector of an affine motion prediction without using a motion vector difference. Also, the subblock merge candidate includes a method of determining a motion vector for each subblock in the current block. For example, the subblock merge candidate includes planar MV, regression based MV, STMVP, etc. in addition to the above-mentioned subblock-based temporal MV and affine merge candidate.
[0295] According to one embodiment, the inter mode uses a motion vector difference. A motion vector predictor is determined based on a motion candidate index, and a motion vector is determined based on the motion vector predictor and the motion vector difference. Whether the inter mode can be used is determined based on whether other modes can be used. In another embodiment, whether the inter mode can be used is determined based on a flag. FIG. 45 shows an example in which the inter mode is used when the other modes, skip mode and merge mode, are not used.
[0296] Inter mode includes AMVP mode, affine inter mode, etc. Inter mode is a mode that determines a motion vector based on a motion vector predictor and a motion vector difference. Affine inter mode is a method that uses a motion vector difference when determining a control point motion vector for affine motion prediction.
[0297] Referring to FIG. 45, after the skip mode or merge mode is determined, it is determined whether to use the subblock merge candidate or the merge candidate. For example, if a specific condition is satisfied, the merge_subblock_flag indicating whether the subblock merge candidate can be used is parsed. The specific condition is a condition related to the block size. For example, it may be a condition related to the width, height, area, etc., and may be used in combination. Referring to FIG. 45, for example, it is a condition when the width and height of the current block (CU) are equal to or greater than a specific value. When parsing the merge_subblock_flag, the value is inferred to 0. If the merge_subblock_flag is 1, the subblock merge candidate is used, and if it is 0, the merge candidate is used. If the subblock merge candidate is used, the merge_subblock_Idx which is the candidate index is parsed, and if the merge candidate is used, the merge_Idx which is the candidate index is parsed. At this time, if the maximum number of the candidate list is 1, parsing is not performed. If merge_subblock_Idx or merge_Idx is not parsed, infer it to 0.
[0298] FIG. 45 shows the coding_unit function, but the content related to intra prediction is omitted. FIG. 45 shows the case where inter prediction is determined.
[0299] FIG. 46 is a diagram illustrating a triangle partitioning mode according to one embodiment of the present disclosure.
[0300] The triangle partitioning mode (TPM) referred to in this disclosure is variously referred to as triangle partition mode, triangle prediction, triangle based prediction, triangle motion compensation, triangleluar prediction, triangle inter prediction, triangleluar merge mode, triangle merge mode, etc. TPM is also included in geometric partitioning mode (GPM).
[0301] As shown in FIG. 46, TPM is a method of dividing a rectangular block into two triangles. However, GPM divides a block into two blocks in various ways. For example, GPM divides one rectangular block into two triangular blocks as shown in FIG. 46. GPM also divides one rectangular block into one pentagonal block and one triangular block. GPM also divides one rectangular block into two quadrilateral blocks. Here, the rectangle includes a square. For convenience of explanation, the following description will be based on TPM, which is a simplified version of GPM, but it should be interpreted as including GPM.
[0302] According to one embodiment of the present disclosure, there is a prediction method called uni-prediction. Uni-prediction is a prediction method that uses one reference list. There are many reference lists, and according to one embodiment, there are two reference lists, L0 and L1. When using uni-prediction, one reference list is used for one block. Also, when using uni-prediction, one motion information is used to predict one pixel. In this disclosure, block means CU (coding unit) and PU (prediction unit). Also, in this disclosure, block means TU (transform unit).
[0303] According to another embodiment of the present disclosure, there is bi-prediction as a prediction method. Bi-prediction is a prediction method that uses multiple reference lists. Bi-prediction is a prediction method that uses two reference lists. For example, bi-prediction uses reference lists L0 and L1. When using bi-prediction, multiple reference lists are used in one block. For example, when using bi-prediction, two reference lists are used in one block. Also, when using bi-prediction, multiple motion information is used to predict one pixel.
[0304] The motion information includes a motion vector, a reference index, and a prediction list utilization flag.
[0305] The reference list is a reference picture list.
[0306] In this disclosure, motion information corresponding to uni-prediction or bi-prediction is defined as one motion information set.
[0307] According to an embodiment of the present disclosure, when a TPM is used, multiple motion information sets are used. For example, when a TPM is used, two motion information sets are used. For example, when a TPM is used, at most two motion information sets are used. Furthermore, the manner in which two motion information sets are applied within a block using a TPM is based on position. For example, one motion information set is used for a preset position within a block using a TPM, and another motion information set is used for another preset position. Furthermore, two motion information sets are used together for another preset position. For example, for another preset position, prediction 3 is used for prediction based on prediction 1 based on one motion information set and prediction 2 based on another motion information set. For example, prediction 3 is a weighted sum of prediction 1 and prediction 2.
[0308] Referring to FIG. 46, Partition 1 and Partition 2 are schematic diagrams showing the preset location and the other preset location. When using a TPM, one of two split methods is used as shown in FIG. 46. The two split methods include a diagonal split and an anti-diagonal split. Also, the partition is divided into two triangle-shaped partitions by the split. As described above, the TPM is included in the GPM. The GPM has been described above, so a duplicated description will be omitted.
[0309] According to an embodiment of the present disclosure, when using a TPM, only uni-prediction is used for each partition. That is, one piece of motion information is used for each partition. This is to reduce the complexity of memory access, computational complexity, etc. Therefore, only two pieces of motion information are used for a CU.
[0310] Also, each piece of motion information is determined from a candidate list. According to one embodiment, the candidate list used in the TPM is based on a merge candidate list. In another embodiment, the candidate list used in the TPM is based on an AMVP candidate list. Therefore, a candidate index is signaled to use the TPM. Also, for a block using the TPM, the TPM encodes, decodes, and parses candidate indexes for the number of partitions or at most the number of partitions.
[0311] Furthermore, even if a block is predicted by the TPM based on a large amount of motion information, transformation and quantization are performed on the entire block.
[0312] FIG. 47 is a diagram illustrating a merge data syntax according to an embodiment of the present disclosure. According to an embodiment of the present disclosure, the merge data syntax includes signaling related to various modes. The various modes include regular merge mode, MMVD (merge with MVD), subblock merge mode, CIIP (combined intra-and inter-prediction), TPM, etc. Regular merge mode is the same mode as merge mode in HEV. In addition, there is signaling indicating whether the various modes are used in blocks. In addition, this signaling is parsed as a syntax element or implicitly signaled. Referring to Figure 47, the signaling indicating whether to use regular merge mode, MMVD, subblock merge mode, CIIP, or TPM is regular_merge_flag, mmvd_merge_flag (or mmvd_flag), merge_subblock_flag, ciip_flag (or mh_intra_flag), and MergeTriangleFlag (or merge_triangle_flag), respectively.
[0313] According to an embodiment of the present disclosure, when the merge mode is used, if it is signaled that all of the various modes except a certain mode are not used, it is determined that the certain mode is used. Also, when the merge mode is used, if it is signaled that at least one of the various modes except a certain mode is used, it is determined that the certain mode is not used. Also, there is higher level signaling indicating whether a mode is usable. The higher level is a unit including a certain block. The higher level is a sequence, a picture, a slice, a tile group, a tile, a CTU, etc. If the higher level signaling indicating whether a mode is usable indicates that it is usable, there is additional signaling indicating whether the mode is to be used, and the mode is used or not used. If the higher level signaling indicating whether a mode is usable indicates that it is not usable, the mode is not used. For example, when the merge mode is used, if it is signaled that none of the regular merge mode, the MMVD, the subblock merge mode, and the CIIP are to be used, it is determined that the TPM is to be used. In addition, when the merge mode is used, if at least one of regular merge mode, MMVD, subblock merge mode, and CIIP is signaled, it is determined not to use the TPM. In addition, there is signaling indicating whether to use the merge mode. For example, the signaling indicating the value of using the merge mode is general_merge_flag or merge_flag. If the merge mode is used, the merge data syntax as shown in FIG. 47 is parsed.
[0314] In addition, the block size that can use the TPM is limited. For example, the TPM will be used if both the width and height are 8 or more.
[0315] If a TPM is used, syntax elements related to the TPM are parsed. The syntax elements related to the TPM include signaling indicating a split method and signaling indicating a candidate index. The split method indicates the split direction. There are multiple (e.g., two) signalings indicating candidate indexes for a block that uses a TPM. Referring to Figure 47, the signaling indicating the split method is merge_triangle_split_dir. Also, the signaling indicating the candidate indexes are merge_triangle_Idx0 and merge_triangle_Idx1.
[0316] In the present disclosure, the candidate indexes for the TPM are m and n. For example, the candidate indexes for Partition 1 and Partition 2 in FIG. 46 are m and n, respectively. According to one embodiment, m and n are determined based on the signaling indicating the candidate index described in FIG. 47. According to one embodiment of the present disclosure, one of m and n is determined based on one of merge_triangle_Idx0 and merge_triangle_Idx1, and the remaining one of m and n is determined based on both merge_triangle_Idx0 and merge_triangle_Idx1.
[0317] Alternatively, one of m and n is determined based on one of merge_triangle_Idx0 and merge_triangle_Idx1, and the remaining one of m and n is determined based on the remaining one of merge_triangle_Idx0 and merge_triangle_Idx1. More specifically, m is determined based on merge_triangle_Idx0, and n is determined based on merge_triangle_Idx0 (or m) and merge_triangle_Idx1. For example, m and n are determined as follows.
[0318] m=merge_triangle_Idx0 n=merge_triangle_Idx1+(merge_triangle_Idx1>=m)?1:0
[0319] According to an embodiment of the present disclosure, m and n are not the same. This is because in the TPM, if two candidate indexes are the same, that is, if two pieces of motion information are the same, the partitioning effect cannot be obtained. Therefore, this signaling method is for reducing the number of signaling bits when signaling n if n>m. Since m is not n among all the candidates, it can be excluded from signaling.
[0320] If the candidate list used in the TPM is mergeCanList, mergeCanList[m] and mergeCanList[n] are used as motion information in the TPM.
[0321] FIG. 48 is a diagram illustrating higher level signaling according to one embodiment of the present disclosure. According to one embodiment of the present disclosure, there are multiple higher level signalings. Higher level signaling is signaling transmitted in a higher level unit. A higher level unit includes one or more lower level units. Higher level signaling is signaling applied to one or more lower level units. For example, a slice or a sequence is a higher level unit with respect to a CU, PU, TU, etc. Conversely, a CU, PU, or TU is a lower level unit with respect to a slice or a sequence.
[0322] According to an embodiment of the present disclosure, the upper level signaling includes signaling indicating a maximum number of candidates. For example, the upper level signaling includes signaling indicating a maximum number of merge candidates. For example, the upper level signaling includes signaling indicating a maximum number of candidates used in the TPM. The signaling indicating the maximum number of merge candidates or the signaling indicating the maximum number of candidates used in the TPM is signaled and parsed if inter prediction is allowed. Whether inter prediction is forced is determined by the slice type. Slice types include I, P, B, and the like. For example, if the slice type is I, inter prediction is not allowed. For example, if the slice type is I, only intra prediction or intra block copy (IBC) is used. Also, if the slice type is P or B, inter prediction is allowed. Also, if the slice type is P or B, intra prediction, IBC, and the like are allowed. Also, if the slice type is P, at most one reference list is used to predict a pixel. Also, multiple reference lists are used to predict pixels whose slice type is B. For example, two reference lists are used at most to predict pixels whose slice type is B.
[0323] According to an embodiment of the present disclosure, when signaling a maximum number, it is signaled based on a reference value. For example, (reference value-maximum number) is signaled. Therefore, the maximum number is derived based on the parsed value and the reference value in the decoder. For example, (base value-parsed value) is determined as the maximum number.
[0324] According to one embodiment, the reference value in the signaling indicating the maximum number of merge candidates is six.
[0325] According to one embodiment, the reference value in the signaling indicating the maximum number of candidates used in the TPM is the maximum number of the merge candidates.
[0326] Referring to FIG. 48, the signaling indicating the maximum number of merge candidates is six_minus_max_num_merge_cand. Here, merge candidate means a candidate for merge mode vector prediction. Hereinafter, for convenience of explanation, six_minus_max_num_merge_cand is referred to as first information. Referring to FIG. 2 and FIG. 7, signaling means a signal transmitted from an encoder to a decoder via a bitstream. six_minus_max_num_merge_cand (first information) is signaled in sequence units. The decoder parses six_minus_max_num_merge_cand (first information) from the bitstream.
[0327] Also, the signaling indicating the maximum number of candidates used in the TPM is max_num_merge_cand_minus_max_num_triangle_cand. With reference to Figures 2 and 7, the signaling refers to a signal transmitted from the encoder to the decoder via the bitstream. The decoder parses max_num_merge_cand_minus_max_num_triangle_cand (third information) from the bitstream. max_num_merge_cand_minus_max_num_triangle_cand (third information) is information regarding the maximum number of merge mode candidates for a partitioned block.
[0328] In addition, the maximum number of merge candidates is MaxNumMergeCand (maximum number of merge candidates), and this value is based on six_minus_max_num_merge_cand (first information). In addition, the maximum number of candidates used in TPM is MaxNumTriangleMergeCand, and this value is based on max_num_merge_cand_minus_max_num_triangle_cand. MaxNumMergeCand (maximum number of merge candidates) is used in merge mode, but is used when a block is partitioned or not partitioned for motion compensation. The above description is based on TPM, but the same method is also used for GPM.
[0329] According to an embodiment of the present disclosure, there is higher level signaling indicating whether the TPM mode is available. Referring to FIG. 48, the higher level signaling indicating whether the TPM mode is available is sps_triangle_enabled_flag (second information). The information indicating whether the TPM mode is available is the same as the information indicating whether the block can be partitioned for inter prediction as shown in FIG. 46. Since the GPM includes the TPM, the information indicating whether the block can be partitioned is the same as the information indicating whether the GPM mode can be used. For inter prediction indicates that it is for motion compensation. That is, sps_triangle_enabled_flag (second information) is information indicating whether the block can be partitioned for inter prediction. If the first information indicating whether the block can be partitioned is 1, it indicates that the TPM or GPM can be used. Also, if the second information is 0, it indicates that the TPM or GPM cannot be used. However, it is not limited thereto, and if the second information is 0, it indicates that the TPM or GPM can be used. Also, if the second information is 1, it indicates that the TPM or GPM cannot be used.
[0330] 2 and 7, signaling refers to a signal transmitted from an encoder to a decoder via a bitstream. The decoder parses sps_triangle_enabled_flag (second information) from the bitstream.
[0331] According to an embodiment of the present disclosure, the TPM is used only when there are candidates used by the TPM that are equal to or greater than the number of partitions of the TPM. For example, when the TPM is partitioned into two, the TPM is used only when there are two or more candidates used by the TPM. According to an embodiment, the candidates used by the TPM are based on the merge candidate. Thus, according to an embodiment of the present disclosure, the TPM is used if the maximum number of the merge candidate is 2 or more. Thus, if the maximum number of the merge candidate is 2 or more, signaling related to the TPM is parsed. The signaling related to the TPM is signaling indicating the maximum number of the candidates used by the TPM.
[0332] 48, if sps_triangle_enabled_flag is 1 and MaxNumMergeCand is 2 or more, max_num_merge_cand_minus_max_num_triangle_cand is parsed. If sps_triangle_enabled_flag is 0 or MaxNumMergeCand is smaller than 2, max_num_merge_cand_minus_max_num_triangle_cand is not parsed.
[0333] FIG. 49 is a diagram showing the maximum number of candidates used in a TPM according to one embodiment of the present disclosure.
[0334] 49, the maximum number of candidates used in the TPM is MaxNumTriangleMergeCand. Also, the signaling indicating the maximum number of candidates used in the TPM is max_num_merge_cand_minus_max_num_triangle_cand. Also, the contents described in FIG. 48 will be omitted.
[0335] According to an embodiment of the present disclosure, the maximum number of candidates used in the TPM exists in the range (inclusive) from "the number of partitions of the TPM" to "a reference value in signaling indicating the maximum number of candidates used in the TPM." Therefore, if the number of partitions of the TPM is 2 and the reference value is the maximum number of merge candidates, as shown in FIG. 49, MaxNumTriangleMergeCand exists in the range (inclusive) from 2 to MaxNumMergeCand.
[0336] According to an embodiment of the present disclosure, if there is no signaling indicating the maximum number of the candidate used in the TPM, the signaling indicating the maximum number of the candidate used in the TPM is inferred, or the maximum number of the candidate used in the TPM is inferred. For example, if there is no signaling indicating the maximum number of the candidate used in the TPM, the maximum number of the candidate used in the TPM is inferred to 0. Also, if there is no signaling indicating the maximum number of the candidate used in the TPM, the signaling indicating the maximum number of the candidate used in the TPM is inferred to a reference value.
[0337] Also, if there is no signaling indicating the maximum number of candidates used by the TPM, the TPM will not be used. Also, if the maximum number of candidates used by the TPM is smaller than the number of partitions in the TPM, the TPM will not be used. Also, if the maximum number of candidates used by the TPM is 0, the TPM will not be used.
[0338] However, according to the embodiment of Figures 48 to 49, if the number of partitions in the TPM and the "reference value in the signaling indicating the maximum number of candidates used in the TPM" are the same, only one value is possible for the maximum number of candidates used in the TPM. However, according to the embodiment of Figures 48 to 49, even in such a case, signaling indicating the maximum number of candidates used in the TPM is parsed, which is unnecessary. If MaxNumMergeCand is 2, referring to Figure 49, the only possible value for MaxNumTriangleMergeCand is 2. However, referring to Figure 48, max_num_merge_cand_minus_max_num_triangle_cand is parsed even in such a case.
[0339] Referring to Figure 49, MaxNumTriangleMergeCand is determined to be (MaxNumMergeCand-max_num_merge_cand_minus_max_num_triangle_cand).
[0340] FIG. 50 is a diagram showing higher level signaling related to a TPM according to an embodiment of the present disclosure. According to an embodiment of the present disclosure, if the number of partitions of the TPM and the "reference value in the signaling indicating the maximum number of the candidate used in the TPM" are the same, the signaling indicating the maximum number of the candidate used in the TPM is not parsed. Also, according to the above-mentioned embodiment, the number of partitions of the TPM is 2. Also, the "reference value in the signaling indicating the maximum number of the candidate used in the TPM" is the maximum number of the merge candidate. Therefore, if the maximum number of the merge candidate is 2, the signaling indicating the maximum number of the candidate used in the TPM is not parsed.
[0341] Alternatively, if the "reference value in the signaling indicating the maximum number of the candidate used by the TPM" is equal to or less than the number of partitions in the TPM, the signaling indicating the maximum number of the candidate used by the TPM is not parsed. Therefore, if the maximum number of the merge candidate is 2 or less, the signaling indicating the maximum number of the candidate used by the TPM is not parsed.
[0342] 50, if MaxNumMergeCand (maximum number of merge candidates) is 2 or is less than or equal to 2, max_num_merge_cand_minus_max_num_triangle_cand (third information) is not parsed. Also, if sps_triangle_enabled_flag (second information) is 1 and MaxNumMergeCand (maximum number of merge candidates) is greater than 2, max_num_merge_cand_minus_max_num_triangle_cand (third information) is parsed. Also, if sps_triangle_enabled_flag (second information) is 0, max_num_merge_cand_minus_max_num_triangle_cand (third information) is not parsed. Therefore, if 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) is not parsed.
[0343] Fig. 51 is a diagram showing the maximum number of candidates used in a TPM according to an embodiment of the present disclosure. The embodiment of Fig. 51 may be implemented together with the embodiment of Fig. 50. Also, the above description may be omitted in this drawing.
[0344] According to an embodiment of the present disclosure, if the "reference value in the signaling indicating the maximum number of the candidate used in the TPM" is the number of partitions of the TPM, the maximum number of the candidate used in the TPM is inferred and set to the number of partitions of the TPM. Also, inferring and setting is done when there is no signaling indicating the maximum number of the candidate used in the TPM. According to the embodiment of FIG. 50, if the "reference value in the signaling indicating the maximum number of the candidate used in the TPM" is the number of partitions of the TPM, the signaling indicating the maximum number of the candidate used in the TPM is not parsed, and if there is signaling indicating the maximum number of the candidate used in the TPM, the value of the maximum number of the candidate used in the TPM is inferred to the number. Well, this is done when a further condition is satisfied. The further condition is a condition in which the higher level signaling indicating whether the TPM mode is available is 1.
[0345] In addition, in this embodiment, it has been described that the maximum number of the candidate used in the TPM is inferred and set, but instead of inferring and setting the maximum number of the candidate used in the TPM, it is also possible to infer and set signaling indicating the maximum number of the candidate used in the TPM so that the maximum number value of the candidate used in the TPM described above is derived.
[0346] 50, if 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) is received. In this case, referring to line 5101 of FIG. 51, MaxNumTriangleMergeCand (maximum number of merge mode candidates for a partitioned block) is obtained using the explicitly signaled max_num_merge_cand_minus_max_num_triangle_cand (third information). In short, if sps_triangle_enabled_flag (second information) indicates 1 and MaxNumMergeCand (maximum number of merge candidates) is greater than or equal to 3, MaxNumTriangleMergeCand (maximum number of merge mode candidates for partitioned blocks) is obtained by subtracting the third information (max_num_merge_cand_minus_max_num_triangle_cand) from MaxNumMergeCand (maximum number of merge candidates).
[0347] 51, if sps_triangle_enabled_flag (second information) is 1 and MaxNumMergeCand (maximum number of merge candidates) is 2, then MaxNumTriangleMergeCand (maximum number of merge mode candidates for partitioned blocks) is set to 2. More specifically, as described above, if sps_triangle_enabled_flag (second information) is 1 and MaxNumMergeCand (maximum number of merge candidates) is greater than 2, then max_num_merge_cand_minus_max_num_triangle_cand (third information) is received, so that if sps_triangle_enabled_flag (second information) is 1 and MaxNumMergeCand (maximum number of merge candidates) is 2 as in line 5102, then max_num_merge_cand_minus_max_num_triangle_cand (third information) is not received. In this case, MaxNumTriangleMergeCand (the maximum number of merge mode candidates for a partitioned block) is determined without max_num_merge_cand_minus_max_num_triangle_cand (third information).
[0348] 51, if sps_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 partitioned blocks) is inferred and set to 0. At this time, as described above, in line 5101, if 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) is signaled, so MaxNumTriangleMergeCand is inferred and set to 0 if the second information is 0 or the maximum number of merge candidates is 1. In short, if 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) is set to 0.
[0349] MaxNumMergeCand (maximum number of merge candidates) and MaxNumTriangleMergeCand (maximum number of merge mode candidates for a partitioned block) are used for different purposes. For example, MaxNumMergeCand (maximum number of merge candidates) is used when a block is partitioned for motion compensation or not partitioned. However, MaxNumTriangleMergeCand (maximum number of merge mode candidates for a partitioned block) is information that is used only when a block is partitioned. The number of candidates for a partitioned block that is in merge mode does not exceed MaxNumTriangleMergeCand (maximum number of merge mode candidates for a partitioned block).
[0350] Other embodiments can also be used. In the embodiment of Fig. 51, if MaxNumMergeCand is not 2, it may be greater than 2. In that case, the meaning of inferring and setting MaxNumTriangleMergeCand to 0 may become unclear. In such a case, there is signaling indicating the maximum number of candidates used by the TPM, so infer is not performed, and there is no abnormality in the operation. However, in this embodiment, infer is performed while making use of the meaning.
[0351] If sps_triangle_enabled_flag (second information) is 1 and MaxNumMergeCand (maximum number of merge candidates) is 2 or more, infer and set MaxNumTriangleMergeCand to 2 (or MaxNumMergeCand is 1). Otherwise (i.e., sps_triangle_enabled_flag is 0 or MaxNumMergeCand is less than 2), infer and set MaxNumTriangleMergeCand to 0.
[0352] If sps_triangle_enabled_flag is 1 and MaxNumMergeCand is 2, infer and set MaxNumTriangleMergeCand to 2. Otherwise, if sps_triangle_enabled_flag is 10, infer and set MaxNumTriangleMergeCand to 0.
[0353] 50, if MaxNumMergeCand is 0 or 1 or 2, there is no signaling indicating the maximum number of candidates used by the TPM, and if MaxNumMergeCand is 0 or 1, the maximum number of candidates used by the TPM is inferred and set to 0. If MaxNumMergeCand is 2, the maximum number of candidates used by the TPM is inferred and set to 2.
[0354] FIG. 52 is a diagram illustrating syntax elements related to the TPM according to one embodiment of the present disclosure.
[0355] As described above, there is a maximum number of candidates used in the TPM, and the number of partitions in the TPM is preset. Also, the candidate indexes used in the TPM may be different from each other.
[0356] According to an embodiment of the present disclosure, if the maximum number of candidates used in the TPM is the same as the number of partitions of the TPM, different signaling is performed than when this is not the case. For example, if the maximum number of candidates used in the TPM is the same as the number of partitions of the TPM, different candidate index signaling is performed than when this is not the case. This allows signaling with fewer bits. Also, if the maximum number of candidates used in the TPM is equal to or less than the number of partitions of the TPM, different signaling is performed than when this is not the case (among these, when it is smaller than the number of partitions of the TPM, the TPM cannot be used).
[0357] If the TPM partition is 2, two candidate indexes are signaled. If the maximum number of candidates used by the TPM is 2, there are only two combinations of candidate indexes. The two combinations are where m and n are 0 and 1, respectively, and where m and n are 1 and 0. Therefore, two candidate indexes are signaled with only 1-bit signaling.
[0358] Referring to FIG. 52, if MaxNumTriangleMergeCand is 2, a different candidate index signaling is performed than if it is not the case (if MaxNumTriangleMergeCand is greater than 2 if TPM is used instead). Also, if MaxNumTriangleMergeCand is 2 or less, a different candidate index signaling is performed than if it is not the case (if MaxNumTriangleMergeCand is greater than 2 if TPM is used instead). Another candidate index signaling is merge_triangle_idx_indicator parsing, referring to FIG. 52. Another candidate index signaling is a signaling method that does not pars merge_triangle_idx0 or merge_triangle_idx1. This will be further described in FIG. 53.
[0359] FIG. 53 is a diagram illustrating signaling of a TPM candidate index according to one embodiment of the present disclosure.
[0360] According to an embodiment of the present disclosure, if the other index signaling described in Fig. 52 is used, the candidate index is determined based on the merge_triangle_idx_indicator. Also, if the other index signaling is used, there is a possibility that merge_triangle_idx0 or merge_triangle_idx1 does not exist.
[0361] According to an embodiment of the present disclosure, if the maximum number of candidates used in the TPM is the same as the number of partitions of the TPM, the TPM candidate index is determined based on the merge_triangle_idx_indicator. This is also the case for blocks that use the TPM.
[0362] More specifically, if MaxNumTriangleMergeCand is 2 (or if MaxNumTriangleMergeCand is 2 and MergeTriangleFlag is 1), the TPM candidate index is determined based on merge_triangle_idx_indicator. In this case, if merge_triangle_idx_indicator is 0, the TPM candidate indices m and n are set to 0 and 1, respectively, and if merge_triangle_idx_indicator is 1, the TPM candidate indices m and n are set to 1 and 0, respectively. Alternatively, merge_triangle_idx0 or merge_triangle_idx1, which are values (syntax elements) parsed as described above, are inferred and set.
[0363] Referring to the method of setting m and n based on merge_triangle_idx0 and merge_triangle_idx1 described in FIG. 47 and referring to FIG. 53, if merge_triangle_idx0 does not exist, if MaxNumTriangleMergeCand is 2 (or if MaxNumTriangleMergeCand is 2 and MergeTriangleFlag is 1), if merge_triangle_idx_indicator is 1, the merge_triangle_idx0 value is inferred to 1. Otherwise, the merge_triangle_idx0 value is inferred to 0. Also, if merge_triangle_idx1 does not exist, merge_triangle_idx1 is inferred to 0. Therefore, if MaxNumTriangleMergeCand is 2, when merge_triangle_idx_indicator is 0, merge_triangle_idx0 and merge_triangle_idx1 are 0 and 0, respectively, and as a result, m and n become 0 and 1, respectively. Also, if MaxNumTriangleMergeCand is 2, then when merge_triangle_idx_indicator is 1, merge_triangle_idx0 and merge_triangle_idx1 are 1 and 0, respectively, thereby making m and n 1 and 0, respectively.
[0364] FIG. 54 is a diagram illustrating signaling of a TPM candidate index according to one embodiment of the present disclosure.
[0365] Although the method of determining the TPM candidate indices has been described in Fig. 47, other determination methods and signaling methods will be described in the embodiment in Fig. 54. Descriptions that overlap with those described above will be omitted. Also, m and n indicate candidate indices as described in Fig. 47.
[0366] According to an embodiment of the present disclosure, the smaller value of m or n is signaled to a preset syntax element of merge_triangle_idx0 or merge_triangle_idx1. Also, a value based on the difference between m and n is signaled to the remaining one of merge_triangle_idx0 and merge_triangle_idx1. Also, a value indicating the magnitude relationship between m and n is signaled.
[0367] For example, merge_triangle_idx0 is the smaller of m and n. Also, merge_triangle_idx1 is a value based on |m, n|, i.e., (|m, n|-1). This is because m and n are not the same. Also, the value indicating the magnitude relationship between m and n is merge_triangle_bigger in FIG. 54.
[0368] Using this relationship, m and n are determined based on merge_triangle_idx0, merge_triangle_idx1, and merge_triangle_bigger. Referring to FIG. 54, other operations are performed based on the merge_triangle_bigger value. For example, if merge_triangle_bigger is 0, then n is greater than m. In this case, m is merge_triangle_idx0. Also, n is (merge_triangle_idx1+m+1). Also, if merge_triangle_bigger is 1, then m is greater than n. In this case, n is merge_triangle_idx0. Also, m is (merge_triangle_idx1+n+1).
[0369] The method of Figure 54 has an advantage over the method of Figure 47 in that it reduces signaling overhead when the smaller value of m and n is not 0 (or is larger). For example, if m and n are 3 and 4, respectively, in the method of Figure 47, merge_triangle_idx0 and merge_triangle_idx1 should be signaled as 3 and 3, respectively. However, in the method of Figure 54, if m and n are 3 and 4, respectively, merge_triangle_idx0 and merge_triangle_idx1 should be signaled as 3 and 0, respectively (in addition, signaling indicating the magnitude relationship is required). Therefore, when using variable length signaling, the size of the values to be encoded and decoded is reduced, and smaller bits can be used.
[0370] FIG. 55 is a diagram illustrating signaling of a TPM candidate index according to one embodiment of the present disclosure.
[0371] Although the method of determining the TPM candidate indices has been described in Fig. 47, other determination methods and signaling methods will be described in the embodiment in Fig. 55. Descriptions that overlap with those described above will be omitted. Also, m and n indicate candidate indices as described in Fig. 47.
[0372] According to an embodiment of the present disclosure, the larger value of m and n is signaled to a preset syntax element of merge_triangle_idx0 and merge_triangle_idx1. Also, a value based on the smaller value of m and n is signaled to the remaining one of merge_triangle_idx0 and merge_triangle_idx1. Also, a value indicating the magnitude relationship between m and n is signaled.
[0373] For example, merge_triangle_idx0 is based on the larger of m and n. In one embodiment, since m and n are not the same, the larger of m and n is equal to or greater than 1. Therefore, taking into consideration that the larger of m and n will be excluded, it is signaled with smaller bits. For example, merge_triangle_idx0 is ((the larger of m and n)-1). In this case, the maximum value of merge_triangle_idx0 is (MaxNumTriangleMergeCand-1-1) (-1 because it is a value that starts with 0, and -1 because the larger value can be excluded as 0). The maximum value is used in binarization, and when the maximum value is reduced, smaller bits may be used. For example, merge_triangle_idx1 is the smaller of m and n. Also, the maximum value of merge_triangle_idx1 is merge_triangle_idx0. Therefore, it is possible to use even smaller bits than setting the maximum value to MaxNumTriangleMergeCand. Also, if merge_triangle_idx0 is 0, that is, if the larger value of m and n is 1, the smaller value of m and n is 0, so there is no additional signaling. For example, if merge_triangle_idx0 is 0, that is, if the larger value of m and n is 1, the smaller value of m and n is determined to be 0. Also, if merge_triangle_idx0 is 0, that is, if the larger value of m and n is 1, merge_triangle_idx1 is inferred and determined to be 0. Referring to FIG. 22, whether or not to parsing merge_triangle_idx1 is determined based on merge_triangle_idx0. For example, if merge_triangle_idx0 is greater than 0, merge_triangle_idx1 is parsed, and if merge_triangle_idx0 is 0, merge_triangle_idx1 is not parsed.
[0374] Moreover, the value indicating the magnitude relationship between m and n is merge_triangle_bigger in FIG.
[0375] Using this relationship, m and n are determined based on merge_triangle_idx0, merge_triangle_idx1, and merge_triangle_bigger. Referring to FIG. 55, other operations are performed based on the merge_triangle_bigger value. For example, if merge_triangle_bigger is 0, then m is greater than n. In this case, m is (merge_triangle_idx0+1). Also, n is merge_triangle_idx1. Also, if merge_triangle_bigger is 1, then n is greater than m. In this case, n is (merge_triangle_idx0+1). Also, m is merge_triangle_idx1. Also, if merge_triangle_idx1 does not exist, then its value is inferred to 0.
[0376] The method of Figure 55 has an advantage over the method of Figure 47 in that it reduces signaling overhead depending on the m and n values. For example, if m and n are 1 and 0, respectively, in the method of Figure 47, merge_triangle_idx0 and merge_triangle_idx1 should be signaled as 1 and 0, respectively. However, in the method of Figure 55, if m and n are 1 and 0, respectively, merge_triangle_idx0 and merge_triangle_idx1 should be signaled as 0 and 0, respectively, but merge_triangle_idx1 is inferred without encoding or parsing (in addition, signaling indicating the magnitude relationship is required). Therefore, when using variable length signaling, the size of the values to be encoded and decoded is reduced, and smaller bits can be used. Or, if m and n are 2 and 1, respectively, merge_triangle_idx0 and merge_triangle_idx1 should be signaled as 2 and 1, respectively in the method of Figure 47, and merge_triangle_idx0 and merge_triangle_idx1 should be signaled as 1 and 1, respectively in the method of Figure 55. However, in this case, since the maximum value of merge_triangle_idx1 is (3-1-1)=1 in the method of Figure 55, it is signaled with 1 less bit than when the maximum value is large. For example, the method of Figure 55 has an advantage when the difference between m and n is small, for example, when the difference is 1.
[0377] Also, in the syntax structure of Fig. 55, it has been described that merge_triangle_idx0 is referenced to determine whether or not to parse merge_triangle_idx1, but it may be determined based on the larger of m and n. In other words, a distinction is made between cases where the larger of m and n is 1 or greater and cases where it is not. However, in this case, parsing of merge_triangle_bigger should occur before determining whether or not to parse merge_triangle_idx1.
[0378] Although the configuration has been described above through specific examples, those skilled in the art should be able to modify or change the configuration without departing from the spirit and scope of the present disclosure. Therefore, anything that can be easily inferred by a person skilled in the art to which the present disclosure pertains from the detailed description and examples of the present disclosure is deemed to fall within the scope of the present disclosure. [Explanation of symbols]
[0379] 100 Encoding Device 110 Exchange section 120 Inverse quantization section 150 Prediction Department 200 Decoding Device 210 Entropy Decoding Unit 230 Filtering section
Claims
1. 1. A method for processing a video signal, comprising: Parsing an AMVR (Adaptive Motion Vector Resolution) enabled flag (sps_amvr_enabled_flag) from the bitstream, which indicates whether adaptive motion vector differential resolution is used; parsing an affine enabled flag (sps_affine_enabled_flag) from the bitstream, which indicates whether affine motion compensation is enabled; determining whether affine motion compensation is enabled based on the affine enabled flag (sps_affine_enabled_flag); if the affine motion compensation is enabled, determining whether adaptive motion vector differential resolution is used based on the AMVR enabled flag (sps_amvr_enabled_flag); If the adaptive motion vector differential resolution is used, parsing an affine AMVR enabled flag (sps_affine_amvr_enabled_flag) from the bitstream, which indicates whether adaptive motion vector differential resolution is available for the affine motion compensation; 16. A method for processing a video signal, comprising:
2. The method of claim 1, wherein one of the AMVR enabled flag (sps_amvr_enabled_flag), the affine enabled flag (sps_affine_enabled_flag), or the affine AMVR enabled flag (sps_affine_amvr_enabled_flag) is signaled in one of a Coding Tree Unit, a slice, a tile, a tile group, a picture, or a sequence unit.
3. 2. The method of claim 1, wherein if the affine motion compensation is enabled and the adaptive motion vector differential resolution is not used, the affine AMVR enabled flag (sps_affine_amvr_enabled_flag) implies that adaptive motion vector differential resolution is not enabled for the affine motion compensation.
4. 2. The method of claim 1, wherein if the affine motion compensation is disabled, the affine AMVR enabled flag (sps_affine_amvr_enabled_flag) implies that adaptive motion vector differential resolution for the affine motion compensation is disabled.
5. parsing information on a resolution of a motion vector differential from the bitstream if the AMVR enabled flag (sps_amvr_enabled_flag) indicates the use of an adaptive motion vector differential resolution, an inter_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 a plurality of motion vector differentials for the current block is not 0; 2. The method of claim 1, further comprising: modifying the motion vector differentials for the current block based on information regarding a resolution of the motion vector differentials.
6. parsing information on a resolution of a motion vector difference from the bitstream if the affine AMVR possible flag indicates that an adaptive motion vector difference resolution is available for the affine motion compensation, an inter_affine_flag obtained from the bitstream indicates the use of affine motion compensation for the current block, and at least one of a plurality of control point motion vector difference for the current block is not 0; and modifying the plurality of control point motion vector differentials for the current block based on information regarding a resolution of the motion vector differentials.
7. obtaining information about a reference picture list for a current block (inter_pred_idc); parsing a motion vector predictor index (mvp_l1_flag) of a first reference picture list (list 1) from a bitstream if the information on the reference picture list (inter_pred_idc) indicates that only the 0th reference picture list (list 0) is not used; generating candidate motion vector predictors; obtaining a motion vector predictor from the motion vector predictor candidates based on the motion vector predictor index; 2. The method of claim 1, further comprising predicting the current block based on the motion vector predictor.
8. The method further includes obtaining a motion vector difference zero flag (mvd_l1_zero_flag) from the bitstream, the motion vector difference indicating whether a motion vector difference and a plurality of control point motion vector difference are set to zero for the first reference picture list; The step of parsing the motion vector predictor index (mvp_l1_flag) comprises: The method of claim 7, further comprising the step of parsing the motion vector predictor index (mvp_l1_flag) regardless of whether the motion vector differential zero flag (mvd_l1_zero_flag) is 1 and information regarding the reference picture list (inter_pred_idc) indicates the use of both the 0th reference picture list and the 1st reference picture list.
9. parsing first information (six_minus_max_num_merge_cand) on a sequence-by-sequence basis from the bitstream regarding a maximum number of candidates for merge motion vector prediction; obtaining a maximum number of merging candidates based on the first information; parsing second information from the bitstream indicating whether the block can be partitioned for inter prediction; and if the second information indicates 1 and the maximum number of merge candidates is greater than 2, parsing third information regarding a maximum number of merge mode candidates for a partitioned block from the bitstream.
10. if the second information indicates 1 and the maximum number of merge candidates is greater than or equal to 3, subtracting the third information from the maximum number of merge candidates to obtain a maximum number of merge mode candidates for the partitioned block; if 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; 10. The method of claim 9, further comprising: if the second information is 0 or the maximum number of merge mode candidates is 1, setting the maximum number of merge mode candidates for the partitioned block to 0.
11. An apparatus for processing a video signal includes a processor and a memory, The processor, based on the instructions stored in the memory, Parse an AMVR (Adaptive Motion Vector Resolution) enabled flag (sps_amvr_enabled_flag) from the bitstream, which indicates whether adaptive motion vector differential resolution is used; Parsing an affine enabled flag (sps_affine_enabled_flag) from the bitstream, which indicates whether affine motion compensation is enabled or not; determining whether affine motion compensation is enabled based on the affine enabled flag (sps_affine_enabled_flag); If the affine motion compensation is enabled, determining whether adaptive motion vector differential resolution is used based on the AMVR enabled flag (sps_amvr_enabled_flag); If the adaptive motion vector differential resolution is used, an affine AMVR enabled flag (sps_affine_amvr_enabled_flag) indicating whether adaptive motion vector differential resolution is available for the affine motion compensation is parsed from the bitstream.
12. The apparatus of claim 11, wherein one of the AMVR enabled flag (sps_amvr_enabled_flag), the affine enabled flag (sps_affine_enabled_flag), or the affine AMVR enabled flag (sps_affine_amvr_enabled_flag) is signaled in one of a Coding Tree Unit, a slice, a tile, a tile group, a picture, or a sequence unit.
13. 12. The apparatus for processing a video signal of claim 11, wherein if the affine motion compensation is enabled and the adaptive motion vector differential resolution is not used, the affine AMVR enabled flag (sps_affine_amvr_enabled_flag) implies that adaptive motion vector differential resolution is not enabled for the affine motion compensation.
14. 12. The apparatus for processing a video signal of claim 11, wherein if the affine motion compensation is disabled, the affine AMVR enabled flag (sps_affine_amvr_enabled_flag) implies that adaptive motion vector differential resolution for the affine motion compensation is disabled (inferred).
15. The processor, based on the instructions stored in the memory, If the AMVR enabled flag (sps_amvr_enabled_flag) indicates the use of adaptive motion vector differential resolution, an inter_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 a plurality of motion vector differentials for the current block is not 0, parsing information related to a resolution of the motion vector differential from the bitstream; 12. The apparatus of claim 11, further comprising: modifying the motion vector differentials for the current block based on information regarding a resolution of the motion vector differentials.
16. The processor, based on the instructions stored in the memory, If the affine AMVR possible flag indicates that adaptive motion vector differential resolution is available for the affine motion compensation, an inter_affine_flag obtained from the bitstream indicates use of affine motion compensation for the current block, and at least one of a plurality of control point motion vector differentials for the current block is not 0, parsing information regarding a resolution of a motion vector differential from the bitstream; 12. The apparatus of claim 11, further comprising: modifying the plurality of control point motion vector differentials for the current block based on information regarding a resolution of the motion vector differentials.
17. The processor, based on the instructions stored in the memory, Obtain information about the reference picture list for the current block (inter_pred_idc); If the information on the reference picture list (inter_pred_idc) indicates that the 0th reference picture list (list 0) is not used alone, parsing a motion vector predictor index (mvp_l1_flag) of a first reference picture list (list 1) from the bitstream; generating candidate motion vector predictors; obtaining a motion vector predictor from the motion vector predictor candidates based on the motion vector predictor index; The apparatus of claim 11, further comprising: a processor for predicting the current block based on the motion vector predictor.
18. The processor, based on the instructions stored in the memory, Obtain a motion vector difference zero flag (mvd_l1_zero_flag) from the bitstream, the motion vector difference and a plurality of control point motion vector difference are set to zero for a first reference picture list; The apparatus for processing a video signal of claim 17, characterized in that the motion vector differential zero flag (mvd_l1_zero_flag) is 1 and the motion vector predictor index (mvp_l1_flag) is parsed regardless of whether the information on the reference picture list (inter_pred_idc) indicates the use of both the 0th reference picture list and the 1st reference picture list.
19. An apparatus for processing a video signal includes a processor and a memory, The processor, based on the instructions stored in the memory, Parsing first information (six_minus_max_num_merge_cand) on a sequence-by-sequence basis from the bitstream regarding a maximum number of candidates for merge motion vector prediction; Obtaining a maximum number of merging candidates based on the first information; Parsing second information from the bitstream indicating whether the block can be partitioned for inter prediction; and if the second information indicates 1 and the maximum number of merge candidates is greater than 2, parsing third information regarding a maximum number of merge mode candidates for a partitioned block from a bitstream.
20. The processor, based on the instructions stored in the memory, if the second information indicates 1 and the maximum number of merge candidates is greater than or equal to 3, subtract the third information from the maximum number of merge candidates to obtain a maximum number of merge mode candidates for the partitioned block; If the second information indicates 1 and the maximum number of merge candidates is 2, set the maximum number of merge mode candidates for the partitioned block to 2; 20. The apparatus of claim 19, wherein if 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.
21. 1. A method for processing a video signal, comprising: generating an adaptive motion vector resolution (AMVR) enabled flag (sps_amvr_enabled_flag) indicating whether adaptive motion vector differential resolution is used; generating an affine enabled flag (sps_affine_enabled_flag) indicating whether affine motion compensation is enabled; determining whether affine motion compensation is enabled based on the affine enabled flag (sps_affine_enabled_flag); if the affine motion compensation is enabled, determining whether adaptive motion vector differential resolution is used based on the AMVR enabled flag (sps_amvr_enabled_flag); if the adaptive motion vector differential resolution is used, generating an affine AMVR enabled flag (sps_affine_amvr_enabled_flag) indicating whether adaptive motion vector differential resolution is enabled for the affine motion compensation; generating a bitstream by entropy coding the AMVR enabled flag (sps_amvr_enabled_flag), the affine enabled flag (sps_affine_enabled_flag), and the AMVR enabled flag (sps_amvr_enabled_flag); 16. A method for processing a video signal, comprising:
22. generating first information (six_minus_max_num_merge_cand) on a maximum number of candidates for merge motion vector prediction based on the maximum number of merge candidates; generating second information indicating whether the block can be partitioned for inter prediction; generating third information regarding a maximum number of merge mode candidates for a partitioned block if the second information indicates 1 and the maximum number of merge candidates is greater than 2; generating a bitstream on a sequence basis by entropy coding the first information (six_minus_max_num_merge_cand), the second information, and the third information; 16. A method for processing a video signal, comprising:
Citation Information
Patent Citations
Video signal processing method and apparatus using adaptive motion vector resolution
JP7335358B2
Video signal processing method and apparatus utilizing adaptive motion vector resolution
JP7540783B2
