Method and apparatus for storing motion vector of intra prediction block
By obtaining and dequantizing the motion vector field from the decoded picture buffer in video encoding and decoding, and generating and storing motion information based on intra- or inter-prediction modes, the problem of intra-prediction block motion vector information storage in video encoding is solved, and the problem of storing motion vector information in video encoding is improved. Video encoding and codec efficiency and quality.
Patent Information
- Application Number
- CN202380040352.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-04-19
- Filing Date
- 2023-04-21
- Publication Date
- 2024-12-27
AI Technical Summary
The prior art is difficult to effectively store and utilize the motion vector information of intra prediction blocks in video encoding, resulting in insufficient video encoding and decoding efficiency and quality.
By obtaining the compressed motion vector field from the decoded picture buffer, dequantization generates and reconstructs the motion vector field, and generates and stores motion information based on intra or inter prediction modes, including prediction modes, motion vectors and reference list indexes, to optimize Storage and use of motion vector fields.
The video encoding and decoding efficiency and quality are improved, and the encoding and decoding performance of intra prediction blocks is improved by effectively utilizing motion vector information.
Smart Images

Figure CN119213775A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a method and apparatus for storing motion vectors of intra-frame prediction blocks. Background Art
[0002] The statements in this section merely provide background information related to the present disclosure and may not constitute prior art.
[0003] Since video data has a large amount of data compared to audio or still image data, without compression processing, the video data requires a large amount of hardware resources (including memory) to store or transmit the video data.
[0004] Therefore, the encoder is generally used to compress and store or transmit video data. The decoder receives the compressed video data, decompresses the received compressed video data, and plays the decompressed video data. Video compression technologies include H.264 / Advanced Video Coding (AVC), High Efficiency Video Coding (HEVC), and Versatile Video Coding (VVC), and VVC improves coding efficiency by about 30% or more compared to HEVC.
[0005] However, as image size, resolution, and frame rate gradually increase, the amount of data to be encoded also increases. Therefore, a new compression technology is needed that provides higher encoding efficiency and improved image enhancement effects compared to existing compression technologies.
[0006] The video encoding technology of the related art can store motion vectors for inter-frame prediction in the form of a motion vector field for later use. Here, the motion vector field can have a grid shape of a specific block size, and each grid can store two motion vectors. In addition, the video encoding technology of the prior art can compress the motion vector field and store the compressed motion vector field in units of frames after the encoding of the current frame is completed for later use in subsequent frames. Here, if any block is intra-predicted, the motion vector field of the corresponding block is filled with all 0s, so that the corresponding motion vector field cannot be used as a spatial or temporal motion vector later. Therefore, in order to improve the efficiency of video encoding and decoding, it is necessary to consider a method for storing motion vector information for intra-frame prediction blocks. Summary of the invention
[0007] [Technical issues]
[0008] In order to improve video coding efficiency and video quality, the present invention seeks to provide a video coding method and apparatus for deriving and storing motion vector information for intra-frame prediction blocks for later use.
[0009] [Technical solution]
[0010] At least one aspect of the present invention provides a method for reconstructing a current block performed by a video decoding device. The method includes obtaining a compressed motion vector field and a reconstructed picture from a decoded picture buffer. The method also includes generating a reconstructed motion vector field by dequantizing the compressed motion vector field. The method also includes generating a prediction block of the current block based on intra-frame prediction using reconstructed adjacent samples, or generating a prediction block and motion information based on inter-frame prediction using the reconstructed picture, the reconstructed motion vector field and adjacent motion information. Here, the motion information includes a prediction mode, a motion vector and a reference list index. The method also includes: based on the prediction mode according to intra-frame prediction or the motion information according to inter-frame prediction, the position information of the current block and the size information of the current block, the motion information corresponding to the position of the current block is stored in the motion vector field of the current block.
[0011] Another aspect of the present invention provides a method for encoding a current block performed by a video encoding device. The method includes obtaining a compressed motion vector field and a reconstructed picture from a decoded picture buffer. The method also includes generating a reconstructed motion vector field by dequantizing the compressed motion vector field. The method also includes generating a prediction block of the current block based on intra-frame prediction using reconstructed adjacent samples, or generating a prediction block and motion information based on inter-frame prediction using the reconstructed picture, the reconstructed motion vector field and adjacent motion information. Here, the motion information includes a prediction mode, a motion vector and a reference list index. The method also includes storing the motion information corresponding to the position of the current block in the motion vector field of the current block based on the prediction mode according to intra-frame prediction or the motion information according to inter-frame prediction, the position information of the current block and the size information of the current block.
[0012] Another aspect of the present invention provides a computer-readable recording medium storing a bitstream generated by a video encoding method. The video encoding method includes obtaining a compressed motion vector field and a reconstructed picture from a decoded picture buffer. The video encoding method also includes generating a reconstructed motion vector field by dequantizing the compressed motion vector field. The video encoding method also includes generating a prediction block of a current block based on intra-frame prediction using reconstructed adjacent samples, or generating a prediction block and motion information based on inter-frame prediction using the reconstructed picture, the reconstructed motion vector field, and adjacent motion information. Here, the motion information includes a prediction mode, a motion vector, and a reference list index. The video encoding method also includes storing the motion information corresponding to the position of the current block in the motion vector field of the current block based on the prediction mode according to intra-frame prediction or the motion information according to inter-frame prediction, the position information of the current block, and the size information of the current block.
[0013] [Beneficial Effects]
[0014] As described above, the present disclosure provides a video coding method and apparatus for deriving and storing motion vector information for intra-frame prediction blocks for later use. Thus, the video coding method and apparatus improve video coding efficiency and enhance video quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 is a block diagram of a video encoding device that may implement the techniques of this disclosure.
[0016] Figure 2 A method for partitioning blocks using a quadtree plus binary tree ternary tree (QTBTTT) structure is shown.
[0017] 3A and 3B illustrate a plurality of intra prediction modes including a wide-angle intra prediction mode.
[0018] Figure 4 Neighboring blocks of the current block are shown.
[0019] Figure 5 is a block diagram of a video decoding device that may implement the techniques of this disclosure.
[0020] Figure 6 is a block diagram showing a video encoding apparatus according to an embodiment of the present disclosure.
[0021] Figure 7 is a block diagram showing a video decoding apparatus according to an embodiment of the present disclosure.
[0022] Figure 8 is a block diagram illustrating a predictor according to an embodiment of the present disclosure.
[0023] Fig. 9 is a diagram illustrating an operation of a motion vector memory according to an embodiment of the present disclosure.
[0024] Fig.10 is a block diagram showing a predictor according to another embodiment of the present disclosure.
[0025] Fig.11 is a diagram illustrating generation of motion information of an intra prediction block according to an embodiment of the present disclosure.
[0026] Fig.12 is a block diagram illustrating a motion vector field compressor according to an embodiment of the present disclosure.
[0027] Fig.13 is a diagram illustrating the operation of a sampler according to an embodiment of the present disclosure.
[0028] Fig.14 is a block diagram showing a motion vector field compressor according to another embodiment of the present disclosure.
[0029] Fig.15 is a diagram illustrating the operation of an intra prediction region filler according to an embodiment of the present disclosure.
[0030] Fig.16 is a flowchart illustrating a method of encoding a current block by a video encoding device according to an embodiment of the present disclosure.
[0031] Fig.17 is a flowchart illustrating a method for decoding a current block by a video decoding device according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0032] Hereinafter, some embodiments of the present disclosure are described in detail with reference to the illustrative drawings. In the following description, although the elements are shown in different drawings, the same reference numerals represent the same elements. In addition, in the following description of some embodiments, for the purpose of clarity and brevity, the detailed description of related known components and functions may be omitted when it is considered to obscure the subject matter of the present disclosure.
[0033] Figure 1 is a block diagram of a video encoding device that can implement the technology of the present disclosure. Figure 1 A diagram of a video encoding device and components of the device is described.
[0034] The encoding apparatus may include a picture divider 110 , a predictor 120 , a subtractor 130 , a transformer 140 , a quantizer 145 , a rearrangement unit 150 , an entropy encoder 155 , an inverse quantizer 160 , an inverse transformer 165 , an adder 170 , a loop filter unit 180 , and a memory 190 .
[0035] Each component of the encoding device can be implemented as hardware or software or as a combination of hardware and software. In addition, the function of each component can be implemented as software, and a microprocessor can also be implemented to implement the function of the software corresponding to each component.
[0036] A video is composed of one or more sequences including multiple pictures. Each picture is divided into multiple blocks, and encoding is performed for each block. For example, a picture is divided into one or more tiles or / and slices. Here, one or more tiles can be defined as tile groups. Each tile or / and slice is divided into one or more coding tree units (CTUs). In addition, each CTU is divided into one or more coding units (CUs) by a tree structure. The information applied to each coding unit (CU) is encoded as the syntax of the CU, and the information commonly applied to multiple CUs included in a CTU is encoded as the syntax of the CTU. In addition, the information commonly applied to all blocks in a slice is encoded as the syntax of the slice header, and the information applied to all blocks constituting one or more pictures is encoded as a picture parameter set (PPS) or a picture header. In addition, the information commonly referenced by multiple pictures is encoded into a sequence parameter set (SPS). In addition, the information commonly referenced by one or more SPSs is encoded into a video parameter set (VPS). In addition, the information commonly applied to a tile or tile group can also be encoded as the syntax of a tile or tile group header. The syntax included in an SPS, a PPS, a slice header, a tile, or a tile group header may be referred to as a high-level syntax.
[0037] The picture partitioner 110 determines the size of a coding tree unit (CTU). Information on the size of the CTU (CTU size) is encoded as a syntax of an SPS or a PPS and delivered to a video decoding apparatus.
[0038] The picture divider 110 divides each picture constituting a video into a plurality of coding tree units (CTUs) having a predetermined size, and then recursively divides the CTUs by using a tree structure. A leaf node in the tree structure becomes a coding unit (CU), which is a basic unit of coding.
[0039] The tree structure can be a quadtree (QT), in which a higher node (or parent node) is split into four lower nodes (or child nodes) of the same size. The tree structure can also be a binary tree (BT), in which a higher node is split into two lower nodes. The tree structure can also be a ternary tree (TT), in which a higher node is split into three lower nodes at a ratio of 1:2:1. The tree structure can also be a structure in which two or more of the structures in the QT structure, the BT structure, and the TT structure are mixed. For example, a quadtree plus a binary tree (QTBT) structure can be used or a quadtree plus a binary tree ternary tree (QTBTTT) structure can be used. Here, a binary tree ternary tree (BTTT) is added to the tree structure to be called a multi-type tree (MTT).
[0040] Figure 2 is a diagram for describing a method of dividing a block by using a QTBTTT structure.
[0041] like Figure 2 As shown, the CTU can be first split into a QT structure. The quadtree splitting can be recursive until the size of the split block reaches the minimum block size (MinQTSize) of the leaf node allowed in QT. The first flag (QT_split_flag) indicating whether each node of the QT structure is split into four nodes of the lower layer is encoded by the entropy encoder 155 and sent to the video decoding device. When the leaf node of QT is not larger than the maximum block size (MaxBTSize) of the root node allowed in BT, the leaf node can be further split into at least one of the BT structure or the TT structure. There can be multiple splitting directions in the BT structure and / or the TT structure. For example, there can be two directions, namely, the direction of horizontally splitting the blocks of the corresponding node and the direction of vertically splitting the blocks of the corresponding node. As Figure 2 As shown, when MTT splitting starts, a second flag (mtt_split_flag) indicating whether to split a node and a flag further indicating a split direction (vertical or horizontal) and / or a flag indicating a split type (binary or trifurcated) if the node is split are encoded by the entropy encoder 155 and sent to the video decoding device.
[0042] Alternatively, before encoding the first flag (QT_split_flag) indicating whether each node is split into four nodes of the lower layer, the CU split flag (split_cu_flag) indicating whether to split the node may also be encoded. When the value of the CU split flag (split_cu_flag) indicates that each node is not split, the block of the corresponding node becomes a leaf node in the split tree structure and becomes a CU as a basic unit of encoding. When the value of the CU split flag (split_cu_flag) indicates that each node is split, the video encoding device first starts encoding the first flag through the above scheme.
[0043] When QTBT is used as another example of a tree structure, there may be two types, namely, a type in which the block of the corresponding node is horizontally split into two blocks of the same size (i.e., symmetrical horizontal splitting) and a type in which the block of the corresponding node is vertically split into two blocks of the same size (i.e., symmetrical vertical splitting). A split flag (split_flag) indicating whether each node of the BT structure is split into blocks of the lower layer and split type information indicating the split type are encoded by the entropy encoder 155 and passed to the video decoding device. At the same time, a type in which the block of the corresponding node is split into two blocks that are asymmetric to each other may be presented in addition. The asymmetric form may include a form in which the block of the corresponding node is split into two rectangular blocks having a size ratio of 1:3, or may also include a form in which the block of the corresponding node is split in a diagonal direction.
[0044] The CU may have different sizes according to the QTBT or QTBTTT split from the CTU. In the following, the block corresponding to the CU to be encoded or decoded (i.e., the leaf node of the QTBTTT) is referred to as the "current block". Due to the QTBTTT partitioning, the shape of the current block can be a rectangular shape in addition to a square shape.
[0045] The predictor 120 predicts the current block to generate a predicted block. The predictor 120 includes an intra predictor 122 and an inter predictor 124.
[0046] In general, each current block in a picture can be predictively encoded and decoded. Typically, the prediction of the current block can be performed using intra-frame prediction techniques (using data from the picture including the current block) or inter-frame prediction techniques (using data from an already encoded picture before the picture including the current block). Inter-frame prediction includes both unidirectional prediction and bidirectional prediction.
[0047] The intra-frame predictor 122 predicts the pixels in the current block by using the pixels (reference pixels) located adjacent to the current block in the current picture including the current block. According to the prediction direction, there are multiple intra-frame prediction modes. For example, as shown in FIG. 3A, the multiple intra-frame prediction modes may include 2 non-directional modes including a plane mode and a DC mode, and may include 65 directional modes. The adjacent pixels and the arithmetic equation to be used are defined differently according to each prediction mode.
[0048] In order to perform effective directional prediction for the current block having a rectangular shape, a directional mode (#67 to #80, intra prediction mode #-1 to #-14) as shown by the dotted arrows in FIG. 3B can be used in addition. The directional mode can be referred to as a "wide-angle intra prediction mode". In FIG. 3B, the arrow indicates the corresponding reference sample used for prediction and does not indicate the prediction direction. The prediction direction is opposite to the direction indicated by the arrow. When the current block has a rectangular shape, the wide-angle intra prediction mode is a mode in which prediction is performed in the opposite direction to a specific directional mode without additional bit transmission. In this case, in the wide-angle intra prediction mode, some wide-angle intra prediction modes that can be used for the current block can be determined by the ratio of the width and height of the current block having a rectangular shape. For example, when the current block has a rectangular shape with a height less than the width, a wide-angle intra prediction mode (intra prediction mode #67 to #80) with an angle less than 45 degrees can be used. When the current block has a rectangular shape with a width greater than the height, a wide-angle intra prediction mode with an angle greater than -135 degrees can be used.
[0049] The intra-frame predictor 122 may determine an intra-frame prediction to be used for encoding the current block. In some instances, the intra-frame predictor 122 may encode the current block by using a plurality of intra-frame prediction modes, and may further select an appropriate intra-frame prediction mode to be used from the tested modes. For example, the intra-frame predictor 122 may calculate a rate-distortion value by using a rate-distortion analysis performed for a plurality of tested intra-frame prediction modes, and may further select an intra-frame prediction mode having the best rate-distortion characteristics from the tested modes.
[0050] The intra-frame predictor 122 selects an intra-frame prediction mode from among a plurality of intra-frame prediction modes and predicts the current block by using adjacent pixels (reference pixels) and an arithmetic equation determined according to the selected intra-frame prediction mode. Information on the selected intra-frame prediction mode is encoded by the entropy encoder 155 and is transferred to the video decoding device.
[0051] The inter-frame predictor 124 generates a prediction block for the current block by using a motion compensation process. The inter-frame predictor 124 searches for a block most similar to the current block in a reference picture that is encoded and decoded earlier than the current picture, and generates a prediction block for the current block by using the searched block. In addition, a motion vector (MV) is generated, which corresponds to the displacement between the current block in the current picture and the prediction block in the reference picture. Typically, motion estimation is performed for the luminance component, and the motion vector calculated based on the luminance component is used for both the luminance component and the chrominance component. The motion information includes information about the reference picture and information about the motion vector used to predict the current block, which is encoded by the entropy encoder 155 and passed to the video decoding device.
[0052] The inter-frame predictor 124 may also perform interpolation on a reference picture or a reference block in order to increase the accuracy of the prediction. In other words, a subsample is interpolated between two consecutive integer samples by applying a filter coefficient to a plurality of consecutive integer samples including two integer samples. When the process of searching for a block most similar to the current block is performed for the interpolated reference picture, the motion vector may be represented with decimal unit precision rather than integer sample unit precision. The precision or resolution of the motion vector may be set differently for each target block to be encoded (e.g., a unit such as a slice, tile, CTU, CU, etc.). When such an adaptive motion vector resolution (AMVR) is applied, information about the motion vector resolution to be applied to each target block should be sent for each target block. For example, when the target block is a CU, information about the motion vector resolution applied to each CU is sent. The information about the motion vector resolution may be information representing the precision of the motion vector difference to be described below.
[0053] Meanwhile, the inter-frame predictor 124 may perform inter-frame prediction by using bidirectional prediction. In the case of bidirectional prediction, two reference pictures and two motion vectors representing the block position most similar to the current block in each reference picture are used. The inter-frame predictor 124 selects a first reference picture and a second reference picture from a reference picture list 0 (RefPicList0) and a reference picture list 1 (RefPicList1), respectively. The inter-frame predictor 124 also searches for a block most similar to the current block in the corresponding reference picture to generate a first reference block and a second reference block. In addition, a prediction block of the current block is generated by averaging or weighted averaging the first reference block and the second reference block. In addition, motion information is passed to the entropy encoder 155, which includes information about two reference pictures used to predict the current block and includes information about two motion vectors. Here, the reference picture list 0 may be composed of pictures whose display order is before the current picture in the pre-reconstructed pictures, and the reference picture list 1 may be composed of pictures whose display order is after the current picture in the pre-reconstructed pictures. However, despite this, it is not necessary to be limited to this, and the reference picture list 0 may additionally include pre-reconstructed pictures whose display order is after the current picture. In contrast, reference picture list 1 may additionally include pre-reconstructed pictures preceding the current picture.
[0054] In order to minimize the number of bits consumed to encode motion information, various methods can be used.
[0055] For example, when the reference picture and motion vector of the current block are the same as those of the adjacent block, information capable of identifying the adjacent block is encoded to transfer the motion information of the current block to the video decoding device. This method is called merge mode.
[0056] In the merge mode, the inter predictor 124 selects a predetermined number of merge candidate blocks (hereinafter, referred to as “merge candidates”) from the neighboring blocks of the current block.
[0057] As neighboring blocks for deriving merge candidates, we can use Figure 4 All or some of the left block A0, lower left block A1, upper block B0, upper right block B1, and upper left block B2 adjacent to the current block in the current picture as shown in . In addition, blocks located in a reference picture other than the current picture in which the current block is located (which may be the same as or different from the reference picture used to predict the current block) may also be used as merge candidates. For example, a block located at the same position as the current block or a block adjacent to a block located at the same position in the reference picture may be additionally used as a merge candidate. If the number of merge candidates selected by the method described above is less than the preset number, a zero vector is added to the merge candidate.
[0058] The inter-frame predictor 124 configures a merge list including a predetermined number of merge candidates by using adjacent blocks. A merge candidate to be used as motion information of the current block is selected from the merge candidates 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 entropy encoder 155 and is transmitted to the video decoding device.
[0059] Merge skip mode is a special case of merge mode. After quantization, when all transform coefficients for entropy coding are close to zero, only the neighbor block selection information is transmitted without the residual signal. By using merge skip mode, relatively high coding efficiency can be achieved for images with slight motion, static images, screen content images, etc.
[0060] Hereinafter, the merge mode and the merge skip mode are collectively referred to as the merge / skip mode.
[0061] Another method for encoding motion information is the Advanced Motion Vector Prediction (AMVP) mode.
[0062] In the AMVP mode, the inter-frame predictor 124 derives a motion vector predictor candidate for a motion vector of the current block by using neighboring blocks of the current block. As neighboring blocks for deriving motion vector predictor candidates, Figure 4 All or some of the left block A0, lower left block A1, upper block B0, upper right block B1, and upper left block B2 adjacent to the current block in the current picture shown in . In addition, blocks located in a reference picture other than the current picture in which the current block is located (which may be the same as or different from the reference picture used to predict the current block) may also be used as adjacent blocks for deriving motion vector predictor candidates. For example, a block located at the same position as the current block in the reference picture or a block adjacent to a block located at the same position may be used. If the number of motion vector candidates selected by the method described above is less than a preset number, a zero vector is added to the motion vector candidates.
[0063] The inter predictor 124 derives motion vector predictor candidates by using motion vectors of neighboring blocks, and determines a motion vector predictor for a motion vector of a current block by using the motion vector predictor candidates. In addition, a motion vector difference is calculated by subtracting the motion vector predictor from the motion vector of the current block.
[0064] The motion vector predictor can be obtained by applying a predefined function (e.g., median and average calculation, etc.) to the motion vector predictor candidate. In this case, the video decoding device also knows the predefined function. In addition, since the neighboring blocks used to derive the motion vector predictor candidate are blocks that have completed encoding and decoding, the video decoding device may also already know the motion vectors of the neighboring blocks. Therefore, the video encoding device does not need to encode the information for identifying the motion vector predictor candidate. Therefore, in this case, the information about the motion vector difference and the information about the reference picture used to predict the current block are encoded.
[0065] Meanwhile, the motion vector predictor may also be determined by selecting any one of the motion vector predictor candidates. In this case, in addition to information about the motion vector difference and information about the reference picture used to predict the current block, information for identifying the selected motion vector predictor candidate is encoded.
[0066] The subtractor 130 generates a residual block by subtracting a prediction block generated by the intra predictor 122 or the inter predictor 124 from the current block.
[0067] The transformer 140 transforms the residual signal in the residual block having the pixel value of the spatial domain into the transform coefficient of the frequency domain. The transformer 140 may transform the residual signal in the residual block by using the total size of the residual block as the transform unit, or may divide the residual block into a plurality of sub-blocks and may perform the transform by using the sub-block as the transform unit. Alternatively, the residual block is divided into two sub-blocks, which are a transform block and a non-transform block, so that the residual signal is transformed by using only the transform block sub-block as the transform unit. Here, the transform block sub-block may be one of two rectangular blocks having a size ratio of 1:1 based on the horizontal axis (or vertical axis). In this case, the flag (cu_sbt_flag) indicates that only the sub-block is transformed, and the directional (vertical / horizontal) information (cu_sbt_horizontal_flag) and / or the position information (cu_sbt_pos_flag) are encoded by the entropy encoder 155 and sent to the video decoding device. In addition, the size of the transform block subblock may have a size ratio of 1:3 based on the horizontal axis (or vertical axis). In this case, a flag (cu_sbt_quad_flag) distinguishing the corresponding partition is additionally encoded by the entropy encoder 155 and transmitted to the video decoding apparatus.
[0068] At the same time, the transformer 140 can perform transformations on the residual block separately in the horizontal direction and the vertical direction. For the transformation, different types of transformation functions or transformation matrices can be used. For example, paired transformation functions for horizontal transformation and vertical transformation can be defined as a multiple transformation set (MTS). The transformer 140 can select a transformation function pair with the highest transformation efficiency in the MTS, and can transform each residual block in the horizontal and vertical directions. Information about the transformation function pair in the MTS (mts_idx) is encoded by the entropy encoder 155 and sent to the video decoding device.
[0069] The quantizer 145 quantizes the transform coefficients output from the transformer 140 using the quantization parameters and outputs the quantized transform coefficients to the entropy encoder 155. The quantizer 145 may also immediately quantize the relevant residual block without transforming any block or frame. The quantizer 145 may also apply different quantization coefficients (scaling values) according to the position of the transform coefficients in the transform block. The quantization matrix applied to the quantized transform coefficients arranged in 2 dimensions may be encoded and sent to the video decoding device.
[0070] The rearrangement unit 150 may perform rearrangement on coefficient values of the quantized residual value.
[0071] The rearrangement unit 150 can convert the 2D coefficient array into a 1D coefficient sequence by using coefficient scanning. For example, the rearrangement unit 150 can output a 1D coefficient sequence by scanning the DC coefficient into a high frequency domain coefficient using a zigzag scan or a diagonal scan. Depending on the size of the transform unit and the intra-frame prediction mode, the zigzag scan can also be replaced by a vertical scan that scans the 2D coefficient array in the column direction and a horizontal scan that scans the 2D block type coefficients in the row direction. In other words, depending on the size of the transform unit and the intra-frame prediction mode, the scanning method to be used can be determined among zigzag scanning, diagonal scanning, vertical scanning, and horizontal scanning.
[0072] The entropy encoder 155 generates a bitstream by encoding the sequence of 1D quantized transform coefficients output from the rearrangement unit 150 using various encoding schemes including context-based adaptive binary arithmetic coding (CABAC), Exponential Golomb, and the like.
[0073] In addition, the entropy encoder 155 encodes information related to block partitioning (such as CTU size, CTU partition mark, QT partition mark, MTT partition type, MTT partition direction, etc.) to allow the video decoding device to partition the block equally with the video encoding device. In addition, the entropy encoder 155 encodes information about the prediction type, which indicates whether the current block is encoded by intra-frame prediction or inter-frame prediction. The entropy encoder 155 encodes intra-frame prediction information (i.e., information about the intra-frame prediction mode) or inter-frame prediction information (merge index in the case of merge mode, and information about reference picture index and motion vector difference in the case of AMVP mode) according to the prediction type. In addition, the entropy encoder 155 encodes information related to quantization (i.e., information about quantization parameters and information about quantization matrices).
[0074] The inverse quantizer 160 dequantizes the quantized transform coefficient output from the quantizer 145 to generate a transform coefficient. The inverse transformer 165 transforms the transform coefficient output from the inverse quantizer 160 from the frequency domain to the spatial domain to reconstruct a residual block.
[0075] The adder 170 adds the reconstructed residual block and the prediction block generated by the predictor 120 to reconstruct the current block. When intra prediction is performed on a next-order block, pixels in the reconstructed current block may be used as reference pixels.
[0076] The loop filter unit 180 performs filtering on the reconstructed pixels in order to reduce block artifacts, ringing artifacts, blur artifacts, etc. generated due to block-based prediction and transform / quantization. The loop filter unit 180 as a loop filter may include all or some of the deblocking filter 182, the sample adaptive offset (SAO) filter 184, and the adaptive loop filter (ALF) 186.
[0077] The deblocking filter 182 filters the boundaries between the reconstructed blocks to remove block artifacts caused by block unit encoding / decoding, and the SAO filter 184 and ALF 186 perform additional filtering for the deblocked, filtered video. The SAO filter 184 and ALF 186 are filters for compensating for the difference between the reconstructed pixels and the original pixels, which is caused by lossy encoding and decoding. The SAO filter 184 applies the offset as a CTU unit to enhance the subjective image quality and coding efficiency. On the other hand, the ALF 186 performs block unit filtering and applies different filters to compensate for distortion by distinguishing the boundaries of the corresponding blocks and the degree of change. Information about the filter coefficients to be used for the ALF can be encoded and sent to the video decoding device.
[0078] The reconstructed blocks filtered by the deblocking filter 182, the SAO filter 184, and the ALF 186 are stored in the memory 190. When all blocks in one picture are reconstructed, the reconstructed picture may be used as a reference picture for inter-frame prediction of blocks within a picture to be encoded later.
[0079] The video encoding device may store a bit stream of encoded video data in a non-transitory storage medium, or transmit the bit stream to a video decoding device through a communication network.
[0080] Figure 5 is a functional block diagram of a video decoding device that can implement the technology of the present disclosure. Figure 5 A video decoding apparatus and components of the apparatus are described.
[0081] The video decoding apparatus may include an entropy decoder 510 , a rearrangement unit 515 , an inverse quantizer 520 , an inverse transformer 530 , a predictor 540 , an adder 550 , a loop filter unit 560 , and a memory 570 .
[0082] and Figure 1 Similar to the video encoding device of the present invention, each component of the video decoding device can be implemented as hardware or software or as a combination of hardware and software. In addition, the function of each component can be implemented as software, and a microprocessor can also be implemented to implement the function of the software corresponding to each component.
[0083] The entropy decoder 510 extracts information related to block partitioning by decoding a bit stream generated by the video encoding apparatus to determine a current block to be decoded, and extracts prediction information required to reconstruct the current block and information about a residual signal.
[0084] The entropy decoder 510 determines the size of the CTU by extracting information about the CTU size from a sequence parameter set (SPS) or a picture parameter set (PPS), and partitions the picture into CTUs of the determined size. In addition, the CTU is determined as the highest level of the tree structure, i.e., the root node, and partition information for the CTU can be extracted to partition the CTU using the tree structure.
[0085] For example, when a CTU is segmented using a QTBTTT structure, a first flag (QT_split_flag) associated with the segmentation of the QT is first extracted to segment each node into four nodes of the lower layer. In addition, for a node corresponding to a leaf node of the QT, a second flag (mtt_split_flag), a segmentation direction (vertical / horizontal), and / or a segmentation type (binary / tripartite) associated with the segmentation of the MTT are extracted to segment the corresponding leaf node into the MTT structure. As a result, each node below the leaf node of the QT is recursively segmented into a BT or TT structure.
[0086] As another example, when a CTU is split by using a QTBTTT structure, a CU split flag (split_cu_flag) indicating whether the CU is split is extracted. When the corresponding block is split, a first flag (QT_split_flag) may also be extracted. During the splitting process, for each node, 0 or more recursive MTT splits may occur after 0 or more recursive QT splits. For example, for a CTU, MTT splits may occur immediately, or conversely, multiple QT splits may occur only.
[0087] As another example, when the CTU is segmented using the QTBT structure, the first flag (QT_split_flag) related to the segmentation of the QT is extracted to segment each node into four nodes of the lower layer. In addition, the segmentation flag (split_flag) indicating whether the node corresponding to the leaf node of the QT is further segmented into BTs and the segmentation direction information are extracted.
[0088] Meanwhile, when the entropy decoder 510 determines the current block to be decoded by using the partitioning of the tree structure, the entropy decoder 510 extracts information about the prediction type indicating whether the current block is intra-predicted or inter-predicted. When the prediction type information indicates intra-prediction, the entropy decoder 510 extracts syntax elements of intra-prediction information (intra-prediction mode) for the current block. When the prediction type information indicates inter-prediction, the entropy decoder 510 extracts information representing syntax elements for inter-prediction information (i.e., motion vectors and reference pictures referenced by motion vectors).
[0089] Furthermore, the entropy decoder 510 extracts quantization-related information and extracts information about a quantized transform coefficient of the current block as information about a residual signal.
[0090] The rearrangement unit 515 may change the sequence of 1D quantized transform coefficients entropy-decoded by the entropy decoder 510 into a 2D coefficient array (ie, block) again in the reverse order of the coefficient scanning order performed by the video encoding device.
[0091] The inverse quantizer 520 dequantizes the quantized transform coefficients and dequantizes the quantized transform coefficients by using quantization parameters. The inverse quantizer 520 may also apply different quantization coefficients (scaling values) to the quantized transform coefficients arranged in 2D. The inverse quantizer 520 may perform dequantization by applying a matrix of quantization coefficients (scaling values) from a video encoding device to a 2D array of quantized transform coefficients.
[0092] The inverse transformer 530 generates a residual block for the current block by inversely transforming the dequantized transform coefficients from the frequency domain into the spatial domain to reconstruct a residual signal.
[0093] In addition, when the inverse transformer 530 inversely transforms a partial block (sub-block) of the transform block, the inverse transformer 530 extracts a flag (cu_sbt_flag) of transforming only the sub-block of the transform block, direction (vertical / horizontal) information (cu_sbt_horizontal_flag) of the sub-block, and / or position information (cu_sbt_pos_flag) of the sub-block. The inverse transformer 530 also inversely transforms the transform coefficient of the corresponding sub-block from the frequency domain to the spatial domain to reconstruct the residual signal, and fills the block that is not inversely transformed with a value of "0" as the residual signal to generate a final residual block for the current block.
[0094] In addition, when MTS is applied, the inverse transformer 530 determines a transform index or a transform matrix applied in each of the horizontal and vertical directions by using the MTS information (mts_idx) transmitted from the video encoding device. The inverse transformer 530 also performs inverse transform on the transform coefficients in the transform block in the horizontal and vertical directions by using the determined transform function.
[0095] The predictor 540 may include an intra predictor 542 and an inter predictor 544. The intra predictor 542 is activated when the prediction type of the current block is intra prediction, and the inter predictor 544 is activated when the prediction type of the current block is inter prediction.
[0096] The intra predictor 542 determines an intra prediction mode of a current block among a plurality of intra prediction modes according to the syntax element of the intra prediction mode extracted from the entropy decoder 510. The intra predictor 542 also predicts the current block by using neighboring reference pixels of the current block according to the intra prediction mode.
[0097] The inter predictor 544 determines a motion vector of a current block and a reference picture referred to by the motion vector by using a syntax element for the inter prediction mode extracted from the entropy decoder 510 .
[0098] The adder 550 reconstructs the current block by adding the residual block output from the inverse transformer 530 and the prediction block output from the inter predictor 544 or the intra predictor 542. When intra prediction is performed on a block to be decoded later, pixels within the reconstructed current block are used as reference pixels.
[0099] The loop filter unit 560 as an in-loop filter may include a deblocking filter 562, an SAO filter 564, and an ALF 566. The deblocking filter 562 performs deblocking filtering on the boundary between the reconstructed blocks to remove block artifacts generated due to block unit decoding. The SAO filter 564 and the ALF 566 perform additional filtering on the reconstructed blocks after deblocking filtering to compensate for the difference between the reconstructed pixels and the original pixels, which is generated due to lossy coding and decoding. The filter coefficients of the ALF are determined by using information about the filter coefficients decoded from the bitstream.
[0100] The reconstructed blocks filtered by the deblocking filter 562, the SAO filter 564, and the ALF 566 are stored in the memory 570. When all blocks in one picture are reconstructed, the reconstructed picture can be used as a reference picture for inter-frame prediction of blocks in a picture to be encoded later.
[0101] As described above, the present disclosure in some embodiments relates to encoding and decoding video images. More specifically, the present disclosure provides a video encoding and decoding method and apparatus, which derives and stores motion vector information of an intra-frame prediction block for later use.
[0102] The following embodiments may be performed by the predictor 120 in the video encoding device. The following embodiments may also be performed by the predictor 540 in the video decoding device.
[0103] In the prediction of the current block, the video encoding device can generate signaling information associated with the present embodiment in terms of optimizing rate distortion. The video encoding device can use the entropy encoder 155 to encode the signaling information and transmit the encoded signaling information to the video decoding device. The video decoding device can use the entropy decoder 510 to decode the signaling information associated with the prediction of the current block from the bitstream.
[0104] In the following description, the term “target block” may be used interchangeably with a current block or a coding unit (CU), or may refer to a certain block of a coding unit.
[0105] In addition, a value of true for a flag indicates that the flag is set to 1. In addition, a value of false for a flag indicates that the flag is set to 0.
[0106] Figure 6 is a block diagram showing a video encoding apparatus according to an embodiment of the present disclosure.
[0107] and Figure 1 Compared with the example Figure 6 The video encoding device in the example further includes a motion vector field compressor 610.
[0108] Figure 7 is a block diagram showing an image decoding apparatus according to an embodiment of the present disclosure.
[0109] and Figure 5 Compared with the example, Figure 7 The image decoding device in the example further includes a motion vector field compressor 710.
[0110] In order to describe the operation of the motion vector field compressor 610 added in the video encoding apparatus, the operation of the predictor 120 is first described. Meanwhile, the operation of the motion vector field compressor 710 added to the image decoding apparatus is the same as that of the motion vector field compressor 610 included in the video encoding apparatus, and thus a description thereof is omitted.
[0111] Hereinafter, in order to describe the operation of the motion vector field compressor 610, the operation of the predictor 120 is first described.
[0112] Figure 8 is a block diagram illustrating a predictor according to an embodiment of the present disclosure.
[0113] The predictor 120 may generate a prediction block and a motion vector field by receiving the reconstructed adjacent samples of the current frame, the reconstructed picture of the previous frame, and the compressed motion vector field and performing prediction on the current block. The subtractor 130 generates a residual block by subtracting the generated prediction block from the original block generated by the picture segmenter 110. The generated residual block may be input to the transformer 140. The adder 170 adds the prediction block and the reconstructed residual block generated by the inverse transformer 165 to reconstruct the current block. The reconstructed current block may be input to the loop filter unit 180. At the same time, the predictor 120 may transmit the generated motion vector to the motion vector field compressor 610.
[0114] The predictor 120 may further include a decoded picture buffer 810 , a motion vector inverse quantizer 820 , and a motion vector memory 830 in addition to the intra predictor 122 and the inter predictor 124 .
[0115] The intra predictor 122 may generate a prediction block of the current block according to the intra prediction mode using the reconstructed neighboring samples. The predictor 120 may output the generated prediction block.
[0116] The decoded picture buffer 810 exists in the memory 190 and stores the reconstructed picture filtered by the loop filter unit 180. In addition, the decoded picture buffer 810 also stores the compressed motion vector field generated by the motion vector field compressor 610.
[0117] The motion vector inverse quantizer 820 receives the compressed motion vector field stored in the decoded picture buffer 810. The motion vector inverse quantizer 820 may dequantize the compressed motion vector field to reconstruct the motion vector field. The reconstructed motion vector field may be transmitted to the inter-frame predictor 124.
[0118] The inter-frame predictor 124 may receive the reconstructed picture, the reconstructed motion vector field, and the adjacent motion information, may perform inter-frame prediction, and may generate a prediction block of the current block. The predictor 120 may output the generated prediction block. In addition, the inter-frame predictor 124 may transmit the motion information for inter-frame prediction to the motion vector memory 830. Here, the motion information may include a prediction mode, a motion vector, a reference list index, etc. In addition, the position information and size information of the current block may be transmitted to the motion vector memory 830.
[0119] If the motion vector and the reference list index are stored in corresponding positions of the motion vector field, the inter predictor 124 can use the corresponding information as the neighboring motion information even if the prediction mode of the neighboring block is the intra prediction mode. In other words, the corresponding information can be used as the neighboring motion information in the process of generating a merge candidate list, an advanced motion vector predictor (AMVP) candidate list, an affine candidate list, etc.
[0120] The motion vector memory 830 receives the motion information, the block position and the size information and stores the motion information corresponding to the current block position in the motion vector field. Fig. 9 In an example, the motion vector memory 830 divides the current codec block area corresponding to the current block into grids of the motion vector field. The motion vector memory 830 may copy the prediction mode, the first motion vector, the second motion vector, and the reference list index included in the motion information of the current block, and then may store the copied motion information in each grid within the current codec block area of the motion vector field.
[0121] exist Fig. 9 In the example of , the lower diagram represents the current block, that is, the current codec block. In addition, the upper diagram represents the current codec block area, which is the area including the grid. Fig. 9 In the example of , the current codec block area includes four grids, and the four grid areas store the same motion information. Fig. 9 In the example, W mv represents the width of the grid, and H mv Indicates the height of the grid.
[0122] Fig.10 is a block diagram showing a predictor according to another embodiment of the present disclosure.
[0123] As described above, the predictor 120 may receive the reconstructed adjacent samples of the current frame, the reconstructed picture of the previous frame, and the compressed motion vector field, and perform prediction on the current block to generate a prediction block and a motion vector field. The subtractor 130 subtracts the generated prediction block from the original block generated by the picture segmenter 110 to generate a residual block. The generated residual block may be input to the transformer 140. The adder 170 adds the prediction block to the reconstructed residual block generated by the inverse transformer 165 to reconstruct the current block. The reconstructed current block may be input to the loop filter unit 180. At the same time, the predictor 120 may transmit the generated motion vector to the motion vector field compressor 610.
[0124] As described above, the predictor 120 may further include a decoded picture buffer 810 , a motion vector inverse quantizer 820 , and a motion vector memory 830 in addition to the intra predictor 122 and the inter predictor 124 .
[0125] The intra-frame predictor 122 may generate a prediction block of the current block according to the intra-frame prediction mode using the reconstructed adjacent samples. The predictor 120 may output the generated prediction block. Fig.10 As shown, the intra predictor 122 may transmit the size and position information of the current block to the motion vector memory 830. In addition, the intra predictor 122 may transmit the prediction mode to the motion vector memory 830.
[0126] The motion vector inverse quantizer 820 receives the compressed motion vector field stored in the decoded picture buffer 810. The motion vector inverse quantizer 820 may dequantize the compressed motion vector field to reconstruct the motion vector field. The reconstructed motion vector field may be transmitted to the inter-frame predictor 124.
[0127] The inter-frame predictor 124 may receive the reconstructed picture, the reconstructed motion vector field, and the adjacent motion information, and may perform inter-frame prediction to generate a prediction block of the current block. The predictor 120 may output the generated prediction block. In addition, the inter-frame predictor 124 may transmit the motion information used for inter-frame prediction to the motion vector memory 830. As described above, the motion information may include a prediction mode, a motion vector, a reference list index, etc. In addition, the position information and size information of the current block may be transmitted to the motion vector memory 830.
[0128] The motion vector memory 830 receives the motion information, the block position and the size information, and stores the motion information corresponding to the current block position in the motion vector field. Fig. 9In an example, the motion vector memory 830 divides the current codec block area corresponding to the current block into grids of the motion vector field. The motion vector memory 830 may copy the prediction mode, the first motion vector, the second motion vector, and the reference list index included in the motion information of the current block, and then may store the copied motion information in each grid within the current codec block area of the motion vector field.
[0129] At the same time, if the input prediction mode is an intra prediction mode, such as in Fig.11 In the example of , the motion vector memory 830 uses the motion information stored in the pre-encoded neighboring motion information area to derive the motion vector and reference list index of the current block. In addition, the motion vector memory 830 may store the motion information derived for the current block in a motion vector field.
[0130] As an example, as a method for generating a motion vector and a reference list index of a current block, a method for generating a merge candidate list generated for inter-frame prediction may be used. In other words, the motion vector memory 830 may generate a merge candidate list for the current block, and then the motion vector and the reference list index of the first candidate in the merge list may be used as the motion information of the current block.
[0131] As another example, the upper motion information or the left motion information may be used based on the shape of the current block. Here, the upper motion information and the left motion information may be the nearest upper motion information and the nearest left motion information adjacent to the upper left corner of the current block. For example, in terms of the shape of the block, if the horizontal length of the block is longer than the vertical length, the left motion information may be used as the motion information of the current block. Meanwhile, if the vertical length is longer than the horizontal length, the upper motion information may be used as the current motion information. If the shape of the current block is a square, the left motion information or the upper motion information may be used.
[0132] In the following, the operation of the motion vector field compressor 610 is described.
[0133] Fig.12 is a block diagram illustrating a motion vector field compressor according to an embodiment of the present disclosure.
[0134] The motion vector field compressor 610 collects input block-unit motion vectors to generate a picture-unit motion vector field and then compresses the picture-unit motion vector field. The motion vector field compressor 610 may transmit the compressed motion vector field to the decoded picture buffer 810.
[0135] The motion vector field compressor 610 may include a sampler 1210 and a motion vector quantizer 1220 .
[0136] The sampler 1210 may sample the motion vector field in a motion vector sampling unit and may transmit the sampled motion vector field to the motion vector quantizer 1220. Fig.13 In an example, sampling may be performed in horizontal and vertical units that are twice larger than the units of the motion vector field. Here, the position of the motion vector field sampled in motion vector sampling units may be the upper left corner. For example, the unit of the motion vector field may be 4×4, and the motion vector sampling unit may be 8×8. In other words, the motion vector field compressor 610 may downsample the motion vector field by two times, and then the downsampled motion vector field may be stored in the decoded picture buffer 810. Fig.13 In the example, W mvf represents the width of the motion vector sampling unit, and H mvf Indicates the height of the motion vector sampling unit.
[0137] The motion vector quantizer 1220 may perform compression by quantizing the size of the motion vector included in the sampled motion vector field. The motion vector field compressor 610 may output the compressed motion vector field to store the compressed motion vector field in the decoded picture buffer 810.
[0138] Fig.14 is a block diagram showing a motion vector field compressor according to another embodiment of the present disclosure.
[0139] In addition to the sampler 1210 and the motion vector quantizer 1220 , the motion vector field compressor 610 may also include an intra-prediction region filler 1410 .
[0140] As in Fig.13 In an example, the sampler 1210 may sample the motion vector field in motion vector sampling units and may transmit it to the intra prediction region filler 1410 .
[0141] The intra prediction region filler 1410 may perform filling for a region in which intra prediction is performed in the sampled motion vector field using motion information included in the adjacent motion information region. Fig.15 In the example of generating motion information at position a, the intra-frame prediction area filler 1410 can use the motion information at positions A, B, C and D.
[0142] As an example, a weighted sum based on distance can be used as a method for generating a motion vector based on motion information. Fig.15When the weighted sum method is used, the intra prediction region filler 1410 may normalize the sizes of all motion vectors based on the difference between the picture sequence number (POC) of the current picture and the POC of the reference picture, and then may perform distance-based weighted summation of the normalized motion vectors to generate a motion vector of the intra prediction region.
[0143] In addition, a reference list index of the motion information used in the above-mentioned weighted summation can be used as a reference list index of the weighted motion vector. Here, the intra-frame prediction area filler 1410 can determine whether the adjacent motion information is available in a preset order, and then select the first available motion information. Thereafter, the intra-frame prediction area filler 1410 can set the reference list index of the weighted motion vector to the reference list index of the selected motion information. Here, the preset order can be determined based on the above-mentioned distance. Alternatively, the preset order can be the order of the top, left, bottom and right of the intra-frame prediction area. Alternatively, the preset order can be the order of the top, bottom, left and right of the intra-frame prediction area.
[0144] As another example, motion information of a distance-based nearest neighboring motion information region may be used as the motion information of the intra prediction region.
[0145] The decoded picture buffer 810 may receive and store the reconstructed current picture and the compressed motion vector field. The stored picture and motion vector field may be transmitted to the predictor 120 for later picture encoding and decoding.
[0146] In the following, the use of Fig.16 and Fig.17 The diagram illustrates a method of encoding / decoding a current block using intra prediction or inter prediction.
[0147] Fig.16 is a flowchart illustrating a method of encoding a current block by a video encoding device according to an embodiment of the present disclosure.
[0148] The video encoding apparatus obtains a compressed motion vector field and a reconstructed picture from a decoded picture buffer (S1600).
[0149] The video encoding apparatus dequantizes the compressed motion vector field to generate a reconstructed motion vector field (S1602).
[0150] The video encoding apparatus generates a prediction block of the current block according to intra prediction, or generates a prediction block and motion information based on inter prediction (S1604). Here, the motion information includes a prediction mode, a motion vector, and a reference list index.
[0151] The video encoding device can use the reconstructed adjacent samples to generate a prediction block of the current block according to intra-frame prediction. Alternatively, the video encoding device can use the reconstructed picture, the reconstructed motion vector field and the adjacent motion information to generate a prediction block and motion information of the current block based on inter-frame prediction.
[0152] The video encoding device stores the motion information corresponding to the position of the current block in the motion vector field of the current block (S1606). In order to store the motion information at the position of the current block, the video encoding device may use a prediction mode based on intra-frame prediction or motion information based on inter-frame prediction, the position information of the current block, and the size information of the current block.
[0153] When generating a prediction block based on intra-frame prediction, the video encoding device may use the adjacent motion information to generate the motion information of the current block. As an example, the video encoding device may use the adjacent motion information to generate a merge candidate list of the current block, and then set the motion information of the current block to the motion information of the first candidate in the merge candidate list.
[0154] As another example, the video encoding device can set the motion information of the current block to the upper motion information or the left motion information based on the shape of the current block. Here, the positions of the upper motion information and the left motion information can be based on the uppermost and the leftmost of the upper left corner of the current block.
[0155] The video encoding apparatus compresses the motion vector field of the current block (S1608).
[0156] First, the video encoding apparatus samples a motion vector field in motion vector sampling units. Thereafter, the video encoding apparatus quantizes the sampled motion vector field to generate a compressed motion vector field.
[0157] In addition, the video encoding apparatus may fill the motion information of the intra prediction region for performing intra prediction in the sampled motion vector field using the motion information included in the adjacent motion information region.
[0158] As an example, the video encoding device first normalizes the size of the motion vector included in the adjacent motion information area based on the difference between the POC of the current picture and the POC of the reference picture. Thereafter, the video encoding device may perform weighted summation on the normalized motion vector based on the distance between the intra-frame prediction area and the adjacent motion information area to generate motion information of the intra-frame prediction area. In addition, the video encoding device may determine the availability of adjacent motion information in a preset order, may select the first available motion information, and then may set the reference list index of the intra-frame prediction area to the reference list index of the selected motion information.
[0159] As another example, the video encoding apparatus may set the motion information of the intra prediction region to the motion information of the nearest region among the neighboring motion information regions.
[0160] The video encoding apparatus stores the compressed motion vector field in a decoded picture buffer (S1610).
[0161] The video encoding apparatus subtracts the prediction block from the current block to generate a residual block (S1612).
[0162] The video encoding apparatus encodes the residual block (S1614).
[0163] In addition, the video encoding device can generate a reconstructed residual block based on the encoded residual block, and then add the reconstructed residual block and the prediction block to generate a reconstructed block of the current block. The video encoding device can apply a loop filter to a frame composed of the reconstructed blocks to reconstruct the current picture, and then store the reconstructed current picture in a decoded picture buffer.
[0164] Fig.17 is a flowchart illustrating a method for decoding a current block by a video decoding device according to an embodiment of the present disclosure.
[0165] The video decoding apparatus decodes a residual block of a current block from a bitstream (S1700).
[0166] The video decoding device obtains the compressed motion vector field and the reconstructed picture from the decoded picture buffer (S1702).
[0167] The video decoding apparatus dequantizes the compressed motion vector field to generate a reconstructed motion vector field (S1704).
[0168] The video decoding apparatus generates a prediction block of the current block based on intra prediction, or generates a prediction block and motion information based on inter prediction (S1706). Here, the motion information includes a prediction mode, a motion vector, and a reference list index.
[0169] The video decoding device can generate a prediction block of the current block based on intra-frame prediction using reconstructed adjacent samples. Alternatively, the video decoding device can generate a prediction block and motion information of the current block based on inter-frame prediction using a reconstructed picture, a reconstructed motion vector field and adjacent motion information.
[0170] The video decoding device stores the motion information corresponding to the position of the current block in the motion vector field of the current block (S1708). In order to store the motion information at the position of the current block, the video decoding device may use a prediction mode based on intra-frame prediction or motion information based on inter-frame prediction, the position information of the current block, and the size information of the current block.
[0171] The video decoding apparatus compresses a motion vector field of a current block (S1710).
[0172] First, the video decoding apparatus samples a motion vector field in motion vector sampling units, and then quantizes the sampled motion vector field to generate a compressed motion vector field.
[0173] The video decoding apparatus stores the compressed motion vector field in a decoded picture buffer (S1712).
[0174] The video decoding apparatus adds the residual block and the prediction block to generate a reconstructed block (S1714).
[0175] In addition, the video decoding apparatus may reconstruct the current picture by applying the loop filter to the frame including the reconstructed block, and may then store the reconstructed current picture in a decoded picture buffer.
[0176] Although the steps in each flowchart are described as being performed sequentially, these steps are merely illustrative of the technical concepts of some embodiments of the present disclosure. Therefore, a person of ordinary skill in the art to which the present disclosure belongs can perform the steps by changing the order described in each figure or by performing two or more steps in parallel. Therefore, the steps in each flowchart are not limited to the time sequence shown.
[0177] It should be understood that the above description presents illustrative embodiments that can be implemented in various other ways. The functions described in some embodiments can be implemented by hardware, software, firmware and / or a combination thereof. It should also be understood that the functional components described in this disclosure are identified with "... units" to strongly emphasize the possibility of their independent implementation.
[0178] At the same time, the various methods or functions described in some embodiments may be implemented as instructions stored in a non-transitory recording medium that can be read and run by one or more processors. For example, the non-transitory recording medium may include various types of recording devices, in which data is stored in a form readable by a computer system. For example, the non-transitory recording medium may include storage media such as erasable programmable read-only memory (EPROM), flash drives, optical drives, magnetic hard drives, and solid-state drives (SSDs).
[0179] Although the embodiments of the present disclosure have been described for illustrative purposes, those skilled in the art to which the present disclosure belongs should recognize that various modifications, additions, and substitutions may be made without departing from the concept and scope of the present disclosure. Therefore, for the sake of brevity and clarity, the embodiments of the present disclosure have been described. The scope of the technical concept of the embodiments of the present disclosure is not limited by the diagrams. Therefore, those skilled in the art to which the present disclosure belongs should understand that the scope of the present disclosure should not be limited by the embodiments explicitly described above, but by the claims and their equivalents.
[0180] (reference numerals)
[0181] 120: Predictor
[0182] 155: Entropy Encoder
[0183] 510: Entropy Decoder
[0184] 540: Predictor
[0185] 610: Motion Vector Field Compressor
[0186] 710: Motion Vector Field Compressor
[0187] CROSS-REFERENCE TO RELATED APPLICATIONS
[0188] This application claims priority to and the benefit of Korean Patent Application No. 10-2022-0058737, filed on May 13, 2022, and Korean Patent Application No. 10-2023-0051377, filed on April 19, 2023, the entire contents of each of which are incorporated herein by reference.
Claims
1. A method for reconstructing a current block performed by a video decoding device, the method comprising: Get the compressed motion vector field and reconstructed picture from the decoded picture buffer; generating a reconstructed motion vector field by dequantizing the compressed motion vector field; Generate a prediction block of the current block based on intra-frame prediction using the reconstructed adjacent samples, or generate the prediction block and motion information based on inter-frame prediction using the reconstructed picture, the reconstructed motion vector field and adjacent motion information, wherein the motion information includes a prediction mode, a motion vector and a reference list index; as well as Motion information corresponding to the position of the current block is stored in a motion vector field of the current block based on a prediction mode according to the intra prediction or motion information according to the inter prediction, position information of the current block, and size information of the current block.
2. The method according to claim 1, wherein: Stored in the motion vector field include: Dividing a current codec block region corresponding to the current block into grids of the motion vector field; and The motion information of the current block is copied, and the copied motion information is stored in each grid.
3. The method according to claim 1, wherein: Stored in the motion vector field include: When the prediction block is generated according to the intra prediction, a merge candidate list of the current block is generated by using the neighboring motion information, and then the motion information of the current block is set to the motion information of the first candidate in the list.
4. The method according to claim 1, wherein: Stored in the motion vector field include: When generating the prediction block based on the intra prediction, setting the motion information of the current block to the upper motion information or the left motion information based on the shape of the current block, The positions of the upper motion information and the left motion information are based on the nearest upper and nearest left of the upper left corner of the current block.
5. The method according to claim 1, further comprising: compressing a motion vector field of the current block; as well as The compressed motion vector field is stored in the decoded picture buffer.
6. The method according to claim 5, wherein: Compressing the motion vector field comprises: sampling the motion vector field with a motion vector sampling unit; and The sampled motion vector field is quantized to generate the compressed motion vector field.
7. The method according to claim 6, wherein: Compressing the motion vector field further comprises: The motion information of the intra prediction region in which the intra prediction is performed in the sampled motion vector field is filled by using the motion information included in the adjacent motion information region.
8. The method according to claim 7, wherein: Filling the motion information includes: Based on the difference between the picture sequence number (POC) of the current picture and the POC of the reference picture, the size of the motion vector included in the adjacent motion information area is normalized, and then based on the distance between the intra-frame prediction area and the adjacent motion information area, the normalized motion vector is weighted summed to generate the motion vector of the intra-frame prediction area.
9. The method according to claim 8, wherein: Filling the motion information includes: The availability of neighboring motion information is checked in a preset order to select the first available motion information, and then the reference list index of the intra prediction area is set to the reference list index of the selected motion information.
10. The method according to claim 7, wherein: Filling the motion information includes: The motion information of the intra prediction region is set to the motion information of the nearest region among the adjacent motion information regions.
11. A method for encoding a current block performed by a video encoding device, the method comprising: Get the compressed motion vector field and reconstructed picture from the decoded picture buffer; generating a reconstructed motion vector field by dequantizing the compressed motion vector field; Generate a prediction block of the current block based on intra-frame prediction using the reconstructed adjacent samples, or generate the prediction block and motion information based on inter-frame prediction using the reconstructed picture, the reconstructed motion vector field and adjacent motion information, wherein the motion information includes a prediction mode, a motion vector and a reference list index; as well as Motion information corresponding to the position of the current block is stored in a motion vector field of the current block based on a prediction mode according to the intra prediction or motion information according to the inter prediction, position information of the current block, and size information of the current block.
12. The method according to claim 11, wherein: Stored in the motion vector field include: When the prediction block is generated according to the intra prediction, a merge candidate list of the current block is generated by using the neighboring motion information, and then the motion information of the current block is set to the motion information of the first candidate in the list.
13. The method according to claim 11, wherein: Stored in the motion vector field include: When generating the prediction block according to the intra prediction, the motion information of the current block is set to the upper motion information or the left motion information based on the shape of the current block, The positions of the upper motion information and the left motion information are based on the nearest upper and nearest left of the upper left corner of the current block.
14. The method according to claim 11, further comprising: compressing a motion vector field of the current block; as well as The compressed motion vector field is stored in the decoded picture buffer.
15. The method according to claim 14, wherein: Compressing the motion vector field comprises: sampling the motion vector field with a motion vector sampling unit; and The sampled motion vector field is quantized to generate the compressed motion vector field.
16. The method according to claim 15, wherein: Compressing the motion vector field further comprises: The motion information of the intra prediction region in which the intra prediction is performed in the sampled motion vector field is filled by using the motion information included in the adjacent motion information region.
17. A computer-readable recording medium storing a bit stream generated by a video encoding method, the video encoding method comprising: Get the compressed motion vector field and reconstructed picture from the decoded picture buffer; generating a reconstructed motion vector field by dequantizing the compressed motion vector field; Generate a prediction block of the current block based on intra-frame prediction using the reconstructed adjacent samples, or generate the prediction block and motion information based on inter-frame prediction using the reconstructed picture, the reconstructed motion vector field and adjacent motion information, wherein the motion information includes a prediction mode, a motion vector and a reference list index; as well as Motion information corresponding to the position of the current block is stored in a motion vector field of the current block based on a prediction mode according to the intra prediction or motion information according to the inter prediction, position information of the current block, and size information of the current block.