Adaptive coding method and device for intra mode based on block position
By adaptively generating and optimizing MPM lists based on block position, the problems of redundant modes in intra prediction are solved, and video encoding efficiency and quality are improved.
Patent Information
- Application Number
- CN202380037832.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-04-04
- Filing Date
- 2023-04-07
- Publication Date
- 2024-12-13
AI Technical Summary
The existing video encoding technology has problems with inefficiency in intra prediction, especially at image boundary blocks, which leads to inefficiency when encoding or decoding different prediction modes, and the existence of redundant modes, affecting video encoding efficiency and quality.
By adaptively generating the most likely mode list (MPM list) based on block location, removing the redundant prediction mode, and recombining the MPM list, to optimize the encoding and decoding methods of the intra prediction mode.
It improves video encoding efficiency, enhances video quality, reduces the impact of redundant mode, and improves the encoding and decoding efficiency of intra prediction mode.
Smart Images

Figure CN119137939A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a video encoding method and device for adaptive encoding of intra-frame mode based on block position. 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 a process for compression, the video data requires a large amount of hardware resources (including memory) to store or transmit the video data.
[0004] Thus, encoders are generally used to compress and store or transmit video data. A decoder receives 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), which have improved coding efficiency of 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. Thus, a new compression technology that provides higher encoding efficiency and improved image enhancement effect than existing compression technologies is needed.
[0006] Intra-frame prediction uses pixel information within the same picture to predict the pixel values of the current block to be encoded. When performing intra-frame prediction, one of multiple intra-frame prediction modes can be selected and used based on the characteristics of the picture to predict the current block. The encoder selects and uses one of the intra-frame prediction modes to encode the current block. The encoder can then pass information about the mode to the decoder.
[0007] HEVC technology uses a total of 35 intra-frame prediction modes for intra-frame prediction, including 33 angular modes with directionality and two non-angular modes without directionality. However, as the spatial resolution of the video increases from 720×480 to 2048×1024 or 8192×4096, the size of the prediction block increases accordingly, which requires adding more intra-frame prediction modes. Figure 3a As shown, the Versatile Video Coding (VVC) technique utilizes 67 intra prediction modes for intra prediction, which are further subdivided for intra prediction, allowing a wider variety of prediction directions than in the prior art.
[0008] At the same time, when performing intra prediction, the intra prediction mode corresponding to the current block is encoded separately. At this time, the encoder encodes the intra prediction mode as the most probable mode (MPM) or the MPM residual, which is called the MPM encoding method for the intra prediction mode. According to this method, when encoding a block in an intra prediction mode, the encoder uses the prediction mode of the neighboring blocks similar to the properties of selecting 6 MPM candidates based on the prediction mode of the neighboring blocks of the current block. The six MPM candidates are collectively referred to as the MPM list. First, if the intra prediction mode of the current block is included in the MPM list, the encoder encodes the MPM index corresponding to the intra prediction mode of the current block among the candidates included in the MPM list. On the other hand, if the intra prediction mode of the current block is not included in the MPM list, the encoder can encode the intra prediction mode for the current block by using the MPM residual combined with the excluded six MPM candidates.
[0009] However, if the current block is located at an image boundary (e.g., a boundary of a CTU, tile, slice, sub-picture, picture, etc.), all or some of the reference pixels located around the current block may not exist. In this case, the VVC technique uses padding to generate reference pixel values for empty positions, and then performs intra prediction as described above. In this process, inefficiencies in encoding (or decoding) each of the different prediction modes may occur, even though the same predictor is often generated by using different prediction modes. Therefore, in order to increase video coding efficiency and enhance video quality, it is necessary to provide an efficient method for encoding / decoding intra prediction modes. Summary of the invention
[0010]
Technical issues
[0011] The present invention seeks to provide a video encoding method and apparatus for adaptively encoding or decoding an intra prediction mode based on a position of a current block in intra prediction.
[0012] In addition, the present disclosure attempts to provide a video encoding method and apparatus for generating a most probable mode list (MPM list) based on block position by changing the MPM list using a predefined new method, removing redundant intra-frame modes, or a combination of using a predefined new method and removing redundant intra-frame modes.
[0013]
Technical solution
[0014] At least one aspect of the present invention provides a method for decoding an intra-frame prediction mode of a current block performed by a video decoding device. The method includes determining the type of the current block based on the position of the current block. The method also includes generating a most probable mode list (MPM list) including most probable mode candidates (MPM candidates). The method also includes determining a redundant prediction mode of a common predictor among the MPM candidates and based on the type of the current block. The method also includes determining a representative mode among the redundant prediction modes. The method also includes: reorganizing the MPM list by removing redundant prediction modes other than the representative mode.
[0015] Another aspect of the present invention provides a method for encoding an intra-frame prediction mode of a current block performed by a video encoding device. The method includes determining the type of the current block based on the position of the current block. The method also includes generating a most probable mode list (MPM list) including most probable mode candidates (MPM candidates). The method also includes determining a redundant prediction mode for generating a common predictor among the MPM candidates and based on the type of the current block. The method also includes determining a representative mode among the redundant prediction modes. The method also includes reorganizing the MPM list by removing redundant prediction modes other than the representative mode.
[0016] 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 determining the type of a current block based on the position of the current block. The video encoding method also includes generating a most probable mode list (MPM list) including most probable mode candidates (MPM candidates). The video encoding method also includes determining a redundant prediction mode of a common predictor among the MPM candidates and based on the type of the current block. The video encoding method also includes determining a representative mode among the redundant prediction modes. The video encoding method also includes reorganizing the MPM list by removing redundant prediction modes other than the representative mode.
[0017]
Beneficial Effects
[0018] As described above, the present disclosure provides a video encoding method and device for adaptively encoding or decoding an intra prediction mode according to the position of a current block, thereby improving video encoding efficiency and enhancing video quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 is a block diagram of a video encoding device that may implement the techniques of this disclosure.
[0020] Figure 2 A method for partitioning blocks using a quadtree plus binary tree ternary tree (QTBTTT) structure is described.
[0021] Figure 3a and 3b Multiple intra prediction modes are shown including a wide-angle intra prediction mode.
[0022] Figure 4 Shows the neighboring blocks of the current block.
[0023] Figure 5 is a block diagram of a video decoding device that may implement the techniques of this disclosure.
[0024] Figure 6 is a diagram showing the search order of reference samples.
[0025] Figure 7a and Figure 7b is a diagram illustrating generation of reference samples.
[0026] Figure 8 is a diagram showing pixels utilized in a most probable mode (MPM) configuration.
[0027] Figure 9a and Figure 9b is a diagram showing a predictor based on block position and prediction mode.
[0028] Fig.10 is a diagram illustrating encoding / decoding in an intra prediction mode according to at least one embodiment of the present disclosure.
[0029] Fig.11 is a diagram illustrating types of current blocks based on positions according to at least one embodiment of the present disclosure.
[0030] Fig.12 is a flowchart of a method for decoding intra mode based on block position according to at least one embodiment of the present invention.
[0031] Fig.13 is a diagram illustrating a preset mode of a block of type 1 according to at least one embodiment of the present disclosure.
[0032] Fig.14 is a diagram illustrating the composition of an MPM list according to at least one embodiment of the present disclosure.
[0033] Fig.15 is a flowchart of a method for combining MPM lists according to a predefined method according to at least one embodiment of the present disclosure.
[0034] Fig.16 is a diagram illustrating removal of redundant prediction modes according to at least one embodiment of the present disclosure.
[0035] Fig.17is a flowchart of a method for removing redundant prediction modes according to at least one embodiment of the present disclosure.
[0036] Fig.18 is a flowchart of a method of removing redundant prediction modes and adding new candidates according to at least one embodiment of the present disclosure.
[0037] Fig.19 The present invention is a flowchart of a method for removing redundant prediction modes according to another embodiment of the present invention. DETAILED DESCRIPTION
[0038] Hereinafter, some embodiments of the present disclosure are described in detail with reference to the accompanying drawings. In the following description, the same reference numerals represent the same elements, although the elements are shown in different drawings. In addition, in the following description of some embodiments, for the purpose of clarity and brevity, detailed descriptions of related known components and functions may be omitted when it is considered to obscure the subject matter of the present disclosure.
[0039] 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.
[0040] The encoding device may include a picture separator 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.
[0041] 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 execute the function of the software corresponding to each component.
[0042] A video is composed of one or more sequences including multiple pictures. Each picture is divided into multiple regions, and encoding is performed on each region. For example, a picture is split 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 split into one or more coding tree units (CTUs). In addition, each CTU is split into one or more coding units (CUs) through 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 the CU contained 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). Further, the information commonly applied to a tile or tile group can also be encoded as the syntax of the tile or tile group header. The syntax included in the SPS, PPS, slice header, tile, or tile group header may be referred to as a high-level syntax.
[0043] 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 device.
[0044] 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 encoding.
[0045] The tree structure may be a quadtree (QT), in which a higher node (or parent node) is divided into four lower nodes (or child nodes) of the same size. The tree structure may also be a binary tree (BT), in which a higher node is divided into two lower nodes. The tree structure may also be a ternary tree (TT), in which a higher node is divided into three lower nodes at a ratio of 1:2:1. The tree structure may also be a structure in which two or more of the QT structure, the BT structure, and the TT structure are mixed. For example, a quadtree plus a binary tree (QTBT) structure may be used, or a quadtree plus a binary tree ternary tree (QTBTTT) structure may be used. Here, a binary tree ternary tree (BTTT) is added to the tree structure to be referred to as a multi-type tree (MTT).
[0046] Figure 2 is a diagram for describing a method of partitioning a block by using a QTBTTT structure.
[0047] like Figure 2As shown, the CTU can be first split into a QT structure. The quadtree partitioning can be recursive until the size of the partitioned 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 divided into four nodes of the lower layer is encoded by the entropy encoder 155 and transmitted 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 divided into at least one of the BT structure or the TT structure. There may be multiple partitioning directions in the BT structure and / or the TT structure. For example, there may be two directions, namely, the direction in which the blocks of the corresponding node are horizontally divided and the direction in which the blocks of the corresponding node are vertically divided. As Figure 2 As shown, when MTT splitting starts, a second flag (mtt_split_flag) indicating whether a node is split and a flag further indicating the splitting direction (vertical or horizontal) and / or a flag indicating the splitting type (binary or ternary) if the node is split are encoded by the entropy encoder 155 and notified to the video decoding device with a signal.
[0048] Alternatively, before encoding the first flag (QT_split_flag) indicating whether each node is split into four nodes of the lower layer, a CU split flag (split_cu_flag) indicating whether the node is split 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.
[0049] 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 divided into two blocks of the same size (i.e., symmetrical horizontal division) and a type in which the block of the corresponding node is vertically divided into two blocks of the same size (i.e., symmetrical vertical division). 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 delivered 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 divided 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 divided in a diagonal direction.
[0050] A CU may have different sizes depending on the QTBT or QTBTTT split from a CTU. Hereinafter, a block corresponding to a CU to be encoded or decoded (i.e., a leaf node of a QTBTTT) is referred to as a "current block". Due to the QTBTTT split, the shape of the current block may be a rectangular shape in addition to a square shape.
[0051] 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.
[0052] In general, each of the current blocks in a picture may be predictively encoded. Typically, the prediction of the current block may be performed using intra-prediction techniques (using data from the picture including the current block) or inter-prediction techniques (using data from a picture coded before the picture including the current block). Inter-prediction includes both unidirectional prediction and bidirectional prediction.
[0053] The intra-frame predictor 122 predicts the pixels in the current block by using the pixels (reference pixels) located on the neighbors of 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, 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. Neighboring pixels and the arithmetic equations to be used are defined differently according to each prediction mode.
[0054] In order to perform effective directional prediction on the current block having a rectangular shape, a directional mode (#67 to #80, intra prediction mode #-1 to #-14) as illustrated by the dotted arrows in FIG. 3B may be additionally used. The directional mode may 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 a direction opposite 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 may 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 is available. 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 may be used.
[0055] The intra-frame predictor 122 may determine an intra-frame prediction to be used for encoding the current block. In some embodiments, 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 a test mode. For example, the intra-frame predictor 122 may calculate a rate-distortion value by using a rate-distortion analysis for a plurality of tested intra-frame prediction modes, and may further select an intra-frame prediction mode having the best rate-distortion characteristics in the test mode.
[0056] 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 about the selected intra-frame prediction mode is encoded by the entropy encoder 155 and delivered to the video decoding device.
[0057] 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 on the luminance component, and the motion vector calculated based on the luminance component is used for both the luminance component and the chrominance component. Motion information including information about the reference picture and information about the motion vector for predicting the current block is encoded by the entropy encoder 155 and delivered to the video decoding device.
[0058] 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, the subsamples between two consecutive integer samples are interpolated by applying the filter coefficients to a plurality of consecutive integer samples including two integer samples. When the process of searching for the block most similar to the current block is performed for the interpolated reference picture, the decimal unit precision may be used instead of the integer sample unit precision for the motion vector representation. The precision or resolution of the motion vector may be set differently for each target region to be encoded (e.g., units such as slices, tiles, CTUs, CUs, etc.). When this adaptive motion vector resolution (AMVR) is applied, information about the motion vector resolution to be applied to each target region should be signaled for each target region. For example, when the target region is a CU, information about the motion vector resolution applied to each CU is signaled. The information about the motion vector resolution may be information representing the precision of the motion vector difference to be described below.
[0059] 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 including information about two reference pictures for predicting the current block and including information about two motion vectors is delivered to the entropy encoder 155. Here, the reference picture list 0 may be composed of pictures before the current picture in the display order among the pre-reconstructed pictures, and the reference picture list 1 may be composed of pictures after the current picture in the display order among the pre-reconstructed pictures. However, although not particularly limited thereto, a pre-reconstructed picture after the current picture in the display order may be additionally included in the reference picture list 0. Conversely, a pre-reconstructed picture before the current picture may also be additionally included in the reference picture list 1.
[0060] In order to minimize the number of bits consumed for encoding motion information, various methods may be used.
[0061] For example, when the reference picture and motion vector of the current block are the same as those of the neighboring block, information capable of identifying the neighboring block is encoded to deliver the motion information of the current block to the video decoding device. This method is called merge mode.
[0062] 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.
[0063] As a neighboring block for deriving merge candidates, such as Figure 4 As illustrated in FIG, all or some of the left block A0, the lower left block A1, the upper block B0, the upper right block B1, and the upper left block B2 adjacent to the current block in the current picture may be used. Further, blocks other than the current picture where the current block is located, which are located within a reference picture (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 location as the current block or a block adjacent to the block located at the same location 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.
[0064] 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 delivered to the video decoding device.
[0065] 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 pictures with slight motion, still pictures, screen content pictures, etc.
[0066] Hereinafter, the merge mode and the merge skip mode are collectively referred to as the merge / skip mode.
[0067] Another method for encoding motion information is the Advanced Motion Vector Prediction (AMVP) mode.
[0068] In the AMVP mode, the inter-frame predictor 124 derives a motion vector predictor candidate for a motion vector of a current block by using neighboring blocks of the current block. As neighboring blocks for deriving motion vector predictor candidates, the same as in 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 illustrated in the figure. In addition, blocks other than the current picture where the current block is located, which are located in a reference picture (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, blocks co-located with the current block or blocks adjacent to co-located blocks within the reference picture may be used. If the number of motion vector candidates selected by the above method is less than the preset number, a zero vector is added to the motion vector candidates.
[0069] The inter predictor 124 derives a motion vector predictor candidate by using the motion vectors of the neighboring blocks, and determines a motion vector predictor for the motion vector of the current block by using the motion vector predictor candidate. In addition, a motion vector difference is calculated by subtracting the motion vector predictor from the motion vector of the current block.
[0070] The motion vector predictor can be obtained by applying a predefined function (e.g., center value and average value 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 for which encoding and decoding have been completed, 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. Thus, in this case, information about the motion vector difference and information about the reference picture used to predict the current block are encoded.
[0071] Meanwhile, the motion vector predictor may also be determined by selecting any one of the motion vector predictor candidates. In this case, information for identifying the selected motion vector predictor candidate is additionally encoded jointly with information about the motion vector difference and information about the reference picture used to predict the current block.
[0072] 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.
[0073] The transformer 140 converts the residual signal in the residual block having the pixel value in the spatial domain into a transform coefficient in 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 a transform unit, or may further divide the residual block into a plurality of sub-blocks, and may perform the transform by using the sub-block as a transform unit. Optionally, the residual block is divided into two sub-blocks, namely a transform region and a non-transform region, so as to transform the residual signal using only the transform region sub-block as a transform unit. Here, the transform region 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 signaled to the video decoding device. In addition, the size of the transform region sub-block 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) of partitioning the corresponding partition is additionally encoded by the entropy encoder 155 and notified to the video decoding apparatus by a signal.
[0074] Meanwhile, the transformer 140 may perform transformation on the residual block separately in the horizontal direction and the vertical direction. For the transformation, different types of transformation functions or transformation matrices may be used. For example, a pair of transformation functions for horizontal transformation and vertical transformation may be defined as a multiple transformation set (MTS). The transformer 140 may select a transformation function pair with the highest transformation efficiency in the MTS, and may transform the residual block in each of the horizontal and vertical directions. Information (mts_idx) of the transformation function pair in the MTS is encoded by the entropy encoder 155 and notified to the video decoding device with a signal.
[0075] The quantizer 145 quantizes the transform coefficients output from the transformer 140 using the quantization parameter and outputs the quantized transform coefficients to the entropy encoder 155. The quantizer 145 can also immediately quantize the relevant residual block without transforming any block or frame. The quantizer 145 can also apply different quantization coefficients (scaling values) according to the position of the transform coefficient in the transform block. The quantization matrix applied to the quantized transform coefficients arranged in 2 dimensions can be encoded and notified to the video decoding device with a signal.
[0076] The rearrangement unit 150 may perform rearrangement of coefficient values for the quantized residual value.
[0077] The rearrangement unit 150 may change the 2D coefficient array into a 1D coefficient sequence by using coefficient scanning. For example, the rearrangement unit 150 may output an ID 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 prediction mode, 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 may also be used instead of the zigzag scan. In other words, depending on the size of the transform unit and the intra prediction mode, the scanning method to be used may be determined among zigzag scanning, diagonal scanning, vertical scanning, and horizontal scanning.
[0078] The entropy encoder 155 generates a bitstream by encoding the sequence of ID-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.
[0079] In addition, the entropy encoder 155 encodes information related to block partitioning (such as CTU size, CTU split flag, QT split flag, MTT partition type, MTT partition direction, etc.) to allow the video decoding device to equally partition the block to the video encoding device. In addition, the entropy encoder 155 encodes information about the prediction type indicating 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 intra-frame prediction mode) or inter-frame prediction information (in the case of merge mode, merge index, and in the case of AMVP mode, information about reference picture index and motion vector difference) 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).
[0080] 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.
[0081] The adder 170 reconstructs the current block by adding the reconstructed residual block and the prediction block generated by the predictor 120. When intra prediction is performed on a next sequential block, pixels in the reconstructed current block may be used as reference pixels.
[0082] The loop filter unit 180 performs filtering on the reconstructed pixels in order to reduce block artifacts, ringing artifacts, blur artifacts, etc. that occur 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.
[0083] The deblocking filter 182 filters the boundaries between the reconstructed blocks to remove the block effects that occur due to block unit encoding / decoding, and the SAO filter 184 and the ALF 186 perform additional filtering for the deblocked filtered video. The SAO filter 184 and the ALF 186 are filters for compensating the difference between the reconstructed pixels and the original pixels, which occurs due to lossy encoding. The SAO filter 184 applies an offset as a CTU unit to enhance subjective picture quality and coding efficiency. On the other hand, the ALF 186 performs block unit filtering and applies different filters to compensate for distortion by dividing the boundaries of the corresponding blocks and the degree of variation. Information about the filter coefficients to be used for the ALF can be encoded and notified to the video decoding device with a signal.
[0084] 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 can be used as a reference picture for inter-frame prediction of blocks in a picture to be encoded later.
[0085] Figure 5 is a functional block diagram of a video decoding device that can implement the techniques of the present invention. Figure 5 , describing a video decoding apparatus and components of the apparatus.
[0086] The video decoding device 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 .
[0087] 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 execute the function of the software corresponding to each component.
[0088] The entropy decoder 510 extracts information related to block partitioning by decoding a bitstream generated by a 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.
[0089] 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 divides the picture into CTUs of a determined size. In addition, the CTU is determined to be the highest level of the tree structure, i.e., the root node, and the partition information of the CTU can be extracted to partition the CTU using the tree structure.
[0090] For example, when the CTU is divided using the QTBTTT structure, the first flag (QT_split_flag) related to the division of the QT is first extracted to divide each node into four nodes of the lower layer. In addition, for the node corresponding to the leaf node of the QT, the second flag (mtt_split_flag) related to the division of the MTT, the division direction (vertical / horizontal) and / or the division type (binary / ternary) are extracted to divide the corresponding leaf node into the MTT structure. As a result, each node below the leaf node of the QT is recursively split into a BT or TT structure.
[0091] As another embodiment, when a CTU is divided by using a QTBTTT structure, a CU split flag (split_cu_flag) indicating whether the CU is divided is extracted. When the corresponding block is divided, 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 splitting may occur immediately, or conversely, only multiple QT splits may occur.
[0092] For another example, when the CTU is split using the QTBT structure, the first flag (QT_split_flag) related to the splitting of the QT is extracted to split each node into four nodes of the lower layer. In addition, the split flag (split_flag) indicating whether the node corresponding to the leaf node of the QT is further split into BTs and the split direction information are extracted.
[0093] 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).
[0094] Furthermore, the entropy decoder 510 extracts quantization-related information and extracts information on a quantized transform coefficient of the current block as information on a residual signal.
[0095] 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.
[0096] 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 inverse quantization by applying a matrix (scaling value) of quantization coefficients from a video encoding device to a 2D array of quantized transform coefficients.
[0097] The inverse transformer 530 generates a residual block for the current block by reconstructing a residual signal by inversely transforming the dequantized transform coefficients from the frequency domain into the spatial domain.
[0098] In addition, when the inverse transformer 530 inversely transforms a partial region (sub-block) of the transform block, the inverse transformer 530 extracts a flag (cu_sbt_flag) that only the sub-block of the transform block is transformed, 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 region that is not inversely transformed with a value of "0" as the residual signal to generate a final residual block for the current block.
[0099] 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 MTS information (mts_idx) signaled 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.
[0100] 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.
[0101] The intra predictor 542 determines an intra prediction mode of a current block among a plurality of intra prediction modes according to a 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.
[0102] The inter predictor 544 determines a motion vector of a current block and a reference picture to which the motion vector refers by using a syntax element for the inter prediction mode extracted from the entropy decoder 510 .
[0103] 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.
[0104] The loop filter unit 560 as a 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 in order to remove the block effect that occurs due to block unit decoding. The SAO filter 564 and the ALF 566 perform additional filtering on the reconstructed blocks after deblocking filtering in order to compensate for the difference between the reconstructed pixels and the original pixels that occurs due to lossy encoding. The filter coefficients of the ALF are determined by using information about the filter coefficients decoded from the bitstream.
[0105] 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.
[0106] In some embodiments, the present invention relates to encoding and decoding a video image as described above. More specifically, the present invention provides a video encoding method and apparatus for adaptively encoding or decoding an intra-frame prediction mode based on the position of a current block in an intra-frame prediction of a current block. In addition, the present disclosure provides a video encoding method and apparatus for generating a maximum probability mode (MPM) list based on the position of a block, and for changing the MPM list by using a predefined new method, removing redundant intra-frame modes, or a combination of using a predefined new method and removing redundant intra-frame modes.
[0107] The following embodiments may be performed by the intra-frame predictor 122 in the video encoding apparatus. The following embodiments may also be performed by the intra-frame predictor 542 in the video decoding apparatus.
[0108] The video encoding device in the prediction of the current block may generate signaling information associated with the present embodiment in terms of rate-distortion optimization. The video encoding device may encode the signaling information using the entropy encoder 155 and transmit the encoded signaling information to the video decoding device. The video decoding device may decode the signaling information associated with the prediction of the current block from the bitstream using the entropy decoder 510.
[0109] 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 some regions of a coding unit.
[0110] In addition, a flag value of true indicates when the flag is set to 1. In addition, a flag value of false indicates when the flag is set to 0.
[0111] I-1. Reference pixel filling
[0112] Intra-frame prediction generates a predictor by referring to the neighboring pixels of the current block. The neighboring pixels to be referenced are called reference samples. Before performing intra-frame prediction, the video decoding device prepares reference samples. The video decoding device checks the availability of the reference sample for the position of the pixel to be referenced. If the reference sample does not exist, the pixel value according to the predetermined agreement between the video encoding device and the video decoding device is filled into the position of the pixel to be referenced. Then, by applying the filter to the prepared reference sample, the final reference sample can be generated.
[0113] In this case, the reference sample refUnfilt[x][y] before applying the filter may be generated as follows: In the following, refIdx represents the index of the reference line, and refW and refH represent the width and height of the reference area, respectively.
[0114] If all samples in refUnfilt[x][y] are not available for intra prediction, all values of refUnfilt[x][y] are set to 1<<(BitDepth-1). Here, x=-1-refIdx, y=-1-refIdx...refH-1, and x=-refIdx...refW-1, y=-1-refIdx.
[0115] On the other hand, if some refUnfilt[x][y] values are not available for intra prediction, the following method is applied.
[0116] If refUnfilt[-1-refIdx][refH-1] is not available, an available refUnfilt[x][y] is searched from "x=-1-refIdx, y=refH-1" to "x=-1-refIdx, y=-1-refIdx", and then from "x=-refIdx, y=-1-refIdx" to "x=refW-1, y=-1-refIdx". After terminating the search, refUnfilt[-1-refIdx][refH-1] is set to refUnfilt[x][y].
[0117] Further, if there are unavailable samples in the range of x=-1-refIdx, y=refH-2 . . . -1-refIdx, refUnfilt[x][y] is set to refUnfilt[x][y+1].
[0118] In addition, if there are unavailable samples in the range of x=-refIdx . . . refW-1, y=-1-refIdx, refUnfilt[x][y] is set to refUnfilt[x-1][y].
[0119] Figure 6 is a diagram showing the search order of reference samples.
[0120] like Figure 6 As shown in the example of , to check the availability of a reference sample, the video decoding device searches clockwise from the lower left pixel to the upper rightmost pixel.
[0121] Figure 7a and Figure 7b is a diagram illustrating generation of reference samples.
[0122] If all reference pixels are available, then the video decoding device does not perform padding and uses each reference pixel value. On the other hand, as described above, if some available reference samples do not exist, such as Figure 7a and Figure 7b As shown in the example of , the pixel value can be filled. First, if the lower left reference sample is not available, then the first available reference sample in the search order is copied and filled to the lower left reference sample, such as Figure 7a Then, if no reference sample is available except the lower left reference sample, the pixel value at the immediately previous position in the search sequence is copied and filled into the current position, as in Figure 7a and Figure 7b as shown in the example.
[0123] As described above, if no reference samples are available at all positions, the video decoding device uses 2 Bitdepth -1 Fill each position, 2 Bitdepth-1 is half of the maximum value a pixel can have. That is, if Bitdepth is 8 bits, then 128 can be used, and if Bitdepth is 10 bits, then 512 can be used.
[0124] After generating the reference sample according to the method described above, the video decoding device may apply the filter to generate the final reference sample p[x][y]. First, if the reference line index refIdx is 0, the size of the current block is greater than 32, the current block is a luma component, the IntraSubPartitionsSplitType of the ISP mode is ISP_NO_SPLIT, and the flag refFilterFlag indicating filtering of the reference sample is 1, the video decoding device may set the flag filterFlag indicating application of the filter to 1. If any of the above conditions is not met, filterFlag may be set to 0.
[0125] Then, if filterFlag is true, the final reference sample p[x][y] can be calculated as in Equation 1.
[0126] [Equation 1]
[0127] p[-1][-1]=(refUnfilt[-1][0]+2·refUnfilt[-1][-1]+refUnfilt[0][-1]+2)>>2
[0128] p[-1][y]=(refUnfilt[-1][y+1]+2·refUnfilt[-1][y]+refUnfilt[-1][y-1]+2)>>2,y=0..refH-2
[0129] p[-1][refH-1]=refUnfilt[-1][refH-1]
[0130] p[x][-1]=(refUnfilt[x-1][-1]+2·refUnfilt[x][-1]+refUnfilt[x+1][-1]+2)>>2,x=0..refW-2
[0131] p[refW-1][-1]=refUnfilt[refW-1][-1]
[0132] On the other hand, if filterFlag is false, then for x=-1-refldx, y=-1-refldx..refH-1 and x=-refldx..refW-1, y=-1-refldx, p[x][y]=refUnfilt[x][y].
[0133] I-2. Position Dependent Prediction Combination (PDPC) Technology
[0134] When performing intra prediction, if the distance between the pixel in the current block and the reference sample is large, the spatial correlation is reduced, which may reduce the prediction performance of the generated predictor. To solve this problem, the position-dependent prediction combination (PDPC) technique is used. The PDPC technique corrects the predictor pixels used for encoding by weighted combination of the neighboring pixels in the opposite direction and the predictor generated according to the intra prediction mode. The closer the distance between the neighboring pixels in the opposite direction and the corresponding predictor pixels, the higher the weight of the neighboring pixels in the opposite direction. The PDPC technique can be applied to prediction modes that can utilize neighboring pixels in the opposite direction of the prediction mode direction line. These prediction modes include a mode equal to or less than the horizontal mode (mode 18), a mode greater than the vertical mode (mode 50), and four specific modes of plane mode, DC mode, horizontal mode (mode 18) and vertical mode (mode 50).
[0135] The PDPC technique uses Equation 2 to correct the predictor for the planar mode and the DC mode, uses Equation 3 to correct the predictor for the horizontal mode (mode 18), and uses Equation 4 to correct the predictor for the vertical mode (mode 50). In addition, the PDPC technique uses Equation 5 to correct the predictor based on a mode smaller than the horizontal mode (mode 18), and uses Equation 6 to correct the predictor based on a mode larger than the vertical mode (mode 50).
[0136] [Equation 2]
[0137] nScale=(log2(nTbW)+log2(nTbH)-2)>>2
[0138] wL[x]=32>>((x<<1)>>nScale)
[0139] wT[y]=32>>((y<<1)>>nScale)
[0140] pred[x][y]=Clip1((p[-1][y]·wL[x]+p[x][-1]·wT[y]+(64-wL[x]-wT[y])·pred[x][y]+32)>>6)
[0141] [Equation 3]
[0142] nScale=(log2(nTbW)+log2(nTbH)-2)>>2
[0143] wL[x]=0, wT[y]=32>>(y<<1)>>nScale)
[0144] ppred[x][y]=Clip1(((p[x][-1]-p[-1][-1]+pred[x][y])·wT[y]+(64-wTy])·pred[x][y]+32)>>6)
[0145] [Equation 4]
[0146] nScale=(log2(nTbW)+log2(nTbH)-2)>>2
[0147] wL[x]=32>>((x<<1)>>nScale), wT[y]=0
[0148] pred[x][y]=Clip1(((p[-1][y]-p[-1][-1]+pred[x][y])·wL[x]+(64-wL[x])·pred[x][y]+32)>>6)
[0149] [Equation 5]
[0150] nScale=min(2,log2(nTbW)-Floor(log2(3·invAngle-2))+8)
[0151] dX[x][y]=x+((y+1)·invAngle+256)>>9
[0152] refT[x][y]=(y<(3<<nScale))? p[dX[x][y]][-1]: 0
[0153] wL[x]=0, wT[y]=32>>((y<<1)>>nScale)
[0154] pred[x][y]=Clip1((refT[x][y]·wT[y]+(64-wT[y])·predd[x][y]+32)>>6)
[0155] [Equation 6]
[0156] nScale=min(2,log2(nTbH)-Floor(log2(3·invAngle-2))+8)
[0157] dY[x][y]=y+((x+1)·invAngle+256)>>9
[0158] refL[x][y]=(x<(3<<nSCale))? p[-1][dY[x][y]]: 0
[0159] wL[x]=32>>((x<<1)>>nScale), wT[y]=0
[0160] pred[x][y]=Clip1((refL[x][y]·wL[x]+(64-wL[x])·pred[x][y]+32)>>6)
[0161] Here, [x][y] represents the pixel with respect to the coordinates of the upper left pixel of the current block. pred[x][y] is the initial predictor generated by the prediction mode, and p[x][-1] and p[-1][y] are the neighboring pixels used to correct the predictor. nTbW and nTbH represent the width and height of the current block, and wL[x] and wT[y] represent the weights applied to the predictor pixels and the neighboring pixels. Clip1 is the clipping function expressed as shown in Equation 7.
[0162] [Equation 7]
[0163] Clip1(x)=Clip3(0,1<<BitDepth,x)
[0164]
[0165] In addition, invAngle is a variable used in the intra prediction mode to specify the position of the neighboring pixels required when generating the predictor in conjunction with each direction. In the VVC (Versatile Video Coding) technology, invAngle is calculated as shown in Equation 8.
[0166] [Equation 6]
[0167]
[0168] Here, intraPredAngle is a value determined by the intra prediction mode (PredModeIntra).
[0169] I-3. Most Probable Model (MPM) Technique
[0170] As described above, in intra prediction, a predictor for a luma channel may be generated based on 67 intra prediction modes (IPMs). The 67 IPMs refer to 67 intra prediction modes that may be signaled from prediction mode -14 to prediction mode 80 based on a block aspect ratio, including a non-directional prediction mode of a planar mode and a DC mode. When a predictor is generated by using one of the 67 prediction modes, the video encoding apparatus signals the prediction mode by using the most probable mode (MPM) to efficiently transmit prediction mode information.
[0171] MPM exploits the property that when a block is encoded in intra prediction mode, the prediction modes of neighboring blocks are likely to be similar to each other. Figure 8 As shown, for a block including pixel A located to the left of the lower left pixel of the current block and pixel B located above the upper right pixel of the current block, the prediction modes of the respective blocks are defined as mode A and mode B. Based on mode A and mode B, an MPM list may be generated by selecting six MPM candidates as follows. If the current block is located on the boundary of a CTU, tile, slice, sub-picture, picture, etc. and pixel A or pixel B is not available, the prediction mode of the block including the pixel of interest is considered to be planar.
[0172] First, if mode A and mode B are the same and mode A is greater than INTRA_DC, {planar,modeA,2+((modeA+61)%64),2+((modeA-1)%64),2+((modeA+60)%64),2+(modeA%64)} is selected as the MPM candidates.
[0173] Next, if mode A and mode B are different and either mode A or mode B is greater than INTRA_DC, the MPM candidates are organized as follows. Here, minAB = Min(modeA, modeB), and maxAB = Max(modeA, modeB).
[0174] If both mode A and mode B are greater than INTRA_DC and maxAB - minAB = 1, then {planar, modeA, modeB, 2 + ((minAB + 61) % 64), 2 + ((maxAB - 1) % 64), 2 + ((minAB + 60) % 64)} is selected as an MPM candidate.
[0175] If both mode A and mode B are greater than INTRA_DC and maxAB - minAB ≥ 62, then {planar, modeA, modeB, 2 + ((minAB - 1) % 64), 2 + ((maxAB + 61) % 64), 2 + (minAB % 64)} is selected as an MPM candidate.
[0176] If both mode A and mode B are greater than INTRA_DC and maxAB - minAB = 2, then {planar, modeA, modeB, 2 + ((minAB - 1) % 64), 2 + ((minAB + 61) % 64), 2 + ((maxAB - 1) % 64)} is selected as an MPM candidate.
[0177] If both mode A and mode B are greater than INTRA_DC and 2 < maxAB - minAB < 62, then {planar, modeA, modeB, 2 + ((minAB + 61) % 64), 2 + ((minAB - 1) % 64), 2 + ((maxAB + 61) % 64)} is selected as an MPM candidate.
[0178] If mode A and mode B are different and one of mode A and mode B is greater than INTRA_DC, then {planar, maxAB, 2 + ((maxAB + 61) % 64), 2 + ((maxAB - 1) % 64), 2 + ((maxAB + 60) % 64), 2 + (maxAB % 64)} is selected as an MPM candidate.
[0179] Furthermore, if both mode A and mode B are equal to or less than INTRA_DC, then {planar, INTRA_DC, INTRA_ANGULAR50, INTRA_ANGULAR18, INTRA_ANGULAR46, INTRA_ANGULAR54} is selected as an MPM candidate.
[0180] Meanwhile, when using the MPM, the video decoding apparatus parses the intra prediction mode of the current block as shown in Table 1.
[0181]
Table 1
[0182]
[0183] First, if intra_luma_ref_idx (a reference line index indicating one of a plurality of reference lines) is zero, intra_luma_mpm_flag (a flag indicating whether MPM is enabled) may be signaled from the video encoding device to the video decoding device. If intra_luma_mpm_flag is true and intra_luma_ref_idx is 0, intra_luma_not_planar_flag (a flag indicating whether planar mode is enabled) may be signaled from the video encoding device to the video decoding device. If intra_luma_not_planar_flag is false, the intra prediction mode is set to planar mode, and if intra_luma_not_planar_flag is true, intra_luma_mpm_idx may be additionally signaled. If intra_luma_not_planar_flag is not present, it may be inferred to be 1.
[0184] On the other hand, if intra_luma_ref_idx is non-zero, planar mode is not used. Therefore, intra_luma_not_planar_flag is not sent and is assumed to be true. Since intra_luma_not_planar_flag is true, intra_luma_mpm_idx may be signaled additionally.
[0185] Next, if intra_luma_mpm_flag is false, the MPM residual is signaled as intra prediction mode.
[0186] As described above, MPM index 0 of the first element in the reference MPM list always indicates planar mode, and is therefore determined by using intra_luma_not_planar_flag. MPM indexes 1 to 5 are determined by using intra_luma_mpm_idx, and are encoded according to truncated Rice (TR) binarization, with cMax=4 and cRiceParam=0. In this case, a bin string may be generated as follows.
[0187] TR binarization uses cMax and cRiceParam to output a TR bin string corresponding to symbolVal. A TR bin string is a combined prefix bin string and suffix bin string, where the suffix bin string exists if cMax and symbolVal are equal and cRiceParam is greater than 0.
[0188] The prefix bin string is derived as follows.
[0189] First, the prefix value prefixVal for symbolVal is derived by preVal=symbolVal>>cRiceParam.
[0190] Next, the prefix of the TR bin string (ie, the prefix bin string) is determined as follows.
[0191] If prefixVal is less than "cMax>>cRiceParam", then the length of the prefix bin string is prefixVal+1, and each bin is indexed by using binIdx. The bins whose binIdx is less than prefixVal are set to 1, and the bins whose binIdx is equal to prefixVal are set to 0.
[0192] If prefixVal is "cMax>>cRiceParam" or greater, the length of the prefix bin string is "cMax>>cRiceParam" and all bins are set to 1.
[0193] The suffix bin string of the TR bin string is derived as follows.
[0194] First, the suffix value suffixVal is derived by suffixVal=symbolVal-(prefixVal<<cRiceParam).
[0195] Next, the suffix of the TR bin string (ie, the suffix bin string) is determined through a fixed length (FL) binarization process such that for suffixVal, cMax is (1<<cRiceParam)-1.
[0196] By summarizing the above, the bin string of the MPM index can be represented as shown in Table 2. Here, except for the MPM index 0, symbolVal sets 5 MPM candidates according to the MPM index starting from 0.
[0197]
Table 2
[0198]
[0199] As described above, if intra_luma_mpm_flag is 0 (ie, MPM is not used), intra_luma_mpm_remainder is interpreted as MPM remainder. In this case, intra_luma_mpm_remainder is binary coded according to truncated binary (TB) with cMax = 60. The bin string may be generated as follows.
[0200] TB binarization outputs a TB bin string corresponding to the syntax element symbolVal by using cMax. Before determining the TB bin string, the value of u is calculated according to Equation 9.
[0201] [Equation 9]
[0202] n=cMax+1
[0203] k = Floor(Log2(n))
[0204] u=(1<<(k+1))–n
[0205] Using the definition in Equation 9, the TB bin string is determined as follows.
[0206] First, if symbolVal is less than u, the TB bin string is determined by a fixed length (FL) binarization process, where cMax for symbolVal is (1<<k)-1. On the other hand, if symbolVal is greater than or equal to u, the TB bin string is determined by a fixed length (FL) binarization process, where cMax for (symbolVal+u) is (1<<(k+1))-1.
[0207] By summarizing the above, the bin string of the MPM remainder can be represented as shown in Table 3. Here, symbolVal is a set of 61 intra prediction modes excluding 6 MPM candidates in order from 0 to the smallest. The bin string representing 3 symbolValues from 0 to 2 is allocated 5 bits, and the bin string representing 58 symbolValues from 3 to 60 is allocated 6 bits.
[0208]
Table 3
[0209]
[0210]
[0211] II. Adaptive Intra-mode Coding
[0212] On the other hand, if the current block is on the boundary of the image, the same predictor can be generated even if different prediction modes are used. For blocks existing on the boundary of the image (e.g., CTU, tile, slice, sub-picture, picture, etc.), all or some of the upper left reference pixels may not exist among the reference pixels used for block prediction. In such a case, after generating reference pixels by using padding, the intra prediction method is used to generate the predictor. Even if different prediction modes are used, the same predictor can be generated, such as Figure 9a and Figure 9b For example, if the current block is not located at the boundary of the image (boundary of CTU, tile, slice, sub-picture, picture, etc.) (such as Figure 9a At block A in , then when all reference pixels exist and the reference pixel values are different, different predictors are generated according to the prediction mode, such as Figure 9b However, if the current block is located at the upper boundary of the image (the upper boundary of a CTU, tile, slice, sub-picture, picture, etc.) (such as Figure 9a In block B), there is no upper reference pixel, so reference pixels with the same value are generated by using padding processing, such as Figure 9b as shown in the example.
[0213] Therefore, when PDPC is not considered, the prediction modes above the vertical mode (mode 50) all generate the same predictor because the prediction modes above the vertical mode (mode 50) are all used to predict reference pixels filled with the same value. Since the same predictor may be generated even with different prediction modes used depending on the position of the block, unnecessary prediction mode transfer and prediction mode search processes cause inefficiencies. These inefficiencies of the prior art can be solved by adaptively encoding / decoding prediction modes according to block positions.
[0214] exist Fig.10 In the example of , OLD represents an intra-frame prediction mode encoding / decoding method according to a conventional technology (e.g., VVC), and NEW represents an adaptive prediction mode encoding / decoding method based on a block position according to the present invention. The present disclosure solves the problems of the prior art by using "block position classification" to classify blocks according to the current block position and using "adaptive intra-frame mode encoding" to adaptively encode the prediction mode accordingly.
[0215] The preferred implementation is as follows.
[0216] Hereinafter, for convenience, the horizontal intra prediction mode (mode 18) is referred to as HOR, and the vertical intra prediction mode (mode 50) is referred to as VER. Fig.11As shown in the example of , the block position information is used to classify the type of the current block. The block position information includes the coordinates of the upper left corner position within the current block. The block position information also includes information about the composition of CTUs, tiles, slices, sub-pictures, and pictures, how they are partitioned, and the size of each element. The block position information may also include the relative position of the current block within the CTU, tile, slice, sub-picture, or picture.
[0217] In addition, based on the block position, the current block can be classified into four types: type 1, type 2, type 3, and type 4. In type 1, the current block is located at the upper left corner of the CTU, tile, slice, sub-picture, or picture. In type 2, type 1 is excluded and the current block is located on the left boundary of the CTU, tile, slice, sub-picture, or picture. In type 3, type 1 is excluded and the current block is located on the upper boundary of the CTU, tile, slice, sub-picture, or picture. Type 4 represents cases other than the above types 1 to 3.
[0218] The implementation is described below with reference to a video decoding device, but is similarly applicable to a video encoding device.
[0219] <Implementation 1> Determine a pre-set prediction mode based on the position of the block
[0220] In this implementation, the video decoding device does not decode the prediction mode of the current block, but uses a preset prediction mode based on the type of the current block. Fig.11 The video encoding apparatus performs the following operations based on the type of the current block at the block position as shown in FIG.
[0221] In the case of type 1, since all reference pixels on the left and top are unavailable, any of the different prediction modes will generate the same predictor. Therefore, since prediction mode search and signaling are not required, a preset prediction mode can be used. In this case, the video encoding device can omit prediction mode search and signaling.
[0222] For type 2 and type 3, since the left reference pixel or the upper reference pixel is not available, the corresponding value is filled. As a result, some prediction modes ultimately generate the same predictor. Therefore, since prediction mode search and signaling are not required, a preset prediction mode can be used. Similarly, in this case, the video encoding device can omit prediction mode search and signaling.
[0223] In the case of type 4, since all reference pixels in the block are available, different predictors can be generated according to the prediction mode. Therefore, the video encoding device can select and encode the most appropriate prediction mode according to the conventional method, and the video decoding device can parse the information and then decode the intra-frame prediction signal according to the parsed prediction mode.
[0224] Whether to use a preset prediction mode may be determined for each type, and for a block corresponding to a type that does not use a preset prediction mode, the intra prediction mode may be encoded / decoded by using a conventional intra mode encoding / decoding method. Here, all possible cases may be summarized as shown in Table 4.
[0225]
Table 4
[0226] Implicit Mode Decision Type Using existing technology 1 Type 1 Type 2, Type 3, Type 4 2 Type 2 Type 1, Type 3, Type 4 3 Type 3 Type 1, Type 2, Type 4 4 Type 1, Type 2 Type 3, Type 4 5 Type 1, Type 3 Type 2, Type 4 6 Type 2, Type 3 Type 1, Type 4 7 Type 1, Type 2, Type 3 Type 4
[0227] Here, the implicit mode decision type indicates a type of using a preset prediction mode.
[0228] Fig.12 is a flowchart of a method for decoding intra mode based on block position according to at least one embodiment of the present invention.
[0229] The video decoding device classifies the current block according to the block position (S1200), and determines whether the type of the current block is an implicit mode decision type (S1202). At this time, the decision criterion of the implicit mode decision type can be selected from one of the 7 cases given in Table 4.
[0230] If the current block is an implicit mode decision type (Yes in S1202), the video decoding device uses a preset prediction mode as a prediction mode of the current block (S1204). The video decoding device sets the prediction mode of a block of type k (where k may be 1, 2, or 3) corresponding to the implicit mode decision type to pre_defined_mode_k. For example, if the type of the current block is type 2 which is an implicit mode decision type, the prediction mode of the current block is set to pre_defined_mode_2.
[0231] If the current block is not of the implicit mode decision type (No in S1202), the video decoding apparatus decodes the intra prediction mode from the bitstream according to a conventional method (S1206).
[0232] according to Fig.12 The prediction mode decision processing of the instance can be similarly performed by the video encoding device.
[0233] The above pre_defined_mode_k can be one of 67 IPMs, such as plane, DC, horizontal mode (mode 18), vertical mode (mode 50), etc. For example, Fig.13 As shown in the example in , a block located at the upper left corner of a slice or a picture is classified as type 1. If pre_defined_mode_1 is preset as the planar mode, the video encoding apparatus omits intra prediction mode search and signaling for the relevant block and determines the planar mode as the prediction mode.
[0234] The syntax according to this embodiment is shown in Table 5.
[0235]
Table 5
[0236]
[0237] If implicit_mode_decision (syntax indicating implicit mode decision) is 1, prediction mode search and signaling are omitted for the current block, and the video decoding device uses a preset prediction mode corresponding to the type of the current block. currBlockType represents the type of the current block. If currBlockType is type k, the function blockPositionAdaptiveModeDecision (current block type) sets the prediction mode of the current block to pre_defined_mode_k. On the other hand, if implicit_mode_decision is 0, the video decoding device can decode the prediction mode of the current block by using a conventional intra-mode decoding method.
[0238] <Implementation 2> Decode the prediction mode of the current block by composing the MPM list differently according to the block position
[0239] In this implementation, the video decoding device adaptively combines the MPM list based on the type of the current block classified according to the position of the block, and decodes the intra prediction mode of the current block by using the combined MPM list. Conventional VVC selects six MPM candidates based on the prediction mode of the neighboring blocks of the current block. If the intra prediction mode of the current block is one of the six MPM candidates, the conventional VVC decodes the MPM index indicating the prediction mode and thereby determines the prediction mode.
[0240] According to this implementation, the video decoding device can (implementation 2-1) construct an MPM list according to a predefined method, (implementation 2-2) remove redundant prediction modes from the existing MPM list construction method, or (implementation 2-3) remove redundant prediction modes from the existing MPM list construction method and add one or more MPM candidates according to a predefined method. In this case, if an intra-frame prediction mode generates the same predictor as an intra-frame prediction mode other than itself, the generated prediction mode is called a redundant prediction mode.
[0241] <Implementation 2-1> Combine MPM lists according to predefined methods
[0242] In this implementation, the video decoding device composes an MPM list by using a predefined method based on the type of the current block so that the MPM list does not include a redundant prediction mode. The predefined method refers to (implementation 2-1-1) determining the number of MPM candidates or (implementation 2-1-2) selecting MPM candidates. The MPM candidates may be determined differently depending on the type of the current block.
[0243] <Implementation 2-1-1> Determine the number of MPM candidates based on the type of the current block
[0244] In this implementation, the video decoding device may determine the number of all the same, some different, or all different MPM candidates according to the type of the current block. In the following, the number of each type of MPM candidates of the current block is defined as n 类型 Here, according to Fig.11 In this case, type is assumed to be a value from 1 to 4. In this case, by setting n 1 =4, n 2 =5, n 3 =5, n 4 =6, the present disclosure can form MPM lists with different numbers of candidates according to the type of the current block. As described above, if the current block is a representation of n 1 =4 type 1, the MPM list can consist of four prediction modes.
[0245] <Implementation 2-1-2> Select MPM candidates based on the type of the current block
[0246] In this implementation, the video decoding device may select an MPM candidate according to the type of the current block by using different, partially identical, or completely identical methods. When selecting a prediction mode, at least one of the following may be considered: the width, height, area, and aspect ratio of the current block, and the prediction mode and position information of the adjacent blocks. The selected prediction mode may be a prediction mode using reconstructed reference pixels, a prediction mode of an adjacent block, a prediction mode that has been used with high frequency in the past, or a prediction mode of reference pixels reconstructed by a position-dependent prediction combination (PDPC) technique may be additionally used.
[0247] As described above, PDPC corrects the predictor based on pixel position, prediction mode, and block size by using a weighted combination of filtered and unfiltered reference samples. PDPC can be applied to plane, DC, horizontally oriented or lower prediction modes (mode 18 or below), and vertically oriented or upper prediction modes (mode 50 or above). According to conventional VVC (universal video coding) technology, the use of PDPC technology is not signaled separately at the CU level, but is adaptively determined based on the prediction mode and block size.
[0248] Hereinafter, PDPC Applicable / Not Applicable indicates enabling / disabling of the PDPC technique at a higher level such as SPS, PPS, etc., and PDPC Available / Not Available indicates whether PDPC is used in the current block when the PDPC technique is enabled.
[0249] In conventional VVC, the range and number of PDPC-unavailable intra prediction modes depending on the block size are shown in Table 6.
[0250]
Table 6
[0251]
[0252] Here, W and H represent the width and height of the current block, respectively. For example, in Table 6, if the width of the current block is 8 (W=8), the PDPC-unavailable prediction mode ranges from prediction mode 5 to prediction mode 17, and if the height of the current block is 4 (H=4), the PDPC-unavailable prediction mode ranges from prediction mode 51 to prediction mode 69. Thus, if (W, H)=(8, 4) for the current block, prediction modes 5 to 17, 19 to 49, and 51 to 69 cannot use PDPC. In this case, prediction modes 19 to 49 can never use PDPC.
[0253] According to the above type-3 block, the MPM list is composed as follows.
[0254] If the left block exists, the video decoding device adds the prediction mode of the block to the MPM list. Here, the position of the upper left pixel of the current block is referred to as (x0, y0) and the height of the current block is referred to as h, where the left block represents a block containing (x0-1, y0+h-1) pixels.
[0255] The video decoding device also adds a horizontal mode (18, HOR) of reference pixels used for prediction reconstruction and their neighboring prediction modes (±n, where n is an integer greater than or equal to 1) to the MPM list.
[0256] Furthermore, the video decoding apparatus continues to add the prediction mode further utilizing the reconstructed reference pixels to the MPM list by using PDPC.
[0257] When the number of MPM candidates in a type-3 block is 6 (n 3= 6), the above MPM list composition method is applied to Fig.14 The current block example shown in FIG is as follows. At this time, when the prediction mode is added up to the set n 3 , the video decoding device stops constructing the list.
[0258] The video decoding apparatus adds the prediction mode (plane) of the left block to the MPM list, and adds the horizontal mode and its adjacent modes HOR, HOR-2, and HOR+2 (n=2 is set in this example).
[0259] Thereafter, since the width and height of the current block are both 8, PDPC is used for prediction modes 64 and above. Since these prediction modes use both the padded upper reference pixels and the reconstructed left reference pixels, they can generate predictors more efficiently than by using the VER (vertical intra prediction) mode and the mode near VER that does not use PDPC. Therefore, starting from mode 64 and above, the video decoding device adds prediction modes by incrementing the index by 1 until the MPM list is filled. As a result, the MPM list becomes {plane, HOR, HOR-2, HOR+2, 64, 65}.
[0260] Fig.15 is a flowchart of a method for composing an MPM list according to a predefined method according to at least one embodiment of the present disclosure.
[0261] The video decoding device classifies the current block based on the position of the block (S1500). The video decoding device determines the number of MPM candidates according to the type of the block (S1502), and the video decoding device determines a method for selecting the MPM candidates according to the type of the block (S1504). The video decoding device composes an MPM list according to the determined method (S1506).
[0262] Thereafter, the video decoding apparatus may decode the MPM index from the bitstream, and determine the intra prediction mode of the current block from the MPM list by using the MPM index.
[0263] according to Fig.15 The method of composing an MPM list may be similarly performed by a video encoding device.
[0264] <Implementation 2-2> Remove redundant prediction modes from the existing MPM list composition method
[0265] In this implementation, the video decoding device selects MPM candidates according to an existing method, and removes the remaining redundant prediction modes except for the representative mode of one of the selected MPM candidates. The representative mode may be a redundant prediction mode with a minimum or maximum angle (prediction direction), a redundant prediction mode with a minimum or maximum prediction mode index, a redundant prediction mode with a minimum or maximum MPM index, or a prediction mode used by a previous block and used most. Alternatively, the representative mode may be a preset prediction mode according to an agreement between a video encoding device and a video decoding device. In addition, the range of redundant prediction modes may be determined differently depending on the type of the current block, whether PDPC is applied, etc. In a conventional VVC configuration, the use of PDPC technology is not signaled separately at the CU level, but is determined by the prediction mode and the size of the block.
[0266] Hereinafter, PDPC applicable / not applicable indicates that the PDPC technique is enabled / disabled at a higher level such as SPS, PPS, etc. PDPC available / unavailable indicates whether PDPC is used for the current block when the PDPC technique is enabled.
[0267] <Implementation 2-2-1> Determining the range of redundant prediction mode when PDPC is not applied
[0268] When PDPC is not applied, the range of the redundant prediction mode is determined differently according to the type of the current block. Fig.11 When the current block is classified into Type 1 to Type 4 according to the current block classification method based on the block position shown in , the range of the redundant prediction mode may be described as follows.
[0269] For type-1 blocks, all reference pixels are unavailable, so all reference pixels are filled with the same value and the filled reference pixels are generated. Therefore, since all intra prediction modes generate the same predictor, the redundant prediction modes of type-1 blocks are all intra prediction modes.
[0270] For type 2 blocks, all left reference pixels are unavailable, so those reference pixels are filled with the same value and the filled reference pixels are generated. Therefore, the intra prediction modes (horizontal prediction mode and all prediction modes below (mode 18 and below)) using the left reference pixels all generate the same predictor, so the redundant prediction mode for type 2 blocks is the horizontal prediction mode and all prediction modes below (mode 18 and below).
[0271] For type 3 blocks, all upper reference pixels are unavailable, so those reference pixels are filled with the same value and the filled reference pixels are generated. Therefore, the intra prediction mode (all prediction modes of vertical prediction mode or higher (mode 50 or higher)) using the upper reference pixel generates the same predictor, so the redundant prediction mode for type 3 blocks is all prediction modes in vertical prediction mode or higher (mode 50 or higher).
[0272] For type 4 blocks, different prediction modes generate different predictors because all reference pixels in the block are available. Therefore, there is no range of redundant prediction modes for type 4 blocks.
[0273] When PDPC is not applied, an example application of this implementation is as follows. The following is the case where the current block is type 2 and the previous block uses mode 17, such as Fig.16 As shown in the example of . Here, the value inside the block indicates the prediction mode of the block. If the MPM list is composed according to the existing VVC method, the MPM list is {plane, 17, 16, 18, 15, 19}. However, with this embodiment, the prediction modes numbered 18 and below become the range of redundant prediction modes. If mode 18, which is the prediction mode with the largest prediction mode index among the MPM candidates included in the redundant prediction mode range, is set as a representative mode, the MPM list can be organized as {plane, 18, 19} by removing modes 15, 16 and 17.
[0274] <Implementation 2-2-2> When applying PDPC, determine the range of redundant prediction modes
[0275] When PDPC is applied, the range of redundant prediction modes depends on the type and size of the current block (width and height of the block). Depending on the size of the block, PDPC may not be available because the secondary reference pixels used by PDPC do not exist. Therefore, the range of redundant prediction modes may change depending on the type of the current block and the size of the block that determines the availability of PDPC. The PDPC-unavailable prediction modes depending on the block size are shown in Table 6.
[0276] In the case of the PDPC available prediction mode, even if the adjacent reference pixels in the opposite directions of each prediction mode have different values, the values of the reference pixels in the directions pointed by the different prediction modes are all the same, and different predictors are generated according to the weighted combination of the reference pixels. Therefore, when PDPC is applied, the redundant prediction mode is not generated for the PDPC available prediction mode. However, for the PDPC unavailable prediction mode, if the predictor is generated by using only the padding reference pixels, a redundant prediction mode is generated.
[0277] When Fig.11When the current block is classified into type 1 to type 4 according to the classification method based on the block position, the redundant prediction mode can be described as follows.
[0278] In the case of a type-1 block, all reference pixels are unavailable, so all reference pixels are padded with the same value and the padded reference pixels are generated. Therefore, all intra prediction modes become redundant prediction modes regardless of the availability of PDPC.
[0279] For a type-2 block, the PDPC-unavailable prediction mode is determined as a redundant prediction mode from the horizontal prediction mode (mode 18) and the following prediction mode by considering the width of the block.
[0280] For a type-3 block, the PDCPC-unavailable prediction mode is determined as a redundant prediction mode from a vertical prediction mode (mode 50) or above by considering the height of the block.
[0281] For type-4 blocks, different prediction modes may generate different predictors regardless of PDPC applicability. Therefore, there is no scope for redundant prediction modes.
[0282] When PDPC is applied, an example application of this implementation is as follows. Fig.16 As in the example of , a case where a current block with (W, H) = (8, 4) of type 2 and an upper block using mode 17 is described. If the MPM list is composed according to the existing VVC method, the MPM list consists of {plane, 17, 16, 18, 15, 19}. However, with this implementation, since (W, H) = (8, 4) in the current block, modes 5 to 17, 19 to 49, and 51 to 69 become the PDPC-unavailable range, and the redundant prediction mode range becomes 5 to 17. If mode 17 having the smallest MPM index among the MPM candidates in the redundant prediction mode range is set as a representative mode, the MPM list can be composed of {plane, 17, 18, 19} by removing modes 15 and 16.
[0283] Fig.17 is a flowchart of a method for removing redundant prediction modes according to at least one embodiment of the present disclosure.
[0284] The video decoding device classifies the current block based on the position of the block (S1700). The video decoding device composes an MPM list according to the same method as in the conventional technology (S1702), and then checks the PDPC non-applicability (S1704). When PDPC is not applied (yes in S1704), the video decoding device determines a redundant prediction mode in the MPM candidate based on the type of the current block (S1706), and when PDPC is applied (yes in S1704), the video decoding device determines a redundant prediction mode in the MPM candidate based on the type and size of the current block (S1720). The video decoding device determines a representative mode among the redundant prediction modes (S1708), and removes redundant prediction modes other than the representative mode (S1710).
[0285] Thereafter, the video decoding apparatus may decode the MPM index from the bitstream, and may determine the intra prediction mode of the current block from the reorganized MPM list by using the MPM index.
[0286] The video decoding device may further include decoding a flag indicating whether the MPM list is enabled or disabled. When checking the decoded flag and determining that the decoded flag is true, the video decoding device may perform the operation according to Fig.17 A method for removing redundant prediction modes of an instance.
[0287] The video encoding device may similarly perform Fig.17 A method for removing redundant prediction modes of an instance.
[0288] <Implementation 2-3> Remove redundant prediction modes in the existing MPM list composition method and add candidates using the new method
[0289] In this implementation, the video decoding device reorganizes the MPM list by removing redundant prediction modes from the MPM candidates selected according to the existing method and adding N (N ≥ 1) new non-redundant prediction modes. At this time, the redundant prediction mode can be removed in the same way as in implementation 2-2, and N non-redundant prediction modes can be added in accordance with the method of implementation 2-1. N represents the number of non-redundant prediction modes added, so that the number of candidates is n 类型 , which is the number of MPM candidates of each type for the current block. Depending on the type of the current block, n 类型 May be all the same, some different, or all different.
[0290] For example, when PDPC is not applied, if the MPM list is composed according to the conventional method of VVC, the MPM list is for Fig.14{plane, DC, VER, HOR, VER-4, VER+4} of the type 3 current block shown in FIG. However, with this implementation, the range of redundant prediction modes is the number 50 (VER) and above. Among VER and VER+4 as MPM candidates included in the redundant prediction mode range, VER may be set to a representative mode with a lower prediction mode index for removing VER+4. If a new MPM candidate is then added by using a method using an adjacent mode of a non-redundant horizontal prediction mode, such that n 2 =6, then the MPM list can consist of {plane, DC, VER, HOR, VER-4, HOR-4}.
[0291] Fig.18 is a flowchart of a method of removing redundant prediction modes and adding new candidates according to at least one embodiment of the present disclosure.
[0292] The video decoding device classifies the current block based on the position of the block (S1800). The video decoding device composes an MPM list according to the same method as in the conventional technology (S1802), and then checks the non-applicability of PDPC (S1804). When PDPC is not applied (Yes in S1804), the video decoding device determines a redundant prediction mode based on the type of the current block (S1806), and when PDPC is applied (No in S1804), the video decoding device determines a redundant prediction mode based on the type and size of the current block (S1820). The video decoding device determines a representative mode among the redundant prediction modes (S1808), and removes redundant prediction modes other than the representative mode (S1810). The video decoding device adds MPM candidates by using a non-redundant prediction mode based on the type of the block (S1812).
[0293] The video decoding device can then decode the MPM index from the bitstream, and can use the MPM index to determine the intra prediction mode of the current block from the reorganized MPM list.
[0294] The video decoding device may further include a step of decoding a flag indicating whether the MPM list is enabled or disabled. Upon checking the decoded flag and determining that the decoded flag is true, the video decoding device may perform the operation according to Fig.18 An example method of removing redundant prediction modes and adding new candidates.
[0295] The video encoding device may similarly perform Fig.18 Method for removing redundant prediction modes and adding new candidates for an instance of .
[0296] <Implementation 3> Change the remaining candidates of MPM based on block position
[0297] In this implementation, if the prediction mode of the current block is decoded as an MPM residual, the video decoding device removes redundant prediction modes among the MPM residual candidates and decodes the MPM residual by using only one representative mode. This is the case if the prediction mode of the current block is not included in the MPM list. Similar to implementation 2-2, the representative mode may be a redundant prediction mode having a minimum or maximum angle, a minimum or maximum prediction mode index, etc., or a prediction mode used by a previous block and used the most.
[0298] When truncated binary (TB) binarization (which is the same method applied to conventional VVC) is used to encode the modified MPM residual according to this implementation, the variable of cMax used in the TB binarization can be changed and used as shown in Equation 10.
[0299] [Equation 10]
[0300] cMax=mpm_remainder_candidate_num–1
[0301] Here, mpm_remainder_candidate_num indicates the number of MPM remaining candidates after removing redundant prediction modes other than the representative mode. The range of redundant prediction modes varies according to the type of the current block and PDPC applicability, and the same method of determining redundant prediction modes as implementation 2-2 may be used.
[0302] For example, if mpm_remainder_candidate_num is 45, the MPM remainder may be encoded as follows. According to this implementation, if mpm_remainder_candidate_num is used to represent the conventional VVC method, then mpm_remainder_candidate_num=61, because cMax=60. In addition, if symbolVal is set in descending order from 0 to exclude the MPM remaining candidates of the MPM candidates, a bin string may be generated as shown in Table 3, as described in the prior art. That is, 3 symbolVals representing 0 to 2 use a 5-bit bin string, and 58 symbolVals representing 3 to 60 use a 6-bit bin string.
[0303] However, if the redundant prediction mode is removed so that mpm_remainder_candidate_num=45 (cMax=44), the bin string of the MPM remainder can be represented as shown in Table 7. That is, based on Equation 9, 19 symbol values representing 0 to 18 use a 5-bit bin string, and 26 symbol values representing 19 to 44 use a 6-bit bin string. This reduces the average length of the bin required to encode the MPM remainder, achieving efficient syntax encoding / decoding compared to conventional methods.
[0304]
Table 7
[0305]
[0306] Fig.19 The present invention is a flowchart of a method for removing redundant prediction modes according to another embodiment of the present invention.
[0307] The video decoding device classifies the current block based on the position of the block (S1900). The video decoding device organizes the MPM remaining candidates according to the same method as in the conventional technology (S1902), and then checks the PDPC non-applicability (S1904). When PDPC is not applied (yes in S1904), the video decoding device determines the redundant prediction mode in the MPM remaining candidates based on the type of the current block (S1906), and when PDPC is applied (no in S1904), the video decoding device determines the redundant prediction mode in the MPM remaining candidates based on the type and size of the current block (S1920). The video decoding device determines a representative mode among the redundant prediction modes (S1908), and removes redundant prediction modes other than the representative mode (S1910).
[0308] Thereafter, the video decoding apparatus may decode the residual index from the bitstream, and determine the intra prediction mode of the current block from the reorganized residual candidates by using the residual index.
[0309] The video decoding device may further include decoding a flag indicating whether the MPM list is enabled or disabled. When checking the decoded flag and determining that the decoded flag is false, the video decoding device may perform the operation according to Fig.19 An example method for removing redundant prediction modes.
[0310] The video encoding device may similarly perform Fig.19 A method for removing redundant prediction modes of an instance.
[0311] <Implementation 4> Encoding / decoding processing of changing arbitrary intra-frame prediction mode based on block position
[0312] In this implementation, when any intra prediction mode decoding method is used, the encoding / decoding method of the prediction mode is adaptively changed. In other words, when the intra prediction mode of the current block is transmitted, even if any method is used instead of using MPM and MPM residual, the search and encoding / decoding of redundant prediction modes based on block position will be inefficient. Thus, this implementation avoids such inefficiency.
[0313] For example, when a prediction mode is selected from multiple prediction modes as a prediction mode of a current block, and the prediction mode is encoded / decoded by using an arbitrary intra-frame prediction mode encoding / decoding method, the selection of redundant prediction modes can be limited to avoid using redundant prediction modes other than a representative mode, and one of the other prediction modes can be selected.
[0314] <Implementation 5> Selectively using a combination of existing technology and implementations 1 to 4
[0315] In this embodiment, the video encoding device signals additional syntax to selectively apply a combination of methods of implementations 1 to 4, depending on the implementation. To this end, information about the intra prediction mode encoding / decoding method of the current block can be signaled by sending block_position_adaptive_flag, which is a flag indicating whether this implementation is enabled or disabled.
[0316] For example, as shown in Table 8, if block_position_adaptive_flag is 0, a conventional technique is used without following the present disclosure, and if block_position_adaptive_flag is 1, implementation 2 may be applied.
[0317]
Table 8
[0318]
[0319] Alternatively, if block_position_adaptive_flag is 1, as shown in Table 9, an additional block_position_adaptive_idx (an index indicating one of the combinations of such implementations) may be signaled. That is, depending on the value of block_position_adaptive_idx, a combination of implementations 1 to 4 may be selected and used.
[0320]
Table 9
[0321]
[0322] 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 series order shown.
[0323] It should be understood that the above description presents illustrative embodiments that can be implemented in different 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 strongly emphasized by the "... unit" mark for their independent implementation possibilities.
[0324] 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 executed 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).
[0325] Although the embodiments of the present disclosure have been described for illustrative purposes, however, those of ordinary skill in the art to which the present disclosure belongs should recognize that various modifications, additions, and substitutions are possible 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 of ordinary skill 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.
[0326] (reference number)
[0327] 122 Intra-frame predictor
[0328] 155 Entropy Encoder
[0329] 510 Entropy Decoder
[0330] 542 Intra-frame predictor
[0331] CROSS-REFERENCE TO RELATED APPLICATIONS
[0332] This application claims priority to and the benefit of Korean Patent Application No. 10-2022-0054765, filed on May 3, 2022, and Korean Patent Application No. 10-2023-0044007, filed on April 4, 2023, the entire contents of each of which are incorporated herein by reference.
Claims
1. A method for decoding an intra-frame prediction mode of a current block performed by a video decoding device, the method include: Determining a type of the current block based on a position of the current block; generating a most probable mode list (MPM list) including most probable mode candidates (MPM candidates); Determining, among the MPM candidates and based on the type of the current block, a redundant prediction mode for generating a common predictor; determining a representative mode among the redundant prediction modes; as well as The MPM list is reorganized by removing redundant prediction modes except the representative mode.
2. The method according to claim 1, further comprising: include: Decoding a most probable mode index (MPM index) of the current block from a bitstream; as well as The intra prediction mode of the current block is determined from the reorganized MPM list by using the MPM index.
3. The method according to claim 1, further comprising: include: Based on the type of the current block, new MPM candidates are added to the reorganized MPM list by using a non-redundant prediction mode.
4. The method according to claim 1, further comprising: include: Decoding a flag indicating whether the MPM list is to be used; as well as Checking said signs; Wherein, when the flag is true, the method further includes: Generate the MPM list.
5. The method according to claim 4, further comprising, when the flag is false: Organize the remaining candidates; determining a redundant prediction mode for generating a common predictor among the remaining candidates and based on the type of the current block; determining a representative mode among the redundant prediction modes; as well as The remaining candidates are reorganized by removing redundant prediction modes other than the representative mode.
6. The method according to claim 5, further comprising: include: decoding a remaining index of the current block from a bitstream; as well as The intra prediction mode of the current block is determined from the reorganized remaining candidates by using the remaining indexes.
7. The method according to claim 1, in, Determining the redundant prediction mode includes: When position dependent prediction combining (PDPC) is not applied, the redundant prediction mode is determined based on the type of the current block, and when the PDPC is applied, the redundant prediction mode is determined based on the type and size of the current block.
8. The method according to claim 2, in, The representative modes include: One or more of the redundant prediction modes include a prediction mode having a minimum or maximum angle or prediction mode index, a prediction mode having a minimum or maximum MPM index, a most commonly used prediction mode among prediction modes used by a previous block, or a preset prediction mode.
9. The method according to claim 1, in, The type of the current block is classified into type 1, type 2, type 3, type 4 based on the position of the current block in the current image which is a coding tree unit (CTU), a tile, a slice, a sub-picture, or a picture.
10. The method according to claim 9, in, The current block of type 1 indicates that the current block is located at the upper left corner of the current image, the current block of type 2 indicates that type 1 is excluded and the current block is located at the left boundary of the current image, the current block of type 3 indicates that type 1 is excluded and the current block is located at the upper boundary of the current image, and type 4 indicates other types of the current block except type 1, type 2 and type 3.
11. The method according to claim 9, in, Determining the redundant prediction mode includes: When PDPC is not applied and the current block is of type 2, all prediction modes equal to or lower than the horizontal prediction mode are determined as the redundant prediction mode, and when PDPC is not applied and the current block is of type 3, all prediction modes equal to or higher than the vertical prediction mode are determined as the redundant prediction mode.
12. The method according to claim 9, in, Determining the redundant prediction mode includes: When PDPC is applied and the current block is of the type 2, a prediction mode that is equal to or lower than a horizontal prediction mode and cannot use the PDPC is determined as the redundant prediction mode, and when the PDPC is applied and the current block is of the type 3, a prediction mode that is equal to or higher than a vertical prediction mode and cannot use the PDPC is determined as the redundant prediction mode.
13. The method according to claim 9, in, Determining the redundant prediction mode includes: Regardless of whether PDPC is applied and when the current block is the type 1, all intra prediction modes are determined as the redundant prediction mode, and regardless of whether PDPC is applied and when the current block is the type 4, determination of the redundant prediction mode is stopped.
14. A method for encoding an intra-frame prediction mode of a current block performed by a video encoding device, the method include: Determining a type of the current block based on a position of the current block; generating a most probable mode list (MPM list) including most probable mode candidates (MPM candidates); Determining, among the MPM candidates and based on the type of the current block, a redundant prediction mode for generating a common predictor; determining a representative mode among the redundant prediction modes; as well as The MPM list is reorganized by removing redundant prediction modes except the representative mode.
15. The method according to claim 14, further comprising: include: Organize the remaining candidates; determining, among the remaining candidates and based on the type of the current block, a redundant prediction mode for generating a common predictor; determining a representative mode among the redundant prediction modes; as well as The remaining candidates are reorganized by removing redundant prediction modes other than the representative mode.
16. The method according to claim 15, further comprising: include: Determining an intra prediction mode of the current block; as well as It is determined whether the reorganized MPM list includes the intra prediction mode of the current block.
17. The method according to claim 16, further comprising, when the reorganized MPM list includes the intra prediction mode of the current block: determining an MPM index indicating one of the MPM candidates included in the reorganized MPM list; setting a flag indicating whether the MPM list is to be used to true; and The MPM index and the flag are encoded.
18. The method according to claim 16, when the reorganized MPM list does not include the intra prediction mode of the current block, the method further include: determining a remaining index indicating one of the reorganized remaining candidates; Setting a flag indicating whether the MPM list is to be used to false; as well as The remainder index and the flag are encoded.
19. The method according to claim 14, further comprising: include: Based on the type of the current block, new MPM candidates are added to the reorganized MPM list by using a non-redundant prediction mode.
20. A computer-readable recording medium storing a bit stream generated by a video encoding method, the video encoding method include: Determining a type of the current block based on a position of the current block; generating a most probable mode list (MPM list) including most probable mode candidates (MPM candidates); Determining, among the MPM candidates and based on the type of the current block, a redundant prediction mode for generating a common predictor; determining a representative mode among the redundant prediction modes; as well as The MPM list is reorganized by removing redundant prediction modes except the representative mode.
