Video encoding / decoding apparatus and method and non-transitory recording medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SK TELECOM CO LTD
- Filing Date
- 2017-10-17
- Publication Date
- 2026-06-19
AI Technical Summary
Existing video coding technologies are not efficient enough when dealing with increased image size and resolution, leading to increased data volume. More efficient compression technologies are needed to adapt to changes in image characteristics.
Efficient encoding is achieved by adaptively determining the motion vector resolution of the current block and encoding the motion vector resolution information. This is accomplished by using a resolution determiner and a resolution encoder to adjust the resolution of the motion vectors, including the use of a resolution mode determiner, an alternative resolution determiner, and an adaptive resolution determiner.
It improves the efficiency of video encoding, adapts to different image characteristics, reduces data volume, and enhances encoding quality.
Smart Images

Figure CN116567210B_ABST
Abstract
Description
[0001] This application is a divisional application of the original patent application No. 201780064071.X (International Application No.: PCT / KR2017 / 011484, Application Date: October 17, 2017, Invention Title: Apparatus and Method for Encoding or Decoding Images). Technical Field
[0002] This invention relates to efficient video encoding or decoding. Background Technology
[0003] The information disclosed in this background section is only intended to enhance the understanding of the background of the present invention, and therefore may contain information that does not constitute prior art.
[0004] Compared to audio and still image data, video data consumes a large amount of data. Therefore, it requires significant hardware resources, including memory, to store or transmit the video data itself without compression processing. Thus, typically, when storing or transmitting video data, encoding devices compress and store the video data, while decoding devices receive, decompress, and reproduce the compressed video data. Such video compression techniques include High Efficiency Video Coding (HEVC), established in early 2013, which offers approximately 40% higher coding efficiency than H.264 / AVC, as well as H.264 / AVC.
[0005] During inter-frame prediction coding, which is used as a prediction method for encoding or decoding, information about the residual block obtained by predicting the current block and motion information used to predict the current block are signaled to the decoding device. Here, the motion information includes information about the reference image used to predict the current block and information about the motion vector, and in the case of the conventional HEVC standard, the motion vector is represented in 1 / 4 pixel units.
[0006] However, as image size, resolution, and frame rate increase, the amount of data to be decoded also increases. Therefore, compression techniques that are more efficient than traditional compression methods are needed. Summary of the Invention
[0007] Technical issues
[0008] Therefore, the present invention was made in consideration of the above problems, and one object of the present invention is to provide a video encoding or decoding technique for efficiently encoding video by adjusting the resolution of motion vectors according to image characteristics such as changes in image or block size.
[0009] Technical solution
[0010] According to one aspect of the present invention, a method for encoding video is provided, the method comprising the steps of: determining the motion vector resolution of a current block; determining the motion vector of the current block based on the motion vector resolution of the current block; using the motion vector of the current block to predict the current block and encoding the current block; and encoding information about the motion vector resolution of the current block.
[0011] According to another aspect of the invention, a video decoding method for adaptively determining the motion vector resolution of a current block and decoding the current block includes the steps of: extracting information about the motion vector resolution of the current block from a bitstream, and determining the motion vector resolution of the current block based on the information about the motion vector resolution of the current block; and using the motion vector of the current block determined according to the motion vector resolution of the current block to predict the current block and decode the current block.
[0012] According to another aspect of the invention, a video decoding apparatus for adaptively determining the motion vector resolution of a current block and decoding the current block includes: a motion vector resolution decoder configured to extract information about the motion vector resolution of the current block from a bitstream and determine the motion vector resolution of the current block based on the information about the motion vector resolution of the current block; and a video decoder configured to predict the current block and decode the current block using the motion vector of the current block determined according to the motion vector resolution of the current block. Attached Figure Description
[0013] Figure 1 This is a schematic block diagram showing common video encoding devices.
[0014] Figure 2 This is a diagram illustrating an example of block separation using a quadtree plus binary tree (QTBT) structure.
[0015] Figure 3 This is a diagram showing examples of neighboring blocks of the current block.
[0016] Figure 4 This is a diagram illustrating a video encoding apparatus according to an embodiment of the present invention.
[0017] Figure 5 This is a diagram illustrating the interpolation and motion estimation process performed by the inter-frame predictor 124 and the resolution of the reference image.
[0018] Figure 6 It is a graph used to compare the degree of motion between two frames.
[0019] Figure 7 This is a diagram illustrating an example of a resolution determiner 410 according to an embodiment.
[0020] Figure 8 This is a diagram illustrating an example of a resolution encoder 430 when the motion vector resolution information of the current CU is encoded as a resolution difference.
[0021] Figure 9 This is a diagram illustrating an example of a resolution encoder 430 that represents the motion vector of the current CU as a resolution scaling factor rather than a resolution difference.
[0022] Figure 10 This is a schematic diagram of common video decoding equipment.
[0023] Figure 11 This is a diagram illustrating a video decoding device 1100 according to an embodiment of the present invention.
[0024] Figure 12 This is a flowchart illustrating a method for decoding video at a video decoding device 1100 according to a first embodiment of the present invention.
[0025] Figure 13 This is a diagram illustrating an example of adaptive resolution determination.
[0026] Figure 14 It is shown in Figure 12 Add a flowchart for some operations.
[0027] Figure 15 This is a flowchart illustrating a method for decoding video at a video decoding device 1100 according to a second embodiment of the present invention.
[0028] Figure 16 This is a diagram illustrating another example of adaptive resolution determination.
[0029] Figure 17 It is shown in Figure 15 Add a flowchart for some operations.
[0030] Figure 18 This is a flowchart illustrating a method for decoding video at a video decoding device 1100 according to a third embodiment of the present invention.
[0031] Figure 19 It is shown in Figure 18 Add some operation scenarios to the flowchart. Detailed Implementation
[0032] Hereinafter, some embodiments of the invention will be described in detail with reference to the accompanying drawings. Regarding the reference numerals for elements in the drawings, although elements are shown in different drawings, the same reference numerals designate the same elements where possible. Furthermore, in the following description of the invention, for the sake of clarity and brevity, detailed descriptions of known functions and configurations incorporated herein will be omitted.
[0033] Figure 1 This is a schematic block diagram illustrating common video encoding devices.
[0034] The video encoding device 100 may include a block splitter 110, a predictor 120, a subtractor 130, a transformer 140, a quantizer 145, an encoder 150, an inverse quantizer 160, an inverse transformer 165, an adder 170, a filter unit 180, and a memory 190. Each component of the video encoding device 100 may be implemented as a hardware chip or as software, such that one or more microprocessors execute the software functions corresponding to each component.
[0035] Block separator 110 can separate each image constituting the video into multiple coding tree units (CTUs), and then recursively separate the CTUs using a tree structure. The leaf nodes in the tree structure can be coding units (CUs), which are the basic units of coding. The tree structure can be a quadtree (QT) structure where nodes are separated into four subordinate nodes, or a quadtree plus binary tree (QTBT) structure formed by combining a QT structure with a binary tree (BT) structure where nodes are separated into two subordinate nodes.
[0036] In a Quadtree Plus Binary Tree (QTBT) structure, the CTU can first be separated according to the QT structure. Then, the leaf nodes of the QT can be further separated according to the BT structure. The separation information generated by the block separator 110 separating the CTU according to the QTBT structure can be encoded by the encoder 150 and sent to the decoding device.
[0037] In Qt, a first flag (QT_split_flag) indicating whether to split the corresponding node's blocks is encoded. When the first flag is 1, the corresponding node's blocks are split into four blocks of the same size, and when the first flag is 0, the corresponding node is not further split according to Qt.
[0038] In BitTorrent (BT), a second flag (BT_split_flag) indicating whether to split the corresponding node's block is encoded. Multiple splitting types can exist in BT. For example, there might be a type that splits the corresponding node's block horizontally and a type that splits the block vertically into two blocks of the same size. Alternatively, there might be another type that splits the corresponding node's block into two blocks with an asymmetrical shape. This asymmetrical shape can be formed by splitting the corresponding node's block into two rectangular blocks with a size ratio of 1:3 or by splitting the corresponding node's block diagonally. When BT has multiple splitting types, if the second flag indicating that a block is split is encoded, the splitting type information indicating the splitting type of the corresponding block can also be encoded.
[0039] Figure 2 This is a diagram illustrating an example of block separation using a QTBT structure. Figure 2 (a) shows an example of separating blocks using a QTBT structure. Figure 2 (b) represents blocks separated in a tree structure. Figure 2 In the diagram, solid lines represent separation based on the QT structure, and dashed lines represent separation based on the BT structure. Figure 2 In (b), regarding the symbols for layers, layers without parentheses represent layers in QT, while layers within parentheses represent layers in BT. The numbers in the BT structure, indicated by dashed lines, indicate separation type information.
[0040] exist Figure 2 In this context, the CTU, which is the topmost layer of QT, can be split into four nodes of layer 1. Therefore, the block splitter 110 can generate QT_split_flag=1 to indicate that the CTU has been split. The block corresponding to the first node of layer 1 is no longer split according to QT. Therefore, the block splitter 110 generates QT_split_flag=0.
[0041] Then, the block corresponding to the first node of layer 1 in QT can be split using Bitwise Barrier (BT). In this implementation, it is assumed that BT has two splitting types: a type that horizontally splits the node's block into two blocks of the same size, and a type that vertically splits the node's block into two blocks of the same size. The first node of layer 1 in QT becomes the root node of BT "(layer 0)". The block corresponding to the root node of BT is further split into blocks of "(layer 1)", therefore, the block splitter 110 generates BT_split_flag=1 indicating that the block is split by BT. Then, the block splitter 110 generates splitting type information indicating whether the corresponding block is split horizontally or vertically. Figure 2In this process, the block corresponding to the root node of BT is vertically split, thus generating a 1 indicating vertical split as the split type information. Based on the vertical split type, the first block of the "(layer 1)" block separated from the root node is further split, thus generating BT_split_flag=1 and the split type information 1. On the other hand, the second block of (layer 1) separated from the root node of BT is no longer split, thus generating BT_split_flag=0.
[0042] To efficiently signal information about blocks separated according to the QTBT structure to the decoding device, the following information can be additionally encoded. This information can be encoded as video header information, for example, as a Sequence Parameter Set (SPS) or Picture Parameter Set (PPS).
[0043] - CTU size: The block size of the topmost level (i.e., the root node) of the QTBT;
[0044] - MinQTSize: The minimum block size allowed for leaf nodes in Qt;
[0045] - MaxBTSize: The maximum block size allowed for the root node in BitTorrent;
[0046] - MaxBTDepth: The maximum depth allowed in BT;
[0047] - MinBTSize: The minimum block size allowed for leaf nodes in BT.
[0048] Blocks in the QT with a size equal to MinQTSize are not further split, therefore the splitting information (first flag) for the QT corresponding to that block is not encoded. Additionally, blocks in the QT with a size greater than MaxBTSize do not have a BT. Therefore, the splitting information (second flag, splitting type information) for the BT corresponding to that block is not encoded. When the depth of a BT node reaches MaxBTDepth, the node's blocks are not further split, and the splitting information (second flag, splitting type information) for the corresponding node's BT is not encoded. Furthermore, blocks in the BT with a size equal to MinBTSize are not further split, and the splitting information (second flag, splitting type information) for the BT is not encoded. Thus, the maximum or minimum block size of the root or leaf nodes of the QT and BT can be defined at a high level, such as the Sequence Parameter Set (SPS) or Picture Parameter Set (PPS), thereby reducing the amount of information encoded indicating whether the CTU is split or indicating the splitting type.
[0049] The same QTBT structure can be used to separate the luma and chroma components of a CTU. However, the invention is not limited to this, and separate QTBT structures can be used to separate the luma and chroma components. For example, in the case of intra-frame (I) slices, different QTBT structures can be used to separate the luma and chroma components.
[0050] In the following text, the block corresponding to the CU to be encoded or decoded is referred to as the "current block".
[0051] Predictor 120 predicts the current block to generate a prediction block. Predictor 120 may include an intra-frame predictor 122 and an inter-frame predictor 124.
[0052] The intra-predictor 122 uses pixels (reference pixels) surrounding the current block in the current image, including the current block, to predict pixels in the current block. Multiple intra-prediction modes exist depending on the prediction direction, and the neighboring pixels to be used and the computation formula are defined differently for each prediction mode.
[0053] Inter-frame predictor 124 searches for the most similar block to the current block within a reference image that was encoded and decoded earlier than the current image, and uses the searched block to generate a predicted block for the current block. Additionally, inter-frame predictor 124 generates a motion vector corresponding to the displacement between the current block in the current image and the predicted block in the reference image. Motion information, including information about the reference image used to predict the current block and information about the motion vector, is encoded by encoder 150 and sent to the video decoding device.
[0054] Various methods can be used to minimize the number of bits required to encode motion information.
[0055] In one example, when the reference image and motion vector of the current block are the same as those of neighboring blocks, motion information about the current block can be sent to the decoding device by encoding information that can be used to identify neighboring blocks. This method is called "merging mode".
[0056] In merge mode, the inter-frame predictor 124 can select a predetermined number of merge candidate blocks (hereinafter referred to as "merge candidates") from the neighboring blocks of the current block.
[0057] like Figure 3As shown, some or all of the left block L, top block A, top right block AR, bottom left block BL, and top left block AL adjacent to the current block in the current image can be used as neighboring blocks for deriving merge candidates. Additionally, blocks located in the reference image (which may be the same as or different from the reference image used to predict the current block) but not in the current image can be used as merge candidates. For example, co-located blocks of the current block in the reference image or blocks adjacent to co-located blocks can be further used as merge candidates.
[0058] The inter-frame predictor 124 uses neighboring blocks to construct a merge list including a predetermined number of merge candidates. The merge candidates to be used as motion information for the current block are included in the merge list, and merge index information for identifying the selected candidate is generated. The generated merge index information is encoded by the encoder 150 and sent to the video decoding device.
[0059] As another method for encoding motion information, motion vector difference (MVD) can be encoded.
[0060] In this method, the inter-frame predictor 124 uses the neighboring blocks of the current block to derive motion vector prediction (MVP) candidates for the motion vector of the current block. Figure 3 Some or all of the left block L, top block A, top right block AR, bottom left block BL, and top left block AL in the current image shown can be used as neighboring blocks for deriving MVP candidates. Additionally, blocks located in the reference image (which may be the same as or different from the reference image used to predict the current block) but not in the current image can be used as neighboring blocks for deriving MVP candidates. For example, co-located blocks of the current block in the reference image or blocks adjacent to co-located blocks can be used.
[0061] The inter-frame predictor 124 uses motion vectors from neighboring blocks to derive MVP candidates and uses these MVP candidates to determine the MVP of the motion vector of the current block. The inter-frame predictor calculates the motion vector difference (MVD) by subtracting the MVP from the motion vector of the current block.
[0062] An MVP can be obtained by applying a predefined function (e.g., the calculation of the median or mean) to the MVP candidate. In this case, the video decoding device is also aware of the predefined function. Since the neighboring blocks used to derive the MVP candidate are blocks that have already been encoded and decoded, the video decoding device already knows the motion vectors of the neighboring blocks. Therefore, the video encoding device 100 does not need to encode the information used to identify the MVP candidate. Therefore, in this case, information about the MVD and information about the reference image used to predict the current block are encoded.
[0063] In another implementation, the MVP can be determined by selecting any of the MVP candidates. In this case, the information used to identify the selected MVP candidate is additionally encoded along with information about the MVD and information about the reference image used to predict the current block.
[0064] Subtractor 130 subtracts the predicted block generated by intra-predictor 122 or inter-predictor 124 from the current block to generate a residual block.
[0065] Transformer 140 transforms the residual signal in the residual block, which is a value in the spatial domain, into transform coefficients in the frequency domain. Transformer 140 can use the size of the current block as a transform unit to transform the residual signal in the residual block, or it can divide the residual block into multiple smaller sub-blocks and transform the residual signal using transform units corresponding to the size of the sub-blocks. Various methods can exist for dividing the residual block into smaller sub-blocks. For example, the residual block can be divided into sub-blocks of the same predefined size, or it can be divided in the form of a quadtree (QT) with the residual block as the root node.
[0066] Quantizer 145 quantizes the transformation coefficients output from converter 140 and outputs the quantized transformation coefficients to encoder 150.
[0067] Encoder 150 uses an encoding scheme such as CABAC to encode the quantized transform coefficients to generate a bitstream. Encoder 150 can encode information related to block splitting, such as CTU size, MinQTSize, MaxBTSize, MaxBTDepth, MinBTSize, QT_split_flag, BT_split_flag, and splitting type, and the decoding device can split the blocks in the same way as the encoding device.
[0068] Encoder 150 encodes information about the prediction type, which indicates whether the current block is encoded via intra-frame prediction or inter-frame prediction, and encodes the intra-frame prediction information or inter-frame prediction information according to the prediction type.
[0069] When performing inter-frame prediction on the current block, encoder 150 encodes the syntax elements of the inter-frame prediction information. The syntax elements of the inter-frame prediction mode may include the following information.
[0070] (1) Mode information indicating whether the motion information of the current block is encoded in merge mode or MVD mode.
[0071] (2) Syntactic elements of motion information
[0072] When encoding motion information in a merge mode, encoder 150 will instruct which candidate among the merge candidates to select as the candidate for extracting motion information of the current block, and encode the merge index information into the syntax elements of the motion information.
[0073] On the other hand, when motion information is encoded according to the pattern used to encode MVD, information about MVD and information about the reference image are encoded as syntactic elements of the motion information. When the MVP is determined using a method that selects any one of multiple MVP candidates, the syntactic elements of the motion information may also include MVP identification information for identifying the selected candidate.
[0074] Inverse quantizer 160 inverse quantizes the quantized transform coefficients output from quantizer 145 to generate transform coefficients. Inverse transformer 165 transforms the transform coefficients output from inverse quantizer 160 from the frequency domain to the spatial domain, thus reconstructing the residual block.
[0075] Adder 170 adds the reconstructed residual block to the predicted block generated by predictor 120 to reconstruct the current block. When performing intra-frame prediction on blocks with subsequent sequences, pixels in the recovered current block can be used as reference pixels.
[0076] Filter unit 180 performs deblocking filtering on the boundaries between reconstructed blocks to remove block artifacts caused by block-based encoding / decoding, and stores the deblocked blocks in memory 190. When recovering all blocks in an image, the recovered image can be used as a reference image for inter-frame prediction of blocks in subsequent images to be encoded.
[0077] For reference, video encoding devices can use a skip mode to encode the current block. In skip mode, only the motion information of the current block is encoded, without encoding any other information about the current block, such as information about residual blocks. The merge index information mentioned above can be used as the motion information for the current block. When the current block has already been encoded in skip mode, the video decoding device sets the motion information of the merge candidates indicated by the merge index information decoded from the bitstream as the motion information for the current block. In skip mode, the prediction block predicted based on the motion information of the current block is reconstructed as the current block.
[0078] The difference between skip mode and merge mode, which encodes information about the remaining block and the motion information of the current block, is that no information other than the motion information of the current block is encoded in skip mode. However, the method for encoding the motion information of the current block in both skip and merge modes is the same; therefore, all the following descriptions of merge mode can be applied to skip mode in the same way.
[0079] Figure 4 This is a diagram illustrating a video encoding device 400 according to an embodiment of the present invention.
[0080] The video encoding device 400 according to an embodiment of the present invention may include a resolution determiner 410, a video encoder 420, and a resolution encoder 430.
[0081] The resolution determiner 410 determines the motion vector resolution used for motion estimation of the current CU. The motion vector resolution can be the smallest unit used to represent the motion vector. The motion vector resolution can indicate the resolution in the reference image used to compensate for the motion of the current CU; that is, it can indicate the pixels of the interpolated reference image. For example, when the motion vector resolution is 1 / 4 pixel, the reference image can be interpolated to a 1 / 4 pixel position, and the motion vector can be measured up to a 1 / 4 pixel unit. Here, the smallest unit used to determine the motion vector can be a fractional pixel such as 1 / 4 pixel or 1 / 2 pixel, or it can be an integer pixel unit such as 1 pixel, 2 pixels, 3 pixels, or 4 pixels.
[0082] The video encoder 420 estimates the motion in blocks (i.e., in units of CU) based on the determined motion vector resolution to determine the motion vector of the CU, and uses the determined motion vector to predict and encode the CU.
[0083] The resolution encoder 430 encodes information about the motion vector resolution used to predict the motion vector of the CU.
[0084] Here, the video encoder 420 can be implemented as described above. Figure 1 The video encoding device 100 is described.
[0085] The functions of the resolution determiner 410 can be included in the aforementioned functions of the predictor 120 in the video encoding device 100, and can be integrated into the predictor 120.
[0086] The functions of the resolution encoder 430 can be included in the aforementioned functions of the encoder 150 of the video encoding device 100, and can be integrated into the encoder 150.
[0087] Figure 5 This is a diagram illustrating the interpolation and motion compensation process performed by the inter-frame predictor 124 and the resolution of the motion vector.
[0088] Figure 5 Examples include pixels of a reference image stored in memory 190 and sub-pixels formed by interpolating an integer number of pixels from the reference image. For example... Figure 5As shown, when an integer number of pixels A1 to F6 of a reference image are filtered by an interpolation filter, for example, sub-pixels “a” to “s” can be generated, and when such interpolation is performed, the resolution of motion estimation and motion compensation can be increased by 2, 4 or more times compared to the resolution of integer pixels.
[0089] Motion estimation is the process of searching for the most similar part of the current CU from the interpolated reference image and outputting the corresponding block and the motion vector indicating the corresponding block. The motion vector generated in this process is encoded by encoder 150.
[0090] During motion estimation and motion compensation, when predicting image regions with minor motion, the motion vector can be represented in fractional pixels (1 / 2 pixel, 1 / 4 pixel, 1 / 8 pixel, or 1 / 16 pixel) as units, and when predicting image regions with large motion, the motion vector can be represented in units of one or more integer pixels (1 pixel, 2 pixels, 3 pixels, or 4 pixels).
[0091] Figure 6 It is a graph used to compare the degree of motion between two frames.
[0092] exist Figure 6 In the context of comparing a reference frame and the current frame regarding the motion of objects included within them, the relationship between these two frames is as follows: Figure 6 The object corresponding to the circle in the frame moves slightly, so the motion of the corresponding object can be estimated in fractional pixels. And because the object corresponding to the triangle has relatively large motion between these two frames, the motion can be estimated in integer pixels.
[0093] When the inter-frame prediction mode of the CU being encoded is merge mode, motion information is not directly signaled. Instead, the index value corresponding to the selected motion information candidate is signaled. Therefore, information about the motion vector resolution of the selected motion information candidate is not transmitted.
[0094] On the other hand, when the CU's inter-frame prediction mode is a mode that encodes MVD, MVD information is signaled. Therefore, MVD information can be represented more effectively in fractional pixels or integer pixels depending on the resolution of MVD.
[0095] Figure 7 This is a diagram illustrating an example of a resolution determiner 410 according to an embodiment.
[0096] The resolution determiner 410 may include a resolution mode determiner 710, an alternative resolution determiner 720, and an adaptive resolution determiner 730. In some embodiments, the resolution determiner 410 may be implemented with at least one component of the resolution mode determiner 710, the alternative resolution determiner 720, and the adaptive resolution determiner 730 omitted.
[0097] Resolution mode determiner 710 determines whether to activate adaptive motion vector resolution mode. For example, it can select whether to adaptively enable motion vector resolution relative to upper-layer image units included in multiple CUs. Here, upper-layer image units can be image sequences, pictures, slices, CTUs, etc. When the motion vector resolution of upper-layer image units is not adaptively enabled (i.e., when the corresponding mode is not adaptive motion vector resolution mode), a default motion vector resolution is applied to all CUs in the upper-layer image units. That is, a fixed default motion vector resolution such as 1 / 4 pixel can be applied to all CUs in the upper-layer image units. Here, the default motion vector resolution can be a predetermined specific motion vector resolution shared by the video encoding device and the video decoding device, or it can be a value determined by the video encoding device in the upper-layer image region and signaled to the video decoding device. On the other hand, when adaptive motion vector resolution mode is enabled for application, alternative resolution determiner 720 and adaptive resolution determiner 730, which will be described below, adaptively determine the motion vector resolution of each CU to be predicted inter-frame.
[0098] When the adaptive motion vector resolution mode is enabled for application, the alternative resolution determiner 720 determines an alternative resolution in addition to the default motion vector resolution. An alternative resolution can be applied to each unit of any of the sequences, images, slices, CTUs, and CUs. Alternative resolutions can be determined for individual image units that are the same as the image unit to which the adaptive motion vector resolution mode is applied. For example, when the adaptive motion vector resolution mode is applied at the SPS level, the alternative resolution can also be determined at the SPS level, and when the adaptive motion vector resolution mode is applied at the PPS or slice level, the alternative resolution can also be determined at the PPS or slice level. Alternatively, an alternative resolution can be determined for each image unit (e.g., slice, CTU, or CU) smaller than the image unit to which the adaptive motion vector resolution mode is applied. For example, when the adaptive motion vector resolution mode is applied at the SPS level, the alternative resolution can be determined at the PPS, slice, and CTU level, which are image units at a lower layer than the SPS level, and when the adaptive motion vector resolution mode is applied at the PPS level, the alternative resolution can be determined at the slice and CTU level, which are image units at a lower layer than the PPS level. Alternatively, an alternative resolution can be determined using the CU to be encoded as the unit.
[0099] The alternative resolution determiner 720 can select one of a number of motion vector resolution candidates as the alternative resolution.
[0100] The adaptive resolution determiner 730 can determine the motion vector resolution of the current CU. For example, the adaptive resolution determiner 730 can determine either the default motion vector resolution or the alternative resolution as the motion vector resolution of the current CU.
[0101] The resolution encoder 430 can generate and encode information about the motion vector resolution based on the information determined by the resolution determiner 410. Hereinafter, the method by which the resolution encoder 430 encodes motion vector resolution information is exemplified for both the first and second embodiments, assuming the motion vector resolution of the current CU is determined from a default motion vector resolution and an alternative resolution.
[0102] First Implementation Method
[0103] In the first embodiment, the image unit used to select whether to adaptively determine the motion vector resolution between the default motion vector resolution and the alternative resolution is the same as the image unit used to determine the alternative resolution, and both image units are larger than the CU.
[0104] When the resolution mode determiner 710 selects whether to adaptively enable motion vector resolution for each image sequence unit, the resolution encoder 430 can insert the Adaptive_MV_resolution_enabled_flag (i.e., first identification information) as an indication of whether to adaptively enable motion vector resolution into the sequence parameter set (SPS).
[0105] When the resolution mode determiner 710 selects whether to adaptively enable motion vector resolution for each picture unit, the resolution encoder 430 can insert the Adaptive_MV_resolution_enabled_flag, which is an indication of whether to adaptively enable motion vector resolution, into the picture parameter set (PPS).
[0106] When the resolution mode determiner 710 selects whether to adaptively enable motion vector resolution for each slice (or CTU) unit, the resolution encoder 430 may insert the Adaptive_MV_resolution_enabled_flag, which is a flag indicating whether to adaptively enable motion vector resolution, into the slice (or CTU) header.
[0107] When the resolution mode determiner 710 selects the adaptive motion vector resolution mode that adaptively enables motion vector resolution, it can set Adaptive_MV_resolution_enabled_flag=ON (e.g., ON=1). Otherwise, it can set Adaptive_MV_resolution_enabled_flag=OFF (e.g., in the case of ON=1 and OFF=0).
[0108] According to the first embodiment, the unit that determines the alternative resolution at the alternative resolution determiner 720 is the same as the unit that sets the Adaptive_MV_resolution_enabled_flag. When Adaptive_MV_resolution_enabled_flag=ON, the alternative resolution determiner 720 determines the alternative resolution, and the resolution encoder 430 generates alternative_mv_resolution information indicating the determined alternative resolution. The resolution encoder 430 encodes the alternative_mv_resolution information generated for each unit that is the same as the unit used to set the Adaptive_MV_resolution_enabled_flag.
[0109] When one of a plurality of predefined motion vector resolution candidates is selected as an alternative resolution, the resolution encoder 430 can generate information for identifying the alternative resolution selected from the plurality of predefined motion vector resolution candidates and encode it as alternative_mv_resolution information.
[0110] When the adaptive resolution determiner 730 determines the default motion vector resolution to be used as the motion vector resolution of the current CU, the resolution encoder 430 can generate an mv_resolution_flag (i.e., second identification information) indicating that the default motion vector resolution is used as the motion vector resolution of the current CU.
[0111] When the adaptive resolution determiner 730 determines an alternative resolution that is not the default motion vector resolution to be used as the motion vector resolution of the current CU, the resolution encoder 430 can generate and encode an mv_resolution_flag indicating that the alternative resolution is used as the motion vector resolution of the current CU.
[0112] Second Implementation Method
[0113] In the second embodiment, the image unit for selecting whether to adaptively determine the motion vector resolution between the default motion vector resolution and the alternative resolution is a higher-level image unit compared to the image unit for determining the alternative resolution, and the image unit for determining the alternative resolution is a higher-level image unit compared to the CU.
[0114] The first implementation is as follows: the image unit used to select whether to adaptively determine the motion vector resolution between the default motion vector resolution and the alternative resolution is the same as the image unit used to determine the alternative resolution, and both image units are larger than the CU.
[0115] When the resolution mode determiner 710 selects whether to adaptively enable motion vector resolution for each image sequence unit, the resolution encoder 430 can insert the Adaptive_MV_resolution_enabled_flag, which is a flag indicating whether to adaptively enable motion vector resolution, into the SPS.
[0116] When the resolution mode determiner 710 selects whether to adaptively enable motion vector resolution for each picture unit, the resolution encoder 430 can insert the Adaptive_MV_resolution_enabled_flag, which is a flag indicating whether to adaptively enable motion vector resolution, into the PPS.
[0117] Here, when the resolution mode determiner 710 selects the adaptive motion vector resolution mode (adaptive motion vector resolution enabled), Adaptive_MV_resolution_enabled_flag can be set to ON. Otherwise, Adaptive_MV_resolution_enabled_flag can be set to OFF.
[0118] The cell for determining the alternative resolution at the alternative resolution determiner 720 can be determined as an image cell (e.g., a slice or CTU) that is smaller than the image cell with the Adaptive_MV_resolution_enabled_flag set but larger than the CU. In this case, the resolution encoder 430 can generate and encode alternative_mv_resolution information indicating the alternative resolution for each slice or CTU.
[0119] When one of a plurality of predefined motion vector resolution candidates is selected as an alternative resolution, the resolution encoder 430 can generate information for identifying the alternative resolution selected from the plurality of predefined motion vector resolution candidates and encode it as alternative_mv_resolution information.
[0120] When the value of the alternative_mv_resolution information indicates 0, motion vector resolution of all CUs in the corresponding slice or CTU is enabled non-adaptively.
[0121] When motion vector resolution is adaptively enabled, the resolution encoder 430 can generate Alternative_enabled_flag information for each slice or CTU as a flag indicating whether an alternative resolution is used, and can encode the Alternative_enabled_flag information.
[0122] Here, when using an alternative resolution, alternative_mv_resolution information indicating the alternative resolution can be generated for each slice or CTU and encoded.
[0123] When the adaptive resolution determiner 730 determines that the default motion vector resolution is to be used as the motion vector resolution of the current CU, the resolution encoder 430 can generate and encode an mv_resolution_flag indicating that the default motion vector resolution is used as the motion vector resolution of the current CU.
[0124] When the adaptive resolution determiner 730 determines that an alternative resolution that is not the default motion vector resolution is used as the motion vector resolution of the current CU, the resolution encoder 430 can generate an mv_resolution_flag indicating that the alternative resolution is used as the motion vector resolution of the current CU and can encode information about the mv_resolution_flag.
[0125] Third Implementation Method
[0126] In the second embodiment, the image unit used to adaptively determine the motion vector resolution between the default motion vector resolution and the alternative resolution is an image unit of a higher layer than the image unit used to determine the alternative resolution, and the image unit used to determine the alternative resolution is a CU unit.
[0127] When the resolution mode determiner 710 selects whether to adaptively enable motion vector resolution for each image sequence unit, each picture unit, each slice unit, or each CTU unit, the resolution encoder 430 may insert the Adaptive_MV_resolution_enabled_flag, which serves as an indication of whether to adaptively enable motion vector resolution, into the SPS, PPS, slice header, or CTU header.
[0128] As in the first and second embodiments, the Adaptive_MV_resolution_enabled_flag can be set to ON or OFF depending on the selection result of whether to adaptively enable motion vector resolution.
[0129] When the resolution mode determiner 710 selects the adaptive motion vector resolution mode that adaptively enables motion vector resolution, if the default motion vector resolution is selected as the motion vector resolution of the current CU, the resolution encoder 430 can generate and encode an mv_resolution_flag indicating that the default motion vector resolution is used as the motion vector resolution of the current CU.
[0130] According to the third embodiment, the unit used by the alternative resolution determiner 720 to determine the alternative resolution may be the same CU unit as the unit used to determine the motion vector resolution.
[0131] When an alternative resolution that is not the default motion vector resolution is used as the motion vector resolution of the current CU, the resolution encoder 430 can generate an mv_resolution_flag indicating that the alternative resolution is used as the motion vector resolution of the current CU, can generate alternative_mv_resolution information about the alternative resolution determined by the alternative resolution determiner 720, and can encode the information about mv_resolution_flag and alternative_mv_resolution.
[0132] When one of a plurality of predefined motion vector resolution candidates is selected as an alternative resolution, the resolution encoder 430 can encode information used to identify the alternative resolution selected from the plurality of predefined motion vector resolution candidates into alternative_mv_resolution information.
[0133] The adaptive resolution determiner 730 can select any one of multiple motion vector resolution candidates as the motion vector resolution of the current CU, instead of selecting either the default motion vector resolution or the alternative resolution. In this case, in order to effectively encode the determined motion vector resolution information of the current CU, the resolution encoder 430 can encode the motion vector resolution information of the current CU as the difference between the motion vector resolution of the current CU and the alternative resolution, or the difference between the motion vector resolution of the current CU and the motion vector resolution of the previous CU, instead of encoding the motion vector resolution of the current CU itself.
[0134] Figure 8 This is a diagram illustrating an example of a resolution encoder 430 when the motion vector resolution information of the current CU is encoded as a resolution difference.
[0135] like Figure 8 As shown, the resolution encoder 430 may include an encoding information generator 810 and a resolution difference calculator 820. Detailed operation will now be described with reference to the fourth embodiment.
[0136] Fourth Implementation Method
[0137] When the resolution mode determiner 710 adaptively enables motion vector resolution in units of sequence, picture, slice, or CTU, the encoded information generator 810 can set the Adaptive_MV_resolution_enabled_flag to ON for each sequence, picture, slice, or CTU unit, which is a higher image unit.
[0138] The encoding information generator 810 can check for each CU in a higher-level image unit whether the default motion vector resolution is used as the motion vector resolution of the corresponding CU. When the default motion vector resolution is used as the motion vector resolution of the current CU, the encoding information generator 810 can set the mv_resolution_flag corresponding to the current CU to OFF. When the default motion vector resolution is not used as the motion vector resolution of the current CU and any one of the multiple motion vector resolution candidates is used as the motion vector resolution of the current CU, the encoding information generator 810 can set the mv_resolution_flag corresponding to the current CU to ON.
[0139] When the alternative resolution determiner 720 determines the alternative resolution values for each image unit that is the same as the unit used to set the Adaptive_MV_resolution_enabled_flag, the encoding information generator 810 can encode the determined alternative resolution into alternative_mv_resolution information for each image unit that is the same as the unit used to set the Adaptive_MV_resolution_enabled_flag.
[0140] As mentioned above, the unit used to determine the alternative resolution is not limited to determining each individual image unit that is the same as the unit used to set the Adaptive_MV_resolution_enabled_flag, but can be determined for each CU unit or for each image unit that is smaller than the unit used to set the Adaptive_MV_resolution_enabled_flag but larger than the CU unit. However, since a description of this has already been given above, a detailed description of this is omitted.
[0141] When any one of the multiple motion vector resolution candidates is selected as the motion vector resolution of the current CU, the resolution difference calculator 820 can calculate a resolution difference (e.g., a value obtained by subtracting the motion vector resolution of the previous CU from the motion vector resolution of the current CU) as an element included in the information about the motion vector resolution of the current CU.
[0142] However, when the current CU is the first CU in the coding order among the CUs in the upper-layer image unit, the resolution difference calculator 820 can determine the motion vector resolution of the current CU as the resolution difference information, or it can determine the alternative resolution determined by the alternative resolution determiner 720 as the resolution difference information.
[0143] When any one of the multiple motion vector resolution candidates is selected as the motion vector resolution of the current CU, the resolution difference calculator 820 can calculate a resolution difference (e.g., a value obtained by subtracting alternative_mv_resolution from the motion vector resolution of the current CU) as an element included in the information about the motion vector resolution of the current CU.
[0144] The resolution difference information determined by the resolution difference calculator 820 can be stored as mv_resolution_delta.
[0145] When the motion vector resolution of the current CU is described as the mv_resolution_delta value, there is no need to generate an alternative resolution; therefore, the operation of the alternative resolution determiner 720 can be omitted.
[0146] The encoding information generator 810 can generate and encode information about the motion vector resolution of the current CU based on the results of the resolution mode determiner 710 and the adaptive resolution determiner 730. The encoding information generator 810 can encode the Adaptive_MV_resolution_enabled_flag to ON or OFF depending on whether the resolution mode determiner 710 adaptively enables the motion vector resolution of the CUs included in the upper-layer image unit.
[0147] When `Adaptive_MV_resolution_enabled_flag` is ON, the adaptive resolution determiner 730 selects whether to use the default motion vector resolution as the current CU's motion vector resolution, or to determine any one of the multiple motion vector resolution candidates as the current CU's motion vector resolution. The encoding information generator 810 encodes `mv_resolution_flag` according to the selection. When `Adaptive_MV_resolution_enabled_flag` is OFF, the encoding information generator 810 does not encode `mv_resolution_flag`.
[0148] When mv_resolution_flag is ON (i.e., when any of the multiple motion vector resolution candidates is used as the motion vector resolution of the current CU), the encoding information generator 810 can encode mv_resolution_delta as information about the resolution difference calculated by the resolution difference calculator 820. When mv_resolution_flag is OFF (i.e., when the default motion vector resolution is used as the motion vector resolution of the current CU), the encoding information generator 810 can choose not to encode mv_resolution_delta.
[0149] The resolution encoder 430 can represent the resolution difference as a resolution scaling factor obtained through division, rather than a value obtained through subtraction. Furthermore, the scaling factor can be represented on a logarithmic scale, and its operation will be described in detail with reference to the fifth embodiment.
[0150] Fifth Implementation Method
[0151] Figure 9 This is a diagram illustrating an example of a resolution encoder 430 that represents the current CU's motion vector resolution as a resolution scaling factor rather than a resolution difference.
[0152] like Figure 9 As shown, the resolution encoder 430 may include an encoding information generator 910 and a resolution ratio information generator 920. Figure 9 The resolution ratio information generator 920 can replace Figure 8 The resolution difference calculator 820, and Figure 9 The encoded information generator 910 can replace Figure 8 The encoded information generator 810.
[0153] The difference between the resolution difference calculator 820 and the resolution scale information generator 920 is that the resolution difference calculator 820 calculates the resolution difference and generates mv_resolution_delta as information about the resolution difference, while the resolution scale information generator 920 calculates the resolution scale factor and generates mv_resolution_scale as information about the resolution scale factor.
[0154] For example, the resolution ratio information generator 920 can calculate the ratio between the motion vector resolution of the current CU and the motion vector resolution of the previous CU (e.g., by dividing the motion vector resolution of the current CU by the motion vector resolution of the previous CU) as an element included in the information about the motion vector resolution of the current CU.
[0155] However, when the current CU is the first CU in the coding order among the CUs in the upper-layer image unit, the resolution scaling information generator 920 can determine the motion vector resolution of the current CU as the resolution scaling factor information, or it can determine the alternative resolution determined by the alternative resolution determiner 720 as the resolution scaling factor information.
[0156] The resolution scaling information generator 920 can calculate a resolution scaling factor (i.e., a value obtained by dividing the current CU's motion vector resolution by the alternative_mv_resolution) as an element included in the information about the current CU's motion vector resolution, which is the ratio between the current CU's motion vector resolution and the alternative_mv_resolution.
[0157] The resolution scaling factor information determined by the resolution scaling information generator 920 can be stored as mv_resolution_scale.
[0158] Apart from Figure 8 The encoding information generator 810 encodes mv_resolution_delta, instead of the ground Figure 9 In addition to encoding information about the resolution scaling factor (mv_resolution_scale) in the encoding information generator 910, Figure 8 The remaining operations of the encoded information generator 810 are the same as those of the other generators. Figure 9 The remaining operations of the encoding information generator 910 can be the same. The encoding information generator 910 encodes information about the resolution scaling factor (mv_resolution_scale). Except for encoding mv_resolution_scale instead of mv_resolution_delta, the operations of the encoding information generator 910 can be the same as... Figure 8 The operation is the same as that of the encoded information generator 810.
[0159] In the above embodiments of the video encoding device, the unit used to determine the block motion vector resolution is described as a CU, but it is not limited to this, and in some embodiments, it may be a CTU. When the unit used to determine the block motion vector resolution is a CTU, all CUs included in the CTU can have the same motion vector resolution value. In addition, all CUs encoded in MVP mode among the CUs included in the corresponding CTU can have the same motion vector resolution value as the motion vector resolution of the corresponding CTU.
[0160] The following text will describe video decoding devices.
[0161] Figure 10 This is a schematic diagram of a common video decoding device.
[0162] The video decoding device 1000 may include a decoder 1010, an inverse quantizer 1020, an inverse transformer 1030, a predictor 1040, an adder 1050, a filter unit 1060, and a memory 1070. (Similar to...) Figure 1 Similar to video encoding devices, each component of a video encoding device can be implemented as a hardware chip or as software, enabling a microprocessor to execute the software function corresponding to each component.
[0163] Decoder 1010 decodes the bitstream received from the video encoding device, thereby extracting information related to block separation to determine the current block to be decoded and extracting prediction information needed to reconstruct the current block, information about the remaining blocks, etc.
[0164] The decoder 1010 can extract information about the size of the CTU from the sequence parameter set (SPS) or picture parameter set (PPS) to determine the size of the CTU, and can separate the picture into CTUs of a defined size. Furthermore, the decoder 1010 can set the CTU as the top level (i.e., the root node) of the tree structure, and can extract the CTU's separation information to separate the CTU using the tree structure. For example, when separating the CTU using a QTBT structure, the first flag (QT_split_flag) related to the separation of QT can be extracted, and then each node can be separated into four nodes at the lower level. Additionally, for the nodes corresponding to the leaf nodes of QT, the second flag (BT_split_flag) related to the separation of BT and the separation type information can be extracted, and the corresponding leaf nodes can be separated in the BT structure.
[0165] As Figure 2 In the example of a block-splitting structure, the `QT_split_flag` corresponding to the topmost node of the QTBT structure is extracted. The extracted `QT_split_flag` has a value of 1, so the topmost node is split into four nodes in the lower layer (layer 1 of QT). Additionally, the `QT_split_flag` of the first node of layer 1 is extracted. The extracted `QT_split_flag` has a value of 0, so the first node of layer 1 is no longer split into a QT structure.
[0166] Since the first node of layer 1 in QT is a leaf node of QT, this operation is performed before the BT that uses the first node of layer 1 in QT as the root node of the BT. The BT_split_flag corresponding to the root node of the BT, i.e., "(layer 0)", is extracted. Since BT_split_flag is 1, the root node of the BT is split into two nodes of "(layer 1)". Since the root node of the BT is split, separation type information indicating whether the block corresponding to the root node of the BT is vertically split or horizontally classified is extracted. Since the separation type information is 1, the block corresponding to the root node of the BT is vertically split. Then, the decoder 1010 extracts the BT_split_flag of the first node of the split "(layer 1)" from the root node of the BT. Since BT_split_flag is 1, separation type information about the block of the first node of "(layer 1)" is extracted. Since the separation type information about the block of the first node of "(layer 1)" is 1, the block of the first node of "(layer 1)" is vertically split. Then, extract the BT_split_flag of the second node "(layer 1)" separated from the root node of BT. Since BT_split_flag is 0, the node is not further separated by BT.
[0167] In this way, decoder 1010 recursively extracts the QT_split_flag and separates the CTU according to the QT structure. The decoder extracts the BT_split_flag of the leaf nodes of the QT. When the BT_split_flag indicates separation, the separation type information is extracted. In this way, decoder 1010 can identify when the CTU is separated into... Figure 2 The structure shown in (a).
[0168] When information such as MinQTSize, MaxBTSize, MaxBTDepth, and MinBTSize is additionally defined in SPS or PPS, decoder 1010 can extract the additional information and use the additional information to extract separation information about QT and BT.
[0169] For example, blocks in the QT with a size equal to MinQTSize are not further split. Therefore, the decoder 1010 does not extract the QT-related split information (QT_split_flag) for the corresponding block from the bitstream (i.e., the QT_split_flag for the corresponding block does not exist in the bitstream) and automatically sets this value to 0. Additionally, blocks in the QT with a size larger than MaxBTSize do not have a BT. Therefore, the decoder 1010 does not extract the BT split flag for leaf nodes with blocks larger than MaxBTSize in the QT and automatically sets the BT split flag to 0. Furthermore, when the depth of the corresponding node in the BT reaches MaxBTDepth, the node's block is not further split. Therefore, the BT split flag for the node is not extracted from the bitstream, and the value of this BT split flag is automatically set to 0. Additionally, blocks in the BT with a size equal to MinBTSize are not further split. Therefore, the decoder 1010 does not extract the BT split flag for blocks with a size equal to MinBTSize from the bitstream and automatically sets the flag value to 0.
[0170] When determining the current block to be decoded using the split tree structure, the decoder 1010 extracts information about the prediction type that indicates whether the current block is predicted intra-frame or inter-frame.
[0171] When the prediction type information indicates inter-frame prediction, the decoder 1010 can extract syntax elements of intra-frame prediction information. First, it extracts mode information indicating the mode used when encoding motion information for the current block among various coding modes. Here, the various coding modes may include merging mode and motion vector difference (MVD) coding mode. When the mode information indicates merging mode, the decoder 1010 extracts merging index information indicating the candidate from which the motion vectors of the current block are derived as syntax elements of motion information. On the other hand, when the mode information indicates MVD coding mode, the decoder 1010 extracts information about MVD and information about the reference image referenced by the motion vectors of the current block as syntax elements of motion vectors. When the video encoding device uses any one of multiple motion vector prediction quantity (MVP) candidates as the MVP of the current block, MVP identification information can be included in the bitstream. Therefore, in this case, MVP identification information, along with information about MVD and information about the reference image, are extracted as syntax elements of motion vectors.
[0172] Decoder 1010 extracts information about the transform coefficients of the quantized current block as information about the residual signal.
[0173] The inverse quantizer 1020 inverse quantizes the quantized transform coefficients, and the inverse transformer 1030 inverse transforms the inverse quantized transform coefficients from the frequency domain to the spatial domain to reconstruct the residual signal, thereby generating the residual block of the current block.
[0174] Predictor 1040 may include intra-predictor 1042 and inter-predictor 1044. Intra-predictor 1042 is activated when the prediction type of the current block is intra-prediction, and inter-predictor 1044 is activated when the prediction type of the current block is inter-prediction.
[0175] Intra-predictor 1042 determines the intra-prediction mode of the current block among multiple intra-prediction modes based on the syntax elements of the intra-prediction mode extracted from decoder 1010, and uses the neighboring reference pixels of the current block to predict the current block according to the intra-prediction mode.
[0176] The inter-frame predictor 1044 uses the syntax elements of the inter-frame prediction information extracted from the decoder 1010 to determine motion information about the current block, and uses the determined motion information to predict the current block.
[0177] First, the inter-frame predictor 1044 examines the inter-frame prediction mode information extracted from the decoder 1010. When the mode information indicates a merging mode, the inter-frame predictor 1044 uses the neighboring blocks of the current block to construct a merge list including a predetermined number of merge candidates. The method by which the inter-frame predictor 1044 constructs the merge list is the same as that of the inter-frame predictor 124 of the video coding device. Additionally, using merge index information received from the decoder 1010, a merge candidate is selected from the merge candidates in the merge list. The motion information of the selected merge candidate (i.e., the motion vector and reference image of the merge candidate) is set as the motion vector and reference image of the current block.
[0178] On the other hand, when the mode information indicates the MVD encoding mode, the inter-frame predictor 1044 uses the motion vectors of the neighboring blocks of the current block to derive MVP candidates, and uses the MVP candidates to determine the MVP of the motion vector of the current block. The method by which the inter-frame predictor 1044 derives the MVP candidates is the same as that of the inter-frame predictor 124 of the video encoding device. When the video encoding device uses any one of multiple MVP candidates as the MVP of the current block, the syntax elements of the motion information include MVP identification information. Therefore, in this case, the inter-frame predictor 1044 can select the candidate indicated by the MVP identification information as the MVP of the current block from the MVP candidates. However, when the video encoding device determines the MVP by applying a predefined function to multiple MVP candidates, the inter-frame predictor 1044 can apply the same function as the video encoding device to determine the MVP. Once the MVP of the current block is determined, the inter-frame predictor 1044 adds the MVP to the MVD extracted from the decoder 1010 to derive the motion vector of the current block. In addition, the inter-frame predictor 1044 uses information about the reference picture extracted from the decoder 1010 to determine the reference picture referenced by the motion vector of the current block.
[0179] When the motion vector and reference picture of the current block are determined in merge mode or MVD coding mode, the inter-frame predictor 1044 uses the block in the reference picture at the position indicated by the motion vector to generate the predicted block of the current block.
[0180] Adder 1050 adds the residual block output from the inverse transform to the predicted block output from the inter-predictor or intra-predictor to reconstruct the current block. Pixels in the reconstructed current block can be used as reference pixels for intra-prediction of blocks to be decoded later.
[0181] The filter unit 1060 performs deblocking filtering on the boundaries between the reconstructed blocks to remove block artifacts caused by block-by-block coding and stores the deblocked blocks in the memory 1070. When all blocks in an image are reconstructed, the reconstructed image can be used as a reference image for inter-frame prediction of blocks in subsequent images to be encoded.
[0182] Figure 11 This is a diagram illustrating a video decoding device 1100 according to an embodiment of the present invention.
[0183] The video decoding device 1100 according to an embodiment of the present invention may include a motion vector resolution decoder 1110 and a video decoder 1120.
[0184] The motion vector resolution decoder 1110 parses information about the motion vector resolution of the current CU from the bitstream and determines the motion vector resolution used to estimate the motion of the current CU based on the parsed motion vector resolution information.
[0185] The video decoder 1120 uses the determined motion vector of the current CU to predict and decode the current CU based on the motion vector resolution of the current CU.
[0186] Here, the video decoder 1120 can be implemented as described above. Figure 10 The video decoding device 1000 is described.
[0187] The functions of the motion vector resolution decoder 1110 can be included in the functions of the decoder 1010 mentioned above in the video decoding device 1000, and can be integrated into the decoder 1010.
[0188] Figure 12 This is a flowchart illustrating a method for video decoding by a video decoding device 1100 according to a first embodiment of the present invention.
[0189] like Figure 12 As shown, in the video decoding apparatus 1100 according to the first embodiment of the present invention, the motion vector resolution decoder 1110 parses the Adaptive_MV_resolution_enabled_flag (i.e., the first identification information) from the bitstream (S1210). The Adaptive_MV_resolution_enabled_flag refers to identification information indicating whether motion vector resolution is adaptively enabled, and can be determined from at least one image unit among image sequences, pictures, slices, and CTUs, which are upper-layer image units. The Adaptive_MV_resolution_enabled_flag can be parsed from the bitstream header of at least one upper-layer image unit of the image sequence, picture, slice, and CTU.
[0190] After parsing Adaptive_MV_resolution_enabled_flag, the motion vector resolution decoder 1110 checks whether Adaptive_MV_resolution_enabled_flag indicates that the motion vector resolution of the CU in the upper-layer picture unit is adaptively enabled (i.e., Adaptive_MV_resolution_enabled_flag is ON) or indicates that the default motion vector resolution is used as the motion vector resolution of the CU in the upper-layer picture unit (i.e., Adaptive_MV_resolution_enabled_flag is OFF) (S1220).
[0191] As a result of the check in operation S1220, when Adaptive_MV_resolution_enabled_flag is ON, the motion vector resolution decoder 1110 parses alternative_mv_resolution as information about the alternative resolution from the bitstream (S1230). Here, alternative_mv_resolution can be parsed for each individual image unit that is the same as the image unit used for Adaptive_MV_resolution_enabled_flag, or alternative_mv_resolution can be parsed from the bitstream of each image unit smaller than the image unit used for Adaptive_MV_resolution_enabled_flag. Alternatively, alternative_mv_resolution can be parsed for each CU in the image unit used for Adaptive_MV_resolution_enabled_flag.
[0192] After operation S1230, the motion vector resolution decoder 1110 determines the motion vector resolution of the current CU as the encoding target based on whether the current CU's encoding mode is a mode used for encoding MVD (S1240). When sending information about Adaptive_MV_resolution_enabled_flag and alternative resolution in the bitstream for each upper-layer picture unit, the motion vector resolution can also be adaptively determined for each CU in the upper-layer picture unit.
[0193] When information about the Adaptive_MV_resolution_enabled_flag is sent for each upper-layer image unit in an image sequence and picture, and alternative_mv_resolution is sent in the bitstream for each slice (or CTU) of an image unit smaller than the upper-layer image unit, the motion vector resolution can also be adaptively determined for each CU in the slice (or CTU).
[0194] When it is detected that Adaptive_MV_resolution_enabled_flag is OFF in operation S1220, the motion vector resolution decoder 1110 performs operation S1240 to determine the motion vector resolution of the current CU based on whether the current CU's encoding mode is a mode used for encoding MVD.
[0195] Here, operation S1240 may include operations S1241 to S1246.
[0196] After operation S1230, the motion vector resolution decoder 1110 can parse the encoding mode of the current CU from the bit stream and check whether the encoding mode of the current CU is the mode of encoding MVD using MVP (i.e., MVP mode) (S1241).
[0197] When it is detected in operation S1241 that the current CU's encoding mode is MVP mode, the motion vector resolution decoder 1110 can check whether Adaptive_MV_resolution_enabled_flag indicates that the motion vector resolution of the CU in the upper-layer picture unit is adaptively enabled (i.e., Adaptive_MV_resolution_enabled_flag is ON) or indicates that the default motion vector resolution is used as the motion vector resolution of the CU in the upper-layer picture unit (i.e., Adaptive_MV_resolution_enabled_flag is OFF) (S1242).
[0198] When the Adaptive_MV_resolution_enabled_flag is checked to be ON in operation S1242, the motion vector resolution decoder 1110 can parse the mv_resolution_flag (i.e., the second identification information) (S1243) from the bitstream, which indicates which of the default motion vector resolution and the alternative resolution is used as the motion vector resolution of the current CU, and then the subsequent operation of S1244 can be performed.
[0199] Here, although mv_resolution_flag is described as being sent on a CU-by-CU basis, in some implementations, mv_resolution_flag can be parsed on a CTU-by-CTU basis. It can check whether the CU is in MVP mode for each CU in the corresponding CTU, and when the corresponding CU is in MVP mode, the subsequent operation of S1244 can be executed.
[0200] After parsing out mv_resolution_flag, the motion vector resolution decoder 1110 can check the value of mv_resolution_flag (S1244).
[0201] When the mv_resolution_flag indicator is detected in operation S1244 as indicating that the alternative resolution is used as the motion vector resolution of the current CU (i.e., when mv_resolution_flag is ON), the motion vector resolution decoder 1110 can determine the alternative resolution as the motion vector resolution of the current CU (S1245).
[0202] When the mv_resolution_flag indicates that the default motion vector resolution is used as the motion vector resolution of the current CU in operation S1244 (i.e., when mv_resolution_flag is OFF), the motion vector resolution decoder 1110 can determine that the default motion vector resolution is the motion vector resolution of the current CU (S1246).
[0203] When it is detected that Adaptive_MV_resolution_enabled_flag is OFF in operation S1242, the motion vector resolution decoder 1110 can determine the default motion vector resolution as the motion vector resolution of the current CU (S1246).
[0204] For example, when the Adaptive_MV_resolution_enabled_flag indicating whether to adaptively enable motion vector resolution and the alternative_mv_resolution syntax indicating alternative resolution are located in the SPS, it can be determined whether to apply the method according to the invention for each image sequence unit.
[0205] For example, when `Adaptive_MV_resolution_enabled_flag` in the SPS is ON, the SPS's `alternative_mv_resolution` value (i.e., the alternative resolution) is 4 pixels, and the default motion vector resolution is 1 / 4 pixel. The motion vector resolution of all CUs (Centers) in the image sequence referenced by the SPS, which are the encoding targets, can be determined to be either 1 / 4 pixel or 4 pixels. In other words, when `mv_resolution_flag`, which is part of the header information of the current CU, is OFF, the motion vector resolution of the current CU can be determined to be 1 / 4 pixel, corresponding to the default motion vector resolution; and when `mv_resolution_flag` is ON, the motion vector resolution of the current CU can be determined to be 4 pixels, corresponding to the alternative resolution.
[0206] When the Adaptive_MV_resolution_enabled_flag and alternative_mv_resolution syntax are located in the PPS (or slice header), it can be determined whether the method according to the invention has been applied on a per-picture (or per-slice) basis.
[0207] For example, when the `Adaptive_MV_resolution_enabled_flag` in the PPS is ON, the `alternative_mv_resolution` value (i.e., the alternative resolution) in the PPS is 4 pixels, and the default motion vector resolution is 1 / 4 pixel, the motion vector resolution of all CUs (Cells) that are encoded targets in the image (or slice) referenced to the PPS (or slice header) can be determined to be either 1 / 4 pixel or 4 pixels. In other words, when the `mv_resolution_flag` in the header information of the current CU is OFF, the motion vector resolution of the current CU can be determined to be 1 / 4 pixel, corresponding to the default motion vector resolution, and when the `mv_resolution_flag` of the current CU is ON, the motion vector resolution of the current CU can be determined to be 4 pixels, corresponding to the alternative resolution.
[0208] When the `Adaptive_MV_resolution_enabled_flag` in the SPS (or PPS) is ON, and the `alternative_mv_resolution` value in the header of a slice (or CTU) that is a smaller image unit than the image sequence (or picture) is 4 pixels, and the default motion vector resolution is 1 / 4 pixel, the motion vector resolution of all CUs (Copies of Units) that are the encoding targets in the corresponding slice (or CTU) can be determined as either 1 / 4 pixel corresponding to the default motion vector resolution or 4 pixels corresponding to the alternative resolution. Therefore, the motion vector of the current CU can be represented with a resolution of 1 / 4 pixel or 4 pixels. In other words, when the `mv_resolution_flag` in the header information of the current CU is 0 (i.e., OFF), the motion vector of the current CU is represented with a resolution of 1 / 4 pixel, and when the `mv_resolution_flag` of the current CU is ON, the motion vector of the current CU is represented with a resolution of 4 pixels.
[0209] When the Adaptive_MV_resolution_enabled_flag is ON in the SPS (or PPS), and the alternative_mv_resolution value in the header of a slice (or CTU) that is a smaller image unit than the image sequence (or picture) is 0, and the default motion vector resolution is 1 / 4 pixel, the motion vector resolution of all CUs (CUs) that are the encoding targets in the corresponding slice (or CTU) can be determined to be 1 / 4 pixel, corresponding to the default motion vector resolution. Here, the mv_resolution_flag, which is part of the CU header information, may not be needed.
[0210] When `Adaptive_MV_resolution_enabled_flag` is ON in SPS (or PPS), the motion vector resolution of all CUs (CUs) targeted for encoding in the corresponding slice (or CTU) can be determined based on the value of `Alternative_enabled_flag` in the header of a slice (or CTU) of image units smaller than the image sequence (or picture). For example, when `Alternative_enabled_flag` is OFF and the default motion vector resolution is 1 / 4 pixel, the motion vector resolution of all CUs in the corresponding slice (or CTU) can be represented as 1 / 4 pixel, corresponding to the default motion vector resolution, and `mv_resolution_flag`, which is the header information of the CUs targeted for encoding, may not be needed. On the other hand, when `Alternative_enabled_flag` is ON, `alternative_mv_resolution` is 4 pixels, and the default motion vector resolution is 1 / 4 pixel, the motion vector resolution of all CUs in the corresponding slice (or CTU) can be determined as either 1 / 4 pixel, corresponding to the default motion vector resolution, or 4 pixels, corresponding to the alternative resolution. In other words, when the current CU's mv_resolution_flag is 0 (i.e., OFF), the motion vector of the current CU can be represented with a resolution of 1 / 4 pixel, while when the current CU's mv_resolution_flag is ON, the motion vector of the current CU can be represented with a resolution of 4 pixels.
[0211] Figure 13 This is a diagram illustrating an example of adaptive resolution determination.
[0212] When the Adaptive_MV_resolution_enabled_flag in the SPS header is ON, the alternative_mv_resolution in the header of slice #0 is 2 pixels, and the default motion vector resolution (default MV resolution) is 1 / 4 pixel, the motion vector resolution of the current CU, including the circle in slice #0, can be determined as either 1 / 4 pixel corresponding to the default motion vector resolution or 2 pixels corresponding to the alternative resolution. In this case, when mv_resolution_flag, which is part of the header information for the current CU, is OFF, the motion vector of the current CU is represented in 1 / 4 pixel units corresponding to the default motion vector resolution; and when mv_resolution_flag is ON, the motion vector of the current CU is represented in 2 pixel units corresponding to the alternative_mv_resolution.
[0213] When the alternative_mv_resolution of the header of slice #1 is 4 pixels, the motion vector resolution of the current CU, including the triangle in slice #1, can be determined as 1 / 4 pixel corresponding to the default motion vector resolution or 4 pixels corresponding to the alternative resolution. In this case, when mv_resolution_flag, which is part of the header information of the current CU, is OFF, the motion vector of the current CU is represented in 1 / 4 pixel units corresponding to the default motion vector resolution; and when mv_resolution_flag of the current CU is ON, the motion vector of the current CU is represented in 4 pixel units corresponding to the alternative resolution.
[0214] After operating on S1245 or S1246, the video decoder 1120 can use the MVP to derive the motion vector of the current block (S1250).
[0215] Here, operation S1250 may include operations S1251 to S1255.
[0216] In operation S1251, the video decoder 1120 can deduce MVP candidates and can parse information (mvp_idx) from the bitstream used to identify the MVP of the current CU from the MVP candidates. Here, neighboring blocks used for MVP candidates can be... Figure 3 Some or all of the left block L, top block A, top right block AR, bottom left block BL, and top left block AL that are adjacent to the current CU in the current image shown.
[0217] The video decoder 1120 can check whether the motion vector resolution of the block corresponding to mvp_idx is the same as the motion vector resolution of the current CU (S1252).
[0218] When the motion vector resolution of the block corresponding to mvp_idx is found to be the same as the motion vector resolution of the current CU, the video decoder 1120 can decode the MVD from the bitstream (S1254). When the motion vector resolution of the block corresponding to mvp_idx is found to be different from the motion vector resolution of the current CU, the video decoder 1120 can scale the MVP of the current block so that the resolution of the MVP is the same as the motion vector resolution of the current CU (S1253), and can decode the MVD from the bitstream (S1254).
[0219] The video decoder 1120 adds the MVD parsed from the bitstream to the MVP to generate the motion vector of the current CU (S1255).
[0220] For example, when the current CU's motion vector resolution is 2 pixels, the motion vector resolution of the block corresponding to mvp_idx is 1 / 4 pixel, and the motion vector of the block corresponding to mvp_idx is set to 3, the actual motion vector of the block corresponding to mvp_idx corresponds to 0.75. When scaling is performed based on a 2-pixel motion vector resolution corresponding to the current CU's motion vector resolution, the actual motion vector of the block corresponding to mvp_idx is converted to 0. This conversion can be expressed according to Equation 1 below.
[0221] [Formula 1]
[0222] MV'=Round(MV×neighbor_MV_Resol / curr_MV_Resol)
[0223] Here, MV represents the motion vector of the block corresponding to mvp_idx, neighboring_MV_resol represents the motion vector resolution of the block corresponding to mvp_idx, current_MV_resol represents the motion vector resolution of the current CU, MV' is the scaled motion vector, and Round represents rounding operation.
[0224] For each of the x and y components of the motion vector, Adaptive_MV_resolution_enabled_flag, mv_resolution_flag, alternative_mv_resolution, etc., can be separate, and the motion vector resolution of the CU can be calculated separately for each of the x and y components according to Equation 2 below.
[0225] [Equation 2]
[0226] MV x =Round(MV x ×neighbor_MV x _Resol / curr_MVx_Resol)
[0227] MV y =Round(MV y ×neighbor_MV y _Resol / curr_MV y _Resol)
[0228] As a result of the check in operation S1241, when it is found that the encoding mode of the current CU is not MVP mode (e.g., merge mode), the video decoder 1120 can deduce the motion vector of the current CU from the motion vector of the temporally or spatially neighboring blocks (i.e., merge candidates) (S1260).
[0229] Here, operation S1260 may include operations S1261 to S1264.
[0230] As a result of the check in operation S1241, when it is detected that the encoding mode of the current CU is not MVP mode, the video decoder 1120 parses information (candid_idx) from the bitstream used to identify the motion vector of the current CU from the merging candidates of the current CU (S1261). The merging candidates of the current CU can be used Figure 3 The image shows some or all of the left block L, top block A, top right block AR, bottom left block BL, and top left block AL adjacent to the current CU. Additionally, blocks located in the reference image (which may be the same as or different from the reference image used to predict the current CU) but not in the current block can be used as motion vector candidates (i.e., merge candidates). For example, co-localized blocks of the current block in the reference image, or blocks adjacent to co-localized blocks, can be further used as merge candidates.
[0231] The video decoder 1120 can check whether the motion vector resolution of the block corresponding to candid_idx parsed from the bitstream is the same as the motion vector resolution predefined for the merge mode (S1262). Here, the motion vector resolution predefined for the merge mode can be the motion vector resolution defined in any unit of the image sequence, picture, and slice.
[0232] When the motion vector resolution of the block corresponding to candid_idx is the same as the motion vector resolution predefined for the merging mode, the video decoder 1120 can set the motion vector of the block corresponding to candid_idx as the motion vector of the current CU (S1264). When the motion vector resolution of the block corresponding to candid_idx is different from the predefined motion vector resolution, the video decoder 1120 can scale the motion vector of the block corresponding to candid_idx so that the motion vector of the block corresponding to candid_idx is the same as the predefined motion vector resolution (S1263), and can set the scaled motion vector as the motion vector of the current CU (S1264).
[0233] For reference, operations S1240, S1250 and S1260 can be performed sequentially and repeatedly for each CU.
[0234] Figure 14 It is shown in Figure 12 A flowchart for adding some operations.
[0235] exist Figure 14In this context, operation S1240 may include operations S1241, S1242_1, S1242_2, S1243, S1244, S1245, and S1246. Figure 14 In this context, operation S1250 may include operations S1251, S1252, S1253 and S1255.
[0236] and Figure 12 compared to, Figure 14 This includes operations S1242_1 and S1242_2 in operation S1240, but not... Figure 12 Operation S1242, and does not include Figure 12 Operation S1254 in operation S1250.
[0237] For reference, Figure 14 The function block has the same Figure 12 The block with the same reference numerals as the block performs the same function as the reference numerals. Figure 12 The same operation on a block, unless it has a significantly different meaning in the context. For example, Figure 14 Operation S1243 and Figure 12 The operation is the same as S1243.
[0238] exist Figure 14 In operation S1241, when it is detected that the current CU's encoding mode is the mode of encoding MVD using MVP (i.e., MVP mode), the video decoder 1120 can parse information about MVD (MVD) from the bitstream (S1242_1).
[0239] After resolving the MVD in operation S1242_1, the motion vector resolution decoder 1110 can check whether the MVD is not 0 and whether Adaptive_MV_resolution_enabled_flag is ON (S1242_2). When the MVD is not 0 and Adaptive_MV_resolution_enabled_flag is ON, the motion vector resolution decoder 1110 can perform operation S1243. When the MVD is 0 or Adaptive_MV_resolution_enabled_flag is not ON, the motion vector resolution decoder 1110 can perform operation S1246.
[0240] exist Figure 14 In operation S1252, when it is found that the motion vector resolution of the block corresponding to mvp_idx is the same as the motion vector resolution of the current CU, the video decoder 1120 adds MVD to MVP to calculate the motion vector of the current CU (S1255). Figure 14In operation S1252, when it is detected that the motion vector resolution of the block corresponding to mvp_idx is different from the motion vector resolution of the current CU, the video decoder 1120 can perform the scaling operation S1253 of the MVP to make the resolution of the MVP the same as the motion vector resolution of the current CU. After operation S1253, the video decoder 1120 can perform the operation S1255 of adding the MVD and the MVP to calculate the motion vector of the current CU.
[0241] Operation S1251 can be executed before operation S1242_1 or between operation S1242_1 and S1242_2.
[0242] Figure 15 This is a flowchart illustrating a method for decoding video at a video decoding device 1100 according to a second embodiment of the present invention.
[0243] As Figure 15 A detailed example of the situation is that when Adaptive_MV_resolution_enabled_flag is located in the SPS (PPS, slice, or CTU header) and mv_resolution_flag and alternative_mv_resolution information are located in the header of the CU that is the encoding target, it can be determined whether the adaptive motion vector resolution mode according to the present invention is enabled on a per-image-sequence basis (by picture, by slice, or by CTU) based on the Adaptive_MV_resolution_enabled_flag value, and the motion vector resolution of the CU can be adjusted based on the mv_resolution_flag value by selecting each CU individually.
[0244] For example, when the `Adaptive_MV_resolution_enabled_flag` in the SPS header (PPS header, slice header, or CTU header) is ON, the default motion vector resolution is 1 / 4 pixel, and the `mv_resolution_flag` used as header information for the current CU is OFF, the `alternative_mv_resolution` information is not needed to determine the motion vector resolution of the current CU. In this case, the motion vector resolution of the current CU can be determined as 1 / 4 pixel corresponding to the default motion vector resolution, and the motion vector of the current CU can be represented in 1 / 4 pixel units.
[0245] On the other hand, when mv_resolution_flag is ON and the alternative_mv_resolution value of the CU header is 4 pixels, the motion vector resolution of the current CU can be determined to be 4 pixels corresponding to the alternative resolution, and the motion vector of the current CU can be represented with a resolution of 4 pixels corresponding to the alternative resolution.
[0246] like Figure 15 As shown, in the video decoding apparatus 1100 according to the second embodiment of the present invention, the motion vector resolution decoder 1110 can parse the Adaptive_MV_resolution_enabled_flag from the bitstream (S1510). The Adaptive_MV_resolution_enabled_flag refers to identification information indicating whether motion vector resolution is adaptively enabled, and can be identified as at least one image unit (a higher-level image unit than the CU) among image sequences, pictures, slices, and CTUs. The Adaptive_MV_resolution_enabled_flag can be parsed from the bitstream header of at least one image unit among image sequences, pictures, slices, and CTUs.
[0247] After parsing the Adaptive_MV_resolution_enabled_flag of each image unit, including at least one of the image sequence, picture, slice, or CTU, the motion vector resolution decoder 1110 can determine the motion vector resolution of each block based on whether the encoding mode of each block in the image unit in which the Adaptive_MV_resolution_enabled_flag has been parsed is a mode used for encoding MVD (i.e., MVP mode) (S1540).
[0248] Here, operation S1540 may include operations S1541 to S1547.
[0249] After operation S1510, the motion vector resolution decoder 1110 can parse the encoding mode of the current CU from the bitstream and can check whether the encoding mode of the current CU is the mode of encoding MVD using MVP (i.e., MVP mode) (S1541).
[0250] When the current CU's encoding mode is MVP mode, check whether Adaptive_MV_resolution_enabled_flag indicates that the motion vector resolution of the CU in the upper-layer picture unit is adaptively enabled (i.e., Adaptive_MV_resolution_enabled_flag is ON) or indicates that the default motion vector resolution is used as the motion vector resolution in the CU in the upper-layer picture unit (i.e., Adaptive_MV_resolution_enabled_flag is OFF) (S1542).
[0251] When Adaptive_MV_resolution_enabled_flag is OFF, the motion vector resolution decoder 1110 can use the default motion vector resolution as the motion vector resolution of the current CU (S1547).
[0252] When Adaptive_MV_resolution_enabled_flag is ON, the motion vector resolution decoder 1110 can parse mv_resolution_flag (S1543) from the bitstream as identification information indicating which of the default motion vector resolution and the alternative resolution is used as the motion vector resolution of the current CU.
[0253] After parsing out mv_resolution_flag, the motion vector resolution decoder 1110 can check the value of mv_resolution_flag (S1544).
[0254] When mv_resolution_flag indicates that the alternative resolution is used as the motion vector resolution of the current CU (i.e., when mv_resolution_flag is ON), the motion vector resolution decoder 1110 can parse alternative_mv_resolution from the bitstream as information about the alternative resolution of the current CU (S1545), and can set the parsed alternative resolution as the motion vector resolution of the current CU (S1546).
[0255] When mv_resolution_flag indicates that the default motion vector resolution is used as the motion vector resolution of the current CU (i.e., when mv_resolution_flag is OFF), the motion vector resolution decoder 1110 can set the default motion vector resolution to the motion vector resolution of the current CU (S1547).
[0256] Although the mv_resolution_flag and / or alternative_mv_resolution information have been sent on a CU-by-CU basis as described above, in some implementations, the mv_resolution_flag and / or alternative_mv_resolution can be encoded on a CTU-by-CTU basis. The encoding mode of each CU in the corresponding CTU is checked to see if it is MVP mode, and then the subsequent operations of operation S1540 can be performed on the CUs whose encoding mode is MVP mode.
[0257] Figure 16 This is another example of adaptive resolution determination.
[0258] For example, when the Adaptive_MV_resolution_enabled_flag in the SPS (PPS, slice header, or CTU header) is ON, the default motion vector resolution is 1 / 4 pixel. When the mv_resolution_flag in the header of the CU that includes the circle in the corresponding image sequence is ON and the alternative_mv_resolution is 1 pixel, the motion vector resolution of the corresponding CU can be determined to be 1 pixel corresponding to the alternative resolution, and the motion vector of the CU can be represented with a resolution of 1 pixel.
[0259] When the `mv_resolution_flag` in the header of a CU (Cubic Array) including a triangle in the corresponding image sequence is ON and `alternative_mv_resolution` is 4 pixels, the motion vector resolution of the corresponding CU can be determined as 4 pixels corresponding to the alternative resolution, and the CU's motion vector can be represented with a resolution of 4 pixels corresponding to the alternative resolution. For CUs with `mv_resolution_flag` set to OFF, the CU's motion vector resolution can be determined as 1 / 4 pixel corresponding to the default motion vector resolution, and the CU's motion vector can be represented with a resolution of 1 / 4 pixel corresponding to the default motion vector resolution.
[0260] After operation S1546 or S1547, the video decoder 1120 can use MVP to derive the motion vector of the current block (S1550).
[0261] exist Figure 15 In this context, operation S1550 may include operations S1551 to S1555.
[0262] Operations S1551 to S1555 are similar to operations S1251 to S1255, therefore, detailed descriptions of operations S1551 to S1555 are omitted.
[0263] When it is detected in operation S1541 that the encoding mode of the corresponding CU is not MVP mode (e.g., merge mode), the video decoder 1120 can deduce the motion vector of the current CU from the motion vector of the temporally or spatially neighboring blocks (i.e., merge candidates) (S1560).
[0264] Here, operation S1560 may include operations S1561 to S1564.
[0265] Operations S1561 to S1564 are similar to operations S1261 to S1264, therefore, detailed descriptions of operations S1561 to S1564 are omitted.
[0266] Figure 17 It is shown in Figure 15 A flowchart for adding some operations.
[0267] exist Figure 17 In this context, operation S1540 may include operations S1541, S1542_1, S1542_2, S1543, S1544, S1545, S1546, and S1547. Figure 17 In this context, operation S1550 may include operations S1551, S1552, S1553 and S1555.
[0268] For reference, Figure 17 The function block has the same Figure 15 The block with the same reference numerals as the block performs the same function as the reference numerals. Figure 15 The same operation on a block, unless it has a significantly different meaning in the context. For example, Figure 17 Operation S1543 and Figure 15 The operation is the same as S1543.
[0269] When in Figure 17 When the operation S1541 detects that the current CU's encoding mode is the mode of encoding MVD using MVP (i.e., MVP mode), the video decoder 1120 can parse information about MVD (MVD) from the bitstream (S1542_1).
[0270] After resolving the MVD in operation S1542_1, the motion vector resolution decoder 1110 can check whether the MVD is not 0 and whether Adaptive_MV_resolution_enabled_flag is ON (S1542_2). When the MVD is not 0 and Adaptive_MV_resolution_enabled_flag is ON, the motion vector resolution decoder 1110 can proceed to operation S1543. When the MVD is 0 or Adaptive_MV_resolution_enabled_flag is not ON, the motion vector resolution decoder 1110 can proceed to operation S1547.
[0271] Operation S1551 can be executed before operation S1542_1 or between operation S1542_1 and S1542_2.
[0272] Figure 17 Operations S1551, S1552, S1553, and S1555 are respectively similar to Figure 14 Operations S1251, S1252, S1253, and S1255 are therefore omitted. Figure 17 Detailed description of operations S1551, S1552, S1553 and S1555.
[0273] Figure 18 This is a flowchart illustrating a method for decoding video at a video decoding device 1100 according to a third embodiment of the present invention.
[0274] like Figure 18 As shown, in the video decoding apparatus 1100 according to the third embodiment of the present invention, the motion vector resolution decoder 1110 can parse the Adaptive_MV_resolution_enabled_flag from the bitstream (S1810). The Adaptive_MV_resolution_enabled_flag refers to identification information indicating whether motion vector resolution is adaptively enabled, and can be determined in at least one image unit among image sequences, pictures, slices, or CTUs that are upper-layer image units. The Adaptive_MV_resolution_enabled_flag can be parsed from the bitstream header of at least one image unit of the image sequence, picture, slice, or CTU.
[0275] The motion vector resolution decoder 1110 can check whether the Adaptive_MV_resolution_enabled_flag indicates that motion vector resolution is adaptively enabled in at least one upper-level image unit (i.e., in the case of ON) in the image sequence, picture, slice and CTU (i.e., in all CUs in the upper-level image unit) or indicates that the default motion vector resolution is used as the motion vector resolution of all CUs in the upper-level image unit (in the case of OFF) (S1820).
[0276] When it is detected that Adaptive_MV_resolution_enabled_flag is OFF in operation S1820, the motion vector resolution decoder 1110 can use the default motion vector resolution as the motion vector resolution of the corresponding CU in the corresponding image unit (S1822).
[0277] When it is detected that Adaptive_MV_resolution_enabled_flag is ON in operation S1820, the motion vector resolution decoder 1110 can parse alternative_mv_resolution as information about the alternative resolution from the bitstream (S1830). Here, alternative_mv_resolution can be parsed from the bitstream for each individual image unit that is the same as the image unit that sent Adaptive_MV_resolution_enabled_flag.
[0278] Alternatively, alternative_mv_resolution can be parsed from the bitstream for each image unit smaller than the image unit sending the Adaptive_MV_resolution_enabled_flag and larger than the CU that serves as the block unit determining the motion vector resolution. For example, when the image unit sending the Adaptive_MV_resolution_enabled_flag is one of an image sequence and a picture, the unit whose alternative_mv_resolution has been parsed can be a slice (or CTU).
[0279] Alternatively, alternative_mv_resolution can be resolved for each CU in the image unit used for Adaptive_MV_resolution_enabled_flag.
[0280] Additionally, alternative_mv_resolution cannot be resolved in any location.
[0281] After operation S1830, the motion vector resolution decoder 1110 can determine the motion vector resolution of the current CU based on whether the current CU's encoding mode is a mode that encodes MVD (S1840).
[0282] Here, operation S1840 may include operations S1841 to S1848.
[0283] After operation S1830, the motion vector resolution decoder 1110 can parse the encoding mode of the current CU from the bitstream and check whether the encoding mode of the current CU is the mode of encoding MVD using MVP (i.e., MVP mode) (S1841).
[0284] When the current CU's encoding mode is MVP mode, the motion vector resolution decoder 1110 can check whether Adaptive_MV_resolution_enabled_flag indicates that the motion vector resolution of the CU in the upper-layer picture unit is adaptively enabled (i.e., when Adaptive_MV_resolution_enabled_flag is ON) or indicates that the default motion vector resolution is used as the motion vector resolution of the CU in the upper-layer picture unit (i.e., when Adaptive_MV_resolution_enabled_flag is OFF) (S1842).
[0285] When Adaptive_MV_resolution_enabled_flag is ON, the motion vector resolution decoder 1110 can parse mv_resolution_flag (S1843) from the bitstream as identification information indicating which of the default motion vector resolution and alternative resolutions is used as the motion vector resolution of the current CU.
[0286] On the other hand, when Adaptive_MV_resolution_enabled_flag is OFF, the motion vector resolution decoder 1110 can determine the default motion vector resolution as the motion vector resolution of the current CU (S1848).
[0287] After parsing the current CU's mv_resolution_flag in operation S1843, the motion vector resolution decoder 1110 can check the value of mv_resolution_flag (S1844).
[0288] When in operation S1844, if the mv_resolution_flag indicates that the motion vector resolution of the current CU is determined using a resolution difference value, which is the difference between the motion vector resolution of the current CU and the motion vector resolution of the previous CU, (i.e., when mv_resolution_flag is ON), the motion vector resolution decoder 1110 can parse mv_resolution_delta (S1845), which is information about the difference between the motion vector resolution of the current CU and the motion vector resolution of the previous CU, from the bitstream. Here, when there is no alternative_mv_resolution value and the current CU is the first CU in the decoding order among the CUs in the upper-layer picture unit, mv_resolution_delta can represent information indicating the motion vector resolution of the current CU.
[0289] The motion vector resolution decoder 1110 can use mv_resolution_delta to calculate the motion vector resolution of the current CU (S1846), and can set the calculation result as the motion vector resolution of the current CU (S1847).
[0290] When it is detected in operation S1844 that mv_resolution_flag indicates that the default motion vector resolution is used as the motion vector resolution of the current CU (i.e., when mv_resolution_flag is OFF), the motion vector resolution decoder 1110 can determine the default motion vector resolution as the motion vector resolution of the current CU (S1848).
[0291] In operation S1846, when the current CU is the first CU in the decoding order among the CUs in the upper-layer image unit, the motion vector resolution decoder 1110 can determine mv_resolution_delta as the motion vector resolution of the current CU. When the current CU is a CU after the first CU in the decoding order, the motion vector resolution decoder 1110 can add mv_resolution_delta to the motion vector resolution of the CUs encoded in the encoding order preceding the current CU to generate the motion vector resolution of the current CU. In this case, the motion vector resolution decoder 1110 does not need alternative_mv_resolution to generate the motion vector resolution of the current CU; therefore, the operation of parsing alternative_mv_resolution from the bitstream can be omitted.
[0292] For example, when the `Adaptive_MV_resolution_enabled_flag` in the slice header is ON, the default motion vector resolution is 1 / 4 pixel, and the `mv_resolution_flag` in the header information of the current CU is OFF, the `mv_resolution_delta` information may not be needed to determine the motion vector resolution of the current CU. In this case, the motion vector resolution of the current CU can be set to 1 / 4 pixel as the default motion vector resolution, and the motion vector of the current CU can be represented at a resolution of 1 / 4 pixel corresponding to the default motion vector resolution.
[0293] On the other hand, when `mv_resolution_flag` is ON, the current CU is the first CU in the decoding order, and the current CU's `mv_resolution_delta` is 4 pixels, the motion vector resolution of the current CU can be determined to be 4 pixels corresponding to `mv_resolution_delta`, and the motion vector of the current CU can be represented with a resolution of 4 pixels. When the current CU is not the first CU in the decoding order, with `mv_resolution_flag` ON and `mv_resolution_delta` 0, the motion vector resolution of the current CU can be set to 4 pixels by adding the current CU's `mv_resolution_delta` to the motion vector resolution of the previous CUs, and the motion vector of the current CU can be represented with a resolution of 4 pixels.
[0294] When the current CU is not the first CU in the decoding order, with the current CU's mv_resolution_flag on and the current CU's mv_resolution_delta at -2 pixels, the motion vector resolution of the current CU can be set to 2 pixels by adding the -2 pixels corresponding to mv_resolution_delta to the 4 pixels that are the motion vector resolution of the previous CU, and the motion vector of the current CU can be represented in 2-pixel units.
[0295] Based on the above references Figure 18 In the described implementation, the motion vector resolution decoder 1110 adds mv_resolution_delta to the motion vector resolution of the previous CU of the current CU to recover the motion vector resolution of the current CU, but the invention is not limited thereto. The motion vector resolution decoder 1110 can add the mv_resolution_delta of the current CU to an alternative resolution to decode the motion vector resolution of the current CU.
[0296] As Figure 18 In an example of the implementation, when Adaptive_MV_resolution_enabled_flag and alternative_mv_resolution are located in the slice (tile) header (SPS, PPS, or CTU), and mv_resolution_flag and mv_resolution_delta information are located in the header of the CU in the slice (tile) (image sequence, picture, or CTU) unit, the application of the adaptive motion vector resolution mode and alternative resolution according to the invention can be enabled based on Adaptive_MV_resolution_enabled_flag, and the motion vector resolution can be adaptively determined for each CU in the slice (tile) (image sequence, picture, or CTU) unit based on the mv_resolution_flag of each CU, and the motion vector resolution of the current CU can be adjusted using mv_resolution_delta.
[0297] In this context, the current CU's mv_resolution_delta can be represented as the difference between the alternative_mv_resolution (i.e., the alternative resolution) in the slice (tile) header (or image sequence, picture, or CTU) and the current CU's motion vector resolution. The motion vector resolution decoder 1110 can calculate the current CU's motion vector resolution by adding the alternative_mv_resolution to mv_resolution_delta.
[0298] For example, when the `Adaptive_MV_resolution_enabled_flag` in the slice header is ON, the `alternative_mv_resolution` value (as an alternative resolution) is 4 pixels, the default motion vector resolution is 1 / 4 pixel, and the `mv_resolution_flag` in the header information of the current CU is OFF, the `mv_resolution_delta` information may not be needed to determine the motion vector resolution of the current CU. In this case, the motion vector resolution of the current CU can be determined as 1 / 4 pixel, corresponding to the default motion vector resolution, and the motion vector of the current CU can be represented at a resolution of 1 / 4 pixel.
[0299] When the current CU's `mv_resolution_flag` is ON and the current CU's `mv_resolution_delta` is 0, the current CU's motion vector resolution can be set to 4 pixels, corresponding to the value obtained by adding `alternative_mv_resolution` to `mv_resolution_delta`, and the current CU's motion vector can be represented with a resolution of 4 pixels. When the current CU's `mv_resolution_flag` is ON, if the current CU's `mv_resolution_delta` is -2 pixels, the current CU's motion vector resolution can be set to 2 pixels, corresponding to the value obtained by adding the 4 pixels of `alternative_mv_resolution` in the slice header to the -2 pixels corresponding to the `mv_resolution_delta` value, and the current CU's motion vector can be represented with a resolution of 2 pixels.
[0300] As Figure 18 In another example of the implementation, when the Adaptive_MV_resolution_enabled_flag and the alternative_mv_resolution as the alternative resolution are located in the tile header (or SPS, PPS, or CTU), it can be determined whether to apply the adaptive motion vector resolution mode and alternative resolution according to the invention on a unit basis, based on the Adaptive_MV_resolution_enabled_flag. When the mv_resolution_flag and mv_resolution_delta information are located in the header of the CU in the tile (image sequence, picture, or CTU) unit, the motion vector resolution can be adaptively determined for each CU in the tile (image sequence, picture, or CTU) unit based on the mv_resolution_flag, and the motion vector resolution of the current CU can be adjusted using mv_resolution_delta.
[0301] Here, the mv_resolution_delta of the current CU can be represented as the difference between the alternative_mv_resolution in the slice (tile) (SPS, PPS, or CTU) and the motion vector resolution of the current CU, or it can be represented as the difference between the motion vector resolution of the CU encoded just before the current CU and the motion vector resolution of the current CU.
[0302] For example, when the current CU is the first CU in decoding order, the current CU's mv_resolution_delta can indicate the difference between the alternative_mv_resolution in the slice (tile) (SPS, PPS, or CTU) header and the motion vector resolution of the current CU. When the current CU is not the first CU, the current CU's mv_resolution_delta can be represented as the difference between the motion vector resolution encoded immediately before the current CU and the motion vector resolution of the current CU.
[0303] For example, when the Adaptive_MV_resolution_enabled_flag in the slice header is ON, the alternative resolution is 4 pixels, the default motion vector resolution is 1 / 4 pixel, and the mv_resolution_flag used as the header information for the current CU is OFF, it may not be necessary to use the current CU's mv_resolution_delta to determine the current CU's motion vector resolution. In this case, the current CU's motion vector resolution can be set to 1 / 4 pixel, corresponding to the default motion vector resolution.
[0304] On the other hand, when the `mv_resolution_flag` of the header information of the current CU is ON, the current CU is the first CU, and the CU's `mv_resolution_delta` is +2 pixels, indicating the resolution difference between the 4 pixels of `alternative_mv_resolution` in the tile (plot) header and the motion vector resolution of the current CU. In this case, the motion vector resolution of the current CU can be 6 pixels, obtained by adding the 4 pixels of `alternative_mv_resolution` to the resolution difference +2 pixels. In this situation, when the `mv_resolution_flag` of the next CU of the first CU is ON and the `mv_resolution_delta` of the corresponding next CU is -2 pixels, the motion vector resolution of the corresponding next CU can be 4 pixels, obtained by adding the 6 pixels of the motion vector resolution of the previous CU to the -2 pixels of the `mv_resolution_delta` of the corresponding next CU.
[0305] exist Figure 18 After operation S1847 or S1848, video decoder 1120 can use MVP to derive the motion vector of the current CU (S1850).
[0306] Here, operation S1850 may include operations S1851 to S1855.
[0307] Figure 18 Operations S1851 to S1855 are respectively similar to Figure 12 Operations S1251 to S1255 are omitted hereafter, therefore, detailed descriptions of operations S1851 to S1855 are omitted.
[0308] When it is detected in operation S1841 that the encoding mode of the corresponding CU is not MVP mode, the video decoder 1120 can deduce the motion vector of the current CU from the motion vector of the temporally or spatially neighboring blocks (i.e., merge candidates) (S1860).
[0309] Here, operation S1860 may include operations S1861 to S1864.
[0310] Figure 18 Operations S1861 to S1864 are respectively similar to Figure 12 Operations S1261 to S1264 are omitted hereafter, and therefore, detailed descriptions of operations S1861 to S1864 are omitted.
[0311] Figure 18 This is a flowchart illustrating the operation of the video decoding device 1100 according to the fourth embodiment of the present invention and the operation of the video decoding device 1100 according to the third embodiment of the present invention.
[0312] In other words, according to the fourth embodiment, the video decoder 1120 can parse mv_resolution_scale instead of mv_resolution_delta from the bitstream, and can use the parsed mv_resolution_scale to recover the motion vector resolution of the current CU.
[0313] In the third and fourth embodiments, with Figure 18 Operations S1845 to S1846 are different from each other, while the remaining operations are the same.
[0314] According to the fourth embodiment, operation S1845 can be implemented to parse mv_resolution_scale from the bitstream, and operation S1846 can be implemented to recover the motion vector resolution of the current CU using mv_resolution_scale.
[0315] When in operation S1844, if the mv_resolution_flag indicates that the motion vector resolution of the current CU is determined using a resolution scaling factor that is the value obtained by dividing the motion vector resolution of the current CU by the motion vector resolution of the previous CU (i.e., when mv_resolution_flag is ON), the motion vector resolution decoder 1110 can parse mv_resolution_scale (S1845), which is information indicating the value obtained by dividing the motion vector resolution of the current CU by the motion vector resolution of the previous CU, from the bitstream. Alternatively, mv_resolution_scale may be information indicating the value obtained by dividing the motion vector resolution of the current CU by an alternative resolution.
[0316] The motion vector resolution decoder 1110 can use mv_resolution_delta to calculate the motion vector resolution of the current CU (S1846).
[0317] In operation S1846, when the current CU is the first CU in the decoding order among the CUs in the upper-layer image unit, the motion vector resolution decoder 1110 can resolve the motion vector resolution corresponding to mv_resolution_scale to the motion vector resolution of the current CU. When the current CU is a CU after the first CU in the decoding order, the motion vector resolution decoder 1110 can calculate the motion vector resolution of the current CU by multiplying the motion vector resolution of the CU encoded just before the current CU by the scaling factor of the current CU. In this case, since an alternative resolution is not required to calculate the motion vector resolution of the current CU, the motion vector resolution decoder 1110 can omit the operation of resolving alternative_mv_resolution from the bitstream.
[0318] As another implementation of calculating the motion vector resolution of the current CU using mv_resolution_scale, the motion vector resolution decoder 1110 can decode the result obtained by multiplying the mv_resolution_scale of the current CU in the upper-layer image unit by the alternative resolution into the motion vector resolution of the current CU.
[0319] As another implementation of calculating the motion vector resolution of the current CU using mv_resolution_scale, when the current CU is the first CU in the decoding order among the CUs in the upper-layer image unit, the motion vector resolution decoder 1110 can decode the motion vector resolution of the current CU by multiplying mv_resolution_scale by an alternative resolution. On the other hand, when the current CU is a CU after the first CU in the decoding order, the motion vector resolution decoder 1110 can calculate the motion vector resolution of the current CU by multiplying the motion vector resolution of the CU encoded just before the current CU by the mv_resolution_scale of the current CU.
[0320] As an example of the operation of the video decoding device 1100 according to the fourth embodiment of the present invention, when the Adaptive_MV_resolution_enabled_flag and alternative_mv_resolution are located in the slice (tile) header (SPS, PPS, or CTU) and the mv_resolution_flag and mv_resolution_scale information are located in the header of the current CU as the encoding target, the motion vector resolution decoder 1110 can determine whether to apply the adaptive motion vector resolution mode and alternative resolution according to the present invention on a slice (tile) (image sequence, picture, or CTU) basis. The motion vector resolution decoder 1110 can adaptively enable motion vector resolution on a block basis in the slice (tile) (image sequence, picture, or CTU) basis and use the mv_resolution_scale value to adjust the motion vector resolution of the current CU.
[0321] In this case, when the current CU is the first CU in a slice (tile) (image sequence, picture, or CTU) of the upper-layer image unit, mv_resolution_scale can be represented as the value corresponding to the motion vector resolution of the current CU, while when the current CU is the CU after the first CU, mv_resolution_scale can be represented as the multiplication between the motion vector resolution of the CU encoded just before the current CU and the motion vector resolution of the current CU.
[0322] For example, when the Adaptive_MV_resolution_enabled_flag in the slice header is ON, the default motion vector resolution is 1 / 4 pixel, and the mv_resolution_flag used as the header information of the current CU is OFF, the mv_resolution_scale information of the current CU can be left unparsed, and the motion vector resolution of the current CU can be set to 1 / 4 pixel, which corresponds to the default motion vector resolution.
[0323] When the current CU's `mv_resolution_flag` is ON, the current CU is the first CU in decoding order, and the current CU's `mv_resolution_scale` is 4, the motion vector resolution of the current CU can be 4 pixels, corresponding to `mv_resolution_scale`. When the current CU is the next CU after the first CU, the current CU's `mv_resolution_flag` is ON, and the current CU's `mv_resolution_scale` is 1 / 2, the motion vector resolution of the current CU can be set to 2 pixels, obtained by multiplying the previous CU's motion vector resolution of 4 pixels by 1 / 2 of the current CU's `mv_resolution_scale`.
[0324] Alternatively, the mv_resolution_scale of each CU can be represented as the product of the alternative_mv_resolution included in the slice (tile) header (SPS, PPS, or CTU) and the motion vector resolution of the current block.
[0325] For example, when the Adaptive_MV_resolution_enabled_flag in the slice header is ON, the alternative_mv_resolution value is 4 pixels, the default motion vector resolution is 1 / 4 pixel, and the mv_resolution_flag used as the header information of the current CU is OFF, the mv_resolution_scale information of the current CU can be omitted, and the motion vector resolution of the current CU can be set to 1 / 4 pixel corresponding to the default motion vector resolution.
[0326] On the other hand, when the current CU's `mv_resolution_flag` is ON and the current CU's `mv_resolution_scale` is 1, the motion vector resolution of the current CU can be set to 4 pixels by multiplying 4 pixels (as alternative `mv_resolution`) by 1 (as the current CU's `mv_resolution_scale`). When the next CU's `mv_resolution_flag` is ON and `mv_resolution_scale` is 1 / 2, the motion vector resolution of the corresponding next CU can be set to 2 pixels by multiplying 4 pixels (as alternative resolution) by 1 / 2 (as the next CU's `mv_resolution_scale`).
[0327] In another implementation, the mv_resolution_scale of each CU can be represented by the product of the alternative_mv_resolution value in the slice (tile) header (SPS or PPS) and the motion vector resolution of the current CU, or by the product of the motion vector resolution of the CU encoded immediately before the current CU and the motion vector resolution of the current CU. That is, when the current CU is the first CU in the decoding order, the mv_resolution_scale of the current CU can indicate the product of the motion vector resolution of the current CU and the alternative_mv_resolution in the slice (tile) header (SPS or PPS), while when the current CU is a CU after the first CU, the mv_resolution_scale of the current CU can be represented by the product of the motion vector resolution of the CU encoded immediately before the current CU and the motion vector resolution of the current CU.
[0328] For example, when the Adaptive_MV_resolution_enabled_flag in the slice header is ON, the alternative_mv_resolution is 4 pixels, the default motion vector resolution is 1 / 4 pixel, and the mv_resolution_flag used as the header information of the current CU is OFF, the motion vector resolution of the current CU does not need the mv_resolution_scale information. Therefore, the motion vector resolution of the current CU can be set to 1 / 4 pixel corresponding to the default motion vector resolution, and the motion vector of the current CU can be represented with a resolution of 1 / 4 pixel corresponding to the default motion vector resolution.
[0329] On the other hand, when the current CU's `mv_resolution_flag` is ON and the current CU's `mv_resolution_scale` is 1, the motion vector resolution of the current CU can be set to 4 pixels by multiplying the 4 pixels of the `alternative_mv_resolution` (which is the slice header) with the 1 pixel of the current CU's `mv_resolution_scale`. When the current CU is the next CU after the first CU, the current CU's `mv_resolution_flag` is ON, and the current CU's `mv_resolution_scale` is 1 / 2, the motion vector resolution of the current CU can be set to 2 pixels by multiplying the 4 pixels (which is the motion vector resolution value of the CU encoded immediately before the current CU) with 1 / 2 the current CU's `mv_resolution_scale`.
[0330] Figure 19 It is shown in Figure 18 Add some operation scenarios to the flowchart.
[0331] exist Figure 19 In this context, operation S1840 may include operations S1841, S1842_1, S1842_2, S1843, S1844, S1845, S1846, S1847, and S1848. Additionally, Figure 19 Operation S1850 may include operations S1851, S1852, S1853 and S1855.
[0332] and Figure 18 Compared to the situation, Figure 19 This includes operations S1242_1 and S1242_2 in operation S1240, but not... Figure 18 Operation S1242, and can be obtained from operation S1850. Figure 18 Operation S1854 is excluded.
[0333] For reference, Figure 19 The function block has the same Figure 18 The block with the same reference numerals as the block performs the same function as the reference numerals. Figure 18 The same operation on a block, unless it has a significantly different meaning in the context. For example, Figure 19 Operation S1843 and Figure 18 The operation is the same as S1843.
[0334] When in Figure 19When the operation S1841 detects that the current CU's encoding mode is the mode of encoding MVD using MVP (i.e., MVP mode), the video decoder 1120 can decode the information about MVD from the bitstream (S1842_1).
[0335] After decoding the MVD, the motion vector resolution decoder 1110 can check whether the MVD is not 0 and whether the Adaptive_MV_resolution_enabled_flag is ON (S1842_2). When, as a result of the check in operation S1842_2, the MVD is not 0 and the Adaptive_MV_resolution_enabled_flag is ON, the motion vector resolution decoder 1110 can proceed to operation S1843. When the MVD is 0 or the Adaptive_MV_resolution_enabled_flag is not ON, the motion vector resolution decoder 1110 can proceed to operation S1848.
[0336] Operation S1851 can be executed before operation S1842_1 or between operation S1842_1 and S1842_2.
[0337] Figure 19 Operations S1851, S1852, S1853, and S1855 are respectively similar to Figure 14 Operations S1251, S1252, S1253, and S1255 are therefore omitted. Figure 19 Detailed description of operations S1851, S1852, S1853 and S1855.
[0338] According to embodiments of the present invention, the case where the motion vector resolution decoder 1110 parses the Adaptive_MV_resolution_enabled_flag from the bitstream has been illustrated. However, in some embodiments, the motion vector resolution decoder 1110 in the video decoding device 1100 may omit the operation of parsing the Adaptive_MV_resolution_enabled_flag from the bitstream. In this case, the motion vector resolution decoder 1110 may perform the same operation as when Adaptive_MV_resolution_enabled_flag is ON, or it may perform the same operation as when Adaptive_MV_resolution_enabled_flag is OFF. Accordingly, the video encoding device 400 may omit the operation of encoding the Adaptive_MV_resolution_enabled_flag.
[0339] The above implementation of the video decoding device is not limited to parsing mv_resolution_flag at the CU level, but can also parse mv_resolution_flag at the CTU level to set one of the default motion vector resolution or an alternative resolution as the motion vector resolution. When the motion vector resolution is determined at the CTU level, all CUs included in a CTU can have the same motion vector resolution. In this case, the upper-level image unit of the CTU unit can be one of an image sequence, a picture, or a slice.
[0340] While the invention has been specifically shown and described with reference to exemplary embodiments thereof, those skilled in the art will understand that various changes in form and detail may be made herein without departing from the spirit and scope of the invention as defined by the appended claims. The exemplary embodiments should be considered merely descriptive and not for limiting purposes. Therefore, the scope of the invention is not limited by the specific embodiments thereof, but by the appended claims, and all differences within that scope are to be construed as being included in the invention.
[0341] Cross-reference to related applications
[0342] This application is based on and claims priority under 35 USC §119(a) to Korean Patent Applications No. 10-2016-0136066 and No. 10-2017-0025673, filed with the Korean Intellectual Property Office on October 19, 2016 and February 27, 2017, respectively, the entire disclosure of which is incorporated herein by reference. Furthermore, this non-provisional application claims priority in countries other than the United States for the same reasons as the aforementioned Korean patent applications, which are hereby incorporated by reference in their entirety.
Claims
1. A method for encoding video, the method comprising the following steps: An enable flag indicating whether to adaptively determine the motion vector resolution is encoded into the bitstream, wherein the enable flag is encoded into a sequence parameter set or an image parameter set of the bitstream; Determine the motion vector resolution of the current block; The motion vector of the current block is determined based on the motion vector resolution of the current block; Generate a motion vector difference for the current block, which is the difference between the motion vector of the current block and motion vector predictors derived from neighboring blocks of the current block, and encode information about the motion vector difference of the current block into the bit stream; and When the motion vector resolution is adaptively determined and the motion vector difference of the current block is non-zero, information about the motion vector resolution of the current block is encoded into the bitstream. The step of encoding information about the motion vector resolution of the current block includes the following steps: The mv resolution flag, indicating whether the motion vector resolution of the current block is the default motion vector resolution as a 1 / 4 pixel unit, is encoded into the bitstream; and When the motion vector resolution of the current block is not the default motion vector resolution, information regarding an alternative resolution, including one of a plurality of motion vector resolution candidates comprising 1 / 2 pixel units, 1 pixel units, and 4 pixel units, is encoded into the bitstream. Wherein, when the motion vector resolution is not adaptively determined, the motion vector resolution of the current block is determined to be the default motion vector resolution. Wherein, when the motion vector difference of the current block is zero, the motion vector resolution of the current block is determined as the default motion vector resolution.
2. The method of claim 1, wherein, The step of encoding information about the motion vector resolution includes the following steps: encoding the difference between the motion vector resolution of the current block and the motion vector resolution of blocks encoded before the current block as an element of information about the motion vector resolution of the current block.
3. The method according to claim 1, wherein, The step of encoding information about the motion vector resolution includes the following steps: encoding information about the ratio between the motion vector resolution of the current block and the motion vector resolution of blocks encoded before the current block as an element of the information about the motion vector resolution of the current block.
4. A video decoding method, wherein the video decoding method adaptively determines the motion vector resolution of a current block and decodes the current block, the video decoding method comprising the following steps: Extract an indicator from the bitstream to determine whether to adaptively determine the motion vector resolution, wherein the enable flag is extracted from a set of sequence parameters or a set of image parameters of the bitstream; Extract information about the motion vector difference of the current block from the bitstream; When the enable flag indicates that the motion vector resolution has been adaptively determined and the motion vector difference of the current block is non-zero, information about the motion vector resolution of the current block is extracted from the bitstream, and the motion vector resolution of the current block is determined based on the information about the motion vector resolution of the current block; and The motion vector of the current block is determined based on the motion vector resolution of the current block, the motion vector difference of the current block, and the motion vector predictor derived from the neighboring blocks of the current block; The step of extracting information about the motion vector resolution of the current block includes the following steps: Extract from the bitstream an mv resolution flag indicating whether the motion vector resolution of the current block is the default motion vector resolution for a 1 / 4 pixel unit; and When the mv resolution flag indicates that the motion vector resolution of the current block is not the default motion vector resolution, information about an alternative resolution is extracted from the bitstream to indicate one of a plurality of motion vector resolution candidates, including 1 / 2 pixel units, 1 pixel units, and 4 pixel units. Specifically, when the enable flag indicates that the motion vector resolution is not adaptively determined, the motion vector resolution of the current block is set to the default motion vector resolution. Wherein, when the motion vector difference of the current block is zero, the motion vector resolution of the current block is set to the default motion vector resolution.
5. The video decoding method of claim 4, wherein, The step of determining the motion vector resolution of the current block includes the following steps: extracting information from the bitstream about the difference between the motion vector resolution of the current block and the motion vector resolution of blocks encoded before the current block as an element of the motion vector resolution information of the current block.
6. The video decoding method of claim 4, wherein, The step of determining the motion vector resolution of the current block includes the following steps: extracting information from the bitstream about the ratio between the motion vector resolution of the current block and the motion vector resolution of blocks encoded before the current block as an element of the motion vector resolution information of the current block.
7. A method for transmitting a bit stream, characterized by, The video encoding method generates the bitstream by performing a video encoding method and then sends the bitstream, the video encoding method comprising the following steps: An enable flag indicating whether to adaptively determine the motion vector resolution is encoded into the bitstream, wherein the enable flag is encoded into a sequence parameter set or an image parameter set of the bitstream; Determine the motion vector resolution of the current block; The motion vector of the current block is determined based on the motion vector resolution of the current block; Generate a motion vector difference for the current block, which is the difference between the motion vector of the current block and motion vector predictors derived from neighboring blocks of the current block, and encode information about the motion vector difference of the current block into the bit stream; and When the motion vector resolution is adaptively determined and the motion vector difference of the current block is non-zero, information about the motion vector resolution of the current block is encoded into the bitstream. The step of encoding information about the motion vector resolution of the current block includes the following steps: The mv resolution flag, indicating whether the motion vector resolution of the current block is the default motion vector resolution as a 1 / 4 pixel unit, is encoded into the bitstream; and When the motion vector resolution of the current block is not the default motion vector resolution, information regarding an alternative resolution, including one of a plurality of motion vector resolution candidates comprising 1 / 2 pixel units, 1 pixel units, and 4 pixel units, is encoded into the bitstream. Wherein, when the motion vector resolution is not adaptively determined, the motion vector resolution of the current block is determined to be the default motion vector resolution. Wherein, when the motion vector difference of the current block is zero, the motion vector resolution of the current block is determined as the default motion vector resolution.