Method for extrapolation-based intra prediction

The extrapolation-based intra prediction method addresses the inefficiencies in current video compression technologies by using an extrapolation filter to generate prediction samples from reconstructed reference samples and prediction signals, enhancing coding efficiency and quality for high-resolution video data.

WO2024237502A1PCT designated stage expired Publication Date: 2024-11-21HYUNDAI MOTOR CO LTD +2

Patent Information

Application Number
PCT/KR2024/005216
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-04-16
Filing Date
2024-04-18
Publication Date
2024-11-21

AI Technical Summary

Technical Problem

Current video compression technologies, such as H.264/AVC, HEVC, and VVC, face challenges in achieving higher coding efficiency and improved picture quality as the size, resolution, and frame rate of video data increase, necessitating a more efficient method for intra prediction.

Method used

The implementation of an extrapolation-based intra prediction (EIP) method using an extrapolation filter that generates prediction samples from reconstructed reference samples and prediction signals, with a rectangular filter shape and derived filter coefficients, to enhance video coding efficiency and quality.

Benefits of technology

This approach improves video coding efficiency and quality by effectively predicting current samples using extrapolation filters, allowing for better compression and transmission of high-resolution video data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure KR2024005216_21112024_PF_FP_ABST
    Figure KR2024005216_21112024_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in an embodiment of the present invention are a video coding method and device using extrapolation-based intra prediction. In an embodiment of the present invention, an image decoding device determines a reference sample region used for deriving filter coefficients. Here, the reference sample area includes reconstructed reference samples of the current block. The image decoding device determines a filter shape used for extrapolation-based intra prediction. Here, the filter shape is a rectangular shape and includes a prediction pixel region and an input pixel region. The image decoding device derives filter coefficients according to the reference sample region and the filter shape. The image decoding device generates a prediction block of the current block by applying the derived filter coefficients to the reconstructed reference samples and prediction samples of the current block.
Need to check novelty before this filing date? Find Prior Art

Description

Methods for extrapolation-based intra prediction

[0001] The present disclosure relates to a video coding method and device using extrapolation-based intra prediction.

[0002] The content described below merely provides background information related to the present invention and does not constitute prior art.

[0003] Since video data has a large amount of data compared to voice data or still image data, it requires a lot of hardware resources, including memory, to store or transmit it without processing for compression.

[0004] Therefore, when storing or transmitting video data, an encoder is used to compress the video data and store or transmit it, and a decoder receives the compressed video data, decompresses it, and plays it back. Examples of such video compression technologies include H.264 / AVC, HEVC (High Efficiency Video Coding), and VVC (Versatile Video Coding), which improves encoding efficiency by about 30% compared to HEVC.

[0005] However, as the size, resolution, and frame rate of images are gradually increasing, and the amount of data that needs to be encoded is also increasing, a new compression technology that has better encoding efficiency and better image quality improvement than existing compression technologies is required.

[0006] In the next-generation Enhanced Compression Model (ECM), the Extrapolation-based Intra Prediction (EIP) mode performs intra prediction using an extrapolation filter based on previously reconstructed reference samples in the surrounding region. EIP uses reconstructed reference samples and prediction samples as input and sequentially performs extrapolation pixel by pixel. The area of ​​the reference samples and the shape of the extrapolation filter are determined by explicit signaling.

[0007] In intra prediction based on an extrapolation filter, EIP mode generates prediction samples using only the reconstructed reference samples as input. Alternatively, EIP mode can generate prediction samples using both the reconstructed reference samples and the prediction signals, or using only the prediction signals as input. In EIP mode, the extrapolation filter generates a single prediction sample from the input samples using a single filtering pass.

[0008] Therefore, in order to improve video encoding efficiency and enhance video quality, a method for efficiently utilizing restored reference samples and prediction signals during extrapolation filter-based intra prediction is needed.

[0009] The present disclosure aims to provide a video coding method and device that effectively intra-predicts a current sample from restored reference samples and prediction samples using an extrapolation filter.

[0010] According to an embodiment of the present disclosure, a method for restoring a current block, performed by an image decoding device, is provided, characterized in that it comprises the steps of: determining a reference sample area used for deriving filter coefficients, wherein the reference sample area includes restoration reference samples of the current block; determining a filter shape used for extrapolation-based intra prediction, wherein the filter shape has a rectangular shape and includes a prediction pixel area and an input pixel area; deriving the filter coefficients according to the reference sample area and the filter shape; and applying the derived filter coefficients to restoration reference samples and prediction samples of the current block, thereby generating a prediction block of the current block.

[0011] According to another embodiment of the present disclosure, a method for encoding a current block, performed by an image encoding device, is provided, characterized in that the method comprises: determining a reference sample area used for deriving filter coefficients, wherein the reference sample area includes reconstructed reference samples of the current block; determining a filter shape used for extrapolation-based intra prediction, wherein the filter shape has a rectangular shape and includes a prediction pixel area and an input pixel area; deriving the filter coefficients according to the reference sample area and the filter shape; and applying the derived filter coefficients to the reconstructed reference samples and prediction samples of the current block, thereby generating a first prediction block of the current block.

[0012] According to another embodiment of the present disclosure, a method for providing video data to a video decoding device is provided, comprising: encoding the video data into a bitstream; and transmitting the bitstream to the video decoding device, wherein the encoding the video data comprises: determining a reference sample area used for deriving filter coefficients, wherein the reference sample area includes restoration reference samples of the current block; determining a filter shape used for extrapolation-based intra prediction, wherein the filter shape is rectangular and includes a prediction pixel area and an input pixel area; deriving the filter coefficients according to the reference sample area and the filter shape; and applying the derived filter coefficients to restoration reference samples and prediction samples of the current block, thereby generating a prediction block of the current block.

[0013] As described above, according to the present embodiment, there is provided a video coding method and device that effectively intra-predicts a current sample from restored reference samples and prediction samples using an extrapolation filter, thereby improving video encoding efficiency and enhancing video quality.

[0014] FIG. 1 is an exemplary block diagram of an image encoding device capable of implementing the techniques of the present disclosure.

[0015] Figure 2 is a drawing for explaining a method of dividing a block using the QTBTTT (QuadTree plus BinaryTree TernaryTree) structure.

[0016] FIGS. 3A and 3B are diagrams illustrating multiple intra prediction modes, including wide-angle intra prediction modes.

[0017] Figure 4 is an example diagram of the surrounding blocks of the current block.

[0018] FIG. 5 is an exemplary block diagram of an image decoding device capable of implementing the techniques of the present disclosure.

[0019] Figure 6 is an example diagram showing a restoration area used for extrapolation-based intra prediction.

[0020] Figure 7 is an example diagram showing extrapolation filter shapes.

[0021] Figure 8 is an example diagram showing the performance of extrapolation-based intra prediction.

[0022] FIG. 9 is a block diagram illustrating in detail a portion of an image decoding device according to one embodiment of the present disclosure.

[0023] FIG. 10 is a block diagram illustrating in detail a prediction execution unit according to one embodiment of the present disclosure.

[0024] FIGS. 11A to 11C are exemplary diagrams showing a reference sample area used for deriving filter coefficients according to one embodiment of the present disclosure.

[0025] FIG. 12 is an exemplary diagram showing a filter shape according to one embodiment of the present disclosure.

[0026] FIG. 13 is an exemplary diagram showing the prediction order of pixels according to one embodiment of the present disclosure.

[0027] FIGS. 14 to 16 are exemplary diagrams showing the prediction order of pixels according to another embodiment of the present disclosure.

[0028] FIG. 17 is an exemplary diagram showing a filter shape according to one embodiment of the present disclosure.

[0029] FIG. 18 is a flowchart illustrating a method for an image encoding device to encode a current block according to an embodiment of the present disclosure.

[0030] FIG. 19 is a flowchart illustrating a method for an image decoding device to restore a current block according to one embodiment of the present disclosure.

[0031] Hereinafter, embodiments of the present invention will be described in detail with reference to exemplary drawings. When designating components in each drawing, it should be noted that, where possible, identical components are given the same reference numerals, even if they appear in different drawings. Furthermore, in describing the present embodiments, detailed descriptions of related known structures or functions will be omitted if they are deemed to obscure the gist of the present embodiments.

[0032] FIG. 1 is an exemplary block diagram of an image encoding device capable of implementing the techniques of the present disclosure. Hereinafter, the image encoding device and its subcomponents will be described with reference to the illustration in FIG. 1.

[0033] The video encoding device may be configured to include a picture segmentation unit (110), a prediction unit (120), a subtractor (130), a transformation unit (140), a quantization unit (145), a reordering unit (150), an entropy encoding unit (155), an inverse quantization unit (160), an inverse transformation unit (165), an adder (170), a loop filter unit (180), and a memory (190).

[0034] Each component of the video encoding device may be implemented in hardware, software, or a combination of hardware and software. Furthermore, the functions of each component may be implemented in software, with a microprocessor executing the software functions corresponding to each component.

[0035] A single image (video) is composed of one or more sequences containing multiple pictures. Each picture is divided into multiple regions, and encoding is performed for each region. For example, a single picture is divided into one or more tiles and / or slices. Here, one or more tiles can be defined as a tile group. Each tile or slice is divided into one or more Coding Tree Units (CTUs). Each CTU is then divided into one or more Coding Units (CUs) by a tree structure. Information applied to each CU is encoded as the syntax of the CU, and information commonly applied to CUs included in a CTU is encoded as the syntax of the CTU. In addition, information commonly applied to all blocks within a single slice is encoded as the syntax of the slice header, and information applied to all blocks constituting one or more pictures is encoded in the Picture Parameter Set (PPS) or the picture header. Furthermore, information commonly referenced by multiple pictures is encoded in a Sequence Parameter Set (SPS). And, information commonly referenced by one or more SPS is encoded in a Video Parameter Set (VPS). In addition, information commonly applied to one tile or tile group may be encoded as syntax of a tile or tile group header. Syntaxes included in an SPS, PPS, slice header, tile or tile group header may be referred to as high level syntax.

[0036] The picture segmentation unit (110) determines the size of the CTU. Information about the size of the CTU (CTU size) is encoded as the syntax of SPS or PPS and transmitted to the image decoding device.

[0037] The picture segmentation unit (110) divides each picture constituting an image into a plurality of CTUs having a predetermined size, and then recursively divides the CTUs using a tree structure. A leaf node in the tree structure becomes a CU, which is a basic unit of encoding.

[0038] The tree structure may be a QuadTree (QT) in which an upper node (or parent node) is divided into four lower nodes (or child nodes) of the same size, a BinaryTree (BT) in which an upper node is divided into two lower nodes, or a TernaryTree (TT) in which an upper node is divided into three lower nodes in a 1:2:1 ratio, or a structure that mixes two or more of the QT structures, BT structures, and TT structures. For example, a QTBT (QuadTree plus BinaryTree) structure may be used, or a QTBTTT (QuadTree plus BinaryTree TernaryTree) structure may be used. Here, BTTT may be combined and referred to as a MTT (Multiple-Type Tree).

[0039] Figure 2 is a drawing for explaining a method of dividing a block using the QTBTTT structure.

[0040] As illustrated in FIG. 2, a CTU may first be split into a QT structure. The quadtree splitting may be repeated until the size of the splitting block reaches the minimum block size (MinQTSize) of the leaf node allowed in the QT. A first flag (QT_split_flag) indicating whether each node of the QT structure is split into four nodes of the lower layer is encoded by the entropy encoding unit (155) and signaled to the image decoding device. If the leaf node of the QT is not larger than the maximum block size (MaxBTSize) of the root node allowed in the BT, it may be further split into one or more of the BT structure or the TT structure. There may be multiple splitting directions in the BT structure and / or the TT structure. For example, there may be two directions in which the block of the corresponding node is split horizontally and two directions in which the block is split vertically. As illustrated in FIG. 2, when MTT splitting begins, a second flag (mtt_split_flag) indicating whether nodes have been split, and if splitting has occurred, a flag indicating the splitting direction (vertical or horizontal) and / or a flag indicating the splitting type (Binary or Ternary) are encoded by the entropy encoding unit (155) and signaled to the image decoding device.

[0041] Alternatively, before encoding the first flag (QT_split_flag) indicating whether each node is split into four nodes of a lower layer, a CU split flag (split_cu_flag) indicating whether the node is split may be encoded. If the CU split flag (split_cu_flag) value indicates that the node is not split, the block of the corresponding node becomes a leaf node in the split tree structure and becomes a CU (coding unit), which is a basic unit of encoding. If the CU split flag (split_cu_flag) value indicates that the node is split, the video encoding device starts encoding from the first flag in the above-described manner.

[0042] As another example of a tree structure, when QTBT is used, there may be two types: a type that horizontally splits the block of the corresponding node into two blocks of the same size (i.e., symmetric horizontal splitting) and a type that vertically splits it (i.e., symmetric vertical splitting). A split flag (split_flag) indicating whether each node of the BT structure is split into blocks of a lower layer and split type information indicating the type of split are encoded by the entropy encoding unit (155) and transmitted to the image decoding device. Meanwhile, there may additionally be a type that splits the block of the corresponding node into two blocks of an asymmetrical shape. The asymmetric shape may include a shape that splits the block of the corresponding node into two rectangular blocks with a size ratio of 1:3, or a shape that splits the block of the corresponding node in a diagonal direction.

[0043] A CU can have various sizes depending on the QTBT or QTBTTT partitioning from the CTU. Hereinafter, the block corresponding to the CU to be encoded or decoded (i.e., the leaf node of the QTBTTT) is referred to as the "current block." Depending on the QTBTTT partitioning employed, the current block may be rectangular as well as square.

[0044] The prediction unit (120) predicts the current block and generates a prediction block. The prediction unit (120) includes an intra prediction unit (122) and an inter prediction unit (124).

[0045] In general, each current block within a picture can be predictively coded. Prediction of the current block can typically be performed using either intra-prediction (using data from the picture containing the current block) or inter-prediction (using data from a picture coded before the picture containing the current block). Inter-prediction encompasses both unidirectional and bidirectional prediction.

[0046] The intra prediction unit (122) predicts pixels within the current block using pixels (reference pixels) located around the current block within the current picture including the current block. There are multiple intra prediction modes depending on the prediction direction. For example, as shown in Fig. 3a, the multiple intra prediction modes may include two non-directional modes including the Planar mode and the DC mode, and 65 directional modes. The surrounding pixels to be used and the calculation formula are defined differently depending on each prediction mode.

[0047] For efficient directional prediction for a rectangular current block, directional modes (intra prediction modes 67 to 80 and -1 to -14) indicated by dotted arrows in Fig. 3b may be additionally used. These may be referred to as "wide-angle intra-prediction modes." In Fig. 3b, the arrows point to corresponding reference samples used for prediction, and do not indicate the prediction direction. The prediction direction is opposite to the direction indicated by the arrows. Wide-angle intra-prediction modes are modes that perform prediction in the opposite direction of a specific directional mode without additional bit transmission when the current block is rectangular. At this time, among the wide-angle intra-prediction modes, some wide-angle intra-prediction modes available for the current block may be determined based on the ratio of the width and height of the rectangular current block. For example, wide-angle intra prediction modes (intra prediction modes 67 to 80) having an angle less than 45 degrees are available when the current block is a rectangular shape whose height is smaller than its width, and wide-angle intra prediction modes (intra prediction modes -1 to -14) having an angle greater than -135 degrees are available when the current block is a rectangular shape whose width is larger than its height.

[0048] The intra prediction unit (122) can determine an intra prediction mode to be used to encode the current block. In some examples, the intra prediction unit (122) can encode the current block using multiple intra prediction modes and select an appropriate intra prediction mode to be used from the tested modes. For example, the intra prediction unit (122) can calculate bit-rate distortion values ​​using rate-distortion analysis for multiple tested intra prediction modes and select an intra prediction mode with the best bit-rate distortion characteristics among the tested modes.

[0049] The intra prediction unit (122) selects one intra prediction mode from among multiple intra prediction modes and predicts the current block using surrounding pixels (reference pixels) and an operation formula determined according to the selected intra prediction mode. Information about the selected intra prediction mode is encoded by the entropy encoding unit (155) and transmitted to the image decoding device.

[0050] The inter prediction unit (124) generates a prediction block for the current block using a motion compensation process. The inter prediction unit (124) searches for a block most similar to the current block within reference pictures that were encoded and decoded before the current picture, and generates a prediction block for the current block using the searched block. Then, a motion vector (MV) corresponding to the displacement between the current block within the current picture and the prediction block within the reference picture is generated. Generally, motion estimation is performed on the luma component, and the motion vector calculated based on the luma component is used for both the luma component and the chroma component. The motion information including information on the reference picture used to predict the current block and information on the motion vector is encoded by the entropy encoding unit (155) and transmitted to the image decoding device.

[0051] The inter prediction unit (124) may perform interpolation on a reference picture or a reference block to improve prediction accuracy. That is, subsamples between two consecutive integer samples are interpolated by applying filter coefficients to a plurality of consecutive integer samples including the two integer samples. When a process of searching for a block most similar to the current block is performed on the interpolated reference picture, the motion vector can be expressed up to a precision in decimal units rather than a precision in integer sample units. The precision or resolution of the motion vector can be set differently for each target region to be encoded, such as a slice, tile, CTU, CU, etc. When such adaptive motion vector resolution (AMVR) is applied, information on the motion vector resolution to be applied to each target region must be signaled for each target region. For example, when the target region is a CU, information on the motion vector resolution applied to each CU is signaled. Information on the motion vector resolution may be information indicating the precision of a differential motion vector, which will be described later.

[0052] Meanwhile, the inter prediction unit (124) can perform inter prediction using bi-prediction. In the case of bi-prediction, two reference pictures and two motion vectors indicating the block position most similar to the current block within each reference picture are used. The inter prediction unit (124) selects a first reference picture and a second reference picture from reference picture list 0 (RefPicList0) and reference picture list 1 (RefPicList1), respectively, and searches for a block similar to the current block within each reference picture to generate a first reference block and a second reference block. Then, the first reference block and the second reference block are averaged or weighted averaged to generate a prediction block for the current block. Then, motion information including information on two reference pictures used to predict the current block and information on two motion vectors is transmitted to the entropy encoding unit (155). Here, reference picture list 0 may be composed of pictures that are before the current picture in display order among the restored pictures, and reference picture list 1 may be composed of pictures that are after the current picture in display order among the restored pictures. However, this is not necessarily limited to this, and restored pictures that are after the current picture in display order may be additionally included in reference picture list 0, and conversely, restored pictures that are before the current picture may be additionally included in reference picture list 1.

[0053] Various methods can be used to minimize the number of bits required to encode motion information.

[0054] For example, if the reference picture and motion vector of the current block are identical to those of a neighboring block, the motion information of the current block can be transmitted to the image decoding device by encoding information that can identify the neighboring block. This method is called 'merge mode'.

[0055] In merge mode, the inter prediction unit (124) selects a predetermined number of merge candidate blocks (hereinafter referred to as 'merge candidates') from the surrounding blocks of the current block.

[0056] As the surrounding blocks for deriving merge candidates, all or part 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 within the current picture may be used, as illustrated in FIG. 4. In addition, a block located within a reference picture (which may or may not be the same as the reference picture used to predict the current block) other than the current picture in which the current block is located may be used as a merge candidate. For example, a block co-located with the current block within the reference picture or blocks adjacent to the block at the co-located block may be additionally used as a merge candidate. If the number of merge candidates selected by the method described above is less than a preset number, a 0 vector is added to the merge candidates.

[0057] The inter prediction unit (124) uses these surrounding blocks to construct a merge list containing a predetermined number of merge candidates. Among the merge candidates included in the merge list, the merge candidate to be used as motion information of the current block is selected and merge index information for identifying the selected candidate is generated. The generated merge index information is encoded by the entropy encoding unit (155) and transmitted to the video decoding device.

[0058] Merge Skip mode is a special case of merge mode. After quantization, when all transform coefficients for entropy encoding are close to zero, only neighboring block selection information is transmitted without transmitting residual signals. By utilizing merge skip mode, relatively high encoding efficiency can be achieved for low-motion images, still images, and screen content images.

[0059] Hereinafter, merge mode and merge skip mode are collectively referred to as merge / skip mode.

[0060] Another method for encoding motion information is Advanced Motion Vector Prediction (AMVP) mode.

[0061] In AMVP mode, the inter prediction unit (124) derives predicted motion vector candidates for the motion vector of the current block using neighboring blocks of the current block. As neighboring blocks used to derive predicted motion vector candidates, 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 as shown in FIG. 4 may be used. In addition, a block located in a reference picture (which may or may not be the same as the reference picture used to predict the current block) other than the current picture in which the current block is located may be used as the neighboring block used to derive predicted motion vector candidates. For example, a block co-located with the current block in the reference picture or blocks adjacent to the block in the co-located block may be used. If the number of motion vector candidates is less than a preset number by the method described above, a 0 vector is added to the motion vector candidates.

[0062] The inter prediction unit (124) derives predicted motion vector candidates using the motion vectors of these surrounding blocks, and determines a predicted motion vector for the motion vector of the current block using the predicted motion vector candidates. Then, the predicted motion vector is subtracted from the motion vector of the current block to produce a differential motion vector.

[0063] The predicted motion vector can be obtained by applying a predefined function (e.g., median, mean, etc.) to the predicted motion vector candidates. In this case, the image decoding device also knows the predefined function. In addition, since the surrounding blocks used to derive the predicted motion vector candidates are blocks that have already been encoded and decoded, the image decoding device also already knows the motion vectors of the surrounding blocks. Therefore, the image encoding device does not need to encode information to identify the predicted motion vector candidates. Therefore, in this case, information about the differential motion vector and information about the reference picture used to predict the current block are encoded.

[0064] Alternatively, the predicted motion vector can be determined by selecting one of the predicted motion vector candidates. In this case, information for identifying the selected predicted motion vector candidate is additionally encoded, along with information about the differential motion vector and the reference picture used to predict the current block.

[0065] The subtractor (130) subtracts the prediction block generated by the intra prediction unit (122) or inter prediction unit (124) from the current block to generate a residual block.

[0066] The transformation unit (140) transforms residual signals within a residual block having pixel values ​​in a spatial domain into transform coefficients in a frequency domain. The transformation unit (140) may transform the residual signals within the residual block using the entire size of the residual block as a transformation unit, or may divide the residual block into a plurality of sub-blocks and use the sub-blocks as transformation units to perform the transformation. Alternatively, the residual signals may be transformed using only the transformation domain sub-block as a transformation unit by dividing the sub-blocks into two sub-blocks, that is, a transformation domain and a non-transform domain. Here, the transformation domain sub-block may be one of two rectangular blocks having a size ratio of 1:1 with respect to the horizontal axis (or vertical axis). In this case, a flag (cu_sbt_flag) indicating that only a sub-block has been converted, directionality (vertical / horizontal) information (cu_sbt_horizontal_flag), and / or position information (cu_sbt_pos_flag) are encoded by the entropy encoding unit (155) and signaled to the image decoding device. In addition, the size of the conversion area sub-block may have a size ratio of 1:3 with respect to the horizontal axis (or vertical axis), and in this case, a flag (cu_sbt_quad_flag) distinguishing the corresponding division is additionally encoded by the entropy encoding unit (155) and signaled to the image decoding device.

[0067] Meanwhile, the transformation unit (140) can individually perform transformations on the residual block in the horizontal and vertical directions. For the transformation, various types of transformation functions or transformation matrices can be used. For example, a pair of transformation functions for horizontal transformation and vertical transformation can be defined as a Multiple Transform Set (MTS). The transformation unit (140) can select one transformation function pair with the best transformation efficiency among the MTS and transform the residual block in the horizontal and vertical directions, respectively. Information (mts_idx) on the transformation function pair selected among the MTS is encoded by the entropy encoding unit (155) and signaled to the image decoding device.

[0068] The quantization unit (145) quantizes the transform coefficients output from the transform unit (140) using quantization parameters and outputs the quantized transform coefficients to the entropy encoding unit (155). The quantization unit (145) may directly quantize a related residual block without transformation for a certain block or frame. The quantization unit (145) may also apply different quantization coefficients (scaling values) according to the positions of the transform coefficients within the transform block. The quantization matrix applied to the quantized transform coefficients arranged in two dimensions may be encoded and signaled to an image decoding device.

[0069] The rearrangement unit (150) can perform rearrangement of coefficient values ​​for quantized residual values.

[0070] The reordering unit (150) can change a two-dimensional coefficient array into a one-dimensional coefficient sequence by using coefficient scanning. For example, the reordering unit (150) can output a one-dimensional coefficient sequence by scanning from the DC coefficient to the coefficients of the high-frequency region by using a zig-zag scan or a diagonal scan. Depending on the size of the transformation unit and the intra prediction mode, a vertical scan that scans the two-dimensional coefficient array in the column direction or a horizontal scan that scans the two-dimensional block-shaped coefficients in the row direction may be used instead of the zig-zag scan. That is, depending on the size of the transformation unit and the intra prediction mode, the scanning method to be used may be determined among the zig-zag scan, the diagonal scan, the vertical scan, and the horizontal scan.

[0071] The entropy encoding unit (155) generates a bitstream by encoding a sequence of one-dimensional quantized transform coefficients output from the rearrangement unit (150) using various encoding methods such as CABAC (Context-based Adaptive Binary Arithmetic Code) and Exponential Golomb.

[0072] In addition, the entropy encoding unit (155) encodes information related to block division, such as CTU size, CU division flag, QT division flag, MTT division type, and MTT division direction, so that the image decoding device can divide the block in the same manner as the image encoding device. In addition, the entropy encoding unit (155) encodes information about a prediction type indicating whether the current block is encoded by intra prediction or inter prediction, and encodes intra prediction information (i.e., information about an intra prediction mode) or inter prediction information (information about an encoding mode of motion information (merge mode or AMVP mode), a merge index in the case of a merge mode, and a reference picture index and a differential motion vector in the case of an AMVP mode) according to the prediction type. In addition, the entropy encoding unit (155) encodes information related to quantization, that is, information about a quantization parameter and information about a quantization matrix.

[0073] The inverse quantization unit (160) inversely quantizes the quantized transform coefficients output from the quantization unit (145) to generate transform coefficients. The inverse transform unit (165) transforms the transform coefficients output from the inverse quantization unit (160) from the frequency domain to the spatial domain to restore the residual block.

[0074] An adder (170) adds the restored residual block and the predicted block generated by the prediction unit (120) to restore the current block. The pixels within the restored current block are used as reference pixels when intra-predicting the next block.

[0075] The loop filter unit (180) performs filtering on restored pixels to reduce blocking artifacts, ringing artifacts, blurring artifacts, etc. that occur due to block-based prediction and transformation / quantization. The loop filter unit (180) may include all or part of a deblocking filter (182), a sample adaptive offset (SAO) filter (184), and an adaptive loop filter (ALF, 186) as an in-loop filter.

[0076] The deblocking filter (182) filters the boundaries between restored blocks to remove blocking artifacts caused by block-based encoding / decoding, and the SAO filter (184) and the ALF (186) perform additional filtering on the deblocking-filtered image. The SAO filter (184) and the ALF (186) are filters used to compensate for the differences between restored pixels and original pixels caused by lossy coding. The SAO filter (184) improves not only subjective image quality but also encoding efficiency by applying an offset in units of CTUs. In contrast, the ALF (186) performs block-based filtering, and compensates for distortion by applying different filters by distinguishing the edges and degrees of variation of the corresponding block. Information on filter coefficients to be used in the ALF can be encoded and signaled to an image decoding device.

[0077] The restored blocks filtered through the deblocking filter (182), SAO filter (184), and ALF (186) are stored in the memory (190). When all blocks within a picture are restored, the restored picture can be used as a reference picture for inter-predicting blocks within a picture to be encoded later.

[0078] The video encoding device can store the bitstream of encoded video data on a non-transitory storage medium or transmit it to the video decoding device using a communication network.

[0079] FIG. 5 is an exemplary block diagram of an image decoding device capable of implementing the techniques of the present disclosure. Hereinafter, the image decoding device and its subcomponents will be described with reference to FIG. 5.

[0080] The video decoding device may be configured to include an entropy decoding unit (510), a rearrangement unit (515), an inverse quantization unit (520), an inverse transformation unit (530), a prediction unit (540), an adder (550), a loop filter unit (560), and a memory (570).

[0081] Similar to the video encoding device of FIG. 1, each component of the video decoding device may be implemented in hardware, software, or a combination of hardware and software. Furthermore, the functions of each component may be implemented in software, with a microprocessor executing the software functions corresponding to each component.

[0082] The entropy decoding unit (510) decodes the bitstream generated by the image encoding device to extract information related to block division, thereby determining the current block to be decoded, and extracts prediction information, information on residual signals, etc. required to restore the current block.

[0083] The entropy decoding unit (510) extracts information about the CTU size from the Sequence Parameter Set (SPS) or the Picture Parameter Set (PPS), determines the size of the CTU, and divides the picture into CTUs of the determined size. Then, the CTU is determined as the top layer of the tree structure, i.e., the root node, and the CTU is divided using the tree structure by extracting division information about the CTU.

[0084] For example, when splitting a CTU using the QTBTTT structure, first, the first flag (QT_split_flag) related to the splitting of QT is extracted, and each node is split into four nodes of the lower layer. Then, for the nodes corresponding to the leaf nodes of QT, the second flag (mtt_split_flag) related to the splitting of MTT and the split direction (vertical / horizontal) and / or split type (binary / ternary) information are extracted, and the corresponding leaf nodes are split into the MTT structure. Accordingly, each node below the leaf nodes of QT are split recursively into the BT or TT structure.

[0085] As another example, when splitting a CTU using the QTBTTT structure, the CU split flag (split_cu_flag) indicating whether the CU is split is first extracted, and if the block is split, the first flag (QT_split_flag) may be extracted. During the splitting process, each node may undergo zero or more repeated QT splits followed by zero or more repeated MTT splits. For example, a CTU may undergo an MTT split right away, or conversely, may undergo only multiple QT splits.

[0086] As another example, when splitting a CTU using the QTBT structure, the first flag (QT_split_flag) related to the splitting of QT is extracted, and each node is split into four nodes of the lower layer. Furthermore, for nodes corresponding to leaf nodes of QT, a split flag (split_flag) indicating whether to further split into BTs and splitting direction information are extracted.

[0087] Meanwhile, when the entropy decoding unit (510) determines the current block to be decoded by using the division of the tree structure, it extracts information on the prediction type indicating whether the current block is intra-predicted or inter-predicted. If the prediction type information indicates intra-prediction, the entropy decoding unit (510) extracts syntax elements for intra-prediction information (intra-prediction mode) of the current block. If the prediction type information indicates inter-prediction, the entropy decoding unit (510) extracts syntax elements for inter-prediction information, i.e., information indicating a motion vector and a reference picture referenced by the motion vector.

[0088] Additionally, the entropy decoding unit (510) extracts information about the quantized transform coefficients of the current block as information related to quantization and information about residual signals.

[0089] The rearrangement unit (515) can change the sequence of one-dimensional quantized transform coefficients entropy-decoded in the entropy decoding unit (510) back into a two-dimensional coefficient array (i.e., block) in the reverse order of the coefficient scanning performed by the image encoding device.

[0090] The inverse quantization unit (520) inversely quantizes the quantized transform coefficients and inversely quantizes the quantized transform coefficients using the quantization parameters. The inverse quantization unit (520) may also apply different quantization coefficients (scaling values) to the quantized transform coefficients arranged in two dimensions. The inverse quantization unit (520) may perform inverse quantization by applying a matrix of quantized coefficients (scaling values) from an image encoding device to a two-dimensional array of quantized transform coefficients.

[0091] The inverse transform unit (530) inversely transforms the inverse quantized transform coefficients from the frequency domain to the spatial domain to restore residual signals, thereby generating a residual block for the current block.

[0092] In addition, when the inverse transform unit (530) inversely transforms only a portion of a transform block (sub-block), it extracts a flag (cu_sbt_flag) indicating that only a sub-block of the transform block has been transformed, directionality (vertical / horizontal) information (cu_sbt_horizontal_flag) of the sub-block, and / or position information (cu_sbt_pos_flag) of the sub-block, and inversely transforms the transform coefficients of the corresponding sub-block from the frequency domain to the spatial domain to restore residual signals, and fills “0” values ​​with residual signals for areas that have not been inversely transformed, thereby generating a final residual block for the current block.

[0093] In addition, when MTS is applied, the inverse transform unit (530) determines a transform function or a transform matrix to be applied in the horizontal and vertical directions using MTS information (mts_idx) signaled from the image encoding device, and performs inverse transform on the transform coefficients within the transform block in the horizontal and vertical directions using the determined transform function.

[0094] The prediction unit (540) may include an intra prediction unit (542) and an inter prediction unit (544). The intra prediction unit (542) is activated when the prediction type of the current block is intra prediction, and the inter prediction unit (544) is activated when the prediction type of the current block is inter prediction.

[0095] The intra prediction unit (542) determines the intra prediction mode of the current block among a plurality of intra prediction modes from the syntax elements for the intra prediction mode extracted from the entropy decoding unit (510), and predicts the current block using reference pixels around the current block according to the intra prediction mode.

[0096] The inter prediction unit (544) uses the syntax elements for the inter prediction mode extracted from the entropy decoding unit (510) to determine the motion vector of the current block and the reference picture referenced by the motion vector, and predicts the current block using the motion vector and the reference picture.

[0097] An adder (550) adds the residual block output from the inverse transform unit (530) and the predicted block output from the inter prediction unit (544) or the intra prediction unit (542) to restore the current block. The pixels within the restored current block are used as reference pixels when intra-predicting a block to be decoded later.

[0098] The loop filter unit (560) may include a deblocking filter (562), an SAO filter (564), and an ALF (566) as in-loop filters. The deblocking filter (562) deblocks the boundaries between restored blocks to remove blocking artifacts caused by block-by-block decoding. The SAO filter (564) and the ALF (566) perform additional filtering on restored blocks after deblocking filtering to compensate for differences between restored pixels and original pixels caused by lossy coding. The filter coefficients of the ALF are determined using information about filter coefficients decoded from the non-stream.

[0099] The restored blocks filtered through the deblocking filter (562), SAO filter (564), and ALF (566) are stored in the memory (570). When all blocks within a picture are restored, the restored picture is used as a reference picture for inter-predicting blocks within a picture to be encoded later.

[0100]

[0101] The present embodiment relates to encoding and decoding of images (videos) as described above. More specifically, the present invention provides a video coding method and device for effectively intra-predicting a current sample from restored reference samples and prediction samples using an extrapolation filter.

[0102] The following embodiments may be performed by an intra prediction unit (122) within a video encoding apparatus. Additionally, they may be performed by an intra prediction unit (542) within a video decoding apparatus.

[0103] The video encoding device can generate signaling information related to the present embodiment in terms of rate distortion optimization in encoding the current block. The video encoding device can encode the signaling information using the entropy encoding unit (155) and then transmit it to the video decoding device. The video decoding device can decode the signaling information related to the decoding of the current block from the bitstream using the entropy decoding unit (510).

[0104] In the following description, the term "target block" may be used interchangeably with the current block or coding unit (CU). Alternatively, the term "target block" may also refer to a portion of a coding unit.

[0105] Also, a value of a flag being true indicates that the flag is set to 1. Also, a value of a flag being false indicates that the flag is set to 0.

[0106] I. EIP(Extrapolation based Intra Prediction)

[0107] In the next-generation technology, the Enhanced Compression Model (ECM), the Extrapolation-based Intra Prediction (EIP) mode performs intra prediction using an extrapolation filter based on previously restored reference samples in the surroundings. The EIP mode uses restored reference samples and predicted samples as input, and sequentially performs extrapolation one pixel at a time. The reference sample area used to derive the extrapolation filter coefficients is as shown in the example of Fig. 6, and the extrapolation filter shapes used for prediction are as shown in the example of Fig. 7. At this time, the area of ​​the reference samples and the shape of the extrapolation filter are determined by explicit signaling.

[0108] As illustrated in the example of Fig. 8, intra prediction can be performed based on an extrapolation filter. That is, the EIP mode generates prediction samples using only restored reference samples as input. Alternatively, the EIP mode can generate prediction samples using restored reference samples and prediction signals as input, or using only prediction signals as input. In the EIP mode, the extrapolation filter generates a single prediction sample from input samples using a single filtering pass.

[0109] The following embodiments are described with a focus on an image decoding device, but can be implemented identically or similarly in an image encoding device.

[0110] II. Embodiments according to the present disclosure

[0111] The video decoding device according to the present embodiment determines prediction and transformation units, and performs prediction and inverse transformation on the current block corresponding to the determined unit using the determined prediction technique and prediction mode, thereby finally generating a restoration block of the current block. The example illustrated in FIG. 9 may be performed by the inverse transformation unit (530), the prediction unit (540), and the adder (550) of the video decoding device. Meanwhile, the same operations as the example illustrated in FIG. 9 may be performed by the inverse transformation unit (165), the picture division unit (110), the prediction unit (120), and the adder (170) of the video encoding device. At this time, the video decoding device uses encoding information parsed from the bitstream, but the video encoding device may use encoding information set from a higher level in terms of minimizing rate distortion. Hereinafter, for convenience, the present embodiment will be described with a focus on the video decoding device.

[0112] As shown in the example of FIG. 5, the prediction unit (540) includes an intra prediction unit (542) and an inter prediction unit (544) depending on the prediction technology, but as shown in FIG. 9, the prediction unit (540) may include all or part of the prediction unit determination unit (902), the prediction technology determination unit (904), the prediction mode determination unit (906), and the prediction execution unit (908).

[0113] If the color format of the input video is a YUV format (such as YUV420, YUV411, YUV422, YUV444), the video decoding device can perform prediction and restoration of the chroma component after performing prediction and restoration of the luma component. That is, the luma component and the chroma component can be sequentially restored by the components illustrated in Fig. 9. Meanwhile, if the color format of the input video is RGB, the video encoding device can perform color format conversion from RGB to YUV and then encode the converted video. Here, in the case of the YUV format, the color format represents the correspondence between the pixels of the luma component and the pixels of the chroma component.

[0114] The prediction unit determination unit (902) determines a prediction unit (PU). The prediction technique determination unit (904) determines a prediction technique (e.g., intra prediction, inter prediction, IBC (Intra Block Copy) mode, palette mode, etc.) for the prediction unit. The prediction mode determination unit (906) determines a detailed prediction mode for the prediction technique. The prediction execution unit (908) generates a prediction block of the current block according to the determined prediction mode.

[0115] The inverse transform unit (530) includes a transform unit determination unit (910) and an inverse transform execution unit (912). The transform unit determination unit (910) determines a transform unit (TU) for the inverse quantization signals of the current block, and the inverse transform execution unit (912) inversely transforms the transform unit expressed as the inverse quantization signals to generate residual signals.

[0116] An adder (550) adds the prediction block and residual signals to generate a restoration block. The restoration block is stored in memory and can be used to predict other blocks.

[0117] The prediction unit determined by the prediction unit determination unit (902) may be the current block or one of the sub-blocks into which the current block is divided. At this time, the prediction unit of the chroma component may have a size corresponding to the prediction unit of the luma component according to the color format. Alternatively, after the prediction units of the luma component and the chroma component are determined separately, prediction may be performed on the prediction unit of the chroma component.

[0118] The prediction technology determination unit (904) determines the prediction technology for each prediction unit. As described above, the prediction technology may be one of inter-prediction, intra-prediction, IBC mode, and palette mode. In this case, the prediction technology for the chroma component can be determined in the same manner as the prediction technology for the corresponding luma component, without separate signaling or parsing of information.

[0119] For example, if the prediction technique of the current block is not intra prediction, the video decoding device parses 1-bit flag information. For example, if the parsed flag indicates Skip mode, the video decoding device determines the prediction mode of the current block as the merge mode of inter prediction or the IBC merge mode. In the case of Skip mode, the video decoding device can use the prediction signals as restored signals without performing the inverse transformation process (i.e., without parsing the residual signals).

[0120] On the other hand, if the parsed flag does not indicate a Skip mode for the current block, the prediction technique determination unit (904) can parse a series of 1-bit flags to determine the prediction technique of the current block as one of techniques such as inter prediction, intra prediction, IBC mode, palette mode, etc.

[0121] For example, if Skip is not applied to the current block and the prediction technique is determined to be Inter-Prediction or IBC mode, the video decoding device parses a 1-bit flag. Depending on the parsed flag, the prediction mode of the current block can be determined as either General Merge mode or Advanced Motion Vector Prediction (AMVP) mode.

[0122] The prediction mode determination unit (906) determines a detailed prediction mode for the prediction technology.

[0123] As an example, if the prediction technique of the current block is intra prediction, the prediction mode determination unit (906) can determine one directional prediction mode, a Planar mode (Horizontal Planar, Vertical Planar, or Regular Planar), or a DC mode as the prediction mode of the current block.

[0124] As another example, if the prediction technique of the current block is intra prediction, the prediction mode determination unit (906) may determine a mode that performs prediction based on a predefined matrix as the prediction mode of the current block. The prediction mode determination unit (906) may determine a mode that calculates a gradient based on a restored reference sample and derives an intra prediction mode using the calculated gradient as the prediction mode of the current block. The prediction mode determination unit (906) may perform intra prediction based on reference samples, calculate a cost, and determine a mode that derives a prediction mode with the minimum cost as the intra prediction mode of the current block. At this time, a metric such as SAD (Sum of Absolute Differences) or SATD (Sum of Absolute Transformed Differences) may be used as the cost. Alternatively, the prediction mode determination unit (906) may determine a mode that derives a combination of the location of a reference sample line to be used for intra prediction and a prediction mode based on the cost (SAD or SATD) using a reference sample area as the prediction mode of the current block. At this time, which of the aforementioned prediction modes to use can be explicitly determined based on a flag. The order of signaling the flags for each prediction mode may vary depending on the embodiment. At this time, the image decoding device can additionally determine whether to perform extrapolation-based intra prediction by parsing a flag indicating whether to perform extrapolation-based intra prediction.

[0125] For example, when the aspect ratio (W / H) of the current block is greater than or less than a specific threshold, extrapolation-based intra prediction may not be performed. Here, / and H represent the width and height of the current block, respectively. When W×H is greater than or less than a specific threshold, extrapolation-based intra prediction may not be performed. Alternatively, extrapolation-based intra prediction may not be performed depending on the intra prediction mode of part / all of the block including reference samples, whether or not the reference sample area is used, etc. In the cases described above, when extrapolation-based intra prediction is not performed, the image decoding device may omit parsing of a flag indicating whether or not extrapolation-based intra prediction is performed.

[0126] The prediction execution unit (908) generates a prediction block of the current block according to the determined prediction technology and prediction mode.

[0127] As an example, the prediction performing unit (908) generates a prediction block of the current block according to the prediction mode, and the adder (550) adds the prediction block of the current block and residual signals to generate a restoration block.

[0128] FIG. 10 is a block diagram illustrating in detail a prediction execution unit according to one embodiment of the present disclosure.

[0129] For inter-component prediction, the prediction performer (908) includes a reference sample region determiner (1002), a filter shape determiner (1004), a filter coefficient determiner (1006), and an extrapolation performer (1008), as shown in the example of FIG. 10.

[0130] The reference sample area determination unit (1002) explicitly parses the reference sample area to be used for deriving the filter coefficients when extrapolation-based intra prediction is performed by deriving filter coefficients based on restored reference samples. As in the examples of FIGS. 11A to 11C, the image decoding device uses the left and top (first area) of the current block, the left (second area) of the current block, or the top (third area) of the current block as the reference sample area. The image decoding device determines the reference sample area by parsing information indicating one of the first area to the third area. In the examples of FIGS. 11A to 11C, A, B, C, and D are integer values ​​greater than or equal to 0, and can be defined according to an agreement between the image encoding device and the image decoding device.

[0131] If reference samples at specific locations relative to the current block are unavailable, the image decoding device derives filter coefficients excluding the corresponding region. Alternatively, the image decoding device may derive filter coefficients using reference samples that include samples generated by padding specific locations.

[0132] For example, if only one specific region is used as the reference sample region according to an agreement between an image encoding device and an image decoding device, the image decoding device can determine the specific region as the reference sample region to be used for deriving filter coefficients without additional parsing.

[0133] As another example, when using filter coefficients defined according to an agreement between an image encoding device and an image decoding device for extrapolation-based intra prediction, the operation of the reference sample area determination unit (1002) may be omitted.

[0134] The filter shape determination unit (1004) determines the filter shape for performing extrapolation-based intra prediction. The filter shape determination unit (1004) determines M, N, K, and L (wherein, M, N, K, and L are natural numbers) as illustrated in FIG. 12. In the example of FIG. 12, a rectangular K×L represents the size of the prediction pixel area, and M×NK×L represents the size of the input pixel area. In addition, M≥K, and N≥L.

[0135] As an example, a video decoding device can explicitly parse one of T forms defined according to a contract between the video encoding device and the video decoding device in the form of a filter, where T represents any positive integer greater than 0. Among the T filters, each filter has a different value for at least one of M, N, K, and L.

[0136] As an example, a combination of a reference sample area and a filter shape used for filter derivation can be defined according to an agreement between an image encoding device and an image decoding device. The image decoding device can parse an index indicating a combination and determine the reference sample area and filter shape based on the parsed index.

[0137] As an example, an image decoding device derives filter coefficients in a restoration reference sample region for each filter type among T filter types, and then generates prediction signals of a current block corresponding to each filter type and filter coefficient. At this time, the filter coefficients may be calculated by a filter coefficient determination unit (1006), and prediction signals of the current block may be generated by an extrapolation performing unit (1008). The image decoding device may calculate a cost (e.g., SAD) between prediction signals of the current block and restoration reference samples, and determine a filter type with a minimum calculated cost as a filter type for predicting the current block. At this time, an area for calculating the cost between prediction signals and restoration values ​​may be the same as an area determined by the reference sample area determination unit (1002). Alternatively, the area for calculating the cost may be a specific area defined according to an agreement between an image encoding device and an image decoding device (e.g., a first area illustrated in FIG. 11A).

[0138] As an example, the filter shape may be determined based on one or more of the size of the current block, the aspect ratio of the current block, a prior agreement between the video encoding device and the video decoding device, and explicit signaling.

[0139] Extrapolation-based intra prediction uses previously predicted samples as input, thus generating dependencies. For example, when K = L = 1, the image decoding device performs predictions in the order illustrated in Figure 13. In the example of Figure 13, pixels with the same restoration order represent pixels that can be predicted in parallel based on dependencies.

[0140] The number of pipelines according to the aforementioned dependency is determined by the number of pixels (K×L) output according to the extrapolated prediction. When the same number of predicted pixels is applied, the number of pipelines can be determined by the aspect ratio (W / H) of the current block and the aspect ratio (K / L) of the output predicted pixels.

[0141] To limit the maximum number of pipelines based on dependencies, the values ​​of K and L can be determined. At this time, K and L can be determined as follows based on the width, height, and aspect ratio of the current block.

[0142] If the aspect ratio of the current block is greater than 1, the first filter shape ((K / L)>1) is determined, and if the aspect ratio of the current block is less than 1, the second filter shape ((K / L)<1) is determined. If the aspect ratio of the current block is 1, a specific filter shape defined according to an agreement between the video encoding device and the video decoding device among the first filter shape or the second filter shape is determined, or the filter shape can be explicitly determined according to a flag. As illustrated in FIG. 14, the video decoding device can predict a block having an aspect ratio greater than 1 using the first filter shape. As illustrated in FIG. 15, the video decoding device can predict a block having an aspect ratio less than 1 using the second filter shape. As illustrated in FIG. 16, the video decoding device can predict a block having an aspect ratio of 1 using the first filter shape or the second filter shape.

[0143] As an example, if the aspect ratio of the current block is 1, the image decoding device can predict the current block using a separate filter form where K=L.

[0144] For example, for a block to which extrapolation-based intra prediction is applied, an image decoding device may use a specific filter shape defined according to an agreement between the image encoding device and the image decoding device depending on the block size. Alternatively, the image decoding device may define a candidate list of filter shapes based on the block size, and then explicitly determine the filter shape to be used for prediction. That is, the image decoding device may parse an index indicating one candidate, and then determine a filter shape from the candidate list using the parsed index.

[0145] The filter coefficient determination unit (1006) derives filter coefficients to be used for prediction according to the reference sample area and filter type. For example, when filter coefficients defined according to an agreement between an image encoding device and an image decoding device are used for extrapolation-based intra prediction, the derivation process by the filter coefficient determination unit (1006) may be omitted. The image decoding device may parse an index indicating filter coefficients and then determine filter coefficients to be used for prediction according to the parsed index.

[0146] Filter coefficients can be derived based on the same method in an image encoding device and an image decoding device. For example, an image decoding device derives filter coefficients such that the cost (e.g., SAD, MSE (Mean Square Error), etc.) between a value generated by multiplying the filter coefficients by the restoration reference samples defined according to the filter shape in the reference sample area and the restoration reference sample is minimized. When the filter shape is as in the example of Fig. 17, an image decoding device derives a 7x8 filter matrix to generate a prediction signal (O0 to O7) at each position from restoration reference samples of 1x7 (I0 to I6). That is, in order to derive the above-described filter matrix, an image decoding device can derive filter coefficients (C0 to C6) in terms of LS (Least Square) optimization at each prediction position. For the filter shape of Fig. 9, filter coefficients for generating a prediction value at the ith output position can be defined as in Equation 1.

[0147]

[0148] In mathematical expression 1, the filter coefficients (C) can be derived by methods such as Gaussian elimination method, LDL decomposition, Cholesky decomposition, etc.

[0149] As an example, when deriving filter coefficients, an image decoding device can subtract an offset from input reference samples and output reference samples, and then derive filter coefficients using the input reference samples and output reference samples from which the offset has been subtracted. Here, the offset can be an average value of the reference samples, a median value of the reference samples, or a median value determined according to a bit depth. When deriving filter coefficients after subtracting the offset (B), the image decoding device can additionally derive a filter coefficient (C7) for the offset as in Equation 2.

[0150]

[0151] In Equation 1 or Equation 2, I and O represent restoration reference samples of surrounding blocks. In addition, I i,j and O i,j In , i represents the position of the input sample and output sample, and j represents the index of the matching pair between input and output, which is determined, for example, according to a sliding window method.

[0152] The extrapolation performing unit (1008) performs extrapolation-based intra prediction by applying the determined filter coefficients to the reference samples and prediction samples of the current block, thereby generating a prediction block of the current block.

[0153] According to the example of Fig. 12 and the determined filter form, the image decoding device can generate K×L prediction samples by multiplying the determined filter matrix by M×NK×L input samples. At this time, as in the examples of Figs. 13 to 16, the image decoding device can predict predictable areas at the same time in parallel according to dependency.

[0154] For example, when filter coefficients are derived by considering an offset, an image decoding device can generate final prediction signals by subtracting the offset from input samples and then applying the filter coefficients to the input samples from which the offset has been subtracted. As described above, the offset can be an average value of reference samples, a median value of the reference samples, or a median value determined according to a bit depth. In this case, the average value can be calculated based on surrounding restored reference samples. For example, the image decoding device can calculate the average value of the reference samples by averaging restored reference samples within one or more reference sample lines adjacent to the reference sample area.

[0155] In some embodiments, clipping may be applied so that the output (O) of the extrapolation falls between specific threshold values ​​(i.e., TH0 ≤ O ≤ TH1). In this case, the threshold value TH0 may be determined as the minimum value among the surrounding reference samples, and the threshold value TH1 may be determined as the maximum value among the surrounding reference samples.

[0156] In predicting a current chroma block, if the prediction mode of the chroma block is DM mode and the corresponding luma block is predicted by extrapolation-based intra prediction, the video decoding device can predict the chroma block by extrapolation-based intra prediction. Alternatively, the chroma block can be predicted by any intra prediction mode (e.g., DC, Planar mode, etc.). If the current chroma block is predicted by extrapolation-based intra prediction, the video decoding device can use the filter shape and filter coefficients calculated from the corresponding luma block. Alternatively, after inheriting the filter shape of the corresponding luma block, the video decoding device can derive filter coefficients based on reconstructed chroma reference samples and predict the current chroma block by using the derived filter coefficients.

[0157] As described above, the image decoding device inversely transforms the inverse quantized transform coefficients to restore residual signals. At this time, if the block to be inversely transformed is predicted according to extrapolation-based intra prediction, the image decoding device may determine the inverse transform kernels as in the following examples when determining the first inverse transform kernel and / or the second inverse transform kernel. At this time, the first inverse transform kernel may be a separable first inverse transform kernel or a non-separable first inverse transform kernel. The second inverse transform kernel may be a non-separable second inverse transform kernel.

[0158] As an example, an image decoding device calculates gradient values ​​of prediction signals generated according to extrapolation-based intra prediction, and then derives an intra prediction mode of a current block based on the calculated gradient values. For example, the image decoding device generates a Histogram of Oriented Gradient (HoG) based on prediction signals generated according to extrapolation-based intra prediction, and derives a directional prediction mode corresponding to the most accumulated direction based on the generated HoG. The image decoding device sets the derived directional prediction mode as the intra prediction mode of the current block. The image decoding device can determine inverse transform kernels of the current block based on the set intra prediction mode.

[0159] As another example, the video decoding device may set the intra prediction mode of the current block to a specific intra prediction mode (e.g., DC, Planar, etc.) and determine the inverse transform kernels of the current block based on the set intra prediction mode. Here, the specific intra prediction mode may be determined in advance according to an agreement between the video encoding device and the video decoding device.

[0160] Below, a method for performing extrapolation-based intra prediction using the cities of FIGS. 18 and 19 is described.

[0161] FIG. 18 is a flowchart illustrating a method for an image encoding device to encode a current block according to an embodiment of the present disclosure.

[0162] When performing extrapolation-based intra prediction, the image encoding device determines a reference sample area used for deriving filter coefficients (S1800).

[0163] Here, the reference sample area includes restoration reference samples of the current block. The reference sample area is located on the left and top of the current block, on the left side of the current block, or on the top of the current block, as shown in the examples of FIGS. 11A to 11C . As shown in the examples of FIGS. 11A to 11C , the size of the reference sample area is defined based on preset parameter values ​​such as A, B, C, and D in addition to the width and height of the current block.

[0164] The video encoding device can determine whether to perform extrapolation-based intra prediction depending on the aspect ratio of the current block, the size of the current block, the intra prediction mode of part or all of the block containing the restoration reference samples, or whether to use the reference sample area.

[0165] The video encoding device determines a filter shape used for extrapolation-based intra prediction (S1802). Here, the filter shape is rectangular and includes a prediction pixel area and an input pixel area. The prediction pixel area is a rectangular area having a width and a height, and the input pixel area is located on the left, top, or left and top of the prediction pixel area.

[0166] As an example, an image encoding device determines an index indicating one of the predefined filter types. The image encoding device encodes the determined index.

[0167] As another example, the video encoding device can determine the filter shape based on the aspect ratio of the current block.

[0168] The image encoding device derives filter coefficients according to the reference sample area and filter shape (S1804).

[0169] The image encoding device applies the derived filter coefficients to the restoration reference samples and prediction samples of the current block to generate a first prediction block of the current block (S1806).

[0170] The video encoding device determines the intra prediction mode of the current block (S1808). Here, the intra prediction mode indicates a prediction mode other than an extrapolation-based intra prediction mode.

[0171] The video encoding device generates a second prediction block of the current block according to the intra prediction mode (S1810).

[0172] The video encoding device determines a flag indicating whether to perform extrapolation-based intra prediction based on the first prediction block and the second prediction block (S1812).

[0173] In terms of rate distortion optimization, the video encoding device can determine a flag. For example, if the first prediction block is optimal, the flag is set to true. Conversely, if the second prediction block is optimal, the flag is set to false.

[0174] The video encoding device encodes a flag (S1814).

[0175] The video encoding device generates residual signals of the current block by subtracting the first prediction block or the second prediction block from the current block according to the value of the flag. The video encoding device transforms / quantizes the residual signals to generate quantized transform coefficients and encodes the quantized transform coefficients.

[0176] Meanwhile, in order to transform residual signals derived from the first prediction block, the image encoding device may determine a first transform kernel and / or a second transform kernel as follows. At this time, the first transform kernel may be a separable first transform kernel or a non-separable first transform kernel. The second transform kernel may be a non-separable second transform kernel. The image encoding device calculates gradient values ​​of prediction signals in the first prediction block, and derives an intra prediction mode of the current block based on the calculated gradient values. For example, the image encoding device generates an HoG based on first prediction signals generated according to extrapolation-based intra prediction, and derives a directional prediction mode corresponding to the most accumulated direction according to the generated HoG. The image encoding device sets the derived directional prediction mode as the intra prediction mode of the current block. The image encoding device may determine transform kernels of the current block based on the set intra prediction mode.

[0177] FIG. 19 is a flowchart illustrating a method for an image decoding device to restore a current block according to one embodiment of the present disclosure.

[0178] The video decoding device decodes a flag indicating whether to perform extrapolation-based intra prediction from a bitstream (S1900).

[0179] The video decoding device decodes the aforementioned flag depending on the aspect ratio of the current block, the size of the current block, the intra prediction mode of part or all of the block containing the restoration reference samples, or whether the reference sample area is used.

[0180] The video decoding device checks the flag (S1902).

[0181] If the flag is true (Yes in S1902), the video decoding device performs the following steps.

[0182] The image decoding device determines a reference sample area used for deriving filter coefficients (S1904).

[0183] Here, the reference sample area includes restoration reference samples of the current block. The reference sample area is located on the left and top of the current block, on the left side of the current block, or on the top of the current block, as shown in the examples of FIGS. 11A to 11C . As shown in the examples of FIGS. 11A to 11C , the size of the reference sample area is defined based on preset parameter values ​​such as A, B, C, and D in addition to the width and height of the current block.

[0184] The image decoding device determines the filter shape used for extrapolation-based intra prediction (S1906). Here, the filter shape is rectangular and includes a prediction pixel area and an input pixel area. The prediction pixel area is a rectangular area having a width and a height, and the input pixel area is located on the left, top, or left and top of the prediction pixel area.

[0185] As an example, a video decoding device decodes an index indicating one of the predefined filter shapes from a bitstream. The video decoding device determines the filter shape based on the decoded index.

[0186] As another example, the video decoding device can determine the filter shape according to the aspect ratio of the current block. For example, if the aspect ratio of the current block is greater than 1, the video decoding device determines a shape in which the aspect ratio of the prediction pixel area is greater than 1 as the filter shape. If the aspect ratio of the current block is less than 1, the video decoding device determines a shape in which the aspect ratio of the prediction pixel area is less than 1 as the filter shape. If the aspect ratio of the current block is 1, the video decoding device determines a shape in which the aspect ratio of the prediction pixel area is greater than or less than 1 as the filter shape according to an agreement between the video encoding device and the video decoding device. Alternatively, if the aspect ratio of the current block is 1, the video decoding device determines a shape in which the aspect ratio of the prediction pixel area is 1 as the filter shape.

[0187] The image decoding device derives filter coefficients according to a reference sample area and a filter shape (S1908). The filter coefficients are derived so as to minimize the cost between the restored reference sample and the value generated by multiplying the filter coefficients by the restored reference samples defined according to the filter shape in the reference sample area.

[0188] As an example, an image decoding device derives a filter matrix that depends on the size of the input pixel area and the size of the predicted pixel area.

[0189] As another example, an image decoding device subtracts an offset from input reference samples and output reference samples defined according to a filter shape in a reference sample area, and then derives filter coefficients using the input reference samples and output reference samples from which the offset has been subtracted. At this time, the offset may be an average value of the restored reference samples, a median value of the restored reference samples, or a median value determined according to a bit depth.

[0190] The image decoding device applies the derived filter coefficients to the restoration reference samples and prediction samples of the current block to generate a prediction block of the current block (S1910).

[0191] The image decoding device generates prediction samples in parallel within the prediction pixel region according to dependencies by applying a filter matrix to the input pixel region.

[0192] On the other hand, if the flag is false (No in S1902), the video decoding device performs the following steps.

[0193] The video decoding device obtains the intra prediction mode of the current block (S1920). Here, the intra prediction mode indicates a prediction mode other than an extrapolation-based intra prediction mode.

[0194] The video decoding device generates a prediction block of the current block according to the intra prediction mode (S1922).

[0195] The video decoding device decodes quantized transform coefficients from the bitstream and dequantizes / inversely transforms the quantized transform coefficients to restore residual signals. The video decoding device adds the predicted block and residual signals to generate restored signals for the current block.

[0196] Meanwhile, for inverse transformation, the image decoding device may determine the first inverse transform kernel and / or the second inverse transform kernel as follows. At this time, the first inverse transform kernel may be a separable first inverse transform kernel or a non-separable first inverse transform kernel. The second inverse transform kernel may be a non-separable second inverse transform kernel. The image decoding device calculates gradient values ​​of prediction signals generated according to extrapolation-based intra prediction, and derives an intra prediction mode of the current block based on the calculated gradient values. For example, the image decoding device generates an HoG based on prediction signals generated according to extrapolation-based intra prediction, and derives a directional prediction mode corresponding to the most accumulated direction based on the generated HoG. The image decoding device sets the derived directional prediction mode as the intra prediction mode of the current block. The image decoding device may determine inverse transform kernels of the current block based on the set intra prediction mode.

[0197] Although the flowchart / timing diagram of this specification describes each process as being executed sequentially, this is merely an illustrative description of the technical idea of ​​one embodiment of the present disclosure. In other words, a person of ordinary skill in the art to which one embodiment of the present disclosure belongs may modify and apply various modifications and variations by changing the order described in the flowchart / timing diagram without departing from the essential characteristics of one embodiment of the present disclosure, or by executing one or more of the processes in parallel. Therefore, the flowchart / timing diagram is not limited to a chronological order.

[0198] It should be understood that the exemplary embodiments described above can be implemented in many different ways. The functions or methods described in one or more examples can be implemented in hardware, software, firmware, or any combination thereof. It should be understood that the functional components described herein are labeled as "units" to further emphasize their implementation independence.

[0199] Meanwhile, the various functions or methods described in this embodiment may also be implemented as instructions stored on a non-transitory storage medium that can be read and executed by one or more processors. Non-transitory storage media include, for example, all types of storage devices that store data in a form readable by a computer system. For example, non-transitory storage media include storage media such as erasable programmable read-only memory (EPROM), flash drives, optical drives, magnetic hard drives, and solid-state drives (SSDs).

[0200] The above description is merely an example of the technical idea of ​​the present embodiment, and those skilled in the art will appreciate that various modifications and variations can be made without departing from the essential characteristics of the present embodiment. Therefore, the present embodiments are not intended to limit the technical idea of ​​the present embodiment, but rather to explain it, and the scope of the technical idea of ​​the present embodiment is not limited by these embodiments. The scope of protection of the present embodiment should be interpreted by the claims below, and all technical ideas within a scope equivalent thereto should be interpreted as being included in the scope of rights of the present embodiment.

[0201] (Explanation of symbols)

[0202] 122: Intra prediction unit

[0203] 542: Intra prediction unit

[0204] 902: Prediction Unit Decision Unit

[0205] 904: Prediction Technology Decision Division

[0206] 906: Prediction mode decision unit

[0207] 908: Prediction Performance Department

[0208] 1002: Reference sample area determination section

[0209] 1004: Filter type determination unit

[0210] 1006: Filter coefficient determination unit

[0211] 1008: Extrapolation Department

[0212]

[0213] CROSS-REFERENCE TO RELATED APPLICATION

[0214] This patent application claims priority to Korean patent application No. 10-2023-0063334, filed in Korea on May 16, 2023, and Korean patent application No. 10-2024-0051001, filed in Korea on April 16, 2024, the entire contents of which are incorporated herein by reference.

Claims

1. A method for restoring a current block performed by a video decoding device, A step of determining a reference sample area used for deriving filter coefficients, wherein the reference sample area includes restored reference samples of the current block; A step of determining a filter shape used for extrapolation-based intra prediction, wherein the filter shape has a rectangular shape and includes a prediction pixel area and an input pixel area; A step of deriving the filter coefficients according to the above reference sample area and the filter shape; and A step of applying the above-described derived filter coefficients to the restoration reference samples and prediction samples of the current block to generate a prediction block of the current block. A method, characterized by including:

2. In paragraph 1, A step of decoding a flag indicating whether to perform extrapolation-based intra prediction from a bitstream depending on the aspect ratio of the current block, the size of the current block, the intra prediction mode of part or all of a block including the restoration reference samples, or whether the reference sample area is used; and Steps to check the above flags Including more, A method characterized in that a step of decrypting the reference sample area is performed when the above flag is true.

3. In paragraph 1, A method, characterized in that the reference sample area is located at the top of the current block, at the left side of the current block, or at the left and top of the current block, and the size of the reference sample area is defined based on the width of the current block, the height of the current block, and preset parameter values.

4. In paragraph 1, A method, characterized in that the above prediction pixel area is a rectangular area having a width and a height, and the input pixel area is located at the left, top, or left and top of the prediction pixel area.

5. In paragraph 1, The step of determining the above filter type is: A method characterized in that after decoding an index indicating one of the predefined filter shapes from a bitstream, the filter shape is determined based on the index.

6. In paragraph 1, The step of determining the above filter type is: A step of deriving filter coefficients in a predefined reference sample area for each filter type among the predefined filter types; A step of generating prediction signals of the current block corresponding to each filter type and the filter coefficients in the above-definition reference sample area; and A step of selecting a filter form that minimizes the cost between the restoration samples corresponding to the prediction signals of the current block and the prediction signals of the current block. A method, characterized by including:

7. In paragraph 1, The step of determining the above filter type is: A method characterized in that, when the aspect ratio of the current block is greater than 1, a shape having an aspect ratio of the predicted pixel area greater than 1 is determined as the filter shape, and when the aspect ratio of the current block is less than 1, a shape having an aspect ratio of the predicted pixel area less than 1 is determined as the filter shape.

8. In paragraph 1, The step of determining the above filter type is: A method characterized in that, when the aspect ratio of the current block is 1, a shape having an aspect ratio of 1 in the predicted pixel area is determined as the filter shape.

9. In paragraph 1, The step of deriving the above filter coefficients is: A method characterized in that the filter coefficients are derived so as to minimize the cost between the restored reference sample and the value generated by multiplying the filter coefficients by the restored reference samples defined according to the filter type in the above reference sample area.

10. In paragraph 1, The step of deriving the above filter coefficients is: A method characterized by deriving a filter matrix that depends on the size of the input pixel area and the size of the predicted pixel area.

11. In paragraph 10, The step of generating a prediction block of the current block is as follows: A method characterized in that prediction samples within the prediction pixel area are generated in parallel according to dependency by applying the filter matrix to the input pixel area.

12. In paragraph 1, The step of deriving the above filter coefficients is: A method for deriving the filter coefficients by subtracting an offset from input reference samples and output reference samples defined according to the filter type in the reference sample area, and using the input reference samples and output reference samples from which the offset has been subtracted, wherein the offset is an average value of the restored reference samples, a median value of the restored reference samples, or a median value determined according to a bit depth.

13. In paragraph 1, A step of generating a Histogram of Oriented Gradient (HoG) based on prediction signals within the above prediction block and deriving a directional prediction mode corresponding to the most accumulated direction according to the HoG; A step of setting the above-described directional prediction mode as the intra prediction mode of the current block; and A step of determining the inverse transform kernels of the current block based on the intra prediction mode set above. A method, characterized in that it further comprises:

14. A method for encoding a current block performed by a video encoding device, A step of determining a reference sample area used for deriving filter coefficients, wherein the reference sample area includes restored reference samples of the current block; A step of determining a filter shape used for extrapolation-based intra prediction, wherein the filter shape has a rectangular shape and includes a prediction pixel area and an input pixel area; A step of deriving the filter coefficients according to the above reference sample area and the filter shape; and A step of applying the above-described derived filter coefficients to the restoration reference samples and prediction samples of the current block to generate a first prediction block of the current block. A method, characterized by including:

15. In paragraph 14, A method characterized by performing a step of determining the reference sample area depending on an aspect ratio of the current block, a size of the current block, an intra prediction mode of part or all of a block including the restored reference samples, or whether the reference sample area is used.

16. In paragraph 14, A step of determining an intra prediction mode of the current block, wherein the intra prediction mode represents a prediction mode other than the extrapolation-based intra prediction mode; and A step of generating a second prediction block of the current block according to the intra prediction mode. A method, characterized in that it further comprises:

17. In paragraph 16, A step of determining a flag indicating whether to perform extrapolation-based intra prediction based on the first prediction block and the second prediction block; and Step of encoding the above flag A method, characterized in that it further comprises:

18. In paragraph 14, A step of generating a HoG based on prediction signals within the above prediction block and deriving a directional prediction mode corresponding to the most accumulated direction according to the HoG; A step of setting the above-described directional prediction mode as the intra prediction mode of the current block; and A step of determining transformation kernels of the current block based on the intra prediction mode set above. A method, characterized in that it further comprises:

19. A method for providing video data to a video decoding device, A step of encoding the above video data into a bitstream; and A step of transmitting the above bitstream to the image decoding device Including, The step of encoding the above video data is: A step of determining a reference sample area used for deriving filter coefficients, wherein the reference sample area includes restored reference samples of the current block; A step of determining a filter shape used for extrapolation-based intra prediction, wherein the filter shape has a rectangular shape and includes a prediction pixel area and an input pixel area; A step of deriving the filter coefficients according to the above reference sample area and the filter shape; and A step of applying the above-described derived filter coefficients to the restoration reference samples and prediction samples of the current block to generate a prediction block of the current block. A method, characterized by including:

20. In paragraph 19, The step of encoding the above video data is: A step of generating a HoG based on prediction signals within the above prediction block and deriving a directional prediction mode corresponding to the most accumulated direction according to the HoG; A step of setting the above-described directional prediction mode as the intra prediction mode of the current block; and A step of determining transformation kernels of the current block based on the intra prediction mode set above. A method, characterized in that it further comprises:

Citation Information

Patent Citations

  • Method and apparatus for processing a video signal

    KR1020180001479A

  • Aligning module and substrate processing system having the same

    KR1020210026270A

  • Memory system, memory controller, and operating method of memory system

    KR1020210113743A

  • Microspeaker

    KR1020240161880A

Cited By

  • Video coding and decoding method and device based on prediction enhancement

    CN119697376A

  • Extrapolation based intra prediction filter for video encoding and decoding

    WO2026149694A1