WO2025221093A1 - Transform or inverse transform method in geometric partitioning mode - Google Patents
Transform or inverse transform method in geometric partitioning modeInfo
- Publication number
- WO2025221093A1 WO2025221093A1 PCT/KR2025/095119 KR2025095119W WO2025221093A1 WO 2025221093 A1 WO2025221093 A1 WO 2025221093A1 KR 2025095119 W KR2025095119 W KR 2025095119W WO 2025221093 A1 WO2025221093 A1 WO 2025221093A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- block
- sub
- prediction
- separable
- transformation
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
- H04N19/119—Adaptive subdivision aspects, e.g. subdivision of a picture into rectangular or non-rectangular coding blocks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/18—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a set of transform coefficients
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/60—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
- H04N19/61—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding in combination with predictive coding
Definitions
- the present disclosure relates to a video coding method and apparatus for performing transformation or inverse transformation in a geometric partitioning mode.
- video data 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.
- 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.
- 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.
- the present disclosure aims to provide a video coding method and device that efficiently performs transformation and inverse transformation on residual samples around a segmentation boundary when predicting a current block according to a geometric segmentation mode.
- a method for restoring a current block comprises: obtaining inverse quantized transform coefficients of the current block; and, if the current block is predicted according to a geometric partitioning mode, decoding a flag from a bitstream indicating whether a sub-block transform unit is used, and if the flag indicates use of the sub-block transform unit, determining a sub-block transform unit of the current block, wherein the sub-block transform unit is determined based on a prediction region including a weighted sum region of sub-regions of the current block partitioned according to the geometric partitioning mode; determining an inverse transform kernel of the sub-block transform unit; applying the inverse transform kernel to the inverse quantized transform coefficients to generate residual samples of the sub-block transform unit; and, using the residual samples of the sub-block transform unit, performing a scanning operation according to a predetermined scanning order.
- a method is provided, further comprising a step of filling a prediction region used in determining the above sub-
- a method for encoding a current block comprises: obtaining residual samples of the current block; and, if the current block is predicted according to a geometric partitioning mode, obtaining a flag from a higher level indicating whether a sub-block transformation unit is not used, and, if the flag indicates use of the sub-block transformation unit, determining a prediction region used to configure a sub-block transformation unit of the current block, wherein the prediction region includes a weighted sum region of sub-regions of the current block divided according to a geometric partitioning mode; filling the sub-block transformation unit according to a predetermined scanning order using residual samples of the prediction region among residual samples of the current block; determining a transformation kernel of the sub-block transformation unit; and applying the transformation kernel to the sub-block transformation unit to generate transformation coefficients of the sub-block transformation unit.
- a method for providing video data to a video decoding device comprises: 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 samples of a current block; and, if the current block is predicted according to a geometric partitioning mode, obtaining a flag indicating whether a sub-block transformation unit is not used from a higher level; and, if the flag indicates use of the sub-block transformation unit, determining a prediction region used to configure a sub-block transformation unit of the current block, wherein the prediction region includes a weighted sum region of sub-regions of the current block divided according to a geometric partitioning mode; filling the sub-block transformation unit according to a predetermined scanning order using residual samples of the prediction region among residual samples of the current block; determining a transformation kernel of the sub-block transformation unit; And the method further includes a step of applying the transform kernel to the sub-block transform unit to generate transform coefficients of the sub
- a video coding method and device when predicting a current block according to a geometric segmentation mode, a video coding method and device are provided that efficiently perform transformation and inverse transformation on residual samples around a segmentation boundary, thereby making it possible to improve video encoding efficiency and enhance video quality.
- FIG. 1 is an exemplary block diagram of an image encoding device capable of implementing the techniques of the present disclosure.
- Figure 2 is a drawing for explaining a method of dividing a block using the QTBTTT (QuadTree plus BinaryTree TernaryTree) structure.
- FIGS. 3A and 3B are diagrams illustrating multiple intra prediction modes, including wide-angle intra prediction modes.
- Figure 4 is an example diagram of the surrounding blocks of the current block.
- FIG. 5 is an exemplary block diagram of an image decoding device capable of implementing the techniques of the present disclosure.
- FIG. 6 is a block diagram illustrating in detail a portion of an image decoding device according to one embodiment of the present disclosure.
- FIG. 7 is an exemplary diagram showing sub-regions divided according to a geometric division mode according to one embodiment of the present disclosure.
- FIG. 8 is an exemplary diagram showing a sub-block transformation unit according to one embodiment of the present disclosure.
- FIG. 9 is an exemplary diagram showing a process for determining a sub-block transformation unit according to another embodiment of the present disclosure.
- FIG. 10 is an exemplary diagram showing a reverse transformation process and a restoration process according to one embodiment of the present disclosure.
- FIG. 11a and FIG. 11b are exemplary diagrams showing sub-block transformation units according to another embodiment of the present disclosure.
- FIG. 12 is an exemplary diagram showing a reverse transformation process and a restoration process according to another embodiment of the present disclosure.
- FIG. 13a and FIG. 13b are exemplary diagrams showing sub-block transformation units according to another embodiment of the present disclosure.
- FIG. 14 is an exemplary diagram showing a reverse transformation process and a restoration process according to another embodiment of the present disclosure.
- FIG. 15 is an exemplary diagram showing a process for determining an inverse transform kernel according to one embodiment of the present disclosure.
- FIG. 16 is an exemplary diagram showing a process for determining an inverse transform kernel according to another embodiment of the present disclosure.
- FIG. 17 is a flowchart illustrating a method by which an image encoding device transforms a transform block according to one embodiment of the present disclosure.
- FIG. 18 is a flowchart illustrating a method for an image decoding device to inversely transform a transform block according to one embodiment of the present disclosure.
- FIG. 1 is an exemplary block diagram of an image encoding device capable of implementing the techniques of the present disclosure.
- the image encoding device and its subcomponents will be described with reference to the illustration in FIG. 1.
- 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).
- 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.
- a single image 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.
- CTUs Coding Tree Units
- 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.
- information commonly referenced by multiple pictures is encoded in a Sequence Parameter Set (SPS).
- SPS Sequence Parameter Set
- VPS Video Parameter Set
- 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.
- 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.
- 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.
- 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.
- QTBT QuadTree plus BinaryTree
- TT QuadTree TernaryTree
- BTTT may be combined and referred to as a MTT (Multiple-Type Tree).
- Figure 2 is a drawing for explaining a method of dividing a block using the QTBTTT structure.
- 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.
- MaxBTSize maximum block size
- splitting directions in the BT structure and/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.
- 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.
- 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.
- a type that horizontally splits the block of the corresponding node into two blocks of the same size i.e., symmetric horizontal splitting
- 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.
- split_flag split flag
- split_flag 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.
- a CU can have various sizes depending on the QTBT or QTBTTT partitioning from the CTU.
- the block corresponding to the CU to be encoded or decoded i.e., the leaf node of the QTBTTT
- the current block may be rectangular as well as square.
- 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).
- 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.
- 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.
- 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.
- directional modes 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.”
- 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.
- 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.
- the intra prediction unit (122) can determine an intra prediction mode to be used to encode the current block.
- 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.
- 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.
- 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.
- 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.
- MV motion vector
- 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.
- 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.
- 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.
- AMVR adaptive motion vector resolution
- 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.
- the inter prediction unit (124) can perform inter prediction using bi-prediction.
- 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.
- reference picture list 0 may be composed of pictures that are before the current picture in display order among the restored pictures
- reference picture list 1 may be composed of pictures that are after the current picture in display order among the restored pictures.
- 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.
- 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'.
- 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.
- 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.
- 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.
- 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.
- the inter prediction unit (124) uses these surrounding blocks to construct a merge list containing a predetermined number of merge candidates.
- 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.
- 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.
- merge mode and merge skip mode are collectively referred to as merge/skip mode.
- AMVP Advanced Motion Vector Prediction
- 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.
- 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.
- 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.
- 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.
- 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.
- the predicted motion vector can be obtained by applying a predefined function (e.g., median, mean, etc.) to the predicted motion vector candidates.
- a predefined function e.g., median, mean, etc.
- the image decoding device also knows the predefined function.
- 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.
- the predicted motion vector can be determined by selecting one of the predicted motion vector candidates.
- 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.
- 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.
- 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.
- 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.
- 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).
- 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.
- 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.
- the transformation unit (140) can individually perform transformations on the residual block in the horizontal and vertical directions.
- various types of transformation functions or transformation matrices can be used.
- a pair of transformation functions for horizontal transformation and vertical transformation can be defined as a Multiple Transform Set (MTS).
- MTS Multiple Transform Set
- 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.
- 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.
- the rearrangement unit (150) can perform rearrangement of coefficient values for quantized residual values.
- the reordering unit (150) can change a two-dimensional coefficient array into a one-dimensional coefficient sequence by using coefficient scanning.
- 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.
- 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.
- 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.
- CABAC Context-based Adaptive Binary Arithmetic Code
- Exponential Golomb Exponential Golomb
- 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.
- 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.
- the entropy encoding unit (155) encodes information related to quantization, that is, information about a quantization parameter and information about a quantization matrix.
- 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.
- 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.
- 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.
- 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.
- 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.
- the restored blocks filtered through the deblocking filter (182), SAO filter (184), and ALF (186) are stored in the memory (190).
- the restored picture can be used as a reference picture for inter-predicting blocks within a picture to be encoded later.
- 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.
- FIG. 5 is an exemplary block diagram of an image decoding device capable of implementing the techniques of the present disclosure.
- the image decoding device and its subcomponents will be described with reference to FIG. 5.
- 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).
- 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).
- 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.
- 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.
- 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.
- SPS Sequence Parameter Set
- PPS Picture Parameter Set
- 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.
- 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.
- 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.
- each node may undergo zero or more repeated QT splits followed by zero or more repeated MTT splits.
- a CTU may undergo an MTT split right away, or conversely, may undergo only multiple QT splits.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- the inverse transform unit (530) when it 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.
- a flag cu_sbt_flag
- 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.
- 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
- the inter prediction unit (544) is activated when the prediction type of the current block is inter prediction.
- 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.
- 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.
- 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.
- 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.
- the restored blocks filtered through the deblocking filter (562), SAO filter (564), and ALF (566) are stored in the memory (570).
- the restored picture is used as a reference picture for inter-predicting blocks within a picture to be encoded later.
- the present embodiment relates to encoding and decoding of images (videos) as described above. More specifically, the present invention provides a video coding method and device that efficiently performs transformation and inverse transformation on residual samples around a segmentation boundary when predicting a current block according to a geometric segmentation mode.
- 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.
- the following embodiments may be performed by a prediction unit (540) and an inverse transformation unit (530) within a video decoding apparatus.
- 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).
- target block may be used interchangeably with the current block or coding unit (CU).
- CU coding unit
- target block may also refer to a portion of a coding unit.
- 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.
- 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.
- 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.
- 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.
- the GPM of VVC obtains a partitioning mode for partitioning the current block into two sub-regions from among 64 predefined geometric partitioning modes based on information extracted from the bitstream, and motion information for each region.
- the GPM performs motion compensation of the two sub-regions according to the motion information, and weights the predictors of the two sub-regions using a blending matrix (i.e., a weight matrix) according to the partitioning mode to generate a final prediction block of the current block.
- a blending matrix i.e., a weight matrix
- ECM Enhanced Compression Model
- IBC Intra Block Copy
- SGPM Spatial GPM
- the GPM mode can perform MMVD (Merge with Motion Vector Difference) on each sub-region and perform motion information compensation based on Template Matching (TM).
- MMVD Merge with Motion Vector Difference
- TM Template Matching
- GPM-MMVD can be applied independently to each sub-region.
- GPM mode can variably consider the weighted sum area by signaling/parsing information related to the weighted sum area as an index and using the index in the process of obtaining the weighted sum matrix.
- BI-GPM mode can generate a prediction block in each sub-region based on bidirectional prediction during inter prediction. That is, the Bi-GPM technology can generate a prediction block in each sub-region based on bidirectional prediction when generating a prediction block of the current block based on the GPM technology.
- the Bi-GPM technology is applicable to all GPM-predicted blocks except for blocks of 8 ⁇ 8, 8 ⁇ 16, and 16 ⁇ 8 sizes. With respect to the aforementioned small-sized blocks, the Bi-GPM technology generates a GPM merge list from the general merge list such that the list candidates have unidirectional motion information.
- the Bi-GPM technology generates a general merge list and generates a prediction block in each sub-region based on merge index information extracted from the bitstream.
- bidirectional GPM-MMVD and bidirectional GPM-TM are supported, and a BDOF (Bi-directional Optical Flow)-based motion vector enhancement technology can be applied to the sub-regions.
- Implicit GPM technology does not signal or parse information about geometric segmentation boundaries. Implicit GPM technology derives weights for each location by applying regression analysis to the relationship between the predicted blocks of two sub-regions, the templates of the two predicted blocks, and the template of the current block. The derived weights are then used to generate the final predicted block. Affine prediction cannot be used when predicting each sub-region. Furthermore, the merge indices of the sub-regions are managed as a single combination, meaning that only one index indicating the combination is signaled. If both sub-regions are inter-predicted, TM (Template Matching)-based motion information compensation can be performed on the motion vectors of each sub-region. This compensation information can be extracted from the bitstream. Furthermore, intra prediction can be used in at least one of the sub-regions. Information regarding the use of intra prediction can be extracted from the bitstream. If this information is true, intra prediction can be included in the prediction mode candidate list combination of the sub-regions.
- quantization or scaling can be additionally applied to residual signals remaining after prediction using various prediction techniques.
- 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.
- 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.
- DCT-II 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.
- MTS Multiple Transform Selection
- 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.
- basis functions form a transformation matrix that defines each transformation type.
- DCT-II, DCT-VIII, and DST-VII are used interchangeably with DCT2, DCT8, and DST7, respectively.
- 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.
- a CU level flag may be displayed to indicate whether MTS is applied.
- 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.
- CBF Coded Block Flag
- DCT2 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.
- the kernel used for the TB is explicitly transmitted.
- the index of the transformation kernel can be transmitted.
- the kernel index, mts_idx can be defined as shown in Table 2.
- trTypeHor and trTypeVer represent the horizontal and vertical transformation types, respectively. Additionally, 0 represents DCT2, 1 represents DST7, and 2 represents DCT8.
- the transformation type can be determined implicitly even if MTS is not explicitly signaled in the case of an intra block.
- the horizontal and vertical transformation types can be determined implicitly, as in Equation 1.
- nTbW and nTbH represent the horizontal and vertical lengths of the transformation block, respectively.
- ECM Enhanced Compression Model
- 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.
- 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.
- 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.
- the LFNST technique 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.
- 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).
- a set of transformation kernels can be determined based on the intra prediction mode (IntraPredMode) of the current TU, as shown in Table 3.
- IntraPredMode follows the example of Fig. 3b.
- lfnstTrSetIdx is an index indicating a kernel set.
- IntraPredMode values of 81, 82, and 83 indicate CCLM (Cross-component Linear Model) prediction modes.
- LFNST index 0
- LFNST index 1 or 2
- 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.
- 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.
- 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.
- 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'.
- DIMD Decoder-side Intra Mode Derivation
- 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.
- HoG HoG
- the LFNST technique can be applied as a second transform.
- the non-separable first-order transform technique 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.
- 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.
- 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.
- 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.
- 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
- LFNST index can be used to indicate one of the candidate kernels within the transformation kernel set.
- 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.
- FIG. 6 is a block diagram illustrating in detail a portion of an image decoding device according to one embodiment of the present disclosure.
- the video decoding device 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. 6 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. 6 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.
- 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.
- the present embodiment will be described with reference to the video decoding device.
- 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. 6, 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).
- 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.
- 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.
- the inverse transform kernel determination unit (612) determines an inverse transform kernel, and the inverse transform execution unit (614) inversely transforms the transformation unit expressed by the inverse quantization transform coefficients, thereby generating residual samples.
- 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.
- 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.
- 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.
- 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.
- 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. 6. 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.
- the color format represents the correspondence between the pixels of the luma component and the pixels of the chroma component.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- the prediction technique determination unit (604) determines a prediction technique for each prediction unit.
- the prediction technique may be one of inter prediction, intra prediction, IBC mode, palette mode, or a technique combining intra and inter prediction.
- 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.
- a technique combining intra and inter prediction may be included in inter prediction.
- the video decoding device parses 1-bit flag information. For example, if the parsed flag indicates Skip mode, the video decoding device determines the prediction mode of the current block as the merge mode of inter prediction or the IBC merge mode. In the case of Skip mode, the video decoding device can use the prediction signals as restored signals without performing the inverse transformation process (i.e., without parsing the residual signals).
- 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.
- the video decoding device parses a 1-bit flag.
- the prediction mode of the current block can be determined as either General Merge mode or Advanced Motion Vector Prediction (AMVP) mode.
- AMVP Advanced Motion Vector Prediction
- the prediction mode determination unit (606) determines a detailed prediction mode of the current prediction unit block (hereinafter, used interchangeably with the current block) in relation to the prediction technology.
- the prediction mode determining unit (606) may determine the general merge mode or AMVP mode as the prediction mode of the current block.
- the image decoding device In the general merge mode or AMVP mode, the image decoding device generates prediction blocks according to one or more motion compensations based on parsed motion information, and weights and combines the generated multiple prediction blocks to generate final prediction signals of the current block.
- one or more of the prediction blocks may include a signal of a decoded area within a frame including the current block.
- the surrounding reconstructed region of the current block can be defined as a template, and an intra-prediction mode can be derived using this template.
- the template can also include regions not adjacent to the current block.
- the final prediction block of the current block can then be generated using the derived intra-prediction mode.
- the prediction mode determining unit (606) may determine a geometric partitioning-based prediction mode (hereinafter, geometric partitioning mode (GPM)) as the prediction mode of the current block.
- GPM geometric partitioning mode
- the image decoding device divides the current block into two or more sub-regions according to geometric partitioning, generates prediction blocks according to one or more motion compensations based on the motion information and prediction mode information of the parsed current block, and weights and combines the generated plurality of prediction blocks to generate final prediction signals of the current block.
- GPM geometric partitioning mode
- the image decoding device divides the current block into two or more sub-regions according to geometric partitioning, generates prediction blocks according to one or more motion compensations based on the motion information and prediction mode information of the parsed current block, and weights and combines the generated plurality of prediction blocks to generate final prediction signals of the current block.
- at least one block among the sub-blocks in the current block may be predicted according to inter prediction.
- the prediction mode of the current block may be a mode that generates 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 (for example, CCLM (Cross Component Linear Model), CCCM (Convolutional Cross Component Model), GLM (Gradient Linear Model), etc.).
- 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.
- 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.
- the prediction mode of the current block may be an intra geometric segmentation-based prediction mode.
- the intra geometric segmentation-based prediction mode divides the current block into one or more sub-regions according to geometric segmentation, generates a prediction block of each region using intra prediction modes including different directional prediction modes, Planar mode, DC mode, etc., and weights each prediction block to generate a prediction block of the current block.
- all sub-blocks within the current block may be predicted according to 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.
- 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.
- one or more may be used based on the signaling/parsing of flags and/or indices.
- a prediction block can be obtained from a previously restored area within a frame including the current block using one or more block vectors, and a final prediction block can be generated based on the prediction block.
- the video encoding device can signal information of the block vector, and the video decoding device can parse information of the block vector.
- the video decoding device can construct a block vector candidate list according to a position and search order defined according to an agreement between the video encoding device and the video decoding device, and parse information such as an index.
- the video decoding device can obtain final block vector information by correcting the initial block vector information obtained based on the parsed information using a method such as template matching.
- the prediction mode of the current block may be an IBC geometric partitioning-based prediction mode (hereinafter, IBC geometric partitioning mode).
- IBC geometric partitioning mode may divide the current block into one or more sub-regions according to the geometric partitioning, generate a prediction block for each region using a different block vector, and weight and combine the prediction blocks to generate a final prediction block of the current block.
- the current block is IBC prediction and the geometric partitioning mode is determined, at least one of all sub-blocks within the current block may be predicted according to the IBC prediction.
- the block vector information of the luma block at the corresponding position can be used.
- the block vector information of the corresponding luma block can be scaled according to a color format to generate information, and the scaled information can be used as the block vector and/or block vector candidate of the current chroma block.
- one or more block vectors can be acquired according to a predefined position and order within the corresponding luma region.
- the acquired block vector can be scaled according to a color format to generate information, and the scaled information can be used as the block vector and/or block vector candidate of the current chroma block.
- the surrounding restoration area of the current block may be defined as a template, and an intra prediction mode may be derived using information of some or all pixels of the template, or an intra prediction block may be generated based on template matching.
- the prediction block of the current block may be derived according to the derived intra prediction mode, or the prediction block may be generated based on block vector information signaled from a video encoding device.
- the final prediction block may be generated by mixing the prediction block/intra prediction block, or inter prediction block generated based on template matching and/or block vector, according to a method such as weighted summation.
- a template may include both adjacent and non-adjacent regions to the current block.
- the non-adjacent region may be an region within a certain distance of pixel lines from the current block.
- information on whether it is used and/or the distance may be transmitted from the video encoding device to the video decoding device.
- the distance information may be defined according to an agreement between the video encoding device and the video decoding device, and the transmission of the information may be omitted. If defined according to an agreement, the value may be fixed to a specific constant or may be variably determined based on the horizontal and vertical pixel lengths of the prediction unit, the block width, the aspect ratio, etc. Thereafter, the final prediction block of the current block may be generated using the derived intra prediction mode.
- 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.
- 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.
- the image decoding device may parse and/or derive geometric segmentation information related to the current block, and classify the current block into multiple sub-regions based on the geometric segmentation information.
- the geometric segmentation may be performed in a non-linear form, and the number of sub-regions may be 2 or more. For example, it may be divided into sub-regions P0 and P1, as in the example of FIG. 7.
- the video decoding device can generate a prediction block for each sub-region and weight the prediction blocks of the sub-regions to generate a final prediction block of the current block. For example, as shown in FIG. 7, when the number of sub-regions is 2, the prediction blocks of the sub-regions can be weighted and combined according to Equation 2.
- P 0 (ij) and P 1 (ij) represent prediction blocks of the P 0 and P 1 sub-regions, respectively, and n represents an integer greater than or equal to 1.
- w (i, j) may be a weighted sum matrix derived in an image decoding device based on geometric segmentation information of the current block, the size of the current block, aspect ratio, etc.
- the weighted sum matrix can determine the region where the prediction samples of the P0 and P1 sub-regions coexist based on the geometric segmentation boundary, that is, the region where the prediction samples of the two sub-regions are weighted-summed according to a non-zero coefficient.
- the region to be weighted-summed can be determined as a fixed region according to geometric segmentation boundary information and the size of the current block.
- the video encoding device can signal region area information, and the video decoding device can parse the region area information and determine the weighted sum matrix by considering the region area information together.
- the region area information can be defined in the form of a table according to an agreement between the video encoding device and the video decoding device, and can be determined according to the index of the table. At this time, information related to the table (e.g., the size of the table, the region area information included in the table) can vary depending on the size and aspect ratio of the current block, etc.
- the image decoding device may derive coefficients of a weighted sum matrix using the template of the current block and templates of a plurality of reference blocks without parsing and/or deriving geometric segmentation information for the current block, and may generate the final prediction block using the derived coefficients.
- affine prediction may not be used.
- affine prediction may be a mode determined by signaling/parsing a 1-bit flag in addition to the geometric segmentation mode flag.
- the prediction mode of the current block is geometric partitioning mode and the number of sub-regions is 2 or more.
- the prediction techniques for generating each prediction block can be at most N types (e.g., when N is 2, the prediction techniques can be inter prediction and intra prediction).
- N when the number of sub-regions is 4 and N is 2, only intra prediction and inter prediction can be used to perform prediction of the current block.
- the number of sub-blocks is X and N is 2, and both intra prediction and inter prediction are available, all sub-blocks can be predicted only by intra prediction or only by inter prediction to perform prediction of the current block.
- the prediction mode of the current block is geometric segmentation-based prediction mode
- at least one sub-region is predicted using inter-prediction, inter-block prediction, or intra-temporal prediction.
- illumination compensation may be performed after generating prediction blocks for the sub-regions.
- an image decoding device can derive a model for illumination compensation using the relationship between the template of a prediction block of each sub-region and the template of the corresponding current block, and compensate prediction samples of the sub-region based on the derived model, thereby generating a compensated prediction block.
- the illumination compensation can be applied to a sub-region in which inter prediction, IBC prediction, or IntraTMP prediction is performed.
- the model for illumination compensation can be a linear model.
- the image decoding device can perform illumination compensation on a sub-region to which illumination compensation is applicable among the sub-regions, and weight and combine the prediction blocks of the sub-regions to generate a final prediction block of the current block.
- lighting compensation can be performed after generating prediction blocks of sub-regions and generating a prediction block of the current block according to a weighted sum.
- an image decoding device generates prediction blocks of sub-regions, and weights and combines the prediction blocks of the sub-regions to generate a prediction block of the current block.
- the image decoding device can use the templates of the sub-regions to generate a template corresponding to the template of the current block, and derive a model for illumination compensation using the relationship between the templates.
- the image decoding device can apply the derived model to the weighted prediction block of the current block, thereby generating a final prediction block with illumination compensation.
- 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.
- 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.
- the inverse transform unit (530) generates residual samples by inversely transforming the TU expressed as inverse quantization transform coefficients.
- 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).
- the inverse transformation unit determination unit (610) may determine a single TU or a sub-block obtained by dividing a single TU into multiple sub-blocks as the target of transformation.
- the TU may be the entire current block, which is the target of prediction, or a portion of the current block.
- some areas of the current block may be configured as subblock transform units (Subblock Transform Units, SbTUs) based on geometric partitioning boundary information and weighted sum areas of the current block, and the configured subblock transform units may be determined as the current transform block.
- subblock transform units Subblock Transform Units, SbTUs
- FIG. 8 is an exemplary diagram showing a sub-block transformation unit according to one embodiment of the present disclosure.
- the minimum rectangular area that includes the area that includes the weighted sum area is It is configured as a sub-block transformation unit, and the configured sub-block transformation unit can be determined as the current transformation block.
- the example of Fig. 8 can be applied only when the current block is predicted according to the geometric segmentation mode and the geometric segmentation boundary information can be parsed/derived and utilized.
- A, B, C, and D are integers that are multiples of 1 or 2, and can be values having the conditions of A ⁇ W, B ⁇ W, C ⁇ H, and D ⁇ H.
- FIG. 9 is an exemplary diagram showing a process for determining a sub-block transformation unit according to another embodiment of the present disclosure.
- the video decoding device checks the geometric segmentation mode flag (gpm_flag).
- the image decoding device determines whether the current block is transformed according to the subblock transform. Based on the sbt_flag value, the image decoding device can determine the inverse transform kernel of the subblock transform unit or the transform unit, regardless of the geometric partitioning mode.
- the image decoding device checks a flag (gsbt_flag) indicating whether a geometric-based subblock transform unit ( hereinafter, used interchangeably with a subblock transform unit) is used, as shown in FIG. 9. If gsbt_flag is 1, the image decoding device can determine a subblock transform unit, as shown in FIG. 8, for example.
- gsbt_flag a flag indicating whether a geometric-based subblock transform unit ( hereinafter, used interchangeably with a subblock transform unit) is used, as shown in FIG. 9. If gsbt_flag is 1, the image decoding device can determine a subblock transform unit, as shown in FIG. 8, for example.
- FIG. 10 is an exemplary diagram showing a reverse transformation process and a restoration process according to one embodiment of the present disclosure.
- the video decoding device determines an inverse transform kernel with respect to the determined sub-block transform unit. After performing inverse transform based on the determined inverse transform kernel, the video decoding device can implicitly determine the positions of reconstructed residual samples based on the size of the current block, the geometric partitioning boundary of the current block, information on the weighted sum region of the current block, etc.
- the video decoding device can generate a reconstructed block by adding the residual samples whose positions are determined and the prediction block. Before generating the reconstructed block, the video decoding device can fill the residual values of the regions not included in the sub-block transform units within the residual block with 0, as shown in FIG. 10 (zero filling in FIG. 10).
- a portion of the current block may be determined as the current transformation unit based on geometric segmentation boundary information, a weighted sum region, etc. of the current block.
- a portion of the current block may be determined as in the following example.
- FIG. 11a and FIG. 11b are exemplary diagrams showing sub-block transformation units according to another embodiment of the present disclosure.
- sub-blocks of P ⁇ Q (FIG. 11a) and R ⁇ S (FIG. 11b) can be defined based on the geometric segmentation boundary and weighted sum region information of the current block having the size of W ⁇ H.
- P, Q, R, and S are integers that are multiples of 1 or 2, and can be adaptively and implicitly determined based on the size of the current block, the geometric segmentation boundary of the current block, and the weighted sum region information of the current block.
- n and m can be adaptively and implicitly determined based on the size of the current block, the geometric segmentation boundary of the current block, and the weighted sum region information of the current block.
- the P ⁇ Q block and the R ⁇ S block can include the outside of the weighted sum region associated with the current block.
- FIG. 12 is an exemplary diagram showing a reverse transformation process and a restoration process according to another embodiment of the present disclosure.
- the image decoding device determines an inverse transform kernel. After performing inverse transform based on the determined inverse transform kernel, the image decoding device determines P, n, Q or R, m, S values based on the size of the current block, the geometric partition boundary of the current block, information on the weighted sum region of the current block, etc., and can implicitly determine the positions of the reconstructed residual values based on the determined values.
- the image decoding device can generate a reconstructed block by adding the residual samples whose positions have been determined and the prediction block.
- the image decoding device can fill the residual values of the regions that are not included in the sub-block transform units within the residual block with 0 (filling in FIG. 12).
- the residual values can be padded using the values of samples that are close in distance (e.g., adjacent samples) and/or the average value of samples that are close in distance.
- a portion of the current block may be determined as the current transformation unit based on geometric segmentation boundary information, a weighted sum region, etc. of the current block.
- a portion of the current block may be determined as in the following example.
- FIG. 13a and FIG. 13b are exemplary diagrams showing sub-block transformation units according to another embodiment of the present disclosure.
- the number of residual samples to be inversely transformed can be derived based on geometric segmentation boundary information of the current block, weighted sum region information of the current block, size of the current block, etc.
- all samples at the weighted sum region location can be the number of residual samples to be inversely transformed
- all samples within some sub-region including the weighted sum region within the current block can be the number of residual samples to be inversely transformed.
- the image decoding device can fill the last samples in the scanning order within M ⁇ N with the samples added to calculate K.
- the image decoding device can fill the last samples described above with 0.
- the image decoding device can fill the last samples with the closest sample value in the scanning order (copying), or fill them with a value generated by averaging some sample values.
- FIGS. 13A and 13B are examples, and depending on the embodiment, the scanning order in the current block may be determined according to the type of prediction technique or prediction mode of each sub-region, as follows.
- the scanning order in the current block can be determined as one of vertical priority, horizontal priority, and zigzag, regardless of the sub-region boundary, as shown in Fig. 13a.
- the scanning order in the current block can be determined as one of vertical priority, horizontal priority, and zigzag, regardless of the sub-region boundaries, as shown in FIG. 13a.
- the scanning order in the current block may be determined by considering the sub-region boundaries, as shown in FIG. 13b. That is, samples included in one sub-region may be scanned first, and then samples included in the other sub-region may be scanned. At this time, different scanning orders may be applied to each sub-region. For example, if both sub-regions are predicted according to a directional intra-prediction mode, the scanning order may be implicitly determined based on the angle of the geometric segmentation boundary and/or the relationship between the directionality of the sub-regions.
- FIG. 14 is an exemplary diagram showing a reverse transformation process and a restoration process according to one embodiment of the present disclosure.
- the image decoding device determines an inverse transform kernel. After performing inverse transform based on the determined inverse transform kernel, the image decoding device implicitly determines a scanning order based on the size of the current block, the geometric partitioning boundary of the current block, information on the weighted sum region of the current block, and the prediction mode of the sub-region, and can implicitly determine the positions of the reconstructed residual values according to the scanning order.
- the image decoding device can generate a reconstructed block by adding the residual samples whose positions have been determined and the prediction block.
- the image decoding device can fill the residual values of the regions that are not included in the sub-block transform units within the residual block with 0 (filling in FIG. 14).
- the residual values can be padded using the values of samples that are close in distance (e.g., adjacent samples) and/or the average value of samples that are close in distance.
- 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.
- the inverse transform performing unit (614) can inverse transform the inverse quantized transform coefficients using the determined inverse transform kernel.
- whether to perform a non-separable inverse transform can be determined based on the signaling/parsing of a flag or index.
- whether to perform a non-separable inverse transform indicates whether to perform a non-separable first-order inverse transform or a non-separable second-order inverse transform.
- whether to perform a non-separable inverse transform can be implicitly determined based on the size of the current transform block.
- the current transform block represents a TU or sub-block transform unit.
- FIG. 15 is an exemplary diagram showing a process for determining an inverse transform kernel according to one embodiment of the present disclosure.
- the inverse transformation kernel decision unit (612) determines the current transformation block according to the example of Fig. 15.
- the type of inverse transform kernel can be determined.
- the order illustrated in Fig. 15 can be changed, and some orders can be omitted.
- whether to perform a non-separable inverse transform and whether to perform a non-separable first-order inverse transform with respect to the current transform block may be determined based on signaling/parsing of flags and/or indices.
- whether to perform a non-separable inverse transform and whether to perform a non-separable first-order inverse transform may be implicitly determined based on the size of the current inverse transform unit.
- FIG. 16 is an exemplary diagram showing a process for determining an inverse transform kernel according to another embodiment of the present disclosure.
- the inverse transform kernel decision unit (612) determines the current transform block according to the example of FIG. 16.
- the type of inverse transform kernel can be determined.
- the order illustrated in Fig. 16 can be changed, and some orders can be omitted.
- whether to perform a non-separable inverse transform with respect to the current transformation block may be determined based on signaling/parsing of flags and/or indices.
- whether to perform a non-separable first inverse transform or a non-separable second inverse transform may be determined based on the size of the block. For example, when the size of the block is N ⁇ 4 or 4 ⁇ N (16 ⁇ N ⁇ 4) or 8 ⁇ N or N ⁇ 8 (16 ⁇ N ⁇ 8), a non-separable first inverse transform may be performed on the block, and a non-separable second inverse transform may be performed on blocks of different sizes.
- the image decoding device can implicitly determine the vertical kernel and the horizontal kernel based on whether the geometric segmentation mode is performed. If the geometric segmentation mode is performed, the image decoding device can implicitly determine the vertical kernel and the horizontal kernel based on the prediction mode of each sub-region, the weighted sum region, etc.
- the vertical kernel and the horizontal kernel can be determined by defining a table according to an agreement between the image encoding device and the image decoding device based on the above-described information, and signaling/parsing the index of the table.
- different tables can be configured according to the prediction combination of the sub-regions (e.g., inter/inter prediction, inter/intra prediction, IBC/intra prediction, intra/IntraTMP prediction, etc.).
- a combination among inter prediction, intra prediction, IBC prediction, and IntraTMP prediction can be considered as the prediction combination.
- an implicitly fixed kernel e.g., DCT2, DCT2 as vertical and horizontal kernels
- the fixed kernel can be adaptively changed according to the size/aspect ratio of the current transform block.
- the fixed kernel can be adaptively changed according to the size/aspect ratio of the current transform block, the prediction mode of each sub-region, etc.
- the non-separable first-order inverse transform kernel can be determined based on the size of the current transform block and the prediction mode of each sub-region.
- the non-separable first-order inverse transform can only be applied to blocks where all sub-regions are intra-predicted.
- the video decoding device signals/parses an index and/or a flag indicating a non-separable first-order inverse transform kernel with respect to the current transform block.
- the video decoding device can determine the inverse transform kernel indicated by the parsed index/flag as the non-separable first-order inverse transform kernel of the current transform block based on the size of the current transform block, the prediction mode of each sub-region of the current block, etc.
- the types of available non-separable first-order inverse transform kernels may be 2 or M (M ⁇ N).
- there may be K types of available non-separable first-order inverse transform kernels there may be K types of available non-separable first-order inverse transform kernels, and a separate kernel set may be used.
- the types of available inverse transform kernels can be configured differently according to the agreement between the video encoding device and the video decoding device.
- the prediction combination a combination among inter prediction, intra prediction, IBC prediction, and IntraTMP prediction can be considered.
- the video decoding device may derive at least one directionality from all or part of a region of a prediction block corresponding to the current transform block, and use an inseparable first-order inverse transform kernel corresponding to one of the at least one derived directionality.
- the video decoding device may derive at least one directionality from all or part of a region of a prediction block corresponding to the current transform block, and use an inseparable first-order inverse transform kernel corresponding to one of the at least one derived directionality.
- the video decoding device applies a Sobel filter to an area corresponding to a current transformation block in a prediction block (in the case of a sub-block transformation unit, see examples of FIGS. 8, 11a and 11b, 13a and 13b) to calculate vertical/horizontal gradient and size values for each preset unit.
- the video decoding device can construct a Histogram of Gradient (HoG) from the vertical/horizontal gradient and size values for each preset unit, and derive directionality based on the HoG.
- the Sobel filter represents an edge detection filter
- the preset unit may be, for example, a pixel or a pixel group.
- an inseparable second-order inverse transform if used, the use of an inseparable first-order inverse transform is restricted.
- the inseparable first-order inverse transform index is parsed first, whether or not the inseparable second-order inverse transform is parsed may depend on the index value of the inseparable first-order inverse transform.
- the non-separable second-order inverse transform kernel can be determined based on the size of the current transform block and the prediction mode of each sub-region.
- the non-separable second-order inverse transform can only be applied to blocks where all sub-regions are intra-predicted.
- the video decoding device signals/parses an index and/or a flag indicating a non-separable second-order inverse transform kernel with respect to the current transform block.
- the video decoding device can determine the inverse transform kernel indicated by the parsed index/flag as the non-separable second-order inverse transform kernel of the current transform block based on the size of the current transform block, the prediction mode of each sub-region of the current block, etc.
- the types of available non-separable second-order inverse transform kernels may be 2 or M (M ⁇ N).
- there may be K types of available non-separable second-order inverse transform kernels there may be K types of available non-separable second-order inverse transform kernels, and a separate kernel set may be used.
- the types of available inverse transform kernels can be configured differently according to the agreement between the video encoding device and the video decoding device.
- the prediction combination a combination among inter prediction, intra prediction, IBC prediction, and IntraTMP prediction can be considered.
- the video decoding device may derive at least one directionality from all or part of a region of a prediction block corresponding to the current transform block, and use an inseparable second-order inverse transform kernel corresponding to one of the at least one derived directionality.
- the video decoding device may derive at least one directionality from all or part of a region of a prediction block corresponding to the current transform block, and use an inseparable second-order inverse transform kernel corresponding to one of the at least one derived directionality.
- a directionality similar to the intra prediction mode of each sub-region of the current block among the derived directionality may be used.
- the video decoding device applies a Sobel filter to an area corresponding to the current transformation block in the prediction block (in the case of a sub-block transformation unit, see examples of FIGS. 8, 11a and 11b, 13a and 13b) to calculate vertical/horizontal slope and size values for each preset unit.
- the video decoding device can configure a HoG from the vertical/horizontal slope and size values for each preset unit, and derive directionality based on the HoG.
- the Sobel filter represents a boundary detection filter
- the preset unit may be, for example, a pixel or a pixel group.
- the first inverse transform when a non-separable second inverse transform is performed, the first inverse transform may be performed using separable vertical and horizontal inverse transform kernels.
- a fixed kernel e.g., DCT2, DCT2 as a vertical and horizontal kernel
- FIGS. 17 and 18 are described based on the case where the current transform block is a sub-block transform unit, but can be similarly applied when the current transform block is a TU.
- FIG. 17 is a flowchart illustrating a method by which an image encoding device transforms a transform block according to one embodiment of the present disclosure.
- the video encoding device obtains residual samples of the current block (S1700).
- the image encoding device obtains a flag indicating whether a sub-block transform unit is used from a higher level (S1702).
- the video encoding device checks whether the flag is true (S1704).
- the video encoding device may perform the following steps.
- the video encoding device determines a prediction region used to configure a sub-block transformation unit of the current block (S1706).
- the prediction region may include a weighted sum region of sub-regions, with respect to sub-regions of the current block divided according to a geometric division mode.
- the image encoding device may determine the prediction region based on a minimum rectangular region among rectangular regions including the weighted sum region of the sub-regions.
- the video encoding device can calculate the minimum number of samples that satisfy 2 K (where K is a natural number).
- K is a natural number
- the video encoding device can determine the size of the sub-block transformation unit based on the minimum number of samples.
- the video encoding device fills the sub-block transformation unit according to a predetermined scanning order using residual samples of the prediction region among the residual samples of the current block (S1708).
- the video encoding device may pad the last positions of the sub-block transform unit according to a predetermined scanning order with zero samples, the closest sample value in the scanning order, or a value generated by averaging some samples.
- the video encoding device determines a transformation kernel of a subblock transformation unit (S1710).
- An image encoding device can obtain non-separable transform information from a higher level.
- the non-separable transform information indicates whether a non-separable transform is applied, and the non-separable transform may indicate a non-separable primary transform or a non-separable secondary transform.
- the non-separable transform information may be a flag or index indicating whether a non-separable transform is applied.
- the image encoding device can determine a non-separable transform kernel corresponding to a non-separable first transform kernel or a non-separable second transform kernel based on the size of the sub-block transform unit and the prediction modes of the sub-regions of the current block.
- the video encoding device can determine whether to perform a non-separable primary transform or a non-separable secondary transform based on the size of the sub-block transform unit.
- the video encoding device applies a transform kernel to a sub-block transform unit to generate transform coefficients of the sub-block transform unit (S1712).
- the video encoding device can encode the transform coefficients of the flag and sub-block transform units.
- the video encoding device can determine the transform kernel of the current block and apply the determined transform kernel to the residual samples of the current block to generate transform coefficients of the current block. Thereafter, the video encoding device can encode the flag and the transform coefficients of the current block.
- FIG. 18 is a flowchart illustrating a method for an image decoding device to inversely transform a transform block according to one embodiment of the present disclosure.
- the image decoding device obtains the inverse quantized transform coefficients of the current block (S1800).
- the image decoding device decodes a flag indicating whether a sub-block transform unit is used from the bitstream (S1800).
- the video decoding device checks whether the flag is true (S1804).
- the video decoding device may perform the following steps.
- the video decoding device determines the sub-block transformation unit of the current block (S1806).
- the sub-block transformation unit may be determined based on a prediction region including a weighted sum region of the sub-regions of the current block divided according to a geometric division mode.
- the image decoding device may determine the sub-block transformation unit based on a minimum rectangular region among rectangular regions including the weighted sum region of the sub-regions.
- the video decoding device determines an inverse transform kernel of a sub-block transform unit (S1808).
- a video decoding device decodes non-separable transform information from a bitstream.
- the non-separable transform information indicates whether a non-separable inverse transform is applied, and the non-separable inverse transform may represent a non-separable first-order inverse transform or a non-separable second-order inverse transform.
- the non-separable transform information may be a flag or index indicating whether a non-separable transform is applied.
- the image decoding device can determine a non-separable inverse transform kernel corresponding to a non-separable first inverse transform kernel or a non-separable second inverse transform kernel based on the size of the sub-block transform unit and the prediction modes of the sub-regions of the current block.
- the image decoding device can determine whether to perform a non-separable first inverse transform or a non-separable second inverse transform based on the size of the sub-block transform unit.
- the image decoding device when performing a non-separable first inverse transform based on the size of a sub-block transform unit, can decode an index from a bitstream.
- the index can indicate one of the non-separable first inverse transform kernels included in a table, with respect to a table including non-separable first inverse transform kernels defined based on a predicted combination of sub-regions.
- the image decoding device can obtain the non-separable first inverse transform kernel of the sub-block transform unit from the table based on the index.
- the image decoding device can generate a HoG based on a prediction region corresponding to a prediction block or a sub-block transformation unit of the current block, and derive at least one directional prediction mode corresponding to a plurality of directionality that has accumulated a lot based on the HoG.
- the image decoding device can generate a HoG based on a prediction region corresponding to a prediction block or a sub-block transformation unit of the current block, and derive at least one directional prediction mode corresponding to a plurality of directionality that has accumulated a lot from the HoG.
- the image decoding device can determine a non-separable first inverse transform kernel of the sub-block transformation unit based on one of the at least one derived directional prediction mode.
- the image decoding device can decode an index from the bitstream.
- the index can indicate one of the first inverse transform kernel pairs included in the table, with respect to a table including pairs of first inverse transform kernels in vertical and horizontal directions defined based on a predicted combination and a weighted sum region of sub-regions.
- the image decoding device can obtain the first inverse transform kernel pairs in the vertical and horizontal directions of the sub-block transform unit from the table based on the index.
- the image decoding device when performing a non-separable second inverse transform based on the size of a sub-block transform unit, can decode an index from a bitstream.
- the index can indicate one of the non-separable second inverse transform kernels included in a table, with respect to a table including non-separable second inverse transform kernels defined based on a predicted combination of sub-regions.
- the image decoding device can obtain the non-separable second inverse transform kernel of the sub-block transform unit from the table based on the index.
- the image decoding device may perform a prediction region based on the prediction region corresponding to the prediction block or sub-block transform unit of the current block.
- a HoG can be generated and at least one directional prediction mode corresponding to a large number of accumulated directions from the HoG can be derived.
- the image decoding device can decode the prediction region corresponding to the prediction block or sub-block transformation unit of the current block based on the prediction region.
- a HoG can be generated, and at least one directional prediction mode corresponding to a large number of accumulated directions can be derived from the HoG.
- the image decoding device can determine a non-separable second-order inverse transform kernel of a sub-block transform unit based on at least one of the derived directional prediction modes.
- the image decoding device applies an inverse transform kernel to inverse quantized transform coefficients to generate residual samples of a sub-block transform unit (S1810).
- the video decoding device fills the prediction area used to determine the sub-block transformation unit according to a predetermined scanning order using residual samples of the sub-block transformation unit (S1812).
- the image decoding device can adjust the size of the sub-block transform unit to be the same as the size of the prediction region by discarding the last residual samples according to the scanning order determined from the sub-block transform unit.
- the image decoding device generates a residual block of the current block by padding zero samples around the prediction region (S1814).
- the image decoding device can determine the inverse transform kernel of the current block and apply the determined inverse transform kernel to the inverse quantized transform coefficients of the current block to generate the residual block of the current block.
- Non-transitory storage media include, for example, all types of storage devices that store data in a form readable by a computer system.
- 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).
- EPROM erasable programmable read-only memory
- SSDs solid-state drives
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
Description
본 개시는 기하학적 분할 모드에서 변환 또는 역변환을 수행하는 비디오 코딩방법 및 장치에 관한 것이다. The present disclosure relates to a video coding method and apparatus for performing transformation or inverse transformation in a geometric partitioning mode.
이하에 기술되는 내용은 단순히 본 발명과 관련되는 배경 정보만을 제공할 뿐 종래기술을 구성하는 것이 아니다. The content described below merely provides background information related to the present invention and does not constitute prior art.
비디오 데이터는 음성 데이터나 정지 영상 데이터 등에 비하여 많은 데이터량을 가지기 때문에, 압축을 위한 처리 없이 그 자체를 저장하거나 전송하기 위해서는 메모리를 포함하여 많은 하드웨어 자원을 필요로 한다. 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.
따라서, 통상적으로 비디오 데이터를 저장하거나 전송할 때 부호화기는 비디오 데이터를 압축하여 저장하거나 전송하며, 복호화기는 압축된 비디오 데이터를 수신하여 압축을 해제하고 재생한다. 이러한 비디오 압축 기술로는 H.264/AVC, HEVC(High Efficiency Video Coding) 등을 비롯하여, HEVC에 비해 약 30% 이상의 부호화 효율을 향상시킨 VVC(Versatile Video Coding)가 존재한다. 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.
그러나, 영상의 크기 및 해상도, 프레임률이 점차 증가하고 있고, 이에 따라 부호화해야 하는 데이터량도 증가하고 있으므로 기존의 압축 기술보다 더 부호화 효율이 좋고 화질 개선 효과도 높은 새로운 압축 기술이 요구된다. 특히, 현재블록이 기하학적 분할 모드로 예측되는 경우, 변환 또는 역변환을 효율적으로 수행하는 방법이 요구된다. However, as image 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. In particular, when the current block is predicted in geometric segmentation mode, a method for efficiently performing transformation or inverse transformation is required.
본 개시는, 기하학적 분할 모드에 따라 현재블록을 예측하는 경우, 분할 경계 주변 잔차샘플들에 변환 및 역변환을 효율적으로 수행하는 비디오 코딩방법 및 장치를 제공하는 데 목적이 있다. The present disclosure aims to provide a video coding method and device that efficiently performs transformation and inverse transformation on residual samples around a segmentation boundary when predicting a current block according to a geometric segmentation mode.
본 개시의 실시예에 따르면, 영상 복호화 장치가 수행하는, 현재블록을 복원하는 방법에 있어서, 상기 현재블록의 역양자화된 변환계수들을 획득하는 단계; 및 상기 현재블록이 기하학적 분할 모드에 따라 예측되는 경우, 비트스트림으로부터 서브블록 변환 단위가 사용되지는 여부를 지시하는 플래그를 복호화하는 단계를 포함하고, 상기 플래그가 상기 서브블록 변환 단위의 사용을 나타내는 경우, 상기 현재블록의 서브블록 변환 단위를 결정하는 단계, 여기서, 상기 서브블록 변환 단위는, 기하학적 분할 모드에 따라 분할된 상기 현재블록의 서브 영역들과 관련하여, 상기 서브 영역들의 가중합 영역을 포함하는 예측 영역에 기초하여 결정됨; 상기 서브블록 변환 단위의 역변환 커널을 결정하는 단계; 상기 역양자화된 변환계수들에 상기 역변환 커널을 적용하여 상기 서브블록 변환 단위의 잔차샘플들을 생성하는 단계; 및 상기 서브블록 변환 단위의 잔차샘플들을 이용하여, 기정해진 스캐닝 순서에 따라 상기 서브블록 변환 단위의 결정에 이용된 예측 영역을 채우는 단계를 더 포함하는, 방법을 제공한다. According to an embodiment of the present disclosure, a method for restoring a current block, performed by an image decoding device, comprises: obtaining inverse quantized transform coefficients of the current block; and, if the current block is predicted according to a geometric partitioning mode, decoding a flag from a bitstream indicating whether a sub-block transform unit is used, and if the flag indicates use of the sub-block transform unit, determining a sub-block transform unit of the current block, wherein the sub-block transform unit is determined based on a prediction region including a weighted sum region of sub-regions of the current block partitioned according to the geometric partitioning mode; determining an inverse transform kernel of the sub-block transform unit; applying the inverse transform kernel to the inverse quantized transform coefficients to generate residual samples of the sub-block transform unit; and, using the residual samples of the sub-block transform unit, performing a scanning operation according to a predetermined scanning order. A method is provided, further comprising a step of filling a prediction region used in determining the above sub-block transformation unit.
본 개시의 다른 실시예에 따르면, 영상 부호화 장치가 수행하는, 현재블록을 부호화하는 방법에 있어서, 상기 현재블록의 잔차샘플들을 획득하는 단계; 및 상기 현재블록이 기하학적 분할 모드에 따라 예측되는 경우, 상위 수준으로부터 서브블록 변환 단위가 사용되지는 여부를 지시하는 플래그를 획득하는 단계를 포함하고, 상기 플래그가 상기 서브블록 변환 단위의 사용을 나타내는 경우, 상기 현재블록의 서브블록 변환 단위를 구성하기 위해 사용되는 예측 영역을 결정하는 단계, 여기서, 상기 예측 영역은, 기하학적 분할 모드에 따라 분할된 상기 현재블록의 서브 영역들과 관련하여, 상기 서브 영역들의 가중합 영역을 포함함;상기 현재블록의 잔차샘플들 중 상기 예측 영역의 잔차샘플들을 이용하여, 기정해진 스캐닝 순서에 따라 상기 서브블록 변환 단위를 채우는 단계; 상기 서브블록 변환 단위의 변환 커널을 결정하는 단계; 및 상기 서브블록 변환 단위에 상기 변환 커널을 적용하여 상기 서브블록 변환 단위의 변환계수들을 생성하는 단계를 더 포함하는 방법을 제공한다. According to another embodiment of the present disclosure, a method for encoding a current block, performed by an image encoding device, comprises: obtaining residual samples of the current block; and, if the current block is predicted according to a geometric partitioning mode, obtaining a flag from a higher level indicating whether a sub-block transformation unit is not used, and, if the flag indicates use of the sub-block transformation unit, determining a prediction region used to configure a sub-block transformation unit of the current block, wherein the prediction region includes a weighted sum region of sub-regions of the current block divided according to a geometric partitioning mode; filling the sub-block transformation unit according to a predetermined scanning order using residual samples of the prediction region among residual samples of the current block; determining a transformation kernel of the sub-block transformation unit; and applying the transformation kernel to the sub-block transformation unit to generate transformation coefficients of the sub-block transformation unit.
본 개시의 다른 실시예에 따르면, 영상 복호화 장치에게 비디오 데이터를 제공하는 방법에 있어서, 상기 비디오 데이터를 비트스트림으로 부호화하는 단계; 및 상기 비트스트림을 상기 영상 복호화 장치에게 전달하는 단계를 포함하고, 상기 비디오 데이터를 부호화하는 단계는, 현재블록의 잔차샘플들을 획득하는 단계; 및 상기 현재블록이 기하학적 분할 모드에 따라 예측되는 경우, 상위 수준으로부터 서브블록 변환 단위가 사용되지는 여부를 지시하는 플래그를 획득하는 단계를 포함하고, 상기 플래그가 상기 서브블록 변환 단위의 사용을 나타내는 경우, 상기 현재블록의 서브블록 변환 단위를 구성하기 위해 사용되는 예측 영역을 결정하는 단계, 여기서, 상기 예측 영역은, 기하학적 분할 모드에 따라 분할된 상기 현재블록의 서브 영역들과 관련하여, 상기 서브 영역들의 가중합 영역을 포함함; 상기 현재블록의 잔차샘플들 중 상기 예측 영역의 잔차샘플들을 이용하여, 기정해진 스캐닝 순서에 따라 상기 서브블록 변환 단위를 채우는 단계; 상기 서브블록 변환 단위의 변환 커널을 결정하는 단계; 및 상기 서브블록 변환 단위에 상기 변환 커널을 적용하여 상기 서브블록 변환 단위의 변환계수들을 생성하는 단계를 더 포함하는, 방법을 제공한다.According to another embodiment of the present disclosure, a method for providing video data to a video decoding device comprises: 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 samples of a current block; and, if the current block is predicted according to a geometric partitioning mode, obtaining a flag indicating whether a sub-block transformation unit is not used from a higher level; and, if the flag indicates use of the sub-block transformation unit, determining a prediction region used to configure a sub-block transformation unit of the current block, wherein the prediction region includes a weighted sum region of sub-regions of the current block divided according to a geometric partitioning mode; filling the sub-block transformation unit according to a predetermined scanning order using residual samples of the prediction region among residual samples of the current block; determining a transformation kernel of the sub-block transformation unit; And the method further includes a step of applying the transform kernel to the sub-block transform unit to generate transform coefficients of the sub-block transform unit.
이상에서 설명한 바와 같이 본 실시예에 따르면, 기하학적 분할 모드에 따라 현재블록을 예측하는 경우, 분할 경계 주변 잔차샘플들에 변환 및 역변환을 효율적으로 수행하는 비디오 코딩방법 및 장치를 제공함으로써, 비디오 부호화 효율을 향상시키고 비디오 화질을 개선하는 것이 가능해지는 효과가 있다. As described above, according to the present embodiment, when predicting a current block according to a geometric segmentation mode, a video coding method and device are provided that efficiently perform transformation and inverse transformation on residual samples around a segmentation boundary, thereby making it possible to improve video encoding efficiency and enhance video quality.
도 1은 본 개시의 기술들을 구현할 수 있는 영상 부호화 장치에 대한 예시적인 블록도이다. FIG. 1 is an exemplary block diagram of an image encoding device capable of implementing the techniques of the present disclosure.
도 2는 QTBTTT(QuadTree plus BinaryTree TernaryTree) 구조를 이용하여 블록을 분할하는 방법을 설명하기 위한 도면이다.Figure 2 is a drawing for explaining a method of dividing a block using the QTBTTT (QuadTree plus BinaryTree TernaryTree) structure.
도 3a 및 도 3b는 광각 인트라 예측모드들을 포함한 복수의 인트라 예측모드들을 나타낸 도면이다.FIGS. 3A and 3B are diagrams illustrating multiple intra prediction modes, including wide-angle intra prediction modes.
도 4는 현재블록의 주변블록에 대한 예시도이다.Figure 4 is an example diagram of the surrounding blocks of the current block.
도 5는 본 개시의 기술들을 구현할 수 있는 영상 복호화 장치의 예시적인 블록도이다.FIG. 5 is an exemplary block diagram of an image decoding device capable of implementing the techniques of the present disclosure.
도 6은 본 개시의 일 실시예에 따른, 영상 복호화 장치의 일부를 자세히 나타내는 블록도이다.FIG. 6 is a block diagram illustrating in detail a portion of an image decoding device according to one embodiment of the present disclosure.
도 7은 본 개시의 일 실시예에 따른, 기하학적 분할 모드에 따라 분할된 서브 영역들을 나타내는 예시도이다. FIG. 7 is an exemplary diagram showing sub-regions divided according to a geometric division mode according to one embodiment of the present disclosure.
도 8은 본 개시의 일 실시예에 따른, 서브블록 변환 단위를 나타내는 예시도이다. FIG. 8 is an exemplary diagram showing a sub-block transformation unit according to one embodiment of the present disclosure.
도 9는 본 개시의 다른 실시예에 따른, 서브블록 변환 단위의 결정 과정을 나타내는 예시도이다. FIG. 9 is an exemplary diagram showing a process for determining a sub-block transformation unit according to another embodiment of the present disclosure.
도 10은 본 개시의 일 실시예에 따른, 역변환 과정 및 복원 과정을 나타내는 예시도이다. FIG. 10 is an exemplary diagram showing a reverse transformation process and a restoration process according to one embodiment of the present disclosure.
도 11a 및 도 11b는 본 개시의 다른 실시예에 따른, 서브블록 변환 단위를 나타내는 예시도이다. FIG. 11a and FIG. 11b are exemplary diagrams showing sub-block transformation units according to another embodiment of the present disclosure.
도 12는 본 개시의 다른 실시예에 따른, 역변환 과정 및 복원 과정을 나타내는 예시도이다. FIG. 12 is an exemplary diagram showing a reverse transformation process and a restoration process according to another embodiment of the present disclosure.
도 13a 및 도 13b는 본 개시의 다른 실시예에 따른, 서브블록 변환 단위를 나타내는 예시도이다. FIG. 13a and FIG. 13b are exemplary diagrams showing sub-block transformation units according to another embodiment of the present disclosure.
도 14는 본 개시의 다른 실시예에 따른, 역변환 과정 및 복원 과정을 나타내는 예시도이다. FIG. 14 is an exemplary diagram showing a reverse transformation process and a restoration process according to another embodiment of the present disclosure.
도 15는 본 개시의 일 실시예에 따른, 역변환 커널의 결정 과정을 나타내는 예시도이다. FIG. 15 is an exemplary diagram showing a process for determining an inverse transform kernel according to one embodiment of the present disclosure.
도 16은 본 개시의 다른 실시예에 따른, 역변환 커널의 결정 과정을 나타내는 예시도이다. FIG. 16 is an exemplary diagram showing a process for determining an inverse transform kernel according to another embodiment of the present disclosure.
도 17은 본 개시의 일 실시예에 따른, 영상 부호화 장치가 변환블록을 변환하는 방법을 나타내는 순서도이다.FIG. 17 is a flowchart illustrating a method by which an image encoding device transforms a transform block according to one embodiment of the present disclosure.
도 18은 본 개시의 일 실시예에 따른, 영상 복호화 장치가 변환블록을 역변환하는 방법을 나타내는 순서도이다.FIG. 18 is a flowchart illustrating a method for an image decoding device to inversely transform a transform block according to one embodiment of the present disclosure.
이하, 본 발명의 실시예들을 예시적인 도면을 참조하여 상세하게 설명한다. 각 도면의 구성요소들에 참조부호를 부가함에 있어서, 동일한 구성요소들에 대해서는 비록 다른 도면상에 표시되더라도 가능한 한 동일한 부호를 가지도록 하고 있음에 유의해야 한다. 또한, 본 실시예들을 설명함에 있어, 관련된 공지 구성 또는 기능에 대한 구체적인 설명이 본 실시예들의 요지를 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명은 생략한다.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.
도 1은 본 개시의 기술들을 구현할 수 있는 영상 부호화 장치에 대한 예시적인 블록도이다. 이하에서는 도 1의 도시를 참조하여 영상 부호화 장치와 이 장치의 하위 구성들에 대하여 설명하도록 한다.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.
영상 부호화 장치는 픽처 분할부(110), 예측부(120), 감산기(130), 변환부(140), 양자화부(145), 재정렬부(150), 엔트로피 부호화부(155), 역양자화부(160), 역변환부(165), 가산기(170), 루프 필터부(180) 및 메모리(190)를 포함하여 구성될 수 있다.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).
영상 부호화 장치의 각 구성요소는 하드웨어 또는 소프트웨어로 구현되거나, 하드웨어 및 소프트웨어의 결합으로 구현될 수 있다. 또한, 각 구성요소의 기능이 소프트웨어로 구현되고 마이크로프로세서가 각 구성요소에 대응하는 소프트웨어의 기능을 실행하도록 구현될 수도 있다.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.
하나의 영상(비디오)은 복수의 픽처들을 포함하는 하나 이상의 시퀀스로 구성된다. 각 픽처들은 복수의 영역으로 분할되고 각 영역마다 부호화가 수행된다. 예를 들어, 하나의 픽처는 하나 이상의 타일(Tile) 및/또는 슬라이스(Slice)로 분할된다. 여기서, 하나 이상의 타일을 타일 그룹(Tile Group)으로 정의할 수 있다. 각 타일 또는 슬라이스는 하나 이상의 CTU(Coding Tree Unit)로 분할된다. 그리고 각 CTU는 트리 구조에 의해 하나 이상의 CU(Coding Unit)들로 분할된다. 각 CU에 적용되는 정보들은 CU의 신택스로서 부호화되고, 하나의 CTU에 포함된 CU들에 공통적으로 적용되는 정보는 CTU의 신택스로서 부호화된다. 또한, 하나의 슬라이스 내의 모든 블록들에 공통적으로 적용되는 정보는 슬라이스 헤더의 신택스로서 부호화되며, 하나 이상의 픽처들을 구성하는 모든 블록들에 적용되는 정보는 픽처 파라미터 셋(PPS, Picture Parameter Set) 혹은 픽처 헤더에 부호화된다. 나아가, 복수의 픽처가 공통으로 참조하는 정보들은 시퀀스 파라미터 셋(SPS, Sequence Parameter Set)에 부호화된다. 그리고, 하나 이상의 SPS가 공통으로 참조하는 정보들은 비디오 파라미터 셋(VPS, Video Parameter Set)에 부호화된다. 또한, 하나의 타일 또는 타일 그룹에 공통으로 적용되는 정보는 타일 또는 타일 그룹 헤더의 신택스로서 부호화될 수도 있다. SPS, PPS, 슬라이스 헤더, 타일 또는 타일 그룹 헤더에 포함되는 신택스들은 상위수준(high level) 신택스로 칭할 수 있다. 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.
픽처 분할부(110)는 CTU의 크기를 결정한다. CTU의 크기에 대한 정보(CTU size)는 SPS 또는 PPS의 신택스로서 부호화되어 영상 복호화 장치로 전달된다. 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.
픽처 분할부(110)는 영상을 구성하는 각 픽처(picture)를 미리 결정된 크기를 가지는 복수의 CTU들로 분할한 이후에, 트리 구조(tree structure)를 이용하여 CTU를 반복적으로(recursively) 분할한다. 트리 구조에서의 리프 노드(leaf node)가 부호화의 기본 단위인 CU가 된다. 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.
트리 구조로는 상위 노드(혹은 부모 노드)가 동일한 크기의 네 개의 하위 노드(혹은 자식 노드)로 분할되는 쿼드트리(QuadTree, QT), 또는 상위 노드가 두 개의 하위 노드로 분할되는 바이너리트리(BinaryTree, BT), 또는 상위 노드가 1:2:1 비율로 세 개의 하위 노드로 분할되는 터너리트리(TernaryTree, TT), 또는 이러한 QT 구조, BT 구조 및 TT 구조 중 둘 이상을 혼용한 구조일 수 있다. 예컨대, QTBT(QuadTree plus BinaryTree) 구조가 사용될 수 있고, 또는 QTBTTT(QuadTree plus BinaryTree TernaryTree) 구조가 사용될 수 있다. 여기서, BTTT를 합쳐서 MTT(Multiple-Type Tree)라 지칭될 수 있다. 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).
도 2는 QTBTTT 구조를 이용하여 블록을 분할하는 방법을 설명하기 위한 도면이다.Figure 2 is a drawing for explaining a method of dividing a block using the QTBTTT structure.
도 2에 도시된 바와 같이, CTU는 먼저 QT 구조로 분할될 수 있다. 쿼드트리 분할은 분할 블록(splitting block)의 크기가 QT에서 허용되는 리프 노드의 최소 블록 크기(MinQTSize)에 도달할 때까지 반복될 수 있다. QT 구조의 각 노드가 하위 레이어의 4 개의 노드들로 분할되는지 여부를 지시하는 제1 플래그(QT_split_flag)는 엔트로피 부호화부(155)에 의해 부호화되어 영상 복호화 장치로 시그널링된다. QT의 리프 노드가 BT에서 허용되는 루트 노드의 최대 블록 크기(MaxBTSize)보다 크지 않은 경우, BT 구조 또는 TT 구조 중 어느 하나 이상으로 더 분할될 수 있다. BT 구조 및/또는 TT 구조에서는 복수의 분할 방향이 존재할 수 있다. 예컨대, 해당 노드의 블록이 가로로 분할되는 방향과 세로로 분할되는 방향 두 가지가 존재할 수 있다. 도 2의 도시와 같이, MTT 분할이 시작되면, 노드들이 분할되었는지 여부를 지시하는 제2 플래그(mtt_split_flag)와, 분할이 되었다면 추가적으로 분할 방향(vertical 혹은 horizontal)을 나타내는 플래그 및/또는 분할 타입(Binary 혹은 Ternary)을 나타내는 플래그가 엔트로피 부호화부(155)에 의해 부호화되어 영상 복호화 장치로 시그널링된다.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.
대안적으로, 각 노드가 하위 레이어의 4 개의 노드들로 분할되는지 여부를 지시하는 제1 플래그(QT_split_flag)를 부호화하기에 앞서, 그 노드가 분할되는지 여부를 지시하는 CU 분할 플래그(split_cu_flag)가 부호화될 수도 있다. CU 분할 플래그(split_cu_flag) 값이 분할되지 않았음을 지시하는 경우, 해당 노드의 블록이 분할 트리 구조에서의 리프 노드(leaf node)가 되어 부호화의 기본 단위인 CU(coding unit)가 된다. CU 분할 플래그(split_cu_flag) 값이 분할됨을 지시하는 경우, 영상 부호화 장치는 전술한 방식으로 제1 플래그부터 부호화를 시작한다.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.
트리 구조의 다른 예시로서 QTBT가 사용되는 경우, 해당 노드의 블록을 동일 크기의 두 개 블록으로 가로로 분할하는 타입(즉, symmetric horizontal splitting)과 세로로 분할하는 타입(즉, symmetric vertical splitting) 두 가지가 존재할 수 있다. BT 구조의 각 노드가 하위 레이어의 블록으로 분할되는지 여부를 지시하는 분할 플래그(split_flag) 및 분할되는 타입을 지시하는 분할 타입 정보가 엔트로피 부호화부(155)에 의해 부호화되어 영상 복호화 장치로 전달된다. 한편, 해당 노드의 블록을 서로 비대칭 형태의 두 개의 블록으로 분할하는 타입이 추가로 더 존재할 수도 있다. 비대칭 형태에는 해당 노드의 블록을 1:3의 크기 비율을 가지는 두 개의 직사각형 블록으로 분할하는 형태가 포함될 수 있고, 혹은 해당 노드의 블록을 대각선 방향으로 분할하는 형태가 포함될 수도 있다.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.
CU는 CTU로부터의 QTBT 또는 QTBTTT 분할에 따라 다양한 크기를 가질 수 있다. 이하에서는, 부호화 또는 복호화하고자 하는 CU(즉, QTBTTT의 리프 노드)에 해당하는 블록을 '현재블록'이라 칭한다. QTBTTT 분할의 채용에 따라, 현재블록의 모양은 정사각형뿐만 아니라 직사각형일 수도 있다.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.
예측부(120)는 현재블록을 예측하여 예측블록을 생성한다. 예측부(120)는 인트라 예측부(122)와 인터 예측부(124)를 포함한다. 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).
일반적으로, 픽처 내 현재블록들은 각각 예측적으로 코딩될 수 있다. 일반적으로 현재블록의 예측은 (현재블록을 포함하는 픽처로부터의 데이터를 사용하는) 인트라 예측 기술 또는 (현재블록을 포함하는 픽처 이전에 코딩된 픽처로부터의 데이터를 사용하는) 인터 예측 기술을 사용하여 수행될 수 있다. 인터 예측은 단방향 예측과 양방향 예측 모두를 포함한다.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.
인트라 예측부(122)는 현재블록이 포함된 현재 픽처 내에서 현재블록의 주변에 위치한 픽셀(참조 픽셀)들을 이용하여 현재블록 내의 픽셀들을 예측한다. 예측 방향에 따라 복수의 인트라 예측모드가 존재한다. 예컨대, 도 3a에서 보는 바와 같이, 복수의 인트라 예측모드는 Planar 모드와 DC 모드를 포함하는 2 개의 비방향성 모드와 65 개의 방향성 모드를 포함할 수 있다. 각 예측모드에 따라 사용할 주변 픽셀과 연산식이 다르게 정의된다.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.
직사각형 모양의 현재블록에 대한 효율적인 방향성 예측을 위해, 도 3b에 점선 화살표로 도시된 방향성 모드들(67 ~ 80번, -1 ~ -14 번 인트라 예측모드들)이 추가로 사용될 수 있다. 이들은 "광각 인트라 예측모드들(wide angle intra-prediction modes)"로 지칭될 수 있다. 도 3b에서 화살표들은 예측에 사용되는 대응하는 참조샘플들을 가리키는 것이며, 예측 방향을 나타내는 것이 아니다. 예측 방향은 화살표가 가리키는 방향과 반대이다. 광각 인트라 예측모드들은 현재블록이 직사각형일 때 추가적인 비트 전송 없이 특정 방향성 모드를 반대방향으로 예측을 수행하는 모드이다. 이때 광각 인트라 예측모드들 중에서, 직사각형의 현재블록의 너비와 높이의 비율에 의해, 현재블록에 이용 가능한 일부 광각 인트라 예측모드들이 결정될 수 있다. 예컨대, 45도보다 작은 각도를 갖는 광각 인트라 예측모드들(67 ~ 80번 인트라 예측모드들)은 현재블록이 높이가 너비보다 작은 직사각형 형태일 때 이용 가능하고, -135도보다 큰 각도를 갖는 광각 인트라 예측모드들(-1 ~ -14 번 인트라 예측모드들)은 현재블록이 너비가 높이보다 큰 직사각형 형태일 때 이용 가능하다.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.
인트라 예측부(122)는 현재블록을 부호화하는데 사용할 인트라 예측모드를 결정할 수 있다. 일부 예들에서, 인트라 예측부(122)는 여러 인트라 예측모드들을 사용하여 현재블록을 인코딩하고, 테스트된 모드들로부터 사용할 적절한 인트라 예측모드를 선택할 수도 있다. 예를 들어, 인트라 예측부(122)는 여러 테스트된 인트라 예측모드들에 대한 비트율 왜곡(rate-distortion) 분석을 사용하여 비트율 왜곡 값들을 계산하고, 테스트된 모드들 중 최선의 비트율 왜곡 특징들을 갖는 인트라 예측모드를 선택할 수도 있다.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.
인트라 예측부(122)는 복수의 인트라 예측모드 중에서 하나의 인트라 예측모드를 선택하고, 선택된 인트라 예측모드에 따라 결정되는 주변 픽셀(참조 픽셀)과 연산식을 사용하여 현재블록을 예측한다. 선택된 인트라 예측모드에 대한 정보는 엔트로피 부호화부(155)에 의해 부호화되어 영상 복호화 장치로 전달된다.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.
인터 예측부(124)는 움직임 보상 과정을 이용하여 현재블록에 대한 예측블록을 생성한다. 인터 예측부(124)는 현재 픽처보다 먼저 부호화 및 복호화된 참조픽처 내에서 현재블록과 가장 유사한 블록을 탐색하고, 그 탐색된 블록을 이용하여 현재블록에 대한 예측블록을 생성한다. 그리고, 현재 픽처 내의 현재블록과 참조픽처 내의 예측블록 간의 변위(displacement)에 해당하는 움직임벡터(Motion Vector: MV)를 생성한다. 일반적으로, 움직임 추정은 루마(luma) 성분에 대해 수행되고, 루마 성분에 기초하여 계산된 움직임벡터는 루마 성분 및 크로마 성분 모두에 대해 사용된다. 현재블록을 예측하기 위해 사용된 참조픽처에 대한 정보 및 움직임벡터에 대한 정보를 포함하는 움직임 정보는 엔트로피 부호화부(155)에 의해 부호화되어 영상 복호화 장치로 전달된다.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.
인터 예측부(124)는, 예측의 정확성을 높이기 위해, 참조픽처 또는 참조 블록에 대한 보간을 수행할 수도 있다. 즉, 연속한 두 정수 샘플 사이의 서브 샘플들은 그 두 정수 샘플을 포함한 연속된 복수의 정수 샘플들에 필터 계수들을 적용하여 보간된다. 보간된 참조픽처에 대해서 현재블록과 가장 유사한 블록을 탐색하는 과정을 수행하면, 움직임벡터는 정수 샘플 단위의 정밀도(precision)가 아닌 소수 단위의 정밀도까지 표현될 수 있다. 움직임벡터의 정밀도 또는 해상도(resolution)는 부호화하고자 하는 대상 영역, 예컨대, 슬라이스, 타일, CTU, CU 등의 단위마다 다르게 설정될 수 있다. 이와 같은 적응적 움직임벡터 해상도(Adaptive Motion Vector Resolution: AMVR)가 적용되는 경우 각 대상 영역에 적용할 움직임벡터 해상도에 대한 정보는 대상 영역마다 시그널링되어야 한다. 예컨대, 대상 영역이 CU인 경우, 각 CU마다 적용된 움직임벡터 해상도에 대한 정보가 시그널링된다. 움직임벡터 해상도에 대한 정보는 후술할 차분 움직임벡터의 정밀도를 나타내는 정보일 수 있다.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.
한편, 인터 예측부(124)는 양방향 예측(bi-prediction)을 이용하여 인터 예측을 수행할 수 있다. 양방향 예측의 경우, 두 개의 참조픽처와 각 참조픽처 내에서 현재블록과 가장 유사한 블록 위치를 나타내는 두 개의 움직임벡터가 이용된다. 인터 예측부(124)는 참조픽처 리스트 0(RefPicList0) 및 참조픽처 리스트 1(RefPicList1)으로부터 각각 제1 참조픽처 및 제2 참조픽처를 선택하고, 각 참조픽처 내에서 현재블록과 유사한 블록을 탐색하여 제1 참조블록과 제2 참조블록을 생성한다. 그리고, 제1 참조블록과 제2 참조블록을 평균 또는 가중 평균하여 현재블록에 대한 예측블록을 생성한다. 그리고 현재블록을 예측하기 위해 사용한 두 개의 참조픽처에 대한 정보 및 두 개의 움직임벡터에 대한 정보를 포함하는 움직임 정보를 엔트로피 부호화부(155)로 전달한다. 여기서, 참조픽처 리스트 0은 기복원된 픽처들 중 디스플레이 순서에서 현재 픽처 이전의 픽처들로 구성되고, 참조픽처 리스트 1은 기복원된 픽처들 중 디스플레이 순서에서 현재 픽처 이후의 픽처들로 구성될 수 있다. 그러나 반드시 이에 한정되는 것은 아니며, 디스플레이 순서 상으로 현재 픽처 이후의 기복원 픽처들이 참조픽처 리스트 0에 추가로 더 포함될 수 있고, 역으로 현재 픽처 이전의 기복원 픽처들이 참조픽처 리스트 1에 추가로 더 포함될 수도 있다.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.
움직임 정보를 부호화하는 데에 소요되는 비트량을 최소화하기 위해 다양한 방법이 사용될 수 있다. Various methods can be used to minimize the number of bits required to encode motion information.
예컨대, 현재블록의 참조픽처와 움직임벡터가 주변블록의 참조픽처 및 움직임벡터와 동일한 경우에는 그 주변블록을 식별할 수 있는 정보를 부호화함으로써, 현재블록의 움직임 정보를 영상 복호화 장치로 전달할 수 있다. 이러한 방법을 '머지 모드(merge mode)'라 한다.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'.
머지 모드에서, 인터 예측부(124)는 현재블록의 주변블록들로부터 기 결정된 개수의 머지 후보블록(이하, '머지 후보'라 함)들을 선택한다. 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.
머지 후보를 유도하기 위한 주변블록으로는, 도 4에 도시된 바와 같이, 현재 픽처 내에서 현재블록에 인접한 좌측블록(A0), 좌하단블록(A1), 상단블록(B0), 우상단블록(B1), 및 좌상단블록(B2) 중에서 전부 또는 일부가 사용될 수 있다. 또한, 현재블록이 위치한 현재 픽처가 아닌 참조픽처(현재블록을 예측하기 위해 사용된 참조픽처와 동일할 수도 있고 다를 수도 있음) 내에 위치한 블록이 머지 후보로서 사용될 수도 있다. 예컨대, 참조픽처 내에서 현재블록과 동일 위치에 있는 블록(co-located block) 또는 그 동일 위치의 블록에 인접한 블록들이 머지 후보로서 추가로 더 사용될 수 있다. 이상에서 기술된 방법에 의해 선정된 머지 후보의 개수가 기설정된 개수보다 작으면, 0 벡터를 머지 후보에 추가한다. 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.
인터 예측부(124)는 이러한 주변블록들을 이용하여 기결정된 개수의 머지 후보를 포함하는 머지 리스트를 구성한다. 머지 리스트에 포함된 머지 후보들 중에서 현재블록의 움직임정보로서 사용할 머지 후보를 선택하고 선택된 후보를 식별하기 위한 머지 인덱스 정보를 생성한다. 생성된 머지 인덱스 정보는 엔트로피 부호화부(155)에 의해 부호화되어 영상 복호화 장치로 전달된다.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.
머지 스킵(merge skip) 모드는 머지 모드의 특별한 경우로서, 양자화를 수행한 후, 엔트로피 부호화를 위한 변환 계수가 모두 영(zero)에 가까울 때, 잔차신호들의 전송 없이 주변블록 선택 정보만을 전송한다. 머지 스킵 모드를 이용함으로써, 움직임이 적은 영상, 정지 영상, 스크린 콘텐츠 영상 등에서 상대적으로 높은 부호화 효율을 달성할 수 있다. 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.
이하, 머지 모드와 머지 스킵 모드를 통칭하여, 머지/스킵 모드로 나타낸다. Hereinafter, merge mode and merge skip mode are collectively referred to as merge/skip mode.
움직임 정보를 부호화하기 위한 또 다른 방법은 AMVP(Advanced Motion Vector Prediction) 모드이다.Another method for encoding motion information is Advanced Motion Vector Prediction (AMVP) mode.
AMVP 모드에서, 인터 예측부(124)는 현재블록의 주변블록들을 이용하여 현재블록의 움직임벡터에 대한 예측 움직임벡터 후보들을 유도한다. 예측 움직임벡터 후보들을 유도하기 위해 사용되는 주변블록으로는, 도 4에 도시된 현재 픽처 내에서 현재블록에 인접한 좌측블록(A0), 좌하단블록(A1), 상단블록(B0), 우상단블록(B1), 및 좌상단블록(B2) 중에서 전부 또는 일부가 사용될 수 있다. 또한, 현재블록이 위치한 현재 픽처가 아닌 참조픽처(현재블록을 예측하기 위해 사용된 참조픽처와 동일할 수도 있고 다를 수도 있음) 내에 위치한 블록이 예측 움직임벡터 후보들을 유도하기 위해 사용되는 주변블록으로서 사용될 수도 있다. 예컨대, 참조픽처 내에서 현재블록과 동일 위치에 있는 블록(co-located block) 또는 그 동일 위치의 블록에 인접한 블록들이 사용될 수 있다. 이상에서 기술된 방법에 의해 움직임벡터 후보의 개수가 기설정된 개수보다 작으면, 0 벡터를 움직임벡터 후보에 추가한다. 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.
인터 예측부(124)는 이 주변블록들의 움직임벡터를 이용하여 예측 움직임벡터 후보들을 유도하고, 예측 움직임벡터 후보들을 이용하여 현재블록의 움직임벡터에 대한 예측 움직임벡터를 결정한다. 그리고, 현재블록의 움직임벡터로부터 예측 움직임벡터를 감산하여 차분 움직임벡터를 산출한다. 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.
예측 움직임벡터는 예측 움직임벡터 후보들에 기정의된 함수(예컨대, 중앙값, 평균값 연산 등)를 적용하여 구할 수 있다. 이 경우, 영상 복호화 장치도 기정의된 함수를 알고 있다. 또한, 예측 움직임벡터 후보를 유도하기 위해 사용하는 주변블록은 이미 부호화 및 복호화가 완료된 블록이므로 영상 복호화 장치도 그 주변블록의 움직임벡터도 이미 알고 있다. 그러므로 영상 부호화 장치는 예측 움직임벡터 후보를 식별하기 위한 정보를 부호화할 필요가 없다. 따라서, 이 경우에는 차분 움직임벡터에 대한 정보와 현재블록을 예측하기 위해 사용한 참조픽처에 대한 정보가 부호화된다.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.
한편, 예측 움직임벡터는 예측 움직임벡터 후보들 중 어느 하나를 선택하는 방식으로 결정될 수도 있다. 이 경우에는 차분 움직임벡터에 대한 정보 및 현재블록을 예측하기 위해 사용한 참조픽처에 대한 정보와 함께, 선택된 예측 움직임벡터 후보를 식별하기 위한 정보가 추가로 부호화된다.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.
감산기(130)는 현재블록으로부터 인트라 예측부(122) 또는 인터 예측부(124)에 의해 생성된 예측블록을 감산하여 잔차블록을 생성한다.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.
변환부(140)는 공간 영역의 픽셀 값들을 가지는 잔차블록 내의 잔차신호들을 주파수 도메인의 변환 계수로 변환한다. 변환부(140)는 잔차블록의 전체 크기를 변환 단위로 사용하여 잔차블록 내의 잔차신호들을 변환할 수 있으며, 또는 잔차블록을 복수 개의 서브블록으로 분할하고 그 서브블록을 변환 단위로 사용하여 변환을 할 수도 있다. 또는, 변환 영역 및 비변환 영역인 두 개의 서브블록으로 구분하여, 변환 영역 서브블록만 변환 단위로 사용하여 잔차신호들을 변환할 수 있다. 여기서, 변환 영역 서브블록은 가로축 (혹은 세로축) 기준 1:1의 크기 비율을 가지는 두 개의 직사각형 블록 중 하나일 수 있다. 이런 경우, 서브블록 만을 변환하였음을 지시하는 플래그(cu_sbt_flag), 방향성(vertical/horizontal) 정보(cu_sbt_horizontal_flag) 및/또는 위치 정보(cu_sbt_pos_flag)가 엔트로피 부호화부(155)에 의해 부호화되어 영상 복호화 장치로 시그널링된다. 또한, 변환 영역 서브블록의 크기는 가로축 (혹은 세로축) 기준 1:3의 크기 비율을 가질 수 있으며, 이런 경우 해당 분할을 구분하는 플래그(cu_sbt_quad_flag)가 추가적으로 엔트로피 부호화부(155)에 의해 부호화되어 영상 복호화 장치로 시그널링된다. 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.
한편, 변환부(140)는 잔차블록에 대해 가로 방향과 세로 방향으로 개별적으로 변환을 수행할 수 있다. 변환을 위해, 다양한 타입의 변환 함수 또는 변환 행렬이 사용될 수 있다. 예컨대, 가로 방향 변환과 세로 방향 변환을 위한 변환 함수의 쌍을 MTS(Multiple Transform Set)로 정의할 수 있다. 변환부(140)는 MTS 중 변환 효율이 가장 좋은 하나의 변환 함수 쌍을 선택하고 가로 및 세로 방향으로 각각 잔차블록을 변환할 수 있다. MTS 중에서 선택된 변환 함수 쌍에 대한 정보(mts_idx)는 엔트로피 부호화부(155)에 의해 부호화되어 영상 복호화 장치로 시그널링된다. 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.
양자화부(145)는 변환부(140)로부터 출력되는 변환 계수들을 양자화 파라미터를 이용하여 양자화하고, 양자화된 변환 계수들을 엔트로피 부호화부(155)로 출력한다. 양자화부(145)는, 어떤 블록 혹은 프레임에 대해, 변환 없이, 관련된 잔차 블록을 곧바로 양자화할 수도 있다. 양자화부(145)는 변환블록 내의 변환 계수들의 위치에 따라 서로 다른 양자화 계수(스케일링 값)을 적용할 수도 있다. 2차원으로 배열된 양자화된 변환 계수들에 적용되는 양자화 행렬은 부호화되어 영상 복호화 장치로 시그널링될 수 있다. 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.
재정렬부(150)는 양자화된 잔차값에 대해 계수값의 재정렬을 수행할 수 있다.The rearrangement unit (150) can perform rearrangement of coefficient values for quantized residual values.
재정렬부(150)는 계수 스캐닝(coefficient scanning)을 이용하여 2차원의 계수 어레이를 1차원의 계수 시퀀스로 변경할 수 있다. 예를 들어, 재정렬부(150)에서는 지그-재그 스캔(zig-zag scan) 또는 대각선 스캔(diagonal scan)을 이용하여 DC 계수부터 고주파수 영역의 계수까지 스캔하여 1차원의 계수 시퀀스를 출력할 수 있다. 변환 단위의 크기 및 인트라 예측모드에 따라 지그-재그 스캔 대신 2차원의 계수 어레이를 열 방향으로 스캔하는 수직 스캔, 2차원의 블록 형태 계수를 행 방향으로 스캔하는 수평 스캔이 사용될 수도 있다. 즉, 변환 단위의 크기 및 인트라 예측모드에 따라 지그-재그 스캔, 대각선 스캔, 수직 방향 스캔 및 수평 방향 스캔 중에서 사용될 스캔 방법이 결정될 수도 있다.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.
엔트로피 부호화부(155)는, CABAC(Context-based Adaptive Binary Arithmetic Code), 지수 골롬(Exponential Golomb) 등의 다양한 부호화 방식을 사용하여, 재정렬부(150)로부터 출력된 1차원의 양자화된 변환 계수들의 시퀀스를 부호화함으로써 비트스트림을 생성한다. 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.
또한, 엔트로피 부호화부(155)는 블록 분할과 관련된 CTU size, CU 분할 플래그, QT 분할 플래그, MTT 분할 타입, MTT 분할 방향 등의 정보를 부호화하여, 영상 복호화 장치가 영상 부호화 장치와 동일하게 블록을 분할할 수 있도록 한다. 또한, 엔트로피 부호화부(155)는 현재블록이 인트라 예측에 의해 부호화되었는지 아니면 인터 예측에 의해 부호화되었는지 여부를 지시하는 예측 타입에 대한 정보를 부호화하고, 예측 타입에 따라 인트라 예측정보(즉, 인트라 예측모드에 대한 정보) 또는 인터 예측정보(움직임 정보의 부호화 모드(머지 모드 또는 AMVP 모드), 머지 모드의 경우 머지 인덱스, AMVP 모드의 경우 참조픽처 인덱스 및 차분 움직임벡터에 대한 정보)를 부호화한다. 또한, 엔트로피 부호화부(155)는 양자화와 관련된 정보, 즉, 양자화 파라미터에 대한 정보 및 양자화 행렬에 대한 정보를 부호화한다.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.
역양자화부(160)는 양자화부(145)로부터 출력되는 양자화된 변환 계수들을 역양자화하여 변환 계수들을 생성한다. 역변환부(165)는 역양자화부(160)로부터 출력되는 변환 계수들을 주파수 도메인으로부터 공간 도메인으로 변환하여 잔차블록을 복원한다.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.
가산기(170)는 복원된 잔차블록과 예측부(120)에 의해 생성된 예측블록을 가산하여 현재블록을 복원한다. 복원된 현재블록 내의 픽셀들은 다음 순서의 블록을 인트라 예측할 때 참조 픽셀들로서 사용된다.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.
루프(loop) 필터부(180)는 블록 기반의 예측 및 변환/양자화로 인해 발생하는 블록킹 아티팩트(blocking artifacts), 링잉 아티팩트(ringing artifacts), 블러링 아티팩트(blurring artifacts) 등을 줄이기 위해 복원된 픽셀들에 대한 필터링을 수행한다. 루프 필터부(180)는 인루프(in-loop) 필터로서 디블록킹 필터(182), SAO(Sample Adaptive Offset) 필터(184) 및 ALF(Adaptive Loop Filter, 186)의 전부 또는 일부를 포함할 수 있다.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.
디블록킹 필터(182)는 블록 단위의 부호화/복호화로 인해 발생하는 블록킹 현상(blocking artifact)을 제거하기 위해 복원된 블록 간의 경계를 필터링하고, SAO 필터(184) 및 ALF(186)는 디블록킹 필터링된 영상에 대해 추가적인 필터링을 수행한다. SAO 필터(184) 및 ALF(186)는 손실 부호화(lossy coding)로 인해 발생하는 복원된 픽셀들과 원본 픽셀들 간의 차이를 보상하기 위해 사용되는 필터이다. SAO 필터(184)는 CTU 단위로 오프셋을 적용함으로써 주관적 화질뿐만 아니라 부호화 효율도 향상시킨다. 이에 비하여 ALF(186)는 블록 단위의 필터링을 수행하는데, 해당 블록의 에지 및 변화량의 정도를 구분하여 상이한 필터를 적용하여 왜곡을 보상한다. ALF에 사용될 필터 계수들에 대한 정보는 부호화되어 영상 복호화 장치로 시그널링될 수 있다.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.
디블록킹 필터(182), SAO 필터(184) 및 ALF(186)를 통해 필터링된 복원블록은 메모리(190)에 저장된다. 한 픽처 내의 모든 블록들이 복원되면, 복원된 픽처는 이후에 부호화하고자 하는 픽처 내의 블록을 인터 예측하기 위한 참조픽처로 사용될 수 있다. 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.
영상 부호화 장치는 부호화된 비디오 데이터의 비트스트림을 비일시적인 기록매체에 저장하거나 통신 네트워크를 이용하여 영상 복호화 장치에게 전송할 수 있다.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.
도 5는 본 개시의 기술들을 구현할 수 있는 영상 복호화 장치의 예시적인 블록도이다. 이하에서는 도 5를 참조하여 영상 복호화 장치와 이 장치의 하위 구성들에 대하여 설명하도록 한다.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.
영상 복호화 장치는 엔트로피 복호화부(510), 재정렬부(515), 역양자화부(520), 역변환부(530), 예측부(540), 가산기(550), 루프 필터부(560) 및 메모리(570)를 포함하여 구성될 수 있다. 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).
도 1의 영상 부호화 장치와 마찬가지로, 영상 복호화 장치의 각 구성요소는 하드웨어 또는 소프트웨어로 구현되거나, 하드웨어 및 소프트웨어의 결합으로 구현될 수 있다. 또한, 각 구성요소의 기능이 소프트웨어로 구현되고 마이크로프로세서가 각 구성요소에 대응하는 소프트웨어의 기능을 실행하도록 구현될 수도 있다.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.
엔트로피 복호화부(510)는 영상 부호화 장치에 의해 생성된 비트스트림을 복호화하여 블록 분할과 관련된 정보를 추출함으로써 복호화하고자 하는 현재블록을 결정하고, 현재블록을 복원하기 위해 필요한 예측정보, 잔차신호들에 대한 정보 등을 추출한다.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.
엔트로피 복호화부(510)는 SPS(Sequence Parameter Set) 또는 PPS(Picture Parameter Set)로부터 CTU size에 대한 정보를 추출하여 CTU의 크기를 결정하고, 픽처를 결정된 크기의 CTU로 분할한다. 그리고, CTU를 트리 구조의 최상위 레이어, 즉, 루트 노드로 결정하고, CTU에 대한 분할정보를 추출함으로써 트리 구조를 이용하여 CTU를 분할한다. 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.
예컨대, QTBTTT 구조를 사용하여 CTU를 분할하는 경우, 먼저 QT의 분할과 관련된 제1 플래그(QT_split_flag)를 추출하여 각 노드를 하위 레이어의 네 개의 노드로 분할한다. 그리고, QT의 리프 노드에 해당하는 노드에 대해서는 MTT의 분할과 관련된 제2 플래그(mtt_split_flag) 및 분할 방향(vertical / horizontal) 및/또는 분할 타입(binary / ternary) 정보를 추출하여 해당 리프 노드를 MTT 구조로 분할한다. 이에 따라 QT의 리프 노드 이하의 각 노드들을 BT 또는 TT 구조로 반복적으로(recursively) 분할한다.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.
또 다른 예로서, QTBTTT 구조를 사용하여 CTU를 분할하는 경우, 먼저 CU의 분할 여부를 지시하는 CU 분할 플래그(split_cu_flag)를 추출하고, 해당 블록이 분할된 경우, 제1 플래그(QT_split_flag)를 추출할 수도 있다. 분할 과정에서 각 노드는 0번 이상의 반복적인 QT 분할 후에 0번 이상의 반복적인 MTT 분할이 발생할 수 있다. 예컨대, CTU는 바로 MTT 분할이 발생하거나, 반대로 다수 번의 QT 분할만 발생할 수도 있다. 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.
다른 예로서, QTBT 구조를 사용하여 CTU를 분할하는 경우, QT의 분할과 관련된 제1 플래그(QT_split_flag)를 추출하여 각 노드를 하위 레이어의 네 개의 노드로 분할한다. 그리고, QT의 리프 노드에 해당하는 노드에 대해서는 BT로 더 분할되는지 여부를 지시하는 분할 플래그(split_flag) 및 분할 방향 정보를 추출한다.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.
한편, 엔트로피 복호화부(510)는 트리 구조의 분할을 이용하여 복호화하고자 하는 현재블록을 결정하게 되면, 현재블록이 인트라 예측되었는지 아니면 인터 예측되었는지를 지시하는 예측 타입에 대한 정보를 추출한다. 예측 타입 정보가 인트라 예측을 지시하는 경우, 엔트로피 복호화부(510)는 현재블록의 인트라 예측정보(인트라 예측모드)에 대한 신택스 요소를 추출한다. 예측 타입 정보가 인터 예측을 지시하는 경우, 엔트로피 복호화부(510)는 인터 예측정보에 대한 신택스 요소, 즉, 움직임벡터 및 그 움직임벡터가 참조하는 참조픽처를 나타내는 정보를 추출한다.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.
또한, 엔트로피 복호화부(510)는 양자화 관련된 정보, 및 잔차신호들에 대한 정보로서 현재블록의 양자화된 변환계수들에 대한 정보를 추출한다.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.
재정렬부(515)는, 영상 부호화 장치에 의해 수행된 계수 스캐닝 순서의 역순으로, 엔트로피 복호화부(510)에서 엔트로피 복호화된 1차원의 양자화된 변환계수들의 시퀀스를 다시 2차원의 계수 어레이(즉, 블록)로 변경할 수 있다.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.
역양자화부(520)는 양자화된 변환계수들을 역양자화하고, 양자화 파라미터를 이용하여 양자화된 변환계수들을 역양자화한다. 역양자화부(520)는 2차원으로 배열된 양자화된 변환계수들에 대해 서로 다른 양자화 계수(스케일링 값)을 적용할 수도 있다. 역양자화부(520)는 영상 부호화 장치로부터 양자화 계수(스케일링 값)들의 행렬을 양자화된 변환계수들의 2차원 어레이에 적용하여 역양자화를 수행할 수 있다. 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.
역변환부(530)는 역양자화된 변환계수들을 주파수 도메인으로부터 공간 도메인으로 역변환하여 잔차신호들을 복원함으로써 현재블록에 대한 잔차블록을 생성한다.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.
또한, 역변환부(530)는 변환블록의 일부 영역(서브블록)만 역변환하는 경우, 변환블록의 서브블록만을 변환하였음을 지시하는 플래그(cu_sbt_flag), 서브블록의 방향성(vertical/horizontal) 정보(cu_sbt_horizontal_flag) 및/또는 서브블록의 위치 정보(cu_sbt_pos_flag)를 추출하여, 해당 서브블록의 변환계수들을 주파수 도메인으로부터 공간 도메인으로 역변환함으로써 잔차신호들을 복원하고, 역변환되지 않은 영역에 대해서는 잔차신호들로 “0”값을 채움으로써 현재블록에 대한 최종 잔차블록을 생성한다.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.
또한, MTS가 적용된 경우, 역변환부(530)는 영상 부호화 장치로부터 시그널링된 MTS 정보(mts_idx)를 이용하여 가로 및 세로 방향으로 각각 적용할 변환 함수 또는 변환 행렬을 결정하고, 결정된 변환 함수를 이용하여 가로 및 세로 방향으로 변환블록 내의 변환계수들에 대해 역변환을 수행한다.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.
예측부(540)는 인트라 예측부(542) 및 인터 예측부(544)를 포함할 수 있다. 인트라 예측부(542)는 현재블록의 예측 타입이 인트라 예측일 때 활성화되고, 인터 예측부(544)는 현재블록의 예측 타입이 인터 예측일 때 활성화된다.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.
인트라 예측부(542)는 엔트로피 복호화부(510)로부터 추출된 인트라 예측모드에 대한 신택스 요소로부터 복수의 인트라 예측모드 중 현재블록의 인트라 예측모드를 결정하고, 인트라 예측모드에 따라 현재블록 주변의 참조 픽셀들을 이용하여 현재블록을 예측한다.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.
인터 예측부(544)는 엔트로피 복호화부(510)로부터 추출된 인터 예측모드에 대한 신택스 요소를 이용하여 현재블록의 움직임벡터와 그 움직임벡터가 참조하는 참조픽처를 결정하고, 움직임벡터와 참조픽처를 이용하여 현재블록을 예측한다.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.
가산기(550)는 역변환부(530)로부터 출력되는 잔차블록과 인터 예측부(544) 또는 인트라 예측부(542)로부터 출력되는 예측블록을 가산하여 현재블록을 복원한다. 복원된 현재블록 내의 픽셀들은 이후에 복호화할 블록을 인트라 예측할 때의 참조픽셀들로서 활용된다.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.
루프 필터부(560)는 인루프 필터로서 디블록킹 필터(562), SAO 필터(564) 및 ALF(566)를 포함할 수 있다. 디블록킹 필터(562)는 블록 단위의 복호화로 인해 발생하는 블록킹 현상(blocking artifact)을 제거하기 위해, 복원된 블록 간의 경계를 디블록킹 필터링한다. SAO 필터(564) 및 ALF(566)는 손실 부호화(lossy coding)로 인해 발생하는 복원된 픽셀들과 원본 픽셀들 간의 차이를 보상하기 위해, 디블록킹 필터링 이후의 복원된 블록에 대해 추가적인 필터링을 수행한다. ALF의 필터 계수는 비스트림으로부터 복호한 필터 계수에 대한 정보를 이용하여 결정된다. 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.
디블록킹 필터(562), SAO 필터(564) 및 ALF(566)를 통해 필터링된 복원블록은 메모리(570)에 저장된다. 한 픽처 내의 모든 블록들이 복원되면, 복원된 픽처는 이후에 부호화하고자 하는 픽처 내의 블록을 인터 예측하기 위한 참조픽처로 사용된다.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.
본 실시예는 이상에서 설명한 바와 같은 영상(비디오)의 부호화 및 복호화에 관한 것이다. 보다 자세하게는, 기하학적 분할 모드에 따라 현재블록을 예측하는 경우, 분할 경계 주변 잔차샘플들에 변환 및 역변환을 효율적으로 수행하는 비디오 코딩방법 및 장치를 제공한다. The present embodiment relates to encoding and decoding of images (videos) as described above. More specifically, the present invention provides a video coding method and device that efficiently performs transformation and inverse transformation on residual samples around a segmentation boundary when predicting a current block according to a geometric segmentation mode.
이하의 실시예들은 영상 부호화 장치(video encoding apparatus) 내 예측부(120), 변환부(140) 및 역변환부(165)에 의해 수행될 수 있다. 또한, 이하의 실시예들은 영상 복호화 장치(video decoding apparatus) 내 예측부(540) 및 역변환부(530)에 의해 수행될 수 있다. 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.
영상 부호화 장치는, 현재블록의 부호화에 있어서, 율왜곡 최적화 측면에서 본 실시예와 관련된 시그널링 정보를 생성할 수 있다. 영상 부호화 장치는 엔트로피 부호화부(155)를 이용하여 시그널링 정보를 부호화한 후, 영상 복호화 장치에게 전송할 수 있다. 영상 복호화 장치는 엔트로피 복호화부(510)를 이용하여 비트스트림으로부터 현재블록의 복호화와 관련된 시그널링 정보를 복호화할 수 있다. 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).
이하의 설명에서, '대상 블록'이라는 용어는 현재블록 또는 코딩유닛(CU, Coding Unit)과 동일한 의미로 사용될 수 있다. 또는, '대상 블록'은 코딩유닛의 일부 영역을 의미할 수도 있다.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.
또한, 하나의 플래그의 값이 참이라는 것은 플래그가 1로 설정되는 경우를 나타낸다. 또한, 하나의 플래그의 값이 거짓이라는 것은 플래그가 0으로 설정되는 경우를 나타낸다.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.
디코더 측(decoder-side)은 도 1에 예시된 영상 부호화 장치에서 역양자화부(160), 역변환부(165), 예측부(120), 가산기(170), 루프 필터부(180), 및 메모리(190)의 전부 또는 일부를 포함한다. 또는, 디코더 측은 도 5에 예시된 영상 복호화 장치에서, 역양자화부(520), 역변환부(530), 예측부(540), 가산기(550), 루프 필터부(560), 및 메모리(570)의 전부 또는 일부를 포함한다. 일련의 복호화 과정과 관련하여 영상 부호화 장치의 디코더 측과 영상 복호화 장치의 디코더 측은 동일한 동작을 수행한다. 영상 부호화 장치는 디코더 측의 동작과 관련된 정보를 결정하고, 결정된 정보를 영상 복호화 장치에게 시그널링한다. 영상 복호화 장치는 시그널링된 정보를 복호화하고, 복호화된 정보에 기초하여 디코더 측을 동작시킬 수 있다.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.
I-1. 기학학적 분할 모드(Geometric Partitioning Mode, GPM)I-1. Geometric Partitioning Mode (GPM)
VVC의 GPM은, 비트스트림으로부터 추출된 정보에 기초하여, 기정의된 64 개의 기하학적 분할 모드들 중에서 현재블록을 두 서브 영역으로 분할하기 위한 분할 모드, 및 각 영역에 대한 움직임 정보를 획득한다. GPM은 움직임 정보에 따라 두 서브 영역의 움직임 보상을 수행하고, 분할 모드에 따른 블렌딩 매트릭스(즉, 가중치 매트릭스)를 이용하여 두 서브 영역의 예측자들을 가중합함으로써, 현재블록의 최종 예측블록을 생성한다. 차세대 VVC에 해당하는 ECM(Enhanced Compression Model)에서는, 두 서브 영역 중 하나 이상의 영역에서 인트라 예측에 따라 예측블록을 생성하는 기술, IBC(Intra Block Copy)에 따라 예측블록을 생성하는 기술, IntraTMP에 따라 예측블록을 생성하는 기술, 아핀(affine) 예측에 따라 예측블록을 생성하는 기술 등이 GPM 모드에 추가된다. The GPM of VVC obtains a partitioning mode for partitioning the current block into two sub-regions from among 64 predefined geometric partitioning modes based on information extracted from the bitstream, and motion information for each region. The GPM performs motion compensation of the two sub-regions according to the motion information, and weights the predictors of the two sub-regions using a blending matrix (i.e., a weight matrix) according to the partitioning mode to generate a final prediction block of the current block. In the ECM (Enhanced Compression Model), which corresponds to the next-generation VVC, a technology for generating a prediction block according to intra prediction in one or more of the two sub-regions, a technology for generating a prediction block according to IBC (Intra Block Copy), a technology for generating a prediction block according to IntraTMP, and a technology for generating a prediction block according to affine prediction are added to the GPM mode.
이때, 두 서브 영역이 모두 인트라 예측에 따라 예측블록을 생성하는 기술을 SGPM(Spatial GPM)로 명칭한다. 두 서브 영역을 각각 서브 영역 0, 서브 영역 1이라고 할 때, 비트스트림으로부터 서브 영역 0에 인트라 예측이 적용되는지 여부가 추출된다. 서브 영역 0에 인트라 예측이 적용되지 않는 경우, 서브 영역 1에 인트라 예측이 적용되는지 여부가 추출된다. 이때, 서브 영역 0에 인트라 예측이 적용되는 경우, 서브 영역 1에서는 움직임 보상에 따라 예측블록이 생성될 수 있다. At this time, the technology in which both sub-regions generate prediction blocks according to intra prediction is called SGPM (Spatial GPM). When the two sub-regions are referred to as sub-region 0 and sub-region 1, respectively, whether intra prediction is applied to sub-region 0 is extracted from the bitstream. If intra prediction is not applied to sub-region 0, whether intra prediction is applied to sub-region 1 is extracted. At this time, if intra prediction is applied to sub-region 0, a prediction block can be generated in sub-region 1 according to motion compensation.
ECM에서, GPM 모드는 각 서브 영역에 MMVD (Merge with Motion Vector Difference)를 수행할 수 있고, TM (Template Matching) 기반 움직임 정보 보정을 수행할 수 있다. 하나의 CU와 관련하여, GPM-MMVD과 GPM-TM은 하나만 적용될 수 있다. GPM-MMVD은 각 서브 영역에 독립적으로 적용될 수 있다. In ECM, the GPM mode can perform MMVD (Merge with Motion Vector Difference) on each sub-region and perform motion information compensation based on Template Matching (TM). For a single CU, only one GPM-MMVD and one GPM-TM can be applied. GPM-MMVD can be applied independently to each sub-region.
ECM에서, GPM 모드는 가중합 영역과 관련된 정보를 인덱스로 시그널링/파싱하고, 인덱스를 가중합 매트릭스를 구하는 과정에서 사용함으로써, 가중합 영역을 가변적으로 고려할 수 있다. In ECM, GPM mode can variably consider the weighted sum area by signaling/parsing information related to the weighted sum area as an index and using the index in the process of obtaining the weighted sum matrix.
ECM에서, BI-GPM 모드는, 인터 예측 시 각 서브 영역에서 양방향 예측에 따라 예측블록을 생성할 수 있다. 즉, Bi-GPM 기술은 GPM 기술에 따라 현재블록의 예측블록을 생성 시, 양방향 예측에 따라 각 서브 영역의 예측블록을 생성할 수 있다. Bi-GPM 기술은 8×8, 8×16, 및 16×8 크기의 블록를 제외한 모든 GPM 예측된 블록에 적용 가능하다. 전술한 작은 크기를 갖는 블록과 관련하여, Bi-GPM 기술은 일반 머지 리스트로부터 리스트 후보가 단방향 움직임 정보를 갖도록 GPM 머지 리스트를 생성한다. 반면, 전술한 작은 크기와 다른 크기를 갖는 블록과 관련하여, Bi-GPM 기술은 일반 머지 리스트를 생성하고 비트스트림으로부터 추출한 머지 인덱스 정보에 따라 각 서브 영역의 예측블록을 생성한다. 또한, Bi-GPM 기술과 관련하여, 양방향 GPM-MMVD 및 양방향 GPM-TM이 지원되고, 서브 영역들에 BDOF(Bi-directional Optical Flow) 기반 움직임벡터 개선 기술이 적용될 수 있다.In ECM, BI-GPM mode can generate a prediction block in each sub-region based on bidirectional prediction during inter prediction. That is, the Bi-GPM technology can generate a prediction block in each sub-region based on bidirectional prediction when generating a prediction block of the current block based on the GPM technology. The Bi-GPM technology is applicable to all GPM-predicted blocks except for blocks of 8×8, 8×16, and 16×8 sizes. With respect to the aforementioned small-sized blocks, the Bi-GPM technology generates a GPM merge list from the general merge list such that the list candidates have unidirectional motion information. On the other hand, with respect to the aforementioned small-sized blocks and blocks of different sizes, the Bi-GPM technology generates a general merge list and generates a prediction block in each sub-region based on merge index information extracted from the bitstream. In addition, with respect to the Bi-GPM technology, bidirectional GPM-MMVD and bidirectional GPM-TM are supported, and a BDOF (Bi-directional Optical Flow)-based motion vector enhancement technology can be applied to the sub-regions.
암시적(implicit) GPM 기술은 기하학적 분할 경계에 대한 정보를 시그널링/파싱하지 않는다. 암시적(implicit) GPM 기술은, 두 서브 영역의 예측블록, 두 예측블록의 템플릿, 현재블록의 템플릿 간의 관계에 회귀(regression) 분석을 적용하여 각 위치 별 가중치를 유도하고, 유도된 가중치들을 이용하여 최종 예측블록을 생성한다. 이때, 각 서브 영역의 예측 시, 아핀 예측은 사용될 수 없다. 또한, 서브영역들의 머지 인덱스들은 하나의 조합으로 관리되므로, 즉, 조합을 지시하는 하나의 인덱스만이 시그널링된다. 두 서브 영역이 모두 인터 예측되는 경우, 각 서브영역의 움직임벡터에 대해 TM (Template Matching) 기반 움직임 정보 보정이 수행될 수 있다. 보정을 위한 정보는 비트스트림으로부터 추출될 수 있다. 또한, 서브 영역들 중, 적어도 하나의 영역에서 인트라 예측이 사용될 수 있다. 인트라 예측의 사용 여부와 관련된 정보는 비트스트림으로부터 추출될 수 있다. 해당 정보가 참인 경우, 서브 영역들의 예측모드 후보 리스트 조합에 인트라 예측이 포함될 수 있다.Implicit GPM technology does not signal or parse information about geometric segmentation boundaries. Implicit GPM technology derives weights for each location by applying regression analysis to the relationship between the predicted blocks of two sub-regions, the templates of the two predicted blocks, and the template of the current block. The derived weights are then used to generate the final predicted block. Affine prediction cannot be used when predicting each sub-region. Furthermore, the merge indices of the sub-regions are managed as a single combination, meaning that only one index indicating the combination is signaled. If both sub-regions are inter-predicted, TM (Template Matching)-based motion information compensation can be performed on the motion vectors of each sub-region. This compensation information can be extracted from the bitstream. Furthermore, intra prediction can be used in at least one of the sub-regions. Information regarding the use of intra prediction can be extracted from the bitstream. If this information is true, intra prediction can be included in the prediction mode candidate list combination of the sub-regions.
I-2. 변환 기술 - 1차 변환 기술I-2. Conversion Technology - Primary Conversion Technology
전술한 바와 같이, 효율적인 비디오 압축을 위하여, 다양한 예측기술에 따라 예측하고 남은 잔차신호들(residual signals)에 양자화 또는 스케일링(scaling)이 추가로 적용될 수 있다. 이때, 잔차신호들에 내재된 인지적 시각 정보의 중요성을 기반으로 변환(transform) 기법을 적용하여 주파수 성분에 따라 잔차신호들을 한 쪽으로 모이게 한 후, 스케일링이 진행될 수 있다. 하지만, 스크린 콘텐츠(screen contents)와 같이 자연 신호가 아닌 경우, 이러한 주파수 기반의 변환 기법이 비효율적일 수 있다. 이러한 경우, 변환 기법을 생략하고, 스케일링만이 진행되거나 스케일링을 적용하지 않은 채로 부호화/복호화가 수행될 수 있다.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.
HEVC에서 변환이 적용되는 경우, 잔차신호들을 변환하기 위한 변환 커널(transform kernel, 이하, 변환 타입(transform type)과 호환하여 사용)로서 DCT-II가 사용된다. 그러나, 잔차신호 특성의 다양성에 따라 보다 적절한 변환 기법을 적용하기 위하여, 다중변환선택(Multiple Transform Selection, MTS)이 사용될 수 있다. MTS는 다중의 변환 타입들 중 하나 또는 둘의 최적의 타입을 결정한 후, 결정된 변환 타입에 따라 블록을 변환한다. 예컨대, VVC에서는 표 1과 같이, DCT-II 외에 두 개의 다른 변환 타입인 DCT-VIII 및 DST-VII이 추가되어, 잔차신호들이 다양하게 변환될 수 있도록 한다. 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.
여기서, 베이시스 함수들은 각 변환 타입을 정의하는 변환 행렬을 구성한다. 이하, DCT-II, DCT-VIII 및 DST-VII는 각각 DCT2, DCT8 및 DST7과 호환적으로 사용된다. 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.
한편, MTS의 사용 여부를 결정하는 플래그는 블록 단위에서 제어가 가능하다. 또한, 상위 SPS 레벨에서의 활성화 플래그를 이용하여 MTS의 사용 여부가 제어될 수도 있다. 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.
SPS에서 MTS를 활성화하는 경우, MTS 적용 여부를 나타내는 CU 레벨 플래그가 표시될 수 있다. 여기서, MTS는 루마 성분에 대해 적용될 수 있다. 변환블록(Transform Block, TB)의 너비와 높이 모두 32 픽셀보다 작거나 같고, 변환 계수 레벨들 중 0이 아닌 값이 있는지를 표시하는 CBF(Coded Block Flag)가 참인 경우, CU 레벨 플래그가 표현될 수 있다. 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.
CU 레벨 플래그가 0인 경우, 가로 및 세로 양방향의 커널들로서 DCT2가 이용된다. 반면, CU 레벨 플래그가 0이 아닌 경우, MTS가 적용된다. MTS는 명시적(explicit) MTS 및 암시적(implicit) MTS의 두 가지 방식이 이용될 수 있다. 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.
명시적 MTS에서는 TB에 사용하는 커널이 명시적으로 전송된다. 일반적으로 변환 커널의 인덱스가 전송될 수 있다. 예컨대, 표 2와 같이 커널의 인덱스인 mts_idx가 정의될 수 있다.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.
여기서, trTypeHor 및 trTypeVer는 수평 방향의 변환 타입 및 수직 방향의 변환 타입을 나타낸다. 또한, 0는 DCT2, 1은 DST7, 및 2는 DCT8을 나타낸다. Here, trTypeHor and trTypeVer represent the horizontal and vertical transformation types, respectively. Additionally, 0 represents DCT2, 1 represents DST7, and 2 represents DCT8.
한편, 암시적 MTS에서는, 예컨대 인트라 블록인 경우 MTS를 명시적으로 시그널링하지 않더라도 암시적으로 변환 타입이 결정될 수 있다. VVC에서는, 수학식 1과 같이, 수평 및 수직 방향의 변환 타입이 암시적으로 결정될 수 있다. 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.
여기서, nTbW와 nTbH는 각각 변환블록의 가로와 세로의 길이를 나타낸다. Here, nTbW and nTbH represent the horizontal and vertical lengths of the transformation block, respectively.
한편, 차세대 기술인 ECM(Enhanced Compression Model) 소프트웨어에서는, MTS 커널의 개수와 종류를 증가시켜, DST7, DCT8, DCT5, DST4, DST1 및 항등 변환(identity transform)이 추가된다.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.
I-3. LFNST(Low-frequency Non-separable Transform)I-3. Low-frequency Non-separable Transform (LFNST)
LFNST 기술은, 인트라 예측 시, 변환 단위(Transform Unit, TU)의 1차 변환(primary transform)에 따라 생성된 변환계수들 중 저주파수(low-frequency) 영역에 2차 변환(secondary transform)을 적용한다. 부호화 측면에서, LFNST 기술은 W×H 개의 1차 변환 계수들 중 L 개의 저주파수 1차 변환계수들에 2차 변환을 적용하여 K(여기서, K≤L) 개의 2차 변환 계수를 생성한다. 여기서, LFNST의 변환 커널의 크기는 L×K이다. 즉, LFNST 기술은 W×H 개의 1차 변환 계수들 중 L 개의 저주파수 1차 변환계수들을 1×L 벡터로 표현한 후, L×K 변환 커널을 적용하여 1×K 벡터를 생성한다. 이후, LFNST 기술은 양자화와 같은 이후 과정을 위해, 1×K 벡터를 저주파수 영역의 2차원 배열로 표현한다.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.
수평, 수직 방향으로 별도의(separate) 변환 커널들을 적용하는 1차 변환과 비교하여, LFNST 기술은 1차원 벡터를 변환하는 분리 불가능한 변환(Non-separable transform)을 수행한다. 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.
한편, 변환 커널의 종류는 현재 TU의 인트라 예측모드, TU의 크기, 및 LFNST 인덱스(lfnst_idx)에 따라 결정될 수 있다. 예컨대, VVC에서, 현재 TU의 인트라 예측모드(IntraPredMode)에 따라 표 3과 같이 변환 커널 셋이 결정될 수 있다.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.
여기서, 인트라 예측모드(IntraPredMode)는 도 3b의 예시에 따른다. 또한, lfnstTrSetIdx는 커널 셋를 지시하는 인덱스이다. 표 3에서 IntraPredMode가 81, 82, 83인 경우는, CCLM(Cross-component Linear Model) 예측모드들을 나타낸다. 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.
각 커널 셋(lfnstTrSetIdx)에 대해 2 종류의 커널이 정의된다. 2 종류의 커널들 중 어느 커널을 선택할지는 LFNST 인덱스에 의해 지시될 수 있다. LFNST 인덱스가 0인 경우, LFNST가 수행되지 않음을 의미하고, LFNST 인덱스가 1 또는 2인 경우, 동일 커널 셋 내의 상이한 LFNST 커널이 적용된다. TU의 크기에 따라 커널 셋이 하나 더 존재하므로, 모두 4×2×2 = 16 개의 변환 커널이 존재한다. LFNST의 커널의 크기는 16×16 및 16×48로 정의된다. 또한, TU의 크기에 따라 표 4와 같이 커널의 크기가 조정될 수 있다.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.
ECM에서는, 블록의 형태 및 인트라 예측모드에 따라 변환 커널 셋이 정의될 수 있다. 예컨대, 정사각형 블록의 대칭 특성을 활용하여, 정사각형 블록에 대해 인트라 예측모드에 따라 35 개의 변환 커널 셋이 정의된다. 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.
한편, VVC에서 현재 TU에 MIP(Matrix-weighted Intra Prediction) 예측이 수행되는 경우, 영상 복호화 장치는 현재 TU의 인트라 예측모드를 Planar 모드로 매핑한 후, 매핑된 예측모드에 따라 변환 커널을 결정한다. MIP 기술은 MIP 경계 다운샘플링, Matrix-Vector 곱 및 MIP 예측 업샘플링 과정을 포함한다. 'MIP 경계 다운샘플링'은 현재블록의 경계 화소들 중 특정 개수의 화소들을 다운샘플링하는 과정을 나타낸다. 'Matrix-Vector 곱'은 다운샘플링된 화소들(즉, 벡터')과 기설정된 행렬을 곱하여 축소된 예측블록을 생성하는 과정을 나타낸다. 'MIP 예측 업샘플링'은 축소된 예측블록을 업샘플링하여 최종 예측블록을 생성하는 과정을 나타낸다. 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.
또한, 차세대 기술인 ECM(Enhanced Compression Model)에서 MIP 예측이 수행되는 경우, 영상 복호화 장치는, MIP 예측된 블록, 즉 'Matrix-Vector 곱'의 출력에 DIMD(Decoder-side Intra Mode Derivation)를 적용하여 방향성 예측모드를 획득한다. 영상 복호화 장치는 현재 TU의 인트라 예측모드를 획득된 방향성 예측모드로 매핑한 후, 매핑된 예측모드에 따라 변환 커널을 결정한다. DIMD 기술은, 현재블록의 인접 샘플들에 대해 각 샘플의 그래디언트를 산정한 후, 산정된 그래디언트들로부터 HoG(Histogram of Gradient)를 생성하고, 생성된 HoG에 따라 현재블록의 인트라 예측을 위한 예측모드를 유도한다. 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.
한편, VVC에서 인트라 예측된 TU에 1차 변환으로 DCT2/DCT2 변환 커널이 적용된 경우, LFNST 기술이 2차 변환으로 적용될 수 있다. 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.
ECM에서 인트라 예측에 따라 부호화된 TU들 중 블록 크기가 작은 경우(예컨대, 4×4, 4×8, 8×4, 4×16, 16×4, 8×8, 8×16, 16×8)에, 분리 불가능한 1차 변환 기술이 적용될 수 있다. 또한, 블록의 크기가 크고, DCT2/DCT2 변환 커널이 1차 변환으로 블록에 적용된 경우에 LFNST 기술이 적용될 수 있다.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.
I-4I-4 분리 불가능한 1차 변환(NSPT, Non-separable Primary Transform)Non-separable Primary Transform (NSPT)
분리 불가능한 1차 변환 기술은, 인트라 예측모드로 예측된 블록의 잔차신호들에 수직과 수평 방향의 변환을 수행하는 대신, 사전에 학습된 변환 커널을 이용하여 분리 불가능한 일차 변환을 수행한다. 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.
NSPT 기술은, 잔차블록의 크기에 따라 상이한 크기의 분리 불가능한 1차 변환 커널을 사용한다. 예를 들어, 변환블록의 크기가 4×4인 경우 16×16 커널이 적용되어 4×4 크기의 변환계수들이 생성된다. 다른 예로서, 변환블록의 크기가 4×8인 경우 32×20 커널이 적용되어 20 개의 변환계수들 생성된다. 생성된 변환계수들은 약속된 스캐닝 순서에 따라 변환블록에 배치된다. 변환 후 생성되는 변환계수들의 개수가 변환블록의 픽셀 수보다 적은 경우, 변환계수들 배치되지 않는 나머지 영역은 0으로 채워진다.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.
분리 불가능한 1차 변환을 위해, 블록의 형태, 인트라 예측모드 및 NSPT 인덱스(nspt_idx)에 따라 변환 커널들이 정의될 수 있다. 예컨대, 정사각형 블록의 대칭 특성을 활용하여, 정사각형 블록에 대해 인트라 예측모드에 따라 35 개의 변환 커널 셋이 존재한다. 이때, 변환 커널 셋 내의 후보 커널들 중 하나를 지시하기 위해 NSPT 인덱스(즉, LFNST 인덱스)가 사용될 수 있다. 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.
분리 불가능한 1차 변환은 루마 성분에 적용될 수 있다. 또한, 분리 불가능한 1차 변환이 적용되는 경우 2차 변환, 즉, LFNST는 수행되지 않을 수 있다.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.
이하의 실시예들은, 영상 복호화 장치를 중심으로 기술되나, 영상 부호화 장치에도 동일하거나 유사하게 구현될 수 있다. 또는, 이하의 실시예들은, 영상 복호화 장치의 디코더 측을 중심으로 기술되나, 영상 부호화 장치의 디코더 측에서도 동일하거나 유사하게 구현될 수 있다.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.
II. 본 개시에 따른 실시예들II. Embodiments according to the present disclosure
도 6는 본 개시의 일 실시예에 따른, 영상 복호화 장치의 일부를 자세히 나타내는 블록도이다.FIG. 6 is a block diagram illustrating in detail a portion of an image decoding device according to one embodiment of the present disclosure.
본 실시예에 따른 영상 복호화 장치는 예측 및 변환 단위를 결정하고, 결정된 단위에 해당하는 현재블록에 대해, 결정된 예측기술 및 예측모드를 이용하여 예측과 역변환을 수행함으로써, 최종적으로 현재블록의 복원블록을 생성할 수 있다. 도 6에 예시된 바는 영상 복호화 장치의 역변환부(530), 예측부(540) 및 가산기(550)에 의해 수행될 수 있다. 한편, 도 6에 예시된 바와 동일한 동작들이 영상 부호화 장치의 역변환부(165), 픽처 분할부(110), 예측부(120), 및 가산기(170)에 의해 수행될 수 있다. 이때, 영상 복호화 장치는 비트스트림으로부터 파싱된 부호화 정보를 이용하나, 영상 부호화 장치는, 율왜곡 최소화 측면에서 상위 레벨로부터 설정된 부호화 정보를 이용할 수 있다. 이하, 편의상 영상 복호화 장치를 중심으로 본 실시예를 기술한다.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. 6 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. 6 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.
도 5의 예시와 같이 예측부(540)는, 예측기술에 따라 인트라 예측부(542) 및 인터 예측부(544)를 포함하나, 도 6에 예시된 바와 같이, 예측부(540)는 예측단위 결정부(602), 예측기술 결정부(604), 예측모드 결정부(606) 및 예측 수행부(608)의 전부 또는 일부를 포함할 수 있다. 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. 6, 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).
예측단위 결정부(602)는 예측 단위(PU, Prediction Unit)를 결정한다. 예측기술 결정부(604)는 예측 단위에 대해 예측기술(예를 들어, 인트라 예측, 인터 예측, 또는 IBC(Intra Block Copy) 모드, 팔레트 모드, 인트라와 인터 예측이 혼합된 기술 등)을 결정한다. 예측모드 결정부(606)는 예측기술에 대해 세부적인 예측모드를 결정한다. 예측 수행부(608)는 결정된 예측모드에 따라 현재블록의 예측블록을 생성한다. 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.
역변환부(530)는 역변환단위 결정부(610), 역변환커널 결정부(612) 및 역변환 수행부(614)의 전부 또는 일부를 포함한다. 역변환단위 결정부(610)는 현재블록의 역양자화 신호들(즉, 역양자화 변환계수들)에 대해 변환 단위를 결정한다. 역변환커널 결정부(612)는 역변환 커널을 결정하고, 역변환 수행부(614)는 역양자화 변환계수들로 표현된 변환 단위를 역변환함으로써, 잔차샘플들을 생성한다. 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. The inverse transform kernel determination unit (612) determines an inverse transform kernel, and the inverse transform execution unit (614) inversely transforms the transformation unit expressed by the inverse quantization transform coefficients, thereby generating residual samples.
이하, 부호화 측면의 변환 단위(Transform Unit, TU)는 변환블록과 호환적으로 사용될 수 있다. 복호화 측면의 역변환 단위, 역변환 블록은 각각 TU, 변환블록에 대응된다. 따라서, 역변환 단위, 역변환 블록은 TU, 변환블록과 호환적으로 사용될 수 있다. 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.
변환 단위는 변환계수들과 관련하여 역변환의 수행 여부를 판단하고 역변환에 대한 정보가 전송되는 단위를 나타낸다. 영상 복호화 장치는 변환 단위로 적용될 커널이 결정하고, 결정된 커널을 기반으로 변환계수들의 역변환을 수행한다. 커널은 하나의 변환 단위에 대해 적어도 하나가 결정될 수 있다. 실시예에 따라, N 차수의 역변환이 적용될 수 있는데, 각 차수에서 변환 단위와 역변환 커널의 크기는 동일하지 않을 수 있다. 예컨대, 현재 변환 단위 블록(이하, 변환블록 또는 현재 변환블록)에 대해, N차의 역변환이 적용되는 경우, 각 차수의 역변환에 사용되는 커널의 크기는 동일하지 않을 수 있다. 즉, 영상 복호화 장치는 입력된 변환계수들 중 일부에 역변환을 적용할 수 있다.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.
가산기(550)는 예측블록과 잔차샘플들을 가산하여 복원블록을 생성한다. 복원블록은 메모리에 저장된 채로, 이후 다른 블록의 예측에 이용될 수 있다.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.
입력 비디오의 컬러 포맷이 YUV 포맷(YUV420, YUV411, YUV422, YUV444 등)인 경우, 영상 복호화 장치는 루마 성분의 예측 및 복원 수행 후, 크로마 성분의 예측 및 복원을 수행할 수 있다. 즉, 루마 성분과 크로마 성분은 도 6에 예시된 구성요소들에 의해 순차적으로 복원될 수 있다. 한편, 입력 비디오의 컬러 포맷이 RGB인 경우, 영상 부호화 장치는 RGB로부터 YUV로 컬러 포맷 변환을 수행한 후, 변환된 비디오를 부호화할 수 있다. 여기서, YUV 포맷인 경우, 컬러 포맷은 루마 성분의 픽셀들과 크로마 성분의 픽셀들 간의 대응 관계를 나타낸다.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. 6. 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.
예측단위 결정부(602)는 예측 대상 블록의 크기 및 모양을 결정하되, 영상 부호화 장치로부터 전송된 직접 또는 간접적인 정보를 모두 이용할 수 있다. 예측단위 결정부(602)는 현재블록의 크기와 모양과 관련된 직접적인 정보를 이용하고, 분할의 횟수, 깊이, 분할의 모양, 분할의 방향, 최소 분할블록과 관련된 크기 정보, 기복호화된 주변 블록의 분할 정보/예측모드 등과 같이 현재블록의 크기와 모양의 결정에 영향을 줄 수 있는 정보를 활용할 수 있다. 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.
예측단위 결정부(602)에서 결정된 예측 단위는 현재블록, 현재블록이 분할된 서브블록들 중 하나의 서브블록, 픽셀들의 집합, 또는 하나의 픽셀이 될 수 있다. 예측 단위는 크로마 성분과 루마 성분의 예측을 수행하기 위한 크기 정보와 모양 정보를 포함할 수 있다. 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.
예측 단위는, 크로마 성분과 루마 성분에 대해 종속적 또는 독립적으로 결정될 수 있다. 종속적 결정은 루마 성분 또는 크로마 성분들의 예측 단위가 각 성분별로 결정되는 것이 아니라, 하나의 성분의 예측 단위가 결정되면 다른 성분 또는 성분들의 단위가 대응하는 크기와 형태로 결정되는 것을 의미한다. 이때, 하나의 성분은 루마 성분과 크로마 성분 중 하나 이상의 성분에 해당할 수 있다. 즉, 크로마 성분들의 정보에 기초하여 루마 성분이 결정될 수도 있다. 일 예로서, 크로마 성분의 예측 단위는, 컬러 포맷에 따라 루마 성분의 예측 단위에 대응하는 크기일 수 있다. 종속적으로 결정되는 경우, 하나의 성분에 대응하는 다른 성분, 즉 종속되어 결정된 성분의 예측 단위에 대한 정보는 생략될 수 있다. 독립적인 결정은 루마 성분과 크로마 성분의 예측 단위가 별도로 결정되는 것을 의미한다. 독립적으로 결정되는 경우, 성분별 예측 단위에 대한 정보가 별도로 시그널링될 수 있다.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.
예측기술 결정부(604)는 예측 단위에 대해 예측기술을 결정한다. 전술한 바와 같이, 예측기술은 인터 예측, 인트라 예측, IBC 모드, 팔레트 모드, 인트라와 인터 예측이 혼합된 기술 중의 하나일 수 있다. 이때, 크로마 성분의 예측기술은 별도 정보의 시그널링 및 파싱 없이, 대응 루마 성분의 예측기술과 동일하게 결정될 수 있다. 실시예에 따라, 인트라와 인터 예측이 혼합된 기술은 인터 예측에 포함될 수 있다. 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.
일 예로서, 현재블록의 예측기술이 인트라 예측이 아닌 경우, 영상 복호화 장치는 1-비트 플래그 정보를 파싱한다. 예컨대, 파싱된 플래그가 스킵(Skip) 모드를 지시하는 경우, 영상 복호화 장치는 현재블록의 예측모드를 인터 예측의 머지(merge) 모드 또는 IBC 머지 모드로 결정한다. 스킵(Skip) 모드인 경우, 영상 복호화 장치는 역변환 과정을 생략한 채로(즉, 잔차신호들을 파싱하지 않은 채로) 예측신호들을 복원 신호들로 사용할 수 있다.For example, if the prediction technique of the current block is not intra prediction, the video decoding device parses 1-bit flag information. For example, if the parsed flag indicates Skip mode, the video decoding device determines the prediction mode of the current block as the merge mode of inter prediction or the IBC merge mode. In the case of Skip mode, the video decoding device can use the prediction signals as restored signals without performing the inverse transformation process (i.e., without parsing the residual signals).
반면, 파싱된 플래그가 현재블록에 대해 스킵(Skip) 모드를 지시하지 않는 경우, 예측기술 결정부(604)는 일련의 1 비트 플래그들을 파싱하여 현재블록의 예측기술을 인터 예측, 인트라 예측, IBC 모드, 팔레트 모드 등과 같은 기술들 중 하나로 결정할 수 있다.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.
예컨대, 현재블록에 스킵(Skip)이 적용되지 않고, 인터 예측 또는 IBC 모드로 예측기술이 결정된 경우, 영상 복호화 장치는 1 비트 플래그를 파싱한다. 파싱된 플래그에 따라 현재블록의 예측모드를 일반 머지 모드 또는 AMVP(Advanced Motion Vector Prediction) 모드로 결정할 수 있다. 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.
예측모드 결정부(606)는 예측기술과 관련하여, 현재 예측 단위 블록(이하, 현재블록과 호환적으로 사용) 세부적인 예측모드를 결정한다.The prediction mode determination unit (606) determines a detailed prediction mode of the current prediction unit block (hereinafter, used interchangeably with the current block) in relation to the prediction technology.
일 예로서, 현재블록의 예측기술이 인터 예측인 경우, 예측모드 결정부(606)는 일반 머지 모드 또는 AMVP 모드를 현재블록의 예측모드로 결정할 수 있다. 일반 머지 모드 또는 AMVP 모드에서, 영상 복호화 장치는 파싱된 움직임 정보에 기반하는 하나 이상의 움직임 보상에 따라 예측블록들을 생성하고, 생성된 다수의 예측블록들을 가중합하여 현재블록의 최종 예측신호들을 생성한다. 이때, 예측블록들 중 하나 이상은 현재블록을 포함하는 프레임 내에서 복호화된 영역의 신호를 포함할 수 있다.For example, if the prediction technology of the current block is inter prediction, the prediction mode determining unit (606) may determine the general merge mode or AMVP mode as the prediction mode of the current block. In the general merge mode or AMVP mode, the image decoding device generates prediction blocks according to one or more motion compensations based on parsed motion information, and weights and combines the generated multiple prediction blocks to generate final prediction signals of the current block. At this time, one or more of the prediction blocks may include a signal of a decoded area within a frame including the current block.
다른 예로서, 현재블록의 예측기술이 인터 예측이고, 현재블록의 최종 예측 블록을 위해 인트라 예측된 샘플들을 사용하는 경우, 현재블록의 주변 기복원 영역을 템플릿으로 정의하고, 해당 템플릿을 이용하여 인트라 예측모드가 유도될 수 있다. 이때, 템플릿은 현재블록과 인접하지 않는 영역도 포함할 수 있다. 이후, 유도된 인트라 예측모드를 사용하여 현재블록의 최종 예측블록이 생성될 수 있다.As another example, if the prediction technique for the current block is inter-prediction and intra-predicted samples are used for the final prediction block of the current block, the surrounding reconstructed region of the current block can be defined as a template, and an intra-prediction mode can be derived using this template. The template can also include regions not adjacent to the current block. The final prediction block of the current block can then be generated using the derived intra-prediction mode.
다른 예로서, 현재블록의 예측기술이 인터 예측인 경우, 예측모드 결정부(606)는 기하학적 분할 기반 예측모드(이하, 기하학적 분할 모드(Geometric Partitioning Mode, GPM))를 현재블록의 예측모드로 결정할 수 있다. GPM에서, 영상 복호화 장치는 기하학적 분할에 따라 현재블록을 둘 이상의 서브 영역들로 분할하고, 파싱한 현재블록의 움직임 정보 및 예측모드 정보에 기반하는 하나 이상의 움직임 보상에 따라 예측블록들을 생성하며, 생성된 다수의 예측블록들을 가중합하여 현재블록의 최종 예측신호들을 생성한다. 실시예에 따라, 인터 예측이고, 기하학적 분할 모드가 결정되는 경우, 현재블록 내 서브 블록들 중, 적어도 하나의 블록은 인터 예측에 따라 예측될 수 있다. As another example, if the prediction technology of the current block is inter prediction, the prediction mode determining unit (606) may determine a geometric partitioning-based prediction mode (hereinafter, geometric partitioning mode (GPM)) as the prediction mode of the current block. In GPM, the image decoding device divides the current block into two or more sub-regions according to geometric partitioning, generates prediction blocks according to one or more motion compensations based on the motion information and prediction mode information of the parsed current block, and weights and combines the generated plurality of prediction blocks to generate final prediction signals of the current block. According to an embodiment, if inter prediction is used and the geometric partitioning mode is determined, at least one block among the sub-blocks in the current block may be predicted according to inter prediction.
한편, 현재블록의 예측기술이 인트라 예측인 경우, 현재블록의 예측모드는 하나의 방향성 예측모드. Planar 모드 (Horizontal Planar 또는 Vertical Planar 또는 Regular Planar). DC 모드, EIP (Extrapolation intra prediction) 예측모드, 매트릭스 기반 예측모드 (일 예시로, MIP), 또는 성분간 상관관계에 기반한 예측모드 (이를테면, CCLM (Cross Component Linear Model), CCCM (Convolutional Cross Component Model), GLM (Gradient Linear Model) 등) 등 중 적어도 하나에 기초하여 현재블록의 예측블록을 생성하는 모드일 수 있다. Meanwhile, if the prediction technique of the current block is intra prediction, the prediction mode of the current block may be a mode that generates 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 (for example, CCLM (Cross Component Linear Model), CCCM (Convolutional Cross Component Model), GLM (Gradient Linear Model), etc.).
일 예로서, 현재블록의 예측기술이 인트라 예측인 경우, 현재블록의 예측모드는 매트릭스 기반 인트라 예측모드 (일 예시로, MIP(Matrix-based intra prediction))일 수 있다, MIP 모드는, 영상 부호화 장치와 영상 복호화 장치 간 약속에 따라 기정의된 매트릭스를 기반으로, 매트릭스의 인덱스를 시그널링/파싱 및/또는 유도하거나, 매트릭스를 시그널링/파싱 및/또는 유도하고, 매트릭스를 기반으로 현재블록의 예측블록을 생성할 수 있다. 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.
다른 예로서, 현재블록의 예측기술이 인트라 예측인 경우, 현재블록의 예측모드는 인트라 템플릿 매칭 예측모드 (IntraTMP, Intra template matching prediction)일 수 있다. IntraTMP 모드는, 현재블록 주변 기복원 영역을 템플릿으로 정의하고, 현재블록 기복원된 주변 영역에서 템플릿 매칭을 수행하여 예측블록을 생성할 수 있다. 템플릿은 현재블록과 인접하지 않는 영역도 포함할 수 있다.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.
다른 예로서, 현재블록의 예측기술이 인트라 예측인 경우, 현재블록의 예측모드는 인트라 기하학적 분할 기반 예측모드일 수 있다. 인트라 기하학적 분할 기반 예측모드는, 기하학적 분할에 따라 현재블록을 하나 이상의 서브 영역으로 분할하고, 상이한 방향성 예측모드, Planar 모드, DC 모드 등을 포함하는 인트라 예측모드들을 사용하여 각 영역의 예측블록을 생성하며, 각 예측블록들의 가중하여 현재블록의 예측블록을 생성할 수 있다. 실시예에 따라, 인트라 예측이고, 기하학적 분할 기반 예측모드가 결정되는 경우, 현재블록 내 모든 서브블록은 인트라 예측에 따라 예측될 수 있다. As another example, if the prediction technique of the current block is intra prediction, the prediction mode of the current block may be an intra geometric segmentation-based prediction mode. The intra geometric segmentation-based prediction mode divides the current block into one or more sub-regions according to geometric segmentation, generates a prediction block of each region using intra prediction modes including different directional prediction modes, Planar mode, DC mode, etc., and weights each prediction block to generate a prediction block of the current block. According to an embodiment, if the prediction technique is intra prediction and the geometric segmentation-based prediction mode is determined, all sub-blocks within the current block may be predicted according to intra prediction.
다른 예로서, 현재블록이 크로마 블록이고 현재블록의 예측기술이 인트라 예측인 경우, DM(Direct Mode)에 따라 현재블록이 예측될 수 있다. DM 모드는, 현재 크로마 블록에 대응하는 위치의 루마 블록에 적용된 예측 방법, 또는 영상 부호화 장치와 영상 복호화 장치 간 기정의된 예측 방법에 기초하여 현재 크로마 블록의 예측을 수행할 수 있다. 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.
다른 예로서, 현재 크로마 성분의 주변 기복원 크로마 샘플들과 현재 크로마 블록에 대응하는 위치의 루마 영역의 주변 기복원 루마 샘플들 간의 관계를 선형 및/또는 비선형 모델로 산정하되, 산정된 하나 이상의 모델을 기반으로 현재 크로마 블록의 예측블록이 생성될 수 있다. 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.
다른 예로서, 현재블록의 인트라 예측모드를 유도하는 방법은 다양할 수 있다. 다수의 방법들 중, 하나 이상의 방법이 플래그 및/또는 인덱스의 시그널링/파싱에 따라 사용될 수 있다.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.
한편, 현재블록의 예측기술이 IBC 예측인 경우, 하나 이상의 블록벡터를 이용하여 현재블록을 포함하는 프레임 내의 기복원된 영역에서 예측블록을 획득하고, 예측블록을 기반으로 최종 예측블록이 생성될 수 있다. 영상 부호화 장치는 블록벡터의 정보를 시그널링하고, 영상 복호화 장치는 블록벡터의 정보를 파싱할 수 있다. 예컨대, 영상 복호화 장치는, 영상 부호화 장치와 영상 복호화 장치 간 약속에 따라 정의된 위치 및 탐색 순서에 따라 블록벡터 후보 리스트를 구성하고, 인덱스와 같은 정보를 파싱할 수 있다. 영상 복호화 장치는, 파싱한 정보에 기초하여 획득한 초기 블록벡터 정보를, 템플릿 매칭과 같은 방법을 이용하여 보정함으로써, 최종 블록벡터 정보를 획득할 수 있다.Meanwhile, if the prediction technology of the current block is IBC prediction, a prediction block can be obtained from a previously restored area within a frame including the current block using one or more block vectors, and a final prediction block can be generated based on the prediction block. The video encoding device can signal information of the block vector, and the video decoding device can parse information of the block vector. For example, the video decoding device can construct a block vector candidate list according to a position and search order defined according to an agreement between the video encoding device and the video decoding device, and parse information such as an index. The video decoding device can obtain final block vector information by correcting the initial block vector information obtained based on the parsed information using a method such as template matching.
일 예로서, 현재블록의 예측기술이 IBC 예측인 경우, 현재블록의 예측모드는 IBC 기하학적 분할 기반 예측모드(이하, IBC 기하학적 분할 모드)일 수 있다. IBC 기하학적 분할 모드는, 기하학적 분할에 따라 현재블록을 하나 이상의 서브 영역으로 분할하고, 상이한 블록벡터를 이용하여 각 영역의 예측블록을 생성하며, 예측블록들을 가중합하여 현재블록의 최종 예측블록을 생성할 수 있다. 실시예에 따라, IBC 예측이고 기하학적 분할 모드가 결정되는 경우, 현재블록 내 모든 서브 블록들 중 적어도 하나는 IBC 예측에 따라 예측될 수 있다. For example, if the prediction technique of the current block is IBC prediction, the prediction mode of the current block may be an IBC geometric partitioning-based prediction mode (hereinafter, IBC geometric partitioning mode). The IBC geometric partitioning mode may divide the current block into one or more sub-regions according to the geometric partitioning, generate a prediction block for each region using a different block vector, and weight and combine the prediction blocks to generate a final prediction block of the current block. According to an embodiment, if the current block is IBC prediction and the geometric partitioning mode is determined, at least one of all sub-blocks within the current block may be predicted according to the IBC prediction.
다른 예로서, 현재블록이 크로마 블록이고 현재블록의 예측기술이 IBC 예측이며, 블록벡터 후보 리스트를 구성하거나 블록벡터를 획득하는 과정에서 대응 위치 루마 블록이 기복원된 경우, 대응 위치의 루마 블록의 블록벡터 정보가 이용될 수 있다. 예컨대, 루마 성분과 크로마 성분의 블록 분할 구조가 동일한 경우, 대응 위치 루마 블록의 블록벡터 정보를 컬러 포맷에 따라 스케일링하여 정보를 생성하고, 스케일링된 정보가 현재 크로마 블록의 블록벡터 및/또는 블록벡터 후보로 이용될 수 있다. 반면, 루마 성분과 크로마 성분의 블록 분할 구조가 상이한 경우, 대응 루마 영역 내에서 기정의된 위치 및 순서에 따라 하나 이상의 블록벡터가 획득될 수 있다. 획득된 블록벡터를 컬러 포맷에 따라 스케일링하여 정보를 생성하고, 스케일링된 정보가 현재 크로마 블록의 블록벡터 및/또는 블록벡터 후보로 이용될 수 있다. As another example, if the current block is a chroma block and the prediction technology of the current block is IBC prediction, and the corresponding luma block is restored during the process of constructing a block vector candidate list or obtaining a block vector, the block vector information of the luma block at the corresponding position can be used. For example, if the block division structures of the luma component and the chroma component are the same, the block vector information of the corresponding luma block can be scaled according to a color format to generate information, and the scaled information can be used as the block vector and/or block vector candidate of the current chroma block. On the other hand, if the block division structures of the luma component and the chroma component are different, one or more block vectors can be acquired according to a predefined position and order within the corresponding luma region. The acquired block vector can be scaled according to a color format to generate information, and the scaled information can be used as the block vector and/or block vector candidate of the current chroma block.
한편, 현재블록의 예측기술이 인트라와 인터 예측이 혼합된 기술인 경우, 현재블록의 주변 기복원 영역을 템플릿으로 정의하고 해당 템플릿의 일부 또는 전체 픽셀의 정보를 이용하여 인트라 예측모드가 유도되거나, 템플릿 매칭에 기초하여 인트라 예측블록이 생성될 수 있다. 유도된 인트라 예측모드에 따라 현재블록의 예측블록이 유도되거나, 영상 부호화 장치로부터 시그널링된 블록벡터 정보에 기초하여 예측블록이 생성될 수 있다. 템플릿 매칭 및/또는 블록벡터에 기초하여 생성된 예측블록/인트라 예측블록, 또는 인터 예측블록을 가중합과 같은 방법에 따라 혼합함으로써, 최종 예측블록이 생성될 수 있다. Meanwhile, if the prediction technology of the current block is a mixed technology of intra and inter prediction, the surrounding restoration area of the current block may be defined as a template, and an intra prediction mode may be derived using information of some or all pixels of the template, or an intra prediction block may be generated based on template matching. The prediction block of the current block may be derived according to the derived intra prediction mode, or the prediction block may be generated based on block vector information signaled from a video encoding device. The final prediction block may be generated by mixing the prediction block/intra prediction block, or inter prediction block generated based on template matching and/or block vector, according to a method such as weighted summation.
템플릿은 현재블록에 인접하는 영역 및 인접하지 않는 영역을 모두 포함할 수 있다. 인접하지 않는 영역은, 현재블록과 일정 픽셀 라인의 거리 이내의 영역일 수 있다. 인접하지 않는 영역을 템플릿으로 사용하는 경우, 사용 여부 및/또는 거리 정보는 영상 부호화 장치로부터 영상 복호화 장치에게 전송될 수 있다. 예를 들어, 거리에 대한 정보는 영상 부호화 장치와 영상 복호화 장치 간의 약속에 따라 정의될 수 있고, 해당 정보의 전송이 생략될 수 있다. 약속에 따라 정의된 경우, 해당 값은 특정 상수의 값으로 고정되거나 예측 단위의 가로, 세로 픽셀의 길이, 블록의 넓이, 종횡비 등에 기초하여 가변적으로 결정될 수 있다. 이후, 유도된 인트라 예측모드를 사용하여 현재블록의 최종 예측블록이 생성될 수 있다.A template may include both adjacent and non-adjacent regions to the current block. The non-adjacent region may be an region within a certain distance of pixel lines from the current block. When a non-adjacent region is used as a template, information on whether it is used and/or the distance may be transmitted from the video encoding device to the video decoding device. For example, the distance information may be defined according to an agreement between the video encoding device and the video decoding device, and the transmission of the information may be omitted. If defined according to an agreement, the value may be fixed to a specific constant or may be variably determined based on the horizontal and vertical pixel lengths of the prediction unit, the block width, the aspect ratio, etc. Thereafter, the final prediction block of the current block may be generated using the derived intra prediction mode.
예측 수행부(608)는 결정된 예측기술 및 예측모드에 따라 현재 복호화 블록(이하, 현재블록과 호환적으로 사용)의 최종 예측블록을 생성한다. 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.
일 예로서, 예측 수행부(608)는 전술한 바와 같이 결정된 예측모드에 따라 예측을 수행하여 현재블록의 예측블록을 생성하고, 가산기(550)는 현재블록의 예측블록과 잔차샘플들(즉, 잔차블록)을 가산하여 복원블록을 생성한다. 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.
일 예로서, 현재블록의 예측모드가 기하학적 분할 모드인 경우, 영상 복호화 장치는 현재블록과 관련된 기하학적 분할 정보를 파싱 및/또는 유도하고, 기하학적 분할 정보를 기반으로 현재블록을 다수의 서브 영역으로 분류할 수 있다. 실시예에 따라, 기하학적 분할은 직선이 아닌 형태로 수행될 수 있고, 서브 영역의 개수는 2 이상일 수 있다. 예컨대, 도 7의 예시와 같이 P0 및 P1 서브 영역으로 분할될 수 있다.For example, if the prediction mode of the current block is a geometric segmentation mode, the image decoding device may parse and/or derive geometric segmentation information related to the current block, and classify the current block into multiple sub-regions based on the geometric segmentation information. Depending on the embodiment, the geometric segmentation may be performed in a non-linear form, and the number of sub-regions may be 2 or more. For example, it may be divided into sub-regions P0 and P1, as in the example of FIG. 7.
영상 복호화 장치는 각 서브 영역의 예측블록을 생성하고, 서브 영역들의 예측블록들을 가중합하여 현재블록의 최종 예측블록을 생성할 수 있다. 예컨대, 도 7과 같이, 서브 영역의 개수가 2인 경우, 수학식 2에 따라 서브 영역들의 예측블록들이 가중합될 수 있다.The video decoding device can generate a prediction block for each sub-region and weight the prediction blocks of the sub-regions to generate a final prediction block of the current block. For example, as shown in FIG. 7, when the number of sub-regions is 2, the prediction blocks of the sub-regions can be weighted and combined according to Equation 2.
여기서, P0(i.j) 및 P1(i.j)은 각각 P0 및 P1 서브 영역의 예측블록을 나타내고, n은 1 이상의 정수를 나타낸다. 일 예로서, w(i,j)은 현재블록의 기하학적 분할 정보, 현재블록의 크기, 종횡비 등에 기초하여 영상 복호화 장치에서 유도된 가중합 매트릭스일 수 있다. Here, P 0 (ij) and P 1 (ij) represent prediction blocks of the P 0 and P 1 sub-regions, respectively, and n represents an integer greater than or equal to 1. As an example, w (i, j) may be a weighted sum matrix derived in an image decoding device based on geometric segmentation information of the current block, the size of the current block, aspect ratio, etc.
가중합 매트릭스는, 기하학적 분할 경계를 기준으로 P0 및 P1 서브 영역의 예측샘플들이 공존하는 영역, 즉, 두 서브 영역의 예측샘플들이 0이 아닌 계수에 따라 가중합되는 영역을 결정할 수 있다. 이때, 가중합되는 영역은 기하학적 분할 경계 정보, 현재블록의 크기에 따라 고정된 영역으로 결정될 수 있다. 영상 부호화 장치는 영역 넓이 정보를 시그널링하고, 영상 복호화 장치는 영역 넓이 정보를 파싱하고, 영역 넓이 정보를 함께 고려하여 가중합 매트릭스를 결정할 수 있다. 영역 넓이 정보는 영상 부호화 장치와 영상 복호화 장치 간 약속에 따라 테이블 형태로 정의될 수 있고, 테이블의 인덱스에 따라 결정될 수 있다. 이때, 테이블과 관련된 정보(예컨대, 테이블의 크기, 테이블에 포함된 영역 넓이 정보)는 현재블록의 크기 및 종횡비 등에 따라 상이할 수 있다.The weighted sum matrix can determine the region where the prediction samples of the P0 and P1 sub-regions coexist based on the geometric segmentation boundary, that is, the region where the prediction samples of the two sub-regions are weighted-summed according to a non-zero coefficient. At this time, the region to be weighted-summed can be determined as a fixed region according to geometric segmentation boundary information and the size of the current block. The video encoding device can signal region area information, and the video decoding device can parse the region area information and determine the weighted sum matrix by considering the region area information together. The region area information can be defined in the form of a table according to an agreement between the video encoding device and the video decoding device, and can be determined according to the index of the table. At this time, information related to the table (e.g., the size of the table, the region area information included in the table) can vary depending on the size and aspect ratio of the current block, etc.
일 예로서, 현재블록의 예측모드가 기하학적 분할 모드이고, 최종 예측블록을 생성하기 위해 IntraTMP이 아닌 인트라 예측모드가 사용되지 않는 경우, 영상 복호화 장치는 현재블록에 대한 기하학적 분할 정보를 파싱 및/또는 유도하지 않고, 현재블록의 템플릿과 다수의 참조블록들의 템플릿들을 이용하여 가중합 매트릭스의 계수들을 유도하고, 유도된 계수들을 이용하여 최종 예측블록을 생성할 수 있다. 이때, 아핀 예측은 사용되지 않을 수 있다. 이때, 아핀 예측은 기하학적 분할 모드 플래그 외에 1 비트 플래그의 시그널링/파싱에 따라 결정되는 모드일 수 있다.For example, if the prediction mode of the current block is a geometric segmentation mode and an intra prediction mode other than IntraTMP is not used to generate the final prediction block, the image decoding device may derive coefficients of a weighted sum matrix using the template of the current block and templates of a plurality of reference blocks without parsing and/or deriving geometric segmentation information for the current block, and may generate the final prediction block using the derived coefficients. In this case, affine prediction may not be used. In this case, affine prediction may be a mode determined by signaling/parsing a 1-bit flag in addition to the geometric segmentation mode flag.
다른 예로서, 현재블록의 예측모드가 기하학적 분할 모드이고, 서브 영역의 개수가 2 이상인 경우를 가정한다. 각 서브 영역의 예측블록을 이용하여 현재블록의 최종 예측블록을 생성하는 경우, 각 예측블록을 생성하기 위한 예측기술은 최대 N 개 종류(예컨대, N이 2이면, 예측기술은 인터 예측과 인트라 예측)일 수 있다. 일 예시로, 서브 영역의 개수가 4 개이고 N이 2인 경우, 현재블록의 예측을 수행하기 위해, 인트라 예측과 인터 예측만 사용될 수 있다. 다른 예로서, 서브 블록의 개수가 X 개이고 N이 2이며, 인트라 예측과 인터 예측이 사용 가능한 경우, 현재블록의 예측을 수행하기 위해, 모든 서브 블록은 인트라 예측으로만 예측되거나 인터 예측으로만 예측될 수 있다.As another example, assume that the prediction mode of the current block is geometric partitioning mode and the number of sub-regions is 2 or more. When generating the final prediction block of the current block using the prediction block of each sub-region, the prediction techniques for generating each prediction block can be at most N types (e.g., when N is 2, the prediction techniques can be inter prediction and intra prediction). As an example, when the number of sub-regions is 4 and N is 2, only intra prediction and inter prediction can be used to perform prediction of the current block. As another example, when the number of sub-blocks is X and N is 2, and both intra prediction and inter prediction are available, all sub-blocks can be predicted only by intra prediction or only by inter prediction to perform prediction of the current block.
다른 예로서, 현재블록의 예측모드가 기하학적 분할 기반 예측모드이고, 적어도 하나의 서브 영역이 인터 예측, IBC 예측 또는 IntraTMP 예측에 따라 예측되는 경우를 가정한다. 이때, 서브 영역들의 예측블록들을 생성한 후, 조명 보상(illumination compensation)이 수행될 수 있다.As another example, assume that the prediction mode of the current block is geometric segmentation-based prediction mode, and at least one sub-region is predicted using inter-prediction, inter-block prediction, or intra-temporal prediction. In this case, after generating prediction blocks for the sub-regions, illumination compensation may be performed.
예컨대, 영상 복호화 장치는 각 서브 영역의 예측블록의 템플릿과, 대응되는 현재블록의 템플릿간의 관계를 이용하여 조명 보상을 위한 모델을 유도하고, 유도된 모델에 기초하여 서브 영역의 예측 샘플들을 보상함으로써, 보상된 예측블록을 생성할 수 있다. 조명 보상은 인터 예측, IBC 예측 또는 IntraTMP 예측이 수행된 서브 영역에 적용될 수 있다. 조명 보상을 위한 모델은 선형 모델일 수 있다. 영상 복호화 장치는, 서브 영역들 중, 조명 보상이 적용 가능한 서브 영역에 조명 보상을 수행하고, 서브 영역들의 예측블록들을 가중합하여 현재블록의 최종 예측블록을 생성할 수 있다.For example, an image decoding device can derive a model for illumination compensation using the relationship between the template of a prediction block of each sub-region and the template of the corresponding current block, and compensate prediction samples of the sub-region based on the derived model, thereby generating a compensated prediction block. The illumination compensation can be applied to a sub-region in which inter prediction, IBC prediction, or IntraTMP prediction is performed. The model for illumination compensation can be a linear model. The image decoding device can perform illumination compensation on a sub-region to which illumination compensation is applicable among the sub-regions, and weight and combine the prediction blocks of the sub-regions to generate a final prediction block of the current block.
또는, 서브 영역들의 예측블록들을 생성하고 가중합에 따라 현재블록의 예측블록을 생성한 후, 조명 보상이 수행될 수 있다.Alternatively, lighting compensation can be performed after generating prediction blocks of sub-regions and generating a prediction block of the current block according to a weighted sum.
예컨대, 영상 복호화 장치는 서브영역들의 예측블록들을 생성하고, 서브영역들의 예측블록들을 가중합하여 현재블록의 예측블록을 생성한다. 영상 복호화 장치는 서브 영역들의 템플릿들을 이용하여 현재블록의 템플릿에 대응되는 템플릿을 생성하고, 템플릿들 간의 관계를 이용하여 조명 보상을 위한 모델을 유도할 수 있다. 영상 복호화 장치는 유도된 모델을 가중합된 현재블록의 예측블록에 적용함으로써, 조명 보상된 최종 예측블록을 생성할 수 있다.For example, an image decoding device generates prediction blocks of sub-regions, and weights and combines the prediction blocks of the sub-regions to generate a prediction block of the current block. The image decoding device can use the templates of the sub-regions to generate a template corresponding to the template of the current block, and derive a model for illumination compensation using the relationship between the templates. The image decoding device can apply the derived model to the weighted prediction block of the current block, thereby generating a final prediction block with illumination compensation.
이하, 역변환 및 복원과 관련된 동작들을 기술한다. Below, the operations related to inverse transformation and restoration are described.
역변환과 관련하여, 엔트로피 복호화부(510)는 변환계수들을 복호화한다. 2차 변환이 적용된 경우, 엔트로피 복호화부(510)는 양자화된 2차 변환계수를 복호화한다. 2차 변환이 적용되지 않은 경우, 엔트로피 복호화부(510)는 양자화된 1차 변환계수를 복호화한다. 엔트로피 복호화부(510)는 양자화 방법, 양자화 파라미터 정보 등과 같은 정보를 파싱한다. 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.
역양자화부(520)는 양자화 방법, 양자화 파라미터 정보 등과 같은 정보를 기반으로 복호화된 양자화 변환계수들을 역양자화하여 역양자화 변환계수들을 생성한다. 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.
역변환부(530)는 역양자화 변환계수들로 표현된 TU를 역변환하여 잔차샘플들을 생성한다. 도 6과 같이, 역변환부(530)는 역변환단위 결정부(610), 역변환커널 결정부(612) 및 역변환 수행부(614)를 포함할 수 있다. The inverse transform unit (530) generates residual samples by inversely transforming the TU expressed as inverse quantization transform coefficients. As shown in Fig. 6, 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).
일 예로서, 역변환단위 결정부(610)는 하나의 TU 또는 하나의 TU를 다수로 분할한 서브블록을 변환의 대상으로 결정할 수 있다. 예컨대, TU는 예측의 대상인 현재블록 전체이거나, 현재블록의 일부 영역일 수 있다.As an example, the inverse transformation unit determination unit (610) may 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.
다른 예로서, 현재블록(즉, 예측 단위)의 예측모드가 기하학적 분할 모드인 경우, 현재블록의 기하학적 분할 경계 정보 및 가중합 영역 등에 기초하여, 현재블록의 일부 영역이 서브블록 변환 단위(Subblock Transform Unit, SbTU)로서 구성되고, 구성된 서브블록 변환 단위가 현재 변환블록으로 결정될 수 있다.As another example, if the prediction mode of the current block (i.e., prediction unit) is a geometric partitioning mode, some areas of the current block may be configured as subblock transform units (Subblock Transform Units, SbTUs) based on geometric partitioning boundary information and weighted sum areas of the current block, and the configured subblock transform units may be determined as the current transform block.
도 8은 본 개시의 일 실시예에 따른, 서브블록 변환 단위를 나타내는 예시도이다. FIG. 8 is an exemplary diagram showing a sub-block transformation unit according to one embodiment of the present disclosure.
일 예시로, 도 8과 같이, W×H 크기를 갖는 현재블록 중에서, 가중합 영역이 포함되는 영역을 포함하는 최소 직사각형 영역이 서브블록 변환 단위로서 구성되고, 구성된 서브블록 변환 단위가 현재 변환블록으로 결정될 수 있다. 도 8의 예시는, 현재블록이 기하학적 분할 모드에 따라 예측되고 기하학적 분할 경계 정보가 파싱/유도되어 활용될 수 경우에만 적용될 수 있다. 도 8의 예시에서, A, B, C, D는 1 또는 2의 배수인 정수이고, A≤W, B≤W, C≤H, D≤H의 조건을 갖는 값일 수 있다. As an example, as shown in Fig. 8, among the current blocks having the size of W×H, the minimum rectangular area that includes the area that includes the weighted sum area is It is configured as a sub-block transformation unit, and the configured sub-block transformation unit can be determined as the current transformation block. The example of Fig. 8 can be applied only when the current block is predicted according to the geometric segmentation mode and the geometric segmentation boundary information can be parsed/derived and utilized. In the example of Fig. 8, A, B, C, and D are integers that are multiples of 1 or 2, and can be values having the conditions of A≤W, B≤W, C≤H, and D≤H.
도 9는 본 개시의 다른 실시예에 따른, 서브블록 변환 단위의 결정 과정을 나타내는 예시도이다.FIG. 9 is an exemplary diagram showing a process for determining a sub-block transformation unit according to another embodiment of the present disclosure.
전술한 바는, 도 9와 같이, 1 비트 플래그 (gsbt_flag) 정보에 따라 결정될 수 있다. As mentioned above, as shown in Fig. 9, it can be determined based on the 1-bit flag (gsbt_flag) information.
영상 복호화 장치는 기하학적 분할 모드 플래그 (gpm_flag)를 확인한다. The video decoding device checks the geometric segmentation mode flag (gpm_flag).
현재블록이 기하학적 분할 모드에 따라 예측되지 않는 경우 (gpm_flag가 거짓), 영상 복호화 장치는, 현재블록이 서브블록 변환(subblock transform)에 따라 변환되는지 여부를 확인한다. sbt_flag 값에 기초하여, 영상 복호화 장치는 기하학적 분할 모드와 무관하게, 서브블록 변환 단위 또는 변환 단위의 역변환 커널을 결정할 수 있다.If the current block is not predicted according to the geometric partitioning mode (gpm_flag is false), the image decoding device determines whether the current block is transformed according to the subblock transform. Based on the sbt_flag value, the image decoding device can determine the inverse transform kernel of the subblock transform unit or the transform unit, regardless of the geometric partitioning mode.
반면, 현재블록이 기하학적 분할 모드에 따라 예측되는 경우 (gpm_flag가 참), 영상 복호화 장치는, 도 9와 같이 기하학적 서브블록 변환 단위(geometric-based subblock transform unit, 이하, 서브블록 변환 단위와 호환적으로 사용)가 사용되는지 여부를 지시하는 플래그(gsbt_flag)를 확인한다. gsbt_flag가 1인 경우, 영상 복호화 장치는, 예컨대, 도 8과 같이, 서브블록 변환 단위를 결정할 수 있다. On the other hand, if the current block is predicted according to the geometric partitioning mode (gpm_flag is true), the image decoding device checks a flag (gsbt_flag) indicating whether a geometric-based subblock transform unit ( hereinafter, used interchangeably with a subblock transform unit) is used, as shown in FIG. 9. If gsbt_flag is 1, the image decoding device can determine a subblock transform unit, as shown in FIG. 8, for example.
도 10은 본 개시의 일 실시예에 따른, 역변환 과정 및 복원 과정을 나타내는 예시도이다. FIG. 10 is an exemplary diagram showing a reverse transformation process and a restoration process according to one embodiment of the present disclosure.
영상 복호화 장치는, 결정된 서브블록 변환 단위와 관련하여, 역변환 커널을 결정한다. 결정된 역변환 커널에 기초하여 역변환을 수행한 후, 영상 복호화 장치는 현재블록의 크기, 현재블록의 기하학적 분할 경계, 현재블록의 가중합 영역의 정보 등에 기초하여 복원된 잔차샘플들의 위치를 암시적으로 결정할 수 있다. 영상 복호화 장치는 위치가 결정된 잔차샘플들과 예측블록을 가산함으로써 복원 블록을 생성할 수 있다. 복원 블록을 생성하기 전에, 영상 복호화 장치는, 도 10과 같이, 잔차블록 내에서 서브블록 변환 단위에 포함되지 않는 영역의 잔차 값을 0으로 채울 수 있다 (도 10에서, zero filling).The video decoding device determines an inverse transform kernel with respect to the determined sub-block transform unit. After performing inverse transform based on the determined inverse transform kernel, the video decoding device can implicitly determine the positions of reconstructed residual samples based on the size of the current block, the geometric partitioning boundary of the current block, information on the weighted sum region of the current block, etc. The video decoding device can generate a reconstructed block by adding the residual samples whose positions are determined and the prediction block. Before generating the reconstructed block, the video decoding device can fill the residual values of the regions not included in the sub-block transform units within the residual block with 0, as shown in FIG. 10 (zero filling in FIG. 10).
다른 예로서, 현재블록의 예측모드가 기하학적 분할 모드인 경우, 현재블록의 기하학적 분할 경계 정보, 가중합 영역 등에 기초하여 현재블록의 일부 영역이 현재 변환 단위로 결정될 수 있다. 이때, 현재블록의 일부 영역은 다음의 실시예와 같이 결정될 수 있다.As another example, if the prediction mode of the current block is a geometric segmentation mode, a portion of the current block may be determined as the current transformation unit based on geometric segmentation boundary information, a weighted sum region, etc. of the current block. In this case, a portion of the current block may be determined as in the following example.
도 11a 및 도 11b는 본 개시의 다른 실시예에 따른, 서브블록 변환 단위를 나타내는 예시도이다. FIG. 11a and FIG. 11b are exemplary diagrams showing sub-block transformation units according to another embodiment of the present disclosure.
도 11a 및 도 11b와 같이, W×H 크기를 갖는 현재블록의 기하학적 분할 경계 및 가중합 영역 정보에 기반하여 P×Q (도 11a), R×S (도 11b)의 서브블록이 정의될 수 있다. 이때, P, Q, R, S는 1 또는 2의 배수인 정수이고, 현재블록의 크기, 현재블록의 기하학적 분할 경계, 및 현재블록의 가중합 영역 정보에 기반하여 적응적 및 암시적으로 결정될 수 있다. 도 11a 및 도 11b에서, n, m은 현재블록의 크기, 현재블록의 기하학적 분할 경계, 및 현재블록의 가중합 영역 정보에 기반하여 적응적 및 암시적으로 결정될 수 있다. 실시예에 따라, P×Q 블록 및 R×S 블록은 현재블록과 관련된 가중합 영역의 외부를 포함할 수 있다.As shown in FIGS. 11a and 11b, sub-blocks of P×Q (FIG. 11a) and R×S (FIG. 11b) can be defined based on the geometric segmentation boundary and weighted sum region information of the current block having the size of W×H. At this time, P, Q, R, and S are integers that are multiples of 1 or 2, and can be adaptively and implicitly determined based on the size of the current block, the geometric segmentation boundary of the current block, and the weighted sum region information of the current block. In FIGS. 11a and 11b, n and m can be adaptively and implicitly determined based on the size of the current block, the geometric segmentation boundary of the current block, and the weighted sum region information of the current block. According to an embodiment, the P×Q block and the R×S block can include the outside of the weighted sum region associated with the current block.
도 12는 본 개시의 다른 실시예에 따른, 역변환 과정 및 복원 과정을 나타내는 예시도이다. FIG. 12 is an exemplary diagram showing a reverse transformation process and a restoration process according to another embodiment of the present disclosure.
전술한 바에 따라 결정된 서브블록 변환 단위와 관련하여, 영상 복호화 장치는 역변환 커널을 결정한다. 결정된 역변환 커널에 기초하여 역변환을 수행한 후, 영상 복호화 장치는 현재블록의 크기, 현재블록의 기하학적 분할 경계, 현재블록의 가중합 영역의 정보 등에 기초하여 P, n, Q 또는 R, m, S 값들을 결정하고, 결정된 값들에 따라 복원된 잔차 값들의 위치를 암시적으로 결정할 수 있다. 영상 복호화 장치는 위치가 결정된 잔차샘플들과 예측블록을 가산함으로써 복원 블록을 생성할 수 있다. 복원 블록의 생성 전에, 영상 복호화 장치는 잔차블록 내에서 서브블록 변환 단위에 포함되지 않는 영역의 잔차 값을 0으로 채울 수 있다 (도 12에서, 필링(filling)). 도 12의 필링의 다른 예시로서, 거리가 가까운 샘플들(예컨대, 인접한 샘플들)의 값, 및/또는 거리가 가까운 샘플들의 평균 값을 사용하여 잔차 값이 패딩될 수 있다. With respect to the sub-block transform unit determined as described above, the image decoding device determines an inverse transform kernel. After performing inverse transform based on the determined inverse transform kernel, the image decoding device determines P, n, Q or R, m, S values based on the size of the current block, the geometric partition boundary of the current block, information on the weighted sum region of the current block, etc., and can implicitly determine the positions of the reconstructed residual values based on the determined values. The image decoding device can generate a reconstructed block by adding the residual samples whose positions have been determined and the prediction block. Before generating the reconstructed block, the image decoding device can fill the residual values of the regions that are not included in the sub-block transform units within the residual block with 0 (filling in FIG. 12). As another example of the filling in FIG. 12, the residual values can be padded using the values of samples that are close in distance (e.g., adjacent samples) and/or the average value of samples that are close in distance.
다른 예로서, 현재블록의 예측모드가 기하학적 분할 모드인 경우, 현재블록의 기하학적 분할 경계 정보, 가중합 영역 등에 기초하여 현재블록의 일부 영역이 현재 변환 단위로 결정될 수 있다. 이때, 현재블록의 일부 영역은 다음의 실시예와 같이 결정될 수 있다.As another example, if the prediction mode of the current block is a geometric segmentation mode, a portion of the current block may be determined as the current transformation unit based on geometric segmentation boundary information, a weighted sum region, etc. of the current block. In this case, a portion of the current block may be determined as in the following example.
도 13a 및 도 13b는 본 개시의 다른 실시예에 따른, 서브블록 변환 단위를 나타내는 예시도이다.FIG. 13a and FIG. 13b are exemplary diagrams showing sub-block transformation units according to another embodiment of the present disclosure.
도 13a 및 도 13b와 같이, 현재블록의 기하학적 분할 경계 정보, 현재블록의 가중합 영역 정보, 현재블록의 크기 등에 기초하여 역변환될 잔차샘플들의 개수가 유도될 수 있다. 예컨대, 가중합 영역 위치의 모든 샘플들이 역변환될 잔차샘플들의 개수가 될 수 있고, 현재블록 내 가중합 영역을 포함하는 일부 서브 영역 내 모든 샘플들이 역변환될 잔차샘플들의 개수가 될 수 있다.As shown in FIGS. 13a and 13b, the number of residual samples to be inversely transformed can be derived based on geometric segmentation boundary information of the current block, weighted sum region information of the current block, size of the current block, etc. For example, all samples at the weighted sum region location can be the number of residual samples to be inversely transformed, and all samples within some sub-region including the weighted sum region within the current block can be the number of residual samples to be inversely transformed.
일 예로서, 전술한 바와 같이 유도된 잔차샘플들의 개수가 변환 단위의 최소 크기(이하, 최소 변환 단위)를 만족하지 않는 경우, 유도된 개수보다 크고 최소 변환 단위보다 큰 2K를 만족하는 최소 샘플의 개수를 산정하고, K=M×N을 만족하는 서브블록 변환 단위가 정의될 수 있다 (예컨대, 도 13a 및 도 13b에서 K=25=32, M×N=4×8 또는 8×4), 실시예에 따라, 영상 복호화 장치는 M×N 내에서 스캐닝 순서 상 가장 마지막 샘플들을, K를 산정하기 위해 추가된 샘플들로 채울 수 있다. 영상 복호화 장치는 전술한 마지막 샘플들을 0으로 채울 수 있다. 또는, 영상 복호화 장치는 마지막 샘플들을 스캐닝 순서 상 가장 가까운 샘플값으로 채우거나(복사), 일부 샘플 값들을 평균하여 생성된 값으로 채울 수 있다. For example, when the number of residual samples derived as described above does not satisfy the minimum size of the transformation unit (hereinafter, minimum transformation unit), the minimum number of samples satisfying 2K, which is larger than the derived number and larger than the minimum transformation unit, is calculated, and a sub-block transformation unit satisfying K=M×N can be defined (e.g., K= 25 =32, M×N=4×8 or 8×4 in FIGS. 13A and 13B). Depending on the embodiment, the image decoding device can fill the last samples in the scanning order within M×N with the samples added to calculate K. The image decoding device can fill the last samples described above with 0. Alternatively, the image decoding device can fill the last samples with the closest sample value in the scanning order (copying), or fill them with a value generated by averaging some sample values.
도 13a 및 도 13b에서 서브블록 변환 단위와 관련된 예시는 역대각 (reverse diagonal) 스캐닝 순서에 기반한다. 실시예에 따라, 다른 스캐닝 순서도 적용될 수 할 수 있다. 도 13a 및 도 13b는 하나의 예시로서, 실시예에 따라, 현재블록에서의 스캐닝 순서는, 다음과 같이 각 서브 영역의 예측기술 또는 예측모드의 종류에 따라 결정될 수 있다.The examples related to sub-block transformation units in FIGS. 13A and 13B are based on a reverse diagonal scanning order. Depending on the embodiment, other scanning orders may also be applied. FIGS. 13A and 13B are examples, and depending on the embodiment, the scanning order in the current block may be determined according to the type of prediction technique or prediction mode of each sub-region, as follows.
일 예로서, 현재블록 내 두 서브 영역이 모두 인터 예측에 따라 예측되는 경우, 도 13a와 같이 서브 영역 경계에 관계 없이, 현재블록에서의 스캐닝 순서가 수직 우선, 수평 우선, 지그재그 중 하나로 결정될 수 있다.As an example, if both sub-regions within the current block are predicted according to inter prediction, the scanning order in the current block can be determined as one of vertical priority, horizontal priority, and zigzag, regardless of the sub-region boundary, as shown in Fig. 13a.
다른 예로서, 현재블록 내 두 서브 영역이 모두 IBC 및/또는 IntraTMP에 따라 예측되는 경우, 도 13a와 같이 서브 영역 경계에 관계 없이, 현재블록에서의 스캐닝 순서가 수직 우선, 수평 우선, 지그재그 중 하나로 결정될 수 있다.As another example, if both sub-regions within the current block are predicted according to IBC and/or IntraTMP, the scanning order in the current block can be determined as one of vertical priority, horizontal priority, and zigzag, regardless of the sub-region boundaries, as shown in FIG. 13a.
다른 예로서, 현재블록 내 두 서브 영역 중, 적어도 하나가 인트라 예측인 경우, 도 13b와 같이 서브 영역 경계를 고려하여 현재블록에서의 스캐닝 순서가 결정될 수 있다. 즉, 하나의 서브 영역에 포함되는 샘플들이 먼저 스캔된 후, 다른 서브 영역에 포함되는 샘플들이 스캔될 수 있다. 이때, 서브 영역별로 상이한 스캐닝 순서가 적용될 수 있다. 예컨대, 두 서브 영역이 모두 방향성 인트라 예측모드에 따라 예측된 경우, 기하학적 분할 경계의 각도 및/또는 서브 영역들의 방향성들 간의 관계에 기반하여 스캐닝 순서가 암시적으로 결정될 수 있다.As another example, if at least one of the two sub-regions within the current block is intra-predicted, the scanning order in the current block may be determined by considering the sub-region boundaries, as shown in FIG. 13b. That is, samples included in one sub-region may be scanned first, and then samples included in the other sub-region may be scanned. At this time, different scanning orders may be applied to each sub-region. For example, if both sub-regions are predicted according to a directional intra-prediction mode, the scanning order may be implicitly determined based on the angle of the geometric segmentation boundary and/or the relationship between the directionality of the sub-regions.
도 14는 본 개시의 일 실시예에 따른, 역변환 과정 및 복원 과정을 나타내는 예시도이다. FIG. 14 is an exemplary diagram showing a reverse transformation process and a restoration process according to one embodiment of the present disclosure.
전술한 바에 따라 결정된 서브블록 변환 단위와 관련하여, 영상 복호화 장치는 역변환 커널을 결정한다. 결정된 역변환 커널에 기초하여 역변환을 수행한 후, 영상 복호화 장치는 현재블록의 크기, 현재블록의 기하학적 분할 경계, 현재블록의 가중합 영역의 정보, 서브 영역의 예측모드에 기초하여 스캐닝 순서를 암시적으로 결정하고, 스캐닝 순서에 따라 복원된 잔차 값들의 위치를 암시적으로 결정할 수 있다. 영상 복호화 장치는 위치가 결정된 잔차샘플들과 예측블록을 가산함으로써 복원 블록을 생성할 수 있다. 복원 블록의 생성 전에, 영상 복호화 장치는 잔차블록 내에서 서브블록 변환 단위에 포함되지 않는 영역의 잔차 값을 0으로 채울 수 있다 (도 14에서, 필링(filling)). 도 14의 필링의 다른 예시로서, 거리가 가까운 샘플들(예컨대, 인접한 샘플들)의 값, 및/또는 거리가 가까운 샘플들의 평균 값을 사용하여 잔차 값이 패딩될 수 있다. With respect to the sub-block transform unit determined as described above, the image decoding device determines an inverse transform kernel. After performing inverse transform based on the determined inverse transform kernel, the image decoding device implicitly determines a scanning order based on the size of the current block, the geometric partitioning boundary of the current block, information on the weighted sum region of the current block, and the prediction mode of the sub-region, and can implicitly determine the positions of the reconstructed residual values according to the scanning order. The image decoding device can generate a reconstructed block by adding the residual samples whose positions have been determined and the prediction block. Before generating the reconstructed block, the image decoding device can fill the residual values of the regions that are not included in the sub-block transform units within the residual block with 0 (filling in FIG. 14). As another example of the filling in FIG. 14, the residual values can be padded using the values of samples that are close in distance (e.g., adjacent samples) and/or the average value of samples that are close in distance.
한편, 역변환커널 결정부(612)는 분리 가능한 수직 및 수평 방향 1차 역변환 커널 및/또는 분리 불가능한 2차 역변환 커널을 결정하거나, 분리 불가능한 1차 역변환 커널을 결정할 수 있다. 역변환 수행부(614)는 결정된 역변환 커널을 이용하여 역양자화된 변환계수들을 역변환할 수 있다.Meanwhile, 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. The inverse transform performing unit (614) can inverse transform the inverse quantized transform coefficients using the determined inverse transform kernel.
일 예로서, 분리 불가능한 역변환의 수행 여부는 플래그 또는 인덱스의 시그널링/파싱에 따라 결정될 수 있다. 여기서, 분리 불가능한 역변환의 수행 여부는 분리 불가능한 1차 역변환의 수행 여부 또는 분리 불가능한 2차 역변환의 수행 여부를 나타낸다. 또는, 분리 불가능한 역변환의 수행 여부는 현재 변환블록의 크기에 기초하여 암시적으로 결정될 수 있다. 현재 변환블록은 TU 또는 서브블록 변환 단위를 나타낸다. For example, whether to perform a non-separable inverse transform can be determined based on the signaling/parsing of a flag or index. Here, whether to perform a non-separable inverse transform indicates whether to perform a non-separable first-order inverse transform or a non-separable second-order inverse transform. Alternatively, whether to perform a non-separable inverse transform can be implicitly determined based on the size of the current transform block. The current transform block represents a TU or sub-block transform unit.
도 15는 본 개시의 일 실시예에 따른, 역변환 커널의 결정 과정을 나타내는 예시도이다. FIG. 15 is an exemplary diagram showing a process for determining an inverse transform kernel according to one embodiment of the present disclosure.
역변환커널 결정부(612)는 도 15의 예시에 따라 현재 변환블록의 역변환 커널의 종류를 결정할 수 있다. 도 15에 예시된 순서는 변경될 수 있으며, 일부 순서가 생략될 수 있다.The inverse transformation kernel decision unit (612) determines the current transformation block according to the example of Fig. 15. The type of inverse transform kernel can be determined. The order illustrated in Fig. 15 can be changed, and some orders can be omitted.
일 예로서, 현재블록의 예측블록이 기하학적 분할 예측모드에 따라 예측되고, 현재 변환블록이 전술한 예측블록의 보상을 위한 잔차신호들을 복원하는 단위인 경우, 현재 변환블록과 관련하여 분리 불가능한 역변환의 수행 여부 및 분리 불가능한 1차 역변환의 수행 여부는, 플래그 및/또는 인덱스의 시그널링/파싱에 따라 결정될 수 있다. 또는, 분리 불가능한 역변환의 수행 여부 및 분리 불가능한 1차 역변환의 수행 여부는, 현재 역변환 단위의 크기에 기초하여 암시적으로 결정될 수 있다.As an example, if the prediction block of the current block is predicted according to a geometric partition prediction mode, and the current transform block is a unit that restores residual signals for compensation of the aforementioned prediction block, whether to perform a non-separable inverse transform and whether to perform a non-separable first-order inverse transform with respect to the current transform block may be determined based on signaling/parsing of flags and/or indices. Alternatively, whether to perform a non-separable inverse transform and whether to perform a non-separable first-order inverse transform may be implicitly determined based on the size of the current inverse transform unit.
도 16은 본 개시의 다른 실시예에 따른, 역변환 커널의 결정 과정을 나타내는 예시도이다. FIG. 16 is an exemplary diagram showing a process for determining an inverse transform kernel according to another embodiment of the present disclosure.
다른 예로서, 역변환커널 결정부(612)는 도 16의 예시에 따라 현재 변환블록의 역변환 커널의 종류를 결정할 수 있다. 도 16에 예시된 순서는 변경될 수 있으며, 일부 순서가 생략될 수 있다.As another example, the inverse transform kernel decision unit (612) determines the current transform block according to the example of FIG. 16. The type of inverse transform kernel can be determined. The order illustrated in Fig. 16 can be changed, and some orders can be omitted.
일 예로서, 현재 변환블록과 관련하여 분리 불가능한 역변환의 수행 여부는 플래그 및/또는 인덱스의 시그널링/파싱에 따라 결정될 수 있다. 실시예에 따라, 분리 불가능한 역변환이 수행되는 경우, 블록의 크기에 따라 분리 불가능한 1차 역변환 또는 분리 불가능한 2차 역변환 수행 여부가 결정될 수 있다. 예컨대, 블록의 크기가 N×4 또는 4×N (16≥N≥4)인 경우 또는 8×N 또는 N×8 (16≥N≥8)인 경우, 해당 블록에 분리 불가능한 1차 역변환이 수행되고, 다른 크기를 갖는 블록에 분리 불가능한 2차 역변환이 수행될 수 있다.As an example, whether to perform a non-separable inverse transform with respect to the current transformation block may be determined based on signaling/parsing of flags and/or indices. In some embodiments, when a non-separable inverse transform is performed, whether to perform a non-separable first inverse transform or a non-separable second inverse transform may be determined based on the size of the block. For example, when the size of the block is N×4 or 4×N (16≥N≥4) or 8×N or N×8 (16≥N≥8), a non-separable first inverse transform may be performed on the block, and a non-separable second inverse transform may be performed on blocks of different sizes.
이하, 분리 가능한 1차 역변환 커널을 결정하는 방법을 기술한다.Below, we describe a method for determining a separable first-order inverse transform kernel.
일 예로서, 현재 변환블록에 분리 가능한 1차 역변환이 수행되는 경우, 영상 복호화 장치는 기하학적 분할 모드의 수행 여부에 기초하여 수직 방향의 커널과 수평 방향의 커널을 암시적으로 결정할 수 있다. 기하학적 분할 모드가 수행되는 경우, 영상 복호화 장치는 각 서브 영역의 예측모드, 가중합 영역 등에 기초하여 수직 방향의 커널과 수평 방향의 커널을 암시적으로 결정할 수 있다. 다른 예로서, 전술한 정보에 기초하여 영상 부호화 장치와 영상 복호화 장치 간 약속에 따라 테이블을 정의하고, 테이블의 인덱스를 시그널링/파싱함으로써, 수직 방향의 커널과 수평 방향의 커널이 결정될 수 있다. 이때, 서브 영역들의 예측 조합 (예컨대, 인터/인터 예측, 인터/인트라 예측, IBC/인트라 예측, 인트라/IntraTMP 예측 등)에 따라, 상이한 테이블이 구성될 수 있다. 여기서, 예측 조합으로서, 인터 예측, 인트라 예측, IBC 예측 및 IntraTMP 예측 간의 조합이 고려될 수 있다.For example, if a separable first inverse transform is performed on the current transform block, the image decoding device can implicitly determine the vertical kernel and the horizontal kernel based on whether the geometric segmentation mode is performed. If the geometric segmentation mode is performed, the image decoding device can implicitly determine the vertical kernel and the horizontal kernel based on the prediction mode of each sub-region, the weighted sum region, etc. As another example, the vertical kernel and the horizontal kernel can be determined by defining a table according to an agreement between the image encoding device and the image decoding device based on the above-described information, and signaling/parsing the index of the table. At this time, different tables can be configured according to the prediction combination of the sub-regions (e.g., inter/inter prediction, inter/intra prediction, IBC/intra prediction, intra/IntraTMP prediction, etc.). Here, a combination among inter prediction, intra prediction, IBC prediction, and IntraTMP prediction can be considered as the prediction combination.
다른 예로서, 현재 변환블록에 분리 불가능한 2차 역변환이 수행되는 경우, 분리 가능한 1차 역변환 커널로서 암시적으로 고정된 커널 (예컨대, 수직 및 수평 방향 커널로서 DCT2, DCT2)이 사용될 수 있다. 고정된 커널은, 현재 변환블록의 크기/종횡비에 따라 적응적으로 변경될 수 있다. 기하학적 분할 모드가 수행되는 경우, 고정된 커널은, 현재 변환블록의 크기/종횡비, 각 서브 영역의 예측모드 등에 따라 적응적으로 변경될 수 있다As another example, when a non-separable second-order inverse transform is performed on the current transform block, an implicitly fixed kernel (e.g., DCT2, DCT2 as vertical and horizontal kernels) can be used as the separable first-order inverse transform kernel. The fixed kernel can be adaptively changed according to the size/aspect ratio of the current transform block. When the geometric partitioning mode is performed, the fixed kernel can be adaptively changed according to the size/aspect ratio of the current transform block, the prediction mode of each sub-region, etc.
이하, 분리 불가능한 1차 역변환 커널을 결정하는 방법을 기술한다.Below, we describe a method for determining a non-separable first-order inverse transform kernel.
일 예로서, 현재 변환블록의 크기에 따라, 분리 불가능한 1차 역변환 수행 여부가 암시적으로 결정될 수 있다.As an example, depending on the size of the current transformation block, whether or not to perform an inseparable first-order inverse transformation can be implicitly determined.
일 예로서, 현재 변환블록에 분리 불가능한 1차 역변환이 수행되는 경우, 분리 불가능한 1차 역변환 커널은 현재 변환블록의 크기 및 각 서브 영역의 예측모드에 기초하여 결정될 수 있다. As an example, when a non-separable first-order inverse transform is performed on the current transform block, the non-separable first-order inverse transform kernel can be determined based on the size of the current transform block and the prediction mode of each sub-region.
다른 예로서, 분리 불가능한 1차 역변환은 모든 서브 영역들이 인트라 예측된 블록에만 적용될 수 있다. As another example, the non-separable first-order inverse transform can only be applied to blocks where all sub-regions are intra-predicted.
다른 예로서, 영상 복호화 장치는 현재 변환블록과 관련하여, 분리 불가능한 1차 역변환 커널을 지시하는 인덱스 및/또는 플래그를 시그널링/파싱한다. 영상 복호화 장치는 현재 변환블록의 크기, 현재블록의 각 서브 영역의 예측모드 등에 기초하여, 파싱된 인덱스/플래그가 지시하는 역변환 커널을 현재 변환블록의 분리 불가능한 1차 역변환 커널로 결정할 수 있다. 예컨대, 사용 가능한 분리 불가능한 1차 역변환 커널의 종류가 N 개일 때, 기하학적 분할 모드가 적용된 현재블록 내 변환블록과 관련하여, 사용 가능한 분리 불가능한 1차 역변환 커널의 종류는 2 개 또는 M (M<N) 개일 수 있다. 다른 예로서, 기하학적 분할 모드가 적용된 현재블록 내 변환블록과 관련하여, 사용 가능한 분리 불가능한 1차 역변환 커널의 종류는 K 개로서, 별도의 커널 셋이 사용될 수 있다.As another example, the video decoding device signals/parses an index and/or a flag indicating a non-separable first-order inverse transform kernel with respect to the current transform block. The video decoding device can determine the inverse transform kernel indicated by the parsed index/flag as the non-separable first-order inverse transform kernel of the current transform block based on the size of the current transform block, the prediction mode of each sub-region of the current block, etc. For example, when there are N types of available non-separable first-order inverse transform kernels, with respect to the transform blocks in the current block to which the geometric partitioning mode is applied, the types of available non-separable first-order inverse transform kernels may be 2 or M (M<N). As another example, with respect to the transform blocks in the current block to which the geometric partitioning mode is applied, there may be K types of available non-separable first-order inverse transform kernels, and a separate kernel set may be used.
이때, 현재블록의 서브 영역들의 예측 조합 (예컨대, 인터/인터 예측, 인터/인트라 예측, IBC/인트라 예측, 인트라/IntraTMP 예측 등)을 기반으로, 영상 부호화 장치와 영상 복호화 장치 간 약속에 따라, 사용 가능한 역변환 커널의 종류가 상이하게 구성될 수 있다. 여기서, 예측 조합으로서, 인터 예측, 인트라 예측, IBC 예측 및 IntraTMP 예측 간의 조합이 고려될 수 있다.At this time, based on the prediction combination of the sub-regions of the current block (e.g., inter/inter prediction, inter/intra prediction, IBC/intra prediction, intra/IntraTMP prediction, etc.), the types of available inverse transform kernels can be configured differently according to the agreement between the video encoding device and the video decoding device. Here, as the prediction combination, a combination among inter prediction, intra prediction, IBC prediction, and IntraTMP prediction can be considered.
다른 예로서, 현재블록의 각 서브 영역의 예측모드가 (예컨대, 방향성 인트라 예측과 같은) 인트라 예측에 포함되지 않는 경우, 영상 복호화 장치는 현재 변환블록에 대응되는 예측블록의 전체 또는 일부 영역에서 적어도 하나의 방향성을 유도하고, 적어도 하나의 유도된 방향성 중 하나에 대응되는 분리 불가능한 1차 역변환 커널을 사용할 수 있다. 또는, 현재블록의 각 서브 영역의 예측모드가 (예컨대, 방향성 인트라 예측과 같은) 인트라 예측에 포함되는 경우, 영상 복호화 장치는 현재 변환블록에 대응되는 예측블록의 전체 또는 일부 영역에서 적어도 하나의 방향성을 유도하고, 적어도 하나의 유도된 방향성 중 하나에 대응되는 분리 불가능한 1차 역변환 커널을 사용할 수 있다. 이를테면, 유도된 방향성들 중 현재블록의 각 서브 영역의 인트라 예측모드와 유사한 방향성이 사용될 수 있다. 영상 복호화 장치는 예측블록에서 현재 변환블록과 대응되는 영역(서브블록 변환 단위의 경우, 도 8, 도 11a 및 도 11b, 도 13a 및 도 13b의 예시 참조)에, Sobel 필터를 적용하여 기설정된 단위 별 수직/수평의 기울기 및 크기 값을 산정한다. 영상 복호화 장치는, 기설정된 단위 별 수직/수평의 기울기 및 크기 값으로부터 HoG(Histogram of Gradient)를 구성하고, HoG에 기초하여 방향성을 유도할 수 있다. 여기서, Sobel 필터는 경계 검출(edge detection) 필터를 나타내고, 기설정된 단위는, 예컨대, 화소 또는 화소 그룹일 수 있다. As another example, if the prediction mode of each sub-region of the current block is not included in the intra prediction (such as directional intra prediction), the video decoding device may derive at least one directionality from all or part of a region of a prediction block corresponding to the current transform block, and use an inseparable first-order inverse transform kernel corresponding to one of the at least one derived directionality. Alternatively, if the prediction mode of each sub-region of the current block is included in the intra prediction (such as directional intra prediction), the video decoding device may derive at least one directionality from all or part of a region of a prediction block corresponding to the current transform block, and use an inseparable first-order inverse transform kernel corresponding to one of the at least one derived directionality. For example, a directionality similar to the intra prediction mode of each sub-region of the current block among the derived directionality may be used. The video decoding device applies a Sobel filter to an area corresponding to a current transformation block in a prediction block (in the case of a sub-block transformation unit, see examples of FIGS. 8, 11a and 11b, 13a and 13b) to calculate vertical/horizontal gradient and size values for each preset unit. The video decoding device can construct a Histogram of Gradient (HoG) from the vertical/horizontal gradient and size values for each preset unit, and derive directionality based on the HoG. Here, the Sobel filter represents an edge detection filter, and the preset unit may be, for example, a pixel or a pixel group.
다른 예로서, 현재 변환블록과 관련하여, 분리 불가능한 2차 역변환이 사용된 경우, 분리 불가능한 1차 역변환의 사용이 제한된다. 실시예에 따라, 분리 불가능한 1차 역변환 인덱스가 먼저 파싱되는 경우, 분리 불가능한 2차 역변환의 파싱 여부가 분리 불가능한 1차 역변환의 인덱스 값에 의존할 수 있다. As another example, with respect to the current transformation block, if an inseparable second-order inverse transform is used, the use of an inseparable first-order inverse transform is restricted. In some embodiments, if the inseparable first-order inverse transform index is parsed first, whether or not the inseparable second-order inverse transform is parsed may depend on the index value of the inseparable first-order inverse transform.
이하, 분리 불가능한 2차 역변환 커널을 결정하는 방법을 기술한다.Below, we describe a method for determining a non-separable second-order inverse transform kernel.
일 예로서, 현재 변환블록의 크기에 따라, 분리 불가능한 2차 역변환 수행 여부가 암시적으로 결정될 수 있다.As an example, depending on the size of the current transformation block, whether or not to perform an inseparable second-order inverse transformation can be implicitly determined.
일 예로서, 현재 변환블록에 분리 불가능한 2차 역변환이 수행되는 경우, 분리 불가능한 2차 역변환 커널은 현재 변환블록의 크기 및 각 서브 영역의 예측모드에 기초하여 결정될 수 있다. As an example, when a non-separable second-order inverse transform is performed on the current transform block, the non-separable second-order inverse transform kernel can be determined based on the size of the current transform block and the prediction mode of each sub-region.
다른 예로서, 분리 불가능한 2차 역변환은 모든 서브 영역들이 인트라 예측된 블록에만 적용될 수 있다. As another example, the non-separable second-order inverse transform can only be applied to blocks where all sub-regions are intra-predicted.
다른 예로서, 영상 복호화 장치는 현재 변환블록과 관련하여, 분리 불가능한 2차 역변환 커널을 지시하는 인덱스 및/또는 플래그를 시그널링/파싱한다. 영상 복호화 장치는 현재 변환블록의 크기, 현재블록의 각 서브 영역의 예측모드 등에 기초하여, 파싱된 인덱스/플래그가 지시하는 역변환 커널을 현재 변환블록의 분리 불가능한 2차 역변환 커널로 결정할 수 있다. 예컨대, 사용 가능한 분리 불가능한 2차 역변환 커널의 종류가 N 개일 때, 기하학적 분할 모드가 적용된 현재블록 내 변환블록과 관련하여, 사용 가능한 분리 불가능한 2차 역변환 커널의 종류는 2 개 또는 M (M<N) 개일 수 있다. 다른 예로서, 기하학적 분할 모드가 적용된 현재블록 내 변환블록과 관련하여, 사용 가능한 분리 불가능한 2차 역변환 커널의 종류는 K 개로서, 별도의 커널 셋이 사용될 수 있다.As another example, the video decoding device signals/parses an index and/or a flag indicating a non-separable second-order inverse transform kernel with respect to the current transform block. The video decoding device can determine the inverse transform kernel indicated by the parsed index/flag as the non-separable second-order inverse transform kernel of the current transform block based on the size of the current transform block, the prediction mode of each sub-region of the current block, etc. For example, when there are N types of available non-separable second-order inverse transform kernels, with respect to the transform blocks in the current block to which the geometric partitioning mode is applied, the types of available non-separable second-order inverse transform kernels may be 2 or M (M<N). As another example, with respect to the transform blocks in the current block to which the geometric partitioning mode is applied, there may be K types of available non-separable second-order inverse transform kernels, and a separate kernel set may be used.
이때, 현재블록의 서브 영역들의 예측 조합 (예컨대, 인터/인터 예측, 인터/인트라 예측, IBC/인트라 예측, 인트라/IntraTMP 예측 등)을 기반으로, 영상 부호화 장치와 영상 복호화 장치 간 약속에 따라, 사용 가능한 역변환 커널의 종류가 상이하게 구성될 수 있다. 여기서, 예측 조합으로서, 인터 예측, 인트라 예측, IBC 예측 및 IntraTMP 예측 간의 조합이 고려될 수 있다.At this time, based on the prediction combination of the sub-regions of the current block (e.g., inter/inter prediction, inter/intra prediction, IBC/intra prediction, intra/IntraTMP prediction, etc.), the types of available inverse transform kernels can be configured differently according to the agreement between the video encoding device and the video decoding device. Here, as the prediction combination, a combination among inter prediction, intra prediction, IBC prediction, and IntraTMP prediction can be considered.
다른 예로서, 현재블록의 각 서브 영역의 예측모드가 (예컨대, 방향성 인트라 예측과 같은) 인트라 예측에 포함되지 않는 경우, 영상 복호화 장치는 현재 변환블록에 대응되는 예측블록의 전체 또는 일부 영역애서 적어도 하나의 방향성을 유도하고, 적어도 하나의 유도된 방향성 중 하나에 대응되는 분리 불가능한 2차 역변환 커널을 사용할 수 있다. 또는, 현재블록의 각 서브 영역의 예측모드가 (예컨대, 방향성 인트라 예측과 같은) 인트라 예측에 포함되는 경우, 영상 복호화 장치는 현재 변환블록에 대응되는 예측블록의 전체 또는 일부 영역에서 적어도 하나의 방향성을 유도하고, 적어도 하나의 유도된 방향성 중 하나에 대응되는 분리 불가능한 2차 역변환 커널을 사용할 수 있다. 이를테면, 유도된 방향성들 중 현재블록의 각 서브 영역의 인트라 예측모드와 유사한 방향성이 사용될 수 있다. 영상 복호화 장치는 예측블록에서 현재 변환블록과 대응되는 영역(서브블록 변환 단위의 경우, 도 8, 도 11a 및 도 11b, 도 13a 및 도 13b의 예시 참조)에, Sobel 필터를 적용하여 기설정된 단위 별 수직/수평의 기울기 및 크기 값을 산정한다. 영상 복호화 장치는, 기설정된 단위 별 수직/수평의 기울기 및 크기 값으로부터 HoG를 구성하고, HoG에 기초하여 방향성을 유도할 수 있다. 여기서, Sobel 필터는 경계 검출 필터를 나타내고, 기설정된 단위는, 예컨대, 화소 또는 화소 그룹일 수 있다. As another example, if the prediction mode of each sub-region of the current block is not included in the intra prediction (such as directional intra prediction), the video decoding device may derive at least one directionality from all or part of a region of a prediction block corresponding to the current transform block, and use an inseparable second-order inverse transform kernel corresponding to one of the at least one derived directionality. Alternatively, if the prediction mode of each sub-region of the current block is included in the intra prediction (such as directional intra prediction), the video decoding device may derive at least one directionality from all or part of a region of a prediction block corresponding to the current transform block, and use an inseparable second-order inverse transform kernel corresponding to one of the at least one derived directionality. For example, a directionality similar to the intra prediction mode of each sub-region of the current block among the derived directionality may be used. The video decoding device applies a Sobel filter to an area corresponding to the current transformation block in the prediction block (in the case of a sub-block transformation unit, see examples of FIGS. 8, 11a and 11b, 13a and 13b) to calculate vertical/horizontal slope and size values for each preset unit. The video decoding device can configure a HoG from the vertical/horizontal slope and size values for each preset unit, and derive directionality based on the HoG. Here, the Sobel filter represents a boundary detection filter, and the preset unit may be, for example, a pixel or a pixel group.
다른 예로서, 현재 변환블록과 관련하여, 분리 불가능한 2차 역변환이 수행되는 경우, 1차 역변환은 분리 가능한 수직 방향 및 수평 방향의 역변환 커널을 사용하여 수행될 수 있다. 1차 역변환에 사용되는 커널로서, 2차 역변환 커널의 종류를 기반으로 영상 부호화 장치와 영상 복호화 장치 간 약속에 따라 고정된 커널 (예컨대, 수직 및 수평 방향 커널로서 DCT2, DCT2)이 사용될 수 있다. As another example, in relation to the current transform block, when a non-separable second inverse transform is performed, the first inverse transform may be performed using separable vertical and horizontal inverse transform kernels. As the kernel used for the first inverse transform, a fixed kernel (e.g., DCT2, DCT2 as a vertical and horizontal kernel) may be used according to an agreement between the image encoding device and the image decoding device based on the type of the second inverse transform kernel.
이하, 현재블록의 변환블록을 변환 및 역변환하는 방법을 기술한다. 도 17 및 도 18의 예시는 현재 변환블록이 서브블록 변환 단위인 경우에 기초하여 기술되나, 현재 변환블록이 TU인 경우에도 유사하게 적용될 수 있다. Hereinafter, a method for transforming and inversely transforming a transform block of a current block is described. The examples of FIGS. 17 and 18 are described based on the case where the current transform block is a sub-block transform unit, but can be similarly applied when the current transform block is a TU.
도 17은 본 개시의 일 실시예에 따른, 영상 부호화 장치가 변환블록을 변환하는 방법을 나타내는 순서도이다.FIG. 17 is a flowchart illustrating a method by which an image encoding device transforms a transform block according to one embodiment of the present disclosure.
영상 부호화 장치는 현재블록의 잔차샘플들을 획득한다(S1700). The video encoding device obtains residual samples of the current block (S1700).
현재블록이 기하학적 분할 모드에 따라 예측되는 경우, 영상 부호화 장치는 상위 수준으로부터 서브블록 변환 단위가 사용되지는 여부를 지시하는 플래그를 획득한다(S1702). If the current block is predicted according to the geometric partitioning mode, the image encoding device obtains a flag indicating whether a sub-block transform unit is used from a higher level (S1702).
영상 부호화 장치는 플래그가 참인지를 확인한다(S1704). The video encoding device checks whether the flag is true (S1704).
플래그가 참으로서 서브블록 변환 단위의 사용을 나타내는 경우 (S1704의 Yes), 영상 부호화 장치는 다음의 단계들을 수행할 수 있다. If the flag indicates the use of a sub-block transform unit as true (Yes in S1704), the video encoding device may perform the following steps.
영상 부호화 장치는 현재블록의 서브블록 변환 단위를 구성하기 위해 사용되는 예측 영역을 결정한다(S1706). The video encoding device determines a prediction region used to configure a sub-block transformation unit of the current block (S1706).
여기서, 예측 영역은, 기하학적 분할 모드에 따라 분할된 현재블록의 서브 영역들과 관련하여, 서브 영역들의 가중합 영역을 포함할 수 있다. 예컨대, 영상 부호화 장치는 서브 영역들의 가중합 영역을 포함하는 직사각형 영역들 중 최소 직사각형 영역에 기초하여 예측 영역을 결정할 수 있다. Here, the prediction region may include a weighted sum region of sub-regions, with respect to sub-regions of the current block divided according to a geometric division mode. For example, the image encoding device may determine the prediction region based on a minimum rectangular region among rectangular regions including the weighted sum region of the sub-regions.
일 예로서, 예측 영역의 크기가 변환 단위의 최소 크기를 만족하지 않는 경우, 영상 부호화 장치는 2K(여기서, K는 자연수)를 만족하는 최소 샘플들의 개수를 산정할 수 있다. 여기서, 2K는 예측 영역보다 크고 최소 변환 단위보다 크다. 영상 부호화 장치는 최소 샘플들의 개수에 기초하여 서브블록 변환 단위의 크기를 결정할 수 있다.For example, if the size of the prediction region does not satisfy the minimum size of the transformation unit, the video encoding device can calculate the minimum number of samples that satisfy 2 K (where K is a natural number). Here, 2 K is larger than the prediction region and larger than the minimum transformation unit. The video encoding device can determine the size of the sub-block transformation unit based on the minimum number of samples.
영상 부호화 장치는 현재블록의 잔차샘플들 중 예측 영역의 잔차샘플들을 이용하여, 기정해진 스캐닝 순서에 따라 서브블록 변환 단위를 채운다(S1708). The video encoding device fills the sub-block transformation unit according to a predetermined scanning order using residual samples of the prediction region among the residual samples of the current block (S1708).
서브블록 변환 단위가 예측 영역보다 큰 경우, 영상 부호화 장치는 기정해진 스캐닝 순서에 따른 서브블록 변환 단위의 마지막 위치들에 영(zero) 샘플들, 스캐닝 순서 상 가장 가까운 샘플값, 또는 일부 샘플들의 평균하여 생성된 값을 패딩할 수 있다. When a sub-block transform unit is larger than a prediction region, the video encoding device may pad the last positions of the sub-block transform unit according to a predetermined scanning order with zero samples, the closest sample value in the scanning order, or a value generated by averaging some samples.
영상 부호화 장치는 서브블록 변환 단위의 변환 커널을 결정한다(S1710). The video encoding device determines a transformation kernel of a subblock transformation unit (S1710).
영상 부호화 장치는 상위 수준으로부터 분리 불가능 변환(non-separable transform) 정보를 획득할 수 있다. 여기서, 분리 불가능 변환 정보는 분리 불가능 변환의 적용 여부를 지시하고, 분리 불가능 변환은 분리 불가능 1차 변환 또는 분리 불가능 2차 변환을 나타낼 수 있다. 분리 불가능 변환 정보는, 분리 불가능 변환의 적용 여부를 지시하는 플래그 또는 인덱스일 수 있다.An image encoding device can obtain non-separable transform information from a higher level. Here, the non-separable transform information indicates whether a non-separable transform is applied, and the non-separable transform may indicate a non-separable primary transform or a non-separable secondary transform. The non-separable transform information may be a flag or index indicating whether a non-separable transform is applied.
일 예로서, 분리 불가능 변환 정보가 분리 불가능 변환의 수행을 지시하는 경우, 영상 부호화 장치는 서브블록 변환 단위의 크기 및 현재블록의 서브 영역들의 예측모드들에 기초하여 분리 불가능 1차 변환 커널 또는 분리 불가능 2차 변환 커널에 해당하는 분리 불가능 변환 커널을 결정할 수 있다. As an example, when the non-separable transform information instructs the performance of a non-separable transform, the image encoding device can determine a non-separable transform kernel corresponding to a non-separable first transform kernel or a non-separable second transform kernel based on the size of the sub-block transform unit and the prediction modes of the sub-regions of the current block.
다른 예로서, 분리 불가능 변환 정보가 분리 불가능 변환의 수행을 지시하는 경우, 영상 부호화 장치는 서브블록 변환 단위의 크기에 기초하여 분리 불가능 1차 변환 또는 분리 불가능 2차 변환의 수행 여부를 결정할 수 있다. As another example, when the non-separable transform information indicates the performance of a non-separable transform, the video encoding device can determine whether to perform a non-separable primary transform or a non-separable secondary transform based on the size of the sub-block transform unit.
영상 부호화 장치는 서브블록 변환 단위에 변환 커널을 적용하여 서브블록 변환 단위의 변환계수들을 생성한다(S1712). The video encoding device applies a transform kernel to a sub-block transform unit to generate transform coefficients of the sub-block transform unit (S1712).
이후, 영상 부호화 장치는 플래그 및 서브블록 변환 단위의 변환계수들을 부호화할 수 있다.Thereafter, the video encoding device can encode the transform coefficients of the flag and sub-block transform units.
반면, 플래그가 거짓으로서 서브블록 변환 단위를 사용하지 않는 경우 (S1704의 No), 영상 부호화 장치는 현재블록의 변환 커널을 결정하고, 결정된 변환 커널을 현재블록의 잔차샘플들에 적용하여 현재블록의 변환계수들을 생성할 수 있다. 이후, 영상 부호화 장치는 플래그 및 현재블록의 변환계수들을 부호화할 수 있다.On the other hand, if the flag is false and the sub-block transform unit is not used (No in S1704), the video encoding device can determine the transform kernel of the current block and apply the determined transform kernel to the residual samples of the current block to generate transform coefficients of the current block. Thereafter, the video encoding device can encode the flag and the transform coefficients of the current block.
도 18은 본 개시의 일 실시예에 따른, 영상 복호화 장치가 변환블록을 역변환하는 방법을 나타내는 순서도이다.FIG. 18 is a flowchart illustrating a method for an image decoding device to inversely transform a transform block according to one embodiment of the present disclosure.
영상 복호화 장치는 현재블록의 역양자화된 변환계수들을 획득한다(S1800). The image decoding device obtains the inverse quantized transform coefficients of the current block (S1800).
현재블록이 기하학적 분할 모드에 따라 예측되는 경우, 영상 복호화 장치는 비트스트림으로부터 서브블록 변환 단위가 사용되지는 여부를 지시하는 플래그를 복호화한다(S1800).If the current block is predicted according to the geometric partitioning mode, the image decoding device decodes a flag indicating whether a sub-block transform unit is used from the bitstream (S1800).
영상 복호화 장치는 플래그가 참인지를 확인한다(S1804). The video decoding device checks whether the flag is true (S1804).
플래그가 참으로서 서브블록 변환 단위의 사용을 나타내는 경우 (S1804의 Yes), 영상 복호화 장치는 다음의 단계들을 수행할 수 있다.If the flag indicates the use of a sub-block transform unit as true (Yes in S1804), the video decoding device may perform the following steps.
영상 복호화 장치는 현재블록의 서브블록 변환 단위를 결정한다(S1806). The video decoding device determines the sub-block transformation unit of the current block (S1806).
여기서, 서브블록 변환 단위는, 기하학적 분할 모드에 따라 분할된 현재블록의 서브 영역들과 관련하여, 서브 영역들의 가중합 영역을 포함하는 예측 영역에 기초하여 결정될 수 있다. 예컨대, 영상 복호화 장치는 서브 영역들의 가중합 영역을 포함하는 직사각형 영역들 중 최소 직사각형 영역에 기초하여 서브블록 변환 단위를 결정할 수 있다. Here, the sub-block transformation unit may be determined based on a prediction region including a weighted sum region of the sub-regions of the current block divided according to a geometric division mode. For example, the image decoding device may determine the sub-block transformation unit based on a minimum rectangular region among rectangular regions including the weighted sum region of the sub-regions.
영상 복호화 장치는 서브블록 변환 단위의 역변환 커널을 결정한다(S1808). The video decoding device determines an inverse transform kernel of a sub-block transform unit (S1808).
영상 복호화 장치는 비트스트림으로부터 분리 불가능 변환(non-separable transform) 정보를 복호화한다. 분리 불가능 변환 정보는 분리 불가능 역변환의 적용 여부를 지시하고, 분리 불가능 역변환은 분리 불가능 1차 역변환 또는 분리 불가능 2차 역변환을 나타낼 수 있다. 분리 불가능 변환 정보는, 분리 불가능 변환의 적용 여부를 지시하는 플래그 또는 인덱스일 수 있다.A video decoding device decodes non-separable transform information from a bitstream. The non-separable transform information indicates whether a non-separable inverse transform is applied, and the non-separable inverse transform may represent a non-separable first-order inverse transform or a non-separable second-order inverse transform. The non-separable transform information may be a flag or index indicating whether a non-separable transform is applied.
일 예로서, 분리 불가능 변환 정보가 분리 불가능 역변환의 수행을 지시하는 경우, 영상 복호화 장치는 서브블록 변환 단위의 크기 및 현재블록의 서브 영역들의 예측모드들에 기초하여 분리 불가능 1차 역변환 커널 또는 분리 불가능 2차 역변환 커널에 해당하는 분리 불가능 역변환 커널을 결정할 수 있다.As an example, when the non-separable transform information instructs the performance of a non-separable inverse transform, the image decoding device can determine a non-separable inverse transform kernel corresponding to a non-separable first inverse transform kernel or a non-separable second inverse transform kernel based on the size of the sub-block transform unit and the prediction modes of the sub-regions of the current block.
다른 예로서, 분리 불가능 변환 정보가 분리 불가능 역변환의 수행을 지시하는 경우, 영상 복호화 장치는 서브블록 변환 단위의 크기에 기초하여 분리 불가능 1차 역변환 또는 분리 불가능 2차 역변환의 수행 여부를 결정할 수 있다. As another example, when the non-separable transform information indicates the performance of a non-separable inverse transform, the image decoding device can determine whether to perform a non-separable first inverse transform or a non-separable second inverse transform based on the size of the sub-block transform unit.
다른 예로서, 서브블록 변환 단위의 크기에 기초하여 분리 불가능 1차 역변환을 수행하는 경우, 영상 복호화 장치는 비트스트림으로부터 인덱스를 복호화할 수 있다. 여기서, 인덱스는, 서브 영역들의 예측 조합에 기초하여 정의되는 분리 불가능 1차 역변환 커널을 포함하는 테이블과 관련하여, 테이블에 포함된 분리 불가능 1차 역변환 커널들 중 하나를 지시할 수 있다. 영상 복호화 장치는 인덱스에 기초하여 테이블로부터 서브블록 변환 단위의 분리 불가능 1차 역변환 커널을 획득할 수 있다. As another example, when performing a non-separable first inverse transform based on the size of a sub-block transform unit, the image decoding device can decode an index from a bitstream. Here, the index can indicate one of the non-separable first inverse transform kernels included in a table, with respect to a table including non-separable first inverse transform kernels defined based on a predicted combination of sub-regions. The image decoding device can obtain the non-separable first inverse transform kernel of the sub-block transform unit from the table based on the index.
다른 예로서, 분리 불가능 1차 역변환을 수행하고, 현재블록의 각 서브 영역의 예측모드가 방향성 예측모드가 아닌 경우, 영상 복호화 장치는 현재블록의 예측블록 또는 서브블록 변환 단위에 대응하는 예측 영역에 기반하여 HoG를 생성하고, HoG에 기초하여 많이 누적된 다수의 방향성에 대응되는 적어도 하나의 방향성 예측모드를 유도할 수 있다. 분리 불가능 1차 역변환을 수행하고, 현재블록의 각 서브 영역의 예측모드가 방향성 예측모드인 경우, 영상 복호화 장치는 현재블록의 예측블록 또는 서브블록 변환 단위에 대응하는 예측 영역에 기반하여 HoG를 생성하고, HoG로부터 많이 누적된 다수의 방향성에 대응되는 적어도 하나의 방향성 예측모드를 유도할 수 있다. 영상 복호화 장치는 적어도 하나의 유도된 방향성 예측모드 중 하나에 기초하여 서브블록 변환 단위의 분리 불가능 1차 역변환 커널을 결정할 수 있다. As another example, when a non-separable first inverse transform is performed and the prediction mode of each sub-region of the current block is not a directional prediction mode, the image decoding device can generate a HoG based on a prediction region corresponding to a prediction block or a sub-block transformation unit of the current block, and derive at least one directional prediction mode corresponding to a plurality of directionality that has accumulated a lot based on the HoG. When a non-separable first inverse transform is performed and the prediction mode of each sub-region of the current block is a directional prediction mode, the image decoding device can generate a HoG based on a prediction region corresponding to a prediction block or a sub-block transformation unit of the current block, and derive at least one directional prediction mode corresponding to a plurality of directionality that has accumulated a lot from the HoG. The image decoding device can determine a non-separable first inverse transform kernel of the sub-block transformation unit based on one of the at least one derived directional prediction mode.
반면, 분리 불가능 1차 역변환을 수행하지 않는 경우, 영상 복호화 장치는 비트스트림으로부터 인덱스를 복호화할 수 있다. 여기서, 인덱스는, 서브 영역들의 예측 조합 및 가중합 영역에 기초하여 정의되는 수직 및 수평 방향의 1차 역변환 커널 쌍들을 포함하는 테이블과 관련하여, 테이블에 포함된 1차 역변환 커널 쌍들 중 하나를 지시할 수 있다. 영상 복호화 장치는 인덱스에 기초하여 테이블로부터 서브블록 변환 단위의 수직 및 수평 방향의 1차 역변환 커널 쌍을 획득할 수 있다. On the other hand, when the non-separable first inverse transform is not performed, the image decoding device can decode an index from the bitstream. Here, the index can indicate one of the first inverse transform kernel pairs included in the table, with respect to a table including pairs of first inverse transform kernels in vertical and horizontal directions defined based on a predicted combination and a weighted sum region of sub-regions. The image decoding device can obtain the first inverse transform kernel pairs in the vertical and horizontal directions of the sub-block transform unit from the table based on the index.
일 예로서, 서브블록 변환 단위의 크기에 기초하여 분리 불가능 2차 역변환을 수행하는 경우, 영상 복호화 장치는 비트스트림으로부터 인덱스를 복호화할 수 있다. 여기서, 인덱스는, 서브 영역들의 예측 조합에 기초하여 정의되는 분리 불가능 2차 역변환 커널을 포함하는 테이블과 관련하여, 테이블에 포함된 분리 불가능 2차 역변환 커널들 중 하나를 지시할 수 있다. 영상 복호화 장치는 인덱스에 기초하여 테이블로부터 서브블록 변환 단위의 분리 불가능 2차 역변환 커널을 획득할 수 있다. As an example, when performing a non-separable second inverse transform based on the size of a sub-block transform unit, the image decoding device can decode an index from a bitstream. Here, the index can indicate one of the non-separable second inverse transform kernels included in a table, with respect to a table including non-separable second inverse transform kernels defined based on a predicted combination of sub-regions. The image decoding device can obtain the non-separable second inverse transform kernel of the sub-block transform unit from the table based on the index.
다른 예로서, 분리 불가능 2차 역변환을 수행하고, 현재블록의 각 서브 영역의 예측모드가 방향성 예측모드가 아닌 경우, 영상 복호화 장치는 현재블록의 예측블록 또는 서브블록 변환 단위에 대응하는 예측 영역에 기반하여 HoG를 생성하고, HoG로부터 많이 누적된 다수의 방향성에 대응되는 적어도 하나의 방향성 예측모드를 유도할 수 있다. 분리 불가능 2차 역변환을 수행하고, 현재블록의 각 서브 영역의 예측모드가 방향성 예측모드인 경우, 영상 복호화 장치는 현재블록의 예측블록 또는 서브블록 변환 단위에 대응하는 예측 영역에 기반하여 HoG를 생성하고, HoG로부터 많이 누적된 다수의 방향성에 대응되는 작어도 하나의 방향성 예측모드를 유도할 수 있다. 영상 복호화 장치는 적어도 하나의 유도된 방향성 예측모드 중 하나에 기초하여 서브블록 변환 단위의 분리 불가능 2차 역변환 커널을 결정할 수 있다. As another example, when performing a non-separable second-order inverse transform and the prediction mode of each sub-region of the current block is not a directional prediction mode, the image decoding device may perform a prediction region based on the prediction region corresponding to the prediction block or sub-block transform unit of the current block. A HoG can be generated and at least one directional prediction mode corresponding to a large number of accumulated directions from the HoG can be derived. When a non-separable second inverse transformation is performed and the prediction mode of each sub-region of the current block is a directional prediction mode, the image decoding device can decode the prediction region corresponding to the prediction block or sub-block transformation unit of the current block based on the prediction region. A HoG can be generated, and at least one directional prediction mode corresponding to a large number of accumulated directions can be derived from the HoG. The image decoding device can determine a non-separable second-order inverse transform kernel of a sub-block transform unit based on at least one of the derived directional prediction modes.
영상 복호화 장치는 역양자화된 변환계수들에 역변환 커널을 적용하여 서브블록 변환 단위의 잔차샘플들을 생성한다(S1810). The image decoding device applies an inverse transform kernel to inverse quantized transform coefficients to generate residual samples of a sub-block transform unit (S1810).
영상 복호화 장치는 서브블록 변환 단위의 잔차샘플들을 이용하여, 기정해진 스캐닝 순서에 따라 서브블록 변환 단위의 결정에 이용된 예측 영역을 채운다(S1812). The video decoding device fills the prediction area used to determine the sub-block transformation unit according to a predetermined scanning order using residual samples of the sub-block transformation unit (S1812).
서브블록 변환 단위가 예측 영역보다 큰 경우, 영상 복호화 장치는 서브블록 변환 단위로부터 기정해진 스캐닝 순서에 따른 마지막 잔차샘플들을 버림으로써, 예측 영역의 크기와 같아지도록 서브블록 변환 단위의 크기를 조정할 수 있다. If the sub-block transform unit is larger than the prediction region, the image decoding device can adjust the size of the sub-block transform unit to be the same as the size of the prediction region by discarding the last residual samples according to the scanning order determined from the sub-block transform unit.
영상 복호화 장치는 예측 영역의 주변에 영(zero) 샘플들을 패딩하여 현재블록의 잔차블록을 생성한다(S1814). The image decoding device generates a residual block of the current block by padding zero samples around the prediction region (S1814).
반면, 플래그가 거짓으로서 서브블록 변환 단위를 사용하지 않는 경우 (S1804의 No), 영상 복호화 장치는 현재블록의 역변환 커널을 결정하고, 결정된 역변환 커널을 현재블록의 역양자화된 변환계수들에 적용하여 현재블록의 잔차블록을 생성할 수 있다. On the other hand, if the flag is false and the sub-block transform unit is not used (No of S1804), the image decoding device can determine the inverse transform kernel of the current block and apply the determined inverse transform kernel to the inverse quantized transform coefficients of the current block to generate the residual block of the current block.
본 명세서의 흐름도/타이밍도에서는 각 과정들을 순차적으로 실행하는 것으로 기재하고 있으나, 이는 본 개시의 일 실시예의 기술 사상을 예시적으로 설명한 것에 불과한 것이다. 다시 말해, 본 개시의 일 실시예가 속하는 기술 분야에서 통상의 지식을 가진 자라면 본 개시의 일 실시예의 본질적인 특성에서 벗어나지 않는 범위에서 흐름도/타이밍도에 기재된 순서를 변경하여 실행하거나 각 과정들 중 하나 이상의 과정을 병렬적으로 실행하는 것으로 다양하게 수정 및 변형하여 적용 가능할 것이므로, 흐름도/타이밍도는 시계열적인 순서로 한정되는 것은 아니다.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.
이상의 설명에서 예시적인 실시예들은 많은 다른 방식으로 구현될 수 있다는 것을 이해해야 한다. 하나 이상의 예시들에서 설명된 기능들 혹은 방법들은 하드웨어, 소프트웨어, 펌웨어 또는 이들의 임의의 조합으로 구현될 수 있다. 본 명세서에서 설명된 기능적 컴포넌트들은 그들의 구현 독립성을 특히 더 강조하기 위해 "...부(unit)" 로 라벨링되었음을 이해해야 한다. 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.
한편, 본 실시예에서 설명된 다양한 기능들 혹은 방법들은 하나 이상의 프로세서에 의해 판독되고 실행될 수 있는 비일시적 기록매체에 저장된 명령어들로 구현될 수도 있다. 비일시적 기록매체는, 예를 들어, 컴퓨터 시스템에 의하여 판독가능한 형태로 데이터가 저장되는 모든 종류의 기록장치를 포함한다. 예를 들어, 비일시적 기록매체는 EPROM(erasable programmable read only memory), 플래시 드라이브, 광학 드라이브, 자기 하드 드라이브, 솔리드 스테이트 드라이브(SSD)와 같은 저장매체를 포함한다.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).
이상의 설명은 본 실시예의 기술 사상을 예시적으로 설명한 것에 불과한 것으로서, 본 실시예가 속하는 기술 분야에서 통상의 지식을 가진 자라면 본 실시예의 본질적인 특성에서 벗어나지 않는 범위에서 다양한 수정 및 변형이 가능할 것이다. 따라서, 본 실시예들은 본 실시예의 기술 사상을 한정하기 위한 것이 아니라 설명하기 위한 것이고, 이러한 실시예에 의하여 본 실시예의 기술 사상의 범위가 한정되는 것은 아니다. 본 실시예의 보호 범위는 아래의 청구범위에 의하여 해석되어야 하며, 그와 동등한 범위 내에 있는 모든 기술 사상은 본 실시예의 권리범위에 포함되는 것으로 해석되어야 할 것이다.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.
CROSS-REFERENCE TO RELATED APPLICATION CROSS-REFERENCE TO RELATED APPLICATION
본 특허출원은 2024년 4월 15일 한국에 출원한 특허출원번호 제 10-2024-0050270 호, 2025년 3월 25일 한국에 출원한 특허출원번호 제 10-2025-0038023 호에 대해 우선권을 주장하며, 그 모든 내용은 참고문헌으로 본 특허출원에 병합된다.This patent application claims priority to Korean patent application No. 10-2024-0050270, filed in Korea on April 15, 2024, and Korean patent application No. 10-2025-0038023, filed in Korea on March 25, 2025, the entire contents of which are incorporated herein by reference.
Claims (17)
Applications Claiming Priority (4)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| KR20240050270 | 2024-04-15 | ||
| KR10-2024-0050270 | 2024-04-15 | ||
| KR1020250038023A KR20250151989A (en) | 2024-04-15 | 2025-03-25 | Method for Transform or Inverse-transform in Geometric Partitioning Mode |
| KR10-2025-0038023 | 2025-03-25 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2025221093A1 true WO2025221093A1 (en) | 2025-10-23 |
Family
ID=97403942
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/KR2025/095119 Pending WO2025221093A1 (en) | 2024-04-15 | 2025-03-26 | Transform or inverse transform method in geometric partitioning mode |
Country Status (1)
| Country | Link |
|---|---|
| WO (1) | WO2025221093A1 (en) |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR20120003406A (en) * | 2010-07-02 | 2012-01-10 | (주)휴맥스 | Apparatus and method for image coding / decoding for intra prediction encoding |
| KR20200110214A (en) * | 2019-03-12 | 2020-09-23 | 현대자동차주식회사 | Method and apparatus for intra prediction in which prediction unit is divided into sub-units |
| KR20210118154A (en) * | 2019-01-28 | 2021-09-29 | 오피 솔루션즈, 엘엘씨 | Inter prediction in geometric partitioning with an adaptive number of regions |
| KR102366765B1 (en) * | 2018-12-21 | 2022-02-24 | 삼성전자주식회사 | Video encoding method and apparatus, video decoding method and apparatus |
| KR20220101638A (en) * | 2019-11-30 | 2022-07-19 | 베이징 바이트댄스 네트워크 테크놀로지 컴퍼니, 리미티드 | Simplified inter prediction using geometric segmentation |
-
2025
- 2025-03-26 WO PCT/KR2025/095119 patent/WO2025221093A1/en active Pending
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR20120003406A (en) * | 2010-07-02 | 2012-01-10 | (주)휴맥스 | Apparatus and method for image coding / decoding for intra prediction encoding |
| KR102366765B1 (en) * | 2018-12-21 | 2022-02-24 | 삼성전자주식회사 | Video encoding method and apparatus, video decoding method and apparatus |
| KR20210118154A (en) * | 2019-01-28 | 2021-09-29 | 오피 솔루션즈, 엘엘씨 | Inter prediction in geometric partitioning with an adaptive number of regions |
| KR20200110214A (en) * | 2019-03-12 | 2020-09-23 | 현대자동차주식회사 | Method and apparatus for intra prediction in which prediction unit is divided into sub-units |
| KR20220101638A (en) * | 2019-11-30 | 2022-07-19 | 베이징 바이트댄스 네트워크 테크놀로지 컴퍼니, 리미티드 | Simplified inter prediction using geometric segmentation |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2023132564A1 (en) | Method and apparatus for modifying motion vector list at decoder side in inter prediction | |
| WO2023033486A1 (en) | Video signal processing method and apparatus therefor | |
| WO2020106117A1 (en) | Inter-image component prediction method, and image encoding and decoding method and device using same | |
| WO2023182698A1 (en) | Method for reconstructed luma information-based chroma component prediction | |
| WO2022197135A1 (en) | Video coding method and device using adaptive order of divided sub-blocks | |
| WO2024034849A1 (en) | Video coding method and device using luma component-based chroma component prediction | |
| WO2023171912A1 (en) | Prediction block generation at video frame boundary | |
| WO2023038315A1 (en) | Video coding method and apparatus using subblock coding order change and intra prediction according thereto | |
| WO2022197139A1 (en) | Method and device for video coding using intra-subblock prediction of chroma block | |
| WO2025221093A1 (en) | Transform or inverse transform method in geometric partitioning mode | |
| WO2025225963A1 (en) | Method for adaptively correcting inter-component prediction signal in inter prediction | |
| WO2024219752A1 (en) | Video coding method and device for selecting transform kernel and inverse transform kernel according to prediction mode | |
| WO2024111820A1 (en) | Method and device for video coding that intra-predict chroma block on basis of geometric partitioning | |
| WO2024111964A1 (en) | Method and apparatus for video coding that adaptively determines blending area in geometric partitioning mode | |
| WO2023085600A1 (en) | Method and device for video encoding using implicit arbitrary block division and predictions arising therefrom | |
| WO2025116318A1 (en) | Bidirectional prediction method based on geometric partitioning | |
| WO2024232517A1 (en) | Method and apparatus for video coding using sub-block partitioning-based combined inter and intra prediction | |
| WO2024136154A1 (en) | Method and apparatus for video coding using adaptive reference line candidate list | |
| WO2025244328A1 (en) | Method and apparatus for video coding for deriving intra prediction mode | |
| WO2024237549A1 (en) | Method and device for video coding using local illumination compensation-based prediction in geometric partitioning mode | |
| WO2024071680A1 (en) | Method and apparatus for video coding based on non-separable primary transform | |
| WO2024237460A1 (en) | Method and apparatus for inter-prediction signal-based cross-component prediction | |
| WO2023219289A1 (en) | Method for deriving intra-prediction mode on basis of reference pixel | |
| WO2025225966A1 (en) | Method and device for video coding using extrapolation filter in intra prediction | |
| WO2025116448A1 (en) | Video coding method and apparatus using derivation of intra prediction mode |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 25790718 Country of ref document: EP Kind code of ref document: A1 |