Video signal processing method and apparatus using adaptive motion vector resolution
By configuring motion vector predictor candidate lists and modifying motion vector difference values based on resolution sets, the method enhances coding and signaling efficiency in video signal processing, addressing inefficiencies in existing video compression techniques.
Patent Information
- Application Number
- JP2024111228
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2018-08-06
- Filing Date
- 2024-07-10
- Publication Date
- 2024-10-02
AI Technical Summary
Existing video signal processing methods lack efficiency in coding and signaling of motion information, particularly in the context of video signal encoding and decoding, which affects the overall performance of video compression techniques.
The method involves configuring a motion vector predictor (MVP) candidate list, obtaining a motion vector predictor based on this list, and modifying the motion vector difference value according to specific resolution sets, using different methods for constructing the MVP candidate list based on affine models or non-affine models to enhance coding efficiency and signaling efficiency.
This approach increases the coding efficiency and signaling efficiency of video signals by optimizing the resolution of motion vector difference values, thereby improving the overall performance of video encoding and decoding processes.
Smart Images

Figure 2024133683000001_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. [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] SUMMARY OF THE PRESENT EMBODIMENTS The present invention aims to improve the coding efficiency of a video signal, and also aims to improve the efficiency of signaling associated with a motion information set of a current block. [Means for solving the problem]
[0004] In order to solve the above problems, the present invention provides a video signal processing device and a video signal processing method as follows.
[0005] First, according to an embodiment of the present invention, there is provided a video signal processing method, comprising: constructing a motion vector prediction (MVP) candidate list for motion compensation of a current block using any one of a first method and a second method; acquiring a motion vector predictor of the current block based on the constructed MVP candidate list; acquiring a motion vector difference value indicating a difference between a motion vector of the current block and the motion vector predictor; modifying the motion vector difference value based on a resolution of the motion vector difference value of the current block, the resolution of the motion vector difference value being any one of a plurality of available resolutions included in a resolution set, and a configuration of the plurality of available resolutions included in the resolution set varies depending on which of the first method and the second method is used to construct an MVP candidate list for the current block; acquiring a motion vector of the current block based on the motion vector predictor and the modified motion vector difference value; and restoring the current block based on the acquired motion vector.
[0006] According to an embodiment of the present invention, there is provided a video signal decoding apparatus, comprising: a processor, the processor constructing a motion vector prediction (MVP) candidate list for motion compensation of a current block using one of a first method and a second method; acquiring a motion vector predictor of a current block based on the constructed MVP candidate list; acquiring a motion vector difference value indicating a difference between a motion vector of the current block and the motion vector predictor; modifying the motion vector difference value based on a resolution of the motion vector difference value of the current block, the resolution of the motion vector difference value being one of a plurality of available resolutions included in a resolution set, a configuration of the plurality of available resolutions included in the resolution set being changed depending on which of the first method and the second method is used to construct the MVP candidate list of the current block; acquiring a motion vector of the current block based on the motion vector predictor and the modified motion vector difference value; and restoring the current block based on the acquired motion vector.
[0007] The resolution of the motion vector difference value is obtained from either a first resolution set or a second resolution set depending on which of the first method and the second method is used to construct the MVP candidate list of the current block, and the second resolution set may include at least one other available resolution than the multiple available resolutions included in the first resolution set.
[0008] If the MVP candidate list is constructed using the first method based on an affine model, the resolution of the motion vector difference values can be obtained from the first resolution set, and if the MVP candidate list is constructed using the second method not based on the affine model, the resolution of the motion vector difference values can be obtained from the second resolution set.
[0009] A first largest available resolution among a plurality of available resolutions included in the first resolution set may be smaller than a second largest available resolution among a plurality of available resolutions included in the second resolution set.
[0010] The processor may obtain an indicator indicating a resolution of a motion vector difference value of the current block from among a plurality of available resolutions included in any one of the first resolution set and the second resolution set, and modify the motion vector difference value based on the resolution indicated by the indicator. In this case, if the indicator has a value of a first value, the resolution indicated by the first value may vary depending on whether the MVP candidate list is constructed using the first method or the second method.
[0011] When the MVP candidate list is constructed using the first method, the first value indicates a first available resolution which is one of the available resolutions included in a first resolution set, and when the MVP candidate list is constructed using the second method, the first value indicates a second available resolution which is one of the available resolutions included in a second resolution set, and the first available resolution and the second available resolution may be different from each other.
[0012] The first resolution set and the second resolution set both include a first available resolution, and when the MVP candidate list is constructed using the second method, the first available resolution can be indicated by a second value of the indicator, the second value being different from the first value.
[0013] The indicator may be represented by a variable length of bits, and the first value may be one of a plurality of values represented by the variable length of bits.
[0014] The third value of the indicator, which is different from the first value, is a value expressed in bits of the shortest length among the multiple values, and when the MVP candidate list is constructed by the second method, the third value indicates the smallest available resolution among the multiple available resolution sets included in the second resolution set, and when the MVP candidate list is constructed by the first method, the third value can indicate an available resolution other than the smallest available resolution among the multiple available resolution sets included in the first resolution set.
[0015] According to an embodiment of the present invention, there is provided a video signal encoding apparatus, comprising: a processor, the processor obtains a motion vector of the current block based on a position of a reference block referenced for motion compensation of the current block, constructs a motion vector prediction (MVP) candidate list for motion compensation of the current block using one of a first method and a second method, obtains a motion vector difference value based on a difference between one of a plurality of candidates included in the MVP candidate list and the motion vector of the current block, determines a motion vector difference value to be signaled based on a resolution of the motion vector difference value of the current block, the resolution of the motion vector difference value being one of a plurality of available resolutions included in a resolution set, a configuration of the plurality of available resolutions included in the resolution set varies depending on which of the first method and the second method is used to construct the MVP candidate list of the current block, and generates a bitstream including the signaled motion vector difference value.
[0016] The processor may determine an indicator indicating one of a plurality of available resolutions included in one of the first resolution set and the second resolution set, and generate a bitstream including the indicator and the signaled motion vector differential value. In this case, if the value of the indicator is a first value, the resolution indicated by the first value may vary depending on whether the MVP candidate list is constructed using the first method or the second method.
[0017] According to an embodiment of the present invention, there is provided a computer-readable recording medium storing a bitstream, the bitstream including a modified motion vector differential value of a current block modified based on a resolution of the motion vector differential value of the current block, and the resolution of the motion vector differential value is one of a plurality of available resolutions included in a resolution set, and the configuration of the plurality of available resolutions included in the resolution set varies depending on which of a first method and a second method is used to configure a motion vector predictor (MVP) candidate list for motion compensation of the current block.
[0018] The bitstream may further include an indicator indicating a resolution of a motion vector differential value of the current block among a plurality of available resolutions included in any one of the first resolution set and the second resolution set, where if a value of the indicator is a first value, the resolution indicated by the first value may vary depending on whether the MVP candidate list is constructed using the first method or the second method. Effect of the Invention
[0019] According to an embodiment of the present invention, it is possible to improve coding efficiency of a video signal, and also to improve signaling efficiency regarding inter prediction of a current block. [Brief description of the drawings]
[0020] [Figure 1] 1 is a schematic block diagram of a video signal encoding apparatus according to an embodiment of the present invention; [Diagram 2] 1 is a schematic block diagram of a video signal decoding device according to an embodiment of the present invention; [Diagram 3] FIG. 2 shows an example of how coding tree units are divided into coding units within a picture. [Figure 4] FIG. 1 illustrates an embodiment of a method for signaling splits of quad trees and multi-type trees. [Diagram 5] FIG. 2 illustrates in more detail an intra-prediction method according to an embodiment of the present invention; [Figure 6] FIG. 2 illustrates in more detail an intra-prediction method according to an embodiment of the present invention; [Figure 7] 1 illustrates an inter-prediction method according to an embodiment of the present invention. [Figure 8] 4 illustrates how a motion vector of a current block is signaled according to one embodiment of the present invention. [Figure 9] 4 illustrates how a motion vector differential value of a current block is signaled according to one embodiment of the present invention. [Figure 10] 4 illustrates how the resolution of a motion vector differential value of a current block is signaled according to an embodiment of the present invention. [Figure 11] 13 illustrates a method for signaling the resolution of a motion vector differential value of a current block according to another embodiment of the present invention. [Figure 12] 13 illustrates a method for signaling the resolution of a motion vector differential value of a current block according to another embodiment of the present invention. [Figure 13] FIG. 13 illustrates an embodiment in which the configuration of available resolutions included in a resolution set changes. [Figure 14] FIG. 1 illustrates an embodiment of a method in which the resolution of a motion vector differential value of a current block is signaled by a motion vector predictor of the current block. [Figure 15] 13 illustrates another embodiment of a method for signaling the resolution of a motion vector differential value by a motion vector predictor of a current block. [Figure 16] FIG. 4 illustrates how the resolution of motion vector difference values is obtained based on a template matching method according to one embodiment of the present invention. [Figure 17] FIG. 4 illustrates how the resolution of motion vector difference values is obtained based on a two-sided matching method according to an embodiment of the present invention. [Figure 18] 13 is a diagram illustrating a method for signaling the resolution of a motion vector difference value for each reference picture list of a current block according to an embodiment of the present invention. [Figure 19] 1 illustrates an embodiment of a method in which the resolution of a motion vector differential value of a current block is signaled by the resolution of a picture. [Figure 20] FIG. 2 illustrates how the resolution of a motion vector differential value is signaled based on the size of a reference picture of a current block according to one embodiment of the present invention. [Figure 21] 4 is a flow chart illustrating a method for obtaining a resolution of a motion vector difference value of a current block according to an embodiment of the present invention. [Figure 22] 4 is a flow chart illustrating a method for obtaining a resolution of a motion vector difference value of a current block according to an embodiment of the present invention. [Diagram 23] 4 is a flow chart illustrating a method in which a motion vector for a current block is obtained according to an embodiment of the present invention. [Figure 24] 4 is a flow chart illustrating a method in which a motion vector for a current block is obtained according to an embodiment of the present invention. [Diagram 25]4 illustrates how the sign bit of a motion vector differential value of a current block is implicitly signaled according to one embodiment of the present invention. [Figure 26] 4 illustrates how the sign bit of a motion vector differential value of a current block is implicitly signaled according to one embodiment of the present invention. [Figure 27] 4 illustrates how the sign bit of a motion vector differential value of a current block is implicitly signaled according to one embodiment of the present invention. [Figure 28] FIG. 28 illustrates an example of syntax for the embodiment of FIGS. 25 to 27. [Figure 29] 4 illustrates how the resolution and motion vector predictor of a motion vector differential value of a current block are signaled according to an embodiment of the present invention. [Diagram 30] 4 illustrates how a motion vector for a current block is derived based on a number of motion vector difference values according to an embodiment of the present invention. [Diagram 31] FIG. 2 illustrates motion compensation based on an affine model in accordance with one embodiment of the present invention. [Diagram 32] 1 illustrates one embodiment of a four-parameter affine motion compensation method. [Diagram 33] 1 illustrates one embodiment of a 6-parameter affine motion compensation method. [Diagram 34] 1 illustrates an embodiment of a sub-block based affine motion compensation method. [Diagram 35] 1 illustrates an embodiment of a method for obtaining a control point motion vector set for prediction of a current block. [Diagram 36] 1 illustrates an embodiment of a method for obtaining a control point motion vector set for prediction of a current block. [Figure 37] 1 illustrates an embodiment of a method for obtaining a control point motion vector set for prediction of a current block. [Figure 38] 1 illustrates an embodiment of a method for obtaining a control point motion vector set for prediction of a current block. [Figure 39] 11 is a diagram illustrating a method for obtaining a control point motion vector of a current block according to another embodiment of the present invention. [Diagram 40] 4 illustrates how a control point motion vector of a current block is obtained according to one embodiment of the present invention. [Diagram 41] 1 illustrates how a control point motion vector differential value of a current block is signaled according to one embodiment of the present invention. [Diagram 42] 4 illustrates a method for obtaining a control point motion vector of a current block according to another embodiment of the present invention. [Diagram 43] 42 illustrates a method for signaling a control point motion vector differential value when a control point motion vector of a current block is obtained according to the embodiment described in FIG. [Diagram 44] 4 illustrates a method for signaling a control point motion vector difference value of a current block according to an embodiment of the present invention. [Diagram 45] 4 is a diagram illustrating a method for obtaining a motion vector using a differential predictor for a control point motion vector differential value of a current block according to an embodiment of the present invention. [Diagram 46] 4 illustrates how a control point motion vector of a current block is obtained using a differential predictor according to one embodiment of the present invention. [Figure 47] 13 is a diagram illustrating a method for obtaining a control point motion vector of a current block using a differential predictor according to another embodiment of the present invention. [Figure 48] FIG. 2 illustrates how a differential predictor is obtained according to one embodiment of the present invention. [Figure 49] FIG. 4 illustrates how a difference vector predictor for a current block is determined according to one embodiment of the present invention. [Figure 50] 13 illustrates how control point motion vector differential values of a current block are signaled. [Figure 51] 13 is a diagram illustrating a method for deriving a control point motion vector of a current block according to another embodiment of the present invention. [Figure 52] 4 illustrates how multiple control point motion vectors for affine motion compensation of a current block are derived in accordance with one embodiment of the present invention. [Diagram 53] 1 illustrates various embodiments in which a current block is divided into a plurality of sub-blocks. [Figure 54] 1 illustrates a method of dividing a current block according to an intra prediction mode of the current block. [Figure 55] 4 illustrates a method for dividing a current block into a plurality of sub-blocks based on sample values of reference samples of the current block according to an embodiment of the present invention. [Figure 56] 1 illustrates a method for determining primary and secondary sub-block groups according to an embodiment of the present invention. [Figure 57] 1 illustrates how primary and secondary sub-block groups are predicted according to one embodiment of the present invention. [Figure 58] 4 illustrates the order in which coding tree units are processed according to one embodiment of the present invention. [Figure 59] 1 illustrates a bi-directional intra prediction method according to an embodiment of the present invention. [Figure 60] 1 illustrates a method for predicting each of a number of sub-blocks divided from a current block according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0021] 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.
[0022] In this specification, some terms are interpreted as follows. Coding may be interpreted as encoding or decoding depending on the circumstances. In this specification, an apparatus for encoding a video signal to generate a video signal bitstream is referred to as an encoding apparatus or encoder, and an apparatus for decoding a video signal bitstream to restore a video signal is referred to as a decoding apparatus or decoder. In this specification, a video signal processing apparatus is used as a term including both an encoder and a decoder. Information is a term including values, parameters, coefficients, elements, etc., and may be interpreted differently depending on the circumstances, so the present invention is not limited thereto. A "unit" is used to mean a basic unit of image processing or a specific position of a picture, and refers to an image area including at least one of a luma component and a chroma component. In addition, a "block" refers to an image area including a specific component of a luma component and a chroma component (i.e., Cb and Cr). However, depending on the embodiment, the terms "unit", "block", "partition", and "area" may be used interchangeably. In this specification, a unit is used as a concept including a coding unit, a prediction unit, and a transform unit, and a picture refers to a field or a frame, and the terms are used interchangeably depending on the embodiment.
[0023] 1 is a schematic block diagram of a video signal encoding apparatus 100 according to an embodiment of the present invention. Referring to FIG. 1, the encoding apparatus 100 of the present specification 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.
[0024] The transform unit 110 transforms a residual signal, which is a difference between an input video signal and a prediction signal generated by the prediction unit 150, to obtain transform coefficient values. For example, a discrete cosine transform (DCT), a discrete sine transform (DST), or a wavelet transform is used. The discrete cosine transform and the discrete sine transform divide the input picture signal into blocks and perform the transform. In the transform, the coding efficiency may vary depending on the distribution and characteristics of values in the transform domain. The quantizer 115 quantizes the transform coefficient values output from the transform unit 110.
[0025] In order to improve coding efficiency, a method is used in which a picture signal is not directly coded, but a picture is predicted using a previously coded area through a prediction unit 150, and a residual value between an original picture and a predicted picture is added to the predicted picture to obtain a reconstructed picture. In order to prevent mismatch between the encoder and the decoder, when the encoder performs prediction, information that can also be used by the decoder should be used. For this purpose, the encoder performs a process of further reconstructing the current block that has been coded. The inverse quantization unit 120 inversely quantizes the transform coefficient values, and the inverse transform unit 125 reconstructs the residual values using the inversely quantized transform coefficient values. Meanwhile, the filtering unit 130 performs a filtering operation to improve the quality of the reconstructed picture and the coding efficiency. For example, a deblocking filter, a sample adaptive offset (SAO), an adaptive loop filter, etc. may be included. The filtered picture is stored in a decoded picture buffer (DPB) 156 to be output or used as a reference picture.
[0026] The prediction unit 150 includes an intra prediction unit 152 and an inter prediction unit 154. The intra prediction unit 152 performs intra prediction within a current picture, and the inter prediction unit 154 performs inter prediction to predict the current picture using a reference buffer stored in a decoded picture buffer 156. The intra prediction unit 152 performs intra prediction from reconstructed samples within the current picture, and transmits intra coding information to the entropy coding unit 160. The intra coding information includes at least one of an intra prediction mode, a Most Probable Mode (MPM) flag, and an MPM index. The intra coding information includes information regarding the reference sample. The inter prediction unit 154 includes a motion estimation unit 154a and a motion compensation unit 154b. The motion estimation unit 154a obtains a motion vector value of the current region by referring to a specific region of the reconstructed reference signal picture. The motion estimation unit 154a transmits a motion information set (reference picture index, motion vector information) for the reference region to the entropy coding unit 160. The motion compensation unit 154b performs motion compensation using the motion vector value transmitted from the motion compensation unit 154a. The inter prediction unit 154 transmits inter coding information including the motion information set for the reference region to the entropy coding unit 160.
[0027] According to a further embodiment, the prediction unit 150 includes an intra block copy (BC) prediction unit (not shown). The intra BC prediction unit performs intra BC prediction from reconstructed samples in the current picture and transmits intra BC coding information to the entropy coding unit 160. The intra BC prediction unit obtains block vector values indicating a reference region to be used for predicting the current region by referring to a specific region in the current picture. The intra BC prediction unit performs intra BC prediction using the obtained block vector values. The intra BC prediction unit transmits the intra BC coding information to the entropy coding unit 160. The intra BC prediction unit includes the block vector information.
[0028] When the above-mentioned picture prediction is performed, the transform unit 110 converts residual values between the original picture and the predicted picture to obtain transform coefficient values. At this time, the transform is performed in units of specific blocks within the picture, and the size of the specific blocks varies within a preset range. The quantization unit 115 quantizes the transform coefficient values generated by the transform unit 110 and transfers the quantized values to the entropy coding unit 160.
[0029] The entropy coding unit 160 performs entropy coding on the quantized transform coefficients, intra-coded information, and inter-coded information to generate a video signal bit stream. The entropy coding unit 160 uses a variable length coding (VLC) method and an arithmetic coding method. The variable length coding (VLC) method 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 method, a context-based adaptive variable length coding (CAVLC) method is used. In arithmetic coding, continuous data symbols are converted into one prime number, and arithmetic coding obtains the optimal prime number bits required to represent each symbol. As the arithmetic coding, a context-based adaptive binary arithmetic coding (CABAC) method is used.
[0030] The generated bitstream is encapsulated in a basic unit of Network Abstraction Layer (NAL) units. An NAL unit includes an integer number of coded 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. Meanwhile, information required for decoding the video signal bitstream is transmitted via Raw Byte Sequence Payload (RBSP) of higher level sets such as a Picture Parameter Set (PPS), a Sequence Parameter Set (SPS), a Video Parameter Set (VPS), etc.
[0031] 1 illustrates an encoding apparatus 100 according to one embodiment of the present invention, with separate blocks illustrating logically distinct elements of encoding apparatus 100. Thus, the elements of encoding apparatus 100 described above may be implemented on a single chip or multiple chips depending on the device design. According to one embodiment, the operation of each element of encoding apparatus 100 described above is performed by a processor (not shown).
[0032] 2 is a schematic block diagram of a video signal decoding device 200 according to an embodiment of the present invention. Referring to FIG. 2, the decoding device 200 of the present invention 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.
[0033] The entropy decoding unit 210 entropy decodes the video signal bitstream to extract transform coefficients, intra-coding information, inter-coding information, etc. for each region. The inverse quantization unit 220 inverse quantizes the entropy decoded transform coefficients, and the inverse transform unit 225 restores residual values using the inverse quantized transform coefficients. The video signal processing device 200 combines the residual values obtained from the inverse transform unit 225 with a predictor obtained from the prediction unit 250 to restore original pixel values.
[0034] 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 (DPB) 256 to be used as a reference picture for the next picture.
[0035] The prediction unit 250 includes an intra prediction unit 252 and an inter prediction unit 254. The prediction unit 250 generates a predicted picture using the coding type, the transform coefficient for each region, the intra / inter coding information, etc., decoded through the entropy decoding unit 210. To restore the current block to be decoded, the current picture including the current block or a decoded region of another picture can be used. A picture (or tile / slice) that uses only the current picture for restoration, i.e., performs only intra prediction or intra BC prediction, is called an intra picture or I picture (or tile / slice), and a picture (or tile / slice) that can perform all of intra prediction, inter prediction, and intra BC prediction is called an inter picture (or tile / slice). Among interpictures (or tiles / slices), a picture (or tile / slice) that uses at most one motion vector and reference picture index to predict sample values of each block is called a predictive picture or P picture (or tile / slice), and a picture (or tile / slice) that uses at most two motion vectors and reference picture indexes is called a bi-predictive picture or B picture (or tile / slice). In other words, a P picture (or tile / slice) uses at most one motion information set to predict each block, and a B picture (or tile / slice) uses at most two motion information sets to predict each block. Here, a motion information set includes one or more motion vectors and one reference picture index.
[0036] The intra prediction unit 252 generates a prediction block using intra coding information and reconstructed samples in the current picture. As described above, the intra coding information includes at least one of an intra prediction mode, a MOST Probable Mode (MPM) flag, and an MPM index. The intra prediction unit 252 predicts sample values of the current block using reconstructed samples located to the left and / or above the current block as reference samples. In the present disclosure, the reconstructed samples, the reference samples, and the samples of the current block refer to pixels. Also, a sample value refers to a pixel value.
[0037] In one embodiment, the reference samples are samples included in neighboring blocks of the current block. For example, the reference samples are samples adjacent to the left boundary and / or the top boundary of the current block. Also, the reference samples are samples located on a line within a preset distance from the left boundary of the current block and / or samples located on a line within a preset distance from the top boundary of the current block among samples of neighboring blocks of the current block. In this case, the neighboring blocks of the current block include at least one of a left (L) block, an upper (A) block, a below left (BL) block, an above right (AR) block, or an above left (AL) block adjacent to the current block.
[0038] The inter prediction unit 254 generates a prediction block using the reference picture and inter coding information stored in the decoded picture buffer 256. The inter coding information includes a motion information set (reference picture index, motion vector, etc.) of a current block with respect to a reference block. Inter prediction includes L0 prediction, L1 prediction, and bi-prediction. L0 prediction means a prediction using one reference picture included in an L0 picture list, and L1 prediction means a prediction using one reference picture included in an L1 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, a maximum of two reference regions are used, and the two reference regions may exist in the same reference picture or may exist in different pictures. That is, in the bi-prediction method, a maximum of 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) either before or after the current picture in terms of time.
[0039] The inter prediction unit 254 obtains a current reference block using a motion vector and a reference picture index. The reference block exists in a reference picture corresponding to the reference picture index. In addition, a sample value of a block identified by the motion vector or an interpolated value thereof is used as a predictor of the current block. 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, the inter prediction unit 254 performs motion compensation to predict the texture of the current unit from a previously restored picture. In this case, the inter prediction unit uses a motion information set.
[0040] According to a further embodiment, the prediction unit 250 may include an intra BC prediction unit (not shown). The intra BC prediction unit performs intra BC prediction from reconstructed samples in the current picture and transmits intra BC coding information to the entropy coding unit 160. The intra BC prediction unit obtains block vector values of a current region indicating a specific region in the current picture. The intra BC prediction unit may perform intra BC prediction using the obtained block vector values. The intra BC prediction unit transmits intra BC coding information to the entropy coding unit 160. The intra BC coding information may include block vector information.
[0041] A reconstructed video picture is generated by adding the predictor output from the intra prediction unit 252 or the inter prediction unit 254 and the residual value output from the inverse transformation unit 225. That is, the video signal decoding apparatus 200 reconstructs a current block using the predicted block generated by the prediction unit 250 and the residual obtained from the inverse transformation unit 225.
[0042] 2 shows a block diagram of a decoding apparatus 200 according to an embodiment of the present invention, with separate blocks illustrating the logically distinct elements of the decoding apparatus 200. Thus, the elements of the decoding apparatus 200 described above may be implemented on a single chip or multiple chips depending on the device design. According to an embodiment, the operation of each element of the decoding apparatus 200 described above is performed by a processor (not shown).
[0043] FIG. 3 illustrates an embodiment in which a coding tree unit (CTU) is divided into coding units (CUs) in a picture. In the process of coding a video signal, a picture is divided into a sequence of coding tree units (CTUs). A coding tree unit consists of two blocks, an NXN block of luma samples and a corresponding chroma sample. A coding tree unit is divided into a plurality of coding units. A coding tree unit may be a leaf node without being divided. In this case, the coding tree unit itself may be a coding unit. A coding unit refers to a basic unit for processing a picture in the above-mentioned video signal processing process, i.e., in the process of intra / inter prediction, transformation, quantization, and / or entropy coding. In one picture, the size and pattern of the coding units are not constant. The coding units have a square or rectangular pattern. A rectangular coding unit (or rectangular block) includes a vertical coding unit (or vertical block) and a horizontal coding unit (or horizontal block). In this specification, a vertical block is a block whose height is greater than its width, and a horizontal block is a block whose width is greater than its height. In addition, in this specification, a non-square block refers to a rectangular block, but the present invention is not limited to this.
[0044] Referring to Figure 3, the coding tree unit is first divided into a quad tree (QT) structure. That is, in the quad tree structure, one node having a size of 2N x 2N is divided into four nodes having a size of N x N. In this specification, the quad tree is also referred to as a quaternary tree. The quad tree division is performed recursively, and it is not necessary that all nodes are divided to the same depth.
[0045] Meanwhile, the leaf node of the above-mentioned quad tree is further divided into a Multi-Type Tree (MTT) structure. According to an embodiment of the present invention, in the Multi-Type Tree structure, one node is divided into a horizontally or vertically divided binary or ternary tree structure. That is, the Multi-Type Tree structure has four division structures, namely, vertical binary division, horizontal binary division, vertical ternary division, and horizontal ternary division. According to an embodiment of the present invention, in each of the tree structures, the width and height of the node are both powers of 2. For example, in a Binary Tree (BT) structure, a node of size 2N×2N is divided into two N×2N nodes by vertical binary division and divided into two 2N×N nodes by horizontal binary division. In addition, in a Ternary Tree (TT) structure, a node of size 2N x 2N is divided into (N / 2) x 2N, N x 2N, and (N / 2) x 2N nodes by vertical ternary division, and into 2N x (N / 2), 2N x N, and 2N x (N / 2) nodes by horizontal ternary division. Such multi-type tree division is performed recursively.
[0046] A leaf node of a multi-type tree can be a coding unit. If no division is indicated for a coding unit or the coding unit is not larger than the maximum transform length, the coding unit is used as a unit of prediction and transformation without further division. Meanwhile, in the above-mentioned quad tree and multi-type tree, at least one of the following parameters is predefined or transmitted via the RBSP of a higher level set such as PPS, SPS, VPS, etc. 1) CTU size: size of the root node of the quad tree, 2) MinQT size (MinQtSize): size of the minimum QT leaf node allowed, 3) MaxBt size (MaxBtSize): size of the maximum BT root node allowed, 4) MaxTt size (MaxTtSize): size of the maximum TT root node allowed, 5) MaxMttDepth (MaxMttDepth): maximum allowed depth of MTT division from the QT leaf node, 6) MinBt size (MinBtSize): size of the minimum BT leaf node allowed, 7) MinTT size: size of the minimum TT leaf node allowed.
[0047] 4 illustrates an embodiment of a method for signaling the split of a quad tree and a multi-type tree. A preset flag may be used to signal the split of the quad tree and the multi-type tree. Referring to FIG. 4, at least one of a flag 'qt_split_flag' indicating whether to split a quad tree node, a flag 'mtt_split_flag' indicating whether to split a multi-type tree node, a flag 'mtt_split_vertical_flag' indicating the split direction of a multi-type tree node, or a flag 'mtt_split_binary_flag' indicating the split type of a multi-type tree node may be used.
[0048] According to an embodiment of the present invention, the coding tree unit is the root node of a quad tree and can be split into a quad tree structure in advance. In the quad tree structure, 'qt_split_flag' is signaled for each node 'QT_node'. If the value of 'qt_split_flag' is 1, the corresponding node is split into four regular square nodes, and if the value of 'qt_split_flag' is 0, the corresponding node becomes a leaf node 'QT_leaf_node' of the quad tree.
[0049] Each quad tree leaf node 'QT_leaf_node' can be further split into a multi-type tree structure. In the multi-type tree structure, 'mtt_split_flag' is signaled for each node 'MTT_node'. If the value of 'mtt_split_flag' is 1, the corresponding node is split into multiple rectangular nodes, and if the value of 'mtt_split_flag' is 0, the corresponding node becomes the leaf node 'MTT_leaf_node' of the multi-type tree. If the multi-type tree node 'MTT_node' is split into multiple rectangular nodes (i.e., if the value of 'mtt_split_flag' is 1), 'mtt_split_vertical_flag' and 'mtt_split_binary_flag' can be additionally signaled for the node 'MTT_node'. If the value of 'mtt_split_vertical_flag' is 1, the node 'MTT_node' is split vertically, and if the value of 'mtt_split_vertical_flag' is 0, the node 'MTT_node' is split horizontally. If the value of 'mtt_split_binary_flag' is 1, the node 'MTT_node' is split into two rectangular nodes, and if the value of 'mtt_split_binary_flag' is 0, the node 'MTT_node' is split into three rectangular nodes.
[0050] 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.
[0051] 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, but the present invention is not limited thereto, and in a broader sense, the term "unit" is understood as a concept including the coding unit.
[0052] 5 and 6 are diagrams illustrating in more detail an intra prediction method according to an embodiment of the present invention. As described above, the intra prediction unit predicts sample values of a current block using reconstructed samples located to the left and / or above the current block as reference samples.
[0053] First, Fig. 5 shows an example of a reference sample used to predict a current block in an intra prediction mode. According to an example, the reference sample is a sample adjacent to the left boundary and / or the top boundary of the current block. As shown in Fig. 5, if the size of the current block is W x H and a sample of a single reference line adjacent to the current block is used for intra prediction, the reference sample is set using up to 2W + 2H + 1 neighboring samples located to the left and / or top of the current block.
[0054] According to a further embodiment of the present invention, samples on a plurality of reference lines may be used for intra prediction of a current block. The plurality of reference lines may be composed of n lines located within a preset distance from a boundary of the current block. In this case, separate reference line information indicating at least one reference line used for intra prediction of the current block may be signaled. Specifically, the reference line information may include an index indicating any one of the plurality of reference lines.
[0055] Also, if at least some samples used as reference samples have not yet been restored, the intra prediction unit performs a reference sample padding process to obtain reference samples. Also, the intra prediction unit performs a reference sample filtering process to reduce an error in intra prediction. That is, filtering is performed on the neighboring samples and / or the reference samples obtained by the reference sample padding process to obtain filtered reference samples. The intra prediction unit predicts samples of the current block using unfiltered reference samples or filtered reference samples. In the present disclosure, the neighboring samples include samples on at least one reference line. For example, the neighboring samples may include neighboring samples on a line adjacent to a boundary of the current block.
[0056] Next, FIG. 6 illustrates an embodiment of a prediction mode used in intra prediction. For intra prediction, intra prediction mode information indicating an intra prediction direction can be signaled. The intra prediction mode information indicates one of a plurality of intra prediction modes constituting an intra prediction mode set. If the current block is an intra predicted block, the decoder receives the intra prediction mode information of the current block from the bitstream. The intra prediction unit of the decoder performs intra prediction on the current block based on the extracted intra prediction mode information.
[0057] According to an embodiment of the present invention, the intra prediction mode set includes all intra prediction modes (e.g., a total of 67 intra prediction modes) used in intra prediction. More specifically, the intra prediction mode set includes a planar mode, a DC mode, and a plurality of (e.g., 65) angle modes (i.e., directional modes). In some embodiments, the intra prediction mode set may be composed of a portion of all intra prediction modes. Each intra prediction mode is indicated by a pre-set index (i.e., an intra prediction mode index). For example, as shown in FIG. 6, intra prediction mode index 0 indicates a planar mode, and intra prediction mode index 1 indicates a DC mode. In addition, intra prediction mode indexes 2 to 66 indicate different angle modes, respectively. In this case, intra-prediction mode index 2 indicates horizontal diagonal (HDIA) mode, intra-prediction mode index 18 indicates horizontal (HOR) mode, intra-prediction mode index 34 indicates diagonal (DIA) mode, intra-prediction mode index 50 indicates vertical (VER) mode, and intra-prediction mode index 66 indicates vertical diagonal (VDIA) mode.
[0058] Hereinafter, an inter prediction method according to an embodiment of the present invention will be described with reference to Figure 7. In this disclosure, the inter prediction method may include a general inter prediction method optimized for translation motion and an affine model based inter prediction method which will be described later with reference to Figures 31 to 52. Also, the motion vector may include at least one of a general motion vector for motion compensation according to the general inter prediction method and a control point motion vector for affine motion compensation.
[0059] FIG. 7 illustrates an inter-prediction method according to an embodiment of the present invention. As described above, a decoder can predict a current block by referring to reconstructed samples of other decoded pictures. Referring to FIG. 7, the decoder obtains a reference block 702 in a reference picture 720 based on a motion information set of a current block 701. In this case, the motion information set may include a reference picture index and a motion vector 703. The reference picture index indicates a reference picture 720 in a reference picture list in which a reference block for inter-prediction of the current block is included. According to an embodiment, the reference picture list may include at least one of the above-mentioned L0 picture list or L1 picture list. The motion vector 703 indicates an offset between the coordinate value of the current block 701 in the current picture 710 and the coordinate value of the reference block 702 in the reference picture 720. The decoder obtains a predictor of the current block 701 based on a sample value of the reference block 702, and reconstructs the current block 701 using the predictor.
[0060] Specifically, the encoder can obtain the reference block by searching for a block similar to the current block in a picture with an earlier reconstruction order. For example, the encoder can search for a reference block in which the sum of differences between the current block and sample values is the smallest within a preset search area. In this case, at least one of SAD (Sum Of Absolute Difference) and SATD (Sum of Hadamard Transformed Difference) can be used to measure the similarity between the current block and the reference block samples. Here, SAD can be a value obtained by adding up all the absolute values of the differences between sample values included in two blocks. Also, SATD can be a value obtained by adding up all the absolute values of Hadamard transform coefficients obtained by performing Hadamard transform on the differences between sample values included in two blocks.
[0061] Meanwhile, the current block may be predicted using one or more reference regions. As described above, the current block may be inter-predicted by a bi-prediction method using two or more reference regions. According to an embodiment, the decoder may obtain two reference blocks based on two sets of motion information of the current block. Also, the decoder may obtain a first predictor and a second predictor of the current block based on sample values of each of the obtained two reference blocks. Also, the decoder may reconstruct the current block using the first predictor and the second predictor. For example, the decoder may reconstruct the current block based on a sample-by-sample average of the first predictor and the second predictor.
[0062] As described above, one or more motion information sets can be signaled for motion compensation of the current block. In this case, similarity between the motion information sets for each of the motion compensation of a plurality of blocks can be used. For example, the motion information set used for predicting the current block can be derived from the motion information set used for predicting one of the other samples that have already been reconstructed. Through this, the encoder and decoder can reduce signaling overhead. Hereinafter, various embodiments in which the motion information set of the current block is signaled will be described.
[0063] 8 is a diagram illustrating a method of signaling a motion vector of a current block according to an embodiment of the present invention. According to an embodiment of the present invention, the motion vector of the current block can be derived from a motion vector predictor (MVP) of the current block. According to an embodiment, the motion vector predictor referred to for deriving the motion vector of the current block can be obtained using a motion vector predictor (MVP) candidate list. The MVP candidate list can include a preset number of MVP candidates (Candidate 1, Candidate 2, ..., Candidate N).
[0064] According to an embodiment, the MVP candidate list may include at least one of spatial candidates and temporal candidates. The spatial candidates may be a motion information set used to predict a neighboring block within a certain range from the current block in the current picture. The spatial candidates may be configured based on available neighboring blocks of the current block. Also, the temporal candidates may be a motion information set used to predict a block in the current picture and another picture. For example, the temporal candidates may be configured based on a specific block corresponding to the position of the current block in a specific reference picture. In this case, the position of the specific block indicates the position of the top-left sample of the specific block in the reference picture. According to a further embodiment, the MVP candidate list may include a zero motion vector. According to a further embodiment, a rounding process may be performed on the MVP candidates included in the MVP candidate list of the current block. In this case, the resolution of the motion vector difference value of the current block described below may be used. For example, each MVP candidate of the current block may be rounded based on the resolution of the motion vector difference value of the current block.
[0065] In this disclosure, the MVP candidate list may include an advanced temporal motion vector prediction (ATMVP) list, a merge candidate list for merge inter prediction, a control point motion vector candidate list for affine motion compensation, a subblock-based temporal motion vector prediction (STMVP) list for subblock-based motion compensation, and combinations thereof.
[0066] According to an embodiment, the encoder 810 and the decoder 820 may configure an MVP candidate list for motion compensation of the current block. For example, among samples reconstructed prior to the current block, there may be candidates corresponding to samples that may be predicted based on the same or similar motion information set as the motion information set of the current block. The encoder 810 and the decoder 820 may configure an MVP candidate list for the current block based on a plurality of corresponding candidate blocks. In this case, the encoder 810 and the decoder 820 may configure the MVP candidate list according to a rule predefined between the encoder 810 and the decoder 820. That is, the MVP candidate lists configured by the encoder 810 and the decoder 820 may be the same as each other.
[0067] Also, the predefined rule may vary according to the prediction mode of the current block. For example, if the prediction mode of the current block is an affine prediction mode based on an affine model, the encoder and decoder may configure the MVP candidate list of the current block using a first method based on the affine model. The first method may be a method of obtaining a control point motion vector candidate list. This will be described in detail with reference to Figures 31 to 52. Meanwhile, if the prediction mode of the current block is a general inter prediction mode not based on the affine model, the encoder and decoder may configure the MVP candidate list of the current block using a second method not based on the affine model. In this case, the first method and the second method may be different methods.
[0068] The decoder 820 may derive a motion vector of the current block based on one of at least one MVP candidates included in the MVP candidate list of the current block. For example, the encoder 810 may signal an MVP index indicating a motion vector predictor to be referenced to derive a motion vector of the current block. The decoder 820 may obtain a motion vector predictor of the current block based on the signaled MVP index. The decoder 820 may derive a motion vector of the current block using the motion vector predictor. According to an embodiment, the decoder 820 may use the motion vector predictor obtained from the MVP candidate list for the motion vector of the current block without a separate motion vector differential value. The decoder 820 may reconstruct the current block based on the motion vector of the current block. An inter prediction mode in which a motion vector predictor obtained from the MVP candidate list is used for the motion vector of the current block without a separate motion vector differential value may be referred to as a merge mode.
[0069] According to another embodiment, the decoder 820 may obtain a separate motion vector difference for the motion vector of the current block. The decoder 820 may obtain the motion vector of the current block by summing the motion vector predictor obtained from the MVP candidate list and the motion vector difference value of the current block. In this case, the encoder 810 may signal a motion vector difference value (MV difference) indicating a difference between the motion vector of the current block and the motion vector predictor. A method of signaling the motion vector difference value will be described in detail with reference to FIG. 9. The decoder 820 may obtain the motion vector of the current block based on the motion vector difference value (MV difference). The decoder 820 may restore the current block based on the motion vector of the current block.
[0070] Additionally, a reference picture index for motion compensation of the current block may be signaled. In the prediction mode of the current block, the encoder 810 may signal a reference picture index indicating a reference picture including a reference block. The decoder 820 may obtain a POC of a reference picture referenced for reconstruction of the current block based on the signaled reference picture index. In this case, the POC of the reference picture may be different from the POC of a reference picture corresponding to the MVP referenced for deriving a motion vector of the current block. In this case, the decoder 820 may perform motion vector scaling. That is, the decoder 820 may obtain an MVP' by scaling the MVP. In this case, the motion vector scaling may be performed based on the POC of the current picture, the POC of the signaled reference picture of the current block, and the POC of the reference picture corresponding to the MVP. Also, the decoder 820 may use the MVP' as a motion vector predictor of the current block.
[0071] As described above, the motion vector of the current block can be obtained by adding the motion vector predictor of the current block and the motion vector differential value. In this case, the motion vector differential value can be signaled from the encoder. The encoder can generate information indicating the motion vector differential value by encoding the motion vector differential value, and signal the information. Hereinafter, a method of signaling the motion vector differential value according to an embodiment of the present invention will be described.
[0072] 9 is a diagram illustrating a method of signaling a motion vector differential value of a current block according to an embodiment of the present invention. According to an embodiment, information indicating the motion vector differential value may include at least one of absolute value information of the motion vector differential value or sign information of the motion vector differential value. The absolute value and sign of the motion vector differential value may be encoded separately.
[0073] According to one embodiment, the absolute value of the motion vector difference value may not be signaled by the value itself. The encoder may reduce the size of the signaled value using at least one flag indicating a characteristic of the absolute value of the motion vector difference value. The decoder may derive the absolute value of the motion vector difference value from the signaled value using the at least one flag.
[0074] For example, the at least one flag may include a first flag indicating whether the absolute value of the motion vector differential value is greater than N, where N may be an integer. If the size of the absolute value of the motion vector differential value is greater than N, a value (absolute value of the motion vector differential value-N) may be signaled together with the activated first flag. In this case, the activated flag may indicate that the size of the absolute value of the motion vector differential value is greater than N. The decoder may obtain the absolute value of the motion vector differential value based on the activated first flag and the signaled value.
[0075] 9, a second flag (abs_mvd_greater0_flag) indicating whether the absolute value of the motion vector differential value is greater than '0' may be signaled. If the second flag (abs_mvd_greater0_flag[]) indicates that the absolute value of the motion vector differential value is not greater than '0', the absolute value of the motion vector differential value may be '0'. Also, if the second flag (abs_mvd_greater0_flag) indicates that the absolute value of the motion vector differential value is greater than '0', the decoder may obtain the absolute value of the motion vector differential value using other information regarding the motion vector differential value.
[0076] According to one embodiment, a third flag (abs_mvd_greater1_flag) may be signaled to indicate whether the absolute value of the motion vector differential value is greater than '1.' If the third flag (abs_mvd_greater1_flag) indicates that the absolute value of the motion vector differential value is not greater than '1,' the decoder may determine that the absolute value of the motion vector differential value is '1.'
[0077] On the other hand, if the third flag (abs_mvd_greater1_flag) indicates that the absolute value of the motion vector differential value is greater than '1', the decoder can obtain the absolute value of the motion vector differential value using further information on the motion vector differential value. For example, the value (absolute value of the motion vector differential value - 2) (abs_mvd_minus2) can be signaled. This is because if the absolute value of the motion vector differential value is greater than '1', the absolute value of the motion vector differential value can be a value of 2 or more.
[0078] As described above, the absolute value of the motion vector differential value of the current block may be transformed into at least one flag. For example, the transformed absolute value of the motion vector differential value may indicate (absolute value of the motion vector differential value-N) depending on the size of the motion vector differential value. According to an embodiment, the transformed absolute value of the motion vector differential value may be signaled through at least one bit. In this case, the number of bits signaled to indicate the transformed absolute value of the motion vector differential value may be variable. The encoder may encode the transformed absolute value of the motion vector differential value using a variable length binarization method. For example, the encoder may use at least one of truncated unary binarization, unary binarization, truncated rice, or exp-Golomb binarization as the variable length binarization method.
[0079] Also, the sign of the motion vector differential value can be signaled through a sign flag (mvd_sign_flag) or can be implicitly signaled through sign-bit-hiding (sign-bit-hiding), which will be described with reference to Figures 23 to 28.
[0080] Meanwhile, the motion vector differential value of the current block may be signaled in a specific resolution unit. In the present disclosure, the resolution of the motion vector differential value may indicate a unit in which the motion vector differential value is signaled. That is, in the present disclosure, the resolution excluding the resolution of the picture may indicate the precision or granularity in which the motion vector differential value is signaled. The resolution of the motion vector differential value may be expressed in units of samples or pixels. For example, the resolution of the motion vector differential value may be expressed using a sample unit such as ¼, ½, 1 (integer), 2, or 4 sample units. In addition, the smaller the resolution of the motion vector differential value of the current block, the higher the precision of the motion vector differential value of the current block.
[0081] According to an embodiment of the present invention, the motion vector differential value may be signaled based on various resolutions. According to an embodiment, the absolute value or the transformed absolute value of the motion vector differential value may be signaled in integer sample units. Alternatively, the absolute value of the motion vector differential value may be signaled in 1 / 2-sub-pel units. That is, the resolution of the motion vector differential value may be set differently depending on the situation. An encoder and a decoder according to an embodiment of the present invention may efficiently signal the motion vector differential value of a current block by appropriately utilizing various resolutions for the motion vector differential value.
[0082] According to an embodiment, the resolution of the motion vector differential value may be set to a different value for at least one unit of a block, a coding unit, a slice, or a tile. For example, the first resolution of the motion vector differential value of the first block may be in units of 1 / 4 samples. In this case, '64', which is a value obtained by dividing the absolute value '16' of the motion vector differential value by the first resolution, may be signaled. Also, the second resolution of the motion vector differential value of the second block may be in units of integer samples. In this case, '16', which is a value obtained by dividing the absolute value '16' of the second motion vector differential value by the second resolution, may be signaled. In this way, even if the absolute values of the motion vector differential values are the same, different values may be signaled depending on the resolution. In this case, if the value obtained by dividing the absolute value of the motion vector differential value by the resolution includes a decimal point, a rounding function may be applied to the corresponding value.
[0083] The encoder may signal information indicating a motion vector differential value based on the resolution of the motion vector differential value. The decoder may obtain a modified motion vector differential value from the signaled motion vector differential value. The decoder may modify the motion vector differential value based on the resolution of the resolution differential value. The relationship between the signaled motion vector differential value (valuePerResolution) and the modified motion vector differential value (valueDetermined) of the current block is as shown in Equation 1 below. Hereinafter, in this disclosure, unless otherwise specified, the motion vector differential value indicates the modified motion vector differential value (valueDetermined). Also, the signaled motion vector differential value indicates a value before being modified according to the resolution.
[0084]
number
[0085] In [Equation 1], result indicates the resolution of the motion vector differential value of the current block. That is, the decoder can obtain a modified motion vector differential value by multiplying the signaled motion vector differential value of the current block by the resolution. Then, the decoder can obtain the motion vector of the current block based on the modified motion vector differential value. Also, the decoder can restore the current block based on the motion vector of the current block.
[0086] When a relatively small value is used for the resolution of the motion vector differential value of the current block (i.e., when the accuracy is high), it may be advantageous to indicate the motion vector differential value of the current block more precisely. However, in this case, the signaled value itself becomes large, and the signaling overhead for the motion vector differential value of the current block may increase. Conversely, when a relatively large value is used for the resolution of the motion vector differential value of the current block (i.e., when the accuracy is low), the size of the signaled value can be reduced, and the signaling overhead for the motion vector differential value can be reduced. That is, when the resolution of the motion vector differential value is high, the motion vector differential value of the current block can be signaled through a smaller number of bits than when the resolution of the motion vector differential value of the current block is low. However, in this case, it may be difficult to indicate the motion vector differential value of the current block precisely.
[0087] Thus, the encoder and the decoder can select an advantageous resolution for signaling a motion vector differential value among a plurality of resolutions depending on the situation. For example, the encoder can signal a selected resolution depending on the situation. Also, the decoder can obtain a motion vector differential value of a current block based on the signaled resolution. Hereinafter, a method for signaling a resolution of a motion vector differential value of a current block according to an embodiment of the present invention will be described. According to an embodiment of the present invention, the resolution of the motion vector differential value of the current block may be any one of a plurality of available resolutions included in a resolution set. Here, the plurality of available resolutions may indicate resolutions that can be used in a specific situation. Also, the type and number of available resolutions included in a resolution set may change depending on the situation.
[0088] 10 is a diagram illustrating a method of signaling a resolution of a motion vector differential value of a current block according to an embodiment of the present invention. According to an embodiment, a resolution indicator indicating a resolution of a motion vector differential value of a current block among a plurality of available resolutions may be signaled. An encoder may signal a resolution indicator together with information indicating a motion vector differential value. A decoder may obtain a resolution of a motion vector differential value of a current block based on a resolution indicator indicating any one of a plurality of available resolutions included in a resolution set of the current block. The decoder may obtain a motion vector differential value of a current block based on the obtained resolution of the motion vector differential value.
[0089] According to an embodiment, the resolution indicator may be represented by a variable length of bits. For example, the resolution indicator may indicate any one of a plurality of resolution indexes indicating each of a plurality of available resolutions in the resolution set of the current block. In this case, the resolution index may be represented by a variable length of bits having a preset maximum length. For example, the resolution indicator may include two or more flags, each of which is represented by one bit. The preset maximum length may be a length determined by the number of a plurality of available resolutions. For example, if the available resolution set includes three available resolutions, the preset maximum length may be '2'. In the present disclosure, the resolution index may also be referred to as a value of the resolution indicator. Referring to FIG. 10, the value of the resolution indicator may be any one of 0, 10, or 11.
[0090] In the embodiment of FIG. 10, the resolution set for motion compensation of the current block may include available resolutions of 1 / 4, 1, and 4 samples. In this case, the resolution of the motion vector difference value of the current block may be any one of the available resolutions (1 / 4, 1, and 4) shown in FIG. 10. According to an embodiment, the smallest available resolution (i.e., the resolution with the highest accuracy) among the multiple available resolutions may be signaled by an indicator value using the shortest length of bits. For example, the available resolution of 1 / 4 samples, which is the smallest value among the available resolutions of 1 / 4, 1, and 4 samples, may be indicated by an indicator value of '0' using the shortest length of bits. In addition, the remaining available resolutions may be indicated by indicator values expressed as '10' and '11', respectively.
[0091] Meanwhile, when the resolution indicator is expressed by bits of variable length, the signaling overhead can be reduced when the available resolution indicated using the shortest bit length is used as the resolution of the motion vector differential value of the current block. Thus, among the multiple available resolutions, the available resolution that is most likely to be selected as the resolution of the motion vector differential value of the current block can be set to be signaled using the shortest bit length. That is, the available resolutions indicated by the resolution indicators of the same indicator value can be changed depending on the situation. This will be described in detail with reference to Figures 11 and 12. In addition, the resolution set of the current block can be configured with an available resolution that is advantageous depending on the situation. That is, the configuration of the multiple available resolutions included in the resolution set of the current block can be changed depending on the situation. This will be described in detail with reference to Figure 13.
[0092] 11 and 12 are diagrams illustrating a method of signaling the resolution of a motion vector difference value of a current block according to another embodiment of the present invention. Although FIG. 11 illustrates a resolution set including three available resolutions, the present disclosure is not limited thereto. In the embodiment of FIG. 11, the resolution set may include a first available resolution (Resolution 1), a second available resolution (Resolution 2), and a third available resolution (Resolution 3). In addition, a value of a resolution indicator indicating each of the available resolutions included in the resolution set may be any one of 0, 10, and 11.
[0093] In this case, the available resolution indicated by the resolution indicator of the same indicator value may change depending on the situation. For example, the indicator value using the shortest bit length among the resolution indicator values may indicate the first available resolution in the first situation (case 1) and the second available resolution in the second situation (case 2). The first available resolution and the second available resolution may be different from each other.
[0094] Referring to 'case 1' of Fig. 11, a first available resolution (Resolution 1), a second available resolution (Resolution 2), and a third available resolution (Resolution 3) may be available resolutions indicated when the resolution indicator has values of 0, 10, and 11, respectively. In contrast, referring to 'case 2' of Fig. 11, a first available resolution (Resolution 1), a second available resolution (Resolution 2), and a third available resolution (Resolution 3) may be available resolutions indicated when the resolution indicator has values of 10, 0, and 11, respectively.
[0095] FIG. 12 illustrates the embodiment of FIG. 11 in more detail. Depending on the situation, the resolution of the motion vector difference value of the current block can be signaled by the method of FIG. 12(a) or the method of FIG. 12(b). In the embodiment of FIG. 12, the resolution set can include available resolutions of 1 / 4, 1, and 4 sample units. Also, each available resolution can be indicated by a different indicator value depending on the situation. For example, referring to FIG. 12(a), the available resolutions of 1 / 4, 1, and 4 sample units can be signaled by 10, 0, and 11, respectively. That is, the smallest available resolution among the multiple available resolutions can be indicated by an indicator value using the shortest length of bits. Such a signaling method can be used in a situation where it is advantageous to signal the motion vector difference value of the current block based on the smallest available resolution among the multiple available resolutions.
[0096] Also, referring to FIG. 12(b), available resolutions of 1 / 4, 1, and 4 sample units can be signaled by 10, 11, and 0, respectively. That is, according to an embodiment of the present invention, it may be advantageous to signal a motion vector difference value of a current block based on an available resolution that is not the smallest available resolution among a plurality of available resolutions depending on the situation. In this case, an available resolution that is not the smallest available resolution among a plurality of available resolutions can be indicated by an indicator value using a shortest length of bits. For example, a maximum available resolution among a plurality of available resolutions can be indicated by an indicator value using a shortest length of bits.
[0097] In addition, the configuration of the available resolutions included in the resolution set may be changed depending on the situation. Figure 13 is a diagram showing an embodiment in which the configuration of the available resolutions included in the resolution set is changed. According to an embodiment of the present invention, in a first situation (case 1), the resolution of the motion vector difference value can be obtained from the first situation resolution set, and in a second situation (case 2), the resolution of the motion vector difference value can be obtained from the second situation resolution set.
[0098] According to an embodiment, the first situation resolution set may include a first available resolution (Resolution 1), a second available resolution (Resolution 2), and a third available resolution (Resolution 3). Also, the second situation resolution set may include a fourth available resolution (Resolution A), a fifth available resolution (Resolution B), and a sixth available resolution (Resolution C). In this case, some of the available resolutions included in the first situation resolution set may be the same as some of the available resolutions included in the second situation resolution set. That is, a specific available resolution may be included in both the first situation resolution set and the second situation resolution set.
[0099] According to a specific embodiment, the first situation resolution set may be configured with available resolutions of 1 / 4, 1, and 4 sample units. Also, the second situation resolution set may be configured with available resolutions of 1 / 4, 1 / 2, and 1 sample units. That is, the second situation resolution set may include another available resolution instead of the largest available resolution among the multiple available resolutions included in the first situation resolution set. In this case, the other available resolution may be an available resolution smaller than the largest available resolution. Also, the largest available resolution among the available resolutions included in the second situation resolution set may be smaller than the largest available resolution among the available resolutions included in the first situation resolution set. According to an embodiment, the first situation resolution set may be advantageous in a situation where a reduction in signaling overhead is required compared to a situation where an increase in accuracy of the motion vector differential value is required. Conversely, the second situation resolution set may be advantageous in a situation where an increase in accuracy of the motion vector differential value is required compared to a situation where a reduction in signaling overhead is required.
[0100] Meanwhile, the accuracy of the motion vector difference value required may vary depending on the prediction mode of the current block. For example, motion compensation based on an affine model may be motion prediction for irregular motion other than translation motion. Therefore, when the prediction mode of the current block is a motion compensation mode based on an affine model, it may be necessary to signal the motion vector difference value more precisely than in the existing general inter prediction mode. The MVP candidate list of the current block may be configured in different ways depending on the prediction mode of the current block. Thus, the configuration of the multiple available resolutions included in the resolution set of the current block may vary depending on the method of configuring the MVP candidate list for motion compensation of the current block.
[0101] In addition, the larger the resolution of the motion vector differential value of the current block, the smaller the size of the motion vector differential value to be signaled. Thus, when the absolute value of the motion vector differential value of the current block is relatively large, it may be preferable to signal the motion vector differential value in a larger resolution unit than when the motion vector differential value of the current block is small. In this case, the motion vector differential value is a value indicating the difference between the motion vector and the motion vector predictor. Thus, the more similar the motion vector predictor of the current block is to the motion vector of the current block, the smaller the absolute value of the motion vector differential value of the current block may be. Meanwhile, the probability that the similarity between the motion vector and the motion vector predictor of the current block is high may vary depending on the method of constructing the MVP candidate list for motion compensation of the current block. Thus, the configuration of a plurality of available resolutions included in the resolution set of the current block may vary depending on the method of constructing the MVP candidate list for motion compensation of the current block.
[0102] According to one embodiment, the situations mentioned in the above-mentioned embodiments through Figures 10 to 13 may refer to a method in which the MVP candidate list of the current block is configured. As described above through Figure 8, the MVP candidate list for motion compensation of the current block may be configured based on any one of a number of methods. The MVP candidate list of the current block may be configured in a different manner depending on the prediction mode of the current block. That is, the situations mentioned in the above-mentioned embodiments may be defined as depending on which of a number of methods the MVP candidate list for motion compensation of the current block is configured using.
[0103] According to an embodiment of the present invention, the configuration of the multiple available resolutions included in the resolution set of the current block may vary depending on the method of constructing the MVP candidate list of the current block. For example, the encoder and decoder may use any one of the first and second methods described above to construct the MVP candidate list for the current block. In this case, the configuration of the multiple available resolutions included in the resolution set of the current block may vary depending on which of the first and second methods described above is used to construct the MVP candidate list of the current block.
[0104] According to an embodiment, if the MVP candidate list for motion compensation of the current block is constructed using the first method, the resolution of the motion vector difference value of the current block can be obtained from the first resolution set. If the MVP candidate list for motion compensation of the current block is constructed using the second method, the resolution of the motion vector difference value of the current block can be obtained from the second resolution set. In this case, some of the available resolutions constituting the first resolution set and the available resolutions constituting the second resolution set may be different from each other. For example, the second resolution set may include at least one available resolution other than the available resolutions included in the first resolution set.
[0105] As described above, the first method may be a method of constructing an MVP candidate list based on an affine model, and the second method may be a method of constructing an MVP candidate list without based on an affine model. Motion compensation based on an affine model may be a motion prediction for irregular motion other than translation motion. Therefore, it may be necessary to signal motion vector difference values more precisely than in the existing general inter prediction method.
[0106] Accordingly, the first resolution set may include another available resolution instead of the largest available resolution among the plurality of available resolutions included in the second resolution set. In this case, the other available resolution may be a smaller available resolution than the largest available resolution. Also, the largest available resolution among the available resolutions included in the first resolution set may be smaller than the largest available resolution among the available resolutions included in the second resolution set. For example, the largest available resolution among the available resolutions included in the first resolution set may be a resolution of one sample unit. In this case, the largest available resolution among the available resolutions included in the second resolution set may be a resolution of four sample units.
[0107] According to a specific embodiment, the first resolution set may be configured with available resolutions of 1 / 4, 1 / 2, and 1 sample units. In this case, the second resolution set may be configured with available resolutions of 1 / 4, 1, and 4 sample units. According to another specific embodiment, the first resolution set may be configured with available resolutions of 1 / 16, 1 / 4, and 1 sample units. In this case, the second resolution set may be configured with available resolutions of 1 / 4, 1, and 4 sample units.
[0108] As described above, the decoder may determine the resolution of the motion vector differential value of the current block using the signaled resolution indicator. For example, the decoder may obtain a resolution indicator indicating the resolution of the motion vector differential value of the current block from among a plurality of available resolutions included in any one of the first resolution set and the second resolution set. Also, the decoder may obtain a modified motion vector differential value of the current block based on the resolution indicator. The decoder may reconstruct the current block based on the modified motion vector differential value.
[0109] According to an embodiment of the present invention, an available resolution indicated by a specific value of the resolution indicator value may vary depending on whether the MVP candidate list is configured using the first method or the second method. According to an embodiment, a decoder may acquire a resolution indicator having a first value. If the MVP candidate list for motion compensation of a current block is configured using the first method, the available resolution indicated by the first value may be the seventh available resolution. If the MVP candidate list for motion compensation of a current block is configured using the second method, the available resolution indicated by the first value may be the eighth available resolution. In this case, the seventh available resolution and the eighth available resolution may be different resolutions.
[0110] According to an embodiment, the seventh available resolution may be an available resolution included in both the first resolution set and the second resolution set. If the MVP candidate list for motion compensation of the current block is constructed using the second method, the seventh available resolution may be indicated by a second value different from the first value. For example, the first value may be any one of '10, 11' or any one of '00, 01'. In this case, the second value may be any one of '10, 11' different from the first value, or any one of '00, 01' different from the first value.
[0111] Meanwhile, as described above, it may be advantageous to signal, using the shortest bit length, an available resolution that is most likely to be selected as the resolution of the motion vector differential value of the current block among the multiple available resolutions. According to one embodiment, the smallest available resolution among the available resolutions included in the first resolution set may be smaller than the smallest available resolution among the available resolutions included in the second resolution set.
[0112] That is, the available resolutions included in the second resolution set may be relatively large resolutions. Accordingly, when the MVP candidate list for motion compensation of the current block is constructed using the second method, it may be necessary to increase the accuracy of the motion vector difference value. As described above, when it is necessary to increase the accuracy of the motion vector difference value, it may be advantageous to signal the smallest available resolution among the multiple available resolutions using the shortest number of bits. According to an embodiment, the third value may be a value expressed using the shortest number of bits among the values of the resolution indicator.
[0113] According to an embodiment, if the MVP candidate list for motion compensation of the current block is constructed using the second method, the third value may indicate the smallest available resolution among the available resolutions included in the second resolution set. According to an embodiment, the smallest available resolution among the available resolutions included in the second resolution set may be 1 / 4.
[0114] Also, the available resolutions included in the first resolution set may be relatively small resolutions. Thus, when the MVP candidate list for motion compensation of the current block is configured using the first method, it may be necessary to reduce signaling overhead for motion vector differential values. Therefore, when the MVP candidate list for motion compensation of the current block is configured using the first method, the third value may indicate another available resolution other than the smallest available resolution among the multiple available resolutions included in the first resolution set. According to an embodiment, the third value may indicate the largest available resolution, the second smallest available resolution, or the second largest available resolution among the multiple available resolutions included in the first resolution set. For example, the other available resolution other than the smallest available resolution among the multiple available resolutions included in the first resolution set may be any one of 1 / 4, 1 / 2, 1, and 4.
[0115] Meanwhile, according to another embodiment of the present invention, the configuration of available resolutions included in the resolution set of the current block may vary depending on the MVP index indicating the motion vector predictor of the current block. The MVP index may indicate which candidate in the MVP candidate list of the current block is the motion vector predictor referenced to derive the motion vector of the current block.
[0116] 14 is a diagram illustrating an embodiment of a method for signaling the resolution of a motion vector difference value of a current block by a motion vector predictor of the current block. For example, a decoder may obtain an MVP index indicating a motion vector predictor to be referred to for motion compensation of a current block from an MVP candidate list for motion compensation of the current block. In this case, the available resolution indicated by a specific value of the resolution indicator of the current block may vary depending on whether the MVP index is larger or smaller than a preset index.
[0117] In the MVP candidate list of the current block, a motion vector predictor candidate corresponding to a smaller MVP index may have a higher probability of being similar to the motion vector of the current block. Also, the more similar the motion vector predictor of the current block is to the motion vector of the current block, the smaller the absolute value of the motion vector difference value of the current block may be. Thus, if the MVP index corresponding to the motion vector predictor of the current block is smaller than the preset MVP index, the smallest available resolution among the multiple available resolutions included in the resolution set of the current block may be indicated by a value expressed using the shortest length of bits among the resolution indicator values.
[0118] On the other hand, if the MVP index corresponding to the motion vector predictor of the current block is greater than the preset MVP index, a specific available resolution that is not the smallest available resolution among the multiple available resolutions included in the resolution set of the current block may be indicated by a value expressed using the shortest length of bits among the resolution indicator values. In this case, the specific available resolution may be the largest resolution among the multiple available resolutions, or the second largest or second smallest resolution among the multiple available resolutions.
[0119] 14, the resolution set of the current block may include available resolutions of 1 / 4, 1, and 4 sample units. Also, if the MVP index for motion compensation of the current block is smaller than the preset MVP index (Candidate 1, Candidate 2), the resolution of 1 / 4 unit, which is the smallest available resolution among 1 / 4, 1, and 4, may be signaled using the shortest number of bits. On the other hand, if the MVP index for motion compensation of the current block is larger than the preset MVP index (Candidate N), the resolution of 1 or 4 unit among 1 / 4, 1, and 4 may be signaled using the smallest number of bits.
[0120] 15 is a diagram illustrating another embodiment of a method for signaling the resolution of a motion vector differential value by a motion vector predictor of a current block. As described above with reference to FIG. 14, the method for signaling the resolution of a motion vector differential value of a current block may change depending on the MVP index for motion compensation of the current block.
[0121] As described above, the MVP candidate list for motion compensation of the current block may include candidates obtained by various methods. According to an embodiment, the MVP candidate list for motion compensation of the current block may include at least one of spatial candidates, temporal candidates, or zero motion vectors. In this case, the configuration of the multiple available resolutions included in the resolution set of the current block may vary depending on the manner in which the motion vector predictor of the current block is a candidate obtained. This is because the similarity with the current block estimated by the motion vector predictor candidate may differ. For example, in the case of a spatial candidate, it may be estimated that the probability of similarity with the current block is high. In addition, it may be estimated that the motion vector predictor candidates such as a temporal candidate and a zero motion vector are less likely to be similar to the current block than the spatial candidate.
[0122] For example, if the motion vector predictor of the current block is one of the spatial candidates, the smallest available resolution among the multiple available resolutions included in the resolution set of the current block can be indicated by a value expressed using the shortest length of bits among the resolution indicator values.
[0123] Also, if the motion vector predictor of the current block is not one of the spatial candidates, a specific available resolution that is not the smallest available resolution among the multiple available resolutions included in the resolution set of the current block may be indicated by a value expressed using the shortest bit length among the resolution indicator values. In this case, the specific available resolution may be the largest resolution among the multiple available resolutions, or the second largest or second smallest resolution among the multiple available resolutions.
[0124] 13 to 15, each of the different resolution sets is illustrated as including the same number of available resolutions, but the present disclosure is not limited thereto. According to an embodiment of the present invention, each resolution set may include a different number of available resolutions. For example, the first resolution set may include three available resolutions. Meanwhile, the third resolution set used in the third situation may include two available resolutions. The encoder and decoder may configure resolution sets including different numbers of available resolutions depending on the situation.
[0125] As described above, the motion information set may include a reference picture index indicating a reference picture of the current block. The decoder may obtain the POC of the reference picture of the current block from the signaled reference picture index. According to an embodiment of the present invention, the configuration of the available resolutions included in the resolution set of the current block may vary depending on the POC of the current picture and the POC of the reference picture. According to an embodiment, some of the available resolutions constituting the resolution set of the current block may be excluded based on the POC of the current picture and the POC of the reference picture.
[0126] For example, if the POC of the reference picture is the same as the POC of the current picture, the resolution of the motion vector difference value of the current block can be obtained from the fourth resolution set. Also, if the POC of the reference picture is not the same as the POC of the current picture, the resolution of the motion vector difference value of the current block can be obtained from the fifth resolution set. In this case, the fourth resolution set can be configured with the remaining available resolutions excluding the smallest available resolution among the available resolutions included in the fifth resolution set. That is, the number of available resolutions configuring the resolution set of the current block can change depending on the POC of the current picture and the POC of the reference picture.
[0127] According to another embodiment of the present invention, the resolution of the motion vector differential value of the current block may be signaled in different ways depending on a quantization parameter (QP). For example, one of the signaling methods described above in FIG. 11 to FIG. 15 may be determined depending on the QP of the current block. Also, the resolution of the motion vector differential value of the current block may be signaled using the determined signaling method. According to an embodiment, the smaller the QP of the current block, the smaller the resolution of the motion vector differential value of the current block may be.
[0128] According to another embodiment of the present invention, the resolution of the motion vector differential value of the current block may be signaled by different methods depending on the frame rate. For example, any one of the signaling methods described above through FIG. 11 to FIG. 15 may be determined depending on the frame rate of the video signal including the current block. Also, the resolution of the motion vector differential value of the current block may be signaled using the determined signaling method. According to an embodiment, the higher the frame rate of the video signal, the shorter the time interval between frames and the higher the probability that the motion vector is small. Thus, the higher the frame rate of the current block, the smaller the resolution of the motion vector differential value of the current block may be.
[0129] According to another embodiment of the present invention, the resolution of the motion vector difference value of the current block may be signaled in different ways depending on the size ratio or size difference between the current block and its neighboring blocks. For example, one of the signaling methods described above with reference to Figures 11 to 15 may be determined depending on the size ratio or size difference between the current block and its neighboring blocks. The above-described embodiment may be applied in the same or a corresponding way when a motion vector other than a motion vector difference value is directly signaled.
[0130] Meanwhile, according to a further embodiment of the present invention, the encoder and the decoder may modify the motion vector predictor before adding the motion vector differential value. Through this, the size of the motion vector differential value used to obtain the motion vector of the current block may be reduced. In this case, the modification of the motion vector predictor may be performed only when some of the motion vector predictor candidates included in the MVP candidate list of the current block are selected as the motion vector predictor of the current block. For example, when a motion vector predictor candidate corresponding to an MVP index smaller than a preset MVP index among the motion vector predictor candidates included in the MVP candidate list of the current block is used as the motion vector predictor of the current block, the modification of the corresponding motion vector predictor may be performed.
[0131] According to an embodiment, a method of signaling a plurality of available resolutions included in a resolution set may vary depending on whether a motion vector predictor is modified. For example, if a motion vector predictor of a current block is modified, the smallest available resolution among the plurality of available resolutions included in a resolution set may be signaled using the smallest number of bits. Also, if a motion vector predictor of a current block is not modified, one of the other resolutions other than the smallest available resolution among the plurality of available resolutions included in a resolution set may be signaled using the smallest number of bits.
[0132] According to another embodiment, the motion vector predictor may be modified after adding the motion vector differential value. In this case, the resolution of the motion vector differential value of the current block may be signaled in a different manner than when the motion vector predictor is modified before adding the motion vector differential value. When the motion vector predictor is modified after the motion vector differential value is added, even if the accuracy of the motion vector differential value is low, the prediction error may be reduced through the motion vector modification process. Thus, when the motion vector predictor of the current block is modified before adding the motion vector differential value, one of the other resolutions that is not the smallest available resolution among the multiple available resolutions included in the resolution set may be signaled using the smallest number of bits. Conversely, when the motion vector predictor of the current block is not modified before adding the motion vector differential value, the smallest available resolution among the multiple available resolutions included in the resolution set may be signaled using the smallest number of bits.
[0133] According to a further embodiment, the motion vector modification process to be performed later may be changed depending on what kind of candidate the motion vector or motion vector predictor of the current block is. The process of modifying the motion vector may include a process for searching for a more accurate motion vector. For example, the decoder may search for a block matching with the current block from a reference point according to a predefined method. The reference point may be a position corresponding to the determined motion vector or motion vector predictor. The motion vector search may be performed by various methods. For example, template matching or bilateral matching may be used for the search. In this case, the degree of movement from the reference point may be changed according to the predefined method. Making the motion vector modification process different may mean making the degree of movement from the reference point different.
[0134] For example, a detailed correction process may be started for an accurate motion vector predictor candidate, and a less detailed correction process may be started for an inaccurate motion vector predictor candidate. In the present disclosure, an accurate motion vector predictor candidate and an inaccurate motion vector predictor candidate may be determined according to a position in an MVP candidate list. Also, an accurate motion vector predictor candidate and an inaccurate motion vector predictor candidate may be determined according to a method by which each motion vector predictor candidate is generated. The method by which a motion vector predictor candidate is generated may indicate which position of the candidate corresponds to among spatial candidates of the current block. Also, the detailed and less detailed corrections may be whether the block is searched while moving little by little from a reference point, or while moving a lot. Also, when searching while moving a lot, a process of searching while moving little by little from the best matching block found while moving a lot may be added.
[0135] The above-mentioned template matching method may be a method of acquiring a comparison block having the smallest difference from the template of the current block based on a difference in value between the template of the current block and the template of the comparison block to be compared. The template of a specific block may be acquired based on neighboring samples of the specific block. FIG. 16 is a diagram illustrating a method of acquiring a resolution of a motion vector difference value based on the template matching method according to an embodiment of the present invention. According to an embodiment of the present invention, the resolution of the motion vector difference value of the current block may not be signaled. According to an embodiment, the decoder may acquire the resolution of the current block based on the same cost calculation as the template matching method. As described above, the reference block may be acquired based on a motion vector predictor and a motion vector difference value. In this case, the motion vector difference value may be a motion vector difference value modified according to the resolution of the motion vector difference value of the current block. As a result, the position of the reference block in the reference picture may change depending on the resolution of the motion vector difference value of the current block.
[0136] According to an embodiment, a resolution set for motion compensation of a current block may be configured with preset available resolutions. Referring to FIG. 16, the resolution set of the current block may include a first available resolution (Resolution 1), a second available resolution (Resolution 2), and a third available resolution (Resolution 3). A plurality of reference block candidates corresponding to each available resolution included in the resolution set of the current block may be obtained based on a reference point 1601 indicated by a motion vector predictor of the current block. A reference block candidate may be obtained as many as the number of available resolutions included in the resolution set. According to a specific embodiment, the plurality of reference block candidates may include a first reference block candidate 1602 corresponding to the first available resolution, a second reference block candidate 1603 corresponding to the second available resolution, and a third reference block candidate 1604 corresponding to the third available resolution. The decoder may use any one of the plurality of reference block candidates as a reference block of the current block. For example, the decoder may select a reference block candidate with the lowest cost as a reference block of the current block based on a template matching result between each of the plurality of reference block candidates and the current block. Also, the decoder can reconstruct the current block based on the corresponding reference block.
[0137] According to another embodiment, the resolution of the motion vector difference value of the current block may be signaled based on the template matching result between each of the above-mentioned reference block candidates and the current block. For example, the above-mentioned template matching operation may be performed in the same manner in the encoder as in the decoder. Also, the encoder may signal the available resolution corresponding to the reference block candidate with the lowest cost based on the template matching result using the fewest number of bits.
[0138] In this case, the encoder and the decoder may perform template matching only for some of the reference block candidates. For example, among the first reference block candidate 1602, the second reference block candidate 1603, and the third reference block candidate 1604 in FIG. 16, template matching with the current block may be performed only for the first reference block candidate 1602 and the second reference block candidate 1603. Also, based on the template matching results between the first reference block candidate 1602 and the second reference block candidate 1603 and the current block, an available resolution to be signaled using the shortest bit length among the available resolutions included in the resolution set of the current block may be determined. Any one of the first available resolution and the second available resolution may be signaled using the shortest bit length. Also, the third available resolution corresponding to the reference block candidate that does not perform template matching with the remaining one of the first available resolution and the second available resolution may be signaled using additional bits. Through this, the encoder and the decoder may reduce the amount of calculation required for the template matching method.
[0139] According to an embodiment, the embodiment described through FIG. 16 may be applied or not depending on the size of the signaled motion vector difference value. For example, the template matching method may be used only when the signaled motion vector difference value is larger than a preset value. This is because, when the signaled motion vector difference value is smaller than a preset value, the template matching cost difference between reference block candidates according to the resolution may not be clear.
[0140] 17 is a diagram illustrating a method for obtaining a resolution of a motion vector difference value based on a two-sided matching method according to an embodiment of the present invention. According to an embodiment of the present invention, the two-sided matching method can be used instead of the template matching method described in FIG. 16. The two-sided matching method indicates a method for restoring a current block based on each reference block of two or more reference pictures along a motion trajectory. The two-sided matching method may obtain a set of the smallest differences based on the differences between each reference block of two or more reference pictures.
[0141] As described above, when the current block is a bi-predictive block, the current block can be reconstructed based on two or more reference blocks in two or more different reference pictures. Referring to FIG. 17, reference block candidates corresponding to a specific available resolution can be configured for each of a first reference picture (Reference picture 1) and a second reference picture (Reference picture 2). The encoder and the decoder can obtain a reference block in the first reference picture (Reference picture 1) and a reference block in the second reference picture (Reference picture 2) based on a bilateral matching result between the reference block candidate in the first reference picture (Reference picture 1) and the reference block candidate in the second reference picture (Reference picture 2). The embodiment of FIG. 17 can be applied in the same or a corresponding manner to the embodiments described above with reference to FIG. 16.
[0142] According to an embodiment, when a current block is inter-predicted based on two motion information sets corresponding to different reference lists, two motion vector differential values may be signaled separately. In this case, the resolutions applied to the two motion vector differential values may be the same or different. Hereinafter, various methods for signaling the resolutions of the current block for each reference picture list will be described.
[0143] According to an embodiment of the present invention, the resolution of the motion vector difference value for each reference picture list may be determined based on the above-mentioned two-sided matching method. According to an embodiment, the resolution sets corresponding to each of the two reference picture lists may be configured independently of each other. For example, the resolution set corresponding to the first reference picture list L0 may include m available resolutions. Also, the resolution set corresponding to the second reference picture list L1 may include n available resolutions. In this case, the encoder and the decoder may obtain the resolution of each motion vector difference value of the reference picture list based on the two-sided matching result between the n reference block candidates corresponding to the first reference picture list and the m reference block candidates corresponding to the second reference picture list. In this case, the encoder and the decoder must perform (nxm) two-sided matching.
[0144] Alternatively, a common resolution set may be used for the resolution of the motion vector difference value for a plurality of reference picture lists. For example, a resolution set commonly used for the first reference picture list L0 and the second reference picture list L1 may include n available resolutions. According to an embodiment, the same resolution may be applied to the motion vector difference value corresponding to each of the first reference picture list L0 and the second reference picture list L1. In this case, the encoder and the decoder may obtain the resolution of each of the motion vector difference values of the first reference picture list L0 and the second reference picture list L1 based on the n-times bilateral matching results.
[0145] Meanwhile, a difference between a motion vector predictor and a motion vector corresponding to a specific reference picture list may be similar to a difference between a motion vector predictor and a motion vector corresponding to another reference picture list. In this case, the resolution of a motion vector difference value corresponding to a specific reference picture list may be likely to be the same as the resolution of a motion vector difference value corresponding to another reference picture list. Therefore, according to an embodiment of the present invention, the resolution of a motion vector difference value corresponding to a specific reference picture list of a current block may be the same as the resolution of a motion vector difference value corresponding to another reference picture list of the current block.
[0146] Figure 18 is a diagram illustrating a method of signaling the resolution of a motion vector difference value for each reference picture list of a current block according to an embodiment of the present invention. Referring to Figure 18, a first list resolution set (L0 MVD resolution signaling) corresponding to a first reference picture list L0 and a second list resolution set (L1 MVD resolution signaling) corresponding to a second reference picture list L1 can be configured. Also, a first list resolution indicator indicating the resolution of a motion vector difference value corresponding to the first reference picture list L0 and a second list resolution indicator indicating the resolution of a motion vector difference value corresponding to the second reference picture list L1 can be signaled.
[0147] For example, the decoder may obtain a resolution of a motion vector difference value corresponding to a first reference picture list based on a first list resolution set and a first list resolution indicator. Then, the decoder may obtain a resolution of a motion vector difference value corresponding to a second reference picture list based on a second list resolution set and a second list resolution indicator. In this case, one of the available resolutions included in the second list resolution set may be a resolution (L0 resolution) that depends on the resolution of the motion vector difference value corresponding to the first reference picture list.
[0148] According to a specific embodiment, when the second list resolution indicator is a preset value (0), the decoder may determine the resolution of the motion vector differential value corresponding to the second reference picture list based on the resolution of the motion vector differential value corresponding to the first reference picture list. In this case, the decoder may use the same resolution as the resolution of the motion vector differential value corresponding to the first reference picture list for the resolution of the motion vector differential value corresponding to the second reference picture list. In this case, the preset value may be a value expressed using the smallest number of bits among the values of the second list resolution indicator. In addition, the other values of the second list resolution indicator may be used as indicator values indicating the remaining available resolutions (Remaining resolution 1, Remaining resolution 2).
[0149] 18 embodiment, the resolution of the motion vector difference value corresponding to the first reference picture list L0 is determined before the resolution of the motion vector difference value corresponding to the second reference picture list L1, but the present disclosure is not limited thereto. For example, the first list resolution set may include a resolution that depends on the resolution of the motion vector difference value corresponding to the second reference picture list L1.
[0150] FIG. 19 illustrates an embodiment of a method for signaling the resolution of a motion vector differential value of a current block according to the resolution of a picture. According to an embodiment of the present invention, the resolution of a motion vector differential value of a current block may be signaled in a different manner depending on at least one of the resolution or size of a picture. Information regarding the resolution or size of a picture may be signaled from an encoder. A decoder may obtain information regarding the resolution or size of the signaled picture. According to an embodiment, a method for signaling the resolution of a motion vector differential value of a specific block in each of a low resolution picture and a high resolution picture may be different from each other. Referring to FIG. 19, even if the relative distance from a reference point indicated by a motion vector predictor to a position of a reference block in each of a low resolution picture and a high resolution picture is the same, a value for indicating the corresponding distance in the high resolution picture may be larger than a value for indicating the corresponding distance in the low resolution picture.
[0151] Thus, the resolution of the motion vector differential value of the current block may be more likely to be set to a value greater than the resolution of the motion vector differential value of another picture that has a lower picture resolution than the current picture including the current block. Therefore, if the current picture is a high resolution picture, the smallest available resolution among the multiple available resolutions may not be indicated by a value expressed using the shortest bit length. For example, if the current picture is a high resolution picture, the available resolution that is not the smallest available resolution among the multiple available resolutions may be indicated by a value expressed using the shortest bit length. The above-described embodiment may also be applied when the resolution or size of the picture included in the video signal changes, such as in scalable video coding.
[0152] FIG. 20 illustrates a method for signaling the resolution of a motion vector difference value based on the size of a reference picture of a current block according to an embodiment of the present invention. According to an embodiment, the resolution of a motion vector difference value can be signaled based on the size of a reference picture of a current block. FIG. 20 illustrates reference block candidates corresponding to each available resolution included in a resolution set of a current block based on a reference point 2001 indicated by a motion vector predictor of a current block. In FIG. 20, a third reference block candidate corresponding to a third available resolution (Resolution 3) is located outside the reference picture. In this way, if at least a part of a reference block candidate configured based on a specific available resolution is outside the boundary of a reference picture, the corresponding available resolution can be excluded from being signaled. That is, if a point indicated by a motion vector difference value modified based on a specific available resolution with reference to the reference point 2001 is outside the boundary of a current picture, the corresponding available resolution may not be signaled.
[0153] For example, the resolution set may include N available resolutions. In this case, a resolution indicator indicating one of the N available resolutions (NM) excluding M available resolutions may be signaled. In this case, the reference block candidates corresponding to each of the M available resolutions may be reference block candidates outside the boundary of the reference picture. Through this, the encoder and decoder may reduce the signaling overhead for the resolution of the motion vector difference value of the current block by excluding unnecessary available resolutions. As a specific example, when one of the first available resolution (Resolution 1), the second available resolution (Resolution 2), and the third available resolution (Resolution 3) is signaled, a maximum of 2 bits may be used. Meanwhile, when one of the first available resolution (Resolution 1) and the second available resolution (Resolution 2) is signaled, a maximum of 1 bit may be used.
[0154] Referring to FIG. 20, the resolution set may include a first available resolution, a second available resolution, and a third available resolution. In this case, when the signaled motion vector difference value of the current block is modified based on the third available resolution, the motion vector of the current block indicates a point outside the boundary of the reference block. Thus, the encoder may signal a resolution indicator indicating one of the first available resolution and the second available resolution excluding the third available resolution. According to a specific embodiment, the encoder may signal a resolution indicator indicating one of the first available resolution and the second available resolution using one bit.
[0155] Also, the decoder may determine the available resolutions excluded from signaling based on the size of the reference picture of the current block and the signaled motion vector differential value. In the embodiment of Fig. 20, the decoder may recognize that the third available resolution is not signaled. The decoder may obtain the resolution of the motion vector differential value of the current block based on the resolution indicator signaled through one bit.
[0156] According to a further embodiment of the present invention, it may be determined whether to use the method described above in FIG 20 based on the position of the reference point indicated by the motion vector predictor. For example, if the position of the reference point is within a preset distance from the boundary of the reference picture, the method described in FIG 20 may be used.
[0157] According to an embodiment, the embodiment described in FIG. 20 may be applied or not depending on the size of the signaled motion vector differential value. For example, only if the signaled motion vector differential value is larger than a preset value, the encoder and decoder may consider whether there is an available resolution for generating a reference block candidate that is out of the reference picture. If the signaled motion vector differential value is smaller than a preset value, the encoder and decoder may not use the method described in FIG. 20.
[0158] According to a further embodiment, a new available resolution may be used instead of the available resolution excluded from the signaling target. For example, if a reference block candidate corresponding to a motion vector difference value modified based on a specific available resolution is located outside the boundary of a reference picture, the indicator value indicating the specific available resolution may indicate an available resolution different from the specific available resolution. For example, the different available resolution may be a value smaller than the specific available resolution. According to a specific embodiment, the resolution set of the current block may be configured with available resolutions of 1 / 4, 1, and 4 sample units. At least a part of the reference block candidate corresponding to the available resolution of 4 sample units may be located outside the boundary of the reference picture of the current block. In this case, the resolution indicator value indicating the available resolution of 4 sample units may indicate the available resolution of 2 sample units.
[0159] 21 is a flow chart showing a method for obtaining a resolution of a motion vector difference value of a current block according to an embodiment of the present invention. In FIG. 21, the resolution set of the current block is illustrated as including available resolutions of 1 / 4, 1, and 4 sample units, but the present disclosure is not limited thereto. For example, at least a part of the available resolutions of 1 / 4, 1, and 4 sample units can be replaced by a part of the available resolutions of 1 / 2, 2, 1 / 8, and 1 / 16 sample units.
[0160] 21, a decoder may parse a bitstream to obtain a signaled motion vector differential value of a current block (S2101). At this time, the signaled motion vector differential value may be a value expressed in a resolution unit of the motion vector differential value.
[0161] In addition, the decoder may obtain a resolution indicator indicating the resolution of the motion vector differential value of the current block. According to an embodiment, the resolution indicator may indicate any one of a plurality of values expressed by bits of a variable length. The decoder may parse the first bit of the resolution indicator (S2103). Next, the decoder may determine whether the first bit of the resolution indicator is '0' (S2105). If the first bit is '0', an available resolution of 1 / 4 units may be used as the resolution of the motion vector differential value of the current block. In this case, the resolution indicator may not include the second bit described below.
[0162] If the first bit is not '0', the decoder may determine whether the reference block candidate corresponding to the available resolution of 4-sample units is located within the boundary of the reference picture (S2107). Here, the reference block candidate corresponding to the available resolution of 4-sample units may be a reference block candidate indicated by a motion vector candidate obtained based on the available resolution of 4-sample units. Specifically, the motion vector candidate may be a value obtained by adding a motion vector differential value modified based on the available resolution of 4-sample units from the motion vector differential value signaled in step S2101 to a motion vector predictor of a current block. According to an embodiment, if the reference block candidate corresponding to the available resolution of 4-sample units is not located within the boundary of the reference picture, the available resolution of 1 sample unit may be used as the resolution of the motion vector differential value of the current block. In this case, the resolution indicator may not include the second bit described below.
[0163] If the reference block candidate corresponding to the available resolution of 4 sample units is located within the boundary of the reference picture, the decoder may parse the second bit of the resolution indicator (S2109). Next, the decoder may determine the resolution of the motion vector differential value of the current block based on the second bit of the resolution indicator (S2111). For example, the indicator value indicating the available resolution of 1 sample unit may be '10', and the indicator value indicating the available resolution of 4 sample unit may be '11'. If the second bit of the resolution indicator is '0', the decoder may use the available resolution of 1 sample unit for the resolution of the motion vector differential value of the current block. Conversely, if the second bit of the resolution indicator is '1', the decoder may use the available resolution of 4 sample unit for the resolution of the motion vector differential value of the current block.
[0164] In Figure 21, the step of obtaining a signaled motion vector differential value (S2101) is illustrated as preceding the step of parsing the first bit of a resolution indicator (S2103), but the present disclosure is not limited thereto. For example, step S2101 may follow step S2103. According to an embodiment, when the resolution indicator is represented by multiple bits, each bit may be embodied through a separate index or flag in a syntax for video signal processing.
[0165] According to a further embodiment, the step of parsing the second bit of the resolution indicator (S2109) can be performed at least after the step of obtaining the motion vector predictor of the current block. Whether or not the second bit of the resolution indicator is parsed can be determined depending on the position indicated by the motion vector predictor of the current block. As described above, this is because when a reference block candidate corresponding to a specific available resolution is located outside the boundary of the reference picture, signaling for the corresponding available resolution can be omitted. That is, in the syntax in which the video signal is encoded or decoded, the second bit of the resolution indicator can be parsed after the motion vector predictor information of the current block.
[0166] Also, the step of parsing the second bit of the resolution indicator (S2109) may be performed at least after the step of acquiring the signaled motion vector differential value of the current block. Whether or not the second bit of the resolution indicator is parsed may be determined according to the signaled motion vector differential value of the current block. That is, the second bit of the resolution indicator may be parsed after information indicating the motion vector differential value of the current block in a syntax in which a video signal is encoded or decoded.
[0167] FIG. 22 is a flowchart showing a method for acquiring a resolution of a motion vector differential value of a current block according to an embodiment of the present invention. Referring to FIG. 22, a decoder may parse a bitstream to acquire a signaled motion vector differential value of a current block (2001). At this time, the signaled motion vector differential value may be a value expressed in a resolution unit of a motion vector differential value. Also, the decoder may acquire a resolution indicator indicating a resolution of a motion vector differential value of a current block. The decoder may parse an n-th bit of the resolution indicator (S2205). Here, n may be an integer from 1 to N. n may be a value that sequentially increases from 1 to N by a loop operation. If the n-th bit of the resolution indicator is '0', the decoder may use the n-th available resolution as the resolution of a motion vector differential value of a current block. At this time, the n-th available resolution may be an available resolution indicated by an n-th indicator value among available resolutions included in a resolution set of the current block.
[0168] If the n-th bit of the resolution indicator is not '0', the decoder may exclude the n-th available resolution from the previous resolution set (S2207). The decoder may obtain a first current resolution set by excluding the n-th available resolution from the previous resolution set (S2207). According to an embodiment, if n is 1, the decoder may obtain a first current resolution set by excluding the n-th available resolution from an initial resolution set. Next, the decoder may determine whether the number of available resolutions included in the first current resolution set is one (S2209). If the number of available resolutions included in the first current resolution set is one, the decoder may use the available resolution included in the first current resolution set as the resolution of the motion vector differential value of the current block.
[0169] If the number of available resolutions included in the first current resolution set is not one, the decoder may exclude available resolutions corresponding to reference block candidates located outside the boundary of the reference picture from the first current resolution set (S2211). The decoder may obtain a second current resolution set by excluding available resolutions corresponding to reference block candidates located outside the boundary of the reference picture from the first current resolution set.
[0170] Next, the decoder may determine whether the number of available resolutions included in the second current resolution set is one (S2213). If the number of available resolutions included in the second current resolution set is one, the decoder may use the available resolution included in the second current resolution set as the resolution of the motion vector differential value of the current block. If the number of available resolutions included in the first current resolution set is not one, the decoder may perform steps S2203 to S2213 again. Also, the decoder may increment n by 1. In this case, the decoder may use the second current resolution set as the previous resolution set in step S2207 of the next loop operation.
[0171] FIG. 23 is a flowchart showing a method of acquiring a motion vector of a current block according to an embodiment of the present invention. According to an embodiment of the present invention, information indicating a motion vector differential value of the current block may include first information on the motion vector differential value and second information on the motion vector differential value. In this case, the first information and the second information may be different information on the motion vector differential value. Referring to FIG. 23, a decoder may parse the first information on the motion vector differential value. Also, the decoder may parse the second information on the motion vector differential value. Then, the decoder may acquire a motion vector of the current block based on the first information on the motion vector differential value and the second information on the motion vector differential value. According to an embodiment of the present invention, any one of the steps of parsing the first information or the second information on the motion vector differential value in FIG. 23 may be omitted. Hereinafter, a condition in which the first information or the second information on the motion vector differential value of the current block is parsed will be described.
[0172] 24 is a flowchart showing a method for obtaining a motion vector of a current block according to an embodiment of the present invention. According to an embodiment of the present invention, information indicating a motion vector difference value of a current block may include first information on a motion vector difference value and second information on a motion vector difference value. In a specific situation, a motion vector of a current block may be determined through any one of the first information on a motion vector difference value and the second information on a motion vector difference value. Meanwhile, in other situations, it may be difficult to determine one motion vector using only any one of the first information on a motion vector difference value and the second information on a motion vector difference value.
[0173] Referring to FIG. 24, the decoder may parse first information on motion vector differential values. Then, the decoder may obtain a plurality of reference block candidates using the first information on motion vector differential values. The decoder may determine whether all of the plurality of reference block candidates are located within a boundary of the reference picture. If some of the plurality of reference block candidates are located outside a boundary of the reference picture, the decoder may obtain a motion vector of a current block based on the first information on motion vector differential values. If all of the plurality of reference block candidates are located within a boundary of the reference picture, the decoder may parse second information on motion vector differential values. Then, the decoder may obtain a motion vector of a current block based on the first information on motion vector differential values and the second information on motion vector differential values.
[0174] According to an embodiment, the first information for the motion vector differential value of the current block may be information excluding sign information of the motion vector differential value. For example, the first information for the motion vector differential value of the current block may indicate an absolute value of the motion vector differential value of the current block. Also, the second information for the motion vector differential value of the current block may indicate a sign of the motion vector differential value of the current block. According to the above embodiment, the motion vector differential value of a specific block can be obtained without parsing the second information. This allows the encoder and decoder to reduce signaling overhead for the motion vector differential value. Hereinafter, a method for implicitly signaling sign information of the motion vector differential value of the current block will be described in detail.
[0175] FIG. 25 is a diagram illustrating a method of implicitly signaling a sign bit of a motion vector differential value of a current block according to an embodiment of the present invention. As described above with reference to FIG. 9, the information indicating the motion vector differential value may include at least one of absolute value information of the motion vector differential value and sign information of the motion vector differential value. The sign information of the motion vector differential value may be any one of a negative sign (-) or a positive sign (+). Also, the information indicating the motion vector differential value may include absolute value information and sign information for each component. For example, the motion vector differential value of the current block may be composed of an x-axis component and a y-axis component. The x-axis component of the motion vector differential value may include a distance (absolute value) and a direction (sign) on the x-axis between a reference point indicated by the motion vector predictor of the current block and a position of a reference block. Also, the y-axis component of the motion vector differential value may include a distance (absolute value) and a direction (sign) on the y-axis between a reference point indicated by the motion vector predictor of the current block and a position of a reference block. In this case, at least one of the sign information of the x-axis component or the y-axis component of the motion vector differential value of the current block can be implicitly signaled, that is, the above-described sign bit hiding operation can be performed on each of the x-axis component and the y-axis component of the motion vector differential value.
[0176] 25, a fourth reference block candidate (Candidate reference block 1) can be obtained based on an x-axis component of the motion vector differential value of the current block to which a negative sign (-) is applied and a y-axis component of the motion vector differential value of the current block to which a positive sign (+) is applied, and a fifth reference block candidate (Candidate reference block 2) can be obtained based on an x-axis component of the motion vector differential value of the current block to which a positive sign (+) is applied and a y-axis component of the motion vector differential value of the current block to which a positive sign (-) is applied.
[0177] According to an embodiment, when any one of the fourth reference block candidate (Candidate reference block 1) and the fifth reference block candidate (Candidate reference block 2) is located outside the boundary of the reference picture, code information of the x-axis component of the motion vector differential value of the current block may be hidden. In this case, the encoder may not encode the hidden code information. Also, the decoder may determine the code of the motion vector differential value corresponding to the hidden code information without performing a parsing process on the corresponding code information.
[0178] In Figure 25, the fourth reference block candidate (Candidate reference block 1) may be located outside the boundary of the reference picture. In this case, the sign information of the x-axis component of the motion vector differential value of the current block may be hidden. The decoder may obtain the sign information of the x-axis component of the motion vector differential value without parsing the sign information of the x-axis component of the motion vector differential value. The decoder may use a positive sign for the sign of the x-axis component of the motion vector differential value.
[0179] FIG. 26 illustrates a method of implicitly signaling a sign bit of a motion vector differential value of a current block according to an embodiment of the present invention. According to an embodiment, a motion vector predictor of a current block may not be determined before the sign of the motion vector differential value of the current block is determined. For example, the sign of the motion vector differential value of the current block may be determined before an MVP index indicating the MVP of the current block on a syntax for video signal processing is parsed. In this case, the decoder may obtain a plurality of reference block candidates (Candidate reference block A-1, Candidate reference block A-2, Candidate reference block B-1, Candidate reference block B-2) by adding a motion vector differential value to which a negative sign or a positive sign is applied to each of a plurality of MVP candidates (MVP candidate A, MVP candidate B).
[0180] Next, the decoder can determine whether all of the multiple reference block candidates (Candidate reference block A-1, Candidate reference block B-1) based on a specific component of the motion vector differential value to which a negative sign is applied are located outside the boundary of the reference picture. If all of the multiple reference block candidates based on a specific component of the motion vector differential value to which a negative sign is applied are located outside the boundary of the reference picture, the decoder can determine the sign of the specific component of the motion vector differential value of the current block without parsing the sign information of the specific component. In this case, the decoder can use a positive sign as the sign of the specific component of the motion vector differential value of the current block.
[0181] The decoder may also determine whether all of the multiple reference block candidates (Candidate reference block A-2, Candidate reference block B-2) based on a specific component of the motion vector differential value to which a positive sign is applied are located outside the boundary of the reference picture. If all of the multiple reference block candidates based on a specific component of the motion vector differential value to which a positive sign is applied are located outside the boundary of the reference picture, the decoder may determine the sign of the specific component of the motion vector differential value of the current block without parsing the sign information of the specific component. In this case, the decoder may use a negative sign as the sign of the specific component of the motion vector differential value of the current block.
[0182] FIG. 27 illustrates a method of implicitly signaling a sign bit of a motion vector differential value of a current block according to an embodiment of the present invention. According to an embodiment, the resolution of the motion vector differential value of the current block may not be determined before the sign of the motion vector differential value of the current block is determined. For example, the sign of the motion vector differential value of the current block may be determined before a resolution indicator indicating the resolution of the motion vector differential value of the current block on the syntax for video signal processing is parsed. In this case, the decoder may obtain a plurality of reference block candidates (Candidate reference block 1-1, Candidate reference block 1-2, Candidate reference block 2-1, Candidate reference block 2-2) by adding the motion vector differential value to which one of a plurality of available resolutions (res 1, res 2) and one of a negative sign and a positive sign is applied to the motion vector predictor of the current block.
[0183] Next, the decoder may determine whether all of the plurality of reference block candidates (Candidate reference block 2-1, Candidate reference block 1-1) based on a specific component of the motion vector differential value to which a negative sign is applied are located outside the boundary of the reference picture. In this case, the available resolutions applied to the motion vector differential value to configure each of the plurality of reference block candidates based on a specific component of the motion vector differential value to which a negative sign is applied may be different from each other. If all of the plurality of reference block candidates based on a specific component of the motion vector differential value to which a negative sign is applied are located outside the boundary of the reference picture, the decoder may determine the sign of the specific component of the motion vector differential value of the current block without performing an operation of parsing the sign information of the specific component. In this case, the decoder may use a positive sign as the sign of the specific component of the motion vector differential value of the current block.
[0184] The decoder may also determine whether all of the plurality of reference block candidates (Candidate reference block 1-2, Candidate reference block 2-2) based on a specific component of the motion vector differential value to which a positive sign is applied are located outside the boundary of the reference picture. In this case, the available resolutions applied to the motion vector differential value to configure each of the plurality of reference block candidates based on a specific component of the motion vector differential value to which a positive sign is applied may be different from each other. If all of the plurality of reference block candidates based on a specific component of the motion vector differential value to which a positive sign is applied are located outside the boundary of the reference picture, the decoder may determine the sign of the specific component of the motion vector differential value of the current block without parsing the sign information of the specific component. In this case, the decoder may use a negative sign as the sign of the specific component of the motion vector differential value of the current block.
[0185] 25 to 27, the x-axis component of the motion vector differential value is taken as an example for convenience of explanation, but the present disclosure is not limited thereto. For example, the above-described embodiments may be applied in the same or a similar manner to the y-axis component of the motion vector differential value.
[0186] FIG. 28 is a diagram illustrating an example of syntax for the embodiment of FIG. 25 to FIG. 27. Referring to a first syntax order 2801 of FIG. 28, a decoder may determine whether to parse the code information of a motion vector difference value based on the absolute value (|MVD|) of the motion vector difference value. Referring to a second syntax order 2802 of FIG. 28, a decoder may determine whether to parse the code information of a motion vector difference value based on the absolute value (|MVD|) of the motion vector difference value and the resolution (MVD resolution) of the motion vector difference value. Referring to a third syntax order 2803 of FIG. 28, a decoder may determine whether to parse the code information of a motion vector difference value based on the absolute value (|MVD|) of the motion vector difference value, the resolution (MVD resolution) of the motion vector difference value, and the MVP flag.
[0187] 29 is a diagram illustrating a method of signaling the resolution and MVP of a motion vector differential value of a current block according to an embodiment of the present invention. According to an embodiment of the present invention, two or more pieces of information related to a motion vector can be signaled based on one integration indicator. For example, the resolution of the motion vector differential value of the current block and the MVP of the current block can be signaled by one integration indicator (MVR Index).
[0188] As shown in Figure 29, available resolutions mapped to each MVP index can be set in advance. The encoder and decoder can share a table in which each MVP index and available resolutions are mapped to each other. In addition, the encoder and decoder can obtain the MVP of the current block and the resolution of the motion vector difference value of the current block based on the shared table and the integration indicator (MVR index).
[0189] Meanwhile, the accuracy of the motion vector may vary depending on the resolution used to modify the motion vector differential value. For example, the accuracy of the motion vector may decrease as the resolution used to modify the motion vector differential value increases. Thus, when a specific available resolution is used as the resolution of the motion vector differential value of the current block, additional motion vector differential values of the current block may be signaled. Hereinafter, the additional motion vector differential values may be referred to as second to n-th motion vector differential values. Also, the existing motion vector differential value excluding the additional motion vector differential value may be referred to as a first motion vector differential value.
[0190] FIG. 30 is a diagram illustrating a method of deriving a motion vector of a current block based on a plurality of motion vector differential values according to an embodiment of the present invention. According to an embodiment of the present invention, a motion vector of a current block can be obtained using a plurality of motion vector differential values and their corresponding resolutions. For example, if the resolution of the motion vector differential value of the current block is greater than a preset resolution, an additional motion vector differential value can be signaled. According to a specific embodiment, the resolution set of the current block can include available resolutions of 1 / 4, 1, and 4 sample units. In this case, if the resolution of the motion vector differential value of the current block is '4', an additional motion vector differential value can be signaled. Also, the additional motion vector differential value can be signaled based on a resolution smaller than the resolution at which the existing motion vector differential value is signaled. Through this, the encoder and decoder can increase the accuracy of the motion vector and reduce the prediction error.
[0191] Referring to FIG. 30, R1 indicates the resolution of the first motion vector differential value, and R2 indicates the resolution of the second motion vector differential value. Also, MVDval1 indicates the first motion vector differential value signaled in units of R1, and MVDval2 indicates the second motion vector differential value signaled in units of R2. For example, if the resolution (R1) of the first motion vector differential value is greater than the preset resolution, the decoder may obtain the additionally signaled second motion vector differential value (MVDval2). In this case, the resolution (R2) of the second motion vector differential value may be smaller than the resolution (R1) of the first motion vector differential value of the current block.
[0192] Meanwhile, according to an embodiment of the present invention, an inter prediction method or a motion compensation method for a current block may include affine model-based motion compensation (hereinafter, affine motion compensation). According to the existing inter prediction method, inter prediction is performed using only one motion vector for each of L0 prediction and L1 prediction for the current block. Thus, the existing general inter prediction method is optimized for predicting translation motion. However, in order to efficiently perform motion compensation for zoom-in / out, rotation, and other irregular motions, reference blocks of various shapes and sizes must be used. Hereinafter, a method for performing affine motion compensation according to an embodiment of the present invention will be described.
[0193] FIG. 31 illustrates motion compensation based on an affine model according to an embodiment of the present invention. Referring to FIG. 31, in affine motion compensation, prediction of a current block 3101 can be performed using a reference block 3102 having a size, shape, and / or orientation different from that of the current block 3101. That is, the reference block 3102 can have a non-rectangular shape and can be larger or smaller than the current block 3101. The reference block 3102 can be obtained by performing an affine transformation on the current block 3101. Through the affine transformation, scaling, rotation, shearing, reflection, or orthogonal projection can be performed on the current block. According to an embodiment, the affine transformation can be performed using a plurality of control point motion vectors (CPMV). For example, the affine transformation can include a 6-parameter affine transformation using three control point motion vectors and a 4-parameter affine transformation using two control point motion vectors. A specific embodiment of this will be described later.
[0194] FIG. 32 illustrates an embodiment of a 4-parameter affine motion compensation method. In order to reduce the amount of computation and signaling overhead of affine transformation, affine motion compensation can be performed using a preset number of control point motion vectors (CPMVs). A control point motion vector (CPMV) is a motion vector corresponding to a specific control point (or sample position) of a current block. The specific control point may include at least one of the corners of the current block. In an embodiment of the present invention, a CPMV corresponding to the upper left corner of the current block is referred to as v0 (or a first CPMV), a CPMV corresponding to the upper right corner of the current block is referred to as v1 (or a second CPMV), and a CPMV corresponding to the lower left corner of the current block is referred to as v2 (or a third CPMV). A CPMV set including at least two CPMVs can be used for affine motion compensation.
[0195] According to the embodiment of FIG. 32, four-parameter affine motion compensation can be performed using v0 and v1. A current block 3201, represented by a solid line, can be predicted using a reference block 3202 at a position represented by a dotted line. Each sample of the current block 3201 can be mapped to a different reference sample through an affine transformation. More specifically, a motion vector (v x , v y ) can be derived by the following [Equation 2]. In the present disclosure, the sample position may indicate relative coordinates within the current block. For example, the sample position (x, y) may be a coordinate that sets the position of the top left sample of the current block as the origin (0, 0).
[0196]
number
[0197] Here, (v 0x , v 0y ) is the first CPMV, which corresponds to the upper left corner of the current block 3201, and (v 1x , v 1y ) is the second CPMV corresponding to the top right corner of the current block, and w is the width of the current block 3201.
[0198] FIG. 33 illustrates an embodiment of a 6-parameter affine motion compensation method. For accurate prediction of more complicated motion, affine motion compensation using three or more CPMVs can be performed. Referring to FIG. 33, 6-parameter affine motion compensation can be performed using three CPMVs, i.e., v0, v1, and v2. Here, v0 is a CPMV corresponding to the upper left corner of the current block, v1 is a CPMV corresponding to the upper right corner of the current block, and v2 is a CPMV corresponding to the lower left corner of the current block. The motion vectors of each sub-block of the current block can be calculated based on v0, v1, and v2. According to the embodiment of FIG. 33, the current block 3301 shown by the solid line can be predicted using a reference block 3302 at a position shown by the dotted line. Each sample of the current block 3301 can be mapped to a different reference sample through affine transformation. More specifically, the motion vector (mv x , mv y ) can be derived using the following [Equation 3].
[0199]
number
[0200] Here, (mv0 x , mv0 y ) is the first CPMV, which corresponds to the upper left corner of the current block 3301, and (mv1 x , mv1 y ) is the second CPMV corresponding to the upper right corner, and (mv2 x , mv2 y ) is the third CPMV corresponding to the bottom left corner, and w is the width of the current block 3301 and h is the height of the current block 3301.
[0201] FIG. 34 illustrates an embodiment of an affine motion compensation method for a sub-block base. By using affine motion conversion, a motion vector (i.e., a motion vector field) at each sample position of the current block can be induced. However, in order to reduce the amount of calculation, affine motion compensation on a sub-block base can be performed as shown in FIG. 34. Referring to FIG. 34, the current block can include a plurality of sub-blocks. Also, a representative motion vector for each sub-block can be obtained based on a CPMV set (v0, v1, and v2). According to one embodiment, the representative motion vector for each sub-block can be a motion vector corresponding to the intermediate sample position of the corresponding sub-block. According to an additional embodiment, a motion vector with higher accuracy than a general motion vector can be used for the motion vector of the sub-block. For this purpose, a motion compensation interpolation filter can be applied.
[0202] The size of the sub-block for which affine motion compensation is performed can be set in various ways. According to one embodiment of the present invention, the sub-block can have a preset size such as 4×4 or 8×8. According to another embodiment of the present invention, the size M×N of the sub-block can be determined by the following [Equation 4].
[0203]
Equation
[0204] Here, w is the width of the current block, and MvPre is the fractional unit accuracy of the motion vector. (v 2x , v 2y ) is a third CPMV corresponding to the lower left corner of the current block. According to one embodiment, the third CPMV can be calculated by the aforementioned [Equation 2]. max(a, b) is a function that returns the larger value between a and b, and abs(x) is a function that returns the absolute value of x. Also, clip3(x, y, z) is a function that returns x when z < x, returns y when z > y, and returns z in other cases.
[0205] The decoder obtains a motion vector of each sub-block of the current block using the CPMV of the CPMV set. Also, the decoder can obtain a predictor of each sub-block of the current block using the representative motion vector of each sub-block. The predictor of each sub-block can be obtained by combining the predictors of the current block, and the decoder can reconstruct the current block using the predictor of the current block obtained in this manner.
[0206] 35, 36, 37, and 38 illustrate an embodiment of a method for acquiring a control point motion vector set for prediction of a current block. According to an embodiment of the present invention, a CPMV set for affine motion compensation of a current block can be acquired by various methods. More specifically, a CPMV set for prediction of a current block can be acquired by referring to a motion vector information set of one or more neighboring blocks. Also, a motion vector information set indicates a collection of motion vector information of one or more blocks. The neighboring block can indicate a block including a preset neighboring position of the current block. In this case, the neighboring block can be a coding unit including the preset neighboring position, or a region of a preset unit (e.g., 4×4, 8×8) including the neighboring position.
[0207] There may be multiple candidates that can be referred to in order to derive the CPMV of the current block. Therefore, information on the neighboring blocks to be referred to in order to derive the CPMV of the current block may be signaled separately. According to an embodiment of the present invention, a CPMV indicator indicating a motion vector information set to be referred to in order to derive a motion vector of each sub-block of the current block may be signaled. An encoder may signal a CPMV indicator. The CPMV indicator may indicate a motion vector information set of a neighboring block to be referred to in order to derive a motion vector of each sub-block of the current block. A decoder may obtain the indicator and obtain each CPMV of the CPMV set for the current block by referring to the motion vector information set of the neighboring block indicated by the indicator.
[0208] According to a more specific embodiment, an encoder and a decoder may generate a CPMV candidate list consisting of one or more motion vector information set candidates. Each motion vector information set candidate constituting the CPMV candidate list is a motion vector set of a neighboring block that can be used to derive a motion vector of a current block. In this case, a CPMV indicator may be an index indicating one of the motion vector information sets in the CPMV candidate list. The CPMV of the current block may be obtained by referring to a motion vector information set selected based on a CPMV indicator (i.e., an index) in the CPMV candidate list. Hereinafter, various embodiments of motion vector information set candidates that may be included in a CPMV candidate list for deriving motion vector information (or a CPMV set) of a current block will be described.
[0209] FIG. 35 illustrates an embodiment of acquiring a CPMV set of a current block. In the embodiment of FIG. 35, it is assumed that the CPMV set of the current block includes two CPMVs, i.e., v0 and v1. According to an embodiment of the present invention, the CPMV of the current block can be derived from the motion vectors of the neighboring blocks adjacent to the corresponding point. Referring to FIG. 35, v0 can be derived from any one of the motion vectors of the neighboring blocks A, B, and C adjacent to the corresponding point, and v1 can be derived from any one of the motion vectors of the neighboring blocks D and E adjacent to the corresponding point. When the motion vectors of the neighboring blocks A, B, C, D, and E are vA, vB, vC, vD, and vE, respectively, a motion vector information set that can be included in a CPMV candidate list can be derived as shown in the following [Equation 5].
[0210]
number
[0211] That is, a (v0, v1) pair consisting of v0 selected from vA, vB, and vC and v1 selected from vD and vE can be obtained. In this case, v0 is derived from the motion vector of a block adjacent to the upper left corner of the current block, and v1 is derived from the motion vector of a block adjacent to the upper right corner of the current block. According to a further embodiment, motion vector scaling can be performed based on a POC (Picture Order Count) of the current block, POCs of reference pictures of neighboring blocks, and POCs of reference pictures of the current block.
[0212] A CPMV candidate list including the motion vector information set candidates obtained in this manner may be generated, and a CPMV indicator indicating one of the motion vector information sets in the CPMV candidate list may be signaled. According to a further embodiment of the present invention, the CPMV candidate list may also include motion vector information set candidates for inter prediction of other methods. For example, the CPMV candidate list may include motion vector information set candidates obtained based on existing MVP candidates for inter prediction.
[0213] The decoder can derive the CPMV of the current block based on the motion vector information set obtained from the candidate list. According to an embodiment, the decoder can perform affine merge prediction by using the motion vector of the motion vector information set obtained from the candidate list as the CPMV of the current block without a separate motion vector differential value. Such an affine motion compensation method can be referred to as an affine merge prediction mode.
[0214] According to another embodiment, the decoder may obtain a separate motion vector differential value for the CPMV of the current block. The decoder may obtain the CPMV of the current block by adding the motion vector of the motion vector information set obtained from the CPMV candidate list with the motion vector differential value. Such an affine motion compensation method may be referred to as an affine inter prediction mode. A flag or index indicating whether the decoder uses a separate motion vector differential value for affine motion compensation of the current block may be separately signaled. According to a further embodiment, whether a separate motion vector differential value is used for affine motion compensation of the current block may be determined based on the size (e.g., CU size) of the current block. For example, if the size of the current block is equal to or larger than a preset size, the encoder and decoder may be set to use a separate motion vector differential value for affine motion compensation of the current block.
[0215] FIG. 36 illustrates another embodiment of acquiring a CPMV set for a current block. According to another embodiment of the present invention, the CPMV of the current block can be derived from motion vector information of neighboring blocks on which affine motion compensation has been performed. That is, the CPMV of the current block can be derived from the CPMV or motion vector of the neighboring blocks. In this case, the neighboring blocks can include a left neighboring block of the current block and an upper neighboring block of the current block. Referring to FIG. 36(a), the left neighboring block includes a block adjacent to the lower left corner of the current block, i.e., a left block A and a lower left block D. Also, the upper neighboring block includes a block adjacent to the upper left corner of the current block, i.e., an upper left block E, and a block adjacent to the upper right corner of the current block, i.e., an upper block B and an upper right block C. The decoder checks whether the neighboring blocks have been subjected to affine motion compensation in a preset order. According to one embodiment, the preset order can be A, B, C, D, E. If a neighboring block on which affine motion compensation has been performed is found, the decoder obtains a CPMV set for the current block using the CPMV set (or motion vector) of the neighboring block. Referring to the embodiment of Figure 36(b), the CPMV set of the left block A can be used to derive the CPMV set of the current block. That is, the CPMV set (v0, v1) of the current block can be obtained based on the CPMV set (v2, v3, v4) of the left block A.
[0216] According to an embodiment of the present invention, information on neighboring blocks referenced to derive the CPMV of the current block can be separately signaled. In this case, each of the CPMV sets of the neighboring blocks of the current block can be a motion vector information set candidate constituting the above-mentioned CPMV candidate list according to a preset order. More specifically, the motion vector information set candidates can include a first candidate derived from the CPMV (or motion vector) of the left neighboring block of the current block and a second candidate derived from the CPMV (or motion vector) of the upper neighboring block of the current block. In this case, the left neighboring block is a block adjacent to the lower left corner of the current block, and the upper neighboring block is a block adjacent to the upper left corner of the current block or a block adjacent to the upper right corner of the current block. A CPMV candidate list including the motion vector information set candidates obtained in this way can be generated, and a CPMV indicator indicating one of the motion vector information sets in the CPMV candidate list can be signaled. According to an embodiment, the CPMV indicator can indicate position information of the neighboring blocks referenced to derive the motion vector of each sub-block of the current block. The decoder can obtain the CPMV set of the current block by referring to the CPMV set (or motion vector) of the neighboring block indicated by the CPMV indicator.
[0217] According to a further embodiment of the present invention, the CPMV of the current block can be derived based on the CPMV of the neighboring blocks close to the corresponding point. For example, v0 can be obtained by referring to the CPMV of the left neighboring block, and v1 can be obtained by referring to the CPMV of the upper neighboring block. Alternatively, v0 can be obtained by referring to the CPMV of the neighboring block A, D, or E, and v1 can be obtained by referring to the CPMV of the neighboring block B or C.
[0218] 3 illustrates another embodiment of acquiring a CPMV set of a current block. According to an embodiment, the CPMV of the current block can be derived from the CPMV or motion vector of a block on which affine motion compensation has been performed. For example, when a block corresponding to a preset position based on the current block is affine motion compensated, the CPMV of the current block can be derived from the CPMV set or at least one motion vector of the corresponding block. Referring to FIG. 37, the preset positions may be A0 and A1 adjacent to the lower left corner of the current block, B0 and B1 adjacent to the upper right corner, and B2 on the upper left side. In this embodiment, the preset positions may include positions that are not adjacent to the current block. For example, the preset positions may include positions corresponding to the position of the current block in another picture other than the current picture. That is, the CPMV set of the current block can be derived from a spatial candidate or a temporal candidate corresponding to the preset position. The motion information set candidate acquired by the method described in FIG. 37 may be referred to as an inherited candidate or an affine merge candidate.
[0219] As described in Figures 36 and 37, the CPMV of the current block can be derived from the motion vector information of the neighboring blocks on which affine motion compensation has been performed. According to a specific embodiment, the CPMV set ((v_0x, v_0y), (v_1x, v_1y)) for 4-parameter affine motion compensation for the current block can be derived as shown in Equation 6.
[0220]
number
[0221] Here, (v_E0x, v_E0y) may indicate the motion vector used for affine motion compensation of the block above and to the left of the current block, (v_E1x, v_E1y) may indicate the motion vector used for affine motion compensation of the block above and to the right of the current block, and (v_E2x, v_E2y) may indicate the motion vector used for affine motion compensation of the block below and to the left of the current block.
[0222] 38 is a diagram illustrating a method for obtaining a control point motion vector of a current block according to another embodiment of the present invention. According to one embodiment, the CPMV of the current block can be obtained by referring to one or more motion vectors around the current block. In this case, the one or more motion vectors around the current block can include a motion vector other than the motion vector used for affine motion compensation. For example, the CPMV of the current block can be derived from a motion vector of a preset position based on the corresponding point. For example, the preset position can be a position included in a block within a certain distance from a point corresponding to the CPMV to be derived.
[0223] Referring to Figure 38, the first CPMV (mv0), second CPMV (mv1), and third CPMV (mv2) for affine motion compensation of the current block can be derived from the motion vectors of the previously set positions. For example, the first CPMV (mv0) can be derived from the motion vector information of each of the positions A, B, and C around the upper left corner. The second CPMV (mv1) can be derived from the motion vector information of each of the positions D and E around the upper right corner. The third CPMV (mv2) can be derived from the motion vector information of each of the positions F and G around the lower left corner.
[0224] According to an embodiment, the decoder may check the availability of motion vectors at CPMV neighboring positions in a preset order. If a usable motion vector is found, the decoder may obtain the CPMV using the corresponding motion vector. Also, a preset combination of neighboring positions referenced to derive CPMV for each point of the current block may be used. The motion information set candidates obtained by the method described in FIG. 38 may be called constructed candidates or affine inter candidates. The motion vector information sets described in FIG. 35 to FIG. 38 may become motion vector information set candidates constituting a CPMV candidate list according to a preset order.
[0225] 39 is a diagram illustrating a method for obtaining a control point motion vector of a current block according to another embodiment of the present invention. As described above, a plurality of CPMVs can be used for affine motion compensation of a current block. According to an embodiment of the present invention, some of the plurality of CPMVs included in a CPMV set for motion compensation of a current block can be derived based on other parts. For example, the encoder and decoder can obtain CPMVs corresponding to two points of the current block according to the above-described method. Then, the encoder and decoder can derive CPMVs corresponding to different points of the current block from the previously obtained CPMVs.
[0226] Referring to FIG. 39, the first CPMV(mv0 x , mv0 y ), the second CPMV(mv1 x , mv1 y ) to the third CPMV (mv2 x , mv2 y ) is induced or the first CPMV (mv0 x , mv0 y ), the third CPMV(mv2 x , mv2 y ) to the second CPMV(mv1 x , mv1 y In the formula of FIG. 39, w and h may be the width and height of the current block, respectively.
[0227] FIG. 40 illustrates a method for obtaining a control point motion vector of a current block according to an embodiment of the present invention. As described above, a CPMV set of a current block may be composed of a plurality of CPMVs. Also, a CPMV set may be obtained based on a CPMV predictor and a motion vector differential value for each of the plurality of CPMVs. The motion vector differential value of the CPMV may be signaled from the encoder to the decoder. That is, a motion vector differential value used to derive a CPMV for affine motion compensation of the current block may be signaled. Hereinafter, the motion vector differential value of the CPMV may be referred to as a CPMV differential value. In FIG. 40, mv0, mv1, and mv2 indicated by the upper bars may indicate the CPMV predictors of the first CPMV (mv0), the second CPMV (mv1), and the third CPMV (mv2), respectively.
[0228] 40(a) shows how a first CPMV (mv0) and a second CPMV (mv1) of a current block are obtained when 4-parameter affine motion compensation is performed. A first CPMV difference value (mvd0) and a second CPMV difference value (mvd1) for each of the first CPMV (mv0) and the second CPMV (mv1) can be signaled, respectively.
[0229] 40(b) shows how a first CPMV (mv0), a second CPMV (mv1), and a third CPMV (mv2) of a current block are obtained when 6-parameter affine motion compensation is performed. A first CPMV difference value (mvd0), a second CPMV difference value (mvd1), and a third CPMV difference value (mvd2) for each of the first CPMV (mv0), the second CPMV (mv1), and the third CPMV (mv2) can be signaled, respectively.
[0230] FIG. 41 illustrates a method of signaling a control point motion vector differential value of a current block according to an embodiment of the present invention. The CPMV differential value of the current block may be signaled according to the syntax described above in FIG. 9. Also, the decoder may obtain a CPMV differential value (IMVD) of the current block based on at least one piece of information on the signaled motion vector differential value. In FIG. 41, compldx is an index indicating a component of a motion vector differential value and may be 0 or 1. For example, compldx may indicate either an x-axis component or a y-axis component of a motion vector differential value. Also, the CPMV differential value of the current block may differ depending on the reference picture list. In FIG. 41, L0 indicates a first reference picture list, and L1 indicates a second reference picture list.
[0231] Meanwhile, a CPMV differential value corresponding to a particular point of the current block may be similar to a CPMV differential value corresponding to a different point of the current block. Thus, a CPMV differential value corresponding to a particular point of the current block may be obtained based on the CPMV differential values corresponding to different points of the current block. Through this, the encoder and decoder can reduce signaling overhead for CPMV differential values.
[0232] Figure 42 illustrates a method for obtaining control point motion vectors of a current block according to another embodiment of the present invention. Referring to Figure 42, a CPMV set for affine motion compensation of the current block can be derived based on at least one common CPMV difference value. For example, a CPMV corresponding to a specific point of the current block can be obtained based on CPMV difference values corresponding to different points of the current block.
[0233] The encoder may signal one common CPMV difference value and at least one additional difference value for affine motion compensation of the current block. Also, the decoder may obtain a CPMV set for affine motion compensation of the block using one common CPMV difference value and at least one additional difference value. In Figure 42, the top bars mv0, mv1, and mv2 may indicate CPMV predictors of the first CPMV (mv0), the second CPMV (mv1), and the third CPMV (mv2), respectively.
[0234] FIG. 42(a) shows a method of obtaining a first CPMV (mv0) and a second CPMV (mv1) of a current block when 4-parameter affine motion compensation is performed. A first CPMV differential value (mvd0) for the first CPMV (mv0) can be signaled. Also, a first additional differential value (mvd1') used to obtain a second CPMV differential value can be signaled. Specifically, the second CPMV differential value can be expressed as a value obtained by adding the first additional differential value (mvd1') to the first CPMV differential value (mvd0). That is, the second CPMV (mv1) can be obtained based on the second CPMV predictor, the first CPMV differential value (mvd0), and the first additional differential value (mvd1'). When the first CPMV differential value and the second CPMV differential value are similar, the first additional differential value (mvd1') may be smaller than the second CPMV differential value. This allows the encoder and decoder to reduce signaling overhead for CPMV differential values compared to the method described in FIG.
[0235] FIG. 42(b) shows a method of obtaining a first CPMV (mv0), a second CPMV (mv1), and a third CPMV (mv2) of a current block when 6-parameter affine motion compensation is performed. A first CPMV differential value (mvd0) for the first CPMV (mv0) can be signaled. Also, a first additional differential value (mvd1') and a second additional differential value (mvd2') used to obtain the second CPMV differential value and the third CPMV differential value, respectively, can be signaled. Specifically, the second CPMV differential value can be expressed as a value obtained by adding the first additional differential value (mvd0) to the first CPMV differential value (mvd1'). Also, the third CPMV differential value can be expressed as a value obtained by adding the first CPMV differential value (mvd0) to the second additional differential value (mvd2').
[0236] Figure 43 illustrates a method of signaling a control point motion vector differential value when a control point motion vector of a current block is obtained according to the embodiment described in Figure 42. As described above, a CPMV set for affine motion compensation of a current block may include a plurality of CPMVs. In this case, some CPMV differential values (mvdLK) among the plurality of CPMVs may be obtained based on differential values of other CPMVs and additional differential values. In Figure 43, lmvd may be any one of a previously set CPMV differential value or at least one additional differential value.
[0237] In FIG. 43, cpIdx may indicate a control point index of a current block. For example, if 4-parameter affine motion compensation is performed on the current block, cpIdx may be 0 or 1. If 6-parameter affine motion compensation is performed on the current block, cpIdx may be 0, 1, or 2. According to an embodiment, a CPMV difference value (MvdLx) may be determined in different manners according to cpIdx. For example, if cpIdx is a preset value (e.g., '0'), MvdLx may be a preset CPMV difference value (lMvd[0][compIdx]). If cpIdx is not a preset value (e.g., '0'), MvdLx may be a value obtained by adding an additional difference value corresponding to a corresponding index to the preset CPMV difference value (lMvd[0][compIdx]). Here, MvdLx may indicate a difference between a CPMV and a CPMV predictor. That is, MvdLx can be (CPMV-CPMV predictor).
[0238] Also, compIdx is an index indicating a component of a motion vector differential value and may be 0 or 1. For example, compIdx may indicate either an x-axis component or a y-axis component of a motion vector differential value. Also, the CPMV differential value of the current block may differ depending on the reference picture list. In Figure 41, L0 indicates the first reference picture list, and L1 indicates the second reference picture list.
[0239] Figure 44 is a diagram illustrating a method of signaling a control point motion vector differential value of a current block according to an embodiment of the present invention. Referring to Figure 44, the CPMV differential value can be encoded using a method similar to the signaling method of the motion vector differential value described above in Figure 9. For example, the encoder can generate at least one piece of information on the CPMV differential value by separately encoding the CPMV differential value according to the above-mentioned control point index (cpIdx). Also, the encoder can signal at least one piece of information on the encoded CPMV differential value. The decoder can obtain the CPMV differential value for each control point index (cpIdx) based on the at least one piece of information on the CPMV differential value.
[0240] The above-described embodiments related to the resolution of the motion vector differential value may be applied in the same or a corresponding manner to the CPMV differential value described through the embodiments of Figures 9, 43, and 44. For example, if the resolution of the CPMV differential value of the current block is R, the signaled CPMV differential value may be modified based on R. In this case, the decoder may multiply the signaled CPMV differential value by the resolution (R) to obtain the modified CPMV differential value.
[0241] FIG. 45 is a diagram illustrating a method of obtaining a motion vector using a differential predictor for a control point motion vector differential value of a current block according to an embodiment of the present invention. Referring to FIG. 45, a CPMV differential value indicating a difference between the CPMV of the current block and the CPMV predictor can be determined based on a differential predictor (mvdp). Here, the differential predictor (mvdp) can indicate a predicted value for the difference between the CPMV and the CPMV predictor. Specifically, the CPMV differential value can be obtained based on the differential predictor (mvdp) and additional differential values (mvd0″, mvd1″, mvd2″).
[0242] For example, the differential predictor (mvdp) and additional differential values (mvd0", mvd1", mvd2") can be signaled from the encoder to the decoder. Each of mvdp, mvd0", mvd1", and mvd2" (when 6-parameter affine motion compensation is performed) can be encoded or decoded in the manner described above in FIG. 9 or FIG. 44. In FIG. 45, the bars mv0, mv1, and mv2 shown in the upper row may indicate the CPMV predictors of the first CPMV (mv0), the second CPMV (mv1), and the third CPMV (mv2), respectively. The encoder and decoder can reduce the signaling overhead for the CPMV differential values by using the differential predictor (mvdp).
[0243] Meanwhile, according to an embodiment of the present invention, the differential predictor may be obtained based on at least one of the CPMVs included in the CPMV set of the current block. For example, the differential predictor may be a CPMV differential value of any one of the CPMVs included in the CPMV set of the current block. Hereinafter, a method for obtaining the differential predictor used to derive the CPMV set of the current block will be described.
[0244] FIG. 46 is a diagram illustrating a method of acquiring a control point motion vector of a current block using a differential predictor according to an embodiment of the present invention. According to an embodiment of the present invention, an encoder and a decoder can acquire a differential predictor (mvdp) of a current block using at least one of mvd0, mvd1, and mvd2 (hereinafter, mvdx) of the current block. According to an embodiment, the differential predictor (mvdp) can be set to a value smaller than the absolute value of the mvdx having the smallest absolute value among mvdx. Alternatively, the differential predictor (mvdp) can be set to a value larger than the absolute value of the mvdx having the largest absolute value among mvdx. In this case, the signs of the additional differential values (mvd0″, mvd1″, and mvd2″ in FIG. 45) used to derive each of the multiple CPMVs included in the CPMV set of the current block can be the same. In this embodiment, the additional differential value can indicate the difference between mvdx and the differential predictor (mvdp).
[0245] For example, when the difference predictor (mvdp) is set to a value smaller than the absolute value of mvdx with the smallest absolute value among mvdx, the signs of the additional difference values (mvd0", mvd1", mvd2" in Figure 45) can match a positive sign (+). Also, when the difference predictor (mvdp) is set to a value larger than the absolute value of mvdx with the largest absolute value among mvdx, the signs of the additional difference values (mvd0", mvd1", mvd2" in Figure 45) can match a negative sign (-).
[0246] Referring to FIG. 46, the difference predictor (MVDP) may be set to a value smaller than the absolute value of the mvdx with the smallest absolute value among mvdx. In FIG. 46, the horizontal dashed line indicates the smallest absolute value among the x-axis components of mvdx, and the vertical dashed line indicates the smallest absolute value among the y-axis components of mvdx. The x-axis coordinate may have a larger value toward the right, and the y-axis coordinate may have a larger value toward the top. In this case, the difference predictor (MVDP) may be a value within the third quadrant (MVDP area) among the quadrants divided by the dashed lines.
[0247] In this case, the signs of the additional differential values of the current block may all be positive signs (+). Therefore, information indicating the signs of the additional differential values may not be separately signaled. Specifically, each of the differential predictor (mvdp) and the additional differential value (mvdx'') of the current block may be derived as shown in Equation 7.
[0248]
number
[0249] Referring to [Equation 7], information (mvd_sign_flag) indicating the sign of the differential predictor (mvdp) can be signaled. The encoder can signal the sign information of the differential predictor. Also, the decoder can acquire the CPMV set of the current block based on the sign information (mvd_sign_flag) of the differential predictor. Meanwhile, information indicating the sign of each of the additional differential values (mvdx'') may not be signaled. According to a further embodiment, an mvdp indicator indicating a method of determining the differential predictor (mvdp) may also be signaled. For example, the mvdp indicator may be a flag indicating whether the differential predictor (mvdp) is determined to be a value smaller than the minimum value of mvdx or a value larger than the maximum value.
[0250] Figure 47 is a diagram illustrating a method for acquiring a control point motion vector of a current block using a differential predictor according to another embodiment of the present invention. According to an embodiment of the present invention, the differential predictor of the current block may be any one of a plurality of CPMVs included in the CPMV set of the current block. Referring to Figure 46, the differential predictor may change depending on Method 0, Method 1, and Method 2. For example, in Method 0, the differential predictor may be mvd0. Also, in Method 1, the differential predictor may be mvd1. In Method 2, the differential predictor may be mvd2.
[0251] According to an embodiment, an mvdp indicator (cpIdxPred) indicating which of a plurality of methods a differential predictor is determined by may be signaled. Here, the plurality of methods may include at least one of Method 0, Method 1, and Method 2 of FIG. 47 and the methods described through FIG. 46. In the embodiment of FIG. 47, the encoder may signal an mvdp indicator (cpIdxPred) indicating any one of Method 0, Method 1, and Method 2. Also, the decoder may determine any one of Method 0, Method 1, and Method 2 based on the mvdp indicator (cpIdxPred). Also, the decoder may obtain a differential predictor of the current block according to the determined method. Also, the decoder may obtain a CPMV set of the current block based on the obtained differential predictor.
[0252] According to another embodiment, the mvdp indicator (cpIdxPred) may be implicitly signaled. That is, the encoder and decoder may determine the differential predictor of the current block without signaling the mvdp indicator (cpIdxPred). This will be described in detail with reference to Figures 49 to 50.
[0253] FIG. 48 illustrates a method of obtaining a differential predictor according to an embodiment of the present invention. According to an embodiment of the present invention, when the control point index (cpIdx) is equal to the mvdp indicator (cpIdxPred), the differential predictor can be used for the corresponding CPMV differential value. When the control point index (cpIdx) is not equal to the mvdp indicator (cpIdxPred), the corresponding CPMV differential value can be obtained based on the additional differential value and the differential predictor corresponding to cpIdx. The mvdp indicator (cpIdxPred) indicating a method with high coding efficiency for the motion vector differential value can be signaled. In FIG. 48, lmvd can indicate one of the differential predictor or the additional differential value. Also, MvdLK can indicate the CPMV differential value.
[0254] In FIG. 48, LX may indicate reference picture list L0 or L1. Also, the mvdp indicator may be expressed by a variable length of bits. For example, the mvdp indicator may be signaled by a truncated unary method. Also, the embodiments described above in FIG. 46 to FIG. 48 may be performed for each component of the motion vector differential value. The embodiments related to the resolution of the motion vector differential value described above may be applied in the same or corresponding manner to the CPMV differential value described through the embodiments of FIG. 46 to FIG. 48. For example, if the resolution of the CPMV differential value of the current block is R, the signaled CPMV differential value may be modified based on R. In this case, the decoder may multiply the signaled CPMV differential value by the resolution (R) to obtain the modified CPMV differential value.
[0255] According to an embodiment of the present invention, the mvdp indicator may be signaled or determined in a manner that reduces the signaling of IMvd for control point indexes that are not mvdp indicators (cpIdxPred). For example, the mvdp indicator may be signaled so that the signs of IMvd for control point indexes that are not mvdp indicators match. Alternatively, the difference predictor may be determined without explicit signaling. This will be described later with reference to Figures 49 to 51.
[0256] As described above, when the difference predictor of the current block is determined to be the minimum or maximum of the absolute value of the CPMV difference value of the current block, the sign between the lmvd for the control point index may match. In this case, if the control point index is different from the mvdp indicator, the sign information may not be signaled. Here, the absolute value of the CPMV difference value being minimum or maximum may mean that the absolute value of a specific component is minimum or maximum. For example, when the mvdp indicator indicates one of three values, one of the mvdp indicators may be signaled using one bit, and two may be signaled using two bits according to the cutting unary method.
[0257] According to another embodiment of the present invention, the mvdp indicator may be a CPMV difference value corresponding to the center or median of the absolute values of the CPMV difference values. In this case, one sign of lmvd may be (+) and one may be (-). Thus, one bit may be used to signal the sign information of each of the two CPMV difference values. This allows the encoder and decoder to reduce the signaling overhead for the sign information of the CPMV difference values.
[0258] According to another embodiment of the present invention, the mvdp indicator (cpIdxPred) indicating a method for determining a differential predictor of the current block may be implicitly signaled. For example, the method for determining a differential predictor of the current block may be determined based on other information. More specifically, the encoder and decoder may determine the CPMV differential value with the largest absolute value among the CPMV differential values of the current block as the differential predictor. This is because, when a motion vector differential value is signaled, it may be more advantageous to use a differential predictor with a larger absolute value to induce multiple CPMVs.
[0259] FIG. 49 illustrates a method for determining a difference vector predictor of a current block according to an embodiment of the present invention. Referring to FIG. 49, three CPMVs can be used for affine motion compensation of a current block. Hereinafter, for convenience of explanation, an x-axis component will be described as an example, but the present disclosure is not limited thereto. The embodiment described below can be applied to the y-axis component in the same or a similar manner. According to an embodiment, a control point index indicating a CPMV having a minimum absolute value of the x-axis component among mvd0, mvd1, and mvd2, which are CPMV difference values of the CPMVs of the current block, may be '1'.
[0260] In Figure 49, the dashed lines indicate the values of the x-axis component of the reference predictor. As shown in Figure 49, when the CPMV difference value with the smallest absolute value is used as the difference predictor, the signs of the remaining CPMV difference values not selected as the difference predictor can match a positive sign (+). This allows the encoder to omit signaling for the mvdp indicator. Also, the decoder can derive the CPMV set of the current block without the mvdp indicator.
[0261] Figure 50 is a diagram illustrating a method of signaling a control point motion vector differential value of a current block. As described above with reference to Figures 48 to 49, when using the sign bit hiding method, signaling of sign information can be omitted when the control point index and the mvdp indicator are different. Referring to Figure 50, the sign information (mvd_sign_flag) of the motion vector differential value can be parsed when the control point index and the mvdp indicator are the same. Conversely, when the control point index and the mvdp indicator are different, it may not be performed. In Figure 50, [0] and [1] indicate 0 and 1 as component indexes, and may indicate the x-axis component and the y-axis component, respectively.
[0262] According to an embodiment of the present invention, information on motion vector difference values may be parsed sequentially according to a preset order. In this case, the preset order may be an order set based on a control point index. According to an embodiment, the preset order may be an order determined based on an mvdp indicator.
[0263] According to an embodiment of the present invention, a function for coding a motion vector differential value may exist. Also, an example of the function for coding a motion vector differential value may be the mvd_coding syntax of FIG. 50. According to an embodiment, a decoder may parse information on a motion vector differential value according to a control point index. For example, the mvd_coding syntax of FIG. 50 may be performed for each control point index. In this case, the preset order may be performed as shown in the following [Equation 8]. According to [Equation 8], parsing can always be performed in the same order.
[0264]
number
[0265] According to another embodiment, information on a CPMV differential value corresponding to an mvdp indicator may be parsed before information on other CPMV differential values not corresponding to an mvdp indicator. In this case, after an additional differential value corresponding to a specific control point index is decoded, a CPMV differential value corresponding to the corresponding control point index may be calculated immediately. Unlike the present embodiment, information on a CPMV differential value corresponding to an mvdp indicator may not be parsed before information on other CPMV differential values not corresponding to an mvdp indicator. In this case, even after an additional differential value corresponding to a specific control point index is decoded, a waiting time may be required until a CPMV differential value corresponding to the corresponding control point index is calculated. As a specific example, when an mvdp indicator is '1', the mvd_coding syntax is as follows: [Equation 9]
[0266]
number
[0267] As another specific example, when the mvdp indicator is '2', the mvd_coding syntax is as follows [Equation 10].
[0268]
number
[0269] Figure 51 is a diagram illustrating a method for deriving a control point motion vector of a current block according to another embodiment of the present invention. In Figure 51, lmvd can indicate a difference predictor or an additional difference value. Referring to Figure 51, if a specific control point index is the same as the mvdp indicator, a difference predictor can be calculated based on code information. Alternatively, if a specific control point index is different from the mvdp indicator, code information may not be used to calculate the additional difference value.
[0270] Meanwhile, according to an embodiment of the present invention, the resolution of the motion vector differential value may be different for each of a plurality of CPMVs for motion compensation of the current block. For example, the resolution at which the CPMV differential value is signaled may be different for each control point index. According to an embodiment, when a differential predictor is used as in Figures 42, 45, and 47, the resolution of the motion vector differential value may be different for each of a plurality of CPMVs of the current block.
[0271] According to an embodiment, a CPMV difference value of a specific control point index may be used as a difference predictor of a current block. In this case, a resolution for a CPMV difference value corresponding to the control point index may be signaled. Also, the CPMV difference value corresponding to the control point index may be signaled based on the resolution. Meanwhile, the CPMV difference values corresponding to the remaining control point indexes excluding the control point index may be signaled based on a preset resolution. In this case, a resolution indicating a unit in which the CPMV difference values corresponding to the remaining control point indexes excluding the control point index are signaled may not be signaled. Also, the preset resolution may be a default value.
[0272] According to another embodiment, the CPMV difference value used in the difference predictor of the current block may be signaled based on a resolution of a relatively small unit, and the CPMV difference values of other control points than the CPMV difference value used in the difference predictor of the current block may be signaled based on a resolution of a relatively large unit.
[0273] Meanwhile, according to an embodiment of the present invention, multiple CPMVs for affine motion compensation of a current block can be obtained from a single CPMV predictor. In this case, multiple CPMVs can be derived using a single CPMV and multiple CPMV difference values. Through this, the encoder and decoder can increase the coding efficiency of the CPMV difference values. In addition, the encoder and decoder can reduce the signaling overhead of the CPMV difference values.
[0274] Figure 52 is a diagram illustrating a method of deriving a plurality of control point motion vectors for affine motion compensation of a current block according to an embodiment of the present invention. Referring to Figure 52, a first CPMV difference value (mvd0) and a second CPMV difference value (mvd1) can be obtained based on a common difference predictor (mvdp) and a single absolute difference value (mvdd). For example, the first CPMV difference value (Mvd0) can be obtained based on the sum of mvdp and mvdd. Also, the first CPMV difference value (mvd1) can be obtained based on the sum of mvdp and -mvdd.
[0275] For example, the encoder may signal a common difference predictor (mvdp) and an absolute difference (mvdd). The decoder may obtain a CPMV difference value corresponding to each of a plurality of control points of the current block based on the common difference predictor (mvdp) and the absolute difference (mvdd). Although FIG. 52 illustrates 4-parameter affine motion compensation, the present disclosure is not limited thereto. For example, when 6-parameter affine motion compensation is performed, some of the CPMVs included in the CPMV set of the current block may be derived using the CPMV predictors and CPMV difference values of other CPMVs.
[0276] According to an embodiment of the present invention, the current block may be additionally divided according to the prediction mode of the current block. For example, if the prediction mode of the current block is an intra prediction mode, the encoder and the decoder may divide the current block into a plurality of sub-blocks and perform intra prediction on each of the sub-blocks. The decoder may receive the above-mentioned intra prediction mode information from the bitstream. The decoder may determine whether to divide the current block into a plurality of sub-blocks based on the intra prediction mode information. In this case, information on a method of dividing the current block into a plurality of sub-blocks may be additionally signaled. Alternatively, the encoder and the decoder may divide the current block using a method previously set between the encoder and the decoder according to the intra prediction mode information. Then, the decoder may perform intra prediction on the current block or each of the plurality of sub-blocks based on the intra prediction mode information of the current block. Hereinafter, in the embodiments of Figures 53 to 60, the current block may be used as a term indicating a coding unit. Also, SCU (Sub-CU) in Figures 53 to 60 indicates a plurality of sub-blocks divided from the current block. Hereinafter, a method of dividing the current block into a plurality of sub-blocks will be described in detail.
[0277] FIG. 53 illustrates various embodiments of a form in which a current block is divided into a plurality of sub-blocks. FIG. 53(a) and FIG. 53(b) illustrate sub-blocks divided into squares from a current block. For example, the current block may be divided into sub-blocks of a preset size. In this case, the preset size may be a size pre-negotiated between an encoder and a decoder. According to an embodiment, the preset size may be an N×N size in which the height and width are the same. For example, the preset size may be 4×4. According to an embodiment, the preset size may be a value set based on the size of a transform kernel. The preset size may be a value set based on a transform unit. The preset size may be the size of a transform unit.
[0278] According to an embodiment, the current block may be divided into sub-blocks whose size is determined by the size of the current block. For example, if the size of the current block is greater than the first threshold, the current block may be divided into sub-blocks whose size is greater than the first threshold. Also, the operation of dividing the current block into sub-blocks may be restricted according to the size of the current block. For example, if the size of the current block is less than the second threshold, the encoder and decoder may not divide the current block into a plurality of blocks. This is because, when the size of the current block is relatively small, the performance gain according to the method of dividing the current block and performing intra prediction may not be as large as when the size of the current block is relatively large.
[0279] According to an embodiment, the shape of the sub-blocks may be determined independently of the shape of the current block. For example, even if the current block is a square, the shapes of the sub-blocks divided from the current block may be non-square. FIGS. 53(c) and 53(d) illustrate sub-blocks divided from the current block into non-square shapes. According to an embodiment, the current block may be divided into non-square sub-blocks of a preset size. In this case, the height and width of the preset size may be different from each other. For example, the preset size may be 4×8 or 8×4. As described above, the preset size may be a value set according to the size of the current block. According to an embodiment, the encoder and decoder may support a non-square transform kernel of 4×8 or 8×4 size. Also, if the current block needs to be divided into non-square sub-blocks, the preset size may be a value set based on the non-square transform unit.
[0280] According to another embodiment, the current block may be divided into a plurality of sub-blocks having a shape similar to that of the current block. Figures 53(e) and 53(f) illustrate sub-blocks divided from the current block when the current block is a non-square block. For example, when the current block is a non-square block, the current block may be divided into non-square sub-blocks having a shape similar to that of the current block. As shown in Figure 53(e), when the height of the current block is longer than the width, the current block may be divided into a plurality of sub-blocks having a shape where the height is longer than the width. As shown in Figure 53(f), when the width of the current block is longer than the height, the current block may be divided into a plurality of sub-blocks having a shape where the width is longer than the height.
[0281] According to an embodiment of the present invention, the manner in which the current block is divided may be determined based on the prediction mode of the current block. For example, at least one of the size or direction in which the current block is divided may vary depending on the intra prediction mode (angular mode, DC mode, or planar mode) of the current block. Figure 54 illustrates a method in which the current block is divided according to the intra prediction mode of the current block. Referring to Figure 54(a), the multiple intra prediction modes can be classified into a non-directional mode such as a planar mode or a DC mode, and an angular mode corresponding to each of the intra prediction mode indexes 2 to 66.
[0282] According to an embodiment, when the current block is intra-predicted, the residual signal of the sub-block far from the reference sample of the current block may be relatively large among the sub-blocks divided from the current block, and thus, samples at similar distances from the reference sample of the current block may be divided to belong to the same sub-block.
[0283] According to an embodiment, when the intra prediction mode of the current block is a non-directional mode, the current block may be divided into a plurality of square sub-blocks as shown in FIG. 54(b). Also, when the intra prediction mode of the current block is one of the horizontal diagonal mode, diagonal mode, and vertical diagonal mode described above, the current block may be divided into a plurality of square sub-blocks. Also, when the intra prediction mode of the current block is one of the peripheral angle modes of the horizontal diagonal mode, diagonal mode, and vertical diagonal mode, the current block may be divided into a plurality of square sub-blocks.
[0284] Meanwhile, if the intra prediction mode of the current block is a horizontal mode or a vertical mode, the current block can be divided into a plurality of non-square sub-blocks according to the intra prediction mode of the current block as shown in Figure 54(c) or 54(d). Also, if the intra prediction mode of the current block is one of the peripheral angle modes of the horizontal mode and the vertical mode, the current block can be divided into a plurality of non-square sub-blocks. Through this, the current block can be divided such that samples with similar distances from the reference sample of the current block belong to the same sub-block.
[0285] For example, if the prediction mode of the current block is either a horizontal mode or an angle mode around the horizontal mode, the current block can be divided as shown in Figure 54(c). If the prediction mode of the current block is either a vertical mode or an angle mode around the vertical mode, the current block can be divided as shown in Figure 54(d). A different prediction method can also be applied to sub-blocks located far from the reference sample of the current block.
[0286] 55 illustrates a method of dividing a current block into a plurality of sub-blocks based on sample values of a reference sample of the current block according to an embodiment of the present invention. According to an embodiment of the present invention, the current block may be divided based on sample values of the reference sample of the current block. According to an embodiment, the encoder and decoder may determine a reference sample edge based on sample values of the reference sample of the current block. For example, the reference sample edge may be a reference point that divides an area where the sample values of the reference sample change by more than a threshold value. The reference sample edge may also indicate a point where the sample value difference between adjacent reference samples is more than a threshold value.
[0287] Referring to FIG. 55(a), the encoder and decoder can determine the reference sample edge of the current block by comparing sample values of the reference sample of the current block. For example, the position of a reference sample whose difference from the average value of a preset number of reference samples around a specific reference sample is equal to or greater than a threshold value can be determined as the reference sample edge. Also, the encoder and decoder can determine one or more reference sample edges for each of an upper reference sample set and a left reference sample set. Here, the upper reference sample set of the current block can be a set including reference samples located on the upper line of the current block. Also, the left reference sample set of the current block can be a set including reference samples located on the left line of the current block.
[0288] Next, the encoder and decoder can divide the current block based on a line segment connecting a reference sample edge of the upper reference sample set and a reference sample edge of the left reference sample set. For example, if one reference sample edge is detected for each of the upper reference sample set and the left reference sample set, the current block can be divided into a total of two sub-blocks (SCU1, SCU2). Also, if two or more reference sample edges are detected for each of the upper reference sample set and the left reference sample set, the current block can be divided into multiple sub-blocks.
[0289] Meanwhile, as described above, reference samples for intra prediction of a current block may include samples on a plurality of reference lines. Referring to Figures 55(b) and 55(c), a current block may be divided based on sample values of reference samples on a plurality of reference lines. For example, reference sample edges of a current block may be determined based on sample values of reference samples on a plurality of reference lines. When reference samples on a plurality of reference lines are used, a shape of an image object composed of neighboring blocks may be grasped.
[0290] According to an embodiment of the present invention, an encoder and a decoder may determine one or more reference sample edges for each reference line. Referring to FIG. 55(b), the encoder and the decoder may extend a line segment connecting reference sample edges for each upper reference line to perform a first division of the current block. Two sub-blocks (SCU1, SCU2) may be obtained by the first division. In addition, the encoder and the decoder may extend a line segment connecting reference sample edges for each left reference line to perform a second division of the current block. Two sub-blocks (SCU2, SCU3) may be obtained by the second division. Thus, the current block may be divided even if any one of the reference sample edges for each upper reference line or the reference sample edge for each left reference line is not detected.
[0291] Figure 55(c) shows a method of dividing a current block when any one of the reference sample edges for the upper reference line or the reference sample edges for the left reference line is not detected or the reference sample edges are not arranged in a straight line. As with the left reference line in Figure 55(c), a reference sample edge may not be detected in some of the left reference lines. If a reference sample edge is detected in at least two reference lines, the encoder and decoder may divide the current block based on the corresponding reference sample edge. The above-described embodiment may also be applied to a case where a reference sample edge is not detected in some of the upper reference lines.
[0292] Also, like the upper reference line in Figure 55(c), the reference sample edges for each upper reference line may not be arranged in a single straight line. In this case, the current block may be divided based on the midpoint of the reference sample edges on a line not adjacent to the current block and the line segment passing through the reference sample edges on a line adjacent to the current block. Although Figures 55(b) and 55(c) show an embodiment in which three reference lines are used, the present disclosure is not limited thereto.
[0293] According to an embodiment of the present invention, a plurality of sub-blocks divided from a current block can be classified into a primary sub-block (PSB) that is preferentially predicted according to an intra prediction mode of the current block and a secondary sub-block (SSB) that is predicted subsequently. Also, a sub-block group composed of PSBs can be referred to as a primary sub-block group (hereinafter, PSB group), and a sub-block group composed of SSBs can be referred to as a secondary sub-block group (hereinafter, SSB group).
[0294] 56 illustrates a method for determining a primary sub-block group and a secondary sub-block group according to an embodiment of the present invention. According to an embodiment, the PSB group may be composed of sub-blocks within a preset distance from a reference sample referred to in intra prediction of the current block among a plurality of sub-blocks divided from the current block. Also, the SSB group may be composed of sub-blocks outside a preset distance from a reference sample referred to in intra prediction of the current block among a plurality of sub-blocks.
[0295] Referring to Figure 56, the current block can be divided into a total of 16 sub-blocks. If the intra prediction mode of the current block is one of the horizontal diagonal mode, the vertical diagonal mode, and the angle modes surrounding the horizontal diagonal mode and the vertical diagonal mode, the PSB group and the SSB group of the current block can be determined as shown in Figure 56 (a). That is, among the 16 sub-blocks divided from the current block, the four sub-blocks on the upper right side are SSBs, and the remaining sub-blocks excluding these may be PSBs.
[0296] Each of Figures 56(a) to 56(e) illustrates a method for determining a PSB group and an SSB group when the intra prediction mode of the current block is one of HDIA, HOR, DIA, VER, VDIA, and each of the surrounding angle modes. The PSB and SSB can be distinguished by considering the relative distance to the reference sample used in each prediction mode. However, the present disclosure is not limited thereto, and other divisions similar to the example described in Figure 56 are also possible.
[0297] According to an embodiment, the encoder and the decoder may first perform intra prediction on the PSB based on the intra prediction mode of the current block. Then, the encoder and the decoder may perform intra prediction on the SSB. Hereinafter, various intra prediction methods for the SSB of the current block will be described in detail.
[0298] According to an embodiment, the encoder and the decoder may perform prediction for the SSB of the current block based on the reconstructed sample value of the PSB of the current block. For example, the encoder and the decoder may first reconstruct the PSB of the current block based on the intra prediction mode of the current block and the reference sample. Then, the encoder and the decoder may perform intra prediction for the SSB of the current block by referring to the reconstructed samples adjacent to each of the SSBs of the current block. The encoder and the decoder may perform intra prediction for the SSB of the current block based on the intra prediction mode of the current block. In this case, the reconstructed samples may be samples included in each of the PSBs. The samples included in each of the PSBs may be samples closer to the SSB of the current block than the reference sample of the current block. As a result, even if the same prediction mode is used for the SSB of the current block, the prediction accuracy for the SSB may be improved compared to the existing method.
[0299] According to an embodiment, the encoder and the decoder may predict using different intra prediction modes for each of the PSB group and the SSB group of the current block. For example, the PSB of the current block may be predicted based on a primary mode (PM) which is an intra prediction mode of the current block. The SSB of the current block may be predicted based on a variable secondary mode (SM). For example, the SM may be an intra prediction mode applied only to the SSB among a plurality of sub-blocks of the current block. In this case, the SM may be signaled separately. According to an embodiment, the SM may be signaled in an offset form based on the PM. For example, the SM may be an intra prediction mode corresponding to an intra prediction mode index added by an offset based on the PM. In this case, the offset may be a value within a preset maximum value. This may reduce the amount of calculation for the encoder to select a specific offset.
[0300] In addition, if the PM of the current block is an angle mode and an opposite angle mode of the PM exists, the SSB of the current block may be predicted based on the opposite angle mode of the PM. For example, if the PM is a horizontal diagonal mode of intra prediction mode index 2, the SM may be a vertical diagonal mode corresponding to intra prediction mode index 66. Conversely, if the PM is a vertical diagonal mode of intra prediction mode index 66, the SM may be a horizontal diagonal mode corresponding to intra prediction mode index 2.
[0301] According to another embodiment, the SM may be a preset prediction mode. For example, the SSB of the current block may be predicted based on the preset prediction mode. As described above, the SSB of the current block may be a sub-block outside a preset distance from the reference sample of the current block. Therefore, predicting the SSB of the current block based on the non-directional mode may be advantageous in terms of the residual signal. That is, the preset SM may be any one of the planar mode and the DC mode.
[0302] According to a further embodiment, the final predicted block of the SSB of the current block can be obtained based on the first predicted SSB predicted based on the PM of the current block and the second predicted SSB predicted based on the above-mentioned omnidirectional mode. For example, the encoder and the decoder can obtain the final predicted block corresponding to the SSB based on the average between the first predicted SSB and the second predicted SSB of the current block. Also, the encoder and the decoder can restore the SSB by combining the final predicted block corresponding to the SSB with the residual signal.
[0303] Figure 57 illustrates a method for predicting a primary subblock group and a secondary subblock group according to an embodiment of the present invention. Referring to Figure 57, a current block can be divided into a total of four subblocks. According to an embodiment, when a prediction mode of the current block is one of a diagonal mode and an angular mode around the diagonal mode, a PSB group and an SSB group of the current block can be determined as shown in Figure 57 (a). That is, among the four subblocks divided from the current block, the lower right subblock (SCU4) is the SSB of the current block, and the remaining subblocks (SCU1, SCU2, SCU3) except for this may be the PSB of the current block.
[0304] In this case, the SSB of the current block can be reconstructed by referring to samples included in each of the PSBs of the current block. For example, the encoder and decoder can first reconstruct the PSB of the current block based on the intra prediction mode and reference samples of the current block. Then, the encoder and decoder can perform intra prediction on the SSB using sample values of samples adjacent to the SSB among the reconstructed samples of the PSB of the current block. For example, the SSB (SCU4) of the current block can be reconstructed based on the sample values of the reconstructed samples of the PSBs (SCU1, SCU2, SCU3) and the residual signal.
[0305] According to an embodiment, when the prediction mode of the current block is one of the horizontal diagonal mode and the angle mode around the horizontal diagonal mode, the PSB group and the SSB group of the current block can be determined as shown in Figure 57 (b). That is, among the four sub-blocks divided from the current block, the upper right sub-block (SCU2) is the SSB of the current block, and the remaining sub-blocks (SCU1, SCU3, SCU4) excluding the SSB may be the PSB of the current block. In this case, as described above, the SSB (SCU2) of the current block can be restored based on the sample value of the sample adjacent to the SSB (SCU2) among the already restored samples of the PSB (SCU1, SCU3, SCU4) of the current block.
[0306] According to a further embodiment, some of the reference samples of the current block may be adjacent to the SSB of the current block. In this case, some of the reference samples of the current block may be reference samples that are not used for intra prediction of the current block. In this case, the SSB of the current block may be predicted based on an SM that is a prediction mode different from the PM of the current block. For example, if the PM of the current block is an angular mode, the SM of the current block may be an opposite angular mode of the PM. As shown in FIG. 57(b), if the PM of the current block is a horizontal diagonal mode, the SM may be a vertical diagonal mode.
[0307] Also, if the PM of the current block is an angle mode, the final predicted block of the SSB of the current block can be obtained based on the first predicted SSB predicted based on the PM of the current block and the second predicted SSB predicted based on the opposite angle mode of the PM. As shown in Figures 56(a) and (e), it is possible to use an angle mode in the opposite direction to the PM mode, and if there is a reference sample adjacent to the boundary of the SSB, the above-mentioned embodiment can be applied.
[0308] As mentioned above, in the process of coding a video signal, a picture can be divided into a sequence of coding tree units (CTUs). In the following, the order in which the CTUs are processed within a picture, slice, or tile is described. Figure 58 illustrates the order in which the coding tree units are processed according to one embodiment of the present invention.
[0309] The encoder and decoder may encode or decode each CTU in a current picture including the current block or a slice / tile divided from the current picture. In this case, the encoder and decoder may encode or decode a plurality of CTUs according to a predefined processing order. If the CTUs are processed in an order different from the predefined processing order, the encoder may signal the corresponding order to the decoder.
[0310] FIG. 58(a) shows a raster scan order in which horizontal processing is performed from the top left CTU of a picture, slice, or tile, and then the next row of CTUs are processed. FIG. 58(b) shows an embodiment in which the position of the first CTU (Block A) to be processed first in a picture, slice, or tile is explicitly signaled. For example, the encoder may signal the position of the first CTU. The decoder may process the corresponding CTU with the highest priority based on the signaled position of the first CTU. The decoder may decode a CTU that corresponds to an earlier position in the raster scan order based on the position of the first CTU according to an inverse-raster scan order. Also, a CTU that corresponds to a later position in the raster scan order based on the position of the first CTU may be decoded according to the above-mentioned raster scan order. In this case, the CTUs processed according to the reverse-raster scan order and the CTUs processed according to the raster scan order may be processed in an order in which one CTU each crosses, or one of the two CTUs may be processed preferentially.
[0311] Figures 58(c) and 58(d) show embodiments in which the positions of multiple CTUs to be preferentially processed in a picture, slice, or tile are explicitly signaled. For example, the multiple CTUs may include a second CTU (Block B) and a third CTU (Block C). The encoder may signal the positions of each of the second CTU (Block B) and the third CTU (Block C). In addition, the position of the second CTU to be processed first among the multiple CTUs to be preferentially processed may be additionally signaled.
[0312] Referring to FIG. 58(d), the decoder may decode the second CTU (Block B) as a first priority based on the position of the signaled second CTU. Next, the decoder may decode the third CTU (Block C). Next, the decoder may decode the CTUs between the position of the second CTU and the position of the third CTU. For example, the decoder may decode the CTUs from the CTU next to the second CTU to the CTU previous to the third CTU in the raster scan order according to the raster scan order or the inverse raster scan order. Also, the decoder may decode the CTU corresponding to the previous position in the raster scan order based on the position of the second CTU (Block B) according to the inverse-raster scan order. Also, the CTU corresponding to the subsequent position in the raster scan order based on the position of the third CTU (Block C) may be decoded according to the above-mentioned raster scan order.
[0313] FIG. 58(c) illustrates yet another embodiment in which the locations of multiple CTUs to be preferentially processed in a picture, slice, or tile are explicitly signaled in a similar manner to FIG. 58(d).
[0314] FIG. 59 illustrates a bidirectional intra prediction method according to an embodiment of the present invention. According to an embodiment of the present invention, a current block can be predicted using a bidirectional intra prediction method according to the distribution of available reference samples of the current block. As shown in FIG. 56 and FIG. 58, when a current block or a plurality of sub-blocks divided from the current block are encoded or decoded, not only the reconstructed samples on the left and top sides of the corresponding block but also the reconstructed samples on the bottom and right sides of the corresponding block can be used as reference samples of the corresponding block. Thus, a specific block can be predicted by a bidirectional intra prediction method using reconstructed samples on the right and bottom sides of the corresponding block. Hereinafter, a specific block refers to a current block or a plurality of sub-blocks divided from the current block.
[0315] 59(a) and 59(b) illustrate an embodiment of a method for predicting a current block when all four sides of a specific block have reconstructed samples. Referring to FIG. 59(a), a specific block may be divided into two equal parts based on a prediction mode of the current block. For example, if the prediction mode of the current block is an angle mode, the specific block may be divided into two equal parts based on a line segment perpendicular to the prediction mode of the current block. A first part of the bisected specific block may be reconstructed based on the prediction mode of the current block and a first reference sample. In this case, the first part may be a part including the upper and left sides of the specific block. In addition, the first reference sample may be a reference sample of the left and upper lines of the specific block. A second part of the bisected specific block may be reconstructed based on a secondary prediction mode and a second reference sample. In this case, the second part may be a part including the right and lower sides of the specific block. In addition, the second reference sample may be a reference sample of the right and lower lines of the specific block. According to an embodiment, the secondary prediction mode may be the SM described with reference to FIG. 56 and FIG. 57.
[0316] Referring to FIG. 59(b), the specific block may not be further divided. For example, the specific block may be reconstructed based on a first predicted block and a second predicted block. In this case, the first predicted block may be a predicted block predicted based on a prediction mode of the current block and a first reference sample. Also, the second predicted block may be a predicted block predicted based on a secondary prediction mode and the first reference sample. The decoder may reconstruct the specific block by additively stacking the first predicted block and the second predicted block.
[0317] Figures 59(c) and 59(d) illustrate an embodiment of a method for predicting a current block when reconstructed samples exist on only three of four sides of a specific block. In this case, the specific block can be divided into two equal parts based on the prediction mode of the current block. For example, a region of the specific block corresponding to a side where no reconstructed samples exist can be predicted by extending the prediction mode from the other side. Also, in the embodiments of Figures 59(c) and 59(d), an embodiment in which the specific block is reconstructed based on a plurality of prediction blocks for the specific block without additionally dividing the specific block as in Figure 59(b) can be applied.
[0318] 60 illustrates a method for predicting each of a plurality of sub-blocks divided from a current block according to an embodiment of the present invention. According to an embodiment of the present invention, each of the sub-blocks divided from the current block can be predicted based on the intra prediction mode used to predict neighboring blocks of the current block.
[0319] Figure 60(a) illustrates the positions (AL, A, AR, R, L, BL) of a plurality of neighboring blocks of a current block. In this case, there may be no intra prediction mode corresponding to each of the neighboring blocks. For example, the block at the corresponding position may be inter predicted, or decoding for the block at the corresponding position may not be performed according to the raster scan order or CU processing order.
[0320] FIG. 60(b) shows how each subblock is predicted when the current block is divided into a total of four subblocks. For example, the first subblock SCU1 can be predicted using an intra prediction mode corresponding to the upper left position (AL) closest to the first subblock SCU1. Also, the second subblock SCU2 can be predicted using an intra prediction mode corresponding to the upper position (A) next to the second subblock SCU2. Also, if there is no intra prediction mode corresponding to the upper position (A), the second subblock SCU2 can be predicted using an intra prediction mode corresponding to another neighboring position (e.g., the upper right position). Also, if the upper side and the left side are both within the current block, such as the fourth subblock SCU4, the corresponding block can be predicted using the intra prediction mode of a neighboring block located on a distant straight line.
[0321] FIG. 60(c) shows another method of predicting each subblock when the current block is divided into a total of four subblocks. In FIG. 60(c), the first subblock SCU1, the second subblock SCU2, and the third subblock SCU3 may be predicted based on the intra prediction mode of the current block. In this case, the first subblock SCU1, the second subblock SCU2, and the third subblock SCU3 may be the primary subblocks described above through FIG. 56 and FIG. 57. According to an embodiment, the fourth subblock SCU4 may be predicted based on an intra prediction mode different from the intra prediction mode of the current block. For example, the fourth subblock SCU4 may be predicted using an intra prediction mode corresponding to the right position (R). Or, the fourth subblock SCU4 may be predicted using the intra prediction mode of a peripheral block located distantly on a straight line.
[0322] The above-described embodiments of the present invention may be implemented in a variety of ways, for example, in hardware, firmware, software, or a combination thereof.
[0323] In the case of a hardware implementation, the methods according to the embodiments of the present invention may be implemented using one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSDPs), Programmable Logic Devices (PDLs), Field Programmable Gate Arrays (FPGAs), processors, controllers, microcontrollers, microprocessors, etc.
[0324] In the case of implementation by firmware or software, the method according to the embodiment of the present invention may be implemented in the form of modules, procedures, or functions performing the functions or operations described above. The software code is stored in a memory and implemented by a processor. The memory may be located inside or outside the processor and may exchange data with the processor by various means known in the art.
[0325] Some embodiments may be embodied in the form of a recording medium including computer executable instructions such as program modules executed by a computer. Computer readable media is any available medium that can be accessed by a computer, including both volatile and non-volatile media, and both separate and non-separate media. Computer readable media also includes both storage media and communication media. Computer storage media includes both volatile and non-volatile media, and both separate and non-separate media embodied in any method or technology for storage of information such as computer readable instructions, data structures, program modules, or other data. Communication media typically includes computer readable instructions, data structures, or other data in a modulated data signal such as a program module, or other transmission mechanism, and includes any information delivery media.
[0326] The above description of the present invention is for illustrative purposes only, and those skilled in the art will understand that the present invention can be easily modified into other specific forms without changing the technical idea or essential features of the present invention. Therefore, it should be understood that the above-described embodiments are illustrative in all respects and are not limiting. For example, each component described as a single type may be implemented in a distributed form, and each component described as a distributed form may be implemented in a combined form.
[0327] The scope of the present invention is indicated by the claims set forth below rather than by the above detailed description, and all modifications and variations derived from the meaning and scope of the claims and their equivalent concepts should be interpreted as being included in the scope of the present invention. [Explanation of symbols]
[0328] 110 Conversion unit 115 Quantization section 120 Inverse quantization section 125 Reverse conversion unit 130 Filtering section 150 Prediction Department 152 Intra prediction unit 154 Inter Prediction Unit 154a Motion Estimation Unit 154b Motion compensation section 160 Entropy coding unit 210 Entropy Decoding Unit 220 Inverse quantization section 225 Inverse conversion unit 230 Filtering section 250 Prediction Department 252 Intra prediction unit 254 Inter Prediction Unit 710 Current Picture 720 Reference Picture 810 Encoder 820 Decoder
Claims
1. 1. A method for processing a video signal, comprising: constructing a motion vector prediction (MVP) candidate list for motion compensation of a current block using one of a first method and a second method; obtaining a motion vector predictor for a current block based on the constructed MVP candidate list; obtaining a motion vector difference value indicative of a difference between the motion vector of the current block and the motion vector predictor; modifying the motion vector difference value based on a resolution of the motion vector difference value of the current block, the resolution of the motion vector difference value being one of a plurality of available resolutions included in a resolution set, and the configuration of the plurality of available resolutions included in the resolution set varies depending on which of the first method and the second method is used to configure the MVP candidate list of the current block; obtaining a motion vector for the current block based on the motion vector predictor and the modified motion vector differential value; and A method for processing a video signal, comprising the step of reconstructing the current block based on the obtained motion vector.
2. a resolution of the motion vector difference value is obtained from one of a first resolution set and a second resolution set depending on whether an MVP candidate list of the current block is constructed using the first method or the second method; 2. The video signal processing method of claim 1, wherein the second resolution set includes at least one available resolution other than the plurality of available resolutions included in the first resolution set.
3. If the MVP candidate list is constructed using the first method based on an affine model, the resolution of the motion vector difference values is obtained from the first resolution set; 3. The method of claim 2, wherein if the MVP candidate list is constructed using the second method that is not based on the affine model, then a resolution of the motion vector difference values is obtained from the second resolution set.
4. The video signal processing method of claim 3 , wherein a first largest available resolution among a plurality of available resolutions included in the first resolution set is smaller than a second largest available resolution among a plurality of available resolutions included in the second resolution set.
5. the first available resolution is a resolution of one sample unit; 5. The method of claim 4, wherein the second available resolution is a resolution of four sample units.
6. The step of modifying the motion vector differential value includes: obtaining an indicator indicating a resolution of a motion vector difference value of the current block among a plurality of available resolutions included in any one of the first resolution set and the second resolution set; and modifying the motion vector differential value based on a resolution indicated by the indicator; 3. The video signal processing method of claim 2, wherein when the indicator value is a first value, the resolution indicated by the first value varies depending on whether the MVP candidate list is constructed using the first method or the second method.
7. When the MVP candidate list is constructed using the first method, the first value indicates a first available resolution, which is one of available resolutions included in a first resolution set; if the MVP candidate list is constructed using the second method, the first value indicates a second available resolution, the second available resolution being one of available resolutions included in a second resolution set; The method of claim 6 , wherein the first available resolution and the second available resolution are different from each other.
8. the first resolution set and the second resolution set all include a first available resolution; 8. The method of claim 7, wherein when the MVP candidate list is constructed using the second method, the first available resolution is indicated by a second value of the indicator, the second value being different than the first value.
9. The indicator is expressed in bits of variable length, The method of claim 6, wherein the first value is one of a plurality of values represented by the variable length bits.
10. a third value of the indicator, different from the first value, is a value represented by the shortest bit length among the plurality of values; When the MVP candidate list is constructed by the second method, the third value indicates a smallest available resolution among a plurality of available resolution sets included in the second resolution set; 10. The video signal processing method of claim 9, wherein, when the MVP candidate list is constructed by the first method, the third value indicates an available resolution other than the smallest available resolution among a plurality of available resolution sets included in the first resolution set.
11. The method of claim 2 , wherein the number of available resolutions included in the first resolution set is different from the number of available resolutions included in the second resolution set.
12. The method of claim 11, wherein a number of available resolutions constituting the resolution set varies according to a picture order count (POC) of a reference picture for motion compensation of the current block.
13. If a picture order count (POC) of a reference picture for motion compensation of the current block is equal to a POC of a current picture including the current block, a resolution of a motion vector difference value of the current block is obtained from the first resolution set; if a picture order count of a reference picture for motion compensation of the current block is not equal to a POC of a current picture including the current block, a resolution of a motion vector difference value of the current block is obtained from the second resolution set; The method of claim 12, wherein the first resolution set is composed of remaining available resolutions excluding a smallest available resolution among the available resolutions included in the second resolution set.
14. In a video signal decoding apparatus, A processor is included. The processor, constructing a motion vector prediction (MVP) candidate list for motion compensation of a current block using one of a first method and a second method; Obtaining a motion vector predictor for a current block based on the constructed MVP candidate list; obtaining a motion vector difference value indicating a difference between the motion vector of the current block and the motion vector predictor; modifying the motion vector differential value based on a resolution of the motion vector differential value of the current block, the resolution of the motion vector differential value being one of a plurality of available resolutions included in a resolution set, the configuration of the plurality of available resolutions included in the resolution set being changed depending on which of the first method and the second method is used to configure the MVP candidate list of the current block; obtaining a motion vector for the current block based on the motion vector predictor and the modified motion vector differential value; The video signal decoding apparatus reconstructs the current block based on the obtained motion vector.
15. a resolution of the motion vector difference value is obtained from one of a first resolution set and a second resolution set depending on whether an MVP candidate list of the current block is constructed using the first method or the second method; 15. The video signal decoding apparatus of claim 14, wherein the second resolution set includes at least one available resolution other than the plurality of available resolutions included in the first resolution set.
16. If the MVP candidate list is constructed using the first method based on an affine model, the resolution of the motion vector difference values is obtained from the first resolution set; 16. The video signal decoding apparatus of claim 15, wherein if the MVP candidate list is constructed using the second method not based on the affine model, a resolution of the motion vector difference values is obtained from the second resolution set.
17. 17. The video signal decoding apparatus of claim 16, wherein a first available resolution among a plurality of available resolutions included in the first resolution set is smaller than a second available resolution among a plurality of available resolutions included in the second resolution set.
18. The processor, obtaining an indicator indicating a resolution of a motion vector difference value of the current block among a plurality of available resolutions included in any one of the first resolution set and the second resolution set; modifying the motion vector differential value based on a resolution indicated by the indicator; 16. The video signal decoding apparatus of claim 15, wherein, when the value of the indicator is a first value, the resolution indicated by the first value varies depending on whether the MVP candidate list is constructed using the first method or the second method.
19. The indicator is expressed in bits of variable length, 20. The video signal decoding apparatus of claim 18, wherein the first value is one of a plurality of values represented by the variable length bits.
20. a second value of the indicator, different from the first value, being a value represented by the shortest bit length among the plurality of values; When the MVP candidate list is constructed by the second method, the second value indicates a smallest available resolution among a plurality of available resolution sets included in the second resolution set; 20. The video signal decoding apparatus of claim 19, wherein, when the MVP candidate list is constructed by the first method, the second value indicates an available resolution other than the smallest available resolution among a plurality of available resolution sets included in the first resolution set.
21. 1. A video signal encoding apparatus comprising: A processor is included. The processor, obtaining a motion vector of the current block based on a position of a reference block referenced for motion compensation of the current block; constructing a motion vector prediction (MVP) candidate list for motion compensation of the current block using one of a first method and a second method; obtaining a motion vector difference value based on a difference between any one of a plurality of candidates included in the MVP candidate list and the motion vector of the current block; determining a motion vector differential value to be signaled based on a resolution of the motion vector differential value of the current block, the resolution of the motion vector differential value being one of a plurality of available resolutions included in a resolution set, the configuration of the plurality of available resolutions included in the resolution set being changed depending on which of the first method and the second method is used to configure the MVP candidate list of the current block; A video signal encoding apparatus for generating a bitstream including said signaled motion vector differential values.
22. a resolution of the motion vector difference value is obtained from one of a first resolution set and a second resolution set depending on whether an MVP candidate list of the current block is constructed using the first method or the second method; 22. The video signal encoding apparatus of claim 21, wherein the second resolution set includes at least one available resolution other than the plurality of available resolutions included in the first resolution set.
23. 23. The video signal encoding apparatus of claim 22, wherein a first largest available resolution among a plurality of available resolutions included in the first resolution set is smaller than a second largest available resolution among a plurality of available resolutions included in the second resolution set.
24. The processor, determining an indicator indicating one of a plurality of available resolutions included in one of the first resolution set and the second resolution set; generating a bitstream including the indicator and the signaled motion vector differential values; and 22. The video signal encoding apparatus of claim 21, wherein, when the indicator value is a first value, the resolution indicated by the first value varies depending on whether the MVP candidate list is constructed using the first method or the second method.
25. The indicator is expressed in bits of variable length, 25. The video signal encoding apparatus of claim 24, wherein the first value is one of a plurality of values represented by the variable length bits.
26. a second value of the indicator, different from the first value, being a value represented by the shortest bit length among the plurality of values; When the MVP candidate list is constructed by the second method, the second value indicates a smallest available resolution among a plurality of available resolution sets included in the second resolution set; 26. The video signal encoding apparatus of claim 25, wherein when the MVP candidate list is constructed by the first method, the second value indicates an available resolution other than the smallest available resolution among a plurality of available resolution sets included in the first resolution set.
27. A computer-readable recording medium storing a bitstream, The bitstream comprises: a modified motion vector differential value of the current block that is modified based on a resolution of the motion vector differential value of the current block; and A computer-readable recording medium, in which the resolution of the motion vector differential value is any one of a plurality of available resolutions included in a resolution set, and the configuration of the plurality of available resolutions included in the resolution set varies depending on which of a first method and a second method is used to configure a motion vector prediction (MVP) candidate list for motion compensation of the current block.
28. a resolution of the motion vector difference value is obtained from one of a first resolution set and a second resolution set depending on whether an MVP candidate list of the current block is constructed using the first method or the second method; 28. The computer readable medium of claim 27, wherein the second resolution set includes at least one available resolution other than the plurality of available resolutions included in the first resolution set.
29. 29. The computer-readable recording medium of claim 28, wherein a first largest available resolution among the multiple available resolutions included in the first resolution set is smaller than a second largest available resolution among the multiple available resolutions included in the second resolution set.
30. The bitstream comprises: and further comprising an indicator indicating a resolution of a motion vector difference value of the current block among a plurality of available resolutions included in any one of the first resolution set and the second resolution set, 30. The computer-readable storage medium of claim 28, wherein when the indicator value is a first value, the resolution indicated by the first value varies depending on whether the MVP candidate list is constructed using the first method or the second method.
31. The indicator is expressed in bits of variable length, 31. The computer readable recording medium of claim 30, wherein the first value is one of a plurality of values represented by the variable length bits.
32. a second value of the indicator, different from the first value, being a value represented by the shortest bit length among the plurality of values; When the MVP candidate list is constructed by the second method, the second value indicates a smallest available resolution among a plurality of available resolution sets included in the second resolution set; 32. The computer-readable recording medium of claim 31, wherein when the MVP candidate list is constructed by the first method, the second value indicates an available resolution other than the smallest available resolution among a set of available resolutions included in the first resolution set.
Citation Information
Patent Citations
Adaptive motion vector precision for video coding
US20180098089A1
