Method for transform or inverse transform on basis of information of neighboring blocks
By leveraging surrounding block information for transformation and inverse transformation, the method enhances video encoding efficiency and quality, addressing the challenges of increasing video data sizes and resolutions.
Patent Information
- Application Number
- PCT/KR2025/008273
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-07-15
- Filing Date
- 2025-06-16
- Publication Date
- 2026-01-22
Smart Images

Figure KR2025008273_22012026_PF_FP_ABST
Abstract
Description
Method for transformation or inverse transformation based on surrounding block information
[0001] The present disclosure relates to a video encoding / decoding method, device, and recording medium for storing a bitstream, and relates to a transformation or inverse transformation method based on information of a surrounding block.
[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, the encoder compresses the video data and stores or transmits it, and the decoder receives the compressed video data, decompresses it, and plays it back. These 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 video size, resolution, and frame rate continue to increase, and the amount of data to be encoded also increases, new compression technologies with better encoding efficiency and improved image quality are required. For example, to improve video encoding efficiency and image quality, a method for efficiently performing intra prediction is needed.
[0006] The present disclosure aims to provide a video encoding / decoding method and device for deriving transformation and inverse transformation information of a current block by using transformation and inverse transformation information of surrounding blocks within a restored area, and a recording medium for storing a bitstream generated by the video encoding method / device.
[0007] According to an embodiment of the present disclosure, a method for restoring a current block, performed by an image decoding device, is provided, the method further comprising: obtaining inverse quantized transform coefficients of the current block; constructing a merge list including transform information of surrounding pre-restored blocks of the current block; obtaining a merge index; determining transform information of the current block from the merge list using the merge index; and performing inverse transform on the inverse quantized transform coefficients based on the transform information of the current block.
[0008] According to another embodiment of the present disclosure, a method for encoding a current block, performed by a video encoding device, is provided, the method further comprising: obtaining residual signals of the current block; constructing a merge list including transformation information of surrounding reconstructed blocks of the current block; determining a merge index; determining transformation information of the current block from the merge list using the merge index; and transforming the residual signals based on the transformation information of the current block.
[0009] 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: obtaining residual signals of a current block; constructing a merge list including transformation information of surrounding pre-restored blocks of the current block; determining a merge index; determining transformation information of the current block from the merge list using the merge index; and transforming the residual signals based on the transformation information of the current block.
[0010] As described above, according to the present embodiment, by providing a video encoding / decoding method, a device, and a recording medium for storing a bitstream generated by the video encoding method / device, it is possible to improve video encoding efficiency and enhance video quality.
[0011] FIG. 1 is an exemplary block diagram of an image encoding device capable of implementing the techniques of the present disclosure.
[0012] Figure 2 is a drawing for explaining a method of dividing a block using the QTBTTT (QuadTree plus BinaryTree TernaryTree) structure.
[0013] FIGS. 3A and 3B are diagrams illustrating multiple intra prediction modes, including wide-angle intra prediction modes.
[0014] Figure 4 is an example diagram of the surrounding blocks of the current block.
[0015] FIG. 5 is an exemplary block diagram of an image decoding device capable of implementing the techniques of the present disclosure.
[0016] Figures 6a and 6b are flowcharts showing a method for determining an inverse transform kernel.
[0017] FIG. 7 is a block diagram illustrating in detail a portion of an image decoding device according to one embodiment of the present disclosure.
[0018] FIG. 8 is a flowchart illustrating a method for determining an inverse transform kernel according to one embodiment of the present disclosure.
[0019] FIG. 9A and FIG. 9B are exemplary diagrams showing peripheral blocks according to one embodiment of the present disclosure.
[0020] FIG. 10 is a flowchart illustrating a method for determining an inverse transform kernel according to another embodiment of the present disclosure.
[0021] FIG. 11 is a flowchart illustrating a method for a video encoding device to transform a current block according to an embodiment of the present disclosure.
[0022] FIG. 12 is a flowchart illustrating a method for an image decoding device to inversely transform a current block according to one embodiment of the present disclosure.
[0023] 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.
[0024] 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.
[0025] 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).
[0026] 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.
[0027] 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.
[0028] 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.
[0029] 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.
[0030] 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).
[0031] Figure 2 is a drawing for explaining a method of dividing a block using the QTBTTT structure.
[0032] 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.
[0033] 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.
[0034] 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.
[0035] 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.
[0036] 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).
[0037] 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.
[0038] 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.
[0039] 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.
[0040] 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.
[0041] 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.
[0042] 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.
[0043] 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.
[0044] 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.
[0045] Various methods can be used to minimize the number of bits required to encode motion information.
[0046] 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'.
[0047] 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.
[0048] 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.
[0049] 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.
[0050] 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.
[0051] Hereinafter, merge mode and merge skip mode are collectively referred to as merge / skip mode.
[0052] Another method for encoding motion information is Advanced Motion Vector Prediction (AMVP) mode.
[0053] 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.
[0054] 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.
[0055] 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.
[0056] 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.
[0057] 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.
[0058] 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.
[0059] 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.
[0060] 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.
[0061] The rearrangement unit (150) can perform rearrangement of coefficient values for quantized residual values.
[0062] 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.
[0063] 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.
[0064] 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.
[0065] 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.
[0066] 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.
[0067] 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.
[0068] 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.
[0069] 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.
[0070] 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.
[0071] 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.
[0072] 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).
[0073] 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.
[0074] 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.
[0075] 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.
[0076] 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.
[0077] 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.
[0078] 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.
[0079] 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.
[0080] 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.
[0081] 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.
[0082] 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.
[0083] 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.
[0084] 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.
[0085] 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.
[0086] 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.
[0087] 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.
[0088] 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.
[0089] 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.
[0090] 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.
[0091] 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.
[0092] The present embodiment relates to encoding and decoding of images (video) as described above. More specifically, it provides an image encoding / decoding method and device for deriving transformation and inverse transformation information of a current block using transformation and inverse transformation information of surrounding blocks within a restored area, and a recording medium for storing a bitstream generated by the image encoding method / device.
[0093] The following embodiments may be performed by a prediction unit (120), a transformation unit (140), and an inverse transformation unit (165) within a video encoding apparatus. In addition, the following embodiments may be performed by a prediction unit (540) and an inverse transformation unit (530) within a video decoding apparatus.
[0094] 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).
[0095] 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.
[0096] 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.
[0097] The decoder side includes all or part of the inverse quantization unit (160), the inverse transform unit (165), the prediction unit (120), the adder (170), the loop filter unit (180), and the memory (190) in the video encoding device illustrated in FIG. 1. Alternatively, the decoder side includes all or part of the inverse quantization unit (520), the inverse transform unit (530), the prediction unit (540), the adder (550), the loop filter unit (560), and the memory (570) in the video decoding device illustrated in FIG. 5. With respect to a series of decoding processes, the decoder side of the video encoding device and the decoder side of the video decoding device perform the same operation. The video encoding device determines information related to the operation of the decoder side and signals the determined information to the video decoding device. The video decoding device can decode the signaled information and operate the decoder side based on the decoded information.
[0098] I-1. Conversion Technology - Primary Conversion Technology
[0099] As mentioned above, for efficient video compression, quantization or scaling can be additionally applied to residual signals remaining after prediction using various prediction techniques. At this time, a transform technique can be applied based on the importance of perceptual visual information inherent in the residual signals to cluster the residual signals into one group according to frequency components, and then scaling can be performed. However, for non-natural signals, such as screen contents, this frequency-based transform technique can be inefficient. In such cases, the transform technique can be omitted, and only scaling can be performed, or encoding / decoding can be performed without applying scaling.
[0100] When a transform is applied in HEVC, DCT-II is used as a transform kernel (hereinafter, used interchangeably with transform type) to transform residual signals. However, in order to apply a more appropriate transform technique depending on the diversity of residual signal characteristics, Multiple Transform Selection (MTS) can be used. MTS determines the optimal type among multiple transform types, and then transforms the block according to the determined transform type. For example, in VVC, as shown in Table 1, in addition to DCT-II, two other transform types, DCT-VIII and DST-VII, are added so that residual signals can be transformed in various ways.
[0101]
[0102] Here, basis functions form a transformation matrix that defines each transformation type. Hereinafter, DCT-II, DCT-VIII, and DST-VII are used interchangeably with DCT2, DCT8, and DST7, respectively.
[0103] Meanwhile, the flag determining whether MTS is used can be controlled at the block level. Furthermore, MTS use can be controlled using an activation flag at the higher SPS level.
[0104] When MTS is enabled in SPS, a CU level flag may be displayed to indicate whether MTS is applied. Here, MTS may be applied to the luma component. The CU level flag may be expressed when both the width and height of the Transform Block (TB) are less than or equal to 32 pixels, and the Coded Block Flag (CBF), which indicates whether any of the transform coefficient levels have non-zero values, is true.
[0105] When the CU level flag is 0, DCT2 is used as a bidirectional kernel in both the horizontal and vertical directions. On the other hand, when the CU level flag is not 0, MTS is applied. MTS can be used in two ways: explicit MTS and implicit MTS.
[0106] In explicit MTS, the kernel used for the TB is explicitly transmitted. Typically, the index of the transformation kernel can be transmitted. For example, the kernel index, mts_idx, can be defined as shown in Table 2.
[0107]
[0108] Here, trTypeHor and trTypeVer represent the horizontal and vertical transformation types, respectively. Additionally, 0 represents DCT2, 1 represents DST7, and 2 represents DCT8.
[0109] Meanwhile, in implicit MTS, for example, the transformation type can be determined implicitly even if MTS is not explicitly signaled in the case of an intra block. In VVC, the horizontal and vertical transformation types can be determined implicitly, as in Equation 1.
[0110]
[0111] Here, nTbW and nTbH represent the horizontal and vertical lengths of the transformation block, respectively.
[0112] Meanwhile, the next-generation technology, ECM (Enhanced Compression Model) software, increases the number and types of MTS kernels, adding DST7, DCT8, DCT5, DST4, DST1, and identity transform.
[0113] I-2. Low-frequency Non-separable Transform (LFNST)
[0114] The LFNST technique applies a secondary transform to the low-frequency region among the transform coefficients generated according to the primary transform of the transform unit (TU) during intra prediction. In terms of encoding, the LFNST technique applies the secondary transform to L low-frequency primary transform coefficients among the W×H primary transform coefficients, thereby generating K (where K ≤ L) secondary transform coefficients. Here, the size of the transform kernel of the LFNST is L×K. That is, the LFNST technique expresses the L low-frequency primary transform coefficients among the W×H primary transform coefficients as a 1×L vector, and then applies the L×K transform kernel to generate a 1×K vector. Thereafter, the LFNST technique expresses the 1×K vector as a two-dimensional array in the low-frequency region for subsequent processes such as quantization.
[0115] Compared to the first-order transformation that applies separate transformation kernels in the horizontal and vertical directions, the LFNST technique performs a non-separable transform that transforms a one-dimensional vector.
[0116] Meanwhile, the type of transformation kernel can be determined based on the intra prediction mode of the current TU, the size of the TU, and the LFNST index (lfnst_idx). For example, in VVC, a set of transformation kernels can be determined based on the intra prediction mode (IntraPredMode) of the current TU, as shown in Table 3.
[0117]
[0118] Here, the intra prediction mode (IntraPredMode) follows the example of Fig. 3b. Additionally, lfnstTrSetIdx is an index indicating a kernel set. In Table 3, IntraPredMode values of 81, 82, and 83 indicate CCLM (Cross-component Linear Model) prediction modes.
[0119] For each kernel set (lfnstTrSetIdx), two types of kernels are defined. Which kernel is selected among the two types of kernels can be indicated by the LFNST index. If the LFNST index is 0, it means that LFNST is not performed, and if the LFNST index is 1 or 2, a different LFNST kernel within the same kernel set is applied. Since there is one more kernel set depending on the size of the TU, there are a total of 4×2×2 = 16 transformation kernels. The kernel sizes of LFNST are defined as 16×16 and 16×48. In addition, the kernel size can be adjusted as shown in Table 4 depending on the size of the TU.
[0120]
[0121] In ECM, a set of transformation kernels can be defined depending on the block shape and intra prediction mode. For example, by utilizing the symmetry property of square blocks, a set of 35 transformation kernels is defined for a square block depending on the intra prediction mode.
[0122] Meanwhile, when MIP (Matrix-weighted Intra Prediction) prediction is performed on the current TU in VVC, the image decoding device maps the intra prediction mode of the current TU to the Planar mode and then determines the transformation kernel according to the mapped prediction mode. The MIP technology includes MIP boundary downsampling, Matrix-Vector multiplication, and MIP prediction upsampling processes. 'MIP boundary downsampling' refers to the process of downsampling a specific number of pixels among the boundary pixels of the current block. 'Matrix-Vector multiplication' refers to the process of generating a reduced prediction block by multiplying the downsampled pixels (i.e., 'vector') by a preset matrix. 'MIP prediction upsampling' refers to the process of generating a final prediction block by upsampling the reduced prediction block.
[0123] In addition, when MIP prediction is performed in the next-generation technology, ECM (Enhanced Compression Model), the video decoding device obtains a directional prediction mode by applying DIMD (Decoder-side Intra Mode Derivation) to the MIP-predicted block, i.e., the output of the 'Matrix-Vector Product'. The video decoding device maps the intra prediction mode of the current TU to the obtained directional prediction mode, and then determines the transformation kernel according to the mapped prediction mode. The DIMD technology calculates the gradient of each sample for adjacent samples of the current block, generates a HoG (Histogram of Gradient) from the calculated gradients, and derives a prediction mode for intra prediction of the current block according to the generated HoG.
[0124] Meanwhile, when the DCT2 / DCT2 transform kernel is applied as a first transform to the intra-predicted TU in VVC, the LFNST technique can be applied as a second transform.
[0125] In ECM, when the block size of the TUs encoded according to intra prediction is small (e.g., 4×4, 4×8, 8×4, 4×16, 16×4, 8×8, 8×16, 16×8), the non-separable first-order transform technique can be applied. In addition, when the block size is large and the DCT2 / DCT2 transform kernel is applied to the block as the first-order transform, the LFNST technique can be applied.
[0126] I-3. Non-separable Primary Transform (NSPT)
[0127] The non-separable first-order transform technique performs a non-separable first-order transform using a pre-learned transform kernel instead of performing vertical and horizontal transforms on the residual signals of blocks predicted in the intra prediction mode.
[0128] NSPT technology uses non-separable primary transformation kernels of different sizes depending on the size of the residual block. For example, if the size of the transformation block is 4×4, a 16×16 kernel is applied to generate 4×4 transformation coefficients. As another example, if the size of the transformation block is 4×8, a 32×20 kernel is applied to generate 20 transformation coefficients. The generated transformation coefficients are arranged in the transformation block according to the promised scanning order. If the number of transformation coefficients generated after the transformation is less than the number of pixels in the transformation block, the remaining area where the transformation coefficients are not arranged is filled with 0.
[0129] For non-separable first-order transformations, transformation kernels can be defined based on the block shape, intra prediction mode, and NSPT index (nspt_idx). For example, by leveraging the symmetry of square blocks, there are 35 sets of transformation kernels for a square block, each with its own intra prediction mode. The NSPT index (i.e., the LFNST index) can be used to indicate one of the candidate kernels within the transformation kernel set.
[0130] A non-separable first-order transform can be applied to the luma component. Furthermore, if a non-separable first-order transform is applied, the second-order transform, i.e., LFNST, may not be performed.
[0131] I-4. Determination of conversion technology in ECM
[0132] Figures 6a and 6b are flowcharts showing a method for determining an inverse transform kernel.
[0133] When nst_idx is 0, the image decoding device can determine the inverse transform kernel as shown in Fig. 6b. Here, nst_idx represents a non-separable transform index and corresponds to lfnst_idx in ECM.
[0134] If ISP (Intra sub-partition) is applied in the prediction process of the current transform block, or MIP (Matrix-based intra prediction) is not used in the prediction process of the current transform block and the transform kernel is implicitly determined (ImplicitMTS), the image decoding device determines the vertical and horizontal primary transform kernels as one of {DCT2 / DCT2, DCT2 / DST7, DST7 / DCT2, DST7 / DST7} according to the size of the current TU.
[0135] If all of the above information is not satisfied and transformation is performed only on some sub-regions within the transformation block (SBT, Subblock Transform), the image decoding device determines the vertical and horizontal primary transformation kernels as one of {DCT2 / DCT2, DCT8 / DST7, DST7 / DCT8, DST7 / DST7} based on the size of the current TU and the location of the region where transformation is performed within the current TU.
[0136] If none of the above information is satisfied, it can be checked whether the transform kernel is explicitly determined (ExplicitMTS). If the transform kernel is not explicitly determined, the image decoding device determines both the vertical and horizontal primary transform kernels as DCT2. On the other hand, if the transform kernel is explicitly determined, mts_idx may be parsed, and the primary transform kernel may be determined based on the parsed index value. At this time, the range of the index, i.e., the size of the kernel set, may be determined as one of 1, 4, and 6 based on a comparison between the sum of the absolute values of the transform coefficients in the transform block and a preset threshold value.
[0137] When explicitly determining the transformation kernel, the transformation kernel can be determined differently depending on the prediction technology of the current transformation block as follows. When the intra prediction technology is used, the video decoding device determines the kernel set according to the size of the current TU and the prediction mode index, and parses the index indicating one transformation kernel (i.e., a transformation kernel pair) among the kernel sets. The video decoding device obtains information on the vertical and horizontal primary transformation kernels indicated by the corresponding index from the LUT (Look-up Table) defined according to the agreement between the video encoding device and the video decoding device, and uses the obtained information as the primary transformation kernel of the current TU. At this time, if the height and width of the current TU are both less than or equal to 16 and mts_idx is 3, the vertical and horizontal primary transformation kernels are determined as IDTR (Identity Transform) according to specific conditions. Meanwhile, the prediction mode index indicates a directional prediction mode. When the intra prediction mode is a non-directional mode, the image decoding device can derive the directionality of the prediction signals and use a directional prediction mode mapped to the derived directionality. Furthermore, when prediction is performed using MIP, the image decoding device can map the prediction mode to a planar mode.
[0138] When inter prediction technology is used, the video decoding device determines the vertical and horizontal primary transform kernels among DCT8 and DST7 according to mts_idx. At this time, if the height and width of the current TU are both less than 16, the vertical and horizontal transform kernels may be changed to KLT (Kahunen-Loeve Transform) defined according to an agreement between the video encoding device and the video decoding device.
[0139] If nst_idx is not 0, the video decoding device can determine the inverse transform kernel as shown in Fig. 6a. Based on the size of the current TU, it is implicitly determined whether to perform a non-separable first inverse transform or a non-separable second inverse transform and a first inverse transform. For example, for blocks smaller than 16×16 (4×4, 4×8, 8×4, 8×8, 8×16, 16×8), a non-separable first inverse transform can be performed.
[0140] If the prediction technology of the current TU is directional prediction, i.e., intra prediction technology and directional prediction mode, the image decoding device determines a non-separable first-order transform kernel set or a non-separable second-order transform kernel set based on the nst_idx value. The image decoding device determines a non-separable first-order transform kernel or a non-separable second-order transform kernel based on the directionality of the mode used for prediction of the current transform block.
[0141] If the prediction technology of the current transform block is not directional prediction, the image decoding device determines a non-separable first-order transform kernel set or a non-separable second-order transform kernel set based on the nst_idx value. The image decoding device derives the directionality of the prediction signals of the current transform block and determines a non-separable first-order transform kernel or a non-separable second-order transform kernel based on the derived directionality.
[0142] When a non-separable second-order inverse transform is performed, the image decoding device determines a non-separable second-order transform kernel and performs a non-separable second-order inverse transform. Subsequently, a first-order inverse transform is performed. At this time, a fixed kernel, such as a DCT2 kernel, may be implicitly used as the vertical and horizontal first-order transform kernels.
[0143] The following embodiments are described with a focus on a video decoding device, but can be implemented in the same or similar manner in a video encoding device. Alternatively, the following embodiments are described with a focus on the decoder side of a video decoding device, but can also be implemented in the same or similar manner in the decoder side of a video encoding device.
[0144] II. Embodiments according to the present disclosure
[0145] FIG. 7 is a block diagram illustrating in detail a portion of an image decoding device according to one embodiment of the present disclosure.
[0146] 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. 7 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. 7 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 reference to the video decoding device.
[0147] 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. 7, the prediction unit (540) may include all or part of the prediction unit determination unit (602), the prediction technology determination unit (604), the prediction mode determination unit (606), and the prediction execution unit (608).
[0148] The prediction unit determination unit (602) determines a prediction unit (PU). The prediction technique determination unit (604) determines a prediction technique (e.g., intra prediction, inter prediction, IBC (Intra Block Copy) mode, palette mode, a technique that mixes intra and inter prediction, etc.) for the prediction unit. The prediction mode determination unit (606) determines a detailed prediction mode for the prediction technique. The prediction execution unit (608) generates a prediction block of the current block according to the determined prediction mode.
[0149] The inverse transform unit (530) includes all or part of the inverse transform unit determination unit (610), the inverse transform kernel determination unit (612), and the inverse transform execution unit (614). The inverse transform unit determination unit (610) determines a transformation unit for the inverse quantization signals (i.e., inverse quantization transform coefficients) of the current block, and can correct the prediction signal of the transformation unit before performing inverse transform for the determined transformation unit. The inverse transform kernel determination unit (612) determines an inverse transform kernel, and the inverse transform execution unit (614) generates residual samples by inversely transforming the transformation unit expressed by the inverse quantization transform coefficients.
[0150] Hereinafter, the transform unit (TU) on the encoding side can be used interchangeably with the transform block. The inverse transform unit and inverse transform block on the decoding side correspond to the TU and transform block, respectively. Therefore, the inverse transform unit and inverse transform block can be used interchangeably with the TU and transform block.
[0151] Hereinafter, “current block”, “current conversion block”, and “current conversion unit block” have the same meaning and can be used interchangeably.
[0152] A transform unit is a unit that determines whether to perform an inverse transform with respect to transform coefficients and represents a unit in which information about the inverse transform is transmitted. An image decoding device determines a kernel to be applied to a transform unit and performs an inverse transform of transform coefficients based on the determined kernel. At least one kernel may be determined for one transform unit. According to an embodiment, an inverse transform of N orders may be applied, and the sizes of the transform unit and the inverse transform kernel in each order may not be the same. For example, when an inverse transform of N orders is applied to a current transform unit block (hereinafter, transform block or current transform block), the sizes of the kernels used for the inverse transform of each order may not be the same. That is, the image decoding device may apply an inverse transform to some of the input transform coefficients.
[0153] An adder (550) adds a prediction block and residual samples to generate a restoration block. The restoration block is stored in memory and can be used to predict other blocks.
[0154] 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. 7. 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.
[0155] The prediction unit determination unit (602) determines the size and shape of the prediction target block, and may utilize all direct or indirect information transmitted from the video encoding device. The prediction unit determination unit (602) may utilize direct information related to the size and shape of the current block, and may utilize information that may influence the determination of the size and shape of the current block, such as the number of divisions, depth, shape of division, direction of division, size information related to the minimum division block, and division information / prediction mode of the decoded neighboring blocks.
[0156] The prediction unit determined by the prediction unit determination unit (602) may be a current block, one of the sub-blocks into which the current block is divided, a set of pixels, or a single pixel. The prediction unit may include size information and shape information for performing prediction of chroma components and luma components.
[0157] The prediction unit can be determined dependently or independently for the chroma component and the luma component. Dependent determination means that the prediction unit of the luma component or chroma components is not determined for each component, but rather, when the prediction unit of one component is determined, the units of the other components or components are determined with a corresponding size and shape. In this case, one component may correspond to one or more of the luma component and the chroma component. That is, the luma component may be determined based on information of the chroma components. For example, the prediction unit of the chroma component may have a size corresponding to the prediction unit of the luma component depending on the color format. In the case of dependent determination, information about the prediction unit of the other component corresponding to one component, i.e., the dependently determined component, may be omitted. Independent determination means that the prediction units of the luma component and the chroma component are determined separately. In the case of independent determination, information about the prediction unit of each component may be signaled separately.
[0158] The prediction technique determination unit (604) determines a prediction technique for each prediction unit. As described above, the prediction technique may be one of inter prediction, intra prediction, IBC mode, palette mode, or a technique combining intra and inter prediction. In this case, the prediction technique for the chroma component may be determined in the same manner as the prediction technique for the corresponding luma component, without separate signaling or parsing of information. In some embodiments, a technique combining intra and inter prediction may be included in inter prediction.
[0159] For example, if the prediction technology of the current block is not intra prediction, the video decoding device parses 1-bit flag information. For example, if the parsed flag indicates a skip mode, the video decoding device determines the prediction mode of the current block to be a merge mode of inter prediction or an IBC merge mode. In the case of a skip mode, the video decoding device can use the prediction signals as restoration signals without performing an inverse transformation process (i.e., without parsing the residual signals). Here, skip may mean a method of not transmitting motion information (for example, a motion vector, a reference picture, a reference picture list, etc.) or transmitting motion information using only at least one piece of syntax information, and may also mean that the residual signal of the current block is not transmitted.
[0160] On the other hand, if the parsed flag does not indicate a Skip mode for the current block, the prediction technique determination unit (604) 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.
[0161] 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.
[0162] The prediction mode determination unit (606) determines the detailed prediction mode of the current prediction unit block (hereinafter, used interchangeably with the current block) in relation to the prediction technology.
[0163] If the prediction technique of the current block is intra prediction, the prediction mode of the current block may be a mode for generating a prediction block of the current block based on at least one of a directional prediction mode, a planar mode (Horizontal Planar, Vertical Planar, or Regular Planar), a DC mode, an EIP (Extrapolation intra prediction) prediction mode, a matrix-based prediction mode (for example, MIP), or a prediction mode based on correlation between components (e.g., CCLM (Cross component linear model), MMLM (Multi model CCLM), CCCM (Convolutional cross component model), LBCCP (Local boosting cross component prediction), BVG-CCCM (Block vector guided CCCM), CCLM with slope adjustment, Multi model CCCM, GLCCCM (Gradient and location based CCCM), CCP-merge, GLM (Gradient linear model), DDCCP (Decoder derived cross component prediction), etc.).
[0164] As an example, if the prediction technology of the current block is intra prediction, the prediction mode of the current block may be a matrix-based intra prediction mode (for example, MIP (Matrix-based intra prediction)). The MIP mode may signal / parse and / or derive an index of a matrix based on a predefined matrix according to an agreement between an image encoding device and an image decoding device, or may signal / parse and / or derive a matrix and generate a prediction block of the current block based on the matrix.
[0165] As another example, if the prediction technique of the current block is intra prediction, directional intra prediction, and a specific directional prediction mode is applied depending on the block size, the prediction mode of the current block may be a mode based on matrix multiplication. In this case, a prediction signal of the current block may be generated using a matrix multiplication operation between the directional matrix and the previously restored reference samples surrounding the current block. The matrix may be defined in advance according to an agreement between the image encoding device and the image decoding device.
[0166] As another example, if the prediction technique for the current block is intra prediction, the prediction mode for the current block may be intra-template matching prediction (IntraTMP). IntraTMP mode defines a restored area surrounding the current block as a template, and performs template matching on the restored area surrounding the current block to generate a predicted block. The template may also include areas not adjacent to the current block.
[0167] As another example, if the prediction technique of the current block is intra prediction, the prediction mode of the current block may be a spatial geometric partitioning-based prediction mode. The spatial geometric partitioning-based prediction mode may divide the current block into one or more sub-regions according to geometric partitioning, generate a prediction block of each region using intra prediction modes including different directional prediction modes, Planar mode, DC mode, etc., and generate a prediction block of the current block by weighting and combining each prediction block. According to an embodiment, if the prediction technique is intra prediction and the geometric partitioning-based prediction mode is determined, all sub-blocks within the current block may be predicted according to intra prediction.
[0168] As another example, if the prediction technique of the current block is intra prediction, the prediction mode of the current block may be DIMD (Decoder-side intra mode derivation) mode. DIMD mode implicitly derives a prediction mode based on reconstructed samples within a previously reconstructed region around the current block, performs prediction of the current block using at least one derived mode, and generates a final prediction block of the current block using a weighted sum of the prediction blocks. As an example, the directionality of the reconstructed samples within the previously reconstructed region may be considered in the process of deriving the prediction mode.
[0169] As another example, if the prediction technique of the current block is intra prediction, the prediction mode of the current block may be OBIC (Occurrence-based intra coding) mode. OBIC mode implicitly derives a prediction mode based on the prediction modes of blocks within a previously restored region surrounding the current block, performs prediction of the current block according to at least one derived mode, and generates a final prediction block of the current block using a weighted sum of the prediction blocks. For example, in the process of deriving the prediction mode, both the directionality of the restored samples within the previously restored region and the occurrence frequency of the prediction mode of the blocks within the previously restored region may be considered.
[0170] As another example, if the current block is a chroma block and the prediction technique of the current block is intra prediction, the current block can be predicted according to DM (Direct Mode). DM mode can perform prediction of the current chroma block based on a prediction method applied to a luma block corresponding to the current chroma block, or a prediction method predefined between a video encoding device and a video decoding device.
[0171] As another example, the relationship between the surrounding restored chroma samples of the current chroma component and the surrounding restored luma samples of the luma region at the location corresponding to the current chroma block may be calculated using a linear and / or nonlinear model, and a prediction block of the current chroma block may be generated based on one or more of the calculated models.
[0172] As another example, there may be various methods for deriving the intra prediction mode of the current block. Among the multiple methods, one or more may be used based on the signaling / parsing of flags and / or indices.
[0173] The prediction execution unit (608) generates a final prediction block of the current decryption block (hereinafter, used interchangeably with the current block) according to the determined prediction technology and prediction mode.
[0174] As an example, the prediction performing unit (608) performs prediction according to the prediction mode determined as described above to generate a prediction block of the current block, and the adder (550) adds the prediction block of the current block and residual samples (i.e., residual block) to generate a restoration block.
[0175] Below, the operations related to inverse transformation and restoration are described.
[0176] In relation to the inverse transformation, the entropy decoding unit (510) decodes the transform coefficients. If a secondary transformation is applied, the entropy decoding unit (510) decodes the quantized secondary transform coefficients. If a secondary transformation is not applied, the entropy decoding unit (510) decodes the quantized primary transform coefficients. The entropy decoding unit (510) parses information such as the quantization method and quantization parameter information.
[0177] The inverse quantization unit (520) inversely quantizes the decoded quantized transform coefficients based on information such as the quantization method and quantization parameter information to generate inverse quantized transform coefficients.
[0178] The inverse transform unit (530) generates residual samples by inversely transforming the TU expressed as inverse quantization transform coefficients. As shown in Fig. 7, the inverse transform unit (530) may include an inverse transform unit determination unit (610), an inverse transform kernel determination unit (612), and an inverse transform execution unit (614).
[0179] The inverse transformation unit determination unit (610) can determine a single TU or a sub-block obtained by dividing a single TU into multiple sub-blocks as the target of transformation. For example, the TU may be the entire current block, which is the target of prediction, or a portion of the current block.
[0180] The inverse transform kernel determination unit (612) can determine a separable vertical and horizontal first-order inverse transform kernel, and / or a non-separable second-order inverse transform kernel, or can determine a non-separable first-order inverse transform kernel.
[0181] The inverse transform performing unit (614) can inversely transform the inverse quantized transform coefficients using the inverse transform kernel determined by the inverse transform kernel determining unit (612). The inverse transform performing unit (614) can perform non-separable first-order inverse transform, non-separable second-order inverse transform, first-order inverse transform, etc.
[0182] FIG. 8 is a flowchart illustrating a method for determining an inverse transform kernel according to one embodiment of the present disclosure.
[0183] As an example, the video decoding device can parse tu_merge_flag with respect to the current transform unit (current transform block). At this time, tu_merge_flag can be signaled / parsed at the level of slice unit, CTU (Coding Tree Unit) unit, TU unit, etc. For example, when tu_merge_flag is 1, the video decoding device can configure the transform information of the previously restored blocks around the current transform block as a list. At this time, the transform information can include at least one of a first transform kernel set, vertical and horizontal first transform kernels, whether to perform non-separable inverse transform, a non-separable first transform kernel set or a non-separable second transform kernel set, and a non-separable first transform kernel or a non-separable second transform kernel.
[0184] As an example, each candidate of the TU merge list may include transformation information according to each index, as shown in Tables 5 to 7. In this case, each candidate may include only some of the items in Tables 5 to 7. Hereinafter, the terms TU merge list, merge candidate list, merge list, or candidate list may be used interchangeably.
[0185]
[0186]
[0187]
[0188] For example, as shown in Table 7, when a TU merge candidate list of the current block is constructed and merge candidate information is used based on the parsed index, a non-separable first or second transformation may be implicitly performed depending on the size of the current transformation block. For example, when the current transformation block is smaller than a specific size, a non-separable first transformation may be performed, and when it is larger than or equal to the specific size, a non-separable second transformation and vertical and horizontal first transformations may be performed. When a non-separable first transformation is performed based on the size of the current transformation block, even if vertical first transformation kernel information and horizontal first transformation kernel information exist in the candidate list, the vertical and horizontal first transformations may not be performed. When a non-separable secondary transform is performed based on the size of the current transform block, even if information on the vertical primary transform kernel and the horizontal primary kernel does not exist in the candidate list, the vertical and horizontal primary transforms may use fixed kernels according to an agreement between the image encoding device and the image decoding device. As an example, the fixed vertical and horizontal primary transforms may both be DCT2 kernels. As another example, the fixed vertical and horizontal primary transforms may be kernels that are implicitly determined based on information such as the size and aspect ratio of the current transform block.
[0189] FIG. 9A and FIG. 9B are exemplary diagrams showing peripheral blocks according to one embodiment of the present disclosure.
[0190] For example, when tu_merge_flag is 1, the video decoding device can construct a list using the transformation information of the restored blocks around the current transformation block. The restored blocks around the current transformation block for constructing the TU merge list can be blocks that are spatially adjacent to the current transformation block, blocks that are temporally adjacent, as shown in FIG. 9a, or blocks that are spatially non-adjacent, as shown in FIG. 9b.
[0191] As another example, during the process of constructing a TU merge list, the video decoding device may search for neighboring blocks in the order of spatially adjacent locations, temporally adjacent locations, and spatially non-adjacent locations. Blocks in spatially adjacent locations may be searched in the order of B0 → A0 → B1 → A1 → B2 in the example of FIG. 9a. Blocks in temporally adjacent locations may be searched in the order of C1 → C0 in pictures temporally adjacent to the current frame. Spatially non-adjacent blocks may be searched in the order of 1 → … → 18 in the example of FIG. 9b. Temporally adjacent pictures may be determined based on signaling / parsing.
[0192] Even though the candidate list is constructed by searching for spatially adjacent blocks, temporally adjacent blocks, and spatially non-adjacent blocks, if the candidate list is not filled, the image decoding device can add a fixed candidate to the list. The fixed candidate can be determined differently depending on the prediction technology of the current transform block. For example, if the current transform block is predicted according to the intra prediction technology, the fixed candidates can be used in the order of {(whether non-separable transform), (non-separable transform kernel set), (non-separable transform kernel), (vertical 1st transform kernel), (horizontal 1st transform kernel)} as shown in Table 7. For example, {1, 2, 2, 0, 0}, {1, 1, 3, DCT2, DCT2}, {0, 0, 0, DST7, DST7}, … In accordance with the agreement between the image encoding device and the image decoding device, fixed candidates are defined in the order of , and the above-mentioned fixed candidates can be used to construct a TU merge list. At this time, kernels mapped to the Planar mode can be used as the non-separable first-order transform kernel and the non-separable second-order transform kernel of the fixed candidates.
[0193] As an example, when constructing a TU merge list of the current transformation block, the candidate list may be constructed differently depending on the prediction technology (e.g., intra prediction, inter prediction) of the current transformation block.
[0194] When the current block is predicted using intra prediction technology and a TU merge list of the current transformation block is constructed, the video decoding device can construct the list using only transformation information related to the surrounding blocks predicted using the intra prediction technology. When the surrounding blocks are predicted based on a weighted sum of multiple prediction blocks and the multiple prediction blocks include at least one intra prediction block, the transformation information of the corresponding block can be used in the TU merge list construction process.
[0195] When the current block is predicted according to the inter prediction technique and a TU merge list of the current transformation block is constructed, the video decoding device can construct the list using only transformation information related to the surrounding blocks predicted by the inter prediction technique.
[0196] As another example, when constructing a TU merge list of the current transformation block, the candidate list may be constructed differently depending on the size of the current transformation block.
[0197] If the size of the current transform block is smaller than a preset size and a non-separable transform is performed, a non-separable first transform may be implicitly performed on the current transform block. If a non-separable second transform is performed on a neighboring block, information of the corresponding block may not be included in the TU candidate list of the current transform block. As another example, if the size of the current transform block is larger than a specific size and a non-separable transform is performed, a non-separable second transform may be implicitly performed on the current transform block. If a non-separable first transform is performed on a neighboring block, information of the corresponding block may not be included in the TU candidate list of the current transform block.
[0198] If the size of the current transformation block is smaller than a specific size, and the TU candidate list of the current transformation block is configured as in Tables 6 and 7, and a non-separable secondary transformation is performed on a surrounding block, the current transformation block may be added to the candidate list with the performance of the non-separable secondary transformation set to 0 and the performance of the non-separable primary transformation set to 1. At this time, the candidate list may be configured based on the non-separable secondary transformation information of the surrounding block with respect to the non-separable primary transformation kernel set and kernel index information of the current transformation block.
[0199] If the size of the current transformation block is larger than a specific size and non-separable primary transformation has been performed on a surrounding block, the non-separable primary transformation information of the surrounding block may be converted into non-separable secondary transformation information of the current transformation block and added to the candidate list.
[0200] As an example, all of the examples described above may be applied to the process of constructing a candidate list for the current transformation block. As another example, some of the examples described above may be applied to the process of constructing a candidate list for the current transformation block.
[0201] On the other hand, if tu_merge_flag is 0, nst_idx can be parsed. It may be information indicating whether the nst_idx index is non-separable. If nst_idx is 0, it may indicate that the non-separable first inverse transformation and the non-separable second inverse transformation are not performed on the current transformation block, and the first inverse transformation is performed. In Fig. 8, when nst_idx is not 0 (ⓐ) and when nst_idx is 0 (ⓑ), the process illustrated in Figs. 6a and 6b can be followed.
[0202] As an example, we describe the case where nst_idx is 0.
[0203] If at least one of i) to iii) is satisfied and transformation is performed on a sub-region of the current transform block, the video decoding device can implicitly determine vertical and horizontal primary transform kernels according to the size of the current transform block and the position of the corresponding sub-region by checking whether i) the current block is predicted according to ISP, ii) whether transformation is performed on some sub-region within the current transform block (i.e., whether SBT is applied to the current transform block), or iii) whether a transformation kernel is implicitly determined while MIP (Matrix-based intra prediction) is not used in the prediction process of the current transform block. For example, the vertical and horizontal primary transform kernels of the current transform block can be determined from among DST7, DCT8, and DCT2.
[0204] If none of the above information is satisfied, the image decoding device can check whether to explicitly determine the transform kernel. If the transform kernel is not explicitly determined, the image decoding device determines both the vertical and horizontal primary transform kernels as DCT2. On the other hand, if the transform kernel is explicitly determined, the image decoding device can parse mts_idx and determine the primary transform kernel according to the parsed index value. At this time, the range of the index can be determined differently based on a comparison between the sum of the absolute values of the transform coefficients in the transform block and a preset threshold value.
[0205] When explicitly determining a transformation kernel, the transformation kernel may be determined differently depending on the prediction technology of the current transformation block as follows. When an intra prediction technology is used, the image decoding device may determine a set of primary transformation kernels based on the size of the current transformation block and the intra prediction mode of the current block. At this time, directionality and MIP may be considered as the intra prediction mode. When multiple prediction blocks are weighted, information on the directionality of the prediction mode with the largest weight or the weighted sum mask may be considered. For example, when the current block is predicted by a prediction technology other than an intra prediction technology (e.g., an inter prediction technology, an IBC prediction technology), the image decoding device may determine the primary transformation kernel using mts_idx.
[0206] As another example, we describe the case where nst_idx is not 0.
[0207] The video decoding device can implicitly determine whether to perform a non-separable first-order inverse transform or a non-separable second-order inverse transform and a first-order inverse transform based on the size of the current transform block. For blocks smaller than 16×16 (4×4, 4×8, 8×4, 8×8, 8×16, 16×8), a non-separable first-order inverse transform can be performed.
[0208] If the prediction technology of the current transform block is a directional prediction technology, that is, an intra prediction technology, and is a directional prediction mode, the image decoding device can determine a non-separable first-order transform kernel set or a non-separable second-order transform kernel set according to the nst_idx value. The image decoding device can determine a non-separable first-order transform kernel or a non-separable second-order transform kernel according to the directionality of the mode used for prediction of the current transform block.
[0209] If the prediction technology of the current transform block is not directional prediction, the image decoding device may determine a non-separable first transform kernel set or a non-separable second transform kernel set based on the nst_idx value. The image decoding device may derive the directionality of the prediction signals of the current transform block and determine the non-separable first transform kernel or the non-separable second transform kernel based on the derived directionality. As an example, if the prediction block of the current block is generated by a weighted sum of a plurality of prediction blocks and at least one prediction block is intra-predicted, the image decoding device may determine the non-separable first transform kernel or the non-separable second transform kernel based on the directionality of the intra-prediction blocks. As another example, the image decoding device may derive the directionality of the current block and determine the non-separable first transform kernel or the non-separable second transform kernel based on the directionality most similar to the derived directionality among the directionality of the intra-prediction blocks. As another example, when a current block is divided into a specific direction such as geometric division and a prediction block is generated by a weighted sum of multiple prediction blocks, the image decoding device can determine a non-separable first-order transform kernel or a non-separable second-order transform kernel based on the divided direction and / or a combination of the divided direction and the intra prediction block.
[0210] When a non-separable second inverse transform is performed, the image decoding device can determine a non-separable second transform kernel and perform the non-separable second inverse transform. Thereafter, a first inverse transform can be performed. At this time, a fixed kernel, such as a DCT2 kernel, can be implicitly determined as the vertical and horizontal first transform kernels. As an example, the fixed kernel can be adaptively changed depending on the size, aspect ratio, etc. of the current transform block.
[0211] The image decoding device can inversely transform the inverse quantized transform coefficients using the determined inverse transform kernel. The image decoding device can perform a non-separable first-order inverse transform, a non-separable second-order inverse transform, a first-order inverse transform, etc.
[0212] FIG. 10 is a flowchart illustrating a method for determining an inverse transform kernel according to another embodiment of the present disclosure.
[0213] As another example, the video decoding device may parse nst_idx and tu_merge_flag in relation to the current transform block, as in the example of FIG. 10. If tu_merge_flag is 1, the TU merge list may be constructed differently depending on the nst_idx value. For example, the TU merge list may be constructed in a different manner depending on whether nst_idx is 0.
[0214] When nst_idx is 0 and tu_merge_flag is 1, when constructing a TU merge list of the current transformation block, the image decoding device can construct a candidate list using only the vertical and horizontal first-order transformation kernel information of the surrounding blocks.
[0215] If nst_idx is not 0 and tu_merge_flag is 1, the video decoding device can construct a TU merge list of the current transformation block, as in the example of FIG. 8.
[0216] As an example, a video decoding device can construct a TU merge list based on transformation information of surrounding pre-reconstructed blocks of a current transform block. The video decoding device can parse tu_merge_idx (transform merge index) and obtain transformation information from the TU merge list using the transform merge index. The video decoding device can inherit all information of the TU merge candidate obtained based on the transform merge index as the transformation information of the current transform block, or only some information. The scope of inheritance can be determined in one unit among TU, CU (Coding Unit), CTU, slice, picture, and sequence. As an example, using the transform merge index, the video decoding device can inherit only information related to whether a non-separable transformation is performed and a non-separable transformation kernel set from the TU merge list. For example, the video decoding device can implicitly determine a non-separable transformation kernel from a non-separable transformation kernel set according to a directionality related to a prediction mode of the current transform block. Alternatively, the video decoding device can derive the directionality of the prediction block of the current transform block and determine the non-separable transform kernel based on the derived directionality. As another similar example, the video decoding device can inherit only information related to whether a non-separable transform is performed and the non-separable transform kernel from the TU merge list using the transform merge index. Thereafter, the video decoding device can parse nst_idx and determine the non-separable transform kernel set based on nst_idx.
[0217] On the other hand, when tu_merge_flag is 0, the image decoding device can determine the inverse transform kernel according to the nst_idx value and perform inverse transform to generate residual signals. In Fig. 10, ⓐ and ⓑ can follow the processes illustrated in Figs. 6a and 6b.
[0218] Hereinafter, a method of transforming / inversely transforming the current block and the current transformation block is described using the cities of FIGS. 11 and 12.
[0219] FIG. 11 is a flowchart illustrating a method for a video encoding device to transform a current block according to an embodiment of the present disclosure.
[0220] The image encoding device obtains residual signals of the current block (S1100).
[0221] The video encoding device obtains a flag indicating whether to use a merge list (S1102).
[0222] The video encoding device may, for example, obtain a flag indicating whether to use a merge list from a higher level. As another example, the video encoding device may determine the flag in terms of rate distortion optimization.
[0223] The video encoding device checks the flag (S1104).
[0224] If the flag indicates the use of a merge list, the video encoding device can construct a merge list as follows and convert the current block based on the merge list.
[0225] The video encoding device constructs a merge list including transformation information of restored blocks surrounding the current block (S1106).
[0226] The surrounding restored blocks may include spatially adjacent blocks, temporally adjacent blocks, or spatially non-adjacent blocks. If the merge list cannot be filled based on the surrounding restored blocks of the current block, the video encoding device may add a candidate containing preset transformation information to the merge list.
[0227] The merge list may include, as transformation information, at least one of a set of primary transformation kernels, vertical and horizontal primary transformation kernels, whether to perform a non-separable inverse transformation, a set of non-separable primary transformation kernels or a set of non-separable secondary transformation kernels, and a non-separable primary transformation kernel or a non-separable secondary transformation kernel.
[0228] As an example, if the current block is predicted according to an intra prediction technique, the image encoding device can construct a merge list using transformation information of surrounding restored blocks predicted according to the intra prediction technique.
[0229] When a neighboring block of a current block is predicted based on a weighted sum of a plurality of prediction blocks, and the plurality of prediction blocks include at least one intra prediction block, the image encoding device can construct a merge list using information of the neighboring blocks.
[0230] As another example, the video encoding device may construct the merge list differently based on the size of the current block.
[0231] If the size of the current block is smaller than the preset size, a non-separable transformation is performed on the current block, and a non-separable secondary transformation is performed on a block surrounding the current block, information on the surrounding blocks may not be included in the merge list.
[0232] If the size of the current block is larger than the preset size, a non-separable transformation is performed on the current block, and a non-separable first transformation is performed on a block surrounding the current block, information on the surrounding blocks may not be included in the merge list.
[0233] If the size of the current block is smaller than a preset size and a non-separable secondary transformation has been performed on a block surrounding the current block, the video encoding device may generate transformation information of the current block by setting whether the non-separable secondary transformation is performed to 0 and setting whether the non-separable primary transformation is performed to 1. At this time, with respect to the non-separable primary transformation kernel of the current block, the non-separable secondary transformation information of the corresponding surrounding block may be included in the merge list.
[0234] If the size of the current block is larger than a preset size and a non-separable first transformation has been performed on a block surrounding the current block, the video encoding device may determine the non-separable first transformation information of the corresponding surrounding block as the non-separable second transformation information of the current block and include the transformation information of the corresponding surrounding block in the merge list.
[0235] The video encoding device determines the merge index (S1108).
[0236] The video encoding device can determine a merge index in terms of rate distortion optimization. Thereafter, the video encoding device can encode the merge index.
[0237] The video encoding device determines transformation information of the current block from the merge list using the merge index (S1110).
[0238] The image encoding device generates transformation coefficients by transforming residual signals based on transformation information of the current block (S1112).
[0239] The video encoding device can implicitly perform a non-separable first-order inverse transform or a non-separable second-order inverse transform based on the size of the current block. For example, when a non-separable first-order inverse transform is performed on the current block based on the size of the current block, the video encoding device can perform the non-separable first-order inverse transform without considering vertical first-order transform kernel information and horizontal first-order kernel information included in the transform information. As another example, when a non-separable second-order inverse transform is performed on the current block based on the size of the current block and the transform information does not include vertical first-order transform kernel information and horizontal first-order kernel information, the video encoding device can perform the first-order inverse transform using a preset kernel.
[0240] On the other hand, if the flag does not indicate the use of a merge list, the video encoding device can obtain a non-separable transform index, which indicates whether to use a non-separable transform from a higher level, for example. As another example, the video encoding device can determine the non-separable transform index in terms of rate distortion optimization. The video encoding device can transform the current block based on the non-separable transform index.
[0241] As another example, the video encoding device may obtain a non-separable transform index indicating whether to use a non-separable transform from a higher level, and then obtain a flag indicating whether to use a merge list from the higher level. If the non-separable transform index indicates the use of a non-separable transform and the flag indicates whether to use a merge list, the video encoding device may construct a merge list as described above and transform the current block based on the merge list. If the non-separable transform index does not indicate the use of a non-separable transform and the flag indicates the use of a merge list, the video encoding device may construct a merge list using information related to vertical and horizontal primary transform kernels of surrounding reconstructed blocks of the current block. If the flag does not indicate the use of a merge list, the video encoding device may transform the current block based on the non-separable transform index.
[0242] The video encoding device can encode a flag and a non-separable transform index.
[0243] FIG. 12 is a flowchart illustrating a method for an image decoding device to inversely transform a current block according to one embodiment of the present disclosure.
[0244] The image decoding device obtains the inverse quantized transform coefficients of the current block (S1200).
[0245] The video decoding device obtains a flag indicating whether to use a merge list (S1202).
[0246] The video decoding device can, for example, decode a flag indicating whether to use a merge list from the bitstream.
[0247] The video decoding device checks the flag (S1204).
[0248] If the flag indicates the use of a merge list, the video decoding device can construct a merge list as follows and reverse-transform the current block based on the merge list.
[0249] The video decoding device constructs a merge list including transformation information of restored blocks surrounding the current block (S1206).
[0250] The surrounding restored blocks may include spatially adjacent blocks, temporally adjacent blocks, or spatially non-adjacent blocks. If the merge list cannot be filled based on the surrounding restored blocks of the current block, the image decoding device may add a candidate containing preset transformation information to the merge list.
[0251] The merge list may include, as transformation information, at least one of a set of primary transformation kernels, vertical and horizontal primary transformation kernels, whether to perform a non-separable inverse transformation, a set of non-separable primary transformation kernels or a set of non-separable secondary transformation kernels, and a non-separable primary transformation kernel or a non-separable secondary transformation kernel.
[0252] As an example, if the current block is predicted according to an intra prediction technique, the image decoding device can construct a merge list using transformation information of surrounding restored blocks predicted according to the intra prediction technique.
[0253] When a neighboring block of a current block is predicted based on a weighted sum of a plurality of prediction blocks, and the plurality of prediction blocks include at least one intra prediction block, the image decoding device can construct a merge list using information of the neighboring blocks.
[0254] As another example, the video decoding device may construct the merge list differently based on the size of the current block.
[0255] If the size of the current block is smaller than the preset size, a non-separable transformation is performed on the current block, and a non-separable secondary transformation is performed on a block surrounding the current block, information on the surrounding blocks may not be included in the merge list.
[0256] If the size of the current block is larger than the preset size, a non-separable transformation is performed on the current block, and a non-separable first transformation is performed on a block surrounding the current block, information on the surrounding blocks may not be included in the merge list.
[0257] If the size of the current block is smaller than a preset size and a non-separable secondary transformation has been performed on a block surrounding the current block, the image decoding device may generate transformation information of the current block by setting whether or not the non-separable secondary transformation is performed to 0 and setting whether or not the non-separable primary transformation is performed to 1. At this time, with respect to the non-separable primary transformation kernel of the current block, the non-separable secondary transformation information of the corresponding surrounding block may be included in the merge list.
[0258] If the size of the current block is larger than a preset size and a non-separable first transformation has been performed on a block surrounding the current block, the image decoding device may determine the non-separable first transformation information of the corresponding surrounding block as the non-separable second transformation information of the current block and include the transformation information of the corresponding surrounding block in the merge list.
[0259] The video decoding device obtains a merge index (S1208). For example, the video decoding device can decode the merge index from a bitstream.
[0260] The video decoding device determines the transformation information of the current block from the merge list using the merge index (S1210).
[0261] The image decoding device generates residual signals of the current block by inversely transforming the inverse quantized transform coefficients based on the transform information of the current block (S1212).
[0262] The video decoding device can implicitly perform a non-separable first-order inverse transform or a non-separable second-order inverse transform based on the size of the current block. For example, when a non-separable first-order inverse transform is performed on the current block based on the size of the current block, the video decoding device can perform the non-separable first-order inverse transform without considering vertical first-order transform kernel information and horizontal first-order kernel information included in the transform information. As another example, when a non-separable second-order inverse transform is performed on the current block based on the size of the current block, and the transform information does not include vertical first-order transform kernel information and horizontal first-order kernel information, the video decoding device can perform the first-order inverse transform using a preset kernel.
[0263] On the other hand, if the flag does not indicate the use of a merge list, the video decoding device can, for example, decode a non-separable transform index indicating whether to use a non-separable transform from the bitstream, and inversely transform the current block based on the non-separable transform index.
[0264] As another example, a video decoding device may decode a non-separable transform index indicating whether to use a non-separable transform from a bitstream, and then decode a flag indicating whether to use a merge list from the bitstream. If the non-separable transform index indicates the use of a non-separable transform and the flag indicates the use of a merge list, the video decoding device may construct a merge list as described above and inversely transform the current block based on the merge list. If the non-separable transform index does not indicate the use of a non-separable transform and the flag indicates the use of a merge list, the video decoding device may construct a merge list using information related to vertical and horizontal primary transform kernels of surrounding pre-reconstructed blocks of the current block. If the flag does not indicate the use of a merge list, the video decoding device may inversely transform the current block based on the non-separable transform index.
[0265] 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.
[0266] 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.
[0267] 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).
[0268] 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.
[0269]
[0270] CROSS-REFERENCE TO RELATED APPLICATION
[0271] This patent application claims priority to Korean patent application No. 10-2024-0093181, filed on July 15, 2024, the entire contents of which are incorporated herein by reference.
Claims
1. In a method for restoring a current block performed by an image decryption device, A step of obtaining inverse quantized transformation coefficients of the current block; A step of constructing a merge list including transformation information of restored blocks surrounding the current block; Step for obtaining merge index; A step of determining transformation information of the current block from the merge list using the merge index; and A step of inversely transforming the inversely quantized transformation coefficients based on the transformation information of the current block. A method comprising:
2. In paragraph 1, Further comprising a step of obtaining a flag indicating whether to use the above merge list, A method for performing a step of constructing the merge list when the above flag indicates the use of the merge list.
3. In paragraph 1, The above merge list is, A method comprising at least one of the first transformation kernel set, vertical and horizontal first transformation kernels, whether to perform non-separable inverse transformation, a non-separable first transformation kernel set or a non-separable second transformation kernel set, and a non-separable first transformation kernel or a non-separable second transformation kernel as the above transformation information.
4. In paragraph 1, The step of inversely transforming the above inverse quantized transformation coefficients is: When a non-separable first-order inverse transform is performed on the current block based on the size of the current block, the non-separable first-order inverse transform is performed without considering the vertical first-order transform kernel and horizontal first-order kernel information included in the transformation information, A method in which a non-separable second inverse transform is performed on the current block based on the size of the current block, and when the transformation information does not include vertical first transformation kernel information and horizontal first kernel information, a first inverse transform is performed using a preset kernel.
5. In paragraph 1, The restored blocks surrounding the current block above are: A method comprising spatially adjacent blocks, temporally adjacent blocks, or spatially non-adjacent blocks.
6. In paragraph 1, The steps for constructing the above merge list are: A method for constructing the merge list by using transformation information of surrounding restored blocks predicted according to the intra prediction technique when the current block is predicted according to the intra prediction technique.
7. In paragraph 1, The steps for constructing the above merge list are: A method for configuring the merge list differently based on the size of the current block.
8. In paragraph 1, The steps for constructing the above merge list are: A method in which, when the size of the current block is smaller than a preset size, a non-separable transformation is performed on the current block, and a non-separable secondary transformation is performed on a block surrounding the current block, information of the surrounding block is not included in the merge list.
9. In paragraph 1, The steps for constructing the above merge list are: A method for determining, when the size of the current block is larger than a preset size and a non-separable first transformation is performed on a block surrounding the current block, the non-separable first transformation information of the surrounding block as the non-separable second transformation information of the current block, and including the transformation information of the surrounding block in the merge list.
10. In paragraph 1, After obtaining a non-separable transformation index indicating whether to use non-separable transformation, the step of obtaining a flag indicating whether to use the merge list is further included. A method for performing a step of constructing the merge list when the non-separable transformation index indicates the use of the non-separable transformation and the flag indicates the use of the merge list.
11. In paragraph 10, The steps for constructing the above merge list are: If the non-separable transformation index does not indicate the use of the non-separable transformation and the flag indicates the use of the merge list, A method for constructing the merge list using information related to vertical and horizontal primary transformation kernels of surrounding restored blocks of the current block.
12. In a method for encoding a current block performed by a video encoding device, A step of obtaining residual signals of the current block; A step of constructing a merge list including transformation information of restored blocks surrounding the current block; Step for determining merge index; A step of determining transformation information of the current block from the merge list using the merge index; and A step of converting the residual signals based on the conversion information of the current block. A method comprising:
13. In paragraph 12, Further comprising a step of obtaining a flag indicating whether to use the above merge list, A method for performing a step of constructing the merge list when the above flag indicates the use of the merge list.
14. In paragraph 13, A method further comprising the step of encoding the merge index and the flag.
15. In paragraph 12, A step of obtaining a non-separable transformation index indicating whether to use a non-separable transformation; and Further comprising a step of obtaining a flag indicating whether to use the above merge list, The steps for constructing the above merge list are: If the non-separable transformation index does not indicate the use of the non-separable transformation and the flag indicates the use of the merge list, A method for constructing the merge list using information related to vertical and horizontal primary transformation kernels of surrounding restored blocks of the current block.
16. In 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 obtaining residual signals of the current block; A step of constructing a merge list including transformation information of restored blocks surrounding the current block; Step for determining merge index; A step of determining transformation information of the current block from the merge list using the merge index; and A step of converting the residual signals based on the conversion information of the current block. A method comprising:
Citation Information
Patent Citations
Method of analyzing design data included in the document
KR1020250049074A
Image encoding method, image decoding method, encoding device, and decoding device
KR102206980B1
Rotor and motor including the same
KR102297686B1
Implicit Transform Settings
US20190320203A1
KR20240109594A