Video decoding methods, video encoding methods, and video data transmission methods.
Patent Information
- Application Number
- VN1202607672
- Authority / Receiving Office
- VN · VN
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2016-12-22
- Filing Date
- 2017-12-15
- Publication Date
- 2026-10-15
AI Technical Summary
The increasing demand for high-resolution and high-quality video data leads to higher data volumes, resulting in increased transmission and storage costs, and existing video compression technologies struggle to efficiently handle high-resolution and ultra-high-resolution stereoscopic video content.
A method and device that efficiently perform inter prediction on blocks during video encoding/decoding, variably determine motion vector precision, and compensate for differences in motion vector precision between blocks by generating and using a motion vector candidate list to scale motion vectors accordingly.
This approach enables efficient video encoding/decoding and reduces data transmission and storage costs by optimizing motion vector precision, thereby improving the handling of high-resolution and stereoscopic video content.
Smart Images

Figure VN1202607672_0
Abstract
Description
Video signal processing method and device
[0001] The present invention relates to a video signal processing method and apparatus.
[0002] Recently, the demand for high-resolution, high-quality video, such as HD (High Definition) and UHD (Ultra High Definition) video, has been increasing across various application fields. As video data becomes higher in resolution and quality, the relative volume of data increases compared to conventional video data; consequently, transmission and storage costs increase when video data is transmitted using existing wired or wireless broadband lines or stored using conventional storage media. To address these issues arising from the increase in video data resolution and quality, high-efficiency video compression technologies can be utilized.
[0003] Various video compression technologies exist, such as inter-frame prediction technology that predicts pixel values in the current picture from previous or subsequent pictures, intra-frame prediction technology that predicts pixel values in the current picture using pixel information within the current picture, and entropy coding technology that assigns short codes to values with high frequency and long codes to values with low frequency; by utilizing these video compression technologies, video data can be effectively compressed for transmission or storage.
[0004] Meanwhile, along with the increasing demand for high-resolution video, the demand for stereoscopic video content as a new video service is also rising. Discussions are underway regarding video compression technologies to effectively provide high-resolution and ultra-high-resolution stereoscopic video content.
[0005] The present invention aims to provide a method and apparatus capable of efficiently performing inter-prediction on a block to be encoded / decoded when encoding / decoding a video signal.
[0006] The present invention aims to provide a method and apparatus capable of variably determining motion vector precision in encoding / decoding a video signal.
[0007] The present invention aims to provide a method and apparatus capable of compensating for differences in motion vector precision between blocks by comparing motion vector precision between blocks when encoding / decoding a video signal.
[0008] The technical problems to be solved by the present invention are not limited to those mentioned above, and other technical problems not mentioned will be clearly understood by those skilled in the art to which the present invention belongs from the description below.
[0009] A video signal decoding method and apparatus according to the present invention determines the precision of a motion vector of a current block, generates a list of motion vector candidates for the current block, obtains a motion vector prediction value of the current block from the list of motion vector candidates, checks whether the precision of the motion vector prediction value is the same as the precision of the motion vector of the current block, and if the precision of the motion vector prediction value is different from the precision of the motion vector of the current block, scales the motion vector prediction value to match the precision of the motion vector of the current block, and obtains the motion vector of the current block using the scaled motion vector prediction value.
[0010] A video signal encoding method and apparatus according to the present invention determines the precision of a motion vector of a current block, generates a list of motion vector candidates for the current block, obtains a motion vector prediction value of the current block from the list of motion vector candidates, checks whether the precision of the motion vector prediction value is the same as the precision of the motion vector of the current block, and if the precision of the motion vector prediction value is different from the precision of the motion vector of the current block, scales the motion vector prediction value to match the precision of the motion vector of the current block, and obtains the motion vector of the current block using the scaled motion vector prediction value.
[0011] In the video signal encoding / decoding method and apparatus according to the present invention, the motion vector precision of the current block can be determined from a motion vector precision set including a plurality of motion vector precision candidates.
[0012] In the video signal encoding / decoding method and apparatus according to the present invention, the motion vector precision of the current block can be determined based on index information specifying any one of the plurality of motion vector precision candidates.
[0013] In the video signal encoding / decoding method and apparatus according to the present invention, the motion vector difference value may include a prefix part representing an integer part and a suffix part representing a fractional part.
[0014] In the video signal encoding / decoding method and apparatus according to the present invention, the scaling may be performed based on a bit shift operation according to a ratio between the precision of the motion vector prediction value and the precision of the motion vector of the current block.
[0015] The features briefly summarized above regarding the present invention are merely exemplary aspects of the detailed description of the present invention that follows and do not limit the scope of the present invention.
[0016] According to the present invention, inter-prediction can be efficiently performed on a block to be encoded / decoded.
[0017] According to the present invention, the precision of the motion vector can be determined variably.
[0018] According to the present invention, a motion vector can be derived by compensating for the difference in motion vector precision between blocks.
[0019] The effects obtainable from the present invention are not limited to those mentioned above, and other unmentioned effects will be clearly understood by those skilled in the art from the description below.
[0020] FIG. 1 is a block diagram showing an image encoding device according to an embodiment of the present invention.
[0021] FIG. 2 is a block diagram showing an image decoding device according to an embodiment of the present invention.
[0022] FIG. 3 illustrates an example of hierarchically dividing coding blocks based on a tree structure as an embodiment to which the present invention is applied.
[0023] FIG. 4 is a diagram showing a partition shape that allows binary tree-based partitioning as an embodiment to which the present invention is applied.
[0024] FIG. 5 is a diagram illustrating an example in which the present invention is applied, wherein only a specific type of binary tree-based partitioning is allowed.
[0025] FIG. 6 is a diagram illustrating an example in which information related to the number of times a binary tree is allowed is encoded / decoded as an embodiment to which the present invention is applied.
[0026] FIG. 7 is a diagram illustrating a partition mode that can be applied to a coding block as an embodiment to which the present invention is applied.
[0027] FIG. 8 is a flowchart illustrating an inter prediction method as an embodiment to which the present invention is applied.
[0028] Figure 9 is a diagram illustrating the process of inducing movement information of the current block when a merge mode is applied to the current block.
[0029] Figure 10 is a diagram illustrating the process of inducing movement information of the current block when the AMVP mode is applied to the current block.
[0030] Figures 11 and 12 are diagrams illustrating a method for deriving a motion vector according to the precision of the motion vector of the current block.
[0031] The present invention is susceptible to various modifications and may have various embodiments; specific embodiments are illustrated in the drawings and described in detail in the detailed description. However, this is not intended to limit the invention to specific embodiments, and it should be understood that the invention includes all modifications, equivalents, and substitutions that fall within the spirit and scope of the invention. Similar reference numerals have been used for similar components in the description of each drawing.
[0032] Terms such as "first," "second," etc., may be used to describe various components, but said components should not be limited by said terms. These terms are used solely for the purpose of distinguishing one component from another. For example, without departing from the scope of the present invention, the first component may be named the second component, and similarly, the second component may be named the first component. The term "and / or" includes a combination of a plurality of related described items or any of a plurality of related described items.
[0033] When it is stated that one component is "connected" or "connected" to another component, it should be understood that while it may be directly connected or connected to that other component, there may also be other components in between. On the other hand, when it is stated that one component is "directly connected" or "directly connected" to another component, it should be understood that there are no other components in between.
[0034] The terms used in this application are used merely to describe specific embodiments and are not intended to limit the invention. The singular expression includes the plural expression unless the context clearly indicates otherwise. In this application, terms such as "comprising" or "having" are intended to specify the existence of the features, numbers, steps, actions, components, parts, or combinations thereof described in the specification, and should be understood as not precluding the existence or addition of one or more other features, numbers, steps, actions, components, parts, or combinations thereof.
[0035] Hereinafter, preferred embodiments of the present invention will be described in more detail with reference to the attached drawings. Hereinafter, the same reference numerals are used for identical components in the drawings, and redundant descriptions of identical components are omitted.
[0036]
[0037] FIG. 1 is a block diagram showing an image encoding device according to an embodiment of the present invention.
[0038] Referring to FIG. 1, the image encoding device (100) may include a picture splitting unit (110), a prediction unit (120, 125), a conversion unit (130), a quantization unit (135), a reordering unit (160), an entropy encoding unit (165), an inverse quantization unit (140), an inverse conversion unit (145), a filter unit (150), and a memory (155).
[0039] Each component shown in FIG. 1 is depicted independently to represent different characteristic functions of the image encoding device and does not imply that each component consists of separate hardware or a single software unit. That is, each component is listed and included as a separate component for the convenience of explanation, but at least two of the components may be combined to form a single component, or a single component may be divided into multiple components to perform functions, and such integrated and separated embodiments of each component are included within the scope of the present invention as long as they do not deviate from the essence of the present invention.
[0040] Furthermore, some components may not be essential components performing an essential function in the present invention, but merely optional components for enhancing performance. The present invention may be implemented by including only the components essential for realizing the essence of the present invention, excluding components used solely for performance enhancement, and a structure including only the essential components, excluding optional components used solely for performance enhancement, is also included within the scope of the rights of the present invention.
[0041] The picture segmentation unit (110) can divide an input picture into at least one processing unit. At this time, the processing unit may be a Prediction Unit (PU), a Transform Unit (TU), or a Coding Unit (CU). The picture segmentation unit (110) can divide a picture into a combination of multiple coding units, prediction units, and transformation units, and can encode the picture by selecting one combination of coding units, prediction units, and transformation units based on a predetermined criterion (e.g., a cost function).
[0042] For example, a single picture can be divided into multiple coding units. To divide coding units within a picture, a recursive tree structure such as a Quad Tree Structure can be used. A coding unit divided into other coding units, with a single image or the largest coding unit as the root, can have as many child nodes as there are divided coding units. A coding unit that can no longer be divided according to certain limits becomes a leaf node. That is, assuming that only square division is possible for a single coding unit, a single coding unit can be divided into up to four different coding units.
[0043] In the following embodiments of the present invention, the encoding unit may be used to mean a unit that performs encoding, or a unit that performs decoding.
[0044] A prediction unit may be divided into at least one shape, such as a square or rectangle, of the same size within a single encoding unit, or one of the prediction units divided within a single encoding unit may be divided such that any one prediction unit has a different shape and / or size from another prediction unit.
[0045] When generating a prediction unit that performs intra prediction based on a coding unit, if it is not the minimum coding unit, intra prediction can be performed without dividing it into multiple prediction units NxN.
[0046] The prediction unit (120, 125) may include an inter prediction unit (120) that performs inter prediction and an intra prediction unit (125) that performs intra prediction. It may determine whether to use inter prediction or perform intra prediction for a prediction unit, and determine specific information (e.g., intra prediction mode, motion vector, reference picture, etc.) according to each prediction method. At this time, the processing unit in which the prediction is performed and the processing unit in which the prediction method and specific details are determined may be different. For example, the prediction method and prediction mode, etc. may be determined in the prediction unit, and the prediction may be performed in the transformation unit. The residual value (residual block) between the generated prediction block and the original block may be input to the transformation unit (130). In addition, the prediction mode information, motion vector information, etc. used for prediction may be encoded together with the residual value in the entropy encoding unit (165) and transmitted to the decoder. When using a specific encoding mode, it is also possible to encode the original block as is and transmit it to the decoding unit without generating a prediction block through the prediction unit (120, 125).
[0047] The inter prediction unit (120) may predict a prediction unit based on information of at least one picture among the previous picture or the subsequent picture of the current picture, and in some cases, may predict a prediction unit based on information of a partially encoded area within the current picture. The inter prediction unit (120) may include a reference picture interpolation unit, a motion prediction unit, and a motion compensation unit.
[0048] In the reference picture interpolation unit, reference picture information is received from memory (155), and pixel information of integer pixels or less can be generated from the reference picture. In the case of luminance pixels, a DCT-based 8-tap interpolation filter with different filter coefficients can be used to generate pixel information of integer pixels or less in 1 / 4 pixel units. In the case of chrominance signals, a DCT-based 4-tap interpolation filter with different filter coefficients can be used to generate pixel information of integer pixels or less in 1 / 8 pixel units.
[0049] The motion prediction unit can perform motion prediction based on a reference picture interpolated by the reference picture interpolation unit. Various methods such as FBMA (Full search-based Block Matching Algorithm), TSS (Three Step Search), and NTS (New Three-Step Search Algorithm) can be used to calculate motion vectors. Based on the interpolated pixels, the motion vector can have motion vector values in units of 1 / 2 or 1 / 4 pixels. The motion prediction unit can predict the current prediction unit by using different motion prediction methods. Various motion prediction methods such as the Skip method, Merge method, AMVP (Advanced Motion Vector Prediction) method, and Intra Block Copy method can be used.
[0050] The intra prediction unit (125) can generate a prediction unit based on reference pixel information around the current block, which is pixel information within the current picture. If the surrounding block of the current prediction unit is a block that has performed inter prediction, and the reference pixel is a pixel that has performed inter prediction, the reference pixel included in the block that has performed inter prediction can be replaced with the reference pixel information of the surrounding intra prediction block. That is, if the reference pixel is not available, the unavailable reference pixel information can be replaced with at least one of the available reference pixels.
[0051] In intra-prediction, the prediction mode may include a directional prediction mode that uses reference pixel information according to the prediction direction, and a non-directional mode that does not use directional information when performing the prediction. The mode for predicting luminance information and the mode for predicting chrominance information may be different, and the intra-prediction mode information used to predict luminance information or the predicted luminance signal information may be utilized to predict chrominance information.
[0052] When performing intra prediction, if the size of the prediction unit and the size of the transform unit are the same, intra prediction for the prediction unit can be performed based on the pixels to the left, the pixels at the top left, and the pixels at the top of the prediction unit. However, when performing intra prediction, if the size of the prediction unit and the size of the transform unit are different, intra prediction can be performed using reference pixels based on the transform unit. Additionally, intra prediction using NxN partitioning can be used only for the minimum encoding unit.
[0053] The intra prediction method can generate a prediction block after applying an Adaptive Intra Smoothing (AIS) filter to a reference pixel according to the prediction mode. The type of AIS filter applied to the reference pixel may vary. To perform the intra prediction method, the intra prediction mode of the current prediction unit can be predicted from the intra prediction modes of prediction units existing in the vicinity of the current prediction unit. When predicting the prediction mode of the current prediction unit using mode information predicted from neighboring prediction units, if the intra prediction modes of the current prediction unit and the neighboring prediction units are the same, information indicating that the prediction modes of the current prediction unit and the neighboring prediction units are the same can be transmitted using predetermined flag information; if the prediction modes of the current prediction unit and the neighboring prediction units are different, entropy coding can be performed to encode the prediction mode information of the current block.
[0054] Additionally, a residual block can be generated that includes residual value information, which is the difference between the prediction unit that performed the prediction based on the prediction unit generated in the prediction unit (120, 125) and the original block of the prediction unit. The generated residual block can be input to the conversion unit (130).
[0055] In the transformation unit (130), the residual block containing residual value information of the prediction unit generated through the original block and the prediction unit (120, 125) can be transformed using a transformation method such as DCT (Discrete Cosine Transform), DST (Discrete Sine Transform), or KLT. Whether to apply DCT, DST, or KLT to transform the residual block can be determined based on the intra-prediction mode information of the prediction unit used to generate the residual block.
[0056] The quantization unit (135) can quantize the values converted into the frequency domain in the conversion unit (130). The quantization coefficient may vary depending on the block or the importance of the image. The values produced by the quantization unit (135) may be provided to the inverse quantization unit (140) and the reordering unit (160).
[0057] The reordering unit (160) can perform reordering of coefficient values for quantized residual values.
[0058] The reordering unit (160) can convert two-dimensional block-shaped coefficients into one-dimensional vector forms through a coefficient scanning method. For example, the reordering unit (160) can convert the coefficients from DC to high-frequency range coefficients into one-dimensional vector forms by scanning using a Zig-Zag Scan method. Depending on the size of the conversion unit and the intra-prediction mode, a vertical scan that scans two-dimensional block-shaped coefficients in the column direction or a horizontal scan that scans two-dimensional block-shaped coefficients in the row direction may be used instead of the Zig-Zag Scan. That is, depending on the size of the conversion unit and the intra-prediction mode, it can be determined whether to use a Zig-Zag Scan, a vertical scan, or a horizontal scan.
[0059] The entropy encoding unit (165) can perform entropy encoding based on the values calculated by the reordering unit (160). Entropy encoding can use various encoding methods, such as, for example, Exponential Golomb, Context-Adaptive Variable Length Coding (CAVLC), and Context-Adaptive Binary Arithmetic Coding (CABAC).
[0060] The entropy encoding unit (165) can encode various information from the reordering unit (160) and the prediction unit (120, 125), such as residual value coefficient information of the encoding unit, block type information, prediction mode information, division unit information, prediction unit information and transmission unit information, motion vector information, reference frame information, block interpolation information, and filtering information.
[0061] In the entropy encoding unit (165), the coefficient value of the encoding unit input from the reordering unit (160) can be entropy encoded.
[0062] In the inverse quantization unit (140) and inverse transformation unit (145), the values quantized in the quantization unit (135) are inverse quantized, and the values transformed in the transformation unit (130) are inverse transformed. The residual value generated in the inverse quantization unit (140) and inverse transformation unit (145) can be combined with the prediction unit predicted through the motion estimation unit, motion compensation unit, and intra prediction unit included in the prediction unit (120, 125) to generate a reconstructed block.
[0063] The filter section (150) may include at least one of a deblocking filter, an offset correction section, and an ALF (Adaptive Loop Filter).
[0064] The deblocking filter can remove block distortion caused by boundaries between blocks in the restored picture. To determine whether to perform deblocking, the decision to apply the deblocking filter to the current block can be made based on the pixels contained in a certain number of columns or rows within the block. When applying the deblocking filter to a block, a Strong Filter or a Weak Filter can be applied depending on the required deblocking filtering strength. Additionally, when applying the deblocking filter, horizontal and vertical filtering can be processed in parallel.
[0065] The offset correction unit can correct the offset from the original image on a pixel-by-pixel basis for the image that has undergone deblocking. To perform offset correction for a specific picture, a method can be used in which pixels included in the image are divided into a certain number of regions, the region to be offset is determined, and the offset is applied to that region, or a method can be used in which the offset is applied by considering the edge information of each pixel.
[0066] Adaptive Loop Filtering (ALF) can be performed based on a comparison between the filtered restored image and the original image. After dividing the pixels included in the image into predetermined groups, a single filter to be applied to each group can be determined, allowing for differential filtering for each group. Information regarding whether to apply ALF can be transmitted per coding unit (CU), and the shape and filter coefficients of the ALF filter to be applied may vary depending on each block. Additionally, an ALF filter of the same form (fixed form) may be applied regardless of the characteristics of the block to be applied.
[0067] The memory (155) can store a restored block or picture produced through the filter unit (150), and the stored restored block or picture can be provided to the prediction unit (120, 125) when performing inter-prediction.
[0068]
[0069] FIG. 2 is a block diagram showing an image decoding device according to an embodiment of the present invention.
[0070] Referring to FIG. 2, the image decoder (200) may include an entropy decoder (210), a reordering unit (215), an inverse quantization unit (220), an inverse transformation unit (225), a prediction unit (230, 235), a filter unit (240), and a memory (245).
[0071] When a video bitstream is input to a video encoder, the input bitstream can be decoded using the reverse procedure of the video encoder.
[0072] The entropy decoding unit (210) can perform entropy decoding in the opposite procedure to that which the entropy encoding unit of the image encoder performed. For example, various methods such as Exponential Golomb, CAVLC (Context-Adaptive Variable Length Coding), and CABAC (Context-Adaptive Binary Arithmetic Coding) can be applied in correspondence with the method performed in the image encoder.
[0073] The entropy decoding unit (210) can decode information related to intra-prediction and inter-prediction performed in the encoder.
[0074] The reordering unit (215) can perform reordering based on the method of reordering the entropy-decoded bitstream in the encoding unit in the entropy decoding unit (210). It can reorder by restoring the coefficients expressed in the form of a one-dimensional vector back into coefficients in the form of a two-dimensional block. The reordering unit (215) can perform reordering by receiving information related to the coefficient scanning performed in the encoding unit and scanning in reverse based on the scanning order performed in the encoding unit.
[0075] The inverse quantization unit (220) can perform inverse quantization based on the coefficient values of the rearranged block and the quantization parameters provided by the encoder.
[0076] The inverse transform unit (225) can perform inverse transforms, i.e., inverse DCT, inverse DST, and inverse KLT, on the transforms, i.e., DCT, DST, and KLT, performed by the transform unit on the quantization result performed by the image encoder. The inverse transform can be performed based on the transmission unit determined by the image encoder. In the inverse transform unit (225) of the image decoder, a transformation technique (e.g., DCT, DST, KLT) can be selectively performed according to multiple pieces of information such as a prediction method, the size of the current block, and the prediction direction.
[0077] The prediction unit (230, 235) can generate a prediction block based on the prediction block generation information provided by the entropy decoding unit (210) and the previously decoded block or picture information provided by the memory (245).
[0078] As described above, when performing intra prediction identical to the operation in the video encoder, if the size of the prediction unit and the size of the transform unit are the same, intra prediction for the prediction unit is performed based on the pixels to the left, the pixels to the top left, and the pixels to the top of the prediction unit; however, if the size of the prediction unit and the size of the transform unit are different when performing intra prediction, intra prediction can be performed using reference pixels based on the transform unit. Additionally, intra prediction using NxN partitioning only for the minimum encoding unit may also be used.
[0079] The prediction unit (230, 235) may include a prediction unit determination unit, an inter prediction unit, and an intra prediction unit. The prediction unit determination unit receives various information, such as prediction unit information input from the entropy decoding unit (210), prediction mode information of the intra prediction method, and motion prediction related information of the inter prediction method, distinguishes the prediction unit from the current encoding unit, and determines whether the prediction unit performs inter prediction or intra prediction. The inter prediction unit (230) may perform inter prediction for the current prediction unit based on information included in at least one picture, either a previous picture or a subsequent picture, of the current picture containing the current prediction unit, using information required for inter prediction of the current prediction unit provided by the video encoder. Alternatively, it may perform inter prediction based on information of a partially restored area within the current picture containing the current prediction unit.
[0080] To perform inter-prediction, based on the encoding unit, it is possible to determine whether the motion prediction method of the prediction unit included in the corresponding encoding unit is Skip Mode, Merge Mode, AMVP Mode, or Intra-Block Copy Mode.
[0081] The intra prediction unit (235) can generate a prediction block based on pixel information within the current picture. If the prediction unit is a prediction unit that has performed intra prediction, it can perform intra prediction based on the intra prediction mode information of the prediction unit provided by the image encoder. The intra prediction unit (235) may include an Adaptive Intra Smoothing (AIS) filter, a reference pixel interpolation unit, and a DC filter. The AIS filter is a part that performs filtering on the reference pixel of the current block, and can determine whether to apply the filter based on the prediction mode of the current prediction unit. AIS filtering can be performed on the reference pixel of the current block using the prediction mode of the prediction unit and the AIS filter information provided by the image encoder. If the prediction mode of the current block is a mode that does not perform AIS filtering, the AIS filter may not be applied.
[0082] The reference pixel interpolation unit can generate a reference pixel of an integer value or less by interpolating the reference pixel when the prediction mode of the prediction unit is a prediction unit that performs intra-prediction based on the pixel value interpolated from the reference pixel. If the prediction mode of the current prediction unit is a prediction mode that generates a prediction block without interpolating the reference pixel, the reference pixel may not be interpolated. The DC filter can generate a prediction block through filtering when the prediction mode of the current block is DC mode.
[0083] The restored block or picture may be provided to a filter unit (240). The filter unit (240) may include a deblocking filter, an offset correction unit, and an ALF.
[0084] Information regarding whether a deblocking filter has been applied to the corresponding block or picture can be received from the video encoder, and if a deblocking filter has been applied, information regarding whether a strong filter or a weak filter has been applied. The deblocking filter of the video decoder receives information related to the deblocking filter provided by the video encoder and can perform deblocking filtering on the corresponding block.
[0085] The offset correction unit can perform offset correction on the restored image based on the type of offset correction and offset value information applied to the image during encoding.
[0086] ALF can be applied to the encoding unit based on information on whether to apply ALF, ALF coefficient information, etc., provided by the encoder. This ALF information can be provided included in a specific parameter set.
[0087] The memory (245) can store the restored picture or block so that it can be used as a reference picture or reference block, and can also provide the restored picture to the output unit.
[0088] As described above, in the embodiments of the present invention below, for convenience of explanation, the term "Coding Unit" is used as "encoding unit," but it may be a unit that performs not only encoding but also decoding.
[0089] Additionally, the current block represents a block to be encoded / decoded, and depending on the encoding / decoding stage, it may represent a coding tree block (or coding tree unit), an encoding block (or encoding unit), a conversion block (or conversion unit), or a prediction block (or prediction unit), etc.
[0090]
[0091] A picture can be divided into square or non-square base blocks for encoding / decoding. In this case, the base block may be referred to as a Coding Tree Unit. A Coding Tree Unit may be defined as the largest encoding unit allowed in a sequence or slice. Information regarding whether a Coding Tree Unit is square or non-square, or the size of the Coding Tree Unit, may be signaled through a sequence parameter set, a picture parameter set, or a slice header. A Coding Tree Unit may be divided into smaller partitions. In this case, if the partition created by dividing a Coding Tree Unit is denoted as depth 1, the partition created by dividing a depth 1 partition may be defined as depth 2. That is, the partition created by dividing a depth k partition within a Coding Tree Unit may be defined as having depth k+1.
[0092] A partition of arbitrary size generated as a coding tree unit is divided can be defined as a coding unit. A coding unit may be recursively divided or divided into basic units for performing prediction, quantization, transformation, or in-loop filtering. For example, a partition of arbitrary size generated as a coding unit is divided can be defined as a coding unit, or as a transformation unit or a prediction unit, which is a basic unit for performing prediction, quantization, transformation, or in-loop filtering.
[0093] Partitioning of a coding tree unit or a coding unit may be performed based on at least one of a vertical line or a horizontal line. Additionally, the number of vertical lines or horizontal lines partitioning the coding tree unit or a coding unit may be at least one. For example, a coding tree unit or a coding unit may be divided into two partitions using one vertical line or one horizontal line, or a coding tree unit or a coding unit may be divided into three partitions using two vertical lines or two horizontal lines. Alternatively, a coding tree unit or a coding unit may be divided into four partitions with a length and width of 1 / 2 using one vertical line and one horizontal line.
[0094] When a coding tree unit or a coding unit is divided into multiple partitions using at least one vertical line or at least one horizontal line, the partitions may have a uniform size or different sizes. Alternatively, one partition may have a different size from the remaining partitions.
[0095] In the embodiments described below, it is assumed that the coding tree unit or coding unit is divided into a quad tree or binary tree structure. However, division of the coding tree unit or coding unit using a greater number of vertical lines or a greater number of horizontal lines is also possible.
[0096] FIG. 3 illustrates an example of hierarchically dividing coding blocks based on a tree structure as an embodiment to which the present invention is applied.
[0097] The input video signal is decoded in predetermined block units, and the basic unit for decoding the input video signal in this way is called a coding block. A coding block can be a unit that performs intra / inter prediction, transformation, and quantization. In addition, a prediction mode (e.g., intra-frame prediction mode or inter-frame prediction mode) is determined in units of coding blocks, and prediction blocks included in the coding block can share the determined prediction mode. A coding block may be a square or non-square block of any size within the range of 8x8 to 64x64, or a square or non-square block of 128x128, 256x256, or larger.
[0098] Specifically, coding blocks can be hierarchically partitioned based on at least one of a quad tree and a binary tree. Here, quad tree-based partitioning may mean a method in which a 2Nx2N coding block is partitioned into 4 NxN coding blocks, and binary tree-based partitioning may mean a method in which a single coding block is partitioned into 2 coding blocks. Even if binary tree-based partitioning is performed, square coding blocks may exist at lower depths.
[0099] Binary tree-based partitioning may be performed symmetrically or asymmetrically. Coding blocks partitioned based on a binary tree may be square blocks or non-square blocks such as rectangles. For example, partition types that allow binary tree-based partitioning may include at least one of symmetric 2NxN (horizontal non-square coding units) or Nx2N (vertical non-square coding units), and asymmetric nLx2N, nRx2N, 2NxnU, or 2NxnD, as shown in the example in FIG. 4.
[0100] Binary tree-based partitioning may restrictively allow only one of symmetric or asymmetric partitions. In this case, configuring the coding tree units into square blocks corresponds to quad tree CU partitioning, and configuring the coding tree units into symmetric non-square blocks corresponds to binary tree partitioning. configuring the coding tree units into square blocks and symmetric non-square blocks corresponds to quad and binary tree CU partitioning.
[0101] Binary tree-based splitting can be performed on coding blocks where quad tree-based splitting is no longer performed. Quad tree-based splitting may no longer be performed on coding blocks that have been split based on a binary tree.
[0102] In addition, the partitioning of lower depths may be determined dependently on the partitioning form of upper depths. For example, if binary tree-based partitioning is allowed in two or more depths, only binary tree-based partitioning of the same form as the binary tree partitioning form of upper depths may be allowed in lower depths. For instance, if binary tree-based partitioning of a 2NxN form is performed in upper depths, binary tree-based partitioning of a 2NxN form may also be performed in lower depths. Alternatively, if binary tree-based partitioning of an Nx2N form is performed in upper depths, binary tree-based partitioning of an Nx2N form may also be allowed in lower depths.
[0103] Conversely, at lower depths, it is also possible to allow only binary tree-based partitions that are different from the binary tree partitioning form at higher depths.
[0104] For a sequence, slice, coding tree unit, or coding unit, it may be restricted so that only specific forms of binary tree-based partitioning are used. For example, for a coding tree unit, it may be restricted so that only 2NxN or Nx2N forms of binary tree-based partitioning are allowed. The allowed partition forms may be predefined in the encoder or decoder, or information regarding the allowed or disallowed partition forms may be encoded and signaled through the bitstream.
[0105] FIG. 5 is a diagram showing an example where only specific forms of binary tree-based partitioning are allowed. FIG. 5(a) shows an example where only Nx2N forms of binary tree-based partitioning are allowed, and FIG. 5(b) shows an example where only 2NxN forms of binary tree-based partitioning are allowed. To implement the quad tree or binary tree-based adaptive partitioning, information indicating quad tree-based partitioning, information regarding the size / depth of coding blocks where quad tree-based partitioning is allowed, information indicating binary tree-based partitioning, information regarding the size / depth of coding blocks where binary tree-based partitioning is allowed, information regarding the size / depth of coding blocks where binary tree-based partitioning is not allowed, or information regarding whether the binary tree-based partitioning is vertical or horizontal may be used.
[0106] In addition, for a coding tree unit or a predetermined coding unit, the number of times binary tree splitting is allowed, the depth at which binary tree splitting is allowed, or the number of depths at which binary tree splitting is allowed can be obtained. The above information can be encoded in units of coding tree units or coding units and transmitted to a decoder via a bitstream.
[0107] For example, the syntax 'max_binary_depth_idx_minus1', which indicates the maximum depth at which binary tree splitting is allowed, can be encoded / decoded through the bitstream. In this case, max_binary_depth_idx_minus1+1 may indicate the maximum depth at which binary tree splitting is allowed.
[0108] Looking at the example illustrated in FIG. 6, it is shown that binary tree splitting is performed for a coding unit of depth 2 and a coding unit of depth 3. Accordingly, at least one of information indicating the number of times binary tree splitting is performed within a coding tree unit (2 times), information indicating the maximum depth (depth 3) at which binary tree splitting is allowed within a coding tree unit, or information indicating the number of depths (2, depth 2 and depth 3) at which binary tree splitting is allowed within a coding tree unit can be encoded / decoded through a bitstream.
[0109] As another example, at least one of the number of times binary tree splitting is allowed, the depth at which binary tree splitting is allowed, or the number of depths at which binary tree splitting is allowed can be obtained per sequence or slice. For example, the information may be encoded in units of sequence, picture, or slice and transmitted via a bitstream. Accordingly, at least one of the number of binary tree splitting, the maximum depth at which binary tree splitting is allowed, or the number of depths at which binary tree splitting is allowed may differ between the first slice and the second slice. For example, in the first slice, binary tree splitting is allowed at only one depth, whereas in the second slice, binary tree splitting may be allowed at two depths.
[0110] As another example, at least one of the number of times binary tree splitting is allowed, the depth at which binary tree splitting is allowed, or the number of depths at which binary tree splitting is allowed may be set differently depending on the Temporal ID of the slice or picture. Here, the Temporal ID is intended to identify each of multiple layers of an image having at least one scalability among view, spatial, temporal, or quality.
[0111] As illustrated in FIG. 3, a first coding block 300 with a split depth of k can be divided into a plurality of second coding blocks based on a quad tree. For example, the second coding blocks 310 to 340 are square blocks with a size half the width and height of the first coding block, and the split depth of the second coding blocks can be increased to k+1.
[0112] A second coding block 310 with a division depth of k+1 can be divided into a plurality of third coding blocks with a division depth of k+2. The division of the second coding block 310 can be performed by selectively using either a quad tree or a binary tree depending on the division method. Here, the division method can be determined based on at least one of information indicating division based on a quad tree or information indicating division based on a binary tree.
[0113] When the second coding block 310 is divided based on a quotate tree, the second coding block 310 is divided into four third coding blocks 310a, each having half the width and height of the second coding block, and the division depth of the third coding blocks 310a can be increased to k+2. On the other hand, when the second coding block 310 is divided based on a binary tree, the second coding block 310 can be divided into two third coding blocks. In this case, each of the two third coding blocks is a non-square block having half the width or height of the second coding block, and the division depth can be increased to k+2. The second coding block can be determined as a non-square block in a horizontal or vertical direction depending on the division direction, and the division direction can be determined based on information regarding whether the binary tree-based division is vertical or horizontal.
[0114] Meanwhile, the second coding block 310 may be determined as a terminal coding block that is no longer divided based on a quad tree or a binary tree, and in this case, the coding block may be used as a prediction block or a transformation block.
[0115] The third coding block 310a may be determined as a terminal coding block, similar to the division of the second coding block 310, or may be further divided based on a quad tree or a binary tree.
[0116] Meanwhile, the third coding block 310b, which is divided based on a binary tree, may be further divided into a vertical coding block (310b-2) or a horizontal coding block (310b-3) based on a binary tree, and the division depth of the coding block may be increased to k+3. Alternatively, the third coding block 310b may be determined as a terminal coding block (310b-1) that is no longer divided based on a binary tree, in which case the coding block (310b-1) may be used as a prediction block or a transformation block. However, the above-described division process may be performed restrictively based on at least one of information regarding the size / depth of a coding block that allows quad tree-based division, information regarding the size / depth of a coding block that allows binary tree-based division, or information regarding the size / depth of a coding block that does not allow binary tree-based division.
[0117] The size that a coding block may have may be limited to a predetermined number, or the size of a coding block within a predetermined unit may have a fixed value. For example, the size of a coding block within a sequence or the size of a coding block within a picture may be limited to 256x256, 128x128, or 32x32. Information indicating the size of a coding block within a sequence or picture may be signaled through a sequence header or a picture header.
[0118] As a result of partitioning based on quad trees and binary trees, the coding unit can take the form of a square or a rectangle of arbitrary size.
[0119]
[0120] A coding block is encoded using at least one of a skip mode, intra-frame prediction, inter-frame prediction, or skip method. Once the coding block is determined, a prediction block can be determined through the prediction partitioning of the coding block. The prediction partitioning of the coding block can be performed by a Part_mode that indicates the partitioning form of the coding block. The size or shape of the prediction block can be determined according to the Part_mode of the coding block. For example, the size of the prediction block determined according to the Part_mode can have a value equal to or smaller than the size of the coding block.
[0121] Figure 7 is a diagram illustrating a partition mode that can be applied to a coding block when the coding block is encoded by cross-frame prediction.
[0122] When a coding block is encoded by cross-frame prediction, any one of the eight partition modes may be applied to the coding block, as in the example shown in FIG. 7.
[0123] If a coding block is encoded by in-screen prediction, the coding block may have a partition mode PART_2Nx2N or PART_NxN applied.
[0124] PART_NxN may be applied when the coding block has a minimum size. Here, the minimum size of the coding block may be predefined in the encoder and decoder. Alternatively, information regarding the minimum size of the coding block may be signaled via a bitstream. For example, the minimum size of the coding block may be signaled via a slice header, and accordingly, the minimum size of the coding block may be defined per slice.
[0125] Generally, the size of the prediction block can range from 64x64 to 4x4. However, if the coding block is encoded as an inter-frame prediction, the prediction block may not have a size of 4x4 in order to reduce memory bandwidth when performing motion compensation.
[0126]
[0127] FIG. 8 is a flowchart illustrating an inter prediction method as an embodiment to which the present invention is applied.
[0128] Referring to FIG. 8, movement information of the current block can be determined (S810). The movement information of the current block may include at least one of a movement vector for the current block, a reference picture index of the current block, or an inter-prediction direction of the current block.
[0129] The movement information of the current block can be obtained based on at least one of the information signaled through the bitstream or the movement information of a neighboring block adjacent to the current block.
[0130] Figure 9 is a diagram illustrating the process of inducing movement information of the current block when a merge mode is applied to the current block.
[0131] When a merge mode is applied to the current block, spatial merge candidates can be derived from the spatial neighbor blocks of the current block (S910). The spatial neighbor blocks may include at least one of the blocks adjacent to the top, left, or corner of the current block (e.g., at least one of the top left corner, top right corner, or bottom left corner).
[0132] The movement information of a spatial merge candidate can be set to be identical to the movement information of a spatial neighbor block.
[0133] Temporal merge candidates can be derived from temporal neighbor blocks of the current block (S920). Temporal neighbor blocks may refer to blocks of the same location (co-located blocks, collocated blocks) included in a collocated picture. A collocated picture has a different temporal order (Picture Order Count, POC) from the current picture containing the current block. A collocated picture may be determined by a picture having a predefined index within a reference picture list or by an index signaled from a bitstream. Temporal neighbor blocks may be determined by any block within a block having the same location and size as the current block within the collocated picture, or by a block adjacent to a block having the same location and size as the current block. For example, at least one of a block containing the center coordinates of a block having the same location and size as the current block within the collocated picture, or a block adjacent to the bottom right boundary of said block, may be determined as a temporal neighbor block.
[0134] The motion information of a temporal merge candidate can be determined based on the motion information of a temporal neighbor block. For example, the motion vector of a temporal merge candidate can be determined based on the motion vector of a temporal neighbor block. Additionally, the inter-prediction direction of the temporal merge candidate can be set to be the same as the inter-prediction direction of the temporal neighbor block. However, the reference picture index of the temporal merge candidate may have a fixed value. For example, the reference picture index of the temporal merge candidate may be set to '0'.
[0135] Subsequently, a merge candidate list including spatial merge candidates and temporal merge candidates can be generated (S930). If the number of merge candidates included in the merge candidate list is less than the maximum number of merge candidates, a combined merge candidate formed by combining two or more merge candidates or a merge candidate having a (0,0) motion vector (zero motion vector) may be included in the merge candidate list.
[0136] When a merge candidate list is generated, at least one of the merge candidates included in the merge candidate list can be specified based on the merge candidate index (S940).
[0137] The movement information of the current block can be set to be the same as the movement information of the merge candidate specified by the merge candidate index (S950). For example, if a spatial merge candidate is selected by the merge candidate index, the movement information of the current block can be set to be the same as the movement information of the spatial neighbor block. Alternatively, if a temporal merge candidate is selected by the merge candidate index, the movement information of the current block can be set to be the same as the movement information of the temporal neighbor block.
[0138] Figure 10 is a diagram illustrating the process of inducing movement information of the current block when the AMVP mode is applied to the current block.
[0139] When AMVP mode is applied to the current block, at least one of the inter-prediction direction or reference picture index of the current block can be decoded from the bitstream (S1010). That is, when AMVP mode is applied, at least one of the inter-prediction direction or reference picture index of the current block can be determined based on information encoded through the bitstream.
[0140] Based on the motion vectors of spatial neighbor blocks of the current block, spatial motion vector candidates can be determined (S1020). The spatial motion vector candidates may include at least one of a first spatial motion vector candidate derived from the top neighbor block of the current block and a second spatial motion vector candidate derived from the left neighbor block of the current block. Here, the top neighbor block includes at least one of a block adjacent to the top or top right corner of the current block, and the left neighbor block of the current block may include at least one of a block adjacent to the left or bottom left corner of the current block. A block adjacent to the top left corner of the current block may be treated as a top neighbor block or as a left neighbor block.
[0141] If the reference picture between the current block and the spatial neighbor block is different, the spatial motion vector may be obtained by scaling the motion vector of the spatial neighbor block.
[0142] Candidate temporal motion vectors can be determined based on the motion vectors of the temporal neighbor blocks of the current block (S1030). If the reference picture between the current block and the temporal neighbor blocks is different, the temporal motion vector may be obtained by scaling the motion vectors of the temporal neighbor blocks.
[0143] A list of motion vector candidates including spatial motion vector candidates and temporal motion vector candidates can be generated (S1040).
[0144] When a list of motion vector candidates is generated, at least one of the motion vector candidates included in the list of motion vector candidates can be specified based on information specifying at least one of the motion vector candidates (S1050).
[0145] A motion vector candidate specified by the above information can be set as the motion vector prediction value of the current block, and the motion vector difference value can be added to the motion vector prediction value to obtain the motion vector of the current block (S1060). At this time, the motion vector difference value can be parsed through a bitstream.
[0146] When motion information of the current block is obtained, motion compensation for the current block can be performed based on the obtained motion information (S820). Specifically, motion compensation for the current block can be performed based on the inter-prediction direction of the current block, the reference picture index, and the motion vector.
[0147]
[0148] As in the example described above, motion compensation for the current block can be performed based on the motion information of the current block. In this case, the motion vector may have a resolution of integer pixels or decimal pixels.
[0149] The integer pixel unit may include N integer pels, such as integer-pel, 2 integer-pel, 4 integer-pel, etc. Here, N is a natural number greater than or equal to 1, and in particular, may be expressed as a power of 2. An integer pel may represent 1 pixel precision (i.e., 1 pixel unit), a 2 integer pel may represent 2 times the pixel precision (i.e., 2 pixel units), and a 4 integer pel may represent 4 times the pixel precision (i.e., 4 pixel units). Depending on the selected integer pel, a motion vector may be represented in N pixel units, and motion compensation may be performed in N pixel units.
[0150] The fractional pixel unit may include 1 / N pels, such as half-pel, quarter-pel, and octo-pel. Here, N is a natural number greater than or equal to 1, specifically, it may be expressed as a power of 2. Half-pel represents 1 / 2 pixel precision (i.e., 1 / 2 pixel unit), quarter-pel represents 1 / 4 pixel precision (i.e., 1 / 4 pixel unit), and octo-pel represents 1 / 8 pixel precision (i.e., 1 / 8 pixel unit). Depending on the selected fractional pel, motion vectors may be represented in 1 / N pixel units, and motion compensation may be performed in 1 / N pixel units.
[0151] FIGS. 11 and FIGS. 12 are diagrams illustrating a motion vector derivation method according to the motion vector precision of the current block. FIG. 11 illustrates a motion vector derivation method under AMVP mode, and FIG. 12 illustrates a motion vector derivation method under merge mode.
[0152] First, the precision of the motion vector of the current block can be determined (S1110, S1210).
[0153] The precision of the motion vector can be determined in units of sequence, picture, slice, or a predetermined block. Here, a predetermined block may represent a CTU, CU, or PU, etc., or mean a block of a predetermined size or shape. A CTU may refer to the maximum CU allowed by an encoder / decoder. If the precision of the motion vector is determined at a higher level than a block, such as a sequence, picture, or slice, motion compensation for the predetermined block may be performed according to the precision of the motion vector determined at the higher level. For example, blocks included in a first slice may perform motion compensation using motion vectors in units of integer-pel, whereas blocks included in a second slice may perform motion compensation using motion vectors in units of quarter-pel.
[0154] To determine the precision of a motion vector, information for determining the precision of a motion vector may be signaled through a bitstream. The information may be index information, 'mv_resolution_idx', which identifies at least one of a plurality of motion vector precisions. For example, Table 1 shows the motion vector precision according to mv_resolution_idx.
[0155] mv_resolution_idx motion vector pixel units 0 quarter Pell pixel units 1 half Pell pixel units 2 integer Pell pixel units 3 octa Pell pixel units 4 2x integer Pell pixel units 5 4x integer Pell pixel units
[0156] The example shown in Table 1 above is merely an example of how the present invention can be applied. The types and / or number of motion vector precision candidates that can be had in a given unit may differ from those shown in Table 1. The values and / or ranges of mv_resolution_idx may also differ depending on the types and / or number of motion vector precision candidates.
[0157] As another example, motion vector precision can be derived from a unit spatially or temporally adjacent to a predetermined unit. Here, the predetermined unit represents a picture, slice, or block, etc., and the adjacent unit may represent a picture, slice, or block, etc. spatially or temporally adjacent to the predetermined unit. For example, the motion vector precision of the current block may be set to be equal to the motion vector precision of the block pointed to by the index information among the spatial neighbor blocks and / or temporal neighbor blocks of the current block.
[0158] As another example, the motion vector precision of the current block may be adaptively determined based on the motion information of the current block. For instance, the motion vector precision of the current block may be adaptively determined based on whether the reference picture of the current block precedes the current picture in terms of temporal order or output order (POC), whether the reference picture of the current block follows the current picture in terms of temporal order or output order (POC), or whether the reference picture of the current block is the current picture.
[0159] Some of the multiple motion vector precision candidates may be selectively used. For example, a motion vector precision set including at least one motion vector precision candidate may be defined, and then at least one of the motion vector precision candidates included in the motion vector precision set may be determined as the motion vector precision.
[0160] A motion vector precision set can be determined at the level of a sequence picture, slice, or block. Motion vector precision candidates included in the motion vector precision set may be predefined in the encoder and decoder. Alternatively, the motion vector precision set can be determined based on encoding information signaled through a bitstream. Here, the encoding information may be related to at least one of the types and / or number of motion vector precision candidates included in the motion vector precision set. As another example, the motion vector precision set may be derived from units spatially or temporally adjacent to a predetermined unit. Here, the predetermined unit may represent a picture, slice, or block, etc., and the adjacent unit may represent a picture, slice, or block, etc. spatially or temporally adjacent to the predetermined unit. For example, the motion vector precision set of a predetermined slice may be set to be identical to the motion vector precision set of a slice spatially adjacent to that slice. Alternatively, depending on the dependency between slices, the motion vector precision set of an independent slice may be set as the motion vector precision set of a dependent slice.
[0161] When a set of motion vector precisions is determined, at least one motion vector precision candidate included in the set of motion vector precisions can be determined as the motion vector precision. To this end, index information identifying at least one of the motion vector precision candidates included in the set of motion vector precisions can be signaled via a bitstream. For example, the motion vector precision of the current block can be set to a candidate identified by the index information among the motion vector precision candidates included in the set of motion vector precisions.
[0162] Whether to use a motion vector precision set can be adaptively determined based on the slice type, the size / shape of the current block, motion information of the current block (e.g., the reference picture of the current block or the predicted direction of the current block), etc. Alternatively, information indicating whether a motion vector precision set is used (e.g., a flag) may be signaled via a bitstream.
[0163] When a set of motion vector precision is determined at a higher level than a block, such as a sequence, picture, or slice, the motion vector precision of a given block may be derived from the set of motion vector precision determined at the higher level. For example, if a set of motion vectors including quarter-Pell and double-integer Pell is defined at the picture level, a block included in the picture may be restricted to using at least one of quarter-Pell or double-integer Pell.
[0164] When multiple-direction prediction is applied to the current block, multiple motion vectors resulting from the multiple-direction prediction may have different motion vector precisions. That is, the precision of any one of the multiple motion vectors of the current block may differ from the precision of another motion vector. For example, when the current block is subject to bi-prediction, the precision of the forward motion vector (mvL0) may differ from the precision of the backward motion vector (mvL1). Even when tri-prediction or more is applied to the current block, at least one of the multiple motion vectors may be configured to have a precision different from that of the others. Accordingly, information for determining motion vector precision can be encoded / decoded for each prediction direction of the current block.
[0165]
[0166] When AMVP mode is applied to the current block and the motion vector precision is determined variably between blocks, the precision of the Motion Vector Predictor (MVP) derived from surrounding blocks may differ from the precision of the current block's motion vector. To match the precision of the Motion Vector Predictor to the precision of the current block's motion vector, the Motion Vector Predictor can be scaled to match the precision of the current block's motion vector (S1120). The Motion Vector Predictor can be scaled to match the precision of the current block's motion vector. The Motion Vector Difference (MVD) can be added to the scaled Motion Vector Predictor to derive the motion vector of the current block (S1130).
[0167] For example, if the pixel unit of the motion vector of a surrounding block is quarter-Pel and the pixel unit of the motion vector of the current block is integer-Pel, the motion vector prediction value derived from the surrounding block can be scaled to integer-Pel units, and the scaled motion vector prediction value and the motion vector difference value can be added to obtain a motion vector in integer-Pel units. For instance, Equation 1 below shows an example in which a motion vector is obtained by scaling the motion vector prediction value to integer-Pel units.
[0168]
[0169]
[0170] In the above mathematical formula 1, mvpLX represents the predicted value of the motion vector, and mvdLX represents the difference value of the motion vector. Also, mvLX[0], mvpLX[0], mvdLX[0], etc. represent the vertical motion vector component, and mvLX[1], mvpLX[1], mvdLX[1], etc. represent the horizontal motion vector component.
[0171] As another example, if the pixel unit of the motion vector of a surrounding block is a 2x integer PEL and the pixel unit of the motion vector of the current block is a quarter PEL, the motion vector prediction value derived from the surrounding block is scaled to a quarter PEL unit, and the scaled motion vector prediction value and the motion vector difference value are added to obtain a motion vector in quarter PEL units. For example, Equation 2 below shows an example of how a motion vector is obtained when the current picture is used as a reference picture.
[0172]
[0173]
[0174] In the above mathematical formulas 1 and 2, the bit shift value used to scale the motion vector prediction value can be adaptively determined according to the ratio between the motion vector precision of the current block and the motion vector precision of the neighboring block.
[0175] Unlike the example illustrated in Fig. 11, it is also possible to scale the motion vector generated by adding the motion vector prediction value and the motion vector difference value to match the precision of the motion vector of the current block.
[0176] The motion vector difference value can be encoded / decoded according to the motion vector precision of the current block. For example, if the motion vector precision of the current block is quarter-pel, the motion vector difference value for the current block can be encoded / decoded in quarter-pel units.
[0177] It is also possible to encode / decode the motion vector difference value in a preset unit regardless of the motion vector precision of the current block. Here, the preset unit may be a fixed pixel unit (e.g., integer PEL or quarter PEL, etc.) agreed upon in the encoder and decoder, or a pixel unit determined at a higher level, such as a picture or slice. If the motion vector precision of the current block and the precision of the motion vector difference value are different, the motion vector of the current block can be derived by scaling the motion vector difference value or by scaling the motion vector derived by summing the scaled motion vector prediction value and the motion vector difference value. For example, if the motion vector precision of the current block is integer PEL while the motion vector difference value is encoded with quarter PEL precision, the motion vector of the current block can be derived by scaling the motion vector derived by summing the scaled motion vector prediction value and the motion vector difference value, as shown in Equation 1.
[0178] Depending on the precision of the motion vector, the encoding / decoding method of the motion vector difference value may be determined differently. For example, in the case of fractional pixel units, the motion vector difference value can be encoded / decoded by dividing it into a prefix part and a suffix part. The prefix part may represent the integer part of the motion vector, and the suffix part may represent the fractional part of the motion vector. As an example, Equation 3 below shows an example of deriving the prefix part 'predfix_mvd' and the suffix part 'suffix_mvd'.
[0179]
[0180]
[0181] In the above mathematical formula 3, N may be a fixed value or a value that is variably determined according to the motion vector precision of the current block. For example, N may be a value that is in a proportional relationship with the motion vector precision of the current block.
[0182] If the motion vector precision of the current block is in the unit of integer PEL pixels greater than or equal to twice, a value obtained by shifting the motion vector difference value by N can be encoded. For example, if the motion vector precision of the current block is in the integer PEL of twice, half of the motion vector difference value can be encoded / decoded, and if the motion vector precision of the current block is in the integer PEL of four times, half of the motion vector difference value can be encoded / decoded. In this case, the decoder can derive the motion vector of the current block by scaling the decoded motion vector difference value according to the motion vector precision of the current block.
[0183]
[0184] When a merge mode or skip mode is applied to the current block and the motion vector precision is determined variably between blocks, there may be cases where the motion vector precision differs between the spatial / temporal merge candidate block and the current block. Accordingly, the motion vector of the spatial / temporal neighbor block can be scaled to match the motion vector precision of the current block (S1220), and the scaled motion vector can be set as the motion information of the spatial / temporal merge candidate (S1230). For example, the motion vector mvLX[0] and / or mvLX[1] of the spatial / temporal neighbor block can be scaled to match the motion vector of the current block to derive the scaled motion vector mxLXscale[0] and / or mvLXscale[1], and the scaled motion vector can be set as the motion vector of the spatial / temporal merge candidate.
[0185] For example, if the motion vector precision of a neighbor block adjacent to the current block is quarter-Pell and the motion vector precision of the current block is integer-Pell, the motion vector of the neighbor block can be scaled as shown in Equation 4 below and set as the motion vector of a spatial merge candidate.
[0186]
[0187]
[0188] In the above mathematical formula 4, the bit shift value used to scale the motion vector of the neighbor block can be adaptively determined according to the ratio between the motion vector precision of the current block and the motion vector precision of the neighbor block.
[0189] As another example, a merge candidate to be merged with the current block (i.e., a merge candidate selected by the merge index) can be selected, and it can be checked whether its motion vector precision matches that of the current block. If the motion vector precision of the selected merge candidate does not match that of the current block, the motion vector of the selected merge candidate can be scaled to match the motion vector precision of the current block.
[0190] The motion vector of the current block can be set to be the same as the motion vector of a merge candidate selected by index information among the merge candidates (i.e., scaled motion vector) (S1240).
[0191] Unlike the example illustrated in FIG. 12, merge candidates for the current block may be determined by considering the motion vector precision of spatial / temporal neighbor blocks. For example, by comparing whether the difference or scale between the motion vector precision of the spatial neighbor block and the motion vector precision of the current block is greater than or equal to a predetermined threshold value, it may be determined whether the spatial / temporal neighbor block can be used as a merge candidate based on the result of the comparison. For example, if the motion vector precision of the spatial merge candidate is a 2x integer Pell and the motion vector precision of the current block is a quarter Pell, it may mean that there is not a large correlation between the two blocks. Accordingly, spatial / temporal neighbor blocks whose difference value from the motion vector precision of the current block is greater than the threshold value may be set as unavailable as merge candidates. That is, spatial / temporal neighbor blocks can be used as merge candidates only when the motion vector precision of the spatial / temporal neighbor block and the motion vector precision of the current block are less than or equal to the threshold value. Spatial / temporal neighbor blocks that cannot be referenced as merge candidates may not be added to the mergeless candidate list.
[0192] If the difference or scale between the motion vector precision of the current block and the motion vector precision of the neighboring block is below a threshold value but the two precisions are different, the scaled motion vector can be set as the motion vector of the merge candidate, as described in the embodiment with reference to FIG. 12 above, or the motion vector of the merge candidate identified by the merge index can be scaled.
[0193] The motion vector of the current block can be derived from the motion vector of a merge candidate added to the merge candidate list. If the precision of the motion vector of the current block differs from the precision of the motion vector of a merge candidate added to the merge candidate list,
[0194] The difference value of the motion vector precision may represent the difference between the motion vector precisions, or the difference value of the corresponding value corresponding to the motion vector precision. Here, the corresponding value may represent the index value corresponding to the motion vector precision exemplified in Table 1, or the value assigned to each motion vector precision exemplified in Table 2. For example, in Table 2, the corresponding value assigned to the quarter-fell is 2 and the corresponding value assigned to the integer-fell is 3, so the difference value between the two precisions can be determined to be 2.
[0195] Motion Vector Pixel Unit Corresponding Values Octo-Pell Pixel Unit 0 Quarter-Pell Pixel Unit 1 Half-Pell Pixel Unit 2 Integer-Pell Pixel Unit 3 2x Integer-Pell Pixel Unit 44x Integer-Pell Pixel Unit 5
[0196] The availability of temporal / spatial neighbor blocks can also be determined using a motion vector precision scale instead of the motion vector precision difference value. Here, the motion vector precision scale can represent a multiple between two motion vector precisions. For example, the scale between quarter-fell and integer-fell can be defined as 4 times.
[0197]
[0198] The above-described embodiments are described based on a series of steps or flowcharts, but this does not limit the chronological order of the invention and may be performed simultaneously or in a different order as necessary. Additionally, each component constituting the block diagram in the above-described embodiments (e.g., units, modules, etc.) may be implemented as a hardware device or software, or a plurality of components may be combined to be implemented as a single hardware device or software. The above-described embodiments may be implemented in the form of program instructions that can be executed through various computer components and recorded on a computer-readable recording medium. The computer-readable recording medium may include program instructions, data files, data structures, etc., either individually or in combination. Examples of computer-readable recording media include magnetic media such as hard disks, floppy disks, and magnetic tapes; optical recording media such as CD-ROMs and DVDs; magneto-optical media such as floptical disks; and hardware devices specifically configured to store and execute program instructions, such as ROM, RAM, and flash memory. The above hardware device may be configured to operate as one or more software modules to perform processing according to the present invention, and vice versa.
[0199] The present invention can be applied to an electronic device capable of encoding / decoding images.
Claims
1. A step for determining the motion vector precision of the current block; A step of generating a motion vector candidate list of the current block; A step of obtaining a motion vector prediction value of the current block from the motion vector candidate list; A step of checking whether the precision of the above motion vector prediction value is the same as the precision of the motion vector of the current block; If the precision of the motion vector prediction value is different from the precision of the motion vector of the current block, a step of scaling the motion vector prediction value to match the precision of the motion vector of the current block; and An image decoding method, comprising the step of obtaining a motion vector of the current block using the scaled motion vector prediction value.
2. In paragraph 1, A video decoding method, characterized in that the motion vector precision of the current block is determined from a motion vector precision set including a plurality of motion vector precision candidates.
3. In paragraph 2, An image decoding method, characterized in that the motion vector precision of the current block is determined based on index information specifying any one of the plurality of motion vector precision candidates.
4. In paragraph 1, A method for decoding an image, wherein the motion vector difference value includes a prefix part representing an integer part and a suffix part representing a decimal part.
5. In paragraph 1, A method for decoding an image, wherein the scaling is performed based on a bit shift operation according to a ratio between the precision of the motion vector prediction value and the precision of the motion vector of the current block.
6. Step of determining the motion vector precision of the current block; A step of generating a motion vector candidate list of the current block; A step of obtaining a motion vector prediction value of the current block from the motion vector candidate list; A step of checking whether the precision of the above motion vector prediction value is the same as the precision of the motion vector of the current block; If the precision of the motion vector prediction value is different from the precision of the motion vector of the current block, a step of scaling the motion vector prediction value to match the precision of the motion vector of the current block; and An image encoding method, comprising the step of obtaining a motion vector of the current block using the scaled motion vector prediction value.
7. In paragraph 6, A video encoding method, characterized in that the motion vector precision of the current block is determined from a motion vector precision set including a plurality of motion vector precision candidates.
8. In paragraph 7, An image encoding method, characterized in that the motion vector precision of the current block is determined based on index information specifying any one of the plurality of motion vector precision candidates.
9. In paragraph 6, A method for decoding an image, wherein the motion vector difference value includes a prefix part representing an integer part and a suffix part representing a decimal part.
10. In paragraph 6, A method for decoding an image, wherein the scaling is performed based on a bit shift operation according to a ratio between the precision of the motion vector prediction value and the precision of the motion vector of the current block.
11. An image decoding device including an inter prediction unit which determines a motion vector precision of a current block, generates a motion vector candidate list of the current block, obtains a motion vector prediction value of the current block from the motion vector candidate list, checks whether the precision of the motion vector prediction value is the same as the motion vector precision of the current block, and scales the motion vector prediction value according to the motion vector precision of the current block if the precision of the motion vector prediction value is different from the motion vector precision of the current block, and obtains a motion vector of the current block using the scaled motion vector prediction value.
