Method and device for inter-frame prediction in video processing system
By adopting the inter-frame prediction method based on affine motion prediction in video coding, using control point motion vector difference and motion vector difference to improve video coding efficiency, the problem of high transmission and storage costs of high-resolution video images is solved, and the More efficient encoding and transmission.
Patent Information
- Application Number
- CN201980032706.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2018-04-13
- Filing Date
- 2019-04-11
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2039-04-11
AI Technical Summary
Existing technologies are difficult to effectively compress and transmit high-resolution, high-quality video images, resulting in increased transmission and storage costs.
The interframe prediction method based on affine motion prediction is used to improve coding efficiency by deriving the control point motion vector difference and motion vector difference of the current block, reduce the amount of motion vector data, and improve video coding efficiency.
Significantly improves inter-frame prediction efficiency, reduces the amount of motion vector data, improves overall coding efficiency, and reduces transmission and storage costs.
Smart Images

Figure CN112136328B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates generally to video coding techniques, and more particularly, to an inter-frame prediction method and apparatus in a video processing system. Background Art
[0002] The demand for high-resolution and high-quality images such as high-definition (HD) images and ultra-high-definition (UHD) images is increasing in various fields. Because image data has high resolution and high quality, the amount of information or bit amount to be transmitted increases relative to conventional image data. Therefore, when image data is transmitted using a medium such as a conventional wired / wireless broadband line or when image data is stored using an existing storage medium, its transmission cost and storage cost increase.
[0003] Therefore, there is a need for an efficient image compression technology for effectively transmitting, storing, and reproducing information of high-resolution and high-quality images. Summary of the invention
[0004] The technical purpose of the present disclosure is to provide a method and device for increasing video coding efficiency.
[0005] Another technical object of the present disclosure is to provide a method and apparatus for processing an image using affine motion prediction.
[0006] Yet another technical objective of the present disclosure is to provide a method and apparatus for performing inter-frame prediction based on a sample-unit motion vector.
[0007] Yet another technical objective of the present disclosure is to provide a method and apparatus for deriving a sample-unit motion vector based on a motion vector of a control point for a current block.
[0008] Still another technical object of the present disclosure is to provide a method and apparatus for improving encoding efficiency by using a difference between motion vector differences of control points of a current block.
[0009] Yet another technical objective of the present disclosure is to provide a method and apparatus for deriving a motion vector predictor of another control point based on a motion vector predictor of a control point.
[0010] Yet another technical problem of the present disclosure is to provide a method and apparatus for deriving a motion vector predictor of a control point based on a motion vector of a reference region adjacent to the control point.
[0011] An embodiment of the present disclosure provides an inter-frame prediction method performed by a decoding device. The inter-frame prediction method includes: deriving a control point (CP) for a current block, wherein the CP includes a first CP and a second CP; deriving a first motion vector predictor (MVP) for the first CP and a second MVP for the second CP based on neighboring blocks of the current block, decoding a first motion vector difference (MVD) for the first CP, decoding a difference (DMVD) between two MVDs for the second CP, deriving a first motion vector (MV) for the first CP based on the first MVP and the first MVD, deriving a second MV for the second CP based on the second MVP and the DMVD for the second CP, and generating a prediction block for the current block based on the first MV and the second MV, wherein the DMVD for the second CP represents the difference between the first MVD and the second MVD for the second CP.
[0012] According to another example of the present disclosure, a video encoding method performed by an encoding device is provided. The encoding method includes: deriving a control point (CP) for a current block, wherein the CP includes a first CP and a second CP; deriving a first motion vector predictor (MVP) for the first CP and a second MVP for the second CP based on neighboring blocks of the current block, deriving a first motion vector difference (MVD) for the first CP, deriving a difference (DMVD) between the two MVDs for the second CP, and encoding image information including information about the first MVD and information about the DMVD for the second CP to output a bitstream, wherein the DMVD for the second CP represents the difference between the first MVD and the second MVD for the second CP.
[0013] According to another embodiment of the present disclosure, a decoding device for performing an inter-frame prediction method is provided. The decoding device includes an entropy decoder that decodes a first motion vector difference (MVD) for a first CP and a difference (DMVD) between two MVDs for a second CP; and a predictor that derives a control point (CP) for a current block, including a first CP and a second CP, derives a first motion vector predictor (MVP) for the first CP and a second MVP for the second CP based on neighboring blocks of the current block, derives a first motion vector (MV) for the first CP based on the first MVP and the first MVD, derives a second MV for the second CP based on the second MVP and the DMVD for the second CP, and generates a prediction block for the current block based on the first MV and the second MV, wherein the DMVD for the second CP represents the difference between the first MVD and the second MVD for the second CP.
[0014] According to another embodiment of the present disclosure, a coding device for performing video coding is provided. The coding device includes a predictor that derives a control point (CP) for a current block, including a first CP and a second CP, derives a first motion vector predictor (MVP) for the first CP and a second MVP for the second CP based on neighboring blocks of the current block, derives a first motion vector difference (MVD) for the first CP, and derives a difference (DMVD) between two MVDs for the second CP, and an entropy encoder that encodes image information including information about the first MVD and information about the DMVD for the second CP to output a bitstream, wherein the DMVD for the second CP represents a difference between the first MVD and the second MVD for the second CP.
[0015] According to the present disclosure, a more accurate sample-unit motion vector for a current block may be derived, and inter-prediction efficiency may be significantly increased.
[0016] According to the present disclosure, a motion vector of a sample of a current block may be efficiently derived based on a motion vector of a control point for the current block.
[0017] According to the present disclosure, it is possible to remove or reduce the amount of data of a motion vector for a control point by transmitting a motion vector difference and / or a difference between motion vector differences for a control point of a current block, and overall encoding efficiency may be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 is a block diagram schematically illustrating a video encoding apparatus according to an embodiment of the present disclosure.
[0019] Figure 2 is a block diagram schematically illustrating a video decoding apparatus according to an embodiment of the present disclosure.
[0020] Figure 3 A content streaming system according to an embodiment of the present disclosure is illustratively represented.
[0021] Figure 4 is a flowchart for illustrating a method of deriving a motion vector prediction value from a neighboring block according to an embodiment of the present disclosure.
[0022] Figure 5 An affine motion model according to an embodiment of the present disclosure is illustratively represented.
[0023] Figure 6 A simplified affine motion model according to an embodiment of the present disclosure is illustratively shown.
[0024] Figure 7 is a diagram for describing a method of deriving a motion vector predictor at a control point according to an embodiment of the present disclosure.
[0025] Figure 8 Two CPs for a 4-parameter affine motion model according to an embodiment of the present disclosure are illustratively shown.
[0026] Fig. 9 The case where the median value is additionally used in the 4-parameter affine motion model according to an embodiment of the present disclosure is illustratively shown.
[0027] Fig.10 Three CPs for a 6-parameter affine motion model according to an embodiment of the present disclosure are illustratively shown.
[0028] Fig.11 The video encoding method of the encoding device according to the present disclosure is schematically shown.
[0029] Fig.12 The inter-frame prediction method of the decoding device according to the present disclosure is schematically illustrated. DETAILED DESCRIPTION
[0030] Although the present disclosure can be modified in various forms, the specific embodiments of the present disclosure will be described in detail and illustrated in the accompanying drawings. However, this is not intended to limit the present disclosure to specific embodiments. The terms used in this specification are only used to describe specific embodiments and are not intended to limit the technical ideas of the present disclosure. Unless the context clearly indicates otherwise, the singular form may include the plural form. Terms such as "including (or containing)", "having (or being provided)" are intended to indicate that the features, numbers, steps, operations, components, parts or combinations thereof written in the following description exist, and therefore should not be understood as excluding the possibility of existing or adding one or more different features, numbers, steps, operations, components, parts or combinations thereof in advance.
[0031] At the same time, in order to facilitate the explanation of different specific functions, the configurations in the drawings described in the present disclosure are independently drawn in the video encoding device / decoding device, but this does not mean that the configuration is implemented by independent hardware or independent software. For example, two or more configurations can be combined to form a single configuration, and a configuration can be divided into multiple configurations. Embodiments in which configurations are combined and / or configurations are divided without departing from the concept of the present disclosure also belong to the present disclosure.
[0032] In the present disclosure, the terms " / " and "," should be interpreted as indicating "and / or". For example, the expression "A / B" may mean "A and / or B", while "A, B" may mean "A and / or B". In addition, "A / B / C" may mean "at least one of A, B, and / or C". In addition, "A, B, C" may mean "at least one of A, B, and / or C".
[0033] Furthermore, in this disclosure, the term "or" should be interpreted as indicating "and / or." For example, the expression "A or B" may include 1) only A, 2) only B, and / or 3) both A and B. In other words, the term "or" in this document may be interpreted as indicating "additionally or alternatively."
[0034] The present disclosure can be modified in various forms, and its specific embodiments will be described and illustrated in the accompanying drawings. However, these embodiments are not intended to limit the present disclosure. The terms used in the following description are only used to describe specific embodiments and are not intended to limit the present disclosure. The singular expression includes the plural expression as long as it is clearly read out differently. Terms such as "including" and "having" are intended to indicate the presence of features, numbers, steps, operations, elements, components or combinations thereof used in the following description, so it should be understood that there is no possibility of excluding the presence or addition of one or more different features, numbers, steps, operations, elements, components or combinations thereof.
[0035] In addition, for the convenience of explaining different specific functions, the elements in the drawings described in this embodiment are drawn independently, which does not mean that these elements are implemented by independent hardware or independent software. For example, two or more of the elements can be combined to form a single element, or an element can be divided into multiple elements. Without departing from the concept of this embodiment, the embodiment in which the elements are combined and / or divided belongs to the present disclosure.
[0036] The following description may be applied to the technical field of processing videos, images or pictures. For example, the methods or exemplary embodiments disclosed in the following description may be associated with the disclosure of the Versatile Video Coding (VVC) standard (ITU-T H.266 Recommendation), the next generation video / image coding standard after VVC, or the standard before VVC (e.g., the High Efficiency Video Coding (HEVC) standard (ITU-T H.265 Recommendation), etc.).
[0037] Hereinafter, an example of the present embodiment will be described in detail with reference to the accompanying drawings. In addition, throughout the drawings, like reference numerals are used to indicate like elements, and the same description of the like elements will be omitted.
[0038] In the present disclosure, a video may mean a collection of a series of images according to the passage of time. Generally, a picture means a unit representing an image at a specific time, and a slice is a unit constituting a part of a picture. A picture may be composed of multiple slices, and the terms picture and slice may be mixed with each other as occasion requires.
[0039] A pixel or a pel may refer to the smallest unit constituting a picture (or image). In addition, a "sample" may be used as a term corresponding to a pixel. A sample may generally represent a pixel or a value of a pixel, may represent only a pixel (pixel value) of a luminance component, and may represent only a pixel (pixel value) of a chrominance component.
[0040] A unit indicates a basic unit of image processing. A unit may include at least one of a specific region and information related to the region. Optionally, a unit may be mixed with terms such as a block, a region, etc. In a typical case, an M×N block may represent a set of samples or transform coefficients arranged in M columns and N rows.
[0041] Figure 1 1 is a block diagram briefly illustrating the structure of an encoding device according to an embodiment of the present disclosure. Hereinafter, the encoding / decoding device may include a video encoding / decoding device and / or an image encoding / decoding device, and the video encoding / decoding device may be used as a concept including the image encoding / decoding device, or the image encoding / decoding device may be used as a concept including the video encoding / decoding device.
[0042] refer to Figure 1 , the video encoding apparatus 100 may include a picture segmenter 105, a predictor 110, a residual processor 120, an entropy encoder 130, an adder 140, a filter 150, and a memory 160. The residual processor 120 may include a subtractor 121, a transformer 122, a quantizer 123, a rearranger 124, a dequantizer 125, and an inverse transformer 126.
[0043] The picture divider 105 may separate the input picture into at least one processing unit.
[0044] In the example, the processing unit may be referred to as a coding unit (CU). In this case, the coding unit may be recursively separated from the maximum coding unit (LCU) according to a quadtree binary tree (QTBT) structure. For example, a coding unit may be separated into multiple coding units of a deeper depth based on a quadtree structure, a binary tree structure, and / or a ternary tree structure. In this case, for example, the quadtree structure may be applied first, and the binary tree structure and the ternary tree structure may be applied later. Alternatively, the binary tree structure / ternary tree structure may be applied first. The encoding process according to the present embodiment may be performed based on the final coding unit that is no longer further separated. In this case, the maximum coding unit may be used as the final coding unit based on coding efficiency, etc. according to image characteristics, or the coding unit may be recursively separated into coding units of a lower depth as needed and the coding unit with the best size may be used as the final coding unit. Here, the encoding process may include processes such as prediction, transformation, and reconstruction, which will be described later.
[0045] In another example, the processing unit may include a coding unit (CU), a prediction unit (PU), or a transformer (TU). The coding unit may be separated from the maximum coding unit (LCU) into coding units of a deeper depth according to a quadtree structure. In this case, the maximum coding unit may be directly used as a final coding unit based on coding efficiency, etc. according to image characteristics, or the coding unit may be recursively separated into coding units of a deeper depth as needed, and the coding unit with the best size may be used as the final coding unit. When the minimum coding unit (SCU) is set, the coding unit may not be separated into coding units smaller than the minimum coding unit. Here, the final coding unit refers to a coding unit that is partitioned or separated into a prediction unit or a transformer. A prediction unit is a unit partitioned from a coding unit and may be a unit of sample prediction. Here, the prediction unit may be divided into sub-blocks. The transformer may be divided from the coding unit according to the quadtree structure, and the transformer may be a unit that derives a transform coefficient and / or a unit that derives a residual signal from a transform coefficient. Hereinafter, a coding unit may be referred to as a coding block (CB), a prediction unit may be referred to as a prediction block (PB), and a transformer may be referred to as a transform block (TB). A prediction block or prediction unit may refer to a specific area in the form of a block in a picture and include an array of prediction samples. In addition, a transform block or transform unit may refer to a specific area in the form of a block in a picture and include an array of transform coefficients or residual samples.
[0046] The predictor 110 may perform prediction on a processing target block (hereinafter, it may represent a current block or a residual block), and may generate a prediction block including a prediction sample for the current block. The unit of prediction performed in the predictor 110 may be a coding block, or may be a transform block, or may be a prediction block.
[0047] The predictor 110 may determine whether to apply intra prediction or inter prediction to the current block. For example, the predictor 110 may determine whether to apply intra prediction or inter prediction in units of CUs.
[0048] In the case of intra-frame prediction, the predictor 110 can derive the prediction sample of the current block based on the reference sample outside the current block in the picture to which the current block belongs (hereinafter, the current picture). In this case, the predictor 110 can derive the prediction sample based on the average value or interpolation of the neighboring reference samples of the current block (case (i)), or can derive the prediction sample based on the reference sample existing in a specific (prediction) direction relative to the prediction sample among the neighboring reference samples of the current block (case (ii)). Case (i) can be called a non-directional mode or a non-angle mode, and case (ii) can be called a directional mode or an angle mode. In intra-frame prediction, the prediction mode may include 33 directional modes and at least two non-directional modes as examples. The non-directional mode may include a DC mode and a plane mode. The predictor 110 may determine the prediction mode to be applied to the current block by using the prediction mode applied to the neighboring blocks.
[0049] In the case of inter-frame prediction, the predictor 110 can derive a prediction sample for the current block based on a sample specified by a motion vector on a reference picture. The predictor 110 can derive a prediction sample for the current block by applying any one of a skip mode, a merge mode, and a motion vector prediction (MVP) mode. In the case of the skip mode and the merge mode, the predictor 110 can use the motion information of the neighboring blocks as the motion information of the current block. In the case of the skip mode, unlike the merge mode, the difference (residual) between the prediction sample and the original sample is not sent. In the case of the MVP mode, the motion vector of the neighboring block is used as a motion vector predictor to derive the motion vector of the current block.
[0050] In the case of inter-frame prediction, the neighboring blocks may include spatial neighboring blocks present in the current picture and temporal neighboring blocks present in the reference picture. The reference picture including the temporal neighboring blocks may also be referred to as a collocated picture (colPic). Motion information may include a motion vector and a reference picture index. Information such as prediction mode information and motion information may be (entropy) encoded and then output as a bitstream.
[0051] When motion information of temporally neighboring blocks is used in skip mode and merge mode, the highest picture in the reference picture list may be used as a reference picture. Reference pictures included in the reference picture list may be aligned based on a picture order number (POC) difference between the current picture and the corresponding reference picture. POC corresponds to a display order and may be distinguished from a coding order.
[0052] The subtractor 121 generates a residual sample, which is a difference between the original sample and the predicted sample. If the skip mode is applied, the residual sample may not be generated as described above.
[0053] The transformer 122 transforms the residual samples in units of transform blocks to generate transform coefficients. The transformer 122 may perform the transform based on the size of the corresponding transform block and the prediction mode applied to the prediction block or coding block that overlaps the transform block spatially. For example, if intra prediction is applied to the prediction block or coding block that overlaps the transform block and the transform block is a 4×4 residual array, the residual samples may be transformed using a discrete sine transform (DST) transform kernel, and in other cases, the residual samples may be transformed using a discrete cosine transform (DCT) transform kernel.
[0054] The quantizer 123 may quantize the transform coefficient to generate a quantized transform coefficient.
[0055] The rearranger 124 rearranges the quantized transform coefficients. The rearranger 124 may rearrange the quantized transform coefficients in a block form into a one-dimensional vector by a coefficient scanning method. Although the rearranger 124 is described as a separate component, the rearranger 124 may be a part of the quantizer 123.
[0056] The entropy encoder 130 may perform entropy encoding on the quantized transform coefficients. Entropy encoding may include encoding methods such as exponential Golomb, context adaptive variable length coding (CAVLC), context adaptive binary arithmetic coding (CABAC), etc. In addition to the quantized transform coefficients, the entropy encoder 130 may also encode information required for video reconstruction (e.g., syntax element values, etc.) together or separately according to entropy encoding or according to a preconfigured method. Entropy encoding information may be sent or stored in units of a network abstraction layer (NAL) in the form of a bitstream. The bitstream may be sent or stored in a digital storage medium via a network. Here, the network may include a broadcast network or a communication network, and the digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SDD, etc.
[0057] The dequantizer 125 dequantizes the value (transform coefficient) quantized by the quantizer 123 , and the inverse transformer 126 inversely transforms the value dequantized by the dequantizer 125 to generate residual samples.
[0058] The adder 140 adds the residual samples to the prediction samples to reconstruct the picture. The residual samples may be added to the prediction samples in units of blocks to generate a reconstructed block. Although the adder 140 is described as a separate component, the adder 140 may be part of the predictor 110. In addition, the adder 140 may be referred to as a reconstructor or a reconstructed block generator.
[0059] The filter 150 may apply deblocking filtering and / or sample adaptive offset to the reconstructed picture. Artifacts at block boundaries in the reconstructed picture or distortion during quantization may be corrected by deblocking filtering and / or sample adaptive offset. After deblocking filtering is completed, sample adaptive offset may be applied in units of samples. The filter 150 may apply an adaptive loop filter (ALF) to the reconstructed picture. ALF may be applied to the reconstructed picture to which deblocking filtering and / or sample adaptive offset have been applied.
[0060] The memory 160 may store a reconstructed picture (decoded picture) or information required for encoding / decoding. Here, the reconstructed picture may be a reconstructed picture filtered by the filter 150. The stored reconstructed picture may be used as a reference picture for (inter) prediction of other pictures. For example, the memory 160 may store a (reference) picture for inter prediction. Here, the picture for inter prediction may be specified according to a reference picture set or a reference picture list.
[0061] Figure 2 is a block diagram briefly illustrating a video / image decoding device according to an embodiment of the present disclosure.
[0062] Hereinafter, a video decoding device may include an image decoding device.
[0063] refer to Figure 2 The video decoding apparatus 200 may include an entropy decoder 210, a residual processor 220, a predictor 230, an adder 240, a filter 250, and a memory 260. The residual processor 220 may include a rearranger 221, an inverse quantizer 222, and an inverse transformer 223.
[0064] In addition, although not depicted, the video decoding apparatus 200 may include a receiver for receiving a bitstream including video information. The receiver may be configured as a separate module, or may be included in the entropy decoder 210.
[0065] When a bitstream including video / image information is input, the video decoding device 200 may reconstruct the video / image / picture in association with a process of processing the video information in the video encoding device.
[0066] For example, the video decoding device 200 may perform video decoding using a processing unit applied in a video encoding device. Thus, the processing unit block of video decoding may be, for example, a coding unit, and in another example, a coding unit, a prediction unit, or a transformer. The coding unit may be separated from the maximum coding unit according to a quadtree structure and / or a binary tree structure and / or a ternary tree structure.
[0067] In some cases, a prediction unit and a transformer may be further used, and in this case, a prediction block is a block derived or partitioned from a coding unit and may be a unit of sample prediction. Here, a prediction unit may be divided into sub-blocks. A transformer may be separated from a coding unit according to a quadtree structure and may be a unit for deriving a transform coefficient or a unit for deriving a residual signal from a transform coefficient.
[0068] The entropy decoder 210 can parse the bitstream to output information required for video reconstruction or picture reconstruction. For example, the entropy decoder 210 can decode the information in the bitstream based on a coding method such as exponential Golomb coding, CAVLC, CABAC, etc., and can output the values of syntax elements required for video reconstruction and the quantized values of the transform coefficients about the residual.
[0069] More specifically, the CABAC entropy decoding method may receive a bin corresponding to each syntax element in a bitstream, determine a context model using decoding target syntax element information and decoding information of adjacent blocks and decoding target blocks or information of symbols / bins decoded in a previous step, predict bin generation probabilities according to the determined context model, and perform arithmetic decoding of the bins to generate symbols corresponding to each syntax element value. Here, the CABAC entropy decoding method may update the context model using information of symbols / bins decoded by the context model for the next symbol / bin after determining the context model.
[0070] Information about prediction among the information decoded in the entropy decoder 210 may be provided to the predictor 250 , and a residual value (ie, a quantized transform coefficient) on which entropy decoding has been performed by the entropy decoder 210 may be input to the rearranger 221 .
[0071] The rearranger 221 may rearrange the quantized transform coefficients into a two-dimensional block form. The rearranger 221 may perform rearrangement corresponding to the coefficient scanning performed by the encoding device. Although the rearranger 221 is described as a separate component, the rearranger 221 may be a part of the inverse quantizer 222.
[0072] The inverse quantizer 222 may inverse quantize the quantized transform coefficient based on the (inverse) quantization parameter to output the transform coefficient. In this case, information for deriving the quantization parameter may be signaled from the encoding device.
[0073] The inverse transformer 223 may inversely transform the transform coefficients to derive residual samples.
[0074] The predictor 230 may perform prediction on the current block, and may generate a prediction block including prediction samples for the current block. A unit of prediction performed in the predictor 230 may be a coding block, or may be a transform block, or may be a prediction block.
[0075] The predictor 230 may determine whether to apply intra prediction or inter prediction based on the information about the prediction. In this case, the unit for determining which one to use between intra prediction and inter prediction may be different from the unit for generating prediction samples. In addition, the unit for generating prediction samples may also be different in inter prediction and intra prediction. For example, it may be determined in units of CUs which one to apply between inter prediction and intra prediction. In addition, for example, in inter prediction, prediction samples may be generated by determining a prediction mode in units of PUs, and in intra prediction, prediction samples may be generated in units of TUs by determining a prediction mode in units of PUs.
[0076] In the case of intra prediction, the predictor 230 may derive prediction samples for the current block based on neighboring reference samples in the current picture. The predictor 230 may derive prediction samples for the current block by applying a directional mode or a non-directional mode based on neighboring reference samples of the current block. In this case, the prediction mode to be applied to the current block may be determined by using the intra prediction mode of the neighboring blocks.
[0077] In the case of inter-frame prediction, the predictor 230 may derive a prediction sample for the current block based on a sample specified in a reference picture according to a motion vector. The predictor 230 may derive a prediction sample for the current block using one of a skip mode, a merge mode, and an MVP mode. Here, motion information (e.g., a motion vector and information about a reference picture index) required for inter-frame prediction of the current block provided by the video encoding device may be acquired or derived based on information about prediction.
[0078] In the skip mode and the merge mode, the motion information of the neighboring blocks may be used as the motion information of the current block. Here, the neighboring blocks may include spatial neighboring blocks and temporal neighboring blocks.
[0079] The predictor 230 may construct a merge candidate list using the motion information of the available neighboring blocks, and use the information indicated by the merge index on the merge candidate list as the motion vector of the current block. The merge index may be signaled by the encoding device. The motion information may include a motion vector and a reference picture. In skip mode and merge mode, when the motion information of the temporal neighboring blocks is used, the first sorted picture in the reference picture list may be used as a reference picture.
[0080] In the case of the skip mode, unlike the merge mode, the difference (residual) between the predicted sample and the original sample is not transmitted.
[0081] In the case of MVP mode, the motion vector of the current block may be derived using the motion vector of the neighboring block as a motion vector predictor. Here, the neighboring block may include a spatial neighboring block and a temporal neighboring block.
[0082] When the merge mode is applied, for example, the merge candidate list may be generated using the motion vectors of the reconstructed spatial neighboring blocks and / or the motion vectors corresponding to the Col blocks as the temporal neighboring blocks. The motion vectors of the candidate blocks selected from the merge candidate list are used as the motion vectors of the current block in the merge mode. The above-mentioned information on the prediction may include a merge index indicating the candidate block with the best motion vector selected from the candidate blocks included in the merge candidate list. Here, the predictor 230 may derive the motion vector of the current block using the merge index.
[0083] When the MVP (motion vector prediction) mode is applied as another example, the motion vector predictor candidate list may be generated using the motion vector of the reconstructed spatial neighboring block and / or the motion vector corresponding to the Col block as the temporal neighboring block. That is, the motion vector of the reconstructed spatial neighboring block and / or the motion vector corresponding to the Col block as the temporal neighboring block may be used as a motion vector candidate. The above-mentioned information on prediction may include a predicted motion vector index indicating the best motion vector selected from the motion vector candidates included in the list. Here, the predictor 230 may select the predicted motion vector of the current block from the motion vector candidates included in the motion vector candidate list using the motion vector index. The predictor of the encoding device may obtain the motion vector difference (MVD) between the motion vector of the current block and the motion vector predictor, encode the MVD and output the encoded MVD in the form of a bitstream. That is, the MVD may be obtained by subtracting the motion vector predictor from the motion vector of the current block. Here, the predictor 230 may obtain the motion vector included in the information on prediction, and derive the motion vector of the current block by adding the motion vector difference to the motion vector predictor. In addition, the predictor may obtain or derive a reference picture index indicating a reference picture from the above-mentioned information on prediction.
[0084] The adder 240 may add the residual sample to the prediction sample to reconstruct the current block or the current picture. The adder 240 may reconstruct the current picture by adding the residual sample to the prediction sample in units of blocks. When the skip mode is applied, the residual is not sent, and thus the prediction sample may become a reconstructed sample. Although the adder 240 is described as a separate component, the adder 240 may be part of the predictor 230. In addition, the adder 240 may be referred to as a reconstructor or a reconstructed block generator.
[0085] The filter 250 may apply deblocking filtering, sample adaptive offset and / or ALF to the reconstructed picture. Here, sample adaptive offset may be applied in units of samples after deblocking filtering. ALF may be applied after deblocking filtering and / or applying sample adaptive offset.
[0086] The memory 260 may store a reconstructed picture (decoded picture) or information required for decoding. Here, the reconstructed picture may be a reconstructed picture filtered by the filter 250. For example, the memory 260 may store pictures for inter-frame prediction. Here, pictures for inter-frame prediction may be specified according to a reference picture set or a reference picture list. The reconstructed picture may be used as a reference picture for other pictures. The memory 260 may output the reconstructed picture in an output order.
[0087] In addition, as described above, when performing video encoding, prediction is performed to improve compression efficiency. Therefore, a prediction block including prediction samples for a current block as a block to be encoded (i.e., an encoding target block) can be generated. Here, the prediction block includes prediction samples in a spatial domain (or a pixel domain). The prediction block is derived in the same manner in the encoding device and the decoding device, and the encoding device can signal information about the residual between the original block and the prediction block (residual information) instead of the original sample value of the original block to the decoding device, thereby improving image coding efficiency. The decoding device can derive a residual block including residual samples based on the residual information, add the residual block to the prediction block to generate a reconstructed block including reconstructed samples, and generate a reconstructed picture including the reconstructed block.
[0088] The residual information may be generated by a transformation and quantization process. For example, the encoding device may derive a residual block between the original block and the prediction block, perform a transformation process on the residual samples (residual sample array) included in the residual block to derive a transformation coefficient, perform a quantization process on the transformation coefficient to derive a quantized transformation coefficient, and may signal the relevant residual information to the decoding device (via a bitstream). Here, the residual information may include value information, position information, transformation technology, transformation kernel, and quantization parameter of the quantized transformation coefficient. The decoding device may perform an inverse quantization / inverse transformation process based on the residual information, and may derive residual samples (or residual blocks). The decoding device may generate a reconstructed picture based on the prediction block and the residual block. In addition, for inter-frame prediction of a reference picture later, the encoding device may also perform inverse quantization / inverse transformation on the quantized transformation coefficient to derive a residual block, and generate a reconstructed picture based on the residual block.
[0089] Figure 3 A content streaming system according to an embodiment of the present disclosure is illustratively represented.
[0090] refer to Figure 3, the embodiments described in the present disclosure may be embodied and executed on a processor, microprocessor, controller, or chip. For example, the functional units shown in each of the figures may be embodied and executed on a computer, processor, microprocessor, controller, or chip. In this case, information (e.g., information about instructions) or algorithms for the embodiments may be stored in a digital storage medium.
[0091] In addition, the decoding device and the encoding device applied by the present disclosure can be included in a multimedia broadcast transceiver, a mobile communication terminal, a home theater video device, a digital theater video device, a surveillance camera, a video chat device, a real-time communication device such as video communication, a mobile streaming device, a storage medium, a portable camera, a video on demand (VoD) service providing device, an over-the-top (OTT) video device, an Internet streaming service providing device, a three-dimensional (3D) video device, a video phone video device, and a medical video device, and can be used to process a video signal or a data signal. For example, an over-the-top (OTT) video device may include a game console, a Blu-ray player, an Internet access television, a home theater system, a smart phone, a tablet computer, a digital video recorder (DVR), and the like.
[0092] In addition, the processing method applied by the present disclosure can be generated in the form of a program executed by a computer and stored in a computer-readable recording medium. Multimedia data with a data structure according to the present disclosure can also be stored in a computer-readable recording medium. The computer-readable recording medium includes various storage devices and distributed storage devices in which computer-readable data is stored. The computer-readable recording medium may include, for example, a Blu-ray disc (BD), a universal serial bus (USB), a ROM, a PROM, an EPROM, an EEPROM, a RAM, a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device. In addition, the computer-readable recording medium includes a medium embodied in the form of a carrier wave (e.g., transmission via the Internet). In addition, the bit stream generated by the encoding method can be stored in a computer-readable recording medium, or sent via a wired or wireless communication network.
[0093] In addition, the embodiments of the present disclosure may be embodied as a computer program product through program codes, and the program codes may be executed on a computer through the embodiments of the present disclosure. The program codes may be stored on a computer readable carrier.
[0094] The content streaming transmission system applied by the present disclosure may mainly include an encoding server, a streaming transmission server, a web server, a media storage device, a user device and a multimedia input device.
[0095] The encoding server is used to compress the content input from the multimedia input device (such as a smart phone, camera, camcorder, etc.) into digital data to generate a bit stream and send it to the streaming server. As another example, in the case where the multimedia input device such as a smart phone, camera, camcorder, etc. directly generates a bit stream, the encoding server can be omitted.
[0096] The bitstream may be generated by the encoding method or the bitstream generating method to which the present disclosure is applied, and the streaming server may temporarily store the bitstream during the process of transmitting or receiving the bitstream.
[0097] The streaming server transmits multimedia data to the user device through the web server based on the user's request, and the web server serves as a tool to inform the user of which services exist. When the user requests the service the user wants, the web server transmits the request to the streaming server, and the streaming server sends the multimedia data to the user. In this regard, the content streaming system may include a separate control server, and in this case, the control server serves as a command / response between the respective devices in the content streaming system.
[0098] The streaming server may receive content from a media storage device and / or an encoding server. For example, in the case of receiving content from an encoding server, the content may be received in real time. In this case, the streaming server may store the bitstream within a predetermined time period to smoothly provide a streaming service.
[0099] For example, user devices may include mobile phones, smart phones, laptop computers, digital broadcast terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), navigation, tablet PCs, tablet computers, ultrabooks, wearable devices (e.g., watch-type terminals (smart watches), glasses-type terminals (smart glasses), head-mounted displays (HMDs)), digital televisions, desktop computers, digital signage, etc.
[0100] Each server in the content streaming system may operate as a distributed server, and in this case, data received by each server may be processed in a distributed manner.
[0101] In the following, reference will be described in detail. Figure 1 and Figure 2 Describes the inter-frame prediction method.
[0102] Figure 4 is a flowchart for illustrating a method of deriving a motion vector prediction value from a neighboring block according to an embodiment of the present disclosure.
[0103] In the case of the motion vector prediction (MVP) mode, the encoder predicts the motion vector according to the type of the prediction block and sends the difference between the best motion vector and the predicted value to the decoder. In this case, the encoder sends the motion vector difference, neighboring block information, reference index, etc. to the decoder. Here, the MVP mode may also be referred to as the advanced motion vector prediction (AMVP) mode.
[0104] The encoder may construct a prediction candidate list for motion vector prediction, and the prediction candidate list may include at least one of a spatial candidate block and a temporal candidate block.
[0105] First, the encoder may search for a spatial candidate block for motion vector prediction and insert it into a prediction candidate list (S410). For the process of constructing a spatial candidate block, a method of constructing a conventional spatial merge candidate in inter prediction according to a merge mode may be applied.
[0106] The encoder may check whether the number of spatial candidate blocks is less than two ( S420 ).
[0107] In the case where the number of spatial candidate blocks is less than two as a result of the check, the encoder may search for a temporal candidate block and insert it into the prediction candidate list (S430). At this time, in the case where no temporal candidate block is available, the encoder may use a zero motion vector as a motion vector prediction value (S440). For the process of constructing a temporal candidate block, a method of constructing a conventional temporal merge candidate in inter-frame prediction according to a merge mode may be applied.
[0108] On the other hand, in the case where the number of spatial candidate blocks is equal to or greater than two as a result of the check, the encoder may end the construction of the prediction candidate list and select a block with the minimum cost from among the candidate blocks. The encoder may determine the motion vector of the selected candidate block as the motion vector prediction value of the current block and obtain the motion vector difference by using the motion vector prediction value. The motion vector difference thus obtained may be sent to the decoder.
[0109] Figure 5 An affine motion model according to an embodiment of the present disclosure is illustratively represented.
[0110] The affine mode may be one of various prediction modes in inter prediction, and the affine mode may also be referred to as an affine motion mode or a sub-block motion prediction mode. The affine mode may refer to a mode in which an affine motion prediction method is performed using an affine motion model.
[0111] The affine motion prediction method can derive a motion vector of a sample unit by using two or more motion vectors in the current block. In other words, the affine motion prediction method can improve encoding efficiency by determining a motion vector not in units of blocks but in units of samples.
[0112] The general motion model may include a translation model, and motion estimation (ME) and motion compensation (MC) are performed based on the translation model that effectively represents simple motion. However, the translation model may not be effectively applied to complex motions in natural videos, such as zooming in, zooming out, rotation, and other irregular motions. Therefore, embodiments of the present disclosure may use an affine motion model that can be effectively applied to complex motions.
[0113] refer to Figure 5 , the affine motion model may include four motion models, but they are exemplary motion models, and the scope of the present disclosure is not limited thereto. The above four motions may include translation, scaling, rotation, and shear. Here, the motion model for translation, scaling, and rotation may be referred to as a simplified affine motion model.
[0114] Figure 6 A simplified affine motion model according to an embodiment of the present disclosure is illustratively shown.
[0115] In affine motion prediction, a control point (CP) may be defined to use an affine motion model, and a motion vector of a subblock or sample unit included in a block may be determined by using two or more control point motion vectors (CPMVs). Here, a set of motion vectors of a sample unit or a set of motion vectors of a subblock may be referred to as an affine motion vector field (affine MVF).
[0116] refer to Figure 6 , the simplified affine motion model may mean a model for determining a motion vector of a sample unit or a sub-block using CPMV according to two CPs, and may also be referred to as a 4-parameter affine model. Figure 6 In , v0 and v1 can represent two CPMVs, and each arrow in the sub-block can represent a motion vector of the sub-block unit.
[0117] In other words, during the encoding / decoding process, the affine motion vector field may be determined in sample units or sub-block units. Here, the sample unit may refer to a pixel unit, and the sub-block unit may refer to a defined block unit. When the affine motion vector field is determined in sample units, a motion vector may be obtained based on each pixel value, and in the case of a block unit, a motion vector of the corresponding block may be obtained based on the center pixel value of the block.
[0118] Figure 7 is a diagram for describing a method of deriving a motion vector predictor at a control point according to an embodiment of the present disclosure.
[0119] The affine mode may include an affine merge mode and an affine motion vector prediction (MVP) mode. The affine merge mode may be referred to as a subblock merge mode, and the affine MVP mode may be referred to as an affine inter mode.
[0120] In the affine MVP mode, the CPMV of the current block may be derived based on a control point motion vector predictor (CPMVP) and a control point motion vector difference. In other words, the encoding device may determine the CPMVP of the CPMV of the current block, derive the CPMVD which is the difference between the CPMV and the CPMVP of the current block, and signal the information about the CPMVP and the information about the CPMVD to the decoding device. Here, the affine MVP mode may construct an affine MVP candidate list based on neighboring blocks, and the affine MVP candidate list may be referred to as a CPMVP candidate list. In addition, the information about the CPMVP may include an index indicating a block or motion vector to be referenced from the affine MVP candidate list.
[0121] refer to Figure 7 , the motion vector of the control point at the upper left sample position of the current block can be expressed as v0, the motion vector of the control point at the upper right sample position can be expressed as v1, the motion vector of the control point at the lower left sample position can be expressed as v2, and the motion vector of the control point at the lower right sample position can be expressed as v3.
[0122] For example, if two control points are used in the affine mode and the two control points are located at the upper left sample position and the upper right sample position, the motion vector of the sample unit or the sub-block unit can be derived based on the motion vectors v0 and v1.
[0123] The motion vector v0 may be derived based on at least one motion vector of the neighboring blocks A, B, and C of the upper left sample position. Here, the neighboring block A may refer to a block located above and to the left of the upper left sample position of the current block, the neighboring block B may refer to a block located at the top of the upper left sample position of the current block, and the neighboring block C may refer to a block located to the left of the upper left sample position of the current block.
[0124] The motion vector v1 may be derived based on at least one motion vector of the neighboring blocks D and E of the upper right sample position. Here, the neighboring block D may represent a block located at the top of the upper right sample position of the current block, and the neighboring block E may represent a block located above and to the right of the upper right sample position of the current block.
[0125] For example, if three control points are used in the affine mode and the three control points are located at the upper left sample position, the upper right sample position, and the lower left sample position, the motion vector of the sample unit or the sub-block unit can be derived based on the motion vectors v0, v1, and v2. In other words, the motion vector v2 can be further used.
[0126] The motion vector v2 may be derived based on at least one motion vector of the neighboring blocks F and G of the lower left sample position. Here, the neighboring block F may refer to a block located to the left of the lower left sample position of the current block, and the neighboring block G may refer to a block located to the lower left of the lower left sample position of the current block.
[0127] The affine MVP mode can derive a CPMVP candidate list based on neighboring blocks and select a CPMVP pair with the highest correlation in the CPMVP candidate list as the CPMV of the current block. The information about the CPMVP may include an index indicating a CPMVP pair selected from the CPMVP candidate list.
[0128] Figure 8 Two CPs for a 4-parameter affine motion model according to an embodiment of the present disclosure are illustratively shown.
[0129] Embodiments of the present disclosure may use two CPs. The two CPs may be located at the upper left sample position and the upper right sample position of the current block, respectively. Here, the CP located at the upper left sample position may be represented as CP0, and the CP located at the upper right sample position may be represented as CP1, and the motion vector at CP0 may be represented as mv0 and the motion vector at CP1 may be represented as mv1. The coordinates of each control point (CP i ) can be defined as (x i ,y i ), i=0,1 , and the motion vector at each control point can be expressed as mvi=(v xi ,v yi ), i=0,1 .
[0130] In an embodiment of the present disclosure, the CP located at the upper left sample position may be represented as CP1, and the CP located at the upper right sample position may be represented as CP0. In this case, the following process may be similarly performed in consideration of the switching positions of CP0 and CP1.
[0131] For example, if the width of the current block is W and the height thereof is H, assuming that the coordinates of the lower left sample position of the current block are (0, 0), the coordinates of CP0 may be expressed as (0, H), and the coordinates of CP1 may be expressed as (W, H). Here, W and H may have different values, but may also have the same value, and the reference (0, 0) may be set differently.
[0132] like Figure 8As shown in , since the affine motion model using two motion vectors according to two CPs in the affine motion prediction method uses four parameters according to the two motion vectors, it can be called a 4-parameter affine motion model or a simplified affine motion model.
[0133] In an embodiment of the present disclosure, the motion vector of the sample unit can be determined by an affine motion vector field (affine MVF) and the position of the sample. The affine motion vector field can represent the motion vector of the sample unit based on two motion vectors according to two CPs. In other words, when the sample position is (x, y) as shown in Equation 1, the affine motion vector field can derive the motion vector (v) of the corresponding sample. x ,vy).
[0134] [Equation 1]
[0135]
[0136] In Equation 1, v0x and v0y may mean (x, y) coordinate components of motion vector mv0 at CP0, and v1x and v1y may mean (x, y) coordinate components of motion vector mv1 at CP1. Likewise, w may mean the width of the current block.
[0137] Meanwhile, Equation 1 representing the affine motion model is only an example, and the equation for representing the affine motion model is not limited to Equation 1. For example, the sign of each coefficient disclosed in Equation 1 may be changed according to the sign of Equation 1 in some cases.
[0138] In other words, according to an embodiment of the present disclosure, a reference block from among temporal and / or spatial neighboring blocks of a current block may be determined, a motion vector of the reference block may be used as a motion vector predictor of the current block, and the motion vector of the current block may be expressed by a motion vector predictor and a motion vector difference. In addition, an embodiment of the present disclosure may signal an index of a motion vector predictor and a motion vector difference.
[0139] According to an embodiment of the present disclosure, when encoding, two motion vector differences according to two CPs can be derived based on two motion vectors according to two CPs and two motion vector predictors according to two CPs, and when decoding, two motion vectors according to two CPs can be derived based on two motion vector predictors according to two CPs and two motion vector differences according to two CPs. In other words, the motion vector at each CP can be composed of the sum of the motion vector predictor and the motion vector difference, as shown in Equation 2, and is similar to when using a motion vector prediction (MVP) mode or an advanced motion vector prediction (AMVP) mode.
[0140] [Equation 2]
[0141]
[0142] In Equation 2, mvp0 and mvp1 may represent a motion vector predictor (MVP) at each of CP0 and CP1, and mvd0 and mvd1 may represent a motion vector difference (MVD) at each of CP0 and CP1. Here, mvp may be referred to as CPMVP, and mvd may be referred to as CPMVD.
[0143] Therefore, the inter-frame prediction method according to the affine mode according to the embodiment of the present disclosure can encode and decode the index and motion vector difference (mvd0 and mvd1) at each CP. In other words, according to the embodiment of the present disclosure, the motion vector at CP0 and CP1 can be derived based on mvd0 and mvd1 at each of CP0 and CP1 of the current block and mvp0 and mvp1 according to the index, and inter-frame prediction is performed by deriving the motion vector of the sample unit based on the motion vector at CP0 and CP1.
[0144] According to another embodiment of the present disclosure, an inter-frame prediction method according to an affine mode may use one of a motion vector difference according to two CPs and a difference (DMVD) of two MVDs. In other words, in another embodiment, when there are mvd0 and mvd1 according to CP0 and CP1, inter-frame prediction may be performed by encoding and decoding mvd0 and mvd1, the difference between mvd0 and mvd1, and one of the indexes at each CP. More specifically, in another embodiment of the present disclosure, mvd0 and DMVD (mvd0-mvd1) may be sent with a signal, and mvd1 and DMVD (mvd0-mvd1) may be sent with a signal.
[0145] That is, in another embodiment of the present disclosure, the motion vector difference (mvd0 and mvd1) at CP0 and CP1 can be derived based on the difference between the motion vector difference (mvd0 or mvd1) at CP0 or CP1 and the motion vector difference (mvd0 and mvd1) between CP0 and CP1, respectively, and the motion vectors at CP0 and CP1 can be derived based on the motion vectors (mvp0 and mvp1) of CP0 and CP1 indicated by the index together with such motion vector difference, respectively, and inter-frame prediction can be performed by deriving the motion vector of the sample unit based on the motion vectors at CP0 and CP1.
[0146] Here, data on the difference of two motion vector differences (DMVD) is closer to a zero motion vector (zero MV) than data on a normal motion vector difference, and encoding can be performed more efficiently than in the case of other embodiments according to the present disclosure.
[0147] Fig. 9The case where the median value is additionally used in the 4-parameter affine motion model according to the embodiment of the present disclosure is illustratively shown.
[0148] In inter prediction according to an affine mode according to an embodiment of the present disclosure, adaptive motion vector encoding may be performed using a median predictor of a motion vector predictor.
[0149] refer to Fig. 9 According to an embodiment of the present disclosure, two CPs may be used, and information about CPs at different locations may be derived based on the two CPs. Here, the information about the two CPs may be derived from Figure 8 In addition, a CP at another position derived based on the two CPs may be referred to as CP2 and may be located at a lower left sample position of the current block.
[0150] The information about the CP at another location may include a motion vector predictor (mvp2) of CP2, and mvp2 may be derived in two ways.
[0151] One method of deriving mvp2 is as follows: mvp2 may be derived based on the motion vector predictor mvp0 of CP0 and the motion vector predictor mvp1 of CP1, and may be derived as shown in Equation 3.
[0152] [Equation 3]
[0153]
[0154] In equation 3, mvp 0x and mvp 0y It can refer to the (x, y) coordinate component of the motion vector predictor (mvp0) at CP0, mvp 1x and mvp 1y It can refer to the (x, y) coordinate component of the motion vector predictor (mvp1) at CP1, and mvp 2x and mvp 2y It may mean the (x, y) coordinate component of the motion vector predictor (mvp2) at CP2. In addition, h may represent the height of the current block, and w may represent the width of the current block.
[0155] Another way to derive mvp2 is as follows. mvp2 can be derived based on the neighboring blocks of CP2. Fig. 9 , CP2 may be located at the lower left sample position of the current block, and mvp2 may be derived based on the neighboring block A or the neighboring block B of CP2. More specifically, mvp2 may be selected as one of the motion vector of the neighboring block A and the motion vector of the neighboring block B.
[0156] In an embodiment of the present disclosure, mvp2 can be derived, and a median can be derived based on mvp0, mvp1, and mvp2. Here, the median may mean a value located in the middle of a plurality of values in order of magnitude. Therefore, the median may be selected from mvp0, mvp1, and mvp2.
[0157] According to an embodiment of the present disclosure, when the median is equal to mvp0, the motion vector difference (mvd0) and DMVD (mvd0-mvd1) of CP0 may be signaled for inter-frame prediction, and when the median is equal to mvp1, the motion vector difference (mvd1) and DMVD (mvd0-mvd1) of CP1 may be signaled for inter-frame prediction. When the median is equal to mvp2, any one of the case where the median is equal to mvp0 and the case where the median is equal to mvp1 may be followed, and this may be predetermined.
[0158] Here, the above process can be performed for each of the x and y components of the motion vector predictor. In other words, the median can be derived for the x component and the y component, respectively. In this case, when the x component of the median is the same as the x component of MVP0, only the x component of the motion vector can be encoded and decoded according to the above case where the median is equal to MVP0, and when the y component of the median is the same as the y component of MVP1, only the y component of the motion vector can be encoded and decoded according to the above case where the median is the same as MVP1. If the x component and / or y component of the median is equal to the x component and / or y component of MVP2, the x component and / or y component of the motion vector can be encoded and decoded according to one of the above cases where the median is equal to MVP0 and the above case where the median is equal to MVP1, which can be predefined.
[0159] Fig.10 Three CPs for a 6-parameter affine motion model according to an embodiment of the present disclosure are illustratively shown.
[0160] Embodiments of the present disclosure may use three CPs. The three CPs may be positioned at the upper left sample position, the upper right sample position, and the lower left sample position of the current block, respectively. Here, the CP at the upper left sample position may be represented as CP0, the CP at the upper right sample position may be represented as CP1, and the CP at the lower left sample position may be represented as CP2, and the motion vector at CP0 may be represented as mv0, the motion vector at CP1 may be represented as mv1, and the motion vector at CP2 may be represented as mv2. The coordinates of each control point (CPi) may be defined as (x i ,y i ), i=0,1,2 , and the motion vector at each control point can be expressed as mv i =(v xi ,v yi ), i=0,1,2 .
[0161] In an embodiment of the present disclosure, three CPs may be distributed at the upper left sample position, the upper right sample position, and the lower left sample position, respectively, but the three CPs may be positioned differently from this. For example, CP0 may be located at the upper right sample position, CP1 may be located at the upper left sample position, and CP2 may be located at the lower left sample position, but their positions are not limited thereto. In this case, the following processing may be similarly performed while taking into account the position of each CP.
[0162] For example, if the width of the current block is W and the height thereof is H, assuming that the coordinates of the lower left sample position of the current block are (0, 0), the coordinates of CP0 may be represented as (0, H), the coordinates of CP1 may be represented as (W, H), and the coordinates of CP2 may be represented as (0, 0). Here, W and H may have different values, but may also have the same value, and the reference (0, 0) may be set differently.
[0163] As in Fig.10 As shown in , since the affine motion model using three motion vectors according to three CPs in the affine motion prediction method uses six parameters according to the three motion vectors, it can be called a 6-parameter affine motion model.
[0164] In an embodiment of the present disclosure, the motion vector of the sample unit may be determined by an affine motion vector field (affine MVF) and the position of the sample. The affine motion vector field may represent the motion vector of the sample unit based on three motion vectors according to three CPs.
[0165] According to an embodiment of the present disclosure, a reference block from among temporal and / or spatial neighboring blocks of a current block may be determined, and a motion vector of the reference block may be used as a motion vector predictor of the current block, and the motion vector of the current block may be represented by a motion vector predictor and a motion vector difference. In addition, an embodiment of the present disclosure may signal the indexes of the motion vector predictor and the motion vector difference.
[0166] According to an embodiment of the present disclosure, three motion vector differences according to three CPs can be derived based on three motion vectors according to three CPs and three motion vector predictors according to three CPs during encoding, and three motion vectors according to three CPs can be derived based on three motion vector predictors according to three CPs and three motion vector differences according to three CPs during decoding. In other words, the motion vector at each CP can be composed of the sum of the motion vector predictor and the motion vector difference, as shown in Equation 4.
[0167] [Equation 4]
[0168]
[0169] In Equation 4, mvp0, mvp1, and mvp2 may represent a motion vector predictor (MVP) at each of CP0, CP1, and CP2, and mvd0, mvd1, and mvd2 may represent a motion vector difference (MVD) at each of CP0, CP1, and CP2. Here, mvp may be referred to as CPMVP, and mvd may be referred to as CPMVD.
[0170] Therefore, the inter-frame prediction method according to the affine mode according to the embodiment of the present disclosure can encode and decode the index and motion vector difference (mvd0, mvd1 and mvd2) at each CP. In other words, according to the embodiment of the present disclosure, the motion vectors at CP0, CP1, and CP2 can be derived based on the mvd0, mvd1 and mvd2 at each of CP0, CP1 and CP2 of the current block and the mvp0, mvp1, and mvp2 according to the index, and the motion vector of the sample unit can be derived based on the motion vector at CP0, CP1 and CP2 to perform inter-frame prediction.
[0171] An affine motion prediction method according to another embodiment of the present disclosure may use one motion vector difference among three motion vector differences, a difference (DMVD, the difference between two MVDs) between the motion vector difference and another motion vector difference (DMVD), and a difference (DMVD) between the motion vector difference and yet another motion vector difference.
[0172] More specifically, in another embodiment of the present disclosure, when mvd0, mvd1, and mvd2 are derived according to three CPs, inter-frame prediction may be performed by signaling mvd0 and two DMVDs (mvd0-mvd1 and mvd0-mvd2), by signaling mvd1 and two DMVDs (mvd0-mvd1 and mvd1-mvd2), or by signaling mvd2 and two DMVDs (mvd0-mvd2 and mvd1-mvd2). Here, for convenience, one of the two DMVDs may be referred to as a first DMVD (DMVD1), and the other DMVD may be referred to as a second DMVD (DMVD2). In addition, when encoding and decoding mvd0 and two DMVDs (mvd0-mvd1 and mvd0-mvd2), mvd0 may be referred to as the MVD of CP0, DMVD (mvd0-mvd1) may be referred to as the DMVD of CP1, and DMVD (mvd0-mvd2) may be referred to as the DMVD of CP2.
[0173] That is, according to another embodiment of the present disclosure, three mvds (e.g., mvd0, mvd1, and mvd2) can be derived based on one mvd and two DMVDs, and the motion vector at each of the three CPs can be derived based on a motion vector predictor according to indexes for the three CPs (e.g., CP0, CP1, and CP2) together with such mvds, and inter-frame prediction can be performed by deriving the motion vector of the sample unit based on the motion vectors at the three CPs.
[0174] In reference Fig.10 In another embodiment of the present disclosure described, reference is made to Fig. 9 The described median predictor method can be adaptively applied to efficiently perform motion vector coding, and in this case, it can be obtained from reference Fig. 9 The process of exporting mvp2 is omitted in the described method.
[0175] Hereinafter, in the description of the present disclosure, CP0, CP1 and CP2 may be represented as a first CP, a second CP and a third CP, respectively, and the motion vector (MV), motion vector predictor (MVP) and motion vector difference (MVD) according to each CP may also be represented in a manner similar to that described above.
[0176] Fig.11 The video encoding method of the encoding device according to the present disclosure is schematically shown.
[0177] Fig.11 The method disclosed in can be Figure 1 The encoding device disclosed in is executed. For example, Fig.11 S1100 to S1120 in the encoding device may be performed by a predictor of the encoding device; and S1130 may be performed by an entropy encoder of the encoding device.
[0178] The encoding apparatus derives a control point (CP) of the current block (S1100). When affine motion prediction is applied to the current block, the encoding apparatus may derive a CP, and the number of CPs may be two or three depending on an embodiment.
[0179] For example, when there are two CPs, the CPs can be located at the upper left sample position and the upper right sample position of the current block, respectively, and the height and width of the current block are W and W, respectively, and the coordinate component of the lower left sample position is (0, 0), then the coordinate components of the CPs can be (0, H) and (W, H), respectively.
[0180] For example, when there are three CPs, the CPs may be located at the upper left sample position, the upper right sample position, and the lower left sample position of the current block, respectively, and if the height and width of the current block are H and W, respectively, and the coordinate component of the lower left sample position is (0, 0), then the coordinate components of the CPs may be (0, H), (W, H), and (0, 0), respectively.
[0181] The encoding device derives the MVP for the CP (S1110). For example, when the number of derived CPs is two, the encoding device may obtain two motion vectors. For example, when the number of derived CPs is three, the encoding device may obtain three motion vectors. The MVP for the CP may be derived based on neighboring blocks, and the above has been referred to. Figure 7 and Fig. 9 Describe its detailed description.
[0182] For example, when deriving the first CP and the second CP, the encoding device can derive the first MVP for the first CP and the second MVP for the second CP based on the neighboring blocks of the current block, and when further deriving the third CP, the encoding device can further derive the third MVP based on the neighboring blocks of the current block.
[0183] For example, when deriving the first CP, the second CP, and the third CP, the encoding apparatus may derive a third MVP for the third CP based on the first MVP for the first CP and the second MVP for the second CP, and derive the third MVP based on motion vectors of neighboring blocks of the third CP.
[0184] The encoding device derives a motion vector difference (MVD) and at least one difference (DMVD) of two MVDs (S1120). The motion vector difference (MVD) may be derived based on a motion vector (MV) and a motion vector predictor (MVP), and for this purpose, the encoding device may also derive a motion vector for each CP. The difference (DMVD) of motion vector differences may be derived based on a plurality of motion vector differences.
[0185] For example, when there are two CPs, the encoding device can derive one MVD and one DMVD. The encoding device can derive two MVDs from the motion vectors of the two CPs and the two MVPs. In addition, one of the two MVDs to be encoded can be selected, and the difference (DMVD) of the two MVDs can be derived based on the selected one.
[0186] For example, when deriving the first CP and the second CP, the encoding device may derive a first MVD for the first CP and a DMVD for the second CP. Here, the DMVD for the second CP may represent a difference between the first MVD and the second MVD for the second CP, and the first MVD may be a reference.
[0187] For example, when there are three CPs, the encoding device can derive one MVD and two DMVDs. The encoding device can derive three MVDs from three MVPs according to the motion vectors and reference blocks of the three CPs, and can select any one MVD to be encoded from the three MVDs. In addition, the encoding device can derive the difference (DMVD1) between the selected one MVD and another MVD and the difference (DMVD2) between the selected one MVD and another MVD.
[0188] For example, when further deriving the third CP, the encoding device may derive a first MVD for the first CP, a DMVD for the second CP, and a DMVD for the third CP. Here, the DMVD for the second CP may represent the difference between the first MVD and the second MVD of the second CP, and the DMVD for the third CP may represent the difference between the third MVD for the first MVD and the third CP, and the first MVD may be used as a reference.
[0189] For example, when further deriving the third CP, the encoding device may derive the median based on the first MVP, the second MVP, and the third MVP, and in this case, the third MVD and the DMVD for the third CP may not be derived. Fig. 9 A detailed description thereof is described.
[0190] The encoding device performs encoding based on one MVD and at least one DMVD, and outputs a bitstream (S1130). For inter-frame prediction, the encoding device may generate and output a bitstream for the current block, which includes one MVD, at least one DMVD, and an index for a motion vector predictor.
[0191] For example, when there are two CPs, the encoding apparatus may generate a bitstream for the current block including indices of motion vector predictors of the two CPs and a motion vector difference of any one of the two CPs, and a difference between the motion vector differences of the two CPs.
[0192] For example, when deriving the first CP and the second CP, the encoding apparatus may output a bitstream by encoding image information including information about the first CP and information about the DMVD for the second CP.
[0193] For example, if there are three CPs, the encoding device can generate a bitstream for the current block, which includes indices of motion vector prediction predictors for the three CPs and a motion vector difference for one of the three CPs, a difference between the motion vector difference for the CP and the motion vector difference for another CP, and a difference between the motion vector difference for the CP and the motion vector difference for yet another CP.
[0194] For example, when the third CP is further derived, the encoding device may further include information about the DMVD for the third CP in the image information, and may encode the image information to output a bitstream.
[0195] For example, when a third CP is further derived and a median is derived, the encoding device may output a bitstream by encoding image information including information about the first MVD and information about the DMVD for the second CP, and may not further include information about the DMVD for the third CP in the image information.
[0196] The bit stream generated and output by the encoding device may be transmitted to the decoding device through a network or a storage medium.
[0197] Fig.12 The inter-frame prediction method of the decoding device according to the present disclosure is schematically illustrated.
[0198] Fig.12 The method disclosed in can be Figure 2 The decoding device disclosed in is executed. For example, Fig.12 S1200, S1210, S1230, and S1240 in the decoding method may be performed by a predictor of the decoding device, and S1220 may be performed by an entropy decoder of the decoding device. Here, S1220 may be performed before S1200 and S1210.
[0199] The decoding apparatus derives a control point (CP) of the current block (S1200). When affine motion prediction is applied to the current block, the decoding apparatus may derive a CP, and the number of CPs may be two or three depending on the embodiment.
[0200] For example, when there are two CPs, the CPs may be located at the upper left sample position and the upper right sample position of the current block, respectively, and if the height and width of the current block are H and W, respectively, and the coordinate component of the lower left sample position is (0, 0), the coordinate components of the CPs may be (0, H) and (W, H), respectively.
[0201] For example, when there are three CPs, the CPs may be located at the upper left sample position, the upper right sample position, and the lower left sample position of the current block, respectively, and if the height and width of the current block are H and W, respectively, and the coordinate component of the lower left sample position is (0, 0), then the coordinate components of the CP can be (0, H), (W, H), and (0, 0).
[0202] The decoding device derives the MVP for the CP (S1210). For example, when the number of derived CPs is two, the decoding device may obtain two motion vectors. For example, when the number of derived CPs is three, the decoding device may obtain three motion vectors. The MVP for the CP may be derived based on neighboring blocks, and the above has been referred to. Figure 7 and Fig. 9 Describe its detailed description.
[0203] For example, when deriving the first CP and the second CP, the decoding device can derive a first MVP for the first CP and a second MVP for the second CP based on the neighboring blocks of the current block, and when the third CP is further derived, the decoding device can further derive a third MVP based on the neighboring blocks of the current block.
[0204] For example, when deriving the first CP, the second CP and the third CP, the decoding apparatus may derive a third MVP for the third CP based on the first MVP for the first CP and the second MVP for the second CP, and derive the third MVP based on motion vectors of neighboring blocks of the third CP.
[0205] The decoding device decodes one MVD and at least one DMVD (S1220). The decoding device may obtain one MVD and at least one DMVD by decoding one MVD and at least one DMVD based on the received bitstream. Here, the bitstream may include an index of a motion vector predictor for the CP. The bitstream may be received from the encoding device through a network or a storage medium.
[0206] For example, when there are two CPs, the decoding apparatus may decode one MVD and one DMVD, and when there are three CPs, the decoding apparatus may decode one MVD and two DMVDs. Here, DMVD may mean the difference between two MVDs.
[0207] For example, when deriving the first CP and the second CP, the decoding device may decode the first MVD for the first CP and decode the DMVD for the second CP. Here, the DMVD for the second CP may represent the difference between the first MVD and the second MVD for the second CP.
[0208] For example, when further deriving the third CP, the decoding device may decode the first MVD for the first CP, and decode the DMVD for the second CP and the DMVD for the third CP. Here, the DMVD for the second CP may represent the difference between the first MVD and the second MVD for the second CP, and the DMVD for the third CP may represent the difference between the first MVD and the third MVD for the third CP.
[0209] For example, if the third CP is further derived and the median value is used, the decoding device may decode the first MVD for the first CP and decode the DMVD for the second CP. Here, the DMVD for the third CP may not be decoded.
[0210] The decoding apparatus derives a motion vector for the CP based on the MVP, one MVD, and at least one DMVD for the CP (S1230). The motion vector for the CP may be derived based on a motion vector difference (MVD) and a motion vector predictor (MVP), and the motion vector difference may be derived based on a difference between motion vector differences (DMVD).
[0211] For example, when there are two CPs, the decoding device may receive one MVD and one DMVD, and based on them, may derive two MVDs from the two CPs. The decoding device may receive indexes for the two CPs together, and based on them, may derive two MVPs. The decoding device may derive motion vectors for the two CPs respectively based on the two MVDs and the two MVPs.
[0212] For example, when deriving the first CP and the second CP, the decoding apparatus may derive the first MV based on the first MVD and the first MVP, derive the second MVD for the second CP based on the first MVD and the DMVD for the second CP, and derive the second MV based on the second MVD and the second MVP.
[0213] For example, when there are three CPs, the decoding device may receive one MVD and two DMVDs, and based on them, three MVDs may be derived from the three CPs. The decoding device may receive indexes for the three CPs together, and based on them, three MVPs may be derived. The decoding device may derive motion vectors for the three CPs respectively based on the three MVDs and the three MVPs.
[0214] For example, if a third CP is further derived and a third MVP is derived, the decoding apparatus may derive a third MVD for the third CP based on the first MVD and the DMVD for the third CP, and derive a third MV based on the third MVD and the third MVP.
[0215] For example, if a third CP is further derived and the median is the same as the first MVP, the decoding device can derive a first MV based on the first MVD and the first MVP, derive a second MVD for the second CP based on the first MVD and the DMVD for the second CP, and derive a second MV based on the second MVD and the second MVP.
[0216] For example, if a third CP is further derived and the median is the same as the second MVP, the decoding device can derive a second MV based on the second MVD and the second MVP, derive a first MVD for the first CP based on the second MVD and the DMVD for the first CP, and derive the first MV based on the first MVD and the first MVP.
[0217] For example, if the third CP is further derived and the median is the same as the third MVP, the decoding device may derive the first MV and the second MV according to any one of the cases where the median is the same as the first MVP and the case where the median is the same as the second MVP. Determining any one of the cases where the median is the same as the first MVP and the case where the median is the same as the second MVP may be predefined. Fig. 9 A detailed description thereof is described.
[0218] The decoding apparatus generates a prediction block for the current block based on the motion vector (S1240). The decoding apparatus may derive an affine motion vector field (affine MVF) based on the motion vector of the corresponding CP, and based on them, may derive a motion vector of a sample unit to perform inter prediction.
[0219] In the above embodiments, the method is explained based on the flowchart with the aid of a series of steps or boxes, but the present disclosure is not limited to the order of the steps, and a certain step may be performed in an order or step different from the above steps, or simultaneously with another step. In addition, it can be understood by a person of ordinary skill in the art that the steps shown in the flowchart are not exclusive, and another step may be incorporated or one or more steps in the flowchart may be deleted without affecting the scope of the present disclosure.
[0220] The above-mentioned method according to the present disclosure may be implemented in software form, and the encoding device and / or decoding device according to the present disclosure may be included in an apparatus for image processing such as a television, a computer, a smart phone, a set-top box, a display device, etc.
[0221] When the embodiments in the present disclosure are embodied by software, the above methods can be embodied as modules (processes, functions, etc.) for performing the above functions. These modules can be stored in a memory and can be executed by a processor. The memory can be inside or outside the processor and can be connected to the processor in various well-known ways. The processor may include an application specific integrated circuit (ASIC), other chipsets, logic circuits and / or data processing devices. The memory may include a read-only memory (ROM), a random access memory (RAM), a flash memory, a memory card, a storage medium and / or other storage devices.
Claims
1. A method for decoding an image performed by a decoding device, the method comprising: deriving a first motion vector predictor for a first control point of a current block and a second motion vector predictor for a second control point of the current block based on a neighboring block of the current block, wherein the first control point is located at an upper left sample position of the current block and the second control point is located at an upper right sample position of the current block; decoding information about a first motion vector difference for the first control point to derive the first motion vector difference; decoding information about a difference of two motion vector differences for said second control point to derive said difference of two motion vector differences for said second control point; deriving a first motion vector for the first control point based on the first motion vector predictor and the first motion vector difference; deriving a second motion vector for the second control point based on the second motion vector predictor and the difference of two motion vector differences for the second control point; and generating a prediction block for the current block based on the first motion vector and the second motion vector, wherein the difference of the two motion vector differences for the second control point is the difference between the second motion vector difference for the second control point and the first motion vector difference, and The deriving the second motion vector for the second control point comprises: deriving the second motion vector difference for the second control point based on the first motion vector difference and the difference between two motion vector difference values for the second control point; and The second motion vector difference for the second control point is derived based on the second motion vector predictor and the second motion vector difference derived based on the difference of two motion vector differences for the second control point.
2. A method for encoding an image performed by an encoding device, the method comprising: deriving a first motion vector predictor for a first control point of a current block and a second motion vector predictor for a second control point of the current block based on a neighboring block of the current block, wherein the first control point is located at an upper left sample position of the current block and the second control point is located at an upper right sample position of the current block; deriving a first motion vector difference for the first control point; deriving a difference of two motion vector differences for said second control point; and encoding image information including information about the first motion vector difference and information about the difference of two motion vector differences for the second control point to output a bit stream, wherein the difference of the two motion vector differences for the second control point is the difference between the second motion vector difference for the second control point and the first motion vector difference, and Wherein, deriving the difference of the two motion vector differences for the second control point comprises: deriving the second motion vector difference for the second control point based on the second motion vector for the second control point and the second motion vector predictor for the second control point; and Based on the second motion vector difference and the first motion vector difference, the difference of two motion vector differences for the second control point is derived.
3. A non-transitory computer-readable storage medium storing instructions which, when executed, cause the image encoding method according to claim 2 to be executed.
4. A method for transmitting image data, the method comprising: Obtaining a bitstream for the image, wherein the bitstream is generated based on: deriving a first motion vector predictor for a first control point of the current block and a second motion vector predictor for a second control point of the current block based on neighboring blocks of the current block, wherein the first control point is located at an upper left position of the current block and the second control point is located at an upper right position of the current block; deriving a first motion vector difference for the first control point; deriving a difference of two motion vector differences for said second control point; and encoding image information including information about the first motion vector difference and information about the difference of two motion vector differences for the second control point; and sending data comprising said bit stream, wherein the difference of the two motion vector differences for the second control point is the difference between the second motion vector difference for the second control point and the first motion vector difference, and Wherein, deriving the difference of the two motion vector differences for the second control point comprises: deriving the second motion vector difference for the second control point based on the second motion vector for the second control point and the second motion vector predictor for the second control point; and Based on the second motion vector difference and the first motion vector difference, the difference of two motion vector differences for the second control point is derived.
